New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769626 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Superfluous XML namespace declarations when serializing

Reported by sgij...@opentext.com, Sep 28 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. testDoc = new DOMParser().parseFromString('<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:head><outer xmlns=""><failure>cc</failure></outer></xhtml:head></xhtml:html>',"text/xml")
2. new XMLSerializer().serializeToString(testDoc)

What is the expected behavior?
Following result:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:head><outer xmlns=""><failure>cc</failure></outer></xhtml:head></xhtml:html>

What went wrong?
Following result, note the superfluous xmlns declaration on the failure element:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:head><outer xmlns=""><failure xmlns="">cc</failure></outer></xhtml:head></xhtml:html>"

Did this work before? Yes Chrome 60

Does this work in other browsers? Yes

Chrome version: 61.0.3163.100  Channel: stable
OS Version: Linux Mint Debian Edition
Flash Version: None
 
Labels: Needs-Bisect Needs-Triage-M61
Cc: sc00335...@techmahindra.com
Labels: Triaged-ET Needs-Feedback
Unable to reproduce this issue on Ubuntu 14.04 ,Mac 10.12.6 and Windows 10 using chrome stable 61.0.3169.100 and latest dev 63.0.3227.0 with steps mentioned in comment#0.

1.Downloaded and opened attached xml file in browser.
2.In console of devtools no output is seen.
3.In elements tab and sources tab <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:head>
        <outer xmlns=""><failure>cc</failure></outer>
</xhtml:head>
</xhtml:html> is seen. Attaching video for reference.

@Reporter:  Could you please check and the screen cast and let us know whether we are missing any steps? and could you tell us where to check the output? 
Issue 769626.png
98.9 KB View Download
Based on the posted report, it seems the steps to reproduce were not followed.

I deleted the attached file, as it only contained the same XML as in the steps to reproduce and was apparently misleading with regards to testing this issue.

Executing the steps to reproduce in the Console should show the issue.
Project Member

Comment 4 by sheriffbot@chromium.org, Sep 29 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "sc00335628@techmahindra.com" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Able to reproduce this issue with steps mentioned in 
comment#0 on reported version 61.0.3163.100 , on latest
 stable 61.0.3163.100 and on latest canary 63.0.3225.0 
using Mac 10.12.6, Ubuntu 14.04 and Windows 10.

Manual Bisect Info:
===============
Good Build: 61.0.3136.0
Bad Build: 61.0.3137.0

You are probably looking for a change made after 480789 (known good), but no later than 480790 (first known bad).

CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/14f53c5be474c4492cbbe36b8fe816013124ab86..758742204e186ac83e73b4a393bdfaa660e2ca15

From above CL suspecting the below change
https://chromium.googlesource.com/chromium/src/+/758742204e186ac83e73b4a393bdfaa660e2ca15
tkent@ : Please confirm the bug and help in re-assigning to correct owner if it is not related to your change.

Thanks!!
Cc: ranjitkan@chromium.org pbomm...@chromium.org gov...@chromium.org keerthan...@techmahindra.com
Labels: -Needs-Bisect hasbisect-per-revision M-61 OS-Mac OS-Windows
Owner: tkent@chromium.org
Status: Assigned (was: Unconfirmed)
Looks like tkent@ is unavailable currently, hence re-assigning to yosin@ as the reviewer of CL for inputs.
Owner: yosin@chromium.org

Comment 9 by yosin@chromium.org, Oct 4 2017

Owner: ----
Status: Available (was: Assigned)
Mark Available since I'm not familiar with libxml/libxslt. I've just reviewed
some trivial things.

Please see third_party/libxml/OWNERS
Labels: M-62
Cc: cpu@chromium.org dominicc@chromium.org
Labels: -Pri-2 Pri-1
As per comment #9 cc'ing few file owner for more updates on this issue and changing priority to P1.

Thanks!
Cc: -dominicc@chromium.org sshruthi@chromium.org
cc'ing shruthi to help us find the write owner for this issue.
Cc: dcheng@chromium.org
cc dcheng@, looks like you are the right POC for Blink>XML now. Could you please help find an owner for this issue?
Cc: scottmg@chromium.org
Looks like scottmg@ and dcheng@ would be the POCs for Blink>XML, so cc-ing scottmg@ as well
Cc: -cpu@chromium.org -dcheng@chromium.org -scottmg@chromium.org
Components: Blink>Editing
Labels: -Pri-1 Pri-3
Owner: tkent@chromium.org
Status: Started (was: Available)
This issue isn't related to libxml and libxslt.  The code is in core/editing/serializers/.

Priority isn't hight. Superfluous xmlns="" is harmless.
Project Member

Comment 16 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f839ffc0c3887ce9df2eb58517437fcff2f2026

commit 4f839ffc0c3887ce9df2eb58517437fcff2f2026
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Oct 06 06:22:28 2017

XMLSerializer: Fix existence check of xmlns="".

The URI value for xmlns="" stored in |Namespace| is an empty string
because it's based on attribute value, and |namespace_uri| argument of
AppendNamespace() is a null string because it's based on
QualifiedName::NamespaceURI(). AppendNamespace() needs to care of this
difference.

Bug:  769626 
Change-Id: Ib38bbacd7652f359e526c26f180c6a9ef78da109
Reviewed-on: https://chromium-review.googlesource.com/704274
Commit-Queue: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506993}
[modify] https://crrev.com/4f839ffc0c3887ce9df2eb58517437fcff2f2026/third_party/WebKit/LayoutTests/external/wpt/domparsing/XMLSerializer-serializeToString.html
[modify] https://crrev.com/4f839ffc0c3887ce9df2eb58517437fcff2f2026/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp

Labels: -M-61 -M-62 -Needs-Triage-M61 M-63
Status: Fixed (was: Started)

Sign in to add a comment