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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp

Issue 2394483003: [SPInvalidation] Ignore clip failure in GeometryMapper::localToVisualRectInAncestorSpace() (Closed)
Patch Set: - Created 4 years, 2 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 | « third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=slimmingPaintInvalidation ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
index 6ef4910a0b91a8d110eb98a68fd8016af531771c..3afd791e506d34d2820b2af3b5ec401ed5e41e7e 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
@@ -4,6 +4,7 @@
#include "platform/graphics/paint/GeometryMapper.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/geometry/LayoutRect.h"
namespace blink {
@@ -107,9 +108,21 @@ FloatRect GeometryMapper::localToVisualRectInAncestorSpace(
const auto clipRect =
localToAncestorClipRect(localState, ancestorState, success);
- DCHECK(success);
- mappedRect.intersect(clipRect);
+ if (success) {
+ mappedRect.intersect(clipRect);
+ } else if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ // On SPv1 we may fail when the paint invalidation container creates an
+ // overflow clip (in ancestorState) which is not in localState of an
+ // out-of-flow positioned descendant. See crbug.com/513108 and layout test
+ // compositing/overflow/handle-non-ancestor-clip-parent.html (run with
+ // --enable-prefer-compositing-to-lcd-text) for details.
+ // Ignore it for SPv1 for now.
+ success = true;
+ } else {
+ DCHECK(success);
+ }
+
return mappedRect;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=slimmingPaintInvalidation ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698