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

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

Issue 26929003: Add text autosizing override in the inspector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add optional flag in protocol.json Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/Settings.h ('k') | Source/devtools/front_end/OverridesSupport.js » ('j') | 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) 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled) 218 void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled)
219 { 219 {
220 if (m_textAutosizingEnabled == textAutosizingEnabled) 220 if (m_textAutosizingEnabled == textAutosizingEnabled)
221 return; 221 return;
222 222
223 m_textAutosizingEnabled = textAutosizingEnabled; 223 m_textAutosizingEnabled = textAutosizingEnabled;
224 m_page->setNeedsRecalcStyleInAllFrames(); 224 m_page->setNeedsRecalcStyleInAllFrames();
225 } 225 }
226 226
227 bool Settings::textAutosizingEnabled() const
228 {
229 return InspectorInstrumentation::overrideTextAutosizing(m_page, m_textAutosi zingEnabled);
230 }
231
227 void Settings::setTextAutosizingWindowSizeOverride(const IntSize& textAutosizing WindowSizeOverride) 232 void Settings::setTextAutosizingWindowSizeOverride(const IntSize& textAutosizing WindowSizeOverride)
228 { 233 {
229 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride) 234 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride)
230 return; 235 return;
231 236
232 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride; 237 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride;
233 m_page->setNeedsRecalcStyleInAllFrames(); 238 m_page->setNeedsRecalcStyleInAllFrames();
234 } 239 }
235 240
236 void Settings::setUseWideViewport(bool useWideViewport) 241 void Settings::setUseWideViewport(bool useWideViewport)
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 { 386 {
382 if (m_viewportEnabled == enabled) 387 if (m_viewportEnabled == enabled)
383 return; 388 return;
384 389
385 m_viewportEnabled = enabled; 390 m_viewportEnabled = enabled;
386 if (m_page->mainFrame()) 391 if (m_page->mainFrame())
387 m_page->mainFrame()->document()->updateViewportDescription(); 392 m_page->mainFrame()->document()->updateViewportDescription();
388 } 393 }
389 394
390 } // namespace WebCore 395 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Settings.h ('k') | Source/devtools/front_end/OverridesSupport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698