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

Issue 1845193002: Fix long-press image selection inside editables. (Closed)

Created:
4 years, 8 months ago by aelias_OOO_until_Jul13
Modified:
4 years, 8 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix long-press image selection inside editables. This fixes the regression introduced in http://crrev.com/1668453002 that contenteditable images were no longer selectable with long-press, and also fixes the longer-standing issue that long-press selection only worked on the left side of images. I also removed unnecessary #if OS(ANDROID), which allows the long-press behavior to work similarly on other touch platforms and lets us run the tests on all platforms. BUG=597506, 585020 Committed: https://crrev.com/1fa55a60390ac8fa93a336c666fe01c671534833 Cr-Commit-Position: refs/heads/master@{#385360}

Patch Set 1 #

Patch Set 2 : Add test and take narrower approach to LayoutReplaced problem #

Patch Set 3 : Actually use adjustedHitTestResult #

Total comments: 6

Patch Set 4 : Fix layout tests by adding isLongPress argument #

Patch Set 5 : Apply code review nits #

Patch Set 6 : Bring back containsOnlyWhitespace to address test flake #

Total comments: 3

Patch Set 7 : Add enum class #

Patch Set 8 : Disable Mac-only failure (Mac doesn't support long-press anyway) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -19 lines) Patch
M third_party/WebKit/Source/core/editing/SelectionController.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionController.cpp View 1 2 3 4 5 6 4 chunks +20 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 4 chunks +20 lines, -2 lines 0 comments Download
A third_party/WebKit/Source/web/tests/data/longpress_image_contenteditable.html View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (13 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845193002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845193002/1
4 years, 8 months ago (2016-03-31 03:37:17 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/204419)
4 years, 8 months ago (2016-03-31 04:37:29 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845193002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845193002/20001
4 years, 8 months ago (2016-04-05 03:41:08 UTC) #7
aelias_OOO_until_Jul13
Hi yosin@, PTAL.
4 years, 8 months ago (2016-04-05 03:43:35 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845193002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845193002/40001
4 years, 8 months ago (2016-04-05 03:46:07 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/206906)
4 years, 8 months ago (2016-04-05 04:52:51 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845193002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845193002/60001
4 years, 8 months ago (2016-04-05 05:16:07 UTC) #16
yosin_UTC9
It seems some layout tests failed. At glance, there tests have no image. So, this ...
4 years, 8 months ago (2016-04-05 05:16:45 UTC) #17
aelias_OOO_until_Jul13
https://codereview.chromium.org/1845193002/diff/40001/third_party/WebKit/Source/core/editing/SelectionController.cpp File third_party/WebKit/Source/core/editing/SelectionController.cpp (right): https://codereview.chromium.org/1845193002/diff/40001/third_party/WebKit/Source/core/editing/SelectionController.cpp#newcode303 third_party/WebKit/Source/core/editing/SelectionController.cpp:303: if (result.image()) { On 2016/04/05 at 05:16:45, Yosi_UTC9 wrote: ...
4 years, 8 months ago (2016-04-05 06:48:37 UTC) #18
yosin_UTC9
https://codereview.chromium.org/1845193002/diff/100001/third_party/WebKit/Source/core/editing/SelectionController.cpp File third_party/WebKit/Source/core/editing/SelectionController.cpp (right): https://codereview.chromium.org/1845193002/diff/100001/third_party/WebKit/Source/core/editing/SelectionController.cpp#newcode555 third_party/WebKit/Source/core/editing/SelectionController.cpp:555: selectClosestWordFromHitTestResult(hitTestResult, AppendTrailingWhitespace::DontAppend, true); Could you introduce enum class rather ...
4 years, 8 months ago (2016-04-05 07:27:47 UTC) #19
aelias_OOO_until_Jul13
https://codereview.chromium.org/1845193002/diff/100001/third_party/WebKit/Source/core/editing/SelectionController.cpp File third_party/WebKit/Source/core/editing/SelectionController.cpp (right): https://codereview.chromium.org/1845193002/diff/100001/third_party/WebKit/Source/core/editing/SelectionController.cpp#newcode555 third_party/WebKit/Source/core/editing/SelectionController.cpp:555: selectClosestWordFromHitTestResult(hitTestResult, AppendTrailingWhitespace::DontAppend, true); On 2016/04/05 at 07:27:46, Yosi_UTC9 wrote: ...
4 years, 8 months ago (2016-04-05 08:26:53 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845193002/130001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845193002/130001
4 years, 8 months ago (2016-04-05 08:27:01 UTC) #22
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-05 09:30:01 UTC) #24
yosin_UTC9
lgtm Thanks for removing #if OS(ANDROID)!
4 years, 8 months ago (2016-04-06 01:06:40 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845193002/130001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845193002/130001
4 years, 8 months ago (2016-04-06 01:15:43 UTC) #27
commit-bot: I haz the power
Committed patchset #8 (id:130001)
4 years, 8 months ago (2016-04-06 01:21:42 UTC) #28
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 01:23:38 UTC) #30
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/1fa55a60390ac8fa93a336c666fe01c671534833
Cr-Commit-Position: refs/heads/master@{#385360}

Powered by Google App Engine
This is Rietveld 408576698