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

Issue 23311004: inline <br> does not get deleted when following some non-textual content (Closed)

Created:
7 years, 4 months ago by arpitab_
Modified:
7 years, 2 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

inline <br> does not get deleted when following some non-textual content deleteSelectionCommand does not handle the case when a <br> element is inlined after some non-textual content (input controls, image etc.). When doing a back-delete at the start of a line following such a <br> the two contiguous lines should merge and the <br> should get deleted. Currently even though the <br> is deleted, another placeholder <br> is incorrectly inserted at the same point, thus effectively there is no change. We are incorrectly computing the <br> to be at the start of an empty line even though the line is not empty. In DeleteSelectionCommand::handleSpecialCaseBRDelete() added a check to verify that the inline <br> is not on an empty line if the end node's previous sibling is the <br> element. WebKit changeset: http://trac.webkit.org/changeset/154479 R=eseidel@chromium.org

Patch Set 1 #

Total comments: 6

Patch Set 2 : Patch with changed layout testcase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -6 lines) Patch
M LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/editing/deleting/delete-br-001.html View 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/editing/deleting/delete-br-001-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/editing/deleting/delete-inline-br.html View 1 1 chunk +37 lines, -0 lines 0 comments Download
A LayoutTests/editing/deleting/delete-inline-br-expected.txt View 1 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/editing/DeleteSelectionCommand.cpp View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
arpitab_
7 years, 4 months ago (2013-08-19 15:09:50 UTC) #1
leviw_travelin_and_unemployed
https://codereview.chromium.org/23311004/diff/1/LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt File LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt (right): https://codereview.chromium.org/23311004/diff/1/LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt#newcode1 LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt:1: <img id="img" style="display:block;" src="../resources/abe.png"> Is this related somehow? https://codereview.chromium.org/23311004/diff/1/LayoutTests/editing/deleting/delete-br-001.html ...
7 years, 4 months ago (2013-08-19 18:14:24 UTC) #2
arpitab_
Thanks for the review Levi! Shall upload another patch with the changes. https://codereview.chromium.org/23311004/diff/1/LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt File LayoutTests/editing/deleting/delete-before-block-image-2-expected.txt ...
7 years, 4 months ago (2013-08-22 14:12:34 UTC) #3
tkent
+yosin
7 years, 3 months ago (2013-09-05 06:07:38 UTC) #4
yosin_UTC9
I have another patch for fixing BR related issues: https://codereview.chromium.org/18799004/ I'll try whether my patch ...
7 years, 3 months ago (2013-09-05 06:35:28 UTC) #5
arpitab_
On 2013/09/05 06:35:28, Yoshifumi Inoue wrote: > I have another patch for fixing BR related ...
7 years, 3 months ago (2013-09-05 07:09:37 UTC) #6
yosin_UTC9
7 years, 3 months ago (2013-09-05 07:24:35 UTC) #7
On 2013/09/05 07:09:37, arpitab_ wrote:
> On 2013/09/05 06:35:28, Yoshifumi Inoue wrote:
> > I have another patch for fixing BR related issues:
> > https://codereview.chromium.org/18799004/
> > 
> > I'll try whether my patch works for delete-inline-br.html or not.
> 
> Thanks for the update yosin.
My patch passes delete-inline-br.html.
It seems my patch covers more cases than this patch, because my patch fixes
editing/inserting/font-size-clears-from-typing-style.html.

Powered by Google App Engine
This is Rietveld 408576698