| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 LocalFrame* frame = m_element->document().frame(); | 503 LocalFrame* frame = m_element->document().frame(); |
| 504 if (!frame) | 504 if (!frame) |
| 505 return false; | 505 return false; |
| 506 | 506 |
| 507 // hitTestResultAtPoint() takes a padding rectangle. | 507 // hitTestResultAtPoint() takes a padding rectangle. |
| 508 // FIXME: We'll be off by 1 when the width or height is even. | 508 // FIXME: We'll be off by 1 when the width or height is even. |
| 509 IntRect documentRect(x() + rect.x, y() + rect.y, rect.width, rect.height); | 509 IntRect documentRect(x() + rect.x, y() + rect.y, rect.width, rect.height); |
| 510 LayoutPoint center = documentRect.center(); | 510 LayoutPoint center = documentRect.center(); |
| 511 // Make the rect we're checking (the point surrounded by padding rects) cont
ained inside the requested rect. (Note that -1/2 is 0.) | 511 // Make the rect we're checking (the point surrounded by padding rects) cont
ained inside the requested rect. (Note that -1/2 is 0.) |
| 512 LayoutSize padding((documentRect.width() - 1) / 2, (documentRect.height() -
1) / 2); | 512 LayoutSize padding((documentRect.width() - 1) / 2, (documentRect.height() -
1) / 2); |
| 513 HitTestResult result = frame->eventHandler().hitTestResultAtPoint(center, Hi
tTestRequest::ReadOnly | HitTestRequest::Active, padding); | 513 HitTestResult result = frame->eventHandler().hitTestResultAtPoint(center, Hi
tTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::ListBased, pad
ding); |
| 514 const HitTestResult::NodeSet& nodes = result.rectBasedTestResult(); | 514 const HitTestResult::NodeSet& nodes = result.listBasedTestResult(); |
| 515 if (nodes.size() != 1) | 515 if (nodes.size() != 1) |
| 516 return false; | 516 return false; |
| 517 return nodes.first().get() == m_element; | 517 return nodes.first().get() == m_element; |
| 518 } | 518 } |
| 519 | 519 |
| 520 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request
Type) | 520 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request
Type) |
| 521 { | 521 { |
| 522 if (m_touchEventRequestType == requestType) | 522 if (m_touchEventRequestType == requestType) |
| 523 return; | 523 return; |
| 524 | 524 |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 | 981 |
| 982 return clipRect; | 982 return clipRect; |
| 983 } | 983 } |
| 984 | 984 |
| 985 bool WebPluginContainerImpl::pluginShouldPersist() const | 985 bool WebPluginContainerImpl::pluginShouldPersist() const |
| 986 { | 986 { |
| 987 return m_webPlugin->shouldPersist(); | 987 return m_webPlugin->shouldPersist(); |
| 988 } | 988 } |
| 989 | 989 |
| 990 } // namespace blink | 990 } // namespace blink |
| OLD | NEW |