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 154944
Disallow custom elements inside a window-less documents
https://bugs.webkit.org/show_bug.cgi?id=154944
Summary
Disallow custom elements inside a window-less documents
Ryosuke Niwa
Reported
2016-03-02 17:32:41 PST
I accidentally uploaded and landed my patch for the
bug 148850
in the
bug 154936
, so here's a new bug to actually fix the
bug 154936
was intended to fix.
Attachments
Fixes the bug
(18.54 KB, patch)
2016-03-02 23:22 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Fixed debug builds
(19.26 KB, patch)
2016-03-02 23:53 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Updated the bug title
(19.29 KB, patch)
2016-03-03 00:06 PST
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Address Darin's comment and updated per recent discussion on Github
(18.98 KB, patch)
2016-03-03 16:17 PST
,
Ryosuke Niwa
koivisto
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-03-02 17:37:34 PST
<
rdar://problem/24944875
>
Ryosuke Niwa
Comment 2
2016-03-02 23:22:18 PST
Created
attachment 272734
[details]
Fixes the bug
Ryosuke Niwa
Comment 3
2016-03-02 23:53:51 PST
Created
attachment 272736
[details]
Fixed debug builds
Ryosuke Niwa
Comment 4
2016-03-03 00:06:11 PST
Created
attachment 272738
[details]
Updated the bug title
Ryosuke Niwa
Comment 5
2016-03-03 01:25:49 PST
I don't think the Windows EWS failure is related to this patch.
Darin Adler
Comment 6
2016-03-03 09:30:21 PST
Comment on
attachment 272738
[details]
Updated the bug title View in context:
https://bugs.webkit.org/attachment.cgi?id=272738&action=review
> Source/WebCore/bindings/js/JSDocumentCustom.cpp:155 > + ExceptionCodeWithMessage ec; > + ec.code = NOT_SUPPORTED_ERR; > + ec.message = "Cannot define a custom element in template content's document"; > + setDOMException(&state, ec); > + return jsUndefined();
Isn’t here a helper function that does more of this? If not, we should make one. The helper function should be written so that this code reads more like this: return throwNotSupportedException(state, "Cannot define a custom element in template content's document");
> Source/WebCore/dom/CustomElementDefinitions.h:51 > + static Ref<CustomElementDefinitions> create() { return adoptRef(*new CustomElementDefinitions()); }
You can omit those parentheses.
> Source/WebCore/dom/Document.cpp:6359 > + ASSERT(!m_customElementDefinitions);
Do we also want to assert document.m_customElementDefinitions is non-null?
Ryosuke Niwa
Comment 7
2016-03-03 16:17:20 PST
Created
attachment 272789
[details]
Address Darin's comment and updated per recent discussion on Github
Ryosuke Niwa
Comment 8
2016-03-03 16:18:08 PST
We realized that we can't share the registry with window-less document either so we're forbidding that as well.
Ryosuke Niwa
Comment 9
2016-03-03 16:28:34 PST
Committed
r197528
: <
http://trac.webkit.org/changeset/197528
>
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