Changeset 137682 in webkit


Ignore:
Timestamp:
Dec 13, 2012 4:30:25 PM (11 years ago)
Author:
enne@google.com
Message:

Unreviewed, rolling out r137645, r137646, and r137667.
http://trac.webkit.org/changeset/137645
http://trac.webkit.org/changeset/137646
http://trac.webkit.org/changeset/137667
https://bugs.webkit.org/show_bug.cgi?id=104911

Breaks some overflow layout tests

Source/WebCore:

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateDescendantDependentFlags):
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::usesCompositedScrolling):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::dirtyZOrderLists):
(WebCore::RenderLayer::dirtyNormalFlowList):
(WebCore::RenderLayer::updateLayerListsIfNeeded):
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
(WebCore::RenderLayer::styleChanged):

  • rendering/RenderLayer.h:

(RenderLayer):

  • rendering/RenderLayerBacking.cpp:

(WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

  • rendering/RenderLayerBacking.h:

(RenderLayerBacking):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):

  • rendering/RenderLayerCompositor.h:

(RenderLayerCompositor):

  • testing/InternalSettings.cpp:
  • testing/InternalSettings.h:

(InternalSettings):

  • testing/InternalSettings.idl:

Tools:

  • Scripts/webkitpy/layout_tests/port/chromium.py:

(ChromiumPort.virtual_test_suites):

LayoutTests:

  • compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
  • compositing/overflow/automatically-opt-into-composited-scrolling.html: Removed.
  • platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
  • platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
  • platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
  • platform/chromium/TestExpectations:
