⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245231 in webkit


Ignore:
Timestamp:
May 12, 2019, 11:51:22 PM (7 years ago)
Author:
bshafiei@apple.com
Message:

Cherry-pick r245195. rdar://problem/46548586

Returning incorrect marked text rects
https://bugs.webkit.org/show_bug.cgi?id=197758
<rdar://problem/46548586>

Reviewed by Tim Horton.

We are not returning marked text rects in the correct view coordinate space.
This is the same translation we are applying to the caret rects.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::platformEditorState const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245195 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-608.1.24-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-608.1.24-branch/Source/WebKit/ChangeLog

    r245229 r245231  
     12019-05-12  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Cherry-pick r245195. rdar://problem/46548586
     4
     5    Returning incorrect marked text rects
     6    https://bugs.webkit.org/show_bug.cgi?id=197758
     7    <rdar://problem/46548586>
     8   
     9    Reviewed by Tim Horton.
     10   
     11    We are not returning marked text rects in the correct view coordinate space.
     12    This is the same translation we are applying to the caret rects.
     13   
     14    * WebProcess/WebPage/ios/WebPageIOS.mm:
     15    (WebKit::WebPage::platformEditorState const):
     16   
     17   
     18    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     19
     20    2019-05-10  Megan Gardner  <megan_gardner@apple.com>
     21
     22            Returning incorrect marked text rects
     23            https://bugs.webkit.org/show_bug.cgi?id=197758
     24            <rdar://problem/46548586>
     25
     26            Reviewed by Tim Horton.
     27
     28            We are not returning marked text rects in the correct view coordinate space.
     29            This is the same translation we are applying to the caret rects.
     30
     31            * WebProcess/WebPage/ios/WebPageIOS.mm:
     32            (WebKit::WebPage::platformEditorState const):
     33
    1342019-05-12  Babak Shafiei  <bshafiei@apple.com>
    235
  • branches/safari-608.1.24-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r245079 r245231  
    194194void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePostLayoutDataHint shouldIncludePostLayoutData) const
    195195{
     196    FrameView* view = frame.view();
    196197    if (frame.editor().hasComposition()) {
    197198        RefPtr<Range> compositionRange = frame.editor().compositionRange();
     
    200201            compositionRange->collectSelectionRects(compositionRects);
    201202            if (compositionRects.size())
    202                 result.firstMarkedRect = compositionRects[0].rect();
     203                result.firstMarkedRect = view->contentsToRootView(compositionRects[0].rect());
    203204            if (compositionRects.size() > 1)
    204                 result.lastMarkedRect = compositionRects.last().rect();
     205                result.lastMarkedRect = view->contentsToRootView(compositionRects.last().rect());
    205206            else
    206207                result.lastMarkedRect = result.firstMarkedRect;
     
    224225
    225226    auto& postLayoutData = result.postLayoutData();
    226     FrameView* view = frame.view();
     227   
    227228    const VisibleSelection& selection = frame.selection().selection();
    228229    postLayoutData.isStableStateUpdate = m_isInStableState;
Note: See TracChangeset for help on using the changeset viewer.