RESOLVED WONTFIX 112108
Implement CSSOM for CSS Variables
https://bugs.webkit.org/show_bug.cgi?id=112108
Summary Implement CSSOM for CSS Variables
Alan Cutter
Reported 2013-03-12 00:10:32 PDT
Implement a Javascript API for CSS variables according to the current spec: http://dev.w3.org/csswg/css-variables/#cssom
Attachments
WIP (50.48 KB, patch)
2013-03-13 20:00 PDT, Alan Cutter
no flags
Testing GTK build (52.37 KB, patch)
2013-03-14 00:22 PDT, Alan Cutter
no flags
Target only JavaScript interfaces (62.08 KB, patch)
2013-03-14 05:35 PDT, Alan Cutter
no flags
Fixed incorrect XCode path (62.08 KB, patch)
2013-03-14 06:20 PDT, Alan Cutter
no flags
EFL GTK patch (68.42 KB, patch)
2013-03-14 18:48 PDT, Alan Cutter
no flags
Rebased onto ToT (68.62 KB, patch)
2013-03-14 19:59 PDT, Alan Cutter
no flags
Patch (72.71 KB, patch)
2013-03-20 20:38 PDT, Alan Cutter
no flags
Archive of layout-test-results from gce-cr-linux-02 (1.22 MB, application/zip)
2013-03-21 04:45 PDT, WebKit Review Bot
no flags
Patch (72.71 KB, patch)
2013-03-21 15:59 PDT, Alan Cutter
no flags
Patch (78.21 KB, patch)
2013-03-28 01:23 PDT, Alan Cutter
no flags
Repatch for JSC (78.10 KB, patch)
2013-04-01 22:50 PDT, Alan Cutter
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (707.49 KB, application/zip)
2013-04-02 13:01 PDT, Build Bot
no flags
Alan Cutter
Comment 1 2013-03-13 20:00:20 PDT
EFL EWS Bot
Comment 2 2013-03-13 21:10:12 PDT
Build Bot
Comment 3 2013-03-13 22:38:21 PDT
Build Bot
Comment 4 2013-03-13 23:13:47 PDT
Build Bot
Comment 5 2013-03-13 23:47:01 PDT
Alan Cutter
Comment 6 2013-03-14 00:22:27 PDT
Created attachment 193081 [details] Testing GTK build
WebKit Review Bot
Comment 7 2013-03-14 00:35:18 PDT
Please wait for approval from timothy@apple.com (or another member of the Apple Safari Team) before submitting because this patch contains changes to the Apple Mac WebKit.framework public API.
EFL EWS Bot
Comment 8 2013-03-14 01:51:17 PDT
Build Bot
Comment 9 2013-03-14 02:01:56 PDT
Build Bot
Comment 10 2013-03-14 02:08:25 PDT
Comment on attachment 193081 [details] Testing GTK build Attachment 193081 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17161555
Alan Cutter
Comment 11 2013-03-14 05:35:41 PDT
Created attachment 193108 [details] Target only JavaScript interfaces
Build Bot
Comment 12 2013-03-14 05:45:40 PDT
Comment on attachment 193108 [details] Target only JavaScript interfaces Attachment 193108 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17041555
EFL EWS Bot
Comment 13 2013-03-14 05:55:09 PDT
Comment on attachment 193108 [details] Target only JavaScript interfaces Attachment 193108 [details] did not pass efl-ews (efl): Output: http://webkit-commit-queue.appspot.com/results/17080513
Alan Cutter
Comment 14 2013-03-14 06:20:03 PDT
Created attachment 193113 [details] Fixed incorrect XCode path
EFL EWS Bot
Comment 15 2013-03-14 06:35:38 PDT
Comment on attachment 193113 [details] Fixed incorrect XCode path Attachment 193113 [details] did not pass efl-ews (efl): Output: http://webkit-commit-queue.appspot.com/results/17187176
Alan Cutter
Comment 16 2013-03-14 18:48:49 PDT
Created attachment 193217 [details] EFL GTK patch
Alan Cutter
Comment 17 2013-03-14 19:59:21 PDT
Created attachment 193223 [details] Rebased onto ToT
Alan Cutter
Comment 18 2013-03-14 20:41:26 PDT
(In reply to comment #17) > Created an attachment (id=193223) [details] > Rebased onto ToT This patch appears to be building properly on the bots (pending Mac and Linux though they were passing before already). I submit this patch up for preliminary code review.
Dimitri Glazkov (Google)
Comment 19 2013-03-19 09:01:22 PDT
Comment on attachment 193223 [details] Rebased onto ToT View in context: https://bugs.webkit.org/attachment.cgi?id=193223&action=review Large patch! :) It looks like a lot of it is just tedious project adds and boilerplate, but there are important bits that we probably don't want to lose sight of. The bindings code will need to be reviewed by bindings experts (sam, ggaren for JSC, haraken, abarth for V8), the CSSOM by the style experts (anttik, kling) > Source/WebCore/ChangeLog:8 > + WIP. Fixing build issues with EFL and GTK. Rebased patch onto ToT master. Still has unresolved matter of pointer to PropertySetCSSStyleDeclaration object shared across JS thread not ref counted. If it's a WIP, probably don't need to mark it for review yet :) > Source/WebCore/bindings/js/JSCSSVariablesDeclarationCustom.h:31 > +#include "JSCSSVariablesDeclaration.h" This is weird. Why do we need this file? > Source/WebCore/css/StylePropertySet.cpp:752 > + if (testProperty.id() == CSSPropertyVariable && static_cast<const CSSVariableValue*>(testProperty.value())->name() == name) { This looks like a toCSSVariableValue helper. > Source/WebCore/css/StylePropertySet.cpp:768 > +void StylePropertySet::getVariableNames(Vector<AtomicString>& names) const here, get is not superfluous, you are actually not returning a value. > Source/WebCore/css/StylePropertySet.cpp:777 > +const String& StylePropertySet::getVariableValue(const AtomicString& name) const here get is superfluous -> variableValue
Alan Cutter
Comment 20 2013-03-19 21:15:40 PDT
(In reply to comment #19) > (From update of attachment 193223 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=193223&action=review > > Large patch! :) > > It looks like a lot of it is just tedious project adds and boilerplate, but there are important bits that we probably don't want to lose sight of. > > The bindings code will need to be reviewed by bindings experts (sam, ggaren for JSC, haraken, abarth for V8), the CSSOM by the style experts (anttik, kling) Thanks for the advice, I will go to these people for further review. > > Source/WebCore/bindings/js/JSCSSVariablesDeclarationCustom.h:31 > > +#include "JSCSSVariablesDeclaration.h" > > This is weird. Why do we need this file? It does seem unnecessary but the EFL port wouldn't compile without it. Its binding code generator most likely includes it without checking for its existence first: [ 45%] /home/eflews/git/webkit/WebKitBuild/Release/DerivedSources/WebCore/JSCSSVariablesDeclaration.cpp:28:45: fatal error: JSCSSVariablesDeclarationCustom.h: No such file or directory compilation terminated. I'll add a comment stating this. > > > Source/WebCore/css/StylePropertySet.cpp:752 > > + if (testProperty.id() == CSSPropertyVariable && static_cast<const CSSVariableValue*>(testProperty.value())->name() == name) { > > This looks like a toCSSVariableValue helper. I see what you mean but I'm not sure where this helper function should go. This doesn't appear to be an idiom that CSSValue uses. > > Source/WebCore/css/StylePropertySet.cpp:768 > > +void StylePropertySet::getVariableNames(Vector<AtomicString>& names) const > > here, get is not superfluous, you are actually not returning a value. > > > Source/WebCore/css/StylePropertySet.cpp:777 > > +const String& StylePropertySet::getVariableValue(const AtomicString& name) const > > here get is superfluous -> variableValue Thanks for the style tip, updated function name.
Alan Cutter
Comment 21 2013-03-20 20:38:47 PDT
Alan Cutter
Comment 22 2013-03-20 20:41:38 PDT
(In reply to comment #21) > Created an attachment (id=194178) [details] > Patch - Made changes based on Dimitri's review. - Split CSSOM test into smaller CRUD tests. - Fixed bug where non-inherited styles were not updating when a variable value cascade should have updated them.
WebKit Review Bot
Comment 23 2013-03-21 04:45:28 PDT
Comment on attachment 194178 [details] Patch Attachment 194178 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/17235329 New failing tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html
WebKit Review Bot
Comment 24 2013-03-21 04:45:35 PDT
Created attachment 194226 [details] Archive of layout-test-results from gce-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-3.3.8-gcg-201212281604-x86_64-with-GCEL-10.04-gcel_10.04
Alan Cutter
Comment 25 2013-03-21 15:47:25 PDT
(In reply to comment #24) > Created an attachment (id=194226) [details] > Archive of layout-test-results from gce-cr-linux-02 > > The attached test failures were seen while running run-webkit-tests on the chromium-ews. > Bot: gce-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-3.3.8-gcg-201212281604-x86_64-with-GCEL-10.04-gcel_10.04 These appear to be flakey/failing tests: http://build.webkit.org/builders/Chromium%20Linux%20Release%20%28Tests%29/builds/46263 Reuploading patch while the tree is green.
Alan Cutter
Comment 26 2013-03-21 15:59:17 PDT
Alan Cutter
Comment 27 2013-03-28 01:23:12 PDT
Alan Cutter
Comment 28 2013-03-28 01:24:22 PDT
(In reply to comment #27) > Created an attachment (id=195498) [details] > Patch - Rebaselined patch. - Implemented CSSOM API for computed styles.
kov's GTK+ EWS bot
Comment 29 2013-03-28 02:53:39 PDT
EFL EWS Bot
Comment 30 2013-03-28 03:45:47 PDT
Build Bot
Comment 31 2013-03-28 04:46:41 PDT
Adam Barth
Comment 32 2013-03-30 11:10:02 PDT
Comment on attachment 195498 [details] Patch We should do this without introducing custom bindings.
Alan Cutter
Comment 33 2013-04-01 21:20:20 PDT
(In reply to comment #32) > (From update of attachment 195498 [details]) > We should do this without introducing custom bindings. Thanks for the review. AFAIK avoiding custom bindings here would involve implementing getter, setter, deleter and enumerator interface attributes for the IDL binding code generators. Possibly even a special getter that returns undefined for empty strings. These would call the getPropertyValue, setProperty, removeProperty and getPropertyNames methods respectively. Please correct me if I'm incorrect in this approach.
Adam Barth
Comment 34 2013-04-01 22:48:01 PDT
Those are good things to add to the code generators. We'd eventually like to implement all of WebIDL.
Alan Cutter
Comment 35 2013-04-01 22:50:22 PDT
Created attachment 196074 [details] Repatch for JSC
Build Bot
Comment 36 2013-04-02 13:01:17 PDT
Comment on attachment 196074 [details] Repatch for JSC Attachment 196074 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17360153 New failing tests: media/video-controls-fullscreen-volume.html
Build Bot
Comment 37 2013-04-02 13:01:22 PDT
Created attachment 196214 [details] Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.2
Alan Cutter
Comment 38 2013-04-15 23:20:05 PDT
Note You need to log in before you can comment on or make changes to this bug.