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

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

Issue 1899063002: Mark layer needsPaintPhaseFloat if a LayoutBlockFlow contains float (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 LayoutRect rect = visualOverflowRect(); 1472 LayoutRect rect = visualOverflowRect();
1473 LayoutView* layoutView = view(); 1473 LayoutView* layoutView = view();
1474 while (layoutView->frame()->ownerLayoutObject()) 1474 while (layoutView->frame()->ownerLayoutObject())
1475 layoutView = layoutView->frame()->ownerLayoutObject()->view(); 1475 layoutView = layoutView->frame()->ownerLayoutObject()->view();
1476 mapToVisualRectInAncestorSpace(layoutView, rect); 1476 mapToVisualRectInAncestorSpace(layoutView, rect);
1477 return rect.intersects(LayoutRect(layoutView->frameView()->getScrollableArea ()->visibleContentRectDouble())); 1477 return rect.intersects(LayoutRect(layoutView->frameView()->getScrollableArea ()->visibleContentRectDouble()));
1478 } 1478 }
1479 1479
1480 PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(const PaintInvalidati onState& paintInvalidationState) 1480 PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(const PaintInvalidati onState& paintInvalidationState)
1481 { 1481 {
1482 if (isFloating())
1483 paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPh aseFloat();
1484
1485 if (hasBoxDecorationBackground() 1482 if (hasBoxDecorationBackground()
1486 // We also paint overflow controls in background phase. 1483 // We also paint overflow controls in background phase.
1487 || (hasOverflowClip() && getScrollableArea()->hasOverflowControls())) { 1484 || (hasOverflowClip() && getScrollableArea()->hasOverflowControls())) {
1488 PaintLayer& layer = paintInvalidationState.enclosingSelfPaintingLayer(*t his); 1485 PaintLayer& layer = paintInvalidationState.enclosingSelfPaintingLayer(*t his);
1489 if (layer.layoutObject() != this) 1486 if (layer.layoutObject() != this)
1490 layer.setNeedsPaintPhaseDescendantBlockBackgrounds(); 1487 layer.setNeedsPaintPhaseDescendantBlockBackgrounds();
1491 } 1488 }
1492 1489
1493 PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason (); 1490 PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason ();
1494 // If the current paint invalidation reason is PaintInvalidationDelayedFull, then this paint invalidation can delayed if the 1491 // If the current paint invalidation reason is PaintInvalidationDelayedFull, then this paint invalidation can delayed if the
(...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after
4737 4734
4738 void LayoutBox::clearPercentHeightDescendants() 4735 void LayoutBox::clearPercentHeightDescendants()
4739 { 4736 {
4740 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) { 4737 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) {
4741 if (curr->isBox()) 4738 if (curr->isBox())
4742 toLayoutBox(curr)->removeFromPercentHeightContainer(); 4739 toLayoutBox(curr)->removeFromPercentHeightContainer();
4743 } 4740 }
4744 } 4741 }
4745 4742
4746 } // namespace blink 4743 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698