Title: [131764] branches/chromium/1271
Revision
131764
Author
[email protected]
Date
2012-10-18 09:59:09 -0700 (Thu, 18 Oct 2012)

Log Message

Merge 153128 - Source/WebCore: [HarfBuzz] harfbuzz expects log_clusters to have same length as other buffers.
BUG=155474
Review URL: https://codereview.chromium.org/11192060

Modified Paths

Added Paths

Diff

Copied: branches/chromium/1271/LayoutTests/fast/text/international/harfbuzz-buffer-overrun-expected.txt (from rev 129938, trunk/LayoutTests/fast/text/international/harfbuzz-buffer-overrun-expected.txt) (0 => 131764)


--- branches/chromium/1271/LayoutTests/fast/text/international/harfbuzz-buffer-overrun-expected.txt	                        (rev 0)
+++ branches/chromium/1271/LayoutTests/fast/text/international/harfbuzz-buffer-overrun-expected.txt	2012-10-18 16:59:09 UTC (rev 131764)
@@ -0,0 +1 @@
+PASS: does not crash

Copied: branches/chromium/1271/LayoutTests/fast/text/international/harfbuzz-buffer-overrun.html (from rev 129938, trunk/LayoutTests/fast/text/international/harfbuzz-buffer-overrun.html) (0 => 131764)


--- branches/chromium/1271/LayoutTests/fast/text/international/harfbuzz-buffer-overrun.html	                        (rev 0)
+++ branches/chromium/1271/LayoutTests/fast/text/international/harfbuzz-buffer-overrun.html	2012-10-18 16:59:09 UTC (rev 131764)
@@ -0,0 +1,14 @@
+<html>
+<body>
+<p>&#3635;&#3648;</p>
+<script>
+// Force layout.
+document.body.offsetTop;
+
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+document.body.innerHTML = "PASS: does not crash";
+</script>
+</body>
+</html>

Modified: branches/chromium/1271/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp (131763 => 131764)


--- branches/chromium/1271/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp	2012-10-18 16:55:46 UTC (rev 131763)
+++ branches/chromium/1271/Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp	2012-10-18 16:59:09 UTC (rev 131764)
@@ -70,8 +70,6 @@
     // padding and fallback if we find that we are wrong.
     createGlyphArrays((m_normalizedBufferLength + 2) * 2);
 
-    m_item.log_clusters = new unsigned short[m_normalizedBufferLength];
-
     m_item.face = 0;
     m_item.font = allocHarfbuzzFont();
 
@@ -90,7 +88,6 @@
 {
     fastFree(m_item.font);
     deleteGlyphArrays();
-    delete[] m_item.log_clusters;
 }
 
 void ComplexTextController::reset(int offset)
@@ -299,6 +296,7 @@
     delete[] m_item.attributes;
     delete[] m_item.advances;
     delete[] m_item.offsets;
+    delete[] m_item.log_clusters;
     delete[] m_glyphs16;
     delete[] m_positions;
 }
@@ -309,6 +307,7 @@
     m_item.attributes = new HB_GlyphAttributes[size];
     m_item.advances = new HB_Fixed[size];
     m_item.offsets = new HB_FixedPoint[size];
+    m_item.log_clusters = new unsigned short[size];
 
     m_glyphs16 = new uint16_t[size];
     m_positions = new SkPoint[size];
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to