[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:31:31 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 98b162846f61c562c7aec6b84fbb2229eb8001b2
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 31 18:43:12 2004 +0000
Fix for 3604241, simple space collapsing results in a doubled character. Simplify the ignoring of
whitespace and make sure it works across absolutely positioned spans.
Reviewed by darin
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::findNextLineBreak):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/block/positioning/auto/005-expected.txt b/LayoutTests/fast/block/positioning/auto/005-expected.txt
index dcb2f78..5c0c557 100644
--- a/LayoutTests/fast/block/positioning/auto/005-expected.txt
+++ b/LayoutTests/fast/block/positioning/auto/005-expected.txt
@@ -12,10 +12,8 @@ layer at (0,0) size 800x88
text run at (0,36) width 326: "pixels of padding on the right side of the box stack. "
text run at (326,36) width 455: "The black box's top should be aligned with the end of the last line in this"
text run at (0,54) width 470: "parargaph and its left side should begin right after the end of this sentence. "
- RenderText {TEXT} at (470,54) size 4x18
- text run at (470,54) width 4: " "
- RenderText {TEXT} at (474,54) size 4x18
- text run at (474,54) width 4: " "
+ RenderText {TEXT} at (0,0) size 0x0
+ RenderText {TEXT} at (0,0) size 0x0
layer at (478,62) size 240x340
RenderBlock (positioned) {SPAN} at (478,62) size 240x340 [border: (20px solid #000000)]
RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/fast/block/positioning/auto/006-expected.txt b/LayoutTests/fast/block/positioning/auto/006-expected.txt
index 928ed81..7c7ec99 100644
--- a/LayoutTests/fast/block/positioning/auto/006-expected.txt
+++ b/LayoutTests/fast/block/positioning/auto/006-expected.txt
@@ -16,8 +16,7 @@ layer at (0,0) size 800x130
text run at (14,0) width 770: "The black box's top should be aligned with the end of the last line in this parargaph and its left side should begin right after"
text run at (629,18) width 8: ". "
text run at (637,18) width 147: "the end of this sentence"
- RenderText {TEXT} at (625,18) size 4x18
- text run at (625,18) width 4: " "
+ RenderText {TEXT} at (0,0) size 0x0
layer at (397,96) size 240x340
RenderBlock (positioned) {SPAN} at (397,96) size 240x340 [border: (20px solid #000000)]
RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/fast/clip/007-expected.txt b/LayoutTests/fast/clip/007-expected.txt
index f335e4c..db9756b 100644
--- a/LayoutTests/fast/clip/007-expected.txt
+++ b/LayoutTests/fast/clip/007-expected.txt
@@ -11,8 +11,7 @@ layer at (0,0) size 800x70
text run at (0,18) width 293: "checking to make sure overflow is done using "
text run at (293,18) width 446: "a containing block model, and that a fixed positioned element inside an"
text run at (0,36) width 353: "absolute positioned element is not considered overflow. "
- RenderText {TEXT} at (353,36) size 4x18
- text run at (353,36) width 4: " "
+ RenderText {TEXT} at (0,0) size 0x0
layer at (8,62) size 100x100
RenderBlock (positioned) {DIV} at (8,62) size 100x100
RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/fast/clip/008-expected.txt b/LayoutTests/fast/clip/008-expected.txt
index b66d11c..018cb0a 100644
--- a/LayoutTests/fast/clip/008-expected.txt
+++ b/LayoutTests/fast/clip/008-expected.txt
@@ -11,8 +11,7 @@ layer at (0,0) size 800x70
text run at (0,18) width 293: "checking to make sure overflow is done using "
text run at (293,18) width 446: "a containing block model, and that a fixed positioned element inside an"
text run at (0,36) width 353: "absolute positioned element is not considered overflow. "
- RenderText {TEXT} at (353,36) size 4x18
- text run at (353,36) width 4: " "
+ RenderText {TEXT} at (0,0) size 0x0
layer at (8,62) size 100x100
RenderBlock (positioned) {DIV} at (8,62) size 100x100
RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/fast/invalid/014-expected.txt b/LayoutTests/fast/invalid/014-expected.txt
index 9621a49..450c7c8 100644
--- a/LayoutTests/fast/invalid/014-expected.txt
+++ b/LayoutTests/fast/invalid/014-expected.txt
@@ -7,8 +7,7 @@ layer at (0,0) size 800x64
RenderText {TEXT} at (0,0) size 603x18
text run at (0,0) width 282: "Random tests of some bizarre combinations. "
text run at (282,0) width 321: "H2 should allow a form inside it, but p should not. "
- RenderText {TEXT} at (603,0) size 4x18
- text run at (603,0) width 4: " "
+ RenderText {TEXT} at (0,0) size 0x0
RenderBlock {FORM} at (0,18) size 784x22
RenderSelect {SELECT} at (2,2) size 39x18
RenderText {TEXT} at (0,0) size 0x0
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index cdbb2a8..32cff56 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2004-03-30 David Hyatt <hyatt at apple.com>
+
+ Fix for 3604241, simple space collapsing results in a doubled character. Simplify the ignoring of
+ whitespace and make sure it works across absolutely positioned spans.
+
+ Reviewed by darin
+
+ * khtml/rendering/bidi.cpp:
+ (khtml::RenderBlock::findNextLineBreak):
+
2004-03-30 Darin Adler <darin at apple.com>
Reviewed by Dave.
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 5c2205a..c4ad942 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -2,7 +2,7 @@
* This file is part of the html renderer for KDE.
*
* Copyright (C) 2000 Lars Knoll (knoll at kde.org)
- * Copyright (C) 2003 Apple Computer, Inc.
+ * Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -1718,17 +1718,14 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// This variable is used only if whitespace isn't set to PRE, and it tells us whether
// or not we are currently ignoring whitespace.
bool ignoringSpaces = false;
+ BidiIterator ignoreStart;
// This variable tracks whether the very last character we saw was a space. We use
// this to detect when we encounter a second space so we know we have to terminate
// a run.
bool currentCharacterIsSpace = false;
RenderObject* trailingSpaceObject = 0;
-
- // The pos of the last whitespace char we saw, not to be confused with the lastSpace
- // variable below, which is really the last breakable char.
- int lastSpacePos = 0;
-
+
BidiIterator lBreak = start;
RenderObject *o = start.obj;
@@ -1803,12 +1800,13 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// then start ignoring spaces again.
if (needToSetStaticX || needToSetStaticY) {
trailingSpaceObject = 0;
+ ignoreStart.obj = o;
+ ignoreStart.pos = 0;
if (ignoringSpaces) {
- BidiIterator startMid( 0, o, 0 );
- BidiIterator stopMid ( 0, o, 1 );
- addMidpoint(startMid); // Stop ignoring spaces.
- addMidpoint(stopMid); // Start ignoring again.
+ addMidpoint(ignoreStart); // Stop ignoring spaces.
+ addMidpoint(ignoreStart); // Start ignoring again.
}
+
}
}
} else if (o->isInlineFlow()) {
@@ -1848,7 +1846,6 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
isLineEmpty = false;
ignoringSpaces = false;
currentCharacterIsSpace = false;
- lastSpacePos = 0;
trailingSpaceObject = 0;
if (o->isListMarker() && o->style()->listStylePosition() == OUTSIDE) {
@@ -1924,7 +1921,6 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// Stop ignoring spaces and begin at this
// new point.
ignoringSpaces = false;
- lastSpacePos = 0;
lastSpace = pos; // e.g., "Foo goo", don't add in any of the ignored spaces.
BidiIterator startMid ( 0, o, pos );
addMidpoint(startMid);
@@ -1937,8 +1933,6 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
}
}
- if (currentCharacterIsSpace && !previousCharacterIsSpace)
- lastSpacePos = pos;
tmpW += t->width(lastSpace, pos - lastSpace, f);
if (!appliedStartWidth) {
tmpW += inlineWidth(o, true, false);
@@ -2007,16 +2001,13 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// If we encounter a newline, or if we encounter a
// second space, we need to go ahead and break up this
// run and enter a mode where we start collapsing spaces.
- if (currentCharacterIsSpace && previousCharacterIsSpace){
+ if (currentCharacterIsSpace && previousCharacterIsSpace) {
ignoringSpaces = true;
- }
-
- if (ignoringSpaces) {
+
// We just entered a mode where we are ignoring
// spaces. Create a midpoint to terminate the run
// before the second space.
- BidiIterator endMid ( 0, trailingSpaceObject ? trailingSpaceObject : o, lastSpacePos );
- addMidpoint(endMid);
+ addMidpoint(ignoreStart);
lastSpace = pos;
}
}
@@ -2025,11 +2016,15 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// Stop ignoring spaces and begin at this
// new point.
ignoringSpaces = false;
- lastSpacePos = 0;
lastSpace = pos; // e.g., "Foo goo", don't add in any of the ignored spaces.
BidiIterator startMid ( 0, o, pos );
addMidpoint(startMid);
}
+
+ if (currentCharacterIsSpace && !previousCharacterIsSpace) {
+ ignoreStart.obj = o;
+ ignoreStart.pos = pos;
+ }
if (!isPre && currentCharacterIsSpace && !ignoringSpaces)
trailingSpaceObject = o;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list