368
bool ElementMappingCache::contains(const QString& id)
368
bool ElementMappingCache::contains(const DOMString& id)
370
370
if (id.isEmpty()) return false;
371
371
return m_dict.contains(id);
374
ElementMappingCache::ItemInfo* ElementMappingCache::get(const QString& id)
374
ElementMappingCache::ItemInfo* ElementMappingCache::get(const DOMString& id)
376
376
if (id.isEmpty()) return 0;
377
377
return m_dict.value(id);
597
597
*pExceptioncode = DOMException::INVALID_CHARACTER_ERR;
600
DOMString prefix, localName;
601
splitPrefixLocalName(name.implementation(), prefix, localName);
602
bool htmlCompat = (htmlMode() != XHtml);
604
localName = localName.lower();
605
prefix = prefix.lower();
607
XMLElementImpl* e = new XMLElementImpl(document(), emptyNamespaceName, LocalName::fromString(localName), PrefixName::fromString(prefix));
603
bool htmlCompat = htmlMode() != XHtml;
604
splitPrefixLocalName(name, prefix, localName, htmlCompat);
605
XMLElementImpl* e = new XMLElementImpl(document(), emptyNamespaceName, localName, prefix);
608
606
e->setHTMLCompat(htmlCompat); // Not a real HTML element, but inside an html-compat doc all tags are uppercase.
615
613
*pExceptioncode = DOMException::INVALID_CHARACTER_ERR;
618
DOMString prefix, localName;
619
splitPrefixLocalName(tagName.implementation(), prefix, localName);
620
619
bool htmlCompat = (htmlMode() != XHtml);
622
localName = localName.lower();
623
prefix = prefix.lower();
625
AttrImpl* attr = new AttrImpl(0, document(), NamespaceName::fromId(emptyNamespace), LocalName::fromString(localName),
626
PrefixName::fromString(prefix), DOMString("").implementation());
620
splitPrefixLocalName(tagName, prefix, localName, htmlCompat);
622
AttrImpl* attr = new AttrImpl(0, document(), NamespaceName::fromId(emptyNamespace),
623
localName, prefix, DOMString("").implementation());
627
624
attr->setHTMLCompat(htmlCompat);
797
794
false/*nameCanBeNull*/, false/*nameCanBeEmpty*/,
800
DOMString prefix, localName;
801
splitPrefixLocalName(_qualifiedName.implementation(), prefix, localName, colonPos);
802
AttrImpl* attr = new AttrImpl(0, document(), NamespaceName::fromString(_namespaceURI), LocalName::fromString(localName),
803
PrefixName::fromString(prefix), DOMString("").implementation());
804
attr->setHTMLCompat( _namespaceURI.isNull() && htmlMode() != XHtml );
799
bool htmlCompat = _namespaceURI.isNull() && htmlMode() != XHtml;
800
splitPrefixLocalName(_qualifiedName, prefix, localName, false, colonPos);
801
AttrImpl* attr = new AttrImpl(0, document(), NamespaceName::fromString(_namespaceURI),
802
localName, prefix, DOMString("").implementation());
803
attr->setHTMLCompat( htmlCompat );
808
807
ElementImpl *DocumentImpl::getElementById( const DOMString &elementId ) const
810
QString stringKey = elementId.string();
812
ElementMappingCache::ItemInfo* info = m_getElementByIdCache.get(stringKey);
809
ElementMappingCache::ItemInfo* info = m_getElementByIdCache.get(elementId);
2829
2826
m_imageLoadEventDispatchingList = m_imageLoadEventDispatchSoonList;
2830
2827
m_imageLoadEventDispatchSoonList.clear();
2831
for (QLinkedListIterator<HTMLImageElementImpl*> it(m_imageLoadEventDispatchingList); it.hasNext(); )
2832
it.next()->dispatchLoadEvent();
2828
while (!m_imageLoadEventDispatchingList.isEmpty())
2829
m_imageLoadEventDispatchingList.takeFirst()->dispatchLoadEvent();
2833
2830
m_imageLoadEventDispatchingList.clear();