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

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

Issue 12310107: Merge 143356 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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/WebCore/page/FrameView.cpp ('k') | Source/WebCore/rendering/TextAutosizer.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 23 matching lines...) Expand all
34 #include "Document.h" 34 #include "Document.h"
35 #include "Frame.h" 35 #include "Frame.h"
36 #include "FrameTree.h" 36 #include "FrameTree.h"
37 #include "FrameView.h" 37 #include "FrameView.h"
38 #include "HTMLMediaElement.h" 38 #include "HTMLMediaElement.h"
39 #include "HistoryItem.h" 39 #include "HistoryItem.h"
40 #include "Page.h" 40 #include "Page.h"
41 #include "PageCache.h" 41 #include "PageCache.h"
42 #include "ResourceHandle.h" 42 #include "ResourceHandle.h"
43 #include "StorageMap.h" 43 #include "StorageMap.h"
44 #include "TextAutosizer.h"
44 #include <limits> 45 #include <limits>
45 46
46 using namespace std; 47 using namespace std;
47 48
48 namespace WebCore { 49 namespace WebCore {
49 50
50 static void setImageLoadingSettings(Page* page) 51 static void setImageLoadingSettings(Page* page)
51 { 52 {
52 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->travers eNext()) { 53 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->travers eNext()) {
53 frame->document()->cachedResourceLoader()->setImagesEnabled(page->settin gs()->areImagesEnabled()); 54 frame->document()->cachedResourceLoader()->setImagesEnabled(page->settin gs()->areImagesEnabled());
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride) 357 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride)
357 return; 358 return;
358 359
359 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride; 360 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride;
360 m_page->setNeedsRecalcStyleInAllFrames(); 361 m_page->setNeedsRecalcStyleInAllFrames();
361 } 362 }
362 363
363 void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor) 364 void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor)
364 { 365 {
365 m_textAutosizingFontScaleFactor = fontScaleFactor; 366 m_textAutosizingFontScaleFactor = fontScaleFactor;
367
368 // FIXME: I wonder if this needs to traverse frames like in WebViewImpl::res ize, or whether there is only one document per Settings instance?
369 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->trave rseNext())
370 frame->document()->textAutosizer()->recalculateMultipliers();
371
366 m_page->setNeedsRecalcStyleInAllFrames(); 372 m_page->setNeedsRecalcStyleInAllFrames();
367 } 373 }
368 374
369 #endif 375 #endif
370 376
371 void Settings::setResolutionOverride(const IntSize& densityPerInchOverride) 377 void Settings::setResolutionOverride(const IntSize& densityPerInchOverride)
372 { 378 {
373 if (m_resolutionDensityPerInchOverride == densityPerInchOverride) 379 if (m_resolutionDensityPerInchOverride == densityPerInchOverride)
374 return; 380 return;
375 381
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 gShouldRespectPriorityInCSSAttributeSetters = flag; 710 gShouldRespectPriorityInCSSAttributeSetters = flag;
705 } 711 }
706 712
707 bool Settings::shouldRespectPriorityInCSSAttributeSetters() 713 bool Settings::shouldRespectPriorityInCSSAttributeSetters()
708 { 714 {
709 return gShouldRespectPriorityInCSSAttributeSetters; 715 return gShouldRespectPriorityInCSSAttributeSetters;
710 } 716 }
711 #endif 717 #endif
712 718
713 } // namespace WebCore 719 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/page/FrameView.cpp ('k') | Source/WebCore/rendering/TextAutosizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698