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

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

Issue 1818963003: Pass nullptr for paintInvalidationState if it can't be used to map geometry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates. 2004 // If the paintInvalidationContainer is below o, then we need to map the rect into paintInvalidationContainer's coordinates.
2005 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner); 2005 LayoutSize containerOffset = ancestor->offsetFromAncestorContainer(conta iner);
2006 rect.move(-containerOffset); 2006 rect.move(-containerOffset);
2007 // If the paintInvalidationContainer is fixed, then the rect is already in its coordinates so doesn't need viewport-adjusting. 2007 // If the paintInvalidationContainer is fixed, then the rect is already in its coordinates so doesn't need viewport-adjusting.
2008 if (ancestor->style()->position() != FixedPosition && container->isLayou tView()) 2008 if (ancestor->style()->position() != FixedPosition && container->isLayou tView())
2009 toLayoutView(container)->adjustViewportConstrainedOffset(rect, Layou tView::toViewportConstrainedPosition(position)); 2009 toLayoutView(container)->adjustViewportConstrainedOffset(rect, Layou tView::toViewportConstrainedPosition(position));
2010 return; 2010 return;
2011 } 2011 }
2012 2012
2013 if (container->isLayoutView()) 2013 if (container->isLayoutView())
2014 toLayoutView(container)->mapToVisibleRectInAncestorSpace(ancestor, rect, LayoutView::toViewportConstrainedPosition(position), paintInvalidationState); 2014 toLayoutView(container)->mapToVisibleRectInAncestorSpace(ancestor, rect, LayoutView::toViewportConstrainedPosition(position), nullptr);
2015 else 2015 else
2016 container->mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalida tionState); 2016 container->mapToVisibleRectInAncestorSpace(ancestor, rect, nullptr);
2017 } 2017 }
2018 2018
2019 void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p aintInvalidationRect) const 2019 void LayoutBox::inflatePaintInvalidationRectForReflectionAndFilter(LayoutRect& p aintInvalidationRect) const
2020 { 2020 {
2021 if (hasReflection()) 2021 if (hasReflection())
2022 paintInvalidationRect.unite(reflectedRect(paintInvalidationRect)); 2022 paintInvalidationRect.unite(reflectedRect(paintInvalidationRect));
2023 2023
2024 if (layer() && layer()->hasFilter()) 2024 if (layer() && layer()->hasFilter())
2025 paintInvalidationRect.expand(layer()->filterOutsets()); 2025 paintInvalidationRect.expand(layer()->filterOutsets());
2026 } 2026 }
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
4704 4704
4705 void LayoutBox::clearPercentHeightDescendants() 4705 void LayoutBox::clearPercentHeightDescendants()
4706 { 4706 {
4707 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) { 4707 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde r(this)) {
4708 if (curr->isBox()) 4708 if (curr->isBox())
4709 toLayoutBox(curr)->removeFromPercentHeightContainer(); 4709 toLayoutBox(curr)->removeFromPercentHeightContainer();
4710 } 4710 }
4711 } 4711 }
4712 4712
4713 } // namespace blink 4713 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698