[Webkit-unassigned] [Bug 82978] Web Inspector: flakey test on Lion

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 29 20:41:26 PDT 2013


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





--- Comment #7 from Joseph Pecoraro <joepeck at webkit.org>  2013-08-29 20:40:47 PST ---
Breakthough. Apparently the XMLDocumentParser, when paused, can keep consuming input. So it adds pending callbacks for "startElement":

    void XMLDocumentParser::startElementNs(const xmlChar* xmlLocalName, const xmlChar* xmlPrefix, const xmlChar* xmlURI, int nb_namespaces, const xmlChar** libxmlNamespaces, int nb_attributes, int nb_defaulted, const xmlChar** libxmlAttributes)
    {
        ...
        if (m_parserPaused) {
            m_pendingCallbacks->appendStartElementNSCallback(xmlLocalName, xmlPrefix, xmlURI, nb_namespaces, libxmlNamespaces,
                                                             nb_attributes, nb_defaulted, libxmlAttributes);
            return;
        }

So by the time we replay the pendingCallback, the real libXML parser's context()->input will be far past this particular element. We can save the context information at each startElement and return that when asked for lineNumber/columnNumber.

The line number seems correct (and is only what we care about right now), but the column number is a bit off. At the point in which we get XMLDocumentParser::startElementNs for <svg:style> the libxml parser's context says line (29) and column (22). The column is not quite what we would have wanted: (the | inserted by me)

      <svg:style type=|"text/css">

If we want truly accurate starting line/column information of the contents within the <style> we may need to do some extra work. Especially if we wanted to correctly handle input like:

    <style
        type="text/css">…</style>

For now I don't see any urgency in fixing this so I'm going to drop the issue.

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