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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.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/inspector/InspectorLayerTreeAgent.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 1bfd1b4189819e4f7894d9705a92eafd8dfe18a5..6c96609eafc5854ecc38cf9c10db3d65a129cf29 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -199,7 +199,7 @@ static void clearPositionConstraintExceptForLayer(GraphicsLayer* layer, Graphics
static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* layer)
{
- ASSERT(layer->hasCompositedLayerMapping());
+ ASSERT(layer->compositedLayerMapping());
do {
if (layer->renderer()->style()->position() == FixedPosition) {
const RenderObject* fixedPositionObject = layer->renderer();
@@ -212,14 +212,14 @@ static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* l
// Composited layers that inherit a fixed position state will be positioned with respect to the nearest compositedLayerMapping's GraphicsLayer.
// So, once we find a layer that has its own compositedLayerMapping, we can stop searching for a fixed position RenderObject.
- } while (layer && !layer->hasCompositedLayerMapping());
+ } while (layer && !layer->compositedLayerMapping());
return WebLayerPositionConstraint();
}
void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer)
{
- ASSERT(layer->hasCompositedLayerMapping());
CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMapping();
+ ASSERT(compositedLayerMapping);
GraphicsLayer* mainLayer = compositedLayerMapping->childForSuperlayers();
// Avoid unnecessary commits
@@ -606,8 +606,12 @@ void ScrollingCoordinator::touchEventTargetRectsDidChange()
void ScrollingCoordinator::updateScrollParentForGraphicsLayer(GraphicsLayer* child, RenderLayer* parent)
{
WebLayer* scrollParentWebLayer = nullptr;
- if (parent && parent->hasCompositedLayerMapping())
- scrollParentWebLayer = toWebLayer(parent->compositedLayerMapping()->scrollingContentsLayer());
+
+ if (parent) {
+ CompositedLayerMapping* compositedLayerMapping = parent->compositedLayerMapping();
+ if (compositedLayerMapping)
+ scrollParentWebLayer = toWebLayer(compositedLayerMapping->scrollingContentsLayer());
+ }
child->setScrollParent(scrollParentWebLayer);
}
@@ -615,8 +619,12 @@ void ScrollingCoordinator::updateScrollParentForGraphicsLayer(GraphicsLayer* chi
void ScrollingCoordinator::updateClipParentForGraphicsLayer(GraphicsLayer* child, RenderLayer* parent)
{
WebLayer* clipParentWebLayer = nullptr;
- if (parent && parent->hasCompositedLayerMapping())
- clipParentWebLayer = toWebLayer(parent->compositedLayerMapping()->parentForSublayers());
+
+ if (parent) {
+ CompositedLayerMapping* compositedLayerMapping = parent->compositedLayerMapping();
+ if (compositedLayerMapping)
+ clipParentWebLayer = toWebLayer(compositedLayerMapping->parentForSublayers());
+ }
child->setClipParent(clipParentWebLayer);
}
« no previous file with comments | « Source/core/inspector/InspectorLayerTreeAgent.cpp ('k') | Source/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698