Location:
trunk
Files:
5 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137677 r137682  
     12012-12-13  Adrienne Walker  <enne@chromium.org>
     2
     3        Unreviewed, rolling out r137645, r137646, and r137667.
     4        http://trac.webkit.org/changeset/137645
     5        http://trac.webkit.org/changeset/137646
     6        http://trac.webkit.org/changeset/137667
     7        https://bugs.webkit.org/show_bug.cgi?id=104911
     8
     9        Breaks some overflow layout tests
     10
     11        * compositing/overflow/automatically-opt-into-composited-scrolling-expected.txt: Removed.
     12        * compositing/overflow/automatically-opt-into-composited-scrolling.html: Removed.
     13        * platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
     14        * platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
     15        * platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Removed.
     16        * platform/chromium/TestExpectations:
     17
    1182012-12-13  James Simonsen  <simonjam@chromium.org>
    219
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r137669 r137682  
    14511451crbug.com/24207 fast/events/attempt-scroll-with-no-scrollbars.html [ Failure ]
    14521452
    1453 # Fails when opting into composited scrolling.
    1454 webkit.org/b/104965 [ Mac ] platform/chromium/virtual/gpu/compositedscrolling/scrollbars/scrollbar-drag-thumb-with-large-content.html [ Failure ]
    1455 
    14561453# No glyph for U+FFFD (Replacement Character : black diamond with
    14571454# question mark) in them on Win XP.
     
    36293626webkit.org/b/85856 [ Win Mac Android ] fast/overflow/unreachable-overflow-rtl-bug.html [ Failure ImageOnlyFailure ]
    36303627webkit.org/b/85856 [ Linux Win SnowLeopard ] scrollbars/rtl/div-absolute.html [ Failure ]
    3631 webkit.org/b/85856 [ Linux Win SnowLeopard ] platform/chromium/virtual/gpu/compositedscrolling/scrollbars/rtl/div-absolute.html [ Failure ]
    36323628webkit.org/b/85856 [ Lion MountainLion ] scrollbars/rtl/div-absolute.html [ Failure Pass ]
    3633 webkit.org/b/85856 [ Lion MountainLion ] platform/chromium/virtual/gpu/compositedscrolling/scrollbars/rtl/div-absolute.html [ Failure Pass ]
    36343629webkit.org/b/85856 scrollbars/rtl/div-horizontal.html [ Failure ]
    3635 webkit.org/b/85856 platform/chromium/virtual/gpu/compositedscrolling/scrollbars/rtl/div-horizontal.html [ Failure ]
    36363630
    36373631# Bug 93148 changed this to a testRunner test and it started timing out on Mac.
     
    36993693webkit.org/b/94353 compositing/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
    37003694webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
    3701 webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/scrolling-content-clip-to-viewport.html [ Failure ]
    37023695webkit.org/b/94353 compositing/overflow/scrolling-without-painting.html [ Failure ]
    37033696webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/scrolling-without-painting.html [ Failure ]
    3704 webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/scrolling-without-painting.html [ Failure ]
    37053697webkit.org/b/94353 compositing/overflow/updating-scrolling-content.html [ Failure ]
    37063698webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/updating-scrolling-content.html [ Failure ]
    3707 webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/updating-scrolling-content.html [ Failure ]
    37083699webkit.org/b/94353 compositing/overflow/textarea-scroll-touch.html [ Failure ]
    37093700webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/textarea-scroll-touch.html [ Failure ]
    3710 webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/textarea-scroll-touch.html [ Failure ]
    37113701
    37123702# Failing on Linux (Content Shell) only now
     
    37153705webkit.org/b/94353 compositing/overflow/overflow-auto-with-touch.html [ Failure ]
    37163706webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/overflow-auto-with-touch.html [ Failure ]
    3717 webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/overflow-auto-with-touch.html [ Failure ]
    37183707webkit.org/b/94353 compositing/overflow/overflow-overlay-with-touch.html [ Failure ]
    37193708webkit.org/b/94353 platform/chromium/virtual/softwarecompositing/overflow/overflow-overlay-with-touch.html [ Failure ]
    3720 webkit.org/b/94353 platform/chromium/virtual/gpu/compositedscrolling/overflow/overflow-overlay-with-touch.html [ Failure ]
    37213709
    37223710webkit.org/b/90488 [ Win ] http/tests/inspector/network-preflight-options.html [ Pass Slow ]
  • trunk/Source/WebCore/ChangeLog

    r137680 r137682  
     12012-12-13  Adrienne Walker  <enne@chromium.org>
     2
     3        Unreviewed, rolling out r137645, r137646, and r137667.
     4        http://trac.webkit.org/changeset/137645
     5        http://trac.webkit.org/changeset/137646
     6        http://trac.webkit.org/changeset/137667
     7        https://bugs.webkit.org/show_bug.cgi?id=104911
     8
     9        Breaks some overflow layout tests
     10
     11        * rendering/RenderLayer.cpp:
     12        (WebCore::RenderLayer::RenderLayer):
     13        (WebCore::RenderLayer::updateDescendantDependentFlags):
     14        (WebCore::RenderLayer::addChild):
     15        (WebCore::RenderLayer::removeChild):
     16        (WebCore::RenderLayer::usesCompositedScrolling):
     17        (WebCore::RenderLayer::scrollTo):
     18        (WebCore::RenderLayer::dirtyZOrderLists):
     19        (WebCore::RenderLayer::dirtyNormalFlowList):
     20        (WebCore::RenderLayer::updateLayerListsIfNeeded):
     21        (WebCore::RenderLayer::shouldBeNormalFlowOnly):
     22        (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
     23        (WebCore::RenderLayer::styleChanged):
     24        * rendering/RenderLayer.h:
     25        (RenderLayer):
     26        * rendering/RenderLayerBacking.cpp:
     27        (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
     28        (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
     29        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
     30        * rendering/RenderLayerBacking.h:
     31        (RenderLayerBacking):
     32        * rendering/RenderLayerCompositor.cpp:
     33        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
     34        (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
     35        * rendering/RenderLayerCompositor.h:
     36        (RenderLayerCompositor):
     37        * testing/InternalSettings.cpp:
     38        * testing/InternalSettings.h:
     39        (InternalSettings):
     40        * testing/InternalSettings.idl:
     41
    1422012-12-13  Andreas Kling  <akling@apple.com>
    243
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r137646 r137682  
    148148    , m_hasSelfPaintingLayerDescendant(false)
    149149    , m_hasSelfPaintingLayerDescendantDirty(false)
    150     , m_hasOutOfFlowPositionedDescendant(false)
    151     , m_hasOutOfFlowPositionedDescendantDirty(false)
    152     , m_needsCompositedScrolling(false)
    153     , m_descendantsAreContiguousInStackingOrder(false)
    154150    , m_isRootLayer(renderer->isRenderView())
    155151    , m_usedTransparency(false)
     
    475471}
    476472
    477 bool RenderLayer::acceleratedCompositingForOverflowScrollEnabled() const
    478 {
    479     return renderer()->frame()
    480         && renderer()->frame()->page()
    481         && renderer()->frame()->page()->settings()->acceleratedCompositingForOverflowScrollEnabled();
    482 }
    483 
    484 // If we are a stacking context, then this function will determine if our
    485 // descendants for a contiguous block in stacking order. This is required in
    486 // order for an element to be safely promoted to a stacking context. It is safe
    487 // to become a stacking context if this change would not alter the stacking
    488 // order of layers on the page. That can only happen if a non-descendant appear
    489 // between us and our descendants in stacking order. Here's an example:
    490 //
    491 //                                 this
    492 //                                /  |  \.
    493 //                               A   B   C
    494 //                              /\   |   /\.
    495 //                             0 -8  D  2  7
    496 //                                   |
    497 //                                   5
    498 //
    499 // I've labeled our normal flow descendants A, B, C, and D, our stacking
    500 // context descendants with their z indices, and us with 'this' (we're a
    501 // stacking context and our zIndex doesn't matter here). These nodes appear in
    502 // three lists: posZOrder, negZOrder, and normal flow (keep in mind that normal
    503 // flow layers don't overlap). So if we arrange these lists in order we get our
    504 // stacking order:
    505 //
    506 //                     [-8], [A-D], [0, 2, 5, 7]--> pos z-order.
    507 //                       |     |
    508 //        Neg z-order. <-+     +--> Normal flow descendants.
    509 //
    510 // We can then assign new, 'stacking' order indices to these elements as follows:
    511 //
    512 //                     [-8], [A-D], [0, 2, 5, 7]
    513 // 'Stacking' indices:  -1     0     1  2  3  4
    514 //
    515 // Note that the normal flow descendants can share an index because they don't
    516 // stack/overlap. Now our problem becomes very simple: a layer can safely become
    517 // a stacking context if the stacking-order indices of it and its descendants
    518 // appear in a contiguous block in the list of stacking indices. This problem
    519 // can be solved very efficiently by calculating the min/max stacking indices in
    520 // the subtree, and the number stacking context descendants. Once we have this
    521 // information, we know that the subtree's indices form a contiguous block if:
    522 //
    523 //           maxStackIndex - minStackIndex == numSCDescendants
    524 //
    525 // So for node A in the example above we would have:
    526 //   maxStackIndex = 1
    527 //   minStackIndex = -1
    528 //   numSCDecendants = 2
    529 //
    530 // and so,
    531 //       maxStackIndex - minStackIndex == numSCDescendants
    532 //  ===>                      1 - (-1) == 2
    533 //  ===>                             2 == 2
    534 //
    535 //  Since this is true, A can safely become a stacking context.
    536 //  Now, for node C we have:
    537 //
    538 //   maxStackIndex = 4
    539 //   minStackIndex = 0 <-- because C has stacking index 0.
    540 //   numSCDecendants = 2
    541 //
    542 // and so,
    543 //       maxStackIndex - minStackIndex == numSCDescendants
    544 //  ===>                         4 - 0 == 2
    545 //  ===>                             4 == 2
    546 //
    547 // Since this is false, C cannot be safely promoted to a stacking context. This
    548 // happened because of the elements with z-index 5 and 0. Now if 5 had been a
    549 // child of C rather than D, and A had no child with Z index 0, we would have had:
    550 //
    551 //   maxStackIndex = 3
    552 //   minStackIndex = 0 <-- because C has stacking index 0.
    553 //   numSCDecendants = 3
    554 //
    555 // and so,
    556 //       maxStackIndex - minStackIndex == numSCDescendants
    557 //  ===>                         3 - 0 == 3
    558 //  ===>                             3 == 3
    559 //
    560 //  And we would conclude that C could be promoted.
    561 void RenderLayer::updateDescendantsAreContiguousInStackingOrder()
    562 {
    563     if (!isStackingContext() || !acceleratedCompositingForOverflowScrollEnabled())
    564         return;
    565 
    566     ASSERT(!m_normalFlowListDirty);
    567     ASSERT(!m_zOrderListsDirty);
    568 
    569     // Create a reverse lookup.
    570     HashMap<const RenderLayer*, int> lookup;
    571 
    572     if (m_negZOrderList) {
    573         int stackingOrderIndex = -1;
    574         size_t listSize = m_negZOrderList->size();
    575         for (size_t i = 0; i < listSize; ++i) {
    576             RenderLayer* currentLayer = m_negZOrderList->at(listSize - i - 1);
    577             if (!currentLayer->isStackingContext())
    578                 continue;
    579             lookup.set(currentLayer, stackingOrderIndex--);
    580         }
    581     }
    582 
    583     if (m_posZOrderList) {
    584         size_t listSize = m_posZOrderList->size();
    585         int stackingOrderIndex = 1;
    586         for (size_t i = 0; i < listSize; ++i) {
    587             RenderLayer* currentLayer = m_posZOrderList->at(i);
    588             if (!currentLayer->isStackingContext())
    589                 continue;
    590             lookup.set(currentLayer, stackingOrderIndex++);
    591         }
    592     }
    593 
    594     int minIndex = 0;
    595     int maxIndex = 0;
    596     int count = 0;
    597     bool firstIteration = true;
    598     updateDescendantsAreContiguousInStackingOrderRecursive(lookup, minIndex, maxIndex, count, firstIteration);
    599 }
    600 
    601 void RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>& lookup, int& minIndex, int& maxIndex, int& count, bool firstIteration)
    602 {
    603     if (isStackingContext() && !firstIteration) {
    604         if (lookup.contains(this)) {
    605             minIndex = std::min(minIndex, lookup.get(this));
    606             maxIndex = std::max(maxIndex, lookup.get(this));
    607             count++;
    608         }
    609         return;
    610     }
    611 
    612     for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
    613         int childMinIndex = 0;
    614         int childMaxIndex = 0;
    615         int childCount = 0;
    616         child->updateDescendantsAreContiguousInStackingOrderRecursive(lookup, childMinIndex, childMaxIndex, childCount, false);
    617         if (childCount) {
    618             count += childCount;
    619             minIndex = std::min(minIndex, childMinIndex);
    620             maxIndex = std::max(maxIndex, childMaxIndex);
    621         }
    622     }
    623 
    624     if (!isStackingContext()) {
    625         bool newValue = maxIndex - minIndex == count;
    626 #if USE(ACCELERATED_COMPOSITING)
    627         bool didUpdate = newValue != m_descendantsAreContiguousInStackingOrder;
    628 #endif
    629         m_descendantsAreContiguousInStackingOrder = newValue;
    630 #if USE(ACCELERATED_COMPOSITING)
    631         if (didUpdate)
    632             updateNeedsCompositedScrolling();
    633 #endif
    634     }
    635 }
    636 
    637473void RenderLayer::computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* geometryMap)
    638474{
     
    739575        geometryMap->popMappingsToAncestor(parent());
    740576}
    741 
    742 #if USE(ACCELERATED_COMPOSITING)
    743 void RenderLayer::positionOverflowControlsAfterPromotionToCompositedScrolling()
    744 {
    745     if (!usesCompositedScrolling() || !backing()->hasUnpositionedOverflowControlsLayers())
    746         return;
    747 
    748     RenderGeometryMap geometryMap(UseTransforms);
    749     RenderView* view = renderer()->view();
    750     if (this != view->layer())
    751         geometryMap.pushMappingsToAncestor(parent(), 0);
    752 
    753     LayoutPoint offsetFromRoot = LayoutPoint(geometryMap.absolutePoint(FloatPoint()));
    754     positionOverflowControls(toSize(roundedIntPoint(offsetFromRoot)));
    755 }
    756 #endif
    757577
    758578#if ENABLE(CSS_COMPOSITING)
     
    885705            return;
    886706    }
    887 }
    888 
    889 bool RenderLayer::canSafelyEstablishAStackingContext() const
    890 {
    891     if (isStackingContext() || !stackingContext())
    892         return true;
    893 
    894     return m_descendantsAreContiguousInStackingOrder;
    895707}
    896708
     
    948760}
    949761
    950 void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks)
    951 {
    952     if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty) {
    953 #if USE(ACCELERATED_COMPOSITING)
    954         bool oldHasOutOfFlowPositionedDescendant = m_hasOutOfFlowPositionedDescendant;
    955 #endif
     762void RenderLayer::updateDescendantDependentFlags()
     763{
     764    if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty) {
    956765        m_hasVisibleDescendant = false;
    957766        m_hasSelfPaintingLayerDescendant = false;
    958         m_hasOutOfFlowPositionedDescendant = false;
    959 
    960         HashSet<const RenderObject*> childOutOfFlowDescendantContainingBlocks;
    961767        for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) {
    962             childOutOfFlowDescendantContainingBlocks.clear();
    963             child->updateDescendantDependentFlags(&childOutOfFlowDescendantContainingBlocks);
    964 
    965             bool childIsOutOfFlowPositioned = child->renderer() && child->renderer()->isOutOfFlowPositioned();
    966             if (childIsOutOfFlowPositioned)
    967                 childOutOfFlowDescendantContainingBlocks.add(child->renderer()->containingBlock());
    968 
    969             if (outOfFlowDescendantContainingBlocks) {
    970                 HashSet<const RenderObject*>::const_iterator it = childOutOfFlowDescendantContainingBlocks.begin();
    971                 for (; it != childOutOfFlowDescendantContainingBlocks.end(); ++it)
    972                     outOfFlowDescendantContainingBlocks->add(*it);
    973             }
     768            child->updateDescendantDependentFlags();
    974769
    975770            bool hasVisibleDescendant = child->m_hasVisibleContent || child->m_hasVisibleDescendant;
    976771            bool hasSelfPaintingLayerDescendant = child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant();
    977             bool hasOutOfFlowPositionedDescendant = !childOutOfFlowDescendantContainingBlocks.isEmpty();
    978772
    979773            m_hasVisibleDescendant |= hasVisibleDescendant;
    980774            m_hasSelfPaintingLayerDescendant |= hasSelfPaintingLayerDescendant;
    981             m_hasOutOfFlowPositionedDescendant |= hasOutOfFlowPositionedDescendant;
    982 
    983             if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && m_hasOutOfFlowPositionedDescendant)
     775
     776            if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant)
    984777                break;
    985778        }
    986 
    987         if (outOfFlowDescendantContainingBlocks && renderer())
    988             outOfFlowDescendantContainingBlocks->remove(renderer());
    989 
    990779        m_visibleDescendantStatusDirty = false;
    991780        m_hasSelfPaintingLayerDescendantDirty = false;
    992         m_hasOutOfFlowPositionedDescendantDirty = false;
    993 
    994 #if USE(ACCELERATED_COMPOSITING)
    995         if (oldHasOutOfFlowPositionedDescendant != m_hasOutOfFlowPositionedDescendant)
    996             updateNeedsCompositedScrolling();
    997 #endif
    998781    }
    999782
     
    15961379        setAncestorChainHasSelfPaintingLayerDescendant();
    15971380
    1598     if ((child->renderer() && child->renderer()->isOutOfFlowPositioned()) || child->hasOutOfFlowPositionedDescendant())
    1599         setAncestorChainHasOutOfFlowPositionedDescendant(child->renderer()->containingBlock());
    1600 
    16011381#if USE(ACCELERATED_COMPOSITING)
    16021382    compositor()->layerWasAdded(this, child);
     
    16301410        oldChild->dirtyStackingContextZOrderLists();
    16311411    }
    1632 
    1633     if ((oldChild->renderer() && oldChild->renderer()->isOutOfFlowPositioned()) || oldChild->hasOutOfFlowPositionedDescendant())
    1634         dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
    16351412
    16361413    oldChild->setPreviousSibling(0);
     
    18461623bool RenderLayer::usesCompositedScrolling() const
    18471624{
    1848     return isComposited() && backing()->scrollingLayer();
    1849 }
    1850 
    1851 bool RenderLayer::needsCompositedScrolling() const
    1852 {
    1853     return m_needsCompositedScrolling;
    1854 }
    1855 
    1856 void RenderLayer::updateNeedsCompositedScrolling()
    1857 {
    1858     bool oldNeedsCompositedScrolling = m_needsCompositedScrolling;
    1859 
    18601625    if (!scrollsOverflow() || !allowsScrolling())
    1861         m_needsCompositedScrolling = false;
    1862     else {
    1863         bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEnabled()
    1864             && canSafelyEstablishAStackingContext()
    1865             && !hasOutOfFlowPositionedDescendant();
     1626        return false;
    18661627
    18671628#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
    1868         m_needsCompositedScrolling = forceUseCompositedScrolling || renderer()->style()->useTouchOverflowScrolling();
     1629    return renderer()->style()->useTouchOverflowScrolling();
    18691630#else
    1870         m_needsCompositedScrolling = forceUseCompositedScrolling;
    1871 #endif
    1872     }
    1873 
    1874     if (oldNeedsCompositedScrolling != m_needsCompositedScrolling)
    1875         updateSelfPaintingLayer();
     1631    return false;
     1632#endif
    18761633}
    18771634#endif
     
    20371794    }
    20381795
    2039     bool requiresRepaint = true;
    2040 
    2041 #if USE(ACCELERATED_COMPOSITING)
    2042     if (compositor()->inCompositingMode() && usesCompositedScrolling())
    2043         requiresRepaint = false;
    2044 #endif
    2045 
    20461796    // Just schedule a full repaint of our object.
    2047     if (view && requiresRepaint)
     1797    if (view && !usesCompositedScrolling())
    20481798        renderer()->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_repaintRect));
    20491799
     
    50514801
    50524802#if USE(ACCELERATED_COMPOSITING)
    5053     if (!renderer()->documentBeingDestroyed()) {
     4803    if (!renderer()->documentBeingDestroyed())
    50544804        compositor()->setCompositingLayersNeedRebuild();
    5055         if (acceleratedCompositingForOverflowScrollEnabled())
    5056             compositor()->setShouldReevaluateCompositingAfterLayout();
    5057     }
    50584805#endif
    50594806}
     
    50754822
    50764823#if USE(ACCELERATED_COMPOSITING)
    5077     if (!renderer()->documentBeingDestroyed()) {
     4824    if (!renderer()->documentBeingDestroyed())
    50784825        compositor()->setCompositingLayersNeedRebuild();
    5079         if (acceleratedCompositingForOverflowScrollEnabled())
    5080             compositor()->setShouldReevaluateCompositingAfterLayout();
    5081     }
    50824826#endif
    50834827}
     
    51774921void RenderLayer::updateLayerListsIfNeeded()
    51784922{
    5179     bool shouldUpdateDescendantsAreContiguousInStackingOrder = isStackingContext() && (m_zOrderListsDirty || m_normalFlowListDirty);
    5180 
    51814923    updateZOrderLists();
    51824924    updateNormalFlowList();
     
    51864928        reflectionLayer->updateNormalFlowList();
    51874929    }
    5188 
    5189     if (shouldUpdateDescendantsAreContiguousInStackingOrder)
    5190         updateDescendantsAreContiguousInStackingOrder();
    51914930}
    51924931
     
    52765015#endif
    52775016            && !isTransparent()
    5278             && !needsCompositedScrolling();
     5017            && !usesCompositedScrolling();
    52795018}
    52805019
     
    52835022    return !isNormalFlowOnly()
    52845023        || hasOverlayScrollbars()
    5285         || needsCompositedScrolling()
     5024        || usesCompositedScrolling()
    52865025        || renderer()->hasReflection()
    52875026        || renderer()->hasMask()
     
    53795118}
    53805119
    5381 void RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containingBlock)
    5382 {
    5383     for (RenderLayer* layer = this; layer; layer = layer->parent()) {
    5384         if (!layer->m_hasOutOfFlowPositionedDescendantDirty && layer->hasOutOfFlowPositionedDescendant())
    5385             break;
    5386 
    5387         layer->m_hasOutOfFlowPositionedDescendantDirty = false;
    5388         layer->m_hasOutOfFlowPositionedDescendant = true;
    5389 #if USE(ACCELERATED_COMPOSITING)
    5390         layer->updateNeedsCompositedScrolling();
    5391 #endif
    5392 
    5393         if (layer->renderer() && layer->renderer() == containingBlock)
    5394             break;
    5395     }
    5396 }
    5397 
    5398 void RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus()
    5399 {
    5400     m_hasOutOfFlowPositionedDescendantDirty = true;
    5401     if (parent())
    5402         parent()->dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
    5403 }
    5404 
    5405 void RenderLayer::updateOutOfFlowPositioned(const RenderStyle* oldStyle)
    5406 {
    5407     bool wasOutOfFlowPositioned = oldStyle && (oldStyle->position() == AbsolutePosition || oldStyle->position() == FixedPosition);
    5408     if (parent() && ((renderer() && renderer()->isOutOfFlowPositioned()) != wasOutOfFlowPositioned)) {
    5409         parent()->dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
    5410 #if USE(ACCELERATED_COMPOSITING)
    5411         if (!renderer()->documentBeingDestroyed() && acceleratedCompositingForOverflowScrollEnabled())
    5412             compositor()->setShouldReevaluateCompositingAfterLayout();
    5413 #endif
    5414     }
    5415 }
    5416 
    54175120void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle)
    54185121{
     
    54355138    }
    54365139
     5140    updateStackingContextsAfterStyleChange(oldStyle);
    54375141    updateScrollbarsAfterStyleChange(oldStyle);
    5438     updateStackingContextsAfterStyleChange(oldStyle);
    54395142    // Overlay scrollbars can make this layer self-painting so we need
    54405143    // to recompute the bit once scrollbars have been updated.
    54415144    updateSelfPaintingLayer();
    5442     updateOutOfFlowPositioned(oldStyle);
    54435145
    54445146    if (!hasReflection() && m_reflection)
     
    54695171
    54705172#if USE(ACCELERATED_COMPOSITING)
    5471     updateNeedsCompositedScrolling();
    54725173    if (compositor()->updateLayerCompositingState(this))
    54735174        compositor()->setCompositingLayersNeedRebuild();
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r137646 r137682  
    404404    void updateLayerPositionsAfterOverflowScroll();
    405405    void updateLayerPositionsAfterDocumentScroll();
    406 
    407 #if USE(ACCELERATED_COMPOSITING)
    408     void positionOverflowControlsAfterPromotionToCompositedScrolling();
    409 #endif
    410406   
    411407    bool isPaginated() const { return m_isPaginated; }
     
    467463    // Part of the issue is with subtree relayout: we don't check if our ancestors have some descendant flags dirty, missing some updates.
    468464    bool hasSelfPaintingLayerDescendant() const { return m_hasSelfPaintingLayerDescendant; }
    469 
    470     // This returns true if we have an out of flow positioned descendant whose
    471     // containing block is not a descendant of ours. If this is true, we cannot
    472     // automatically opt into composited scrolling since this out of flow
    473     // positioned descendant would become clipped by us, possibly altering the
    474     // rendering of the page.
    475     bool hasOutOfFlowPositionedDescendant() const { return m_hasOutOfFlowPositionedDescendant; }
    476465
    477466    // Gets the nearest enclosing positioned ancestor layer (also includes
     
    667656    virtual GraphicsLayer* layerForScrollCorner() const;
    668657    virtual bool usesCompositedScrolling() const OVERRIDE;
    669     bool needsCompositedScrolling() const;
    670658#else
    671659    bool isComposited() const { return false; }
     
    737725    void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
    738726
    739     bool acceleratedCompositingForOverflowScrollEnabled() const;
    740     void updateDescendantsAreContiguousInStackingOrder();
    741     void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIteration);
    742 
    743727    void computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* = 0);
    744728    void computeRepaintRectsIncludingDescendants();
     
    756740    void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle);
    757741    void updateScrollbarsAfterLayout();
    758 
    759     void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containingBlock);
    760     void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
    761     void updateOutOfFlowPositioned(const RenderStyle* oldStyle);
    762 
    763     void updateNeedsCompositedScrolling();
    764742
    765743    // Returns true if the position changed.
     
    898876    void setAncestorChainHasVisibleDescendant();
    899877
    900     void updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks = 0);
     878    void updateDescendantDependentFlags();
    901879
    902880    // This flag is computed by RenderLayerCompositor, which knows more about 3d hierarchies than we do.
     
    955933    IndirectCompositingReason indirectCompositingReason() const { return static_cast<IndirectCompositingReason>(m_indirectCompositingReason); }
    956934    bool mustCompositeForIndirectReasons() const { return m_indirectCompositingReason; }
    957 
    958     // Returns true if z ordering would not change if this layer were to establish a stacking context.
    959     bool canSafelyEstablishAStackingContext() const;
    960935#endif
    961936
     
    997972    bool m_hasSelfPaintingLayerDescendant : 1;
    998973    bool m_hasSelfPaintingLayerDescendantDirty : 1;
    999 
    1000     // If we have no out of flow positioned descendants and no non-descendant
    1001     // appears between our descendants in stacking order, then we may become a
    1002     // stacking context.
    1003     bool m_hasOutOfFlowPositionedDescendant : 1;
    1004     bool m_hasOutOfFlowPositionedDescendantDirty : 1;
    1005 
    1006     bool m_needsCompositedScrolling : 1;
    1007 
    1008     // If this is true, then no non-descendant appears between any of our
    1009     // descendants in stacking order. This is one of the requirements of being
    1010     // able to safely become a stacking context.
    1011     bool m_descendantsAreContiguousInStackingOrder : 1;
    1012974
    1013975    const bool m_isRootLayer : 1;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r137646 r137682  
    343343{
    344344    for (RenderLayer* curr = layer; curr; curr = curr->parent()) {
    345         if (curr->hasTransform() || curr->needsCompositedScrolling())
     345        if (curr->hasTransform() || curr->usesCompositedScrolling())
    346346            return true;
    347347    }
     
    452452
    453453    // Our scrolling layer will clip.
    454     if (m_owningLayer->needsCompositedScrolling())
     454    if (m_owningLayer->usesCompositedScrolling())
    455455        needsDescendentsClippingLayer = false;
    456456
     
    461461        layerConfigChanged = true;
    462462
    463     if (updateScrollingLayers(m_owningLayer->needsCompositedScrolling()))
     463    if (updateScrollingLayers(m_owningLayer->usesCompositedScrolling()))
    464464        layerConfigChanged = true;
    465465
     
    605605        graphicsLayerParentLocation = renderer()->view()->documentRect().location();
    606606
    607     if (compAncestor && compAncestor->needsCompositedScrolling()) {
     607    if (compAncestor && compAncestor->usesCompositedScrolling()) {
    608608        RenderBox* renderBox = toRenderBox(compAncestor->renderer());
    609609        IntSize scrollOffset = compAncestor->scrolledContentOffset();
     
    962962        layer->setDrawsContent(!scrollCornerAndResizer.isEmpty());
    963963    }
    964 }
    965 
    966 bool RenderLayerBacking::hasUnpositionedOverflowControlsLayers() const
    967 {
    968     if (GraphicsLayer* layer = layerForHorizontalScrollbar())
    969         if (!layer->drawsContent())
    970             return true;
    971 
    972     if (GraphicsLayer* layer = layerForVerticalScrollbar())
    973         if (!layer->drawsContent())
    974             return true;
    975 
    976     if (GraphicsLayer* layer = layerForScrollCorner())
    977         if (!layer->drawsContent())
    978             return true;
    979 
    980     return false;
    981964}
    982965
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r137646 r137682  
    138138    void updateAfterWidgetResize();
    139139    void positionOverflowControlsLayers(const IntSize& offsetFromRoot);
    140     bool hasUnpositionedOverflowControlsLayers() const;
    141140
    142141    bool usingTileCache() const { return m_usingTiledCacheLayer; }
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r137646 r137682  
    991991    if (overlapMap)
    992992        overlapMap->geometryMap().popMappingsToAncestor(ancestorLayer);
    993 
    994     if (layer->usesCompositedScrolling())
    995         layer->positionOverflowControlsAfterPromotionToCompositedScrolling();
    996993}
    997994
     
    20142011bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const RenderLayer* layer) const
    20152012{
    2016     return layer->needsCompositedScrolling();
     2013    return layer->usesCompositedScrolling();
    20172014}
    20182015
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r137646 r137682  
    230230
    231231    void reportMemoryUsage(MemoryObjectInfo*) const;
    232     void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAfterLayout = true; }
    233232
    234233    enum FixedPositionLayerNotCompositedReason {
  • trunk/Source/WebCore/testing/InternalSettings.cpp

    r137646 r137682  
    212212}
    213213
    214 void InternalSettings::setEnableCompositingForOverflowScroll(bool enabled, ExceptionCode& ec)
    215 {
    216     InternalSettingsGuardForSettings();
    217     settings()->setAcceleratedCompositingForOverflowScrollEnabled(enabled);
    218 }
    219 
    220214void InternalSettings::setAcceleratedDrawingEnabled(bool enabled, ExceptionCode& ec)
    221215{
  • trunk/Source/WebCore/testing/InternalSettings.h

    r137646 r137682  
    104104    void setEnableCompositingForFixedPosition(bool enabled, ExceptionCode&);
    105105    void setEnableCompositingForScrollableFrames(bool enabled, ExceptionCode&);
    106     void setEnableCompositingForOverflowScroll(bool enabled, ExceptionCode&);
    107106    void setAcceleratedDrawingEnabled(bool enabled, ExceptionCode&);
    108107    void setAcceleratedFiltersEnabled(bool enabled, ExceptionCode&);
  • trunk/Source/WebCore/testing/InternalSettings.idl

    r137646 r137682  
    3030    void setEnableCompositingForFixedPosition(in boolean enabled) raises(DOMException);
    3131    void setEnableCompositingForScrollableFrames(in boolean enabled) raises(DOMException);
    32     void setEnableCompositingForOverflowScroll(in boolean enabled) raises(DOMException);
    3332    void setAcceleratedDrawingEnabled(in boolean enabled) raises(DOMException);
    3433    void setAcceleratedFiltersEnabled(in boolean enabled) raises(DOMException);
  • trunk/Tools/ChangeLog

    r137673 r137682  
     12012-12-13  Adrienne Walker  <enne@chromium.org>
     2
     3        Unreviewed, rolling out r137645, r137646, and r137667.
     4        http://trac.webkit.org/changeset/137645
     5        http://trac.webkit.org/changeset/137646
     6        http://trac.webkit.org/changeset/137667
     7        https://bugs.webkit.org/show_bug.cgi?id=104911
     8
     9        Breaks some overflow layout tests
     10
     11        * Scripts/webkitpy/layout_tests/port/chromium.py:
     12        (ChromiumPort.virtual_test_suites):
     13
    1142012-12-13  Dirk Pranke  <dpranke@chromium.org>
    215
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    r137645 r137682  
    392392                             'fast/images',
    393393                             ['--enable-deferred-image-decoding', '--enable-per-tile-painting', '--force-compositing-mode']),
    394             VirtualTestSuite('platform/chromium/virtual/gpu/compositedscrolling/overflow',
    395                              'compositing/overflow',
    396                              ['--enable-accelerated-compositing-for-overflow-scroll']),
    397             VirtualTestSuite('platform/chromium/virtual/gpu/compositedscrolling/scrollbars',
    398                              'scrollbars',
    399                              ['--enable-accelerated-compositing-for-overflow-scroll']),
    400394        ]
    401395
Note: See TracChangeset for help on using the changeset viewer.