| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 { | 258 { |
| 259 m_textAutosizingFontScaleFactor = fontScaleFactor; | 259 m_textAutosizingFontScaleFactor = fontScaleFactor; |
| 260 | 260 |
| 261 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res
ize, or whether there is only one document per Settings instance? | 261 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res
ize, or whether there is only one document per Settings instance? |
| 262 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave
rseNext()) | 262 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave
rseNext()) |
| 263 frame->document()->textAutosizer()->recalculateMultipliers(); | 263 frame->document()->textAutosizer()->recalculateMultipliers(); |
| 264 | 264 |
| 265 m_page->setNeedsRecalcStyleInAllFrames(); | 265 m_page->setNeedsRecalcStyleInAllFrames(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void Settings::setResolutionOverride(const IntSize& densityPerInchOverride) | |
| 269 { | |
| 270 if (m_resolutionDensityPerInchOverride == densityPerInchOverride) | |
| 271 return; | |
| 272 | |
| 273 m_resolutionDensityPerInchOverride = densityPerInchOverride; | |
| 274 m_page->setNeedsRecalcStyleInAllFrames(); | |
| 275 } | |
| 276 | |
| 277 void Settings::setMediaTypeOverride(const String& mediaTypeOverride) | 268 void Settings::setMediaTypeOverride(const String& mediaTypeOverride) |
| 278 { | 269 { |
| 279 if (m_mediaTypeOverride == mediaTypeOverride) | 270 if (m_mediaTypeOverride == mediaTypeOverride) |
| 280 return; | 271 return; |
| 281 | 272 |
| 282 m_mediaTypeOverride = mediaTypeOverride; | 273 m_mediaTypeOverride = mediaTypeOverride; |
| 283 | 274 |
| 284 Frame* mainFrame = m_page->mainFrame(); | 275 Frame* mainFrame = m_page->mainFrame(); |
| 285 ASSERT(mainFrame); | 276 ASSERT(mainFrame); |
| 286 FrameView* view = mainFrame->view(); | 277 FrameView* view = mainFrame->view(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 { | 370 { |
| 380 gUsesOverlayScrollbars = flag; | 371 gUsesOverlayScrollbars = flag; |
| 381 } | 372 } |
| 382 | 373 |
| 383 bool Settings::usesOverlayScrollbars() | 374 bool Settings::usesOverlayScrollbars() |
| 384 { | 375 { |
| 385 return gUsesOverlayScrollbars; | 376 return gUsesOverlayScrollbars; |
| 386 } | 377 } |
| 387 | 378 |
| 388 } // namespace WebCore | 379 } // namespace WebCore |
| OLD | NEW |