亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dom_element.cpp

?? It is WEB browser core module with source code. Very good!
?? CPP
字號:
/**
 * This file is part of the DOM implementation for KDE.
 *
 * (C) 1999 Lars Knoll (knoll@kde.org)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 */

#include "dom/dom_exception.h"
#include "xml/dom_docimpl.h"
#include "xml/dom_elementimpl.h"

// FIXME: Remove when .style gets moved to html_element.cpp.
#include "html/html_elementimpl.h"

using namespace DOM;

Attr::Attr() : Node()
{
}

Attr::Attr(const Attr &other) : Node(other)
{
}

Attr::Attr( AttrImpl *_impl )
{
    impl= _impl;
    if (impl) impl->ref();
}

Attr &Attr::operator = (const Node &other)
{
    NodeImpl* ohandle = other.handle();
    if ( impl != ohandle ) {
    if (!ohandle || !ohandle->isAttributeNode()) {
	impl = 0;
	} else {
    Node::operator =(other);
	}
    }
    return *this;
}

Attr &Attr::operator = (const Attr &other)
{
    Node::operator =(other);
    return *this;
}

Attr::~Attr()
{
}

DOMString Attr::name() const
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return DOMString(); }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    
    return impl->getDocument()->attrName(
        static_cast<AttrImpl*>(impl)->attrImpl()->id());
}


bool Attr::specified() const
{
  if (impl) return ((AttrImpl *)impl)->specified();
  return 0;
}

Element Attr::ownerElement() const
{
  if (!impl) return 0;
  return static_cast<AttrImpl*>(impl)->ownerElement();
}

DOMString Attr::value() const
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return DOMString(); }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    
    return impl->nodeValue();
}

void Attr::setValue( const DOMString &newValue )
{
  if (!impl)
    return;

  int exceptioncode = 0;
  ((AttrImpl *)impl)->setValue(newValue,exceptioncode);
  if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = exceptioncode; return; }
#else
    throw DOMException(exceptioncode);
#endif    
}

// ---------------------------------------------------------------------------

Element::Element() : Node()
{
}

Element::Element(const Element &other) : Node(other)
{
}

Element::Element(ElementImpl *impl) : Node(impl)
{
}

Element &Element::operator = (const Node &other)
{
    NodeImpl* ohandle = other.handle();
    if ( impl != ohandle ) {
    if (!ohandle || !ohandle->isElementNode()) {
	impl = 0;
	} else {
    Node::operator =(other);
	}
    }
    return *this;
}

Element &Element::operator = (const Element &other)
{
    Node::operator =(other);
    return *this;
}

Element::~Element()
{
}

DOMString Element::tagName() const
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return DOMString(); }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    
    return static_cast<ElementImpl*>(impl)->tagName();
}

DOMString Element::getAttribute( const DOMString &name )
{
    return getAttributeNS(DOMString(), name);
}

void Element::setAttribute( const DOMString &name, const DOMString &value )
{
    setAttributeNS(DOMString(), name, value);
}

void Element::removeAttribute( const DOMString &name )
{
    removeAttributeNS(DOMString(), name);
}

Attr Element::getAttributeNode( const DOMString &name )
{
    return getAttributeNodeNS(DOMString(), name);
}

Attr Element::setAttributeNode( const Attr &newAttr )
{
    return setAttributeNodeNS(newAttr);
}

Attr Element::removeAttributeNode( const Attr &oldAttr )
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl || oldAttr.isNull() || oldAttr.ownerElement() != *this)
        { _exceptioncode = DOMException::NOT_FOUND_ERR; return 0; }
    if (impl->getDocument() != oldAttr.handle()->getDocument())
        { _exceptioncode = DOMException::WRONG_DOCUMENT_ERR; return 0; }
#else
    if (!impl || oldAttr.isNull() || oldAttr.ownerElement() != *this)
        throw DOMException(DOMException::NOT_FOUND_ERR);
    if (impl->getDocument() != oldAttr.handle()->getDocument())
        throw DOMException(DOMException::WRONG_DOCUMENT_ERR);
