| 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 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2189 if (overlay->handleInputEvent(inputEvent)) | 2189 if (overlay->handleInputEvent(inputEvent)) |
| 2190 return WebInputEventResult::HandledSuppressed; | 2190 return WebInputEventResult::HandledSuppressed; |
| 2191 } | 2191 } |
| 2192 | 2192 |
| 2193 if (inputEvent.modifiers & WebInputEvent::IsTouchAccessibility | 2193 if (inputEvent.modifiers & WebInputEvent::IsTouchAccessibility |
| 2194 && WebInputEvent::isMouseEventType(inputEvent.type)) { | 2194 && WebInputEvent::isMouseEventType(inputEvent.type)) { |
| 2195 PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), static_cast<
const WebMouseEvent&>(inputEvent)); | 2195 PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), static_cast<
const WebMouseEvent&>(inputEvent)); |
| 2196 | 2196 |
| 2197 // Find the right target frame. See issue 1186900. | 2197 // Find the right target frame. See issue 1186900. |
| 2198 HitTestResult result = hitTestResultForRootFramePos(pme.position()); | 2198 HitTestResult result = hitTestResultForRootFramePos(pme.position()); |
| 2199 Frame* targetFrame; | 2199 if (result.innerNodeFrame()) { |
| 2200 if (result.innerNodeOrImageMapImage()) | 2200 Document* document = result.innerNodeFrame()->document(); |
| 2201 targetFrame = result.innerNodeOrImageMapImage()->document().frame(); | |
| 2202 else | |
| 2203 targetFrame = m_page->focusController().focusedOrMainFrame(); | |
| 2204 | |
| 2205 if (targetFrame->isLocalFrame()) { | |
| 2206 LocalFrame* targetLocalFrame = toLocalFrame(targetFrame); | |
| 2207 Document* document = targetLocalFrame->document(); | |
| 2208 if (document) { | 2201 if (document) { |
| 2209 AXObjectCache* cache = document->existingAXObjectCache(); | 2202 AXObjectCache* cache = document->existingAXObjectCache(); |
| 2210 if (cache) | 2203 if (cache) |
| 2211 cache->onTouchAccessibilityHover(pme.position()); | 2204 cache->onTouchAccessibilityHover(result.roundedPointInInnerN
odeFrame()); |
| 2212 } | 2205 } |
| 2213 } | 2206 } |
| 2214 } | 2207 } |
| 2215 | 2208 |
| 2216 // Report the event to be NOT processed by WebKit, so that the browser can h
andle it appropriately. | 2209 // Report the event to be NOT processed by WebKit, so that the browser can h
andle it appropriately. |
| 2217 if (m_ignoreInputEvents) | 2210 if (m_ignoreInputEvents) |
| 2218 return WebInputEventResult::NotHandled; | 2211 return WebInputEventResult::NotHandled; |
| 2219 | 2212 |
| 2220 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent
, &inputEvent); | 2213 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent
, &inputEvent); |
| 2221 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld(); | 2214 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld(); |
| (...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4597 { | 4590 { |
| 4598 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4591 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4599 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4592 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4600 if (!page()) | 4593 if (!page()) |
| 4601 return 1; | 4594 return 1; |
| 4602 | 4595 |
| 4603 return page()->deviceScaleFactor(); | 4596 return page()->deviceScaleFactor(); |
| 4604 } | 4597 } |
| 4605 | 4598 |
| 4606 } // namespace blink | 4599 } // namespace blink |
| OLD | NEW |