Changeset 60940 in webkit


Ignore:
Timestamp:
Jun 9, 2010 11:34:46 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-06-09 Tony Gentilcore <tonyg@chromium.org>

Reviewed by Adam Barth.

HTML5 Parser: Fix fast/profiler tests that depend on event handler line numbers
https://bugs.webkit.org/show_bug.cgi?id=40393

This emulated the old behavior in HTMLTokenizer:processToken()

No new tests because covered by:

  • fast/profiler/dead-time.html
  • fast/profiler/inline-event-handler.html
  • fast/profiler/stop-profiling-after-setTimeout.html
  • fast/profiler/throw-exception-from-eval.html
  • html/HTML5Tokenizer.cpp: (WebCore::HTML5Tokenizer::pumpLexer):
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60937 r60940  
     12010-06-09  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        HTML5 Parser: Fix fast/profiler tests that depend on event handler line numbers
     6        https://bugs.webkit.org/show_bug.cgi?id=40393
     7
     8        This emulated the old behavior in HTMLTokenizer:processToken()
     9
     10        No new tests because covered by:
     11         - fast/profiler/dead-time.html
     12         - fast/profiler/inline-event-handler.html
     13         - fast/profiler/stop-profiling-after-setTimeout.html
     14         - fast/profiler/throw-exception-from-eval.html
     15
     16        * html/HTML5Tokenizer.cpp:
     17        (WebCore::HTML5Tokenizer::pumpLexer):
     18
    1192010-06-09  Alexey Proskuryakov  <ap@apple.com>
    220
  • trunk/WebCore/html/HTML5Tokenizer.cpp

    r60926 r60940  
    9797    ASSERT(!m_treeBuilder->isPaused());
    9898    while (!m_parserStopped && m_lexer->nextToken(m_input.current(), m_token)) {
     99        if (ScriptController* scriptController = script())
     100            scriptController->setEventHandlerLineNumber(lineNumber() + 1);
     101
    99102        m_treeBuilder->constructTreeFromToken(m_token);
    100103        m_token.clear();
     104
     105        if (ScriptController* scriptController = script())
     106            scriptController->setEventHandlerLineNumber(0);
    101107
    102108        if (!m_treeBuilder->isPaused())
  • trunk/WebCore/html/HTML5Tokenizer.h

    r60926 r60940  
    2828
    2929#include "CachedResourceClient.h"
     30#include "Frame.h"
    3031#include "HTML5ScriptRunnerHost.h"
    3132#include "HTML5Token.h"
     33#include "HTMLDocument.h"
    3234#include "SegmentedString.h"
    3335#include "Tokenizer.h"
     
    3941class HTML5ScriptRunner;
    4042class HTML5TreeBuilder;
    41 class HTMLDocument;
     43class ScriptController;
    4244class ScriptSourceCode;
    4345
     
    168170    bool inWrite() const { return m_writeNestingLevel > 0; }
    169171
     172    ScriptController* script() const { return m_document->frame() ? m_document->frame()->script() : 0; }
     173
    170174    InputStream m_input;
    171175
Note: See TracChangeset for help on using the changeset viewer.