Changeset 137682 in webkit
- Timestamp:
- Dec 13, 2012 4:30:25 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r137677 r137682 1 2012-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 1 18 2012-12-13 James Simonsen <simonjam@chromium.org> 2 19 -
trunk/LayoutTests/platform/chromium/TestExpectations
r137669 r137682 1451 1451 crbug.com/24207 fast/events/attempt-scroll-with-no-scrollbars.html [ Failure ] 1452 1452 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 1456 1453 # No glyph for U+FFFD (Replacement Character : black diamond with 1457 1454 # question mark) in them on Win XP. … … 3629 3626 webkit.org/b/85856 [ Win Mac Android ] fast/overflow/unreachable-overflow-rtl-bug.html [ Failure ImageOnlyFailure ] 3630 3627 webkit.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 ]3632 3628 webkit.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 ]3634 3629 webkit.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 ]3636 3630 3637 3631 # Bug 93148 changed this to a testRunner test and it started timing out on Mac. … … 3699 3693 webkit.org/b/94353 compositing/overflow/scrolling-content-clip-to-viewport.html [ Failure ] 3700 3694 webkit.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 ]3702 3695 webkit.org/b/94353 compositing/overflow/scrolling-without-painting.html [ Failure ] 3703 3696 webkit.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 ]3705 3697 webkit.org/b/94353 compositing/overflow/updating-scrolling-content.html [ Failure ] 3706 3698 webkit.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 ]3708 3699 webkit.org/b/94353 compositing/overflow/textarea-scroll-touch.html [ Failure ] 3709 3700 webkit.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 ]3711 3701 3712 3702 # Failing on Linux (Content Shell) only now … … 3715 3705 webkit.org/b/94353 compositing/overflow/overflow-auto-with-touch.html [ Failure ] 3716 3706 webkit.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 ]3718 3707 webkit.org/b/94353 compositing/overflow/overflow-overlay-with-touch.html [ Failure ] 3719 3708 webkit.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 ]3721 3709 3722 3710 webkit.org/b/90488 [ Win ] http/tests/inspector/network-preflight-options.html [ Pass Slow ] -
trunk/Source/WebCore/ChangeLog
r137680 r137682 1 2012-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 1 42 2012-12-13 Andreas Kling <akling@apple.com> 2 43 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r137646 r137682 148 148 , m_hasSelfPaintingLayerDescendant(false) 149 149 , m_hasSelfPaintingLayerDescendantDirty(false) 150 , m_hasOutOfFlowPositionedDescendant(false)151 , m_hasOutOfFlowPositionedDescendantDirty(false)152 , m_needsCompositedScrolling(false)153 , m_descendantsAreContiguousInStackingOrder(false)154 150 , m_isRootLayer(renderer->isRenderView()) 155 151 , m_usedTransparency(false) … … 475 471 } 476 472 477 bool RenderLayer::acceleratedCompositingForOverflowScrollEnabled() const478 {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 our485 // descendants for a contiguous block in stacking order. This is required in486 // order for an element to be safely promoted to a stacking context. It is safe487 // to become a stacking context if this change would not alter the stacking488 // order of layers on the page. That can only happen if a non-descendant appear489 // between us and our descendants in stacking order. Here's an example:490 //491 // this492 // / | \.493 // A B C494 // /\ | /\.495 // 0 -8 D 2 7496 // |497 // 5498 //499 // I've labeled our normal flow descendants A, B, C, and D, our stacking500 // context descendants with their z indices, and us with 'this' (we're a501 // stacking context and our zIndex doesn't matter here). These nodes appear in502 // three lists: posZOrder, negZOrder, and normal flow (keep in mind that normal503 // flow layers don't overlap). So if we arrange these lists in order we get our504 // 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 4514 //515 // Note that the normal flow descendants can share an index because they don't516 // stack/overlap. Now our problem becomes very simple: a layer can safely become517 // a stacking context if the stacking-order indices of it and its descendants518 // appear in a contiguous block in the list of stacking indices. This problem519 // can be solved very efficiently by calculating the min/max stacking indices in520 // the subtree, and the number stacking context descendants. Once we have this521 // information, we know that the subtree's indices form a contiguous block if:522 //523 // maxStackIndex - minStackIndex == numSCDescendants524 //525 // So for node A in the example above we would have:526 // maxStackIndex = 1527 // minStackIndex = -1528 // numSCDecendants = 2529 //530 // and so,531 // maxStackIndex - minStackIndex == numSCDescendants532 // ===> 1 - (-1) == 2533 // ===> 2 == 2534 //535 // Since this is true, A can safely become a stacking context.536 // Now, for node C we have:537 //538 // maxStackIndex = 4539 // minStackIndex = 0 <-- because C has stacking index 0.540 // numSCDecendants = 2541 //542 // and so,543 // maxStackIndex - minStackIndex == numSCDescendants544 // ===> 4 - 0 == 2545 // ===> 4 == 2546 //547 // Since this is false, C cannot be safely promoted to a stacking context. This548 // happened because of the elements with z-index 5 and 0. Now if 5 had been a549 // child of C rather than D, and A had no child with Z index 0, we would have had:550 //551 // maxStackIndex = 3552 // minStackIndex = 0 <-- because C has stacking index 0.553 // numSCDecendants = 3554 //555 // and so,556 // maxStackIndex - minStackIndex == numSCDescendants557 // ===> 3 - 0 == 3558 // ===> 3 == 3559 //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 #endif629 m_descendantsAreContiguousInStackingOrder = newValue;630 #if USE(ACCELERATED_COMPOSITING)631 if (didUpdate)632 updateNeedsCompositedScrolling();633 #endif634 }635 }636 637 473 void RenderLayer::computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* geometryMap) 638 474 { … … 739 575 geometryMap->popMappingsToAncestor(parent()); 740 576 } 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 #endif757 577 758 578 #if ENABLE(CSS_COMPOSITING) … … 885 705 return; 886 706 } 887 }888 889 bool RenderLayer::canSafelyEstablishAStackingContext() const890 {891 if (isStackingContext() || !stackingContext())892 return true;893 894 return m_descendantsAreContiguousInStackingOrder;895 707 } 896 708 … … 948 760 } 949 761 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 762 void RenderLayer::updateDescendantDependentFlags() 763 { 764 if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty) { 956 765 m_hasVisibleDescendant = false; 957 766 m_hasSelfPaintingLayerDescendant = false; 958 m_hasOutOfFlowPositionedDescendant = false;959 960 HashSet<const RenderObject*> childOutOfFlowDescendantContainingBlocks;961 767 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(); 974 769 975 770 bool hasVisibleDescendant = child->m_hasVisibleContent || child->m_hasVisibleDescendant; 976 771 bool hasSelfPaintingLayerDescendant = child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant(); 977 bool hasOutOfFlowPositionedDescendant = !childOutOfFlowDescendantContainingBlocks.isEmpty();978 772 979 773 m_hasVisibleDescendant |= hasVisibleDescendant; 980 774 m_hasSelfPaintingLayerDescendant |= hasSelfPaintingLayerDescendant; 981 m_hasOutOfFlowPositionedDescendant |= hasOutOfFlowPositionedDescendant; 982 983 if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && m_hasOutOfFlowPositionedDescendant) 775 776 if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant) 984 777 break; 985 778 } 986 987 if (outOfFlowDescendantContainingBlocks && renderer())988 outOfFlowDescendantContainingBlocks->remove(renderer());989 990 779 m_visibleDescendantStatusDirty = false; 991 780 m_hasSelfPaintingLayerDescendantDirty = false; 992 m_hasOutOfFlowPositionedDescendantDirty = false;993 994 #if USE(ACCELERATED_COMPOSITING)995 if (oldHasOutOfFlowPositionedDescendant != m_hasOutOfFlowPositionedDescendant)996 updateNeedsCompositedScrolling();997 #endif998 781 } 999 782 … … 1596 1379 setAncestorChainHasSelfPaintingLayerDescendant(); 1597 1380 1598 if ((child->renderer() && child->renderer()->isOutOfFlowPositioned()) || child->hasOutOfFlowPositionedDescendant())1599 setAncestorChainHasOutOfFlowPositionedDescendant(child->renderer()->containingBlock());1600 1601 1381 #if USE(ACCELERATED_COMPOSITING) 1602 1382 compositor()->layerWasAdded(this, child); … … 1630 1410 oldChild->dirtyStackingContextZOrderLists(); 1631 1411 } 1632 1633 if ((oldChild->renderer() && oldChild->renderer()->isOutOfFlowPositioned()) || oldChild->hasOutOfFlowPositionedDescendant())1634 dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();1635 1412 1636 1413 oldChild->setPreviousSibling(0); … … 1846 1623 bool RenderLayer::usesCompositedScrolling() const 1847 1624 { 1848 return isComposited() && backing()->scrollingLayer();1849 }1850 1851 bool RenderLayer::needsCompositedScrolling() const1852 {1853 return m_needsCompositedScrolling;1854 }1855 1856 void RenderLayer::updateNeedsCompositedScrolling()1857 {1858 bool oldNeedsCompositedScrolling = m_needsCompositedScrolling;1859 1860 1625 if (!scrollsOverflow() || !allowsScrolling()) 1861 m_needsCompositedScrolling = false; 1862 else { 1863 bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEnabled() 1864 && canSafelyEstablishAStackingContext() 1865 && !hasOutOfFlowPositionedDescendant(); 1626 return false; 1866 1627 1867 1628 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) 1868 m_needsCompositedScrolling = forceUseCompositedScrolling ||renderer()->style()->useTouchOverflowScrolling();1629 return renderer()->style()->useTouchOverflowScrolling(); 1869 1630 #else 1870 m_needsCompositedScrolling = forceUseCompositedScrolling; 1871 #endif 1872 } 1873 1874 if (oldNeedsCompositedScrolling != m_needsCompositedScrolling) 1875 updateSelfPaintingLayer(); 1631 return false; 1632 #endif 1876 1633 } 1877 1634 #endif … … 2037 1794 } 2038 1795 2039 bool requiresRepaint = true;2040 2041 #if USE(ACCELERATED_COMPOSITING)2042 if (compositor()->inCompositingMode() && usesCompositedScrolling())2043 requiresRepaint = false;2044 #endif2045 2046 1796 // Just schedule a full repaint of our object. 2047 if (view && requiresRepaint)1797 if (view && !usesCompositedScrolling()) 2048 1798 renderer()->repaintUsingContainer(repaintContainer, pixelSnappedIntRect(m_repaintRect)); 2049 1799 … … 5051 4801 5052 4802 #if USE(ACCELERATED_COMPOSITING) 5053 if (!renderer()->documentBeingDestroyed()) {4803 if (!renderer()->documentBeingDestroyed()) 5054 4804 compositor()->setCompositingLayersNeedRebuild(); 5055 if (acceleratedCompositingForOverflowScrollEnabled())5056 compositor()->setShouldReevaluateCompositingAfterLayout();5057 }5058 4805 #endif 5059 4806 } … … 5075 4822 5076 4823 #if USE(ACCELERATED_COMPOSITING) 5077 if (!renderer()->documentBeingDestroyed()) {4824 if (!renderer()->documentBeingDestroyed()) 5078 4825 compositor()->setCompositingLayersNeedRebuild(); 5079 if (acceleratedCompositingForOverflowScrollEnabled())5080 compositor()->setShouldReevaluateCompositingAfterLayout();5081 }5082 4826 #endif 5083 4827 } … … 5177 4921 void RenderLayer::updateLayerListsIfNeeded() 5178 4922 { 5179 bool shouldUpdateDescendantsAreContiguousInStackingOrder = isStackingContext() && (m_zOrderListsDirty || m_normalFlowListDirty);5180 5181 4923 updateZOrderLists(); 5182 4924 updateNormalFlowList(); … … 5186 4928 reflectionLayer->updateNormalFlowList(); 5187 4929 } 5188 5189 if (shouldUpdateDescendantsAreContiguousInStackingOrder)5190 updateDescendantsAreContiguousInStackingOrder();5191 4930 } 5192 4931 … … 5276 5015 #endif 5277 5016 && !isTransparent() 5278 && ! needsCompositedScrolling();5017 && !usesCompositedScrolling(); 5279 5018 } 5280 5019 … … 5283 5022 return !isNormalFlowOnly() 5284 5023 || hasOverlayScrollbars() 5285 || needsCompositedScrolling()5024 || usesCompositedScrolling() 5286 5025 || renderer()->hasReflection() 5287 5026 || renderer()->hasMask() … … 5379 5118 } 5380 5119 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 #endif5392 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 #endif5414 }5415 }5416 5417 5120 void RenderLayer::styleChanged(StyleDifference, const RenderStyle* oldStyle) 5418 5121 { … … 5435 5138 } 5436 5139 5140 updateStackingContextsAfterStyleChange(oldStyle); 5437 5141 updateScrollbarsAfterStyleChange(oldStyle); 5438 updateStackingContextsAfterStyleChange(oldStyle);5439 5142 // Overlay scrollbars can make this layer self-painting so we need 5440 5143 // to recompute the bit once scrollbars have been updated. 5441 5144 updateSelfPaintingLayer(); 5442 updateOutOfFlowPositioned(oldStyle);5443 5145 5444 5146 if (!hasReflection() && m_reflection) … … 5469 5171 5470 5172 #if USE(ACCELERATED_COMPOSITING) 5471 updateNeedsCompositedScrolling();5472 5173 if (compositor()->updateLayerCompositingState(this)) 5473 5174 compositor()->setCompositingLayersNeedRebuild(); -
trunk/Source/WebCore/rendering/RenderLayer.h
r137646 r137682 404 404 void updateLayerPositionsAfterOverflowScroll(); 405 405 void updateLayerPositionsAfterDocumentScroll(); 406 407 #if USE(ACCELERATED_COMPOSITING)408 void positionOverflowControlsAfterPromotionToCompositedScrolling();409 #endif410 406 411 407 bool isPaginated() const { return m_isPaginated; } … … 467 463 // Part of the issue is with subtree relayout: we don't check if our ancestors have some descendant flags dirty, missing some updates. 468 464 bool hasSelfPaintingLayerDescendant() const { return m_hasSelfPaintingLayerDescendant; } 469 470 // This returns true if we have an out of flow positioned descendant whose471 // containing block is not a descendant of ours. If this is true, we cannot472 // automatically opt into composited scrolling since this out of flow473 // positioned descendant would become clipped by us, possibly altering the474 // rendering of the page.475 bool hasOutOfFlowPositionedDescendant() const { return m_hasOutOfFlowPositionedDescendant; }476 465 477 466 // Gets the nearest enclosing positioned ancestor layer (also includes … … 667 656 virtual GraphicsLayer* layerForScrollCorner() const; 668 657 virtual bool usesCompositedScrolling() const OVERRIDE; 669 bool needsCompositedScrolling() const;670 658 #else 671 659 bool isComposited() const { return false; } … … 737 725 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 738 726 739 bool acceleratedCompositingForOverflowScrollEnabled() const;740 void updateDescendantsAreContiguousInStackingOrder();741 void updateDescendantsAreContiguousInStackingOrderRecursive(const HashMap<const RenderLayer*, int>&, int& minIndex, int& maxIndex, int& count, bool firstIteration);742 743 727 void computeRepaintRects(const RenderLayerModelObject* repaintContainer, const RenderGeometryMap* = 0); 744 728 void computeRepaintRectsIncludingDescendants(); … … 756 740 void updateScrollbarsAfterStyleChange(const RenderStyle* oldStyle); 757 741 void updateScrollbarsAfterLayout(); 758 759 void setAncestorChainHasOutOfFlowPositionedDescendant(RenderObject* containingBlock);760 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();761 void updateOutOfFlowPositioned(const RenderStyle* oldStyle);762 763 void updateNeedsCompositedScrolling();764 742 765 743 // Returns true if the position changed. … … 898 876 void setAncestorChainHasVisibleDescendant(); 899 877 900 void updateDescendantDependentFlags( HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks = 0);878 void updateDescendantDependentFlags(); 901 879 902 880 // This flag is computed by RenderLayerCompositor, which knows more about 3d hierarchies than we do. … … 955 933 IndirectCompositingReason indirectCompositingReason() const { return static_cast<IndirectCompositingReason>(m_indirectCompositingReason); } 956 934 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;960 935 #endif 961 936 … … 997 972 bool m_hasSelfPaintingLayerDescendant : 1; 998 973 bool m_hasSelfPaintingLayerDescendantDirty : 1; 999 1000 // If we have no out of flow positioned descendants and no non-descendant1001 // appears between our descendants in stacking order, then we may become a1002 // 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 our1009 // descendants in stacking order. This is one of the requirements of being1010 // able to safely become a stacking context.1011 bool m_descendantsAreContiguousInStackingOrder : 1;1012 974 1013 975 const bool m_isRootLayer : 1; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r137646 r137682 343 343 { 344 344 for (RenderLayer* curr = layer; curr; curr = curr->parent()) { 345 if (curr->hasTransform() || curr-> needsCompositedScrolling())345 if (curr->hasTransform() || curr->usesCompositedScrolling()) 346 346 return true; 347 347 } … … 452 452 453 453 // Our scrolling layer will clip. 454 if (m_owningLayer-> needsCompositedScrolling())454 if (m_owningLayer->usesCompositedScrolling()) 455 455 needsDescendentsClippingLayer = false; 456 456 … … 461 461 layerConfigChanged = true; 462 462 463 if (updateScrollingLayers(m_owningLayer-> needsCompositedScrolling()))463 if (updateScrollingLayers(m_owningLayer->usesCompositedScrolling())) 464 464 layerConfigChanged = true; 465 465 … … 605 605 graphicsLayerParentLocation = renderer()->view()->documentRect().location(); 606 606 607 if (compAncestor && compAncestor-> needsCompositedScrolling()) {607 if (compAncestor && compAncestor->usesCompositedScrolling()) { 608 608 RenderBox* renderBox = toRenderBox(compAncestor->renderer()); 609 609 IntSize scrollOffset = compAncestor->scrolledContentOffset(); … … 962 962 layer->setDrawsContent(!scrollCornerAndResizer.isEmpty()); 963 963 } 964 }965 966 bool RenderLayerBacking::hasUnpositionedOverflowControlsLayers() const967 {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;981 964 } 982 965 -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r137646 r137682 138 138 void updateAfterWidgetResize(); 139 139 void positionOverflowControlsLayers(const IntSize& offsetFromRoot); 140 bool hasUnpositionedOverflowControlsLayers() const;141 140 142 141 bool usingTileCache() const { return m_usingTiledCacheLayer; } -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r137646 r137682 991 991 if (overlapMap) 992 992 overlapMap->geometryMap().popMappingsToAncestor(ancestorLayer); 993 994 if (layer->usesCompositedScrolling())995 layer->positionOverflowControlsAfterPromotionToCompositedScrolling();996 993 } 997 994 … … 2014 2011 bool RenderLayerCompositor::requiresCompositingForOverflowScrolling(const RenderLayer* layer) const 2015 2012 { 2016 return layer-> needsCompositedScrolling();2013 return layer->usesCompositedScrolling(); 2017 2014 } 2018 2015 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r137646 r137682 230 230 231 231 void reportMemoryUsage(MemoryObjectInfo*) const; 232 void setShouldReevaluateCompositingAfterLayout() { m_reevaluateCompositingAfterLayout = true; }233 232 234 233 enum FixedPositionLayerNotCompositedReason { -
trunk/Source/WebCore/testing/InternalSettings.cpp
r137646 r137682 212 212 } 213 213 214 void InternalSettings::setEnableCompositingForOverflowScroll(bool enabled, ExceptionCode& ec)215 {216 InternalSettingsGuardForSettings();217 settings()->setAcceleratedCompositingForOverflowScrollEnabled(enabled);218 }219 220 214 void InternalSettings::setAcceleratedDrawingEnabled(bool enabled, ExceptionCode& ec) 221 215 { -
trunk/Source/WebCore/testing/InternalSettings.h
r137646 r137682 104 104 void setEnableCompositingForFixedPosition(bool enabled, ExceptionCode&); 105 105 void setEnableCompositingForScrollableFrames(bool enabled, ExceptionCode&); 106 void setEnableCompositingForOverflowScroll(bool enabled, ExceptionCode&);107 106 void setAcceleratedDrawingEnabled(bool enabled, ExceptionCode&); 108 107 void setAcceleratedFiltersEnabled(bool enabled, ExceptionCode&); -
trunk/Source/WebCore/testing/InternalSettings.idl
r137646 r137682 30 30 void setEnableCompositingForFixedPosition(in boolean enabled) raises(DOMException); 31 31 void setEnableCompositingForScrollableFrames(in boolean enabled) raises(DOMException); 32 void setEnableCompositingForOverflowScroll(in boolean enabled) raises(DOMException);33 32 void setAcceleratedDrawingEnabled(in boolean enabled) raises(DOMException); 34 33 void setAcceleratedFiltersEnabled(in boolean enabled) raises(DOMException); -
trunk/Tools/ChangeLog
r137673 r137682 1 2012-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 1 14 2012-12-13 Dirk Pranke <dpranke@chromium.org> 2 15 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
r137645 r137682 392 392 'fast/images', 393 393 ['--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']),400 394 ] 401 395
Note: See TracChangeset
for help on using the changeset viewer.