Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1536493002: Working proof of concept of select to speak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drag across multiple objects Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 Frame* targetFrame; 2168 Frame* targetFrame;
2169 if (result.innerNodeOrImageMapImage()) 2169 if (result.innerNodeOrImageMapImage())
2170 targetFrame = result.innerNodeOrImageMapImage()->document().frame(); 2170 targetFrame = result.innerNodeOrImageMapImage()->document().frame();
2171 else 2171 else
2172 targetFrame = m_page->focusController().focusedOrMainFrame(); 2172 targetFrame = m_page->focusController().focusedOrMainFrame();
2173 2173
2174 if (targetFrame->isLocalFrame()) { 2174 if (targetFrame->isLocalFrame()) {
2175 LocalFrame* targetLocalFrame = toLocalFrame(targetFrame); 2175 LocalFrame* targetLocalFrame = toLocalFrame(targetFrame);
2176 Document* document = targetLocalFrame->document(); 2176 Document* document = targetLocalFrame->document();
2177 if (document) { 2177 if (document) {
2178 IntPoint docPoint(m_page->deprecatedLocalMainFrame()->view()->ro otFrameToContents(pme.position()));
2179
2178 AXObjectCache* cache = document->existingAXObjectCache(); 2180 AXObjectCache* cache = document->existingAXObjectCache();
2179 if (cache) 2181 if (cache) {
2180 cache->onTouchAccessibilityHover(pme.position()); 2182 switch (inputEvent.type) {
2183 case WebInputEvent::MouseDown:
2184 cache->onAccessibilityMouseDown(docPoint);
2185 break;
2186 case WebInputEvent::MouseUp:
2187 cache->onAccessibilityMouseUp(docPoint);
2188 break;
2189 case WebInputEvent::MouseMove:
2190 cache->onAccessibilityMouseMove(docPoint);
2191 break;
2192 case WebInputEvent::MouseEnter:
2193 cache->onAccessibilityMouseEnter(docPoint);
2194 break;
2195 case WebInputEvent::MouseLeave:
2196 cache->onAccessibilityMouseLeave(docPoint);
2197 break;
2198 default:
2199 break;
2200 }
2201 }
2181 } 2202 }
2182 } 2203 }
2204
2205 return WebInputEventResult::HandledSuppressed;
2183 } 2206 }
2184 2207
2185 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. 2208 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately.
2186 if (m_ignoreInputEvents) 2209 if (m_ignoreInputEvents)
2187 return WebInputEventResult::NotHandled; 2210 return WebInputEventResult::NotHandled;
2188 2211
2189 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent); 2212 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent);
2190 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld(); 2213 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld();
2191 2214
2192 if (isPointerLocked() && WebInputEvent::isMouseEventType(inputEvent.type)) { 2215 if (isPointerLocked() && WebInputEvent::isMouseEventType(inputEvent.type)) {
(...skipping 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after
4615 void WebViewImpl::detachPaintArtifactCompositor() 4638 void WebViewImpl::detachPaintArtifactCompositor()
4616 { 4639 {
4617 if (!m_layerTreeView) 4640 if (!m_layerTreeView)
4618 return; 4641 return;
4619 4642
4620 m_layerTreeView->setDeferCommits(true); 4643 m_layerTreeView->setDeferCommits(true);
4621 m_layerTreeView->clearRootLayer(); 4644 m_layerTreeView->clearRootLayer();
4622 } 4645 }
4623 4646
4624 } // namespace blink 4647 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/AssertMatchingEnums.cpp ('k') | third_party/WebKit/public/web/WebAXEnums.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698