Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPainter.cpp

Issue 2819923003: [SPInvalidation, SPv2] Compute paint offset for paginated content (Closed)
Patch Set: none Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ObjectPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
index 8f2770f6f91fba4fb92366ae299be0d370b2b08f..e60895de8f5e75ded19002a38198a80a971f6c12 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -11,6 +11,7 @@
#include "core/paint/BoxBorderPainter.h"
#include "core/paint/LayoutObjectDrawingRecorder.h"
#include "core/paint/PaintInfo.h"
+#include "core/paint/PaintLayer.h"
#include "core/style/BorderEdge.h"
#include "core/style/ComputedStyle.h"
#include "platform/geometry/LayoutPoint.h"
@@ -714,11 +715,16 @@ void ObjectPainter::DoCheckPaintOffset(const PaintInfo& paint_info,
LayoutPoint adjusted_paint_offset = paint_offset;
if (layout_object_.IsBox())
adjusted_paint_offset += ToLayoutBox(layout_object_).Location();
- DCHECK(layout_object_.PaintOffset() == adjusted_paint_offset)
- << " Paint offset mismatch: " << layout_object_.DebugName()
- << " from PaintPropertyTreeBuilder: "
- << layout_object_.PaintOffset().ToString()
- << " from painter: " << adjusted_paint_offset.ToString();
+
+ // Paint offsets don't apply to fragments other than the first,
+ // so disbale these checks for all paginated content.
+ if (!layout_object_.PaintingLayer()->EnclosingPaginationLayer()) {
+ DCHECK(layout_object_.PaintOffset() == adjusted_paint_offset)
+ << " Paint offset mismatch: " << layout_object_.DebugName()
+ << " from PaintPropertyTreeBuilder: "
+ << layout_object_.PaintOffset().ToString()
+ << " from painter: " << adjusted_paint_offset.ToString();
+ }
}
#endif
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698