Changeset 101275 in webkit
- Timestamp:
- Nov 28, 2011 12:55:26 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101272 r101275 1 2011-11-28 Fady Samuel <fsamuel@chromium.org> 2 3 Fix Aspect Ratio Property Inheritance And Make the Computed Value Equal the Specified Value 4 https://bugs.webkit.org/show_bug.cgi?id=73038 5 6 Reviewed by Ojan Vafai. 7 8 Updated the parsing test to make sure that the -webkit-aspect-ratio property accepts inherit as a possible value. 9 10 Added an inheritance test that checks the computed value is correctly inherited. 11 12 * fast/css/aspect-ratio-inheritance-expected.txt: Added. 13 * fast/css/aspect-ratio-inheritance.html: Added. 14 * fast/css/aspect-ratio-parsing-tests-expected.txt: 15 * fast/css/aspect-ratio-parsing-tests.html: 16 1 17 2011-11-28 Ken Buchanan <kenrb@chromium.org> 2 18 -
trunk/LayoutTests/fast/css/aspect-ratio-parsing-tests-expected.txt
r99332 r101275 10 10 PASS testParsing("aspectRatioTest", "1.2 / 2", "-webkit-aspect-ratio") is "1.2/2" 11 11 PASS testParsing("aspectRatioTest", "2 / 0.5", "-webkit-aspect-ratio") is "2/0.5" 12 PASS testParsing("aspectRatioTest", "inherit", "-webkit-aspect-ratio") is "inherit" 12 13 PASS testParsing("aspectRatioTest", "none", "-webkit-aspect-ratio") is "none" 13 14 PASS testParsing("aspectRatioTest", "1 2", "-webkit-aspect-ratio") is "none" -
trunk/LayoutTests/fast/css/aspect-ratio-parsing-tests.html
r99332 r101275 24 24 shouldBeEqualToString('testParsing("aspectRatioTest", "1.2 / 2", "-webkit-aspect-ratio")', '1.2/2'); 25 25 shouldBeEqualToString('testParsing("aspectRatioTest", "2 / 0.5", "-webkit-aspect-ratio")', '2/0.5'); 26 shouldBeEqualToString('testParsing("aspectRatioTest", "inherit", "-webkit-aspect-ratio")', 'inherit'); 26 27 shouldBeEqualToString('testParsing("aspectRatioTest", "none", "-webkit-aspect-ratio")', 'none'); 27 28 -
trunk/Source/WebCore/ChangeLog
r101272 r101275 1 2011-11-28 Fady Samuel <fsamuel@chromium.org> 2 3 Fix Aspect Ratio Property Inheritance And Make the Computed Value Equal the Specified Value 4 https://bugs.webkit.org/show_bug.cgi?id=73038 5 6 Reviewed by Ojan Vafai. 7 8 hasAspectRatio was not being set if the -webkit-aspect-ratio property was inherited from the parent. 9 10 Additionally, the computed value of -webkit-aspect-ratio was returning a number instead of a ratio. 11 12 Test: fast/css/aspect-ratio-inheritance.html 13 14 * css/CSSComputedStyleDeclaration.cpp: 15 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 16 * css/CSSStyleApplyProperty.cpp: 17 (WebCore::ApplyPropertyAspectRatio::applyInheritValue): 18 1 19 2011-11-28 Ken Buchanan <kenrb@chromium.org> 2 20 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r101078 r101275 26 26 27 27 #include "AnimationController.h" 28 #include "ContentData.h" 29 #include "CounterContent.h" 30 #include "CursorList.h" 28 #include "CSSAspectRatioValue.h" 31 29 #include "CSSBorderImageValue.h" 32 30 #include "CSSLineBoxContainValue.h" … … 41 39 #include "CSSTimingFunctionValue.h" 42 40 #include "CSSValueList.h" 41 #include "ContentData.h" 42 #include "CounterContent.h" 43 #include "CursorList.h" 43 44 #if ENABLE(CSS_SHADERS) 44 45 #include "CustomFilterOperation.h" … … 53 54 #include "RenderBox.h" 54 55 #include "RenderLayer.h" 56 #include "RenderStyle.h" 55 57 #include "ShadowValue.h" 56 58 #if ENABLE(CSS_FILTERS) … … 1896 1898 if (!style->hasAspectRatio()) 1897 1899 return primitiveValueCache->createIdentifierValue(CSSValueNone); 1898 return primitiveValueCache->createValue(style->aspectRatio(), CSSPrimitiveValue::CSS_NUMBER);1900 return CSSAspectRatioValue::create(style->aspectRatioNumerator(), style->aspectRatioDenominator()); 1899 1901 case CSSPropertyWebkitBackfaceVisibility: 1900 1902 return primitiveValueCache->createIdentifierValue((style->backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible); -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r101238 r101275 950 950 if (!selector->parentStyle()->hasAspectRatio()) 951 951 return; 952 selector->style()->setHasAspectRatio(true); 952 953 selector->style()->setAspectRatioDenominator(selector->parentStyle()->aspectRatioDenominator()); 953 954 selector->style()->setAspectRatioNumerator(selector->parentStyle()->aspectRatioNumerator());
Note: See TracChangeset
for help on using the changeset viewer.