+2007-10-18 Dan Bernstein <dan.bernstein@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ - test for http://bugs.webkit.org/show_bug.cgi?id=15367
+ Assertion failure inspecting a document including soft hyphen code (0xad)
+
+ * fast/text/word-break-soft-hyphen.html: Added.
+ * platform/mac/fast/text/word-break-soft-hyphen-expected.checksum: Added.
+ * platform/mac/fast/text/word-break-soft-hyphen-expected.png: Added.
+ * platform/mac/fast/text/word-break-soft-hyphen-expected.txt: Added.
+
2007-10-18 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Anders.
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x576
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 53x18
+ text run at (0,0) width 53: "Test for "
+ RenderInline {I} at (0,0) size 781x36
+ RenderInline {A} at (0,0) size 301x18 [color=#0000EE]
+ RenderText {#text} at (53,0) size 301x18
+ text run at (53,0) width 301: "http://bugs.webkit.org/show_bug.cgi?id=15367"
+ RenderText {#text} at (354,0) size 781x36
+ text run at (354,0) width 4: " "
+ text run at (358,0) width 423: "Assertion failure inspecting a document including soft hyphen code"
+ text run at (0,18) width 41: "(0xad)"
+ RenderText {#text} at (41,18) size 4x18
+ text run at (41,18) width 4: "."
+ RenderBlock {P} at (0,52) size 784x18
+ RenderText {#text} at (0,0) size 489x18
+ text run at (0,0) width 489: "The following text should not wrap and the border should fit tightly around it."
+layer at (8,94) size 116x24
+ RenderBlock (positioned) {DIV} at (8,94) size 116x24 [border: (3px solid #000000)]
+ RenderText {#text} at (3,3) size 110x18
+ text run at (3,3) width 57: "Two soft"
+ text run at (60,3) width 24: "hyp"
+ text run at (84,3) width 29: "hens"
+2007-10-18 Dan Bernstein <dan.bernstein@apple.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=15367
+ Assertion failure inspecting a document including soft hyphen code (0xad)
+
+ Test: fast/text/word-break-soft-hyphen.html
+
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::calcPrefWidths): Changed to treat soft hyphens as
+ word boundaries. This fixes the bug and is consistent with the fact that
+ run rounding does occur at soft hyphens.
+
2007-10-18 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Anders.
ignoringSpaces = false;
// Ignore spaces and soft hyphens
- if (ignoringSpaces || c == softHyphen) {
+ if (ignoringSpaces) {
ASSERT(lastWordBoundary == i);
lastWordBoundary++;
continue;
+ } else if (c == softHyphen) {
+ currMaxWidth += widthFromCache(f, lastWordBoundary, i - lastWordBoundary, leadWidth + currMaxWidth);
+ lastWordBoundary = i + 1;
+ continue;
}
bool hasBreak = breakAll || isBreakable(txt, i, len, nextBreakable, breakNBSP);