Skip to content
Permalink
Browse files
LayoutTests:
        Reviewed by Hyatt.

        - test for://bugs.webkit.org/show_bug.cgi?id=13071
          REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window

        * fast/loader/resources/text-document-wrapping.txt: Added.
        * fast/loader/text-document-wrapping-expected.checksum: Added.
        * fast/loader/text-document-wrapping-expected.png: Added.
        * fast/loader/text-document-wrapping-expected.txt: Added.
        * fast/loader/text-document-wrapping.html: Added.

WebCore:

        Reviewed by Hyatt.

        - http://bugs.webkit.org/show_bug.cgi?id=13071
          REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window

        Test: fast/loader/text-document-wrapping.html

        * loader/TextDocument.cpp:
        (WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.



Canonical link: https://commits.webkit.org/16998@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Sam Weinig committed Mar 15, 2007
1 parent 79b0d57 commit d09687bb4f69627619bd65020a3a5dfba986490f
@@ -1,3 +1,16 @@
t: 2007-03-15 Mitz Pettel <mitz@webkit.org>

Reviewed by Hyatt.

- test for://bugs.webkit.org/show_bug.cgi?id=13071
REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window

* fast/loader/resources/text-document-wrapping.txt: Added.
* fast/loader/text-document-wrapping-expected.checksum: Added.
* fast/loader/text-document-wrapping-expected.png: Added.
* fast/loader/text-document-wrapping-expected.txt: Added.
* fast/loader/text-document-wrapping.html: Added.

2007-03-14 Mitz Pettel <mitz@webkit.org>

Reviewed by Hyatt.
@@ -0,0 +1,3 @@
This line should wrap with no horizontal scroll bar:

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
@@ -0,0 +1 @@
c359bad668142b5c0874b1d4e0e326f8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,20 @@
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
RenderFrameSet {FRAMESET} at (0,0) size 800x600
RenderFrame {FRAME} at (0,0) size 800x600
layer at (0,0) size 798x596
RenderView at (0,0) size 798x596
layer at (0,0) size 798x596
RenderBlock {HTML} at (0,0) size 798x596
RenderBody {BODY} at (8,8) size 782x575
RenderBlock {PRE} at (0,0) size 782x75
RenderText {#text} at (0,0) size 776x75
text run at (0,0) width 416: "This line should wrap with no horizontal scroll bar:"
text run at (416,0) width 0: " "
text run at (0,15) width 0: " "
text run at (0,30) width 776: "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs"
text run at (0,45) width 776: "tuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl"
text run at (0,60) width 528: "mnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
text run at (528,60) width 0: " "
@@ -0,0 +1,3 @@
<frameset>
<frame src="resources/text-document-wrapping.txt">
</frameset>
@@ -1,3 +1,15 @@
2007-03-14 Mitz Pettel <mitz@webkit.org>

Reviewed by Hyatt.

- http://bugs.webkit.org/show_bug.cgi?id=13071
REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window

Test: fast/loader/text-document-wrapping.html

* loader/TextDocument.cpp:
(WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.

2007-03-14 Mitz Pettel <mitz@webkit.org>

Reviewed by Hyatt.
@@ -119,7 +119,7 @@ bool TextTokenizer::write(const SegmentedString& s, bool appendData)
rootElement->appendChild(body, ec);

RefPtr<Element> preElement = m_doc->createElementNS(xhtmlNamespaceURI, "pre", ec);
preElement->setAttribute("style", "white-space: pre-wrap;", ec);
preElement->setAttribute("style", "word-wrap: break-word; white-space: pre-wrap;", ec);

body->appendChild(preElement, ec);

0 comments on commit d09687b

Please sign in to comment.