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

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

Issue 1581593003: Skip PaintPhaseFloat if no floats in a layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@OutlinePhase
Patch Set: Created 4 years, 11 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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 LayoutRect rect = visualOverflowRect(); 1460 LayoutRect rect = visualOverflowRect();
1461 LayoutView* layoutView = view(); 1461 LayoutView* layoutView = view();
1462 while (layoutView->frame()->ownerLayoutObject()) 1462 while (layoutView->frame()->ownerLayoutObject())
1463 layoutView = layoutView->frame()->ownerLayoutObject()->view(); 1463 layoutView = layoutView->frame()->ownerLayoutObject()->view();
1464 mapToVisibleRectInAncestorSpace(layoutView, rect, nullptr); 1464 mapToVisibleRectInAncestorSpace(layoutView, rect, nullptr);
1465 return rect.intersects(LayoutRect(layoutView->frameView()->scrollableArea()- >visibleContentRectDouble())); 1465 return rect.intersects(LayoutRect(layoutView->frameView()->scrollableArea()- >visibleContentRectDouble()));
1466 } 1466 }
1467 1467
1468 PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat e& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContaine r) 1468 PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationStat e& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContaine r)
1469 { 1469 {
1470 if (isFloating())
1471 paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPh aseFloat();
1472
1470 PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason (); 1473 PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason ();
1471 // If the current paint invalidation reason is PaintInvalidationDelayedFull, then this paint invalidation can delayed if the 1474 // If the current paint invalidation reason is PaintInvalidationDelayedFull, then this paint invalidation can delayed if the
1472 // LayoutBox in question is not on-screen. The logic to decide whether this is appropriate exists at the site of the original 1475 // LayoutBox in question is not on-screen. The logic to decide whether this is appropriate exists at the site of the original
1473 // paint invalidation that chose PaintInvalidationDelayedFull. 1476 // paint invalidation that chose PaintInvalidationDelayedFull.
1474 if (fullInvalidationReason == PaintInvalidationDelayedFull) { 1477 if (fullInvalidationReason == PaintInvalidationDelayedFull) {
1475 if (!intersectsVisibleViewport()) 1478 if (!intersectsVisibleViewport())
1476 return PaintInvalidationDelayedFull; 1479 return PaintInvalidationDelayedFull;
1477 1480
1478 // Reset state back to regular full paint invalidation if the object is onscreen. 1481 // Reset state back to regular full paint invalidation if the object is onscreen.
1479 setShouldDoFullPaintInvalidation(PaintInvalidationFull); 1482 setShouldDoFullPaintInvalidation(PaintInvalidationFull);
(...skipping 3424 matching lines...) Expand 10 before | Expand all | Expand 10 after
4904 } 4907 }
4905 4908
4906 void LayoutBox::clearPreviousPaintInvalidationRects() 4909 void LayoutBox::clearPreviousPaintInvalidationRects()
4907 { 4910 {
4908 LayoutBoxModelObject::clearPreviousPaintInvalidationRects(); 4911 LayoutBoxModelObject::clearPreviousPaintInvalidationRects();
4909 if (PaintLayerScrollableArea* scrollableArea = this->scrollableArea()) 4912 if (PaintLayerScrollableArea* scrollableArea = this->scrollableArea())
4910 scrollableArea->clearPreviousPaintInvalidationRects(); 4913 scrollableArea->clearPreviousPaintInvalidationRects();
4911 } 4914 }
4912 4915
4913 } // namespace blink 4916 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698