-
darin authored
- http://bugzilla.opendarwin.org/show_bug.cgi?id=4557 rename unusual strcmp and strcasecmp for DOMString family Added new functions named equal and equalIgnoringCase. * khtml/xml/dom_stringimpl.h: Changed the type of the length parameter to computeHash to unsigned to match the rest of the interface. Added equal and equalIgnoringCase functions. Added a version of the hash function that works on char* to CaseInsensitiveHash as preparation for an atomic string change. * khtml/xml/dom_stringimpl.cpp: Moved the QT_ALLOC_QCHAR_VEC and QT_DELETE_QCHAR_VEC macros here, and changed them into inline functions. (DOM::equal): Implemented. (DOM::equalIgnoringCase): Implemented. (DOM::DOMStringImpl::computeHash): Changed parameter type to unsigned to match other similar functions. * khtml/dom/dom_string.h: Removed unnecessary friend declarations. Changed operator overloads for == and != to call through inline to DOMStringImpl. Replaced strcasecmp with equalIgnoringCase, overloaded for one more combination of parameters. Removed strcmp. * khtml/dom/dom_string.cpp: Removed functions that are now implemented in DOMStringImpl*. * khtml/xml/dom_atomicstring.h: Removed a redundant const. Removed unnecessary friend declarations. Removed AtomicString::equal. Filled out a larger set of == and != operator implementations, mostly with inlines calling through to DOMStringImpl. Renamed equalsIgnoreCase to equalIgnoringCase and filled out a larger set as above. * khtml/xml/dom_atomicstring.cpp: Renamed AtomicString::equal to just ==. Removed some implementation of == and equalsIgnoreCase that are replaced by inlines. * khtml/html/html_listimpl.cpp: (DOM::HTMLOListElementImpl::parseMappedAttribute): (DOM::HTMLLIElementImpl::parseMappedAttribute): Use the "==" operator instead of strcmp. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Use equalIgnoringCase instead of equalsIgnoreCase. * khtml/rendering/render_form.cpp: (RenderSlider::updateFromElement): Fixed bug where a temporary DOMString was put into a const DOMString&. Changed some DOMString to AtomicString as appropriate, and also used equalIgnoringCase instead of strcasecmp. (RenderSlider::slotSliderValueChanged): More of the same. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv): Replaced use of strcasecmp with equalIgnoringCase. Added parentheses to fix incorrect operator precedence in one case (&& binds tighter than ||) which fixes a crash when using a http-equiv pragma when there is no part (not sure how to reproduce that). * khtml/khtml_part.cpp: (updateState): (KHTMLPart::selectionStartHasStyle): * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocument::putValueProperty): * khtml/editing/apply_style_command.cpp: (khtml::StyleChange::checkForLegacyHTMLStyleChange): (khtml::StyleChange::currentlyHasStyle): (khtml::hasTextDecorationProperty): (khtml::ApplyStyleCommand::extractTextDecorationStyle): (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseMappedAttribute): (HTMLFrameElementImpl::parseMappedAttribute): * khtml/html/html_blockimpl.cpp: (HTMLDivElementImpl::parseMappedAttribute): (HTMLHRElementImpl::parseMappedAttribute): (HTMLParagraphElementImpl::parseMappedAttribute): (HTMLMarqueeElementImpl::parseMappedAttribute): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseMappedAttribute): (HTMLElementImpl::addHTMLAlignment): (HTMLElementImpl::setContentEditable): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::parseMappedAttribute): (DOM::HTMLButtonElementImpl::parseMappedAttribute): (DOM::HTMLInputElementImpl::setInputType): (DOM::HTMLInputElementImpl::parseMappedAttribute): (DOM::HTMLKeygenElementImpl::appendFormData): (DOM::HTMLTextAreaElementImpl::parseMappedAttribute): * khtml/html/html_imageimpl.cpp: (DOM::HTMLAreaElementImpl::parseMappedAttribute): * khtml/html/html_inlineimpl.cpp: (DOM::HTMLBRElementImpl::parseMappedAttribute): * khtml/html/html_tableimpl.cpp: (DOM::HTMLTablePartElementImpl::parseMappedAttribute): * khtml/html/htmlparser.cpp: (HTMLParser::handleError): Use equalIgnoringCase instead of strcasecmp. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7baeccde