New issue
Advanced search Search tips

Issue 681536 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

getClientRects ignores inline wrapped images (regression)

Reported by ejsand...@gmail.com, Jan 16 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
1. Visit http://edg2s.github.io/rangefix/
2. Select from inside 'Lorem' to inside 'ipsum'
3. Observe you only get two rects in the 'Native' column, and nothing for the image.

What is the expected behavior?
There should be a rect for the image, as seen in the 'Fixed' column

What went wrong?
Probably a regression introduced by the fix for  bug 324437 .

Did this work before? Yes 53 (maybe 54?)

Does this work in other browsers? N/A

Chrome version: 55.0.2873.0  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 24.0 r0
 

Comment 1 by tkent@chromium.org, Jan 16 2017

Labels: Needs-Bisect

Comment 2 by ajha@chromium.org, Jan 16 2017

Labels: Needs-Triage-M55
Cc: kkaluri@chromium.org
Labels: Needs-Feedback
Tested this issue in Ubuntu 14.04 with chrome version #55.0.2883.87  and #53.0.2850.0 as steps mentioned in the comment #0
Observed the same behavior in both both versions

Attaching the screenshot for your reference, please look into it and let us know your observations.

Issue 681536 - M55.png
185 KB View Download
Issue 681536 - M53.png
232 KB View Download
Cc: yosin@chromium.org
 Issue 324437  is not fixed?
Owner: kkaluri@chromium.org
Status: Assigned (was: Unconfirmed)
kkaluri, could you please bisect this and confirm whether it is a regression and if so, the regression range? Please assign it to me after that.
Cc: ligim...@chromium.org
Labels: -Needs-Feedback -Needs-Triage-M55 Needs-Triage-M62
Team, please try a repro and bisect if needed.
Labels: -Needs-Bisect M-62
Owner: ----
Status: Untriaged (was: Assigned)
Able to reproduce the issue using #60.0.3112.78 on Linux Ubuntu 14.04, Mac 10.12.5 and Win 10. Observed the image not properly aligned into the rect.

This seems to be a Non-Regression issue as same behavior is seen since M45. Untriaged to get more input's from dev.

Note:
1. Issue is seen in M62 as well.
2. Removing bisect label as this is a Non-Regression issue.
3. Please find the screenshot of older build.
Thanks!!
Screenshot from 2017-08-01 11:14:22.png
282 KB View Download
Components: -Blink>DOM Blink>CSS
Components: -Blink>CSS Blink>Layout

Comment 10 by e...@chromium.org, Aug 9 2017

Cc: xiaoche...@chromium.org
Status: Available (was: Untriaged)
Owner: xiaoche...@chromium.org
Status: Assigned (was: Available)
I'll take a look as I'm going to do some work on these functions.
Project Member

Comment 12 by bugdroid1@chromium.org, Aug 12 2017

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

commit 701dbedb5c34d33e5bedf31105c91c0393a9ba13
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Sat Aug 12 02:00:18 2017

Fix how Range collects nodes for getClientRects/getBoundingClientRect

According to spec (*), Range::getClientRects() should collect the
bounding rectangle of each element "selected by the range, whose
parent is not selected by the range". The patch corrects the relevant
logic.

This patch also fixes two layout tests that use the two APIs
incorrectly: the two layout tests create a range that doesn't select
any node but expect non-empty client rects to be returned, which is
wrong.

Bug:  681536 
Change-Id: I66173a96d289eb2e3298547bea28e3d2e3d5f439
Reviewed-on: https://chromium-review.googlesource.com/611565
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493936}
[modify] https://crrev.com/701dbedb5c34d33e5bedf31105c91c0393a9ba13/third_party/WebKit/LayoutTests/fast/dom/Range/scale-page-bounding-client-rect.html
[modify] https://crrev.com/701dbedb5c34d33e5bedf31105c91c0393a9ba13/third_party/WebKit/LayoutTests/fast/dom/Range/scale-page-client-rects.html
[modify] https://crrev.com/701dbedb5c34d33e5bedf31105c91c0393a9ba13/third_party/WebKit/Source/core/dom/Range.cpp
[modify] https://crrev.com/701dbedb5c34d33e5bedf31105c91c0393a9ba13/third_party/WebKit/Source/core/dom/RangeTest.cpp

Status: Fixed (was: Assigned)
Fixed in M62.

Sign in to add a comment