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

Issue 14794012: Make contenteditable="false" element as atomic node for selection motion (Closed)

Created:
7 years, 7 months ago by yosin_UTC9
Modified:
7 years, 7 months ago
CC:
blink-reviews, eae+blinkwatch
Visibility:
Public.

Description

On IE and FireFox, they treats contenteditable="false" element as atomic element. When moving caret around it, cursor is placed at start/end of it. This patch changes Blink(Chrome) behavior as IE and FireFox. This patch updates tests for behavior change: - editing/selection/4889598.html: Removed, because updated version of mixed-editability-3.html does same test, line motion around uneditable table element. - editing/selection/mixed-editability-3.html: Changed to cover forward and backward line motion and verify by script rather than editing log and render tree for ease of future maintenance. - editing/selection/move-by-line-004.html: Changed for new behavior. Caret can't go cross uneditable table cell as FireFox. BUG=238000 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151179

Patch Set 1 : 2013-05-17T17:08 #

Total comments: 7

Patch Set 2 : 2013-05-22T16:51 #

Total comments: 2

Patch Set 3 : 2013-05-27T14:00 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -269 lines) Patch
A LayoutTests/editing/deleting/delete-mixed-editable-content-002.html View 1 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/editing/deleting/delete-mixed-editable-content-002-expected.txt View 1 chunk +23 lines, -0 lines 0 comments Download
D LayoutTests/editing/selection/4889598.html View 1 chunk +0 lines, -22 lines 0 comments Download
D LayoutTests/editing/selection/4889598-expected.txt View 1 chunk +0 lines, -65 lines 0 comments Download
M LayoutTests/editing/selection/mixed-editability-3.html View 1 1 chunk +23 lines, -11 lines 0 comments Download
M LayoutTests/editing/selection/mixed-editability-3-expected.txt View 1 chunk +21 lines, -32 lines 0 comments Download
M LayoutTests/editing/selection/move-by-line-004.html View 1 2 chunks +25 lines, -34 lines 0 comments Download
M LayoutTests/editing/selection/move-by-line-004-expected.txt View 1 chunk +14 lines, -5 lines 0 comments Download
M LayoutTests/editing/selection/resources/js-test-selection-shared.js View 1 1 chunk +55 lines, -0 lines 0 comments Download
D LayoutTests/platform/chromium-linux/editing/selection/4889598-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-linux/editing/selection/mixed-editability-3-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-mac-lion/editing/selection/4889598-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-mac-lion/editing/selection/mixed-editability-3-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-mac-snowleopard/editing/selection/4889598-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-mac-snowleopard/editing/selection/mixed-editability-3-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-mac/editing/selection/4889598-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-mac/editing/selection/mixed-editability-3-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-win/editing/selection/4889598-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-win/editing/selection/4889598-expected.txt View 1 chunk +0 lines, -65 lines 0 comments Download
D LayoutTests/platform/chromium-win/editing/selection/mixed-editability-3-expected.png View Binary file 0 comments Download
D LayoutTests/platform/chromium-win/editing/selection/mixed-editability-3-expected.txt View 1 chunk +0 lines, -32 lines 0 comments Download
M Source/core/editing/htmlediting.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/htmlediting.cpp View 1 2 2 chunks +13 lines, -2 lines 2 comments Download

Messages

