Changeset 179885 in webkit
- Timestamp:
- Feb 10, 2015 3:02:22 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r179874 r179885 1 2015-02-10 Enrica Casucci <enrica@apple.com> 2 3 Hit testing is misplaced when selecting on wikipedia page. 4 https://bugs.webkit.org/show_bug.cgi?id=141410 5 rdar://problem/19768211 6 7 Reviewed by Simon Fraser. 8 9 When loading a new document into the same WebPage object, we need 10 to clear the assisted node, since there is no guarantee that the 11 node will be blurred. The bug was caused by the use of a stale 12 assisted node to constrain the point where the gesture occurs. 13 The node was still valid, since the previous page was in the cache. 14 I've added a ASSERT to check that, when constraining the point to 15 node rectangle, the node is in the same document as the one we 16 are performing hit test on. When the frame is detached, we clear 17 the assisted node if the node is part of the document is the frame 18 being detached. 19 20 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 21 (WebKit::WebFrameLoaderClient::detachedFromParent2): 22 * WebProcess/WebPage/WebPage.h: 23 * WebProcess/WebPage/ios/WebPageIOS.mm: 24 (WebKit::constrainPoint): 25 (WebKit::WebPage::resetAssistedNodeForFrame): 26 1 27 2015-02-10 Joseph Pecoraro <pecoraro@apple.com> 2 28 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r179409 r179885 143 143 return; 144 144 145 #if PLATFORM(IOS) 146 webPage->resetAssistedNodeForFrame(m_frame); 147 #endif 145 148 RefPtr<API::Object> userData; 146 149 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r178980 r179885 517 517 void setAssistedNodeValueAsNumber(double); 518 518 void setAssistedNodeSelectedIndex(uint32_t index, bool allowMultipleSelection); 519 void resetAssistedNodeForFrame(WebFrame*); 519 520 WebCore::IntRect rectForElementAtInteractionLocation(); 520 521 void updateSelectionAppearance(); -
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm
r179847 r179885 696 696 static IntPoint constrainPoint(const IntPoint& point, Frame* frame, Node* assistedNode) 697 697 { 698 ASSERT(!assistedNode || &assistedNode->document() == frame->document()); 698 699 const int DEFAULT_CONSTRAIN_INSET = 2; 699 700 IntRect innerFrame = innerFrameQuad(frame, assistedNode).enclosingBoundingBox(); … … 2265 2266 } 2266 2267 2268 void WebPage::resetAssistedNodeForFrame(WebFrame* frame) 2269 { 2270 if (!m_assistedNode) 2271 return; 2272 if (m_assistedNode->document().frame() == frame->coreFrame()) { 2273 send(Messages::WebPageProxy::StopAssistingNode()); 2274 m_assistedNode = nullptr; 2275 } 2276 } 2277 2267 2278 void WebPage::elementDidFocus(WebCore::Node* node) 2268 2279 {
Note: See TracChangeset
for help on using the changeset viewer.