diff --git a/src/dom/AttrImpl.cpp b/src/dom/AttrImpl.cpp index 9bb01eab0db6203eb609ff8de68868d9cf7659f7..3475ad73a373887742982ddf86d4084753e0b6a4 100644 --- a/src/dom/AttrImpl.cpp +++ b/src/dom/AttrImpl.cpp @@ -71,7 +71,7 @@ AttrImpl::AttrImpl(DocumentImpl *ownerDoc, const DOMString &aName) : ParentNode (ownerDoc) { name = aName.clone(); - specified(true); + isSpecified(true); }; AttrImpl::AttrImpl(const AttrImpl &other, bool deep) @@ -79,14 +79,14 @@ AttrImpl::AttrImpl(const AttrImpl &other, bool deep) { name = other.name.clone(); - if (other.specified()) - specified(true); + if (other.isSpecified()) + isSpecified(true); else - specified(false); + isSpecified(false); - if (other.idAttr()) + if (other.isIdAttr()) { - idAttr(true); + isIdAttr(true); this->getOwnerDocument()->getNodeIDMap()->add(this); } @@ -128,7 +128,7 @@ DOMString AttrImpl::getNodeValue() bool AttrImpl::getSpecified() { - return specified(); + return isSpecified(); }; @@ -173,14 +173,14 @@ void AttrImpl::setNodeValue(const DOMString &val) void AttrImpl::setSpecified(bool arg) { - specified(arg); + isSpecified(arg); }; void AttrImpl::setValue(const DOMString &val) { - if (readOnly()) + if (isReadOnly()) { throw DOM_DOMException ( @@ -192,7 +192,7 @@ void AttrImpl::setValue(const DOMString &val) // then put it back in with the new name. For now, we don't worry // about what happens if the new name conflicts // - if (idAttr()) + if (isIdAttr()) this->getOwnerDocument()->getNodeIDMap()->remove(this); NodeImpl *kid; @@ -205,10 +205,10 @@ void AttrImpl::setValue(const DOMString &val) if (val != null) // Create and add the new one appendChild(ownerDocument->createTextNode(val)); - specified(true); + isSpecified(true); changed(); - if (idAttr()) + if (isIdAttr()) this->getOwnerDocument()->getNodeIDMap()->add(this); }; @@ -233,7 +233,7 @@ ElementImpl *AttrImpl::getOwnerElement() { // if we have an owner, ownerNode is our ownerElement, otherwise it's // our ownerDocument and we don't have an ownerElement - return (ElementImpl *) (owned() ? ownerNode : null); + return (ElementImpl *) (isOwned() ? ownerNode : null); } @@ -241,5 +241,5 @@ ElementImpl *AttrImpl::getOwnerElement() void AttrImpl::setOwnerElement(ElementImpl *ownerElem) { ownerNode = ownerElem; - owned(false); + isOwned(false); } diff --git a/src/dom/AttrNSImpl.cpp b/src/dom/AttrNSImpl.cpp index 14766b425683856af7f710b116153d928e5a78b9..4c9daa61281af7b57c7b22dd3b8a42911684b78a 100644 --- a/src/dom/AttrNSImpl.cpp +++ b/src/dom/AttrNSImpl.cpp @@ -143,7 +143,7 @@ void AttrNSImpl::setPrefix(const DOMString &prefix) DOMString xmlns = NodeImpl::getXmlnsString(); DOMString xmlnsURI = NodeImpl::getXmlnsURIString(); - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); if (namespaceURI == null || localName.equals(xmlns)) diff --git a/src/dom/CharacterDataImpl.cpp b/src/dom/CharacterDataImpl.cpp index e614f67793bcf6f31b806c71a675f6a8d11e9959..762fce9fb74f16d2cc665b4d4f8996e5f9a04e5f 100644 --- a/src/dom/CharacterDataImpl.cpp +++ b/src/dom/CharacterDataImpl.cpp @@ -90,7 +90,7 @@ DOMString CharacterDataImpl::getNodeValue() void CharacterDataImpl::setNodeValue(const DOMString &value) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); data = value.clone(); @@ -112,7 +112,7 @@ void CharacterDataImpl::setNodeValue(const DOMString &value) void CharacterDataImpl::appendData(const DOMString &dat) { - if(readOnly()) + if(isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -122,7 +122,7 @@ void CharacterDataImpl::appendData(const DOMString &dat) void CharacterDataImpl::deleteData(unsigned int offset, unsigned int count) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -173,7 +173,7 @@ unsigned int CharacterDataImpl::getCharDataLength() void CharacterDataImpl::insertData(unsigned int offset, const DOMString &dat) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -188,7 +188,7 @@ void CharacterDataImpl::insertData(unsigned int offset, const DOMString &dat) void CharacterDataImpl::replaceData(unsigned int offset, unsigned int count, const DOMString &dat) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); deleteData(offset, count); @@ -200,7 +200,7 @@ void CharacterDataImpl::replaceData(unsigned int offset, unsigned int count, void CharacterDataImpl::setData(const DOMString &arg) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); data = arg.clone(); diff --git a/src/dom/ChildNode.cpp b/src/dom/ChildNode.cpp index c9244bba52bfee78f7d59619d9d0f4c442be4243..e6320c2f324a9e8f3aac1714224f2c9f6f65cdcb 100644 --- a/src/dom/ChildNode.cpp +++ b/src/dom/ChildNode.cpp @@ -77,7 +77,7 @@ ChildNode::ChildNode(const ChildNode &other) // Need to break the association w/ original siblings and parent this->previousSibling = null; this->nextSibling = null; - firstChild(false); + isFirstChild(false); }; ChildNode::~ChildNode() { @@ -100,11 +100,11 @@ NodeImpl * ChildNode::getParentNode() { // if we have an owner, ownerNode is our parent, otherwise it's // our ownerDocument and we don't have a parent - return owned() ? ownerNode : null; + return isOwned() ? ownerNode : null; }; NodeImpl * ChildNode::getPreviousSibling() { // if we are the firstChild, previousSibling actually refers to our // parent's lastChild, but we hide that - return firstChild() ? null : previousSibling; + return isFirstChild() ? null : previousSibling; }; diff --git a/src/dom/CommonParentNode.cpp b/src/dom/CommonParentNode.cpp index 0c99f92d4e360b573e21179483d8da77ea705f8e..f88988ada041887fdc64200cf010a6edc4499962 100644 --- a/src/dom/CommonParentNode.cpp +++ b/src/dom/CommonParentNode.cpp @@ -174,7 +174,7 @@ bool THIS_CLASS::hasChildNodes() NodeImpl *THIS_CLASS::insertBefore(NodeImpl *newChild, NodeImpl *refChild) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -247,15 +247,15 @@ NodeImpl *THIS_CLASS::insertBefore(NodeImpl *newChild, NodeImpl *refChild) { // Attach up newInternal->ownerNode = this; - newInternal->owned(true); + newInternal->isOwned(true); // Attach after newInternal->previousSibling=prev; if (refInternal == firstChild) { firstChild = newInternal; if (refInternal != null) - refInternal->firstChild(false); - newInternal->firstChild(true); + refInternal->isFirstChild(false); + newInternal->isFirstChild(true); } else { prev->nextSibling = newInternal; } @@ -298,7 +298,7 @@ NodeImpl *THIS_CLASS::item(unsigned int index) { NodeImpl *THIS_CLASS::removeChild(NodeImpl *oldChild) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -329,10 +329,10 @@ NodeImpl *THIS_CLASS::removeChild(NodeImpl *oldChild) if (oldInternal != firstChild) prev->nextSibling = next; else { - oldInternal->firstChild(false); + oldInternal->isFirstChild(false); firstChild = next; if (next != null) { - next->firstChild(true); + next->isFirstChild(true); } } @@ -347,7 +347,7 @@ NodeImpl *THIS_CLASS::removeChild(NodeImpl *oldChild) // Remove oldChild's references to tree oldInternal->ownerNode = ownerDocument; - oldInternal->owned(false); + oldInternal->isOwned(false); oldInternal->nextSibling = null; oldInternal->previousSibling = null; diff --git a/src/dom/CommonParentNode.hpp b/src/dom/CommonParentNode.hpp index f93d5913780461d908dbac9721464ec77a74b456..f0075f7ba87b5ae34e99984c4886ba4bca866f89 100644 --- a/src/dom/CommonParentNode.hpp +++ b/src/dom/CommonParentNode.hpp @@ -106,7 +106,7 @@ public: virtual NodeImpl *item(unsigned int index); virtual NodeImpl * removeChild(NodeImpl *oldChild); virtual NodeImpl *replaceChild(NodeImpl *newChild, NodeImpl *oldChild); - virtual void setReadOnly(bool readOnly, bool deep); + virtual void setReadOnly(bool isReadOnly, bool deep); //Introduced in DOM Level 2 virtual void normalize(); diff --git a/src/dom/DocumentImpl.cpp b/src/dom/DocumentImpl.cpp index f08c1d939c75406a9f44f934a62d7c0983d4b7a6..7dbd5c41ddbdcc987effc5f5f493234c575a97f4 100644 --- a/src/dom/DocumentImpl.cpp +++ b/src/dom/DocumentImpl.cpp @@ -555,7 +555,7 @@ NodeImpl *DocumentImpl::importNode(NodeImpl *source, bool deep) break; case DOM_Node::ENTITY_REFERENCE_NODE : newnode = createEntityReference(source->getNodeName()); - newnode -> readOnly(false); //allow deep import temporarily + newnode -> isReadOnly(false); //allow deep import temporarily break; case DOM_Node::ENTITY_NODE : { @@ -566,7 +566,7 @@ NodeImpl *DocumentImpl::importNode(NodeImpl *source, bool deep) newentity->setNotationName(srcentity->getNotationName()); // Kids carry additional value newnode=newentity; - newentity->readOnly(false);// allow deep import temporarily + newentity->isReadOnly(false);// allow deep import temporarily } break; case DOM_Node::PROCESSING_INSTRUCTION_NODE : @@ -636,7 +636,7 @@ NodeImpl *DocumentImpl::importNode(NodeImpl *source, bool deep) } if (newnode->getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE || newnode->getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) - newnode->readOnly(true); + newnode->isReadOnly(true); return newnode; }; @@ -805,14 +805,14 @@ void* DocumentImpl::getUserData(NodeImpl* n) void* DocumentImpl::getUserData() { - return (userdata()) ? getUserData(this) : null; + return (hasUserData()) ? getUserData(this) : null; } void DocumentImpl::setUserData(void* val) { setUserData(this, val); if (val) - userdata(true); + hasUserData(true); else - userdata(false); + hasUserData(false); }; diff --git a/src/dom/ElementImpl.cpp b/src/dom/ElementImpl.cpp index 7f8580703f4d81b2b61ca34a875e1cefda12d721..8e1e58d3eb5b4b86a494c6ee355151ed5a14672b 100644 --- a/src/dom/ElementImpl.cpp +++ b/src/dom/ElementImpl.cpp @@ -174,7 +174,7 @@ bool ElementImpl::isElementImpl() void ElementImpl::removeAttribute(const DOMString &nam) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -195,7 +195,7 @@ void ElementImpl::removeAttribute(const DOMString &nam) AttrImpl *ElementImpl::removeAttributeNode(AttrImpl *oldAttr) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -220,7 +220,7 @@ AttrImpl *ElementImpl::removeAttributeNode(AttrImpl *oldAttr) AttrImpl *ElementImpl::setAttribute(const DOMString &nam, const DOMString &val) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -243,7 +243,7 @@ AttrImpl *ElementImpl::setAttribute(const DOMString &nam, const DOMString &val) AttrImpl * ElementImpl::setAttributeNode(AttrImpl *newAttr) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -296,7 +296,7 @@ DOMString ElementImpl::getAttributeNS(const DOMString &fNamespaceURI, AttrImpl *ElementImpl::setAttributeNS(const DOMString &fNamespaceURI, const DOMString &qualifiedName, const DOMString &fValue) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -319,7 +319,7 @@ AttrImpl *ElementImpl::setAttributeNS(const DOMString &fNamespaceURI, void ElementImpl::removeAttributeNS(const DOMString &fNamespaceURI, const DOMString &fLocalName) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); @@ -346,7 +346,7 @@ AttrImpl *ElementImpl::getAttributeNodeNS(const DOMString &fNamespaceURI, AttrImpl *ElementImpl::setAttributeNodeNS(AttrImpl *newAttr) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); diff --git a/src/dom/ElementNSImpl.cpp b/src/dom/ElementNSImpl.cpp index 005f9bdb6cc7b092ee9ce5b2bcd41f02baf3fe52..c4346728e6b0e07264a69f0e1eb9488908f47115 100644 --- a/src/dom/ElementNSImpl.cpp +++ b/src/dom/ElementNSImpl.cpp @@ -137,7 +137,7 @@ void ElementNSImpl::setPrefix(const DOMString &prefix) DOMString xmlns = NodeImpl::getXmlnsString(); DOMString xmlnsURI = NodeImpl::getXmlnsURIString(); - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); if(prefix != null && !DocumentImpl::isXMLName(prefix)) diff --git a/src/dom/EntityImpl.cpp b/src/dom/EntityImpl.cpp index fb04f8b7886022ed3339b2a3c6cf6352ddeb15a5..27ecef97d2d8aed1a934d5f1330ca19316b55e90 100644 --- a/src/dom/EntityImpl.cpp +++ b/src/dom/EntityImpl.cpp @@ -69,7 +69,7 @@ EntityImpl::EntityImpl(DocumentImpl *ownerDoc, const DOMString &eName) { name = eName.clone(); - readOnly(true); + isReadOnly(true); }; @@ -83,7 +83,7 @@ EntityImpl::EntityImpl(const EntityImpl &other, bool deep) systemId = other.systemId.clone(); notationName = other.notationName.clone(); refEntity = other.refEntity; - readOnly(true); + isReadOnly(true); }; diff --git a/src/dom/EntityReferenceImpl.cpp b/src/dom/EntityReferenceImpl.cpp index 37a73170c360fed0c677dfc998b6c806f771ad4c..3dd09a1b66efcc96f9391db6fb194dc98a9cf567 100644 --- a/src/dom/EntityReferenceImpl.cpp +++ b/src/dom/EntityReferenceImpl.cpp @@ -127,7 +127,7 @@ EntityReferenceImpl::EntityReferenceImpl(DocumentImpl *ownerDoc, name = entityName.clone(); // EntityReference behaves as a read-only node, since its contents // reflect the Entity it refers to -- but see setNodeName(). - readOnly(true); + isReadOnly(true); entityChanges=-1; } @@ -141,7 +141,7 @@ EntityReferenceImpl::EntityReferenceImpl(const EntityReferenceImpl &other, if (deep) cloneChildren(other); entityChanges = other.entityChanges; - readOnly(true); + isReadOnly(true); } diff --git a/src/dom/NamedNodeMapImpl.cpp b/src/dom/NamedNodeMapImpl.cpp index ef922fa0a9b60e4af3f4ee76984268f112facdd0..bc6e6ee6d36d8bf040873f65c9bb77e4c0b20c6e 100644 --- a/src/dom/NamedNodeMapImpl.cpp +++ b/src/dom/NamedNodeMapImpl.cpp @@ -111,9 +111,9 @@ NamedNodeMapImpl *NamedNodeMapImpl::cloneMap(NodeImpl *ownerNod) for (unsigned int i = 0; i < nodes->size(); ++i) { NodeImpl *n = nodes->elementAt(i)->cloneNode(true); - n->specified(nodes->elementAt(i)->specified()); + n->isSpecified(nodes->elementAt(i)->isSpecified()); n->ownerNode = ownerNod; - n->owned(true); + n->isOwned(true); newmap->nodes->addElement(n); } } @@ -143,7 +143,7 @@ void NamedNodeMapImpl::removeAll() { NodeImpl *n = nodes->elementAt(i); n->ownerNode = ownerNode->getOwnerDocument(); - n->owned(false); + n->isOwned(false); if (n->nodeRefCount == 0) NodeImpl::deleteIf(n); } @@ -241,7 +241,7 @@ NodeImpl * NamedNodeMapImpl::removeNamedItem(const DOMString &name) n = (NodeImpl *) (nodes->elementAt(i)); nodes->removeElementAt(i); n->ownerNode = ownerNode->getOwnerDocument(); - n->owned(false); + n->isOwned(false); return n; }; @@ -268,11 +268,11 @@ NodeImpl * NamedNodeMapImpl::setNamedItem(NodeImpl * arg) throw DOM_DOMException(DOM_DOMException::WRONG_DOCUMENT_ERR,null); if (readOnly) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); - if (arg->owned()) + if (arg->isOwned()) throw DOM_DOMException(DOM_DOMException::INUSE_ATTRIBUTE_ERR,null); arg->ownerNode = ownerNode; - arg->owned(true); + arg->isOwned(true); int i=findNamePoint(arg->getNodeName()); NodeImpl * previous=null; if(i>=0) @@ -289,7 +289,7 @@ NodeImpl * NamedNodeMapImpl::setNamedItem(NodeImpl * arg) } if (previous != null) { previous->ownerNode = ownerNode->getOwnerDocument(); - previous->owned(false); + previous->isOwned(false); } return previous; @@ -355,11 +355,11 @@ NodeImpl * NamedNodeMapImpl::setNamedItemNS(NodeImpl *arg) throw DOM_DOMException(DOM_DOMException::WRONG_DOCUMENT_ERR,null); if (readOnly) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); - if (arg->owned()) + if (arg->isOwned()) throw DOM_DOMException(DOM_DOMException::INUSE_ATTRIBUTE_ERR,null); arg->ownerNode = ownerNode; - arg->owned(true); + arg->isOwned(true); int i=findNamePoint(arg->getNamespaceURI(), arg->getLocalName()); NodeImpl *previous=null; if(i>=0) { @@ -373,7 +373,7 @@ NodeImpl * NamedNodeMapImpl::setNamedItemNS(NodeImpl *arg) } if (previous != null) { previous->ownerNode = ownerNode->getOwnerDocument(); - previous->owned(false); + previous->isOwned(false); } return previous; @@ -398,7 +398,7 @@ NodeImpl *NamedNodeMapImpl::removeNamedItemNS(const DOMString &namespaceURI, NodeImpl * n = nodes -> elementAt(i); nodes -> removeElementAt(i); //remove n from nodes n->ownerNode = ownerNode->getOwnerDocument(); - n->owned(false); + n->isOwned(false); return n; } @@ -425,9 +425,9 @@ void NamedNodeMapImpl::cloneContent(NamedNodeMapImpl *srcmap) { { NodeImpl *n = srcmap->nodes->elementAt(i); NodeImpl *clone = n->cloneNode(true); - clone->specified(n->specified()); + clone->isSpecified(n->isSpecified()); clone->ownerNode = ownerNode; - clone->owned(true); + clone->isOwned(true); nodes->addElement(clone); // n = null; // clone = null; diff --git a/src/dom/NodeImpl.cpp b/src/dom/NodeImpl.cpp index 80aafbf8042c4c621c237972f07d628f5f1c23ad..070e1ed18aa23a5725911f499f65699988157cae 100644 --- a/src/dom/NodeImpl.cpp +++ b/src/dom/NodeImpl.cpp @@ -108,7 +108,7 @@ NodeImpl::NodeImpl(DocumentImpl *ownerDoc) NodeImpl::NodeImpl(const NodeImpl &other) { this->flags = other.flags; this->userData = other.userData; - this->readOnly(false); + this->isReadOnly(false); this->nodeRefCount = 0; NodeImpl::gLiveNodeImpls++; @@ -117,7 +117,7 @@ NodeImpl::NodeImpl(const NodeImpl &other) { // Need to break the association w/ original parent // this->ownerNode = other.getOwnerDocument(); this doesn't work??? this->ownerNode = ((NodeImpl*)&other)->getOwnerDocument(); - this->owned(false); + this->isOwned(false); }; @@ -127,7 +127,7 @@ int NodeImpl::gTotalNodeImpls= 0; NodeImpl::~NodeImpl() { - if (userdata()) + if (hasUserData()) { setUserData(null); } @@ -175,7 +175,7 @@ void NodeImpl::deleteIf(NodeImpl *thisNode) if (thisNode == 0) return; - if (thisNode->owned()) + if (thisNode->isOwned()) return; // Delete this node. There should be no siblings, as the DOM @@ -189,13 +189,13 @@ void NodeImpl::deleteIf(NodeImpl *thisNode) // children. This is because the Attr's children Text nodes // contain the attr's value, which is the hash table key. // - if (thisNode->isAttrImpl() && ((AttrImpl *)thisNode->idAttr())) + if (thisNode->isAttrImpl() && ((AttrImpl *)thisNode->isIdAttr())) { ((AttrImpl *)thisNode)->getOwnerDocument() -> getNodeIDMap()->remove((AttrImpl *)thisNode); } - thisNode->readOnly(false); // removeChild requires node not be readonly. + thisNode->isReadOnly(false); // removeChild requires node not be readonly. NodeImpl *theNextChild; for (NodeImpl *child = thisNode->getFirstChild(); child != 0; child=theNextChild) @@ -253,7 +253,7 @@ DocumentImpl *NodeImpl::getOwnerDocument() { // if we have an owner simply forward the request // otherwise ownerNode is our ownerDocument - if (owned()) { + if (isOwned()) { return ownerNode->getDocument(); } else { return (DocumentImpl *) ownerNode; @@ -265,7 +265,7 @@ DocumentImpl *NodeImpl::getDocument() { // if we have an owner simply forward the request // otherwise ownerNode is our ownerDocument - if (owned()) { + if (isOwned()) { return ownerNode->getDocument(); } else { return (DocumentImpl *) ownerNode; @@ -276,7 +276,7 @@ DocumentImpl *NodeImpl::getDocument() void NodeImpl::setOwnerDocument(DocumentImpl *doc) { // if we have an owner we rely on it to have it right // otherwise ownerNode is our ownerDocument - if (!owned()) { + if (!isOwned()) { ownerNode = doc; } } @@ -295,7 +295,7 @@ NodeImpl* NodeImpl::getPreviousSibling() void *NodeImpl::getUserData() { - return (userdata()) ? getOwnerDocument()->getUserData(this) : null; + return (hasUserData()) ? getOwnerDocument()->getUserData(this) : null; }; @@ -357,7 +357,7 @@ NodeImpl *NodeImpl::replaceChild(NodeImpl *newChild, NodeImpl *oldChild) void NodeImpl::setNodeValue(const DOMString &val) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); // Default behavior is to do nothing, overridden in some subclasses @@ -367,7 +367,7 @@ void NodeImpl::setNodeValue(const DOMString &val) void NodeImpl::setReadOnly(bool readOnl, bool deep) { - this->readOnly(readOnl); + this->isReadOnly(readOnl); // by default we do not have children, so deep is meaningless // this is overridden by ParentNode } @@ -377,9 +377,9 @@ void NodeImpl::setUserData(void * val) { getOwnerDocument()->setUserData(this, val); if (val) - userdata(true); + hasUserData(true); else - userdata(false); + hasUserData(false); }; diff --git a/src/dom/NodeImpl.hpp b/src/dom/NodeImpl.hpp index df89b18bff586540c7446d3982200a87a77586bc..97077a2d3df8fa6861d7fc9240bf72e102a384ab 100644 --- a/src/dom/NodeImpl.hpp +++ b/src/dom/NodeImpl.hpp @@ -208,51 +208,51 @@ public: // should really be protected - ALH * Flags setters and getters */ - inline bool readOnly() const { + inline bool isReadOnly() const { return (flags & READONLY) != 0; } - inline void readOnly(bool value) { + inline void isReadOnly(bool value) { flags = (value ? flags | READONLY : flags & ~READONLY); } - inline bool syncData() const { + inline bool needsSyncData() const { return (flags & SYNCDATA) != 0; } - inline void syncData(bool value) { + inline void needsSyncData(bool value) { flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); } - inline bool syncChildren() const { + inline bool needsSyncChildren() const { return (flags & SYNCCHILDREN) != 0; } - inline void syncChildren(bool value) { + inline void needsSyncChildren(bool value) { flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); } - inline bool owned() const { + inline bool isOwned() const { return (flags & OWNED) != 0; } - inline void owned(bool value) { + inline void isOwned(bool value) { flags = (value ? flags | OWNED : flags & ~OWNED); } - inline bool firstChild() const { + inline bool isFirstChild() const { return (flags & FIRSTCHILD) != 0; } - inline void firstChild(bool value) { + inline void isFirstChild(bool value) { flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); } - inline bool specified() const { + inline bool isSpecified() const { return (flags & SPECIFIED) != 0; } - inline void specified(bool value) { + inline void isSpecified(bool value) { flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); } @@ -272,19 +272,19 @@ public: // should really be protected - ALH flags = (value ? flags | SETVALUE : flags & ~SETVALUE); } - inline bool idAttr() const { + inline bool isIdAttr() const { return (flags & ID_ATTR) != 0; } - inline void idAttr(bool value) { + inline void isIdAttr(bool value) { flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); } - inline bool userdata() const { + inline bool hasUserData() const { return (flags & USERDATA) != 0; } - inline void userdata(bool value) { + inline void hasUserData(bool value) { flags = (value ? flags | USERDATA : flags & ~USERDATA); } }; diff --git a/src/dom/NotationImpl.cpp b/src/dom/NotationImpl.cpp index e8d0b73492d3bc6198f0776eabdb42a325d62727..050c37b04dac0c70a3e34870f8307469ac79c401 100644 --- a/src/dom/NotationImpl.cpp +++ b/src/dom/NotationImpl.cpp @@ -147,7 +147,7 @@ void NotationImpl::setNodeValue(const DOMString &arg) void NotationImpl::setPublicId(const DOMString &arg) { - if(readOnly()) + if(isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,null); @@ -157,7 +157,7 @@ void NotationImpl::setPublicId(const DOMString &arg) void NotationImpl::setSystemId(const DOMString &arg) { - if(readOnly()) + if(isReadOnly()) throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,null); diff --git a/src/dom/ProcessingInstructionImpl.cpp b/src/dom/ProcessingInstructionImpl.cpp index 87deacb761173e2f08a6645266cfb8f9ec5f1dea..f66d7670579849669b6ea1a96137515623f12281 100644 --- a/src/dom/ProcessingInstructionImpl.cpp +++ b/src/dom/ProcessingInstructionImpl.cpp @@ -114,7 +114,7 @@ DOMString ProcessingInstructionImpl::getNodeValue() void ProcessingInstructionImpl::setNodeValue(const DOMString &value) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); data = value.clone(); @@ -151,7 +151,7 @@ DOMString ProcessingInstructionImpl::getTarget() */ void ProcessingInstructionImpl::setData(const DOMString &arg) { - if (readOnly()) + if (isReadOnly()) throw DOM_DOMException(DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); data = arg.clone(); diff --git a/src/dom/RangeImpl.cpp b/src/dom/RangeImpl.cpp index 707c19b79723464169f70712b495d6dbc33602ad..f73f0eefec7d6859e70007952d5ac1a1434b6c92 100644 --- a/src/dom/RangeImpl.cpp +++ b/src/dom/RangeImpl.cpp @@ -766,7 +766,7 @@ void RangeImpl::insertNode(DOM_Node& newNode) { if (newNode == null) return; //don't have to do anything - if (fStartContainer.getParentNode().fImpl->readOnly()) { + if (fStartContainer.getParentNode().fImpl->isReadOnly()) { throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); } @@ -1374,7 +1374,7 @@ void RangeImpl::checkReadOnly(DOM_Node& start, DOM_Node& end, if ((start == null) || (end == null) ) return; //if both start and end are text check and return if (start.getNodeType() == DOM_Node::TEXT_NODE) { - if (start.fImpl->readOnly()) { + if (start.fImpl->isReadOnly()) { throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); } @@ -1403,7 +1403,7 @@ void RangeImpl::recurseTreeAndCheck(DOM_Node& start, DOM_Node& end) { for(DOM_Node node=start; node != null, node !=end; node=node.getNextSibling()) { - if (node.fImpl->readOnly()) { + if (node.fImpl->isReadOnly()) { throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); } diff --git a/src/dom/TextImpl.cpp b/src/dom/TextImpl.cpp index cc8c5611e799592bef7cef3b0d7dca2f570a3bfd..e67c8079df01cc6ad7b35699a676711f0cdf2e2d 100644 --- a/src/dom/TextImpl.cpp +++ b/src/dom/TextImpl.cpp @@ -107,7 +107,7 @@ short TextImpl::getNodeType() { TextImpl *TextImpl::splitText(unsigned int offset) { - if (readOnly()) + if (isReadOnly()) { throw DOM_DOMException( DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, null); diff --git a/src/parsers/DOMParser.cpp b/src/parsers/DOMParser.cpp index 166ead8ef0e2992874a7b5d66cbacd4b03518dc1..2c9582d5ecdebbbdbf0ac4596e1ad282447c46c5 100644 --- a/src/parsers/DOMParser.cpp +++ b/src/parsers/DOMParser.cpp @@ -455,13 +455,13 @@ void DOMParser::docCharacters( const XMLCh* const chars //If the node type is entityRef then set the readOnly flag to false before appending node bool oldReadFlag; if (fCurrentParent.getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) { - oldReadFlag = fCurrentParent.fImpl->readOnly(); - fCurrentParent.fImpl->readOnly(false); + oldReadFlag = fCurrentParent.fImpl->isReadOnly(); + fCurrentParent.fImpl->isReadOnly(false); } fCurrentParent.appendChild(node); if (fCurrentParent.getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) { - fCurrentParent.fImpl->readOnly(oldReadFlag); + fCurrentParent.fImpl->isReadOnly(oldReadFlag); } fCurrentNode = node; } @@ -534,13 +534,13 @@ void DOMParser::ignorableWhitespace(const XMLCh* const chars //If the node type is entityRef then set the readOnly flag to false before appending node bool oldReadFlag; if (fCurrentParent.getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) { - oldReadFlag = fCurrentParent.fImpl->readOnly(); - fCurrentParent.fImpl->readOnly(false); + oldReadFlag = fCurrentParent.fImpl->isReadOnly(); + fCurrentParent.fImpl->isReadOnly(false); } fCurrentParent.appendChild(node); if (fCurrentParent.getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) { - fCurrentParent.fImpl->readOnly(oldReadFlag); + fCurrentParent.fImpl->isReadOnly(oldReadFlag); } fCurrentNode = node; @@ -612,7 +612,7 @@ void DOMParser::startElement(const XMLElementDecl& elemDecl if (docImpl->fNodeIDMap == 0) docImpl->fNodeIDMap = new NodeIDMap(500); docImpl->fNodeIDMap->add(attr); - attr->idAttr(true); + attr->isIdAttr(true); } attr->setSpecified(oneAttrib->getSpecified()); @@ -634,7 +634,7 @@ void DOMParser::startElement(const XMLElementDecl& elemDecl if (docImpl->fNodeIDMap == 0) docImpl->fNodeIDMap = new NodeIDMap(500); docImpl->fNodeIDMap->add(attr); - attr->idAttr(true); + attr->isIdAttr(true); } } @@ -643,13 +643,13 @@ void DOMParser::startElement(const XMLElementDecl& elemDecl //If the node type is entityRef then set the readOnly flag to false before appending node bool oldReadFlag; if (fCurrentParent.getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) { - oldReadFlag = fCurrentParent.fImpl->readOnly(); - fCurrentParent.fImpl->readOnly(false); + oldReadFlag = fCurrentParent.fImpl->isReadOnly(); + fCurrentParent.fImpl->isReadOnly(false); } fCurrentParent.appendChild(elem); if (fCurrentParent.getNodeType() == DOM_Node::ENTITY_REFERENCE_NODE) { - fCurrentParent.fImpl->readOnly(oldReadFlag); + fCurrentParent.fImpl->isReadOnly(oldReadFlag); } fNodeStack->push(fCurrentParent);