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

Issue 17381003: When trying to break a line after an image followed by some text, contrary to the expected behavior… (Closed)

Created:
7 years, 6 months ago by arpitab_
Modified:
7 years, 5 months ago
CC:
blink-reviews, eae+blinkwatch, yosin_UTC9, ojan, rniwa-cr
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

When trying to break a line after an image followed by some text, contrary to the expected behavior the text doesn't move to a new line, instead, the caret position just shifts to the end of line. As per the existing implementation for inserting a paragraph separator, the insertion position obtained corresponds to the point after the image element. Since the insertion position doesn't resolve to being offset in the following text node (0 offset), no splitting of text occurs and the block to be inserted is placed after the containing (start) block (thereby causing the caret position to shift). If the computed insertionPosition points to an element that shall be ignored for editing purposes (i.e. cannot have a VisiblePosition inside it), and the position lies either at the start or at the end of such an element, we should move our Position either upstream or downstream (respectively) so as to obtain a valid position which can be used further for splitting of the text. Moving the insertionPosition either upstream or downstream, if the point lies either at the start or at the end of the anchor node. The ensuing position, if a text node, can then be used for splitting of the text correctly. This patch has landed in Webkit: https://trac.webkit.org/changeset/151604 BUG=251209 R=leviw@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153866

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -0 lines) Patch
A LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text.html View 1 chunk +42 lines, -0 lines 0 comments Download
A LayoutTests/editing/inserting/insert-paragraph-after-non-editable-node-before-text-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/editing/InsertParagraphSeparatorCommand.cpp View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
arpitab_
7 years, 6 months ago (2013-06-18 09:44:15 UTC) #1
eseidel
Ojan or Rniwa are better reviewers for this than I. I CC ryosuke as he ...
7 years, 5 months ago (2013-07-10 05:37:10 UTC) #2
eseidel
7 years, 5 months ago (2013-07-10 05:37:29 UTC) #3
eseidel
This seems reasonable to me. so lgtm. Please give a day or so to allow ...
7 years, 5 months ago (2013-07-10 05:38:31 UTC) #4
arpitab_
On 2013/07/10 05:38:31, eseidel wrote: > This seems reasonable to me. so lgtm. Please give ...
7 years, 5 months ago (2013-07-10 06:06:34 UTC) #5
eseidel
lgtm
7 years, 5 months ago (2013-07-10 06:08:41 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/a.bah@samsung.com/17381003/1
7 years, 5 months ago (2013-07-10 06:09:01 UTC) #7
commit-bot: I haz the power
7 years, 5 months ago (2013-07-10 08:01:34 UTC) #8
Message was sent while issue was closed.
Change committed as 153866

Powered by Google App Engine
This is Rietveld 408576698