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

Side by Side Diff: Source/WebCore/rendering/TextAutosizer.cpp

Issue 11862015: Merge 139356 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
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 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 Frame* mainFrame = m_document->page()->mainFrame(); 61 Frame* mainFrame = m_document->page()->mainFrame();
62 62
63 TextAutosizingWindowInfo windowInfo; 63 TextAutosizingWindowInfo windowInfo;
64 64
65 // Window area, in logical (density-independent) pixels. 65 // Window area, in logical (density-independent) pixels.
66 windowInfo.windowSize = m_document->settings()->textAutosizingWindowSizeOver ride(); 66 windowInfo.windowSize = m_document->settings()->textAutosizingWindowSizeOver ride();
67 if (windowInfo.windowSize.isEmpty()) { 67 if (windowInfo.windowSize.isEmpty()) {
68 bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWid thOverride(mainFrame); 68 bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWid thOverride(mainFrame);
69 windowInfo.windowSize = mainFrame->view()->visibleContentRect(includeScr ollbars).size(); 69 windowInfo.windowSize = mainFrame->view()->visibleContentRect(includeScr ollbars).size();
70 if (!m_document->settings()->applyPageScaleFactorInCompositor()) 70 if (!m_document->settings()->applyDeviceScaleFactorInCompositor())
71 windowInfo.windowSize.scale(1 / m_document->page()->deviceScaleFacto r()); 71 windowInfo.windowSize.scale(1 / m_document->page()->deviceScaleFacto r());
72 } 72 }
73 73
74 // Largest area of block that can be visible at once (assuming the main 74 // Largest area of block that can be visible at once (assuming the main
75 // frame doesn't get scaled to less than overview scale), in CSS pixels. 75 // frame doesn't get scaled to less than overview scale), in CSS pixels.
76 windowInfo.minLayoutSize = mainFrame->view()->layoutSize(); 76 windowInfo.minLayoutSize = mainFrame->view()->layoutSize();
77 for (Frame* frame = m_document->frame(); frame; frame = frame->tree()->paren t()) { 77 for (Frame* frame = m_document->frame(); frame; frame = frame->tree()->paren t()) {
78 if (!frame->view()->isInChildFrameWithFrameFlattening()) 78 if (!frame->view()->isInChildFrameWithFrameFlattening())
79 windowInfo.minLayoutSize = windowInfo.minLayoutSize.shrunkTo(frame-> view()->layoutSize()); 79 windowInfo.minLayoutSize = windowInfo.minLayoutSize.shrunkTo(frame-> view()->layoutSize());
80 } 80 }
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 child = (direction == FirstToLast) ? child->nextSibling() : child->previ ousSibling(); 379 child = (direction == FirstToLast) ? child->nextSibling() : child->previ ousSibling();
380 } 380 }
381 --depth; 381 --depth;
382 382
383 return 0; 383 return 0;
384 } 384 }
385 385
386 } // namespace WebCore 386 } // namespace WebCore
387 387
388 #endif // ENABLE(TEXT_AUTOSIZING) 388 #endif // ENABLE(TEXT_AUTOSIZING)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/chromium/PlatformScreenChromium.cpp ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698