Changeset 154982 in webkit
- Timestamp:
- Sep 3, 2013 7:43:20 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154980 r154982 1 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions] Pseudo-elements as regions should not be exposed to JS 4 https://bugs.webkit.org/show_bug.cgi?id=120633 5 6 Reviewed by Andreas Kling. 7 8 Add tests with pseudo-elements as regions checking the following API: 9 WebKitNamedFlow::getRegions(), WebKitNamedFlow::getRegionsByContent() 10 Because we do not return the pseudo-elements as regions in the region list, 11 i modified WebKitNamedFlow::firstEmptyRegionIndex to skip these regions too. 12 13 * fast/regions/get-regions-by-content-pseudo-expected.txt: Added. 14 * fast/regions/get-regions-by-content-pseudo.html: Added. 15 * fast/regions/webkit-named-flow-get-regions-pseudo-expected.txt: Added. 16 * fast/regions/webkit-named-flow-get-regions-pseudo.html: Added. 17 1 18 2013-09-03 Ádám Kallai <kadam@inf.u-szeged.hu> 2 19 -
trunk/Source/WebCore/ChangeLog
r154981 r154982 1 2013-09-03 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions] Pseudo-elements as regions should not be exposed to JS 4 https://bugs.webkit.org/show_bug.cgi?id=120633 5 6 Reviewed by Andreas Kling. 7 8 Until we properly implement the Region interface (http://dev.w3.org/csswg/css-regions/#the-region-interface) 9 for pseudo-elements, we should not return these as regions in JS. 10 11 Tests: fast/regions/get-regions-by-content-pseudo.html 12 fast/regions/webkit-named-flow-get-regions-pseudo.html 13 14 * dom/WebKitNamedFlow.cpp: 15 (WebCore::WebKitNamedFlow::firstEmptyRegionIndex): Skip pseudo-elements as regions here too, 16 otherwise we may get an index that cannot be used with getRegions(). 17 (WebCore::WebKitNamedFlow::getRegionsByContent): 18 (WebCore::WebKitNamedFlow::getRegions): 19 1 20 2013-09-03 Zan Dobersek <zdobersek@igalia.com> 2 21 -
trunk/Source/WebCore/dom/WebKitNamedFlow.cpp
r153926 r154982 99 99 if (regionList.isEmpty()) 100 100 return -1; 101 102 int countNonPseudoRegions = -1; 101 103 RenderRegionList::const_iterator iter = regionList.begin(); 102 104 for (int index = 0; iter != regionList.end(); ++index, ++iter) { 103 105 const RenderRegion* renderRegion = *iter; 106 // FIXME: Pseudo-elements are not included in the list. 107 // They will be included when we will properly support the Region interface 108 // http://dev.w3.org/csswg/css-regions/#the-region-interface 109 if (renderRegion->isPseudoElement()) 110 continue; 111 countNonPseudoRegions++; 104 112 if (renderRegion->regionOversetState() == RegionEmpty) 105 return index;113 return countNonPseudoRegions; 106 114 } 107 115 return -1; … … 128 136 const RenderRegion* renderRegion = *iter; 129 137 // FIXME: Pseudo-elements are not included in the list. 130 if (!renderRegion->node()) 138 // They will be included when we will properly support the Region interface 139 // http://dev.w3.org/csswg/css-regions/#the-region-interface 140 if (renderRegion->isPseudoElement()) 131 141 continue; 132 142 if (m_parentFlowThread->objectInFlowRegion(contentNode->renderer(), renderRegion)) … … 154 164 const RenderRegion* renderRegion = *iter; 155 165 // FIXME: Pseudo-elements are not included in the list. 156 if (!renderRegion->node()) 166 // They will be included when we will properly support the Region interface 167 // http://dev.w3.org/csswg/css-regions/#the-region-interface 168 if (renderRegion->isPseudoElement()) 157 169 continue; 158 170 regionNodes.append(renderRegion->node());
Note: See TracChangeset
for help on using the changeset viewer.