Changeset 146867 in webkit
- Timestamp:
- Mar 26, 2013 4:37:33 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r146864 r146867 1 2013-03-26 Arpita Bahuguna <a.bah@samsung.com> 2 3 Unable to insert a paragraph in between some text whose previous sibling is a non-editable block. 4 https://bugs.webkit.org/show_bug.cgi?id=113007 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/inserting/insert-paragraph-between-text-expected.txt: Added. 9 * editing/inserting/insert-paragraph-between-text.html: Added. 10 Added a layout test case for verifying the behavior when trying 11 to insert a line break between an editable text with a non-editable 12 block as it's previous sibling. 13 1 14 2013-03-26 Rijubrata Bhaumik <rijubrata.bhaumik@intel.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r146866 r146867 1 2013-03-26 Arpita Bahuguna <a.bah@samsung.com> 2 3 Unable to insert a paragraph in between some text whose previous sibling is a non-editable block. 4 https://bugs.webkit.org/show_bug.cgi?id=113007 5 6 Reviewed by Ryosuke Niwa. 7 8 Unable to insert a line break in between a text that follows a 9 non-editable block but is itself contained within an editable 10 block. 11 12 While comparing the positions from the start block till the 13 insertion position, we should ignore the nodes that do not 14 generate a visiblePosition for the position before the node. 15 This ultimately results in an assert within comparePositions(). 16 17 For this case, the firstChild of the start block is a text 18 node with no renderer which would thus not generate a candidate 19 position for itself. 20 There is also no candidate previous to it, and since 21 the position after it lies within a different editable element (root), 22 no candidate after it as well. 23 Such a point will thus return a null visiblePosition. 24 25 Test: editing/inserting/insert-paragraph-between-text.html 26 27 * editing/InsertParagraphSeparatorCommand.cpp: 28 (WebCore::InsertParagraphSeparatorCommand::doApply): 29 Added a check to verify the generated visiblePosition (for the 30 position before the node) prior to carrying out a comparison with 31 the insertion point. 32 1 33 2013-03-26 Ilya Tikhonovsky <loislo@chromium.org> 2 34 -
trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
r145444 r146867 373 373 374 374 for (n = startBlock->firstChild(); n; n = n->nextSibling()) { 375 if (comparePositions(VisiblePosition(insertionPosition), positionBeforeNode(n)) <= 0) 375 VisiblePosition beforeNodePosition = positionBeforeNode(n); 376 if (!beforeNodePosition.isNull() && comparePositions(VisiblePosition(insertionPosition), beforeNodePosition) <= 0) 376 377 break; 377 378 }
Note: See TracChangeset
for help on using the changeset viewer.