Clean up XPathExpressionNode and XPath::Function
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Aug 2013 14:31:16 +0000 (14:31 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Aug 2013 14:31:16 +0000 (14:31 +0000)
commitd154721f11e8332b2e795315951155e05602064c
treee18fd53bd24dab648673d787b508ce971b7cfd3a
parentee1d0c58681f4aa077d0120e5d2d5b6e081dba78
Clean up XPathExpressionNode and XPath::Function
https://bugs.webkit.org/show_bug.cgi?id=120411

Reviewed by Antti Koivisto.

Rename the subexpression and function argument getters to be more descriptive,
remove the non-const overloads (they were never used) and change the getters to return
references since they can never be null.

* xml/XPathExpressionNode.cpp:
* xml/XPathExpressionNode.h:
(WebCore::XPath::ParseNode::~ParseNode):
(WebCore::XPath::Expression::addSubExpression):
(WebCore::XPath::Expression::isContextNodeSensitive):
(WebCore::XPath::Expression::setIsContextNodeSensitive):
(WebCore::XPath::Expression::isContextPositionSensitive):
(WebCore::XPath::Expression::setIsContextPositionSensitive):
(WebCore::XPath::Expression::isContextSizeSensitive):
(WebCore::XPath::Expression::setIsContextSizeSensitive):
(WebCore::XPath::Expression::subExpressionCount):
(WebCore::XPath::Expression::subExpression):
* xml/XPathFunctions.cpp:
(WebCore::XPath::Function::setArguments):
(WebCore::XPath::FunId::evaluate):
(WebCore::XPath::FunLocalName::evaluate):
(WebCore::XPath::FunNamespaceURI::evaluate):
(WebCore::XPath::FunName::evaluate):
(WebCore::XPath::FunCount::evaluate):
(WebCore::XPath::FunString::evaluate):
(WebCore::XPath::FunConcat::evaluate):
(WebCore::XPath::FunStartsWith::evaluate):
(WebCore::XPath::FunContains::evaluate):
(WebCore::XPath::FunSubstringBefore::evaluate):
(WebCore::XPath::FunSubstringAfter::evaluate):
(WebCore::XPath::FunSubstring::evaluate):
(WebCore::XPath::FunStringLength::evaluate):
(WebCore::XPath::FunNormalizeSpace::evaluate):
(WebCore::XPath::FunTranslate::evaluate):
(WebCore::XPath::FunBoolean::evaluate):
(WebCore::XPath::FunNot::evaluate):
(WebCore::XPath::FunLang::evaluate):
(WebCore::XPath::FunNumber::evaluate):
(WebCore::XPath::FunSum::evaluate):
(WebCore::XPath::FunFloor::evaluate):
(WebCore::XPath::FunCeiling::evaluate):
(WebCore::XPath::FunRound::evaluate):
* xml/XPathFunctions.h:
(WebCore::XPath::Function::setName):
(WebCore::XPath::Function::argumentCount):
(WebCore::XPath::Function::argument):
(WebCore::XPath::Function::name):
* xml/XPathPredicate.cpp:
(WebCore::XPath::Negative::evaluate):
(WebCore::XPath::NumericOp::evaluate):
(WebCore::XPath::EqTestOp::evaluate):
(WebCore::XPath::LogicalOp::evaluate):
(WebCore::XPath::Union::evaluate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/xml/XPathExpressionNode.cpp
Source/WebCore/xml/XPathExpressionNode.h
Source/WebCore/xml/XPathFunctions.cpp
Source/WebCore/xml/XPathFunctions.h
Source/WebCore/xml/XPathPredicate.cpp