| 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 ASSERT(!m_selectPopup); | 494 ASSERT(!m_selectPopup); |
| 495 ASSERT(!m_pagePopup); | 495 ASSERT(!m_pagePopup); |
| 496 } | 496 } |
| 497 | 497 |
| 498 m_lastMouseDownPoint = WebPoint(event.x, event.y); | 498 m_lastMouseDownPoint = WebPoint(event.x, event.y); |
| 499 | 499 |
| 500 // Take capture on a mouse down on a plugin so we can send it mouse events. | 500 // Take capture on a mouse down on a plugin so we can send it mouse events. |
| 501 // If the hit node is a plugin but a scrollbar is over it don't start mouse | 501 // If the hit node is a plugin but a scrollbar is over it don't start mouse |
| 502 // capture because it will interfere with the scrollbar receiving events. | 502 // capture because it will interfere with the scrollbar receiving events. |
| 503 IntPoint point(event.x, event.y); | 503 IntPoint point(event.x, event.y); |
| 504 if (event.button == WebMouseEvent::ButtonLeft && m_page->mainFrame()->isLoca
lFrame() && !m_page->deprecatedLocalMainFrame()->view()->scrollbarAtPoint(point)
) { | 504 if (event.button == WebMouseEvent::ButtonLeft && m_page->mainFrame()->isLoca
lFrame()) { |
| 505 point = m_page->deprecatedLocalMainFrame()->view()->windowToContents(poi
nt); | 505 point = m_page->deprecatedLocalMainFrame()->view()->windowToContents(poi
nt); |
| 506 HitTestResult result(m_page->deprecatedLocalMainFrame()->eventHandler().
hitTestResultAtPoint(point)); | 506 HitTestResult result(m_page->deprecatedLocalMainFrame()->eventHandler().
hitTestResultAtPoint(point)); |
| 507 result.setToShadowHostIfInUserAgentShadowRoot(); | 507 result.setToShadowHostIfInUserAgentShadowRoot(); |
| 508 Node* hitNode = result.innerNonSharedNode(); | 508 Node* hitNode = result.innerNonSharedNode(); |
| 509 | 509 |
| 510 if (!result.scrollbar() && hitNode && hitNode->renderer() && hitNode->re
nderer()->isEmbeddedObject()) { | 510 if (!result.scrollbar() && hitNode && hitNode->renderer() && hitNode->re
nderer()->isEmbeddedObject()) { |
| 511 m_mouseCaptureNode = hitNode; | 511 m_mouseCaptureNode = hitNode; |
| 512 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this); | 512 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this); |
| 513 } | 513 } |
| 514 } | 514 } |
| (...skipping 3778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4293 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4293 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4294 | 4294 |
| 4295 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4295 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4296 return false; | 4296 return false; |
| 4297 | 4297 |
| 4298 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4298 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4299 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4299 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4300 } | 4300 } |
| 4301 | 4301 |
| 4302 } // namespace blink | 4302 } // namespace blink |
| OLD | NEW |