| OLD | NEW |
| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 , m_mediaTypeOverride("screen") | 116 , m_mediaTypeOverride("screen") |
| 117 , m_textAutosizingFontScaleFactor(1) | 117 , m_textAutosizingFontScaleFactor(1) |
| 118 #if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP | 118 #if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP |
| 119 , m_textAutosizingWindowSizeOverride(320, 480) | 119 , m_textAutosizingWindowSizeOverride(320, 480) |
| 120 , m_textAutosizingEnabled(true) | 120 , m_textAutosizingEnabled(true) |
| 121 #else | 121 #else |
| 122 , m_textAutosizingEnabled(false) | 122 , m_textAutosizingEnabled(false) |
| 123 #endif | 123 #endif |
| 124 , m_useWideViewport(true) | 124 , m_useWideViewport(true) |
| 125 , m_loadWithOverviewMode(true) | 125 , m_loadWithOverviewMode(true) |
| 126 , m_textAutosizingOverride(NoOverride) |
| 126 SETTINGS_INITIALIZER_LIST | 127 SETTINGS_INITIALIZER_LIST |
| 127 , m_isJavaEnabled(false) | 128 , m_isJavaEnabled(false) |
| 128 , m_loadsImagesAutomatically(false) | 129 , m_loadsImagesAutomatically(false) |
| 129 , m_areImagesEnabled(true) | 130 , m_areImagesEnabled(true) |
| 130 , m_arePluginsEnabled(false) | 131 , m_arePluginsEnabled(false) |
| 131 , m_isScriptEnabled(false) | 132 , m_isScriptEnabled(false) |
| 132 , m_isCSSCustomFilterEnabled(false) | 133 , m_isCSSCustomFilterEnabled(false) |
| 133 , m_cssStickyPositionEnabled(true) | 134 , m_cssStickyPositionEnabled(true) |
| 134 , m_dnsPrefetchingEnabled(false) | 135 , m_dnsPrefetchingEnabled(false) |
| 135 , m_touchEventEmulationEnabled(false) | 136 , m_touchEventEmulationEnabled(false) |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 221 |
| 221 void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled) | 222 void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled) |
| 222 { | 223 { |
| 223 if (m_textAutosizingEnabled == textAutosizingEnabled) | 224 if (m_textAutosizingEnabled == textAutosizingEnabled) |
| 224 return; | 225 return; |
| 225 | 226 |
| 226 m_textAutosizingEnabled = textAutosizingEnabled; | 227 m_textAutosizingEnabled = textAutosizingEnabled; |
| 227 m_page->setNeedsRecalcStyleInAllFrames(); | 228 m_page->setNeedsRecalcStyleInAllFrames(); |
| 228 } | 229 } |
| 229 | 230 |
| 231 bool Settings::textAutosizingEnabled() const |
| 232 { |
| 233 switch (m_textAutosizingOverride) { |
| 234 case NoOverride: |
| 235 return m_textAutosizingEnabled; |
| 236 case TextAutosizingOverrideEnabled: |
| 237 return true; |
| 238 case TextAutosizingOverrideDisabled: |
| 239 return false; |
| 240 default: |
| 241 ASSERT_NOT_REACHED(); |
| 242 } |
| 243 return false; |
| 244 } |
| 245 |
| 230 void Settings::setTextAutosizingWindowSizeOverride(const IntSize& textAutosizing
WindowSizeOverride) | 246 void Settings::setTextAutosizingWindowSizeOverride(const IntSize& textAutosizing
WindowSizeOverride) |
| 231 { | 247 { |
| 232 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride) | 248 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride) |
| 233 return; | 249 return; |
| 234 | 250 |
| 235 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride; | 251 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride; |
| 236 m_page->setNeedsRecalcStyleInAllFrames(); | 252 m_page->setNeedsRecalcStyleInAllFrames(); |
| 237 } | 253 } |
| 238 | 254 |
| 255 void Settings::setTextAutosizingEnabledOverride(TextAutosizingOverride textAutos
izingOverride) |
| 256 { |
| 257 if (m_textAutosizingOverride == textAutosizingOverride) |
| 258 return; |
| 259 |
| 260 m_textAutosizingOverride = textAutosizingOverride; |
| 261 m_page->setNeedsRecalcStyleInAllFrames(); |
| 262 } |
| 263 |
| 239 void Settings::setUseWideViewport(bool useWideViewport) | 264 void Settings::setUseWideViewport(bool useWideViewport) |
| 240 { | 265 { |
| 241 if (m_useWideViewport == useWideViewport) | 266 if (m_useWideViewport == useWideViewport) |
| 242 return; | 267 return; |
| 243 | 268 |
| 244 m_useWideViewport = useWideViewport; | 269 m_useWideViewport = useWideViewport; |
| 245 if (m_page->mainFrame()) | 270 if (m_page->mainFrame()) |
| 246 m_page->chrome().dispatchViewportPropertiesDidChange(m_page->mainFrame()
->document()->viewportArguments()); | 271 m_page->chrome().dispatchViewportPropertiesDidChange(m_page->mainFrame()
->document()->viewportArguments()); |
| 247 } | 272 } |
| 248 | 273 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 { | 398 { |
| 374 if (m_viewportEnabled == enabled) | 399 if (m_viewportEnabled == enabled) |
| 375 return; | 400 return; |
| 376 | 401 |
| 377 m_viewportEnabled = enabled; | 402 m_viewportEnabled = enabled; |
| 378 if (m_page->mainFrame()) | 403 if (m_page->mainFrame()) |
| 379 m_page->mainFrame()->document()->updateViewportArguments(); | 404 m_page->mainFrame()->document()->updateViewportArguments(); |
| 380 } | 405 } |
| 381 | 406 |
| 382 } // namespace WebCore | 407 } // namespace WebCore |
| OLD | NEW |