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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 return 0; | 131 return 0; |
132 } | 132 } |
133 | 133 |
134 TextAutosizer::TextAutosizer(Document* document) | 134 TextAutosizer::TextAutosizer(Document* document) |
135 : m_document(document) | 135 : m_document(document) |
136 , m_contentType(Unknown) | 136 , m_contentType(Unknown) |
137 { | 137 { |
138 } | 138 } |
139 | 139 |
140 TextAutosizer::~TextAutosizer() | |
141 { | |
142 } | |
143 | |
144 void TextAutosizer::recalculateMultipliers() | 140 void TextAutosizer::recalculateMultipliers() |
145 { | 141 { |
146 RenderObject* renderer = m_document->renderer(); | 142 RenderObject* renderer = m_document->renderer(); |
147 while (renderer) { | 143 while (renderer) { |
148 if (renderer->style() && renderer->style()->textAutosizingMultiplier() !
= 1) | 144 if (renderer->style() && renderer->style()->textAutosizingMultiplier() !
= 1) |
149 setMultiplier(renderer, 1); | 145 setMultiplier(renderer, 1); |
150 renderer = renderer->nextInPreOrder(); | 146 renderer = renderer->nextInPreOrder(); |
151 } | 147 } |
152 } | 148 } |
153 | 149 |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 if (i + 1 < clusterInfos.size()) { | 724 if (i + 1 < clusterInfos.size()) { |
729 float currentWidth = clusterInfos[i].root->contentLogicalWidth(); | 725 float currentWidth = clusterInfos[i].root->contentLogicalWidth(); |
730 float nextWidth = clusterInfos[i + 1].root->contentLogicalWidth(); | 726 float nextWidth = clusterInfos[i + 1].root->contentLogicalWidth(); |
731 if (currentWidth - nextWidth > maxWidthDifferenceWithinGroup) | 727 if (currentWidth - nextWidth > maxWidthDifferenceWithinGroup) |
732 groups.grow(groups.size() + 1); | 728 groups.grow(groups.size() + 1); |
733 } | 729 } |
734 } | 730 } |
735 } | 731 } |
736 | 732 |
737 } // namespace WebCore | 733 } // namespace WebCore |
OLD | NEW |