Commit 6fa3cd2c authored by mitz@apple.com's avatar mitz@apple.com

WebCore:

        Reviewed by Darin Adler.

        - fix a bug where explicit embedding past the end of a line could
          affect text that line

        Test: fast/text/embed-at-end-of-pre-wrap-line.html

        * rendering/bidi.cpp:
        (WebCore::RenderBlock::skipWhitespace): Removed calls to
        setAdjustEmbedding().
        (WebCore::RenderBlock::findNextLineBreak): Added calls to
        setAdjustEmbedding() around skipWhitespace() only where needed.

LayoutTests:

        Reviewed by Darin Adler.

        - test for a bug where explicit embedding past the end of a line could
          affect text that line

        * fast/text/embed-at-end-of-pre-wrap-line.html: Added.
        * platform/mac-leopard/fast/text/embed-at-end-of-pre-wrap-line-expected.checksum: Added.
        * platform/mac-leopard/fast/text/embed-at-end-of-pre-wrap-line-expected.png: Added.
        * platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 44223d5d
2008-02-29 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
- test for a bug where explicit embedding past the end of a line could
affect text that line
* fast/text/embed-at-end-of-pre-wrap-line.html: Added.
* platform/mac-leopard/fast/text/embed-at-end-of-pre-wrap-line-expected.checksum: Added.
* platform/mac-leopard/fast/text/embed-at-end-of-pre-wrap-line-expected.png: Added.
* platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt: Added.
2008-02-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by Darin Adler.
<style>
div { white-space: pre-wrap; border: 1px solid; padding: 4px; width: 70px; margin: 8px 0; }
</style>
<p>
The following boxes should be identical.
</p>
<div>Lorem....... <span style="direction: rtl; unicode-bidi: bidi-override;">muspi</span>
</div>
<div>Lorem....... ipsum
</div>
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 784x584
RenderBlock {P} at (0,0) size 784x18
RenderText {#text} at (0,0) size 257x18
text run at (0,0) width 257: "The following boxes should be identical."
RenderBlock {DIV} at (0,34) size 80x46 [border: (1px solid #000000)]
RenderText {#text} at (5,5) size 70x18
text run at (5,5) width 70: "Lorem......."
text run at (75,5) width 0: " "
RenderInline {SPAN} at (0,0) size 38x18
RenderText {#text} at (5,23) size 38x18
text run at (5,23) width 38 RTL override: "muspi"
RenderText {#text} at (43,23) size 0x18
text run at (43,23) width 0: " "
RenderBlock {DIV} at (0,88) size 80x46 [border: (1px solid #000000)]
RenderText {#text} at (5,5) size 70x36
text run at (5,5) width 70: "Lorem......."
text run at (75,5) width 0: " "
text run at (5,23) width 38: "ipsum"
text run at (43,23) width 0: " "
2008-02-29 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
- fix a bug where explicit embedding past the end of a line could
affect text that line
Test: fast/text/embed-at-end-of-pre-wrap-line.html
* rendering/bidi.cpp:
(WebCore::RenderBlock::skipWhitespace): Removed calls to
setAdjustEmbedding().
(WebCore::RenderBlock::findNextLineBreak): Added calls to
setAdjustEmbedding() around skipWhitespace() only where needed.
2008-02-29 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
......@@ -1227,7 +1227,6 @@ int RenderBlock::skipWhitespace(BidiIterator& it, BidiState& bidi)
// elements quite right. In other words, we need to build this function's work into the normal line
// object iteration process.
int w = lineWidth(m_height);
bidi.setAdjustEmbedding(true);
while (!it.atEnd() && !requiresLineBox(it)) {
RenderObject* o = it.obj;
......@@ -1260,7 +1259,6 @@ int RenderBlock::skipWhitespace(BidiIterator& it, BidiState& bidi)
it.increment(bidi);
}
bidi.setAdjustEmbedding(false);
return w;
}
......@@ -1309,8 +1307,9 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
{
bool appliedStartWidth = start.pos > 0;
// eliminate spaces at beginning of line
bidi.setAdjustEmbedding(true);
int width = skipWhitespace(start, bidi);
bidi.setAdjustEmbedding(false);
int w = 0;
int tmpW = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment