Index: Source/WebCore/rendering/style/RenderStyle.cpp |
diff --git a/Source/WebCore/rendering/style/RenderStyle.cpp b/Source/WebCore/rendering/style/RenderStyle.cpp |
index 29cd416f366079bce40626afcca5e5d8c899b690..6f66f561e4529e28a1942a4c9d1939c13c53f0d2 100644 |
--- a/Source/WebCore/rendering/style/RenderStyle.cpp |
+++ b/Source/WebCore/rendering/style/RenderStyle.cpp |
@@ -39,6 +39,7 @@ |
#if ENABLE(TOUCH_EVENTS) |
#include "RenderTheme.h" |
#endif |
+#include "TextAutosizer.h" |
#include "WebCoreMemoryInstrumentation.h" |
#include <wtf/MathExtras.h> |
#include <wtf/MemoryInstrumentationVector.h> |
@@ -46,10 +47,6 @@ |
#include <wtf/StdLibExtras.h> |
#include <algorithm> |
-#if ENABLE(TEXT_AUTOSIZING) |
-#include "TextAutosizer.h" |
-#endif |
- |
using namespace std; |
namespace WebCore { |
@@ -518,10 +515,8 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon |
return StyleDifferenceLayout; |
} |
-#if ENABLE(TEXT_AUTOSIZING) |
if (visual->m_textAutosizingMultiplier != other->visual->m_textAutosizingMultiplier) |
return StyleDifferenceLayout; |
-#endif |
if (inherited->line_height != other->inherited->line_height |
|| inherited->font != other->inherited->font |
@@ -1241,7 +1236,6 @@ Length RenderStyle::specifiedLineHeight() const { return inherited->line_height; |
Length RenderStyle::lineHeight() const |
{ |
const Length& lh = inherited->line_height; |
-#if ENABLE(TEXT_AUTOSIZING) |
// Unlike fontDescription().computedSize() and hence fontSize(), this is |
// recalculated on demand as we only store the specified line height. |
// FIXME: Should consider scaling the fixed part of any calc expressions |
@@ -1249,7 +1243,7 @@ Length RenderStyle::lineHeight() const |
float multiplier = textAutosizingMultiplier(); |
if (multiplier > 1 && lh.isFixed()) |
return Length(TextAutosizer::computeAutosizedFontSize(lh.value(), multiplier), Fixed); |
-#endif |
+ |
return lh; |
} |
void RenderStyle::setLineHeight(Length specifiedLineHeight) { SET_VAR(inherited, line_height, specifiedLineHeight); } |
@@ -1290,13 +1284,11 @@ void RenderStyle::setFontSize(float size) |
desc.setSpecifiedSize(size); |
desc.setComputedSize(size); |
-#if ENABLE(TEXT_AUTOSIZING) |
float multiplier = textAutosizingMultiplier(); |
if (multiplier > 1) { |
float autosizedFontSize = TextAutosizer::computeAutosizedFontSize(size, multiplier); |
desc.setComputedSize(min(maximumAllowedFontSize, autosizedFontSize)); |
} |
-#endif |
setFontDescription(desc); |
font().update(currentFontSelector); |