Changeset 84678 in webkit


Ignore:
Timestamp:
Apr 22, 2011 2:05:15 PM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-04-22 Levi Weintraub <leviw@chromium.org>

Reviewed by Ryosuke Niwa.

End/Home keys do not work in a contentEditable element
https://bugs.webkit.org/show_bug.cgi?id=50564

Fixing modifying selection by lineboundary (home/end) for editable contexts that are
inline and share a line with non-editable content.

  • editing/selection/modify-by-lineboundary-in-inline-editable-contexts-expected.txt: Added.
  • editing/selection/modify-by-lineboundary-in-inline-editable-contexts.html: Added.
  • editing/selection/script-tests/modify-by-lineboundary-in-inline-editable-contexts.js: Added. (testModifyByLine):

2011-04-22 Levi Weintraub <leviw@chromium.org>

Reviewed by Ryosuke Niwa.

End/Home keys do not work in a contentEditable element
https://bugs.webkit.org/show_bug.cgi?id=50564

Changing logical[Start/End]OfLine to return a valid VisiblePosition for for editable contexts that are
inline and share a line with non-editable content.

Test: editing/selection/modify-by-lineboundary-in-inline-editable-contexts.html

  • editing/visible_units.cpp: (WebCore::logicalStartOfLine): (WebCore::logicalEndOfLine):
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84677 r84678  
     12011-04-22  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        End/Home keys do not work in a contentEditable element
     6        https://bugs.webkit.org/show_bug.cgi?id=50564
     7
     8        Fixing modifying selection by lineboundary (home/end) for editable contexts that are
     9        inline and share a line with non-editable content.
     10
     11        * editing/selection/modify-by-lineboundary-in-inline-editable-contexts-expected.txt: Added.
     12        * editing/selection/modify-by-lineboundary-in-inline-editable-contexts.html: Added.
     13        * editing/selection/script-tests/modify-by-lineboundary-in-inline-editable-contexts.js: Added.
     14        (testModifyByLine):
     15
    1162011-04-22  Dimitri Glazkov  <dglazkov@chromium.org>
    217
  • trunk/Source/WebCore/ChangeLog

    r84672 r84678  
     12011-04-22  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Ryosuke Niwa.
     4
     5        End/Home keys do not work in a contentEditable element
     6        https://bugs.webkit.org/show_bug.cgi?id=50564
     7
     8        Changing logical[Start/End]OfLine to return a valid VisiblePosition for for editable contexts that are
     9        inline and share a line with non-editable content.
     10
     11        Test: editing/selection/modify-by-lineboundary-in-inline-editable-contexts.html
     12
     13        * editing/visible_units.cpp:
     14        (WebCore::logicalStartOfLine):
     15        (WebCore::logicalEndOfLine):
     16
    1172011-04-22  Dimitri Glazkov  <dglazkov@chromium.org>
    218
  • trunk/Source/WebCore/editing/visible_units.cpp

    r84425 r84678  
    10751075    // Please refer to https://bugs.webkit.org/show_bug.cgi?id=49107 for detail.
    10761076    VisiblePosition visPos = logicalStartPositionForLine(c);
    1077    
     1077
     1078    if (Node* editableRoot = highestEditableRoot(c.deepEquivalent())) {
     1079        if (!editableRoot->contains(visPos.deepEquivalent().containerNode()))
     1080            return firstPositionInNode(editableRoot);
     1081    }
    10781082    return c.honorEditableBoundaryAtOrBefore(visPos);
    10791083}
     
    11341138    if (!inSameLogicalLine(c, visPos))
    11351139        visPos = visPos.previous();
    1136    
     1140
     1141    if (Node* editableRoot = highestEditableRoot(c.deepEquivalent())) {
     1142        if (!editableRoot->contains(visPos.deepEquivalent().containerNode()))
     1143            return lastPositionInNode(editableRoot);
     1144    }
    11371145    return c.honorEditableBoundaryAtOrAfter(visPos);
    11381146}
Note: See TracChangeset for help on using the changeset viewer.