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

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

Issue 14408004: Fix incorrect evaluation of resolution media queries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 { 278 {
279 m_textAutosizingFontScaleFactor = fontScaleFactor; 279 m_textAutosizingFontScaleFactor = fontScaleFactor;
280 280
281 // 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 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res ize, or whether there is only one document per Settings instance?
282 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext()) 282 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext())
283 frame->document()->textAutosizer()->recalculateMultipliers(); 283 frame->document()->textAutosizer()->recalculateMultipliers();
284 284
285 m_page->setNeedsRecalcStyleInAllFrames(); 285 m_page->setNeedsRecalcStyleInAllFrames();
286 } 286 }
287 287
288 void Settings::setResolutionOverride(const IntSize& densityPerInchOverride)
289 {
290 if (m_resolutionDensityPerInchOverride == densityPerInchOverride)
291 return;
292
293 m_resolutionDensityPerInchOverride = densityPerInchOverride;
294 m_page->setNeedsRecalcStyleInAllFrames();
295 }
296
297 void Settings::setMediaTypeOverride(const String& mediaTypeOverride) 288 void Settings::setMediaTypeOverride(const String& mediaTypeOverride)
298 { 289 {
299 if (m_mediaTypeOverride == mediaTypeOverride) 290 if (m_mediaTypeOverride == mediaTypeOverride)
300 return; 291 return;
301 292
302 m_mediaTypeOverride = mediaTypeOverride; 293 m_mediaTypeOverride = mediaTypeOverride;
303 294
304 Frame* mainFrame = m_page->mainFrame(); 295 Frame* mainFrame = m_page->mainFrame();
305 ASSERT(mainFrame); 296 ASSERT(mainFrame);
306 FrameView* view = mainFrame->view(); 297 FrameView* view = mainFrame->view();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 void Settings::setHiddenPageDOMTimerThrottlingEnabled(bool flag) 454 void Settings::setHiddenPageDOMTimerThrottlingEnabled(bool flag)
464 { 455 {
465 if (m_hiddenPageDOMTimerThrottlingEnabled == flag) 456 if (m_hiddenPageDOMTimerThrottlingEnabled == flag)
466 return; 457 return;
467 m_hiddenPageDOMTimerThrottlingEnabled = flag; 458 m_hiddenPageDOMTimerThrottlingEnabled = flag;
468 m_page->hiddenPageDOMTimerThrottlingStateChanged(); 459 m_page->hiddenPageDOMTimerThrottlingStateChanged();
469 } 460 }
470 #endif 461 #endif
471 462
472 } // namespace WebCore 463 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698