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

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

Issue 2151933003: Change WTF::TemporaryChange to be an alias for AutoReset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TemporaryChange -> AutoReset Created 4 years, 5 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "public/web/WebWidgetClient.h" 54 #include "public/web/WebWidgetClient.h"
55 #include "web/CompositorMutatorImpl.h" 55 #include "web/CompositorMutatorImpl.h"
56 #include "web/CompositorProxyClientImpl.h" 56 #include "web/CompositorProxyClientImpl.h"
57 #include "web/ContextMenuAllowedScope.h" 57 #include "web/ContextMenuAllowedScope.h"
58 #include "web/WebDevToolsAgentImpl.h" 58 #include "web/WebDevToolsAgentImpl.h"
59 #include "web/WebInputEventConversion.h" 59 #include "web/WebInputEventConversion.h"
60 #include "web/WebLocalFrameImpl.h" 60 #include "web/WebLocalFrameImpl.h"
61 #include "web/WebPluginContainerImpl.h" 61 #include "web/WebPluginContainerImpl.h"
62 #include "web/WebRemoteFrameImpl.h" 62 #include "web/WebRemoteFrameImpl.h"
63 #include "web/WebViewFrameWidget.h" 63 #include "web/WebViewFrameWidget.h"
64 #include "wtf/AutoReset.h"
64 #include "wtf/PtrUtil.h" 65 #include "wtf/PtrUtil.h"
65 #include <memory> 66 #include <memory>
66 67
67 namespace blink { 68 namespace blink {
68 69
69 // WebFrameWidget -------------------------------------------------------------- -- 70 // WebFrameWidget -------------------------------------------------------------- --
70 71
71 WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client, WebLocalFrame* l ocalRoot) 72 WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client, WebLocalFrame* l ocalRoot)
72 { 73 {
73 // Pass the WebFrameWidget's self-reference to the caller. 74 // Pass the WebFrameWidget's self-reference to the caller.
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // Don't handle events once we've started shutting down. 329 // Don't handle events once we've started shutting down.
329 if (!page()) 330 if (!page())
330 return WebInputEventResult::NotHandled; 331 return WebInputEventResult::NotHandled;
331 332
332 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. 333 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately.
333 if (m_ignoreInputEvents) 334 if (m_ignoreInputEvents)
334 return WebInputEventResult::NotHandled; 335 return WebInputEventResult::NotHandled;
335 336
336 // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available. 337 // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available.
337 338
338 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent); 339 AutoReset<const WebInputEvent*> currentEventChange(&m_currentInputEvent, &in putEvent);
339 340
340 if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) { 341 if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) {
341 TRACE_EVENT1("input", "captured mouse event", "type", inputEvent.type); 342 TRACE_EVENT1("input", "captured mouse event", "type", inputEvent.type);
342 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. 343 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it.
343 Node* node = m_mouseCaptureNode; 344 Node* node = m_mouseCaptureNode;
344 345
345 // Not all platforms call mouseCaptureLost() directly. 346 // Not all platforms call mouseCaptureLost() directly.
346 if (inputEvent.type == WebInputEvent::MouseUp) 347 if (inputEvent.type == WebInputEvent::MouseUp)
347 mouseCaptureLost(); 348 mouseCaptureLost();
348 349
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1119
1119 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1120 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1120 { 1121 {
1121 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1122 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1122 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1123 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1123 result.setToShadowHostIfInUserAgentShadowRoot(); 1124 result.setToShadowHostIfInUserAgentShadowRoot();
1124 return result; 1125 return result;
1125 } 1126 }
1126 1127
1127 } // namespace blink 1128 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698