Changeset 170474 in webkit
- Timestamp:
- Jun 26, 2014 12:30:01 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r170454 r170474 1 2014-06-26 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [CSS Grid Layout] Properly support for z-index on grid items 4 https://bugs.webkit.org/show_bug.cgi?id=103329 5 6 Reviewed by Benjamin Poulain. 7 8 From Blink r157620 by <jchaffraix@chromium.org> and r172402 by 9 <wangxianzhu@chromium.org>. 10 11 * css3/blending/repaint/blend-mode-turn-off-isolation-expected.txt: Test rebaseline. 12 * fast/css-grid-layout/grid-item-z-index-change-repaint-expected.html: Added. 13 * fast/css-grid-layout/grid-item-z-index-change-repaint.html: Added. 14 * fast/css-grid-layout/grid-item-z-index-stacking-context-expected.html: Added. 15 * fast/css-grid-layout/grid-item-z-index-stacking-context.html: Added. 16 * fast/css-grid-layout/grid-item-z-index-support-expected.txt: Added. 17 * fast/css-grid-layout/grid-item-z-index-support.html: Added. 18 1 19 2014-06-25 Myles C. Maxfield <mmaxfield@apple.com> 2 20 -
trunk/LayoutTests/css3/blending/repaint/blend-mode-turn-off-isolation-expected.txt
r168465 r170474 2 2 3 3 (repaint rects 4 (rect 8 68 100 100) 4 5 (rect 58 68 100 100) 6 (rect 58 68 100 100) 7 (rect 8 68 100 100) 5 8 ) 6 9 -
trunk/Source/WebCore/ChangeLog
r170469 r170474 1 2014-06-26 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [CSS Grid Layout] Properly support for z-index on grid items 4 https://bugs.webkit.org/show_bug.cgi?id=103329 5 6 Reviewed by Benjamin Poulain. 7 8 From Blink r157620 by <jchaffraix@chromium.org> and r172402 by 9 <wangxianzhu@chromium.org>. 10 11 The specification says that grid should match flexbox and force 12 grid items to be stacking context if z-index is set, regardless 13 of 'position'. After this change, this is what happens. 14 15 Previously z-index changes of static positioned objects were ignored. 16 However, z-index is applicable for some static positioned objects, 17 such as grid items. Ignoring them makes the object not to be properly 18 painted on z-index change. 19 20 As StyleResolver has ensured that z-index is non-auto only if 21 applicable, RenderStyle::changeRequiresLayerRepaint() should not check 22 again (with inconsistent conditions). 23 24 Tests: fast/css-grid-layout/grid-item-z-index-change-repaint.html 25 fast/css-grid-layout/grid-item-z-index-stacking-context.html 26 fast/css-grid-layout/grid-item-z-index-support.html 27 28 * css/StyleResolver.cpp: 29 (WebCore::isDisplayFlexibleOrGridBox): Add new method to check if parent 30 display is flexbox or grid. 31 (WebCore::StyleResolver::adjustRenderStyle): Use new method in z-index 32 condition. 33 * rendering/style/RenderStyle.cpp: 34 (WebCore::RenderStyle::changeRequiresLayerRepaint): Move z-index checks 35 out of non-static positioned objects if. 36 1 37 2014-06-25 Dean Jackson <dino@apple.com> 2 38 -
trunk/Source/WebCore/css/StyleResolver.cpp
r170435 r170474 1137 1137 } 1138 1138 1139 static bool isDisplayFlexibleOrGridBox(EDisplay display) 1140 { 1141 return isDisplayFlexibleBox(display) || isDisplayGridBox(display); 1142 } 1143 1139 1144 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) 1140 1145 static bool isScrollableOverflow(EOverflow overflow) … … 1229 1234 style.setWritingMode(TopToBottomWritingMode); 1230 1235 1231 if (isDisplayFlexible Box(parentStyle.display()) || isDisplayGridBox(parentStyle.display())) {1236 if (isDisplayFlexibleOrGridBox(parentStyle.display())) { 1232 1237 style.setFloating(NoFloat); 1233 1238 style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloating(), !document().inQuirksMode())); … … 1236 1241 1237 1242 // Make sure our z-index value is only applied if the object is positioned. 1238 if (style.position() == StaticPosition && !isDisplayFlexible Box(parentStyle.display()))1243 if (style.position() == StaticPosition && !isDisplayFlexibleOrGridBox(parentStyle.display())) 1239 1244 style.setHasAutoZIndex(); 1240 1245 -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r169407 r170474 674 674 bool RenderStyle::changeRequiresLayerRepaint(const RenderStyle* other, unsigned& changedContextSensitiveProperties) const 675 675 { 676 // StyleResolver has ensured that zIndex is non-auto only if it's applicable. 677 if (m_box->zIndex() != other->m_box->zIndex() || m_box->hasAutoZIndex() != other->m_box->hasAutoZIndex()) 678 return true; 679 676 680 if (position() != StaticPosition) { 677 if (m_box->zIndex() != other->m_box->zIndex() 678 || m_box->hasAutoZIndex() != other->m_box->hasAutoZIndex() 679 || visual->clip != other->visual->clip 681 if (visual->clip != other->visual->clip 680 682 || visual->hasClip != other->visual->hasClip) 681 683 return true;
Note: See TracChangeset
for help on using the changeset viewer.