[Webkit-unassigned] [Bug 27160] Implement vw/vh/vm (viewport sizes) from CSS 3 Values and Units

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 9 14:46:24 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=27160





--- Comment #31 from Joe Thomas <joethomas at motorola.com>  2012-02-09 14:46:22 PST ---
(In reply to comment #30)
> (In reply to comment #28)
> > (In reply to comment #26)
> > > (From update of attachment 126010 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=126010&action=review
> > > 
> > Thanks for the review.
> > 
> > > > Source/WebCore/css/CSSStyleSelector.cpp:2379
> > > > +static Length convertToLength(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* styleSelector, bool toFloat, double multiplier = 1, bool *ok = 0)
> > > 
> > > This code should no longer be static, and should instead be a member function of CSSStyleSelector.
> > > 
> > > > Source/WebCore/css/CSSStyleSelector.cpp:2411
> > > > +static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* styleSelector, double multiplier = 1, bool *ok = 0)
> > > 
> > > This code should no longer be static, and should instead be a member function of CSSStyleSelector.
> > > 
> > > > Source/WebCore/css/CSSStyleSelector.cpp:2416
> > > > +static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* styleSelector, double multiplier = 1, bool *ok = 0)
> > > 
> > > This code should no longer be static, and should instead be a member function of CSSStyleSelector.
> > > 
> > I will make above 3 functions as member functions. I changed the function signature of createTransformOperations static member function to include CSSStyleSelector. I think it is a good idea to remove the static from here too. Please let me know your opinion on this.
> 
> Yes, that sounds good to me.
> 
It's slightly difficult to make these functions as non-static member function of CSSStyleSelector. 

CSSStyleSelector::createTransformOperations is called from WebKitCSSMatrix::setMatrixValue and this class does not have access to CSSStyleSelector. It will be difficult to access this function if we make it non-static. It just passes null for style and rootElementStyle while calling CSSStyleSelector::createTransformOperations. 

convertToFloatLength & convertToIntLength are called from CSSStyleSelector::createTransformOperations. Since CSSStyleSelector argument is passed as NULL to createTransformOperations when called from WebKitCSSMatrix, it is not possible to call convertToFloatLength & convertToIntLength if they are member functions.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list