WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
118172
Handling of Variables in StylePropertySet is broken
https://bugs.webkit.org/show_bug.cgi?id=118172
Summary
Handling of Variables in StylePropertySet is broken
Claudio Saavedra
Reported
2013-06-28 02:00:22 PDT
Any operation relying on StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) to fetch data from a variable property will return always the last variable in the internal vector. This method is designed assuming that all properties have a different property ID, whereas all CSS custom properties share the CSSPropertyVariable ID. For
bug 117787
I'm adding an equivalent method, StylePropertySet::findVariableIndex(const AtomicString& variableName), but the existing StylePropertySet needs to be fixed to be able to distinguish when this should be used instead. I was tempted to add an assertion to findPropertyIndex: // This method assumes that there is only one property per type, // while there might be more than one CSSPropertyVariable property // present. findVariableIndex() should be used instead. ASSERT(propertyID != CSSPropertyVariable); but I've noticed that there are plenty of uses of this that will need to be fixed, so I'll leave the assertion out.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug