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

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, 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
« no previous file with comments | « Source/core/page/Settings.h ('k') | Source/core/testing/InternalSettings.h » ('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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 { 254 {
255 m_textAutosizingFontScaleFactor = fontScaleFactor; 255 m_textAutosizingFontScaleFactor = fontScaleFactor;
256 256
257 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res ize, or whether there is only one document per Settings instance? 257 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res ize, or whether there is only one document per Settings instance?
258 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext()) 258 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext())
259 frame->document()->textAutosizer()->recalculateMultipliers(); 259 frame->document()->textAutosizer()->recalculateMultipliers();
260 260
261 m_page->setNeedsRecalcStyleInAllFrames(); 261 m_page->setNeedsRecalcStyleInAllFrames();
262 } 262 }
263 263
264 void Settings::setResolutionOverride(const IntSize& densityPerInchOverride)
265 {
266 if (m_resolutionDensityPerInchOverride == densityPerInchOverride)
267 return;
268
269 m_resolutionDensityPerInchOverride = densityPerInchOverride;
270 m_page->setNeedsRecalcStyleInAllFrames();
271 }
272
273 void Settings::setMediaTypeOverride(const String& mediaTypeOverride) 264 void Settings::setMediaTypeOverride(const String& mediaTypeOverride)
274 { 265 {
275 if (m_mediaTypeOverride == mediaTypeOverride) 266 if (m_mediaTypeOverride == mediaTypeOverride)
276 return; 267 return;
277 268
278 m_mediaTypeOverride = mediaTypeOverride; 269 m_mediaTypeOverride = mediaTypeOverride;
279 270
280 Frame* mainFrame = m_page->mainFrame(); 271 Frame* mainFrame = m_page->mainFrame();
281 ASSERT(mainFrame); 272 ASSERT(mainFrame);
282 FrameView* view = mainFrame->view(); 273 FrameView* view = mainFrame->view();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 { 366 {
376 gUsesOverlayScrollbars = flag; 367 gUsesOverlayScrollbars = flag;
377 } 368 }
378 369
379 bool Settings::usesOverlayScrollbars() 370 bool Settings::usesOverlayScrollbars()
380 { 371 {
381 return gUsesOverlayScrollbars; 372 return gUsesOverlayScrollbars;
382 } 373 }
383 374
384 } // namespace WebCore 375 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Settings.h ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698