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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 overlaySettings.setMinimumFontSize(settings.minimumFontSize()); | 488 overlaySettings.setMinimumFontSize(settings.minimumFontSize()); |
489 overlaySettings.setMinimumLogicalFontSize(settings.minimumLogicalFontSize())
; | 489 overlaySettings.setMinimumLogicalFontSize(settings.minimumLogicalFontSize())
; |
490 overlaySettings.setScriptEnabled(true); | 490 overlaySettings.setScriptEnabled(true); |
491 overlaySettings.setPluginsEnabled(false); | 491 overlaySettings.setPluginsEnabled(false); |
492 overlaySettings.setLoadsImagesAutomatically(true); | 492 overlaySettings.setLoadsImagesAutomatically(true); |
493 // FIXME: http://crbug.com/363843. Inspector should probably create its | 493 // FIXME: http://crbug.com/363843. Inspector should probably create its |
494 // own graphics layers and attach them to the tree rather than going | 494 // own graphics layers and attach them to the tree rather than going |
495 // through some non-composited paint function. | 495 // through some non-composited paint function. |
496 overlaySettings.setAcceleratedCompositingEnabled(false); | 496 overlaySettings.setAcceleratedCompositingEnabled(false); |
497 | 497 |
498 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderCl
ient.get(), &m_overlayPage->frameHost(), 0); | 498 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(dummyFrameLoaderCl
ient.get(), &m_overlayPage->frameHost(), 0, nullptr); |
499 frame->setView(FrameView::create(frame.get())); | 499 frame->setView(FrameView::create(frame.get())); |
500 frame->init(); | 500 frame->init(); |
501 FrameLoader& loader = frame->loader(); | 501 FrameLoader& loader = frame->loader(); |
502 frame->view()->setCanHaveScrollbars(false); | 502 frame->view()->setCanHaveScrollbars(false); |
503 frame->view()->setTransparent(true); | 503 frame->view()->setTransparent(true); |
504 | 504 |
505 const WebData& overlayPageHTMLResource = Platform::current()->loadResource("
InspectorOverlayPage.html"); | 505 const WebData& overlayPageHTMLResource = Platform::current()->loadResource("
InspectorOverlayPage.html"); |
506 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); | 506 RefPtr<SharedBuffer> data = SharedBuffer::create(overlayPageHTMLResource.dat
a(), overlayPageHTMLResource.size()); |
507 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); | 507 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data, "text/html"
, "UTF-8", KURL(), ForceSynchronousLoad))); |
508 v8::Isolate* isolate = toIsolate(frame.get()); | 508 v8::Isolate* isolate = toIsolate(frame.get()); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 774 |
775 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) | 775 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) |
776 { | 776 { |
777 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive()) | 777 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->
isElementNode() || !node->ownerDocument()->isActive()) |
778 return; | 778 return; |
779 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); | 779 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen
t, &overlayMainFrame()->script()); |
780 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); | 780 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde
n(true); |
781 } | 781 } |
782 | 782 |
783 } // namespace blink | 783 } // namespace blink |
OLD | NEW |