Bug 159459 - Expose crossOrigin attribute as a static property in HTMLMediaElement
Summary: Expose crossOrigin attribute as a static property in HTMLMediaElement
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 103257 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-06 02:22 PDT by Olivier Blin
Modified: 2022-06-03 11:36 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.28 KB, patch)
2016-07-06 02:28 PDT, Olivier Blin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (1.37 MB, application/zip)
2016-07-06 03:01 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews100 for mac-yosemite (1.27 MB, application/zip)
2016-07-06 03:16 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (804.55 KB, application/zip)
2016-07-06 03:26 PDT, Build Bot
no flags Details
Patch (50.01 KB, patch)
2016-07-08 07:57 PDT, Olivier Blin
cdumez: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (940.85 KB, application/zip)
2016-07-08 08:41 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Blin 2016-07-06 02:22:43 PDT
The crossOrigin attribute is already used for MediaResourceLoader (r119742 and r175050), but it was not exposed as a static property.

Exposing it fixes VR360 support in Dailymotion, since it uses the "in" operator to detect if crossOrigin is supported by the HTMLVideoElement, in order to enable VR360.
Comment 1 Olivier Blin 2016-07-06 02:26:08 PDT
Example VR360 video that failed to play in VR360 mode:
http://www.dailymotion.com/embed/video/x4jiicp?autoplay=1
Comment 2 Olivier Blin 2016-07-06 02:28:21 PDT
Created attachment 282865 [details]
Patch
Comment 3 Olivier Blin 2016-07-06 02:28:56 PDT
If the approach is correct, should I write a test for this?
Comment 4 WebKit Commit Bot 2016-07-06 02:30:40 PDT
Attachment 282865 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:15:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Build Bot 2016-07-06 03:01:06 PDT
Comment on attachment 282865 [details]
Patch

Attachment 282865 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1634779

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
imported/w3c/web-platform-tests/html/dom/reflection-embedded.html
Comment 6 Build Bot 2016-07-06 03:01:09 PDT
Created attachment 282869 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-07-06 03:16:21 PDT
Comment on attachment 282865 [details]
Patch

Attachment 282865 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1634826

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
imported/w3c/web-platform-tests/html/dom/reflection-embedded.html
Comment 8 Build Bot 2016-07-06 03:16:25 PDT
Created attachment 282872 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-07-06 03:26:12 PDT
Comment on attachment 282865 [details]
Patch

Attachment 282865 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1634834

New failing tests:
imported/w3c/web-platform-tests/html/dom/reflection-embedded.html
Comment 10 Build Bot 2016-07-06 03:26:15 PDT
Created attachment 282873 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 11 Chris Dumez 2016-07-06 08:26:15 PDT
(In reply to comment #7)
> Comment on attachment 282865 [details]
> Patch
> 
> Attachment 282865 [details] did not pass mac-ews (mac):
> Output: http://webkit-queues.webkit.org/results/1634826
> 
> New failing tests:
> imported/w3c/web-platform-tests/html/dom/interfaces.html
> imported/w3c/web-platform-tests/html/dom/reflection-embedded.html

Chances are that these tests cover your change. Please rebaseline them in your patch.
Comment 12 Olivier Blin 2016-07-06 08:28:54 PDT
(In reply to comment #11)
> (In reply to comment #7)
> > Comment on attachment 282865 [details]
> > Patch
> > 
> > Attachment 282865 [details] did not pass mac-ews (mac):
> > Output: http://webkit-queues.webkit.org/results/1634826
> > 
> > New failing tests:
> > imported/w3c/web-platform-tests/html/dom/interfaces.html
> > imported/w3c/web-platform-tests/html/dom/reflection-embedded.html
> 
> Chances are that these tests cover your change. Please rebaseline them in
> your patch.

Will do.

Besides that, are you ok with the change?
Should I write a test?

Thanks
Comment 13 Chris Dumez 2016-07-06 08:33:50 PDT
Comment on attachment 282865 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=282865&action=review

The change looks good.

> Source/WebCore/ChangeLog:15
> +        No new tests (OOPS!).

Also, please update this line to something like:
No new tests, rebaselined existing tests.

> Source/WebCore/html/HTMLMediaElement.h:170
> +    String crossOrigin() const;

It would probably be nice to update HTMLMediaElement::mediaPlayerCreateResourceLoader() to use the new crossOrigin() getter as well.
Comment 14 Olivier Blin 2016-07-08 07:57:35 PDT
Created attachment 283160 [details]
Patch

Rebaselined for 150 WPT tests that are now fixed, and updated mediaPlayerCreateResourceLoader() to use the new getter
Comment 15 Chris Dumez 2016-07-08 08:27:11 PDT
Comment on attachment 283160 [details]
Patch

r=me
Comment 16 Build Bot 2016-07-08 08:41:12 PDT
Comment on attachment 283160 [details]
Patch

Attachment 283160 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1647236

New failing tests:
imported/w3c/web-platform-tests/html/dom/reflection-embedded.html
Comment 17 Build Bot 2016-07-08 08:41:17 PDT
Created attachment 283165 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
Comment 18 Chris Dumez 2016-07-08 08:42:54 PDT
(In reply to comment #17)
> Created attachment 283165 [details]
> Archive of layout-test-results from ews123 for ios-simulator-wk2
> 
> The attached test failures were seen while running run-webkit-tests on the
> ios-sim-ews.
> Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5

You need to overwrite LayoutTests//platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt with the reflection-embedded-actual.txt that you will find in:
https://bugs.webkit.org/attachment.cgi?id=283165
Comment 19 Chris Dumez 2016-07-08 08:49:04 PDT
Committed r202980: <http://trac.webkit.org/changeset/202980>
Comment 20 Chris Dumez 2016-07-08 08:49:28 PDT
(In reply to comment #18)
> (In reply to comment #17)
> > Created attachment 283165 [details]
> > Archive of layout-test-results from ews123 for ios-simulator-wk2
> > 
> > The attached test failures were seen while running run-webkit-tests on the
> > ios-sim-ews.
> > Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.5
> 
> You need to overwrite
> LayoutTests//platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/
> reflection-embedded-expected.txt with the reflection-embedded-actual.txt
> that you will find in:
> https://bugs.webkit.org/attachment.cgi?id=283165

Don't worry about it, I fixed it and landed the patch.
Comment 21 Alexey Proskuryakov 2022-06-03 11:36:57 PDT
*** Bug 103257 has been marked as a duplicate of this bug. ***