Index: Source/WebCore/rendering/TextAutosizer.cpp |
=================================================================== |
--- Source/WebCore/rendering/TextAutosizer.cpp (revision 143933) |
+++ Source/WebCore/rendering/TextAutosizer.cpp (working copy) |
@@ -91,6 +91,16 @@ |
{ |
} |
+void TextAutosizer::recalculateMultipliers() |
+{ |
+ RenderObject* renderer = m_document->renderer(); |
+ while (renderer) { |
+ if (renderer->style() && renderer->style()->textAutosizingMultiplier() != 1) |
+ setMultiplier(renderer, 1); |
+ renderer = renderer->nextInPreOrder(); |
+ } |
+} |
+ |
bool TextAutosizer::processSubtree(RenderObject* layoutRoot) |
{ |
// FIXME: Text Autosizing should only be enabled when m_document->page()->mainFrame()->view()->useFixedLayout() |
@@ -189,7 +199,7 @@ |
RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(subtreeRoot, subtreeRoot); |
while (descendant) { |
if (descendant->isText()) { |
- if (localMultiplier != descendant->style()->textAutosizingMultiplier()) { |
+ if (localMultiplier != 1 && descendant->style()->textAutosizingMultiplier() == 1) { |
setMultiplier(descendant, localMultiplier); |
setMultiplier(descendant->parent(), localMultiplier); // Parent does line spacing. |
} |