WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65013
instanceof HTMLSourceElement Fails
https://bugs.webkit.org/show_bug.cgi?id=65013
Summary
instanceof HTMLSourceElement Fails
eclipsechasers2
Reported
2011-07-22 00:01:46 PDT
Created
attachment 101699
[details]
HTML source which demonstrates problem For audio/video tag fallback, W3C recommends an onerror which, among other things, tests child nodes of the element to see if they are instanceof HTMLElementSource. This test works (on windows 7) in Firefox, Opera, and IE9; it fails in Safari and Chrome (Uncaught ReferenceError: HTMLSourceElement is not defined). HTML to demonstrate this problem is attached.
Attachments
HTML source which demonstrates problem
(1.14 KB, text/html)
2011-07-22 00:01 PDT
,
eclipsechasers2
no flags
Details
Patch
(8.60 KB, patch)
2011-08-19 13:34 PDT
,
Tom Zakrajsek
rniwa
: review-
Details
Formatted Diff
Diff
Patch - per reviewer feedback
(8.73 KB, patch)
2011-08-19 16:29 PDT
,
Tom Zakrajsek
ap
: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(10.15 KB, patch)
2011-08-20 00:27 PDT
,
Tom Zakrajsek
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-07-22 14:45:01 PDT
There is no HTMLSourceElement in DOMWindow.idl; there should be.
Tom Zakrajsek
Comment 2
2011-08-16 19:14:08 PDT
Just to throw it out there, I think the fix to get this working is simple but there's a wrinkle. The interface is statically conditional on video. So if the build isn't built with video enabled, you'll still get this exception.
Tom Zakrajsek
Comment 3
2011-08-17 16:53:29 PDT
(In reply to
comment #2
)
> Just to throw it out there, I think the fix to get this working is simple but there's a wrinkle. The interface is statically conditional on video. So if the build isn't built with video enabled, you'll still get this exception.
I was wrong. The "source" tag (as an HTMLUnknownElement) handles it correctly by not executing the onerror method. The continued exception was because the "run separate instance" link is calling instanceof HTMLSourceElement unconditionally. That's not ok. I'll upload the code patch and test-results update shortly.
Tom Zakrajsek
Comment 4
2011-08-19 13:34:10 PDT
Created
attachment 104555
[details]
Patch
Alexey Proskuryakov
Comment 5
2011-08-19 13:51:07 PDT
Comment on
attachment 104555
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104555&action=review
> Source/WebCore/page/DOMWindow.idl:472 > + attribute [Conditional=VIDEO] HTMLSourceElementConstructor HTMLSourceElement;
Should this be EnabledAtRuntime, like HTMLVideoElement?
Ryosuke Niwa
Comment 6
2011-08-19 14:09:46 PDT
Comment on
attachment 104555
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=104555&action=review
> Source/WebCore/ChangeLog:7 > +
There's no description was to why we're adding this property nor what it does. We should definitely add such a description and refer to the relevant part of whatever spec that mandantes this behavior. r- for the lack of documentation.
Alexey Proskuryakov
Comment 7
2011-08-19 15:57:09 PDT
I don't think that this warrants a lot of discussion - constructors for all elements should be available on DOIMWindow. The missing EnabledAtRuntime should be almost certainly added though.
Tom Zakrajsek
Comment 8
2011-08-19 16:01:51 PDT
I agree about the EnabledAtRuntime, and have re-built and verified the effect. I was just sitting here toiling with how to describe the necessity for putting this is, other than to say "for consistency with all the other elements". I guess that will be the note then. Will upload the patch shortly.
Tom Zakrajsek
Comment 9
2011-08-19 16:29:44 PDT
Created
attachment 104589
[details]
Patch - per reviewer feedback
Alexey Proskuryakov
Comment 10
2011-08-19 16:35:12 PDT
Comment on
attachment 104589
[details]
Patch - per reviewer feedback View in context:
https://bugs.webkit.org/attachment.cgi?id=104589&action=review
This patch is not marked for review.
> Source/WebCore/ChangeLog:4 > + Add HTMLSourceElement to DOMWindow.idl for consistency. Constructors for > + all elements should be available on DOMWindow.
This is not how we usually do this. Bug title goes above the bug URL, and explanations go to the lines generated by the script (like "* page/DOMWindow.idl:" line below), or a general overview could go above those lines.
Alexey Proskuryakov
Comment 11
2011-08-19 16:42:59 PDT
Comment on
attachment 104589
[details]
Patch - per reviewer feedback Per IRC discussion, this was meant for review, and I think that this is fine to land.
WebKit Review Bot
Comment 12
2011-08-19 16:49:16 PDT
Comment on
attachment 104589
[details]
Patch - per reviewer feedback
Attachment 104589
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/9438511
Tom Zakrajsek
Comment 13
2011-08-20 00:27:22 PDT
Created
attachment 104617
[details]
Patch Fixed V8 bindings.
WebKit Review Bot
Comment 14
2011-08-20 11:40:29 PDT
Comment on
attachment 104617
[details]
Patch Clearing flags on attachment: 104617 Committed
r93482
: <
http://trac.webkit.org/changeset/93482
>
WebKit Review Bot
Comment 15
2011-08-20 11:40:34 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 16
2011-08-21 13:20:26 PDT
Comment on
attachment 104617
[details]
Patch This patch missed many affected tests!
Alexey Proskuryakov
Comment 17
2011-08-21 17:14:37 PDT
Adam, Eric, do you know why the commit queue landed the patch if it didn't pass some tests? /me recalls his unsuccessful argument that mega-tests dumping every property of the global object are evil, as maintaining them is a significant ongoing cost, and benefit is trivial.
Adam Barth
Comment 18
2011-08-21 18:22:34 PDT
The commily tests chromium-linux. Did any of the tests fail there? I'd recommend setting up a Mac EWS bot if you'd like folks not to breaks tests on Mac.
Adam Barth
Comment 19
2011-08-21 18:37:42 PDT
(I agree with Alexey that the tests that dump the global object are more work to maintain than they're worth.)
Eric Seidel (no email)
Comment 20
2011-08-22 12:15:44 PDT
They should all just work from some snapshot of objects accessible from the global object. :)
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