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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2276073002: Fix invalidation of absolute sized SVG content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check 406 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha ve enough saved information to do accurate check
407 // of clipping change. Will remove when we remove rect-based paint invalidat ion. 407 // of clipping change. Will remove when we remove rect-based paint invalidat ion.
408 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() 408 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
409 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( ) 409 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( )
410 && !usesCompositedScrolling() 410 && !usesCompositedScrolling()
411 // Note that isLayoutView() below becomes unnecessary after the launch o f root layer scrolling. 411 // Note that isLayoutView() below becomes unnecessary after the launch o f root layer scrolling.
412 && (hasOverflowClip() || isLayoutView())) 412 && (hasOverflowClip() || isLayoutView()))
413 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer(); 413 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer();
414 414
415 // Another variant of crbug.com/490725 -- absolute sized SVG content must be
416 // forcibly invalidated when the paint invalidation rect changes.
417 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
418 && isSVG()
419 && previousPaintInvalidationRect != this->previousPaintInvalidationRect( )
420 && !styleRef().isOverflowVisible())
421 newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinCon tainer();
422
415 newPaintInvalidationState.updateForChildren(reason); 423 newPaintInvalidationState.updateForChildren(reason);
416 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); 424 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
417 } 425 }
418 426
419 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl udeBlockOverflows) const 427 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl udeBlockOverflows) const
420 { 428 {
421 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { 429 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) {
422 // Outlines of out-of-flow positioned descendants are handled in LayoutB lock::addOutlineRects(). 430 // Outlines of out-of-flow positioned descendants are handled in LayoutB lock::addOutlineRects().
423 if (child->isOutOfFlowPositioned()) 431 if (child->isOutOfFlowPositioned())
424 continue; 432 continue;
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 if (rootElementStyle->hasBackground()) 1113 if (rootElementStyle->hasBackground())
1106 return false; 1114 return false;
1107 1115
1108 if (node() != document().firstBodyElement()) 1116 if (node() != document().firstBodyElement())
1109 return false; 1117 return false;
1110 1118
1111 return true; 1119 return true;
1112 } 1120 }
1113 1121
1114 } // namespace blink 1122 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698