Title: [190796] branches/safari-601.1.46-branch/Source/WebKit2
- Revision
- 190796
- Author
- matthew_han...@apple.com
- Date
- 2015-10-09 07:22:04 -0700 (Fri, 09 Oct 2015)
Log Message
Merge r190512. rdar://problem/22974818
Modified Paths
Diff
Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (190795 => 190796)
--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog 2015-10-09 14:21:58 UTC (rev 190795)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog 2015-10-09 14:22:04 UTC (rev 190796)
@@ -1,3 +1,34 @@
+2015-10-08 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r190512. rdar://problem/22974818
+
+ 2015-10-02 Enrica Casucci <enr...@apple.com>
+
+ Text selection is inaccurate in Wikipedia pages when starting navigation from wikipedia.org.
+ https://bugs.webkit.org/show_bug.cgi?id=149756
+ rdar://problem/22332409
+
+ Reviewed by Tim Horton.
+
+ When loading a new document into the same WebPage object, we need
+ to clear the assisted node, since there is no guarantee that the
+ node will be blurred. The bug is caused by the use of a stale
+ assisted node to constrain the point where the gesture occurs.
+ A fix for this problem was landed in http://trac.webkit.org/changeset/179885
+ where the cleanup was added when FrameLoaderClient::detach2 was called.
+ This method doesn't seem to be called any longer for the main frame,
+ so the correct solution is to add the cleanup to didCommitLoad in WebPage.
+ I've also added some checks to webSelectionsRects and selectedTextRange to avoid
+ the use of postLayoutData when the selection is none.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView webSelectionRects]):
+ (-[WKContentView selectedTextRange]):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::detachedFromParent2): Removed call to resetAssistedNodeForFrame.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCommitLoad): Added call to resetAssistedNodeForFrame.
+
2015-10-08 Andy Estes <aes...@apple.com>
Merge r188486, r188517, r188531, r188844, r188845, r188851, r188852, r188880, r188881, r188988, r189193, r189289, and r190133.
Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (190795 => 190796)
--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-10-09 14:21:58 UTC (rev 190795)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-10-09 14:22:04 UTC (rev 190796)
@@ -1033,6 +1033,8 @@
- (NSArray *)webSelectionRects
{
+ if (_page->editorState().selectionIsNone)
+ return nil;
const auto& selectionRects = _page->editorState().postLayoutData().selectionRects;
unsigned size = selectionRects.size();
if (!size)
@@ -2305,6 +2307,8 @@
- (UITextRange *)selectedTextRange
{
+ if (_page->editorState().selectionIsNone)
+ return nil;
auto& postLayoutEditorStateData = _page->editorState().postLayoutData();
FloatRect startRect = postLayoutEditorStateData.caretRectAtStart;
FloatRect endRect = postLayoutEditorStateData.caretRectAtEnd;
Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (190795 => 190796)
--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2015-10-09 14:21:58 UTC (rev 190795)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2015-10-09 14:22:04 UTC (rev 190796)
@@ -140,9 +140,6 @@
if (!webPage)
return;
-#if PLATFORM(IOS)
- webPage->resetAssistedNodeForFrame(m_frame);
-#endif
RefPtr<API::Object> userData;
// Notify the bundle client.
Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (190795 => 190796)
--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-10-09 14:21:58 UTC (rev 190795)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-10-09 14:22:04 UTC (rev 190796)
@@ -4618,6 +4618,7 @@
#if PLATFORM(IOS)
frame->setFirstLayerTreeTransactionIDAfterDidCommitLoad(downcast<RemoteLayerTreeDrawingArea>(*m_drawingArea).nextTransactionID());
cancelPotentialTapInFrame(*frame);
+ resetAssistedNodeForFrame(frame);
#endif
if (!frame->isMainFrame())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes