Diff
Modified: trunk/Source/WTF/wtf/FeatureDefines.h (163477 => 163478)
--- trunk/Source/WTF/wtf/FeatureDefines.h 2014-02-05 22:21:40 UTC (rev 163477)
+++ trunk/Source/WTF/wtf/FeatureDefines.h 2014-02-05 23:30:10 UTC (rev 163478)
@@ -60,10 +60,6 @@
#define ENABLE_ASYNC_SCROLLING 1
#endif
-#if !defined(ENABLE_8BIT_TEXTRUN)
-#define ENABLE_8BIT_TEXTRUN 1
-#endif
-
#if !defined(ENABLE_CONTEXT_MENUS)
#define ENABLE_CONTEXT_MENUS 0
#endif
@@ -169,10 +165,6 @@
/* --------- Apple MAC port (not IOS) --------- */
#if PLATFORM(MAC) && !PLATFORM(IOS)
-#if !defined(ENABLE_8BIT_TEXTRUN)
-#define ENABLE_8BIT_TEXTRUN 1
-#endif
-
#if !defined(ENABLE_CSS_IMAGE_SET)
#define ENABLE_CSS_IMAGE_SET 1
#endif
@@ -312,10 +304,6 @@
#define ENABLE_SUBPIXEL_LAYOUT 1
#endif
-#if !defined(ENABLE_8BIT_TEXTRUN)
-#define ENABLE_8BIT_TEXTRUN 1
-#endif
-
#endif /* PLATFORM(EFL) */
/* --------- Gtk port (Unix, Windows, Mac) --------- */
@@ -331,10 +319,6 @@
#define ENABLE_SUBPIXEL_LAYOUT 1
#endif
-#if !defined(ENABLE_8BIT_TEXTRUN)
-#define ENABLE_8BIT_TEXTRUN 1
-#endif
-
#endif /* PLATFORM(GTK) */
/* ENABLE macro defaults for WebCore */
@@ -344,10 +328,6 @@
#define ENABLE_3D_RENDERING 0
#endif
-#if !defined(ENABLE_8BIT_TEXTRUN)
-#define ENABLE_8BIT_TEXTRUN 0
-#endif
-
#if !defined(ENABLE_ACCELERATED_2D_CANVAS)
#define ENABLE_ACCELERATED_2D_CANVAS 0
#endif
Modified: trunk/Source/WebCore/ChangeLog (163477 => 163478)
--- trunk/Source/WebCore/ChangeLog 2014-02-05 22:21:40 UTC (rev 163477)
+++ trunk/Source/WebCore/ChangeLog 2014-02-05 23:30:10 UTC (rev 163478)
@@ -1,3 +1,17 @@
+2014-02-05 Andreas Kling <akl...@apple.com>
+
+ Turn on ENABLE(8BIT_TEXTRUN) for everyone.
+ <https://webkit.org/b/128273>
+
+ Reviewed by Anders Carlsson.
+
+ * platform/graphics/TextRun.h:
+ (WebCore::TextRun::TextRun):
+ (WebCore::TextRun::subRun):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::constructTextRun):
+ * rendering/RenderBlock.h:
+
2014-02-05 Enrica Casucci <enr...@apple.com>
WK2: Caret, selections and autocorrection bubbles are incorrectly positioned when inside an iframe.
Modified: trunk/Source/WebCore/platform/graphics/TextRun.h (163477 => 163478)
--- trunk/Source/WebCore/platform/graphics/TextRun.h 2014-02-05 22:21:40 UTC (rev 163477)
+++ trunk/Source/WebCore/platform/graphics/TextRun.h 2014-02-05 23:30:10 UTC (rev 163478)
@@ -59,7 +59,6 @@
typedef unsigned RoundingHacks;
-#if ENABLE(8BIT_TEXTRUN)
TextRun(const LChar* c, unsigned len, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
: m_charactersLength(len)
, m_len(len)
@@ -79,7 +78,6 @@
{
m_data.characters8 = c;
}
-#endif
TextRun(const UChar* c, unsigned len, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)
: m_charactersLength(len)
@@ -117,7 +115,6 @@
, m_disableSpacing(false)
, m_tabSize(0)
{
-#if ENABLE(8BIT_TEXTRUN)
if (m_charactersLength && s.is8Bit()) {
m_data.characters8 = s.characters8();
m_is8Bit = true;
@@ -125,10 +122,6 @@
m_data.characters16 = s.deprecatedCharacters();
m_is8Bit = false;
}
-#else
- m_data.characters16 = s.deprecatedCharacters();
- m_is8Bit = false;
-#endif
}
TextRun subRun(unsigned startOffset, unsigned length) const
@@ -137,14 +130,10 @@
TextRun result = *this;
-#if ENABLE(8BIT_TEXTRUN)
if (is8Bit()) {
result.setText(data8(startOffset), length);
return result;
}
-#else
- ASSERT(!is8Bit());
-#endif
result.setText(data16(startOffset), length);
return result;
}
@@ -166,9 +155,7 @@
return String(m_data.characters16, m_len);
}
-#if ENABLE(8BIT_TEXTRUN)
void setText(const LChar* c, unsigned len) { m_data.characters8 = c; m_len = len; m_is8Bit = true;}
-#endif
void setText(const UChar* c, unsigned len) { m_data.characters16 = c; m_len = len; m_is8Bit = false;}
void setCharactersLength(unsigned charactersLength) { m_charactersLength = charactersLength; }
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (163477 => 163478)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2014-02-05 22:21:40 UTC (rev 163477)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2014-02-05 23:30:10 UTC (rev 163478)
@@ -5413,12 +5413,10 @@
return run;
}
-#if ENABLE(8BIT_TEXTRUN)
TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const LChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
{
return constructTextRunInternal(context, font, characters, length, style, expansion);
}
-#endif
TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const UChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
{
@@ -5427,38 +5425,26 @@
TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const RenderText* text, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
{
-#if ENABLE(8BIT_TEXTRUN)
if (text->is8Bit())
return constructTextRunInternal(context, font, text->characters8(), text->textLength(), style, expansion);
return constructTextRunInternal(context, font, text->characters16(), text->textLength(), style, expansion);
-#else
- return constructTextRunInternal(context, font, text->deprecatedCharacters(), text->textLength(), style, expansion);
-#endif
}
TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const RenderText* text, unsigned offset, unsigned length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
{
ASSERT(offset + length <= text->textLength());
-#if ENABLE(8BIT_TEXTRUN)
if (text->is8Bit())
return constructTextRunInternal(context, font, text->characters8() + offset, length, style, expansion);
return constructTextRunInternal(context, font, text->characters16() + offset, length, style, expansion);
-#else
- return constructTextRunInternal(context, font, text->deprecatedCharacters() + offset, length, style, expansion);
-#endif
}
TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, const String& string, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
{
unsigned length = string.length();
-#if ENABLE(8BIT_TEXTRUN)
if (length && string.is8Bit())
return constructTextRunInternal(context, font, string.characters8(), length, style, expansion, flags);
return constructTextRunInternal(context, font, string.deprecatedCharacters(), length, style, expansion, flags);
-#else
- return constructTextRunInternal(context, font, string.deprecatedCharacters(), length, style, expansion, flags);
-#endif
}
RenderBlock* RenderBlock::createAnonymousWithParentRendererAndDisplay(const RenderObject* parent, EDisplay display)
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (163477 => 163478)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2014-02-05 22:21:40 UTC (rev 163477)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2014-02-05 23:30:10 UTC (rev 163478)
@@ -246,10 +246,8 @@
static TextRun constructTextRun(RenderObject* context, const Font&, const RenderText*, unsigned offset, const RenderStyle&,
TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
-#if ENABLE(8BIT_TEXTRUN)
static TextRun constructTextRun(RenderObject* context, const Font&, const LChar* characters, int length, const RenderStyle&,
TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
-#endif
static TextRun constructTextRun(RenderObject* context, const Font&, const UChar* characters, int length, const RenderStyle&,
TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);