Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Remove UA shadow usage from ImageDocument." #9177

Merged
merged 1 commit into from Jan 24, 2018

Conversation

Projects
None yet
4 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Jan 24, 2018

Reverts "Remove UA shadow usage from ImageDocument."
https://chromium-review.googlesource.com/877693

After more investigation, the removal turned out violating the HTML spec.

The corresponding HTML spec:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#read-media
mandates for the ImageDocument must have only one element.

The previous change introduced intermediate container

element,
but it is not conforming to the spec. Originally the UA shadow was
attached to and hides the container and this CL restores the
behavior.

Added a WPT test for checking the case.
There was an existing test case for this, but when ImageDocument is
embedded in an <iframe>, the new media-like view isn't enabled and no
UA shadow is used. The new test creates a popup window which is a
shrinkable container, and Blink's UA shadow implementation is used.
Other UA implementation may benefit from this (or may not, but at
least do not do harm).

Bug: 802185
Change-Id: Ifac013eced8f1d234092acffb726a90c03f988f9
Reviewed-on: https://chromium-review.googlesource.com/882630
Commit-Queue: Takayoshi Kochi kochi@chromium.org
Reviewed-by: Kent Tamura tkent@chromium.org
Cr-Commit-Position: refs/heads/master@{#531494}

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Jan 24, 2018

Build PASSED

Started: 2018-01-24 10:47:59
Finished: 2018-01-24 10:52:47

Failing Jobs

  • safari:11.0

Unstable Results

Browser: "Safari 11.0" (failures allowed)

View in: WPT PR Status | TravisCI

Test Subtest Results Messages
/html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html   OK: 9
ERROR: 1
  The document for a standalone media file should have one child in the body. PASS: 9

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-882630 branch from 67bbf53 to a5002a5 Jan 24, 2018

Revert "Remove UA shadow usage from ImageDocument."
Reverts "Remove UA shadow usage from ImageDocument."
https://chromium-review.googlesource.com/877693

After more investigation, the removal turned out violating the HTML spec.

The corresponding HTML spec:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#read-media
mandates <body> for the ImageDocument must have only one <img> element.

The previous change introduced intermediate container <div> element,
but it is not conforming to the spec.  Originally the UA shadow was
attached to <body> and hides the container and this CL restores the
behavior.

Added a WPT test for checking the case.
There was an existing test case for this, but when ImageDocument is
embedded in an <iframe>, the new media-like view isn't enabled and no
UA shadow is used.  The new test creates a popup window which is a
shrinkable container, and Blink's UA shadow implementation is used.
Other UA implementation may benefit from this (or may not, but at
least do not do harm).

Bug: 802185
Change-Id: Ifac013eced8f1d234092acffb726a90c03f988f9
Reviewed-on: https://chromium-review.googlesource.com/882630
Commit-Queue: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531494}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-882630 branch from a5002a5 to 91e3152 Jan 24, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit c992d86 into master Jan 24, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-882630 branch Jan 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.