#endif    

    NodeImpl::Id attrName = static_cast<AttrImpl*>(oldAttr.handle())->attrImpl()->id();

    int exceptioncode = 0;
    Attr r = static_cast<ElementImpl*>(impl)->attributes(true)->removeNamedItem(attrName, exceptioncode);
    if ( exceptioncode )
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return 0; }
#else
        throw DOMException( exceptioncode );
#endif    
    return r;
}

NodeList Element::getElementsByTagName( const DOMString &name )
{
    if (!impl) return 0;
    return static_cast<ElementImpl*>(impl)->
        getElementsByTagNameNS(0, name.implementation());
}

NodeList Element::getElementsByTagNameNS( const DOMString &namespaceURI,
                                          const DOMString &localName )
{
    if (!impl) return 0;
    return static_cast<ElementImpl*>(impl)->
        getElementsByTagNameNS(namespaceURI.implementation(), localName.implementation());
}

DOMString Element::getAttributeNS( const DOMString &namespaceURI,
                                   const DOMString &localName)
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return DOMString(); }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    
    return static_cast<ElementImpl*>(impl)->getAttributeNS(namespaceURI, localName).domString();
}

void Element::setAttributeNS( const DOMString &namespaceURI,
                              const DOMString &qualifiedName,
                              const DOMString &value)
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return; }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    

    int colonpos = qualifiedName.find(':');
    DOMString localName = qualifiedName;
    if (colonpos >= 0) {
        localName.remove(0, colonpos+1);
        // ### extract and set new prefix
    }
#if KHTML_NO_EXCEPTIONS    
    if (!DocumentImpl::isValidName(localName)) { _exceptioncode = DOMException::INVALID_CHARACTER_ERR; return ; }
#else
    if (!DocumentImpl::isValidName(localName)) throw DOMException(DOMException::INVALID_CHARACTER_ERR);
#endif    
    NodeImpl::Id id = impl->getDocument()->attrId(namespaceURI.implementation(),
                                                    localName.implementation(), false /* allocate */);
    int exceptioncode = 0;
    static_cast<ElementImpl*>(impl)->setAttribute(id, value.implementation(), exceptioncode);
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return; }
#else
        throw DOMException(exceptioncode);
#endif    
}

void Element::removeAttributeNS( const DOMString &namespaceURI,
                                 const DOMString &localName )
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return; }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    
    NodeImpl::Id id = impl->getDocument()->attrId(namespaceURI.implementation(),
                                                    localName.implementation(), true);
    if (!id) return;

    int exceptioncode = 0;
    ((ElementImpl *)impl)->removeAttribute(id, exceptioncode);
    if ( exceptioncode )
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return; }
#else
        throw DOMException( exceptioncode );
#endif    
}

Attr Element::getAttributeNodeNS( const DOMString &namespaceURI,
                                  const DOMString &localName )
{
#if KHTML_NO_EXCEPTIONS    
    if (!impl) { _exceptioncode = DOMException::NOT_FOUND_ERR; return 0; }
#else
    if (!impl) throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    
    NodeImpl::Id id = impl->getDocument()->attrId(namespaceURI.implementation(),
                                                    localName.implementation(), true);
    if (!id) return 0;

    ElementImpl* e = static_cast<ElementImpl*>(impl);
    if (!e->attributes()) return 0; // exception ?

    return e->attributes()->getNamedItem(id);
}

Attr Element::setAttributeNodeNS( const Attr &newAttr )
{
    if (!impl)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = DOMException::NOT_FOUND_ERR; return 0; }
#else
        throw DOMException(DOMException::NOT_FOUND_ERR);
#endif    

    int exceptioncode = 0;
    Attr r = static_cast<ElementImpl*>(impl)->attributes(false)->setNamedItem(newAttr.handle(), exceptioncode);
    if ( exceptioncode )
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return 0; }
#else
        throw DOMException( exceptioncode );
#endif    
    return r;
}


bool Element::hasAttribute( const DOMString& name )
{
    return hasAttributeNS(DOMString(), name);
}

