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

Side by Side Diff: third_party/WebKit/Source/web/InspectorOverlay.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "platform/graphics/GraphicsContext.h" 51 #include "platform/graphics/GraphicsContext.h"
52 #include "platform/graphics/paint/CullRect.h" 52 #include "platform/graphics/paint/CullRect.h"
53 #include "platform/inspector_protocol/Values.h" 53 #include "platform/inspector_protocol/Values.h"
54 #include "platform/v8_inspector/public/V8InspectorSession.h" 54 #include "platform/v8_inspector/public/V8InspectorSession.h"
55 #include "public/platform/Platform.h" 55 #include "public/platform/Platform.h"
56 #include "public/platform/WebData.h" 56 #include "public/platform/WebData.h"
57 #include "web/PageOverlay.h" 57 #include "web/PageOverlay.h"
58 #include "web/WebInputEventConversion.h" 58 #include "web/WebInputEventConversion.h"
59 #include "web/WebLocalFrameImpl.h" 59 #include "web/WebLocalFrameImpl.h"
60 #include "web/WebViewImpl.h" 60 #include "web/WebViewImpl.h"
61 #include "wtf/AutoReset.h"
61 #include <memory> 62 #include <memory>
62 #include <v8.h> 63 #include <v8.h>
63 64
64 namespace blink { 65 namespace blink {
65 66
66 namespace { 67 namespace {
67 68
68 Node* hoveredNodeForPoint(LocalFrame* frame, const IntPoint& pointInRootFrame, b ool ignorePointerEventsNone) 69 Node* hoveredNodeForPoint(LocalFrame* frame, const IntPoint& pointInRootFrame, b ool ignorePointerEventsNone)
69 { 70 {
70 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent; 71 HitTestRequest::HitTestRequestType hitType = HitTestRequest::Move | HitTestR equest::ReadOnly | HitTestRequest::AllowChildFrameContent;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 m_pageOverlay = PageOverlay::create(m_webViewImpl, new InspectorPageOver layDelegate(*this)); 223 m_pageOverlay = PageOverlay::create(m_webViewImpl, new InspectorPageOver layDelegate(*this));
223 224
224 m_pageOverlay->update(); 225 m_pageOverlay->update();
225 } 226 }
226 227
227 void InspectorOverlay::updateAllLifecyclePhases() 228 void InspectorOverlay::updateAllLifecyclePhases()
228 { 229 {
229 if (isEmpty()) 230 if (isEmpty())
230 return; 231 return;
231 232
232 TemporaryChange<bool> scoped(m_inLayout, true); 233 AutoReset<bool> scoped(&m_inLayout, true);
233 if (m_needsUpdate) { 234 if (m_needsUpdate) {
234 m_needsUpdate = false; 235 m_needsUpdate = false;
235 rebuildOverlayPage(); 236 rebuildOverlayPage();
236 } 237 }
237 overlayMainFrame()->view()->updateAllLifecyclePhases(); 238 overlayMainFrame()->view()->updateAllLifecyclePhases();
238 } 239 }
239 240
240 bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent) 241 bool InspectorOverlay::handleInputEvent(const WebInputEvent& inputEvent)
241 { 242 {
242 bool handled = false; 243 bool handled = false;
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 794
794 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 795 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
795 { 796 {
796 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg ent) 797 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg ent)
797 return; 798 return;
798 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); 799 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script());
799 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); 800 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true);
800 } 801 }
801 802
802 } // namespace blink 803 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698