WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 161651
[WebCore] Clean up script loading code in XML
https://bugs.webkit.org/show_bug.cgi?id=161651
Summary
[WebCore] Clean up script loading code in XML
Yusuke Suzuki
Reported
2016-09-06 15:41:23 PDT
...
Attachments
Patch
(6.97 KB, patch)
2016-11-16 20:12 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Patch
(25.54 KB, patch)
2016-11-16 22:06 PST
,
Yusuke Suzuki
rniwa
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2016-11-16 20:12:09 PST
Created
attachment 295022
[details]
Patch WIP
Yusuke Suzuki
Comment 2
2016-11-16 22:06:35 PST
Created
attachment 295028
[details]
Patch
Ryosuke Niwa
Comment 3
2016-11-16 22:21:50 PST
Comment on
attachment 295028
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=295028&action=review
> Source/WebCore/dom/ScriptElement.cpp:167 > + // XHTML document does not support "defer" attribute semantics. > + // And module tag also uses defer attribute semantics. We disable script type="module" for non HTML document.
Is this behavior spec compliant!?
Yusuke Suzuki
Comment 4
2016-11-16 22:32:36 PST
Comment on
attachment 295028
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=295028&action=review
>> Source/WebCore/dom/ScriptElement.cpp:167 >> + // And module tag also uses defer attribute semantics. We disable script type="module" for non HTML document. > > Is this behavior spec compliant!?
XHTML defines "defer" attribute. But WebKit does not implement it for a long time. Once "defer" is implemented, we can reconsider enabling modules in XHTML. But I'm not sure that's worth doing (implementing defer semantics and enabling modules in XHTML). Since "defer" semantics is not implemented, before this patch, we just ignore the modules in XHTML document. But it causes some strange behavior. For example, if you write <script type="module"> in document, it is ignored. But if you create script tag with `type="module"` dynamically, it works. To make it consistent, I think disabling modules until "defer" is implemented in XHTML is better. I'll note the above description in this comment.
Yusuke Suzuki
Comment 5
2016-11-16 22:38:30 PST
Comment on
attachment 295028
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=295028&action=review
>>> Source/WebCore/dom/ScriptElement.cpp:167 >>> + // And module tag also uses defer attribute semantics. We disable script type="module" for non HTML document. >> >> Is this behavior spec compliant!? > > XHTML defines "defer" attribute. But WebKit does not implement it for a long time. > Once "defer" is implemented, we can reconsider enabling modules in XHTML. But I'm not sure that's worth doing (implementing defer semantics and enabling modules in XHTML). > > Since "defer" semantics is not implemented, before this patch, we just ignore the modules in XHTML document. But it causes some strange behavior. > For example, if you write <script type="module"> in document, it is ignored. But if you create script tag with `type="module"` dynamically, it works. > To make it consistent, I think disabling modules until "defer" is implemented in XHTML is better. > > I'll note the above description in this comment.
We have a bug for that
https://bugs.webkit.org/show_bug.cgi?id=123387
. I'll paste this URL. According to that bug, blink intentionally does not support it
https://bugs.chromium.org/p/chromium/issues/detail?id=611136
.
Yusuke Suzuki
Comment 6
2016-11-16 22:47:38 PST
Committed
r208840
: <
http://trac.webkit.org/changeset/208840
>
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