bool Element::hasAttributeNS( const DOMString &namespaceURI,
                              const DOMString &localName )
{
    if (!impl || !static_cast<ElementImpl*>(impl)->attributes()) return false; // ### throw ?
    NodeImpl::Id id = impl->getDocument()->attrId(namespaceURI.implementation(),
                                                    localName.implementation(), true);
    if (!id) return false;

    if (!static_cast<ElementImpl*>(impl)->attributes(true /*readonly*/)) return false;
    return static_cast<ElementImpl*>(impl)->attributes(true)->getAttributeItem(id) != 0;
}

bool Element::isHTMLElement() const
{
    if(!impl) return false;
    return ((ElementImpl *)impl)->isHTMLElement();
}

// FIXME: This should move down to HTMLElement.
CSSStyleDeclaration Element::style()
{
    if (isHTMLElement())
        return ((HTMLElementImpl *)impl)->getInlineStyleDecl();
    return 0;
}

bool Element::khtmlValidAttrName(const DOMString &/*name*/)
{
    // ###
    return true;
}

bool Element::khtmlValidPrefix(const DOMString &/*name*/)
{
    // ###
    return true;
}

bool Element::khtmlValidQualifiedName(const DOMString &/*name*/)
{
    // ###
    return true;
}

bool Element::khtmlMalformedQualifiedName(const DOMString &/*name*/)
{
    // ###
    return false;
}

