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

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
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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 RenderView* view = root->view(); 1302 RenderView* view = root->view();
1308 disableLayoutState = view->shouldDisableLayoutStateForSubtree(ro ot); 1303 disableLayoutState = view->shouldDisableLayoutStateForSubtree(ro ot);
1309 view->pushLayoutState(root); 1304 view->pushLayoutState(root);
1310 } 1305 }
1311 LayoutStateDisabler layoutStateDisabler(disableLayoutState ? root->v iew() : 0); 1306 LayoutStateDisabler layoutStateDisabler(disableLayoutState ? root->v iew() : 0);
1312 1307
1313 m_inLayout = true; 1308 m_inLayout = true;
1314 beginDeferredRepaints(); 1309 beginDeferredRepaints();
1315 forceLayoutParentViewIfNeeded(); 1310 forceLayoutParentViewIfNeeded();
1316 root->layout(); 1311 root->layout();
1317 #if ENABLE(TEXT_AUTOSIZING) 1312
1318 bool autosized = document->textAutosizer()->processSubtree(root); 1313 bool autosized = document->textAutosizer()->processSubtree(root);
1319 if (autosized && root->needsLayout()) 1314 if (autosized && root->needsLayout())
1320 root->layout(); 1315 root->layout();
1321 #endif 1316
1322 endDeferredRepaints(); 1317 endDeferredRepaints();
1323 m_inLayout = false; 1318 m_inLayout = false;
1324 1319
1325 if (subtree) 1320 if (subtree)
1326 root->view()->popLayoutState(root); 1321 root->view()->popLayoutState(root);
1327 } 1322 }
1328 m_layoutRoot = 0; 1323 m_layoutRoot = 0;
1329 } // Reset m_layoutSchedulingEnabled to its previous value. 1324 } // Reset m_layoutSchedulingEnabled to its previous value.
1330 1325
1331 bool neededFullRepaint = m_doFullRepaint; 1326 bool neededFullRepaint = m_doFullRepaint;
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
4034 { 4029 {
4035 #if USE(ACCELERATED_COMPOSITING) 4030 #if USE(ACCELERATED_COMPOSITING)
4036 if (TiledBacking* tiledBacking = this->tiledBacking()) 4031 if (TiledBacking* tiledBacking = this->tiledBacking())
4037 tiledBacking->setScrollingPerformanceLoggingEnabled(flag); 4032 tiledBacking->setScrollingPerformanceLoggingEnabled(flag);
4038 #else 4033 #else
4039 UNUSED_PARAM(flag); 4034 UNUSED_PARAM(flag);
4040 #endif 4035 #endif
4041 } 4036 }
4042 4037
4043 } // namespace WebCore 4038 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698