Total messages: 12 (0 generated)
yosin_UTC9
Could you review this patch? Thanks in advance. -yosi P.S. Failure tests on Linux/Mac don't ...
7 years, 7 months ago (2013-05-17 09:19:13 UTC) #1
yosin_UTC9
ping...
7 years, 7 months ago (2013-05-21 03:57:28 UTC) #2
ojan
Seems reasonable to me overall that contentEditable=false regions inside contentEditable=true regions should be atomic. I'm ...
7 years, 7 months ago (2013-05-22 02:25:20 UTC) #3
yosin_UTC9
Could you review this patch? Thanks in advance. -yosi https://codereview.chromium.org/14794012/diff/12001/LayoutTests/editing/selection/mixed-editability-3.html File LayoutTests/editing/selection/mixed-editability-3.html (right): https://codereview.chromium.org/14794012/diff/12001/LayoutTests/editing/selection/mixed-editability-3.html#newcode13 LayoutTests/editing/selection/mixed-editability-3.html:13: ...
7 years, 7 months ago (2013-05-22 07:54:11 UTC) #4
leviw_travelin_and_unemployed
LGTM with the added nit. https://codereview.chromium.org/14794012/diff/21001/Source/core/editing/htmlediting.cpp File Source/core/editing/htmlediting.cpp (right): https://codereview.chromium.org/14794012/diff/21001/Source/core/editing/htmlediting.cpp#newcode76 Source/core/editing/htmlediting.cpp:76: if (renderer->isTable() || renderer->isTableRow()) ...
7 years, 7 months ago (2013-05-22 21:02:47 UTC) #5
ojan
https://codereview.chromium.org/14794012/diff/12001/Source/core/editing/htmlediting.cpp File Source/core/editing/htmlediting.cpp (right): https://codereview.chromium.org/14794012/diff/12001/Source/core/editing/htmlediting.cpp#newcode76 Source/core/editing/htmlediting.cpp:76: if (renderer->isTable() || renderer->isTableRow()) On 2013/05/22 07:54:12, Yoshifumi Inoue ...
7 years, 7 months ago (2013-05-22 21:05:45 UTC) #6
yosin_UTC9
On 2013/05/22 21:05:45, ojan wrote: > https://codereview.chromium.org/14794012/diff/12001/Source/core/editing/htmlediting.cpp > File Source/core/editing/htmlediting.cpp (right): > > https://codereview.chromium.org/14794012/diff/12001/Source/core/editing/htmlediting.cpp#newcode76 > ...
7 years, 7 months ago (2013-05-23 09:58:44 UTC) #7
yosin_UTC9
Thanks for reviewing! Committing... https://codereview.chromium.org/14794012/diff/21001/Source/core/editing/htmlediting.cpp File Source/core/editing/htmlediting.cpp (right): https://codereview.chromium.org/14794012/diff/21001/Source/core/editing/htmlediting.cpp#newcode76 Source/core/editing/htmlediting.cpp:76: if (renderer->isTable() || renderer->isTableRow()) On ...
7 years, 7 months ago (2013-05-27 05:01:45 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yosin@chromium.org/14794012/35001
7 years, 7 months ago (2013-05-27 05:02:02 UTC) #9
ojan
https://chromiumcodereview.appspot.com/14794012/diff/35001/Source/core/editing/htmlediting.cpp File Source/core/editing/htmlediting.cpp (right): https://chromiumcodereview.appspot.com/14794012/diff/35001/Source/core/editing/htmlediting.cpp#newcode78 Source/core/editing/htmlediting.cpp:78: if (renderer->isTable() || renderer->isTableRow()) I don't think this bit ...
7 years, 7 months ago (2013-05-27 06:51:54 UTC) #10
commit-bot: I haz the power
Change committed as 151179
7 years, 7 months ago (2013-05-27 07:10:00 UTC) #11
yosin_UTC9
7 years, 7 months ago (2013-05-27 09:10:13 UTC) #12
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/14794012/diff/35001/Source/core/editin...
File Source/core/editing/htmlediting.cpp (right):

https://chromiumcodereview.appspot.com/14794012/diff/35001/Source/core/editin...
Source/core/editing/htmlediting.cpp:78: if (renderer->isTable() ||
renderer->isTableRow())
On 2013/05/27 06:51:54, ojan wrote:
> I don't think this bit is right. Even if we were to special-case tables, this
> leaves out table sections. What does IE do if you make the tbody uneditable?
> 
> Still, I don't think we want to special-case tables unless we have some
evidence
> (other than layout tests) that web content depends on this. Browser
> compatibility is important, but we should try to get browsers to converge on a
> behavior that we think is good.

I don't think there are web contents depend on this. Because, all browsers do
different.
Anyway, I'm reverting this patch: https://codereview.chromium.org/15732019/

Powered by Google App Engine
This is Rietveld 408576698