Title: [104322] trunk
- Revision
- 104322
- Author
- [email protected]
- Date
- 2012-01-06 12:30:15 -0800 (Fri, 06 Jan 2012)
Log Message
ASSERT failure due to combine-text with preceding spaces
https://bugs.webkit.org/show_bug.cgi?id=65147
Patch by Ken Buchanan <[email protected]> on 2012-01-06
Reviewed by David Hyatt.
Source/WebCore:
A couple of ASSERTs were failing due to a parsing problem when
advancing an inline iterator to the next linebreak in a
RenderCombineText. skipLeadingWhitespace advances the iterator
over leading whitespace but when searching for the line break
nextLineBreak would call RenderCombineText::combineText(),
collapsing the text so that the iterator is pointing past the
end of it.
This patch causes combineText() to be called during
skipLeadingWhiteSpace before iteration over the RenderCombineText
begins.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
LayoutTests:
New test with combine-text that begins with mutiple spaces,
showing ASSERT failures in bug 65147.
* fast/text/international/spaces-combined-in-vertical-text.html: Added
* fast/text/international/spaces-combined-in-vertical-text-expected.txt: Added
Modified Paths
Added Paths
Property Changed
Diff
Modified: trunk/LayoutTests/ChangeLog (104321 => 104322)
--- trunk/LayoutTests/ChangeLog 2012-01-06 20:25:40 UTC (rev 104321)
+++ trunk/LayoutTests/ChangeLog 2012-01-06 20:30:15 UTC (rev 104322)
@@ -1,3 +1,16 @@
+2012-01-06 Ken Buchanan <[email protected]>
+
+ ASSERT failure due to combine-text with preceding spaces
+ https://bugs.webkit.org/show_bug.cgi?id=65147
+
+ Reviewed by David Hyatt.
+
+ New test with combine-text that begins with mutiple spaces,
+ showing ASSERT failures in bug 65147.
+
+ * fast/text/international/spaces-combined-in-vertical-text.html: Added
+ * fast/text/international/spaces-combined-in-vertical-text-expected.txt: Added
+
2012-01-06 Abhishek Arya <[email protected]>
Crash with range selection across different documents.
Property changes on: trunk/LayoutTests/ChangeLog
___________________________________________________________________
Added: svn:executable
Added: trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text-expected.txt (0 => 104322)
--- trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text-expected.txt 2012-01-06 20:30:15 UTC (rev 104322)
@@ -0,0 +1 @@
+
Property changes on: trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text-expected.txt
___________________________________________________________________
Added: svn:executable
Added: trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text.html (0 => 104322)
--- trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text.html (rev 0)
+++ trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text.html 2012-01-06 20:30:15 UTC (rev 104322)
@@ -0,0 +1,9 @@
+<body
+style="-webkit-columns: rosybrown; -webkit-writing-mode: vertical-lr; ">
+<div style="-webkit-hyphenate-character: floating; zoom: 900; -webkit-text-combine: horizontal; font-size: 600; ">
+ PASS if no ASSERT fail or crash in debug build.</div></body>
+
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
Property changes on: trunk/LayoutTests/fast/text/international/spaces-combined-in-vertical-text.html
___________________________________________________________________
Added: svn:executable
Modified: trunk/Source/WebCore/ChangeLog (104321 => 104322)
--- trunk/Source/WebCore/ChangeLog 2012-01-06 20:25:40 UTC (rev 104321)
+++ trunk/Source/WebCore/ChangeLog 2012-01-06 20:30:15 UTC (rev 104322)
@@ -1,3 +1,26 @@
+2012-01-06 Ken Buchanan <[email protected]>
+
+ ASSERT failure due to combine-text with preceding spaces
+ https://bugs.webkit.org/show_bug.cgi?id=65147
+
+ Reviewed by David Hyatt.
+
+ A couple of ASSERTs were failing due to a parsing problem when
+ advancing an inline iterator to the next linebreak in a
+ RenderCombineText. skipLeadingWhitespace advances the iterator
+ over leading whitespace but when searching for the line break
+ nextLineBreak would call RenderCombineText::combineText(),
+ collapsing the text so that the iterator is pointing past the
+ end of it.
+
+ This patch causes combineText() to be called during
+ skipLeadingWhiteSpace before iteration over the RenderCombineText
+ begins.
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::LineBreaker::nextLineBreak):
+ (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
+
2012-01-06 Anders Carlsson <[email protected]>
Make ScrollAnimatorMac::snapRubberBandTimerFired use m_scrollElasticityController in more places
Property changes on: trunk/Source/WebCore/ChangeLog
___________________________________________________________________
Added: svn:executable
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (104321 => 104322)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2012-01-06 20:25:40 UTC (rev 104321)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2012-01-06 20:30:15 UTC (rev 104322)
@@ -1889,6 +1889,10 @@
}
} else if (object->isFloating())
m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRenderBox(object)), lastFloatFromPreviousLine, lineInfo, width);
+ else if (object->isText() && object->style()->hasTextCombine() && object->isCombineText()) {
+ toRenderCombineText(object)->combineText();
+ continue;
+ }
resolver.increment();
}
resolver.commitExplicitEmbedding();
@@ -2279,7 +2283,7 @@
#endif
RenderStyle* style = t->style(lineInfo.isFirstLine());
- if (style->hasTextCombine() && current.m_obj->isCombineText())
+ if (style->hasTextCombine() && current.m_obj->isCombineText() && !toRenderCombineText(current.m_obj)->isCombined())
toRenderCombineText(current.m_obj)->combineText();
const Font& f = style->font();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes