[webkit-changes] cvs commit: WebCore/kwq DOM.mm DOMHTML.mm
KWQAccObject.mm KWQKHTMLPart.cpp KWQKHTMLPart.mm WebCoreBridge.mm
David
hyatt at opensource.apple.com
Mon Jul 18 14:52:38 PDT 2005
hyatt 05/07/18 14:52:37
Modified: . ChangeLog
khtml khtml_part.cpp khtmlview.cpp
khtml/css cssstyleselector.cpp
khtml/dom css_stylesheet.cpp html_base.cpp html_block.cpp
html_form.cpp html_head.cpp html_image.cpp
html_inline.cpp html_list.cpp html_misc.cpp
html_object.cpp html_table.cpp
khtml/ecma kjs_css.cpp kjs_dom.cpp kjs_html.cpp
khtml/editing apply_style_command.cpp
break_blockquote_command.cpp
composite_edit_command.cpp
delete_selection_command.cpp htmlediting.cpp
insert_line_break_command.cpp
insert_paragraph_separator_command.cpp markup.cpp
replace_selection_command.cpp visible_position.cpp
visible_text.cpp visible_units.cpp
khtml/html html_baseimpl.cpp html_blockimpl.cpp
html_canvasimpl.cpp html_documentimpl.cpp
html_elementimpl.cpp html_formimpl.cpp
html_formimpl.h html_headimpl.cpp
html_imageimpl.cpp html_inlineimpl.cpp
html_listimpl.cpp html_listimpl.h html_miscimpl.cpp
html_objectimpl.cpp html_tableimpl.cpp
html_tableimpl.h htmlfactory.cpp htmlnames.cpp
htmlnames.h htmlparser.cpp htmltokenizer.cpp
khtml/misc decoder.cpp
khtml/rendering render_applet.cpp render_block.cpp
render_box.cpp render_canvasimage.cpp
render_flow.cpp render_form.cpp render_frames.cpp
render_image.cpp render_layer.cpp render_list.cpp
render_object.cpp render_table.cpp
khtml/xml dom_docimpl.cpp dom_nodeimpl.cpp dom_position.cpp
xml_tokenizer.cpp
kwq DOM.mm DOMHTML.mm KWQAccObject.mm KWQKHTMLPart.cpp
KWQKHTMLPart.mm WebCoreBridge.mm
Log:
Rename HTMLNames -> HTMLTags. Purely mechanical (done in XCode)
so no review needed.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::adjustRenderStyle):
(khtml::CSSStyleSelector::checkOneSelector):
* khtml/dom/css_stylesheet.cpp:
(LinkStyle::operator = ):
(LinkStyle::sheet):
* khtml/dom/html_base.cpp:
(HTMLBodyElement::operator = ):
(HTMLFrameElement::operator = ):
(HTMLIFrameElement::operator = ):
(HTMLFrameSetElement::operator = ):
(HTMLHeadElement::operator = ):
(HTMLHtmlElement::operator = ):
* khtml/dom/html_block.cpp:
(HTMLBlockquoteElement::operator = ):
(HTMLDivElement::operator = ):
(HTMLHRElement::operator = ):
(HTMLHeadingElement::operator = ):
(HTMLParagraphElement::operator = ):
(HTMLPreElement::operator = ):
* khtml/dom/html_form.cpp:
(HTMLButtonElement::operator = ):
(HTMLFieldSetElement::operator = ):
(HTMLFormElement::operator = ):
(HTMLInputElement::operator = ):
(HTMLLabelElement::operator = ):
(HTMLLegendElement::operator = ):
(HTMLOptGroupElement::operator = ):
(HTMLSelectElement::operator = ):
(HTMLTextAreaElement::operator = ):
(HTMLOptionElement::operator = ):
(HTMLIsIndexElement::operator = ):
* khtml/dom/html_head.cpp:
(HTMLBaseElement::operator = ):
(HTMLLinkElement::operator = ):
(HTMLMetaElement::operator = ):
(HTMLScriptElement::operator = ):
(HTMLStyleElement::operator = ):
(HTMLTitleElement::operator = ):
* khtml/dom/html_image.cpp:
(HTMLAreaElement::operator = ):
(HTMLImageElement::operator = ):
(HTMLMapElement::operator = ):
* khtml/dom/html_inline.cpp:
(HTMLAnchorElement::operator = ):
(HTMLBRElement::operator = ):
(HTMLFontElement::operator = ):
(HTMLModElement::HTMLModElement):
(HTMLModElement::operator = ):
(HTMLQuoteElement::operator = ):
* khtml/dom/html_list.cpp:
(HTMLDListElement::operator = ):
(HTMLDirectoryElement::operator = ):
(HTMLLIElement::operator = ):
(HTMLMenuElement::operator = ):
(HTMLOListElement::operator = ):
(HTMLUListElement::operator = ):
* khtml/dom/html_misc.cpp:
(HTMLBaseFontElement::operator = ):
* khtml/dom/html_object.cpp:
(DOM::HTMLAppletElement::operator = ):
(DOM::HTMLObjectElement::operator = ):
(DOM::HTMLParamElement::operator = ):
* khtml/dom/html_table.cpp:
(HTMLTableCaptionElement::operator = ):
(HTMLTableCellElement::operator = ):
(HTMLTableColElement::operator = ):
(HTMLTableElement::operator = ):
(HTMLTableRowElement::operator = ):
(HTMLTableSectionElement::operator = ):
* khtml/ecma/kjs_css.cpp:
(KJS::DOMStyleSheetList::tryGet):
* khtml/ecma/kjs_dom.cpp:
(KJS::getRuntimeObject):
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
(KJS::KJS::HTMLDocument::putValue):
(KJS::KJS::HTMLElement::classInfo):
(KJS::HTMLElement::getSetInfo):
(KJS::KJS::HTMLElement::tryGet):
(KJS::KJS::HTMLElement::implementsCall):
(KJS::KJS::HTMLElement::call):
(KJS::KJS::HTMLElement::hasOwnProperty):
(KJS::KJS::HTMLElement::toString):
(KJS::getForm):
(KJS::KJS::HTMLElement::pushEventHandlerScope):
(KJS::KJS::HTMLElementFunction::tryCall):
(KJS::KJS::HTMLElement::tryPut):
(KJS::toHTMLTableCaptionElement):
(KJS::toHTMLTableSectionElement):
(KJS::KJS::HTMLCollection::tryGet):
(KJS::KJS::HTMLSelectCollection::tryPut):
* khtml/editing/apply_style_command.cpp:
(khtml::isEmptyStyleSpan):
(khtml::isEmptyFontTag):
(khtml::createFontElement):
(khtml::createStyleSpanElement):
(khtml::ApplyStyleCommand::applyInlineStyle):
(khtml::ApplyStyleCommand::isHTMLStyleNode):
(khtml::ApplyStyleCommand::removeHTMLFontStyle):
(khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
* khtml/editing/break_blockquote_command.cpp:
(khtml::BreakBlockquoteCommand::doApply):
* khtml/editing/composite_edit_command.cpp:
(khtml::CompositeEditCommand::insertNodeBefore):
(khtml::CompositeEditCommand::insertNodeAfter):
(khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
(khtml::createBlockPlaceholderElement):
* khtml/editing/delete_selection_command.cpp:
(khtml::isListStructureNode):
(khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete):
(khtml::DeleteSelectionCommand::handleGeneralDelete):
(khtml::DeleteSelectionCommand::moveNodesAfterNode):
* khtml/editing/htmlediting.cpp:
(khtml::isSpecialElement):
(khtml::createDefaultParagraphElement):
(khtml::createBreakElement):
(khtml::isMailBlockquote):
* khtml/editing/insert_line_break_command.cpp:
(khtml::InsertLineBreakCommand::doApply):
* khtml/editing/insert_paragraph_separator_command.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply):
* khtml/editing/markup.cpp:
(khtml::startMarkup):
(khtml::createMarkup):
(khtml::createFragmentFromText):
* khtml/editing/replace_selection_command.cpp:
(khtml::isProbablyBlock):
(khtml::isProbablyTableStructureNode):
(khtml::ReplacementFragment::isInterchangeNewlineNode):
(khtml::ReplacementFragment::removeStyleNodes):
(khtml::ReplaceSelectionCommand::doApply):
* khtml/editing/visible_position.cpp:
(khtml::VisiblePosition::init):
(khtml::VisiblePosition::isCandidate):
(khtml::VisiblePosition::isAtomicNode):
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::handleNonTextNode):
(khtml::TextIterator::exitNode):
(khtml::SimplifiedBackwardsTextIterator::handleNonTextNode):
* khtml/editing/visible_units.cpp:
(khtml::endOfLine):
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::HTMLBodyElementImpl):
(HTMLFrameElementImpl::HTMLFrameElementImpl):
(HTMLFrameElementImpl::attach):
(HTMLFrameSetElementImpl::HTMLFrameSetElementImpl):
(HTMLFrameSetElementImpl::checkDTD):
(HTMLFrameSetElementImpl::attach):
(HTMLHeadElementImpl::HTMLHeadElementImpl):
(HTMLHeadElementImpl::checkDTD):
(HTMLHtmlElementImpl::HTMLHtmlElementImpl):
(HTMLHtmlElementImpl::checkDTD):
(HTMLIFrameElementImpl::HTMLIFrameElementImpl):
* khtml/html/html_blockimpl.cpp:
(HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl):
(HTMLDivElementImpl::HTMLDivElementImpl):
(HTMLHRElementImpl::HTMLHRElementImpl):
(HTMLHeadingElementImpl::checkDTD):
(HTMLParagraphElementImpl::HTMLParagraphElementImpl):
(HTMLParagraphElementImpl::checkDTD):
(HTMLMarqueeElementImpl::HTMLMarqueeElementImpl):
* khtml/html/html_canvasimpl.cpp:
(HTMLCanvasElementImpl::HTMLCanvasElementImpl):
* khtml/html/html_documentimpl.cpp:
(DOM::HTMLDocumentImpl::childAllowed):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::endTagRequirement):
(HTMLElementImpl::tagPriority):
(HTMLElementImpl::createContextualFragment):
(HTMLElementImpl::setInnerText):
(HTMLElementImpl::setOuterText):
(HTMLElementImpl::isRecognizedTagName):
(inlineTagList):
(blockTagList):
(HTMLElementImpl::checkDTD):
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::HTMLFormElementImpl):
(DOM::HTMLFormElementImpl::submitClick):
(DOM::HTMLFormElementImpl::formData):
(DOM::HTMLFormElementImpl::submit):
(DOM::HTMLFormElementImpl::radioClicked):
(DOM::HTMLGenericFormElementImpl::getForm):
(DOM::HTMLButtonElementImpl::HTMLButtonElementImpl):
(DOM::HTMLFieldSetElementImpl::HTMLFieldSetElementImpl):
(DOM::HTMLFieldSetElementImpl::checkDTD):
(DOM::HTMLInputElementImpl::HTMLInputElementImpl):
(DOM::HTMLLabelElementImpl::HTMLLabelElementImpl):
(DOM::HTMLLabelElementImpl::form):
(DOM::HTMLLegendElementImpl::HTMLLegendElementImpl):
(DOM::HTMLLegendElementImpl::formElement):
(DOM::HTMLSelectElementImpl::HTMLSelectElementImpl):
(DOM::HTMLSelectElementImpl::checkDTD):
(DOM::HTMLSelectElementImpl::selectedIndex):
(DOM::HTMLSelectElementImpl::setSelectedIndex):
(DOM::HTMLSelectElementImpl::length):
(DOM::HTMLSelectElementImpl::add):
(DOM::HTMLSelectElementImpl::value):
(DOM::HTMLSelectElementImpl::setValue):
(DOM::HTMLSelectElementImpl::state):
(DOM::HTMLSelectElementImpl::restoreState):
(DOM::HTMLSelectElementImpl::appendFormData):
(DOM::HTMLSelectElementImpl::optionToListIndex):
(DOM::HTMLSelectElementImpl::listToOptionIndex):
(DOM::HTMLSelectElementImpl::recalcListItems):
(DOM::HTMLSelectElementImpl::reset):
(DOM::HTMLSelectElementImpl::notifyOptionSelected):
(DOM::HTMLKeygenElementImpl::HTMLKeygenElementImpl):
(DOM::HTMLOptGroupElementImpl::HTMLOptGroupElementImpl):
(DOM::HTMLOptGroupElementImpl::recalcSelectOptions):
(DOM::HTMLOptionElementImpl::HTMLOptionElementImpl):
(DOM::HTMLOptionElementImpl::index):
(DOM::HTMLOptionElementImpl::getSelect):
(DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl):
(DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl):
* khtml/html/html_formimpl.h:
(DOM::HTMLOptGroupElementImpl::checkDTD):
* khtml/html/html_headimpl.cpp:
(HTMLBaseElementImpl::HTMLBaseElementImpl):
(HTMLLinkElementImpl::HTMLLinkElementImpl):
(HTMLMetaElementImpl::HTMLMetaElementImpl):
(HTMLScriptElementImpl::HTMLScriptElementImpl):
(HTMLStyleElementImpl::HTMLStyleElementImpl):
(HTMLTitleElementImpl::HTMLTitleElementImpl):
* khtml/html/html_imageimpl.cpp:
(HTMLImageLoader::updateFromElement):
(HTMLImageElementImpl::HTMLImageElementImpl):
(HTMLMapElementImpl::HTMLMapElementImpl):
(HTMLMapElementImpl::checkDTD):
(HTMLMapElementImpl::mapMouseEvent):
(HTMLAreaElementImpl::HTMLAreaElementImpl):
* khtml/html/html_inlineimpl.cpp:
(DOM::HTMLAnchorElementImpl::HTMLAnchorElementImpl):
(DOM::HTMLAnchorElementImpl::defaultEventHandler):
(DOM::HTMLBRElementImpl::HTMLBRElementImpl):
(DOM::HTMLFontElementImpl::HTMLFontElementImpl):
(DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl):
* khtml/html/html_listimpl.cpp:
(DOM::HTMLLIElementImpl::attach):
* khtml/html/html_listimpl.h:
(DOM::HTMLUListElementImpl::HTMLUListElementImpl):
(DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl):
(DOM::HTMLMenuElementImpl::HTMLMenuElementImpl):
(DOM::HTMLOListElementImpl::HTMLOListElementImpl):
(DOM::HTMLLIElementImpl::HTMLLIElementImpl):
(DOM::HTMLDListElementImpl::HTMLDListElementImpl):
* khtml/html/html_miscimpl.cpp:
(DOM::HTMLBaseFontElementImpl::HTMLBaseFontElementImpl):
(DOM::HTMLCollectionImpl::traverseNextItem):
(DOM::HTMLCollectionImpl::checkForNameMatch):
(DOM::HTMLCollectionImpl::updateNameCache):
(DOM::HTMLFormCollectionImpl::getNamedFormItem):
(DOM::HTMLFormCollectionImpl::updateNameCache):
* khtml/html/html_objectimpl.cpp:
(DOM::HTMLAppletElementImpl::HTMLAppletElementImpl):
(DOM::HTMLAppletElementImpl::checkDTD):
(DOM::HTMLEmbedElementImpl::HTMLEmbedElementImpl):
(DOM::HTMLEmbedElementImpl::checkDTD):
(DOM::HTMLEmbedElementImpl::rendererIsNeeded):
(DOM::HTMLObjectElementImpl::HTMLObjectElementImpl):
(DOM::HTMLObjectElementImpl::checkDTD):
(DOM::HTMLObjectElementImpl::form):
(DOM::HTMLParamElementImpl::HTMLParamElementImpl):
* khtml/html/html_tableimpl.cpp:
(DOM::HTMLTableElementImpl::HTMLTableElementImpl):
(DOM::HTMLTableElementImpl::checkDTD):
(DOM::HTMLTableElementImpl::createTHead):
(DOM::HTMLTableElementImpl::createTFoot):
(DOM::HTMLTableElementImpl::insertRow):
(DOM::HTMLTableElementImpl::deleteRow):
(DOM::HTMLTableElementImpl::addChild):
(DOM::HTMLTableSectionElementImpl::checkDTD):
(DOM::HTMLTableSectionElementImpl::addChild):
(DOM::HTMLTableSectionElementImpl::numRows):
(DOM::HTMLTableRowElementImpl::checkDTD):
(DOM::HTMLTableRowElementImpl::addChild):
(DOM::HTMLTableRowElementImpl::rowIndex):
(DOM::HTMLTableRowElementImpl::sectionRowIndex):
(DOM::HTMLTableRowElementImpl::insertCell):
(DOM::HTMLTableCellElementImpl::cellIndex):
(DOM::HTMLTableCellElementImpl::additionalAttributeStyleDecl):
(DOM::HTMLTableColElementImpl::HTMLTableColElementImpl):
* khtml/html/html_tableimpl.h:
(DOM::HTMLTableRowElementImpl::HTMLTableRowElementImpl):
(DOM::HTMLTableColElementImpl::endTagRequirement):
(DOM::HTMLTableColElementImpl::tagPriority):
(DOM::HTMLTableColElementImpl::checkDTD):
(DOM::HTMLTableCaptionElementImpl::HTMLTableCaptionElementImpl):
* khtml/html/htmlfactory.cpp:
(DOM::headingConstructor):
(DOM::preConstructor):
(DOM::modConstructor):
(DOM::tableColConstructor):
(DOM::tableCellConstructor):
(DOM::tableSectionConstructor):
(DOM::HTMLElementFactory::createHTMLElement):
* khtml/html/htmlnames.cpp:
(DOM::HTMLTags::init):
* khtml/html/htmlnames.h:
* khtml/html/htmlparser.cpp:
(HTMLParser::parseToken):
(isTableSection):
(isTablePart):
(isTableRelated):
(HTMLParser::handleError):
(HTMLParser::headCreateErrorCheck):
(HTMLParser::bodyCreateErrorCheck):
(HTMLParser::framesetCreateErrorCheck):
(HTMLParser::iframeCreateErrorCheck):
(HTMLParser::ddCreateErrorCheck):
(HTMLParser::dtCreateErrorCheck):
(HTMLParser::tableCellCreateErrorCheck):
(HTMLParser::tableSectionCreateErrorCheck):
(HTMLParser::noembedCreateErrorCheck):
(HTMLParser::noframesCreateErrorCheck):
(HTMLParser::noscriptCreateErrorCheck):
(HTMLParser::getNode):
(HTMLParser::processCloseTag):
(HTMLParser::isHeaderTag):
(HTMLParser::isInline):
(HTMLParser::isResidualStyleTag):
(HTMLParser::isAffectedByResidualStyle):
(HTMLParser::popBlock):
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::parseSpecial):
(khtml::HTMLTokenizer::scriptHandler):
(khtml::HTMLTokenizer::parseTag):
* khtml/khtml_part.cpp:
(KHTMLPart::init):
(KHTMLPart::selectionComputedStyle):
* khtml/khtmlview.cpp:
(KHTMLView::layout):
(isSubmitImage):
* khtml/misc/decoder.cpp:
(Decoder::decode):
* khtml/rendering/render_applet.cpp:
(RenderApplet::createWidgetIfNecessary):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlock):
* khtml/rendering/render_box.cpp:
(RenderBox::paintRootBoxDecorations):
(RenderBox::paintBackgroundExtended):
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::paint):
* khtml/rendering/render_flow.cpp:
(RenderFlow::addFocusRingRects):
* khtml/rendering/render_form.cpp:
(RenderFieldset::findLegend):
(RenderSelect::updateFromElement):
(RenderSelect::layout):
(RenderSelect::slotSelected):
(RenderSelect::slotSelectionChanged):
(RenderSelect::updateSelection):
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget):
(RenderPartObject::slotViewCleared):
* khtml/rendering/render_image.cpp:
(RenderImage::paint):
(RenderImage::imageMap):
(RenderImage::updateAltText):
* khtml/rendering/render_layer.cpp:
(Marquee::marqueeSpeed):
* khtml/rendering/render_list.cpp:
(getParentOfFirstLineBox):
* khtml/rendering/render_object.cpp:
(RenderObject::isBody):
(RenderObject::isHR):
(RenderObject::isHTMLMarquee):
(RenderObject::sizesToMaxWidth):
(RenderObject::setStyle):
(RenderObject::getTextDecorationColors):
(RenderObject::setPixmap):
* khtml/rendering/render_table.cpp:
(RenderTable::addChild):
(RenderTable::layout):
(RenderTableSection::addChild):
(RenderTableRow::addChild):
(RenderTableCell::updateFromElement):
(RenderTableCol::updateFromElement):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createElementNS):
(DocumentImpl::body):
(DocumentImpl::shouldScheduleLayout):
(DocumentImpl::recalcStyleSelector):
* khtml/xml/dom_nodeimpl.cpp:
(DOM::NodeImpl::maxDeepOffset):
(DOM::NodeImpl::enclosingBlockFlowOrTableElement):
(DOM::NodeImpl::enclosingBlockFlowElement):
(DOM::NodeImpl::enclosingInlineElement):
(DOM::NodeImpl::rootEditableElement):
(DOM::NodeImpl::showTreeAndMark):
* khtml/xml/dom_position.cpp:
(DOM::Position::downstream):
(DOM::Position::rendersInDifferentPosition):
(DOM::Position::leadingWhitespacePosition):
(DOM::Position::trailingWhitespacePosition):
* khtml/xml/xml_tokenizer.cpp:
(khtml::XMLTokenizer::startElement):
(khtml::XMLTokenizer::insertErrorMessageBlock):
(khtml::XMLTokenizer::addScripts):
* kwq/DOM.mm:
(+[DOMNode _nodeWithImpl:]):
* kwq/DOMHTML.mm:
* kwq/KWQAccObject.mm:
(-[KWQAccObject role]):
(-[KWQAccObject title]):
(-[KWQAccObject accessibilityIsIgnored]):
* kwq/KWQKHTMLPart.cpp:
(KWQKHTMLPart::isFrameSet):
* kwq/KWQKHTMLPart.mm:
(scanForForm):
(KWQKHTMLPart::currentForm):
(KWQKHTMLPart::searchForLabelsBeforeElement):
(listParent):
(isTextFirstInListItem):
(KWQKHTMLPart::attributedString):
(KWQKHTMLPart::styleForSelectionStart):
(KWQKHTMLPart::setSelectionFromNone):
* kwq/WebCoreBridge.mm:
(inputElementFromDOMElement):
(formElementFromDOMElement):
(-[WebCoreBridge elementAtPoint:]):
Revision Changes Path
1.4436 +429 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4435
retrieving revision 1.4436
diff -u -r1.4435 -r1.4436
--- ChangeLog 18 Jul 2005 21:44:07 -0000 1.4435
+++ ChangeLog 18 Jul 2005 21:52:05 -0000 1.4436
@@ -1,5 +1,434 @@
2005-07-18 David Hyatt <hyatt at apple.com>
+ Rename HTMLNames -> HTMLTags. Purely mechanical (done in XCode)
+ so no review needed.
+
+ * khtml/css/cssstyleselector.cpp:
+ (khtml::CSSStyleSelector::adjustRenderStyle):
+ (khtml::CSSStyleSelector::checkOneSelector):
+ * khtml/dom/css_stylesheet.cpp:
+ (LinkStyle::operator = ):
+ (LinkStyle::sheet):
+ * khtml/dom/html_base.cpp:
+ (HTMLBodyElement::operator = ):
+ (HTMLFrameElement::operator = ):
+ (HTMLIFrameElement::operator = ):
+ (HTMLFrameSetElement::operator = ):
+ (HTMLHeadElement::operator = ):
+ (HTMLHtmlElement::operator = ):
+ * khtml/dom/html_block.cpp:
+ (HTMLBlockquoteElement::operator = ):
+ (HTMLDivElement::operator = ):
+ (HTMLHRElement::operator = ):
+ (HTMLHeadingElement::operator = ):
+ (HTMLParagraphElement::operator = ):
+ (HTMLPreElement::operator = ):
+ * khtml/dom/html_form.cpp:
+ (HTMLButtonElement::operator = ):
+ (HTMLFieldSetElement::operator = ):
+ (HTMLFormElement::operator = ):
+ (HTMLInputElement::operator = ):
+ (HTMLLabelElement::operator = ):
+ (HTMLLegendElement::operator = ):
+ (HTMLOptGroupElement::operator = ):
+ (HTMLSelectElement::operator = ):
+ (HTMLTextAreaElement::operator = ):
+ (HTMLOptionElement::operator = ):
+ (HTMLIsIndexElement::operator = ):
+ * khtml/dom/html_head.cpp:
+ (HTMLBaseElement::operator = ):
+ (HTMLLinkElement::operator = ):
+ (HTMLMetaElement::operator = ):
+ (HTMLScriptElement::operator = ):
+ (HTMLStyleElement::operator = ):
+ (HTMLTitleElement::operator = ):
+ * khtml/dom/html_image.cpp:
+ (HTMLAreaElement::operator = ):
+ (HTMLImageElement::operator = ):
+ (HTMLMapElement::operator = ):
+ * khtml/dom/html_inline.cpp:
+ (HTMLAnchorElement::operator = ):
+ (HTMLBRElement::operator = ):
+ (HTMLFontElement::operator = ):
+ (HTMLModElement::HTMLModElement):
+ (HTMLModElement::operator = ):
+ (HTMLQuoteElement::operator = ):
+ * khtml/dom/html_list.cpp:
+ (HTMLDListElement::operator = ):
+ (HTMLDirectoryElement::operator = ):
+ (HTMLLIElement::operator = ):
+ (HTMLMenuElement::operator = ):
+ (HTMLOListElement::operator = ):
+ (HTMLUListElement::operator = ):
+ * khtml/dom/html_misc.cpp:
+ (HTMLBaseFontElement::operator = ):
+ * khtml/dom/html_object.cpp:
+ (DOM::HTMLAppletElement::operator = ):
+ (DOM::HTMLObjectElement::operator = ):
+ (DOM::HTMLParamElement::operator = ):
+ * khtml/dom/html_table.cpp:
+ (HTMLTableCaptionElement::operator = ):
+ (HTMLTableCellElement::operator = ):
+ (HTMLTableColElement::operator = ):
+ (HTMLTableElement::operator = ):
+ (HTMLTableRowElement::operator = ):
+ (HTMLTableSectionElement::operator = ):
+ * khtml/ecma/kjs_css.cpp:
+ (KJS::DOMStyleSheetList::tryGet):
+ * khtml/ecma/kjs_dom.cpp:
+ (KJS::getRuntimeObject):
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLDocument::tryGet):
+ (KJS::KJS::HTMLDocument::putValue):
+ (KJS::KJS::HTMLElement::classInfo):
+ (KJS::HTMLElement::getSetInfo):
+ (KJS::KJS::HTMLElement::tryGet):
+ (KJS::KJS::HTMLElement::implementsCall):
+ (KJS::KJS::HTMLElement::call):
+ (KJS::KJS::HTMLElement::hasOwnProperty):
+ (KJS::KJS::HTMLElement::toString):
+ (KJS::getForm):
+ (KJS::KJS::HTMLElement::pushEventHandlerScope):
+ (KJS::KJS::HTMLElementFunction::tryCall):
+ (KJS::KJS::HTMLElement::tryPut):
+ (KJS::toHTMLTableCaptionElement):
+ (KJS::toHTMLTableSectionElement):
+ (KJS::KJS::HTMLCollection::tryGet):
+ (KJS::KJS::HTMLSelectCollection::tryPut):
+ * khtml/editing/apply_style_command.cpp:
+ (khtml::isEmptyStyleSpan):
+ (khtml::isEmptyFontTag):
+ (khtml::createFontElement):
+ (khtml::createStyleSpanElement):
+ (khtml::ApplyStyleCommand::applyInlineStyle):
+ (khtml::ApplyStyleCommand::isHTMLStyleNode):
+ (khtml::ApplyStyleCommand::removeHTMLFontStyle):
+ (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
+ (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
+ * khtml/editing/break_blockquote_command.cpp:
+ (khtml::BreakBlockquoteCommand::doApply):
+ * khtml/editing/composite_edit_command.cpp:
+ (khtml::CompositeEditCommand::insertNodeBefore):
+ (khtml::CompositeEditCommand::insertNodeAfter):
+ (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
+ (khtml::createBlockPlaceholderElement):
+ * khtml/editing/delete_selection_command.cpp:
+ (khtml::isListStructureNode):
+ (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete):
+ (khtml::DeleteSelectionCommand::handleGeneralDelete):
+ (khtml::DeleteSelectionCommand::moveNodesAfterNode):
+ * khtml/editing/htmlediting.cpp:
+ (khtml::isSpecialElement):
+ (khtml::createDefaultParagraphElement):
+ (khtml::createBreakElement):
+ (khtml::isMailBlockquote):
+ * khtml/editing/insert_line_break_command.cpp:
+ (khtml::InsertLineBreakCommand::doApply):
+ * khtml/editing/insert_paragraph_separator_command.cpp:
+ (khtml::InsertParagraphSeparatorCommand::doApply):
+ * khtml/editing/markup.cpp:
+ (khtml::startMarkup):
+ (khtml::createMarkup):
+ (khtml::createFragmentFromText):
+ * khtml/editing/replace_selection_command.cpp:
+ (khtml::isProbablyBlock):
+ (khtml::isProbablyTableStructureNode):
+ (khtml::ReplacementFragment::isInterchangeNewlineNode):
+ (khtml::ReplacementFragment::removeStyleNodes):
+ (khtml::ReplaceSelectionCommand::doApply):
+ * khtml/editing/visible_position.cpp:
+ (khtml::VisiblePosition::init):
+ (khtml::VisiblePosition::isCandidate):
+ (khtml::VisiblePosition::isAtomicNode):
+ * khtml/editing/visible_text.cpp:
+ (khtml::TextIterator::handleNonTextNode):
+ (khtml::TextIterator::exitNode):
+ (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode):
+ * khtml/editing/visible_units.cpp:
+ (khtml::endOfLine):
+ * khtml/html/html_baseimpl.cpp:
+ (HTMLBodyElementImpl::HTMLBodyElementImpl):
+ (HTMLFrameElementImpl::HTMLFrameElementImpl):
+ (HTMLFrameElementImpl::attach):
+ (HTMLFrameSetElementImpl::HTMLFrameSetElementImpl):
+ (HTMLFrameSetElementImpl::checkDTD):
+ (HTMLFrameSetElementImpl::attach):
+ (HTMLHeadElementImpl::HTMLHeadElementImpl):
+ (HTMLHeadElementImpl::checkDTD):
+ (HTMLHtmlElementImpl::HTMLHtmlElementImpl):
+ (HTMLHtmlElementImpl::checkDTD):
+ (HTMLIFrameElementImpl::HTMLIFrameElementImpl):
+ * khtml/html/html_blockimpl.cpp:
+ (HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl):
+ (HTMLDivElementImpl::HTMLDivElementImpl):
+ (HTMLHRElementImpl::HTMLHRElementImpl):
+ (HTMLHeadingElementImpl::checkDTD):
+ (HTMLParagraphElementImpl::HTMLParagraphElementImpl):
+ (HTMLParagraphElementImpl::checkDTD):
+ (HTMLMarqueeElementImpl::HTMLMarqueeElementImpl):
+ * khtml/html/html_canvasimpl.cpp:
+ (HTMLCanvasElementImpl::HTMLCanvasElementImpl):
+ * khtml/html/html_documentimpl.cpp:
+ (DOM::HTMLDocumentImpl::childAllowed):
+ * khtml/html/html_elementimpl.cpp:
+ (HTMLElementImpl::endTagRequirement):
+ (HTMLElementImpl::tagPriority):
+ (HTMLElementImpl::createContextualFragment):
+ (HTMLElementImpl::setInnerText):
+ (HTMLElementImpl::setOuterText):
+ (HTMLElementImpl::isRecognizedTagName):
+ (inlineTagList):
+ (blockTagList):
+ (HTMLElementImpl::checkDTD):
+ * khtml/html/html_formimpl.cpp:
+ (DOM::HTMLFormElementImpl::HTMLFormElementImpl):
+ (DOM::HTMLFormElementImpl::submitClick):
+ (DOM::HTMLFormElementImpl::formData):
+ (DOM::HTMLFormElementImpl::submit):
+ (DOM::HTMLFormElementImpl::radioClicked):
+ (DOM::HTMLGenericFormElementImpl::getForm):
+ (DOM::HTMLButtonElementImpl::HTMLButtonElementImpl):
+ (DOM::HTMLFieldSetElementImpl::HTMLFieldSetElementImpl):
+ (DOM::HTMLFieldSetElementImpl::checkDTD):
+ (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
+ (DOM::HTMLLabelElementImpl::HTMLLabelElementImpl):
+ (DOM::HTMLLabelElementImpl::form):
+ (DOM::HTMLLegendElementImpl::HTMLLegendElementImpl):
+ (DOM::HTMLLegendElementImpl::formElement):
+ (DOM::HTMLSelectElementImpl::HTMLSelectElementImpl):
+ (DOM::HTMLSelectElementImpl::checkDTD):
+ (DOM::HTMLSelectElementImpl::selectedIndex):
+ (DOM::HTMLSelectElementImpl::setSelectedIndex):
+ (DOM::HTMLSelectElementImpl::length):
+ (DOM::HTMLSelectElementImpl::add):
+ (DOM::HTMLSelectElementImpl::value):
+ (DOM::HTMLSelectElementImpl::setValue):
+ (DOM::HTMLSelectElementImpl::state):
+ (DOM::HTMLSelectElementImpl::restoreState):
+ (DOM::HTMLSelectElementImpl::appendFormData):
+ (DOM::HTMLSelectElementImpl::optionToListIndex):
+ (DOM::HTMLSelectElementImpl::listToOptionIndex):
+ (DOM::HTMLSelectElementImpl::recalcListItems):
+ (DOM::HTMLSelectElementImpl::reset):
+ (DOM::HTMLSelectElementImpl::notifyOptionSelected):
+ (DOM::HTMLKeygenElementImpl::HTMLKeygenElementImpl):
+ (DOM::HTMLOptGroupElementImpl::HTMLOptGroupElementImpl):
+ (DOM::HTMLOptGroupElementImpl::recalcSelectOptions):
+ (DOM::HTMLOptionElementImpl::HTMLOptionElementImpl):
+ (DOM::HTMLOptionElementImpl::index):
+ (DOM::HTMLOptionElementImpl::getSelect):
+ (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl):
+ (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl):
+ * khtml/html/html_formimpl.h:
+ (DOM::HTMLOptGroupElementImpl::checkDTD):
+ * khtml/html/html_headimpl.cpp:
+ (HTMLBaseElementImpl::HTMLBaseElementImpl):
+ (HTMLLinkElementImpl::HTMLLinkElementImpl):
+ (HTMLMetaElementImpl::HTMLMetaElementImpl):
+ (HTMLScriptElementImpl::HTMLScriptElementImpl):
+ (HTMLStyleElementImpl::HTMLStyleElementImpl):
+ (HTMLTitleElementImpl::HTMLTitleElementImpl):
+ * khtml/html/html_imageimpl.cpp:
+ (HTMLImageLoader::updateFromElement):
+ (HTMLImageElementImpl::HTMLImageElementImpl):
+ (HTMLMapElementImpl::HTMLMapElementImpl):
+ (HTMLMapElementImpl::checkDTD):
+ (HTMLMapElementImpl::mapMouseEvent):
+ (HTMLAreaElementImpl::HTMLAreaElementImpl):
+ * khtml/html/html_inlineimpl.cpp:
+ (DOM::HTMLAnchorElementImpl::HTMLAnchorElementImpl):
+ (DOM::HTMLAnchorElementImpl::defaultEventHandler):
+ (DOM::HTMLBRElementImpl::HTMLBRElementImpl):
+ (DOM::HTMLFontElementImpl::HTMLFontElementImpl):
+ (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl):
+ * khtml/html/html_listimpl.cpp:
+ (DOM::HTMLLIElementImpl::attach):
+ * khtml/html/html_listimpl.h:
+ (DOM::HTMLUListElementImpl::HTMLUListElementImpl):
+ (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl):
+ (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl):
+ (DOM::HTMLOListElementImpl::HTMLOListElementImpl):
+ (DOM::HTMLLIElementImpl::HTMLLIElementImpl):
+ (DOM::HTMLDListElementImpl::HTMLDListElementImpl):
+ * khtml/html/html_miscimpl.cpp:
+ (DOM::HTMLBaseFontElementImpl::HTMLBaseFontElementImpl):
+ (DOM::HTMLCollectionImpl::traverseNextItem):
+ (DOM::HTMLCollectionImpl::checkForNameMatch):
+ (DOM::HTMLCollectionImpl::updateNameCache):
+ (DOM::HTMLFormCollectionImpl::getNamedFormItem):
+ (DOM::HTMLFormCollectionImpl::updateNameCache):
+ * khtml/html/html_objectimpl.cpp:
+ (DOM::HTMLAppletElementImpl::HTMLAppletElementImpl):
+ (DOM::HTMLAppletElementImpl::checkDTD):
+ (DOM::HTMLEmbedElementImpl::HTMLEmbedElementImpl):
+ (DOM::HTMLEmbedElementImpl::checkDTD):
+ (DOM::HTMLEmbedElementImpl::rendererIsNeeded):
+ (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl):
+ (DOM::HTMLObjectElementImpl::checkDTD):
+ (DOM::HTMLObjectElementImpl::form):
+ (DOM::HTMLParamElementImpl::HTMLParamElementImpl):
+ * khtml/html/html_tableimpl.cpp:
+ (DOM::HTMLTableElementImpl::HTMLTableElementImpl):
+ (DOM::HTMLTableElementImpl::checkDTD):
+ (DOM::HTMLTableElementImpl::createTHead):
+ (DOM::HTMLTableElementImpl::createTFoot):
+ (DOM::HTMLTableElementImpl::insertRow):
+ (DOM::HTMLTableElementImpl::deleteRow):
+ (DOM::HTMLTableElementImpl::addChild):
+ (DOM::HTMLTableSectionElementImpl::checkDTD):
+ (DOM::HTMLTableSectionElementImpl::addChild):
+ (DOM::HTMLTableSectionElementImpl::numRows):
+ (DOM::HTMLTableRowElementImpl::checkDTD):
+ (DOM::HTMLTableRowElementImpl::addChild):
+ (DOM::HTMLTableRowElementImpl::rowIndex):
+ (DOM::HTMLTableRowElementImpl::sectionRowIndex):
+ (DOM::HTMLTableRowElementImpl::insertCell):
+ (DOM::HTMLTableCellElementImpl::cellIndex):
+ (DOM::HTMLTableCellElementImpl::additionalAttributeStyleDecl):
+ (DOM::HTMLTableColElementImpl::HTMLTableColElementImpl):
+ * khtml/html/html_tableimpl.h:
+ (DOM::HTMLTableRowElementImpl::HTMLTableRowElementImpl):
+ (DOM::HTMLTableColElementImpl::endTagRequirement):
+ (DOM::HTMLTableColElementImpl::tagPriority):
+ (DOM::HTMLTableColElementImpl::checkDTD):
+ (DOM::HTMLTableCaptionElementImpl::HTMLTableCaptionElementImpl):
+ * khtml/html/htmlfactory.cpp:
+ (DOM::headingConstructor):
+ (DOM::preConstructor):
+ (DOM::modConstructor):
+ (DOM::tableColConstructor):
+ (DOM::tableCellConstructor):
+ (DOM::tableSectionConstructor):
+ (DOM::HTMLElementFactory::createHTMLElement):
+ * khtml/html/htmlnames.cpp:
+ (DOM::HTMLTags::init):
+ * khtml/html/htmlnames.h:
+ * khtml/html/htmlparser.cpp:
+ (HTMLParser::parseToken):
+ (isTableSection):
+ (isTablePart):
+ (isTableRelated):
+ (HTMLParser::handleError):
+ (HTMLParser::headCreateErrorCheck):
+ (HTMLParser::bodyCreateErrorCheck):
+ (HTMLParser::framesetCreateErrorCheck):
+ (HTMLParser::iframeCreateErrorCheck):
+ (HTMLParser::ddCreateErrorCheck):
+ (HTMLParser::dtCreateErrorCheck):
+ (HTMLParser::tableCellCreateErrorCheck):
+ (HTMLParser::tableSectionCreateErrorCheck):
+ (HTMLParser::noembedCreateErrorCheck):
+ (HTMLParser::noframesCreateErrorCheck):
+ (HTMLParser::noscriptCreateErrorCheck):
+ (HTMLParser::getNode):
+ (HTMLParser::processCloseTag):
+ (HTMLParser::isHeaderTag):
+ (HTMLParser::isInline):
+ (HTMLParser::isResidualStyleTag):
+ (HTMLParser::isAffectedByResidualStyle):
+ (HTMLParser::popBlock):
+ * khtml/html/htmltokenizer.cpp:
+ (khtml::HTMLTokenizer::parseSpecial):
+ (khtml::HTMLTokenizer::scriptHandler):
+ (khtml::HTMLTokenizer::parseTag):
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::init):
+ (KHTMLPart::selectionComputedStyle):
+ * khtml/khtmlview.cpp:
+ (KHTMLView::layout):
+ (isSubmitImage):
+ * khtml/misc/decoder.cpp:
+ (Decoder::decode):
+ * khtml/rendering/render_applet.cpp:
+ (RenderApplet::createWidgetIfNecessary):
+ * khtml/rendering/render_block.cpp:
+ (khtml::RenderBlock::layoutBlock):
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::paintRootBoxDecorations):
+ (RenderBox::paintBackgroundExtended):
+ * khtml/rendering/render_canvasimage.cpp:
+ (RenderCanvasImage::paint):
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::addFocusRingRects):
+ * khtml/rendering/render_form.cpp:
+ (RenderFieldset::findLegend):
+ (RenderSelect::updateFromElement):
+ (RenderSelect::layout):
+ (RenderSelect::slotSelected):
+ (RenderSelect::slotSelectionChanged):
+ (RenderSelect::updateSelection):
+ * khtml/rendering/render_frames.cpp:
+ (RenderPartObject::updateWidget):
+ (RenderPartObject::slotViewCleared):
+ * khtml/rendering/render_image.cpp:
+ (RenderImage::paint):
+ (RenderImage::imageMap):
+ (RenderImage::updateAltText):
+ * khtml/rendering/render_layer.cpp:
+ (Marquee::marqueeSpeed):
+ * khtml/rendering/render_list.cpp:
+ (getParentOfFirstLineBox):
+ * khtml/rendering/render_object.cpp:
+ (RenderObject::isBody):
+ (RenderObject::isHR):
+ (RenderObject::isHTMLMarquee):
+ (RenderObject::sizesToMaxWidth):
+ (RenderObject::setStyle):
+ (RenderObject::getTextDecorationColors):
+ (RenderObject::setPixmap):
+ * khtml/rendering/render_table.cpp:
+ (RenderTable::addChild):
+ (RenderTable::layout):
+ (RenderTableSection::addChild):
+ (RenderTableRow::addChild):
+ (RenderTableCell::updateFromElement):
+ (RenderTableCol::updateFromElement):
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::createElementNS):
+ (DocumentImpl::body):
+ (DocumentImpl::shouldScheduleLayout):
+ (DocumentImpl::recalcStyleSelector):
+ * khtml/xml/dom_nodeimpl.cpp:
+ (DOM::NodeImpl::maxDeepOffset):
+ (DOM::NodeImpl::enclosingBlockFlowOrTableElement):
+ (DOM::NodeImpl::enclosingBlockFlowElement):
+ (DOM::NodeImpl::enclosingInlineElement):
+ (DOM::NodeImpl::rootEditableElement):
+ (DOM::NodeImpl::showTreeAndMark):
+ * khtml/xml/dom_position.cpp:
+ (DOM::Position::downstream):
+ (DOM::Position::rendersInDifferentPosition):
+ (DOM::Position::leadingWhitespacePosition):
+ (DOM::Position::trailingWhitespacePosition):
+ * khtml/xml/xml_tokenizer.cpp:
+ (khtml::XMLTokenizer::startElement):
+ (khtml::XMLTokenizer::insertErrorMessageBlock):
+ (khtml::XMLTokenizer::addScripts):
+ * kwq/DOM.mm:
+ (+[DOMNode _nodeWithImpl:]):
+ * kwq/DOMHTML.mm:
+ * kwq/KWQAccObject.mm:
+ (-[KWQAccObject role]):
+ (-[KWQAccObject title]):
+ (-[KWQAccObject accessibilityIsIgnored]):
+ * kwq/KWQKHTMLPart.cpp:
+ (KWQKHTMLPart::isFrameSet):
+ * kwq/KWQKHTMLPart.mm:
+ (scanForForm):
+ (KWQKHTMLPart::currentForm):
+ (KWQKHTMLPart::searchForLabelsBeforeElement):
+ (listParent):
+ (isTextFirstInListItem):
+ (KWQKHTMLPart::attributedString):
+ (KWQKHTMLPart::styleForSelectionStart):
+ (KWQKHTMLPart::setSelectionFromNone):
+ * kwq/WebCoreBridge.mm:
+ (inputElementFromDOMElement):
+ (formElementFromDOMElement):
+ (-[WebCoreBridge elementAtPoint:]):
+
+2005-07-18 David Hyatt <hyatt at apple.com>
+
Fix for bugzilla bug 3927. Convert attributes to use QualifiedName.
Reviewed by mjs
1.330 +2 -2 WebCore/khtml/khtml_part.cpp
Index: khtml_part.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtml_part.cpp,v
retrieving revision 1.329
retrieving revision 1.330
diff -u -r1.329 -r1.330
--- khtml_part.cpp 18 Jul 2005 21:44:12 -0000 1.329
+++ khtml_part.cpp 18 Jul 2005 21:52:13 -0000 1.330
@@ -208,7 +208,7 @@
{
AtomicString::init();
QualifiedName::init();
- HTMLNames::init(); // FIXME: We should make this happen only when HTML is used.
+ HTMLTags::init(); // FIXME: We should make this happen only when HTML is used.
HTMLAttributes::init(); // FIXME: Ditto.
if ( prof == DefaultGUI )
setXMLFile( "khtml.rc" );
@@ -5734,7 +5734,7 @@
int exceptionCode = 0;
if (d->m_typingStyle) {
- styleElement = xmlDocImpl()->createElementNS(HTMLNames::xhtmlNamespaceURI(), "span", exceptionCode);
+ styleElement = xmlDocImpl()->createElementNS(HTMLTags::xhtmlNamespaceURI(), "span", exceptionCode);
assert(exceptionCode == 0);
styleElement->ref();
1.136 +3 -3 WebCore/khtml/khtmlview.cpp
Index: khtmlview.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtmlview.cpp,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- khtmlview.cpp 18 Jul 2005 21:44:12 -0000 1.135
+++ khtmlview.cpp 18 Jul 2005 21:52:14 -0000 1.136
@@ -606,12 +606,12 @@
if (document->isHTMLDocument()) {
NodeImpl *body = static_cast<HTMLDocumentImpl*>(document)->body();
if (body && body->renderer()) {
- if (body->hasTagName(HTMLNames::frameset())) {
+ if (body->hasTagName(HTMLTags::frameset())) {
body->renderer()->setNeedsLayout(true);
vMode = AlwaysOff;
hMode = AlwaysOff;
}
- else if (body->hasTagName(HTMLNames::body())) {
+ else if (body->hasTagName(HTMLTags::body())) {
RenderObject* o = (rootRenderer->style()->overflow() == OVISIBLE) ? body->renderer() : rootRenderer;
applyOverflowToViewport(o, hMode, vMode); // Only applies to HTML UAs, not to XML/XHTML UAs
}
@@ -876,7 +876,7 @@
static bool isSubmitImage(DOM::NodeImpl *node)
{
- return node && node->hasTagName(HTMLNames::input()) && static_cast<HTMLInputElementImpl*>(node)->inputType() == HTMLInputElementImpl::IMAGE;
+ return node && node->hasTagName(HTMLTags::input()) && static_cast<HTMLInputElementImpl*>(node)->inputType() == HTMLInputElementImpl::IMAGE;
}
void KHTMLView::viewportMouseMoveEvent( QMouseEvent * _mouse )
1.191 +6 -6 WebCore/khtml/css/cssstyleselector.cpp
Index: cssstyleselector.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.cpp,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- cssstyleselector.cpp 18 Jul 2005 21:44:13 -0000 1.190
+++ cssstyleselector.cpp 18 Jul 2005 21:52:15 -0000 1.191
@@ -884,23 +884,23 @@
// Sites also commonly use display:inline/block on <td>s and <table>s. In quirks mode we force
// these tags to retain their display types.
if (!strictParsing && e) {
- if (e->hasTagName(HTMLNames::td())) {
+ if (e->hasTagName(HTMLTags::td())) {
style->setDisplay(TABLE_CELL);
style->setFloating(FNONE);
}
- else if (e->hasTagName(HTMLNames::table()))
+ else if (e->hasTagName(HTMLTags::table()))
style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE);
}
// Frames and framesets never honor position:relative or position:absolute. This is necessary to
// fix a crash where a site tries to position these objects. They also never honor display.
- if (e && (e->hasTagName(HTMLNames::frame()) || e->hasTagName(HTMLNames::frameset()))) {
+ if (e && (e->hasTagName(HTMLTags::frame()) || e->hasTagName(HTMLTags::frameset()))) {
style->setPosition(STATIC);
style->setDisplay(BLOCK);
}
// Table headers with a text-align of auto will change the text-align to center.
- if (e && e->hasTagName(HTMLNames::th()) && style->textAlign() == TAAUTO)
+ if (e && e->hasTagName(HTMLTags::th()) && style->textAlign() == TAAUTO)
style->setTextAlign(CENTER);
// Mutate the display to BLOCK or TABLE for certain cases, e.g., if someone attempts to
@@ -1289,7 +1289,7 @@
case CSSSelector::PseudoHover: {
// If we're in quirks mode, then hover should never match anchors with no
// href. This is important for sites like wsj.com.
- if (strictParsing || !e->hasTagName(HTMLNames::a()) || e->isLink()) {
+ if (strictParsing || !e->hasTagName(HTMLTags::a()) || e->isLink()) {
if (element == e && style)
style->setAffectedByHoverRules(true);
if (e->renderer()) {
@@ -1320,7 +1320,7 @@
case CSSSelector::PseudoActive:
// If we're in quirks mode, then :active should never match anchors with no
// href.
- if (strictParsing || !e->hasTagName(HTMLNames::a()) || e->isLink()) {
+ if (strictParsing || !e->hasTagName(HTMLTags::a()) || e->isLink()) {
if (element == e && style)
style->setAffectedByActiveRules(true);
else if (e->renderer())
1.11 +3 -3 WebCore/khtml/dom/css_stylesheet.cpp
Index: css_stylesheet.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/css_stylesheet.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- css_stylesheet.cpp 18 Jul 2005 21:44:15 -0000 1.10
+++ css_stylesheet.cpp 18 Jul 2005 21:52:16 -0000 1.11
@@ -384,7 +384,7 @@
// ### check link is really linking a style sheet
if( n && n->isElementNode() &&
- (n->hasTagName(HTMLNames::style()) || n->hasTagName(HTMLNames::link()))) {
+ (n->hasTagName(HTMLTags::style()) || n->hasTagName(HTMLTags::link()))) {
node = n;
if(node) node->ref();
}
@@ -403,9 +403,9 @@
// ### add PI
return
- (node->hasTagName(HTMLNames::style())) ?
+ (node->hasTagName(HTMLTags::style())) ?
static_cast<HTMLStyleElementImpl *>(node)->sheet()
- : ( node->hasTagName(HTMLNames::link()) ?
+ : ( node->hasTagName(HTMLTags::link()) ?
static_cast<HTMLLinkElementImpl *>(node)->sheet()
: StyleSheet() );
}
1.9 +6 -6 WebCore/khtml/dom/html_base.cpp
Index: html_base.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_base.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- html_base.cpp 18 Jul 2005 21:44:15 -0000 1.8
+++ html_base.cpp 18 Jul 2005 21:52:16 -0000 1.9
@@ -40,7 +40,7 @@
HTMLBodyElement &HTMLBodyElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::body() );
+ assignOther( other, HTMLTags::body() );
return *this;
}
@@ -134,7 +134,7 @@
HTMLFrameElement &HTMLFrameElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::frame() );
+ assignOther( other, HTMLTags::frame() );
return *this;
}
@@ -264,7 +264,7 @@
HTMLIFrameElement &HTMLIFrameElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::iframe() );
+ assignOther( other, HTMLTags::iframe() );
return *this;
}
@@ -413,7 +413,7 @@
HTMLFrameSetElement &HTMLFrameSetElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::frameset() );
+ assignOther( other, HTMLTags::frameset() );
return *this;
}
@@ -465,7 +465,7 @@
HTMLHeadElement &HTMLHeadElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::head() );
+ assignOther( other, HTMLTags::head() );
return *this;
}
@@ -506,7 +506,7 @@
HTMLHtmlElement &HTMLHtmlElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::html() );
+ assignOther( other, HTMLTags::html() );
return *this;
}
1.7 +11 -11 WebCore/khtml/dom/html_block.cpp
Index: html_block.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_block.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- html_block.cpp 18 Jul 2005 21:44:15 -0000 1.6
+++ html_block.cpp 18 Jul 2005 21:52:16 -0000 1.7
@@ -41,7 +41,7 @@
HTMLBlockquoteElement &HTMLBlockquoteElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::blockquote() );
+ assignOther( other, HTMLTags::blockquote() );
return *this;
}
@@ -82,7 +82,7 @@
HTMLDivElement &HTMLDivElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::div() );
+ assignOther( other, HTMLTags::div() );
return *this;
}
@@ -123,7 +123,7 @@
HTMLHRElement &HTMLHRElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::hr() );
+ assignOther( other, HTMLTags::hr() );
return *this;
}
@@ -203,12 +203,12 @@
HTMLHeadingElement &HTMLHeadingElement::operator = (const Node &other)
{
- if (!other.handle()->hasTagName(HTMLNames::h1()) &&
- !other.handle()->hasTagName(HTMLNames::h2()) &&
- !other.handle()->hasTagName(HTMLNames::h3()) &&
- !other.handle()->hasTagName(HTMLNames::h4()) &&
- !other.handle()->hasTagName(HTMLNames::h5()) &&
- !other.handle()->hasTagName(HTMLNames::h6()))
+ if (!other.handle()->hasTagName(HTMLTags::h1()) &&
+ !other.handle()->hasTagName(HTMLTags::h2()) &&
+ !other.handle()->hasTagName(HTMLTags::h3()) &&
+ !other.handle()->hasTagName(HTMLTags::h4()) &&
+ !other.handle()->hasTagName(HTMLTags::h5()) &&
+ !other.handle()->hasTagName(HTMLTags::h6()))
{
if ( impl ) impl->deref();
impl = 0;
@@ -256,7 +256,7 @@
HTMLParagraphElement &HTMLParagraphElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::p() );
+ assignOther( other, HTMLTags::p() );
return *this;
}
@@ -297,7 +297,7 @@
HTMLPreElement &HTMLPreElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::pre() );
+ assignOther( other, HTMLTags::pre() );
return *this;
}
1.14 +11 -11 WebCore/khtml/dom/html_form.cpp
Index: html_form.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_form.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- html_form.cpp 18 Jul 2005 21:44:15 -0000 1.13
+++ html_form.cpp 18 Jul 2005 21:52:16 -0000 1.14
@@ -46,7 +46,7 @@
HTMLButtonElement &HTMLButtonElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::button() );
+ assignOther( other, HTMLTags::button() );
return *this;
}
@@ -156,7 +156,7 @@
HTMLFieldSetElement &HTMLFieldSetElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::fieldset() );
+ assignOther( other, HTMLTags::fieldset() );
return *this;
}
@@ -192,7 +192,7 @@
HTMLFormElement &HTMLFormElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::form() );
+ assignOther( other, HTMLTags::form() );
return *this;
}
@@ -310,7 +310,7 @@
HTMLInputElement &HTMLInputElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::input() );
+ assignOther( other, HTMLTags::input() );
return *this;
}
@@ -573,7 +573,7 @@
HTMLLabelElement &HTMLLabelElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::label() );
+ assignOther( other, HTMLTags::label() );
return *this;
}
@@ -632,7 +632,7 @@
HTMLLegendElement &HTMLLegendElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::legend() );
+ assignOther( other, HTMLTags::legend() );
return *this;
}
@@ -690,7 +690,7 @@
HTMLOptGroupElement &HTMLOptGroupElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::optgroup() );
+ assignOther( other, HTMLTags::optgroup() );
return *this;
}
@@ -743,7 +743,7 @@
HTMLSelectElement &HTMLSelectElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::select() );
+ assignOther( other, HTMLTags::select() );
return *this;
}
@@ -905,7 +905,7 @@
HTMLTextAreaElement &HTMLTextAreaElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::textarea() );
+ assignOther( other, HTMLTags::textarea() );
return *this;
}
@@ -1073,7 +1073,7 @@
HTMLOptionElement &HTMLOptionElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::option() );
+ assignOther( other, HTMLTags::option() );
return *this;
}
@@ -1181,7 +1181,7 @@
HTMLIsIndexElement &HTMLIsIndexElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::isindex() );
+ assignOther( other, HTMLTags::isindex() );
return *this;
}
1.13 +6 -6 WebCore/khtml/dom/html_head.cpp
Index: html_head.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_head.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- html_head.cpp 18 Jul 2005 21:44:15 -0000 1.12
+++ html_head.cpp 18 Jul 2005 21:52:16 -0000 1.13
@@ -41,7 +41,7 @@
HTMLBaseElement &HTMLBaseElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::base() );
+ assignOther( other, HTMLTags::base() );
return *this;
}
@@ -96,7 +96,7 @@
HTMLLinkElement &HTMLLinkElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::link() );
+ assignOther( other, HTMLTags::link() );
return *this;
}
@@ -237,7 +237,7 @@
HTMLMetaElement &HTMLMetaElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::meta() );
+ assignOther( other, HTMLTags::meta() );
return *this;
}
@@ -311,7 +311,7 @@
HTMLScriptElement &HTMLScriptElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::script() );
+ assignOther( other, HTMLTags::script() );
return *this;
}
@@ -423,7 +423,7 @@
HTMLStyleElement &HTMLStyleElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::style() );
+ assignOther( other, HTMLTags::style() );
return *this;
}
@@ -495,7 +495,7 @@
HTMLTitleElement &HTMLTitleElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::title() );
+ assignOther( other, HTMLTags::title() );
return *this;
}
1.12 +3 -3 WebCore/khtml/dom/html_image.cpp
Index: html_image.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_image.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- html_image.cpp 18 Jul 2005 21:44:15 -0000 1.11
+++ html_image.cpp 18 Jul 2005 21:52:16 -0000 1.12
@@ -45,7 +45,7 @@
HTMLAreaElement &HTMLAreaElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::area() );
+ assignOther( other, HTMLTags::area() );
return *this;
}
@@ -175,7 +175,7 @@
HTMLImageElement &HTMLImageElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::img() );
+ assignOther( other, HTMLTags::img() );
return *this;
}
@@ -371,7 +371,7 @@
HTMLMapElement &HTMLMapElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::map() );
+ assignOther( other, HTMLTags::map() );
return *this;
}
1.10 +7 -7 WebCore/khtml/dom/html_inline.cpp
Index: html_inline.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_inline.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- html_inline.cpp 18 Jul 2005 21:44:15 -0000 1.9
+++ html_inline.cpp 18 Jul 2005 21:52:16 -0000 1.10
@@ -44,7 +44,7 @@
HTMLAnchorElement &HTMLAnchorElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::a() );
+ assignOther( other, HTMLTags::a() );
return *this;
}
@@ -216,7 +216,7 @@
HTMLBRElement &HTMLBRElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::br() );
+ assignOther( other, HTMLTags::br() );
return *this;
}
@@ -257,7 +257,7 @@
HTMLFontElement &HTMLFontElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::font() );
+ assignOther( other, HTMLTags::font() );
return *this;
}
@@ -318,7 +318,7 @@
HTMLModElement::HTMLModElement(HTMLElementImpl *_impl)
: HTMLElement()
{
- if (_impl && (_impl->hasTagName(HTMLNames::ins()) || _impl->hasTagName(HTMLNames::del())))
+ if (_impl && (_impl->hasTagName(HTMLTags::ins()) || _impl->hasTagName(HTMLTags::del())))
impl = _impl;
else
impl = 0;
@@ -327,8 +327,8 @@
HTMLModElement &HTMLModElement::operator = (const Node &other)
{
- if (!other.handle()->hasTagName(HTMLNames::ins()) &&
- !other.handle()->hasTagName(HTMLNames::del())) {
+ if (!other.handle()->hasTagName(HTMLTags::ins()) &&
+ !other.handle()->hasTagName(HTMLTags::del())) {
if ( impl ) impl->deref();
impl = 0;
} else {
@@ -388,7 +388,7 @@
HTMLQuoteElement &HTMLQuoteElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::q() );
+ assignOther( other, HTMLTags::q() );
return *this;
}
1.7 +6 -6 WebCore/khtml/dom/html_list.cpp
Index: html_list.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_list.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- html_list.cpp 18 Jul 2005 21:44:15 -0000 1.6
+++ html_list.cpp 18 Jul 2005 21:52:16 -0000 1.7
@@ -40,7 +40,7 @@
HTMLDListElement &HTMLDListElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::dl() );
+ assignOther( other, HTMLTags::dl() );
return *this;
}
@@ -87,7 +87,7 @@
HTMLDirectoryElement &HTMLDirectoryElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::dir() );
+ assignOther( other, HTMLTags::dir() );
return *this;
}
@@ -134,7 +134,7 @@
HTMLLIElement &HTMLLIElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::li() );
+ assignOther( other, HTMLTags::li() );
return *this;
}
@@ -189,7 +189,7 @@
HTMLMenuElement &HTMLMenuElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::menu() );
+ assignOther( other, HTMLTags::menu() );
return *this;
}
@@ -236,7 +236,7 @@
HTMLOListElement &HTMLOListElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::ol() );
+ assignOther( other, HTMLTags::ol() );
return *this;
}
@@ -309,7 +309,7 @@
HTMLUListElement &HTMLUListElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::ul() );
+ assignOther( other, HTMLTags::ul() );
return *this;
}
1.10 +1 -1 WebCore/khtml/dom/html_misc.cpp
Index: html_misc.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_misc.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- html_misc.cpp 18 Jul 2005 21:44:15 -0000 1.9
+++ html_misc.cpp 18 Jul 2005 21:52:16 -0000 1.10
@@ -40,7 +40,7 @@
HTMLBaseFontElement &HTMLBaseFontElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::basefont() );
+ assignOther( other, HTMLTags::basefont() );
return *this;
}
1.8 +3 -3 WebCore/khtml/dom/html_object.cpp
Index: html_object.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_object.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- html_object.cpp 18 Jul 2005 21:44:15 -0000 1.7
+++ html_object.cpp 18 Jul 2005 21:52:16 -0000 1.8
@@ -42,7 +42,7 @@
HTMLAppletElement &HTMLAppletElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::applet() );
+ assignOther( other, HTMLTags::applet() );
return *this;
}
@@ -193,7 +193,7 @@
HTMLObjectElement &HTMLObjectElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::object() );
+ assignOther( other, HTMLTags::object() );
return *this;
}
@@ -431,7 +431,7 @@
HTMLParamElement &HTMLParamElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::param() );
+ assignOther( other, HTMLTags::param() );
return *this;
}
1.9 +10 -10 WebCore/khtml/dom/html_table.cpp
Index: html_table.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/dom/html_table.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- html_table.cpp 18 Jul 2005 21:44:15 -0000 1.8
+++ html_table.cpp 18 Jul 2005 21:52:16 -0000 1.9
@@ -44,7 +44,7 @@
HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::caption() );
+ assignOther( other, HTMLTags::caption() );
return *this;
}
@@ -85,8 +85,8 @@
HTMLTableCellElement &HTMLTableCellElement::operator = (const Node &other)
{
- if (!other.handle()->hasTagName(HTMLNames::td()) ||
- !other.handle()->hasTagName(HTMLNames::th())) {
+ if (!other.handle()->hasTagName(HTMLTags::td()) ||
+ !other.handle()->hasTagName(HTMLTags::th())) {
if ( impl ) impl->deref();
impl = 0;
} else {
@@ -293,8 +293,8 @@
HTMLTableColElement &HTMLTableColElement::operator = (const Node &other)
{
- if (!other.handle()->hasTagName(HTMLNames::col()) &&
- !other.handle()->hasTagName(HTMLNames::colgroup())) {
+ if (!other.handle()->hasTagName(HTMLTags::col()) &&
+ !other.handle()->hasTagName(HTMLTags::colgroup())) {
if ( impl ) impl->deref();
impl = 0;
} else {
@@ -398,7 +398,7 @@
HTMLTableElement &HTMLTableElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::table() );
+ assignOther( other, HTMLTags::table() );
return *this;
}
@@ -635,7 +635,7 @@
HTMLTableRowElement &HTMLTableRowElement::operator = (const Node &other)
{
- assignOther( other, HTMLNames::tr() );
+ assignOther( other, HTMLTags::tr() );
return *this;
}
@@ -772,9 +772,9 @@
HTMLTableSectionElement &HTMLTableSectionElement::operator = (const Node &other)
{
- if (!other.handle()->hasTagName(HTMLNames::tbody()) &&
- !other.handle()->hasTagName(HTMLNames::thead()) &&
- !other.handle()->hasTagName(HTMLNames::tfoot())) {
+ if (!other.handle()->hasTagName(HTMLTags::tbody()) &&
+ !other.handle()->hasTagName(HTMLTags::thead()) &&
+ !other.handle()->hasTagName(HTMLTags::tfoot())) {
if ( impl ) impl->deref();
impl = 0;
} else {
1.29 +2 -2 WebCore/khtml/ecma/kjs_css.cpp
Index: kjs_css.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_css.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- kjs_css.cpp 9 Jul 2005 20:19:05 -0000 1.28
+++ kjs_css.cpp 18 Jul 2005 21:52:18 -0000 1.29
@@ -55,7 +55,7 @@
using DOM::DocumentImpl;
using DOM::DOMString;
using DOM::ElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLStyleElementImpl;
using DOM::MediaListImpl;
using DOM::RectImpl;
@@ -405,7 +405,7 @@
// and doesn't look for name attribute (see implementation above).
// But unicity of stylesheet ids is good practice anyway ;)
ElementImpl *element = m_doc->getElementById(p.string());
- if (element && element->hasTagName(HTMLNames::style()))
+ if (element && element->hasTagName(HTMLTags::style()))
return getDOMStyleSheet(exec, static_cast<HTMLStyleElementImpl *>(element)->sheet());
return DOMObject::tryGet(exec, p);
1.79 +4 -4 WebCore/khtml/ecma/kjs_dom.cpp
Index: kjs_dom.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_dom.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- kjs_dom.cpp 9 Jul 2005 20:19:05 -0000 1.78
+++ kjs_dom.cpp 18 Jul 2005 21:52:18 -0000 1.79
@@ -65,7 +65,7 @@
using DOM::HTMLDocumentImpl;
using DOM::HTMLElementImpl;
using DOM::HTMLEmbedElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLObjectElementImpl;
using DOM::NamedNodeMapImpl;
using DOM::Node;
@@ -1709,18 +1709,18 @@
if (!n)
return 0;
- if (n->hasTagName(HTMLNames::applet())) {
+ if (n->hasTagName(HTMLTags::applet())) {
HTMLAppletElementImpl *appletElement = static_cast<HTMLAppletElementImpl *>(n);
if (appletElement->getAppletInstance())
// The instance is owned by the applet element.
return new RuntimeObjectImp(appletElement->getAppletInstance(), false);
}
- else if (n->hasTagName(HTMLNames::embed())) {
+ else if (n->hasTagName(HTMLTags::embed())) {
HTMLEmbedElementImpl *embedElement = static_cast<HTMLEmbedElementImpl *>(n);
if (embedElement->getEmbedInstance())
return new RuntimeObjectImp(embedElement->getEmbedInstance(), false);
}
- else if (n->hasTagName(HTMLNames::object())) {
+ else if (n->hasTagName(HTMLTags::object())) {
HTMLObjectElementImpl *objectElement = static_cast<HTMLObjectElementImpl *>(n);
if (objectElement->getObjectInstance())
return new RuntimeObjectImp(objectElement->getObjectInstance(), false);
1.124 +177 -177 WebCore/khtml/ecma/kjs_html.cpp
Index: kjs_html.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_html.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- kjs_html.cpp 18 Jul 2005 21:44:17 -0000 1.123
+++ kjs_html.cpp 18 Jul 2005 21:52:18 -0000 1.124
@@ -107,7 +107,7 @@
using DOM::HTMLMenuElementImpl;
using DOM::HTMLMetaElementImpl;
using DOM::HTMLModElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLOListElementImpl;
using DOM::HTMLObjectElementImpl;
using DOM::HTMLOptGroupElementImpl;
@@ -352,7 +352,7 @@
if (val)
return Value(val);
- HTMLBodyElementImpl *bodyElement = (body && body->hasTagName(HTMLNames::body())) ? static_cast<HTMLBodyElementImpl *>(body) : 0;
+ HTMLBodyElementImpl *bodyElement = (body && body->hasTagName(HTMLTags::body())) ? static_cast<HTMLBodyElementImpl *>(body) : 0;
if (entry) {
switch (entry->value) {
@@ -428,7 +428,7 @@
DOMExceptionTranslator exception(exec);
HTMLDocumentImpl &doc = *static_cast<HTMLDocumentImpl *>(impl());
HTMLElementImpl *body = doc.body();
- HTMLBodyElementImpl *bodyElement = (body && body->hasTagName(HTMLNames::body())) ? static_cast<HTMLBodyElementImpl *>(body) : 0;
+ HTMLBodyElementImpl *bodyElement = (body && body->hasTagName(HTMLTags::body())) ? static_cast<HTMLBodyElementImpl *>(body) : 0;
switch (token) {
case Title:
@@ -585,71 +585,71 @@
// FIXME: We want to use HashMap here, but there are compiler issues to deal with.
static QPtrDict<const ClassInfo> classInfoDict;
if (classInfoDict.isEmpty()) {
- classInfoDict.insert(HTMLNames::a().localName().implementation(), &a_info);
- classInfoDict.insert(HTMLNames::applet().localName().implementation(), &applet_info);
- classInfoDict.insert(HTMLNames::area().localName().implementation(), &area_info);
- classInfoDict.insert(HTMLNames::base().localName().implementation(), &base_info);
- classInfoDict.insert(HTMLNames::basefont().localName().implementation(), &baseFont_info);
- classInfoDict.insert(HTMLNames::blockquote().localName().implementation(), &blockQuote_info);
- classInfoDict.insert(HTMLNames::body().localName().implementation(), &body_info);
- classInfoDict.insert(HTMLNames::br().localName().implementation(), &br_info);
- classInfoDict.insert(HTMLNames::button().localName().implementation(), &button_info);
- classInfoDict.insert(HTMLNames::canvas().localName().implementation(), &canvas_info);
- classInfoDict.insert(HTMLNames::caption().localName().implementation(), &caption_info);
- classInfoDict.insert(HTMLNames::col().localName().implementation(), &col_info);
- classInfoDict.insert(HTMLNames::colgroup().localName().implementation(), &col_info);
- classInfoDict.insert(HTMLNames::del().localName().implementation(), &mod_info);
- classInfoDict.insert(HTMLNames::dir().localName().implementation(), &dir_info);
- classInfoDict.insert(HTMLNames::div().localName().implementation(), &div_info);
- classInfoDict.insert(HTMLNames::dl().localName().implementation(), &dl_info);
- classInfoDict.insert(HTMLNames::fieldset().localName().implementation(), &fieldSet_info);
- classInfoDict.insert(HTMLNames::font().localName().implementation(), &font_info);
- classInfoDict.insert(HTMLNames::form().localName().implementation(), &form_info);
- classInfoDict.insert(HTMLNames::frame().localName().implementation(), &frame_info);
- classInfoDict.insert(HTMLNames::frameset().localName().implementation(), &frameSet_info);
- classInfoDict.insert(HTMLNames::h1().localName().implementation(), &heading_info);
- classInfoDict.insert(HTMLNames::h2().localName().implementation(), &heading_info);
- classInfoDict.insert(HTMLNames::h3().localName().implementation(), &heading_info);
- classInfoDict.insert(HTMLNames::h4().localName().implementation(), &heading_info);
- classInfoDict.insert(HTMLNames::h5().localName().implementation(), &heading_info);
- classInfoDict.insert(HTMLNames::h6().localName().implementation(), &heading_info);
- classInfoDict.insert(HTMLNames::head().localName().implementation(), &head_info);
- classInfoDict.insert(HTMLNames::hr().localName().implementation(), &hr_info);
- classInfoDict.insert(HTMLNames::html().localName().implementation(), &html_info);
- classInfoDict.insert(HTMLNames::iframe().localName().implementation(), &iFrame_info);
- classInfoDict.insert(HTMLNames::img().localName().implementation(), &img_info);
- classInfoDict.insert(HTMLNames::input().localName().implementation(), &input_info);
- classInfoDict.insert(HTMLNames::ins().localName().implementation(), &mod_info);
- classInfoDict.insert(HTMLNames::isindex().localName().implementation(), &isIndex_info);
- classInfoDict.insert(HTMLNames::label().localName().implementation(), &label_info);
- classInfoDict.insert(HTMLNames::legend().localName().implementation(), &legend_info);
- classInfoDict.insert(HTMLNames::li().localName().implementation(), &li_info);
- classInfoDict.insert(HTMLNames::link().localName().implementation(), &link_info);
- classInfoDict.insert(HTMLNames::map().localName().implementation(), &map_info);
- classInfoDict.insert(HTMLNames::marquee().localName().implementation(), &marquee_info);
- classInfoDict.insert(HTMLNames::menu().localName().implementation(), &menu_info);
- classInfoDict.insert(HTMLNames::meta().localName().implementation(), &meta_info);
- classInfoDict.insert(HTMLNames::object().localName().implementation(), &object_info);
- classInfoDict.insert(HTMLNames::ol().localName().implementation(), &ol_info);
- classInfoDict.insert(HTMLNames::option().localName().implementation(), &option_info);
- classInfoDict.insert(HTMLNames::optgroup().localName().implementation(), &optGroup_info);
- classInfoDict.insert(HTMLNames::p().localName().implementation(), &p_info);
- classInfoDict.insert(HTMLNames::param().localName().implementation(), ¶m_info);
- classInfoDict.insert(HTMLNames::pre().localName().implementation(), &pre_info);
- classInfoDict.insert(HTMLNames::q().localName().implementation(), &q_info);
- classInfoDict.insert(HTMLNames::script().localName().implementation(), &script_info);
- classInfoDict.insert(HTMLNames::select().localName().implementation(), &select_info);
- classInfoDict.insert(HTMLNames::style().localName().implementation(), &style_info);
- classInfoDict.insert(HTMLNames::table().localName().implementation(), &table_info);
- classInfoDict.insert(HTMLNames::tbody().localName().implementation(), &tablesection_info);
- classInfoDict.insert(HTMLNames::td().localName().implementation(), &tablecell_info);
- classInfoDict.insert(HTMLNames::textarea().localName().implementation(), &textArea_info);
- classInfoDict.insert(HTMLNames::th().localName().implementation(), &tablecell_info);
- classInfoDict.insert(HTMLNames::thead().localName().implementation(), &tablesection_info);
- classInfoDict.insert(HTMLNames::tfoot().localName().implementation(), &tablesection_info);
- classInfoDict.insert(HTMLNames::title().localName().implementation(), &title_info);
- classInfoDict.insert(HTMLNames::tr().localName().implementation(), &tr_info);
- classInfoDict.insert(HTMLNames::ul().localName().implementation(), &ul_info);
+ classInfoDict.insert(HTMLTags::a().localName().implementation(), &a_info);
+ classInfoDict.insert(HTMLTags::applet().localName().implementation(), &applet_info);
+ classInfoDict.insert(HTMLTags::area().localName().implementation(), &area_info);
+ classInfoDict.insert(HTMLTags::base().localName().implementation(), &base_info);
+ classInfoDict.insert(HTMLTags::basefont().localName().implementation(), &baseFont_info);
+ classInfoDict.insert(HTMLTags::blockquote().localName().implementation(), &blockQuote_info);
+ classInfoDict.insert(HTMLTags::body().localName().implementation(), &body_info);
+ classInfoDict.insert(HTMLTags::br().localName().implementation(), &br_info);
+ classInfoDict.insert(HTMLTags::button().localName().implementation(), &button_info);
+ classInfoDict.insert(HTMLTags::canvas().localName().implementation(), &canvas_info);
+ classInfoDict.insert(HTMLTags::caption().localName().implementation(), &caption_info);
+ classInfoDict.insert(HTMLTags::col().localName().implementation(), &col_info);
+ classInfoDict.insert(HTMLTags::colgroup().localName().implementation(), &col_info);
+ classInfoDict.insert(HTMLTags::del().localName().implementation(), &mod_info);
+ classInfoDict.insert(HTMLTags::dir().localName().implementation(), &dir_info);
+ classInfoDict.insert(HTMLTags::div().localName().implementation(), &div_info);
+ classInfoDict.insert(HTMLTags::dl().localName().implementation(), &dl_info);
+ classInfoDict.insert(HTMLTags::fieldset().localName().implementation(), &fieldSet_info);
+ classInfoDict.insert(HTMLTags::font().localName().implementation(), &font_info);
+ classInfoDict.insert(HTMLTags::form().localName().implementation(), &form_info);
+ classInfoDict.insert(HTMLTags::frame().localName().implementation(), &frame_info);
+ classInfoDict.insert(HTMLTags::frameset().localName().implementation(), &frameSet_info);
+ classInfoDict.insert(HTMLTags::h1().localName().implementation(), &heading_info);
+ classInfoDict.insert(HTMLTags::h2().localName().implementation(), &heading_info);
+ classInfoDict.insert(HTMLTags::h3().localName().implementation(), &heading_info);
+ classInfoDict.insert(HTMLTags::h4().localName().implementation(), &heading_info);
+ classInfoDict.insert(HTMLTags::h5().localName().implementation(), &heading_info);
+ classInfoDict.insert(HTMLTags::h6().localName().implementation(), &heading_info);
+ classInfoDict.insert(HTMLTags::head().localName().implementation(), &head_info);
+ classInfoDict.insert(HTMLTags::hr().localName().implementation(), &hr_info);
+ classInfoDict.insert(HTMLTags::html().localName().implementation(), &html_info);
+ classInfoDict.insert(HTMLTags::iframe().localName().implementation(), &iFrame_info);
+ classInfoDict.insert(HTMLTags::img().localName().implementation(), &img_info);
+ classInfoDict.insert(HTMLTags::input().localName().implementation(), &input_info);
+ classInfoDict.insert(HTMLTags::ins().localName().implementation(), &mod_info);
+ classInfoDict.insert(HTMLTags::isindex().localName().implementation(), &isIndex_info);
+ classInfoDict.insert(HTMLTags::label().localName().implementation(), &label_info);
+ classInfoDict.insert(HTMLTags::legend().localName().implementation(), &legend_info);
+ classInfoDict.insert(HTMLTags::li().localName().implementation(), &li_info);
+ classInfoDict.insert(HTMLTags::link().localName().implementation(), &link_info);
+ classInfoDict.insert(HTMLTags::map().localName().implementation(), &map_info);
+ classInfoDict.insert(HTMLTags::marquee().localName().implementation(), &marquee_info);
+ classInfoDict.insert(HTMLTags::menu().localName().implementation(), &menu_info);
+ classInfoDict.insert(HTMLTags::meta().localName().implementation(), &meta_info);
+ classInfoDict.insert(HTMLTags::object().localName().implementation(), &object_info);
+ classInfoDict.insert(HTMLTags::ol().localName().implementation(), &ol_info);
+ classInfoDict.insert(HTMLTags::option().localName().implementation(), &option_info);
+ classInfoDict.insert(HTMLTags::optgroup().localName().implementation(), &optGroup_info);
+ classInfoDict.insert(HTMLTags::p().localName().implementation(), &p_info);
+ classInfoDict.insert(HTMLTags::param().localName().implementation(), ¶m_info);
+ classInfoDict.insert(HTMLTags::pre().localName().implementation(), &pre_info);
+ classInfoDict.insert(HTMLTags::q().localName().implementation(), &q_info);
+ classInfoDict.insert(HTMLTags::script().localName().implementation(), &script_info);
+ classInfoDict.insert(HTMLTags::select().localName().implementation(), &select_info);
+ classInfoDict.insert(HTMLTags::style().localName().implementation(), &style_info);
+ classInfoDict.insert(HTMLTags::table().localName().implementation(), &table_info);
+ classInfoDict.insert(HTMLTags::tbody().localName().implementation(), &tablesection_info);
+ classInfoDict.insert(HTMLTags::td().localName().implementation(), &tablecell_info);
+ classInfoDict.insert(HTMLTags::textarea().localName().implementation(), &textArea_info);
+ classInfoDict.insert(HTMLTags::th().localName().implementation(), &tablecell_info);
+ classInfoDict.insert(HTMLTags::thead().localName().implementation(), &tablesection_info);
+ classInfoDict.insert(HTMLTags::tfoot().localName().implementation(), &tablesection_info);
+ classInfoDict.insert(HTMLTags::title().localName().implementation(), &title_info);
+ classInfoDict.insert(HTMLTags::tr().localName().implementation(), &tr_info);
+ classInfoDict.insert(HTMLTags::ul().localName().implementation(), &ul_info);
}
HTMLElementImpl* element = static_cast<HTMLElementImpl*>(impl());
@@ -720,71 +720,71 @@
// FIXME: We want to use HashMap here, but there are compiler issues to deal with.
static QPtrDict<const HTMLElement::Accessors> getSetInfoDict;
if (getSetInfoDict.isEmpty()) {
- getSetInfoDict.insert(HTMLNames::a().localName().implementation(), &a_accessors);
- getSetInfoDict.insert(HTMLNames::applet().localName().implementation(), &applet_accessors);
- getSetInfoDict.insert(HTMLNames::area().localName().implementation(), &area_accessors);
- getSetInfoDict.insert(HTMLNames::base().localName().implementation(), &base_accessors);
- getSetInfoDict.insert(HTMLNames::basefont().localName().implementation(), &baseFont_accessors);
- getSetInfoDict.insert(HTMLNames::blockquote().localName().implementation(), &blockQuote_accessors);
- getSetInfoDict.insert(HTMLNames::body().localName().implementation(), &body_accessors);
- getSetInfoDict.insert(HTMLNames::br().localName().implementation(), &br_accessors);
- getSetInfoDict.insert(HTMLNames::button().localName().implementation(), &button_accessors);
- getSetInfoDict.insert(HTMLNames::canvas().localName().implementation(), &canvas_accessors);
- getSetInfoDict.insert(HTMLNames::caption().localName().implementation(), &caption_accessors);
- getSetInfoDict.insert(HTMLNames::col().localName().implementation(), &col_accessors);
- getSetInfoDict.insert(HTMLNames::colgroup().localName().implementation(), &col_accessors);
- getSetInfoDict.insert(HTMLNames::del().localName().implementation(), &mod_accessors);
- getSetInfoDict.insert(HTMLNames::dir().localName().implementation(), &dir_accessors);
- getSetInfoDict.insert(HTMLNames::div().localName().implementation(), &div_accessors);
- getSetInfoDict.insert(HTMLNames::dl().localName().implementation(), &dl_accessors);
- getSetInfoDict.insert(HTMLNames::fieldset().localName().implementation(), &fieldSet_accessors);
- getSetInfoDict.insert(HTMLNames::font().localName().implementation(), &font_accessors);
- getSetInfoDict.insert(HTMLNames::form().localName().implementation(), &form_accessors);
- getSetInfoDict.insert(HTMLNames::frame().localName().implementation(), &frame_accessors);
- getSetInfoDict.insert(HTMLNames::frameset().localName().implementation(), &frameSet_accessors);
- getSetInfoDict.insert(HTMLNames::h1().localName().implementation(), &heading_accessors);
- getSetInfoDict.insert(HTMLNames::h2().localName().implementation(), &heading_accessors);
- getSetInfoDict.insert(HTMLNames::h3().localName().implementation(), &heading_accessors);
- getSetInfoDict.insert(HTMLNames::h4().localName().implementation(), &heading_accessors);
- getSetInfoDict.insert(HTMLNames::h5().localName().implementation(), &heading_accessors);
- getSetInfoDict.insert(HTMLNames::h6().localName().implementation(), &heading_accessors);
- getSetInfoDict.insert(HTMLNames::head().localName().implementation(), &head_accessors);
- getSetInfoDict.insert(HTMLNames::hr().localName().implementation(), &hr_accessors);
- getSetInfoDict.insert(HTMLNames::html().localName().implementation(), &html_accessors);
- getSetInfoDict.insert(HTMLNames::iframe().localName().implementation(), &iFrame_accessors);
- getSetInfoDict.insert(HTMLNames::img().localName().implementation(), &img_accessors);
- getSetInfoDict.insert(HTMLNames::input().localName().implementation(), &input_accessors);
- getSetInfoDict.insert(HTMLNames::ins().localName().implementation(), &mod_accessors);
- getSetInfoDict.insert(HTMLNames::isindex().localName().implementation(), &isIndex_accessors);
- getSetInfoDict.insert(HTMLNames::label().localName().implementation(), &label_accessors);
- getSetInfoDict.insert(HTMLNames::legend().localName().implementation(), &legend_accessors);
- getSetInfoDict.insert(HTMLNames::li().localName().implementation(), &li_accessors);
- getSetInfoDict.insert(HTMLNames::link().localName().implementation(), &link_accessors);
- getSetInfoDict.insert(HTMLNames::map().localName().implementation(), &map_accessors);
- getSetInfoDict.insert(HTMLNames::marquee().localName().implementation(), &marquee_accessors);
- getSetInfoDict.insert(HTMLNames::menu().localName().implementation(), &menu_accessors);
- getSetInfoDict.insert(HTMLNames::meta().localName().implementation(), &meta_accessors);
- getSetInfoDict.insert(HTMLNames::object().localName().implementation(), &object_accessors);
- getSetInfoDict.insert(HTMLNames::ol().localName().implementation(), &ol_accessors);
- getSetInfoDict.insert(HTMLNames::option().localName().implementation(), &option_accessors);
- getSetInfoDict.insert(HTMLNames::optgroup().localName().implementation(), &optGroup_accessors);
- getSetInfoDict.insert(HTMLNames::p().localName().implementation(), &p_accessors);
- getSetInfoDict.insert(HTMLNames::param().localName().implementation(), ¶m_accessors);
- getSetInfoDict.insert(HTMLNames::pre().localName().implementation(), &pre_accessors);
- getSetInfoDict.insert(HTMLNames::q().localName().implementation(), &q_accessors);
- getSetInfoDict.insert(HTMLNames::script().localName().implementation(), &script_accessors);
- getSetInfoDict.insert(HTMLNames::select().localName().implementation(), &select_accessors);
- getSetInfoDict.insert(HTMLNames::style().localName().implementation(), &style_accessors);
- getSetInfoDict.insert(HTMLNames::table().localName().implementation(), &table_accessors);
- getSetInfoDict.insert(HTMLNames::tbody().localName().implementation(), &tablesection_accessors);
- getSetInfoDict.insert(HTMLNames::td().localName().implementation(), &tablecell_accessors);
- getSetInfoDict.insert(HTMLNames::textarea().localName().implementation(), &textArea_accessors);
- getSetInfoDict.insert(HTMLNames::th().localName().implementation(), &tablecell_accessors);
- getSetInfoDict.insert(HTMLNames::thead().localName().implementation(), &tablesection_accessors);
- getSetInfoDict.insert(HTMLNames::tfoot().localName().implementation(), &tablesection_accessors);
- getSetInfoDict.insert(HTMLNames::title().localName().implementation(), &title_accessors);
- getSetInfoDict.insert(HTMLNames::tr().localName().implementation(), &tr_accessors);
- getSetInfoDict.insert(HTMLNames::ul().localName().implementation(), &ul_accessors);
+ getSetInfoDict.insert(HTMLTags::a().localName().implementation(), &a_accessors);
+ getSetInfoDict.insert(HTMLTags::applet().localName().implementation(), &applet_accessors);
+ getSetInfoDict.insert(HTMLTags::area().localName().implementation(), &area_accessors);
+ getSetInfoDict.insert(HTMLTags::base().localName().implementation(), &base_accessors);
+ getSetInfoDict.insert(HTMLTags::basefont().localName().implementation(), &baseFont_accessors);
+ getSetInfoDict.insert(HTMLTags::blockquote().localName().implementation(), &blockQuote_accessors);
+ getSetInfoDict.insert(HTMLTags::body().localName().implementation(), &body_accessors);
+ getSetInfoDict.insert(HTMLTags::br().localName().implementation(), &br_accessors);
+ getSetInfoDict.insert(HTMLTags::button().localName().implementation(), &button_accessors);
+ getSetInfoDict.insert(HTMLTags::canvas().localName().implementation(), &canvas_accessors);
+ getSetInfoDict.insert(HTMLTags::caption().localName().implementation(), &caption_accessors);
+ getSetInfoDict.insert(HTMLTags::col().localName().implementation(), &col_accessors);
+ getSetInfoDict.insert(HTMLTags::colgroup().localName().implementation(), &col_accessors);
+ getSetInfoDict.insert(HTMLTags::del().localName().implementation(), &mod_accessors);
+ getSetInfoDict.insert(HTMLTags::dir().localName().implementation(), &dir_accessors);
+ getSetInfoDict.insert(HTMLTags::div().localName().implementation(), &div_accessors);
+ getSetInfoDict.insert(HTMLTags::dl().localName().implementation(), &dl_accessors);
+ getSetInfoDict.insert(HTMLTags::fieldset().localName().implementation(), &fieldSet_accessors);
+ getSetInfoDict.insert(HTMLTags::font().localName().implementation(), &font_accessors);
+ getSetInfoDict.insert(HTMLTags::form().localName().implementation(), &form_accessors);
+ getSetInfoDict.insert(HTMLTags::frame().localName().implementation(), &frame_accessors);
+ getSetInfoDict.insert(HTMLTags::frameset().localName().implementation(), &frameSet_accessors);
+ getSetInfoDict.insert(HTMLTags::h1().localName().implementation(), &heading_accessors);
+ getSetInfoDict.insert(HTMLTags::h2().localName().implementation(), &heading_accessors);
+ getSetInfoDict.insert(HTMLTags::h3().localName().implementation(), &heading_accessors);
+ getSetInfoDict.insert(HTMLTags::h4().localName().implementation(), &heading_accessors);
+ getSetInfoDict.insert(HTMLTags::h5().localName().implementation(), &heading_accessors);
+ getSetInfoDict.insert(HTMLTags::h6().localName().implementation(), &heading_accessors);
+ getSetInfoDict.insert(HTMLTags::head().localName().implementation(), &head_accessors);
+ getSetInfoDict.insert(HTMLTags::hr().localName().implementation(), &hr_accessors);
+ getSetInfoDict.insert(HTMLTags::html().localName().implementation(), &html_accessors);
+ getSetInfoDict.insert(HTMLTags::iframe().localName().implementation(), &iFrame_accessors);
+ getSetInfoDict.insert(HTMLTags::img().localName().implementation(), &img_accessors);
+ getSetInfoDict.insert(HTMLTags::input().localName().implementation(), &input_accessors);
+ getSetInfoDict.insert(HTMLTags::ins().localName().implementation(), &mod_accessors);
+ getSetInfoDict.insert(HTMLTags::isindex().localName().implementation(), &isIndex_accessors);
+ getSetInfoDict.insert(HTMLTags::label().localName().implementation(), &label_accessors);
+ getSetInfoDict.insert(HTMLTags::legend().localName().implementation(), &legend_accessors);
+ getSetInfoDict.insert(HTMLTags::li().localName().implementation(), &li_accessors);
+ getSetInfoDict.insert(HTMLTags::link().localName().implementation(), &link_accessors);
+ getSetInfoDict.insert(HTMLTags::map().localName().implementation(), &map_accessors);
+ getSetInfoDict.insert(HTMLTags::marquee().localName().implementation(), &marquee_accessors);
+ getSetInfoDict.insert(HTMLTags::menu().localName().implementation(), &menu_accessors);
+ getSetInfoDict.insert(HTMLTags::meta().localName().implementation(), &meta_accessors);
+ getSetInfoDict.insert(HTMLTags::object().localName().implementation(), &object_accessors);
+ getSetInfoDict.insert(HTMLTags::ol().localName().implementation(), &ol_accessors);
+ getSetInfoDict.insert(HTMLTags::option().localName().implementation(), &option_accessors);
+ getSetInfoDict.insert(HTMLTags::optgroup().localName().implementation(), &optGroup_accessors);
+ getSetInfoDict.insert(HTMLTags::p().localName().implementation(), &p_accessors);
+ getSetInfoDict.insert(HTMLTags::param().localName().implementation(), ¶m_accessors);
+ getSetInfoDict.insert(HTMLTags::pre().localName().implementation(), &pre_accessors);
+ getSetInfoDict.insert(HTMLTags::q().localName().implementation(), &q_accessors);
+ getSetInfoDict.insert(HTMLTags::script().localName().implementation(), &script_accessors);
+ getSetInfoDict.insert(HTMLTags::select().localName().implementation(), &select_accessors);
+ getSetInfoDict.insert(HTMLTags::style().localName().implementation(), &style_accessors);
+ getSetInfoDict.insert(HTMLTags::table().localName().implementation(), &table_accessors);
+ getSetInfoDict.insert(HTMLTags::tbody().localName().implementation(), &tablesection_accessors);
+ getSetInfoDict.insert(HTMLTags::td().localName().implementation(), &tablecell_accessors);
+ getSetInfoDict.insert(HTMLTags::textarea().localName().implementation(), &textArea_accessors);
+ getSetInfoDict.insert(HTMLTags::th().localName().implementation(), &tablecell_accessors);
+ getSetInfoDict.insert(HTMLTags::thead().localName().implementation(), &tablesection_accessors);
+ getSetInfoDict.insert(HTMLTags::tfoot().localName().implementation(), &tablesection_accessors);
+ getSetInfoDict.insert(HTMLTags::title().localName().implementation(), &title_accessors);
+ getSetInfoDict.insert(HTMLTags::tr().localName().implementation(), &tr_accessors);
+ getSetInfoDict.insert(HTMLTags::ul().localName().implementation(), &ul_accessors);
}
HTMLElementImpl* element = static_cast<HTMLElementImpl*>(impl());
@@ -1284,7 +1284,7 @@
kdDebug(6070) << "KJS::HTMLElement::tryGet " << propertyName.qstring() << " thisTag=" << element.tagName().string() << endl;
#endif
// First look at dynamic properties
- if (element.hasLocalName(HTMLNames::form())) {
+ if (element.hasLocalName(HTMLTags::form())) {
HTMLFormElementImpl &form = static_cast<HTMLFormElementImpl &>(element);
// Check if we're retrieving an element (by index or by name)
bool ok;
@@ -1295,16 +1295,16 @@
if (!namedItems->isUndefined())
return namedItems;
}
- else if (element.hasLocalName(HTMLNames::select())) {
+ else if (element.hasLocalName(HTMLTags::select())) {
HTMLSelectElementImpl &select = static_cast<HTMLSelectElementImpl &>(element);
bool ok;
uint u = propertyName.toULong(&ok);
if (ok)
return getDOMNode(exec, select.optionsHTMLCollection()->item(u)); // not specified by DOM(?) but supported in netscape/IE
}
- else if (element.hasLocalName(HTMLNames::frameset())) {
+ else if (element.hasLocalName(HTMLTags::frameset())) {
NodeImpl *frame = element.children()->namedItem(propertyName.string());
- if (frame && frame->hasTagName(HTMLNames::frame())) {
+ if (frame && frame->hasTagName(HTMLTags::frame())) {
DocumentImpl* doc = static_cast<HTMLFrameElementImpl *>(frame)->contentDocument();
if (doc) {
KHTMLPart* part = doc->part();
@@ -1317,7 +1317,7 @@
}
}
}
- else if (element.hasLocalName(HTMLNames::frame()) || element.hasLocalName(HTMLNames::iframe())) {
+ else if (element.hasLocalName(HTMLTags::frame()) || element.hasLocalName(HTMLTags::iframe())) {
DocumentImpl* doc = static_cast<HTMLFrameElementImpl &>(element).contentDocument();
if (doc) {
KHTMLPart* part = doc->part();
@@ -1329,8 +1329,8 @@
}
}
#if APPLE_CHANGES
- else if (element.hasLocalName(HTMLNames::embed()) || element.hasLocalName(HTMLNames::object()) ||
- element.hasLocalName(HTMLNames::applet())) {
+ else if (element.hasLocalName(HTMLTags::embed()) || element.hasLocalName(HTMLTags::object()) ||
+ element.hasLocalName(HTMLTags::applet())) {
if (propertyName == "__apple_runtime_object")
return getRuntimeObject(exec,&element);
Value runtimeObject = getRuntimeObject(exec,&element);
@@ -1357,9 +1357,9 @@
bool KJS::HTMLElement::implementsCall() const
{
HTMLElementImpl *element = static_cast<HTMLElementImpl *>(impl());
- if (element->hasTagName(HTMLNames::embed()) ||
- element->hasTagName(HTMLNames::object()) ||
- element->hasTagName(HTMLNames::applet())) {
+ if (element->hasTagName(HTMLTags::embed()) ||
+ element->hasTagName(HTMLTags::object()) ||
+ element->hasTagName(HTMLTags::applet())) {
DocumentImpl* doc = element->getDocument();
KJSProxy *proxy = KJSProxy::proxy(doc->part());
ExecState *exec = proxy->interpreter()->globalExec();
@@ -1375,9 +1375,9 @@
Value KJS::HTMLElement::call(ExecState *exec, Object &thisObj, const List&args)
{
HTMLElementImpl *element = static_cast<HTMLElementImpl *>(impl());
- if (element->hasTagName(HTMLNames::embed()) ||
- element->hasTagName(HTMLNames::object()) ||
- element->hasTagName(HTMLNames::applet())) {
+ if (element->hasTagName(HTMLTags::embed()) ||
+ element->hasTagName(HTMLTags::object()) ||
+ element->hasTagName(HTMLTags::applet())) {
Value runtimeObject = getRuntimeObject(exec,element);
if (!runtimeObject.isNull()) {
ObjectImp *imp = static_cast<ObjectImp *>(runtimeObject.imp());
@@ -2223,7 +2223,7 @@
#endif
HTMLElementImpl &element = *static_cast<HTMLElementImpl *>(impl());
// First look at dynamic properties - keep this in sync with tryGet
- if (element.hasLocalName(HTMLNames::form())) {
+ if (element.hasLocalName(HTMLTags::form())) {
HTMLFormElementImpl &form = static_cast<HTMLFormElementImpl &>(element);
// Check if we're retrieving an element (by index or by name)
bool ok;
@@ -2233,14 +2233,14 @@
if (form.elements()->namedItem(propertyName.string()))
return true;
}
- else if (element.hasLocalName(HTMLNames::select())) {
+ else if (element.hasLocalName(HTMLTags::select())) {
HTMLSelectElementImpl &select = static_cast<HTMLSelectElementImpl &>(element);
bool ok;
uint u = propertyName.toULong(&ok);
if (ok && select.optionsHTMLCollection()->item(u))
return true;
}
- else if (element.hasLocalName(HTMLNames::input())) {
+ else if (element.hasLocalName(HTMLTags::input())) {
HTMLInputElementImpl &input = static_cast<HTMLInputElementImpl &>(element);
const HashTable* table = classInfo()->propHashTable;
const HashEntry* entry = Lookup::findEntry(table, propertyName);
@@ -2261,7 +2261,7 @@
UString KJS::HTMLElement::toString(ExecState *exec) const
{
- if (impl()->hasTagName(HTMLNames::a()))
+ if (impl()->hasTagName(HTMLTags::a()))
return UString(static_cast<const HTMLAnchorElementImpl *>(impl())->href());
else
return DOMElement::toString(exec);
@@ -2271,9 +2271,9 @@
{
if (element->isGenericFormElement())
return static_cast<HTMLGenericFormElementImpl *>(element)->form();
- if (element->hasTagName(HTMLNames::label()))
+ if (element->hasTagName(HTMLTags::label()))
return static_cast<HTMLLabelElementImpl *>(element)->form();
- if (element->hasTagName(HTMLNames::object()))
+ if (element->hasTagName(HTMLTags::object()))
return static_cast<HTMLObjectElementImpl *>(element)->form();
return 0;
@@ -2296,7 +2296,7 @@
scope.push(static_cast<ObjectImp *>(getDOMNode(exec, form)));
else {
NodeImpl *form = element->parentNode();
- while (form && !form->hasTagName(HTMLNames::form()))
+ while (form && !form->hasTagName(HTMLTags::form()))
form = form->parentNode();
if (form)
@@ -2325,7 +2325,7 @@
DOMExceptionTranslator exception(exec);
HTMLElementImpl &element = *static_cast<HTMLElementImpl *>(static_cast<HTMLElement *>(thisObj.imp())->impl());
- if (element.hasLocalName(HTMLNames::form())) {
+ if (element.hasLocalName(HTMLTags::form())) {
HTMLFormElementImpl &form = static_cast<HTMLFormElementImpl &>(element);
if (id == KJS::HTMLElement::FormSubmit) {
form.submit();
@@ -2336,7 +2336,7 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::select())) {
+ else if (element.hasLocalName(HTMLTags::select())) {
HTMLSelectElementImpl &select = static_cast<HTMLSelectElementImpl &>(element);
if (id == KJS::HTMLElement::SelectAdd) {
select.add(toHTMLElement(args[0]), toHTMLElement(args[1]));
@@ -2355,7 +2355,7 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::input())) {
+ else if (element.hasLocalName(HTMLTags::input())) {
HTMLInputElementImpl &input = static_cast<HTMLInputElementImpl &>(element);
if (id == KJS::HTMLElement::InputBlur) {
input.blur();
@@ -2378,7 +2378,7 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::button())) {
+ else if (element.hasLocalName(HTMLTags::button())) {
HTMLButtonElementImpl &button = static_cast<HTMLButtonElementImpl &>(element);
if (id == KJS::HTMLElement::ButtonBlur) {
button.blur();
@@ -2389,21 +2389,21 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::label())) {
+ else if (element.hasLocalName(HTMLTags::label())) {
HTMLLabelElementImpl &label = static_cast<HTMLLabelElementImpl &>(element);
if (id == KJS::HTMLElement::LabelFocus) {
label.focus();
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::legend())) {
+ else if (element.hasLocalName(HTMLTags::legend())) {
HTMLLegendElementImpl &legend = static_cast<HTMLLegendElementImpl &>(element);
if (id == KJS::HTMLElement::LegendFocus) {
legend.focus();
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::textarea())) {
+ else if (element.hasLocalName(HTMLTags::textarea())) {
HTMLTextAreaElementImpl &textarea = static_cast<HTMLTextAreaElementImpl &>(element);
if (id == KJS::HTMLElement::TextAreaBlur) {
textarea.blur();
@@ -2422,7 +2422,7 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::a())) {
+ else if (element.hasLocalName(HTMLTags::a())) {
HTMLAnchorElementImpl &anchor = static_cast<HTMLAnchorElementImpl &>(element);
if (id == KJS::HTMLElement::AnchorBlur) {
anchor.blur();
@@ -2435,7 +2435,7 @@
else if (id == KJS::HTMLElement::AnchorToString)
return String(thisObj.toString(exec));
}
- else if (element.hasLocalName(HTMLNames::table())) {
+ else if (element.hasLocalName(HTMLTags::table())) {
HTMLTableElementImpl &table = static_cast<HTMLTableElementImpl &>(element);
if (id == KJS::HTMLElement::TableCreateTHead)
return getDOMNode(exec,table.createTHead());
@@ -2462,9 +2462,9 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::thead()) ||
- element.hasLocalName(HTMLNames::tbody()) ||
- element.hasLocalName(HTMLNames::tfoot())) {
+ else if (element.hasLocalName(HTMLTags::thead()) ||
+ element.hasLocalName(HTMLTags::tbody()) ||
+ element.hasLocalName(HTMLTags::tfoot())) {
HTMLTableSectionElementImpl &tableSection = static_cast<HTMLTableSectionElementImpl &>(element);
if (id == KJS::HTMLElement::TableSectionInsertRow)
return getDOMNode(exec, tableSection.insertRow(args[0].toInt32(exec), exception));
@@ -2473,7 +2473,7 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::tr())) {
+ else if (element.hasLocalName(HTMLTags::tr())) {
HTMLTableRowElementImpl &tableRow = static_cast<HTMLTableRowElementImpl &>(element);
if (id == KJS::HTMLElement::TableRowInsertCell)
return getDOMNode(exec,tableRow.insertCell(args[0].toInt32(exec), exception));
@@ -2482,7 +2482,7 @@
return Undefined();
}
}
- else if (element.hasLocalName(HTMLNames::marquee())) {
+ else if (element.hasLocalName(HTMLTags::marquee())) {
if (id == KJS::HTMLElement::MarqueeStart && element.renderer() &&
element.renderer()->layer() &&
element.renderer()->layer()->marquee()) {
@@ -2497,7 +2497,7 @@
}
}
#if APPLE_CHANGES
- else if (element.hasLocalName(HTMLNames::canvas())) {
+ else if (element.hasLocalName(HTMLTags::canvas())) {
if (id == KJS::HTMLElement::GetContext) {
if (args.size() == 0 || (args.size() == 1 && args[0].toString(exec).qstring().lower() == "2d")) {
return Object(new Context2D(&element));
@@ -2522,7 +2522,7 @@
<< " str=" << str.string() << endl;
#endif
// First look at dynamic properties
- if (element.hasLocalName(HTMLNames::select())) {
+ if (element.hasLocalName(HTMLTags::select())) {
HTMLSelectElementImpl &select = static_cast<HTMLSelectElementImpl &>(element);
bool ok;
/*uint u =*/ propertyName.toULong(&ok);
@@ -2534,9 +2534,9 @@
}
}
#if APPLE_CHANGES
- else if (element.hasLocalName(HTMLNames::embed()) ||
- element.hasLocalName(HTMLNames::object()) ||
- element.hasLocalName(HTMLNames::applet())) {
+ else if (element.hasLocalName(HTMLTags::embed()) ||
+ element.hasLocalName(HTMLTags::object()) ||
+ element.hasLocalName(HTMLTags::applet())) {
Value runtimeObject = getRuntimeObject(exec,&element);
if (!runtimeObject.isNull()) {
ObjectImp *imp = static_cast<ObjectImp *>(runtimeObject.imp());
@@ -3275,7 +3275,7 @@
HTMLTableCaptionElementImpl *toHTMLTableCaptionElement(ValueImp *val)
{
HTMLElementImpl *e = toHTMLElement(val);
- if (e && e->hasTagName(HTMLNames::caption()))
+ if (e && e->hasTagName(HTMLTags::caption()))
return static_cast<HTMLTableCaptionElementImpl *>(e);
return 0;
}
@@ -3283,7 +3283,7 @@
HTMLTableSectionElementImpl *toHTMLTableSectionElement(ValueImp *val)
{
HTMLElementImpl *e = toHTMLElement(val);
- if (e && (e->hasTagName(HTMLNames::thead()) || e->hasTagName(HTMLNames::tbody()) || e->hasTagName(HTMLNames::tfoot())))
+ if (e && (e->hasTagName(HTMLTags::thead()) || e->hasTagName(HTMLTags::tbody()) || e->hasTagName(HTMLTags::tfoot())))
return static_cast<HTMLTableSectionElementImpl *>(e);
return 0;
}
@@ -3333,10 +3333,10 @@
else if (propertyName == "selectedIndex") {
// NON-STANDARD options.selectedIndex
NodeImpl *option = collection.item(0);
- if (option->hasTagName(HTMLNames::option())) {
+ if (option->hasTagName(HTMLTags::option())) {
NodeImpl *select = option;
while ((select = select->parentNode()))
- if (select->hasTagName(HTMLNames::select()))
+ if (select->hasTagName(HTMLTags::select()))
return Number(static_cast<HTMLSelectElementImpl *>(select)->selectedIndex());
}
return Undefined();
@@ -3524,7 +3524,7 @@
// is v an option element ?
NodeImpl *option = toNode(value);
- if (!option || !option->hasTagName(HTMLNames::option()))
+ if (!option || !option->hasTagName(HTMLTags::option()))
return;
int exception = 0;
1.7 +12 -12 WebCore/khtml/editing/apply_style_command.cpp
Index: apply_style_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/apply_style_command.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- apply_style_command.cpp 18 Jul 2005 21:44:17 -0000 1.6
+++ apply_style_command.cpp 18 Jul 2005 21:52:20 -0000 1.7
@@ -64,7 +64,7 @@
using DOM::Position;
using DOM::RangeImpl;
using DOM::TextImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLAttributes;
namespace khtml {
@@ -255,7 +255,7 @@
static bool isEmptyStyleSpan(const NodeImpl *node)
{
- if (!node || !node->isHTMLElement() || !node->hasTagName(HTMLNames::span()))
+ if (!node || !node->isHTMLElement() || !node->hasTagName(HTMLTags::span()))
return false;
const HTMLElementImpl *elem = static_cast<const HTMLElementImpl *>(node);
@@ -265,7 +265,7 @@
static bool isEmptyFontTag(const NodeImpl *node)
{
- if (!node || !node->hasTagName(HTMLNames::font()))
+ if (!node || !node->hasTagName(HTMLTags::font()))
return false;
const ElementImpl *elem = static_cast<const ElementImpl *>(node);
@@ -276,7 +276,7 @@
static ElementImpl *createFontElement(DocumentImpl *document)
{
int exceptionCode = 0;
- ElementImpl *fontNode = document->createElementNS(HTMLNames::xhtmlNamespaceURI(), "font", exceptionCode);
+ ElementImpl *fontNode = document->createElementNS(HTMLTags::xhtmlNamespaceURI(), "font", exceptionCode);
ASSERT(exceptionCode == 0);
fontNode->setAttribute(HTMLAttributes::classAttr(), styleSpanClassString());
return fontNode;
@@ -285,7 +285,7 @@
ElementImpl *createStyleSpanElement(DocumentImpl *document)
{
int exceptionCode = 0;
- ElementImpl *styleElement = document->createElementNS(HTMLNames::xhtmlNamespaceURI(), "span", exceptionCode);
+ ElementImpl *styleElement = document->createElementNS(HTMLTags::xhtmlNamespaceURI(), "span", exceptionCode);
ASSERT(exceptionCode == 0);
styleElement->setAttribute(HTMLAttributes::classAttr(), styleSpanClassString());
return styleElement;
@@ -587,7 +587,7 @@
// the current group.
if (node == end.node() ||
runStart->parentNode() != next->parentNode() ||
- (next->isElementNode() && !next->hasTagName(HTMLNames::br())) ||
+ (next->isElementNode() && !next->hasTagName(HTMLTags::br())) ||
(next->renderer() && !next->renderer()->isInline()))
break;
node = next;
@@ -612,11 +612,11 @@
for (QValueListConstIterator<CSSProperty> it = style->valuesIterator(); it != end; ++it) {
switch ((*it).id()) {
case CSS_PROP_FONT_WEIGHT:
- if (elem->hasLocalName(HTMLNames::b()))
+ if (elem->hasLocalName(HTMLTags::b()))
return true;
break;
case CSS_PROP_FONT_STYLE:
- if (elem->hasLocalName(HTMLNames::i()))
+ if (elem->hasLocalName(HTMLTags::i()))
return true;
}
}
@@ -639,7 +639,7 @@
ASSERT(style);
ASSERT(elem);
- if (!elem->hasLocalName(HTMLNames::font()))
+ if (!elem->hasLocalName(HTMLTags::font()))
return;
int exceptionCode = 0;
@@ -1130,7 +1130,7 @@
endOffset = parentLastOffset;
}
- if (!endNode->isElementNode() || endNode->hasTagName(HTMLNames::br()))
+ if (!endNode->isElementNode() || endNode->hasTagName(HTMLTags::br()))
return false;
NodeImpl *nextSibling = endNode->nextSibling();
@@ -1275,14 +1275,14 @@
}
if (styleChange.applyBold()) {
- ElementImpl *boldElement = document()->createElementNS(HTMLNames::xhtmlNamespaceURI(), "b", exceptionCode);
+ ElementImpl *boldElement = document()->createElementNS(HTMLTags::xhtmlNamespaceURI(), "b", exceptionCode);
ASSERT(exceptionCode == 0);
insertNodeBefore(boldElement, startNode);
surroundNodeRangeWithElement(startNode, endNode, boldElement);
}
if (styleChange.applyItalic()) {
- ElementImpl *italicElement = document()->createElementNS(HTMLNames::xhtmlNamespaceURI(), "i", exceptionCode);
+ ElementImpl *italicElement = document()->createElementNS(HTMLTags::xhtmlNamespaceURI(), "i", exceptionCode);
ASSERT(exceptionCode == 0);
insertNodeBefore(italicElement, startNode);
surroundNodeRangeWithElement(startNode, endNode, italicElement);
1.3 +2 -2 WebCore/khtml/editing/break_blockquote_command.cpp
Index: break_blockquote_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/break_blockquote_command.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- break_blockquote_command.cpp 9 Jul 2005 20:19:07 -0000 1.2
+++ break_blockquote_command.cpp 18 Jul 2005 21:52:20 -0000 1.3
@@ -43,7 +43,7 @@
using DOM::NodeImpl;
using DOM::Position;
using DOM::TextImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -147,7 +147,7 @@
bool startIsBR = false;
if (startNode != topBlockquote) {
NodeImpl *n = startNode;
- startIsBR = n->hasTagName(HTMLNames::br());
+ startIsBR = n->hasTagName(HTMLTags::br());
if (startIsBR)
n = n->nextSibling();
while (n) {
1.6 +7 -7 WebCore/khtml/editing/composite_edit_command.cpp
Index: composite_edit_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/composite_edit_command.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- composite_edit_command.cpp 18 Jul 2005 21:44:17 -0000 1.5
+++ composite_edit_command.cpp 18 Jul 2005 21:52:20 -0000 1.6
@@ -67,7 +67,7 @@
using DOM::RangeImpl;
using DOM::TextImpl;
using DOM::HTMLAttributes;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::QualifiedName;
namespace khtml {
@@ -129,14 +129,14 @@
void CompositeEditCommand::insertNodeBefore(NodeImpl *insertChild, NodeImpl *refChild)
{
- ASSERT(!refChild->hasTagName(HTMLNames::body()));
+ ASSERT(!refChild->hasTagName(HTMLTags::body()));
EditCommandPtr cmd(new InsertNodeBeforeCommand(document(), insertChild, refChild));
applyCommandToComposite(cmd);
}
void CompositeEditCommand::insertNodeAfter(NodeImpl *insertChild, NodeImpl *refChild)
{
- ASSERT(!refChild->hasTagName(HTMLNames::body()));
+ ASSERT(!refChild->hasTagName(HTMLTags::body()));
if (refChild->parentNode()->lastChild() == refChild) {
appendNode(insertChild, refChild->parentNode());
}
@@ -547,7 +547,7 @@
// additional level of quoting.
NodeImpl *startBlock = paragraphStart.node()->enclosingBlockFlowElement();
NodeImpl *newBlock = 0;
- if (startBlock->hasTagName(HTMLNames::body()) || (isMailBlockquote(startBlock) && paragraphStart.node() != startBlock))
+ if (startBlock->hasTagName(HTMLTags::body()) || (isMailBlockquote(startBlock) && paragraphStart.node() != startBlock))
newBlock = createDefaultParagraphElement(document());
else
newBlock = startBlock->cloneNode(false);
@@ -557,10 +557,10 @@
moveNode = moveNode->traverseNextNode();
NodeImpl *endNode = paragraphEnd.node();
- if (paragraphStart.node()->hasTagName(HTMLNames::body())) {
+ if (paragraphStart.node()->hasTagName(HTMLTags::body())) {
insertNodeAt(newBlock, paragraphStart.node(), 0);
}
- else if (paragraphStart.node()->hasTagName(HTMLNames::br())) {
+ else if (paragraphStart.node()->hasTagName(HTMLTags::br())) {
insertNodeAfter(newBlock, paragraphStart.node());
}
else {
@@ -580,7 +580,7 @@
ElementImpl *createBlockPlaceholderElement(DocumentImpl *document)
{
int exceptionCode = 0;
- ElementImpl *breakNode = document->createElementNS(HTMLNames::xhtmlNamespaceURI(), "br", exceptionCode);
+ ElementImpl *breakNode = document->createElementNS(HTMLTags::xhtmlNamespaceURI(), "br", exceptionCode);
ASSERT(exceptionCode == 0);
breakNode->setAttribute(HTMLAttributes::classAttr(), blockPlaceholderClassString());
return breakNode;
1.8 +13 -13 WebCore/khtml/editing/delete_selection_command.cpp
Index: delete_selection_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/delete_selection_command.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- delete_selection_command.cpp 18 Jul 2005 21:44:18 -0000 1.7
+++ delete_selection_command.cpp 18 Jul 2005 21:52:20 -0000 1.8
@@ -53,7 +53,7 @@
using DOM::Position;
using DOM::RangeImpl;
using DOM::TextImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -63,12 +63,12 @@
// but here we also have to peek at the type of DOM node?
RenderObject *r = node->renderer();
return (r && r->isListItem())
- || node->hasTagName(HTMLNames::ol())
- || node->hasTagName(HTMLNames::ul())
- || node->hasTagName(HTMLNames::dd())
- || node->hasTagName(HTMLNames::dt())
- || node->hasTagName(HTMLNames::dir())
- || node->hasTagName(HTMLNames::menu());
+ || node->hasTagName(HTMLTags::ol())
+ || node->hasTagName(HTMLTags::ul())
+ || node->hasTagName(HTMLTags::dd())
+ || node->hasTagName(HTMLTags::dt())
+ || node->hasTagName(HTMLTags::dir())
+ || node->hasTagName(HTMLTags::menu());
}
static int maxDeepOffset(NodeImpl *n)
@@ -282,8 +282,8 @@
bool DeleteSelectionCommand::handleSpecialCaseBRDelete()
{
// Check for special-case where the selection contains only a BR on a line by itself after another BR.
- bool upstreamStartIsBR = m_startNode->hasTagName(HTMLNames::br());
- bool downstreamStartIsBR = m_downstreamStart.node()->hasTagName(HTMLNames::br());
+ bool upstreamStartIsBR = m_startNode->hasTagName(HTMLTags::br());
+ bool downstreamStartIsBR = m_downstreamStart.node()->hasTagName(HTMLTags::br());
bool isBROnLineByItself = upstreamStartIsBR && downstreamStartIsBR && m_downstreamStart.node() == m_upstreamEnd.node();
if (isBROnLineByItself) {
m_endingPosition = Position(m_downstreamStart.node()->parentNode(), m_downstreamStart.node()->nodeIndex());
@@ -332,11 +332,11 @@
// end of a block other than the block containing the selection start, then do not delete the
// start block, otherwise delete the start block.
// A similar case is provided to cover selections starting in BR elements.
- if (startOffset == 1 && m_startNode && m_startNode->hasTagName(HTMLNames::br())) {
+ if (startOffset == 1 && m_startNode && m_startNode->hasTagName(HTMLTags::br())) {
setStartNode(m_startNode->traverseNextNode());
startOffset = 0;
}
- if (m_startBlock != m_endBlock && startOffset == 0 && m_startNode && m_startNode->hasTagName(HTMLNames::br()) && endAtEndOfBlock) {
+ if (m_startBlock != m_endBlock && startOffset == 0 && m_startNode && m_startNode->hasTagName(HTMLTags::br()) && endAtEndOfBlock) {
// Don't delete the BR element
setStartNode(m_startNode->traverseNextNode());
}
@@ -558,7 +558,7 @@
NodeImpl *moveNode = node;
node = node->nextSibling();
removeNode(moveNode);
- if (moveNode->hasTagName(HTMLNames::br()) && !moveNode->renderer()) {
+ if (moveNode->hasTagName(HTMLTags::br()) && !moveNode->renderer()) {
// Just remove this node, and don't put it back.
// If the BR was not rendered (since it was at the end of a block, for instance),
// putting it back in the document might make it appear, and that is not desirable.
@@ -569,7 +569,7 @@
else
insertNodeAfter(moveNode, refNode);
refNode = moveNode;
- if (moveNode->hasTagName(HTMLNames::br()))
+ if (moveNode->hasTagName(HTMLTags::br()))
break;
}
1.252 +5 -5 WebCore/khtml/editing/htmlediting.cpp
Index: htmlediting.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/htmlediting.cpp,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -r1.251 -r1.252
--- htmlediting.cpp 18 Jul 2005 21:44:18 -0000 1.251
+++ htmlediting.cpp 18 Jul 2005 21:52:20 -0000 1.252
@@ -80,7 +80,7 @@
using DOM::RangeImpl;
using DOM::TextImpl;
using DOM::TreeWalkerImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
#if APPLE_CHANGES
#include "KWQAssertions.h"
@@ -134,7 +134,7 @@
if (n->isLink())
return true;
- if (n->hasTagName(HTMLNames::ul()) || n->hasTagName(HTMLNames::ol()) || n->hasTagName(HTMLNames::dl()))
+ if (n->hasTagName(HTMLTags::ul()) || n->hasTagName(HTMLTags::ol()) || n->hasTagName(HTMLTags::dl()))
return true;
RenderObject *renderer = n->renderer();
@@ -267,7 +267,7 @@
// We would need this margin-zeroing code back if we ever return to using <p> elements for default paragraphs.
// static const DOMString defaultParagraphStyle("margin-top: 0; margin-bottom: 0");
int exceptionCode = 0;
- ElementImpl *element = document->createElementNS(HTMLNames::xhtmlNamespaceURI(), "div", exceptionCode);
+ ElementImpl *element = document->createElementNS(HTMLTags::xhtmlNamespaceURI(), "div", exceptionCode);
ASSERT(exceptionCode == 0);
return element;
}
@@ -275,7 +275,7 @@
ElementImpl *createBreakElement(DocumentImpl *document)
{
int exceptionCode = 0;
- ElementImpl *breakNode = document->createElementNS(HTMLNames::xhtmlNamespaceURI(), "br", exceptionCode);
+ ElementImpl *breakNode = document->createElementNS(HTMLTags::xhtmlNamespaceURI(), "br", exceptionCode);
ASSERT(exceptionCode == 0);
return breakNode;
}
@@ -303,7 +303,7 @@
bool isMailBlockquote(const NodeImpl *node)
{
- if (!node || !node->renderer() || !node->isElementNode() && !node->hasTagName(HTMLNames::blockquote()))
+ if (!node || !node->renderer() || !node->isElementNode() && !node->hasTagName(HTMLTags::blockquote()))
return false;
return static_cast<const ElementImpl *>(node)->getAttribute("type") == "cite";
1.3 +3 -3 WebCore/khtml/editing/insert_line_break_command.cpp
Index: insert_line_break_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/insert_line_break_command.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- insert_line_break_command.cpp 9 Jul 2005 20:19:07 -0000 1.2
+++ insert_line_break_command.cpp 18 Jul 2005 21:52:21 -0000 1.3
@@ -50,7 +50,7 @@
using DOM::Position;
using DOM::TextImpl;
using DOM::CSSMutableStyleDeclarationImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -112,13 +112,13 @@
// This makes the "real" BR we want to insert appear in the rendering without any
// significant side effects (and no real worries either since you can't arrow past
// this extra one.
- if (pos.node()->hasTagName(HTMLNames::br()) && pos.offset() == 0) {
+ if (pos.node()->hasTagName(HTMLTags::br()) && pos.offset() == 0) {
// Already placed in a trailing BR. Insert "real" BR before it and leave the selection alone.
insertNodeBefore(nodeToInsert, pos.node());
}
else {
NodeImpl *next = pos.node()->traverseNextNode();
- bool hasTrailingBR = next && next->hasTagName(HTMLNames::br()) && pos.node()->enclosingBlockFlowElement() == next->enclosingBlockFlowElement();
+ bool hasTrailingBR = next && next->hasTagName(HTMLTags::br()) && pos.node()->enclosingBlockFlowElement() == next->enclosingBlockFlowElement();
insertNodeAfterPosition(nodeToInsert, pos);
if (hasTrailingBR) {
setEndingSelection(Selection(Position(next, 0), DOWNSTREAM));
1.3 +2 -2 WebCore/khtml/editing/insert_paragraph_separator_command.cpp
Index: insert_paragraph_separator_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/insert_paragraph_separator_command.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- insert_paragraph_separator_command.cpp 9 Jul 2005 20:19:07 -0000 1.2
+++ insert_paragraph_separator_command.cpp 18 Jul 2005 21:52:21 -0000 1.3
@@ -50,7 +50,7 @@
using DOM::NodeImpl;
using DOM::Position;
using DOM::TextImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -214,7 +214,7 @@
// then this <br> will collapse away when we add a block after it. Add an extra <br>.
if (!document()->inStrictMode()) {
Position upstreamPos = pos.upstream();
- if (upstreamPos.node()->hasTagName(HTMLNames::br()))
+ if (upstreamPos.node()->hasTagName(HTMLTags::br()))
insertNodeAfter(createBreakElement(document()), upstreamPos.node());
}
1.26 +8 -8 WebCore/khtml/editing/markup.cpp
Index: markup.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/markup.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- markup.cpp 18 Jul 2005 21:44:18 -0000 1.25
+++ markup.cpp 18 Jul 2005 21:52:21 -0000 1.26
@@ -48,7 +48,7 @@
using DOM::TagStatusForbidden;
using DOM::HTMLAttributes;
using DOM::HTMLElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::NamedAttrMapImpl;
using DOM::Node;
using DOM::NodeImpl;
@@ -176,10 +176,10 @@
switch (type) {
case Node::TEXT_NODE: {
if (node->parentNode()) {
- if (node->parentNode()->hasTagName(HTMLNames::pre()) ||
- node->parentNode()->hasTagName(HTMLNames::script()) ||
- node->parentNode()->hasTagName(HTMLNames::style()) ||
- node->parentNode()->hasTagName(HTMLNames::textarea()))
+ if (node->parentNode()->hasTagName(HTMLTags::pre()) ||
+ node->parentNode()->hasTagName(HTMLTags::script()) ||
+ node->parentNode()->hasTagName(HTMLTags::style()) ||
+ node->parentNode()->hasTagName(HTMLTags::textarea()))
return stringValueForRange(node, range);
}
QString markup = annotate ? escapeHTML(renderedText(node, range)) : escapeHTML(stringValueForRange(node, range));
@@ -422,8 +422,8 @@
bool breakAtEnd = false;
if (commonAncestorBlock == ancestor) {
// Include ancestors that are required to retain the appearance of the copied markup.
- if (ancestor->hasTagName(HTMLNames::pre()) || ancestor->hasTagName(HTMLNames::table()) ||
- ancestor->hasTagName(HTMLNames::ol()) || ancestor->hasTagName(HTMLNames::ul())) {
+ if (ancestor->hasTagName(HTMLTags::pre()) || ancestor->hasTagName(HTMLTags::table()) ||
+ ancestor->hasTagName(HTMLTags::ol()) || ancestor->hasTagName(HTMLTags::ul())) {
breakAtEnd = true;
} else {
break;
@@ -546,7 +546,7 @@
ElementImpl *element;
if (s.isEmpty() && list.isEmpty()) {
// For last line, use the "magic BR" rather than a P.
- element = document->createElementNS(HTMLNames::xhtmlNamespaceURI(), "br", exceptionCode);
+ element = document->createElementNS(HTMLTags::xhtmlNamespaceURI(), "br", exceptionCode);
ASSERT(exceptionCode == 0);
element->ref();
element->setAttribute(HTMLAttributes::classAttr(), AppleInterchangeNewline);
1.7 +27 -27 WebCore/khtml/editing/replace_selection_command.cpp
Index: replace_selection_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/replace_selection_command.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- replace_selection_command.cpp 18 Jul 2005 21:44:18 -0000 1.6
+++ replace_selection_command.cpp 18 Jul 2005 21:52:21 -0000 1.7
@@ -58,7 +58,7 @@
using DOM::HTMLElementImpl;
using DOM::CSSMutableStyleDeclarationImpl;
using DOM::Position;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -169,13 +169,13 @@
return false;
// FIXME: This function seems really broken to me. It isn't even including all the block-level elements.
- return (node->hasTagName(HTMLNames::blockquote()) || node->hasTagName(HTMLNames::dd()) || node->hasTagName(HTMLNames::div()) ||
- node->hasTagName(HTMLNames::dl()) || node->hasTagName(HTMLNames::dt()) || node->hasTagName(HTMLNames::h1()) ||
- node->hasTagName(HTMLNames::h2()) || node->hasTagName(HTMLNames::h3()) || node->hasTagName(HTMLNames::h4()) ||
- node->hasTagName(HTMLNames::h5()) || node->hasTagName(HTMLNames::h6()) || node->hasTagName(HTMLNames::hr()) ||
- node->hasTagName(HTMLNames::li()) || node->hasTagName(HTMLNames::ol()) || node->hasTagName(HTMLNames::p()) ||
- node->hasTagName(HTMLNames::pre()) || node->hasTagName(HTMLNames::td()) || node->hasTagName(HTMLNames::th()) ||
- node->hasTagName(HTMLNames::ul()));
+ return (node->hasTagName(HTMLTags::blockquote()) || node->hasTagName(HTMLTags::dd()) || node->hasTagName(HTMLTags::div()) ||
+ node->hasTagName(HTMLTags::dl()) || node->hasTagName(HTMLTags::dt()) || node->hasTagName(HTMLTags::h1()) ||
+ node->hasTagName(HTMLTags::h2()) || node->hasTagName(HTMLTags::h3()) || node->hasTagName(HTMLTags::h4()) ||
+ node->hasTagName(HTMLTags::h5()) || node->hasTagName(HTMLTags::h6()) || node->hasTagName(HTMLTags::hr()) ||
+ node->hasTagName(HTMLTags::li()) || node->hasTagName(HTMLTags::ol()) || node->hasTagName(HTMLTags::p()) ||
+ node->hasTagName(HTMLTags::pre()) || node->hasTagName(HTMLTags::td()) || node->hasTagName(HTMLTags::th()) ||
+ node->hasTagName(HTMLTags::ul()));
}
static bool isMailPasteAsQuotationNode(const NodeImpl *node)
@@ -199,8 +199,8 @@
if (!node)
return false;
- return (node->hasTagName(HTMLNames::table()) || node->hasTagName(HTMLNames::tbody()) || node->hasTagName(HTMLNames::td()) ||
- node->hasTagName(HTMLNames::tfoot()) || node->hasTagName(HTMLNames::thead()) || node->hasTagName(HTMLNames::tr()));
+ return (node->hasTagName(HTMLTags::table()) || node->hasTagName(HTMLTags::tbody()) || node->hasTagName(HTMLTags::td()) ||
+ node->hasTagName(HTMLTags::tfoot()) || node->hasTagName(HTMLTags::thead()) || node->hasTagName(HTMLTags::tr()));
}
void ReplacementFragment::pruneEmptyNodes()
@@ -227,7 +227,7 @@
bool ReplacementFragment::isInterchangeNewlineNode(const NodeImpl *node)
{
static DOMString interchangeNewlineClassString(AppleInterchangeNewline);
- return node && node->hasTagName(HTMLNames::br()) &&
+ return node && node->hasTagName(HTMLTags::br()) &&
static_cast<const ElementImpl *>(node)->getAttribute(HTMLAttributes::classAttr()) == interchangeNewlineClassString;
}
@@ -487,18 +487,18 @@
// This list of tags change the appearance of content
// in ways we can add back on later with CSS, if necessary.
// FIXME: This list is incomplete
- if (node->hasTagName(HTMLNames::b()) ||
- node->hasTagName(HTMLNames::big()) ||
- node->hasTagName(HTMLNames::center()) ||
- node->hasTagName(HTMLNames::font()) ||
- node->hasTagName(HTMLNames::i()) ||
- node->hasTagName(HTMLNames::s()) ||
- node->hasTagName(HTMLNames::small()) ||
- node->hasTagName(HTMLNames::strike()) ||
- node->hasTagName(HTMLNames::sub()) ||
- node->hasTagName(HTMLNames::sup()) ||
- node->hasTagName(HTMLNames::tt()) ||
- node->hasTagName(HTMLNames::u()) ||
+ if (node->hasTagName(HTMLTags::b()) ||
+ node->hasTagName(HTMLTags::big()) ||
+ node->hasTagName(HTMLTags::center()) ||
+ node->hasTagName(HTMLTags::font()) ||
+ node->hasTagName(HTMLTags::i()) ||
+ node->hasTagName(HTMLTags::s()) ||
+ node->hasTagName(HTMLTags::small()) ||
+ node->hasTagName(HTMLTags::strike()) ||
+ node->hasTagName(HTMLTags::sub()) ||
+ node->hasTagName(HTMLTags::sup()) ||
+ node->hasTagName(HTMLTags::tt()) ||
+ node->hasTagName(HTMLTags::u()) ||
isStyleSpan(node)) {
removeNodePreservingChildren(node);
}
@@ -724,7 +724,7 @@
if (!linePlaceholder) {
Position downstream = startPos.downstream();
downstream = positionOutsideContainingSpecialElement(downstream);
- if (downstream.node()->hasTagName(HTMLNames::br()) && downstream.offset() == 0 &&
+ if (downstream.node()->hasTagName(HTMLTags::br()) && downstream.offset() == 0 &&
m_fragment.hasInterchangeNewlineAtEnd() &&
isStartOfLine(VisiblePosition(downstream, VP_DEFAULT_AFFINITY)))
linePlaceholder = downstream.node();
@@ -886,12 +886,12 @@
}
}
else {
- if (m_lastNodeInserted && m_lastNodeInserted->hasTagName(HTMLNames::br()) && !document()->inStrictMode()) {
+ if (m_lastNodeInserted && m_lastNodeInserted->hasTagName(HTMLTags::br()) && !document()->inStrictMode()) {
document()->updateLayout();
VisiblePosition pos(Position(m_lastNodeInserted, 1), DOWNSTREAM);
if (isEndOfBlock(pos)) {
NodeImpl *next = m_lastNodeInserted->traverseNextNode();
- bool hasTrailingBR = next && next->hasTagName(HTMLNames::br()) && m_lastNodeInserted->enclosingBlockFlowElement() == next->enclosingBlockFlowElement();
+ bool hasTrailingBR = next && next->hasTagName(HTMLTags::br()) && m_lastNodeInserted->enclosingBlockFlowElement() == next->enclosingBlockFlowElement();
if (!hasTrailingBR) {
// Insert an "extra" BR at the end of the block.
insertNodeBefore(createBreakElement(document()), m_lastNodeInserted);
@@ -918,7 +918,7 @@
insertNodeAfter(node, refNode);
refNode = node;
// We want to move the first BR we see, so check for that here.
- if (node->hasTagName(HTMLNames::br()))
+ if (node->hasTagName(HTMLTags::br()))
break;
node = next;
}
1.53 +4 -4 WebCore/khtml/editing/visible_position.cpp
Index: visible_position.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_position.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- visible_position.cpp 9 Jul 2005 20:19:07 -0000 1.52
+++ visible_position.cpp 18 Jul 2005 21:52:21 -0000 1.53
@@ -50,7 +50,7 @@
using DOM::Range;
using DOM::RangeImpl;
using DOM::TextImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -75,7 +75,7 @@
m_affinity = affinity;
// For <br> 0, it's important not to move past the <br>.
- if (pos.node() && pos.node()->hasTagName(HTMLNames::br()) && pos.offset() == 0)
+ if (pos.node() && pos.node()->hasTagName(HTMLTags::br()) && pos.offset() == 0)
initUpstream(pos);
else
initDownstream(pos);
@@ -275,7 +275,7 @@
}
if (renderer->isBlockFlow() && (!renderer->firstChild() || !pos.node()->firstChild()) &&
- (renderer->height() || pos.node()->hasTagName(HTMLNames::body()))) {
+ (renderer->height() || pos.node()->hasTagName(HTMLTags::body()))) {
// return true for offset 0 into rendered blocks that are empty of rendered kids, but have a height
return pos.offset() == 0;
}
@@ -360,7 +360,7 @@
bool VisiblePosition::isAtomicNode(const NodeImpl *node)
{
- return node && (!node->hasChildNodes() || (node->hasTagName(HTMLNames::object()) && node->renderer() && node->renderer()->isReplaced()));
+ return node && (!node->hasChildNodes() || (node->hasTagName(HTMLTags::object()) && node->renderer() && node->renderer()->isReplaced()));
}
QChar VisiblePosition::character() const
1.30 +36 -36 WebCore/khtml/editing/visible_text.cpp
Index: visible_text.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_text.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- visible_text.cpp 14 Jul 2005 20:51:55 -0000 1.29
+++ visible_text.cpp 18 Jul 2005 21:52:21 -0000 1.30
@@ -37,7 +37,7 @@
using DOM::NodeImpl;
using DOM::offsetInCharacters;
using DOM::RangeImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
// FIXME: These classes should probably use the render tree and not the DOM tree, since elements could
// be hidden using CSS, or additional generated content could be added. For now, we just make sure
@@ -351,22 +351,22 @@
bool TextIterator::handleNonTextNode()
{
- if (m_node->hasTagName(HTMLNames::br())) {
+ if (m_node->hasTagName(HTMLTags::br())) {
emitCharacter('\n', m_node->parentNode(), m_node, 0, 1);
- } else if (m_node->hasTagName(HTMLNames::td()) || m_node->hasTagName(HTMLNames::th())) {
+ } else if (m_node->hasTagName(HTMLTags::td()) || m_node->hasTagName(HTMLTags::th())) {
if (m_lastCharacter != '\n' && m_lastTextNode) {
emitCharacter('\t', m_lastTextNode->parentNode(), m_lastTextNode, 0, 1);
}
- } else if (m_node->hasTagName(HTMLNames::blockquote()) || m_node->hasTagName(HTMLNames::dd()) ||
- m_node->hasTagName(HTMLNames::div()) ||
- m_node->hasTagName(HTMLNames::dl()) || m_node->hasTagName(HTMLNames::dt()) ||
- m_node->hasTagName(HTMLNames::h1()) || m_node->hasTagName(HTMLNames::h2()) ||
- m_node->hasTagName(HTMLNames::h3()) || m_node->hasTagName(HTMLNames::h4()) ||
- m_node->hasTagName(HTMLNames::h5()) || m_node->hasTagName(HTMLNames::h6()) ||
- m_node->hasTagName(HTMLNames::hr()) || m_node->hasTagName(HTMLNames::li()) ||
- m_node->hasTagName(HTMLNames::ol()) || m_node->hasTagName(HTMLNames::p()) ||
- m_node->hasTagName(HTMLNames::pre()) || m_node->hasTagName(HTMLNames::tr()) ||
- m_node->hasTagName(HTMLNames::ul())) {
+ } else if (m_node->hasTagName(HTMLTags::blockquote()) || m_node->hasTagName(HTMLTags::dd()) ||
+ m_node->hasTagName(HTMLTags::div()) ||
+ m_node->hasTagName(HTMLTags::dl()) || m_node->hasTagName(HTMLTags::dt()) ||
+ m_node->hasTagName(HTMLTags::h1()) || m_node->hasTagName(HTMLTags::h2()) ||
+ m_node->hasTagName(HTMLTags::h3()) || m_node->hasTagName(HTMLTags::h4()) ||
+ m_node->hasTagName(HTMLTags::h5()) || m_node->hasTagName(HTMLTags::h6()) ||
+ m_node->hasTagName(HTMLTags::hr()) || m_node->hasTagName(HTMLTags::li()) ||
+ m_node->hasTagName(HTMLTags::ol()) || m_node->hasTagName(HTMLTags::p()) ||
+ m_node->hasTagName(HTMLTags::pre()) || m_node->hasTagName(HTMLTags::tr()) ||
+ m_node->hasTagName(HTMLTags::ul())) {
if (m_lastCharacter != '\n' && m_lastTextNode) {
emitCharacter('\n', m_lastTextNode->parentNode(), m_lastTextNode, 0, 1);
}
@@ -380,18 +380,18 @@
bool endLine = false;
bool addNewline = false;
- if (m_node->hasTagName(HTMLNames::blockquote()) || m_node->hasTagName(HTMLNames::dd()) ||
- m_node->hasTagName(HTMLNames::div()) ||
- m_node->hasTagName(HTMLNames::dl()) || m_node->hasTagName(HTMLNames::dt()) ||
- m_node->hasTagName(HTMLNames::hr()) || m_node->hasTagName(HTMLNames::li()) ||
- m_node->hasTagName(HTMLNames::ol()) ||
- m_node->hasTagName(HTMLNames::pre()) || m_node->hasTagName(HTMLNames::tr()) ||
- m_node->hasTagName(HTMLNames::ul()))
+ if (m_node->hasTagName(HTMLTags::blockquote()) || m_node->hasTagName(HTMLTags::dd()) ||
+ m_node->hasTagName(HTMLTags::div()) ||
+ m_node->hasTagName(HTMLTags::dl()) || m_node->hasTagName(HTMLTags::dt()) ||
+ m_node->hasTagName(HTMLTags::hr()) || m_node->hasTagName(HTMLTags::li()) ||
+ m_node->hasTagName(HTMLTags::ol()) ||
+ m_node->hasTagName(HTMLTags::pre()) || m_node->hasTagName(HTMLTags::tr()) ||
+ m_node->hasTagName(HTMLTags::ul()))
endLine = true;
- else if (m_node->hasTagName(HTMLNames::h1()) || m_node->hasTagName(HTMLNames::h2()) ||
- m_node->hasTagName(HTMLNames::h3()) || m_node->hasTagName(HTMLNames::h4()) ||
- m_node->hasTagName(HTMLNames::h5()) || m_node->hasTagName(HTMLNames::h6()) ||
- m_node->hasTagName(HTMLNames::p())) {
+ else if (m_node->hasTagName(HTMLTags::h1()) || m_node->hasTagName(HTMLTags::h2()) ||
+ m_node->hasTagName(HTMLTags::h3()) || m_node->hasTagName(HTMLTags::h4()) ||
+ m_node->hasTagName(HTMLTags::h5()) || m_node->hasTagName(HTMLTags::h6()) ||
+ m_node->hasTagName(HTMLTags::p())) {
endLine = true;
// In certain cases, emit a new newline character for this node
@@ -647,19 +647,19 @@
bool SimplifiedBackwardsTextIterator::handleNonTextNode()
{
- if (m_node->hasTagName(HTMLNames::br()))
+ if (m_node->hasTagName(HTMLTags::br()))
emitNewlineForBROrText();
- else if (m_node->hasTagName(HTMLNames::td ()) || m_node->hasTagName(HTMLNames::th()) ||
- m_node->hasTagName(HTMLNames::blockquote()) || m_node->hasTagName(HTMLNames::dd()) ||
- m_node->hasTagName(HTMLNames::div()) ||
- m_node->hasTagName(HTMLNames::dl()) || m_node->hasTagName(HTMLNames::dt()) ||
- m_node->hasTagName(HTMLNames::h1()) || m_node->hasTagName(HTMLNames::h2()) ||
- m_node->hasTagName(HTMLNames::h3()) || m_node->hasTagName(HTMLNames::h4()) ||
- m_node->hasTagName(HTMLNames::h5()) || m_node->hasTagName(HTMLNames::h6()) ||
- m_node->hasTagName(HTMLNames::hr()) || m_node->hasTagName(HTMLNames::li()) ||
- m_node->hasTagName(HTMLNames::ol()) || m_node->hasTagName(HTMLNames::p()) ||
- m_node->hasTagName(HTMLNames::pre()) || m_node->hasTagName(HTMLNames::tr()) ||
- m_node->hasTagName(HTMLNames::ul())) {
+ else if (m_node->hasTagName(HTMLTags::td ()) || m_node->hasTagName(HTMLTags::th()) ||
+ m_node->hasTagName(HTMLTags::blockquote()) || m_node->hasTagName(HTMLTags::dd()) ||
+ m_node->hasTagName(HTMLTags::div()) ||
+ m_node->hasTagName(HTMLTags::dl()) || m_node->hasTagName(HTMLTags::dt()) ||
+ m_node->hasTagName(HTMLTags::h1()) || m_node->hasTagName(HTMLTags::h2()) ||
+ m_node->hasTagName(HTMLTags::h3()) || m_node->hasTagName(HTMLTags::h4()) ||
+ m_node->hasTagName(HTMLTags::h5()) || m_node->hasTagName(HTMLTags::h6()) ||
+ m_node->hasTagName(HTMLTags::hr()) || m_node->hasTagName(HTMLTags::li()) ||
+ m_node->hasTagName(HTMLTags::ol()) || m_node->hasTagName(HTMLTags::p()) ||
+ m_node->hasTagName(HTMLTags::pre()) || m_node->hasTagName(HTMLTags::tr()) ||
+ m_node->hasTagName(HTMLTags::ul())) {
// Emit a space to "break up" content. Any word break
// character will do.
emitCharacter(' ', m_node, 0, 0);
1.36 +2 -2 WebCore/khtml/editing/visible_units.cpp
Index: visible_units.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_units.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- visible_units.cpp 9 Jul 2005 20:19:07 -0000 1.35
+++ visible_units.cpp 18 Jul 2005 21:52:21 -0000 1.36
@@ -41,7 +41,7 @@
using DOM::NodeImpl;
using DOM::Position;
using DOM::RangeImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
namespace khtml {
@@ -333,7 +333,7 @@
return VisiblePosition();
long endOffset = 1;
- if (endNode->hasTagName(HTMLNames::br())) {
+ if (endNode->hasTagName(HTMLTags::br())) {
endOffset = 0;
} else if (endBox->isInlineTextBox()) {
InlineTextBox *endTextBox = static_cast<InlineTextBox *>(endBox);
1.76 +16 -16 WebCore/khtml/html/html_baseimpl.cpp
Index: html_baseimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_baseimpl.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- html_baseimpl.cpp 18 Jul 2005 21:44:19 -0000 1.75
+++ html_baseimpl.cpp 18 Jul 2005 21:52:23 -0000 1.76
@@ -47,7 +47,7 @@
using namespace khtml;
HTMLBodyElementImpl::HTMLBodyElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::body(), doc), m_linkDecl(0)
+ : HTMLElementImpl(HTMLTags::body(), doc), m_linkDecl(0)
{
}
@@ -259,7 +259,7 @@
// -------------------------------------------------------------------------
HTMLFrameElementImpl::HTMLFrameElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::frame(), doc)
+ : HTMLElementImpl(HTMLTags::frame(), doc)
{
init();
}
@@ -444,7 +444,7 @@
// inherit default settings from parent frameset
for (NodeImpl *node = parentNode(); node; node = node->parentNode())
- if (node->hasTagName(HTMLNames::frameset())) {
+ if (node->hasTagName(HTMLTags::frameset())) {
HTMLFrameSetElementImpl* frameset = static_cast<HTMLFrameSetElementImpl*>(node);
if (!m_frameBorderSet)
m_frameBorder = frameset->frameBorder();
@@ -623,7 +623,7 @@
// -------------------------------------------------------------------------
HTMLFrameSetElementImpl::HTMLFrameSetElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::frameset(), doc)
+ : HTMLElementImpl(HTMLTags::frameset(), doc)
{
// default value for rows and cols...
m_totalRows = 1;
@@ -651,7 +651,7 @@
{
// FIXME: Old code had adjacent double returns and seemed to want to do something with NOFRAMES (but didn't).
// What is the correct behavior?
- return newChild->hasTagName(HTMLNames::frameset()) || newChild->hasTagName(HTMLNames::frame());
+ return newChild->hasTagName(HTMLTags::frameset()) || newChild->hasTagName(HTMLTags::frame());
}
void HTMLFrameSetElementImpl::parseMappedAttribute(MappedAttributeImpl *attr)
@@ -708,7 +708,7 @@
HTMLElementImpl* node = static_cast<HTMLElementImpl*>(parentNode());
while(node)
{
- if (node->hasTagName(HTMLNames::frameset())) {
+ if (node->hasTagName(HTMLTags::frameset())) {
HTMLFrameSetElementImpl* frameset = static_cast<HTMLFrameSetElementImpl*>(node);
if(!frameBorderSet) frameborder = frameset->frameBorder();
if(!noresize) noresize = frameset->noResize();
@@ -772,7 +772,7 @@
// -------------------------------------------------------------------------
HTMLHeadElementImpl::HTMLHeadElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::head(), doc)
+ : HTMLElementImpl(HTMLTags::head(), doc)
{
}
@@ -792,16 +792,16 @@
bool HTMLHeadElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::title()) || newChild->hasTagName(HTMLNames::isindex()) ||
- newChild->hasTagName(HTMLNames::base()) || newChild->hasTagName(HTMLNames::script()) ||
- newChild->hasTagName(HTMLNames::style()) || newChild->hasTagName(HTMLNames::meta()) ||
- newChild->hasTagName(HTMLNames::link()) || newChild->isTextNode();
+ return newChild->hasTagName(HTMLTags::title()) || newChild->hasTagName(HTMLTags::isindex()) ||
+ newChild->hasTagName(HTMLTags::base()) || newChild->hasTagName(HTMLTags::script()) ||
+ newChild->hasTagName(HTMLTags::style()) || newChild->hasTagName(HTMLTags::meta()) ||
+ newChild->hasTagName(HTMLTags::link()) || newChild->isTextNode();
}
// -------------------------------------------------------------------------
HTMLHtmlElementImpl::HTMLHtmlElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::html(), doc)
+ : HTMLElementImpl(HTMLTags::html(), doc)
{
}
@@ -822,14 +822,14 @@
bool HTMLHtmlElementImpl::checkDTD(const NodeImpl* newChild)
{
// FIXME: Why is <script> allowed here?
- return newChild->hasTagName(HTMLNames::head()) || newChild->hasTagName(HTMLNames::body()) ||
- newChild->hasTagName(HTMLNames::frameset()) || newChild->hasTagName(HTMLNames::noframes()) ||
- newChild->hasTagName(HTMLNames::script());
+ return newChild->hasTagName(HTMLTags::head()) || newChild->hasTagName(HTMLTags::body()) ||
+ newChild->hasTagName(HTMLTags::frameset()) || newChild->hasTagName(HTMLTags::noframes()) ||
+ newChild->hasTagName(HTMLTags::script());
}
// -------------------------------------------------------------------------
-HTMLIFrameElementImpl::HTMLIFrameElementImpl(DocumentPtr *doc) : HTMLFrameElementImpl(HTMLNames::iframe(), doc)
+HTMLIFrameElementImpl::HTMLIFrameElementImpl(DocumentPtr *doc) : HTMLFrameElementImpl(HTMLTags::iframe(), doc)
{
m_frameBorder = false;
m_marginWidth = -1;
1.22 +9 -9 WebCore/khtml/html/html_blockimpl.cpp
Index: html_blockimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_blockimpl.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- html_blockimpl.cpp 18 Jul 2005 21:44:20 -0000 1.21
+++ html_blockimpl.cpp 18 Jul 2005 21:52:24 -0000 1.22
@@ -36,7 +36,7 @@
using namespace DOM;
HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::blockquote(), doc)
+ : HTMLElementImpl(HTMLTags::blockquote(), doc)
{
}
@@ -57,7 +57,7 @@
// -------------------------------------------------------------------------
HTMLDivElementImpl::HTMLDivElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::div(), doc)
+ : HTMLElementImpl(HTMLTags::div(), doc)
{
}
@@ -103,7 +103,7 @@
// -------------------------------------------------------------------------
HTMLHRElementImpl::HTMLHRElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::hr(), doc)
+ : HTMLElementImpl(HTMLTags::hr(), doc)
{
}
@@ -220,9 +220,9 @@
bool HTMLHeadingElementImpl::checkDTD(const NodeImpl* newChild)
{
- if (newChild->hasTagName(HTMLNames::h1()) || newChild->hasTagName(HTMLNames::h2()) ||
- newChild->hasTagName(HTMLNames::h3()) || newChild->hasTagName(HTMLNames::h4()) ||
- newChild->hasTagName(HTMLNames::h5()) || newChild->hasTagName(HTMLNames::h6()))
+ if (newChild->hasTagName(HTMLTags::h1()) || newChild->hasTagName(HTMLTags::h2()) ||
+ newChild->hasTagName(HTMLTags::h3()) || newChild->hasTagName(HTMLTags::h4()) ||
+ newChild->hasTagName(HTMLTags::h5()) || newChild->hasTagName(HTMLTags::h6()))
return false;
return inEitherTagList(newChild);
@@ -241,13 +241,13 @@
// -------------------------------------------------------------------------
HTMLParagraphElementImpl::HTMLParagraphElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::p(), doc)
+ : HTMLElementImpl(HTMLTags::p(), doc)
{
}
bool HTMLParagraphElementImpl::checkDTD(const NodeImpl* newChild)
{
- return inInlineTagList(newChild) || (getDocument()->inCompatMode() && newChild->hasTagName(HTMLNames::table()));
+ return inInlineTagList(newChild) || (getDocument()->inCompatMode() && newChild->hasTagName(HTMLTags::table()));
}
bool HTMLParagraphElementImpl::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
@@ -308,7 +308,7 @@
const int defaultMinimumDelay = 60;
HTMLMarqueeElementImpl::HTMLMarqueeElementImpl(DocumentPtr *doc)
-: HTMLElementImpl(HTMLNames::marquee(), doc),
+: HTMLElementImpl(HTMLTags::marquee(), doc),
m_minimumDelay(defaultMinimumDelay)
{
}
1.6 +1 -1 WebCore/khtml/html/html_canvasimpl.cpp
Index: html_canvasimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_canvasimpl.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- html_canvasimpl.cpp 18 Jul 2005 21:44:20 -0000 1.5
+++ html_canvasimpl.cpp 18 Jul 2005 21:52:24 -0000 1.6
@@ -54,7 +54,7 @@
// -------------------------------------------------------------------------
HTMLCanvasElementImpl::HTMLCanvasElementImpl(DocumentPtr *doc)
- : HTMLImageElementImpl(HTMLNames::canvas(), doc)
+ : HTMLImageElementImpl(HTMLTags::canvas(), doc)
{
}
1.63 +1 -1 WebCore/khtml/html/html_documentimpl.cpp
Index: html_documentimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_documentimpl.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- html_documentimpl.cpp 18 Jul 2005 21:44:20 -0000 1.62
+++ html_documentimpl.cpp 18 Jul 2005 21:52:24 -0000 1.63
@@ -245,7 +245,7 @@
bool HTMLDocumentImpl::childAllowed( NodeImpl *newChild )
{
// ### support comments. etc as a child
- return (newChild->hasTagName(HTMLNames::html()) || newChild->isCommentNode());
+ return (newChild->hasTagName(HTMLTags::html()) || newChild->isCommentNode());
}
ElementImpl *HTMLDocumentImpl::createElement(const DOMString &name, int &exceptioncode)
1.90 +195 -195 WebCore/khtml/html/html_elementimpl.cpp
Index: html_elementimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_elementimpl.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- html_elementimpl.cpp 18 Jul 2005 21:44:20 -0000 1.89
+++ html_elementimpl.cpp 18 Jul 2005 21:52:24 -0000 1.90
@@ -78,7 +78,7 @@
HTMLTagStatus HTMLElementImpl::endTagRequirement() const
{
- if (hasLocalName(HTMLNames::dt()) || hasLocalName(HTMLNames::dd()))
+ if (hasLocalName(HTMLTags::dt()) || hasLocalName(HTMLTags::dd()))
return TagStatusOptional;
// Same values as <span>. This way custom tag name elements will behave like inline spans.
@@ -87,11 +87,11 @@
int HTMLElementImpl::tagPriority() const
{
- if (hasLocalName(HTMLNames::address()) || hasLocalName(HTMLNames::dd()) || hasLocalName(HTMLNames::dt()) || hasLocalName(HTMLNames::noscript()))
+ if (hasLocalName(HTMLTags::address()) || hasLocalName(HTMLTags::dd()) || hasLocalName(HTMLTags::dt()) || hasLocalName(HTMLTags::noscript()))
return 3;
- if (hasLocalName(HTMLNames::center()) || hasLocalName(HTMLNames::nobr()))
+ if (hasLocalName(HTMLTags::center()) || hasLocalName(HTMLTags::nobr()))
return 5;
- if (hasLocalName(HTMLNames::noembed()) || hasLocalName(HTMLNames::noframes()))
+ if (hasLocalName(HTMLTags::noembed()) || hasLocalName(HTMLTags::noframes()))
return 10;
// Same values as <span>. This way custom tag name elements will behave like inline spans.
@@ -272,8 +272,8 @@
if (endTagRequirement() == TagStatusForbidden)
return 0;
- if (hasLocalName(HTMLNames::col()) || hasLocalName(HTMLNames::colgroup()) || hasLocalName(HTMLNames::frameset()) ||
- hasLocalName(HTMLNames::head()) || hasLocalName(HTMLNames::style()) || hasLocalName(HTMLNames::title()))
+ if (hasLocalName(HTMLTags::col()) || hasLocalName(HTMLTags::colgroup()) || hasLocalName(HTMLTags::frameset()) ||
+ hasLocalName(HTMLTags::head()) || hasLocalName(HTMLTags::style()) || hasLocalName(HTMLTags::title()))
return 0;
if (!getDocument()->isHTMLDocument())
@@ -300,7 +300,7 @@
for (NodeImpl *node = fragment->firstChild(); node != NULL; node = nextNode) {
nextNode = node->nextSibling();
node->ref();
- if (node->hasTagName(HTMLNames::html()) || node->hasTagName(HTMLNames::body())) {
+ if (node->hasTagName(HTMLTags::html()) || node->hasTagName(HTMLTags::body())) {
NodeImpl *firstChild = node->firstChild();
if (firstChild != NULL) {
nextNode = firstChild;
@@ -314,7 +314,7 @@
child->deref();
}
fragment->removeChild(node, ignoredExceptionCode);
- } else if (node->hasTagName(HTMLNames::head()))
+ } else if (node->hasTagName(HTMLTags::head()))
fragment->removeChild(node, ignoredExceptionCode);
// Important to do this deref after removeChild, because if the only thing
@@ -374,10 +374,10 @@
return;
}
- if (hasLocalName(HTMLNames::col()) || hasLocalName(HTMLNames::colgroup()) || hasLocalName(HTMLNames::frameset()) ||
- hasLocalName(HTMLNames::head()) || hasLocalName(HTMLNames::html()) || hasLocalName(HTMLNames::table()) ||
- hasLocalName(HTMLNames::tbody()) || hasLocalName(HTMLNames::tfoot()) || hasLocalName(HTMLNames::thead()) ||
- hasLocalName(HTMLNames::tr())) {
+ if (hasLocalName(HTMLTags::col()) || hasLocalName(HTMLTags::colgroup()) || hasLocalName(HTMLTags::frameset()) ||
+ hasLocalName(HTMLTags::head()) || hasLocalName(HTMLTags::html()) || hasLocalName(HTMLTags::table()) ||
+ hasLocalName(HTMLTags::tbody()) || hasLocalName(HTMLTags::tfoot()) || hasLocalName(HTMLTags::thead()) ||
+ hasLocalName(HTMLTags::tr())) {
exception = DOMException::NO_MODIFICATION_ALLOWED_ERR;
return;
}
@@ -394,10 +394,10 @@
return;
}
- if (hasLocalName(HTMLNames::col()) || hasLocalName(HTMLNames::colgroup()) || hasLocalName(HTMLNames::frameset()) ||
- hasLocalName(HTMLNames::head()) || hasLocalName(HTMLNames::html()) || hasLocalName(HTMLNames::table()) ||
- hasLocalName(HTMLNames::tbody()) || hasLocalName(HTMLNames::tfoot()) || hasLocalName(HTMLNames::thead()) ||
- hasLocalName(HTMLNames::tr())) {
+ if (hasLocalName(HTMLTags::col()) || hasLocalName(HTMLTags::colgroup()) || hasLocalName(HTMLTags::frameset()) ||
+ hasLocalName(HTMLTags::head()) || hasLocalName(HTMLTags::html()) || hasLocalName(HTMLTags::table()) ||
+ hasLocalName(HTMLTags::tbody()) || hasLocalName(HTMLTags::tfoot()) || hasLocalName(HTMLTags::thead()) ||
+ hasLocalName(HTMLTags::tr())) {
exception = DOMException::NO_MODIFICATION_ALLOWED_ERR;
return;
}
@@ -685,108 +685,108 @@
{
static HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > tagList;
if (tagList.isEmpty()) {
- tagList.insert(HTMLNames::a().localName().implementation());
- tagList.insert(HTMLNames::abbr().localName().implementation());
- tagList.insert(HTMLNames::acronym().localName().implementation());
- tagList.insert(HTMLNames::address().localName().implementation());
- tagList.insert(HTMLNames::applet().localName().implementation());
- tagList.insert(HTMLNames::area().localName().implementation());
- tagList.insert(HTMLNames::b().localName().implementation());
- tagList.insert(HTMLNames::base().localName().implementation());
- tagList.insert(HTMLNames::basefont().localName().implementation());
- tagList.insert(HTMLNames::bdo().localName().implementation());
- tagList.insert(HTMLNames::big().localName().implementation());
- tagList.insert(HTMLNames::blockquote().localName().implementation());
- tagList.insert(HTMLNames::body().localName().implementation());
- tagList.insert(HTMLNames::br().localName().implementation());
- tagList.insert(HTMLNames::button().localName().implementation());
- tagList.insert(HTMLNames::canvas().localName().implementation());
- tagList.insert(HTMLNames::caption().localName().implementation());
- tagList.insert(HTMLNames::center().localName().implementation());
- tagList.insert(HTMLNames::cite().localName().implementation());
- tagList.insert(HTMLNames::code().localName().implementation());
- tagList.insert(HTMLNames::col().localName().implementation());
- tagList.insert(HTMLNames::colgroup().localName().implementation());
- tagList.insert(HTMLNames::dd().localName().implementation());
- tagList.insert(HTMLNames::del().localName().implementation());
- tagList.insert(HTMLNames::dfn().localName().implementation());
- tagList.insert(HTMLNames::dir().localName().implementation());
- tagList.insert(HTMLNames::div().localName().implementation());
- tagList.insert(HTMLNames::dl().localName().implementation());
- tagList.insert(HTMLNames::dt().localName().implementation());
- tagList.insert(HTMLNames::em().localName().implementation());
- tagList.insert(HTMLNames::embed().localName().implementation());
- tagList.insert(HTMLNames::fieldset().localName().implementation());
- tagList.insert(HTMLNames::font().localName().implementation());
- tagList.insert(HTMLNames::form().localName().implementation());
- tagList.insert(HTMLNames::frame().localName().implementation());
- tagList.insert(HTMLNames::frameset().localName().implementation());
- tagList.insert(HTMLNames::head().localName().implementation());
- tagList.insert(HTMLNames::h1().localName().implementation());
- tagList.insert(HTMLNames::h2().localName().implementation());
- tagList.insert(HTMLNames::h3().localName().implementation());
- tagList.insert(HTMLNames::h4().localName().implementation());
- tagList.insert(HTMLNames::h5().localName().implementation());
- tagList.insert(HTMLNames::h6().localName().implementation());
- tagList.insert(HTMLNames::hr().localName().implementation());
- tagList.insert(HTMLNames::html().localName().implementation());
- tagList.insert(HTMLNames::i().localName().implementation());
- tagList.insert(HTMLNames::iframe().localName().implementation());
- tagList.insert(HTMLNames::img().localName().implementation());
- tagList.insert(HTMLNames::input().localName().implementation());
- tagList.insert(HTMLNames::ins().localName().implementation());
- tagList.insert(HTMLNames::isindex().localName().implementation());
- tagList.insert(HTMLNames::kbd().localName().implementation());
- tagList.insert(HTMLNames::keygen().localName().implementation());
- tagList.insert(HTMLNames::label().localName().implementation());
- tagList.insert(HTMLNames::layer().localName().implementation());
- tagList.insert(HTMLNames::legend().localName().implementation());
- tagList.insert(HTMLNames::li().localName().implementation());
- tagList.insert(HTMLNames::link().localName().implementation());
- tagList.insert(HTMLNames::map().localName().implementation());
- tagList.insert(HTMLNames::marquee().localName().implementation());
- tagList.insert(HTMLNames::menu().localName().implementation());
- tagList.insert(HTMLNames::meta().localName().implementation());
- tagList.insert(HTMLNames::nobr().localName().implementation());
- tagList.insert(HTMLNames::noembed().localName().implementation());
- tagList.insert(HTMLNames::noframes().localName().implementation());
- tagList.insert(HTMLNames::nolayer().localName().implementation());
- tagList.insert(HTMLNames::noscript().localName().implementation());
- tagList.insert(HTMLNames::object().localName().implementation());
- tagList.insert(HTMLNames::ol().localName().implementation());
- tagList.insert(HTMLNames::optgroup().localName().implementation());
- tagList.insert(HTMLNames::option().localName().implementation());
- tagList.insert(HTMLNames::p().localName().implementation());
- tagList.insert(HTMLNames::param().localName().implementation());
- tagList.insert(HTMLNames::plaintext().localName().implementation());
- tagList.insert(HTMLNames::pre().localName().implementation());
- tagList.insert(HTMLNames::q().localName().implementation());
- tagList.insert(HTMLNames::s().localName().implementation());
- tagList.insert(HTMLNames::samp().localName().implementation());
- tagList.insert(HTMLNames::script().localName().implementation());
- tagList.insert(HTMLNames::select().localName().implementation());
- tagList.insert(HTMLNames::small().localName().implementation());
- tagList.insert(HTMLNames::span().localName().implementation());
- tagList.insert(HTMLNames::strike().localName().implementation());
- tagList.insert(HTMLNames::strong().localName().implementation());
- tagList.insert(HTMLNames::style().localName().implementation());
- tagList.insert(HTMLNames::sub().localName().implementation());
- tagList.insert(HTMLNames::sup().localName().implementation());
- tagList.insert(HTMLNames::table().localName().implementation());
- tagList.insert(HTMLNames::tbody().localName().implementation());
- tagList.insert(HTMLNames::td().localName().implementation());
- tagList.insert(HTMLNames::textarea().localName().implementation());
- tagList.insert(HTMLNames::tfoot().localName().implementation());
- tagList.insert(HTMLNames::th().localName().implementation());
- tagList.insert(HTMLNames::thead().localName().implementation());
- tagList.insert(HTMLNames::title().localName().implementation());
- tagList.insert(HTMLNames::tr().localName().implementation());
- tagList.insert(HTMLNames::tt().localName().implementation());
- tagList.insert(HTMLNames::u().localName().implementation());
- tagList.insert(HTMLNames::ul().localName().implementation());
- tagList.insert(HTMLNames::var().localName().implementation());
- tagList.insert(HTMLNames::wbr().localName().implementation());
- tagList.insert(HTMLNames::xmp().localName().implementation());
+ tagList.insert(HTMLTags::a().localName().implementation());
+ tagList.insert(HTMLTags::abbr().localName().implementation());
+ tagList.insert(HTMLTags::acronym().localName().implementation());
+ tagList.insert(HTMLTags::address().localName().implementation());
+ tagList.insert(HTMLTags::applet().localName().implementation());
+ tagList.insert(HTMLTags::area().localName().implementation());
+ tagList.insert(HTMLTags::b().localName().implementation());
+ tagList.insert(HTMLTags::base().localName().implementation());
+ tagList.insert(HTMLTags::basefont().localName().implementation());
+ tagList.insert(HTMLTags::bdo().localName().implementation());
+ tagList.insert(HTMLTags::big().localName().implementation());
+ tagList.insert(HTMLTags::blockquote().localName().implementation());
+ tagList.insert(HTMLTags::body().localName().implementation());
+ tagList.insert(HTMLTags::br().localName().implementation());
+ tagList.insert(HTMLTags::button().localName().implementation());
+ tagList.insert(HTMLTags::canvas().localName().implementation());
+ tagList.insert(HTMLTags::caption().localName().implementation());
+ tagList.insert(HTMLTags::center().localName().implementation());
+ tagList.insert(HTMLTags::cite().localName().implementation());
+ tagList.insert(HTMLTags::code().localName().implementation());
+ tagList.insert(HTMLTags::col().localName().implementation());
+ tagList.insert(HTMLTags::colgroup().localName().implementation());
+ tagList.insert(HTMLTags::dd().localName().implementation());
+ tagList.insert(HTMLTags::del().localName().implementation());
+ tagList.insert(HTMLTags::dfn().localName().implementation());
+ tagList.insert(HTMLTags::dir().localName().implementation());
+ tagList.insert(HTMLTags::div().localName().implementation());
+ tagList.insert(HTMLTags::dl().localName().implementation());
+ tagList.insert(HTMLTags::dt().localName().implementation());
+ tagList.insert(HTMLTags::em().localName().implementation());
+ tagList.insert(HTMLTags::embed().localName().implementation());
+ tagList.insert(HTMLTags::fieldset().localName().implementation());
+ tagList.insert(HTMLTags::font().localName().implementation());
+ tagList.insert(HTMLTags::form().localName().implementation());
+ tagList.insert(HTMLTags::frame().localName().implementation());
+ tagList.insert(HTMLTags::frameset().localName().implementation());
+ tagList.insert(HTMLTags::head().localName().implementation());
+ tagList.insert(HTMLTags::h1().localName().implementation());
+ tagList.insert(HTMLTags::h2().localName().implementation());
+ tagList.insert(HTMLTags::h3().localName().implementation());
+ tagList.insert(HTMLTags::h4().localName().implementation());
+ tagList.insert(HTMLTags::h5().localName().implementation());
+ tagList.insert(HTMLTags::h6().localName().implementation());
+ tagList.insert(HTMLTags::hr().localName().implementation());
+ tagList.insert(HTMLTags::html().localName().implementation());
+ tagList.insert(HTMLTags::i().localName().implementation());
+ tagList.insert(HTMLTags::iframe().localName().implementation());
+ tagList.insert(HTMLTags::img().localName().implementation());
+ tagList.insert(HTMLTags::input().localName().implementation());
+ tagList.insert(HTMLTags::ins().localName().implementation());
+ tagList.insert(HTMLTags::isindex().localName().implementation());
+ tagList.insert(HTMLTags::kbd().localName().implementation());
+ tagList.insert(HTMLTags::keygen().localName().implementation());
+ tagList.insert(HTMLTags::label().localName().implementation());
+ tagList.insert(HTMLTags::layer().localName().implementation());
+ tagList.insert(HTMLTags::legend().localName().implementation());
+ tagList.insert(HTMLTags::li().localName().implementation());
+ tagList.insert(HTMLTags::link().localName().implementation());
+ tagList.insert(HTMLTags::map().localName().implementation());
+ tagList.insert(HTMLTags::marquee().localName().implementation());
+ tagList.insert(HTMLTags::menu().localName().implementation());
+ tagList.insert(HTMLTags::meta().localName().implementation());
+ tagList.insert(HTMLTags::nobr().localName().implementation());
+ tagList.insert(HTMLTags::noembed().localName().implementation());
+ tagList.insert(HTMLTags::noframes().localName().implementation());
+ tagList.insert(HTMLTags::nolayer().localName().implementation());
+ tagList.insert(HTMLTags::noscript().localName().implementation());
+ tagList.insert(HTMLTags::object().localName().implementation());
+ tagList.insert(HTMLTags::ol().localName().implementation());
+ tagList.insert(HTMLTags::optgroup().localName().implementation());
+ tagList.insert(HTMLTags::option().localName().implementation());
+ tagList.insert(HTMLTags::p().localName().implementation());
+ tagList.insert(HTMLTags::param().localName().implementation());
+ tagList.insert(HTMLTags::plaintext().localName().implementation());
+ tagList.insert(HTMLTags::pre().localName().implementation());
+ tagList.insert(HTMLTags::q().localName().implementation());
+ tagList.insert(HTMLTags::s().localName().implementation());
+ tagList.insert(HTMLTags::samp().localName().implementation());
+ tagList.insert(HTMLTags::script().localName().implementation());
+ tagList.insert(HTMLTags::select().localName().implementation());
+ tagList.insert(HTMLTags::small().localName().implementation());
+ tagList.insert(HTMLTags::span().localName().implementation());
+ tagList.insert(HTMLTags::strike().localName().implementation());
+ tagList.insert(HTMLTags::strong().localName().implementation());
+ tagList.insert(HTMLTags::style().localName().implementation());
+ tagList.insert(HTMLTags::sub().localName().implementation());
+ tagList.insert(HTMLTags::sup().localName().implementation());
+ tagList.insert(HTMLTags::table().localName().implementation());
+ tagList.insert(HTMLTags::tbody().localName().implementation());
+ tagList.insert(HTMLTags::td().localName().implementation());
+ tagList.insert(HTMLTags::textarea().localName().implementation());
+ tagList.insert(HTMLTags::tfoot().localName().implementation());
+ tagList.insert(HTMLTags::th().localName().implementation());
+ tagList.insert(HTMLTags::thead().localName().implementation());
+ tagList.insert(HTMLTags::title().localName().implementation());
+ tagList.insert(HTMLTags::tr().localName().implementation());
+ tagList.insert(HTMLTags::tt().localName().implementation());
+ tagList.insert(HTMLTags::u().localName().implementation());
+ tagList.insert(HTMLTags::ul().localName().implementation());
+ tagList.insert(HTMLTags::var().localName().implementation());
+ tagList.insert(HTMLTags::wbr().localName().implementation());
+ tagList.insert(HTMLTags::xmp().localName().implementation());
}
return tagList.contains(tagName.localName().implementation());
@@ -797,51 +797,51 @@
HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> >* inlineTagList() {
static HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > tagList;
if (tagList.isEmpty()) {
- tagList.insert(HTMLNames::tt().localName().implementation());
- tagList.insert(HTMLNames::i().localName().implementation());
- tagList.insert(HTMLNames::b().localName().implementation());
- tagList.insert(HTMLNames::u().localName().implementation());
- tagList.insert(HTMLNames::s().localName().implementation());
- tagList.insert(HTMLNames::strike().localName().implementation());
- tagList.insert(HTMLNames::big().localName().implementation());
- tagList.insert(HTMLNames::small().localName().implementation());
- tagList.insert(HTMLNames::em().localName().implementation());
- tagList.insert(HTMLNames::strong().localName().implementation());
- tagList.insert(HTMLNames::dfn().localName().implementation());
- tagList.insert(HTMLNames::code().localName().implementation());
- tagList.insert(HTMLNames::samp().localName().implementation());
- tagList.insert(HTMLNames::kbd().localName().implementation());
- tagList.insert(HTMLNames::var().localName().implementation());
- tagList.insert(HTMLNames::cite().localName().implementation());
- tagList.insert(HTMLNames::abbr().localName().implementation());
- tagList.insert(HTMLNames::acronym().localName().implementation());
- tagList.insert(HTMLNames::a().localName().implementation());
- tagList.insert(HTMLNames::canvas().localName().implementation());
- tagList.insert(HTMLNames::img().localName().implementation());
- tagList.insert(HTMLNames::applet().localName().implementation());
- tagList.insert(HTMLNames::object().localName().implementation());
- tagList.insert(HTMLNames::embed().localName().implementation());
- tagList.insert(HTMLNames::font().localName().implementation());
- tagList.insert(HTMLNames::basefont().localName().implementation());
- tagList.insert(HTMLNames::br().localName().implementation());
- tagList.insert(HTMLNames::script().localName().implementation());
- tagList.insert(HTMLNames::map().localName().implementation());
- tagList.insert(HTMLNames::q().localName().implementation());
- tagList.insert(HTMLNames::sub().localName().implementation());
- tagList.insert(HTMLNames::sup().localName().implementation());
- tagList.insert(HTMLNames::span().localName().implementation());
- tagList.insert(HTMLNames::bdo().localName().implementation());
- tagList.insert(HTMLNames::iframe().localName().implementation());
- tagList.insert(HTMLNames::input().localName().implementation());
- tagList.insert(HTMLNames::keygen().localName().implementation());
- tagList.insert(HTMLNames::select().localName().implementation());
- tagList.insert(HTMLNames::textarea().localName().implementation());
- tagList.insert(HTMLNames::label().localName().implementation());
- tagList.insert(HTMLNames::button().localName().implementation());
- tagList.insert(HTMLNames::ins().localName().implementation());
- tagList.insert(HTMLNames::del().localName().implementation());
- tagList.insert(HTMLNames::nobr().localName().implementation());
- tagList.insert(HTMLNames::wbr().localName().implementation());
+ tagList.insert(HTMLTags::tt().localName().implementation());
+ tagList.insert(HTMLTags::i().localName().implementation());
+ tagList.insert(HTMLTags::b().localName().implementation());
+ tagList.insert(HTMLTags::u().localName().implementation());
+ tagList.insert(HTMLTags::s().localName().implementation());
+ tagList.insert(HTMLTags::strike().localName().implementation());
+ tagList.insert(HTMLTags::big().localName().implementation());
+ tagList.insert(HTMLTags::small().localName().implementation());
+ tagList.insert(HTMLTags::em().localName().implementation());
+ tagList.insert(HTMLTags::strong().localName().implementation());
+ tagList.insert(HTMLTags::dfn().localName().implementation());
+ tagList.insert(HTMLTags::code().localName().implementation());
+ tagList.insert(HTMLTags::samp().localName().implementation());
+ tagList.insert(HTMLTags::kbd().localName().implementation());
+ tagList.insert(HTMLTags::var().localName().implementation());
+ tagList.insert(HTMLTags::cite().localName().implementation());
+ tagList.insert(HTMLTags::abbr().localName().implementation());
+ tagList.insert(HTMLTags::acronym().localName().implementation());
+ tagList.insert(HTMLTags::a().localName().implementation());
+ tagList.insert(HTMLTags::canvas().localName().implementation());
+ tagList.insert(HTMLTags::img().localName().implementation());
+ tagList.insert(HTMLTags::applet().localName().implementation());
+ tagList.insert(HTMLTags::object().localName().implementation());
+ tagList.insert(HTMLTags::embed().localName().implementation());
+ tagList.insert(HTMLTags::font().localName().implementation());
+ tagList.insert(HTMLTags::basefont().localName().implementation());
+ tagList.insert(HTMLTags::br().localName().implementation());
+ tagList.insert(HTMLTags::script().localName().implementation());
+ tagList.insert(HTMLTags::map().localName().implementation());
+ tagList.insert(HTMLTags::q().localName().implementation());
+ tagList.insert(HTMLTags::sub().localName().implementation());
+ tagList.insert(HTMLTags::sup().localName().implementation());
+ tagList.insert(HTMLTags::span().localName().implementation());
+ tagList.insert(HTMLTags::bdo().localName().implementation());
+ tagList.insert(HTMLTags::iframe().localName().implementation());
+ tagList.insert(HTMLTags::input().localName().implementation());
+ tagList.insert(HTMLTags::keygen().localName().implementation());
+ tagList.insert(HTMLTags::select().localName().implementation());
+ tagList.insert(HTMLTags::textarea().localName().implementation());
+ tagList.insert(HTMLTags::label().localName().implementation());
+ tagList.insert(HTMLTags::button().localName().implementation());
+ tagList.insert(HTMLTags::ins().localName().implementation());
+ tagList.insert(HTMLTags::del().localName().implementation());
+ tagList.insert(HTMLTags::nobr().localName().implementation());
+ tagList.insert(HTMLTags::wbr().localName().implementation());
}
return &tagList;
}
@@ -849,37 +849,37 @@
HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> >* blockTagList() {
static HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > tagList;
if (tagList.isEmpty()) {
- tagList.insert(HTMLNames::p().localName().implementation());
- tagList.insert(HTMLNames::h1().localName().implementation());
- tagList.insert(HTMLNames::h2().localName().implementation());
- tagList.insert(HTMLNames::h3().localName().implementation());
- tagList.insert(HTMLNames::h4().localName().implementation());
- tagList.insert(HTMLNames::h5().localName().implementation());
- tagList.insert(HTMLNames::h6().localName().implementation());
- tagList.insert(HTMLNames::ul().localName().implementation());
- tagList.insert(HTMLNames::ol().localName().implementation());
- tagList.insert(HTMLNames::dir().localName().implementation());
- tagList.insert(HTMLNames::menu().localName().implementation());
- tagList.insert(HTMLNames::pre().localName().implementation());
- tagList.insert(HTMLNames::plaintext().localName().implementation());
- tagList.insert(HTMLNames::xmp().localName().implementation());
- tagList.insert(HTMLNames::dl().localName().implementation());
- tagList.insert(HTMLNames::div().localName().implementation());
- tagList.insert(HTMLNames::layer().localName().implementation());
- tagList.insert(HTMLNames::center().localName().implementation());
- tagList.insert(HTMLNames::noscript().localName().implementation());
- tagList.insert(HTMLNames::noframes().localName().implementation());
- tagList.insert(HTMLNames::blockquote().localName().implementation());
- tagList.insert(HTMLNames::form().localName().implementation());
- tagList.insert(HTMLNames::isindex().localName().implementation());
- tagList.insert(HTMLNames::hr().localName().implementation());
- tagList.insert(HTMLNames::table().localName().implementation());
- tagList.insert(HTMLNames::fieldset().localName().implementation());
- tagList.insert(HTMLNames::address().localName().implementation());
- tagList.insert(HTMLNames::li().localName().implementation());
- tagList.insert(HTMLNames::dd().localName().implementation());
- tagList.insert(HTMLNames::dt().localName().implementation());
- tagList.insert(HTMLNames::marquee().localName().implementation());
+ tagList.insert(HTMLTags::p().localName().implementation());
+ tagList.insert(HTMLTags::h1().localName().implementation());
+ tagList.insert(HTMLTags::h2().localName().implementation());
+ tagList.insert(HTMLTags::h3().localName().implementation());
+ tagList.insert(HTMLTags::h4().localName().implementation());
+ tagList.insert(HTMLTags::h5().localName().implementation());
+ tagList.insert(HTMLTags::h6().localName().implementation());
+ tagList.insert(HTMLTags::ul().localName().implementation());
+ tagList.insert(HTMLTags::ol().localName().implementation());
+ tagList.insert(HTMLTags::dir().localName().implementation());
+ tagList.insert(HTMLTags::menu().localName().implementation());
+ tagList.insert(HTMLTags::pre().localName().implementation());
+ tagList.insert(HTMLTags::plaintext().localName().implementation());
+ tagList.insert(HTMLTags::xmp().localName().implementation());
+ tagList.insert(HTMLTags::dl().localName().implementation());
+ tagList.insert(HTMLTags::div().localName().implementation());
+ tagList.insert(HTMLTags::layer().localName().implementation());
+ tagList.insert(HTMLTags::center().localName().implementation());
+ tagList.insert(HTMLTags::noscript().localName().implementation());
+ tagList.insert(HTMLTags::noframes().localName().implementation());
+ tagList.insert(HTMLTags::blockquote().localName().implementation());
+ tagList.insert(HTMLTags::form().localName().implementation());
+ tagList.insert(HTMLTags::isindex().localName().implementation());
+ tagList.insert(HTMLTags::hr().localName().implementation());
+ tagList.insert(HTMLTags::table().localName().implementation());
+ tagList.insert(HTMLTags::fieldset().localName().implementation());
+ tagList.insert(HTMLTags::address().localName().implementation());
+ tagList.insert(HTMLTags::li().localName().implementation());
+ tagList.insert(HTMLTags::dd().localName().implementation());
+ tagList.insert(HTMLTags::dt().localName().implementation());
+ tagList.insert(HTMLTags::marquee().localName().implementation());
}
return &tagList;
}
@@ -931,7 +931,7 @@
bool HTMLElementImpl::checkDTD(const NodeImpl* newChild)
{
- if (hasTagName(HTMLNames::address()) && newChild->hasTagName(HTMLNames::p()))
+ if (hasTagName(HTMLTags::address()) && newChild->hasTagName(HTMLTags::p()))
return true;
return inEitherTagList(newChild);
}
1.173 +43 -43 WebCore/khtml/html/html_formimpl.cpp
Index: html_formimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.cpp,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- html_formimpl.cpp 18 Jul 2005 21:44:20 -0000 1.172
+++ html_formimpl.cpp 18 Jul 2005 21:52:25 -0000 1.173
@@ -102,7 +102,7 @@
};
HTMLFormElementImpl::HTMLFormElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::form(), doc)
+ : HTMLElementImpl(HTMLTags::form(), doc)
{
collectionInfo = 0;
m_post = false;
@@ -186,7 +186,7 @@
{
bool submitFound = false;
for (unsigned i = 0; i < formElements.count(); ++i) {
- if (formElements[i]->hasLocalName(HTMLNames::input())) {
+ if (formElements[i]->hasLocalName(HTMLTags::input())) {
HTMLInputElementImpl *element = static_cast<HTMLInputElementImpl *>(formElements[i]);
if (element->isSuccessfulSubmitButton() && element->renderer()) {
submitFound = true;
@@ -393,7 +393,7 @@
// if the current type is FILE, then we also need to
// include the filename
- if (current->hasLocalName(HTMLNames::input()) &&
+ if (current->hasLocalName(HTMLTags::input()) &&
static_cast<HTMLInputElementImpl*>(current)->inputType() == HTMLInputElementImpl::FILE)
{
QString path = static_cast<HTMLInputElementImpl*>(current)->value().string();
@@ -541,7 +541,7 @@
#if APPLE_CHANGES
// Our app needs to get form values for password fields for doing password autocomplete,
// so we are more lenient in pushing values, and let the app decide what to save when.
- if (current->hasLocalName(HTMLNames::input())) {
+ if (current->hasLocalName(HTMLTags::input())) {
HTMLInputElementImpl *input = static_cast<HTMLInputElementImpl*>(current);
if (input->inputType() == HTMLInputElementImpl::TEXT
|| input->inputType() == HTMLInputElementImpl::PASSWORD
@@ -686,7 +686,7 @@
{
for (unsigned i = 0; i < formElements.count(); ++i) {
HTMLGenericFormElementImpl *current = formElements[i];
- if (current->hasLocalName(HTMLNames::input()) &&
+ if (current->hasLocalName(HTMLTags::input()) &&
static_cast<HTMLInputElementImpl*>(current)->inputType() == HTMLInputElementImpl::RADIO &&
current != caller && current->form() == caller->form() && current->name() == caller->name()) {
static_cast<HTMLInputElementImpl*>(current)->setChecked(false);
@@ -938,7 +938,7 @@
{
NodeImpl *p = parentNode();
while(p) {
- if (p->hasTagName(HTMLNames::form()))
+ if (p->hasTagName(HTMLTags::form()))
return static_cast<HTMLFormElementImpl *>(p);
p = p->parentNode();
}
@@ -1158,7 +1158,7 @@
// -------------------------------------------------------------------------
HTMLButtonElementImpl::HTMLButtonElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::button(), doc, f)
+ : HTMLGenericFormElementImpl(HTMLTags::button(), doc, f)
{
m_type = SUBMIT;
m_dirty = true;
@@ -1283,7 +1283,7 @@
// -------------------------------------------------------------------------
HTMLFieldSetElementImpl::HTMLFieldSetElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::fieldset(), doc, f)
+ : HTMLGenericFormElementImpl(HTMLTags::fieldset(), doc, f)
{
}
@@ -1293,7 +1293,7 @@
bool HTMLFieldSetElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::legend()) || HTMLElementImpl::checkDTD(newChild);
+ return newChild->hasTagName(HTMLTags::legend()) || HTMLElementImpl::checkDTD(newChild);
}
bool HTMLFieldSetElementImpl::isFocusable() const
@@ -1314,7 +1314,7 @@
// -------------------------------------------------------------------------
HTMLInputElementImpl::HTMLInputElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::input(), doc, f)
+ : HTMLGenericFormElementImpl(HTMLTags::input(), doc, f)
{
init();
}
@@ -2404,7 +2404,7 @@
// -------------------------------------------------------------------------
HTMLLabelElementImpl::HTMLLabelElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::label(), doc)
+ : HTMLElementImpl(HTMLTags::label(), doc)
{
}
@@ -2465,7 +2465,7 @@
HTMLFormElementImpl *HTMLLabelElementImpl::form()
{
for (NodeImpl *p = parentNode(); p != 0; p = p->parentNode()) {
- if (p->hasTagName(HTMLNames::form()))
+ if (p->hasTagName(HTMLTags::form()))
return static_cast<HTMLFormElementImpl *>(p);
}
@@ -2495,7 +2495,7 @@
// -------------------------------------------------------------------------
HTMLLegendElementImpl::HTMLLegendElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
-: HTMLGenericFormElementImpl(HTMLNames::legend(), doc, f)
+: HTMLGenericFormElementImpl(HTMLTags::legend(), doc, f)
{
}
@@ -2542,7 +2542,7 @@
{
// Check if there's a fieldset belonging to this legend.
NodeImpl *fieldset = parentNode();
- while (fieldset && !fieldset->hasTagName(HTMLNames::fieldset()))
+ while (fieldset && !fieldset->hasTagName(HTMLTags::fieldset()))
fieldset = fieldset->parentNode();
if (!fieldset)
return 0;
@@ -2553,7 +2553,7 @@
while ((node = node->traverseNextNode(fieldset))) {
if (node->isHTMLElement()) {
HTMLElementImpl *element = static_cast<HTMLElementImpl *>(node);
- if (!element->hasLocalName(HTMLNames::legend()) && element->isGenericFormElement())
+ if (!element->hasLocalName(HTMLTags::legend()) && element->isGenericFormElement())
return element;
}
}
@@ -2576,7 +2576,7 @@
// -------------------------------------------------------------------------
HTMLSelectElementImpl::HTMLSelectElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::select(), doc, f), m_options(0)
+ : HTMLGenericFormElementImpl(HTMLTags::select(), doc, f), m_options(0)
{
init();
}
@@ -2608,8 +2608,8 @@
bool HTMLSelectElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->isTextNode() || newChild->hasTagName(HTMLNames::option()) || newChild->hasTagName(HTMLNames::optgroup()) ||
- newChild->hasTagName(HTMLNames::script());
+ return newChild->isTextNode() || newChild->hasTagName(HTMLTags::option()) || newChild->hasTagName(HTMLTags::optgroup()) ||
+ newChild->hasTagName(HTMLTags::script());
}
void HTMLSelectElementImpl::recalcStyle( StyleChange ch )
@@ -2633,7 +2633,7 @@
uint o = 0;
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
for (unsigned int i = 0; i < items.size(); i++) {
- if (items[i]->hasLocalName(HTMLNames::option())) {
+ if (items[i]->hasLocalName(HTMLTags::option())) {
if (static_cast<HTMLOptionElementImpl*>(items[i])->selected())
return o;
o++;
@@ -2649,7 +2649,7 @@
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
int listIndex;
for (listIndex = 0; listIndex < int(items.size()); listIndex++) {
- if (items[listIndex]->hasLocalName(HTMLNames::option()))
+ if (items[listIndex]->hasLocalName(HTMLTags::option()))
static_cast<HTMLOptionElementImpl*>(items[listIndex])->setSelected(false);
}
listIndex = optionToListIndex(index);
@@ -2665,7 +2665,7 @@
uint i;
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
for (i = 0; i < items.size(); i++) {
- if (items[i]->hasLocalName(HTMLNames::option()))
+ if (items[i]->hasLocalName(HTMLTags::option()))
len++;
}
return len;
@@ -2673,7 +2673,7 @@
void HTMLSelectElementImpl::add( HTMLElementImpl *element, HTMLElementImpl *before )
{
- if (!element || !element->hasLocalName(HTMLNames::option()))
+ if (!element || !element->hasLocalName(HTMLTags::option()))
return;
int exceptioncode = 0;
@@ -2712,7 +2712,7 @@
uint i;
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
for (i = 0; i < items.size(); i++) {
- if (items[i]->hasLocalName(HTMLNames::option()) && static_cast<HTMLOptionElementImpl*>(items[i])->selected())
+ if (items[i]->hasLocalName(HTMLTags::option()) && static_cast<HTMLOptionElementImpl*>(items[i])->selected())
return static_cast<HTMLOptionElementImpl*>(items[i])->value();
}
return DOMString("");
@@ -2726,7 +2726,7 @@
// and make it the current selection.
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
for (unsigned i = 0; i < items.size(); i++)
- if (items[i]->hasLocalName(HTMLNames::option()) && static_cast<HTMLOptionElementImpl*>(items[i])->value() == value) {
+ if (items[i]->hasLocalName(HTMLTags::option()) && static_cast<HTMLOptionElementImpl*>(items[i])->value() == value) {
static_cast<HTMLOptionElementImpl*>(items[i])->setSelected(true);
return;
}
@@ -2745,7 +2745,7 @@
QChar stateChars[l];
for(int i = 0; i < l; i++)
- if(items[i]->hasLocalName(HTMLNames::option()) && static_cast<HTMLOptionElementImpl*>(items[i])->selected())
+ if(items[i]->hasLocalName(HTMLTags::option()) && static_cast<HTMLOptionElementImpl*>(items[i])->selected())
stateChars[i] = 'X';
else
stateChars[i] = '.';
@@ -2782,7 +2782,7 @@
int l = items.count();
for(int i = 0; i < l; i++) {
- if(items[i]->hasLocalName(HTMLNames::option())) {
+ if(items[i]->hasLocalName(HTMLTags::option())) {
HTMLOptionElementImpl* oe = static_cast<HTMLOptionElementImpl*>(items[i]);
oe->setSelected(state[i] == 'X');
}
@@ -2864,7 +2864,7 @@
uint i;
for (i = 0; i < items.size(); i++) {
- if (items[i]->hasLocalName(HTMLNames::option())) {
+ if (items[i]->hasLocalName(HTMLTags::option())) {
HTMLOptionElementImpl *option = static_cast<HTMLOptionElementImpl*>(items[i]);
if (option->selected()) {
encoded_values.appendData(name(), option->value());
@@ -2877,7 +2877,7 @@
// in any case. otherwise we have no consistency with the DOM interface. FIXME!
// we return the first one if it was a combobox select
if (!successful && !m_multiple && m_size <= 1 && items.size() &&
- (items[0]->hasLocalName(HTMLNames::option()))) {
+ (items[0]->hasLocalName(HTMLTags::option()))) {
HTMLOptionElementImpl *option = static_cast<HTMLOptionElementImpl*>(items[0]);
if (option->value().isNull())
encoded_values.appendData(name(), option->text().string().stripWhiteSpace());
@@ -2900,7 +2900,7 @@
for (;
optionIndex2 < int(items.size()) && optionIndex2 <= optionIndex;
listIndex++) { // not a typo!
- if (items[listIndex]->hasLocalName(HTMLNames::option()))
+ if (items[listIndex]->hasLocalName(HTMLTags::option()))
optionIndex2++;
}
listIndex--;
@@ -2911,13 +2911,13 @@
{
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
if (listIndex < 0 || listIndex >= int(items.size()) ||
- !items[listIndex]->hasLocalName(HTMLNames::option()))
+ !items[listIndex]->hasLocalName(HTMLTags::option()))
return -1;
int optionIndex = 0; // actual index of option not counting OPTGROUP entries that may be in list
int i;
for (i = 0; i < listIndex; i++)
- if (items[i]->hasLocalName(HTMLNames::option()))
+ if (items[i]->hasLocalName(HTMLTags::option()))
optionIndex++;
return optionIndex;
}
@@ -2943,13 +2943,13 @@
m_listItems.resize(0);
HTMLOptionElementImpl* foundSelected = 0;
while(current) {
- if (current->hasTagName(HTMLNames::optgroup()) && current->firstChild()) {
+ if (current->hasTagName(HTMLTags::optgroup()) && current->firstChild()) {
// ### what if optgroup contains just comments? don't want one of no options in it...
m_listItems.resize(m_listItems.size()+1);
m_listItems[m_listItems.size()-1] = static_cast<HTMLGenericFormElementImpl*>(current);
current = current->firstChild();
}
- if (current->hasTagName(HTMLNames::option())) {
+ if (current->hasTagName(HTMLTags::option())) {
m_listItems.resize(m_listItems.size()+1);
m_listItems[m_listItems.size()-1] = static_cast<HTMLGenericFormElementImpl*>(current);
if (!foundSelected && !m_multiple && m_size <= 1) {
@@ -2991,7 +2991,7 @@
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
uint i;
for (i = 0; i < items.size(); i++) {
- if (items[i]->hasLocalName(HTMLNames::option())) {
+ if (items[i]->hasLocalName(HTMLTags::option())) {
HTMLOptionElementImpl *option = static_cast<HTMLOptionElementImpl*>(items[i]);
bool selected = (!option->getAttribute(HTMLAttributes::selected()).isNull());
option->setSelected(selected);
@@ -3009,7 +3009,7 @@
QMemArray<HTMLGenericFormElementImpl*> items = listItems();
uint i;
for (i = 0; i < items.size(); i++) {
- if (items[i]->hasLocalName(HTMLNames::option()))
+ if (items[i]->hasLocalName(HTMLTags::option()))
static_cast<HTMLOptionElementImpl*>(items[i])->m_selected = (items[i] == selectedOption);
}
}
@@ -3056,7 +3056,7 @@
// -------------------------------------------------------------------------
HTMLKeygenElementImpl::HTMLKeygenElementImpl(DocumentPtr* doc, HTMLFormElementImpl* f)
- : HTMLSelectElementImpl(HTMLNames::keygen(), doc, f)
+ : HTMLSelectElementImpl(HTMLTags::keygen(), doc, f)
{
QStringList keys = KSSLKeyGen::supportedKeySizes();
for (QStringList::Iterator i = keys.begin(); i != keys.end(); ++i) {
@@ -3115,7 +3115,7 @@
// -------------------------------------------------------------------------
HTMLOptGroupElementImpl::HTMLOptGroupElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::optgroup(), doc, f)
+ : HTMLGenericFormElementImpl(HTMLTags::optgroup(), doc, f)
{
}
@@ -3181,7 +3181,7 @@
void HTMLOptGroupElementImpl::recalcSelectOptions()
{
NodeImpl *select = parentNode();
- while (select && !select->hasTagName(HTMLNames::select()))
+ while (select && !select->hasTagName(HTMLTags::select()))
select = select->parentNode();
if (select)
static_cast<HTMLSelectElementImpl*>(select)->setRecalcListItems();
@@ -3200,7 +3200,7 @@
// -------------------------------------------------------------------------
HTMLOptionElementImpl::HTMLOptionElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::option(), doc, f)
+ : HTMLGenericFormElementImpl(HTMLTags::option(), doc, f)
{
m_selected = false;
}
@@ -3256,7 +3256,7 @@
int l = items.count();
int optionIndex = 0;
for(int i = 0; i < l; i++) {
- if (items[i]->hasLocalName(HTMLNames::option())) {
+ if (items[i]->hasLocalName(HTMLTags::option())) {
if (static_cast<HTMLOptionElementImpl*>(items[i]) == this)
return optionIndex;
optionIndex++;
@@ -3316,7 +3316,7 @@
HTMLSelectElementImpl *HTMLOptionElementImpl::getSelect() const
{
NodeImpl *select = parentNode();
- while (select && !select->hasTagName(HTMLNames::select()))
+ while (select && !select->hasTagName(HTMLTags::select()))
select = select->parentNode();
return static_cast<HTMLSelectElementImpl*>(select);
}
@@ -3344,7 +3344,7 @@
// -------------------------------------------------------------------------
HTMLTextAreaElementImpl::HTMLTextAreaElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLGenericFormElementImpl(HTMLNames::textarea(), doc, f), m_valueIsValid(false), m_valueMatchesRenderer(false)
+ : HTMLGenericFormElementImpl(HTMLTags::textarea(), doc, f), m_valueIsValid(false), m_valueMatchesRenderer(false)
{
// DTD requires rows & cols be specified, but we will provide reasonable defaults
m_rows = 2;
@@ -3595,7 +3595,7 @@
// -------------------------------------------------------------------------
HTMLIsIndexElementImpl::HTMLIsIndexElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLInputElementImpl(HTMLNames::isindex(), doc, f)
+ : HTMLInputElementImpl(HTMLTags::isindex(), doc, f)
{
m_type = TEXT;
setOverrideName("isindex");
1.78 +1 -1 WebCore/khtml/html/html_formimpl.h
Index: html_formimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- html_formimpl.h 18 Jul 2005 21:44:20 -0000 1.77
+++ html_formimpl.h 18 Jul 2005 21:52:25 -0000 1.78
@@ -643,7 +643,7 @@
HTMLOptGroupElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f = 0);
virtual ~HTMLOptGroupElementImpl();
- virtual bool checkDTD(const NodeImpl* newChild) { return newChild->hasTagName(HTMLNames::option()); }
+ virtual bool checkDTD(const NodeImpl* newChild) { return newChild->hasTagName(HTMLTags::option()); }
DOMString type() const;
1.53 +6 -6 WebCore/khtml/html/html_headimpl.cpp
Index: html_headimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_headimpl.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- html_headimpl.cpp 18 Jul 2005 21:44:20 -0000 1.52
+++ html_headimpl.cpp 18 Jul 2005 21:52:25 -0000 1.53
@@ -45,7 +45,7 @@
using namespace khtml;
HTMLBaseElementImpl::HTMLBaseElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::base(), doc)
+ : HTMLElementImpl(HTMLTags::base(), doc)
{
}
@@ -108,7 +108,7 @@
// -------------------------------------------------------------------------
HTMLLinkElementImpl::HTMLLinkElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::link(), doc)
+ : HTMLElementImpl(HTMLTags::link(), doc)
{
m_sheet = 0;
m_loading = false;
@@ -399,7 +399,7 @@
// -------------------------------------------------------------------------
-HTMLMetaElementImpl::HTMLMetaElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::meta(), doc)
+HTMLMetaElementImpl::HTMLMetaElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::meta(), doc)
{
}
@@ -478,7 +478,7 @@
// -------------------------------------------------------------------------
HTMLScriptElementImpl::HTMLScriptElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::script(), doc), m_cachedScript(0), m_createdByParser(false), m_evaluated(false)
+ : HTMLElementImpl(HTMLTags::script(), doc), m_cachedScript(0), m_createdByParser(false), m_evaluated(false)
{
}
@@ -658,7 +658,7 @@
// -------------------------------------------------------------------------
-HTMLStyleElementImpl::HTMLStyleElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::style(), doc)
+HTMLStyleElementImpl::HTMLStyleElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::style(), doc)
{
m_sheet = 0;
m_loading = false;
@@ -775,7 +775,7 @@
// -------------------------------------------------------------------------
HTMLTitleElementImpl::HTMLTitleElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::title(), doc), m_title("")
+ : HTMLElementImpl(HTMLTags::title(), doc), m_title("")
{
}
1.46 +6 -6 WebCore/khtml/html/html_imageimpl.cpp
Index: html_imageimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_imageimpl.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- html_imageimpl.cpp 18 Jul 2005 21:44:20 -0000 1.45
+++ html_imageimpl.cpp 18 Jul 2005 21:52:25 -0000 1.46
@@ -74,7 +74,7 @@
return;
AtomicString attr;
- if (element()->hasLocalName(HTMLNames::object()))
+ if (element()->hasLocalName(HTMLTags::object()))
attr = element()->getAttribute(HTMLAttributes::data());
else
attr = element()->getAttribute(HTMLAttributes::src());
@@ -136,7 +136,7 @@
// -------------------------------------------------------------------------
HTMLImageElementImpl::HTMLImageElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f)
- : HTMLElementImpl(HTMLNames::img(), doc), m_imageLoader(this), ismap(false), m_form(f)
+ : HTMLElementImpl(HTMLTags::img(), doc), m_imageLoader(this), ismap(false), m_form(f)
{
if (m_form)
m_form->registerImgElement(this);
@@ -497,7 +497,7 @@
// -------------------------------------------------------------------------
HTMLMapElementImpl::HTMLMapElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::map(), doc)
+ : HTMLElementImpl(HTMLTags::map(), doc)
{
}
@@ -510,7 +510,7 @@
bool HTMLMapElementImpl::checkDTD(const NodeImpl* newChild)
{
// FIXME: This seems really odd, allowing only blocks inside map.
- return newChild->hasTagName(HTMLNames::area()) || newChild->hasTagName(HTMLNames::script()) ||
+ return newChild->hasTagName(HTMLTags::area()) || newChild->hasTagName(HTMLTags::script()) ||
inBlockTagList(newChild);
}
@@ -531,7 +531,7 @@
continue;
}
- if (current->hasTagName(HTMLNames::area())) {
+ if (current->hasTagName(HTMLTags::area())) {
//cout << "area found " << endl;
HTMLAreaElementImpl* area = static_cast<HTMLAreaElementImpl*>(current);
if (area->mapMouseEvent(x_,y_,width_,height_, info))
@@ -586,7 +586,7 @@
// -------------------------------------------------------------------------
HTMLAreaElementImpl::HTMLAreaElementImpl(DocumentPtr *doc)
- : HTMLAnchorElementImpl(HTMLNames::area(), doc)
+ : HTMLAnchorElementImpl(HTMLTags::area(), doc)
{
m_coords=0;
m_coordsLen = 0;
1.45 +5 -5 WebCore/khtml/html/html_inlineimpl.cpp
Index: html_inlineimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_inlineimpl.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- html_inlineimpl.cpp 18 Jul 2005 21:44:20 -0000 1.44
+++ html_inlineimpl.cpp 18 Jul 2005 21:52:26 -0000 1.45
@@ -44,7 +44,7 @@
namespace DOM {
HTMLAnchorElementImpl::HTMLAnchorElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::a(), doc)
+ : HTMLElementImpl(HTMLTags::a(), doc)
{
m_hasTarget = false;
}
@@ -152,7 +152,7 @@
if ( e && e->button() == 1 )
utarget = "_blank";
- if (evt->target()->hasTagName(HTMLNames::img())) {
+ if (evt->target()->hasTagName(HTMLTags::img())) {
HTMLImageElementImpl* img = static_cast<HTMLImageElementImpl*>( evt->target() );
if ( img && img->isServerMap() )
{
@@ -377,7 +377,7 @@
// -------------------------------------------------------------------------
-HTMLBRElementImpl::HTMLBRElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::br(), doc)
+HTMLBRElementImpl::HTMLBRElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::br(), doc)
{
}
@@ -429,7 +429,7 @@
// -------------------------------------------------------------------------
HTMLFontElementImpl::HTMLFontElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::font(), doc)
+ : HTMLElementImpl(HTMLTags::font(), doc)
{
}
@@ -585,7 +585,7 @@
// -------------------------------------------------------------------------
HTMLQuoteElementImpl::HTMLQuoteElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::q(), doc)
+ : HTMLElementImpl(HTMLTags::q(), doc)
{
}
1.12 +2 -2 WebCore/khtml/html/html_listimpl.cpp
Index: html_listimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_listimpl.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- html_listimpl.cpp 18 Jul 2005 21:44:20 -0000 1.11
+++ html_listimpl.cpp 18 Jul 2005 21:52:26 -0000 1.12
@@ -204,7 +204,7 @@
NodeImpl *listNode = 0;
NodeImpl *n = this;
while (!listNode && (n = n->parentNode())) {
- if (n->hasTagName(HTMLNames::ul()) || n->hasTagName(HTMLNames::ol()))
+ if (n->hasTagName(HTMLTags::ul()) || n->hasTagName(HTMLTags::ol()))
listNode = n;
}
@@ -214,7 +214,7 @@
render->setNotInList(true);
// If we are first, and the OL has a start attr, set the value.
- if (listNode && listNode->hasTagName(HTMLNames::ol()) && !m_render->previousSibling()) {
+ if (listNode && listNode->hasTagName(HTMLTags::ol()) && !m_render->previousSibling()) {
HTMLOListElementImpl *ol = static_cast<HTMLOListElementImpl *>(listNode);
render->setValue(ol->start());
}
1.10 +6 -6 WebCore/khtml/html/html_listimpl.h
Index: html_listimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_listimpl.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- html_listimpl.h 18 Jul 2005 21:44:21 -0000 1.9
+++ html_listimpl.h 18 Jul 2005 21:52:26 -0000 1.10
@@ -35,7 +35,7 @@
class HTMLUListElementImpl : public HTMLElementImpl
{
public:
- HTMLUListElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::ul(), doc) {}
+ HTMLUListElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::ul(), doc) {}
virtual ~HTMLUListElementImpl() {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
@@ -58,7 +58,7 @@
class HTMLDirectoryElementImpl : public HTMLElementImpl
{
public:
- HTMLDirectoryElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::dir(), doc) {}
+ HTMLDirectoryElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::dir(), doc) {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
virtual int tagPriority() const { return 5; }
@@ -72,7 +72,7 @@
class HTMLMenuElementImpl : public HTMLElementImpl
{
public:
- HTMLMenuElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::menu(), doc) {}
+ HTMLMenuElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::menu(), doc) {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
virtual int tagPriority() const { return 5; }
@@ -87,7 +87,7 @@
{
public:
HTMLOListElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::ol(), doc) { _start = 1; }
+ : HTMLElementImpl(HTMLTags::ol(), doc) { _start = 1; }
virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
virtual int tagPriority() const { return 5; }
@@ -114,7 +114,7 @@
{
public:
HTMLLIElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::li(), doc) { isValued = false; }
+ : HTMLElementImpl(HTMLTags::li(), doc) { isValued = false; }
virtual ~HTMLLIElementImpl() {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
@@ -141,7 +141,7 @@
class HTMLDListElementImpl : public HTMLElementImpl
{
public:
- HTMLDListElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLNames::dl(), doc) {}
+ HTMLDListElementImpl(DocumentPtr *doc) : HTMLElementImpl(HTMLTags::dl(), doc) {}
virtual ~HTMLDListElementImpl() {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
1.29 +32 -32 WebCore/khtml/html/html_miscimpl.cpp
Index: html_miscimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_miscimpl.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- html_miscimpl.cpp 18 Jul 2005 21:44:21 -0000 1.28
+++ html_miscimpl.cpp 18 Jul 2005 21:52:26 -0000 1.29
@@ -34,7 +34,7 @@
namespace DOM {
HTMLBaseFontElementImpl::HTMLBaseFontElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::basefont(), doc)
+ : HTMLElementImpl(HTMLTags::basefont(), doc)
{
}
@@ -135,71 +135,71 @@
HTMLElementImpl *e = static_cast<HTMLElementImpl *>(current);
switch(type) {
case DOC_IMAGES:
- if (e->hasLocalName(HTMLNames::img()))
+ if (e->hasLocalName(HTMLTags::img()))
found = true;
break;
case DOC_FORMS:
- if(e->hasLocalName(HTMLNames::form()))
+ if(e->hasLocalName(HTMLTags::form()))
found = true;
break;
case DOC_NAMEABLE_ITEMS:
- if (e->hasLocalName(HTMLNames::img()))
+ if (e->hasLocalName(HTMLTags::img()))
found = true;
- if (e->hasLocalName(HTMLNames::form()))
+ if (e->hasLocalName(HTMLTags::form()))
found = true;
- if (e->hasLocalName(HTMLNames::applet()))
+ if (e->hasLocalName(HTMLTags::applet()))
found = true;
- if (e->hasLocalName(HTMLNames::embed()))
+ if (e->hasLocalName(HTMLTags::embed()))
found = true;
- if (e->hasLocalName(HTMLNames::object()))
+ if (e->hasLocalName(HTMLTags::object()))
found = true;
break;
case TABLE_TBODIES:
- if (e->hasLocalName(HTMLNames::tbody()))
+ if (e->hasLocalName(HTMLTags::tbody()))
found = true;
- else if (e->hasLocalName(HTMLNames::table()))
+ else if (e->hasLocalName(HTMLTags::table()))
deep = false;
break;
case TR_CELLS:
- if (e->hasLocalName(HTMLNames::td()) || e->hasLocalName(HTMLNames::th()))
+ if (e->hasLocalName(HTMLTags::td()) || e->hasLocalName(HTMLTags::th()))
found = true;
- else if (e->hasLocalName(HTMLNames::table()))
+ else if (e->hasLocalName(HTMLTags::table()))
deep = false;
break;
case TABLE_ROWS:
case TSECTION_ROWS:
- if (e->hasLocalName(HTMLNames::tr()))
+ if (e->hasLocalName(HTMLTags::tr()))
found = true;
- else if (e->hasLocalName(HTMLNames::table()))
+ else if (e->hasLocalName(HTMLTags::table()))
deep = false;
break;
case SELECT_OPTIONS:
- if (e->hasLocalName(HTMLNames::option()))
+ if (e->hasLocalName(HTMLTags::option()))
found = true;
break;
case MAP_AREAS:
- if (e->hasLocalName(HTMLNames::area()))
+ if (e->hasLocalName(HTMLTags::area()))
found = true;
break;
case DOC_APPLETS: // all OBJECT and APPLET elements
- if (e->hasLocalName(HTMLNames::object()) || e->hasLocalName(HTMLNames::applet()))
+ if (e->hasLocalName(HTMLTags::object()) || e->hasLocalName(HTMLTags::applet()))
found = true;
break;
case DOC_EMBEDS: // all EMBED elements
- if (e->hasLocalName(HTMLNames::embed()))
+ if (e->hasLocalName(HTMLTags::embed()))
found = true;
break;
case DOC_OBJECTS: // all OBJECT elements
- if (e->hasLocalName(HTMLNames::object()))
+ if (e->hasLocalName(HTMLTags::object()))
found = true;
break;
case DOC_LINKS: // all A _and_ AREA elements with a value for href
- if (e->hasLocalName(HTMLNames::a()) || e->hasLocalName(HTMLNames::area()))
+ if (e->hasLocalName(HTMLTags::a()) || e->hasLocalName(HTMLTags::area()))
if (!e->getAttribute(HTMLAttributes::href()).isNull())
found = true;
break;
case DOC_ANCHORS: // all A elements with a value for name or an id attribute
- if (e->hasLocalName(HTMLNames::a()))
+ if (e->hasLocalName(HTMLTags::a()))
if (!e->getAttribute(HTMLAttributes::name()).isNull())
found = true;
break;
@@ -301,9 +301,9 @@
// document.all returns only images, forms, applets, objects and embeds
// by name (though everything by id)
if (type == DOC_ALL &&
- !(e->hasLocalName(HTMLNames::img()) || e->hasLocalName(HTMLNames::form()) ||
- e->hasLocalName(HTMLNames::applet()) || e->hasLocalName(HTMLNames::object()) ||
- e->hasLocalName(HTMLNames::embed())))
+ !(e->hasLocalName(HTMLTags::img()) || e->hasLocalName(HTMLTags::form()) ||
+ e->hasLocalName(HTMLTags::applet()) || e->hasLocalName(HTMLTags::object()) ||
+ e->hasLocalName(HTMLTags::embed())))
return false;
return e->getAttribute(HTMLAttributes::name()) == name && e->getAttribute(HTMLAttributes::idAttr()) != name;
@@ -314,9 +314,9 @@
// document.all returns only images, forms, applets, objects and embeds
// by name (though everything by id)
if (type == DOC_ALL &&
- !(e->hasLocalName(HTMLNames::img()) || e->hasLocalName(HTMLNames::form()) ||
- e->hasLocalName(HTMLNames::applet()) || e->hasLocalName(HTMLNames::object()) ||
- e->hasLocalName(HTMLNames::embed())))
+ !(e->hasLocalName(HTMLTags::img()) || e->hasLocalName(HTMLTags::form()) ||
+ e->hasLocalName(HTMLTags::applet()) || e->hasLocalName(HTMLTags::object()) ||
+ e->hasLocalName(HTMLTags::embed())))
return false;
return e->getAttribute(HTMLAttributes::name()).domString().lower() == name.lower() &&
@@ -391,9 +391,9 @@
}
if (!nameAttr.isEmpty() && idAttr != nameAttr
&& (type != DOC_ALL ||
- (e->hasLocalName(HTMLNames::img()) || e->hasLocalName(HTMLNames::form()) ||
- e->hasLocalName(HTMLNames::applet()) || e->hasLocalName(HTMLNames::object()) ||
- e->hasLocalName(HTMLNames::embed())))) {
+ (e->hasLocalName(HTMLTags::img()) || e->hasLocalName(HTMLTags::form()) ||
+ e->hasLocalName(HTMLTags::applet()) || e->hasLocalName(HTMLTags::object()) ||
+ e->hasLocalName(HTMLTags::embed())))) {
// add to name cache
QPtrVector<NodeImpl> *nameVector = info->nameCache.find(nameAttr);
if (!nameVector) {
@@ -533,7 +533,7 @@
if (m_base->nodeType() == Node::ELEMENT_NODE) {
HTMLElementImpl* baseElement = static_cast<HTMLElementImpl*>(m_base.get());
bool foundInputElements = false;
- if (baseElement->hasLocalName(HTMLNames::form())) {
+ if (baseElement->hasLocalName(HTMLTags::form())) {
HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
for (unsigned i = 0; i < f->formElements.count(); ++i) {
HTMLGenericFormElementImpl* e = f->formElements[i];
@@ -645,7 +645,7 @@
QDict<char> foundInputElements;
- if (!m_base->hasTagName(HTMLNames::form())) {
+ if (!m_base->hasTagName(HTMLTags::form())) {
info->hasNameCache = true;
return;
}
1.70 +10 -10 WebCore/khtml/html/html_objectimpl.cpp
Index: html_objectimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_objectimpl.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- html_objectimpl.cpp 18 Jul 2005 21:44:21 -0000 1.69
+++ html_objectimpl.cpp 18 Jul 2005 21:52:26 -0000 1.70
@@ -57,7 +57,7 @@
// -------------------------------------------------------------------------
HTMLAppletElementImpl::HTMLAppletElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::applet(), doc)
+ : HTMLElementImpl(HTMLTags::applet(), doc)
{
appletInstance = 0;
m_allParamsAvailable = false;
@@ -70,7 +70,7 @@
bool HTMLAppletElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::param()) || HTMLElementImpl::checkDTD(newChild);
+ return newChild->hasTagName(HTMLTags::param()) || HTMLElementImpl::checkDTD(newChild);
}
bool HTMLAppletElementImpl::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
@@ -344,7 +344,7 @@
// -------------------------------------------------------------------------
HTMLEmbedElementImpl::HTMLEmbedElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::embed(), doc), embedInstance(0)
+ : HTMLElementImpl(HTMLTags::embed(), doc), embedInstance(0)
{}
HTMLEmbedElementImpl::~HTMLEmbedElementImpl()
@@ -353,7 +353,7 @@
bool HTMLEmbedElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::param()) || HTMLElementImpl::checkDTD(newChild);
+ return newChild->hasTagName(HTMLTags::param()) || HTMLElementImpl::checkDTD(newChild);
}
#if APPLE_CHANGES
@@ -455,7 +455,7 @@
KHTMLPart *part = getDocument()->part();
if (!part)
return false;
- return part->pluginsEnabled() && !parentNode()->hasTagName(HTMLNames::object());
+ return part->pluginsEnabled() && !parentNode()->hasTagName(HTMLTags::object());
}
RenderObject *HTMLEmbedElementImpl::createRenderer(RenderArena *arena, RenderStyle *style)
@@ -480,9 +480,9 @@
HTMLObjectElementImpl::HTMLObjectElementImpl(DocumentPtr *doc)
#if APPLE_CHANGES
-: HTMLElementImpl(HTMLNames::object(), doc), m_imageLoader(0), objectInstance(0)
+: HTMLElementImpl(HTMLTags::object(), doc), m_imageLoader(0), objectInstance(0)
#else
-: HTMLElementImpl(HTMLNames::object(), doc), m_imageLoader(0)
+: HTMLElementImpl(HTMLTags::object(), doc), m_imageLoader(0)
#endif
{
needWidgetUpdate = false;
@@ -496,7 +496,7 @@
bool HTMLObjectElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::param()) || HTMLElementImpl::checkDTD(newChild);
+ return newChild->hasTagName(HTMLTags::param()) || HTMLElementImpl::checkDTD(newChild);
}
#if APPLE_CHANGES
@@ -531,7 +531,7 @@
HTMLFormElementImpl *HTMLObjectElementImpl::form() const
{
for (NodeImpl *p = parentNode(); p != 0; p = p->parentNode()) {
- if (p->hasTagName(HTMLNames::form()))
+ if (p->hasTagName(HTMLTags::form()))
return static_cast<HTMLFormElementImpl *>(p);
}
@@ -912,7 +912,7 @@
// -------------------------------------------------------------------------
HTMLParamElementImpl::HTMLParamElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::param(), doc)
+ : HTMLElementImpl(HTMLTags::param(), doc)
{
}
1.57 +32 -32 WebCore/khtml/html/html_tableimpl.cpp
Index: html_tableimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_tableimpl.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- html_tableimpl.cpp 18 Jul 2005 21:44:21 -0000 1.56
+++ html_tableimpl.cpp 18 Jul 2005 21:52:26 -0000 1.57
@@ -50,7 +50,7 @@
namespace DOM {
HTMLTableElementImpl::HTMLTableElementImpl(DocumentPtr *doc)
- : HTMLElementImpl(HTMLNames::table(), doc)
+ : HTMLElementImpl(HTMLTags::table(), doc)
{
tCaption = 0;
head = 0;
@@ -76,11 +76,11 @@
bool HTMLTableElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->isTextNode() || newChild->hasTagName(HTMLNames::caption()) ||
- newChild->hasTagName(HTMLNames::col()) || newChild->hasTagName(HTMLNames::colgroup()) ||
- newChild->hasTagName(HTMLNames::thead()) || newChild->hasTagName(HTMLNames::tfoot()) ||
- newChild->hasTagName(HTMLNames::tbody()) || newChild->hasTagName(HTMLNames::form()) ||
- newChild->hasTagName(HTMLNames::script());
+ return newChild->isTextNode() || newChild->hasTagName(HTMLTags::caption()) ||
+ newChild->hasTagName(HTMLTags::col()) || newChild->hasTagName(HTMLTags::colgroup()) ||
+ newChild->hasTagName(HTMLTags::thead()) || newChild->hasTagName(HTMLTags::tfoot()) ||
+ newChild->hasTagName(HTMLTags::tbody()) || newChild->hasTagName(HTMLTags::form()) ||
+ newChild->hasTagName(HTMLTags::script());
}
NodeImpl* HTMLTableElementImpl::setCaption( HTMLTableCaptionElementImpl *c )
@@ -153,7 +153,7 @@
if(!head)
{
int exceptioncode = 0;
- head = new HTMLTableSectionElementImpl(HTMLNames::thead(), docPtr(), true /* implicit */);
+ head = new HTMLTableSectionElementImpl(HTMLTags::thead(), docPtr(), true /* implicit */);
if(foot)
insertBefore( head, foot, exceptioncode );
else if(firstBody)
@@ -178,7 +178,7 @@
if(!foot)
{
int exceptioncode = 0;
- foot = new HTMLTableSectionElementImpl(HTMLNames::tfoot(), docPtr(), true /*implicit */);
+ foot = new HTMLTableSectionElementImpl(HTMLTags::tfoot(), docPtr(), true /*implicit */);
if(firstBody)
insertBefore( foot, firstBody, exceptioncode );
else
@@ -223,7 +223,7 @@
// (note: this is different from "if the table has no sections", since we can have
// <TABLE><TR>)
if(!firstBody && !head && !foot)
- setTBody( new HTMLTableSectionElementImpl(HTMLNames::tbody(), docPtr(), true /* implicit */) );
+ setTBody( new HTMLTableSectionElementImpl(HTMLTags::tbody(), docPtr(), true /* implicit */) );
//kdDebug(6030) << k_funcinfo << index << endl;
// IE treats index=-1 as default value meaning 'append after last'
@@ -237,8 +237,8 @@
{
// there could be 2 tfoot elements in the table. Only the first one is the "foot", that's why we have the more
// complicated if statement below.
- if (node != foot && (node->hasTagName(HTMLNames::thead()) || node->hasTagName(HTMLNames::tfoot()) ||
- node->hasTagName(HTMLNames::tbody())))
+ if (node != foot && (node->hasTagName(HTMLTags::thead()) || node->hasTagName(HTMLTags::tfoot()) ||
+ node->hasTagName(HTMLTags::tbody())))
{
section = static_cast<HTMLTableSectionElementImpl *>(node);
lastSection = section;
@@ -284,8 +284,8 @@
bool found = false;
for ( ; node ; node = node->nextSibling() )
{
- if (node != foot && (node->hasTagName(HTMLNames::thead()) || node->hasTagName(HTMLNames::tfoot()) ||
- node->hasTagName(HTMLNames::tbody()))) {
+ if (node != foot && (node->hasTagName(HTMLTags::thead()) || node->hasTagName(HTMLTags::tfoot()) ||
+ node->hasTagName(HTMLTags::tbody()))) {
section = static_cast<HTMLTableSectionElementImpl *>(node);
lastSection = section;
int rows = section->numRows();
@@ -317,7 +317,7 @@
kdDebug( 6030 ) << nodeName().string() << "(Table)::addChild( " << child->nodeName().string() << " )" << endl;
#endif
- if (child->hasTagName(HTMLNames::form())) {
+ if (child->hasTagName(HTMLTags::form())) {
// First add the child.
HTMLElementImpl::addChild(child);
// Now simply return ourselves as the newnode. This has the effect of
@@ -346,13 +346,13 @@
int exceptioncode = 0;
NodeImpl *retval = appendChild( child, exceptioncode );
if (retval) {
- if (!tCaption && child->hasTagName(HTMLNames::caption()))
+ if (!tCaption && child->hasTagName(HTMLTags::caption()))
tCaption = static_cast<HTMLTableCaptionElementImpl *>(child);
- else if (!head && child->hasTagName(HTMLNames::thead()))
+ else if (!head && child->hasTagName(HTMLTags::thead()))
head = static_cast<HTMLTableSectionElementImpl *>(child);
- else if (!foot && child->hasTagName(HTMLNames::tfoot()))
+ else if (!foot && child->hasTagName(HTMLTags::tfoot()))
foot = static_cast<HTMLTableSectionElementImpl *>(child);
- else if (!firstBody && child->hasTagName(HTMLNames::tbody())) {
+ else if (!firstBody && child->hasTagName(HTMLTags::tbody())) {
firstBody = static_cast<HTMLTableSectionElementImpl *>(child);
firstBody->ref();
}
@@ -779,8 +779,8 @@
bool HTMLTableSectionElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::tr()) || newChild->hasTagName(HTMLNames::form()) ||
- newChild->hasTagName(HTMLNames::script());
+ return newChild->hasTagName(HTMLTags::tr()) || newChild->hasTagName(HTMLTags::form()) ||
+ newChild->hasTagName(HTMLTags::script());
}
NodeImpl *HTMLTableSectionElementImpl::addChild(NodeImpl *child)
@@ -789,7 +789,7 @@
kdDebug( 6030 ) << nodeName().string() << "(Tbody)::addChild( " << child->nodeName().string() << " )" << endl;
#endif
- if (child->hasTagName(HTMLNames::form())) {
+ if (child->hasTagName(HTMLTags::form())) {
// First add the child.
HTMLElementImpl::addChild(child);
// Now simply return ourselves as the newnode. This has the effect of
@@ -845,7 +845,7 @@
int rows = 0;
const NodeImpl *n = firstChild();
while (n) {
- if (n->hasTagName(HTMLNames::tr()))
+ if (n->hasTagName(HTMLTags::tr()))
rows++;
n = n->nextSibling();
}
@@ -902,8 +902,8 @@
bool HTMLTableRowElementImpl::checkDTD(const NodeImpl* newChild)
{
- return newChild->hasTagName(HTMLNames::td()) || newChild->hasTagName(HTMLNames::th()) ||
- newChild->hasTagName(HTMLNames::form()) || newChild->hasTagName(HTMLNames::script());
+ return newChild->hasTagName(HTMLTags::td()) || newChild->hasTagName(HTMLTags::th()) ||
+ newChild->hasTagName(HTMLTags::form()) || newChild->hasTagName(HTMLTags::script());
}
NodeImpl *HTMLTableRowElementImpl::addChild(NodeImpl *child)
@@ -912,7 +912,7 @@
kdDebug( 6030 ) << nodeName().string() << "(Trow)::addChild( " << child->nodeName().string() << " )" << endl;
#endif
- if (child->hasTagName(HTMLNames::form())) {
+ if (child->hasTagName(HTMLTags::form())) {
// First add the child.
HTMLElementImpl::addChild(child);
// Now simply return ourselves as the newnode. This has the effect of
@@ -930,13 +930,13 @@
if (!table)
return -1;
table = table->parentNode();
- if (!table || !table->hasTagName(HTMLNames::table()))
+ if (!table || !table->hasTagName(HTMLTags::table()))
return -1;
HTMLTableSectionElementImpl *foot = static_cast<HTMLTableElementImpl *>(table)->tFoot();
NodeImpl *node = table->firstChild();
while (node) {
- if (node != foot && (node->hasTagName(HTMLNames::thead()) || node->hasTagName(HTMLNames::tfoot()) || node->hasTagName(HTMLNames::tbody()))) {
+ if (node != foot && (node->hasTagName(HTMLTags::thead()) || node->hasTagName(HTMLTags::tfoot()) || node->hasTagName(HTMLTags::tbody()))) {
HTMLTableSectionElementImpl* section = static_cast<HTMLTableSectionElementImpl *>(node);
const NodeImpl *row = section->firstChild();
while ( row ) {
@@ -965,7 +965,7 @@
const NodeImpl *n = this;
do {
n = n->previousSibling();
- if (n && n->hasTagName(HTMLNames::tr()))
+ if (n && n->hasTagName(HTMLTags::tr()))
rIndex++;
}
while (n);
@@ -982,7 +982,7 @@
exceptioncode = DOMException::INDEX_SIZE_ERR; // per the DOM
else
{
- c = new HTMLTableCellElementImpl(HTMLNames::td(), docPtr());
+ c = new HTMLTableCellElementImpl(HTMLTags::td(), docPtr());
if(numCells == index || index == -1)
appendChild(c, exceptioncode);
else {
@@ -1090,7 +1090,7 @@
{
int index = 0;
for (const NodeImpl * node = previousSibling(); node; node = node->previousSibling()) {
- if (node->hasTagName(HTMLNames::td()) || node->hasTagName(HTMLNames::th()))
+ if (node->hasTagName(HTMLTags::td()) || node->hasTagName(HTMLTags::th()))
index++;
}
@@ -1148,7 +1148,7 @@
CSSMutableStyleDeclarationImpl* HTMLTableCellElementImpl::additionalAttributeStyleDecl()
{
NodeImpl* p = parentNode();
- while (p && !p->hasTagName(HTMLNames::table()))
+ while (p && !p->hasTagName(HTMLTags::table()))
p = p->parentNode();
if (p) {
@@ -1299,7 +1299,7 @@
HTMLTableColElementImpl::HTMLTableColElementImpl(const QualifiedName& tagName, DocumentPtr *doc)
: HTMLTablePartElementImpl(tagName, doc)
{
- _span = (tagName.matches(HTMLNames::colgroup()) ? 0 : 1);
+ _span = (tagName.matches(HTMLTags::colgroup()) ? 0 : 1);
}
bool HTMLTableColElementImpl::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
1.25 +5 -5 WebCore/khtml/html/html_tableimpl.h
Index: html_tableimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_tableimpl.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- html_tableimpl.h 18 Jul 2005 21:44:21 -0000 1.24
+++ html_tableimpl.h 18 Jul 2005 21:52:26 -0000 1.25
@@ -197,7 +197,7 @@
{
public:
HTMLTableRowElementImpl(DocumentPtr *doc)
- : HTMLTablePartElementImpl(HTMLNames::tr(), doc) {}
+ : HTMLTablePartElementImpl(HTMLTags::tr(), doc) {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusOptional; }
virtual int tagPriority() const { return 7; }
@@ -324,9 +324,9 @@
public:
HTMLTableColElementImpl(const QualifiedName& tagName, DocumentPtr *doc);
- virtual HTMLTagStatus endTagRequirement() const { return hasLocalName(HTMLNames::col()) ? TagStatusForbidden : TagStatusOptional; }
- virtual int tagPriority() const { return hasLocalName(HTMLNames::col()) ? 0 : 1; }
- virtual bool checkDTD(const NodeImpl* newChild) { return hasLocalName(HTMLNames::colgroup()) && newChild->hasTagName(HTMLNames::col()); }
+ virtual HTMLTagStatus endTagRequirement() const { return hasLocalName(HTMLTags::col()) ? TagStatusForbidden : TagStatusOptional; }
+ virtual int tagPriority() const { return hasLocalName(HTMLTags::col()) ? 0 : 1; }
+ virtual bool checkDTD(const NodeImpl* newChild) { return hasLocalName(HTMLTags::colgroup()) && newChild->hasTagName(HTMLTags::col()); }
void setTable(HTMLTableElementImpl *t) { table = t; }
// overrides
@@ -363,7 +363,7 @@
{
public:
HTMLTableCaptionElementImpl(DocumentPtr *doc)
- : HTMLTablePartElementImpl(HTMLNames::caption(), doc) {}
+ : HTMLTablePartElementImpl(HTMLTags::caption(), doc) {}
virtual HTMLTagStatus endTagRequirement() const { return TagStatusRequired; }
virtual int tagPriority() const { return 5; }
1.2 +74 -74 WebCore/khtml/html/htmlfactory.cpp
Index: htmlfactory.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmlfactory.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- htmlfactory.cpp 9 Jul 2005 20:19:10 -0000 1.1
+++ htmlfactory.cpp 18 Jul 2005 21:52:26 -0000 1.2
@@ -199,7 +199,7 @@
HTMLElementImpl* headingConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
{
- return new HTMLHeadingElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr);
+ return new HTMLHeadingElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr);
}
HTMLElementImpl* hrConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
@@ -214,7 +214,7 @@
HTMLElementImpl* preConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
{
- return new HTMLPreElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr);
+ return new HTMLPreElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr);
}
HTMLElementImpl* basefontConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
@@ -229,7 +229,7 @@
HTMLElementImpl* modConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
{
- return new HTMLModElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr);
+ return new HTMLModElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr);
}
HTMLElementImpl* anchorConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
@@ -296,7 +296,7 @@
HTMLElementImpl* tableColConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
{
- return new HTMLTableColElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr);
+ return new HTMLTableColElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr);
}
HTMLElementImpl* tableRowConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
@@ -306,12 +306,12 @@
HTMLElementImpl* tableCellConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
{
- return new HTMLTableCellElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr);
+ return new HTMLTableCellElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr);
}
HTMLElementImpl* tableSectionConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
{
- return new HTMLTableSectionElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr, false);
+ return new HTMLTableSectionElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr, false);
}
HTMLElementImpl* brConstructor(const AtomicString& tagName, DocumentPtr* docPtr, HTMLFormElementImpl* form, bool createdByParser)
@@ -340,73 +340,73 @@
gFunctionMap = new FunctionMap;
// Populate it with constructor functions.
- gFunctionMap->insert(HTMLNames::html().localName().implementation(), (void*)&htmlConstructor);
- gFunctionMap->insert(HTMLNames::head().localName().implementation(), (void*)&headConstructor);
- gFunctionMap->insert(HTMLNames::body().localName().implementation(), (void*)&bodyConstructor);
- gFunctionMap->insert(HTMLNames::base().localName().implementation(), (void*)&baseConstructor);
- gFunctionMap->insert(HTMLNames::link().localName().implementation(), (void*)&linkConstructor);
- gFunctionMap->insert(HTMLNames::meta().localName().implementation(), (void*)&metaConstructor);
- gFunctionMap->insert(HTMLNames::style().localName().implementation(), (void*)&styleConstructor);
- gFunctionMap->insert(HTMLNames::title().localName().implementation(), (void*)&titleConstructor);
- gFunctionMap->insert(HTMLNames::frame().localName().implementation(), (void*)&frameConstructor);
- gFunctionMap->insert(HTMLNames::frameset().localName().implementation(), (void*)&framesetConstructor);
- gFunctionMap->insert(HTMLNames::iframe().localName().implementation(), (void*)&iframeConstructor);
- gFunctionMap->insert(HTMLNames::form().localName().implementation(), (void*)&formConstructor);
- gFunctionMap->insert(HTMLNames::button().localName().implementation(), (void*)&buttonConstructor);
- gFunctionMap->insert(HTMLNames::input().localName().implementation(), (void*)&inputConstructor);
- gFunctionMap->insert(HTMLNames::isindex().localName().implementation(), (void*)&isindexConstructor);
- gFunctionMap->insert(HTMLNames::fieldset().localName().implementation(), (void*)&fieldsetConstructor);
- gFunctionMap->insert(HTMLNames::label().localName().implementation(), (void*)&labelConstructor);
- gFunctionMap->insert(HTMLNames::legend().localName().implementation(), (void*)&legendConstructor);
- gFunctionMap->insert(HTMLNames::optgroup().localName().implementation(), (void*)&optgroupConstructor);
- gFunctionMap->insert(HTMLNames::option().localName().implementation(), (void*)&optionConstructor);
- gFunctionMap->insert(HTMLNames::select().localName().implementation(), (void*)&selectConstructor);
- gFunctionMap->insert(HTMLNames::textarea().localName().implementation(), (void*)&textareaConstructor);
- gFunctionMap->insert(HTMLNames::dl().localName().implementation(), (void*)&dlConstructor);
- gFunctionMap->insert(HTMLNames::ol().localName().implementation(), (void*)&olConstructor);
- gFunctionMap->insert(HTMLNames::ul().localName().implementation(), (void*)&ulConstructor);
- gFunctionMap->insert(HTMLNames::dir().localName().implementation(), (void*)&dirConstructor);
- gFunctionMap->insert(HTMLNames::menu().localName().implementation(), (void*)&menuConstructor);
- gFunctionMap->insert(HTMLNames::li().localName().implementation(), (void*)&liConstructor);
- gFunctionMap->insert(HTMLNames::blockquote().localName().implementation(), (void*)&blockquoteConstructor);
- gFunctionMap->insert(HTMLNames::div().localName().implementation(), (void*)&divConstructor);
- gFunctionMap->insert(HTMLNames::h1().localName().implementation(), (void*)&headingConstructor);
- gFunctionMap->insert(HTMLNames::h2().localName().implementation(), (void*)&headingConstructor);
- gFunctionMap->insert(HTMLNames::h3().localName().implementation(), (void*)&headingConstructor);
- gFunctionMap->insert(HTMLNames::h4().localName().implementation(), (void*)&headingConstructor);
- gFunctionMap->insert(HTMLNames::h5().localName().implementation(), (void*)&headingConstructor);
- gFunctionMap->insert(HTMLNames::h6().localName().implementation(), (void*)&headingConstructor);
- gFunctionMap->insert(HTMLNames::hr().localName().implementation(), (void*)&hrConstructor);
- gFunctionMap->insert(HTMLNames::p().localName().implementation(), (void*)¶graphConstructor);
- gFunctionMap->insert(HTMLNames::pre().localName().implementation(), (void*)&preConstructor);
- gFunctionMap->insert(HTMLNames::xmp().localName().implementation(), (void*)&preConstructor);
- gFunctionMap->insert(HTMLNames::basefont().localName().implementation(), (void*)&basefontConstructor);
- gFunctionMap->insert(HTMLNames::font().localName().implementation(), (void*)&fontConstructor);
- gFunctionMap->insert(HTMLNames::del().localName().implementation(), (void*)&modConstructor);
- gFunctionMap->insert(HTMLNames::ins().localName().implementation(), (void*)&modConstructor);
- gFunctionMap->insert(HTMLNames::a().localName().implementation(), (void*)&anchorConstructor);
- gFunctionMap->insert(HTMLNames::img().localName().implementation(), (void*)&imageConstructor);
- gFunctionMap->insert(HTMLNames::map().localName().implementation(), (void*)&mapConstructor);
- gFunctionMap->insert(HTMLNames::area().localName().implementation(), (void*)&areaConstructor);
- gFunctionMap->insert(HTMLNames::canvas().localName().implementation(), (void*)&canvasConstructor);
- gFunctionMap->insert(HTMLNames::applet().localName().implementation(), (void*)&appletConstructor);
- gFunctionMap->insert(HTMLNames::embed().localName().implementation(), (void*)&embedConstructor);
- gFunctionMap->insert(HTMLNames::object().localName().implementation(), (void*)&objectConstructor);
- gFunctionMap->insert(HTMLNames::param().localName().implementation(), (void*)¶mConstructor);
- gFunctionMap->insert(HTMLNames::script().localName().implementation(), (void*)&scriptConstructor);
- gFunctionMap->insert(HTMLNames::table().localName().implementation(), (void*)&tableConstructor);
- gFunctionMap->insert(HTMLNames::caption().localName().implementation(), (void*)&tableCaptionConstructor);
- gFunctionMap->insert(HTMLNames::colgroup().localName().implementation(), (void*)&tableColConstructor);
- gFunctionMap->insert(HTMLNames::col().localName().implementation(), (void*)&tableColConstructor);
- gFunctionMap->insert(HTMLNames::tr().localName().implementation(), (void*)&tableRowConstructor);
- gFunctionMap->insert(HTMLNames::td().localName().implementation(), (void*)&tableCellConstructor);
- gFunctionMap->insert(HTMLNames::th().localName().implementation(), (void*)&tableCellConstructor);
- gFunctionMap->insert(HTMLNames::thead().localName().implementation(), (void*)&tableSectionConstructor);
- gFunctionMap->insert(HTMLNames::tbody().localName().implementation(), (void*)&tableSectionConstructor);
- gFunctionMap->insert(HTMLNames::tfoot().localName().implementation(), (void*)&tableSectionConstructor);
- gFunctionMap->insert(HTMLNames::br().localName().implementation(), (void*)&brConstructor);
- gFunctionMap->insert(HTMLNames::q().localName().implementation(), (void*)"eConstructor);
- gFunctionMap->insert(HTMLNames::marquee().localName().implementation(), (void*)&marqueeConstructor);
+ gFunctionMap->insert(HTMLTags::html().localName().implementation(), (void*)&htmlConstructor);
+ gFunctionMap->insert(HTMLTags::head().localName().implementation(), (void*)&headConstructor);
+ gFunctionMap->insert(HTMLTags::body().localName().implementation(), (void*)&bodyConstructor);
+ gFunctionMap->insert(HTMLTags::base().localName().implementation(), (void*)&baseConstructor);
+ gFunctionMap->insert(HTMLTags::link().localName().implementation(), (void*)&linkConstructor);
+ gFunctionMap->insert(HTMLTags::meta().localName().implementation(), (void*)&metaConstructor);
+ gFunctionMap->insert(HTMLTags::style().localName().implementation(), (void*)&styleConstructor);
+ gFunctionMap->insert(HTMLTags::title().localName().implementation(), (void*)&titleConstructor);
+ gFunctionMap->insert(HTMLTags::frame().localName().implementation(), (void*)&frameConstructor);
+ gFunctionMap->insert(HTMLTags::frameset().localName().implementation(), (void*)&framesetConstructor);
+ gFunctionMap->insert(HTMLTags::iframe().localName().implementation(), (void*)&iframeConstructor);
+ gFunctionMap->insert(HTMLTags::form().localName().implementation(), (void*)&formConstructor);
+ gFunctionMap->insert(HTMLTags::button().localName().implementation(), (void*)&buttonConstructor);
+ gFunctionMap->insert(HTMLTags::input().localName().implementation(), (void*)&inputConstructor);
+ gFunctionMap->insert(HTMLTags::isindex().localName().implementation(), (void*)&isindexConstructor);
+ gFunctionMap->insert(HTMLTags::fieldset().localName().implementation(), (void*)&fieldsetConstructor);
+ gFunctionMap->insert(HTMLTags::label().localName().implementation(), (void*)&labelConstructor);
+ gFunctionMap->insert(HTMLTags::legend().localName().implementation(), (void*)&legendConstructor);
+ gFunctionMap->insert(HTMLTags::optgroup().localName().implementation(), (void*)&optgroupConstructor);
+ gFunctionMap->insert(HTMLTags::option().localName().implementation(), (void*)&optionConstructor);
+ gFunctionMap->insert(HTMLTags::select().localName().implementation(), (void*)&selectConstructor);
+ gFunctionMap->insert(HTMLTags::textarea().localName().implementation(), (void*)&textareaConstructor);
+ gFunctionMap->insert(HTMLTags::dl().localName().implementation(), (void*)&dlConstructor);
+ gFunctionMap->insert(HTMLTags::ol().localName().implementation(), (void*)&olConstructor);
+ gFunctionMap->insert(HTMLTags::ul().localName().implementation(), (void*)&ulConstructor);
+ gFunctionMap->insert(HTMLTags::dir().localName().implementation(), (void*)&dirConstructor);
+ gFunctionMap->insert(HTMLTags::menu().localName().implementation(), (void*)&menuConstructor);
+ gFunctionMap->insert(HTMLTags::li().localName().implementation(), (void*)&liConstructor);
+ gFunctionMap->insert(HTMLTags::blockquote().localName().implementation(), (void*)&blockquoteConstructor);
+ gFunctionMap->insert(HTMLTags::div().localName().implementation(), (void*)&divConstructor);
+ gFunctionMap->insert(HTMLTags::h1().localName().implementation(), (void*)&headingConstructor);
+ gFunctionMap->insert(HTMLTags::h2().localName().implementation(), (void*)&headingConstructor);
+ gFunctionMap->insert(HTMLTags::h3().localName().implementation(), (void*)&headingConstructor);
+ gFunctionMap->insert(HTMLTags::h4().localName().implementation(), (void*)&headingConstructor);
+ gFunctionMap->insert(HTMLTags::h5().localName().implementation(), (void*)&headingConstructor);
+ gFunctionMap->insert(HTMLTags::h6().localName().implementation(), (void*)&headingConstructor);
+ gFunctionMap->insert(HTMLTags::hr().localName().implementation(), (void*)&hrConstructor);
+ gFunctionMap->insert(HTMLTags::p().localName().implementation(), (void*)¶graphConstructor);
+ gFunctionMap->insert(HTMLTags::pre().localName().implementation(), (void*)&preConstructor);
+ gFunctionMap->insert(HTMLTags::xmp().localName().implementation(), (void*)&preConstructor);
+ gFunctionMap->insert(HTMLTags::basefont().localName().implementation(), (void*)&basefontConstructor);
+ gFunctionMap->insert(HTMLTags::font().localName().implementation(), (void*)&fontConstructor);
+ gFunctionMap->insert(HTMLTags::del().localName().implementation(), (void*)&modConstructor);
+ gFunctionMap->insert(HTMLTags::ins().localName().implementation(), (void*)&modConstructor);
+ gFunctionMap->insert(HTMLTags::a().localName().implementation(), (void*)&anchorConstructor);
+ gFunctionMap->insert(HTMLTags::img().localName().implementation(), (void*)&imageConstructor);
+ gFunctionMap->insert(HTMLTags::map().localName().implementation(), (void*)&mapConstructor);
+ gFunctionMap->insert(HTMLTags::area().localName().implementation(), (void*)&areaConstructor);
+ gFunctionMap->insert(HTMLTags::canvas().localName().implementation(), (void*)&canvasConstructor);
+ gFunctionMap->insert(HTMLTags::applet().localName().implementation(), (void*)&appletConstructor);
+ gFunctionMap->insert(HTMLTags::embed().localName().implementation(), (void*)&embedConstructor);
+ gFunctionMap->insert(HTMLTags::object().localName().implementation(), (void*)&objectConstructor);
+ gFunctionMap->insert(HTMLTags::param().localName().implementation(), (void*)¶mConstructor);
+ gFunctionMap->insert(HTMLTags::script().localName().implementation(), (void*)&scriptConstructor);
+ gFunctionMap->insert(HTMLTags::table().localName().implementation(), (void*)&tableConstructor);
+ gFunctionMap->insert(HTMLTags::caption().localName().implementation(), (void*)&tableCaptionConstructor);
+ gFunctionMap->insert(HTMLTags::colgroup().localName().implementation(), (void*)&tableColConstructor);
+ gFunctionMap->insert(HTMLTags::col().localName().implementation(), (void*)&tableColConstructor);
+ gFunctionMap->insert(HTMLTags::tr().localName().implementation(), (void*)&tableRowConstructor);
+ gFunctionMap->insert(HTMLTags::td().localName().implementation(), (void*)&tableCellConstructor);
+ gFunctionMap->insert(HTMLTags::th().localName().implementation(), (void*)&tableCellConstructor);
+ gFunctionMap->insert(HTMLTags::thead().localName().implementation(), (void*)&tableSectionConstructor);
+ gFunctionMap->insert(HTMLTags::tbody().localName().implementation(), (void*)&tableSectionConstructor);
+ gFunctionMap->insert(HTMLTags::tfoot().localName().implementation(), (void*)&tableSectionConstructor);
+ gFunctionMap->insert(HTMLTags::br().localName().implementation(), (void*)&brConstructor);
+ gFunctionMap->insert(HTMLTags::q().localName().implementation(), (void*)"eConstructor);
+ gFunctionMap->insert(HTMLTags::marquee().localName().implementation(), (void*)&marqueeConstructor);
}
void* result = gFunctionMap->get(tagName.implementation());
@@ -416,7 +416,7 @@
}
// elements with no special representation in the DOM
- return new HTMLElementImpl(QualifiedName(nullAtom, tagName, HTMLNames::xhtmlNamespaceURI()), docPtr);
+ return new HTMLElementImpl(QualifiedName(nullAtom, tagName, HTMLTags::xhtmlNamespaceURI()), docPtr);
}
1.5 +1 -1 WebCore/khtml/html/htmlnames.cpp
Index: htmlnames.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmlnames.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- htmlnames.cpp 18 Jul 2005 21:44:21 -0000 1.4
+++ htmlnames.cpp 18 Jul 2005 21:52:26 -0000 1.5
@@ -319,7 +319,7 @@
DEFINE_ATTR_GLOBAL(width)
DEFINE_ATTR_GLOBAL(wrap)
-void HTMLNames::init()
+void HTMLTags::init()
{
static bool initialized;
if (!initialized) {
1.5 +1 -1 WebCore/khtml/html/htmlnames.h
Index: htmlnames.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmlnames.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- htmlnames.h 18 Jul 2005 21:44:21 -0000 1.4
+++ htmlnames.h 18 Jul 2005 21:52:26 -0000 1.5
@@ -319,7 +319,7 @@
// FIXME: Make this a namespace instead of a class.
// FIXME: Rename this to HTMLTags
// FIXME: Just make the xhtmlNamespaceURI() a global outside of any class
-class HTMLNames
+class HTMLTags
{
public:
#if !KHTML_HTMLNAMES_HIDE_GLOBALS
1.99 +169 -169 WebCore/khtml/html/htmlparser.cpp
Index: htmlparser.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmlparser.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- htmlparser.cpp 18 Jul 2005 21:44:21 -0000 1.98
+++ htmlparser.cpp 18 Jul 2005 21:52:26 -0000 1.99
@@ -200,7 +200,7 @@
}
// Apparently some sites use </br> instead of <br>. Be compatible with IE and Firefox and treat this like <br>.
- if (t->isCloseTag(HTMLNames::br()) && doc()->inCompatMode())
+ if (t->isCloseTag(HTMLTags::br()) && doc()->inCompatMode())
t->beginTag = true;
if (!t->beginTag) {
@@ -210,8 +210,8 @@
// ignore spaces, if we're not inside a paragraph or other inline code
if (t->tagName == textAtom && t->text) {
- if (inBody && !skipMode() && current->localName() != HTMLNames::style() && current->localName() != HTMLNames::title() &&
- current->localName() != HTMLNames::script() && !t->text->containsOnlyWhitespace())
+ if (inBody && !skipMode() && current->localName() != HTMLTags::style() && current->localName() != HTMLTags::title() &&
+ current->localName() != HTMLTags::script() && !t->text->containsOnlyWhitespace())
haveContent = true;
}
@@ -253,18 +253,18 @@
static bool isTableSection(NodeImpl* n)
{
- return n->hasTagName(HTMLNames::tbody()) || n->hasTagName(HTMLNames::tfoot()) || n->hasTagName(HTMLNames::thead());
+ return n->hasTagName(HTMLTags::tbody()) || n->hasTagName(HTMLTags::tfoot()) || n->hasTagName(HTMLTags::thead());
}
static bool isTablePart(NodeImpl* n)
{
- return n->hasTagName(HTMLNames::tr()) || n->hasTagName(HTMLNames::td()) || n->hasTagName(HTMLNames::th()) ||
+ return n->hasTagName(HTMLTags::tr()) || n->hasTagName(HTMLTags::td()) || n->hasTagName(HTMLTags::th()) ||
isTableSection(n);
}
static bool isTableRelated(NodeImpl* n)
{
- return n->hasTagName(HTMLNames::table()) || isTablePart(n);
+ return n->hasTagName(HTMLTags::table()) || isTablePart(n);
}
bool HTMLParser::insertNode(NodeImpl *n, bool flat)
@@ -313,22 +313,22 @@
// 1. Check out the element's tag name to decide how to deal with errors.
if (n->isTextNode()) {
- if (current->hasTagName(HTMLNames::select()))
+ if (current->hasTagName(HTMLTags::select()))
return false;
} else if (n->isHTMLElement()) {
HTMLElementImpl* h = static_cast<HTMLElementImpl*>(n);
- if (h->hasLocalName(HTMLNames::tr()) || h->hasLocalName(HTMLNames::th()) ||
- h->hasLocalName(HTMLNames::td())) {
+ if (h->hasLocalName(HTMLTags::tr()) || h->hasLocalName(HTMLTags::th()) ||
+ h->hasLocalName(HTMLTags::td())) {
if (inStrayTableContent && !isTableRelated(current)) {
// pop out to the nearest enclosing table-related tag.
while (blockStack && !isTableRelated(current))
popOneBlock();
return insertNode(n);
}
- } else if (h->hasLocalName(HTMLNames::head())) {
- if (!current->isDocumentNode() && !current->hasTagName(HTMLNames::html()))
+ } else if (h->hasLocalName(HTMLTags::head())) {
+ if (!current->isDocumentNode() && !current->hasTagName(HTMLTags::html()))
return false;
- } else if (h->hasLocalName(HTMLNames::meta()) || h->hasLocalName(HTMLNames::link()) || h->hasLocalName(HTMLNames::base())) {
+ } else if (h->hasLocalName(HTMLTags::meta()) || h->hasLocalName(HTMLTags::link()) || h->hasLocalName(HTMLTags::base())) {
if (!head)
createHead();
if (head) {
@@ -339,9 +339,9 @@
} else
return false;
}
- } else if (h->hasLocalName(HTMLNames::html())) {
+ } else if (h->hasLocalName(HTMLTags::html())) {
if (!current->isDocumentNode() ) {
- if (doc()->firstChild()->hasTagName(HTMLNames::html())) {
+ if (doc()->firstChild()->hasTagName(HTMLTags::html())) {
// we have another <HTML> element.... apply attributes to existing one
// make sure we don't overwrite already existing attributes
NamedAttrMapImpl *map = static_cast<ElementImpl*>(n)->attributes(true);
@@ -357,7 +357,7 @@
}
return false;
}
- } else if (h->hasLocalName(HTMLNames::title()) || h->hasLocalName(HTMLNames::style())) {
+ } else if (h->hasLocalName(HTMLTags::title()) || h->hasLocalName(HTMLTags::style())) {
if (!head)
createHead();
if (head) {
@@ -368,15 +368,15 @@
if (!n->attached() && HTMLWidget)
n->attach();
} else {
- setSkipMode(HTMLNames::style());
+ setSkipMode(HTMLTags::style());
return false;
}
return true;
} else if(inBody) {
- setSkipMode(HTMLNames::style());
+ setSkipMode(HTMLTags::style());
return false;
}
- } else if (h->hasLocalName(HTMLNames::body())) {
+ } else if (h->hasLocalName(HTMLTags::body())) {
if (inBody && doc()->body()) {
// we have another <BODY> element.... apply attributes to existing one
// make sure we don't overwrite already existing attributes
@@ -395,7 +395,7 @@
}
else if (!current->isDocumentNode())
return false;
- } else if (h->hasLocalName(HTMLNames::input())) {
+ } else if (h->hasLocalName(HTMLTags::input())) {
DOMString type = h->getAttribute(HTMLAttributes::type());
if (strcasecmp(type, "hidden") == 0 && form) {
form->addChild(n);
@@ -403,13 +403,13 @@
n->attach();
return true;
}
- } else if (h->hasLocalName(HTMLNames::dd()) || h->hasLocalName(HTMLNames::dt())) {
+ } else if (h->hasLocalName(HTMLTags::dd()) || h->hasLocalName(HTMLTags::dt())) {
e = new HTMLDListElementImpl(document);
if (insertNode(e)) {
insertNode(n);
return true;
}
- } else if (h->hasLocalName(HTMLNames::area())) {
+ } else if (h->hasLocalName(HTMLTags::area())) {
if (map) {
map->addChild(n);
if (!n->attached() && HTMLWidget)
@@ -419,12 +419,12 @@
else
return false;
return true;
- } else if (h->hasLocalName(HTMLNames::caption())) {
+ } else if (h->hasLocalName(HTMLTags::caption())) {
if (isTablePart(current)) {
NodeImpl* tsection = current;
- if (current->hasTagName(HTMLNames::tr()))
+ if (current->hasTagName(HTMLTags::tr()))
tsection = current->parent();
- else if (current->hasTagName(HTMLNames::td()) || current->hasTagName(HTMLNames::th()))
+ else if (current->hasTagName(HTMLTags::td()) || current->hasTagName(HTMLTags::th()))
tsection = current->parent()->parent();
NodeImpl* table = tsection->parent();
int exceptioncode = 0;
@@ -435,8 +435,8 @@
blockStack->strayTableContent = true;
return true;
}
- } else if (h->hasLocalName(HTMLNames::thead()) || h->hasLocalName(HTMLNames::tbody()) ||
- h->hasLocalName(HTMLNames::tfoot()) || h->hasLocalName(HTMLNames::colgroup())) {
+ } else if (h->hasLocalName(HTMLTags::thead()) || h->hasLocalName(HTMLTags::tbody()) ||
+ h->hasLocalName(HTMLTags::tfoot()) || h->hasLocalName(HTMLTags::colgroup())) {
if (isTableRelated(current)) {
while (blockStack && isTablePart(current))
popOneBlock();
@@ -449,13 +449,13 @@
if (current->isHTMLElement()) {
HTMLElementImpl* h = static_cast<HTMLElementImpl*>(current);
const AtomicString& currentTagName = current->localName();
- if (h->hasLocalName(HTMLNames::html())) {
+ if (h->hasLocalName(HTMLTags::html())) {
HTMLElementImpl* elt = n->isHTMLElement() ? static_cast<HTMLElementImpl*>(n) : 0;
- if (elt && (elt->hasLocalName(HTMLNames::script()) || elt->hasLocalName(HTMLNames::style()) ||
- elt->hasLocalName(HTMLNames::meta()) || elt->hasLocalName(HTMLNames::link()) ||
- elt->hasLocalName(HTMLNames::object()) || elt->hasLocalName(HTMLNames::embed()) ||
- elt->hasLocalName(HTMLNames::title()) || elt->hasLocalName(HTMLNames::isindex()) ||
- elt->hasLocalName(HTMLNames::base()))) {
+ if (elt && (elt->hasLocalName(HTMLTags::script()) || elt->hasLocalName(HTMLTags::style()) ||
+ elt->hasLocalName(HTMLTags::meta()) || elt->hasLocalName(HTMLTags::link()) ||
+ elt->hasLocalName(HTMLTags::object()) || elt->hasLocalName(HTMLTags::embed()) ||
+ elt->hasLocalName(HTMLTags::title()) || elt->hasLocalName(HTMLTags::isindex()) ||
+ elt->hasLocalName(HTMLTags::base()))) {
if (!head) {
head = new HTMLHeadElementImpl(document);
e = head;
@@ -475,8 +475,8 @@
handled = true;
}
}
- } else if (h->hasLocalName(HTMLNames::head())) {
- if (n->hasTagName(HTMLNames::html()))
+ } else if (h->hasLocalName(HTMLTags::head())) {
+ if (n->hasTagName(HTMLTags::html()))
return false;
else {
// This means the body starts here...
@@ -488,13 +488,13 @@
handled = true;
}
}
- } else if (h->hasLocalName(HTMLNames::caption())) {
+ } else if (h->hasLocalName(HTMLTags::caption())) {
// Illegal content in a caption. Close the caption and try again.
popBlock(currentTagName);
if (isTablePart(n))
return insertNode(n, flat);
- } else if (h->hasLocalName(HTMLNames::table()) || h->hasLocalName(HTMLNames::tr()) || isTableSection(h)) {
- if (n->hasTagName(HTMLNames::table())) {
+ } else if (h->hasLocalName(HTMLTags::table()) || h->hasLocalName(HTMLTags::tr()) || isTableSection(h)) {
+ if (n->hasTagName(HTMLTags::table())) {
popBlock(localName); // end the table
handled = true; // ...and start a new one
} else {
@@ -517,13 +517,13 @@
NodeImpl *grandparent = parent->parentNode();
if (n->isTextNode() ||
- (h->hasLocalName(HTMLNames::tr()) &&
- isTableSection(parent) && grandparent->hasTagName(HTMLNames::table())) ||
- ((!n->hasTagName(HTMLNames::td()) && !n->hasTagName(HTMLNames::th()) &&
- !n->hasTagName(HTMLNames::form()) && !n->hasTagName(HTMLNames::script())) && isTableSection(node) &&
- parent->hasTagName(HTMLNames::table()))) {
- node = (node->hasTagName(HTMLNames::table())) ? node :
- ((node->hasTagName(HTMLNames::tr())) ? grandparent : parent);
+ (h->hasLocalName(HTMLTags::tr()) &&
+ isTableSection(parent) && grandparent->hasTagName(HTMLTags::table())) ||
+ ((!n->hasTagName(HTMLTags::td()) && !n->hasTagName(HTMLTags::th()) &&
+ !n->hasTagName(HTMLTags::form()) && !n->hasTagName(HTMLTags::script())) && isTableSection(node) &&
+ parent->hasTagName(HTMLTags::table()))) {
+ node = (node->hasTagName(HTMLTags::table())) ? node :
+ ((node->hasTagName(HTMLTags::tr())) ? grandparent : parent);
NodeImpl *parent = node->parentNode();
parent->insertBefore(n, node, exceptionCode);
if (!exceptionCode) {
@@ -540,10 +540,10 @@
}
if (!exceptionCode) {
- if (current->hasTagName(HTMLNames::tr()))
- e = new HTMLTableCellElementImpl(HTMLNames::td(), document);
- else if (current->hasTagName(HTMLNames::table()))
- e = new HTMLTableSectionElementImpl(HTMLNames::tbody(), document, true); // implicit
+ if (current->hasTagName(HTMLTags::tr()))
+ e = new HTMLTableCellElementImpl(HTMLTags::td(), document);
+ else if (current->hasTagName(HTMLTags::table()))
+ e = new HTMLTableSectionElementImpl(HTMLTags::tbody(), document, true); // implicit
else
e = new HTMLTableRowElementImpl(document);
@@ -553,46 +553,46 @@
}
}
}
- else if (h->hasLocalName(HTMLNames::object())) {
- setSkipMode(HTMLNames::object());
+ else if (h->hasLocalName(HTMLTags::object())) {
+ setSkipMode(HTMLTags::object());
return false;
- } else if (h->hasLocalName(HTMLNames::ul()) || h->hasLocalName(HTMLNames::ol()) ||
- h->hasLocalName(HTMLNames::dir()) || h->hasLocalName(HTMLNames::menu())) {
+ } else if (h->hasLocalName(HTMLTags::ul()) || h->hasLocalName(HTMLTags::ol()) ||
+ h->hasLocalName(HTMLTags::dir()) || h->hasLocalName(HTMLTags::menu())) {
e = new HTMLDivElementImpl(document);
insertNode(e);
handled = true;
- } else if (h->hasLocalName(HTMLNames::dl()) || h->hasLocalName(HTMLNames::dt())) {
+ } else if (h->hasLocalName(HTMLTags::dl()) || h->hasLocalName(HTMLTags::dt())) {
popBlock(currentTagName);
handled = true;
- } else if (h->hasLocalName(HTMLNames::select())) {
+ } else if (h->hasLocalName(HTMLTags::select())) {
if (isInline(n))
return false;
- } else if (h->hasLocalName(HTMLNames::p()) || isHeaderTag(currentTagName)) {
+ } else if (h->hasLocalName(HTMLTags::p()) || isHeaderTag(currentTagName)) {
if (!isInline(n)) {
popBlock(currentTagName);
handled = true;
}
- } else if (h->hasLocalName(HTMLNames::option()) || h->hasLocalName(HTMLNames::optgroup())) {
- if (localName == HTMLNames::optgroup()) {
+ } else if (h->hasLocalName(HTMLTags::option()) || h->hasLocalName(HTMLTags::optgroup())) {
+ if (localName == HTMLTags::optgroup()) {
popBlock(currentTagName);
handled = true;
}
- else if (localName == HTMLNames::select()) {
+ else if (localName == HTMLTags::select()) {
// IE treats a nested select as </select>. Let's do the same
popBlock(localName);
}
- } else if (h->hasLocalName(HTMLNames::address())) {
+ } else if (h->hasLocalName(HTMLTags::address())) {
popBlock(currentTagName);
handled = true;
- } else if (h->hasLocalName(HTMLNames::colgroup())) {
+ } else if (h->hasLocalName(HTMLTags::colgroup())) {
if (!n->isTextNode()) {
popBlock(currentTagName);
handled = true;
}
- } else if (h->hasLocalName(HTMLNames::font())) {
+ } else if (h->hasLocalName(HTMLTags::font())) {
popBlock(currentTagName);
handled = true;
- } else if (!h->hasLocalName(HTMLNames::body())) {
+ } else if (!h->hasLocalName(HTMLTags::body())) {
if (isInline(current)) {
popInlineBlocks();
handled = true;
@@ -631,7 +631,7 @@
bool HTMLParser::headCreateErrorCheck(Token* t, NodeImpl*& result)
{
- return (!head || current->localName() == HTMLNames::html());
+ return (!head || current->localName() == HTMLTags::html());
}
bool HTMLParser::bodyCreateErrorCheck(Token* t, NodeImpl*& result)
@@ -639,16 +639,16 @@
// body no longer allowed if we have a frameset
if (haveFrameSet)
return false;
- popBlock(HTMLNames::head());
+ popBlock(HTMLTags::head());
startBody();
return true;
}
bool HTMLParser::framesetCreateErrorCheck(Token* t, NodeImpl*& result)
{
- popBlock(HTMLNames::head());
+ popBlock(HTMLTags::head());
if (inBody && !haveFrameSet && !haveContent) {
- popBlock(HTMLNames::body());
+ popBlock(HTMLTags::body());
// ### actually for IE document.body returns the now hidden "body" element
// we can't implement that behaviour now because it could cause too many
// regressions and the headaches are not worth the work as long as there is
@@ -657,7 +657,7 @@
doc()->body()->setAttribute(HTMLAttributes::style(), "display:none");
inBody = false;
}
- if ((haveContent || haveFrameSet) && current->localName() == HTMLNames::html())
+ if ((haveContent || haveFrameSet) && current->localName() == HTMLTags::html())
return false;
haveFrameSet = true;
startBody();
@@ -667,7 +667,7 @@
bool HTMLParser::iframeCreateErrorCheck(Token* t, NodeImpl*& result)
{
// a bit of a special case, since the frame is inlined
- setSkipMode(HTMLNames::iframe());
+ setSkipMode(HTMLTags::iframe());
return true;
}
@@ -701,15 +701,15 @@
bool HTMLParser::ddCreateErrorCheck(Token* t, NodeImpl*& result)
{
- popBlock(HTMLNames::dt());
- popBlock(HTMLNames::dd());
+ popBlock(HTMLTags::dt());
+ popBlock(HTMLTags::dd());
return true;
}
bool HTMLParser::dtCreateErrorCheck(Token* t, NodeImpl*& result)
{
- popBlock(HTMLNames::dd());
- popBlock(HTMLNames::dt());
+ popBlock(HTMLTags::dd());
+ popBlock(HTMLTags::dt());
return true;
}
@@ -726,35 +726,35 @@
bool HTMLParser::tableCellCreateErrorCheck(Token* t, NodeImpl*& result)
{
- popBlock(HTMLNames::td());
- popBlock(HTMLNames::th());
+ popBlock(HTMLTags::td());
+ popBlock(HTMLTags::th());
return true;
}
bool HTMLParser::tableSectionCreateErrorCheck(Token* t, NodeImpl*& result)
{
- popBlock(HTMLNames::thead());
- popBlock(HTMLNames::tbody());
- popBlock(HTMLNames::tfoot());
+ popBlock(HTMLTags::thead());
+ popBlock(HTMLTags::tbody());
+ popBlock(HTMLTags::tfoot());
return true;
}
bool HTMLParser::noembedCreateErrorCheck(Token* t, NodeImpl*& result)
{
- setSkipMode(HTMLNames::noembed());
+ setSkipMode(HTMLTags::noembed());
return false;
}
bool HTMLParser::noframesCreateErrorCheck(Token* t, NodeImpl*& result)
{
- setSkipMode(HTMLNames::noframes());
+ setSkipMode(HTMLTags::noframes());
return false;
}
bool HTMLParser::noscriptCreateErrorCheck(Token* t, NodeImpl*& result)
{
if (HTMLWidget && HTMLWidget->part()->jScriptEnabled())
- setSkipMode(HTMLNames::noscript());
+ setSkipMode(HTMLTags::noscript());
return false;
}
@@ -770,37 +770,37 @@
if (gFunctionMap.isEmpty()) {
gFunctionMap.insert(textAtom.implementation(), &HTMLParser::textCreateErrorCheck);
gFunctionMap.insert(commentAtom.implementation(), &HTMLParser::commentCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::head().localName().implementation(), &HTMLParser::headCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::body().localName().implementation(), &HTMLParser::bodyCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::frameset().localName().implementation(), &HTMLParser::framesetCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::iframe().localName().implementation(), &HTMLParser::iframeCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::form().localName().implementation(), &HTMLParser::formCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::isindex().localName().implementation(), &HTMLParser::isindexCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::select().localName().implementation(), &HTMLParser::selectCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::dd().localName().implementation(), &HTMLParser::ddCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::dt().localName().implementation(), &HTMLParser::dtCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::li().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::a().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::nobr().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::wbr().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::tr().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::td().localName().implementation(), &HTMLParser::tableCellCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::th().localName().implementation(), &HTMLParser::tableCellCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::tbody().localName().implementation(), &HTMLParser::tableSectionCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::thead().localName().implementation(), &HTMLParser::tableSectionCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::tfoot().localName().implementation(), &HTMLParser::tableSectionCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::tt().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::u().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::b().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::i().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::s().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::strike().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::big().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::small().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::noembed().localName().implementation(), &HTMLParser::noembedCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::noframes().localName().implementation(), &HTMLParser::noframesCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::noscript().localName().implementation(), &HTMLParser::noscriptCreateErrorCheck);
- gFunctionMap.insert(HTMLNames::nolayer().localName().implementation(), &HTMLParser::nolayerCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::head().localName().implementation(), &HTMLParser::headCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::body().localName().implementation(), &HTMLParser::bodyCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::frameset().localName().implementation(), &HTMLParser::framesetCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::iframe().localName().implementation(), &HTMLParser::iframeCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::form().localName().implementation(), &HTMLParser::formCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::isindex().localName().implementation(), &HTMLParser::isindexCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::select().localName().implementation(), &HTMLParser::selectCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::dd().localName().implementation(), &HTMLParser::ddCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::dt().localName().implementation(), &HTMLParser::dtCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::li().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::a().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::nobr().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::wbr().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::tr().localName().implementation(), &HTMLParser::nestedCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::td().localName().implementation(), &HTMLParser::tableCellCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::th().localName().implementation(), &HTMLParser::tableCellCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::tbody().localName().implementation(), &HTMLParser::tableSectionCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::thead().localName().implementation(), &HTMLParser::tableSectionCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::tfoot().localName().implementation(), &HTMLParser::tableSectionCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::tt().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::u().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::b().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::i().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::s().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::strike().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::big().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::small().localName().implementation(), &HTMLParser::nestedStyleCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::noembed().localName().implementation(), &HTMLParser::noembedCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::noframes().localName().implementation(), &HTMLParser::noframesCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::noscript().localName().implementation(), &HTMLParser::noscriptCreateErrorCheck);
+ gFunctionMap.insert(HTMLTags::nolayer().localName().implementation(), &HTMLParser::nolayerCreateErrorCheck);
}
bool proceed = true;
@@ -811,7 +811,7 @@
if (proceed) {
result = HTMLElementFactory::createHTMLElement(t->tagName, doc(), form);
- if (t->tagName == HTMLNames::form())
+ if (t->tagName == HTMLTags::form())
form = static_cast<HTMLFormElementImpl*>(result);
}
return result;
@@ -836,19 +836,19 @@
// Support for really broken html.
// we never close the body tag, since some stupid web pages close it before the actual end of the doc.
// let's rely on the end() call to close things.
- if (t->tagName == HTMLNames::html() || t->tagName == HTMLNames::body())
+ if (t->tagName == HTMLTags::html() || t->tagName == HTMLTags::body())
return;
- if (t->tagName == HTMLNames::form())
+ if (t->tagName == HTMLTags::form())
form = 0;
- else if (t->tagName == HTMLNames::map())
+ else if (t->tagName == HTMLTags::map())
map = 0;
- else if (t->tagName == HTMLNames::select())
+ else if (t->tagName == HTMLTags::select())
inSelect = false;
HTMLStackElem* oldElem = blockStack;
popBlock(t->tagName);
- if (oldElem == blockStack && t->tagName == HTMLNames::p()) {
+ if (oldElem == blockStack && t->tagName == HTMLTags::p()) {
// We encountered a stray </p>. Amazingly Gecko, WinIE, and MacIE all treat
// this as a valid break, i.e., <p></p>. So go ahead and make the empty
// paragraph.
@@ -865,12 +865,12 @@
{
static HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > headerTags;
if (headerTags.isEmpty()) {
- headerTags.insert(HTMLNames::h1().localName().implementation());
- headerTags.insert(HTMLNames::h2().localName().implementation());
- headerTags.insert(HTMLNames::h3().localName().implementation());
- headerTags.insert(HTMLNames::h4().localName().implementation());
- headerTags.insert(HTMLNames::h5().localName().implementation());
- headerTags.insert(HTMLNames::h6().localName().implementation());
+ headerTags.insert(HTMLTags::h1().localName().implementation());
+ headerTags.insert(HTMLTags::h2().localName().implementation());
+ headerTags.insert(HTMLTags::h3().localName().implementation());
+ headerTags.insert(HTMLTags::h4().localName().implementation());
+ headerTags.insert(HTMLTags::h5().localName().implementation());
+ headerTags.insert(HTMLTags::h6().localName().implementation());
}
return headerTags.contains(tagName.implementation());
@@ -898,15 +898,15 @@
if (node->isHTMLElement()) {
HTMLElementImpl* e = static_cast<HTMLElementImpl*>(node);
- if (e->hasLocalName(HTMLNames::a()) || e->hasLocalName(HTMLNames::font()) || e->hasLocalName(HTMLNames::tt()) ||
- e->hasLocalName(HTMLNames::u()) || e->hasLocalName(HTMLNames::b()) || e->hasLocalName(HTMLNames::i()) ||
- e->hasLocalName(HTMLNames::s()) || e->hasLocalName(HTMLNames::strike()) || e->hasLocalName(HTMLNames::big()) ||
- e->hasLocalName(HTMLNames::small()) || e->hasLocalName(HTMLNames::em()) || e->hasLocalName(HTMLNames::strong()) ||
- e->hasLocalName(HTMLNames::dfn()) || e->hasLocalName(HTMLNames::code()) || e->hasLocalName(HTMLNames::samp()) ||
- e->hasLocalName(HTMLNames::kbd()) || e->hasLocalName(HTMLNames::var()) || e->hasLocalName(HTMLNames::cite()) ||
- e->hasLocalName(HTMLNames::abbr()) || e->hasLocalName(HTMLNames::acronym()) || e->hasLocalName(HTMLNames::sub()) ||
- e->hasLocalName(HTMLNames::sup()) || e->hasLocalName(HTMLNames::span()) || e->hasLocalName(HTMLNames::nobr()) ||
- e->hasLocalName(HTMLNames::wbr()))
+ if (e->hasLocalName(HTMLTags::a()) || e->hasLocalName(HTMLTags::font()) || e->hasLocalName(HTMLTags::tt()) ||
+ e->hasLocalName(HTMLTags::u()) || e->hasLocalName(HTMLTags::b()) || e->hasLocalName(HTMLTags::i()) ||
+ e->hasLocalName(HTMLTags::s()) || e->hasLocalName(HTMLTags::strike()) || e->hasLocalName(HTMLTags::big()) ||
+ e->hasLocalName(HTMLTags::small()) || e->hasLocalName(HTMLTags::em()) || e->hasLocalName(HTMLTags::strong()) ||
+ e->hasLocalName(HTMLTags::dfn()) || e->hasLocalName(HTMLTags::code()) || e->hasLocalName(HTMLTags::samp()) ||
+ e->hasLocalName(HTMLTags::kbd()) || e->hasLocalName(HTMLTags::var()) || e->hasLocalName(HTMLTags::cite()) ||
+ e->hasLocalName(HTMLTags::abbr()) || e->hasLocalName(HTMLTags::acronym()) || e->hasLocalName(HTMLTags::sub()) ||
+ e->hasLocalName(HTMLTags::sup()) || e->hasLocalName(HTMLTags::span()) || e->hasLocalName(HTMLTags::nobr()) ||
+ e->hasLocalName(HTMLTags::wbr()))
return true;
}
@@ -917,23 +917,23 @@
{
static HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > residualStyleTags;
if (residualStyleTags.isEmpty()) {
- residualStyleTags.insert(HTMLNames::a().localName().implementation());
- residualStyleTags.insert(HTMLNames::font().localName().implementation());
- residualStyleTags.insert(HTMLNames::tt().localName().implementation());
- residualStyleTags.insert(HTMLNames::u().localName().implementation());
- residualStyleTags.insert(HTMLNames::b().localName().implementation());
- residualStyleTags.insert(HTMLNames::i().localName().implementation());
- residualStyleTags.insert(HTMLNames::s().localName().implementation());
- residualStyleTags.insert(HTMLNames::strike().localName().implementation());
- residualStyleTags.insert(HTMLNames::big().localName().implementation());
- residualStyleTags.insert(HTMLNames::small().localName().implementation());
- residualStyleTags.insert(HTMLNames::em().localName().implementation());
- residualStyleTags.insert(HTMLNames::strong().localName().implementation());
- residualStyleTags.insert(HTMLNames::dfn().localName().implementation());
- residualStyleTags.insert(HTMLNames::code().localName().implementation());
- residualStyleTags.insert(HTMLNames::samp().localName().implementation());
- residualStyleTags.insert(HTMLNames::kbd().localName().implementation());
- residualStyleTags.insert(HTMLNames::var().localName().implementation());
+ residualStyleTags.insert(HTMLTags::a().localName().implementation());
+ residualStyleTags.insert(HTMLTags::font().localName().implementation());
+ residualStyleTags.insert(HTMLTags::tt().localName().implementation());
+ residualStyleTags.insert(HTMLTags::u().localName().implementation());
+ residualStyleTags.insert(HTMLTags::b().localName().implementation());
+ residualStyleTags.insert(HTMLTags::i().localName().implementation());
+ residualStyleTags.insert(HTMLTags::s().localName().implementation());
+ residualStyleTags.insert(HTMLTags::strike().localName().implementation());
+ residualStyleTags.insert(HTMLTags::big().localName().implementation());
+ residualStyleTags.insert(HTMLTags::small().localName().implementation());
+ residualStyleTags.insert(HTMLTags::em().localName().implementation());
+ residualStyleTags.insert(HTMLTags::strong().localName().implementation());
+ residualStyleTags.insert(HTMLTags::dfn().localName().implementation());
+ residualStyleTags.insert(HTMLTags::code().localName().implementation());
+ residualStyleTags.insert(HTMLTags::samp().localName().implementation());
+ residualStyleTags.insert(HTMLTags::kbd().localName().implementation());
+ residualStyleTags.insert(HTMLTags::var().localName().implementation());
}
return residualStyleTags.contains(tagName.implementation());
@@ -946,24 +946,24 @@
static HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > affectedBlockTags;
if (affectedBlockTags.isEmpty()) {
- affectedBlockTags.insert(HTMLNames::h1().localName().implementation());
- affectedBlockTags.insert(HTMLNames::h2().localName().implementation());
- affectedBlockTags.insert(HTMLNames::h3().localName().implementation());
- affectedBlockTags.insert(HTMLNames::h4().localName().implementation());
- affectedBlockTags.insert(HTMLNames::h5().localName().implementation());
- affectedBlockTags.insert(HTMLNames::h6().localName().implementation());
- affectedBlockTags.insert(HTMLNames::p().localName().implementation());
- affectedBlockTags.insert(HTMLNames::div().localName().implementation());
- affectedBlockTags.insert(HTMLNames::blockquote().localName().implementation());
- affectedBlockTags.insert(HTMLNames::address().localName().implementation());
- affectedBlockTags.insert(HTMLNames::center().localName().implementation());
- affectedBlockTags.insert(HTMLNames::ul().localName().implementation());
- affectedBlockTags.insert(HTMLNames::ol().localName().implementation());
- affectedBlockTags.insert(HTMLNames::li().localName().implementation());
- affectedBlockTags.insert(HTMLNames::dl().localName().implementation());
- affectedBlockTags.insert(HTMLNames::dt().localName().implementation());
- affectedBlockTags.insert(HTMLNames::dd().localName().implementation());
- affectedBlockTags.insert(HTMLNames::pre().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::h1().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::h2().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::h3().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::h4().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::h5().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::h6().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::p().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::div().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::blockquote().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::address().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::center().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::ul().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::ol().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::li().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::dl().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::dt().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::dd().localName().implementation());
+ affectedBlockTags.insert(HTMLTags::pre().localName().implementation());
}
return affectedBlockTags.contains(tagName.implementation());
@@ -1219,13 +1219,13 @@
// must also know that it is the root of malformed content inside a <tbody>/<tr>.
if (strayTable && (inStrayTableContent < strayTable) && residualStyleStack) {
NodeImpl* curr = current;
- while (curr && !curr->hasTagName(HTMLNames::table()))
+ while (curr && !curr->hasTagName(HTMLTags::table()))
curr = curr->parentNode();
malformedTableParent = curr ? curr->parentNode() : 0;
}
}
else {
- if (form && Elem->tagName == HTMLNames::form())
+ if (form && Elem->tagName == HTMLTags::form())
// A <form> is being closed prematurely (and this is
// malformed HTML). Set an attribute on the form to clear out its
// bottom margin.
1.99 +15 -15 WebCore/khtml/html/htmltokenizer.cpp
Index: htmltokenizer.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmltokenizer.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- htmltokenizer.cpp 18 Jul 2005 21:44:21 -0000 1.98
+++ htmltokenizer.cpp 18 Jul 2005 21:52:27 -0000 1.99
@@ -65,7 +65,7 @@
using DOM::nullAtom;
using DOM::textAtom;
using DOM::HTMLAttributes;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::QualifiedName;
using DOM::MappedAttributeImpl;
using DOM::NamedMappedAttrMapImpl;
@@ -470,10 +470,10 @@
else {
processListing(TokenizerString(scriptCode, scriptCodeSize));
processToken();
- if ( style ) { currToken.tagName = HTMLNames::style().localName(); currToken.beginTag = false; }
- else if ( textarea ) { currToken.tagName = HTMLNames::textarea().localName(); currToken.beginTag = false; }
- else if ( title ) { currToken.tagName = HTMLNames::title().localName(); currToken.beginTag = false; }
- else if ( xmp ) { currToken.tagName = HTMLNames::xmp().localName(); currToken.beginTag = false; }
+ if ( style ) { currToken.tagName = HTMLTags::style().localName(); currToken.beginTag = false; }
+ else if ( textarea ) { currToken.tagName = HTMLTags::textarea().localName(); currToken.beginTag = false; }
+ else if ( title ) { currToken.tagName = HTMLTags::title().localName(); currToken.beginTag = false; }
+ else if ( xmp ) { currToken.tagName = HTMLTags::xmp().localName(); currToken.beginTag = false; }
processToken();
style = script = style = textarea = title = xmp = false;
tquote = NoQuote;
@@ -543,7 +543,7 @@
processListing(TokenizerString(scriptCode, scriptCodeSize));
QString exScript( buffer, dest-buffer );
processToken();
- currToken.tagName = HTMLNames::script().localName();
+ currToken.tagName = HTMLTags::script().localName();
currToken.beginTag = false;
processToken();
@@ -1325,7 +1325,7 @@
kdDebug( 6036 ) << "appending Tag: " << tagID << endl;
#endif
bool beginTag = !currToken.flat && currToken.beginTag;
- if (beginTag && currToken.tagName == HTMLNames::script()) {
+ if (beginTag && currToken.tagName == HTMLTags::script()) {
AttributeImpl* a = 0;
bool foundTypeAttribute = false;
scriptSrc = QString::null;
@@ -1400,48 +1400,48 @@
processToken();
- if (tagName == HTMLNames::pre()) {
+ if (tagName == HTMLTags::pre()) {
prePos = 0;
pre = beginTag;
discard = LFDiscard; // Discard the first LF after we open a pre.
- } else if (tagName == HTMLNames::script()) {
+ } else if (tagName == HTMLTags::script()) {
if (beginTag) {
searchStopper = scriptEnd;
searchStopperLen = 8;
script = true;
parseSpecial(src);
}
- } else if (tagName == HTMLNames::style()) {
+ } else if (tagName == HTMLTags::style()) {
if (beginTag) {
searchStopper = styleEnd;
searchStopperLen = 7;
style = true;
parseSpecial(src);
}
- } else if (tagName == HTMLNames::textarea()) {
+ } else if (tagName == HTMLTags::textarea()) {
if(beginTag) {
searchStopper = textareaEnd;
searchStopperLen = 10;
textarea = true;
parseSpecial(src);
}
- } else if (tagName == HTMLNames::title()) {
+ } else if (tagName == HTMLTags::title()) {
if (beginTag) {
searchStopper = titleEnd;
searchStopperLen = 7;
title = true;
parseSpecial(src);
}
- } else if (tagName == HTMLNames::xmp()) {
+ } else if (tagName == HTMLTags::xmp()) {
if (beginTag) {
searchStopper = xmpEnd;
searchStopperLen = 5;
xmp = true;
parseSpecial(src);
}
- } else if (tagName == HTMLNames::select())
+ } else if (tagName == HTMLTags::select())
select = beginTag;
- else if (tagName == HTMLNames::plaintext())
+ else if (tagName == HTMLTags::plaintext())
plaintext = beginTag;
return; // Finished parsing tag!
}
1.38 +7 -7 WebCore/khtml/misc/decoder.cpp
Index: decoder.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/misc/decoder.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- decoder.cpp 18 Jul 2005 21:44:25 -0000 1.37
+++ decoder.cpp 18 Jul 2005 21:52:30 -0000 1.38
@@ -42,7 +42,7 @@
#include "htmlnames.h"
using DOM::AtomicString;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::nullAtom;
class KanjiCode
@@ -531,7 +531,7 @@
}
tmp[len] = 0;
AtomicString tag(tmp);
- if (!end && tag == HTMLNames::meta()) {
+ if (!end && tag == HTMLTags::meta()) {
// found a meta tag...
//ptr += 5;
const char * end = ptr;
@@ -570,11 +570,11 @@
pos = endpos + 1;
}
- } else if (tag != HTMLNames::script() && tag != HTMLNames::noscript() && tag != HTMLNames::style() &&
- tag != HTMLNames::link() && tag != HTMLNames::meta() && tag != HTMLNames::object() &&
- tag != HTMLNames::title() && tag != HTMLNames::base() &&
- (end || tag != HTMLNames::html()) &&
- (end || tag != HTMLNames::head()) && isalpha(tmp[0])) {
+ } else if (tag != HTMLTags::script() && tag != HTMLTags::noscript() && tag != HTMLTags::style() &&
+ tag != HTMLTags::link() && tag != HTMLTags::meta() && tag != HTMLTags::object() &&
+ tag != HTMLTags::title() && tag != HTMLTags::base() &&
+ (end || tag != HTMLTags::html()) &&
+ (end || tag != HTMLTags::head()) && isalpha(tmp[0])) {
body = true;
#ifdef DECODE_DEBUG
kdDebug( 6005 ) << "Decoder: no charset found. Id=" << id << endl;
1.32 +1 -1 WebCore/khtml/rendering/render_applet.cpp
Index: render_applet.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_applet.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- render_applet.cpp 9 Jul 2005 20:19:17 -0000 1.31
+++ render_applet.cpp 18 Jul 2005 21:52:31 -0000 1.32
@@ -102,7 +102,7 @@
m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom();
NodeImpl *child = element()->firstChild();
while (child) {
- if (child->hasTagName(HTMLNames::param())) {
+ if (child->hasTagName(HTMLTags::param())) {
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>(child);
m_args.insert(p->name().string(), p->value().string());
}
1.188 +1 -1 WebCore/khtml/rendering/render_block.cpp
Index: render_block.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_block.cpp,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -r1.187 -r1.188
--- render_block.cpp 9 Jul 2005 20:19:17 -0000 1.187
+++ render_block.cpp 18 Jul 2005 21:52:31 -0000 1.188
@@ -474,7 +474,7 @@
m_topMarginQuirk = style()->marginTop().quirk;
m_bottomMarginQuirk = style()->marginBottom().quirk;
- if (element() && element()->hasTagName(HTMLNames::form()) && element()->isMalformed())
+ if (element() && element()->hasTagName(HTMLTags::form()) && element()->isMalformed())
// See if this form is malformed (i.e., unclosed). If so, don't give the form
// a bottom margin.
m_maxBottomPosMargin = m_maxBottomNegMargin = 0;
1.157 +3 -3 WebCore/khtml/rendering/render_box.cpp
Index: render_box.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_box.cpp,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- render_box.cpp 18 Jul 2005 21:44:26 -0000 1.156
+++ render_box.cpp 18 Jul 2005 21:52:31 -0000 1.157
@@ -255,7 +255,7 @@
// anonymous blocks created by inline <body> tags etc. We can locate the <body>
// render object very easily via the DOM.
HTMLElementImpl* body = document()->body();
- RenderObject* bodyObject = (body && body->hasLocalName(HTMLNames::body())) ? body->renderer() : 0;
+ RenderObject* bodyObject = (body && body->hasLocalName(HTMLTags::body())) ? body->renderer() : 0;
if (bodyObject) {
bgLayer = bodyObject->style()->backgroundLayers();
bgColor = bodyObject->style()->backgroundColor();
@@ -368,7 +368,7 @@
bool isTransparent;
DOM::NodeImpl* elt = document()->ownerElement();
if (elt) {
- if (elt->hasTagName(HTMLNames::frame()))
+ if (elt->hasTagName(HTMLTags::frame()))
isTransparent = false;
else {
// Locate the <body> element using the DOM. This is easier than trying
@@ -376,7 +376,7 @@
// anonymous blocks created by inline <body> tags etc. We can locate the <body>
// render object very easily via the DOM.
HTMLElementImpl* body = document()->body();
- isTransparent = !body || !body->hasLocalName(HTMLNames::frameset()); // Can't scroll a frameset document anyway.
+ isTransparent = !body || !body->hasLocalName(HTMLTags::frameset()); // Can't scroll a frameset document anyway.
}
} else
isTransparent = canvas()->view()->isTransparent();
1.15 +1 -1 WebCore/khtml/rendering/render_canvasimage.cpp
Index: render_canvasimage.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_canvasimage.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- render_canvasimage.cpp 18 Jul 2005 21:44:26 -0000 1.14
+++ render_canvasimage.cpp 18 Jul 2005 21:52:31 -0000 1.15
@@ -188,7 +188,7 @@
}
if (drawnImage()) {
- HTMLCanvasElementImpl* i = (element() && element()->hasTagName(HTMLNames::canvas())) ? static_cast<HTMLCanvasElementImpl*>(element()) : 0;
+ HTMLCanvasElementImpl* i = (element() && element()->hasTagName(HTMLTags::canvas())) ? static_cast<HTMLCanvasElementImpl*>(element()) : 0;
int oldOperation = 0;
if (i && !i->compositeOperator().isNull()){
oldOperation = QPainter::getCompositeOperation(p->currentContext());
1.162 +1 -1 WebCore/khtml/rendering/render_flow.cpp
Index: render_flow.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_flow.cpp,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -r1.161 -r1.162
--- render_flow.cpp 9 Jul 2005 20:19:17 -0000 1.161
+++ render_flow.cpp 18 Jul 2005 21:52:31 -0000 1.162
@@ -653,7 +653,7 @@
// Only paint focus ring around outermost contenteditable element.
// But skip the body element if it is outermost.
if (element() && element()->isContentEditable()) {
- if (element()->parentNode() && !element()->parentNode()->isContentEditable() && !element()->hasTagName(HTMLNames::body()))
+ if (element()->parentNode() && !element()->parentNode()->isContentEditable() && !element()->hasTagName(HTMLTags::body()))
p->addFocusRingRect(_tx, _ty, width(), height());
return;
}
1.111 +12 -12 WebCore/khtml/rendering/render_form.cpp
Index: render_form.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_form.cpp,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- render_form.cpp 18 Jul 2005 21:44:26 -0000 1.110
+++ render_form.cpp 18 Jul 2005 21:52:31 -0000 1.111
@@ -796,7 +796,7 @@
{
for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibling()) {
if (!legend->isFloatingOrPositioned() && legend->element() &&
- legend->element()->hasTagName(HTMLNames::legend()))
+ legend->element()->hasTagName(HTMLTags::legend()))
return legend;
}
return 0;
@@ -1190,7 +1190,7 @@
static_cast<KComboBox*>(m_widget)->clear();
for (listIndex = 0; listIndex < int(listItems.size()); listIndex++) {
- if (listItems[listIndex]->hasTagName(HTMLNames::optgroup())) {
+ if (listItems[listIndex]->hasTagName(HTMLTags::optgroup())) {
QString label = listItems[listIndex]->getAttribute(HTMLAttributes::label()).string();
label.replace(QChar('\\'), backslashAsCurrencySymbol());
@@ -1214,14 +1214,14 @@
static_cast<KComboBox*>(m_widget)->insertItem(label, listIndex);
#endif
}
- else if (listItems[listIndex]->hasTagName(HTMLNames::option())) {
+ else if (listItems[listIndex]->hasTagName(HTMLTags::option())) {
QString itemText = static_cast<HTMLOptionElementImpl*>(listItems[listIndex])->text().string();
itemText.replace(QChar('\\'), backslashAsCurrencySymbol());
// In WinIE, leading and trailing whitespace is ignored in options. We match this behavior.
itemText = itemText.stripWhiteSpace();
- if (listItems[listIndex]->parentNode()->hasTagName(HTMLNames::optgroup()))
+ if (listItems[listIndex]->parentNode()->hasTagName(HTMLTags::optgroup()))
itemText.prepend(" ");
#if APPLE_CHANGES
@@ -1347,7 +1347,7 @@
bool foundOption = false;
for (uint i = 0; i < listItems.size() && !foundOption; i++)
- foundOption = (listItems[i]->hasTagName(HTMLNames::option()));
+ foundOption = (listItems[i]->hasTagName(HTMLTags::option()));
m_widget->setEnabled(foundOption && ! element()->disabled());
}
@@ -1361,12 +1361,12 @@
QMemArray<HTMLGenericFormElementImpl*> listItems = element()->listItems();
if(index >= 0 && index < int(listItems.size()))
{
- bool found = (listItems[index]->hasTagName(HTMLNames::option()));
+ bool found = (listItems[index]->hasTagName(HTMLTags::option()));
if ( !found ) {
// this one is not selectable, we need to find an option element
while ( ( unsigned ) index < listItems.size() ) {
- if (listItems[index]->hasTagName(HTMLNames::option())) {
+ if (listItems[index]->hasTagName(HTMLTags::option())) {
found = true;
break;
}
@@ -1375,7 +1375,7 @@
if ( !found ) {
while ( index >= 0 ) {
- if (listItems[index]->hasTagName(HTMLNames::option())) {
+ if (listItems[index]->hasTagName(HTMLTags::option())) {
found = true;
break;
}
@@ -1389,7 +1389,7 @@
static_cast<ComboBoxWidget*>( m_widget )->setCurrentItem( index );
for ( unsigned int i = 0; i < listItems.size(); ++i )
- if (listItems[i]->hasTagName(HTMLNames::option()) && i != (unsigned int) index)
+ if (listItems[i]->hasTagName(HTMLTags::option()) && i != (unsigned int) index)
static_cast<HTMLOptionElementImpl*>( listItems[i] )->m_selected = false;
static_cast<HTMLOptionElementImpl*>(listItems[index])->m_selected = true;
@@ -1410,7 +1410,7 @@
for ( unsigned i = 0; i < listItems.count(); i++ )
// don't use setSelected() here because it will cause us to be called
// again with updateSelection.
- if (listItems[i]->hasTagName(HTMLNames::option()))
+ if (listItems[i]->hasTagName(HTMLTags::option()))
static_cast<HTMLOptionElementImpl*>( listItems[i] )
->m_selected = static_cast<KListBox*>( m_widget )->isSelected( i );
@@ -1452,7 +1452,7 @@
// if multi-select, we select only the new selected index
KListBox *listBox = static_cast<KListBox*>(m_widget);
for (i = 0; i < int(listItems.size()); i++)
- listBox->setSelected(i, listItems[i]->hasTagName(HTMLNames::option()) &&
+ listBox->setSelected(i, listItems[i]->hasTagName(HTMLTags::option()) &&
static_cast<HTMLOptionElementImpl*>(listItems[i])->selected());
}
else {
@@ -1460,7 +1460,7 @@
unsigned firstOption = listItems.size();
i = listItems.size();
while (i--)
- if (listItems[i]->hasTagName(HTMLNames::option())) {
+ if (listItems[i]->hasTagName(HTMLTags::option())) {
if (found)
static_cast<HTMLOptionElementImpl*>(listItems[i])->m_selected = false;
else if (static_cast<HTMLOptionElementImpl*>(listItems[i])->selected()) {
1.72 +9 -9 WebCore/khtml/rendering/render_frames.cpp
Index: render_frames.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_frames.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- render_frames.cpp 18 Jul 2005 21:44:26 -0000 1.71
+++ render_frames.cpp 18 Jul 2005 21:52:31 -0000 1.72
@@ -667,17 +667,17 @@
setNeedsLayoutAndMinMaxRecalc();
- if (element()->hasTagName(HTMLNames::object())) {
+ if (element()->hasTagName(HTMLTags::object())) {
HTMLObjectElementImpl *o = static_cast<HTMLObjectElementImpl *>(element());
// Check for a child EMBED tag.
HTMLEmbedElementImpl *embed = 0;
for (NodeImpl *child = o->firstChild(); child; ) {
- if (child->hasTagName(HTMLNames::embed())) {
+ if (child->hasTagName(HTMLTags::embed())) {
embed = static_cast<HTMLEmbedElementImpl *>( child );
break;
- } else if (child->hasTagName(HTMLNames::object())) {
+ } else if (child->hasTagName(HTMLTags::object())) {
child = child->nextSibling(); // Don't descend into nested OBJECT tags
} else {
child = child->traverseNextNode(o); // Otherwise descend (EMBEDs may be inside COMMENT tags)
@@ -717,7 +717,7 @@
// Get the attributes from the params if there is no EMBED tag.
NodeImpl *child = o->firstChild();
while (child && (url.isEmpty() || serviceType.isEmpty() || !embed)) {
- if (child->hasTagName(HTMLNames::param())) {
+ if (child->hasTagName(HTMLTags::param())) {
HTMLParamElementImpl *p = static_cast<HTMLParamElementImpl *>( child );
QString name = p->name().string().lower();
if (url.isEmpty() && (name == "src" || name == "movie" || name == "code" || name == "url")) {
@@ -808,14 +808,14 @@
// Find out if we support fallback content.
m_hasFallbackContent = false;
for (NodeImpl *child = o->firstChild(); child && !m_hasFallbackContent; child = child->nextSibling()) {
- if ((!child->isTextNode() && !child->hasTagName(HTMLNames::embed()) && !child->hasTagName(HTMLNames::param())) || // Discount <embed> and <param>
+ if ((!child->isTextNode() && !child->hasTagName(HTMLTags::embed()) && !child->hasTagName(HTMLTags::param())) || // Discount <embed> and <param>
(child->isTextNode() && !child->containsOnlyWhitespace()))
m_hasFallbackContent = true;
}
bool success = part->requestObject( this, url, serviceType, paramNames, paramValues );
if (!success && m_hasFallbackContent)
o->renderFallbackContent();
- } else if (element()->hasTagName(HTMLNames::embed())) {
+ } else if (element()->hasTagName(HTMLTags::embed())) {
HTMLEmbedElementImpl *o = static_cast<HTMLEmbedElementImpl *>(element());
url = o->url;
@@ -842,7 +842,7 @@
}
part->requestObject( this, url, serviceType, paramNames, paramValues );
} else {
- assert(element()->hasTagName(HTMLNames::iframe()));
+ assert(element()->hasTagName(HTMLTags::iframe()));
HTMLIFrameElementImpl *o = static_cast<HTMLIFrameElementImpl *>(element());
url = o->m_URL.string();
if (url.isEmpty()) {
@@ -888,7 +888,7 @@
QScrollView::ScrollBarMode scroll = QScrollView::Auto;
int marginw = -1;
int marginh = -1;
- if (element()->hasTagName(HTMLNames::iframe())) {
+ if (element()->hasTagName(HTMLTags::iframe())) {
HTMLIFrameElementImpl *frame = static_cast<HTMLIFrameElementImpl *>(element());
if(frame->m_frameBorder)
frameStyle = QFrame::Box;
@@ -908,7 +908,7 @@
kdDebug(6031) << "frame is a KHTMLview!" << endl;
#endif
KHTMLView *htmlView = static_cast<KHTMLView *>(view);
- htmlView->setIgnoreWheelEvents(element()->hasTagName(HTMLNames::iframe()));
+ htmlView->setIgnoreWheelEvents(element()->hasTagName(HTMLTags::iframe()));
if(marginw != -1) htmlView->setMarginWidth(marginw);
if(marginh != -1) htmlView->setMarginHeight(marginh);
}
1.81 +4 -4 WebCore/khtml/rendering/render_image.cpp
Index: render_image.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_image.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- render_image.cpp 18 Jul 2005 21:44:26 -0000 1.80
+++ render_image.cpp 18 Jul 2005 21:52:32 -0000 1.81
@@ -421,7 +421,7 @@
// p->drawPixmap( offs.x(), y, pix, rect.x(), rect.y(), rect.width(), rect.height() );
- HTMLImageElementImpl* i = (element() && element()->hasTagName(HTMLNames::img())) ? static_cast<HTMLImageElementImpl*>(element()) : 0;
+ HTMLImageElementImpl* i = (element() && element()->hasTagName(HTMLTags::img())) ? static_cast<HTMLImageElementImpl*>(element()) : 0;
if (i && !i->compositeOperator().isNull()){
p->drawPixmap (offs, pix, rect, i->compositeOperator());
}
@@ -488,7 +488,7 @@
HTMLMapElementImpl* RenderImage::imageMap()
{
- HTMLImageElementImpl* i = element()->hasTagName(HTMLNames::img()) ? static_cast<HTMLImageElementImpl*>(element()) : 0;
+ HTMLImageElementImpl* i = element()->hasTagName(HTMLTags::img()) ? static_cast<HTMLImageElementImpl*>(element()) : 0;
return i ? i->getDocument()->getImageMap(i->imageMap()) : 0;
}
@@ -514,9 +514,9 @@
void RenderImage::updateAltText()
{
- if (element()->hasTagName(HTMLNames::input()))
+ if (element()->hasTagName(HTMLTags::input()))
alt = static_cast<HTMLInputElementImpl*>(element())->altText();
- else if (element()->hasTagName(HTMLNames::img()))
+ else if (element()->hasTagName(HTMLTags::img()))
alt = static_cast<HTMLImageElementImpl*>(element())->altText();
}
1.99 +1 -1 WebCore/khtml/rendering/render_layer.cpp
Index: render_layer.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_layer.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- render_layer.cpp 12 Jul 2005 20:26:41 -0000 1.98
+++ render_layer.cpp 18 Jul 2005 21:52:32 -0000 1.99
@@ -1466,7 +1466,7 @@
{
int result = m_layer->renderer()->style()->marqueeSpeed();
DOM::NodeImpl* elt = m_layer->renderer()->element();
- if (elt && elt->hasTagName(HTMLNames::marquee())) {
+ if (elt && elt->hasTagName(HTMLTags::marquee())) {
HTMLMarqueeElementImpl* marqueeElt = static_cast<HTMLMarqueeElementImpl*>(elt);
result = kMax(result, marqueeElt->minimumDelay());
}
1.64 +2 -2 WebCore/khtml/rendering/render_list.cpp
Index: render_list.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_list.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- render_list.cpp 9 Jul 2005 20:19:18 -0000 1.63
+++ render_list.cpp 18 Jul 2005 21:52:32 -0000 1.64
@@ -38,7 +38,7 @@
//#define BOX_DEBUG
using DOM::DocumentImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using namespace khtml;
const int cMarkerPadding = 7;
@@ -215,7 +215,7 @@
break;
if (currChild->style()->htmlHacks() && currChild->element() &&
- (currChild->element()->hasTagName(HTMLNames::ul())|| currChild->element()->hasTagName(HTMLNames::ol())))
+ (currChild->element()->hasTagName(HTMLTags::ul())|| currChild->element()->hasTagName(HTMLTags::ol())))
break;
RenderObject* lineBox = getParentOfFirstLineBox(currChild, marker);
1.200 +7 -7 WebCore/khtml/rendering/render_object.cpp
Index: render_object.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_object.cpp,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -r1.199 -r1.200
--- render_object.cpp 18 Jul 2005 21:44:26 -0000 1.199
+++ render_object.cpp 18 Jul 2005 21:52:32 -0000 1.200
@@ -175,17 +175,17 @@
bool RenderObject::isBody() const
{
- return element() && element()->renderer() == this && element()->hasTagName(HTMLNames::body());
+ return element() && element()->renderer() == this && element()->hasTagName(HTMLTags::body());
}
bool RenderObject::isHR() const
{
- return element() && element()->hasTagName(HTMLNames::hr());
+ return element() && element()->hasTagName(HTMLTags::hr());
}
bool RenderObject::isHTMLMarquee() const
{
- return element() && element()->renderer() == this && element()->hasTagName(HTMLNames::marquee());
+ return element() && element()->renderer() == this && element()->hasTagName(HTMLTags::marquee());
}
bool RenderObject::canHaveChildren() const
@@ -737,7 +737,7 @@
// but they allow text to sit on the same line as the marquee.
if (isFloating() || (isCompact() && isInline()) ||
(isInlineBlockOrInlineTable() && !isHTMLMarquee()) ||
- (element() && (element()->hasTagName(HTMLNames::button()) || element()->hasTagName(HTMLNames::legend()))))
+ (element() && (element()->hasTagName(HTMLTags::button()) || element()->hasTagName(HTMLTags::legend()))))
return true;
// Children of a horizontal marquee do not fill the container by default.
@@ -1556,7 +1556,7 @@
// The background of the root element or the body element could propagate up to
// the canvas. Just dirty the entire canvas when our style changes substantially.
if (d >= RenderStyle::Repaint && element() &&
- (element()->hasTagName(HTMLNames::html()) || element()->hasTagName(HTMLNames::body())))
+ (element()->hasTagName(HTMLTags::html()) || element()->hasTagName(HTMLTags::body())))
canvas()->repaint();
else if (m_parent && !isText()) {
// Do a repaint with the old style first, e.g., for example if we go from
@@ -2188,7 +2188,7 @@
if (curr && curr->isRenderBlock() && curr->continuation())
curr = curr->continuation();
} while (curr && decorations && (!quirksMode || !curr->element() ||
- (!curr->element()->hasTagName(HTMLNames::a()) && !curr->element()->hasTagName(HTMLNames::font()))));
+ (!curr->element()->hasTagName(HTMLTags::a()) && !curr->element()->hasTagName(HTMLTags::font()))));
// If we bailed out, use the element we bailed out at (typically a <font> or <a> element).
if (decorations && curr) {
@@ -2322,7 +2322,7 @@
// would avoid putting this function and the CachedObjectClient base class into RenderObject.
if (image && image->pixmap_size() == image->valid_rect().size() && parent()) {
- if (canvas() && element() && (element()->hasTagName(HTMLNames::html()) || element()->hasTagName(HTMLNames::body())))
+ if (canvas() && element() && (element()->hasTagName(HTMLTags::html()) || element()->hasTagName(HTMLTags::body())))
canvas()->repaint(); // repaint the entire canvas since the background gets propagated up
else
repaint(); // repaint object, which is a box or a container with boxes inside it
1.129 +6 -6 WebCore/khtml/rendering/render_table.cpp
Index: render_table.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_table.cpp,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- render_table.cpp 18 Jul 2005 21:44:26 -0000 1.128
+++ render_table.cpp 18 Jul 2005 21:52:32 -0000 1.129
@@ -111,7 +111,7 @@
#endif
RenderObject *o = child;
- if (child->element() && child->element()->hasTagName(HTMLNames::form())) {
+ if (child->element() && child->element()->hasTagName(HTMLTags::form())) {
RenderContainer::addChild(child,beforeChild);
return;
}
@@ -261,7 +261,7 @@
RenderObject *child = firstChild();
while( child ) {
- if ( child->needsLayout() && !(child->element() && child->element()->hasTagName(HTMLNames::form())))
+ if ( child->needsLayout() && !(child->element() && child->element()->hasTagName(HTMLTags::form())))
child->layout();
if ( child->isTableSection() ) {
static_cast<RenderTableSection *>(child)->calcRowHeight();
@@ -848,7 +848,7 @@
#endif
RenderObject *row = child;
- if (child->element() && child->element()->hasTagName(HTMLNames::form())) {
+ if (child->element() && child->element()->hasTagName(HTMLTags::form())) {
RenderContainer::addChild(child,beforeChild);
return;
}
@@ -1494,7 +1494,7 @@
kdDebug( 6040 ) << renderName() << "(TableRow)::addChild( " << child->renderName() << " )" << ", " <<
(beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
#endif
- if (child->element() && child->element()->hasTagName(HTMLNames::form())) {
+ if (child->element() && child->element()->hasTagName(HTMLTags::form())) {
RenderContainer::addChild(child,beforeChild);
return;
}
@@ -1605,7 +1605,7 @@
int oldRSpan = rSpan;
int oldCSpan = cSpan;
DOM::NodeImpl* node = element();
- if (node && (node->hasTagName(HTMLNames::td()) || node->hasTagName(HTMLNames::th()))) {
+ if (node && (node->hasTagName(HTMLTags::td()) || node->hasTagName(HTMLTags::th()))) {
DOM::HTMLTableCellElementImpl *tc = static_cast<DOM::HTMLTableCellElementImpl *>(node);
cSpan = tc->colSpan();
rSpan = tc->rowSpan();
@@ -2289,7 +2289,7 @@
{
int oldSpan = _span;
DOM::NodeImpl *node = element();
- if (node && (node->hasTagName(HTMLNames::col()) || node->hasTagName(HTMLNames::colgroup()))) {
+ if (node && (node->hasTagName(HTMLTags::col()) || node->hasTagName(HTMLTags::colgroup()))) {
DOM::HTMLTableColElementImpl *tc = static_cast<DOM::HTMLTableColElementImpl *>(node);
_span = tc->span();
}
1.238 +9 -9 WebCore/khtml/xml/dom_docimpl.cpp
Index: dom_docimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -r1.237 -r1.238
--- dom_docimpl.cpp 18 Jul 2005 21:44:28 -0000 1.237
+++ dom_docimpl.cpp 18 Jul 2005 21:52:34 -0000 1.238
@@ -620,7 +620,7 @@
localName = _qualifiedName;
// FIXME: Use registered namespaces and look up in a hash to find the right factory.
- if (_namespaceURI == HTMLNames::xhtmlNamespaceURI()) {
+ if (_namespaceURI == HTMLTags::xhtmlNamespaceURI()) {
// FIXME: Really should only be done from the public DOM API. Internal callers know the name is valid.
if (!isValidName(localName)) {
exceptioncode = DOMException::INVALID_CHARACTER_ERR;
@@ -1266,10 +1266,10 @@
// try to prefer a FRAMESET element over BODY
NodeImpl* body = 0;
for (NodeImpl* i = de->firstChild(); i; i = i->nextSibling()) {
- if (i->hasTagName(HTMLNames::frameset()))
+ if (i->hasTagName(HTMLTags::frameset()))
return static_cast<HTMLElementImpl*>(i);
- if (i->hasTagName(HTMLNames::body()))
+ if (i->hasTagName(HTMLTags::body()))
body = i;
}
return static_cast<HTMLElementImpl *>(body);
@@ -1399,7 +1399,7 @@
// (c) we have a <body>
return (renderer() && renderer()->needsLayout() && haveStylesheetsLoaded() &&
documentElement() && documentElement()->renderer() &&
- (!documentElement()->hasTagName(HTMLNames::html()) || body()));
+ (!documentElement()->hasTagName(HTMLTags::html()) || body()));
}
int DocumentImpl::minimumLayoutDelay()
@@ -2016,11 +2016,11 @@
}
}
- else if (n->isHTMLElement() && (n->hasTagName(HTMLNames::link()) || n->hasTagName(HTMLNames::style()))) {
+ else if (n->isHTMLElement() && (n->hasTagName(HTMLTags::link()) || n->hasTagName(HTMLTags::style()))) {
HTMLElementImpl *e = static_cast<HTMLElementImpl *>(n);
QString title = e->getAttribute(HTMLAttributes::title()).string();
bool enabledViaScript = false;
- if (e->hasLocalName(HTMLNames::link())) {
+ if (e->hasLocalName(HTMLTags::link())) {
// <LINK> element
HTMLLinkElementImpl* l = static_cast<HTMLLinkElementImpl*>(n);
if (l->isLoading() || l->isDisabled())
@@ -2032,7 +2032,7 @@
// Get the current preferred styleset. This is the
// set of sheets that will be enabled.
- if (e->hasLocalName(HTMLNames::link()))
+ if (e->hasLocalName(HTMLTags::link()))
sheet = static_cast<HTMLLinkElementImpl*>(n)->sheet();
else
// <STYLE> element
@@ -2049,7 +2049,7 @@
// us as the preferred set. Otherwise, just ignore
// this sheet.
QString rel = e->getAttribute(HTMLAttributes::rel()).string();
- if (e->hasLocalName(HTMLNames::style()) || !rel.contains("alternate"))
+ if (e->hasLocalName(HTMLTags::style()) || !rel.contains("alternate"))
m_preferredStylesheetSet = view()->part()->d->m_sheetUsed = title;
}
@@ -2068,7 +2068,7 @@
// For HTML documents, stylesheets are not allowed within/after the <BODY> tag. So we
// can stop searching here.
- if (isHTMLDocument() && n->hasTagName(HTMLNames::body()))
+ if (isHTMLDocument() && n->hasTagName(HTMLTags::body()))
break;
}
1.160 +7 -7 WebCore/khtml/xml/dom_nodeimpl.cpp
Index: dom_nodeimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- dom_nodeimpl.cpp 18 Jul 2005 21:44:28 -0000 1.159
+++ dom_nodeimpl.cpp 18 Jul 2005 21:52:34 -0000 1.160
@@ -1424,7 +1424,7 @@
if (offsetInCharacters(nodeType()))
return static_cast<const TextImpl*>(this)->length();
- if (hasTagName(HTMLNames::br()) || (renderer() && renderer()->isReplaced()))
+ if (hasTagName(HTMLTags::br()) || (renderer() && renderer()->isReplaced()))
return 1;
return childNodeCount();
@@ -1480,7 +1480,7 @@
n = n->parentNode();
if (!n)
break;
- if (n->isBlockFlowOrTable() || n->hasTagName(HTMLNames::body()))
+ if (n->isBlockFlowOrTable() || n->hasTagName(HTMLTags::body()))
return static_cast<ElementImpl *>(n);
}
return 0;
@@ -1496,7 +1496,7 @@
n = n->parentNode();
if (!n)
break;
- if (n->isBlockFlow() || n->hasTagName(HTMLNames::body()))
+ if (n->isBlockFlow() || n->hasTagName(HTMLTags::body()))
return static_cast<ElementImpl *>(n);
}
return 0;
@@ -1509,7 +1509,7 @@
while (1) {
p = n->parentNode();
- if (!p || p->isBlockFlow() || p->hasTagName(HTMLNames::body()))
+ if (!p || p->isBlockFlow() || p->hasTagName(HTMLTags::body()))
return static_cast<ElementImpl *>(n);
// Also stop if any previous sibling is a block
for (NodeImpl *sibling = n->previousSibling(); sibling; sibling = sibling->previousSibling()) {
@@ -1528,7 +1528,7 @@
return 0;
NodeImpl *n = const_cast<NodeImpl *>(this);
- if (n->hasTagName(HTMLNames::body()))
+ if (n->hasTagName(HTMLTags::body()))
return static_cast<ElementImpl *>(n);
NodeImpl *result = n->isEditableBlock() ? n : 0;
@@ -1536,7 +1536,7 @@
n = n->parentNode();
if (!n || !n->isContentEditable())
break;
- if (n->hasTagName(HTMLNames::body())) {
+ if (n->hasTagName(HTMLTags::body())) {
result = n;
break;
}
@@ -1639,7 +1639,7 @@
{
NodeImpl *rootNode;
NodeImpl *node = (NodeImpl *)this;
- while (node->parentNode() && !node->hasTagName(HTMLNames::body()))
+ while (node->parentNode() && !node->hasTagName(HTMLTags::body()))
node = node->parentNode();
rootNode = node;
1.73 +6 -6 WebCore/khtml/xml/dom_position.cpp
Index: dom_position.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_position.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- dom_position.cpp 9 Jul 2005 20:19:22 -0000 1.72
+++ dom_position.cpp 18 Jul 2005 21:52:34 -0000 1.73
@@ -440,7 +440,7 @@
// stop before going above the body, up into the head
// return the last visible streamer position
- if (currentNode->hasTagName(HTMLNames::body()) && currentOffset >= (int) currentNode->childNodeCount())
+ if (currentNode->hasTagName(HTMLTags::body()) && currentOffset >= (int) currentNode->childNodeCount())
break;
// limit traversal to block or table enclosing the original element
@@ -694,7 +694,7 @@
return false;
if (node() == pos.node()) {
- if (node()->hasTagName(HTMLNames::br()))
+ if (node()->hasTagName(HTMLTags::br()))
return false;
if (offset() == pos.offset())
@@ -706,10 +706,10 @@
}
}
- if (node()->hasTagName(HTMLNames::br()) && pos.inRenderedContent())
+ if (node()->hasTagName(HTMLTags::br()) && pos.inRenderedContent())
return true;
- if (pos.node()->hasTagName(HTMLNames::br()) && inRenderedContent())
+ if (pos.node()->hasTagName(HTMLTags::br()) && inRenderedContent())
return true;
if (node()->enclosingBlockFlowElement() != pos.node()->enclosingBlockFlowElement())
@@ -764,7 +764,7 @@
if (isNull())
return Position();
- if (upstream().node()->hasTagName(HTMLNames::br()))
+ if (upstream().node()->hasTagName(HTMLTags::br()))
return Position();
Position prev = previousCharacterPosition(affinity);
@@ -794,7 +794,7 @@
}
}
- if (downstream().node()->hasTagName(HTMLNames::br()))
+ if (downstream().node()->hasTagName(HTMLTags::br()))
return Position();
Position next = nextCharacterPosition(affinity);
1.34 +13 -13 WebCore/khtml/xml/xml_tokenizer.cpp
Index: xml_tokenizer.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/xml_tokenizer.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- xml_tokenizer.cpp 18 Jul 2005 21:44:29 -0000 1.33
+++ xml_tokenizer.cpp 18 Jul 2005 21:52:34 -0000 1.34
@@ -44,7 +44,7 @@
using DOM::DOMString;
using DOM::ElementImpl;
using DOM::HTMLAttributes;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLScriptElementImpl;
using DOM::HTMLTableSectionElementImpl;
using DOM::Node;
@@ -322,18 +322,18 @@
// FIXME: This hack ensures implicit table bodies get constructed in XHTML and XML files.
// We want to consolidate this with the HTML parser and HTML DOM code at some point.
// For now, it's too risky to rip that code up.
- if (m_currentNode->hasTagName(HTMLNames::table()) &&
- newElement->hasTagName(HTMLNames::tr()) &&
+ if (m_currentNode->hasTagName(HTMLTags::table()) &&
+ newElement->hasTagName(HTMLTags::tr()) &&
m_currentNode->isHTMLElement() && newElement->isHTMLElement()) {
NodeImpl* implicitTBody =
- new HTMLTableSectionElementImpl(HTMLNames::tbody(), m_doc, true /* implicit */);
+ new HTMLTableSectionElementImpl(HTMLTags::tbody(), m_doc, true /* implicit */);
m_currentNode->addChild(implicitTBody);
if (m_view && !implicitTBody->attached())
implicitTBody->attach();
m_currentNode = implicitTBody;
}
- if (newElement->hasTagName(HTMLNames::script()))
+ if (newElement->hasTagName(HTMLTags::script()))
static_cast<HTMLScriptElementImpl *>(newElement)->setCreatedByParser(true);
if (m_currentNode->addChild(newElement)) {
@@ -607,30 +607,30 @@
DocumentImpl *doc = m_doc->document();
NodeImpl* root = doc->documentElement();
if (!root) {
- root = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "html", exceptioncode);
- NodeImpl* body = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "body", exceptioncode);
+ root = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "html", exceptioncode);
+ NodeImpl* body = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "body", exceptioncode);
root->appendChild(body, exceptioncode);
doc->appendChild(root, exceptioncode);
root = body;
}
- ElementImpl* reportElement = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "parsererror", exceptioncode);
+ ElementImpl* reportElement = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "parsererror", exceptioncode);
reportElement->setAttribute(HTMLAttributes::style(), "white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black");
- ElementImpl* h3 = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "h3", exceptioncode);
+ ElementImpl* h3 = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "h3", exceptioncode);
h3->appendChild(doc->createTextNode("This page contains the following errors:"), exceptioncode);
reportElement->appendChild(h3, exceptioncode);
- ElementImpl* fixed = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "div", exceptioncode);
+ ElementImpl* fixed = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "div", exceptioncode);
fixed->setAttribute(HTMLAttributes::style(), "font-family:monospace;font-size:12px");
NodeImpl* textNode = doc->createTextNode(m_errorMessages);
fixed->appendChild(textNode, exceptioncode);
reportElement->appendChild(fixed, exceptioncode);
- h3 = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "h3", exceptioncode);
+ h3 = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "h3", exceptioncode);
reportElement->appendChild(h3, exceptioncode);
h3->appendChild(doc->createTextNode("Below is a rendering of the page up to the first error."), exceptioncode);
#ifdef KHTML_XSLT
if (doc->transformSourceDocument()) {
- ElementImpl* par = doc->createElementNS(HTMLNames::xhtmlNamespaceURI(), "p", exceptioncode);
+ ElementImpl* par = doc->createElementNS(HTMLTags::xhtmlNamespaceURI(), "p", exceptioncode);
reportElement->appendChild(par, exceptioncode);
par->setAttribute(HTMLAttributes::style(), "white-space: normal");
par->appendChild(doc->createTextNode("This document was created as the result of an XSL transformation. The line and column numbers given are from the transformed result."), exceptioncode);
@@ -646,7 +646,7 @@
// Recursively go through the entire document tree, looking for html <script> tags. For each of these
// that is found, add it to the m_scripts list from which they will be executed
- if (n->hasTagName(HTMLNames::script())) {
+ if (n->hasTagName(HTMLTags::script())) {
m_scripts.append(static_cast<HTMLScriptElementImpl*>(n));
}
1.38 +61 -61 WebCore/kwq/DOM.mm
Index: DOM.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/DOM.mm,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- DOM.mm 9 Jul 2005 20:19:24 -0000 1.37
+++ DOM.mm 18 Jul 2005 21:52:35 -0000 1.38
@@ -71,7 +71,7 @@
using DOM::EntityImpl;
using DOM::FilterNode;
using DOM::HTMLElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::NamedNodeMapImpl;
using DOM::Node;
using DOM::NodeFilter;
@@ -404,116 +404,116 @@
// FIXME: We could make the HTML classes hand back their class names and then use that to make
// the appropriate Obj-C class from the string.
HTMLElementImpl* htmlElt = static_cast<HTMLElementImpl*>(impl);
- if (htmlElt->hasLocalName(HTMLNames::html()))
+ if (htmlElt->hasLocalName(HTMLTags::html()))
wrapperClass = [DOMHTMLHtmlElement class];
- else if (htmlElt->hasLocalName(HTMLNames::head()))
+ else if (htmlElt->hasLocalName(HTMLTags::head()))
wrapperClass = [DOMHTMLHeadElement class];
- else if (htmlElt->hasLocalName(HTMLNames::link()))
+ else if (htmlElt->hasLocalName(HTMLTags::link()))
wrapperClass = [DOMHTMLLinkElement class];
- else if (htmlElt->hasLocalName(HTMLNames::title()))
+ else if (htmlElt->hasLocalName(HTMLTags::title()))
wrapperClass = [DOMHTMLTitleElement class];
- else if (htmlElt->hasLocalName(HTMLNames::meta()))
+ else if (htmlElt->hasLocalName(HTMLTags::meta()))
wrapperClass = [DOMHTMLMetaElement class];
- else if (htmlElt->hasLocalName(HTMLNames::base()))
+ else if (htmlElt->hasLocalName(HTMLTags::base()))
wrapperClass = [DOMHTMLBaseElement class];
- else if (htmlElt->hasLocalName(HTMLNames::isindex()))
+ else if (htmlElt->hasLocalName(HTMLTags::isindex()))
wrapperClass = [DOMHTMLIsIndexElement class];
- else if (htmlElt->hasLocalName(HTMLNames::style()))
+ else if (htmlElt->hasLocalName(HTMLTags::style()))
wrapperClass = [DOMHTMLStyleElement class];
- else if (htmlElt->hasLocalName(HTMLNames::body()))
+ else if (htmlElt->hasLocalName(HTMLTags::body()))
wrapperClass = [DOMHTMLBodyElement class];
- else if (htmlElt->hasLocalName(HTMLNames::form()))
+ else if (htmlElt->hasLocalName(HTMLTags::form()))
wrapperClass = [DOMHTMLFormElement class];
- else if (htmlElt->hasLocalName(HTMLNames::select()))
+ else if (htmlElt->hasLocalName(HTMLTags::select()))
wrapperClass = [DOMHTMLSelectElement class];
- else if (htmlElt->hasLocalName(HTMLNames::optgroup()))
+ else if (htmlElt->hasLocalName(HTMLTags::optgroup()))
wrapperClass = [DOMHTMLOptGroupElement class];
- else if (htmlElt->hasLocalName(HTMLNames::option()))
+ else if (htmlElt->hasLocalName(HTMLTags::option()))
wrapperClass = [DOMHTMLOptionElement class];
- else if (htmlElt->hasLocalName(HTMLNames::input()))
+ else if (htmlElt->hasLocalName(HTMLTags::input()))
wrapperClass = [DOMHTMLInputElement class];
- else if (htmlElt->hasLocalName(HTMLNames::textarea()))
+ else if (htmlElt->hasLocalName(HTMLTags::textarea()))
wrapperClass = [DOMHTMLTextAreaElement class];
- else if (htmlElt->hasLocalName(HTMLNames::button()))
+ else if (htmlElt->hasLocalName(HTMLTags::button()))
wrapperClass = [DOMHTMLButtonElement class];
- else if (htmlElt->hasLocalName(HTMLNames::label()))
+ else if (htmlElt->hasLocalName(HTMLTags::label()))
wrapperClass = [DOMHTMLLabelElement class];
- else if (htmlElt->hasLocalName(HTMLNames::fieldset()))
+ else if (htmlElt->hasLocalName(HTMLTags::fieldset()))
wrapperClass = [DOMHTMLFieldSetElement class];
- else if (htmlElt->hasLocalName(HTMLNames::legend()))
+ else if (htmlElt->hasLocalName(HTMLTags::legend()))
wrapperClass = [DOMHTMLLegendElement class];
- else if (htmlElt->hasLocalName(HTMLNames::ul()))
+ else if (htmlElt->hasLocalName(HTMLTags::ul()))
wrapperClass = [DOMHTMLUListElement class];
- else if (htmlElt->hasLocalName(HTMLNames::ol()))
+ else if (htmlElt->hasLocalName(HTMLTags::ol()))
wrapperClass = [DOMHTMLOListElement class];
- else if (htmlElt->hasLocalName(HTMLNames::dl()))
+ else if (htmlElt->hasLocalName(HTMLTags::dl()))
wrapperClass = [DOMHTMLDListElement class];
- else if (htmlElt->hasLocalName(HTMLNames::dir()))
+ else if (htmlElt->hasLocalName(HTMLTags::dir()))
wrapperClass = [DOMHTMLDirectoryElement class];
- else if (htmlElt->hasLocalName(HTMLNames::menu()))
+ else if (htmlElt->hasLocalName(HTMLTags::menu()))
wrapperClass = [DOMHTMLMenuElement class];
- else if (htmlElt->hasLocalName(HTMLNames::li()))
+ else if (htmlElt->hasLocalName(HTMLTags::li()))
wrapperClass = [DOMHTMLLIElement class];
- else if (htmlElt->hasLocalName(HTMLNames::div()))
+ else if (htmlElt->hasLocalName(HTMLTags::div()))
wrapperClass = [DOMHTMLDivElement class];
- else if (htmlElt->hasLocalName(HTMLNames::p()))
+ else if (htmlElt->hasLocalName(HTMLTags::p()))
wrapperClass = [DOMHTMLParagraphElement class];
- else if (htmlElt->hasLocalName(HTMLNames::h1()) ||
- htmlElt->hasLocalName(HTMLNames::h2()) ||
- htmlElt->hasLocalName(HTMLNames::h3()) ||
- htmlElt->hasLocalName(HTMLNames::h4()) ||
- htmlElt->hasLocalName(HTMLNames::h5()) ||
- htmlElt->hasLocalName(HTMLNames::h6()))
+ else if (htmlElt->hasLocalName(HTMLTags::h1()) ||
+ htmlElt->hasLocalName(HTMLTags::h2()) ||
+ htmlElt->hasLocalName(HTMLTags::h3()) ||
+ htmlElt->hasLocalName(HTMLTags::h4()) ||
+ htmlElt->hasLocalName(HTMLTags::h5()) ||
+ htmlElt->hasLocalName(HTMLTags::h6()))
wrapperClass = [DOMHTMLHeadingElement class];
- else if (htmlElt->hasLocalName(HTMLNames::q()))
+ else if (htmlElt->hasLocalName(HTMLTags::q()))
wrapperClass = [DOMHTMLQuoteElement class];
- else if (htmlElt->hasLocalName(HTMLNames::pre()))
+ else if (htmlElt->hasLocalName(HTMLTags::pre()))
wrapperClass = [DOMHTMLPreElement class];
- else if (htmlElt->hasLocalName(HTMLNames::br()))
+ else if (htmlElt->hasLocalName(HTMLTags::br()))
wrapperClass = [DOMHTMLBRElement class];
- else if (htmlElt->hasLocalName(HTMLNames::basefont()))
+ else if (htmlElt->hasLocalName(HTMLTags::basefont()))
wrapperClass = [DOMHTMLBaseFontElement class];
- else if (htmlElt->hasLocalName(HTMLNames::font()))
+ else if (htmlElt->hasLocalName(HTMLTags::font()))
wrapperClass = [DOMHTMLFontElement class];
- else if (htmlElt->hasLocalName(HTMLNames::hr()))
+ else if (htmlElt->hasLocalName(HTMLTags::hr()))
wrapperClass = [DOMHTMLHRElement class];
- else if (htmlElt->hasLocalName(HTMLNames::a()))
+ else if (htmlElt->hasLocalName(HTMLTags::a()))
wrapperClass = [DOMHTMLAnchorElement class];
- else if (htmlElt->hasLocalName(HTMLNames::img()) ||
- htmlElt->hasLocalName(HTMLNames::canvas()))
+ else if (htmlElt->hasLocalName(HTMLTags::img()) ||
+ htmlElt->hasLocalName(HTMLTags::canvas()))
wrapperClass = [DOMHTMLImageElement class];
- else if (htmlElt->hasLocalName(HTMLNames::object()))
+ else if (htmlElt->hasLocalName(HTMLTags::object()))
wrapperClass = [DOMHTMLObjectElement class];
- else if (htmlElt->hasLocalName(HTMLNames::param()))
+ else if (htmlElt->hasLocalName(HTMLTags::param()))
wrapperClass = [DOMHTMLParamElement class];
- else if (htmlElt->hasLocalName(HTMLNames::applet()))
+ else if (htmlElt->hasLocalName(HTMLTags::applet()))
wrapperClass = [DOMHTMLAppletElement class];
- else if (htmlElt->hasLocalName(HTMLNames::map()))
+ else if (htmlElt->hasLocalName(HTMLTags::map()))
wrapperClass = [DOMHTMLMapElement class];
- else if (htmlElt->hasLocalName(HTMLNames::area()))
+ else if (htmlElt->hasLocalName(HTMLTags::area()))
wrapperClass = [DOMHTMLAreaElement class];
- else if (htmlElt->hasLocalName(HTMLNames::script()))
+ else if (htmlElt->hasLocalName(HTMLTags::script()))
wrapperClass = [DOMHTMLScriptElement class];
- else if (htmlElt->hasLocalName(HTMLNames::table()))
+ else if (htmlElt->hasLocalName(HTMLTags::table()))
wrapperClass = [DOMHTMLTableElement class];
- else if (htmlElt->hasLocalName(HTMLNames::thead()) ||
- htmlElt->hasLocalName(HTMLNames::tbody()) ||
- htmlElt->hasLocalName(HTMLNames::tfoot()))
+ else if (htmlElt->hasLocalName(HTMLTags::thead()) ||
+ htmlElt->hasLocalName(HTMLTags::tbody()) ||
+ htmlElt->hasLocalName(HTMLTags::tfoot()))
wrapperClass = [DOMHTMLTableSectionElement class];
- else if (htmlElt->hasLocalName(HTMLNames::td()))
+ else if (htmlElt->hasLocalName(HTMLTags::td()))
wrapperClass = [DOMHTMLTableCellElement class];
- else if (htmlElt->hasLocalName(HTMLNames::tr()))
+ else if (htmlElt->hasLocalName(HTMLTags::tr()))
wrapperClass = [DOMHTMLTableRowElement class];
- else if (htmlElt->hasLocalName(HTMLNames::col()) ||
- htmlElt->hasLocalName(HTMLNames::colgroup()))
+ else if (htmlElt->hasLocalName(HTMLTags::col()) ||
+ htmlElt->hasLocalName(HTMLTags::colgroup()))
wrapperClass = [DOMHTMLTableColElement class];
- else if (htmlElt->hasLocalName(HTMLNames::caption()))
+ else if (htmlElt->hasLocalName(HTMLTags::caption()))
wrapperClass = [DOMHTMLTableCaptionElement class];
- else if (htmlElt->hasLocalName(HTMLNames::frameset()))
+ else if (htmlElt->hasLocalName(HTMLTags::frameset()))
wrapperClass = [DOMHTMLFrameSetElement class];
- else if (htmlElt->hasLocalName(HTMLNames::frame()))
+ else if (htmlElt->hasLocalName(HTMLTags::frame()))
wrapperClass = [DOMHTMLFrameElement class];
- else if (htmlElt->hasLocalName(HTMLNames::iframe()))
+ else if (htmlElt->hasLocalName(HTMLTags::iframe()))
wrapperClass = [DOMHTMLIFrameElement class];
else
wrapperClass = [DOMHTMLElement class];
1.21 +1 -1 WebCore/kwq/DOMHTML.mm
Index: DOMHTML.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/DOMHTML.mm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- DOMHTML.mm 18 Jul 2005 21:44:30 -0000 1.20
+++ DOMHTML.mm 18 Jul 2005 21:52:35 -0000 1.21
@@ -53,7 +53,7 @@
using DOM::DOMString;
using DOM::ElementImpl;
using DOM::HTMLAttributes;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLAnchorElementImpl;
using DOM::HTMLAppletElementImpl;
using DOM::HTMLAreaElementImpl;
1.72 +4 -4 WebCore/kwq/KWQAccObject.mm
Index: KWQAccObject.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQAccObject.mm,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- KWQAccObject.mm 18 Jul 2005 21:44:31 -0000 1.71
+++ KWQAccObject.mm 18 Jul 2005 21:52:35 -0000 1.72
@@ -76,7 +76,7 @@
using DOM::HTMLElementImpl;
using DOM::HTMLInputElementImpl;
using DOM::HTMLMapElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::Node;
using DOM::NodeImpl;
using DOM::Position;
@@ -366,7 +366,7 @@
}
if (m_renderer->isListMarker())
return @"AXListMarker";
- if (m_renderer->element() && m_renderer->element()->hasTagName(HTMLNames::button()))
+ if (m_renderer->element() && m_renderer->element()->hasTagName(HTMLTags::button()))
return NSAccessibilityButtonRole;
if (m_renderer->isText())
return NSAccessibilityStaticTextRole;
@@ -532,7 +532,7 @@
if (!m_renderer || m_areaElement || !m_renderer->element())
return nil;
- if (m_renderer->element()->isHTMLElement() && m_renderer->element()->hasTagName(HTMLNames::button()))
+ if (m_renderer->element()->isHTMLElement() && m_renderer->element()->hasTagName(HTMLTags::button()))
return [self textUnderElement];
if (m_renderer->element()->isLink())
return [self textUnderElement];
@@ -622,7 +622,7 @@
return (!m_renderer->isListMarker() && !m_renderer->isCanvas() &&
!m_renderer->isImage() &&
!(m_renderer->element() && m_renderer->element()->isHTMLElement() &&
- m_renderer->element()->hasTagName(HTMLNames::button())));
+ m_renderer->element()->hasTagName(HTMLTags::button())));
}
- (NSArray *)accessibilityAttributeNames
1.11 +2 -2 WebCore/kwq/KWQKHTMLPart.cpp
Index: KWQKHTMLPart.cpp
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- KWQKHTMLPart.cpp 9 Jul 2005 20:19:25 -0000 1.10
+++ KWQKHTMLPart.cpp 18 Jul 2005 21:52:36 -0000 1.11
@@ -32,7 +32,7 @@
using DOM::DocumentImpl;
using DOM::HTMLDocumentImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::NodeImpl;
// FIXME: What on earth is this single tiny file with only this method doing here?
@@ -42,5 +42,5 @@
if (!document || !document->isHTMLDocument())
return false;
NodeImpl *body = static_cast<HTMLDocumentImpl *>(document)->body();
- return body && body->renderer() && body->hasTagName(HTMLNames::frameset());
+ return body && body->renderer() && body->hasTagName(HTMLTags::frameset());
}
1.651 +53 -53 WebCore/kwq/KWQKHTMLPart.mm
Index: KWQKHTMLPart.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
retrieving revision 1.650
retrieving revision 1.651
diff -u -r1.650 -r1.651
--- KWQKHTMLPart.mm 18 Jul 2005 21:44:31 -0000 1.650
+++ KWQKHTMLPart.mm 18 Jul 2005 21:52:36 -0000 1.651
@@ -99,7 +99,7 @@
using DOM::HTMLFormElementImpl;
using DOM::HTMLFrameElementImpl;
using DOM::HTMLGenericFormElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLTableCellElementImpl;
using DOM::Node;
using DOM::NodeImpl;
@@ -364,12 +364,12 @@
{
NodeImpl *n;
for (n = start; n; n = n->traverseNextNode()) {
- if (n->hasTagName(HTMLNames::form())) {
+ if (n->hasTagName(HTMLTags::form())) {
return static_cast<HTMLFormElementImpl *>(n);
} else if (n->isHTMLElement()
&& static_cast<HTMLElementImpl *>(n)->isGenericFormElement()) {
return static_cast<HTMLGenericFormElementImpl *>(n)->form();
- } else if (n->hasTagName(HTMLNames::frame()) || n->hasTagName(HTMLNames::iframe())) {
+ } else if (n->hasTagName(HTMLTags::frame()) || n->hasTagName(HTMLTags::iframe())) {
NodeImpl *childDoc = static_cast<HTMLFrameElementImpl *>(n)->contentDocument();
HTMLFormElementImpl *frameResult = scanForForm(childDoc);
if (frameResult) {
@@ -392,7 +392,7 @@
// try walking up the node tree to find a form element
NodeImpl *n;
for (n = start; n; n = n->parentNode()) {
- if (n->hasTagName(HTMLNames::form())) {
+ if (n->hasTagName(HTMLTags::form())) {
return static_cast<HTMLFormElementImpl *>(n);
} else if (n->isHTMLElement()
&& static_cast<HTMLElementImpl *>(n)->isGenericFormElement()) {
@@ -529,15 +529,15 @@
n && lengthSearched < charsSearchedThreshold;
n = n->traversePreviousNode())
{
- if (n->hasTagName(HTMLNames::form())
+ if (n->hasTagName(HTMLTags::form())
|| (n->isHTMLElement()
&& static_cast<HTMLElementImpl *>(n)->isGenericFormElement()))
{
// We hit another form element or the start of the form - bail out
break;
- } else if (n->hasTagName(HTMLNames::td()) && !startingTableCell) {
+ } else if (n->hasTagName(HTMLTags::td()) && !startingTableCell) {
startingTableCell = static_cast<HTMLTableCellElementImpl *>(n);
- } else if (n->hasTagName(HTMLNames::tr()) && startingTableCell) {
+ } else if (n->hasTagName(HTMLTags::tr()) && startingTableCell) {
NSString *result = searchForLabelsAboveCell(regExp, startingTableCell);
if (result) {
return result;
@@ -2861,7 +2861,7 @@
static ElementImpl *listParent(ElementImpl *item)
{
- while (!item->hasTagName(HTMLNames::ul()) && !item->hasTagName(HTMLNames::ol())) {
+ while (!item->hasTagName(HTMLTags::ul()) && !item->hasTagName(HTMLTags::ol())) {
item = static_cast<ElementImpl *>(item->parentNode());
if (!item)
break;
@@ -2877,7 +2877,7 @@
while (par) {
if (par->firstChild() != e)
return 0;
- if (par->hasTagName(HTMLNames::li()))
+ if (par->hasTagName(HTMLTags::li()))
return par;
e = par;
par = par->parentNode();
@@ -3031,16 +3031,16 @@
} else {
// This is our simple HTML -> ASCII transformation:
QString text;
- if (n->hasTagName(HTMLNames::a())) {
+ if (n->hasTagName(HTMLTags::a())) {
// Note the start of the <a> element. We will add the NSLinkAttributeName
// attribute to the attributed string when navigating to the next sibling
// of this node.
linkStartLocation = [result length];
linkStartNode = static_cast<ElementImpl*>(n);
- } else if (n->hasTagName(HTMLNames::br())) {
+ } else if (n->hasTagName(HTMLTags::br())) {
text += "\n";
hasNewLine = true;
- } else if (n->hasTagName(HTMLNames::li())) {
+ } else if (n->hasTagName(HTMLTags::li())) {
QString listText;
ElementImpl *itemParent = listParent(static_cast<ElementImpl *>(n));
@@ -3094,30 +3094,30 @@
[result appendAttributedString: partialString];
[partialString release];
}
- else if (n->hasTagName(HTMLNames::ol()) || n->hasTagName(HTMLNames::ul())) {
+ else if (n->hasTagName(HTMLTags::ol()) || n->hasTagName(HTMLTags::ul())) {
if (!hasNewLine)
text += "\n";
hasNewLine = true;
- } else if (n->hasTagName(HTMLNames::td()) ||
- n->hasTagName(HTMLNames::th()) ||
- n->hasTagName(HTMLNames::hr()) ||
- n->hasTagName(HTMLNames::dd()) ||
- n->hasTagName(HTMLNames::dl()) ||
- n->hasTagName(HTMLNames::dt()) ||
- n->hasTagName(HTMLNames::pre()) ||
- n->hasTagName(HTMLNames::blockquote()) ||
- n->hasTagName(HTMLNames::div())) {
+ } else if (n->hasTagName(HTMLTags::td()) ||
+ n->hasTagName(HTMLTags::th()) ||
+ n->hasTagName(HTMLTags::hr()) ||
+ n->hasTagName(HTMLTags::dd()) ||
+ n->hasTagName(HTMLTags::dl()) ||
+ n->hasTagName(HTMLTags::dt()) ||
+ n->hasTagName(HTMLTags::pre()) ||
+ n->hasTagName(HTMLTags::blockquote()) ||
+ n->hasTagName(HTMLTags::div())) {
if (!hasNewLine)
text += '\n';
hasNewLine = true;
- } else if (n->hasTagName(HTMLNames::p()) ||
- n->hasTagName(HTMLNames::tr()) ||
- n->hasTagName(HTMLNames::h1()) ||
- n->hasTagName(HTMLNames::h2()) ||
- n->hasTagName(HTMLNames::h3()) ||
- n->hasTagName(HTMLNames::h4()) ||
- n->hasTagName(HTMLNames::h5()) ||
- n->hasTagName(HTMLNames::h6())) {
+ } else if (n->hasTagName(HTMLTags::p()) ||
+ n->hasTagName(HTMLTags::tr()) ||
+ n->hasTagName(HTMLTags::h1()) ||
+ n->hasTagName(HTMLTags::h2()) ||
+ n->hasTagName(HTMLTags::h3()) ||
+ n->hasTagName(HTMLTags::h4()) ||
+ n->hasTagName(HTMLTags::h5()) ||
+ n->hasTagName(HTMLTags::h6())) {
if (!hasNewLine)
text += '\n';
@@ -3133,7 +3133,7 @@
hasNewLine = true;
}
- else if (n->hasTagName(HTMLNames::img())) {
+ else if (n->hasTagName(HTMLTags::img())) {
if (pendingStyledSpace != nil) {
if (linkStartLocation == [result length]) {
++linkStartLocation;
@@ -3171,7 +3171,7 @@
break;
next = n->nextSibling();
- if (n->hasTagName(HTMLNames::a())) {
+ if (n->hasTagName(HTMLTags::a())) {
// End of a <a> element. Create an attributed string NSLinkAttributeName attribute
// for the range of the link. Note that we create the attributed string from the DOM, which
// will have corrected any illegally nested <a> elements.
@@ -3184,11 +3184,11 @@
linkStartNode = 0;
}
}
- else if (n->hasTagName(HTMLNames::ol()) || n->hasTagName(HTMLNames::ul())) {
+ else if (n->hasTagName(HTMLTags::ol()) || n->hasTagName(HTMLTags::ul())) {
if (!hasNewLine)
text += '\n';
hasNewLine = true;
- } else if (n->hasTagName(HTMLNames::li())) {
+ } else if (n->hasTagName(HTMLTags::li())) {
int i, count = listItems.count();
for (i = 0; i < count; i++){
@@ -3200,26 +3200,26 @@
if (!hasNewLine)
text += '\n';
hasNewLine = true;
- } else if (n->hasTagName(HTMLNames::td()) ||
- n->hasTagName(HTMLNames::th()) ||
- n->hasTagName(HTMLNames::hr()) ||
- n->hasTagName(HTMLNames::dd()) ||
- n->hasTagName(HTMLNames::dl()) ||
- n->hasTagName(HTMLNames::dt()) ||
- n->hasTagName(HTMLNames::pre()) ||
- n->hasTagName(HTMLNames::blockquote()) ||
- n->hasTagName(HTMLNames::div())) {
+ } else if (n->hasTagName(HTMLTags::td()) ||
+ n->hasTagName(HTMLTags::th()) ||
+ n->hasTagName(HTMLTags::hr()) ||
+ n->hasTagName(HTMLTags::dd()) ||
+ n->hasTagName(HTMLTags::dl()) ||
+ n->hasTagName(HTMLTags::dt()) ||
+ n->hasTagName(HTMLTags::pre()) ||
+ n->hasTagName(HTMLTags::blockquote()) ||
+ n->hasTagName(HTMLTags::div())) {
if (!hasNewLine)
text += '\n';
hasNewLine = true;
- } else if (n->hasTagName(HTMLNames::p()) ||
- n->hasTagName(HTMLNames::tr()) ||
- n->hasTagName(HTMLNames::h1()) ||
- n->hasTagName(HTMLNames::h2()) ||
- n->hasTagName(HTMLNames::h3()) ||
- n->hasTagName(HTMLNames::h4()) ||
- n->hasTagName(HTMLNames::h5()) ||
- n->hasTagName(HTMLNames::h6())) {
+ } else if (n->hasTagName(HTMLTags::p()) ||
+ n->hasTagName(HTMLTags::tr()) ||
+ n->hasTagName(HTMLTags::h1()) ||
+ n->hasTagName(HTMLTags::h2()) ||
+ n->hasTagName(HTMLTags::h3()) ||
+ n->hasTagName(HTMLTags::h4()) ||
+ n->hasTagName(HTMLTags::h5()) ||
+ n->hasTagName(HTMLTags::h6())) {
if (!hasNewLine)
text += '\n';
// An extra newline is needed at the start, not the end, of these types of tags,
@@ -3457,7 +3457,7 @@
return node->renderer()->style();
int exceptionCode = 0;
- ElementImpl *styleElement = xmlDocImpl()->createElementNS(HTMLNames::xhtmlNamespaceURI(), "span", exceptionCode);
+ ElementImpl *styleElement = xmlDocImpl()->createElementNS(HTMLTags::xhtmlNamespaceURI(), "span", exceptionCode);
ASSERT(exceptionCode == 0);
styleElement->ref();
@@ -3684,7 +3684,7 @@
while (node) {
// Look for a block flow, but skip over the HTML element, since we really
// want to get at least as far as the the BODY element in a document.
- if (node->isBlockFlow() && node->hasTagName(HTMLNames::html()))
+ if (node->isBlockFlow() && node->hasTagName(HTMLTags::html()))
break;
node = node->traverseNextNode();
}
1.403 +6 -6 WebCore/kwq/WebCoreBridge.mm
Index: WebCoreBridge.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/WebCoreBridge.mm,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -r1.402 -r1.403
--- WebCoreBridge.mm 18 Jul 2005 21:44:31 -0000 1.402
+++ WebCoreBridge.mm 18 Jul 2005 21:52:36 -0000 1.403
@@ -97,7 +97,7 @@
using DOM::HTMLGenericFormElementImpl;
using DOM::HTMLImageElementImpl;
using DOM::HTMLInputElementImpl;
-using DOM::HTMLNames;
+using DOM::HTMLTags;
using DOM::HTMLAttributes;
using DOM::NodeImpl;
using DOM::Position;
@@ -912,7 +912,7 @@
static HTMLInputElementImpl *inputElementFromDOMElement(DOMElement *element)
{
NodeImpl *node = [element _nodeImpl];
- if (node->hasTagName(HTMLNames::input())) {
+ if (node->hasTagName(HTMLTags::input())) {
return static_cast<HTMLInputElementImpl *>(node);
}
return nil;
@@ -925,7 +925,7 @@
// maps.google.com crashes otherwise because it is an xslt file
// that contains <form> elements that aren't in any namespace, so
// they come out as generic CML elements
- if (node && node->hasTagName(HTMLNames::form())) {
+ if (node && node->hasTagName(HTMLTags::form())) {
return static_cast<HTMLFormElementImpl *>(node);
}
return nil;
@@ -1095,7 +1095,7 @@
// FIXME: Code copied from RenderImage::updateFromElement; should share.
DOMString attr;
- if (i->hasTagName(HTMLNames::object())) {
+ if (i->hasTagName(HTMLTags::object())) {
attr = i->getAttribute(HTMLAttributes::data());
} else {
attr = i->getAttribute(HTMLAttributes::src());
@@ -1107,9 +1107,9 @@
// FIXME: Code copied from RenderImage::updateFromElement; should share.
DOMString alt;
- if (i->hasTagName(HTMLNames::input()))
+ if (i->hasTagName(HTMLTags::input()))
alt = static_cast<HTMLInputElementImpl *>(i)->altText();
- else if (i->hasTagName(HTMLNames::img()))
+ else if (i->hasTagName(HTMLTags::img()))
alt = static_cast<HTMLImageElementImpl *>(i)->altText();
if (!alt.isNull()) {
QString altText = alt.string();
More information about the webkit-changes
mailing list