Changeset 98776 in webkit
- Timestamp:
- Oct 28, 2011, 4:18:08 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/animations/resources/animation-test-helpers.js (modified) (2 diffs)
-
LayoutTests/compositing/visibility/animation-visibility-expected.png (added)
-
LayoutTests/compositing/visibility/animation-visibility-expected.txt (added)
-
LayoutTests/compositing/visibility/animation-visibility.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/RenderLayer.h (modified) (2 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r98775 r98776 1 2011-10-28 Simon Fraser <simon.fraser@apple.com> 2 3 If visibility changes while an accelerated animation is running, element jumps around 4 https://bugs.webkit.org/show_bug.cgi?id=29984 5 6 Reviewed by Chris Marrin. 7 8 Add testcase for visibility changing in the middle of an accelerated animation. 9 10 * animations/resources/animation-test-helpers.js: Add some constants for readability. 11 (checkExpectedValue): Add support for testing 'visibility'. 12 * compositing/visibility/animation-visibility-expected.png: Added. 13 * compositing/visibility/animation-visibility-expected.txt: Added. 14 * compositing/visibility/animation-visibility.html: Added. 15 1 16 2011-10-28 Tim Horton <timothy_horton@apple.com> 2 17 -
trunk/LayoutTests/animations/resources/animation-test-helpers.js
r84872 r98776 33 33 34 34 */ 35 36 const doPixelTest = true; 37 const dontDoPixelTest = false; 35 38 36 39 function isCloseEnough(actual, desired, tolerance) … … 141 144 else 142 145 pass = isCloseEnough(computedValue, expectedValue, tolerance); 146 } else if (property == "visibility") { 147 var element; 148 if (iframeId) 149 element = document.getElementById(iframeId).contentDocument.getElementById(elementId); 150 else 151 element = document.getElementById(elementId); 152 153 computedValue = window.getComputedStyle(element).visibility; 154 if (compareElements) { 155 computedValue2 = window.getComputedStyle(document.getElementById(elementId2)).visibility; 156 pass = computedValue == computedValue2; 157 } 158 else 159 pass = computedValue == expectedValue; 143 160 } else { 144 161 var element; -
trunk/Source/WebCore/ChangeLog
r98775 r98776 1 2011-10-28 Simon Fraser <simon.fraser@apple.com> 2 3 If visibility changes while an accelerated animation is running, element jumps around 4 https://bugs.webkit.org/show_bug.cgi?id=29984 5 6 Reviewed by Chris Marrin. 7 8 Compositing now affects whether RenderLayers for visibility:hidden elements 9 are included in z-order lists. So we have to dirty those lists when we enter 10 compopsiting mode. 11 12 Test: compositing/visibility/animation-visibility.html 13 14 * rendering/RenderLayer.cpp: 15 (WebCore::RenderLayer::updateVisibilityStatus): Removed trailing whitespace. 16 (WebCore::RenderLayer::dirtyZOrderLists): Call dirtyZOrderListsInternal(), which doesn't have 17 to ping the compositor. 18 (WebCore::RenderLayer::dirtyZOrderListsInternal): 19 (WebCore::RenderLayer::dirtyZOrderListsIncludingDescendants): Recursively dirty z-order 20 lists. 21 * rendering/RenderLayer.h: 22 * rendering/RenderLayerCompositor.cpp: 23 (WebCore::RenderLayerCompositor::enableCompositingMode): When going into compositing mode, 24 dirty all z-order lists. 25 1 26 2011-10-28 Tim Horton <timothy_horton@apple.com> 2 27 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r98752 r98776 618 618 m_hasVisibleDescendant = false; 619 619 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) { 620 child->updateVisibilityStatus(); 620 child->updateVisibilityStatus(); 621 621 if (child->m_hasVisibleContent || child->m_hasVisibleDescendant) { 622 622 m_hasVisibleDescendant = true; … … 3971 3971 void RenderLayer::dirtyZOrderLists() 3972 3972 { 3973 dirtyZOrderListsInternal(); 3974 3975 #if USE(ACCELERATED_COMPOSITING) 3976 if (!renderer()->documentBeingDestroyed()) 3977 compositor()->setCompositingLayersNeedRebuild(); 3978 #endif 3979 } 3980 3981 void RenderLayer::dirtyZOrderListsInternal() 3982 { 3973 3983 if (m_posZOrderList) 3974 3984 m_posZOrderList->clear(); … … 3976 3986 m_negZOrderList->clear(); 3977 3987 m_zOrderListsDirty = true; 3978 3979 #if USE(ACCELERATED_COMPOSITING) 3980 if (!renderer()->documentBeingDestroyed()) 3981 compositor()->setCompositingLayersNeedRebuild(); 3982 #endif 3988 } 3989 3990 void RenderLayer::dirtyZOrderListsIncludingDescendants() 3991 { 3992 dirtyZOrderListsInternal(); 3993 3994 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) 3995 child->dirtyZOrderListsIncludingDescendants(); 3983 3996 } 3984 3997 -
trunk/Source/WebCore/rendering/RenderLayer.h
r98735 r98776 377 377 378 378 void dirtyZOrderLists(); 379 void dirtyZOrderListsIncludingDescendants(); 379 380 void dirtyStackingContextZOrderLists(); 380 381 void updateZOrderLists(); … … 541 542 void setFirstChild(RenderLayer* first) { m_first = first; } 542 543 void setLastChild(RenderLayer* last) { m_last = last; } 544 545 void dirtyZOrderListsInternal(); 543 546 544 547 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRenderBox(renderer())->location() : LayoutPoint(); } -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r98627 r98776 125 125 if (m_compositing) { 126 126 ensureRootLayer(); 127 // Compositing affects whether visibility:hidden layers are included in z-order lists, so we have to dirty the lists here. 128 rootRenderLayer()->dirtyZOrderListsIncludingDescendants(); 127 129 notifyIFramesOfCompositingChange(); 128 130 } else … … 1124 1126 } 1125 1127 } 1126 1127 1128 1128 1129 void RenderLayerCompositor::repaintCompositedLayersAbsoluteRect(const LayoutRect& absRect)
Note:
See TracChangeset
for help on using the changeset viewer.