Changeset 101048 in webkit
- Timestamp:
- Nov 23, 2011 12:42:10 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
- 3 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101043 r101048 1 2011-11-23 Mihnea Ovidenie <mihnea@adobe.com> 2 3 CSS Exclusions: update the name of the shape CSS properties 4 https://bugs.webkit.org/show_bug.cgi?id=71898 5 Instead of a single wrap-shape property, we have wrap-shape-inside and wrap-shape-outside. 6 7 Reviewed by Dean Jackson. 8 9 * fast/exclusions/parsing-wrap-shape-inside-expected.txt: Copied from LayoutTests/fast/exclusions/parsing-wrap-shape-expected.txt. 10 * fast/exclusions/parsing-wrap-shape-inside.html: Copied from LayoutTests/fast/exclusions/parsing-wrap-shape.html. 11 * fast/exclusions/parsing-wrap-shape-outside-expected.txt: Renamed from LayoutTests/fast/exclusions/parsing-wrap-shape-expected.txt. 12 * fast/exclusions/parsing-wrap-shape-outside.html: Renamed from LayoutTests/fast/exclusions/parsing-wrap-shape.html. 13 * fast/exclusions/script-tests/parsing-wrap-shape-inside.js: Copied from LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape.js. 14 * fast/exclusions/script-tests/parsing-wrap-shape-outside.js: Renamed from LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape.js. 15 1 16 2011-11-22 Csaba Osztrogonác <ossy@webkit.org> 2 17 -
trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt
r101047 r101048 1 Testing the parsing of the -webkit-wrap-shape property.1 Testing the parsing of the -webkit-wrap-shape-inside property. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside.html
r101047 r101048 5 5 </head> 6 6 <body> 7 <script src="script-tests/parsing-wrap-shape .js"></script>7 <script src="script-tests/parsing-wrap-shape-inside.js"></script> 8 8 <script src="../js/resources/js-test-post.js"></script> 9 9 </body> -
trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-outside-expected.txt
r101047 r101048 1 Testing the parsing of the -webkit-wrap-shape property.1 Testing the parsing of the -webkit-wrap-shape-outside property. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-outside.html
r101047 r101048 5 5 </head> 6 6 <body> 7 <script src="script-tests/parsing-wrap-shape .js"></script>7 <script src="script-tests/parsing-wrap-shape-outside.js"></script> 8 8 <script src="../js/resources/js-test-post.js"></script> 9 9 </body> -
trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js
r101047 r101048 1 description('Testing the parsing of the -webkit-wrap-shape property.');1 description('Testing the parsing of the -webkit-wrap-shape-inside property.'); 2 2 3 3 function testCSSText(declaration, expected) 4 4 { 5 5 var element = document.createElement("div"); 6 element.style.cssText = "-webkit-wrap-shape : " + declaration;7 return element.style.webkitWrapShape ;6 element.style.cssText = "-webkit-wrap-shape-inside: " + declaration; 7 return element.style.webkitWrapShapeInside; 8 8 } 9 9 … … 11 11 var element = document.createElement("div"); 12 12 document.body.appendChild(element); 13 element.style.setProperty("-webkit-wrap-shape ", value);14 13 element.style.setProperty("-webkit-wrap-shape-inside", value); 14 15 15 var computedStyle = getComputedStyle(element); 16 var actualValue = computedStyle.getPropertyValue("-webkit-wrap-shape ");16 var actualValue = computedStyle.getPropertyValue("-webkit-wrap-shape-inside"); 17 17 document.body.removeChild(element); 18 18 … … 23 23 var parentElement = document.createElement("div"); 24 24 document.body.appendChild(parentElement); 25 parentElement.style.setProperty("-webkit-wrap-shape ", parentValue);25 parentElement.style.setProperty("-webkit-wrap-shape-inside", parentValue); 26 26 27 27 var childElement = document.createElement("div"); 28 28 parentElement.appendChild(childElement); 29 childElement.style.setProperty("-webkit-wrap-shape ", childValue);29 childElement.style.setProperty("-webkit-wrap-shape-inside", childValue); 30 30 31 31 var parentComputedStyle = getComputedStyle(parentElement); 32 var parentActual = parentComputedStyle.getPropertyValue('-webkit-wrap-shape ')33 32 var parentActual = parentComputedStyle.getPropertyValue('-webkit-wrap-shape-inside') 33 34 34 var childComputedStyle = getComputedStyle(childElement); 35 var childActual = childComputedStyle.getPropertyValue('-webkit-wrap-shape ')36 35 var childActual = childComputedStyle.getPropertyValue('-webkit-wrap-shape-inside') 36 37 37 parentElement.removeChild(childElement); 38 38 document.body.removeChild(parentElement); 39 39 40 40 return "parent: " + parentActual + ", child: " + childActual; 41 41 } -
trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-outside.js
r101047 r101048 1 description('Testing the parsing of the -webkit-wrap-shape property.');1 description('Testing the parsing of the -webkit-wrap-shape-outside property.'); 2 2 3 3 function testCSSText(declaration, expected) 4 4 { 5 5 var element = document.createElement("div"); 6 element.style.cssText = "-webkit-wrap-shape : " + declaration;7 return element.style.webkitWrapShape ;6 element.style.cssText = "-webkit-wrap-shape-outside: " + declaration; 7 return element.style.webkitWrapShapeOutside; 8 8 } 9 9 … … 11 11 var element = document.createElement("div"); 12 12 document.body.appendChild(element); 13 element.style.setProperty("-webkit-wrap-shape ", value);14 13 element.style.setProperty("-webkit-wrap-shape-outside", value); 14 15 15 var computedStyle = getComputedStyle(element); 16 var actualValue = computedStyle.getPropertyValue("-webkit-wrap-shape ");16 var actualValue = computedStyle.getPropertyValue("-webkit-wrap-shape-outside"); 17 17 document.body.removeChild(element); 18 18 … … 23 23 var parentElement = document.createElement("div"); 24 24 document.body.appendChild(parentElement); 25 parentElement.style.setProperty("-webkit-wrap-shape ", parentValue);25 parentElement.style.setProperty("-webkit-wrap-shape-outside", parentValue); 26 26 27 27 var childElement = document.createElement("div"); 28 28 parentElement.appendChild(childElement); 29 childElement.style.setProperty("-webkit-wrap-shape ", childValue);29 childElement.style.setProperty("-webkit-wrap-shape-outside", childValue); 30 30 31 31 var parentComputedStyle = getComputedStyle(parentElement); 32 var parentActual = parentComputedStyle.getPropertyValue('-webkit-wrap-shape ')33 32 var parentActual = parentComputedStyle.getPropertyValue('-webkit-wrap-shape-outside') 33 34 34 var childComputedStyle = getComputedStyle(childElement); 35 var childActual = childComputedStyle.getPropertyValue('-webkit-wrap-shape ')36 35 var childActual = childComputedStyle.getPropertyValue('-webkit-wrap-shape-outside') 36 37 37 parentElement.removeChild(childElement); 38 38 document.body.removeChild(parentElement); 39 39 40 40 return "parent: " + parentActual + ", child: " + childActual; 41 41 } -
trunk/Source/WebCore/ChangeLog
r101047 r101048 1 2011-11-23 Mihnea Ovidenie <mihnea@adobe.com> 2 3 CSS Exclusions: update the name of the shape CSS properties 4 https://bugs.webkit.org/show_bug.cgi?id=71898 5 Instead of a single wrap-shape property, we have wrap-shape-inside and wrap-shape-outside. 6 7 Reviewed by Dean Jackson. 8 9 Tests: fast/exclusions/parsing-wrap-shape-inside.html 10 fast/exclusions/parsing-wrap-shape-outside.html 11 12 * css/CSSComputedStyleDeclaration.cpp: 13 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 14 * css/CSSParser.cpp: 15 (WebCore::CSSParser::parseValue): 16 (WebCore::CSSParser::parseWrapShape): 17 * css/CSSParser.h: 18 * css/CSSProperty.cpp: 19 (WebCore::CSSProperty::isInheritedProperty): 20 * css/CSSPropertyNames.in: 21 * css/CSSStyleSelector.cpp: 22 (WebCore::CSSStyleSelector::applyProperty): 23 * rendering/style/RenderStyle.cpp: 24 (WebCore::RenderStyle::diff): 25 * rendering/style/RenderStyle.h: 26 (WebCore::InheritedFlags::setWrapShapeInside): 27 (WebCore::InheritedFlags::wrapShapeInside): 28 (WebCore::InheritedFlags::setWrapShapeOutside): 29 (WebCore::InheritedFlags::wrapShapeOutside): 30 (WebCore::InheritedFlags::initialWrapShapeInside): 31 (WebCore::InheritedFlags::initialWrapShapeOutside): 32 * rendering/style/StyleRareNonInheritedData.cpp: 33 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 34 (WebCore::StyleRareNonInheritedData::operator==): 35 * rendering/style/StyleRareNonInheritedData.h: 36 1 37 2011-11-23 Andrey Kosyakov <caseq@chromium.org> 2 38 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r100749 r101048 2175 2175 break; 2176 2176 2177 case CSSPropertyWebkitWrapShape :2178 if (!style->wrapShape ())2177 case CSSPropertyWebkitWrapShapeInside: 2178 if (!style->wrapShapeInside()) 2179 2179 return primitiveValueCache->createIdentifierValue(CSSValueAuto); 2180 2181 return primitiveValueCache->createValue(style->wrapShape()); 2180 return primitiveValueCache->createValue(style->wrapShapeInside()); 2181 2182 case CSSPropertyWebkitWrapShapeOutside: 2183 if (!style->wrapShapeOutside()) 2184 return primitiveValueCache->createIdentifierValue(CSSValueAuto); 2185 return primitiveValueCache->createValue(style->wrapShapeOutside()); 2182 2186 2183 2187 case CSSPropertyWebkitWrapFlow: -
trunk/Source/WebCore/css/CSSParser.cpp
r100749 r101048 2196 2196 break; 2197 2197 2198 case CSSPropertyWebkitWrapShape: 2198 case CSSPropertyWebkitWrapShapeInside: 2199 case CSSPropertyWebkitWrapShapeOutside: 2199 2200 if (id == CSSValueAuto) 2200 2201 validPrimitive = true; 2201 2202 else if (value->unit == CSSParserValue::Function) 2202 return parseWrapShape( important);2203 return parseWrapShape((propId == CSSPropertyWebkitWrapShapeInside), important); 2203 2204 break; 2204 2205 case CSSPropertyWebkitWrapFlow: … … 3949 3950 } 3950 3951 3951 bool CSSParser::parseWrapShape(bool important)3952 bool CSSParser::parseWrapShape(bool shapeInside, bool important) 3952 3953 { 3953 3954 CSSParserValue* value = m_valueList->current(); … … 3969 3970 3970 3971 if (shape) { 3971 addProperty( CSSPropertyWebkitWrapShape, primitiveValueCache()->createValue(shape.release()), important);3972 addProperty(shapeInside ? CSSPropertyWebkitWrapShapeInside : CSSPropertyWebkitWrapShapeOutside, primitiveValueCache()->createValue(shape.release()), important); 3972 3973 m_valueList->next(); 3973 3974 return true; -
trunk/Source/WebCore/css/CSSParser.h
r100273 r101048 130 130 bool parseShape(int propId, bool important); 131 131 132 bool parseWrapShape(bool important);132 bool parseWrapShape(bool shapeInside, bool important); 133 133 PassRefPtr<CSSWrapShape> parseWrapShapeRect(CSSParserValueList* args); 134 134 PassRefPtr<CSSWrapShape> parseWrapShapeCircle(CSSParserValueList* args); -
trunk/Source/WebCore/css/CSSProperty.cpp
r101008 r101048 627 627 case CSSPropertyWebkitFlowFrom: 628 628 case CSSPropertyWebkitRegionOverflow: 629 case CSSPropertyWebkitWrapShape: 629 case CSSPropertyWebkitWrapShapeInside: 630 case CSSPropertyWebkitWrapShapeOutside: 630 631 case CSSPropertyWebkitWrapMargin: 631 632 case CSSPropertyWebkitWrapPadding: -
trunk/Source/WebCore/css/CSSPropertyNames.in
r100604 r101048 355 355 -webkit-flow-from 356 356 -webkit-region-overflow 357 -webkit-wrap-shape 357 -webkit-wrap-shape-inside 358 -webkit-wrap-shape-outside 358 359 -webkit-wrap-margin 359 360 -webkit-wrap-padding -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r100976 r101048 3861 3861 return; 3862 3862 3863 case CSSPropertyWebkitWrapShape :3864 HANDLE_INHERIT_AND_INITIAL(wrapShape , WrapShape);3863 case CSSPropertyWebkitWrapShapeInside: 3864 HANDLE_INHERIT_AND_INITIAL(wrapShapeInside, WrapShapeInside); 3865 3865 if (!primitiveValue) 3866 3866 return; 3867 3868 3867 if (primitiveValue->getIdent() == CSSValueAuto) 3869 m_style->setWrapShape (0);3868 m_style->setWrapShapeInside(0); 3870 3869 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_SHAPE) 3871 m_style->setWrapShape(primitiveValue->getShapeValue()); 3872 3870 m_style->setWrapShapeInside(primitiveValue->getShapeValue()); 3871 return; 3872 3873 case CSSPropertyWebkitWrapShapeOutside: 3874 HANDLE_INHERIT_AND_INITIAL(wrapShapeOutside, WrapShapeOutside); 3875 if (!primitiveValue) 3876 return; 3877 if (primitiveValue->getIdent() == CSSValueAuto) 3878 m_style->setWrapShapeOutside(0); 3879 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_SHAPE) 3880 m_style->setWrapShapeOutside(primitiveValue->getShapeValue()); 3873 3881 return; 3874 3882 -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r100832 r101048 630 630 // to avoid having diff() == StyleDifferenceEqual where wrap-shapes actually differ. 631 631 // Tracking bug: https://bugs.webkit.org/show_bug.cgi?id=62991 632 if (rareNonInheritedData->m_wrapShape != other->rareNonInheritedData->m_wrapShape) 632 if (rareNonInheritedData->m_wrapShapeInside != other->rareNonInheritedData->m_wrapShapeInside 633 || rareNonInheritedData->m_wrapShapeOutside != other->rareNonInheritedData->m_wrapShapeOutside) 633 634 return StyleDifferenceRepaint; 634 635 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r100656 r101048 1287 1287 #endif 1288 1288 1289 void setWrapShape(PassRefPtr<CSSWrapShape> shape) 1290 { 1291 if (rareNonInheritedData->m_wrapShape != shape) 1292 rareNonInheritedData.access()->m_wrapShape = shape; 1293 } 1294 CSSWrapShape* wrapShape() const { return rareNonInheritedData->m_wrapShape.get(); } 1295 static CSSWrapShape* initialWrapShape() { return 0; } 1289 void setWrapShapeInside(PassRefPtr<CSSWrapShape> shape) 1290 { 1291 if (rareNonInheritedData->m_wrapShapeInside != shape) 1292 rareNonInheritedData.access()->m_wrapShapeInside = shape; 1293 } 1294 CSSWrapShape* wrapShapeInside() const { return rareNonInheritedData->m_wrapShapeInside.get(); } 1295 1296 void setWrapShapeOutside(PassRefPtr<CSSWrapShape> shape) 1297 { 1298 if (rareNonInheritedData->m_wrapShapeOutside != shape) 1299 rareNonInheritedData.access()->m_wrapShapeOutside = shape; 1300 } 1301 CSSWrapShape* wrapShapeOutside() const { return rareNonInheritedData->m_wrapShapeOutside.get(); } 1302 1303 static CSSWrapShape* initialWrapShapeInside() { return 0; } 1304 static CSSWrapShape* initialWrapShapeOutside() { return 0; } 1296 1305 1297 1306 Length wrapPadding() const { return rareNonInheritedData->m_wrapPadding; } -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r100656 r101048 46 46 , m_mask(FillLayer(MaskFillLayer)) 47 47 , m_pageSize() 48 , m_wrapShape(RenderStyle::initialWrapShape()) 48 , m_wrapShapeInside(RenderStyle::initialWrapShapeInside()) 49 , m_wrapShapeOutside(RenderStyle::initialWrapShapeOutside()) 49 50 , m_wrapMargin(RenderStyle::initialWrapMargin()) 50 51 , m_wrapPadding(RenderStyle::initialWrapPadding()) … … 105 106 , m_maskBoxImage(o.m_maskBoxImage) 106 107 , m_pageSize(o.m_pageSize) 107 , m_wrapShape(o.m_wrapShape) 108 , m_wrapShapeInside(o.m_wrapShapeInside) 109 , m_wrapShapeOutside(o.m_wrapShapeOutside) 108 110 , m_wrapMargin(o.m_wrapMargin) 109 111 , m_wrapPadding(o.m_wrapPadding) … … 193 195 && (m_regionThread == o.m_regionThread) 194 196 && (m_regionOverflow == o.m_regionOverflow) 195 && (m_wrapShape == o.m_wrapShape) 197 && (m_wrapShapeInside == o.m_wrapShapeInside) 198 && (m_wrapShapeOutside == o.m_wrapShapeOutside) 196 199 && (m_wrapFlow == o.m_wrapFlow) 197 200 && (m_wrapThrough == o.m_wrapThrough) -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r100656 r101048 130 130 LengthSize m_pageSize; 131 131 132 RefPtr<CSSWrapShape> m_wrapShape; 132 RefPtr<CSSWrapShape> m_wrapShapeInside; 133 RefPtr<CSSWrapShape> m_wrapShapeOutside; 133 134 Length m_wrapMargin; 134 135 Length m_wrapPadding;
Note: See TracChangeset
for help on using the changeset viewer.