OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 4048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4059 HitTestResult WebViewImpl::hitTestResultForWindowPos(const IntPoint& pos) | 4059 HitTestResult WebViewImpl::hitTestResultForWindowPos(const IntPoint& pos) |
4060 { | 4060 { |
4061 if (!m_page->mainFrame()->isLocalFrame()) | 4061 if (!m_page->mainFrame()->isLocalFrame()) |
4062 return HitTestResult(); | 4062 return HitTestResult(); |
4063 IntPoint docPoint(m_page->deprecatedLocalMainFrame()->view()->windowToConten ts(pos)); | 4063 IntPoint docPoint(m_page->deprecatedLocalMainFrame()->view()->windowToConten ts(pos)); |
4064 HitTestResult result = m_page->deprecatedLocalMainFrame()->eventHandler().hi tTestResultAtPoint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); | 4064 HitTestResult result = m_page->deprecatedLocalMainFrame()->eventHandler().hi tTestResultAtPoint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
4065 result.setToShadowHostIfInUserAgentShadowRoot(); | 4065 result.setToShadowHostIfInUserAgentShadowRoot(); |
4066 return result; | 4066 return result; |
4067 } | 4067 } |
4068 | 4068 |
4069 WebHitTestResult WebViewImpl::hitTestResultForTap(const WebPoint& tapPointWindow Pos, const WebSize& tapArea) | |
4070 { | |
4071 // EventHandler does not care about the global position. | |
hush (inactive)
2014/10/28 22:52:25
What should be the correct global position here fo
Rick Byers
2014/11/04 06:09:19
In the general tap case, the screen position can b
hush (inactive)
2014/11/04 22:42:39
Done
| |
4072 PlatformGestureEvent gestureEvent(PlatformEvent::GestureTap, IntPoint(tapPoi ntWindowPos), IntPoint(tapPointWindowPos), IntSize(tapArea), 0, false, false, fa lse, false, 0, 0, 0, 0); | |
4073 if (!m_page->mainFrame()->isLocalFrame()) | |
4074 return HitTestResult(); | |
4075 HitTestResult result = m_page->deprecatedLocalMainFrame()->eventHandler().hi tTestResultForGestureEvent(gestureEvent, HitTestRequest::ReadOnly | HitTestReque st::Active).hitTestResult(); | |
4076 | |
4077 result.setToShadowHostIfInUserAgentShadowRoot(); | |
hush (inactive)
2014/10/28 22:52:25
Not sure about what this line does, but hitTestRes
Rick Byers
2014/11/04 06:09:19
You do want this. It means, for example, that if
| |
4078 return result; | |
4079 } | |
4080 | |
4069 void WebViewImpl::setTabsToLinks(bool enable) | 4081 void WebViewImpl::setTabsToLinks(bool enable) |
4070 { | 4082 { |
4071 m_tabsToLinks = enable; | 4083 m_tabsToLinks = enable; |
4072 } | 4084 } |
4073 | 4085 |
4074 bool WebViewImpl::tabsToLinks() const | 4086 bool WebViewImpl::tabsToLinks() const |
4075 { | 4087 { |
4076 return m_tabsToLinks; | 4088 return m_tabsToLinks; |
4077 } | 4089 } |
4078 | 4090 |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4473 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4485 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
4474 | 4486 |
4475 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4487 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4476 return false; | 4488 return false; |
4477 | 4489 |
4478 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4490 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4479 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4491 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4480 } | 4492 } |
4481 | 4493 |
4482 } // namespace blink | 4494 } // namespace blink |
OLD | NEW |