Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Issue 1949373003: Change Range.getBoundingClientRect() when the first rect is empty (Closed)

Created:
4 years, 7 months ago by kojii
Modified:
4 years, 7 months ago
Reviewers:
David Tseng, eae
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change Range.getBoundingClientRect() when the first rect is empty crrev.com/376398 changed Range.getBoundingClientRect() to include the first rectangle even when it is empty (either width or height is zero.) This change improves when all rects are empty, but produces undesirable result when the first rectangle is empty while the rest is not. This patch changes it to return the first rectangle when all rectangles are empty, following the spec change in [1]. content_editable_extractor_test.unitjs was reverted to before crrev.com/376398. [1] https://github.com/w3c/csswg-drafts/commit/0e7a5cbdea19397086e9423b508fe6f41decdcec BUG=606662 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/27e0f0178d9c3d13bcd4dc96085cd0a749081d46 Cr-Commit-Position: refs/heads/master@{#393057}

Patch Set 1 #

Patch Set 2 : Add test #

Total comments: 2

Patch Set 3 : content_editable_extractor_test.unitjs #

Patch Set 4 : Fixed test as per eae review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -15 lines) Patch
M chrome/browser/resources/chromeos/chromevox/common/content_editable_extractor_test.unitjs View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/Range/get-bounding-client-rect-empty-and-non-empty.html View 1 2 3 1 chunk +70 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Range.cpp View 1 1 chunk +6 lines, -10 lines 0 comments Download

Messages

Total messages: 25 (12 generated)
kojii
PTAL.
4 years, 7 months ago (2016-05-05 13:16:11 UTC) #4
eae
Let's wait a few days for the spec discussion to settle before landing this. https://codereview.chromium.org/1949373003/diff/20001/third_party/WebKit/LayoutTests/fast/dom/Range/get-bounding-client-rect-empty-and-non-empty.html ...
4 years, 7 months ago (2016-05-05 13:28:29 UTC) #5
eae
Oh, I forgot to mention; thank you for taking the time to look into this ...
4 years, 7 months ago (2016-05-05 13:29:13 UTC) #6
kojii
sounds good, I added this to the F2F agenda. Also I'm not really sure reverting ...
4 years, 7 months ago (2016-05-06 06:11:02 UTC) #9
kojii
WG is fine, the spec was updated. https://readable-email.org/list/www-style/topic/cssom-view-getboundingclientrect-when-the-first-rectangle-is-empty#content-4 Is reverting content_editable_extractor_test.unitjs fine?
4 years, 7 months ago (2016-05-11 17:44:46 UTC) #12
eae
LGTM Yeah, go ahead and revert the change to the test.
4 years, 7 months ago (2016-05-11 19:16:54 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949373003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949373003/60001
4 years, 7 months ago (2016-05-11 19:24:22 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/181466)
4 years, 7 months ago (2016-05-11 19:32:35 UTC) #17
kojii
dtseng@, could you PTAL this file: chrome/browser/resources/chromeos/chromevox/common/content_editable_extractor_test.unitjs
4 years, 7 months ago (2016-05-11 20:22:02 UTC) #19
David Tseng
lgtm
4 years, 7 months ago (2016-05-11 20:52:31 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949373003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949373003/60001
4 years, 7 months ago (2016-05-11 20:53:55 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-11 21:03:08 UTC) #23
commit-bot: I haz the power
4 years, 7 months ago (2016-05-11 21:05:33 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/27e0f0178d9c3d13bcd4dc96085cd0a749081d46
Cr-Commit-Position: refs/heads/master@{#393057}

Powered by Google App Engine
This is Rietveld 408576698