bool Element::khtmlMalformedPrefix(const DOMString &/*name*/)
{
    // ###
    return false;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产系列| 亚洲最大成人综合| 一区二区在线观看视频在线观看| 无码av免费一区二区三区试看| 国产成人av一区二区三区在线 | av不卡在线观看| 欧美一区二区观看视频| 亚洲欧美综合另类在线卡通| 国产在线一区二区| 日韩亚洲欧美高清| 日本欧美一区二区三区乱码| 日本精品视频一区二区| 国产精品美女久久久久av爽李琼| 精品一区二区在线免费观看| 欧美日韩亚州综合| 一区二区三区在线观看欧美| 成人app在线| 国产精品精品国产色婷婷| 激情小说亚洲一区| 日韩欧美视频一区| 麻豆国产精品777777在线| 8v天堂国产在线一区二区| 午夜免费久久看| 欧美午夜宅男影院| 亚洲国产综合在线| 欧美人与z0zoxxxx视频| 日日夜夜精品视频天天综合网| 色久优优欧美色久优优| 亚洲视频一区二区在线| 99久久国产综合精品麻豆| 国产精品久久网站| 色av成人天堂桃色av| 亚洲美女少妇撒尿| 欧美日韩一区视频| 亚洲第一在线综合网站| 3atv在线一区二区三区| 美女一区二区久久| 久久天天做天天爱综合色| 狠狠色狠狠色综合系列| 国产日韩精品久久久| 91一区在线观看| 亚洲国产精品一区二区www| 欧美日韩一区二区三区四区 | 欧美一区二区三区四区久久| 天堂影院一区二区| 久久综合资源网| 成人h精品动漫一区二区三区| 国产精品久久久久久久裸模| 欧美又粗又大又爽| 秋霞成人午夜伦在线观看| 久久久综合视频| 91亚洲男人天堂| 午夜成人在线视频| 久久久久久久综合狠狠综合| 成人ar影院免费观看视频| 亚洲无人区一区| 精品国产一区二区亚洲人成毛片| 成人午夜视频在线| 亚洲sss视频在线视频| 欧美电影免费观看高清完整版在| 国产a区久久久| 亚洲午夜电影网| 国产欧美日本一区二区三区| 欧美亚洲日本国产| 国产麻豆视频一区| 一区二区三区成人| 精品欧美久久久| 日本高清免费不卡视频| 久久综合综合久久综合| 最新成人av在线| 精品乱人伦小说| 91国偷自产一区二区开放时间| 美腿丝袜亚洲综合| 亚洲日本护士毛茸茸| 日韩欧美国产小视频| 日本道在线观看一区二区| 久久精品99久久久| 亚洲成人中文在线| 国产精品久久久久久户外露出| 在线不卡的av| 色综合色狠狠天天综合色| 国产一区在线观看视频| 亚洲成a人片综合在线| 亚洲国产精品传媒在线观看| 欧美日韩免费观看一区三区| 成人av网站在线| 久久99国产乱子伦精品免费| 亚洲国产毛片aaaaa无费看| 中文字幕精品—区二区四季| 日韩欧美在线不卡| 欧洲国内综合视频| 99久久久久久| 国产成人h网站| 国产成人在线视频网站| 久久精品国产99国产| 免费成人你懂的| 日本不卡在线视频| 水野朝阳av一区二区三区| 亚洲一区在线观看网站| 亚洲欧美国产毛片在线| 国产欧美日韩另类一区| 国产色一区二区| 久久精品亚洲乱码伦伦中文| 精品国产乱码久久久久久闺蜜| 91精品国产综合久久蜜臀| 欧美日韩国产经典色站一区二区三区 | 亚洲与欧洲av电影| 亚洲精品久久久久久国产精华液| 亚洲国产精品99久久久久久久久| 久久久久久免费| 亚洲精品一区二区三区香蕉| 欧美一区二区三区啪啪| 欧美一区二区视频在线观看| 67194成人在线观看| 欧美一区二区三区色| 91精品国产欧美一区二区18| 欧美高清精品3d| 日韩视频不卡中文| 欧美草草影院在线视频| 精品国产3级a| 国产日韩av一区| 18成人在线观看| 亚洲影视在线播放| 蜜臀国产一区二区三区在线播放| 日韩高清中文字幕一区| 久久精品久久精品| 国产传媒一区在线| jlzzjlzz欧美大全| 欧美日韩二区三区| 精品久久久久久久久久久久包黑料 | 一卡二卡三卡日韩欧美| 午夜久久福利影院| 蜜桃av噜噜一区二区三区小说| 精品一区二区三区视频| 成人激情小说乱人伦| 91片黄在线观看| 555www色欧美视频| 久久综合狠狠综合| 中文字幕欧美一| 日韩精品欧美成人高清一区二区| 麻豆专区一区二区三区四区五区| 国产成人免费在线观看不卡| 色婷婷激情一区二区三区| 欧美一区二区在线免费观看| 国产欧美一区二区三区在线看蜜臀 | 日韩欧美成人一区二区| 国产精品久久久久久久久免费桃花 | 精品国精品国产尤物美女| 国产精品视频观看| 日韩黄色免费电影| 丁香啪啪综合成人亚洲小说| 欧美视频在线一区| 国产午夜一区二区三区| 亚洲电影第三页| 成人福利在线看| 日韩欧美国产高清| 亚洲在线中文字幕| 国产成人亚洲综合色影视| 欧美欧美欧美欧美首页| 国产精品久久三| 蜜臂av日日欢夜夜爽一区| 色欧美片视频在线观看在线视频| 日韩欧美亚洲一区二区| 亚洲一区二区视频| 成人av午夜影院| 精品91自产拍在线观看一区| 一区二区高清视频在线观看| 成人综合激情网| 久久这里只有精品6| 亚洲韩国精品一区| 99国产精品99久久久久久| 久久综合九色综合97婷婷女人| 亚洲国产成人精品视频| 99国产精品一区| 国产亚洲一区二区三区四区 | 国产成人精品亚洲日本在线桃色 | 在线综合亚洲欧美在线视频| 最新不卡av在线| 成人黄色免费短视频| 精品国产一区久久| 免费在线看一区| 欧美人牲a欧美精品| 一区二区三区在线视频观看| 丰满白嫩尤物一区二区| 久久奇米777| 国产一区二区三区免费在线观看| 欧美一区二区三区的| 丝袜美腿一区二区三区| 91女人视频在线观看| 国产欧美视频一区二区三区| 国产精品亚洲成人| 久久精品视频网| 国产乱子伦视频一区二区三区| 精品国精品国产| 国产伦精品一区二区三区免费| 精品国产a毛片| 国产精品 日产精品 欧美精品| 精品电影一区二区| 久99久精品视频免费观看| 精品国产免费一区二区三区香蕉|