Changeset 146090 in webkit
- Timestamp:
- Mar 18, 2013 11:29:42 AM (11 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/ChangeLog
r146061 r146090 1 2013-03-18 Alberto Garcia <agarcia@igalia.com> 2 3 [BlackBerry] Add Proximity Detector. 4 https://bugs.webkit.org/show_bug.cgi?id=112278 5 6 Reviewed by Rob Buis. 7 8 Fix variable names so they actually match the function 9 declarations. 10 11 Fix call to rectForPoint(), which was moved from HitTestResult to 12 HitTestLocation in r117091 and r126859. 13 14 * WebKitSupport/ProximityDetector.cpp: 15 (BlackBerry::WebKit::ProximityDetector::findBestPoint): 16 1 17 2013-03-18 Alberto Garcia <agarcia@igalia.com> 2 18 -
trunk/Source/WebKit/blackberry/WebKitSupport/ProximityDetector.cpp
r145757 r146090 60 60 61 61 if (!m_webPage->m_mainFrame) 62 return contentPos;62 return documentPos; 63 63 64 64 Document* document = m_webPage->m_mainFrame->document(); 65 65 66 66 if (!document || !document->frame()->view()) 67 return contentPos;67 return documentPos; 68 68 69 unsigned left = - paddingRect.x();70 unsigned top = - paddingRect.y();71 unsigned right = paddingRect.maxX();72 unsigned bottom = paddingRect.maxY();69 unsigned left = -documentPaddingRect.x(); 70 unsigned top = -documentPaddingRect.y(); 71 unsigned right = documentPaddingRect.maxX(); 72 unsigned bottom = documentPaddingRect.maxY(); 73 73 74 74 // Adjust hit point to frame 75 IntPoint frameContentPos(document->frame()->view()->windowToContents(m_webPage->m_mainFrame->view()->contentsToWindow( contentPos)));75 IntPoint frameContentPos(document->frame()->view()->windowToContents(m_webPage->m_mainFrame->view()->contentsToWindow(documentPos))); 76 76 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping); 77 77 HitTestResult result(frameContentPos, top, right, bottom, left); 78 78 document->renderView()->layer()->hitTest(request, result); 79 79 80 IntPoint bestPoint = contentPos;80 IntPoint bestPoint = documentPos; 81 81 int bestPriority = 0; 82 82 … … 92 92 93 93 IntRect curRect = curNode->renderer()->absoluteBoundingBoxRect(true /*use transforms*/); 94 IntRect hitTestRect = HitTest Result::rectForPoint(contentPos, top, right, bottom, left);94 IntRect hitTestRect = HitTestLocation::rectForPoint(documentPos, top, right, bottom, left); 95 95 96 96 // Check that top corner does not exceed padding … … 102 102 continue; 103 103 104 bool equalPriorityAndCloser = (priority == bestPriority) && ( contentPos.distanceSquaredToPoint(bestPoint) > contentPos.distanceSquaredToPoint(curRect.location()));104 bool equalPriorityAndCloser = (priority == bestPriority) && (documentPos.distanceSquaredToPoint(bestPoint) > documentPos.distanceSquaredToPoint(curRect.location())); 105 105 if (priority > bestPriority || equalPriorityAndCloser) { 106 106 bestPoint = curRect.location(); // use top left
Note: See TracChangeset
for help on using the changeset viewer.