| 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/frame/VisualViewport.h" | 43 #include "core/frame/VisualViewport.h" |
| 44 #include "core/html/HTMLFrameOwnerElement.h" | 44 #include "core/html/HTMLFrameOwnerElement.h" |
| 45 #include "core/input/EventHandler.h" | 45 #include "core/input/EventHandler.h" |
| 46 #include "core/inspector/InspectorOverlayHost.h" | 46 #include "core/inspector/InspectorOverlayHost.h" |
| 47 #include "core/layout/api/LayoutViewItem.h" | 47 #include "core/layout/api/LayoutViewItem.h" |
| 48 #include "core/loader/EmptyClients.h" | 48 #include "core/loader/EmptyClients.h" |
| 49 #include "core/loader/FrameLoadRequest.h" | 49 #include "core/loader/FrameLoadRequest.h" |
| 50 #include "core/page/ChromeClient.h" | 50 #include "core/page/ChromeClient.h" |
| 51 #include "core/page/Page.h" | 51 #include "core/page/Page.h" |
| 52 #include "platform/ScriptForbiddenScope.h" | 52 #include "platform/ScriptForbiddenScope.h" |
| 53 #include "platform/graphics/Color.h" |
| 53 #include "platform/graphics/GraphicsContext.h" | 54 #include "platform/graphics/GraphicsContext.h" |
| 54 #include "platform/graphics/paint/CullRect.h" | 55 #include "platform/graphics/paint/CullRect.h" |
| 55 #include "public/platform/Platform.h" | 56 #include "public/platform/Platform.h" |
| 56 #include "public/platform/WebData.h" | 57 #include "public/platform/WebData.h" |
| 57 #include "v8/include/v8.h" | 58 #include "v8/include/v8.h" |
| 58 #include "web/ChromeClientImpl.h" | 59 #include "web/ChromeClientImpl.h" |
| 59 #include "web/PageOverlay.h" | 60 #include "web/PageOverlay.h" |
| 60 #include "web/WebInputEventConversion.h" | 61 #include "web/WebInputEventConversion.h" |
| 61 #include "web/WebLocalFrameImpl.h" | 62 #include "web/WebLocalFrameImpl.h" |
| 62 #include "wtf/AutoReset.h" | 63 #include "wtf/AutoReset.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 // own graphics layers and attach them to the tree rather than going | 544 // own graphics layers and attach them to the tree rather than going |
| 544 // through some non-composited paint function. | 545 // through some non-composited paint function. |
| 545 overlaySettings.setAcceleratedCompositingEnabled(false); | 546 overlaySettings.setAcceleratedCompositingEnabled(false); |
| 546 | 547 |
| 547 LocalFrame* frame = | 548 LocalFrame* frame = |
| 548 LocalFrame::create(&dummyLocalFrameClient, *m_overlayPage, 0); | 549 LocalFrame::create(&dummyLocalFrameClient, *m_overlayPage, 0); |
| 549 frame->setView(FrameView::create(*frame)); | 550 frame->setView(FrameView::create(*frame)); |
| 550 frame->init(); | 551 frame->init(); |
| 551 FrameLoader& loader = frame->loader(); | 552 FrameLoader& loader = frame->loader(); |
| 552 frame->view()->setCanHaveScrollbars(false); | 553 frame->view()->setCanHaveScrollbars(false); |
| 553 frame->view()->setTransparent(true); | 554 frame->view()->setBaseBackgroundColor(Color::transparent); |
| 554 | 555 |
| 555 const WebData& overlayPageHTMLResource = | 556 const WebData& overlayPageHTMLResource = |
| 556 Platform::current()->loadResource("InspectorOverlayPage.html"); | 557 Platform::current()->loadResource("InspectorOverlayPage.html"); |
| 557 RefPtr<SharedBuffer> data = SharedBuffer::create( | 558 RefPtr<SharedBuffer> data = SharedBuffer::create( |
| 558 overlayPageHTMLResource.data(), overlayPageHTMLResource.size()); | 559 overlayPageHTMLResource.data(), overlayPageHTMLResource.size()); |
| 559 loader.load(FrameLoadRequest( | 560 loader.load(FrameLoadRequest( |
| 560 0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), | 561 0, blankURL(), SubstituteData(data, "text/html", "UTF-8", KURL(), |
| 561 ForceSynchronousLoad))); | 562 ForceSynchronousLoad))); |
| 562 v8::Isolate* isolate = toIsolate(frame); | 563 v8::Isolate* isolate = toIsolate(frame); |
| 563 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 564 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 bool InspectorOverlay::shouldSearchForNode() { | 803 bool InspectorOverlay::shouldSearchForNode() { |
| 803 return m_inspectMode != InspectorDOMAgent::NotSearching; | 804 return m_inspectMode != InspectorDOMAgent::NotSearching; |
| 804 } | 805 } |
| 805 | 806 |
| 806 void InspectorOverlay::inspect(Node* node) { | 807 void InspectorOverlay::inspect(Node* node) { |
| 807 if (m_domAgent) | 808 if (m_domAgent) |
| 808 m_domAgent->inspect(node); | 809 m_domAgent->inspect(node); |
| 809 } | 810 } |
| 810 | 811 |
| 811 } // namespace blink | 812 } // namespace blink |
| OLD | NEW |