Changeset 122081 in webkit


Ignore:
Timestamp:
Jul 8, 2012 9:30:08 PM (12 years ago)
Author:
kseo@webkit.org
Message:

Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition
https://bugs.webkit.org/show_bug.cgi?id=90726

Reviewed by Adam Barth.

HTMLTreeBuilder::m_lastScriptElementStartPosition is of no use. Currently,
m_lastScriptElementStartPosition is used to store the text position in
"script" start tag, and then the stored position is passed to m_scriptToProcessStartPosition
later in "script" end tag. Because HTMLTreeBuilder handles one script tag at
a time, we can store the text position directly to m_scriptToProcessStartPosition
in "script" start tag.

No behavior change, so no new tests.

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::processScriptStartTag):

  • html/parser/HTMLTreeBuilder.h:

(HTMLTreeBuilder):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r122079 r122081  
     12012-07-07  Kwang Yul Seo  <skyul@company100.net>
     2
     3        Remove unnecessary member HTMLTreeBuilder::m_lastScriptElementStartPosition
     4        https://bugs.webkit.org/show_bug.cgi?id=90726
     5
     6        Reviewed by Adam Barth.
     7
     8        HTMLTreeBuilder::m_lastScriptElementStartPosition is of no use. Currently,
     9        m_lastScriptElementStartPosition is used to store the text position in
     10        "script" start tag, and then the stored position is passed to m_scriptToProcessStartPosition
     11        later in "script" end tag. Because HTMLTreeBuilder handles one script tag at
     12        a time, we can store the text position directly to m_scriptToProcessStartPosition
     13        in "script" start tag.
     14
     15        No behavior change, so no new tests.
     16
     17        * html/parser/HTMLTreeBuilder.cpp:
     18        (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
     19        (WebCore::HTMLTreeBuilder::processEndTag):
     20        (WebCore::HTMLTreeBuilder::processScriptStartTag):
     21        * html/parser/HTMLTreeBuilder.h:
     22        (HTMLTreeBuilder):
     23
    1242012-07-08  Philip Rogers  <pdr@google.com>
    225
  • trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp

    r121858 r122081  
    358358    , m_parser(parser)
    359359    , m_scriptToProcessStartPosition(uninitializedPositionValue1())
    360     , m_lastScriptElementStartPosition(TextPosition::belowRangePosition())
    361360    , m_usePreHTML5ParserQuirks(usePreHTML5ParserQuirks)
    362361{
     
    377376    , m_parser(parser)
    378377    , m_scriptToProcessStartPosition(uninitializedPositionValue1())
    379     , m_lastScriptElementStartPosition(TextPosition::belowRangePosition())
    380378    , m_usePreHTML5ParserQuirks(usePreHTML5ParserQuirks)
    381379{
     
    21332131            ASSERT(m_tree.currentElement()->hasTagName(scriptTag));
    21342132            m_scriptToProcess = m_tree.currentElement();
    2135             m_scriptToProcessStartPosition = m_lastScriptElementStartPosition;
    21362133            m_tree.openElements()->pop();
    21372134            if (isParsingFragment() && m_fragmentContext.scriptingPermission() == DisallowScriptingContent)
     
    26472644    TextPosition position = m_parser->textPosition();
    26482645
    2649     m_lastScriptElementStartPosition = position;
     2646    m_scriptToProcessStartPosition = position;
    26502647
    26512648    setInsertionMode(TextMode);
  • trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h

    r117731 r122081  
    237237    TextPosition m_scriptToProcessStartPosition; // Starting line number of the script tag needing processing.
    238238
    239     // FIXME: We probably want to remove this member.  Originally, it was
    240     // created to service the legacy tree builder, but it seems to be used for
    241     // some other things now.
    242     TextPosition m_lastScriptElementStartPosition;
    243 
    244239    bool m_usePreHTML5ParserQuirks;
    245240};
Note: See TracChangeset for help on using the changeset viewer.