OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "core/inspector/InspectorOverlayHost.h" | 43 #include "core/inspector/InspectorOverlayHost.h" |
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 "public/platform/Platform.h" | 54 #include "public/platform/Platform.h" |
54 #include "public/platform/WebData.h" | 55 #include "public/platform/WebData.h" |
55 #include "web/PageOverlay.h" | 56 #include "web/PageOverlay.h" |
56 #include "web/WebGraphicsContextImpl.h" | 57 #include "web/WebGraphicsContextImpl.h" |
57 #include "web/WebInputEventConversion.h" | 58 #include "web/WebInputEventConversion.h" |
58 #include "web/WebLocalFrameImpl.h" | 59 #include "web/WebLocalFrameImpl.h" |
59 #include "web/WebViewImpl.h" | 60 #include "web/WebViewImpl.h" |
60 #include <v8.h> | 61 #include <v8.h> |
61 | 62 |
62 namespace blink { | 63 namespace blink { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 110 } |
110 | 111 |
111 void paintPageOverlay(WebGraphicsContext* context, const WebSize& webViewSiz
e) const override | 112 void paintPageOverlay(WebGraphicsContext* context, const WebSize& webViewSiz
e) const override |
112 { | 113 { |
113 if (m_overlay->isEmpty()) | 114 if (m_overlay->isEmpty()) |
114 return; | 115 return; |
115 | 116 |
116 GraphicsContext& graphicsContext = toWebGraphicsContextImpl(context)->gr
aphicsContext(); | 117 GraphicsContext& graphicsContext = toWebGraphicsContextImpl(context)->gr
aphicsContext(); |
117 FrameView* view = m_overlay->overlayMainFrame()->view(); | 118 FrameView* view = m_overlay->overlayMainFrame()->view(); |
118 ASSERT(!view->needsLayout()); | 119 ASSERT(!view->needsLayout()); |
119 view->paint(&graphicsContext, IntRect(0, 0, view->width(), view->height(
))); | 120 view->paint(&graphicsContext, CullRect(IntRect(0, 0, view->width(), view
->height()))); |
120 } | 121 } |
121 | 122 |
122 private: | 123 private: |
123 RawPtrWillBeMember<InspectorOverlay> m_overlay; | 124 RawPtrWillBeMember<InspectorOverlay> m_overlay; |
124 }; | 125 }; |
125 | 126 |
126 | 127 |
127 class InspectorOverlay::InspectorOverlayChromeClient final : public EmptyChromeC
lient { | 128 class InspectorOverlay::InspectorOverlayChromeClient final : public EmptyChromeC
lient { |
128 public: | 129 public: |
129 static PassOwnPtrWillBeRawPtr<InspectorOverlayChromeClient> create(ChromeCli
ent& client, InspectorOverlay& overlay) | 130 static PassOwnPtrWillBeRawPtr<InspectorOverlayChromeClient> create(ChromeCli
ent& client, InspectorOverlay& overlay) |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 755 |
755 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 756 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
756 { | 757 { |
757 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho
wLayoutEditor && !m_layoutEditor) { | 758 if (node && node->isElementNode() && m_inspectMode == InspectorDOMAgent::Sho
wLayoutEditor && !m_layoutEditor) { |
758 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom
Agent, &overlayMainFrame()->script()); | 759 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_dom
Agent, &overlayMainFrame()->script()); |
759 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr
idden(true); | 760 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverr
idden(true); |
760 } | 761 } |
761 } | 762 } |
762 | 763 |
763 } // namespace blink | 764 } // namespace blink |
OLD | NEW |