[Webkit-unassigned] [Bug 13807] XML without style should render as syntax-highlighted source

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 16 08:12:40 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=13807


Vsevolod Vlasov <vsevik at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #80435|0                           |1
        is obsolete|                            |
  Attachment #80455|0                           |1
        is obsolete|                            |




--- Comment #24 from Vsevolod Vlasov <vsevik at chromium.org>  2011-02-16 08:12:39 PST ---
Created an attachment (id=82640)
 --> (https://bugs.webkit.org/attachment.cgi?id=82640&action=review)
Patch

Here is a new patch with everything discussed taken into account.

1) Developer Extras Flag:

As discussed XML viewer is shown only when developer extras flag is set.

2) Reusing treeoutline.js:

Implementing XML viewer using treeoutline.js is unreasonably complex.
We would need to pass text nodes content in the javascript methods, so we would need to escape these texts.
This escaping for javascript in XSLT stylesheet would be not only complex but error-prone.
Instead of that I reused viewsource.css styles and made xml viewer look similar to inspector by reusing arrow images.

3) Performance tests:

This patch does not slow down PerformanceTests/parser/xml-parser.htnl tests mentioned above.
In fact all checks are done using boolean fields set during parsing, so there is no any time-consuming tasks.

4) Localization:

Currently errors in XML / XSLT are reported without localization.
Thus this patch does not make it worse. 
The message itself is passed to XSLT as a parameter, so these could be easily localized together as a next step.

5) Hixie's tests:

Some of the Hixie's tests are not passed:

- XUL and XLink attributes in XML document are not processed currently, so their presence does not disable xml viewer.
   http://www.hixie.ch/tests/adhoc/xml/styling/004.xml - XUL
   http://www.hixie.ch/tests/evil/xml/009.xml - XLink

- Styles passed in HTTP headers are not processed in XML document currently, so their presence does not disable xml viewer.
   http://www.hixie.ch/tests/evil/xml/006.xml

- MathML test is passed when MathML is enabled
   http://localhost/xml/hixie/styling/003.xml

- http://www.hixie.ch/tests/adhoc/xml/styling/pi/
   These tests give the same results with and without this change.

6) Layout Tests

Several layout tests are introduced to test XML viewer layout and behavior on XML documents having style information.

To force dumping XML documents without style information as text DumpRenderTree is changed to dump as text all tests having "dumpAsText/" in their path. This change is currently made only in Chromium, Mac and GTK ports.
Also resetting of frame opener is added in resetTestController-like functions to avoid side effects of running some naigation tests together with XML viewer ones. This change is currently made for Chromium only.

Some older layout tests are not passed now since they check behavior on some XML documents without style. Their expected results are still to be changed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list