WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
164537
CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be settable
https://bugs.webkit.org/show_bug.cgi?id=164537
Summary
CSSStyleRule.style / CSSPageRule.style / CSSKeyframeRule.style should be sett...
Naina Raisinghani
Reported
2016-11-08 17:41:13 PST
The spec here (
https://drafts.csswg.org/cssom/#cssstylerule
) states that the style attribute on Element has [PutForwards=cssText] in the CSSOM spec and cssText is of DOMString type. You should be able to modify the element.style variable by the following: element.style = 'valid css' The attached file shows First:: 200 Second:: 0 on both FF and Chrome It shows First:: 200 Second:: 200 on Safari and IE. Also you can take a look at the relevant discussion on the Chrome bug here:
https://bugs.chromium.org/p/chromium/issues/detail?id=662664
Attachments
testcase 1 (for CSSStyleRule)
(570 bytes, text/html)
2017-06-07 14:34 PDT
,
Daniel Holbert
no flags
Details
WIP Patch
(1.28 KB, patch)
2017-06-07 16:35 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-elcapitan
(999.31 KB, application/zip)
2017-06-07 17:33 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews116 for mac-elcapitan
(1.86 MB, application/zip)
2017-06-07 17:35 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
(1.15 MB, application/zip)
2017-06-07 17:40 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(927.27 KB, application/zip)
2017-06-07 18:02 PDT
,
Build Bot
no flags
Details
Patch
(14.36 KB, patch)
2017-06-07 19:22 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-11-09 10:33:40 PST
<
rdar://problem/29181773
>
Daniel Holbert
Comment 2
2017-06-07 14:34:59 PDT
Created
attachment 312230
[details]
testcase 1 (for CSSStyleRule) Here's a testcase that directly targets CSSStyleRule.style (no element involved). Firefox and Chrome print out "AAA", then "BBB", then "CCC" in the web console. WebKit doesn't accept the CCC, though, due to the |rule.style| assignment failing, due to this bug.
Daniel Holbert
Comment 3
2017-06-07 15:24:19 PDT
Here's the relevant part of the spec for the element.style attribute, I think:
https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface
> interface ElementCSSInlineStyle { > [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; > };
And for the CSSStyleRule.style attribute:
https://drafts.csswg.org/cssom/#the-cssstylerule-interface
> interface CSSStyleRule : CSSRule { > attribute CSSOMString selectorText; > [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style; > };
Chris Dumez
Comment 4
2017-06-07 15:50:27 PDT
Looks like I fixed part of this. element.style is settable after
Bug 171795
. However, it looks like we still need to make CSSStyleRule.style settable.
Daniel Holbert
Comment 5
2017-06-07 16:07:52 PDT
Oh, nice! You're in the same camp as Edge, then. (See
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12271447/
- they can set element.style but not rule.style, too.)
Chris Dumez
Comment 6
2017-06-07 16:20:24 PDT
(In reply to Daniel Holbert from
comment #5
)
> Oh, nice! You're in the same camp as Edge, then. (See >
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/
> 12271447/ - they can set element.style but not rule.style, too.)
I'll fix the rest today. It is trivial.
Chris Dumez
Comment 7
2017-06-07 16:35:22 PDT
Created
attachment 312250
[details]
WIP Patch
Build Bot
Comment 8
2017-06-07 17:33:54 PDT
Comment on
attachment 312250
[details]
WIP Patch
Attachment 312250
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3890807
New failing tests: imported/w3c/web-platform-tests/cssom/interfaces.html imported/w3c/web-platform-tests/cssom/CSSStyleRule.html
Build Bot
Comment 9
2017-06-07 17:33:55 PDT
Created
attachment 312257
[details]
Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 10
2017-06-07 17:35:13 PDT
Comment on
attachment 312250
[details]
WIP Patch
Attachment 312250
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3890761
New failing tests: imported/w3c/web-platform-tests/cssom/interfaces.html imported/w3c/web-platform-tests/cssom/CSSStyleRule.html
Build Bot
Comment 11
2017-06-07 17:35:14 PDT
Created
attachment 312258
[details]
Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 12
2017-06-07 17:40:14 PDT
Comment on
attachment 312250
[details]
WIP Patch
Attachment 312250
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3890818
New failing tests: imported/w3c/web-platform-tests/cssom/interfaces.html imported/w3c/web-platform-tests/cssom/CSSStyleRule.html
Build Bot
Comment 13
2017-06-07 17:40:15 PDT
Created
attachment 312259
[details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 14
2017-06-07 18:02:03 PDT
Comment on
attachment 312250
[details]
WIP Patch
Attachment 312250
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3890873
New failing tests: imported/w3c/web-platform-tests/cssom/interfaces.html imported/w3c/web-platform-tests/cssom/CSSStyleRule.html
Build Bot
Comment 15
2017-06-07 18:02:04 PDT
Created
attachment 312262
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Chris Dumez
Comment 16
2017-06-07 19:22:10 PDT
Created
attachment 312266
[details]
Patch
Sam Weinig
Comment 17
2017-06-07 20:04:51 PDT
Comment on
attachment 312266
[details]
Patch PutForwards on the mind?
Chris Dumez
Comment 18
2017-06-07 20:06:50 PDT
(In reply to Sam Weinig from
comment #17
)
> Comment on
attachment 312266
[details]
> Patch > > PutForwards on the mind?
:)
WebKit Commit Bot
Comment 19
2017-06-07 20:32:25 PDT
Comment on
attachment 312266
[details]
Patch Clearing flags on attachment: 312266 Committed
r217917
: <
http://trac.webkit.org/changeset/217917
>
WebKit Commit Bot
Comment 20
2017-06-07 20:32:27 PDT
All reviewed patches have been landed. Closing bug.
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