New issue
Advanced search Search tips

Issue 627616 link

Starred by 3 users

Issue metadata

Status: Fixed
Merged: issue 621693
Owner:
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

IntersectionObserver does not work correctly when display:none is added to a nested iframe.

Reported by joel.re...@moat.com, Jul 12 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
Go to this test page: http://joelregus.com/upload/intersection_container2.html

Scenario 1 - Event is not triggered

1. Notice the 100% Visible message.
2. Click on "Hide" for either the Outside or Inside iFrame.
3. Notice that the box is still 100% visible

Scenario 2 - Event returns the wrong information

1. Click on the Inside iFrame's "Add Margin" button.
2. Notice that the box is now 0% visible.
3. Click on "Hide" for either the Outside or Inside iFrame.
4. Notice that the box is now 100% visible.

What is the expected behavior?
The box should be 0% visible when the iFrames are hidden.

What went wrong?
IntersectionObserver does not seem to be checking for display:none on the nested iFrames.

Did this work before? N/A 

Chrome version: 51.0.2704.103  Channel: n/a
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 22.0 r0

In this test I am passing the event data via post message.
 

Comment 1 by joel.re...@moat.com, Jul 12 2016

This issue could be related to this: https://bugs.chromium.org/p/chromium/issues/detail?id=621693

Comment 2 by tkent@chromium.org, Jul 12 2016

Components: -Blink Blink>Layout

Comment 3 by e...@chromium.org, Jul 13 2016

Labels: -Pri-2 -OS-Mac OS-All Pri-3
Owner: szager@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 4 by szager@chromium.org, Jul 14 2016

Mergedinto: 621693
Status: Duplicate (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff3e7c584eaff665b8560dc1b6150c95a2062fb0

commit ff3e7c584eaff665b8560dc1b6150c95a2062fb0
Author: szager <szager@chromium.org>
Date: Fri Aug 05 22:09:35 2016

[mapToVisualRectInAncestorSpace] Check for detached iframes.

If, e.g., display:none is set on an iframe, mapTo... should return an empty rect.

BUG= 627616 
R=chrishtr@chromium.org,wangxianzhu@chromium.org

Review-Url: https://codereview.chromium.org/2218703002
Cr-Commit-Position: refs/heads/master@{#410185}

[modify] https://crrev.com/ff3e7c584eaff665b8560dc1b6150c95a2062fb0/third_party/WebKit/Source/core/layout/LayoutView.cpp
[modify] https://crrev.com/ff3e7c584eaff665b8560dc1b6150c95a2062fb0/third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp

Status: Fixed (was: Duplicate)
Labels: Merge-Request-53
Several major web devs have asked for this fix in M53.

Comment 8 by dimu@chromium.org, Aug 9 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Please merge your change to M53 branch 2785 ASAP so we can take it in for tomorrow's Beta release. Thank you very much.
Project Member

Comment 10 by bugdroid1@chromium.org, Aug 9 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b2ccde58318e5ebe880e5fce6883ad9394fd5c61

commit b2ccde58318e5ebe880e5fce6883ad9394fd5c61
Author: szager <szager@chromium.org>
Date: Tue Aug 09 20:21:37 2016

[mapToVisualRectInAncestorSpace] Check for detached iframes.

If, e.g., display:none is set on an iframe, mapTo... should return an empty rect.

Merged from https://codereview.chromium.org/2218703002

BUG= 627616 
TBR=chrishtr@chromium.org,wangxianzhu@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2233513002
Cr-Commit-Position: refs/branch-heads/2785@{#544}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/b2ccde58318e5ebe880e5fce6883ad9394fd5c61/third_party/WebKit/Source/core/layout/LayoutView.cpp
[modify] https://crrev.com/b2ccde58318e5ebe880e5fce6883ad9394fd5c61/third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp

Labels: TE-Verified-53.0.2785.57 TE-Verified-M53
Tested the issue on Windows 7, Mac 10.11.6, Ubuntu 14.04 using 53.0.2785.57 as per steps in comment #0.Observed that the box is 0% visible when the iFrames are hidden.
Please find attached screencast.

Marking it as TE-Verified.

627616.mp4
416 KB View Download

Sign in to add a comment