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

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

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

Powered by Google App Engine
This is Rietveld 408576698