Changeset 98408 in webkit
- Timestamp:
- Oct 25, 2011, 4:17:59 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/selection/table-lineboundary-expected.txt (added)
-
LayoutTests/editing/selection/table-lineboundary.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/editing/visible_units.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r98407 r98408 1 2011-10-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 Moving to the start of line should not place the caret outside of the table 4 https://bugs.webkit.org/show_bug.cgi?id=70757 5 6 Reviewed by Chang Shu. 7 8 Added a test to move the caret to lineboundaries in the first and the last table cell. 9 The caret should remain inside a table cell. 10 11 * editing/selection/table-lineboundary-expected.txt: Added. 12 * editing/selection/table-lineboundary.html: Added. 13 1 14 2011-10-25 Erik Arvidsson <arv@chromium.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r98406 r98408 1 2011-10-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 Moving to the start of line should not place the caret outside of the table 4 https://bugs.webkit.org/show_bug.cgi?id=70757 5 6 Reviewed by Chang Shu. 7 8 The bug was caused by positionAvoidingFirstPositionInTable. Get rid of the function. 9 10 Test: editing/selection/table-lineboundary.html 11 12 * editing/visible_units.cpp: 13 (WebCore::startPositionForLine): 14 1 15 2011-10-25 Beth Dakin <bdakin@apple.com> 2 16 -
trunk/Source/WebCore/editing/visible_units.cpp
r98358 r98408 319 319 // --------- 320 320 321 static VisiblePosition positionAvoidingFirstPositionInTable(const VisiblePosition& c)322 {323 // return table offset 0 instead of the first VisiblePosition inside the table324 VisiblePosition previous = c.previous();325 if (isLastPositionBeforeTable(previous) && isEditablePosition(previous.deepEquivalent()))326 return previous;327 328 return c;329 }330 331 332 321 enum LineEndpointComputationMode { UseLogicalOrdering, UseInlineBoxOrdering }; 333 322 static VisiblePosition startPositionForLine(const VisiblePosition& c, LineEndpointComputationMode mode) … … 342 331 Position p = c.deepEquivalent(); 343 332 if (p.deprecatedNode()->renderer() && p.deprecatedNode()->renderer()->isRenderBlock() && !p.deprecatedEditingOffset()) 344 return positionAvoidingFirstPositionInTable(c);345 333 return c; 334 346 335 return VisiblePosition(); 347 336 } … … 373 362 } 374 363 375 if (startNode->isTextNode()) 376 return positionAvoidingFirstPositionInTable(Position(static_cast<Text*>(startNode), toInlineTextBox(startBox)->start())); 377 return positionAvoidingFirstPositionInTable(positionBeforeNode(startNode)); 364 return startNode->isTextNode() ? Position(static_cast<Text*>(startNode), toInlineTextBox(startBox)->start()) 365 : positionBeforeNode(startNode); 378 366 } 379 367
Note:
See TracChangeset
for help on using the changeset viewer.