Atomize font families (KWQFontFamily) and all attribute values. Move atomic string...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jan 2004 07:44:45 +0000 (07:44 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jan 2004 07:44:45 +0000 (07:44 +0000)
commita2ca1e9be42e65c630d0ed690fbfebc32b27793c
tree1a99a2a59b419a87b811557f91544fad827b187f
parent006c771bccdacc090d558ff31c31419b48875f98
Atomize font families (KWQFontFamily) and all attribute values.  Move atomic string into separate files.

In my testing, this patch yields the same score as Safari-125 in tests and recovers all lost performance
(mostly from excess copying of AtomicStrings where DOMStringImpl* used to be returned).

        Reviewed by darin

        * ForwardingHeaders/xml/dom_atomicstring.h: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/css/css_base.cpp:
        (CSSSelector::print):
        (CSSSelector::extractPseudoType):
        (CSSSelector::selectorText):
        * khtml/css/css_valueimpl.cpp:
        (FontFamilyValueImpl::FontFamilyValueImpl):
        * khtml/css/cssparser.cpp:
        (CSSParser::parseFontFamily):
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        (khtml::checkPseudoState):
        (khtml::CSSStyleSelector::checkOneSelector):
        (khtml::CSSStyleSelector::applyRule):
        * khtml/dom/dom_element.cpp:
        (Element::getAttributeNS):
        * khtml/dom/dom_string.cpp:
        (DOMString::toInt):
        (DOMString::toLengthArray):
        (DOM::operator==):
        * khtml/dom/dom_string.h:
        (DOM::operator==):
        (DOM::operator!=):
        * khtml/ecma/kjs_navigator.cpp:
        (Plugins::get):
        (MimeTypes::get):
        (Plugin::get):
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::parseAttribute):
        (HTMLFrameElementImpl::isURLAllowed):
        (HTMLFrameElementImpl::openURL):
        (HTMLFrameElementImpl::parseAttribute):
        (HTMLFrameElementImpl::attach):
        (HTMLFrameElementImpl::setLocation):
        (HTMLFrameSetElementImpl::parseAttribute):
        (HTMLIFrameElementImpl::attach):
        * khtml/html/html_baseimpl.h:
        * khtml/html/html_blockimpl.cpp:
        (HTMLHRElementImpl::parseAttribute):
        (HTMLHRElementImpl::attach):
        (HTMLMarqueeElementImpl::parseAttribute):
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::documentElement):
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::parseAttribute):
        (HTMLElementImpl::addCSSLength):
        (HTMLElementImpl::addHTMLAlignment):
        * khtml/html/html_elementimpl.h:
        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::parseAttribute):
        (HTMLInputElementImpl::parseAttribute):
        (HTMLInputElementImpl::attach):
        (HTMLSelectElementImpl::parseAttribute):
        (HTMLKeygenElementImpl::parseAttribute):
        (HTMLKeygenElementImpl::encoding):
        (HTMLOptionElementImpl::parseAttribute):
        (HTMLTextAreaElementImpl::parseAttribute):
        * khtml/html/html_formimpl.h:
        * khtml/html/html_headimpl.cpp:
        (HTMLLinkElementImpl::parseAttribute):
        (HTMLStyleElementImpl::parseAttribute):
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::parseAttribute):
        (HTMLAreaElementImpl::parseAttribute):
        * khtml/html/html_inlineimpl.cpp:
        (HTMLAnchorElementImpl::parseAttribute):
        * khtml/html/html_listimpl.cpp:
        (HTMLOListElementImpl::parseAttribute):
        (HTMLLIElementImpl::parseAttribute):
        * khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::getNamedItem):
        (HTMLFormCollectionImpl::getNamedFormItem):
        (HTMLFormCollectionImpl::getNamedImgItem):
        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::parseAttribute):
        (HTMLObjectElementImpl::parseAttribute):
        (HTMLParamElementImpl::HTMLParamElementImpl):
        (HTMLParamElementImpl::~HTMLParamElementImpl):
        (HTMLParamElementImpl::parseAttribute):
        * khtml/html/html_objectimpl.h:
        (DOM::HTMLParamElementImpl::name):
        (DOM::HTMLParamElementImpl::value):
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::parseAttribute):
        (HTMLTablePartElementImpl::parseAttribute):
        (HTMLTableCellElementImpl::parseAttribute):
        (HTMLTableColElementImpl::parseAttribute):
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):
        (KHTMLParser::handleIsindex):
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag):
        * khtml/html/htmltokenizer.h:
        (khtml::Token::addAttribute):
        * khtml/khtml_part.cpp:
        (KHTMLPart::init):
        * khtml/khtmlview.cpp:
        (KHTMLToolTip::maybeTip):
        * khtml/xml/dom_atomicstring.cpp: Added.
        (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger):
        (DOM::AtomicString::equal):
        (DOM::AtomicString::add):
        (DOM::AtomicString::insert):
        (DOM::AtomicString::remove):
        (DOM::AtomicString::expand):
        (DOM::AtomicString::shrink):
        (DOM::AtomicString::rehash):
        (DOM::AtomicString::init):
        (DOM::operator==):
        (DOM::equalsIgnoreCase):
        * khtml/xml/dom_atomicstring.h: Added.
        (DOM::AtomicString::AtomicString):
        (DOM::AtomicString:::m_string):
        (DOM::AtomicString::operator const DOMString&):
        (DOM::AtomicString::domString):
        (DOM::AtomicString::string):
        (DOM::AtomicString::implementation):
        (DOM::AtomicString::unicode):
        (DOM::AtomicString::length):
        (DOM::AtomicString::ascii):
        (DOM::AtomicString::find):
        (DOM::AtomicString::toInt):
        (DOM::AtomicString::percentage):
        (DOM::AtomicString::toLengthArray):
        (DOM::AtomicString::isNull):
        (DOM::AtomicString::isEmpty):
        (DOM::AtomicString::equal):
        (DOM::operator==):
        (DOM::operator!=):
        * khtml/xml/dom_atomicstringlist.h: Added.
        (DOM::AtomicStringList:::m_next):
        (DOM::AtomicStringList::m_next):
        (DOM::AtomicStringList::~AtomicStringList):
        (DOM::AtomicStringList::next):
        (DOM::AtomicStringList::setNext):
        (DOM::AtomicStringList::string):
        (DOM::AtomicStringList::setString):
        (DOM::AtomicStringList::clone):
        (DOM::AtomicStringList::clear):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (AttrImpl::nodeValue):
        (AttrImpl::cloneNode):
        (ElementImpl::getAttribute):
        (ElementImpl::getAttributeNS):
        (ElementImpl::setAttribute):
        (ElementImpl::setAttributeMap):
        (ElementImpl::attach):
        (ElementImpl::detach):
        (ElementImpl::updateId):
        (NamedAttrMapImpl::setNamedItem):
        (NamedAttrMapImpl::removeNamedItem):
        (NamedAttrMapImpl::getAttributeItem):
        (NamedAttrMapImpl::operator=):
        (NamedAttrMapImpl::removeAttribute):
        * khtml/xml/dom_elementimpl.h:
        (DOM::AttributeImpl::AttributeImpl):
        (DOM::AttributeImpl::value):
        (DOM::AttributeImpl::prefix):
        (DOM::AttributeImpl::isNull):
        (DOM::AttributeImpl::isEmpty):
        (DOM::AttributeImpl::setValue):
        (DOM::AttributeImpl::setPrefix):
        (DOM::ElementImpl::getAttribute):
        * khtml/xml/dom_nameimpl.cpp: Removed.
        * khtml/xml/dom_nameimpl.h:
        (DOM::Name::namespaceURI):
        (DOM::Name::localName):
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_stringimpl.cpp:
        * kwq/KWQFont.mm:
        (QFont::family):
        * kwq/KWQFontFamily.h:
        (KWQFontFamily::family):
        * kwq/KWQFontFamily.mm:
        (retainDOMStringImpl):
        (releaseDOMStringImpl):
        (KWQFontFamily::getNSFamily):
        (KWQFontFamily::setFamily):
        (KWQFontFamily::operator==):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::fileWrapperForElement):
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
48 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/ForwardingHeaders/xml/dom_atomicstring.h [new file with mode: 0644]
WebCore/WebCore.pbproj/project.pbxproj
WebCore/khtml/css/css_base.cpp
WebCore/khtml/css/css_valueimpl.cpp
WebCore/khtml/css/cssparser.cpp
WebCore/khtml/css/cssparser.h
WebCore/khtml/css/cssstyleselector.cpp
WebCore/khtml/dom/dom_element.cpp
WebCore/khtml/dom/dom_string.cpp
WebCore/khtml/dom/dom_string.h
WebCore/khtml/ecma/kjs_navigator.cpp
WebCore/khtml/html/html_baseimpl.cpp
WebCore/khtml/html/html_baseimpl.h
WebCore/khtml/html/html_blockimpl.cpp
WebCore/khtml/html/html_documentimpl.cpp
WebCore/khtml/html/html_documentimpl.h
WebCore/khtml/html/html_elementimpl.cpp
WebCore/khtml/html/html_elementimpl.h
WebCore/khtml/html/html_formimpl.cpp
WebCore/khtml/html/html_formimpl.h
WebCore/khtml/html/html_headimpl.cpp
WebCore/khtml/html/html_imageimpl.cpp
WebCore/khtml/html/html_inlineimpl.cpp
WebCore/khtml/html/html_listimpl.cpp
WebCore/khtml/html/html_miscimpl.cpp
WebCore/khtml/html/html_objectimpl.cpp
WebCore/khtml/html/html_objectimpl.h
WebCore/khtml/html/html_tableimpl.cpp
WebCore/khtml/html/htmlparser.cpp
WebCore/khtml/html/htmltokenizer.cpp
WebCore/khtml/html/htmltokenizer.h
WebCore/khtml/khtml_part.cpp
WebCore/khtml/khtmlview.cpp
WebCore/khtml/xml/dom_atomicstring.cpp [moved from WebCore/khtml/xml/dom_nameimpl.cpp with 93% similarity]
WebCore/khtml/xml/dom_atomicstring.h [new file with mode: 0644]
WebCore/khtml/xml/dom_atomicstringlist.h [new file with mode: 0644]
WebCore/khtml/xml/dom_docimpl.h
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/khtml/xml/dom_elementimpl.h
WebCore/khtml/xml/dom_nameimpl.h
WebCore/khtml/xml/dom_nodeimpl.h
WebCore/khtml/xml/dom_stringimpl.cpp
WebCore/kwq/KWQFont.mm
WebCore/kwq/KWQFontFamily.h
WebCore/kwq/KWQFontFamily.mm
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/WebCoreBridge.mm