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 78721
Rename DOMWindow to Window in the bindings
https://bugs.webkit.org/show_bug.cgi?id=78721
Summary
Rename DOMWindow to Window in the bindings
Erik Arvidsson
Reported
2012-02-15 10:15:15 PST
We name our interface DOMWindow when it should be called Window: assertTrue(window.Window !== undefined)
Attachments
WIP
(98.17 KB, patch)
2012-02-21 16:45 PST
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Patch
(153.93 KB, patch)
2012-02-22 11:40 PST
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Patch
(157.58 KB, patch)
2012-02-22 13:36 PST
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Patch for landing
(88.01 KB, patch)
2012-02-23 15:17 PST
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Patch for landing
(94.82 KB, patch)
2012-02-23 15:20 PST
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2012-02-15 12:26:06 PST
That assert was not so useful. Here are better test assertTrue(String(Window) === 'function Window() { [native code] }') // V8 assertTrue(String(Window) === '[object WindowConstructor]') // JSC
Erik Arvidsson
Comment 2
2012-02-17 12:32:42 PST
Haraken, do you have any suggestions how to do this? Right now the interface name must match the file name as far as I can tell.
Erik Arvidsson
Comment 3
2012-02-21 16:45:11 PST
Created
attachment 128083
[details]
WIP
Kentaro Hara
Comment 4
2012-02-21 16:51:05 PST
Comment on
attachment 128083
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=128083&action=review
The approach looks good to me.
> Source/WebCore/ChangeLog:8 > + No new tests. (OOPS!)
Please add run-bindings-tests.
> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:-3782 > -sub GetVisibleInterfaceName
Maybe you can remove GetVisibleInterfaceName() from CodeGeneratorJS.pm too?
> Source/WebCore/bindings/scripts/IDLAttributes.txt:55 > +InterfaceName=*
Thanks for using IDLAttributes.txt, which was introduced today:-)
Erik Arvidsson
Comment 5
2012-02-21 16:51:57 PST
This adds a new extended attribute to the interface section called InterfaceName interface [ InterfaceName=Window ] DOMWindow { } This is kind of backwards. A better outcome would be to use ImplementedAs on the interface and update all the IDL files to use the real interface name as spec'ed. interface [ ImplementedAs=DOMWindow ] Window { } However, making this change would require a lot more work. I'm tempted to say that we should do that since forcing us to use non standard interface names in our IDL files suck. WDYT?
Adam Barth
Comment 6
2012-02-21 16:51:59 PST
Comment on
attachment 128083
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=128083&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1326 > - my $visibleClassName = GetVisibleClassName($interfaceName); > + my $visibleClassName = $codeGenerator->GetVisibleInterfaceName($dataNode);
Should we rename $visibleClassName to $visibleInterfaceName ? Can we remove GetVisibleClassName from CodeGeneratorJS.pm too?
> Source/WebCore/bindings/scripts/IDLAttributes.txt:55 > +InterfaceName=*
Please add a test to Source/WebCore/bindings/scripts/tests for this IDL attribute.
> LayoutTests/fast/dom/Window/atob-btoa-expected.txt:18 > -PASS window.btoa(window) is "W29iamVjdCBET01XaW5kb3dd" > +FAIL window.btoa(window) should be W29iamVjdCBET01XaW5kb3dd. Was W29iamVjdCBXaW5kb3dd.
Please update the test so that this says "PASS"
Adam Barth
Comment 7
2012-02-21 16:53:07 PST
> However, making this change would require a lot more work. I'm tempted to say that we should do that since forcing us to use non standard interface names in our IDL files suck.
I would add a FIXME near the GetVisibleInterfaceName function that says something to that effect.
Erik Arvidsson
Comment 8
2012-02-22 11:40:45 PST
Created
attachment 128256
[details]
Patch
WebKit Review Bot
Comment 9
2012-02-22 12:35:55 PST
Comment on
attachment 128256
[details]
Patch
Attachment 128256
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/11560582
New failing tests: inspector/profiler/heap-snapshot.html
Erik Arvidsson
Comment 10
2012-02-22 13:36:03 PST
Created
attachment 128276
[details]
Patch
Adam Barth
Comment 11
2012-02-22 15:17:58 PST
Please consider landing the patch in stages. For example, you could land the code generator infrastructure/tests first with attributes for the current whitelisted interfaces and then change DOMWindow in a separate patch. That will make our lives easier if we have to roll back the DOMWindow change do to compat issues.
Erik Arvidsson
Comment 12
2012-02-22 15:24:27 PST
Thanks Adam. That makes sense. I will split it into 2 patches.
Erik Arvidsson
Comment 13
2012-02-23 15:17:40 PST
Created
attachment 128565
[details]
Patch for landing
Erik Arvidsson
Comment 14
2012-02-23 15:18:34 PST
Comment on
attachment 128565
[details]
Patch for landing Missing ChangeLogs
Erik Arvidsson
Comment 15
2012-02-23 15:20:20 PST
Created
attachment 128566
[details]
Patch for landing
WebKit Review Bot
Comment 16
2012-02-23 22:21:20 PST
Comment on
attachment 128566
[details]
Patch for landing Clearing flags on attachment: 128566 Committed
r108729
: <
http://trac.webkit.org/changeset/108729
>
WebKit Review Bot
Comment 17
2012-02-23 22:21:28 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