[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/~clicea/khtml
From: Carlos Licea <carlos_licea () hotmail ! com>
Date: 2009-05-09 6:56:03
Message-ID: 1241852163.516975.27060.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 965500 by clicea:
Make compile expression. A lot is still to be done for functions.
M +13 -13 CMakeLists.txt
M +3 -2 xpath/impl/expression.cpp
M +6 -7 xpath/impl/expression.h
M +8 -9 xpath/impl/functions.cpp
M +2 -2 xpath/impl/parsedstatement.cpp
M +2 -2 xpath/impl/parsedstatement.h
M +3 -4 xpath/impl/path.cpp
M +1 -1 xpath/impl/predicate.cpp
M +8 -10 xpath/impl/step.cpp
M +1 -1 xpath/impl/step.h
M +9 -9 xpath/impl/util.cpp
M +6 -6 xpath/impl/util.h
--- branches/work/~clicea/khtml/CMakeLists.txt #965499:965500
@@ -404,17 +404,17 @@
)
# khtml/xpath/
-# set(xpath_STAT_SRCS
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/expression.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/functions.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/parsedstatement.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/path.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/predicate.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/step.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/tokenizer.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/util.cpp
-# ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/variablereference.cpp
-# )
+set(xpath_STAT_SRCS
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/expression.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/functions.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/parsedstatement.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/path.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/predicate.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/step.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/tokenizer.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/util.cpp
+ ${CMAKE_SOURCE_DIR}/khtml/xpath/impl/variablereference.cpp
+)
add_subdirectory( css )
add_subdirectory( pics )
@@ -441,7 +441,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/platform
${CMAKE_CURRENT_SOURCE_DIR}/compat
${CMAKE_CURRENT_SOURCE_DIR}/css
-# ${CMAKE_CURRENT_SOURCE_DIR}/xpath
+ ${CMAKE_CURRENT_SOURCE_DIR}/xpath
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}/misc
@@ -487,6 +487,7 @@
khtml_iface.cc
khtmlimage.cpp
kjserrordlg.cpp
+ ${xpath_STAT_SRCS}
${khtmlfind_STAT_SRCS}
${khtmlxml_STAT_SRCS}
${khtmlhtml_STAT_SRCS}
@@ -500,7 +501,6 @@
${decoders_STAT_SRCS}
${khtmlgraphics_STAT_SRCS} # for WebCore compatibility
${khtmlsvg_STAT_SRCS} # for SVG
-# ${xpath_STAT_SRCS}
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KHTMLPart.xml # just so that it gets generated
)
--- branches/work/~clicea/khtml/xpath/impl/expression.cpp #965499:965500
@@ -23,7 +23,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "expression.h"
-#include "NodeImpl.h"
+#include "xml/dom_nodeimpl.h"
+//#include "xml/dom_stringimpl.h"
#ifndef __USE_ISOC99
# undef __USE_ISOC99
@@ -32,7 +33,7 @@
#include <cmath>
-using namespace KDOM;
+using namespace DOM;
using namespace std;
Value::Value()
--- branches/work/~clicea/khtml/xpath/impl/expression.h #965499:965500
@@ -27,13 +27,12 @@
#include "util.h"
-#include "DOMStringImpl.h"
-
#include <QHash>
#include <QList>
-namespace KDOM {
+namespace DOM {
class NodeImpl;
+ class DOMStringImpl;
namespace XPath {
class XPathNSResolverImpl;
@@ -44,14 +43,14 @@
{
EvaluationContext() : node( 0 ), size( 0 ), position( 0 ), resolver( 0 ) { }
- KDOM::NodeImpl *node;
+ DOM::NodeImpl *node;
unsigned long size;
unsigned long position;
- QHash<QString, KDOM::DOMStringImpl *> variableBindings;
+ QHash<QString, DOM::DOMStringImpl *> variableBindings;
/* The function library is globally accessible through
* FunctionLibrary::self()
*/
- KDOM::XPath::XPathNSResolverImpl *resolver;
+ DOM::XPath::XPathNSResolverImpl *resolver;
};
class Value
@@ -62,7 +61,7 @@
};
Value();
- explicit Value( KDOM::NodeImpl *value );
+ explicit Value( DOM::NodeImpl *value );
explicit Value( const DomNodeList &value );
explicit Value( bool value );
explicit Value( double value );
--- branches/work/~clicea/khtml/xpath/impl/functions.cpp #965499:965500
@@ -24,15 +24,14 @@
*/
#include "functions.h"
-#include "NamedAttrMapImpl.h"
-#include "NodeImpl.h"
-#include "DOMStringImpl.h"
+#include "xml/dom_nodeimpl.h"
+#include "xml/dom_elementimpl.h"
#include <QtDebug>
#include <math.h>
-using namespace KDOM;
+using namespace DOM;
#define DEFINE_FUNCTION_CREATOR(Class) \
static Function *create##Class() { return new Class; }
@@ -414,7 +413,7 @@
node = evaluationContext().node;
}
- return Value( node->localName().qstring() );
+ return Value( node->localName().string() );
}
bool FunNamespaceURI::isConstant() const
@@ -436,7 +435,7 @@
node = evaluationContext().node;
}
- return Value( node->namespaceURI().qstring() );
+ return Value( node->namespaceURI().string() );
}
bool FunName::isConstant() const
@@ -458,9 +457,9 @@
node = evaluationContext().node;
}
- QString s = node->namespaceURI().qstring();
+ QString s = node->namespaceURI().string();
s += ":";
- s += node->localName().qstring();
+ s += node->localName().string();
return Value( s );
}
@@ -668,7 +667,7 @@
return Value( false );
}
- QString langNodeValue = langNode->nodeValue()->string();
+ QString langNodeValue = langNode->nodeValue().string();
// extract 'en' out of 'en-us'
langNodeValue = langNodeValue.left( langNodeValue.indexOf( '-' ) );
--- branches/work/~clicea/khtml/xpath/impl/parsedstatement.cpp #965499:965500
@@ -25,9 +25,9 @@
#include "parsedstatement.h"
#include "path.h"
-#include "NodeImpl.h"
+#include "xml/dom_nodeimpl.h"
-using namespace KDOM;
+using namespace DOM;
extern Expression *parseStatement( const DomString &statement );
--- branches/work/~clicea/khtml/xpath/impl/parsedstatement.h #965499:965500
@@ -27,7 +27,7 @@
#include "util.h"
-namespace KDOM {
+namespace DOM {
class NodeImpl;
}
@@ -47,7 +47,7 @@
QString dump() const;
- Value evaluate( KDOM::NodeImpl *context ) const;
+ Value evaluate( DOM::NodeImpl *context ) const;
private:
Expression *m_expr;
--- branches/work/~clicea/khtml/xpath/impl/path.cpp #965499:965500
@@ -24,11 +24,10 @@
*/
#include "path.h"
-#include "kdom.h"
-#include "DocumentImpl.h"
-#include "NodeImpl.h"
+#include "xml/dom_docimpl.h"
+#include "xml/dom_nodeimpl.h"
-using namespace KDOM;
+using namespace DOM;
Filter::Filter( Expression *expr, const QList<Predicate *> &predicates )
: m_expr( expr ),
--- branches/work/~clicea/khtml/xpath/impl/predicate.cpp #965499:965500
@@ -27,7 +27,7 @@
#include <QString>
-#include "NodeImpl.h"
+#include "xml/dom_nodeimpl.h"
#include <math.h>
--- branches/work/~clicea/khtml/xpath/impl/step.cpp #965499:965500
@@ -24,19 +24,17 @@
*/
#include "step.h"
-#include "DocumentImpl.h"
-#include "DOMStringImpl.h"
-#include "NamedAttrMapImpl.h"
-#include "NodeImpl.h"
-#include "TextImpl.h"
-#include "kdom.h"
-#include "kdomxpath.h"
-#include "XPathExceptionImpl.h"
-#include "XPathNSResolverImpl.h"
+#include "xml/dom_docimpl.h"
+#include "xml/dom_nodeimpl.h"
+#include "xml/dom_textimpl.h"
+// #include "DOMStringImpl.h"
+#include "../kdomxpath.h"
+#include "../XPathExceptionImpl.h"
+#include "../XPathNSResolverImpl.h"
#include <QtDebug>
-using namespace KDOM;
+using namespace DOM;
using namespace XPath;
static bool areAdjacentTextNodes( NodeImpl *n, NodeImpl *m )
--- branches/work/~clicea/khtml/xpath/impl/step.h #965499:965500
@@ -30,7 +30,7 @@
#include <QList>
-namespace KDOM {
+namespace DOM {
class NodeImpl;
}
--- branches/work/~clicea/khtml/xpath/impl/util.cpp #965499:965500
@@ -23,13 +23,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "util.h"
-#include "NodeImpl.h"
-#include "DOMStringImpl.h"
-#include "kdom.h"
-#include "kdomxpath.h"
+#include "xml/dom_nodeimpl.h"
+// #include "DOMStringImpl.h"
-using namespace KDOM;
+#include "../kdomxpath.h"
+using namespace DOM;
+
bool isRootDomNode( NodeImpl *node )
{
return node && !node->parentNode();
@@ -38,10 +38,10 @@
DomString stringValue( NodeImpl *node )
{
switch ( node->nodeType() ) {
- case KDOM::ATTRIBUTE_NODE:
- case KDOM::PROCESSING_INSTRUCTION_NODE:
- case KDOM::COMMENT_NODE:
- case KDOM::TEXT_NODE:
+ case DOM::ATTRIBUTE_NODE:
+ case DOM::PROCESSING_INSTRUCTION_NODE:
+ case DOM::COMMENT_NODE:
+ case DOM::TEXT_NODE:
return node->nodeValue()->string();
default:
if ( isRootDomNode( node )
--- branches/work/~clicea/khtml/xpath/impl/util.h #965499:965500
@@ -27,29 +27,29 @@
#include <QList>
-namespace KDOM {
+namespace DOM {
class NodeImpl;
}
-typedef QList<KDOM::NodeImpl *> DomNodeList;
+typedef QList<DOM::NodeImpl *> DomNodeList;
typedef QString DomString;
/* @return whether the given node is the root node.
*/
-bool isRootDomNode( KDOM::NodeImpl *node );
+bool isRootDomNode( DOM::NodeImpl *node );
/* @return the 'string-value' of the given node as specified by
http://www.w3.org/TR/xpath
*/
-DomString stringValue( KDOM::NodeImpl *node );
+DomString stringValue( DOM::NodeImpl *node );
/* @return all ancestor nodes of the given node, in document order.
*/
-DomNodeList getChildrenRecursively( KDOM::NodeImpl *node );
+DomNodeList getChildrenRecursively( DOM::NodeImpl *node );
/* @return whether the given node is a valid context node
*/
-bool isValidContextNode( KDOM::NodeImpl *node );
+bool isValidContextNode( DOM::NodeImpl *node );
#endif // UTIL_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic