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

Side by Side Diff: Source/core/page/Settings.cpp

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserv ed.
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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride; 252 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride;
253 m_page->setNeedsRecalcStyleInAllFrames(); 253 m_page->setNeedsRecalcStyleInAllFrames();
254 } 254 }
255 255
256 void Settings::setUseWideViewport(bool useWideViewport) 256 void Settings::setUseWideViewport(bool useWideViewport)
257 { 257 {
258 if (m_useWideViewport == useWideViewport) 258 if (m_useWideViewport == useWideViewport)
259 return; 259 return;
260 260
261 m_useWideViewport = useWideViewport; 261 m_useWideViewport = useWideViewport;
262 if (m_page->chrome() && m_page->mainFrame()) 262 if (m_page->mainFrame())
263 m_page->chrome()->dispatchViewportPropertiesDidChange(m_page->mainFrame( )->document()->viewportArguments()); 263 m_page->chrome().dispatchViewportPropertiesDidChange(m_page->mainFrame() ->document()->viewportArguments());
264 } 264 }
265 265
266 void Settings::setLoadWithOverviewMode(bool loadWithOverviewMode) 266 void Settings::setLoadWithOverviewMode(bool loadWithOverviewMode)
267 { 267 {
268 if (m_loadWithOverviewMode == loadWithOverviewMode) 268 if (m_loadWithOverviewMode == loadWithOverviewMode)
269 return; 269 return;
270 270
271 m_loadWithOverviewMode = loadWithOverviewMode; 271 m_loadWithOverviewMode = loadWithOverviewMode;
272 if (m_page->chrome() && m_page->mainFrame()) 272 if (m_page->mainFrame())
273 m_page->chrome()->dispatchViewportPropertiesDidChange(m_page->mainFrame( )->document()->viewportArguments()); 273 m_page->chrome().dispatchViewportPropertiesDidChange(m_page->mainFrame() ->document()->viewportArguments());
274 } 274 }
275 275
276 void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor) 276 void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor)
277 { 277 {
278 m_textAutosizingFontScaleFactor = fontScaleFactor; 278 m_textAutosizingFontScaleFactor = fontScaleFactor;
279 279
280 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res ize, or whether there is only one document per Settings instance? 280 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res ize, or whether there is only one document per Settings instance?
281 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext()) 281 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext())
282 frame->document()->textAutosizer()->recalculateMultipliers(); 282 frame->document()->textAutosizer()->recalculateMultipliers();
283 283
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 m_openGLMultisamplingEnabled = flag; 403 m_openGLMultisamplingEnabled = flag;
404 m_page->multisamplingChanged(); 404 m_page->multisamplingChanged();
405 } 405 }
406 406
407 bool Settings::openGLMultisamplingEnabled() 407 bool Settings::openGLMultisamplingEnabled()
408 { 408 {
409 return m_openGLMultisamplingEnabled; 409 return m_openGLMultisamplingEnabled;
410 } 410 }
411 411
412 } // namespace WebCore 412 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/PointerLockController.cpp ('k') | Source/core/platform/chromium/PopupContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698