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

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

Issue 2807433003: No pointer captured when the pointer lock is applied (Closed)
Patch Set: pointer lock Created 3 years, 8 months 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 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 } 2240 }
2241 2241
2242 void WebViewImpl::setCursorVisibilityState(bool isVisible) { 2242 void WebViewImpl::setCursorVisibilityState(bool isVisible) {
2243 if (m_page) 2243 if (m_page)
2244 m_page->setIsCursorVisible(isVisible); 2244 m_page->setIsCursorVisible(isVisible);
2245 } 2245 }
2246 2246
2247 void WebViewImpl::mouseCaptureLost() { 2247 void WebViewImpl::mouseCaptureLost() {
2248 TRACE_EVENT_ASYNC_END0("input", "capturing mouse", this); 2248 TRACE_EVENT_ASYNC_END0("input", "capturing mouse", this);
2249 m_mouseCaptureNode = nullptr; 2249 m_mouseCaptureNode = nullptr;
2250 LocalFrame* focusedFrame = focusedLocalFrameInWidget();
Navid Zolghadr 2017/04/10 17:16:14 Please make sure scheib@ knows about this change i
2251 if (focusedFrame)
2252 focusedFrame->eventHandler().releasePointerCapture();
2250 } 2253 }
2251 2254
2252 void WebViewImpl::setFocus(bool enable) { 2255 void WebViewImpl::setFocus(bool enable) {
2253 m_page->focusController().setFocused(enable); 2256 m_page->focusController().setFocused(enable);
2254 if (enable) { 2257 if (enable) {
2255 m_page->focusController().setActive(true); 2258 m_page->focusController().setActive(true);
2256 LocalFrame* focusedFrame = m_page->focusController().focusedFrame(); 2259 LocalFrame* focusedFrame = m_page->focusController().focusedFrame();
2257 if (focusedFrame) { 2260 if (focusedFrame) {
2258 Element* element = focusedFrame->document()->focusedElement(); 2261 Element* element = focusedFrame->document()->focusedElement();
2259 if (element && 2262 if (element &&
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
4178 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4181 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4179 return nullptr; 4182 return nullptr;
4180 return focusedFrame; 4183 return focusedFrame;
4181 } 4184 }
4182 4185
4183 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4186 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4184 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4187 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4185 } 4188 }
4186 4189
4187 } // namespace blink 4190 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698