Leading & trailing whitespaces are not showing in the built-in XML Viewer
Reported by
xiaoyuan...@gmail.com,
Jun 26 2017
|
||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36
Example URL:
data:text/xml,<foo>%20bar%20</foo>
Steps to reproduce the problem:
1. Open a XML file with leading and/or trailing spaces, like:
`<foo> bar </foo>`
What is the expected behavior?
In other browsers (IE 11 & Firefox 51), the leading/trailing spaces are kept.
What went wrong?
The space characters next to `bar` disappear in the "document tree" view.
Does it occur on multiple sites: Yes
Is it a problem with a plugin? No
Did this work before? No
Does this work in other browsers? Yes
Chrome version: 59.0.3071.109 Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
I don't know whether this is a bug, or it is designed to trim the text in XML Viewer.
,
Jun 27 2017
Hi tkent@, seems https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.js?l=274 cause this bug, is it right? Also the xml previewer doesn't have any specification (as far as I know), shall we change this to align the behavior with IE and Firefox?
,
Jul 6 2017
Hi tkent@, what's you opinion? Thanks~
,
Mar 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/556a9a41fc89dbf0ba6695379495bdd8f85270c1 commit 556a9a41fc89dbf0ba6695379495bdd8f85270c1 Author: Yuhong Sha <yuhong.sha@samsung.com> Date: Thu Mar 15 11:00:26 2018 Remove the trim operation for text node creation in xml tree. Currently whitespaces can not be shown in the built-in XML Viewer. It is proper to remove trim in text node creation for whitespaces show. Bug: 736690 Signed-off-by: Yuhong Sha <yuhong.sha@samsung.com> Change-Id: I55ca0f61d76f3a45a9dabdd0b5805a2e895e1fc2 Reviewed-on: https://chromium-review.googlesource.com/950489 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#543342} [modify] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/LayoutTests/fast/css/dumpAsText/xml-stylesheet-pi-not-in-prolog-expected.txt [modify] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/LayoutTests/svg/hixie/error/dumpAsText/004-expected.txt [modify] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/LayoutTests/svg/hixie/error/dumpAsText/005-expected.txt [add] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/LayoutTests/xmlviewer/leading-and-trailing-whitespaces-expected.txt [add] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/LayoutTests/xmlviewer/leading-and-trailing-whitespaces.html [add] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/LayoutTests/xmlviewer/resources/leading-and-trailing-whitespaces.xml [modify] https://crrev.com/556a9a41fc89dbf0ba6695379495bdd8f85270c1/third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.js
,
Mar 15 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by tkent@chromium.org
, Jun 26 2017Labels: Hotlist-GoodFirstBug
Status: Available (was: Unconfirmed)