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

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

Issue 212163006: Revert of Preserve autosizing multiplier on style recalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reverting auto-sizing three patches Created 6 years, 9 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/frame/FrameView.cpp ('k') | Source/core/rendering/FastTextAutosizer.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, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/page/ChromeClient.h" 44 #include "core/page/ChromeClient.h"
45 #include "core/page/ContextMenuController.h" 45 #include "core/page/ContextMenuController.h"
46 #include "core/page/DragController.h" 46 #include "core/page/DragController.h"
47 #include "core/page/FocusController.h" 47 #include "core/page/FocusController.h"
48 #include "core/page/FrameTree.h" 48 #include "core/page/FrameTree.h"
49 #include "core/page/PageLifecycleNotifier.h" 49 #include "core/page/PageLifecycleNotifier.h"
50 #include "core/page/PointerLockController.h" 50 #include "core/page/PointerLockController.h"
51 #include "core/page/StorageClient.h" 51 #include "core/page/StorageClient.h"
52 #include "core/page/ValidationMessageClient.h" 52 #include "core/page/ValidationMessageClient.h"
53 #include "core/page/scrolling/ScrollingCoordinator.h" 53 #include "core/page/scrolling/ScrollingCoordinator.h"
54 #include "core/rendering/FastTextAutosizer.h"
55 #include "core/rendering/RenderView.h" 54 #include "core/rendering/RenderView.h"
56 #include "core/rendering/TextAutosizer.h" 55 #include "core/rendering/TextAutosizer.h"
57 #include "core/storage/StorageNamespace.h" 56 #include "core/storage/StorageNamespace.h"
58 #include "platform/plugins/PluginData.h" 57 #include "platform/plugins/PluginData.h"
59 #include "wtf/HashMap.h" 58 #include "wtf/HashMap.h"
60 #include "wtf/RefCountedLeakCounter.h" 59 #include "wtf/RefCountedLeakCounter.h"
61 #include "wtf/StdLibExtras.h" 60 #include "wtf/StdLibExtras.h"
62 #include "wtf/text/Base64.h" 61 #include "wtf/text/Base64.h"
63 62
64 namespace WebCore { 63 namespace WebCore {
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled() ); 481 (*it)->multisamplingChanged(m_settings->openGLMultisamplingEnabled() );
483 break; 482 break;
484 } 483 }
485 case SettingsDelegate::ImageLoadingChange: 484 case SettingsDelegate::ImageLoadingChange:
486 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) { 485 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) {
487 frame->document()->fetcher()->setImagesEnabled(settings().imagesEnab led()); 486 frame->document()->fetcher()->setImagesEnabled(settings().imagesEnab led());
488 frame->document()->fetcher()->setAutoLoadImages(settings().loadsImag esAutomatically()); 487 frame->document()->fetcher()->setAutoLoadImages(settings().loadsImag esAutomatically());
489 } 488 }
490 break; 489 break;
491 case SettingsDelegate::TextAutosizingChange: 490 case SettingsDelegate::TextAutosizingChange:
492 if (!mainFrame()) 491 // FTA needs both setNeedsRecalcStyle and setNeedsLayout after a setting change.
493 break; 492 if (RuntimeEnabledFeatures::fastTextAutosizingEnabled()) {
494 if (FastTextAutosizer* textAutosizer = mainFrame()->document()->fastText Autosizer()) { 493 setNeedsRecalcStyleInAllFrames();
495 textAutosizer->updatePageInfoInAllFrames();
496 } else { 494 } else {
495 // FIXME: I wonder if this needs to traverse frames like in WebViewI mpl::resize, or whether there is only one document per Settings instance?
497 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().t raverseNext()) { 496 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().t raverseNext()) {
498 if (TextAutosizer* textAutosizer = frame->document()->textAutosi zer()) 497 TextAutosizer* textAutosizer = frame->document()->textAutosizer( );
498 if (textAutosizer)
499 textAutosizer->recalculateMultipliers(); 499 textAutosizer->recalculateMultipliers();
500 } 500 }
501 // TextAutosizing updates RenderStyle during layout phase (via TextA utosizer::processSubtree).
502 // We should invoke setNeedsLayout here.
503 setNeedsLayoutInAllFrames();
504 } 501 }
502 // TextAutosizing updates RenderStyle during layout phase (via TextAutos izer::processSubtree).
503 // We should invoke setNeedsLayout here.
504 setNeedsLayoutInAllFrames();
505 break; 505 break;
506 case SettingsDelegate::ScriptEnableChange: 506 case SettingsDelegate::ScriptEnableChange:
507 m_inspectorController->scriptsEnabled(settings().scriptEnabled()); 507 m_inspectorController->scriptsEnabled(settings().scriptEnabled());
508 break; 508 break;
509 case SettingsDelegate::FontFamilyChange: 509 case SettingsDelegate::FontFamilyChange:
510 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext()) 510 for (LocalFrame* frame = mainFrame(); frame; frame = frame->tree().trave rseNext())
511 frame->document()->styleEngine()->updateGenericFontFamilySettings(); 511 frame->document()->styleEngine()->updateGenericFontFamilySettings();
512 setNeedsRecalcStyleInAllFrames(); 512 setNeedsRecalcStyleInAllFrames();
513 break; 513 break;
514 } 514 }
(...skipping 28 matching lines...) Expand all
543 , spellCheckerClient(0) 543 , spellCheckerClient(0)
544 , storageClient(0) 544 , storageClient(0)
545 { 545 {
546 } 546 }
547 547
548 Page::PageClients::~PageClients() 548 Page::PageClients::~PageClients()
549 { 549 {
550 } 550 }
551 551
552 } // namespace WebCore 552 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/FastTextAutosizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698