M55: Invalidate a slightly larger rect when updating popup annotations.
It looks like sometimes there are rounding errors in the display
pipeline when displaying / hiding popup annotations. Compensate by
rouding up the damaged rect slightly.
BUG=chromium:662804
Review-Url: https://codereview.chromium.org/2492733002
(cherry picked from commit c75dcd253d75ea93608410d90a3ce1b605590af0)
Review URL: https://codereview.chromium.org/2523023002 .
diff --git a/fpdfsdk/cpdfsdk_baannothandler.cpp b/fpdfsdk/cpdfsdk_baannothandler.cpp
index a9e24fb..7ed42a7 100644
--- a/fpdfsdk/cpdfsdk_baannothandler.cpp
+++ b/fpdfsdk/cpdfsdk_baannothandler.cpp
@@ -28,6 +28,11 @@
rects.push_back(pBAAnnot->GetRect());
if (CPDF_Annot* pPopupAnnot = pBAAnnot->GetPDFPopupAnnot())
rects.push_back(pPopupAnnot->GetRect());
+
+ // Make the rects round up to avoid https://crbug.com/662804
+ for (CFX_FloatRect& rect : rects)
+ rect.Inflate(1, 1);
+
pPageView->UpdateRects(rects);
}