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

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

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix 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 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 void paintPageOverlay(const PageOverlay&, GraphicsContext& graphicsContext, const WebSize& webViewSize) const override 113 void paintPageOverlay(const PageOverlay&, GraphicsContext& graphicsContext, const WebSize& webViewSize) const override
114 { 114 {
115 if (m_overlay->isEmpty()) 115 if (m_overlay->isEmpty())
116 return; 116 return;
117 117
118 // Skip cache because the following paint may conflict with the view's r eal painting. 118 // Skip cache because the following paint may conflict with the view's r eal painting.
119 DisplayItemCacheSkipper cacheSkipper(graphicsContext); 119 DisplayItemCacheSkipper cacheSkipper(graphicsContext);
120 FrameView* view = m_overlay->overlayMainFrame()->view(); 120 FrameView* view = m_overlay->overlayMainFrame()->view();
121 ASSERT(!view->needsLayout()); 121 ASSERT(!view->needsLayout());
122 view->paint(&graphicsContext, CullRect(IntRect(0, 0, view->width(), view ->height()))); 122 view->paint(graphicsContext, CullRect(IntRect(0, 0, view->width(), view- >height())));
123 } 123 }
124 124
125 private: 125 private:
126 RawPtrWillBeMember<InspectorOverlay> m_overlay; 126 RawPtrWillBeMember<InspectorOverlay> m_overlay;
127 }; 127 };
128 128
129 129
130 class InspectorOverlay::InspectorOverlayChromeClient final : public EmptyChromeC lient { 130 class InspectorOverlay::InspectorOverlayChromeClient final : public EmptyChromeC lient {
131 public: 131 public:
132 static PassOwnPtrWillBeRawPtr<InspectorOverlayChromeClient> create(ChromeCli ent& client, InspectorOverlay& overlay) 132 static PassOwnPtrWillBeRawPtr<InspectorOverlayChromeClient> create(ChromeCli ent& client, InspectorOverlay& overlay)
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 745
746 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 746 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
747 { 747 {
748 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive()) 748 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive())
749 return; 749 return;
750 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); 750 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script());
751 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); 751 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true);
752 } 752 }
753 753
754 } // namespace blink 754 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698