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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 25 10:06:00 PST 2011


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





--- Comment #29 from Alexey Proskuryakov <ap at webkit.org>  2011-02-25 10:05:59 PST ---
(From update of attachment 83826)
View in context: https://bugs.webkit.org/attachment.cgi?id=83826&action=review

Looks good to me.

> LayoutTests/http/tests/xmlviewer/dumpAsText/xmlviewer-charset-utf8.xml:4
> +  <message>Text in the next node should be in Russian</message>
> +  <utf8>Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства.</utf8>

One trick I often use is to have "SUCCESS" spelled with Cyrillic "CCE". That way, even a person who doesn't know Russian will be able to see if the results are correct.

> Source/WebCore/dom/XMLDocumentParserLibxml2.cpp:1342
> +            document()->setParsing(false); // Make the doc think it's done, so it will apply xsl sheets.

Please don't abbreviate "document", and spell "XSL stylesheets".

> Source/WebCore/xml/XMLTreeViewer.cpp:104
> +    // FIXME: We should introduce error handling

Is this something worth filing a bug for?

> Source/WebCore/xml/XSLStyleSheet.h:28
> +#include "Document.h"

Is this #include necessary?

> Source/WebCore/xml/XSLStyleSheet.h:73
> +    static PassRefPtr<XSLStyleSheet> createFromString(Document* document, const String& sheetString)
> +    {
> +        RefPtr<XSLStyleSheet> sheet = adoptRef(new XSLStyleSheet(document, String(), KURL(), false));
> +        sheet->parseString(sheetString);
> +
> +        return sheet.release();
> +    }

Please consider giving this function a less generic name, so that it's less likely to be misused later. Maybe createFromStringWithNullURL? Or createForXMLTreeViewer(), matching the existing createForXSLTProcessor()?

-- 
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