[Webkit-unassigned] [Bug 130397] New: Custom Property implementation w/o var()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 18 09:02:05 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=130397
Summary: Custom Property implementation w/o var()
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
URL: http://dev.w3.org/csswg/css-variables/#defining-variab
les
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: krit at webkit.org
CC: hyatt at apple.com, koivisto at iki.fi, akling at apple.com
Created an attachment (id=227055)
--> (https://bugs.webkit.org/attachment.cgi?id=227055&action=review)
Patch from old custom property code w/o var()
I looked at the old custom properties implementation that was removed a couple of weeks ago. I reduced the old implementation and removed support for the var() function.
There are certain things to notice:
* There is no real prefix check. From looking at the code, every unknown property might be a custom property. We check just the length in CSSParser.
* We use a Map in RenderStyle to store all property names and the values. We must store Strings of the passed value. This is unfortunate since abstractions can be much more memory efficient. We use Vectors for transform operations and filter functions. So I am not sure if Maps themselves are a problem though.
* All custom properties are mapped to the CSSPropertyID CSSPropertyCustom. This has effects on getting element style or computed style. It is not possible to map back from CSSPropertyCustom to the requested custom property. ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID...)
--
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