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

Unified Diff: Source/WebCore/rendering/style/RenderStyle.cpp

Issue 13723004: Remove the ENABLE_TEXT_AUTOSIZING compile-time flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/style/RenderStyle.h ('k') | Source/WebCore/rendering/style/StyleVisualData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/WebCore/rendering/style/RenderStyle.h ('k') | Source/WebCore/rendering/style/StyleVisualData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698