Changeset 215394 in webkit


Ignore:
Timestamp:
Apr 15, 2017 11:15:48 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r215393.
https://bugs.webkit.org/show_bug.cgi?id=170876

breaks scrollable iframes on ios (Requested by anttik on
#webkit).

Reverted changeset:

"GraphicsLayerCA::recursiveCommitChanges should not descend
into subtrees without changes"
https://bugs.webkit.org/show_bug.cgi?id=170851
http://trac.webkit.org/changeset/215393

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r215393 r215394  
     12017-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
    1162017-04-14  Antti Koivisto  <antti@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r215393 r215394  
    566566    virtual bool isCoordinatedGraphicsLayer() const { return false; }
    567567
    568     virtual void setScrollPositionChanged() { }
    569 
    570568    static void traverse(GraphicsLayer&, std::function<void (GraphicsLayer&)>);
    571569
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r215393 r215394  
    12421242}
    12431243
    1244 void GraphicsLayerCA::setScrollPositionChanged()
    1245 {
    1246     // This invalidates the layer so the coverage rects gets updated.
    1247     noteLayerPropertyChanged(ScrollPositionChanged);
    1248 }
    1249 
    12501244TransformationMatrix GraphicsLayerCA::layerTransform(const FloatPoint& position, const TransformationMatrix* customTransform) const
    12511245{
     
    13611355    bool intersectsCoverageRect = isViewportConstrained || rects.coverageRect.intersects(FloatRect(m_boundsOrigin, size()));
    13621356    if (intersectsCoverageRect != m_intersectsCoverageRect) {
    1363         addUncommittedChanges(CoverageRectChanged);
     1357        m_uncommittedChanges |= CoverageRectChanged;
    13641358        m_intersectsCoverageRect = intersectsCoverageRect;
    13651359    }
    13661360
    13671361    if (visibleRectChanged) {
    1368         addUncommittedChanges(CoverageRectChanged);
     1362        m_uncommittedChanges |= CoverageRectChanged;
    13691363        m_visibleRect = rects.visibleRect;
    13701364    }
    13711365
    13721366    if (coverageRectChanged) {
    1373         addUncommittedChanges(CoverageRectChanged);
     1367        m_uncommittedChanges |= CoverageRectChanged;
    13741368        m_coverageRect = rects.coverageRect;
    13751369    }
     
    13801374void GraphicsLayerCA::recursiveCommitChanges(const CommitState& commitState, const TransformState& state, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool affectedByPageScale)
    13811375{
    1382     if (!commitState.ancestorHadChanges && !m_uncommittedChanges && !hasDescendantsWithUncommittedChanges())
    1383         return;
    1384 
    13851376    TransformState localState = state;
    13861377    CommitState childCommitState = commitState;
    1387 
    13881378    bool affectedByTransformAnimation = commitState.ancestorHasTransformAnimation;
    13891379
     
    14221412
    14231413    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   
    14291415    if (appliesPageScale()) {
    14301416        pageScaleFactor = this->pageScaleFactor();
     
    14641450    if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer))
    14651451        maskLayer->commitLayerChangesAfterSublayers(childCommitState);
    1466 
    1467     setHasDescendantsWithUncommittedChanges(false);
    14681452
    14691453    bool hadDirtyRects = m_uncommittedChanges & DirtyRectsChanged;
     
    15811565        // Ensure that we cap layer depth in commitLayerChangesAfterSublayers().
    15821566        if (commitState.treeDepth > cMaxLayerTreeDepth)
    1583             addUncommittedChanges(ChildrenChanged);
     1567            m_uncommittedChanges |= ChildrenChanged;
    15841568    }
    15851569
     
    17231707    // Ensure that we cap layer depth in commitLayerChangesAfterSublayers().
    17241708    if (commitState.treeDepth > cMaxLayerTreeDepth)
    1725         addUncommittedChanges(ChildrenChanged);
     1709        m_uncommittedChanges |= ChildrenChanged;
    17261710}
    17271711
     
    21332117            m_structuralLayer = nullptr;
    21342118
    2135             addUncommittedChanges(structuralLayerChangeFlags);
     2119            m_uncommittedChanges |= structuralLayerChangeFlags;
    21362120        }
    21372121        return;
     
    21612145        return;
    21622146   
    2163     addUncommittedChanges(structuralLayerChangeFlags);
     2147    m_uncommittedChanges |= structuralLayerChangeFlags;
    21642148
    21652149    // We've changed the layer that our parent added to its sublayer list, so tell it to update
     
    36323616    }
    36333617
    3634     addUncommittedChanges(ChildrenChanged
     3618    m_uncommittedChanges |= ChildrenChanged
    36353619        | GeometryChanged
    36363620        | TransformChanged
     
    36483632        | OpacityChanged
    36493633        | NameChanged
    3650         | DebugIndicatorsChanged);
     3634        | DebugIndicatorsChanged;
    36513635   
    36523636    if (isTiledLayer)
    3653         addUncommittedChanges(CoverageRectChanged);
     3637        m_uncommittedChanges |= CoverageRectChanged;
    36543638
    36553639    moveAnimations(oldLayer.get(), m_layer.get());
     
    40254009}
    40264010
    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 
    40484011void GraphicsLayerCA::noteLayerPropertyChanged(LayerChangeFlags flags, ScheduleFlushOrNot scheduleFlush)
    40494012{
     
    40514014    bool oldCanThrottleLayerFlush = canThrottleLayerFlush();
    40524015
    4053     addUncommittedChanges(flags);
     4016    m_uncommittedChanges |= flags;
    40544017
    40554018    if (scheduleFlush == ScheduleFlush) {
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r215393 r215394  
    153153    struct CommitState {
    154154        int treeDepth { 0 };
    155         bool ancestorHadChanges { false };
    156155        bool ancestorHasTransformAnimation { false };
    157156        bool ancestorIsViewportConstrained { false };
     
    165164
    166165    WEBCORE_EXPORT TiledBacking* tiledBacking() const override;
    167 
    168     WEBCORE_EXPORT void setScrollPositionChanged() override;
    169166
    170167protected:
     
    498495        WindRuleChanged                         = 1LLU << 37,
    499496        UserInteractionEnabledChanged           = 1LLU << 38,
    500         ScrollPositionChanged                   = 1LLU << 39,
    501497    };
    502498    typedef uint64_t LayerChangeFlags;
    503     void addUncommittedChanges(LayerChangeFlags);
    504     bool hasDescendantsWithUncommittedChanges() const { return m_hasDescendantsWithUncommittedChanges; }
    505     void setHasDescendantsWithUncommittedChanges(bool);
    506499    enum ScheduleFlushOrNot { ScheduleFlush, DontScheduleFlush };
    507500    void noteLayerPropertyChanged(LayerChangeFlags, ScheduleFlushOrNot = ScheduleFlush);
     
    604597    LayerChangeFlags m_uncommittedChanges { CoverageRectChanged };
    605598#endif
    606     bool m_hasDescendantsWithUncommittedChanges { false };
    607599
    608600    bool m_isCommittingChanges { false };
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r215393 r215394  
    17571757    // it will also manage updating the scroll layer position.
    17581758    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();
    17601761        return;
    17611762    }
Note: See TracChangeset for help on using the changeset viewer.