Bug 63620 - View source mode has extra space at EOL
Summary: View source mode has extra space at EOL
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keishi Hattori
Depends on:
Reported: 2011-06-29 05:07 PDT by Keishi Hattori
Modified: 2011-06-29 20:05 PDT (History)
4 users (show)

See Also:

patch (8.22 KB, patch)
2011-06-29 05:19 PDT, Keishi Hattori
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cr-linux-02 (1.42 MB, application/zip)
2011-06-29 05:36 PDT, WebKit Review Bot
no flags Details
fixed patch (8.27 KB, patch)
2011-06-29 18:32 PDT, Keishi Hattori
no flags Details | Formatted Diff | Diff
used String() (8.28 KB, patch)
2011-06-29 19:28 PDT, Keishi Hattori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keishi Hattori 2011-06-29 05:07:57 PDT
View source mode has extra space at EOL. If you select the source and copy+paste, the result is different from the original.

Also the last line is empty when there is a "\n" right before EOF. It should show a line, just as an text editor would.
Comment 1 Keishi Hattori 2011-06-29 05:19:57 PDT
Created attachment 99075 [details]
Comment 2 Keishi Hattori 2011-06-29 05:21:38 PDT
Chromium bug is http://code.google.com/p/chromium/issues/detail?id=87726
Comment 3 WebKit Review Bot 2011-06-29 05:36:36 PDT
Comment on attachment 99075 [details]

Attachment 99075 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/8959189

New failing tests:
Comment 4 WebKit Review Bot 2011-06-29 05:36:41 PDT
Created attachment 99078 [details]
Archive of layout-test-results from ec2-cr-linux-02

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-02  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 5 Adam Barth 2011-06-29 08:31:00 PDT
Comment on attachment 99075 [details]

Thank you fix this bug.  It's really annoying.  If you upload a new patch that passes the tests, I'll be happy to review.
Comment 6 Keishi Hattori 2011-06-29 18:32:01 PDT
Created attachment 99200 [details]
fixed patch
Comment 7 Keishi Hattori 2011-06-29 18:40:50 PDT
(In reply to comment #6)
> Created an attachment (id=99200) [details]
> fixed patch

In the previous patch, I must have changed my test after generating the expected results.
Comment 8 Adam Barth 2011-06-29 19:14:02 PDT
Comment on attachment 99200 [details]
fixed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=99200&action=review

> Source/WebCore/html/HTMLViewSourceDocument.cpp:115
> +            addLine("");

Maybe String() to avoid an allocation?
Comment 9 Keishi Hattori 2011-06-29 19:28:49 PDT
Created attachment 99214 [details]
used String()
Comment 10 WebKit Review Bot 2011-06-29 20:03:31 PDT
The commit-queue encountered the following flaky tests while processing attachment 99214 [details]:

fast/flexbox/box-orient-button.html bug 63682 (author: hamaji@chromium.org)
The commit-queue is continuing to process your patch.
Comment 11 WebKit Review Bot 2011-06-29 20:05:17 PDT
Comment on attachment 99214 [details]
used String()

Clearing flags on attachment: 99214

Committed r90082: <http://trac.webkit.org/changeset/90082>
Comment 12 WebKit Review Bot 2011-06-29 20:05:25 PDT
All reviewed patches have been landed.  Closing bug.