WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
154502
HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only return known values
https://bugs.webkit.org/show_bug.cgi?id=154502
Summary
HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only retu...
Chris Dumez
Reported
2016-02-20 12:25:38 PST
HTMLScriptElement.crossOrigin should only return known values: -
https://html.spec.whatwg.org/multipage/scripting.html#attr-script-crossorigin
-
https://html.spec.whatwg.org/multipage/infrastructure.html#cors-settings-attribute
Attachments
Patch
(20.91 KB, patch)
2016-02-20 12:29 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(61.83 KB, patch)
2016-02-20 22:20 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(56.90 KB, patch)
2016-02-21 19:24 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(56.60 KB, patch)
2016-02-21 22:27 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-02-20 12:29:53 PST
Created
attachment 271865
[details]
Patch
Chris Dumez
Comment 2
2016-02-20 22:20:15 PST
Created
attachment 271875
[details]
Patch
WebKit Commit Bot
Comment 3
2016-02-20 22:23:54 PST
Attachment 271875
[details]
did not pass style-queue: ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1895: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 4
2016-02-21 19:24:18 PST
Created
attachment 271897
[details]
Patch
WebKit Commit Bot
Comment 5
2016-02-21 19:26:42 PST
Attachment 271897
[details]
did not pass style-queue: ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1895: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 19 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 6
2016-02-21 20:00:24 PST
Comment on
attachment 271897
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=271897&action=review
> Source/WebCore/html/HTMLImageElement.cpp:574 > + if (value.isNull()) > + removeAttribute(crossoriginAttr); > + else
setAttributeWithoutSynchronization already does this. Is there a reason we need to special-case it here too?
> Source/WebCore/html/HTMLScriptElement.cpp:112 > + if (value.isNull()) > + removeAttribute(crossoriginAttr); > + else
Ditto.
> Source/WebCore/html/parser/HTMLParserIdioms.cpp:303 > + static NeverDestroyed<const String> anonymous("anonymous", String::ConstructFromLiteral); > + static NeverDestroyed<const String> useCredentials("use-credentials", String::ConstructFromLiteral); > + > + if (value.isNull()) > + return String(); > + if (equalIgnoringASCIICase(value, useCredentials)) > + return useCredentials; > + return anonymous;
I’m not sure the global strings are a worthwhile optimization. Anders had some information about the tradeoffs in the past.
Chris Dumez
Comment 7
2016-02-21 22:27:39 PST
Created
attachment 271904
[details]
Patch
Chris Dumez
Comment 8
2016-02-21 22:28:39 PST
Comment on
attachment 271904
[details]
Patch Clearing flags on attachment: 271904 Committed
r196894
: <
http://trac.webkit.org/changeset/196894
>
Chris Dumez
Comment 9
2016-02-21 22:28:45 PST
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