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

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

Issue 1507633003: Clarify ordinary page handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace Created 4 years, 11 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 return m_overlayPage.get(); 457 return m_overlayPage.get();
458 458
459 ScriptForbiddenScope::AllowUserAgentScript allowScript; 459 ScriptForbiddenScope::AllowUserAgentScript allowScript;
460 460
461 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, dummyFrameLoa derClient, (EmptyFrameLoaderClient::create())); 461 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<FrameLoaderClient>, dummyFrameLoa derClient, (EmptyFrameLoaderClient::create()));
462 Page::PageClients pageClients; 462 Page::PageClients pageClients;
463 fillWithEmptyClients(pageClients); 463 fillWithEmptyClients(pageClients);
464 ASSERT(!m_overlayChromeClient); 464 ASSERT(!m_overlayChromeClient);
465 m_overlayChromeClient = InspectorOverlayChromeClient::create(m_webViewImpl-> page()->chromeClient(), *this); 465 m_overlayChromeClient = InspectorOverlayChromeClient::create(m_webViewImpl-> page()->chromeClient(), *this);
466 pageClients.chromeClient = m_overlayChromeClient.get(); 466 pageClients.chromeClient = m_overlayChromeClient.get();
467 m_overlayPage = adoptPtrWillBeNoop(new Page(pageClients)); 467 m_overlayPage = Page::create(pageClients);
468 468
469 Settings& settings = m_webViewImpl->page()->settings(); 469 Settings& settings = m_webViewImpl->page()->settings();
470 Settings& overlaySettings = m_overlayPage->settings(); 470 Settings& overlaySettings = m_overlayPage->settings();
471 471
472 overlaySettings.genericFontFamilySettings().updateStandard(settings.genericF ontFamilySettings().standard()); 472 overlaySettings.genericFontFamilySettings().updateStandard(settings.genericF ontFamilySettings().standard());
473 overlaySettings.genericFontFamilySettings().updateSerif(settings.genericFont FamilySettings().serif()); 473 overlaySettings.genericFontFamilySettings().updateSerif(settings.genericFont FamilySettings().serif());
474 overlaySettings.genericFontFamilySettings().updateSansSerif(settings.generic FontFamilySettings().sansSerif()); 474 overlaySettings.genericFontFamilySettings().updateSansSerif(settings.generic FontFamilySettings().sansSerif());
475 overlaySettings.genericFontFamilySettings().updateCursive(settings.genericFo ntFamilySettings().cursive()); 475 overlaySettings.genericFontFamilySettings().updateCursive(settings.genericFo ntFamilySettings().cursive());
476 overlaySettings.genericFontFamilySettings().updateFantasy(settings.genericFo ntFamilySettings().fantasy()); 476 overlaySettings.genericFontFamilySettings().updateFantasy(settings.genericFo ntFamilySettings().fantasy());
477 overlaySettings.genericFontFamilySettings().updatePictograph(settings.generi cFontFamilySettings().pictograph()); 477 overlaySettings.genericFontFamilySettings().updatePictograph(settings.generi cFontFamilySettings().pictograph());
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 746
747 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node) 747 void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
748 { 748 {
749 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive()) 749 if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node-> isElementNode() || !node->ownerDocument()->isActive())
750 return; 750 return;
751 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script()); 751 m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgen t, &overlayMainFrame()->script());
752 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true); 752 toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridde n(true);
753 } 753 }
754 754
755 } // namespace blink 755 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698