Unreviewed, rolling out r144065.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 19:43:39 +0000 (19:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 19:43:39 +0000 (19:43 +0000)
http://trac.webkit.org/changeset/144065
https://bugs.webkit.org/show_bug.cgi?id=110896

Causing failures and crashes on Chromium Win7 and Win XP
(Requested by schenney on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-26

Source/WebCore:

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::normalizeCharacters):
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
* platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp:
(WebCore::HarfBuzzShaperBase::setNormalizedBuffer):

Source/WebKit/chromium:

* features.gypi:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144084 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi

index 49db21f..5475fb9 100644 (file)
@@ -1,3 +1,18 @@
+2013-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r144065.
+        http://trac.webkit.org/changeset/144065
+        https://bugs.webkit.org/show_bug.cgi?id=110896
+
+        Causing failures and crashes on Chromium Win7 and Win XP
+        (Requested by schenney on #webkit).
+
+        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+        (WebCore::normalizeCharacters):
+        (WebCore::HarfBuzzShaper::HarfBuzzShaper):
+        * platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp:
+        (WebCore::HarfBuzzShaperBase::setNormalizedBuffer):
+
 2013-02-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         [TexMap] Ignore layer repaint request when drawsContent is false
index 51568fc..69ba6ff 100644 (file)
@@ -156,18 +156,10 @@ float HarfBuzzShaper::HarfBuzzRun::xPositionForOffset(unsigned offset)
     return position;
 }
 
-static void normalizeCharacters(const TextRun& run, UChar* destination, int length)
+static void normalizeCharacters(const UChar* source, UChar* destination, int length)
 {
     int position = 0;
     bool error = false;
-    const UChar* source;
-    String stringFor8BitRun;
-    if (run.is8Bit()) {
-        stringFor8BitRun = String::make16BitFrom8BitSource(run.characters8(), run.length());
-        source = stringFor8BitRun.characters16();
-    } else
-        source = run.characters16();
-
     while (position < length) {
         UChar32 character;
         int nextPosition = position;
@@ -190,7 +182,7 @@ HarfBuzzShaper::HarfBuzzShaper(const Font* font, const TextRun& run)
 {
     m_normalizedBuffer = adoptArrayPtr(new UChar[m_run.length() + 1]);
     m_normalizedBufferLength = m_run.length();
-    normalizeCharacters(m_run, m_normalizedBuffer.get(), m_normalizedBufferLength);
+    normalizeCharacters(m_run.characters16(), m_normalizedBuffer.get(), m_normalizedBufferLength);
     setPadding(m_run.expansion());
     setFontFeatures();
 }
index c13dc9f..1b9b7d3 100644 (file)
@@ -94,18 +94,10 @@ void HarfBuzzShaperBase::setNormalizedBuffer(NormalizeMode normalizeMode)
     icu::UnicodeString normalizedString;
     UErrorCode error = U_ZERO_ERROR;
 
-    const UChar* runCharacters;
-    String stringFor8BitRun;
-    if (m_run.is8Bit()) {
-        stringFor8BitRun = String::make16BitFrom8BitSource(m_run.characters8(), m_run.length());
-        runCharacters = stringFor8BitRun.characters16();
-    } else
-        runCharacters = m_run.characters16();
-
     for (int i = 0; i < m_run.length(); ++i) {
-        UChar ch = runCharacters[i];
+        UChar ch = m_run[i];
         if (::ublock_getCode(ch) == UBLOCK_COMBINING_DIACRITICAL_MARKS) {
-            icu::Normalizer::normalize(icu::UnicodeString(runCharacters,
+            icu::Normalizer::normalize(icu::UnicodeString(m_run.characters16(),
                                        m_run.length()), UNORM_NFC, 0 /* no options */,
                                        normalizedString, error);
             if (U_FAILURE(error))
@@ -117,7 +109,7 @@ void HarfBuzzShaperBase::setNormalizedBuffer(NormalizeMode normalizeMode)
     const UChar* sourceText;
     if (normalizedString.isEmpty()) {
         m_normalizedBufferLength = m_run.length();
-        sourceText = runCharacters;
+        sourceText = m_run.characters16();
     } else {
         m_normalizedBufferLength = normalizedString.length();
         sourceText = normalizedString.getBuffer();
index 902e416..89a6728 100644 (file)
@@ -1,3 +1,14 @@
+2013-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r144065.
+        http://trac.webkit.org/changeset/144065
+        https://bugs.webkit.org/show_bug.cgi?id=110896
+
+        Causing failures and crashes on Chromium Win7 and Win XP
+        (Requested by schenney on #webkit).
+
+        * features.gypi:
+
 2013-02-26  Levi Weintraub  <leviw@chromium.org>
 
         Add support for 8 bit TextRuns for Chromium/HarfBuzz
index 6e4d478..ff57d62 100644 (file)
@@ -33,7 +33,6 @@
   'variables': {
     'feature_defines': [
       'ENABLE_3D_PLUGIN=1',
-      'ENABLE_8BIT_TEXTRUN=1',
       'ENABLE_BATTERY_STATUS=0',
       'ENABLE_BLOB=1',
       'ENABLE_BLOB_SLICE=1',