[Webkit-unassigned] [Bug 118172] New: Handling of Variables in StylePropertySet is broken

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 28 01:58:26 PDT 2013


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

           Summary: Handling of Variables in StylePropertySet is broken
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: csaavedra at igalia.com
                CC: svillar at igalia.com


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.

-- 
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