Summary: | HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only return known values | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | cgarcia, commit-queue, darin, esprehn+autocc, gyuyoung.kim, kondapallykalyan, rniwa, sam | ||||||||||
Priority: | P2 | Keywords: | WebExposed | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
URL: | https://html.spec.whatwg.org/multipage/scripting.html#attr-script-crossorigin | ||||||||||||
Bug Depends on: | 154513 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Chris Dumez
2016-02-20 12:25:38 PST
Created attachment 271865 [details]
Patch
Created attachment 271875 [details]
Patch
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.
Created attachment 271897 [details]
Patch
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.
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. Created attachment 271904 [details]
Patch
Comment on attachment 271904 [details] Patch Clearing flags on attachment: 271904 Committed r196894: <http://trac.webkit.org/changeset/196894> All reviewed patches have been landed. Closing bug. |