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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 1833493003: Remove ForceHorriblySlowRectMapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pi
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 27e2f756b675aba83d5c954abd15e7b6acbff981..47dfd272e591ebd0d74d19fdfdcfc24c8ddc8fc0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -379,49 +379,6 @@ bool LayoutBlock::allowsOverflowClip() const
return node() != document().viewportDefiningElement();
}
-void LayoutBlock::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState)
-{
- LayoutBox::invalidatePaintOfSubtreesIfNeeded(childPaintInvalidationState);
-
- // Take care of positioned objects. This is required as PaintInvalidationState keeps a single clip rect.
- if (TrackedLayoutBoxListHashSet* positionedObjects = this->positionedObjects()) {
- for (auto* box : *positionedObjects) {
-
- // One of the layoutObjects we're skipping over here may be the child's paint invalidation container,
- // so we can't pass our own paint invalidation container along.
- const LayoutBoxModelObject& paintInvalidationContainerForChild = box->containerForPaintInvalidation();
-
- // If it's a new paint invalidation container, we won't have properly accumulated the offset into the
- // PaintInvalidationState.
- // FIXME: Teach PaintInvalidationState to handle this case. crbug.com/371485
- if (paintInvalidationContainerForChild != childPaintInvalidationState.paintInvalidationContainer()) {
- ForceHorriblySlowRectMapping slowRectMapping(&childPaintInvalidationState);
- PaintInvalidationState disabledPaintInvalidationState(childPaintInvalidationState, *this, paintInvalidationContainerForChild);
- box->invalidateTreeIfNeeded(disabledPaintInvalidationState);
- continue;
- }
-
- // If the positioned layoutObject is absolutely positioned and it is inside
- // a relatively positioned inline element, we need to account for
- // the inline elements position in PaintInvalidationState.
- if (box->style()->position() == AbsolutePosition) {
- LayoutObject* container = box->container(&paintInvalidationContainerForChild, 0);
- if (container->isInFlowPositioned() && container->isLayoutInline()) {
- // FIXME: We should be able to use PaintInvalidationState for this.
- // Currently, we will place absolutely positioned elements inside
- // relatively positioned inline blocks in the wrong location. crbug.com/371485
- ForceHorriblySlowRectMapping slowRectMapping(&childPaintInvalidationState);
- PaintInvalidationState disabledPaintInvalidationState(childPaintInvalidationState, *this, paintInvalidationContainerForChild);
- box->invalidateTreeIfNeeded(disabledPaintInvalidationState);
- continue;
- }
- }
-
- box->invalidateTreeIfNeeded(childPaintInvalidationState);
- }
- }
-}
-
inline static void invalidateDisplayItemClientForStartOfContinuationsIfNeeded(const LayoutBlock& block)
{
// If the block is a continuation or containing block of an inline continuation, invalidate the

Powered by Google App Engine
This is Rietveld 408576698