WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159982
Stop using valueToStringWithNullCheck() in JSCSSStyleDeclaration::putDelegate()
https://bugs.webkit.org/show_bug.cgi?id=159982
Summary
Stop using valueToStringWithNullCheck() in JSCSSStyleDeclaration::putDelegate()
Chris Dumez
Reported
2016-07-20 13:01:53 PDT
valueToStringWithNullCheck() treats null as the null String() which is legacy / non standard behavior. The specification says we should treat null as the empty string: -
https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-camel-cased-attribute
Therefore, we should be using valueToStringTreatingNullAsEmptyString() instead. In practice, there will be no web-exposed behavior change because MutableStyleProperties::setProperty() removes the property wether the value is the null String or the empty String. The specification says that we should remove the property if the value is the empty string: -
https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
(step 4) So our behavior is correct.
Attachments
Patch
(6.50 KB, patch)
2016-07-20 13:14 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(6.49 KB, patch)
2016-07-20 14:21 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-07-20 13:14:13 PDT
Created
attachment 284141
[details]
Patch
Chris Dumez
Comment 2
2016-07-20 14:21:36 PDT
Created
attachment 284149
[details]
Patch
Chris Dumez
Comment 3
2016-07-20 15:06:07 PDT
The Mac-wk2 EWS build error is unrelated: /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettingsGenerated.cpp:809:10: error: no member named 'setAllowsInlineMediaPlaybackWithPlaysInlineAttribute' in 'WebCore::InternalSettingsGenerated'; did you mean 'setInlineMediaPlaybackRequiresPlaysInlineAttribute'? impl.setAllowsInlineMediaPlaybackWithPlaysInlineAttribute(WTFMove(allowsInlineMediaPlaybackWithPlaysInlineAttribute)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ setInlineMediaPlaybackRequiresPlaysInlineAttribute In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettingsGenerated.cpp:22: In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettingsGenerated.h:23: /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/InternalSettingsGenerated.h:112:10: note: 'setInlineMediaPlaybackRequiresPlaysInlineAttribute' declared here void setInlineMediaPlaybackRequiresPlaysInlineAttribute(bool inlineMediaPlaybackRequiresPlaysInlineAttribute); ^ /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettingsGenerated.cpp:826:10: error: no member named 'setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute' in 'WebCore::InternalSettingsGenerated'; did you mean 'setInlineMediaPlaybackRequiresPlaysInlineAttribute'? impl.setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute(WTFMove(allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ setInlineMediaPlaybackRequiresPlaysInlineAttribute In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettingsGenerated.cpp:22: In file included from /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/JSInternalSettingsGenerated.h:23: /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/InternalSettingsGenerated.h:112:10: note: 'setInlineMediaPlaybackRequiresPlaysInlineAttribute' declared here void setInlineMediaPlaybackRequiresPlaysInlineAttribute(bool inlineMediaPlaybackRequiresPlaysInlineAttribute); ^ 2 errors generated. CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCoreTestSupport.build/Objects-normal/x86_64/WebCoreTestSupport.o testing/js/WebCoreTestSupport.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
Chris Dumez
Comment 4
2016-07-20 16:08:28 PDT
Comment on
attachment 284149
[details]
Patch Clearing flags on attachment: 284149 Committed
r203475
: <
http://trac.webkit.org/changeset/203475
>
Chris Dumez
Comment 5
2016-07-20 16:08:33 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