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

Unified Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 714933002: Set relayoutChildren to 'true' only if size change happens in Table (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: wrong patch Created 6 years, 1 month 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
« no previous file with comments | « Source/core/rendering/RenderLayerClipper.cpp ('k') | Source/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp
index d61144d26f7814ff6db932f4099e431361ea5cfc..e3fab35c0717eebbe301ce0c9ab244d9bd591b28 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp
@@ -153,7 +153,8 @@ HostWindow* RenderLayerScrollableArea::hostWindow() const
GraphicsLayer* RenderLayerScrollableArea::layerForScrolling() const
{
- return layer()->hasCompositedLayerMapping() ? layer()->compositedLayerMapping()->scrollingContentsLayer() : 0;
+ CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping();
+ return compositedLayerMapping ? compositedLayerMapping->scrollingContentsLayer() : 0;
}
GraphicsLayer* RenderLayerScrollableArea::layerForHorizontalScrollbar() const
@@ -161,7 +162,8 @@ GraphicsLayer* RenderLayerScrollableArea::layerForHorizontalScrollbar() const
// See crbug.com/343132.
DisableCompositingQueryAsserts disabler;
- return layer()->hasCompositedLayerMapping() ? layer()->compositedLayerMapping()->layerForHorizontalScrollbar() : 0;
+ CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping();
+ return compositedLayerMapping ? compositedLayerMapping->layerForHorizontalScrollbar() : 0;
}
GraphicsLayer* RenderLayerScrollableArea::layerForVerticalScrollbar() const
@@ -169,7 +171,8 @@ GraphicsLayer* RenderLayerScrollableArea::layerForVerticalScrollbar() const
// See crbug.com/343132.
DisableCompositingQueryAsserts disabler;
- return layer()->hasCompositedLayerMapping() ? layer()->compositedLayerMapping()->layerForVerticalScrollbar() : 0;
+ CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping();
+ return compositedLayerMapping ? compositedLayerMapping->layerForVerticalScrollbar() : 0;
}
GraphicsLayer* RenderLayerScrollableArea::layerForScrollCorner() const
@@ -177,7 +180,8 @@ GraphicsLayer* RenderLayerScrollableArea::layerForScrollCorner() const
// See crbug.com/343132.
DisableCompositingQueryAsserts disabler;
- return layer()->hasCompositedLayerMapping() ? layer()->compositedLayerMapping()->layerForScrollCorner() : 0;
+ CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping();
+ return compositedLayerMapping ? compositedLayerMapping->layerForScrollCorner() : 0;
}
void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
@@ -993,8 +997,8 @@ void RenderLayerScrollableArea::positionOverflowControls(const IntSize& offsetFr
// FIXME, this should eventually be removed, once we are certain that composited
// controls get correctly positioned on a compositor update. For now, conservatively
// leaving this unchanged.
- if (layer()->hasCompositedLayerMapping())
- layer()->compositedLayerMapping()->positionOverflowControlsLayers(offsetFromRoot);
+ if (CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping())
+ compositedLayerMapping->positionOverflowControlsLayers(offsetFromRoot);
}
void RenderLayerScrollableArea::updateScrollCornerStyle()
@@ -1447,8 +1451,9 @@ void RenderLayerScrollableArea::updateCompositingLayersAfterScroll()
if (compositor->inCompositingMode()) {
if (usesCompositedScrolling()) {
DisableCompositingQueryAsserts disabler;
- ASSERT(layer()->hasCompositedLayerMapping());
- layer()->compositedLayerMapping()->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree);
+ CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping();
+ ASSERT(compositedLayerMapping);
+ compositedLayerMapping->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdateSubtree);
compositor->setNeedsCompositingUpdate(CompositingUpdateAfterGeometryChange);
} else {
layer()->setNeedsCompositingInputsUpdate();
@@ -1464,7 +1469,9 @@ bool RenderLayerScrollableArea::usesCompositedScrolling() const
// See https://codereview.chromium.org/176633003/ for the tests that fail without this disabler.
DisableCompositingQueryAsserts disabler;
- return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMapping()->scrollingLayer();
+
+ CompositedLayerMapping* compositedLayerMapping = layer()->compositedLayerMapping();
+ return compositedLayerMapping && compositedLayerMapping->scrollingLayer();
}
static bool layerNeedsCompositedScrolling(const RenderLayer* layer)
« no previous file with comments | « Source/core/rendering/RenderLayerClipper.cpp ('k') | Source/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698