| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |