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

Issue 1377733002: Fixes for contenteditable caret and selection handling in Windows. (Closed)

Created:
5 years, 2 months ago by nektarios
Modified:
5 years, 2 months ago
Reviewers:
dmazzoni
CC:
aboxhall+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, jam, je_julie, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nektar+watch_chromium.org, plundblad+watch_chromium.org, yuzo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes for contenteditable caret and selection handling in Windows. 1. Reports a valid selection endpoint even when either the start or end of the selection fall outside the object. <div contenteditable>this <selection_start>is a <a href="#">link<selection_end></a>.</div> selection_start on the link element would be given as 0. 2. Does not report any selection on a parent object if there is no selection on the child objects. <div contenteditable><p>hi</p></div> nSelections on the div should be 0. BUG=527440 R=dmazzoni@chromium.org Committed: https://crrev.com/d816a9211de3c355f0de5051fa5c517ef2321e1a Cr-Commit-Position: refs/heads/master@{#352236}

Patch Set 1 #

Patch Set 2 : Enhanced contenteditable test with caret and selection checks and began fixing test expectations. #

Patch Set 3 : Fixed compilation error. #

Patch Set 4 : Fixed all compilation errors. #

Patch Set 5 : Fixed some more corner cases, updated tests to make them more resilient and added comments to the c… #

Total comments: 6

Patch Set 6 : Addressed comments and changed to using HasSelection method instead of calling get_nselections for … #

Patch Set 7 : Format changes. #

Patch Set 8 : Fixed another test. #

Patch Set 9 : Last uploda. #

Patch Set 10 : Rebased with master. #

Patch Set 11 : Changed so that caret position is reported at the focus of the selection. #

Patch Set 12 : Reverted HasSelection simplification. #

Patch Set 13 : Caret should always be reported at the end of the selection. #

Patch Set 14 : Fixed one more corner case. #

Patch Set 15 : Fixed selection offsets when selection focus is not a direct sibling of the nearest non-text ancest… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -105 lines) Patch
M content/browser/accessibility/browser_accessibility.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_auralinux.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_mac.mm View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +19 lines, -6 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +158 lines, -45 lines 0 comments Download
M content/browser/accessibility/browser_accessibility_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +30 lines, -13 lines 0 comments Download
M content/renderer/accessibility/blink_ax_tree_source.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/accessibility/renderer_accessibility.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-win.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M content/test/data/accessibility/aria/aria-textbox-with-selection-expected-win.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M content/test/data/accessibility/html/contenteditable-descendants.html View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/data/accessibility/html/contenteditable-descendants-expected-win.txt View 1 2 3 4 5 1 chunk +25 lines, -25 lines 0 comments Download
M content/test/data/accessibility/html/input-password-expected-win.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/test/data/accessibility/html/input-text-expected-win.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/test/data/accessibility/html/input-text-with-selection-expected-win.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M content/test/data/accessibility/html/textarea-with-selection-expected-win.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
nektarios
5 years, 2 months ago (2015-09-29 04:25:19 UTC) #1
dmazzoni
lgtm https://codereview.chromium.org/1377733002/diff/80001/content/browser/accessibility/browser_accessibility_win.cc File content/browser/accessibility/browser_accessibility_win.cc (right): https://codereview.chromium.org/1377733002/diff/80001/content/browser/accessibility/browser_accessibility_win.cc#newcode3722 content/browser/accessibility/browser_accessibility_win.cc:3722: Please remove the double blank lines within a ...
5 years, 2 months ago (2015-09-30 20:09:56 UTC) #2
chromium-reviews
Done, except: int32 current_offset = static_cast<int>(...); I prefer to change the type instead of the ...
5 years, 2 months ago (2015-10-01 00:15:26 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1377733002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1377733002/160001
5 years, 2 months ago (2015-10-01 21:22:43 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/115361)
5 years, 2 months ago (2015-10-01 21:31:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1377733002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1377733002/180001
5 years, 2 months ago (2015-10-01 21:52:18 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/105164) win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, ...
5 years, 2 months ago (2015-10-01 21:59:46 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1377733002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1377733002/260001
5 years, 2 months ago (2015-10-03 02:07:15 UTC) #16
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 2 months ago (2015-10-03 04:15:22 UTC) #17
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/d816a9211de3c355f0de5051fa5c517ef2321e1a Cr-Commit-Position: refs/heads/master@{#352236}
5 years, 2 months ago (2015-10-03 04:16:03 UTC) #18
nektarios
A revert of this CL (patchset #14 id:260001) has been created in https://codereview.chromium.org/1388593002/ by nektar@chromium.org. ...
5 years, 2 months ago (2015-10-03 04:46:23 UTC) #19
nektarios
5 years, 2 months ago (2015-10-03 04:46:27 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:260001) has been created in
https://codereview.chromium.org/1381603005/ by nektar@chromium.org.

The reason for reverting is: Breaks reporting of the selection when the focus is
on a text leaf that is not an immediate sibling of the nearest non-text ancestor
of the current object..

Powered by Google App Engine
This is Rietveld 408576698