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

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

Issue 2290233007: Move convertViewportToWindow and convertWindowToViewport from (Closed)
Patch Set: add client to WebSharedWorkerImpl Created 4 years, 2 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 void InspectorOverlay::drawViewSize() 475 void InspectorOverlay::drawViewSize()
476 { 476 {
477 if (m_resizeTimerActive && m_drawViewSize) 477 if (m_resizeTimerActive && m_drawViewSize)
478 evaluateInOverlay("drawViewSize", ""); 478 evaluateInOverlay("drawViewSize", "");
479 } 479 }
480 480
481 float InspectorOverlay::windowToViewportScale() const 481 float InspectorOverlay::windowToViewportScale() const
482 { 482 {
483 return m_webViewImpl->chromeClient().windowToViewportScalar(1.0f); 483 return m_webViewImpl->chromeClient().windowToViewportScalar(*m_webViewImpl-> mainFrameImpl()->frameView(), 1.0f);
484 } 484 }
485 485
486 Page* InspectorOverlay::overlayPage() 486 Page* InspectorOverlay::overlayPage()
487 { 487 {
488 if (m_overlayPage) 488 if (m_overlayPage)
489 return m_overlayPage.get(); 489 return m_overlayPage.get();
490 490
491 ScriptForbiddenScope::AllowUserAgentScript allowScript; 491 ScriptForbiddenScope::AllowUserAgentScript allowScript;
492 492
493 DEFINE_STATIC_LOCAL(FrameLoaderClient, dummyFrameLoaderClient, (EmptyFrameLo aderClient::create())); 493 DEFINE_STATIC_LOCAL(FrameLoaderClient, dummyFrameLoaderClient, (EmptyFrameLo aderClient::create()));
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 811
812 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 812 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
813 { 813 {
814 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg ent) 814 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive() || !m_cssAgent || !m_domAg ent)
815 return; 815 return;
816 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); 816 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script());
817 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); 817 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true);
818 } 818 }
819 819
820 } // namespace blink 820 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/DateTimeChooserImpl.cpp ('k') | third_party/WebKit/Source/web/PopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698