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: Source/web/WebViewImpl.cpp

Issue 146683003: Settings should not call into inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated review comments Created 6 years, 10 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
« no previous file with comments | « Source/web/WebHelperPluginImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #include "core/frame/Frame.h" 90 #include "core/frame/Frame.h"
91 #include "core/frame/FrameView.h" 91 #include "core/frame/FrameView.h"
92 #include "core/frame/Settings.h" 92 #include "core/frame/Settings.h"
93 #include "core/frame/SmartClip.h" 93 #include "core/frame/SmartClip.h"
94 #include "core/html/HTMLInputElement.h" 94 #include "core/html/HTMLInputElement.h"
95 #include "core/html/HTMLMediaElement.h" 95 #include "core/html/HTMLMediaElement.h"
96 #include "core/html/HTMLPlugInElement.h" 96 #include "core/html/HTMLPlugInElement.h"
97 #include "core/html/HTMLTextAreaElement.h" 97 #include "core/html/HTMLTextAreaElement.h"
98 #include "core/html/ime/InputMethodContext.h" 98 #include "core/html/ime/InputMethodContext.h"
99 #include "core/inspector/InspectorController.h" 99 #include "core/inspector/InspectorController.h"
100 #include "core/inspector/InspectorInstrumentation.h"
100 #include "core/loader/DocumentLoader.h" 101 #include "core/loader/DocumentLoader.h"
101 #include "core/loader/FrameLoader.h" 102 #include "core/loader/FrameLoader.h"
102 #include "core/loader/UniqueIdentifier.h" 103 #include "core/loader/UniqueIdentifier.h"
103 #include "core/page/Chrome.h" 104 #include "core/page/Chrome.h"
104 #include "core/page/ContextMenuController.h" 105 #include "core/page/ContextMenuController.h"
105 #include "core/page/DragController.h" 106 #include "core/page/DragController.h"
106 #include "core/page/DragData.h" 107 #include "core/page/DragData.h"
107 #include "core/page/DragSession.h" 108 #include "core/page/DragSession.h"
108 #include "core/page/EventHandler.h" 109 #include "core/page/EventHandler.h"
109 #include "core/page/FocusController.h" 110 #include "core/page/FocusController.h"
(...skipping 2785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2895 2896
2896 RefPtr<FrameView> view = mainFrameImpl()->frameView(); 2897 RefPtr<FrameView> view = mainFrameImpl()->frameView();
2897 if (!view) 2898 if (!view)
2898 return; 2899 return;
2899 2900
2900 WebSize layoutSize = m_size; 2901 WebSize layoutSize = m_size;
2901 2902
2902 if (settings()->viewportEnabled()) { 2903 if (settings()->viewportEnabled()) {
2903 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra ints().layoutSize); 2904 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra ints().layoutSize);
2904 2905
2905 if (page()->settings().textAutosizingEnabled() && layoutSize.width != vi ew->layoutSize().width()) { 2906 bool textAutosizingEnabled = InspectorInstrumentation::overrideTextAutos izing(page(), page()->settings().textAutosizingEnabled());
2907 if (textAutosizingEnabled && layoutSize.width != view->layoutSize().widt h()) {
2906 TextAutosizer* textAutosizer = page()->mainFrame()->document()->text Autosizer(); 2908 TextAutosizer* textAutosizer = page()->mainFrame()->document()->text Autosizer();
2907 if (textAutosizer) 2909 if (textAutosizer)
2908 textAutosizer->recalculateMultipliers(); 2910 textAutosizer->recalculateMultipliers();
2909 } 2911 }
2910 } 2912 }
2911 2913
2912 view->setLayoutSize(layoutSize); 2914 view->setLayoutSize(layoutSize);
2913 } 2915 }
2914 2916
2915 IntSize WebViewImpl::contentsSize() const 2917 IntSize WebViewImpl::contentsSize() const
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
3979 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3981 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3980 3982
3981 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3983 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3982 return false; 3984 return false;
3983 3985
3984 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3986 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3985 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3987 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3986 } 3988 }
3987 3989
3988 } // namespace blink 3990 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebHelperPluginImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698