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

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

Issue 13723004: Remove the ENABLE_TEXT_AUTOSIZING compile-time flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/page/Settings.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "RenderLayerBacking.h" 61 #include "RenderLayerBacking.h"
62 #include "RenderPart.h" 62 #include "RenderPart.h"
63 #include "RenderScrollbar.h" 63 #include "RenderScrollbar.h"
64 #include "RenderScrollbarPart.h" 64 #include "RenderScrollbarPart.h"
65 #include "RenderTheme.h" 65 #include "RenderTheme.h"
66 #include "RenderView.h" 66 #include "RenderView.h"
67 #include "ScrollAnimator.h" 67 #include "ScrollAnimator.h"
68 #include "ScrollingCoordinator.h" 68 #include "ScrollingCoordinator.h"
69 #include "Settings.h" 69 #include "Settings.h"
70 #include "StyleResolver.h" 70 #include "StyleResolver.h"
71 #include "TextAutosizer.h"
71 #include "TextResourceDecoder.h" 72 #include "TextResourceDecoder.h"
72 #include "TextStream.h" 73 #include "TextStream.h"
73 74
74 #include <wtf/CurrentTime.h> 75 #include <wtf/CurrentTime.h>
75 #include <wtf/TemporaryChange.h> 76 #include <wtf/TemporaryChange.h>
76 #include <wtf/UnusedParam.h> 77 #include <wtf/UnusedParam.h>
77 78
78 #if USE(ACCELERATED_COMPOSITING) 79 #if USE(ACCELERATED_COMPOSITING)
79 #include "RenderLayerCompositor.h" 80 #include "RenderLayerCompositor.h"
80 #include "TiledBacking.h" 81 #include "TiledBacking.h"
81 #endif 82 #endif
82 83
83 #if ENABLE(SVG) 84 #if ENABLE(SVG)
84 #include "RenderSVGRoot.h" 85 #include "RenderSVGRoot.h"
85 #include "SVGDocument.h" 86 #include "SVGDocument.h"
86 #include "SVGSVGElement.h" 87 #include "SVGSVGElement.h"
87 #endif 88 #endif
88 89
89 #if USE(TILED_BACKING_STORE) 90 #if USE(TILED_BACKING_STORE)
90 #include "TiledBackingStore.h" 91 #include "TiledBackingStore.h"
91 #endif 92 #endif
92 93
93 #if ENABLE(TEXT_AUTOSIZING)
94 #include "TextAutosizer.h"
95 #endif
96
97 #if PLATFORM(CHROMIUM) 94 #if PLATFORM(CHROMIUM)
98 #include "TraceEvent.h" 95 #include "TraceEvent.h"
99 #endif 96 #endif
100 97
101 namespace WebCore { 98 namespace WebCore {
102 99
103 using namespace HTMLNames; 100 using namespace HTMLNames;
104 101
105 double FrameView::sCurrentPaintTimeStamp = 0.0; 102 double FrameView::sCurrentPaintTimeStamp = 0.0;
106 103
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 renderer->borderTop() + renderer->paddingTop()); 441 renderer->borderTop() + renderer->paddingTop());
445 renderer->repaintRectangle(repaintRect); 442 renderer->repaintRectangle(repaintRect);
446 } 443 }
447 444
448 void FrameView::setFrameRect(const IntRect& newRect) 445 void FrameView::setFrameRect(const IntRect& newRect)
449 { 446 {
450 IntRect oldRect = frameRect(); 447 IntRect oldRect = frameRect();
451 if (newRect == oldRect) 448 if (newRect == oldRect)
452 return; 449 return;
453 450
454 #if ENABLE(TEXT_AUTOSIZING)
455 // Autosized font sizes depend on the width of the viewing area. 451 // Autosized font sizes depend on the width of the viewing area.
456 if (newRect.width() != oldRect.width()) { 452 if (newRect.width() != oldRect.width()) {
457 Page* page = m_frame ? m_frame->page() : 0; 453 Page* page = m_frame ? m_frame->page() : 0;
458 if (page && page->mainFrame() == m_frame && page->settings()->textAutosi zingEnabled()) { 454 if (page && page->mainFrame() == m_frame && page->settings()->textAutosi zingEnabled()) {
459 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()- >traverseNext()) 455 for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()- >traverseNext())
460 m_frame->document()->textAutosizer()->recalculateMultipliers(); 456 m_frame->document()->textAutosizer()->recalculateMultipliers();
461 } 457 }
462 } 458 }
463 #endif
464 459
465 ScrollView::setFrameRect(newRect); 460 ScrollView::setFrameRect(newRect);
466 461
467 updateScrollableAreaSet(); 462 updateScrollableAreaSet();
468 463
469 #if USE(ACCELERATED_COMPOSITING) 464 #if USE(ACCELERATED_COMPOSITING)
470 if (RenderView* renderView = this->renderView()) { 465 if (RenderView* renderView = this->renderView()) {
471 if (renderView->usesCompositing()) 466 if (renderView->usesCompositing())
472 renderView->compositor()->frameViewDidChangeSize(); 467 renderView->compositor()->frameViewDidChangeSize();
473 } 468 }
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 RenderView* view = root->view(); 1221 RenderView* view = root->view();
1227 disableLayoutState = view->shouldDisableLayoutStateForSubtree(ro ot); 1222 disableLayoutState = view->shouldDisableLayoutStateForSubtree(ro ot);
1228 view->pushLayoutState(root); 1223 view->pushLayoutState(root);
1229 } 1224 }
1230 LayoutStateDisabler layoutStateDisabler(disableLayoutState ? root->v iew() : 0); 1225 LayoutStateDisabler layoutStateDisabler(disableLayoutState ? root->v iew() : 0);
1231 1226
1232 m_inLayout = true; 1227 m_inLayout = true;
1233 beginDeferredRepaints(); 1228 beginDeferredRepaints();
1234 forceLayoutParentViewIfNeeded(); 1229 forceLayoutParentViewIfNeeded();
1235 root->layout(); 1230 root->layout();
1236 #if ENABLE(TEXT_AUTOSIZING) 1231
1237 bool autosized = document->textAutosizer()->processSubtree(root); 1232 bool autosized = document->textAutosizer()->processSubtree(root);
1238 if (autosized && root->needsLayout()) 1233 if (autosized && root->needsLayout())
1239 root->layout(); 1234 root->layout();
1240 #endif 1235
1241 endDeferredRepaints(); 1236 endDeferredRepaints();
1242 m_inLayout = false; 1237 m_inLayout = false;
1243 1238
1244 if (subtree) 1239 if (subtree)
1245 root->view()->popLayoutState(root); 1240 root->view()->popLayoutState(root);
1246 } 1241 }
1247 m_layoutRoot = 0; 1242 m_layoutRoot = 0;
1248 } // Reset m_layoutSchedulingEnabled to its previous value. 1243 } // Reset m_layoutSchedulingEnabled to its previous value.
1249 1244
1250 bool neededFullRepaint = m_doFullRepaint; 1245 bool neededFullRepaint = m_doFullRepaint;
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after
3822 if (frame() && frame()->document()) 3817 if (frame() && frame()->document())
3823 return frame()->document()->existingAXObjectCache(); 3818 return frame()->document()->existingAXObjectCache();
3824 return 0; 3819 return 0;
3825 } 3820 }
3826 3821
3827 void FrameView::setScrollingPerformanceLoggingEnabled(bool) 3822 void FrameView::setScrollingPerformanceLoggingEnabled(bool)
3828 { 3823 {
3829 } 3824 }
3830 3825
3831 } // namespace WebCore 3826 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/page/Settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698