Changeset 215394 in webkit
- Timestamp:
- Apr 15, 2017 11:15:48 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r215393 r215394 1 2017-04-15 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r215393. 4 https://bugs.webkit.org/show_bug.cgi?id=170876 5 6 breaks scrollable iframes on ios (Requested by anttik on 7 #webkit). 8 9 Reverted changeset: 10 11 "GraphicsLayerCA::recursiveCommitChanges should not descend 12 into subtrees without changes" 13 https://bugs.webkit.org/show_bug.cgi?id=170851 14 http://trac.webkit.org/changeset/215393 15 1 16 2017-04-14 Antti Koivisto <antti@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r215393 r215394 566 566 virtual bool isCoordinatedGraphicsLayer() const { return false; } 567 567 568 virtual void setScrollPositionChanged() { }569 570 568 static void traverse(GraphicsLayer&, std::function<void (GraphicsLayer&)>); 571 569 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r215393 r215394 1242 1242 } 1243 1243 1244 void GraphicsLayerCA::setScrollPositionChanged()1245 {1246 // This invalidates the layer so the coverage rects gets updated.1247 noteLayerPropertyChanged(ScrollPositionChanged);1248 }1249 1250 1244 TransformationMatrix GraphicsLayerCA::layerTransform(const FloatPoint& position, const TransformationMatrix* customTransform) const 1251 1245 { … … 1361 1355 bool intersectsCoverageRect = isViewportConstrained || rects.coverageRect.intersects(FloatRect(m_boundsOrigin, size())); 1362 1356 if (intersectsCoverageRect != m_intersectsCoverageRect) { 1363 addUncommittedChanges(CoverageRectChanged);1357 m_uncommittedChanges |= CoverageRectChanged; 1364 1358 m_intersectsCoverageRect = intersectsCoverageRect; 1365 1359 } 1366 1360 1367 1361 if (visibleRectChanged) { 1368 addUncommittedChanges(CoverageRectChanged);1362 m_uncommittedChanges |= CoverageRectChanged; 1369 1363 m_visibleRect = rects.visibleRect; 1370 1364 } 1371 1365 1372 1366 if (coverageRectChanged) { 1373 addUncommittedChanges(CoverageRectChanged);1367 m_uncommittedChanges |= CoverageRectChanged; 1374 1368 m_coverageRect = rects.coverageRect; 1375 1369 } … … 1380 1374 void GraphicsLayerCA::recursiveCommitChanges(const CommitState& commitState, const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale) 1381 1375 { 1382 if (!commitState.ancestorHadChanges && !m_uncommittedChanges && !hasDescendantsWithUncommittedChanges())1383 return;1384 1385 1376 TransformState localState = state; 1386 1377 CommitState childCommitState = commitState; 1387 1388 1378 bool affectedByTransformAnimation = commitState.ancestorHasTransformAnimation; 1389 1379 … … 1422 1412 1423 1413 bool hadChanges = m_uncommittedChanges; 1424 1425 // FIXME: This could be more fine-grained. Only some types of changes have impact on sublayers. 1426 if (!childCommitState.ancestorHadChanges) 1427 childCommitState.ancestorHadChanges = hadChanges; 1428 1414 1429 1415 if (appliesPageScale()) { 1430 1416 pageScaleFactor = this->pageScaleFactor(); … … 1464 1450 if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) 1465 1451 maskLayer->commitLayerChangesAfterSublayers(childCommitState); 1466 1467 setHasDescendantsWithUncommittedChanges(false);1468 1452 1469 1453 bool hadDirtyRects = m_uncommittedChanges & DirtyRectsChanged; … … 1581 1565 // Ensure that we cap layer depth in commitLayerChangesAfterSublayers(). 1582 1566 if (commitState.treeDepth > cMaxLayerTreeDepth) 1583 addUncommittedChanges(ChildrenChanged);1567 m_uncommittedChanges |= ChildrenChanged; 1584 1568 } 1585 1569 … … 1723 1707 // Ensure that we cap layer depth in commitLayerChangesAfterSublayers(). 1724 1708 if (commitState.treeDepth > cMaxLayerTreeDepth) 1725 addUncommittedChanges(ChildrenChanged);1709 m_uncommittedChanges |= ChildrenChanged; 1726 1710 } 1727 1711 … … 2133 2117 m_structuralLayer = nullptr; 2134 2118 2135 addUncommittedChanges(structuralLayerChangeFlags);2119 m_uncommittedChanges |= structuralLayerChangeFlags; 2136 2120 } 2137 2121 return; … … 2161 2145 return; 2162 2146 2163 addUncommittedChanges(structuralLayerChangeFlags);2147 m_uncommittedChanges |= structuralLayerChangeFlags; 2164 2148 2165 2149 // We've changed the layer that our parent added to its sublayer list, so tell it to update … … 3632 3616 } 3633 3617 3634 addUncommittedChanges(ChildrenChanged3618 m_uncommittedChanges |= ChildrenChanged 3635 3619 | GeometryChanged 3636 3620 | TransformChanged … … 3648 3632 | OpacityChanged 3649 3633 | NameChanged 3650 | DebugIndicatorsChanged );3634 | DebugIndicatorsChanged; 3651 3635 3652 3636 if (isTiledLayer) 3653 addUncommittedChanges(CoverageRectChanged);3637 m_uncommittedChanges |= CoverageRectChanged; 3654 3638 3655 3639 moveAnimations(oldLayer.get(), m_layer.get()); … … 4025 4009 } 4026 4010 4027 void GraphicsLayerCA::addUncommittedChanges(LayerChangeFlags flags)4028 {4029 m_uncommittedChanges |= flags;4030 4031 if (m_isCommittingChanges)4032 return;4033 4034 for (auto* ancestor = parent(); ancestor; ancestor = ancestor->parent()) {4035 auto& ancestorCA = static_cast<GraphicsLayerCA&>(*ancestor);4036 ASSERT(!ancestorCA.m_isCommittingChanges);4037 if (ancestorCA.hasDescendantsWithUncommittedChanges())4038 return;4039 ancestorCA.setHasDescendantsWithUncommittedChanges(true);4040 }4041 }4042 4043 void GraphicsLayerCA::setHasDescendantsWithUncommittedChanges(bool value)4044 {4045 m_hasDescendantsWithUncommittedChanges = value;4046 }4047 4048 4011 void GraphicsLayerCA::noteLayerPropertyChanged(LayerChangeFlags flags, ScheduleFlushOrNot scheduleFlush) 4049 4012 { … … 4051 4014 bool oldCanThrottleLayerFlush = canThrottleLayerFlush(); 4052 4015 4053 addUncommittedChanges(flags);4016 m_uncommittedChanges |= flags; 4054 4017 4055 4018 if (scheduleFlush == ScheduleFlush) { -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r215393 r215394 153 153 struct CommitState { 154 154 int treeDepth { 0 }; 155 bool ancestorHadChanges { false };156 155 bool ancestorHasTransformAnimation { false }; 157 156 bool ancestorIsViewportConstrained { false }; … … 165 164 166 165 WEBCORE_EXPORT TiledBacking* tiledBacking() const override; 167 168 WEBCORE_EXPORT void setScrollPositionChanged() override;169 166 170 167 protected: … … 498 495 WindRuleChanged = 1LLU << 37, 499 496 UserInteractionEnabledChanged = 1LLU << 38, 500 ScrollPositionChanged = 1LLU << 39,501 497 }; 502 498 typedef uint64_t LayerChangeFlags; 503 void addUncommittedChanges(LayerChangeFlags);504 bool hasDescendantsWithUncommittedChanges() const { return m_hasDescendantsWithUncommittedChanges; }505 void setHasDescendantsWithUncommittedChanges(bool);506 499 enum ScheduleFlushOrNot { ScheduleFlush, DontScheduleFlush }; 507 500 void noteLayerPropertyChanged(LayerChangeFlags, ScheduleFlushOrNot = ScheduleFlush); … … 604 597 LayerChangeFlags m_uncommittedChanges { CoverageRectChanged }; 605 598 #endif 606 bool m_hasDescendantsWithUncommittedChanges { false };607 599 608 600 bool m_isCommittingChanges { false }; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r215393 r215394 1757 1757 // it will also manage updating the scroll layer position. 1758 1758 if (hasCoordinatedScrolling()) { 1759 m_scrollLayer->setScrollPositionChanged(); 1759 // We have to schedule a flush in order for the main TiledBacking to update its tile coverage. 1760 scheduleLayerFlushNow(); 1760 1761 return; 1761 1762 }
Note: See TracChangeset
for help on using the changeset viewer.