[webkit-reviews] review denied: [Bug 72350] Pass Aspect Ratio to RenderStyle : [Attachment 115092] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 16 11:33:44 PST 2011


Ojan Vafai <ojan at chromium.org> has denied Fady Samuel <fsamuel at chromium.org>'s
request for review:
Bug 72350: Pass Aspect Ratio to RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=72350

Attachment 115092: Patch
https://bugs.webkit.org/attachment.cgi?id=115092&action=review

------- Additional Comments from Ojan Vafai <ojan at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=115092&action=review


> Source/WebCore/css/CSSStyleSelector.cpp:2595
> +    case CSSPropertyWebkitAspectRatio:
> +    {
> +	   HANDLE_INHERIT_AND_INITIAL(aspectRatioNumerator,
AspectRatioNumerator);
> +	   HANDLE_INHERIT_AND_INITIAL(aspectRatioDenominator,
AspectRatioDenominator);
> +	   if (!value->isAspectRatioValue())
> +	       return;
> +	   fprintf(stderr, ">>>setting aspect ratio\n");
> +	   CSSAspectRatioValue* aspectRatioValue =
static_cast<CSSAspectRatioValue*>(value);
> +	  
m_style->setAspectRatioNumerator(aspectRatioValue->numeratorValue());
> +	  
m_style->setAspectRatioDenominator(aspectRatioValue->denominatorValue());
> +	   return;
> +    }

Not sure if this is your problem, but I don't think you need any of this code.
The code in CSSStyleApplyProperty.cpp should do all this work for you. You just
need to add a case to the end of applyProperty to the looong list of cases
below "// These properties are implemented in the CSSStyleApplyProperty lookup
table."

> Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:39
> +    , m_aspectRatioNumerator(RenderStyle::initialAspectRatioDenominator())

Should be initialAspectRatioNumerator.


More information about the webkit-reviews mailing list