Rename toScriptElement -> toScriptElementIfPossible
authorpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Mar 2013 05:04:38 +0000 (05:04 +0000)
committerpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Mar 2013 05:04:38 +0000 (05:04 +0000)
commit707b53d672dbc8555d0ca922e7e7f896b0e38460
tree4e4fa3a779c06a28d1957c09d53cf47ee59a2fe2
parent7213feb0b48af30e51be255708b89e5b83b78620
Rename toScriptElement -> toScriptElementIfPossible
https://bugs.webkit.org/show_bug.cgi?id=113473

Reviewed by Ryosuke Niwa.

Rename ScriptElement::toScriptElement to ScriptElement::toScriptElementIfPossible to
differentiate this function from other to*Element functions, and to better describe the
function's behavior. Other to*Element functions do not return null if the cast fails,
whereas toScriptElementIfPossible does.

No new tests as this is just a refactoring.

* dom/ScriptElement.cpp:
(WebCore::toScriptElementIfPossible):
* dom/ScriptElement.h:
(WebCore):
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):

    This is the only unchecked return value but there isn't a security issue here.

* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::collectOptionInnerText):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):
(WebCore::HTMLConstructionSite::insertForeignElement):
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::requestPendingScript):
(WebCore::HTMLScriptRunner::runScript):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::notifyFinished):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::endElementNs):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):
(WebCore::XMLDocumentParser::parseEndElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/dom/ScriptElement.h
Source/WebCore/dom/ScriptRunner.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLScriptRunner.cpp
Source/WebCore/xml/parser/XMLDocumentParser.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebCore/xml/parser/XMLDocumentParserQt.cpp