WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144603
[iOS WK2] editorState should include information about selection clipping rectangle
https://bugs.webkit.org/show_bug.cgi?id=144603
Summary
[iOS WK2] editorState should include information about selection clipping rec...
Enrica Casucci
Reported
2015-05-04 15:57:26 PDT
We currently provide the element rect only when the element is first focused and we use that to clip the selection before drawing. If the element is resized/repositioned via Javascript or CSS, we continue to use the clipping rectangle at the time the element was focused. Pages like google.com or imdb.com show the incorrect clipping of the caret.
rdar://problem/20521252
Attachments
Patch
(4.26 KB, patch)
2015-05-04 16:03 PDT
,
Enrica Casucci
cdumez
: review+
cdumez
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Enrica Casucci
Comment 1
2015-05-04 16:03:05 PDT
Created
attachment 252345
[details]
Patch
Chris Dumez
Comment 2
2015-05-04 16:05:18 PDT
Did you try a debug build or turning the assertions in postLayoutData() into RELEASE_ASSERTs?
Chris Dumez
Comment 3
2015-05-04 16:23:34 PDT
Comment on
attachment 252345
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=252345&action=review
r=me with nits.
> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:190 > + Frame& elementFrame = m_page->focusController().focusedOrMainFrame();
I believe this is equivalent to the frame argument of this method. It is initialized in WebPage::editorState() as: Frame& frame = m_page->focusController().focusedOrMainFrame(); So this variable is not needed.
> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:191 > + postLayoutData.selectionClipRect = elementFrame.view()->contentsToRootView(m_assistedNode->renderer()->absoluteBoundingBoxRect());
postLayoutData.selectionClipRect = view->contentsToRootView(m_assistedNode->renderer()->absoluteBoundingBoxRect()); We already have a variable of the view.
Enrica Casucci
Comment 4
2015-05-04 16:50:40 PDT
(In reply to
comment #3
)
> Comment on
attachment 252345
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=252345&action=review
> > r=me with nits. > > > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:190 > > + Frame& elementFrame = m_page->focusController().focusedOrMainFrame(); > > I believe this is equivalent to the frame argument of this method. It is > initialized in WebPage::editorState() as: > Frame& frame = m_page->focusController().focusedOrMainFrame(); > > So this variable is not needed. > > > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:191 > > + postLayoutData.selectionClipRect = elementFrame.view()->contentsToRootView(m_assistedNode->renderer()->absoluteBoundingBoxRect()); > > postLayoutData.selectionClipRect = > view->contentsToRootView(m_assistedNode->renderer()- > >absoluteBoundingBoxRect()); > > We already have a variable of the view.
Duh! This is what you get for copy/paste. Thanks for the review. I've fixed it.
Enrica Casucci
Comment 5
2015-05-04 16:52:57 PDT
Committed revision 183780.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug