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

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

Issue 1412593003: Remove WebGraphicsContext/WebGraphicsContextImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove another include WebGraphicsContext.h Created 5 years, 1 month 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
« no previous file with comments | « components/test_runner/test_runner.cc ('k') | third_party/WebKit/Source/web/PageOverlay.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/inspector/LayoutEditor.h" 44 #include "core/inspector/LayoutEditor.h"
45 #include "core/layout/LayoutView.h" 45 #include "core/layout/LayoutView.h"
46 #include "core/loader/EmptyClients.h" 46 #include "core/loader/EmptyClients.h"
47 #include "core/loader/FrameLoadRequest.h" 47 #include "core/loader/FrameLoadRequest.h"
48 #include "core/page/ChromeClient.h" 48 #include "core/page/ChromeClient.h"
49 #include "core/page/Page.h" 49 #include "core/page/Page.h"
50 #include "platform/JSONValues.h" 50 #include "platform/JSONValues.h"
51 #include "platform/ScriptForbiddenScope.h" 51 #include "platform/ScriptForbiddenScope.h"
52 #include "platform/graphics/GraphicsContext.h" 52 #include "platform/graphics/GraphicsContext.h"
53 #include "platform/graphics/paint/CullRect.h" 53 #include "platform/graphics/paint/CullRect.h"
54 #include "platform/graphics/paint/DisplayItemCacheSkipper.h"
54 #include "public/platform/Platform.h" 55 #include "public/platform/Platform.h"
55 #include "public/platform/WebData.h" 56 #include "public/platform/WebData.h"
56 #include "web/PageOverlay.h" 57 #include "web/PageOverlay.h"
57 #include "web/WebGraphicsContextImpl.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 <v8.h> 61 #include <v8.h>
62 62
63 namespace blink { 63 namespace blink {
64 64
65 namespace { 65 namespace {
66 66
67 Node* hoveredNodeForPoint(LocalFrame* frame, const IntPoint& pointInRootFrame, b ool ignorePointerEventsNone) 67 Node* hoveredNodeForPoint(LocalFrame* frame, const IntPoint& pointInRootFrame, b ool ignorePointerEventsNone)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 explicit InspectorPageOverlayDelegate(InspectorOverlay& overlay) 102 explicit InspectorPageOverlayDelegate(InspectorOverlay& overlay)
103 : m_overlay(&overlay) 103 : m_overlay(&overlay)
104 { } 104 { }
105 105
106 DEFINE_INLINE_VIRTUAL_TRACE() 106 DEFINE_INLINE_VIRTUAL_TRACE()
107 { 107 {
108 visitor->trace(m_overlay); 108 visitor->trace(m_overlay);
109 PageOverlay::Delegate::trace(visitor); 109 PageOverlay::Delegate::trace(visitor);
110 } 110 }
111 111
112 void paintPageOverlay(WebGraphicsContext* context, const WebSize& webViewSiz e) const override 112 void paintPageOverlay(const PageOverlay&, GraphicsContext& graphicsContext, const WebSize& webViewSize) const override
113 { 113 {
114 if (m_overlay->isEmpty()) 114 if (m_overlay->isEmpty())
115 return; 115 return;
116 116
117 GraphicsContext& graphicsContext = toWebGraphicsContextImpl(context)->gr aphicsContext(); 117 // Skip cache because the following paint may conflict with the view's r eal painting.
118 DisplayItemCacheSkipper cacheSkipper(graphicsContext);
chrishtr 2016/05/05 16:10:43 I'm encountering this again in the context of inve
Xianzhu 2016/05/05 16:27:52 The comment seems a bit misleading. The real reaso
chrishtr 2016/05/05 16:30:07 But where does this PaintController come from? Isn
Xianzhu 2016/05/05 16:47:33 Read more code and I found I misunderstood Inspect
chrishtr 2016/05/05 16:53:04 Ok I'll put up a patch to remove this then.
118 FrameView* view = m_overlay->overlayMainFrame()->view(); 119 FrameView* view = m_overlay->overlayMainFrame()->view();
119 ASSERT(!view->needsLayout()); 120 ASSERT(!view->needsLayout());
120 view->paint(&graphicsContext, CullRect(IntRect(0, 0, view->width(), view ->height()))); 121 view->paint(&graphicsContext, CullRect(IntRect(0, 0, view->width(), view ->height())));
121 } 122 }
122 123
123 private: 124 private:
124 RawPtrWillBeMember<InspectorOverlay> m_overlay; 125 RawPtrWillBeMember<InspectorOverlay> m_overlay;
125 }; 126 };
126 127
127 128
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 756
756 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 757 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
757 { 758 {
758 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) { 759 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho wLayoutEditor && !m_layoutEditor) {
759 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script()); 760 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom Agent, &overlayMainFrame()->script());
760 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true); 761 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr idden(true);
761 } 762 }
762 } 763 }
763 764
764 } // namespace blink 765 } // namespace blink
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.cc ('k') | third_party/WebKit/Source/web/PageOverlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698