Reviewed by Beth.
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2006 00:21:31 +0000 (00:21 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2006 00:21:31 +0000 (00:21 +0000)
        - Global replace of getDocument() with document(). Darin suggested this
        in his review of my EventTargetNode patch. It matches the style of
        methods like ownerDocument().

        - Changed getDocument() to document(); changed data member document to
        m_document; changed stack variable document to doc.

        * bindings/objc/DOM.mm:
        (-[DOMNode ownerDocument]):
        (-[DOMNode KJS::Bindings::]):
        (-[DOMElement _getURLAttribute:]):
        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLElement titleDisplayString]):
        (-[DOMHTMLInputElement altDisplayString]):
        (-[DOMHTMLAnchorElement blur]):
        (-[DOMHTMLAnchorElement focus]):
        (-[DOMHTMLImageElement altDisplayString]):
        (-[DOMHTMLAppletElement altDisplayString]):
        (-[DOMHTMLAreaElement altDisplayString]):
        * bindings/objc/DOMInternal.mm:
        (-[WebScriptObject _initializeScriptDOMNodeImp]):
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::attributedString):
        * bridge/mac/FrameViewMac.mm:
        (WebCore::FrameView::updateDashboardRegions):
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge initSubframeWithRenderer:]):
        (-[WebCoreFrameBridge setSelectedDOMRange:affinity:closeTyping:]):
        (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/css_base.cpp:
        (WebCore::StyleBase::baseURL):
        * css/css_stylesheetimpl.cpp:
        (WebCore::CSSStyleSheet::CSSStyleSheet):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::initForStyleResolve):
        (WebCore::CSSStyleSelector::canShareStyleWithElement):
        (WebCore::CSSStyleSelector::locateSharedStyle):
        (WebCore::CSSStyleSelector::createStyleForElement):
        (WebCore::CSSStyleSelector::createPseudoStyleForElement):
        (WebCore::CSSStyleSelector::adjustRenderStyle):
        (WebCore::CSSStyleSelector::styleRulesForElement):
        (WebCore::CSSStyleSelector::checkOneSelector):
        (WebCore::CSSStyleSelector::applyProperty):
        (WebCore::CSSStyleSelector::mapBackgroundImage):
        (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
        * dom/AbstractView.cpp:
        (WebCore::AbstractView::AbstractView):
        * dom/CDATASection.cpp:
        (WebCore::CDATASection::cloneNode):
        (WebCore::CDATASection::createNew):
        * dom/CharacterData.cpp:
        (WebCore::CharacterData::setData):
        (WebCore::CharacterData::insertData):
        (WebCore::CharacterData::deleteData):
        (WebCore::CharacterData::replaceData):
        (WebCore::CharacterData::dispatchModifiedEvent):
        * dom/Comment.cpp:
        (WebCore::Comment::cloneNode):
        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::insertBefore):
        (WebCore::ContainerNode::replaceChild):
        (WebCore::ContainerNode::removeChild):
        (WebCore::ContainerNode::appendChild):
        (WebCore::ContainerNode::addChild):
        (WebCore::ContainerNode::getUpperLeftCorner):
        (WebCore::dispatchChildInsertionEvents):
        (WebCore::dispatchChildRemovalEvents):
        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::~Document):
        (WebCore::Document::createDocumentFragment):
        (WebCore::Document::adoptNode):
        (WebCore::Document::createElementNS):
        (WebCore::Document::nodeAbsIndex):
        (WebCore::Document::setFocusNode):
        (WebCore::Document::topDocument):
        * dom/DocumentFragment.cpp:
        (WebCore::DocumentFragment::cloneNode):
        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::~EventTargetNode):
        (WebCore::EventTargetNode::insertedIntoDocument):
        (WebCore::EventTargetNode::removedFromDocument):
        (WebCore::EventTargetNode::addEventListener):
        (WebCore::EventTargetNode::removeEventListener):
        (WebCore::EventTargetNode::dispatchGenericEvent):
        (WebCore::EventTargetNode::dispatchEvent):
        (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
        (WebCore::EventTargetNode::dispatchWindowEvent):
        (WebCore::EventTargetNode::dispatchUIEvent):
        (WebCore::EventTargetNode::dispatchKeyEvent):
        (WebCore::EventTargetNode::dispatchMouseEvent):
        (WebCore::EventTargetNode::dispatchWheelEvent):
        (WebCore::EventTargetNode::removeHTMLEventListener):
        * dom/Node.cpp:
        (WebCore::Node::Node):
        (WebCore::Node::setDocument):
        (WebCore::Node::setChanged):
        (WebCore::Node::checkSetPrefix):
        (WebCore::Node::checkAddChild):
        (WebCore::Node::attach):
        (WebCore::Node::detach):
        (WebCore::Node::createRendererIfNeeded):
        (WebCore::Node::rendererIsNeeded):
        (WebCore::Node::getElementsByTagNameNS):
        (WebCore::Node::ownerDocument):
        (WebCore::Node::setTextContent):
        * dom/Node.h:
        (WebCore::Node::document):
        (WebCore::Node::inDocument):
        * dom/NodeList.cpp:
        (WebCore::NodeList::itemById):
        * dom/Position.cpp:
        (WebCore::Position::documentElement):
        * dom/Range.cpp:
        (WebCore::Range::commonAncestorContainer):
        (WebCore::Range::setStart):
        (WebCore::Range::setEnd):
        (WebCore::Range::compareBoundaryPoints):
        (WebCore::Range::insertNode):
        (WebCore::Range::text):
        (WebCore::Range::setStartAfter):
        (WebCore::Range::setEndBefore):
        (WebCore::Range::setEndAfter):
        (WebCore::Range::surroundContents):
        (WebCore::Range::setStartBefore):
        (WebCore::rangeOfContents):
        * dom/Text.cpp:
        (WebCore::Text::cloneNode):
        (WebCore::Text::createNew):
        * dom/dom2_eventsimpl.cpp:
        (WebCore::MouseRelatedEvent::receivedTarget):
        * dom/dom2_traversalimpl.cpp:
        (WebCore::NodeIterator::NodeIterator):
        * dom/dom_elementimpl.cpp:
        (WebCore::Attribute::createAttrIfNeeded):
        (WebCore::Attr::createTextChild):
        (WebCore::Attr::setValue):
        (WebCore::Attr::cloneNode):
        (WebCore::Element::cloneNode):
        (WebCore::inHTMLDocument):
        (WebCore::Element::setAttribute):
        (WebCore::Element::setAttributeMap):
        (WebCore::Element::createStyleForRenderer):
        (WebCore::Element::createRenderer):
        (WebCore::Element::recalcStyle):
        (WebCore::Element::dispatchAttrRemovalEvent):
        (WebCore::Element::dispatchAttrAdditionEvent):
        (WebCore::Element::updateId):
        (WebCore::Element::removeAttributeNode):
        (WebCore::Element::focus):
        (WebCore::Element::blur):
        (WebCore::NamedAttrMap::setNamedItem):
        (WebCore::NamedMappedAttrMap::parseClassAttribute):
        (WebCore::StyledElement::createInlineStyleDecl):
        (WebCore::StyledElement::parseMappedAttribute):
        (WebCore::StyledElement::createMappedDecl):
        * dom/dom_xmlimpl.cpp:
        (WebCore::EntityReference::cloneNode):
        (WebCore::ProcessingInstruction::cloneNode):
        (WebCore::ProcessingInstruction::checkStyleSheet):
        (WebCore::ProcessingInstruction::sheetLoaded):
        (WebCore::ProcessingInstruction::setStyleSheet):
        * dom/xml_tokenizer.cpp:
        (WebCore::XMLTokenizer::XMLTokenizer):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::ReplacementFragment):
        (WebCore::ReplaceSelectionCommand::fixupNodeStyles):
        (WebCore::styleForNode):
        * editing/Selection.cpp:
        (WebCore::Selection::toRange):
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::~SelectionController):
        (WebCore::SelectionController::setSelection):
        (WebCore::SelectionController::xPosForVerticalArrowNavigation):
        (WebCore::SelectionController::frame):
        (WebCore::SelectionController::layout):
        (WebCore::SelectionController::needsCaretRepaint):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::range):
        (WebCore::SimplifiedBackwardsTextIterator::range):
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::init):
        (WebCore::makeRange):
        * editing/markup.cpp:
        (WebCore::startMarkup):
        (WebCore::shouldSelfClose):
        (WebCore::markup):
        (WebCore::createMarkup):
        * editing/visible_units.cpp:
        (WebCore::previousBoundary):
        (WebCore::nextBoundary):
        (WebCore::previousLinePosition):
        (WebCore::nextLinePosition):
        (WebCore::inSameDocument):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::HTMLCollection):
        (WebCore::HTMLCollection::resetCollectionInfo):
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::nodeName):
        (WebCore::HTMLElement::cloneNode):
        (WebCore::HTMLElement::innerText):
        (WebCore::HTMLElement::createContextualFragment):
        (WebCore::HTMLElement::setInnerText):
        (WebCore::HTMLElement::setOuterText):
        (WebCore::HTMLElement::isContentEditable):
        (WebCore::HTMLElement::contentEditable):
        (WebCore::HTMLElement::toString):
        (WebCore::HTMLElement::childAllowed):
        (WebCore::HTMLElement::setHTMLEventListener):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
        (WebCore::HTMLFormElement::attach):
        (WebCore::HTMLFormElement::insertedIntoDocument):
        (WebCore::HTMLFormElement::removedFromDocument):
        (WebCore::HTMLFormElement::formData):
        (WebCore::HTMLFormElement::prepareSubmit):
        (WebCore::HTMLFormElement::submit):
        (WebCore::HTMLFormElement::reset):
        (WebCore::HTMLFormElement::parseMappedAttribute):
        (WebCore::HTMLFormElement::registerFormElement):
        (WebCore::HTMLFormElement::removeFormElement):
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::attach):
        (WebCore::HTMLGenericFormElement::insertedIntoTree):
        (WebCore::HTMLGenericFormElement::isKeyboardFocusable):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::~HTMLInputElement):
        (WebCore::HTMLInputElement::isKeyboardFocusable):
        (WebCore::HTMLInputElement::focus):
        (WebCore::HTMLInputElement::setInputType):
        (WebCore::HTMLInputElement::parseMappedAttribute):
        (WebCore::HTMLInputElement::attach):
        (WebCore::HTMLInputElement::setChecked):
        (WebCore::HTMLInputElement::preDispatchEventHandler):
        (WebCore::HTMLInputElement::defaultEventHandler):
        (WebCore::HTMLInputElement::src):
        * html/HTMLKeygenElement.cpp:
        (WebCore::HTMLKeygenElement::appendFormData):
        * html/HTMLLabelElement.cpp:
        (WebCore::HTMLLabelElement::formElement):
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::text):
        (WebCore::HTMLOptionElement::setText):
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::HTMLParser):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::~HTMLSelectElement):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement):
        (WebCore::HTMLTextAreaElement::setDefaultValue):
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::HTMLTokenizer):
        * html/html_baseimpl.cpp:
        (WebCore::HTMLBodyElement::createLinkDecl):
        (WebCore::HTMLBodyElement::mapToEntry):
        (WebCore::HTMLBodyElement::parseMappedAttribute):
        (WebCore::HTMLBodyElement::insertedIntoDocument):
        (WebCore::HTMLFrameElement::isURLAllowed):
        (WebCore::HTMLFrameElement::openURL):
        (WebCore::HTMLFrameElement::attach):
        (WebCore::HTMLFrameElement::close):
        (WebCore::HTMLFrameElement::contentFrame):
        (WebCore::HTMLFrameElement::frameWidth):
        (WebCore::HTMLFrameElement::frameHeight):
        (WebCore::HTMLFrameSetElement::parseMappedAttribute):
        (WebCore::HTMLIFrameElement::parseMappedAttribute):
        (WebCore::HTMLIFrameElement::insertedIntoDocument):
        (WebCore::HTMLIFrameElement::removedFromDocument):
        (WebCore::HTMLIFrameElement::attach):
        (WebCore::HTMLIFrameElement::src):
        * html/html_blockimpl.cpp:
        (WebCore::HTMLParagraphElement::checkDTD):
        * html/html_headimpl.cpp:
        (WebCore::HTMLBaseElement::removedFromDocument):
        (WebCore::HTMLBaseElement::process):
        (WebCore::HTMLLinkElement::setDisabledState):
        (WebCore::HTMLLinkElement::parseMappedAttribute):
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::setStyleSheet):
        (WebCore::HTMLLinkElement::sheetLoaded):
        (WebCore::HTMLLinkElement::href):
        (WebCore::HTMLMetaElement::process):
        (WebCore::HTMLScriptElement::childrenChanged):
        (WebCore::HTMLScriptElement::parseMappedAttribute):
        (WebCore::HTMLScriptElement::insertedIntoDocument):
        (WebCore::HTMLScriptElement::evaluateScript):
        (WebCore::HTMLScriptElement::setText):
        (WebCore::HTMLScriptElement::src):
        (WebCore::HTMLStyleElement::insertedIntoDocument):
        (WebCore::HTMLStyleElement::removedFromDocument):
        (WebCore::HTMLStyleElement::childrenChanged):
        (WebCore::HTMLStyleElement::sheetLoaded):
        (WebCore::HTMLTitleElement::insertedIntoDocument):
        (WebCore::HTMLTitleElement::removedFromDocument):
        (WebCore::HTMLTitleElement::childrenChanged):
        (WebCore::HTMLTitleElement::setText):
        * html/html_imageimpl.cpp:
        (WebCore::HTMLImageLoader::~HTMLImageLoader):
        (WebCore::HTMLImageLoader::updateFromElement):
        (WebCore::HTMLImageLoader::notifyFinished):
        (WebCore::HTMLImageElement::parseMappedAttribute):
        (WebCore::HTMLImageElement::insertedIntoDocument):
        (WebCore::HTMLImageElement::removedFromDocument):
        (WebCore::HTMLImageElement::width):
        (WebCore::HTMLImageElement::height):
        (WebCore::HTMLImageElement::src):
        (WebCore::HTMLMapElement::~HTMLMapElement):
        (WebCore::HTMLMapElement::parseMappedAttribute):
        (WebCore::HTMLAreaElement::href):
        * html/html_inlineimpl.cpp:
        (WebCore::HTMLAnchorElement::isKeyboardFocusable):
        (WebCore::HTMLAnchorElement::defaultEventHandler):
        (WebCore::HTMLAnchorElement::href):
        (WebCore::HTMLAnchorElement::blur):
        (WebCore::HTMLAnchorElement::focus):
        * html/html_objectimpl.cpp:
        (WebCore::HTMLAppletElement::parseMappedAttribute):
        (WebCore::HTMLAppletElement::insertedIntoDocument):
        (WebCore::HTMLAppletElement::removedFromDocument):
        (WebCore::HTMLAppletElement::createRenderer):
        (WebCore::HTMLAppletElement::getAppletInstance):
        (WebCore::HTMLEmbedElement::getEmbedInstance):
        (WebCore::HTMLEmbedElement::parseMappedAttribute):
        (WebCore::HTMLEmbedElement::rendererIsNeeded):
        (WebCore::HTMLEmbedElement::insertedIntoDocument):
        (WebCore::HTMLEmbedElement::removedFromDocument):
        (WebCore::HTMLObjectElement::getObjectInstance):
        (WebCore::HTMLObjectElement::parseMappedAttribute):
        (WebCore::HTMLObjectElement::rendererIsNeeded):
        (WebCore::HTMLObjectElement::insertedIntoDocument):
        (WebCore::HTMLObjectElement::removedFromDocument):
        (WebCore::HTMLObjectElement::updateDocNamedItem):
        (WebCore::HTMLParamElement::parseMappedAttribute):
        * html/html_tableimpl.cpp:
        (WebCore::HTMLTableElement::createTHead):
        (WebCore::HTMLTableElement::createTFoot):
        (WebCore::HTMLTableElement::createCaption):
        (WebCore::HTMLTableElement::insertRow):
        (WebCore::HTMLTableElement::addChild):
        (WebCore::HTMLTableElement::mapToEntry):
        (WebCore::HTMLTableElement::parseMappedAttribute):
        (WebCore::HTMLTableElement::additionalAttributeStyleDecl):
        (WebCore::HTMLTableElement::getSharedCellDecl):
        (WebCore::HTMLTablePartElement::mapToEntry):
        (WebCore::HTMLTablePartElement::parseMappedAttribute):
        (WebCore::HTMLTableSectionElement::insertRow):
        (WebCore::HTMLTableRowElement::insertCell):
        * khtml/ecma/kjs_dom.cpp:
        (KJS::DOMNode::~DOMNode):
        (KJS::DOMNode::mark):
        (KJS::DOMElement::getValueProperty):
        (KJS::DOMElementProtoFunc::callAsFunction):
        (KJS::checkNodeSecurity):
        (KJS::toJS):
        * khtml/ecma/kjs_html.cpp:
        (KJS::JSHTMLElement::implementsCall):
        (KJS::JSHTMLElement::bodyGetter):
        (KJS::JSHTMLElement::anchorGetter):
        (KJS::JSHTMLElement::getValueProperty):
        (KJS::JSHTMLElement::bodySetter):
        * khtml/ecma/kjs_traversal.cpp:
        (KJS::JSNodeFilterCondition::acceptNode):
        * khtml/ecma/kjs_views.cpp:
        (KJS::DOMAbstractViewProtoFunc::callAsFunction):
        * khtml/xbl/xbl_binding.cpp:
        (XBL::XBLBindingChain::failed):
        (XBL::m_nextBinding):
        (XBL::XBLBinding::setXBLDocument):
        * khtml/xbl/xbl_protobinding.cpp:
        (XBL::XBLPrototypeBinding::document):
        * khtml/xsl/XSLStyleSheet.cpp:
        (WebCore::XSLStyleSheet::XSLStyleSheet):
        * khtml/xsl/XSLTProcessor.cpp:
        (WebCore::XSLTProcessor::createDocumentFromSource):
        (WebCore::xmlDocPtrFromNode):
        (WebCore::XSLTProcessor::transformToString):
        * ksvg2/svg/SVGAElement.cpp:
        (SVGAElement::defaultEventHandler):
        * ksvg2/svg/SVGAnimateColorElement.cpp:
        (SVGAnimateColorElement::handleTimerEvent):
        * ksvg2/svg/SVGAnimateElement.cpp:
        (SVGAnimateElement::handleTimerEvent):
        * ksvg2/svg/SVGAnimateTransformElement.cpp:
        (SVGAnimateTransformElement::handleTimerEvent):
        * ksvg2/svg/SVGAnimationElement.cpp:
        (SVGAnimationElement::closeRenderer):
        * ksvg2/svg/SVGClipPathElement.cpp:
        (SVGClipPathElement::canvasResource):
        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::addSVGEventListener):
        * ksvg2/svg/SVGGradientElement.cpp:
        (SVGGradientElement::rebuildStops):
        * ksvg2/svg/SVGHelper.cpp:
        (SVGHelper::PercentageOfViewport):
        * ksvg2/svg/SVGLinearGradientElement.cpp:
        (SVGLinearGradientElement::buildGradient):
        * ksvg2/svg/SVGPatternElement.cpp:
        (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
        * ksvg2/svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):
        * ksvg2/svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::setCurrentScale):
        (WebCore::SVGSVGElement::addSVGWindowEventListner):
        * ksvg2/svg/SVGSetElement.cpp:
        (SVGSetElement::handleTimerEvent):
        * ksvg2/svg/SVGStyleElement.cpp:
        (SVGStyleElement::childrenChanged):
        * ksvg2/svg/SVGStyledElement.cpp:
        (WebCore::SVGStyledElement::canvas):
        * ksvg2/svg/SVGTitleElement.cpp:
        (WebCore::SVGTitleElement::closeRenderer):
        (WebCore::SVGTitleElement::insertedIntoDocument):
        (WebCore::SVGTitleElement::removedFromDocument):
        (WebCore::SVGTitleElement::childrenChanged):
        * ksvg2/svg/SVGUseElement.cpp:
        (SVGUseElement::closeRenderer):
        * kwq/WebCoreAXObject.mm:
        (-[WebCoreAXObject accessibilityPerformAction:]):
        (-[WebCoreAXObject accessibilityAttributeValue:]):
        * page/Frame.cpp:
        (WebCore::parentFromOwnerRenderer):
        (WebCore::Frame::frameForNode):
        (WebCore::Frame::clearDocumentFocus):
        * page/FrameView.cpp:
        (WebCore::FrameView::dispatchMouseEvent):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::setStyle):
        * rendering/RenderCanvas.cpp:
        (WebCore::RenderCanvas::RenderCanvas):
        (WebCore::RenderCanvas::paintBoxDecorations):
        (WebCore::RenderCanvas::repaintViewRectangle):
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::imageMap):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::createObject):
        (WebCore::RenderObject::RenderObject):
        (WebCore::RenderObject::isRoot):
        (WebCore::RenderObject::backslashAsCurrencySymbol):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::document):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::isFocused):
        * rendering/render_applet.cpp:
        (WebCore::RenderApplet::createWidgetIfNecessary):
        * rendering/render_replaced.cpp:
        (WebCore::RenderWidget::RenderWidget):
        (WebCore::RenderWidget::focusIn):
        (WebCore::RenderWidget::focusOut):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

94 files changed:
WebCore/ChangeLog
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMHTML.mm
WebCore/bindings/objc/DOMInternal.mm
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/FrameViewMac.mm
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/css_base.cpp
WebCore/css/css_stylesheetimpl.cpp
WebCore/css/cssstyleselector.cpp
WebCore/dom/AbstractView.cpp
WebCore/dom/CDATASection.cpp
WebCore/dom/CharacterData.cpp
WebCore/dom/Comment.cpp
WebCore/dom/ContainerNode.cpp
WebCore/dom/DOMImplementation.cpp
WebCore/dom/Document.cpp
WebCore/dom/DocumentFragment.cpp
WebCore/dom/EventTargetNode.cpp
WebCore/dom/Node.cpp
WebCore/dom/Node.h
WebCore/dom/NodeList.cpp
WebCore/dom/Position.cpp
WebCore/dom/Range.cpp
WebCore/dom/Text.cpp
WebCore/dom/dom2_eventsimpl.cpp
WebCore/dom/dom2_traversalimpl.cpp
WebCore/dom/dom_xmlimpl.cpp
WebCore/dom/xml_tokenizer.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/Selection.cpp
WebCore/editing/SelectionController.cpp
WebCore/editing/TextIterator.cpp
WebCore/editing/VisiblePosition.cpp
WebCore/editing/markup.cpp
WebCore/editing/visible_units.cpp
WebCore/html/HTMLCollection.cpp
WebCore/html/HTMLElement.cpp
WebCore/html/HTMLFormElement.cpp
WebCore/html/HTMLGenericFormElement.cpp
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLKeygenElement.cpp
WebCore/html/HTMLLabelElement.cpp
WebCore/html/HTMLOptionElement.cpp
WebCore/html/HTMLParser.cpp
WebCore/html/HTMLSelectElement.cpp
WebCore/html/HTMLTextAreaElement.cpp
WebCore/html/HTMLTokenizer.cpp
WebCore/html/html_baseimpl.cpp
WebCore/html/html_blockimpl.cpp
WebCore/html/html_headimpl.cpp
WebCore/html/html_imageimpl.cpp
WebCore/html/html_inlineimpl.cpp
WebCore/html/html_objectimpl.cpp
WebCore/html/html_tableimpl.cpp
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/ecma/kjs_traversal.cpp
WebCore/khtml/ecma/kjs_views.cpp
WebCore/khtml/xbl/xbl_binding.cpp
WebCore/khtml/xbl/xbl_protobinding.cpp
WebCore/khtml/xsl/XSLStyleSheet.cpp
WebCore/khtml/xsl/XSLTProcessor.cpp
WebCore/ksvg2/svg/SVGAElement.cpp
WebCore/ksvg2/svg/SVGAnimateColorElement.cpp
WebCore/ksvg2/svg/SVGAnimateElement.cpp
WebCore/ksvg2/svg/SVGAnimateTransformElement.cpp
WebCore/ksvg2/svg/SVGAnimationElement.cpp
WebCore/ksvg2/svg/SVGClipPathElement.cpp
WebCore/ksvg2/svg/SVGElement.cpp
WebCore/ksvg2/svg/SVGGradientElement.cpp
WebCore/ksvg2/svg/SVGHelper.cpp
WebCore/ksvg2/svg/SVGLinearGradientElement.cpp
WebCore/ksvg2/svg/SVGPatternElement.cpp
WebCore/ksvg2/svg/SVGRadialGradientElement.cpp
WebCore/ksvg2/svg/SVGSVGElement.cpp
WebCore/ksvg2/svg/SVGSetElement.cpp
WebCore/ksvg2/svg/SVGStyleElement.cpp
WebCore/ksvg2/svg/SVGStyledElement.cpp
WebCore/ksvg2/svg/SVGTitleElement.cpp
WebCore/ksvg2/svg/SVGUseElement.cpp
WebCore/kwq/WebCoreAXObject.mm
WebCore/page/Frame.cpp
WebCore/page/FrameView.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderCanvas.cpp
WebCore/rendering/RenderImage.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderTheme.cpp
WebCore/rendering/render_applet.cpp
WebCore/rendering/render_replaced.cpp

index 726ea1b6d6891ada848f2c03374ff7605cb11e67..3feb487903879fb9853069985ad42e42677b5869 100644 (file)
@@ -1,3 +1,463 @@
+2006-03-28  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Beth.
+
+        - Global replace of getDocument() with document(). Darin suggested this
+        in his review of my EventTargetNode patch. It matches the style of
+        methods like ownerDocument().
+
+        - Changed getDocument() to document(); changed data member document to
+        m_document; changed stack variable document to doc.
+
+        * bindings/objc/DOM.mm:
+        (-[DOMNode ownerDocument]):
+        (-[DOMNode KJS::Bindings::]):
+        (-[DOMElement _getURLAttribute:]):
+        * bindings/objc/DOMHTML.mm:
+        (-[DOMHTMLElement titleDisplayString]):
+        (-[DOMHTMLInputElement altDisplayString]):
+        (-[DOMHTMLAnchorElement blur]):
+        (-[DOMHTMLAnchorElement focus]):
+        (-[DOMHTMLImageElement altDisplayString]):
+        (-[DOMHTMLAppletElement altDisplayString]):
+        (-[DOMHTMLAreaElement altDisplayString]):
+        * bindings/objc/DOMInternal.mm:
+        (-[WebScriptObject _initializeScriptDOMNodeImp]):
+        * bridge/mac/FrameMac.mm:
+        (WebCore::FrameMac::attributedString):
+        * bridge/mac/FrameViewMac.mm:
+        (WebCore::FrameView::updateDashboardRegions):
+        * bridge/mac/WebCoreFrameBridge.mm:
+        (-[WebCoreFrameBridge initSubframeWithRenderer:]):
+        (-[WebCoreFrameBridge setSelectedDOMRange:affinity:closeTyping:]):
+        (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/css_base.cpp:
+        (WebCore::StyleBase::baseURL):
+        * css/css_stylesheetimpl.cpp:
+        (WebCore::CSSStyleSheet::CSSStyleSheet):
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::initForStyleResolve):
+        (WebCore::CSSStyleSelector::canShareStyleWithElement):
+        (WebCore::CSSStyleSelector::locateSharedStyle):
+        (WebCore::CSSStyleSelector::createStyleForElement):
+        (WebCore::CSSStyleSelector::createPseudoStyleForElement):
+        (WebCore::CSSStyleSelector::adjustRenderStyle):
+        (WebCore::CSSStyleSelector::styleRulesForElement):
+        (WebCore::CSSStyleSelector::checkOneSelector):
+        (WebCore::CSSStyleSelector::applyProperty):
+        (WebCore::CSSStyleSelector::mapBackgroundImage):
+        (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
+        * dom/AbstractView.cpp:
+        (WebCore::AbstractView::AbstractView):
+        * dom/CDATASection.cpp:
+        (WebCore::CDATASection::cloneNode):
+        (WebCore::CDATASection::createNew):
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::setData):
+        (WebCore::CharacterData::insertData):
+        (WebCore::CharacterData::deleteData):
+        (WebCore::CharacterData::replaceData):
+        (WebCore::CharacterData::dispatchModifiedEvent):
+        * dom/Comment.cpp:
+        (WebCore::Comment::cloneNode):
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::insertBefore):
+        (WebCore::ContainerNode::replaceChild):
+        (WebCore::ContainerNode::removeChild):
+        (WebCore::ContainerNode::appendChild):
+        (WebCore::ContainerNode::addChild):
+        (WebCore::ContainerNode::getUpperLeftCorner):
+        (WebCore::dispatchChildInsertionEvents):
+        (WebCore::dispatchChildRemovalEvents):
+        * dom/DOMImplementation.cpp:
+        (WebCore::DOMImplementation::createDocument):
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::~Document):
+        (WebCore::Document::createDocumentFragment):
+        (WebCore::Document::adoptNode):
+        (WebCore::Document::createElementNS):
+        (WebCore::Document::nodeAbsIndex):
+        (WebCore::Document::setFocusNode):
+        (WebCore::Document::topDocument):
+        * dom/DocumentFragment.cpp:
+        (WebCore::DocumentFragment::cloneNode):
+        * dom/EventTargetNode.cpp:
+        (WebCore::EventTargetNode::~EventTargetNode):
+        (WebCore::EventTargetNode::insertedIntoDocument):
+        (WebCore::EventTargetNode::removedFromDocument):
+        (WebCore::EventTargetNode::addEventListener):
+        (WebCore::EventTargetNode::removeEventListener):
+        (WebCore::EventTargetNode::dispatchGenericEvent):
+        (WebCore::EventTargetNode::dispatchEvent):
+        (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
+        (WebCore::EventTargetNode::dispatchWindowEvent):
+        (WebCore::EventTargetNode::dispatchUIEvent):
+        (WebCore::EventTargetNode::dispatchKeyEvent):
+        (WebCore::EventTargetNode::dispatchMouseEvent):
+        (WebCore::EventTargetNode::dispatchWheelEvent):
+        (WebCore::EventTargetNode::removeHTMLEventListener):
+        * dom/Node.cpp:
+        (WebCore::Node::Node):
+        (WebCore::Node::setDocument):
+        (WebCore::Node::setChanged):
+        (WebCore::Node::checkSetPrefix):
+        (WebCore::Node::checkAddChild):
+        (WebCore::Node::attach):
+        (WebCore::Node::detach):
+        (WebCore::Node::createRendererIfNeeded):
+        (WebCore::Node::rendererIsNeeded):
+        (WebCore::Node::getElementsByTagNameNS):
+        (WebCore::Node::ownerDocument):
+        (WebCore::Node::setTextContent):
+        * dom/Node.h:
+        (WebCore::Node::document):
+        (WebCore::Node::inDocument):
+        * dom/NodeList.cpp:
+        (WebCore::NodeList::itemById):
+        * dom/Position.cpp:
+        (WebCore::Position::documentElement):
+        * dom/Range.cpp:
+        (WebCore::Range::commonAncestorContainer):
+        (WebCore::Range::setStart):
+        (WebCore::Range::setEnd):
+        (WebCore::Range::compareBoundaryPoints):
+        (WebCore::Range::insertNode):
+        (WebCore::Range::text):
+        (WebCore::Range::setStartAfter):
+        (WebCore::Range::setEndBefore):
+        (WebCore::Range::setEndAfter):
+        (WebCore::Range::surroundContents):
+        (WebCore::Range::setStartBefore):
+        (WebCore::rangeOfContents):
+        * dom/Text.cpp:
+        (WebCore::Text::cloneNode):
+        (WebCore::Text::createNew):
+        * dom/dom2_eventsimpl.cpp:
+        (WebCore::MouseRelatedEvent::receivedTarget):
+        * dom/dom2_traversalimpl.cpp:
+        (WebCore::NodeIterator::NodeIterator):
+        * dom/dom_elementimpl.cpp:
+        (WebCore::Attribute::createAttrIfNeeded):
+        (WebCore::Attr::createTextChild):
+        (WebCore::Attr::setValue):
+        (WebCore::Attr::cloneNode):
+        (WebCore::Element::cloneNode):
+        (WebCore::inHTMLDocument):
+        (WebCore::Element::setAttribute):
+        (WebCore::Element::setAttributeMap):
+        (WebCore::Element::createStyleForRenderer):
+        (WebCore::Element::createRenderer):
+        (WebCore::Element::recalcStyle):
+        (WebCore::Element::dispatchAttrRemovalEvent):
+        (WebCore::Element::dispatchAttrAdditionEvent):
+        (WebCore::Element::updateId):
+        (WebCore::Element::removeAttributeNode):
+        (WebCore::Element::focus):
+        (WebCore::Element::blur):
+        (WebCore::NamedAttrMap::setNamedItem):
+        (WebCore::NamedMappedAttrMap::parseClassAttribute):
+        (WebCore::StyledElement::createInlineStyleDecl):
+        (WebCore::StyledElement::parseMappedAttribute):
+        (WebCore::StyledElement::createMappedDecl):
+        * dom/dom_xmlimpl.cpp:
+        (WebCore::EntityReference::cloneNode):
+        (WebCore::ProcessingInstruction::cloneNode):
+        (WebCore::ProcessingInstruction::checkStyleSheet):
+        (WebCore::ProcessingInstruction::sheetLoaded):
+        (WebCore::ProcessingInstruction::setStyleSheet):
+        * dom/xml_tokenizer.cpp:
+        (WebCore::XMLTokenizer::XMLTokenizer):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplacementFragment::ReplacementFragment):
+        (WebCore::ReplaceSelectionCommand::fixupNodeStyles):
+        (WebCore::styleForNode):
+        * editing/Selection.cpp:
+        (WebCore::Selection::toRange):
+        * editing/SelectionController.cpp:
+        (WebCore::SelectionController::~SelectionController):
+        (WebCore::SelectionController::setSelection):
+        (WebCore::SelectionController::xPosForVerticalArrowNavigation):
+        (WebCore::SelectionController::frame):
+        (WebCore::SelectionController::layout):
+        (WebCore::SelectionController::needsCaretRepaint):
+        * editing/TextIterator.cpp:
+        (WebCore::TextIterator::range):
+        (WebCore::SimplifiedBackwardsTextIterator::range):
+        * editing/VisiblePosition.cpp:
+        (WebCore::VisiblePosition::init):
+        (WebCore::makeRange):
+        * editing/markup.cpp:
+        (WebCore::startMarkup):
+        (WebCore::shouldSelfClose):
+        (WebCore::markup):
+        (WebCore::createMarkup):
+        * editing/visible_units.cpp:
+        (WebCore::previousBoundary):
+        (WebCore::nextBoundary):
+        (WebCore::previousLinePosition):
+        (WebCore::nextLinePosition):
+        (WebCore::inSameDocument):
+        * html/HTMLCollection.cpp:
+        (WebCore::HTMLCollection::HTMLCollection):
+        (WebCore::HTMLCollection::resetCollectionInfo):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::nodeName):
+        (WebCore::HTMLElement::cloneNode):
+        (WebCore::HTMLElement::innerText):
+        (WebCore::HTMLElement::createContextualFragment):
+        (WebCore::HTMLElement::setInnerText):
+        (WebCore::HTMLElement::setOuterText):
+        (WebCore::HTMLElement::isContentEditable):
+        (WebCore::HTMLElement::contentEditable):
+        (WebCore::HTMLElement::toString):
+        (WebCore::HTMLElement::childAllowed):
+        (WebCore::HTMLElement::setHTMLEventListener):
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
+        (WebCore::HTMLFormElement::attach):
+        (WebCore::HTMLFormElement::insertedIntoDocument):
+        (WebCore::HTMLFormElement::removedFromDocument):
+        (WebCore::HTMLFormElement::formData):
+        (WebCore::HTMLFormElement::prepareSubmit):
+        (WebCore::HTMLFormElement::submit):
+        (WebCore::HTMLFormElement::reset):
+        (WebCore::HTMLFormElement::parseMappedAttribute):
+        (WebCore::HTMLFormElement::registerFormElement):
+        (WebCore::HTMLFormElement::removeFormElement):
+        * html/HTMLGenericFormElement.cpp:
+        (WebCore::HTMLGenericFormElement::attach):
+        (WebCore::HTMLGenericFormElement::insertedIntoTree):
+        (WebCore::HTMLGenericFormElement::isKeyboardFocusable):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::~HTMLInputElement):
+        (WebCore::HTMLInputElement::isKeyboardFocusable):
+        (WebCore::HTMLInputElement::focus):
+        (WebCore::HTMLInputElement::setInputType):
+        (WebCore::HTMLInputElement::parseMappedAttribute):
+        (WebCore::HTMLInputElement::attach):
+        (WebCore::HTMLInputElement::setChecked):
+        (WebCore::HTMLInputElement::preDispatchEventHandler):
+        (WebCore::HTMLInputElement::defaultEventHandler):
+        (WebCore::HTMLInputElement::src):
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::HTMLKeygenElement::appendFormData):
+        * html/HTMLLabelElement.cpp:
+        (WebCore::HTMLLabelElement::formElement):
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::text):
+        (WebCore::HTMLOptionElement::setText):
+        * html/HTMLParser.cpp:
+        (WebCore::HTMLParser::HTMLParser):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::~HTMLSelectElement):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement):
+        (WebCore::HTMLTextAreaElement::setDefaultValue):
+        * html/HTMLTokenizer.cpp:
+        (WebCore::HTMLTokenizer::HTMLTokenizer):
+        * html/html_baseimpl.cpp:
+        (WebCore::HTMLBodyElement::createLinkDecl):
+        (WebCore::HTMLBodyElement::mapToEntry):
+        (WebCore::HTMLBodyElement::parseMappedAttribute):
+        (WebCore::HTMLBodyElement::insertedIntoDocument):
+        (WebCore::HTMLFrameElement::isURLAllowed):
+        (WebCore::HTMLFrameElement::openURL):
+        (WebCore::HTMLFrameElement::attach):
+        (WebCore::HTMLFrameElement::close):
+        (WebCore::HTMLFrameElement::contentFrame):
+        (WebCore::HTMLFrameElement::frameWidth):
+        (WebCore::HTMLFrameElement::frameHeight):
+        (WebCore::HTMLFrameSetElement::parseMappedAttribute):
+        (WebCore::HTMLIFrameElement::parseMappedAttribute):
+        (WebCore::HTMLIFrameElement::insertedIntoDocument):
+        (WebCore::HTMLIFrameElement::removedFromDocument):
+        (WebCore::HTMLIFrameElement::attach):
+        (WebCore::HTMLIFrameElement::src):
+        * html/html_blockimpl.cpp:
+        (WebCore::HTMLParagraphElement::checkDTD):
+        * html/html_headimpl.cpp:
+        (WebCore::HTMLBaseElement::removedFromDocument):
+        (WebCore::HTMLBaseElement::process):
+        (WebCore::HTMLLinkElement::setDisabledState):
+        (WebCore::HTMLLinkElement::parseMappedAttribute):
+        (WebCore::HTMLLinkElement::process):
+        (WebCore::HTMLLinkElement::setStyleSheet):
+        (WebCore::HTMLLinkElement::sheetLoaded):
+        (WebCore::HTMLLinkElement::href):
+        (WebCore::HTMLMetaElement::process):
+        (WebCore::HTMLScriptElement::childrenChanged):
+        (WebCore::HTMLScriptElement::parseMappedAttribute):
+        (WebCore::HTMLScriptElement::insertedIntoDocument):
+        (WebCore::HTMLScriptElement::evaluateScript):
+        (WebCore::HTMLScriptElement::setText):
+        (WebCore::HTMLScriptElement::src):
+        (WebCore::HTMLStyleElement::insertedIntoDocument):
+        (WebCore::HTMLStyleElement::removedFromDocument):
+        (WebCore::HTMLStyleElement::childrenChanged):
+        (WebCore::HTMLStyleElement::sheetLoaded):
+        (WebCore::HTMLTitleElement::insertedIntoDocument):
+        (WebCore::HTMLTitleElement::removedFromDocument):
+        (WebCore::HTMLTitleElement::childrenChanged):
+        (WebCore::HTMLTitleElement::setText):
+        * html/html_imageimpl.cpp:
+        (WebCore::HTMLImageLoader::~HTMLImageLoader):
+        (WebCore::HTMLImageLoader::updateFromElement):
+        (WebCore::HTMLImageLoader::notifyFinished):
+        (WebCore::HTMLImageElement::parseMappedAttribute):
+        (WebCore::HTMLImageElement::insertedIntoDocument):
+        (WebCore::HTMLImageElement::removedFromDocument):
+        (WebCore::HTMLImageElement::width):
+        (WebCore::HTMLImageElement::height):
+        (WebCore::HTMLImageElement::src):
+        (WebCore::HTMLMapElement::~HTMLMapElement):
+        (WebCore::HTMLMapElement::parseMappedAttribute):
+        (WebCore::HTMLAreaElement::href):
+        * html/html_inlineimpl.cpp:
+        (WebCore::HTMLAnchorElement::isKeyboardFocusable):
+        (WebCore::HTMLAnchorElement::defaultEventHandler):
+        (WebCore::HTMLAnchorElement::href):
+        (WebCore::HTMLAnchorElement::blur):
+        (WebCore::HTMLAnchorElement::focus):
+        * html/html_objectimpl.cpp:
+        (WebCore::HTMLAppletElement::parseMappedAttribute):
+        (WebCore::HTMLAppletElement::insertedIntoDocument):
+        (WebCore::HTMLAppletElement::removedFromDocument):
+        (WebCore::HTMLAppletElement::createRenderer):
+        (WebCore::HTMLAppletElement::getAppletInstance):
+        (WebCore::HTMLEmbedElement::getEmbedInstance):
+        (WebCore::HTMLEmbedElement::parseMappedAttribute):
+        (WebCore::HTMLEmbedElement::rendererIsNeeded):
+        (WebCore::HTMLEmbedElement::insertedIntoDocument):
+        (WebCore::HTMLEmbedElement::removedFromDocument):
+        (WebCore::HTMLObjectElement::getObjectInstance):
+        (WebCore::HTMLObjectElement::parseMappedAttribute):
+        (WebCore::HTMLObjectElement::rendererIsNeeded):
+        (WebCore::HTMLObjectElement::insertedIntoDocument):
+        (WebCore::HTMLObjectElement::removedFromDocument):
+        (WebCore::HTMLObjectElement::updateDocNamedItem):
+        (WebCore::HTMLParamElement::parseMappedAttribute):
+        * html/html_tableimpl.cpp:
+        (WebCore::HTMLTableElement::createTHead):
+        (WebCore::HTMLTableElement::createTFoot):
+        (WebCore::HTMLTableElement::createCaption):
+        (WebCore::HTMLTableElement::insertRow):
+        (WebCore::HTMLTableElement::addChild):
+        (WebCore::HTMLTableElement::mapToEntry):
+        (WebCore::HTMLTableElement::parseMappedAttribute):
+        (WebCore::HTMLTableElement::additionalAttributeStyleDecl):
+        (WebCore::HTMLTableElement::getSharedCellDecl):
+        (WebCore::HTMLTablePartElement::mapToEntry):
+        (WebCore::HTMLTablePartElement::parseMappedAttribute):
+        (WebCore::HTMLTableSectionElement::insertRow):
+        (WebCore::HTMLTableRowElement::insertCell):
+        * khtml/ecma/kjs_dom.cpp:
+        (KJS::DOMNode::~DOMNode):
+        (KJS::DOMNode::mark):
+        (KJS::DOMElement::getValueProperty):
+        (KJS::DOMElementProtoFunc::callAsFunction):
+        (KJS::checkNodeSecurity):
+        (KJS::toJS):
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::JSHTMLElement::implementsCall):
+        (KJS::JSHTMLElement::bodyGetter):
+        (KJS::JSHTMLElement::anchorGetter):
+        (KJS::JSHTMLElement::getValueProperty):
+        (KJS::JSHTMLElement::bodySetter):
+        * khtml/ecma/kjs_traversal.cpp:
+        (KJS::JSNodeFilterCondition::acceptNode):
+        * khtml/ecma/kjs_views.cpp:
+        (KJS::DOMAbstractViewProtoFunc::callAsFunction):
+        * khtml/xbl/xbl_binding.cpp:
+        (XBL::XBLBindingChain::failed):
+        (XBL::m_nextBinding):
+        (XBL::XBLBinding::setXBLDocument):
+        * khtml/xbl/xbl_protobinding.cpp:
+        (XBL::XBLPrototypeBinding::document):
+        * khtml/xsl/XSLStyleSheet.cpp:
+        (WebCore::XSLStyleSheet::XSLStyleSheet):
+        * khtml/xsl/XSLTProcessor.cpp:
+        (WebCore::XSLTProcessor::createDocumentFromSource):
+        (WebCore::xmlDocPtrFromNode):
+        (WebCore::XSLTProcessor::transformToString):
+        * ksvg2/svg/SVGAElement.cpp:
+        (SVGAElement::defaultEventHandler):
+        * ksvg2/svg/SVGAnimateColorElement.cpp:
+        (SVGAnimateColorElement::handleTimerEvent):
+        * ksvg2/svg/SVGAnimateElement.cpp:
+        (SVGAnimateElement::handleTimerEvent):
+        * ksvg2/svg/SVGAnimateTransformElement.cpp:
+        (SVGAnimateTransformElement::handleTimerEvent):
+        * ksvg2/svg/SVGAnimationElement.cpp:
+        (SVGAnimationElement::closeRenderer):
+        * ksvg2/svg/SVGClipPathElement.cpp:
+        (SVGClipPathElement::canvasResource):
+        * ksvg2/svg/SVGElement.cpp:
+        (WebCore::SVGElement::addSVGEventListener):
+        * ksvg2/svg/SVGGradientElement.cpp:
+        (SVGGradientElement::rebuildStops):
+        * ksvg2/svg/SVGHelper.cpp:
+        (SVGHelper::PercentageOfViewport):
+        * ksvg2/svg/SVGLinearGradientElement.cpp:
+        (SVGLinearGradientElement::buildGradient):
+        * ksvg2/svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
+        * ksvg2/svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::buildGradient):
+        * ksvg2/svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::setCurrentScale):
+        (WebCore::SVGSVGElement::addSVGWindowEventListner):
+        * ksvg2/svg/SVGSetElement.cpp:
+        (SVGSetElement::handleTimerEvent):
+        * ksvg2/svg/SVGStyleElement.cpp:
+        (SVGStyleElement::childrenChanged):
+        * ksvg2/svg/SVGStyledElement.cpp:
+        (WebCore::SVGStyledElement::canvas):
+        * ksvg2/svg/SVGTitleElement.cpp:
+        (WebCore::SVGTitleElement::closeRenderer):
+        (WebCore::SVGTitleElement::insertedIntoDocument):
+        (WebCore::SVGTitleElement::removedFromDocument):
+        (WebCore::SVGTitleElement::childrenChanged):
+        * ksvg2/svg/SVGUseElement.cpp:
+        (SVGUseElement::closeRenderer):
+        * kwq/WebCoreAXObject.mm:
+        (-[WebCoreAXObject accessibilityPerformAction:]):
+        (-[WebCoreAXObject accessibilityAttributeValue:]):
+        * page/Frame.cpp:
+        (WebCore::parentFromOwnerRenderer):
+        (WebCore::Frame::frameForNode):
+        (WebCore::Frame::clearDocumentFocus):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::dispatchMouseEvent):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::setStyle):
+        * rendering/RenderCanvas.cpp:
+        (WebCore::RenderCanvas::RenderCanvas):
+        (WebCore::RenderCanvas::paintBoxDecorations):
+        (WebCore::RenderCanvas::repaintViewRectangle):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::imageMap):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::setHasHorizontalScrollbar):
+        (WebCore::RenderLayer::setHasVerticalScrollbar):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::createObject):
+        (WebCore::RenderObject::RenderObject):
+        (WebCore::RenderObject::isRoot):
+        (WebCore::RenderObject::backslashAsCurrencySymbol):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::document):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::isFocused):
+        * rendering/render_applet.cpp:
+        (WebCore::RenderApplet::createWidgetIfNecessary):
+        * rendering/render_replaced.cpp:
+        (WebCore::RenderWidget::RenderWidget):
+        (WebCore::RenderWidget::focusIn):
+        (WebCore::RenderWidget::focusOut):
+
 2006-03-28  Darin Adler  <darin@apple.com>
 
         Reviewed by Geoff.
index 45a7d4d121e127b73ab7559772475cddbf0fd209..6fea9c51e8e8e10685c6b894a73bc5825db98f16 100644 (file)
@@ -269,7 +269,7 @@ static ListenerMap *listenerMap;
 
 - (DOMDocument *)ownerDocument
 {
-    return [DOMDocument _documentWith:[self _node]->getDocument()];
+    return [DOMDocument _documentWith:[self _node]->document()];
 }
 
 - (DOMNode *)insertBefore:(DOMNode *)newChild :(DOMNode *)refChild
@@ -665,7 +665,7 @@ static ListenerMap *listenerMap;
 - (const KJS::Bindings::RootObject *)_executionContext
 {
     if (Node *n = [self _node])
-        if (FrameMac *f = Mac(n->getDocument()->frame()))
+        if (FrameMac *f = Mac(n->document()->frame()))
             return f->executionContextForDOM();
 
     return 0;
@@ -1547,7 +1547,7 @@ static ListenerMap *listenerMap;
     ASSERT(name);
     Element *e = [self _element];
     ASSERT(e);
-    return KURL(e->getDocument()->completeURL(parseURL(e->getAttribute(name)).deprecatedString())).getNSURL();
+    return KURL(e->document()->completeURL(parseURL(e->getAttribute(name)).deprecatedString())).getNSURL();
 }
 
 @end
index fa37e989f7d622ccfbd98d54ff8235919cb2ae20..38242ed5b3dac055172306bf5db58510013c5164 100644 (file)
@@ -261,7 +261,7 @@ using namespace WebCore::HTMLNames;
 
 - (NSString *)titleDisplayString
 {
-    return [self _HTMLElement]->title().replace('\\', [self _element]->getDocument()->backslashAsCurrencySymbol());
+    return [self _HTMLElement]->title().replace('\\', [self _element]->document()->backslashAsCurrencySymbol());
 }
 
 - (void)setTitle:(NSString *)title
@@ -1292,7 +1292,7 @@ using namespace WebCore::HTMLNames;
 
 - (NSString *)altDisplayString
 {
-    return [self _inputElement]->alt().replace('\\', [self _element]->getDocument()->backslashAsCurrencySymbol());
+    return [self _inputElement]->alt().replace('\\', [self _element]->document()->backslashAsCurrencySymbol());
 }
 
 - (void)setAlt:(NSString *)alt
@@ -2281,14 +2281,14 @@ using namespace WebCore::HTMLNames;
 - (void)blur
 {
     HTMLAnchorElement *impl = [self _anchorElement];
-    if (impl->getDocument()->focusNode() == impl)
-        impl->getDocument()->setFocusNode(0);
+    if (impl->document()->focusNode() == impl)
+        impl->document()->setFocusNode(0);
 }
 
 - (void)focus
 {
     HTMLAnchorElement *impl = [self _anchorElement];
-    impl->getDocument()->setFocusNode(static_cast<Element*>(impl));
+    impl->document()->setFocusNode(static_cast<Element*>(impl));
 }
 
 @end
@@ -2328,7 +2328,7 @@ using namespace WebCore::HTMLNames;
 - (NSString *)altDisplayString
 {
     String alt = [self _imageElement]->getAttribute(altAttr);
-    return alt.replace('\\', [self _element]->getDocument()->backslashAsCurrencySymbol());
+    return alt.replace('\\', [self _element]->document()->backslashAsCurrencySymbol());
 }
 
 - (void)setAlt:(NSString *)alt
@@ -2703,7 +2703,7 @@ using namespace WebCore::HTMLNames;
 - (NSString *)altDisplayString
 {
     String alt = [self _appletElement]->getAttribute(altAttr);
-    return alt.replace('\\', [self _element]->getDocument()->backslashAsCurrencySymbol());
+    return alt.replace('\\', [self _element]->document()->backslashAsCurrencySymbol());
 }
 
 - (void)setAlt:(NSString *)alt
@@ -2853,7 +2853,7 @@ using namespace WebCore::HTMLNames;
 - (NSString *)altDisplayString
 {
     String alt = [self _areaElement]->getAttribute(altAttr);
-    return alt.replace('\\', [self _element]->getDocument()->backslashAsCurrencySymbol());
+    return alt.replace('\\', [self _element]->document()->backslashAsCurrencySymbol());
 }
 
 - (void)setAlt:(NSString *)alt
index d84fd915bd8da524f84942ae914a5dc6056629be..2dc0c2570354ebddf1b0516646249e76e77e95ad 100644 (file)
@@ -165,7 +165,7 @@ String::String(NSString *str)
     Node *nodeImpl = [n _node];
 
     // Dig up Interpreter and ExecState.
-    Frame *frame = nodeImpl->getDocument()->frame();
+    Frame *frame = nodeImpl->document()->frame();
     Interpreter *interpreter = frame->jScript()->interpreter();
     ExecState *exec = interpreter->globalExec();
     
index e4814e9ed63d2a5a6a56c0277d3e895f93d3f1f6..91bbd494c719f1223bb69acaf5266ceae290b01d 100644 (file)
@@ -2474,7 +2474,7 @@ NSAttributedString *FrameMac::attributedString(Node *_start, int startOffset, No
                 // will have corrected any illegally nested <a> elements.
                 if (linkStartNode && n == linkStartNode) {
                     String href = parseURL(linkStartNode->getAttribute(hrefAttr));
-                    KURL kURL = Mac(linkStartNode->getDocument()->frame())->completeURL(href.deprecatedString());
+                    KURL kURL = Mac(linkStartNode->document()->frame())->completeURL(href.deprecatedString());
                     
                     NSURL *URL = kURL.getNSURL();
                     NSRange tempRange = { linkStartLocation, [result length]-linkStartLocation }; // workaround for 4213314
index 14adfa93be526cade7eedd5cdaea1ca42bc99132..f512032b0ab6061ab88470a56af2b0209431c702 100644 (file)
@@ -43,11 +43,11 @@ void FrameView::updateBorder()
 
 void FrameView::updateDashboardRegions()
 {
-    Document* document = m_frame->document();
-    if (document->hasDashboardRegions()) {
-        DeprecatedValueList<DashboardRegionValue> newRegions = document->renderer()->computeDashboardRegions();
-        DeprecatedValueList<DashboardRegionValue> currentRegions = document->dashboardRegions();
-        document->setDashboardRegions(newRegions);
+    Document* doc = m_frame->document();
+    if (doc->hasDashboardRegions()) {
+        DeprecatedValueList<DashboardRegionValue> newRegions = doc->renderer()->computeDashboardRegions();
+        DeprecatedValueList<DashboardRegionValue> currentRegions = doc->dashboardRegions();
+        doc->setDashboardRegions(newRegions);
         Mac(m_frame.get())->dashboardRegionsChanged();
     }
 }
index c42c715b2e7fe76e21512bdf1def7799c5a8646e..a5d0adc225b3a360705c6e282e2e29a13162d549 100644 (file)
@@ -470,7 +470,7 @@ static inline WebCoreFrameBridge *bridge(Frame *frame)
     if (!(self = [super init]))
         return nil;
     
-    m_frame = new FrameMac(renderer->node()->getDocument()->frame()->page(), renderer);
+    m_frame = new FrameMac(renderer->node()->document()->frame()->page(), renderer);
     m_frame->setBridge(self);
     _shouldCreateRenderers = YES;
     return self;
@@ -1695,7 +1695,7 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     Node *endContainer = [[range endContainer] _node];
     ASSERT(startContainer);
     ASSERT(endContainer);
-    ASSERT(startContainer->getDocument() == endContainer->getDocument());
+    ASSERT(startContainer->document() == endContainer->document());
     
     m_frame->document()->updateLayoutIgnorePendingStylesheets();
 
@@ -1843,7 +1843,7 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
     if (startContainer == nil || endContainer == nil)
         return nil;
 
-    ASSERT(startContainer->getDocument() == endContainer->getDocument());
+    ASSERT(startContainer->document() == endContainer->document());
     
     m_frame->document()->updateLayoutIgnorePendingStylesheets();
 
index 418b74825792beb0e7faef700a3b63e8aae1bcf6..56640d87e90aaf4669754b28906f9e0190e1f884 100644 (file)
@@ -316,7 +316,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
 
     // Make sure our layout is up to date before we allow a query on these attributes.
     if (updateLayout)
-        node->getDocument()->updateLayout();
+        node->document()->updateLayout();
 
     RenderObject* renderer = node->renderer();
     if (!renderer)
index e92891b4f3063efa7b9f7b865b6790465bb99d57..5978b4600ee1a6c5ebea5e3f11f70bd105f72891 100644 (file)
@@ -65,7 +65,7 @@ String StyleBase::baseURL()
     if(!sheet->ownerNode()) 
         return String();
 
-    return sheet->ownerNode()->getDocument()->baseURL();
+    return sheet->ownerNode()->document()->baseURL();
 }
 
 // ------------------------------------------------------------------------------
index dd59b333cfaa1490b0c7466d6b1751c82333ded4..a9bd586a3eb8a64fc0d9d1239a518748fa7ef75e 100644 (file)
@@ -90,7 +90,7 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleSheet *parentSheet, String href)
 CSSStyleSheet::CSSStyleSheet(Node *parentNode, String href, bool _implicit)
     : StyleSheet(parentNode, href)
 {
-    m_doc = parentNode->getDocument();
+    m_doc = parentNode->document();
     m_implicit = _implicit; 
     m_namespaces = 0;
 }
index 993f1dbbed29747855ba76a2110d601a9b86f5e8..372bb52b08b3585016bf2368a49c31823c111fe3 100644 (file)
@@ -495,9 +495,9 @@ void CSSStyleSelector::initForStyleResolve(Element* e, RenderStyle* defaultParen
         parentStyle = defaultParent;
     else
         parentStyle = (parentNode && parentNode->renderer()) ? parentNode->renderer()->style() : 0;
-    view = element->getDocument()->view();
-    isXMLDoc = !element->getDocument()->isHTMLDocument();
-    frame = element->getDocument()->frame();
+    view = element->document()->view();
+    isXMLDoc = !element->document()->isHTMLDocument();
+    frame = element->document()->frame();
     settings = frame ? frame->settings() : 0;
 
     style = 0;
@@ -630,7 +630,7 @@ bool CSSStyleSelector::canShareStyleWithElement(Node* n)
             (s->isEnabled() == element->isEnabled()) &&
             (s->isIndeterminate() == element->isIndeterminate()) &&
             (s->isChecked() == element->isChecked()) &&
-            (s != s->getDocument()->getCSSTarget() && element != element->getDocument()->getCSSTarget()) &&
+            (s != s->document()->getCSSTarget() && element != element->document()->getCSSTarget()) &&
             (s->getAttribute(typeAttr) == element->getAttribute(typeAttr))) {
             bool classesMatch = true;
             if (s->hasClass()) {
@@ -647,8 +647,8 @@ bool CSSStyleSelector::canShareStyleWithElement(Node* n)
                     bool linksMatch = true;
                     if (s->isLink()) {
                         // We need to check to see if the visited state matches.
-                        Color linkColor = element->getDocument()->linkColor();
-                        Color visitedColor = element->getDocument()->visitedLinkColor();
+                        Color linkColor = element->document()->linkColor();
+                        Color visitedColor = element->document()->visitedLinkColor();
                         if (pseudoState == PseudoUnknown)
                             checkPseudoState(element, s->renderer()->style()->pseudoState() != PseudoAnyLink ||
                                              linkColor != visitedColor);
@@ -667,7 +667,7 @@ bool CSSStyleSelector::canShareStyleWithElement(Node* n)
 RenderStyle* CSSStyleSelector::locateSharedStyle()
 {
     if (styledElement && !styledElement->inlineStyleDecl() && !styledElement->hasID() &&
-        !styledElement->getDocument()->usesSiblingRules()) {
+        !styledElement->document()->usesSiblingRules()) {
         // Check previous siblings.
         int count = 0;
         Node* n;
@@ -695,7 +695,7 @@ RenderStyle* CSSStyleSelector::locateSharedStyle()
 
 RenderStyle* CSSStyleSelector::createStyleForElement(Element* e, RenderStyle* defaultParent, bool allowSharing)
 {
-    if (!e->getDocument()->haveStylesheetsLoaded()) {
+    if (!e->document()->haveStylesheetsLoaded()) {
         if (!styleNotYetAvailable) {
             styleNotYetAvailable = ::new RenderStyle();
             styleNotYetAvailable->setDisplay(NONE);
@@ -720,7 +720,7 @@ RenderStyle* CSSStyleSelector::createStyleForElement(Element* e, RenderStyle* de
     }
     initForStyleResolve(e, defaultParent);
 
-    style = new (e->getDocument()->renderArena()) RenderStyle();
+    style = new (e->document()->renderArena()) RenderStyle();
     style->ref();
     if (parentStyle)
         style->inheritFrom(parentStyle);
@@ -860,7 +860,7 @@ RenderStyle* CSSStyleSelector::createPseudoStyleForElement(RenderStyle::PseudoId
     if (m_matchedDeclCount == 0)
         return 0;
     
-    style = new (e->getDocument()->renderArena()) RenderStyle();
+    style = new (e->document()->renderArena()) RenderStyle();
     style->ref();
     if (parentStyle)
         style->inheritFrom(parentStyle);
@@ -950,7 +950,7 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
         // positions.  We also force inline-level roots to be block-level.
         if (style->display() != BLOCK && style->display() != TABLE && style->display() != BOX &&
             (style->position() == AbsolutePosition || style->position() == FixedPosition || style->floating() != FNONE ||
-             (e && e->getDocument()->documentElement() == e))) {
+             (e && e->document()->documentElement() == e))) {
             if (style->display() == INLINE_TABLE)
                 style->setDisplay(TABLE);
             else if (style->display() == INLINE_BOX)
@@ -982,7 +982,7 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
     // Auto z-index becomes 0 for the root element and transparent objects.  This prevents
     // cases where objects that should be blended as a single unit end up with a non-transparent
     // object wedged in between them.
-    if (style->hasAutoZIndex() && ((e && e->getDocument()->documentElement() == e) || style->opacity() < 1.0f))
+    if (style->hasAutoZIndex() && ((e && e->document()->documentElement() == e) || style->opacity() < 1.0f))
         style->setZIndex(0);
     
     // Button, legend, input, select and textarea all consider width values of 'auto' to be 'intrinsic'.
@@ -1028,7 +1028,7 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
 
 RefPtr<CSSRuleList> CSSStyleSelector::styleRulesForElement(Element* e, bool authorOnly)
 {
-    if (!e->getDocument()->haveStylesheetsLoaded())
+    if (!e->document()->haveStylesheetsLoaded())
         return 0;
 
     m_collectRulesOnly = true;
@@ -1372,7 +1372,7 @@ bool CSSStyleSelector::checkOneSelector(CSSSelector* sel, Element* e, bool isSub
                 break;
             }
             case CSSSelector::PseudoTarget:
-                if (e == e->getDocument()->getCSSTarget())
+                if (e == e->document()->getCSSTarget())
                     return true;
                 break;
             case CSSSelector::PseudoAnyLink:
@@ -1420,7 +1420,7 @@ bool CSSStyleSelector::checkOneSelector(CSSSelector* sel, Element* e, bool isSub
                 break;
             }
             case CSSSelector::PseudoFocus:
-                if (e && e->focused() && e->getDocument()->frame()->displaysWithFocusAttributes()) {
+                if (e && e->focused() && e->document()->frame()->displaysWithFocusAttributes()) {
                     return true;
                 }
                 break;
@@ -1462,7 +1462,7 @@ bool CSSStyleSelector::checkOneSelector(CSSSelector* sel, Element* e, bool isSub
                     return true;
                 break;
             case CSSSelector::PseudoRoot:
-                if (e == e->getDocument()->documentElement())
+                if (e == e->document()->documentElement())
                     return true;
                 break;
             case CSSSelector::PseudoNot: {
@@ -2312,7 +2312,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             } else if (type == CSSPrimitiveValue::CSS_URI) {
                 CSSImageValue *image = static_cast<CSSImageValue *>(primitiveValue);
                 style->setCursor(CURSOR_AUTO);
-                style->setCursorImage(image->image(element->getDocument()->docLoader()));
+                style->setCursorImage(image->image(element->document()->docLoader()));
             }
         }
         break;
@@ -2382,7 +2382,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         HANDLE_INHERIT_AND_INITIAL(listStyleImage, ListStyleImage)
         if (!primitiveValue) return;
         style->setListStyleImage(static_cast<CSSImageValue *>(primitiveValue)
-                                 ->image(element->getDocument()->docLoader()));
+                                 ->image(element->document()->docLoader()));
         break;
     }
 
@@ -3018,7 +3018,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             }
             else if (val->primitiveType()==CSSPrimitiveValue::CSS_URI) {
                 CSSImageValue *image = static_cast<CSSImageValue *>(val);
-                style->setContent(image->image(element->getDocument()->docLoader()), i != 0);
+                style->setContent(image->image(element->document()->docLoader()), i != 0);
             }
         }
         break;
@@ -3382,7 +3382,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             CSSBorderImageValue* borderImage = static_cast<CSSBorderImageValue*>(value);
             
             // Set the image (this kicks off the load).
-            image.m_image = borderImage->m_image->image(element->getDocument()->docLoader());
+            image.m_image = borderImage->m_image->image(element->document()->docLoader());
             
             // Set up a length box to represent our image slices.
             LengthBox& l = image.m_slices;
@@ -3919,7 +3919,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             region = region->m_next.get();
         }
         
-        element->getDocument()->setHasDashboardRegions(true);
+        element->document()->setHasDashboardRegions(true);
         
         break;
     }
@@ -4014,7 +4014,7 @@ void CSSStyleSelector::mapBackgroundImage(BackgroundLayer* layer, CSSValue* valu
     
     if (!value->isPrimitiveValue()) return;
     CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
-    layer->setBackgroundImage(static_cast<CSSImageValue *>(primitiveValue)->image(element->getDocument()->docLoader()));
+    layer->setBackgroundImage(static_cast<CSSImageValue *>(primitiveValue)->image(element->document()->docLoader()));
 }
 
 void CSSStyleSelector::mapBackgroundRepeat(BackgroundLayer* layer, CSSValue* value)
@@ -4241,10 +4241,10 @@ Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveV
     int ident = primitiveValue->getIdent();
     if (ident) {
         if (ident == CSS_VAL__KHTML_TEXT)
-            col = element->getDocument()->textColor();
+            col = element->document()->textColor();
         else if (ident == CSS_VAL__KHTML_LINK) {
-            Color linkColor = element->getDocument()->linkColor();
-            Color visitedColor = element->getDocument()->visitedLinkColor();
+            Color linkColor = element->document()->linkColor();
+            Color visitedColor = element->document()->visitedLinkColor();
             if (linkColor == visitedColor)
                 col = linkColor;
             else {
@@ -4254,7 +4254,7 @@ Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValue* primitiveV
             }
         }
         else if (ident == CSS_VAL__KHTML_ACTIVELINK)
-            col = element->getDocument()->activeLinkColor();
+            col = element->document()->activeLinkColor();
         else
             col = colorForCSSValue(ident);
     } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RGBCOLOR)
index d8b4b427ad91b6eb452e060759a8423529de6bf7..c49fb26542f21f20f6ac5d18d0b0538f908bb6f6 100644 (file)
@@ -31,9 +31,9 @@
 
 namespace WebCore {
 
-AbstractView::AbstractView(Document *_document)
+AbstractView::AbstractView(Document *doc)
 {
-    m_document = _document;
+    m_document = doc;
 }
 
 AbstractView::~AbstractView()
index 3678ee1fd73262b0cbcb9a8e01e70be2ab610482..0e2887faabf982b857b49d78cab7b742e3be9032 100644 (file)
@@ -53,7 +53,7 @@ Node::NodeType CDATASection::nodeType() const
 PassRefPtr<Node> CDATASection::cloneNode(bool /*deep*/)
 {
     ExceptionCode ec = 0;
-    return getDocument()->createCDATASection(str, ec);
+    return document()->createCDATASection(str, ec);
 }
 
 // DOM Section 1.1.1
@@ -64,7 +64,7 @@ bool CDATASection::childTypeAllowed(NodeType)
 
 Text *CDATASection::createNew(StringImpl *_str)
 {
-    return new CDATASection(getDocument(), _str);
+    return new CDATASection(document(), _str);
 }
 
 String CDATASection::toString() const
index 6741f1b9cd6a97ad34f718c253473e150e5a5977..cf11d83172be3f69fbadbc9a0e452e0ebb1574e2 100644 (file)
@@ -76,7 +76,7 @@ void CharacterData::setData( const String &_data, ExceptionCode& ec)
     dispatchModifiedEvent(oldStr);
     if(oldStr) oldStr->deref();
     
-    getDocument()->removeMarkers(this);
+    document()->removeMarkers(this);
 }
 
 unsigned CharacterData::length() const
@@ -134,7 +134,7 @@ void CharacterData::insertData( const unsigned offset, const String &arg, Except
     
     // update the markers for spell checking and grammar checking
     unsigned length = arg.length();
-    getDocument()->shiftMarkers(this, offset, length);
+    document()->shiftMarkers(this, offset, length);
 }
 
 void CharacterData::deleteData( const unsigned offset, const unsigned count, ExceptionCode& ec)
@@ -155,8 +155,8 @@ void CharacterData::deleteData( const unsigned offset, const unsigned count, Exc
     oldStr->deref();
 
     // update the markers for spell checking and grammar checking
-    getDocument()->removeMarkers(this, offset, count);
-    getDocument()->shiftMarkers(this, offset + count, -count);
+    document()->removeMarkers(this, offset, count);
+    document()->shiftMarkers(this, offset + count, -count);
 }
 
 void CharacterData::replaceData( const unsigned offset, const unsigned count, const String &arg, ExceptionCode& ec)
@@ -185,8 +185,8 @@ void CharacterData::replaceData( const unsigned offset, const unsigned count, co
     
     // update the markers for spell checking and grammar checking
     int diff = arg.length() - count;
-    getDocument()->removeMarkers(this, offset, count);
-    getDocument()->shiftMarkers(this, offset + count, diff);
+    document()->removeMarkers(this, offset, count);
+    document()->shiftMarkers(this, offset + count, diff);
 }
 
 String CharacterData::nodeValue() const
@@ -218,7 +218,7 @@ void CharacterData::dispatchModifiedEvent(StringImpl *prevValue)
 {
     if (parentNode())
         parentNode()->childrenChanged();
-    if (!getDocument()->hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))
+    if (!document()->hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))
         return;
 
     StringImpl *newValue = str->copy();
index 300be684c845bc959f0429777e8614c22b343292..2fcc8641667cce325c4e1904ddf2c9cee82b1e96 100644 (file)
@@ -60,7 +60,7 @@ Node::NodeType Comment::nodeType() const
 
 PassRefPtr<Node> Comment::cloneNode(bool /*deep*/)
 {
-    return getDocument()->createComment(str);
+    return document()->createComment(str);
 }
 
 // DOM Section 1.1.1
index b1eadc9a80029f1279e5d2652ba5f31d02f046ab..703e715b0ca3fb2ca5175a93d7291def6d7f5246 100644 (file)
@@ -208,7 +208,7 @@ bool ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce
         child = nextChild.release();
     }
 
-    getDocument()->setDocumentChanged(true);
+    document()->setDocumentChanged(true);
     dispatchSubtreeModifiedEvent();
     return true;
 }
@@ -314,7 +314,7 @@ bool ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
     }
 
     // ### set style in case it's attached
-    getDocument()->setDocumentChanged(true);
+    document()->setDocumentChanged(true);
     dispatchSubtreeModifiedEvent();
     return true;
 }
@@ -363,7 +363,7 @@ bool ContainerNode::removeChild(Node* oldChild, ExceptionCode& ec)
     RefPtr<Node> child = oldChild;
     
     // dispatch pre-removal mutation events
-    if (getDocument()->hasListenerType(Document::DOMNODEREMOVED_LISTENER)) {
+    if (document()->hasListenerType(Document::DOMNODEREMOVED_LISTENER)) {
         EventTargetNodeCast(child.get())->dispatchEvent(new MutationEvent(DOMNodeRemovedEvent, true, false,
             this, String(), String(), String(), 0), ec, true);
         if (ec)
@@ -411,7 +411,7 @@ bool ContainerNode::removeChild(Node* oldChild, ExceptionCode& ec)
 
     allowEventDispatch();
 
-    getDocument()->setDocumentChanged(true);
+    document()->setDocumentChanged(true);
 
     // Dispatch post-removal mutation events
     dispatchSubtreeModifiedEvent();
@@ -529,7 +529,7 @@ bool ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionCode& ec)
         child = nextChild.release();
     }
 
-    getDocument()->setDocumentChanged(true);
+    document()->setDocumentChanged(true);
     dispatchSubtreeModifiedEvent();
     return true;
 }
@@ -545,7 +545,7 @@ ContainerNode* ContainerNode::addChild(PassRefPtr<Node> newChild)
     // It does not send any DOM mutation events.
 
     // Check for consistency with DTD, but only when parsing HTML.
-    if (getDocument()->isHTMLDocument() && !childAllowed(newChild.get()))
+    if (document()->isHTMLDocument() && !childAllowed(newChild.get()))
         return 0;
 
     forbidEventDispatch();
@@ -675,7 +675,7 @@ bool ContainerNode::getUpperLeftCorner(int &xPos, int &yPos) const
     // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be
     // at the end of the document.  Scroll to the bottom.
     if (!o) {
-        yPos += getDocument()->view()->contentsHeight();
+        yPos += document()->view()->contentsHeight();
         return true;
     }
     return false;
@@ -839,7 +839,7 @@ static void dispatchChildInsertionEvents(Node* child, ExceptionCode& ec)
     assert(!eventDispatchForbidden());
 
     RefPtr<Node> c = child;
-    RefPtr<Document> doc = child->getDocument();
+    RefPtr<Document> doc = child->document();
 
     if (c->parentNode() && c->parentNode()->inDocument())
         c->insertedIntoDocument();
@@ -873,7 +873,7 @@ static void dispatchChildInsertionEvents(Node* child, ExceptionCode& ec)
 static void dispatchChildRemovalEvents(Node* child, ExceptionCode& ec)
 {
     RefPtr<Node> c = child;
-    RefPtr<Document> doc = child->getDocument();
+    RefPtr<Document> doc = child->document();
 
     // update auxiliary doc info (e.g. iterators) to note that node is being removed
     doc->notifyBeforeNodeRemoval(child); // ### use events instead
index 857e7dafec1feeb8145ad207df1b8c8a60bc76ce..0458ad385cb296f28eb77350e108901a570e7c69 100644 (file)
@@ -132,7 +132,7 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR
     
     // WRONG_DOCUMENT_ERR: Raised if doctype has already been used with a different document or was
     // created from a different implementation.
-    if (doctype && (doctype->getDocument() || doctype->implementation() != this)) {
+    if (doctype && (doctype->document() || doctype->implementation() != this)) {
         ec = WRONG_DOCUMENT_ERR;
         return 0;
     }
index 4a7f91c70e4d7bcd00985ba0516f2bc1f1029512..631d50f365a7e8dc6019a6ebee07f3ad8babacc2 100644 (file)
@@ -216,7 +216,7 @@ Document::Document(DOMImplementation* impl, FrameView *v)
     , m_createRenderers(true)
     , m_inPageCache(false)
 {
-    document.resetSkippingRef(this);
+    m_document.resetSkippingRef(this);
 
     m_printing = false;
 
@@ -311,7 +311,7 @@ Document::~Document()
     if (m_docChanged && changedDocuments)
         changedDocuments->remove(this);
     delete m_tokenizer;
-    document.resetSkippingRef(0);
+    m_document.resetSkippingRef(0);
     delete m_styleSelector;
     delete m_docLoader;
     
@@ -400,7 +400,7 @@ PassRefPtr<Element> Document::createElement(const String &name, ExceptionCode& e
 
 PassRefPtr<DocumentFragment> Document::createDocumentFragment()
 {
-    return new DocumentFragment(getDocument());
+    return new DocumentFragment(document());
 }
 
 PassRefPtr<Text> Document::createTextNode(const String &data)
@@ -546,7 +546,7 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
     }
                 
     for (Node* node = source.get(); node; node = node->traverseNextNode(source.get())) {
-        KJS::ScriptInterpreter::updateDOMNodeDocument(node, node->getDocument(), this);
+        KJS::ScriptInterpreter::updateDOMNodeDocument(node, node->document(), this);
         node->setDocument(this);
     }
 
@@ -580,7 +580,7 @@ PassRefPtr<Element> Document::createElementNS(const String &_namespaceURI, const
 #endif
     
     if (!e)
-        e = new Element(qName, getDocument());
+        e = new Element(qName, document());
     
     return e.release();
 }
@@ -1540,7 +1540,7 @@ Node *Document::previousFocusNode(Node *fromNode)
 
 int Document::nodeAbsIndex(Node *node)
 {
-    assert(node->getDocument() == this);
+    assert(node->document() == this);
 
     int absIndex = 0;
     for (Node *n = node; n && n != this; n = n->traversePreviousNode())
@@ -2004,7 +2004,7 @@ static Widget *widgetForNode(Node *focusNode)
 bool Document::setFocusNode(PassRefPtr<Node> newFocusNode)
 {    
     // Make sure newFocusNode is actually in this document
-    if (newFocusNode && (newFocusNode->getDocument() != this))
+    if (newFocusNode && (newFocusNode->document() != this))
         return true;
 
     if (m_focusNode == newFocusNode)
@@ -2918,7 +2918,7 @@ Document *Document::topDocument() const
     Document *doc = const_cast<Document *>(this);
     Element *element;
     while ((element = doc->ownerElement()) != 0)
-        doc = element->getDocument();
+        doc = element->document();
     
     return doc;
 }
index c3518bfc0a6a97251bbc4ca4e932794db25d3192..67bfaf084ed9d36c65d495f61c9717840487122d 100644 (file)
@@ -68,7 +68,7 @@ String DocumentFragment::toString() const
 
 PassRefPtr<Node> DocumentFragment::cloneNode(bool deep)
 {
-    RefPtr<DocumentFragment> clone = new DocumentFragment(getDocument());
+    RefPtr<DocumentFragment> clone = new DocumentFragment(document());
     if (deep)
         cloneChildNodes(clone.get());
     return clone.release();
index 0ec7e2b7ac384babee750cc5f658d17d07ca124d..1aa4a331a57300f5d59581cde5493bcde075e63d 100644 (file)
@@ -54,14 +54,14 @@ EventTargetNode::EventTargetNode(Document *doc)
 EventTargetNode::~EventTargetNode()
 {
     if (m_regdListeners && !m_regdListeners->isEmpty() && !inDocument())
-        getDocument()->unregisterDisconnectedNodeWithEventListeners(this);
+        document()->unregisterDisconnectedNodeWithEventListeners(this);
     delete m_regdListeners;
 }
 
 void EventTargetNode::insertedIntoDocument()
 {
     if (m_regdListeners && !m_regdListeners->isEmpty())
-        getDocument()->unregisterDisconnectedNodeWithEventListeners(this);
+        document()->unregisterDisconnectedNodeWithEventListeners(this);
     
     Node::insertedIntoDocument();
 }
@@ -69,14 +69,14 @@ void EventTargetNode::insertedIntoDocument()
 void EventTargetNode::removedFromDocument()
 {
     if (m_regdListeners && !m_regdListeners->isEmpty())
-        getDocument()->registerDisconnectedNodeWithEventListeners(this);
+        document()->registerDisconnectedNodeWithEventListeners(this);
 
     Node::removedFromDocument();
 }
 
 void EventTargetNode::addEventListener(const AtomicString &eventType, PassRefPtr<EventListener> listener, const bool useCapture)
 {
-    if (!getDocument()->attached())
+    if (!document()->attached())
         return;
     
     Document::ListenerType type = static_cast<Document::ListenerType>(0);
@@ -95,7 +95,7 @@ void EventTargetNode::addEventListener(const AtomicString &eventType, PassRefPtr
     else if (eventType == DOMCharacterDataModifiedEvent)
         type = Document::DOMCHARACTERDATAMODIFIED_LISTENER;
     if (type)
-        getDocument()->addListenerType(type);
+        document()->addListenerType(type);
     
     if (!m_regdListeners) {
         m_regdListeners = new DeprecatedPtrList<RegisteredEventListener>;
@@ -108,7 +108,7 @@ void EventTargetNode::addEventListener(const AtomicString &eventType, PassRefPtr
     
     // adding the first one
     if (m_regdListeners->isEmpty() && !inDocument())
-        getDocument()->registerDisconnectedNodeWithEventListeners(this);
+        document()->registerDisconnectedNodeWithEventListeners(this);
     
     m_regdListeners->append(new RegisteredEventListener(eventType, listener.get(), useCapture));
 }
@@ -126,7 +126,7 @@ void EventTargetNode::removeEventListener(const AtomicString &eventType, EventLi
             m_regdListeners->removeRef(it.current());
             // removed last
             if (m_regdListeners->isEmpty() && !inDocument())
-                getDocument()->unregisterDisconnectedNodeWithEventListeners(this);
+                document()->unregisterDisconnectedNodeWithEventListeners(this);
             return;
         }
 }
@@ -252,7 +252,7 @@ bool EventTargetNode::dispatchGenericEvent(PassRefPtr<Event> e, ExceptionCode&,
     // way to retrieve it from javascript if a script does not already
     // have a reference to it in a variable.  So there is no need for
     // the interpreter to keep the event in it's cache
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (tempEvent && frame && frame->jScript())
         frame->jScript()->finishedWithEvent(evt.get());
     
@@ -269,7 +269,7 @@ bool EventTargetNode::dispatchEvent(PassRefPtr<Event> e, ExceptionCode& ec, bool
     }
     evt->setTarget(this);
     
-    RefPtr<FrameView> view = getDocument()->view();
+    RefPtr<FrameView> view = document()->view();
     
     return dispatchGenericEvent(evt.release(), ec, tempEvent);
 }
@@ -285,7 +285,7 @@ bool EventTargetNode::dispatchSubtreeModifiedEvent(bool sendChildrenChanged)
     } else
         notifyNodeListsAttributeChanged(); // FIXME: Can do better some day. Really only care about the name attribute changing.
     
-    if (!getDocument()->hasListenerType(Document::DOMSUBTREEMODIFIED_LISTENER))
+    if (!document()->hasListenerType(Document::DOMSUBTREEMODIFIED_LISTENER))
         return false;
     ExceptionCode ec = 0;
     return dispatchEvent(new MutationEvent(DOMSubtreeModifiedEvent,
@@ -297,7 +297,7 @@ void EventTargetNode::dispatchWindowEvent(const AtomicString &eventType, bool ca
     assert(!eventDispatchForbidden());
     ExceptionCode ec = 0;
     RefPtr<Event> evt = new Event(eventType, canBubbleArg, cancelableArg);
-    RefPtr<Document> doc = getDocument();
+    RefPtr<Document> doc = document();
     evt->setTarget(doc.get());
     doc->handleWindowEvent(evt.get(), false);
     
@@ -322,7 +322,7 @@ bool EventTargetNode::dispatchUIEvent(const AtomicString &eventType, int detail)
     bool cancelable = eventType == DOMActivateEvent;
     
     ExceptionCode ec = 0;
-    UIEvent* evt = new UIEvent(eventType, true, cancelable, getDocument()->defaultView(), detail);
+    UIEvent* evt = new UIEvent(eventType, true, cancelable, document()->defaultView(), detail);
     return dispatchEvent(evt, ec, true);
 }
 
@@ -330,7 +330,7 @@ bool EventTargetNode::dispatchKeyEvent(const PlatformKeyboardEvent& key)
 {
     assert(!eventDispatchForbidden());
     ExceptionCode ec = 0;
-    RefPtr<KeyboardEvent> keyboardEvent = new KeyboardEvent(key, getDocument()->defaultView());
+    RefPtr<KeyboardEvent> keyboardEvent = new KeyboardEvent(key, document()->defaultView());
     bool r = dispatchEvent(keyboardEvent,ec,true);
     
     // we want to return false if default is prevented (already taken care of)
@@ -349,7 +349,7 @@ bool EventTargetNode::dispatchMouseEvent(const PlatformMouseEvent& _mouse, const
     
     int clientX = 0;
     int clientY = 0;
-    if (FrameView *view = getDocument()->view())
+    if (FrameView *view = document()->view())
         view->viewportToContents(_mouse.x(), _mouse.y(), clientX, clientY);
     
     return dispatchMouseEvent(eventType, _mouse.button(), detail,
@@ -389,7 +389,7 @@ bool EventTargetNode::dispatchMouseEvent(const AtomicString& eventType, int butt
     
     bool swallowEvent = false;
     
-    RefPtr<Event> me = new MouseEvent(eventType, true, cancelable, getDocument()->defaultView(),
+    RefPtr<Event> me = new MouseEvent(eventType, true, cancelable, document()->defaultView(),
                                               detail, screenX, screenY, clientX, clientY,
                                               ctrlKey, altKey, shiftKey, metaKey, button,
                                               relatedTarget, 0, isSimulated);
@@ -404,7 +404,7 @@ bool EventTargetNode::dispatchMouseEvent(const AtomicString& eventType, int butt
     // of the DOM specs, but is used for compatibility with the ondblclick="" attribute.  This is treated
     // as a separate event in other DOM-compliant browsers like Firefox, and so we do the same.
     if (eventType == clickEvent && detail == 2) {
-        me = new MouseEvent(dblclickEvent, true, cancelable, getDocument()->defaultView(),
+        me = new MouseEvent(dblclickEvent, true, cancelable, document()->defaultView(),
                                 detail, screenX, screenY, clientX, clientY,
                                 ctrlKey, altKey, shiftKey, metaKey, button,
                                 relatedTarget, 0, isSimulated);
@@ -428,7 +428,7 @@ void EventTargetNode::dispatchWheelEvent(PlatformWheelEvent& e)
     if (e.delta() == 0)
         return;
     
-    FrameView *view = getDocument()->view();
+    FrameView *view = document()->view();
     if (!view)
         return;
     
@@ -437,7 +437,7 @@ void EventTargetNode::dispatchWheelEvent(PlatformWheelEvent& e)
     view->viewportToContents(e.x(), e.y(), x, y);
     
     RefPtr<WheelEvent> we = new WheelEvent(e.isHorizontal(), e.delta(),
-                                                   getDocument()->defaultView(), e.globalX(), e.globalY(), x, y,
+                                                   document()->defaultView(), e.globalX(), e.globalY(), x, y,
                                                    e.ctrlKey(), e.altKey(), e.shiftKey(), e.metaKey());
     
     ExceptionCode ec = 0;
@@ -463,7 +463,7 @@ void EventTargetNode::removeHTMLEventListener(const AtomicString &eventType)
             m_regdListeners->removeRef(it.current());
             // removed last
             if (m_regdListeners->isEmpty() && !inDocument())
-                getDocument()->unregisterDisconnectedNodeWithEventListeners(this);
+                document()->unregisterDisconnectedNodeWithEventListeners(this);
             return;
         }
 }
index 5816961b4dfb4ba8f2c7f0b2ae98c912701a17b9..c842d1c8fab58e54966cff8043f72a89d7ed5e91 100644 (file)
@@ -108,7 +108,7 @@ int gEventDispatchForbidden = 0;
 #endif NDEBUG
 
 Node::Node(Document *doc)
-    : document(doc),
+    : m_document(doc),
       m_previous(0),
       m_next(0),
       m_renderer(0),
@@ -141,7 +141,7 @@ void Node::setDocument(Document *doc)
     if (inDocument())
         return;
     
-    document = doc;
+    m_document = doc;
 }
 
 Node::~Node()
@@ -347,7 +347,7 @@ void Node::setChanged(bool b)
             p->setHasChangedChild( true );
             p = p->parentNode();
         }
-        getDocument()->setDocumentChanged(true);
+        document()->setDocumentChanged(true);
     }
 }
 
@@ -529,7 +529,7 @@ void Node::checkSetPrefix(const AtomicString &_prefix, ExceptionCode& ec)
     //   the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/",
     // - or if this node is an attribute and the qualifiedName of this node is "xmlns" [Namespaces].
     if ((namespacePart(id()) == noNamespace && id() > ID_LAST_TAG) ||
-        (_prefix == "xml" && String(getDocument()->namespaceURI(id())) != "http://www.w3.org/XML/1998/namespace")) {
+        (_prefix == "xml" && String(document()->namespaceURI(id())) != "http://www.w3.org/XML/1998/namespace")) {
         ec = NAMESPACE_ERR;
         return;
     }*/
@@ -558,7 +558,7 @@ void Node::checkAddChild(Node *newChild, ExceptionCode& ec)
     // created this node.
     // We assume that if newChild is a DocumentFragment, all children are created from the same document
     // as the fragment itself (otherwise they could not have been added as children)
-    if (newChild->getDocument() != getDocument()) {
+    if (newChild->document() != document()) {
         // but if the child is not in a document yet then loosen the
         // restriction, so that e.g. creating an element with the Option()
         // constructor and then adding it to a different document works,
@@ -598,8 +598,8 @@ void Node::checkAddChild(Node *newChild, ExceptionCode& ec)
     // change the document pointer of newChild and all of its children to be the new document
     if (shouldAdoptChild) {
         for (Node* node = newChild; node; node = node->traverseNextNode(newChild)) {
-            KJS::ScriptInterpreter::updateDOMNodeDocument(node, node->getDocument(), getDocument());
-            node->setDocument(getDocument());
+            KJS::ScriptInterpreter::updateDOMNodeDocument(node, node->document(), document());
+            node->setDocument(document());
         }
     }
 }
@@ -681,7 +681,7 @@ void Node::attach()
 {
     assert(!attached());
     assert(!renderer() || (renderer()->style() && renderer()->parent()));
-    getDocument()->incDOMTreeVersion();
+    document()->incDOMTreeVersion();
     m_attached = true;
 }
 
@@ -698,7 +698,7 @@ void Node::detach()
         renderer()->destroy();
     setRenderer(0);
 
-    Document* doc = getDocument();
+    Document* doc = document();
     if (m_hovered)
         doc->hoveredNodeDetached(this);
     if (m_inActiveChain)
@@ -872,7 +872,7 @@ Node *Node::nextLeafNode() const
 
 void Node::createRendererIfNeeded()
 {
-    if (!getDocument()->shouldCreateRenderers())
+    if (!document()->shouldCreateRenderers())
         return;
     
     assert(!attached());
@@ -890,16 +890,16 @@ void Node::createRendererIfNeeded()
         RenderStyle* style = createStyleForRenderer(parentRenderer);
 #ifndef KHTML_NO_XBL
         bool resolveStyle = false;
-        if (getDocument()->bindingManager()->loadBindings(this, style->bindingURIs(), true, &resolveStyle) && 
+        if (document()->bindingManager()->loadBindings(this, style->bindingURIs(), true, &resolveStyle) && 
             rendererIsNeeded(style)) {
             if (resolveStyle) {
-                style->deref(document->renderArena());
+                style->deref(document()->renderArena());
                 style = createStyleForRenderer(parentRenderer);
             }
 #else
         if (rendererIsNeeded(style)) {
 #endif
-            setRenderer(createRenderer(getDocument()->renderArena(), style));
+            setRenderer(createRenderer(document()->renderArena(), style));
             if (renderer()) {
                 renderer()->setStyle(style);
                 parentRenderer->addChild(renderer(), nextRenderer());
@@ -909,7 +909,7 @@ void Node::createRendererIfNeeded()
 #else
         }
 #endif
-        style->deref(getDocument()->renderArena());
+        style->deref(document()->renderArena());
     }
 }
 
@@ -922,7 +922,7 @@ RenderStyle *Node::createStyleForRenderer(RenderObject *parent)
 
 bool Node::rendererIsNeeded(RenderStyle *style)
 {
-    return (getDocument()->documentElement() == this) || (style->display() != NONE);
+    return (document()->documentElement() == this) || (style->display() != NONE);
 }
 
 RenderObject *Node::createRenderer(RenderArena *arena, RenderStyle *style)
@@ -1085,7 +1085,7 @@ PassRefPtr<NodeList> Node::getElementsByTagNameNS(const String &namespaceURI, co
         return 0; // FIXME: Who relies on getting 0 instead of a node list in this case?
     
     String name = localName;
-    if (getDocument()->isHTMLDocument())
+    if (document()->isHTMLDocument())
         name = localName.lower();
     return new TagNodeList(this, AtomicString(namespaceURI), AtomicString(name));
 }
@@ -1097,7 +1097,7 @@ bool Node::isSupported(const String &feature, const String &version)
 
 Document *Node::ownerDocument() const
 {
-    Document *doc = getDocument();
+    Document *doc = document();
     return doc == this ? 0 : doc;
 }
 
@@ -1381,7 +1381,7 @@ void Node::setTextContent(const String &text, ExceptionCode& ec)
             container->removeChildren();
             
             if (!text.isEmpty())
-                appendChild(getDocument()->createTextNode(text), ec);
+                appendChild(document()->createTextNode(text), ec);
             break;
         }
         case DOCUMENT_NODE:
index 91f568649c54a4b166350981fd8ca6acdf0a76fd..6e086fcb5fdb8911efa331a655d5dfcd9a09fbe0 100644 (file)
@@ -257,10 +257,10 @@ public:
 
     // Returns the document associated with this node. This method never returns NULL, except in the case 
     // of a DocumentType node that is not used with any Document yet. A Document node returns itself.
-    Document* getDocument() const 
+    Document* document() const 
     { 
-      ASSERT(document || nodeType() == DOCUMENT_TYPE_NODE && !inDocument());
-      return document.get(); 
+      ASSERT(m_document || nodeType() == DOCUMENT_TYPE_NODE && !inDocument());
+      return m_document.get(); 
     }
     void setDocument(Document*);
 
@@ -268,7 +268,7 @@ public:
     // node tree, false otherwise.
     bool inDocument() const 
     { 
-      ASSERT(document || !m_inDocument);
+      ASSERT(m_document || !m_inDocument);
       return m_inDocument; 
     }
     
@@ -448,7 +448,7 @@ public:
     PassRefPtr<NodeList> getElementsByTagNameNS(const String& namespaceURI, const String& localName);
 
 private: // members
-    DocPtr<Document> document;
+    DocPtr<Document> m_document;
     Node* m_previous;
     Node* m_next;
     RenderObject* m_renderer;
index afa341555f230614d4620e043ed1d5e9f5d750f5..3506ba9d8dfbc9099153cd57df929ed5231f37fb 100644 (file)
@@ -104,7 +104,7 @@ Node* NodeList::recursiveItem(unsigned offset, Node* start) const
 Node* NodeList::itemById(const AtomicString& elementId) const
 {
     if (rootNode->isDocumentNode() || rootNode->inDocument()) {
-        Node* node = rootNode->getDocument()->getElementById(elementId);
+        Node* node = rootNode->document()->getElementById(elementId);
 
         if (!node || !nodeMatches(node))
             return 0;
index 00e1a1a524ed6ce05446cd4fda0ed6cc02a39528..2c711591f9570d92f7da4809f858c8f97bf580af 100644 (file)
@@ -93,7 +93,7 @@ void Position::clear()
 Element* Position::documentElement() const
 {
     if (Node* n = node())
-        if (Element* e = n->getDocument()->documentElement())
+        if (Element* e = n->document()->documentElement())
             return e;
     return 0;
 }
index dcc2750a43d9e4a90c511893735f6ad5d41225cc..e469d4f751124ffe87307c11ea9802507ae7a4c0 100644 (file)
@@ -127,7 +127,7 @@ Node *Range::commonAncestorContainer(Node *containerA, Node *containerB)
     }
 
     if (!parentStart)
-        return containerA->getDocument()->documentElement();
+        return containerA->document()->documentElement();
         
     return parentStart;
 }
@@ -154,7 +154,7 @@ void Range::setStart( Node *refNode, int offset, ExceptionCode& ec)
         return;
     }
 
-    if (refNode->getDocument() != m_ownerDocument) {
+    if (refNode->document() != m_ownerDocument) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -192,7 +192,7 @@ void Range::setEnd( Node *refNode, int offset, ExceptionCode& ec)
         return;
     }
 
-    if (refNode->getDocument() != m_ownerDocument) {
+    if (refNode->document() != m_ownerDocument) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -251,7 +251,7 @@ short Range::compareBoundaryPoints(CompareHow how, const Range *sourceRange, Exc
     if (ec)
         return 0;
 
-    if (thisCont->getDocument() != sourceCont->getDocument()) {
+    if (thisCont->document() != sourceCont->document()) {
         ec = WRONG_DOCUMENT_ERR;
         return 0;
     }
@@ -729,7 +729,7 @@ void Range::insertNode(PassRefPtr<Node> newNode, ExceptionCode& ec)
 
     // WRONG_DOCUMENT_ERR: Raised if newParent and the container of the start of the Range were
     // not created from the same document.
-    if (newNode->getDocument() != m_startContainer->getDocument()) {
+    if (newNode->document() != m_startContainer->document()) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -832,7 +832,7 @@ String Range::text() const
 
     // We need to update layout, since plainText uses line boxes in the render tree.
     // FIXME: As with innerText, we'd like this to work even if there are no render objects.
-    m_startContainer->getDocument()->updateLayout();
+    m_startContainer->document()->updateLayout();
 
     // FIXME: Maybe DOMRange constructor should take const DOMRange*; if it did we would not need this const_cast.
     return WebCore::plainText(const_cast<Range *>(this));
@@ -953,7 +953,7 @@ void Range::setStartAfter( Node *refNode, ExceptionCode& ec)
         return;
     }
 
-    if (refNode->getDocument() != m_ownerDocument) {
+    if (refNode->document() != m_ownerDocument) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -977,7 +977,7 @@ void Range::setEndBefore( Node *refNode, ExceptionCode& ec)
         return;
     }
 
-    if (refNode->getDocument() != m_ownerDocument) {
+    if (refNode->document() != m_ownerDocument) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -1001,7 +1001,7 @@ void Range::setEndAfter( Node *refNode, ExceptionCode& ec)
         return;
     }
 
-    if (refNode->getDocument() != m_ownerDocument) {
+    if (refNode->document() != m_ownerDocument) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -1122,7 +1122,7 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionCode& ec)
 
     // WRONG_DOCUMENT_ERR: Raised if newParent and the container of the start of the Range were
     // not created from the same document.
-    if (newParent->getDocument() != m_startContainer->getDocument()) {
+    if (newParent->document() != m_startContainer->document()) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -1187,7 +1187,7 @@ void Range::setStartBefore( Node *refNode, ExceptionCode& ec)
         return;
     }
 
-    if (refNode->getDocument() != m_ownerDocument) {
+    if (refNode->document() != m_ownerDocument) {
         ec = WRONG_DOCUMENT_ERR;
         return;
     }
@@ -1345,7 +1345,7 @@ bool operator==(const Range &a, const Range &b)
 
 PassRefPtr<Range> rangeOfContents(Node *node)
 {
-    RefPtr<Range> range = new Range(node->getDocument());
+    RefPtr<Range> range = new Range(node->document());
     int exception = 0;
     range->selectNodeContents(node, exception);
     return range.release();
index 46a0ca48bb68862206748edffad8cde162132f01..533e42c84f963c1b5546f59679fdb7953fcae490 100644 (file)
@@ -102,7 +102,7 @@ Node::NodeType Text::nodeType() const
 
 PassRefPtr<Node> Text::cloneNode(bool /*deep*/)
 {
-    return getDocument()->createTextNode(str);
+    return document()->createTextNode(str);
 }
 
 bool Text::rendererIsNeeded(RenderStyle *style)
@@ -176,7 +176,7 @@ bool Text::childTypeAllowed(NodeType)
 
 Text *Text::createNew(StringImpl *_str)
 {
-    return new Text(getDocument(), _str);
+    return new Text(document(), _str);
 }
 
 String Text::toString() const
index 424a6f0b8a9f3125f827751f923ee63d5daa1208..d056b115f9e51fbcfc1b315ee8cca4f56af6e79a 100644 (file)
@@ -263,7 +263,7 @@ void MouseRelatedEvent::receivedTarget()
     ASSERT(targ);
 
     // Must have an updated render tree for this math to work correctly.
-    targ->getDocument()->updateRendering();
+    targ->document()->updateRendering();
 
     // FIXME: clientX/Y should not be the same as pageX/Y!
     // Currently the passed-in clientX and clientY are incorrectly actually
index c933a53ef164c0f8bf70a5cfe248925d899ff407..871481e54ec40dd2d48f410e8131fc493c311f3f 100644 (file)
@@ -79,7 +79,7 @@ NodeIterator::NodeIterator(Node *rootNode, unsigned whatToShow, PassRefPtr<NodeF
     : Traversal(rootNode, whatToShow, filter, expandEntityReferences)
     , m_beforeReferenceNode(true)
     , m_detached(false)
-    , m_doc(rootNode ? rootNode->getDocument() : 0)
+    , m_doc(rootNode ? rootNode->document() : 0)
 {
     if (document())
         document()->attachNodeIterator(this);
index 57ee1515a90eb20130696908086c857d12e3f86b..a210e6475333c185da862d5a89a312def0329afd 100644 (file)
@@ -138,7 +138,7 @@ Node::NodeType EntityReference::nodeType() const
 
 PassRefPtr<Node> EntityReference::cloneNode(bool deep)
 {
-    RefPtr<EntityReference> clone = new EntityReference(getDocument(), m_entityName.get());
+    RefPtr<EntityReference> clone = new EntityReference(document(), m_entityName.get());
     // ### make sure children are readonly
     // ### since we are a reference, should we clone children anyway (even if not deep?)
     if (deep)
@@ -266,7 +266,7 @@ void ProcessingInstruction::setNodeValue(const String& nodeValue, ExceptionCode&
 PassRefPtr<Node> ProcessingInstruction::cloneNode(bool /*deep*/)
 {
     // ### copy m_localHref
-    return new ProcessingInstruction(getDocument(), m_target.get(), m_data.get());
+    return new ProcessingInstruction(document(), m_target.get(), m_data.get());
 }
 
 // DOM Section 1.1.1
@@ -320,17 +320,17 @@ bool ProcessingInstruction::checkStyleSheet()
             {
                 // ### some validation on the URL?
                 // ### FIXME charset
-                if (getDocument()->frame()) {
+                if (document()->frame()) {
                     m_loading = true;
-                    getDocument()->addPendingSheet();
+                    document()->addPendingSheet();
                     if (m_cachedSheet)
                         m_cachedSheet->deref(this);
 #if KHTML_XSLT
                     if (m_isXSL)
-                        m_cachedSheet = getDocument()->docLoader()->requestXSLStyleSheet(getDocument()->completeURL(href));
+                        m_cachedSheet = document()->docLoader()->requestXSLStyleSheet(document()->completeURL(href));
                     else
 #endif
-                    m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(getDocument()->completeURL(href), DeprecatedString::null);
+                    m_cachedSheet = document()->docLoader()->requestStyleSheet(document()->completeURL(href), DeprecatedString::null);
                     if (m_cachedSheet)
                         m_cachedSheet->ref( this );
 #if KHTML_XSLT
@@ -357,7 +357,7 @@ bool ProcessingInstruction::isLoading() const
 void ProcessingInstruction::sheetLoaded()
 {
     if (!isLoading())
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 void ProcessingInstruction::setStyleSheet(const String &url, const String &sheet)
@@ -377,7 +377,7 @@ void ProcessingInstruction::setStyleSheet(const String &url, const String &sheet
 
     // Tell the doc about the sheet.
     if (!isLoading() && m_sheet)
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 String ProcessingInstruction::toString() const
index 9bb6b69561ee30803c7b5f318690f62c210f55f7..7f89aa4ca73394e76af17a72b5f0d1d0224a277d 100644 (file)
@@ -258,7 +258,7 @@ XMLTokenizer::XMLTokenizer(Document *_doc, FrameView *_view)
 }
 
 XMLTokenizer::XMLTokenizer(DocumentFragment *fragment, Element *parentElement)
-    : m_doc(fragment->getDocument())
+    : m_doc(fragment->document())
     , m_view(0)
     , m_context(0)
     , m_currentNode(fragment)
index 48a884e7e812e2ff77f04900754d824711cff2e9..8936dd083a10c0be63938573b085cfc307af93a1 100644 (file)
@@ -123,7 +123,7 @@ ReplacementFragment::ReplacementFragment(Document *document, DocumentFragment *f
     if (m_document->frame()) {
         Node* selectionStartNode = m_document->frame()->selection().start().node();
         if (selectionStartNode && selectionStartNode->rootEditableElement()) {
-            RefPtr<Range> range = new Range(holder->getDocument());
+            RefPtr<Range> range = new Range(holder->document());
             ExceptionCode ec = 0;
             range->selectNodeContents(holder.get(), ec);
             String text = plainText(range.get());
@@ -331,7 +331,7 @@ void ReplaceSelectionCommand::fixupNodeStyles(const NodeVector& nodes, const Ren
         String matchColorCheck = desiredStyle->getPropertyValue(CSS_PROP__KHTML_MATCH_NEAREST_MAIL_BLOCKQUOTE_COLOR);
         if (matchColorCheck == matchNearestBlockquoteColorString()) {
             Node *blockquote = nearestMailBlockquote(node);
-            Position pos(blockquote ? blockquote : node->getDocument()->documentElement(), 0);
+            Position pos(blockquote ? blockquote : node->document()->documentElement(), 0);
             RefPtr<CSSComputedStyleDeclaration> style = pos.computedStyle();
             String desiredColor = desiredStyle->getPropertyValue(CSS_PROP_COLOR);
             String nearestColor = style->getPropertyValue(CSS_PROP_COLOR);
@@ -373,7 +373,7 @@ static PassRefPtr<CSSMutableStyleDeclaration> styleForNode(Node *node)
             return style.release();
         }
     }
-    Node *documentElement = node->getDocument()->documentElement();
+    Node *documentElement = node->document()->documentElement();
     RefPtr<CSSComputedStyleDeclaration> documentStyle = Position(documentElement, 0).computedStyle();
     bool match = (documentStyle->getPropertyValue(CSS_PROP_COLOR) == style->getPropertyValue(CSS_PROP_COLOR));
     if (match)
index 039c872b68a4c3f1c6e73a486be39d6bdc99d052..e3c86b3a5a61a04963fe3f5a5ea1bc300decdcc6 100644 (file)
@@ -78,7 +78,7 @@ PassRefPtr<Range> Selection::toRange() const
     // in the course of running edit commands which modify the DOM.
     // Failing to call this can result in equivalentXXXPosition calls returning
     // incorrect results.
-    m_start.node()->getDocument()->updateLayout();
+    m_start.node()->document()->updateLayout();
 
     Position s, e;
     if (isCaret()) {
@@ -114,7 +114,7 @@ PassRefPtr<Range> Selection::toRange() const
     }
 
     ExceptionCode ec = 0;
-    RefPtr<Range> result(new Range(s.node()->getDocument()));
+    RefPtr<Range> result(new Range(s.node()->document()));
     result->setStart(s.node(), s.offset(), ec);
     if (ec) {
         LOG_ERROR("Exception setting Range start from Selection: %d", ec);
index 94b66e6991a750f476706b82a217c1abce9f623b..daf542a82407477c59b7abf050d31bdec34939e0 100644 (file)
@@ -136,8 +136,8 @@ SelectionController::SelectionController(const SelectionController &o)
 SelectionController::~SelectionController()
 {
     if (!isNone()) {
-        Document *document = m_sel.start().node()->getDocument();
-        document->removeEventListener(DOMNodeRemovedEvent, m_mutationListener.get(), false);
+        Document *doc = m_sel.start().node()->document();
+        doc->removeEventListener(DOMNodeRemovedEvent, m_mutationListener.get(), false);
     }
 }
 
@@ -200,8 +200,8 @@ void SelectionController::moveTo(const Position &base, const Position &extent, E
 void SelectionController::setSelection(const Selection &newSelection)
 {
     Selection oldSelection = m_sel;
-    Document *oldDocument = oldSelection.start().node() ? oldSelection.start().node()->getDocument() : 0;
-    Document *newDocument = newSelection.start().node() ? newSelection.start().node()->getDocument() : 0;
+    Document *oldDocument = oldSelection.start().node() ? oldSelection.start().node()->document() : 0;
+    Document *newDocument = newSelection.start().node() ? newSelection.start().node()->document() : 0;
     
     if (oldDocument != newDocument) {
         if (oldDocument)
@@ -621,7 +621,7 @@ int SelectionController::xPosForVerticalArrowNavigation(EPositionType type, bool
             break;
     }
 
-    Frame *frame = pos.node()->getDocument()->frame();
+    Frame *frame = pos.node()->document()->frame();
     if (!frame)
         return x;
         
@@ -693,7 +693,7 @@ PassRefPtr<Range> SelectionController::getRangeAt(int index) const
 
 Frame *SelectionController::frame() const
 {
-    return !isNone() ? m_sel.start().node()->getDocument()->frame() : 0;
+    return !isNone() ? m_sel.start().node()->document()->frame() : 0;
 }
 
 void SelectionController::setBaseAndExtent(Node *baseNode, int baseOffset, Node *extentNode, int extentOffset)
@@ -742,7 +742,7 @@ void SelectionController::layout()
         return;
     }
 
-    m_sel.start().node()->getDocument()->updateRendering();
+    m_sel.start().node()->document()->updateRendering();
     
     m_caretRect = IntRect();
     m_caretPositionOnLayout = IntPoint();
@@ -793,7 +793,7 @@ void SelectionController::needsCaretRepaint()
     if (!isCaret())
         return;
 
-    FrameView *v = m_sel.start().node()->getDocument()->view();
+    FrameView *v = m_sel.start().node()->document()->view();
     if (!v)
         return;
 
index 3a16e46a532e9babd98d8980ccb9936a1ec9f52b..7295587730a2862ef039a56cf3085357b7701ec1 100644 (file)
@@ -476,12 +476,12 @@ PassRefPtr<Range> TextIterator::range() const
             m_positionEndOffset += index;
             m_positionOffsetBaseNode = 0;
         }
-        return new Range(m_positionNode->getDocument(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset);
+        return new Range(m_positionNode->document(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset);
     }
 
     // otherwise, return the end of the overall range we were given
     if (m_endContainer)
-        return new Range(m_endContainer->getDocument(), m_endContainer, m_endOffset, m_endContainer, m_endOffset);
+        return new Range(m_endContainer->document(), m_endContainer, m_endOffset, m_endContainer, m_endOffset);
         
     return 0;
 }
@@ -724,9 +724,9 @@ void SimplifiedBackwardsTextIterator::emitNewlineForBROrText()
 PassRefPtr<Range> SimplifiedBackwardsTextIterator::range() const
 {
     if (m_positionNode)
-        return new Range(m_positionNode->getDocument(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset);
+        return new Range(m_positionNode->document(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset);
     
-    return new Range(m_startNode->getDocument(), m_startNode, m_startOffset, m_startNode, m_startOffset);
+    return new Range(m_startNode->document(), m_startNode, m_startOffset, m_startNode, m_startOffset);
 }
 
 CharacterIterator::CharacterIterator()
index c5411e8db1d956b9c53195c3662c7a92c38c1ff2..661e71c80f0399c8f86e8cd10c46f47eaa3e15fb 100644 (file)
@@ -67,7 +67,7 @@ void VisiblePosition::init(const Position &pos, EAffinity affinity)
         return;
     }
     
-    pos.node()->getDocument()->updateLayoutIgnorePendingStylesheets();
+    pos.node()->document()->updateLayoutIgnorePendingStylesheets();
     Position deepPos = deepEquivalent(pos);
     if (deepPos.inRenderedContent()) {
         // If two visually equivalent positions are both candidates for being made the m_deepPosition,
@@ -279,7 +279,7 @@ PassRefPtr<Range> makeRange(const VisiblePosition &start, const VisiblePosition
 {
     Position s = rangeCompliantEquivalent(start);
     Position e = rangeCompliantEquivalent(end);
-    return new Range(s.node()->getDocument(), s.node(), s.offset(), e.node(), e.offset());
+    return new Range(s.node()->document(), s.node(), s.offset(), e.node(), e.offset());
 }
 
 VisiblePosition startVisiblePosition(const Range *r, EAffinity affinity)
index f7acb670dd2ec597336cd2eee66850b25031c54a..170b27ef6de50cbb562c729d8d4e094841226826 100644 (file)
@@ -149,7 +149,7 @@ static DeprecatedString renderedText(const Node *node, const Range *range)
 
 static DeprecatedString startMarkup(const Node *node, const Range *range, EAnnotateForInterchange annotate, CSSMutableStyleDeclaration *defaultStyle)
 {
-    bool documentIsHTML = node->getDocument()->isHTMLDocument();
+    bool documentIsHTML = node->document()->isHTMLDocument();
     switch (node->nodeType()) {
         case Node::TEXT_NODE: {
             if (Node* parent = node->parentNode()) {
@@ -262,7 +262,7 @@ static inline bool doesHTMLForbidEndTag(const Node *node)
 // 4. Other elements self-close.
 static inline bool shouldSelfClose(const Node *node)
 {
-    if (node->getDocument()->isHTMLDocument())
+    if (node->document()->isHTMLDocument())
         return false;
     if (node->hasChildNodes())
         return false;
@@ -291,7 +291,7 @@ static DeprecatedString markup(const Node *startNode, bool onlyIncludeChildren,
         }
         // print children
         if (Node *n = current->firstChild())
-            if (!(n->getDocument()->isHTMLDocument() && doesHTMLForbidEndTag(current)))
+            if (!(n->document()->isHTMLDocument() && doesHTMLForbidEndTag(current)))
                 me += markup(n, false, true, nodes);
         
         // Print my ending tag
@@ -329,7 +329,7 @@ DeprecatedString createMarkup(const Range *range, DeprecatedPtrList<Node> *nodes
     Node *commonAncestor = range->commonAncestorContainer(ec);
     ASSERT(ec == 0);
 
-    Document *doc = commonAncestor->getDocument();
+    Document *doc = commonAncestor->document();
     doc->updateLayoutIgnorePendingStylesheets();
 
     Node *commonAncestorBlock = 0;
@@ -488,7 +488,7 @@ DeprecatedString createMarkup(const WebCore::Node *node, EChildrenOnly includeCh
     DeprecatedPtrList<WebCore::Node> *nodes, EAnnotateForInterchange annotate)
 {
     ASSERT(annotate == DoNotAnnotateForInterchange); // annotation not yet implemented for this code path
-    node->getDocument()->updateLayoutIgnorePendingStylesheets();
+    node->document()->updateLayoutIgnorePendingStylesheets();
     return markup(node, includeChildren, false, nodes);
 }
 
index b2ed211c87b8f287f8bd25b60b9f398132d2aea4..7492da144d08ac4c7d63d09d1fdca68cd79e4bb0 100644 (file)
@@ -47,7 +47,7 @@ static VisiblePosition previousBoundary(const VisiblePosition &c, unsigned (*sea
     Node *n = pos.node();
     if (!n)
         return VisiblePosition();
-    Document *d = n->getDocument();
+    Document *d = n->document();
     Node *de = d->documentElement();
     if (!de)
         return VisiblePosition();
@@ -126,7 +126,7 @@ static VisiblePosition nextBoundary(const VisiblePosition &c, unsigned (*searchF
     Node *n = pos.node();
     if (!n)
         return VisiblePosition();
-    Document *d = n->getDocument();
+    Document *d = n->document();
     Node *de = d->documentElement();
     if (!de)
         return VisiblePosition();
@@ -375,7 +375,7 @@ VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int
     if (!node)
         return VisiblePosition();
     
-    node->getDocument()->updateLayoutIgnorePendingStylesheets();
+    node->document()->updateLayoutIgnorePendingStylesheets();
     
     RenderObject *renderer = node->renderer();
     if (!renderer)
@@ -438,7 +438,7 @@ VisiblePosition nextLinePosition(const VisiblePosition &visiblePosition, int x)
     if (!node)
         return VisiblePosition();
     
-    node->getDocument()->updateLayoutIgnorePendingStylesheets();
+    node->document()->updateLayoutIgnorePendingStylesheets();
 
     RenderObject *renderer = node->renderer();
     if (!renderer)
@@ -755,7 +755,7 @@ bool inSameDocument(const VisiblePosition &a, const VisiblePosition &b)
     if (an == bn)
         return true;
 
-    return an->getDocument() == bn->getDocument();
+    return an->document() == bn->document();
 }
 
 bool isStartOfDocument(const VisiblePosition &p)
index 695c34ede7ac1cfdad85a6cdfc088d78415c44db..7f98087f7d70730514a34ddfbce65f1f792131b5 100644 (file)
@@ -39,8 +39,8 @@ HTMLCollection::HTMLCollection(Node *_base, int _type)
       idsDone(false),
       m_ownsInfo(false)
 {
-    if (_base->isDocumentNode() && _base->getDocument()->isHTMLDocument())
-        info = static_cast<HTMLDocument*>(_base->getDocument())->collectionInfo(type);
+    if (_base->isDocumentNode() && _base->document()->isHTMLDocument())
+        info = static_cast<HTMLDocument*>(_base->document())->collectionInfo(type);
 }
 
 HTMLCollection::~HTMLCollection()
@@ -77,7 +77,7 @@ void HTMLCollection::CollectionInfo::reset()
 
 void HTMLCollection::resetCollectionInfo() const
 {
-    unsigned int docversion = static_cast<HTMLDocument*>(m_base->getDocument())->domTreeVersion();
+    unsigned int docversion = static_cast<HTMLDocument*>(m_base->document())->domTreeVersion();
 
     if (!info) {
         info = new CollectionInfo;
index 6f67ce916247aa1640c95d42c000ce6f11bc566f..f2f5ce9e79bb79ff089b7fdcdb6ed62fd81a4971 100644 (file)
@@ -62,7 +62,7 @@ String HTMLElement::nodeName() const
 {
     // FIXME: Would be nice to have an atomicstring lookup based off uppercase chars that does not have to copy
     // the string on a hit in the hash.
-    if (getDocument()->isHTMLDocument())
+    if (document()->isHTMLDocument())
         return m_tagName.localName().impl()->upper();
     return Element::nodeName();
 }
@@ -91,7 +91,7 @@ int HTMLElement::tagPriority() const
 
 PassRefPtr<Node> HTMLElement::cloneNode(bool deep)
 {
-    RefPtr<HTMLElement> clone = HTMLElementFactory::createHTMLElement(m_tagName.localName(), getDocument(), 0, false);
+    RefPtr<HTMLElement> clone = HTMLElementFactory::createHTMLElement(m_tagName.localName(), document(), 0, false);
     if (!clone)
         return 0;
 
@@ -222,7 +222,7 @@ String HTMLElement::outerHTML() const
 String HTMLElement::innerText() const
 {
     // We need to update layout, since plainText uses line boxes in the render tree.
-    getDocument()->updateLayoutIgnorePendingStylesheets();
+    document()->updateLayoutIgnorePendingStylesheets();
     return plainText(rangeOfContents(const_cast<HTMLElement *>(this)).get());
 }
 
@@ -246,9 +246,9 @@ PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String
         hasLocalName(headTag) || hasLocalName(styleTag) || hasLocalName(titleTag))
         return 0;
 
-    RefPtr<DocumentFragment> fragment = new DocumentFragment(getDocument());
+    RefPtr<DocumentFragment> fragment = new DocumentFragment(document());
     
-    if (getDocument()->isHTMLDocument())
+    if (document()->isHTMLDocument())
          parseHTMLDocumentFragment(html, fragment.get());
     else {
         if (!parseXMLDocumentFragment(html, fragment.get(), this))
@@ -337,7 +337,7 @@ void HTMLElement::setInnerText(const String &text, ExceptionCode& ec)
     }
 
     removeChildren();
-    appendChild(new Text(getDocument(), text), ec);
+    appendChild(new Text(document(), text), ec);
 }
 
 void HTMLElement::setOuterText(const String &text, ExceptionCode& ec)
@@ -363,7 +363,7 @@ void HTMLElement::setOuterText(const String &text, ExceptionCode& ec)
         return;
     }
 
-    RefPtr<Text> t = new Text(getDocument(), text);
+    RefPtr<Text> t = new Text(document(), text);
     ec = 0;
     parent->replaceChild(t, this, ec);
     if (ec)
@@ -437,10 +437,10 @@ bool HTMLElement::isFocusable() const
 
 bool HTMLElement::isContentEditable() const 
 {
-    if (getDocument()->frame() && getDocument()->frame()->isContentEditable())
+    if (document()->frame() && document()->frame()->isContentEditable())
         return true;
 
-    getDocument()->updateRendering();
+    document()->updateRendering();
 
     if (!renderer()) {
         if (parentNode())
@@ -454,7 +454,7 @@ bool HTMLElement::isContentEditable() const
 
 String HTMLElement::contentEditable() const 
 {
-    getDocument()->updateRendering();
+    document()->updateRendering();
 
     if (!renderer())
         return "false";
@@ -530,7 +530,7 @@ void HTMLElement::accessKeyAction(bool sendToAnyElement)
 
 String HTMLElement::toString() const
 {
-    if (!hasChildNodes() && getDocument()->isHTMLDocument()) {
+    if (!hasChildNodes() && document()->isHTMLDocument()) {
         String result = openTagStartToString();
         result += ">";
 
@@ -608,7 +608,7 @@ bool HTMLElement::childAllowed(Node *newChild)
         return false;
 
     // For XML documents, we are non-validating and do not check against a DTD, even for HTML elements.
-    if (!getDocument()->isHTMLDocument())
+    if (!document()->isHTMLDocument())
         return true;
 
     // Future-proof for XML content inside HTML documents (we may allow this some day).
@@ -791,7 +791,7 @@ bool HTMLElement::checkDTD(const Node* newChild)
 void HTMLElement::setHTMLEventListener(const AtomicString& eventType, Attribute* attr)
 {
     Element::setHTMLEventListener(eventType,
-        getDocument()->createHTMLEventListener(attr->localName().domString(), attr->value(), this));
+        document()->createHTMLEventListener(attr->localName().domString(), attr->value(), this));
 }
 
 }
index 4ecf2c10d2d1350263f86329ec95981e1ef3a6bf..2c3a38c40adb89b2024c8492e2667f2c5505a4a3 100644 (file)
@@ -76,7 +76,7 @@ bool HTMLFormElement::formWouldHaveSecureSubmission(const String &url)
     if (url.isNull()) {
         return false;
     }
-    return getDocument()->completeURL(url.deprecatedString()).startsWith("https:", false);
+    return document()->completeURL(url.deprecatedString()).startsWith("https:", false);
 }
 
 void HTMLFormElement::attach()
@@ -86,14 +86,14 @@ void HTMLFormElement::attach()
     // note we don't deal with calling secureFormRemoved() on detach, because the timing
     // was such that it cleared our state too early
     if (formWouldHaveSecureSubmission(m_url))
-        getDocument()->secureFormAdded();
+        document()->secureFormAdded();
 }
 
 void HTMLFormElement::insertedIntoDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->addNamedItem(oldNameAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->addNamedItem(oldNameAttr);
     }
 
     HTMLElement::insertedIntoDocument();
@@ -101,9 +101,9 @@ void HTMLFormElement::insertedIntoDocument()
 
 void HTMLFormElement::removedFromDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->removeNamedItem(oldNameAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->removeNamedItem(oldNameAttr);
     }
    
     HTMLElement::removedFromDocument();
@@ -192,7 +192,7 @@ bool HTMLFormElement::formData(FormData &form_data) const
     str.replace(',', ' ');
     DeprecatedStringList charsets = DeprecatedStringList::split(' ', str);
     TextEncoding encoding(InvalidEncoding);
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     for (DeprecatedStringList::Iterator it = charsets.begin(); it != charsets.end(); ++it) {
         if ((encoding = TextEncoding((*it).latin1())).isValid())
             break;
@@ -306,7 +306,7 @@ void HTMLFormElement::setBoundary( const String& bound )
 
 bool HTMLFormElement::prepareSubmit()
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (m_insubmit || !frame)
         return m_insubmit;
 
@@ -326,8 +326,8 @@ bool HTMLFormElement::prepareSubmit()
 
 void HTMLFormElement::submit( bool activateSubmitButton )
 {
-    FrameView *view = getDocument()->view();
-    Frame *frame = getDocument()->frame();
+    FrameView *view = document()->view();
+    Frame *frame = document()->frame();
     if (!view || !frame) {
         return;
     }
@@ -391,7 +391,7 @@ void HTMLFormElement::submit( bool activateSubmitButton )
 
 void HTMLFormElement::reset()
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (m_inreset || !frame)
         return;
 
@@ -419,9 +419,9 @@ void HTMLFormElement::parseMappedAttribute(MappedAttribute *attr)
 
         if (m_attached && (oldURLWasSecure != newURLIsSecure))
             if (newURLIsSecure)
-                getDocument()->secureFormAdded();
+                document()->secureFormAdded();
             else
-                getDocument()->secureFormRemoved();
+                document()->secureFormRemoved();
     }
     else if (attr->name() == targetAttr)
         m_target = attr->value();
@@ -446,10 +446,10 @@ void HTMLFormElement::parseMappedAttribute(MappedAttribute *attr)
         setHTMLEventListener(resetEvent, attr);
     else if (attr->name() == nameAttr) {
         String newNameAttr = attr->value();
-        if (inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-            document->removeNamedItem(oldNameAttr);
-            document->addNamedItem(newNameAttr);
+        if (inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+            doc->removeNamedItem(oldNameAttr);
+            doc->addNamedItem(newNameAttr);
         }
         oldNameAttr = newNameAttr;
     } else
@@ -488,7 +488,7 @@ unsigned HTMLFormElement::formElementIndex(HTMLGenericFormElement *e)
 
 void HTMLFormElement::registerFormElement(HTMLGenericFormElement* e)
 {
-    Document* doc = getDocument();
+    Document* doc = document();
     if (e->isRadioButton() && !e->name().isEmpty()) {
         HTMLGenericFormElement* currentCheckedRadio = doc->checkedRadioButtonForGroup(e->name().impl(), 0);
         if (currentCheckedRadio == e)
@@ -502,9 +502,9 @@ void HTMLFormElement::registerFormElement(HTMLGenericFormElement* e)
 void HTMLFormElement::removeFormElement(HTMLGenericFormElement* e)
 {
     if (!e->name().isEmpty()) {
-        HTMLGenericFormElement* currentCheckedRadio = getDocument()->checkedRadioButtonForGroup(e->name().impl(), this);
+        HTMLGenericFormElement* currentCheckedRadio = document()->checkedRadioButtonForGroup(e->name().impl(), this);
         if (currentCheckedRadio == e)
-            getDocument()->removeRadioButtonGroup(e->name().impl(), this);
+            document()->removeRadioButtonGroup(e->name().impl(), this);
     }
     removeFromVector(formElements, e);
 }
index f31831808e773bfd790d51fc5612e9d790822639..aa454430d4944eb882c507b5a569a8dd9254332d 100644 (file)
@@ -92,7 +92,7 @@ void HTMLGenericFormElement::attach()
         // (i.e., if we are the focusNode) then go ahead and focus our corresponding native widget.
         // (Attach/detach can also happen as a result of display type changes, e.g., making a widget
         // block instead of inline, and focus should be restored in that case as well.)
-        if (getDocument()->focusNode() == this && renderer()->isWidget() && 
+        if (document()->focusNode() == this && renderer()->isWidget() && 
             static_cast<RenderWidget*>(renderer())->widget())
             static_cast<RenderWidget*>(renderer())->widget()->setFocus();
     }
@@ -110,7 +110,7 @@ void HTMLGenericFormElement::insertedIntoTree(bool deep)
             m_form->registerFormElement(this);
         else
             if (isRadioButton() && !name().isEmpty() && isChecked())
-                getDocument()->radioButtonChecked((HTMLInputElement*)this, m_form);
+                document()->radioButtonChecked((HTMLInputElement*)this, m_form);
     }
 
     HTMLElement::insertedIntoTree(deep);
@@ -206,8 +206,8 @@ bool HTMLGenericFormElement::isKeyboardFocusable() const
             return static_cast<RenderWidget*>(renderer())->widget() &&
                 (static_cast<RenderWidget*>(renderer())->widget()->focusPolicy() & Widget::TabFocus);
         }
-        if (getDocument()->frame())
-            return getDocument()->frame()->tabsToAllControls();
+        if (document()->frame())
+            return document()->frame()->tabsToAllControls();
     }
     return false;
 }
index 05d30f21afa5ae657982c4a2396453e57f100913..81f3095f7ff19d9cc5058f83e127f5d7a4f2442b 100644 (file)
@@ -91,7 +91,7 @@ void HTMLInputElement::init()
 
 HTMLInputElement::~HTMLInputElement()
 {
-    getDocument()->deregisterMaintainsState(this);
+    document()->deregisterMaintainsState(this);
     delete m_imageLoader;
 }
 
@@ -117,7 +117,7 @@ bool HTMLInputElement::isKeyboardFocusable() const
 
         // Never allow keyboard tabbing to leave you in the same radio group.  Always
         // skip any other elements in the group.
-        Node* currentFocusNode = getDocument()->focusNode();
+        Node* currentFocusNode = document()->focusNode();
         if (currentFocusNode && currentFocusNode->hasTagName(inputTag)) {
             HTMLInputElement* focusedInput = static_cast<HTMLInputElement*>(currentFocusNode);
             if (focusedInput->inputType() == RADIO && focusedInput->form() == m_form &&
@@ -126,7 +126,7 @@ bool HTMLInputElement::isKeyboardFocusable() const
         }
         
         // Allow keyboard focus if we're checked or if nothing in the group is checked.
-        return checked() || !getDocument()->checkedRadioButtonForGroup(name().impl(), m_form);
+        return checked() || !document()->checkedRadioButtonForGroup(name().impl(), m_form);
     }
     
     return true;
@@ -135,7 +135,7 @@ bool HTMLInputElement::isKeyboardFocusable() const
 void HTMLInputElement::focus()
 {
     if ((m_type == TEXT || m_type == PASSWORD) && renderer() && renderer()->style()->appearance() == TextFieldAppearance) {
-        Document* doc = getDocument();
+        Document* doc = document();
         doc->updateLayout();
         if (isFocusable()) {
             doc->setFocusNode(this);
@@ -197,8 +197,8 @@ void HTMLInputElement::setInputType(const String& t)
             setAttribute(typeAttr, type());
         } else {
             if (inputType() == RADIO && !name().isEmpty()) {
-                if (getDocument()->checkedRadioButtonForGroup(name().impl(), m_form) == this)
-                    getDocument()->removeRadioButtonGroup(name().impl(), m_form);
+                if (document()->checkedRadioButtonForGroup(name().impl(), m_form) == this)
+                    document()->removeRadioButtonGroup(name().impl(), m_form);
             }
             bool wasAttached = m_attached;
             if (wasAttached)
@@ -219,7 +219,7 @@ void HTMLInputElement::setInputType(const String& t)
             // If our type morphs into a radio button and we are checked, then go ahead
             // and signal this to the form.
             if (m_type == RADIO && checked())
-                getDocument()->radioButtonChecked(this, m_form);
+                document()->radioButtonChecked(this, m_form);
         }
     }
     m_haveType = true;
@@ -514,7 +514,7 @@ void HTMLInputElement::parseMappedAttribute(MappedAttribute *attr)
         if (m_type == RADIO && checked()) {
             // Remove the radio from its old group.
             if (m_type == RADIO && !m_name.isEmpty())
-                getDocument()->removeRadioButtonGroup(m_name.impl(), m_form);
+                document()->removeRadioButtonGroup(m_name.impl(), m_form);
         }
         
         // Update our cached reference to the name.
@@ -526,7 +526,7 @@ void HTMLInputElement::parseMappedAttribute(MappedAttribute *attr)
                 setChecked(m_defaultChecked);
             // Add the button to its new group.
             if (checked())
-                getDocument()->radioButtonChecked(this, m_form);
+                document()->radioButtonChecked(this, m_form);
         }
         
         
@@ -700,7 +700,7 @@ void HTMLInputElement::attach()
     // note we don't deal with calling passwordFieldRemoved() on detach, because the timing
     // was such that it cleared our state too early
     if (m_type == PASSWORD)
-        getDocument()->passwordFieldAdded();
+        document()->passwordFieldAdded();
 }
 
 void HTMLInputElement::detach()
@@ -834,7 +834,7 @@ void HTMLInputElement::setChecked(bool nowChecked)
         return;
 
     if (m_type == RADIO && nowChecked)
-        getDocument()->radioButtonChecked(this, m_form);
+        document()->radioButtonChecked(this, m_form);
 
     m_useDefaultChecked = false;
     m_checked = nowChecked;
@@ -994,7 +994,7 @@ void* HTMLInputElement::preDispatchEventHandler(Event *evt)
             // We really want radio groups to end up in sane states, i.e., to have something checked.
             // Therefore if nothing is currently selected, we won't allow this action to be "undone", since
             // we want some object in the radio group to actually get selected.
-            HTMLInputElement* currRadio = getDocument()->checkedRadioButtonForGroup(name().impl(), m_form);
+            HTMLInputElement* currRadio = document()->checkedRadioButtonForGroup(name().impl(), m_form);
             if (currRadio) {
                 // We have a radio button selected that is not us.  Cache it in our result field and ref it so
                 // that it can't be destroyed.
@@ -1162,7 +1162,7 @@ void HTMLInputElement::defaultEventHandler(Event *evt)
                         if (inputElt->inputType() == RADIO && inputElt->name() == name() &&
                             inputElt->isFocusable()) {
                             inputElt->setChecked(true);
-                            getDocument()->setFocusNode(inputElt);
+                            document()->setFocusNode(inputElt);
                             inputElt->click(false, false);
                             evt->setDefaultHandled();
                             break;
@@ -1186,7 +1186,7 @@ void HTMLInputElement::defaultEventHandler(Event *evt)
         unsigned ml = maxLength();
         unsigned currentLength = value().length();
         String text = static_cast<BeforeTextInsertedEvent *>(evt)->text();
-        int selectionLength = getDocument()->frame()->selection().toString().length();
+        int selectionLength = document()->frame()->selection().toString().length();
         
         // Truncate the inserted text if necessary
         if (currentLength + text.length() - selectionLength > ml) {
@@ -1284,7 +1284,7 @@ void HTMLInputElement::setSize(unsigned _size)
 
 String HTMLInputElement::src() const
 {
-    return getDocument()->completeURL(getAttribute(srcAttr));
+    return document()->completeURL(getAttribute(srcAttr));
 }
 
 void HTMLInputElement::setSrc(const String &value)
index 1ac517af159f9e32d6f4237b256c879f09081716..e71fc1897915f14cab5e8bf0c267e039df4a0f1a 100644 (file)
@@ -71,7 +71,7 @@ bool HTMLKeygenElement::appendFormData(FormDataList& encoded_values, bool)
     // Only RSA is supported at this time.
     if (!m_keyType.isNull() && !equalIgnoringCase(m_keyType, "rsa"))
         return false;
-    DeprecatedString value = KSSLKeyGen::signedPublicKeyAndChallengeString(selectedIndex(), m_challenge.deprecatedString(), getDocument()->baseURL());
+    DeprecatedString value = KSSLKeyGen::signedPublicKeyAndChallengeString(selectedIndex(), m_challenge.deprecatedString(), document()->baseURL());
     if (value.isNull())
         return false;
     encoded_values.appendData(name(), value.utf8());
index e74790874167bf0bd3f6415b26e53401c9e640d2..e04ea3d10bd06bb4c4b6e6b028832c29d7cc665a 100644 (file)
@@ -80,7 +80,7 @@ Element *HTMLLabelElement::formElement()
     }
     if (formElementId.isEmpty())
         return 0;
-    return getDocument()->getElementById(formElementId);
+    return document()->getElementById(formElementId);
 }
 
 void HTMLLabelElement::focus()
index 4ce10465fe32561ae3d011d818d2bbc74d677134..e11cece65069d6c098e0f8b19f84f38f2c0db3cd 100644 (file)
@@ -57,7 +57,7 @@ String HTMLOptionElement::text() const
     String text;
 
     // WinIE does not use the label attribute, so as a quirk, we ignore it.
-    if (!getDocument()->inCompatMode()) {
+    if (!document()->inCompatMode()) {
         String text = getAttribute(labelAttr);
         if (!text.isEmpty())
             return text;
@@ -87,7 +87,7 @@ void HTMLOptionElement::setText(const String &text, ExceptionCode& ec)
     }
 
     removeChildren();
-    appendChild(new Text(getDocument(), text), ec);
+    appendChild(new Text(document(), text), ec);
 }
 
 int HTMLOptionElement::index() const
index 5ea559df71578ef2a5cd99e4bfbeedd56930985b..be8b4367864dd372bd52ba357c9e11c25850132f 100644 (file)
@@ -119,7 +119,7 @@ HTMLParser::HTMLParser(Document* doc)
 }
 
 HTMLParser::HTMLParser(DocumentFragment* frag)
-    : document(frag->getDocument())
+    : document(frag->document())
     , current(0)
     , currentIsReferenced(false)
     , blockStack(0)
index a072fd62bf29dc303a7036e77cc2674a6c1b3aec..40b76bc36545a1b3c8a8b2cab5e76a0e952c3a5f 100644 (file)
@@ -56,7 +56,7 @@ HTMLSelectElement::HTMLSelectElement(const QualifiedName& tagName, Document *doc
 
 HTMLSelectElement::~HTMLSelectElement()
 {
-    getDocument()->deregisterMaintainsState(this);
+    document()->deregisterMaintainsState(this);
 }
 
 bool HTMLSelectElement::checkDTD(const Node* newChild)
index d5e4436c4c3a347173459501caee2028c4c47efd..020c3db518275951fd5c8f8e5eea729b2320f02a 100644 (file)
@@ -51,7 +51,7 @@ HTMLTextAreaElement::HTMLTextAreaElement(Document *doc, HTMLFormElement *f)
 
 HTMLTextAreaElement::~HTMLTextAreaElement()
 {
-    getDocument()->deregisterMaintainsState(this);
+    document()->deregisterMaintainsState(this);
 }
 
 String HTMLTextAreaElement::type() const
@@ -242,7 +242,7 @@ void HTMLTextAreaElement::setDefaultValue(const String &defaultValue)
         RefPtr<Node> n = it.current();
         removeChild(n.get(), ec);
     }
-    insertBefore(getDocument()->createTextNode(defaultValue), firstChild(), ec);
+    insertBefore(document()->createTextNode(defaultValue), firstChild(), ec);
     setValue(defaultValue);
 }
 
index 10d88269b58ec12c0afa7b3211cf7f32f5386919..8543ae583a78335431bd336be6f4175b162021cf 100644 (file)
@@ -153,7 +153,7 @@ HTMLTokenizer::HTMLTokenizer(DocumentFragment* frag)
     , scriptCodeResync(0)
     , m_executingScript(0)
     , m_timer(this, &HTMLTokenizer::timerFired)
-    , m_doc(frag->getDocument())
+    , m_doc(frag->document())
     , inWrite(false)
     , m_fragment(true)
 {
index 6a737478acca6b81af67376ab6be818fabdc3e34..d96f4d8e07947e4e54c2de3d4ce89236d9b970be 100644 (file)
@@ -67,15 +67,15 @@ HTMLBodyElement::~HTMLBodyElement()
 void HTMLBodyElement::createLinkDecl()
 {
     m_linkDecl = new CSSMutableStyleDeclaration;
-    m_linkDecl->setParent(getDocument()->elementSheet());
+    m_linkDecl->setParent(document()->elementSheet());
     m_linkDecl->setNode(this);
-    m_linkDecl->setStrictParsing(!getDocument()->inCompatMode());
+    m_linkDecl->setStrictParsing(!document()->inCompatMode());
 }
 
 bool HTMLBodyElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
 {
     if (attrName == backgroundAttr) {
-        result = (MappedAttributeEntry)(eLastEntry + getDocument()->docID());
+        result = (MappedAttributeEntry)(eLastEntry + document()->docID());
         return false;
     } 
     
@@ -98,7 +98,7 @@ void HTMLBodyElement::parseMappedAttribute(MappedAttribute *attr)
     if (attr->name() == backgroundAttr) {
         String url = WebCore::parseURL(attr->value());
         if (!url.isEmpty())
-            addCSSImageProperty(attr, CSS_PROP_BACKGROUND_IMAGE, getDocument()->completeURL(url));
+            addCSSImageProperty(attr, CSS_PROP_BACKGROUND_IMAGE, document()->completeURL(url));
     } else if (attr->name() == marginwidthAttr || attr->name() == leftmarginAttr) {
         addCSSLength(attr, CSS_PROP_MARGIN_RIGHT, attr->value());
         addCSSLength(attr, CSS_PROP_MARGIN_LEFT, attr->value());
@@ -117,11 +117,11 @@ void HTMLBodyElement::parseMappedAttribute(MappedAttribute *attr)
                attr->name() == linkAttr) {
         if (attr->isNull()) {
             if (attr->name() == linkAttr)
-                getDocument()->resetLinkColor();
+                document()->resetLinkColor();
             else if (attr->name() == vlinkAttr)
-                getDocument()->resetVisitedLinkColor();
+                document()->resetVisitedLinkColor();
             else
-                getDocument()->resetActiveLinkColor();
+                document()->resetActiveLinkColor();
         }
         else {
             if (!m_linkDecl)
@@ -129,32 +129,32 @@ void HTMLBodyElement::parseMappedAttribute(MappedAttribute *attr)
             m_linkDecl->setProperty(CSS_PROP_COLOR, attr->value(), false, false);
             RefPtr<CSSValue> val = m_linkDecl->getPropertyCSSValue(CSS_PROP_COLOR);
             if (val && val->isPrimitiveValue()) {
-                Color col = getDocument()->styleSelector()->getColorFromPrimitiveValue(static_cast<CSSPrimitiveValue*>(val.get()));
+                Color col = document()->styleSelector()->getColorFromPrimitiveValue(static_cast<CSSPrimitiveValue*>(val.get()));
                 if (attr->name() == linkAttr)
-                    getDocument()->setLinkColor(col);
+                    document()->setLinkColor(col);
                 else if (attr->name() == vlinkAttr)
-                    getDocument()->setVisitedLinkColor(col);
+                    document()->setVisitedLinkColor(col);
                 else
-                    getDocument()->setActiveLinkColor(col);
+                    document()->setActiveLinkColor(col);
             }
         }
         
         if (attached())
-            getDocument()->recalcStyle(Force);
+            document()->recalcStyle(Force);
     } else if (attr->name() == onloadAttr) {
-        getDocument()->setHTMLWindowEventListener(loadEvent, attr);
+        document()->setHTMLWindowEventListener(loadEvent, attr);
     } else if (attr->name() == onbeforeunloadAttr) {
-        getDocument()->setHTMLWindowEventListener(beforeunloadEvent, attr);
+        document()->setHTMLWindowEventListener(beforeunloadEvent, attr);
     } else if (attr->name() == onunloadAttr) {
-        getDocument()->setHTMLWindowEventListener(unloadEvent, attr);
+        document()->setHTMLWindowEventListener(unloadEvent, attr);
     } else if (attr->name() == onblurAttr) {
-        getDocument()->setHTMLWindowEventListener(blurEvent, attr);
+        document()->setHTMLWindowEventListener(blurEvent, attr);
     } else if (attr->name() == onfocusAttr) {
-        getDocument()->setHTMLWindowEventListener(focusEvent, attr);
+        document()->setHTMLWindowEventListener(focusEvent, attr);
     } else if (attr->name() == onresizeAttr) {
-        getDocument()->setHTMLWindowEventListener(resizeEvent, attr);
+        document()->setHTMLWindowEventListener(resizeEvent, attr);
     } else if (attr->name() == onscrollAttr) {
-        getDocument()->setHTMLWindowEventListener(scrollEvent, attr);
+        document()->setHTMLWindowEventListener(scrollEvent, attr);
     } else
         HTMLElement::parseMappedAttribute(attr);
 }
@@ -165,7 +165,7 @@ void HTMLBodyElement::insertedIntoDocument()
 
     // FIXME: perhaps this code should be in attach() instead of here
 
-    FrameView *w = getDocument()->view();
+    FrameView *w = document()->view();
     if (w && w->marginWidth() != -1)
         setAttribute(marginwidthAttr, String::number(w->marginWidth()));
     if (w && w->marginHeight() != -1)
@@ -273,11 +273,11 @@ bool HTMLFrameElement::isURLAllowed(const AtomicString &URLString) const
     if (URLString.isEmpty())
         return true;
     
-    FrameView *w = getDocument()->view();
+    FrameView *w = document()->view();
     if (!w)
         return false;
 
-    KURL newURL(getDocument()->completeURL(URLString.deprecatedString()));
+    KURL newURL(document()->completeURL(URLString.deprecatedString()));
     newURL.setRef(DeprecatedString::null);
 
     // Don't allow more than 1000 total frames in a set. This seems
@@ -311,7 +311,7 @@ bool HTMLFrameElement::isURLAllowed(const AtomicString &URLString) const
 
 void HTMLFrameElement::openURL()
 {
-    FrameView *w = getDocument()->view();
+    FrameView *w = document()->view();
     if (!w)
         return;
     
@@ -322,7 +322,7 @@ void HTMLFrameElement::openURL()
     // Load the frame contents.
     Frame* parentFrame = w->frame();
     if (Frame* childFrame = parentFrame->tree()->child(m_name))
-        childFrame->openURL(getDocument()->completeURL(relativeURL.deprecatedString()));
+        childFrame->openURL(document()->completeURL(relativeURL.deprecatedString()));
     else
         parentFrame->requestFrame(static_cast<RenderFrame *>(renderer()), relativeURL, m_name);
 }
@@ -405,7 +405,7 @@ void HTMLFrameElement::attach()
     if (!renderer())
         return;
 
-    Frame* frame = getDocument()->frame();
+    Frame* frame = document()->frame();
 
     if (!frame)
         return;
@@ -424,7 +424,7 @@ void HTMLFrameElement::attach()
 
 void HTMLFrameElement::close()
 {
-    Frame* frame = getDocument()->frame();
+    Frame* frame = document()->frame();
     if (renderer() && frame) {
         frame->page()->decrementFrameCount();
         if (Frame* childFrame = frame->tree()->child(m_name))
@@ -495,7 +495,7 @@ void HTMLFrameElement::setFocus(bool received)
 Frame* HTMLFrameElement::contentFrame() const
 {
     // Start with the part that contains this element, our ownerDocument.
-    Frame* parentFrame = getDocument()->frame();
+    Frame* parentFrame = document()->frame();
     if (!parentFrame)
         return 0;
 
@@ -596,7 +596,7 @@ int HTMLFrameElement::frameWidth() const
     if (!renderer())
         return 0;
     
-    getDocument()->updateLayoutIgnorePendingStylesheets();
+    document()->updateLayoutIgnorePendingStylesheets();
     return renderer()->width();
 }
 
@@ -605,7 +605,7 @@ int HTMLFrameElement::frameHeight() const
     if (!renderer())
         return 0;
     
-    getDocument()->updateLayoutIgnorePendingStylesheets();
+    document()->updateLayoutIgnorePendingStylesheets();
     return renderer()->height();
 }
 
@@ -669,11 +669,11 @@ void HTMLFrameSetElement::parseMappedAttribute(MappedAttribute *attr)
         if(!m_border)
             frameborder = false;
     } else if (attr->name() == onloadAttr) {
-        getDocument()->setHTMLWindowEventListener(loadEvent, attr);
+        document()->setHTMLWindowEventListener(loadEvent, attr);
     } else if (attr->name() == onbeforeunloadAttr) {
-        getDocument()->setHTMLWindowEventListener(beforeunloadEvent, attr);
+        document()->setHTMLWindowEventListener(beforeunloadEvent, attr);
     } else if (attr->name() == onunloadAttr) {
-        getDocument()->setHTMLWindowEventListener(unloadEvent, attr);
+        document()->setHTMLWindowEventListener(unloadEvent, attr);
     } else
         HTMLElement::parseMappedAttribute(attr);
 }
@@ -843,10 +843,10 @@ void HTMLIFrameElement::parseMappedAttribute(MappedAttribute *attr)
         addHTMLAlignment(attr);
     else if (attr->name() == nameAttr) {
         String newNameAttr = attr->value();
-        if (inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-            document->removeDocExtraNamedItem(oldNameAttr);
-            document->addDocExtraNamedItem(newNameAttr);
+        if (inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+            doc->removeDocExtraNamedItem(oldNameAttr);
+            doc->addDocExtraNamedItem(newNameAttr);
         }
         oldNameAttr = newNameAttr;
     } else
@@ -855,9 +855,9 @@ void HTMLIFrameElement::parseMappedAttribute(MappedAttribute *attr)
 
 void HTMLIFrameElement::insertedIntoDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->addDocExtraNamedItem(oldNameAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->addDocExtraNamedItem(oldNameAttr);
     }
 
     HTMLElement::insertedIntoDocument();
@@ -865,9 +865,9 @@ void HTMLIFrameElement::insertedIntoDocument()
 
 void HTMLIFrameElement::removedFromDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->removeDocExtraNamedItem(oldNameAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->removeDocExtraNamedItem(oldNameAttr);
     }
 
     HTMLElement::removedFromDocument();
@@ -892,7 +892,7 @@ void HTMLIFrameElement::attach()
 
     HTMLElement::attach();
 
-    Frame* parentFrame = getDocument()->frame();
+    Frame* parentFrame = document()->frame();
     if (renderer() && parentFrame) {
         parentFrame->page()->incrementFrameCount();
         m_name = parentFrame->tree()->uniqueChildName(m_name);
@@ -944,7 +944,7 @@ void HTMLIFrameElement::setHeight(const String &value)
 
 String HTMLIFrameElement::src() const
 {
-    return getDocument()->completeURL(getAttribute(srcAttr));
+    return document()->completeURL(getAttribute(srcAttr));
 }
 
 String HTMLIFrameElement::width() const
index e2963ef320dd8e2121c49f5a94dc5f7bfc62eb71..25faa1e896d184fdc133f776f703878fece8b2e6 100644 (file)
@@ -245,7 +245,7 @@ HTMLParagraphElement::HTMLParagraphElement(Document *doc)
 
 bool HTMLParagraphElement::checkDTD(const Node* newChild)
 {
-    return inInlineTagList(newChild) || (getDocument()->inCompatMode() && newChild->hasTagName(tableTag));
+    return inInlineTagList(newChild) || (document()->inCompatMode() && newChild->hasTagName(tableTag));
 }
 
 bool HTMLParagraphElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
index a12cbbd774399f62562a6db830cce7320c7ca44c..5d81f6b8896fc3b082e72d8935948a7d1212de56 100644 (file)
@@ -79,8 +79,8 @@ void HTMLBaseElement::removedFromDocument()
 
     // Since the document doesn't have a base element...
     // (This will break in the case of multiple base elements, but that's not valid anyway (?))
-    getDocument()->setBaseURL( DeprecatedString::null );
-    getDocument()->setBaseTarget( DeprecatedString::null );
+    document()->setBaseURL( DeprecatedString::null );
+    document()->setBaseTarget( DeprecatedString::null );
 }
 
 void HTMLBaseElement::process()
@@ -88,11 +88,11 @@ void HTMLBaseElement::process()
     if (!inDocument())
        return;
 
-    if(!m_href.isEmpty() && getDocument()->frame())
-       getDocument()->setBaseURL( KURL( getDocument()->frame()->url(), m_href.deprecatedString() ).url() );
+    if(!m_href.isEmpty() && document()->frame())
+       document()->setBaseURL( KURL( document()->frame()->url(), m_href.deprecatedString() ).url() );
 
     if(!m_target.isEmpty())
-       getDocument()->setBaseTarget( m_target.deprecatedString() );
+       document()->setBaseTarget( m_target.deprecatedString() );
 
     // ### should changing a document's base URL dynamically automatically update all images, stylesheets etc?
 }
@@ -136,11 +136,11 @@ void HTMLLinkElement::setDisabledState(bool _disabled)
             // a main sheet or a sheet that was previously enabled via script, then we need
             // to remove it from the list of pending sheets.
             if (m_disabledState == 2 && (!m_alternate || oldDisabledState == 1))
-                getDocument()->stylesheetLoaded();
+                document()->stylesheetLoaded();
 
             // Check #2: An alternate sheet becomes enabled while it is still loading.
             if (m_alternate && m_disabledState == 1)
-                getDocument()->addPendingSheet();
+                document()->addPendingSheet();
 
             // Check #3: A main sheet becomes enabled while it was still loading and
             // after it was disabled via script.  It takes really terrible code to make this
@@ -148,7 +148,7 @@ void HTMLLinkElement::setDisabledState(bool _disabled)
             // virtualplastic.net, which manages to do about 12 enable/disables on only 3
             // sheets. :)
             if (!m_alternate && m_disabledState == 1 && oldDisabledState == 2)
-                getDocument()->addPendingSheet();
+                document()->addPendingSheet();
 
             // If the sheet is already loading just bail.
             return;
@@ -158,7 +158,7 @@ void HTMLLinkElement::setDisabledState(bool _disabled)
         if (!m_sheet && m_disabledState == 1)
             process();
         else
-            getDocument()->updateStyleSelector(); // Update the style selector.
+            document()->updateStyleSelector(); // Update the style selector.
     }
 }
 
@@ -168,7 +168,7 @@ void HTMLLinkElement::parseMappedAttribute(MappedAttribute *attr)
         tokenizeRelAttribute(attr->value());
         process();
     } else if (attr->name() == hrefAttr) {
-        m_url = getDocument()->completeURL(parseURL(attr->value()));
+        m_url = document()->completeURL(parseURL(attr->value()));
        process();
     } else if (attr->name() == typeAttr) {
         m_type = attr->value();
@@ -214,7 +214,7 @@ void HTMLLinkElement::process()
 
     String type = m_type.lower();
     
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
 
     // IE extension: location of small icon for locationbar / bookmarks
     if (frame && m_isIcon && !m_url.isEmpty() && !frame->tree()->parent()) {
@@ -226,7 +226,7 @@ void HTMLLinkElement::process()
 
     // Stylesheet
     // This was buggy and would incorrectly match <link rel="alternate">, which has a different specified meaning. -dwh
-    if (m_disabledState != 2 && (type.contains("text/css") || m_isStyleSheet) && getDocument()->frame()) {
+    if (m_disabledState != 2 && (type.contains("text/css") || m_isStyleSheet) && document()->frame()) {
         // no need to load style sheets which aren't for the screen output
         // ### there may be in some situations e.g. for an editor or script to manipulate
        // also, don't load style sheets for standalone documents
@@ -235,17 +235,17 @@ void HTMLLinkElement::process()
             // Add ourselves as a pending sheet, but only if we aren't an alternate 
             // stylesheet.  Alternate stylesheets don't hold up render tree construction.
             if (!isAlternate())
-                getDocument()->addPendingSheet();
+                document()->addPendingSheet();
             
             DeprecatedString chset = getAttribute(charsetAttr).deprecatedString();
             if (m_cachedSheet) {
                 if (m_loading) {
-                    getDocument()->stylesheetLoaded();
+                    document()->stylesheetLoaded();
                 }
                 m_cachedSheet->deref(this);
             }
             m_loading = true;
-            m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(m_url, chset);
+            m_cachedSheet = document()->docLoader()->requestStyleSheet(m_url, chset);
             if (m_cachedSheet)
                 m_cachedSheet->ref(this);
         }
@@ -253,7 +253,7 @@ void HTMLLinkElement::process()
     else if (m_sheet) {
         // we no longer contain a stylesheet, e.g. perhaps rel or type was changed
         m_sheet = 0;
-        getDocument()->updateStyleSelector();
+        document()->updateStyleSelector();
     }
 }
 
@@ -272,7 +272,7 @@ void HTMLLinkElement::removedFromDocument()
 void HTMLLinkElement::setStyleSheet(const String &url, const String &sheetStr)
 {
     m_sheet = new CSSStyleSheet(this, url);
-    m_sheet->parseString(sheetStr, !getDocument()->inCompatMode());
+    m_sheet->parseString(sheetStr, !document()->inCompatMode());
 
     MediaList *media = new MediaList(m_sheet.get(), m_media);
     m_sheet->setMedia(media);
@@ -281,7 +281,7 @@ void HTMLLinkElement::setStyleSheet(const String &url, const String &sheetStr)
 
     // Tell the doc about the sheet.
     if (!isLoading() && m_sheet && !isDisabled() && !isAlternate())
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 bool HTMLLinkElement::isLoading() const
@@ -296,7 +296,7 @@ bool HTMLLinkElement::isLoading() const
 void HTMLLinkElement::sheetLoaded()
 {
     if (!isLoading() && !isDisabled() && !isAlternate())
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 bool HTMLLinkElement::isURLAttribute(Attribute *attr) const
@@ -326,7 +326,7 @@ void HTMLLinkElement::setCharset(const String &value)
 
 String HTMLLinkElement::href() const
 {
-    return getDocument()->completeURL(getAttribute(hrefAttr));
+    return document()->completeURL(getAttribute(hrefAttr));
 }
 
 void HTMLLinkElement::setHref(const String &value)
@@ -429,7 +429,7 @@ void HTMLMetaElement::process()
     // Get the document to process the tag, but only if we're actually part of DOM tree (changing a meta tag while
     // it's not in the tree shouldn't have any effect on the document)
     if (inDocument() && !m_equiv.isNull() && !m_content.isNull())
-       getDocument()->processHttpEquiv(m_equiv,m_content);
+       document()->processHttpEquiv(m_equiv,m_content);
 }
 
 String HTMLMetaElement::content() const
@@ -496,7 +496,7 @@ void HTMLScriptElement::childrenChanged()
     // and the script element has been inserted in the document
     // we evaluate the script.
     if (!m_createdByParser && inDocument() && firstChild())
-        evaluateScript(getDocument()->URL(), text());
+        evaluateScript(document()->URL(), text());
 }
 
 void HTMLScriptElement::parseMappedAttribute(MappedAttribute *attr)
@@ -508,13 +508,13 @@ void HTMLScriptElement::parseMappedAttribute(MappedAttribute *attr)
 
         // FIXME: Evaluate scripts in viewless documents.
         // See http://bugzilla.opendarwin.org/show_bug.cgi?id=5727
-        if (!getDocument()->frame())
+        if (!document()->frame())
             return;
     
         const AtomicString& url = attr->value();
         if (!url.isEmpty()) {
             DeprecatedString charset = getAttribute(charsetAttr).deprecatedString();
-            m_cachedScript = getDocument()->docLoader()->requestScript(url, charset);
+            m_cachedScript = document()->docLoader()->requestScript(url, charset);
             m_cachedScript->ref(this);
         }
     } else if (attrName == onerrorAttr) {
@@ -546,13 +546,13 @@ void HTMLScriptElement::insertedIntoDocument()
     // FIXME: Eventually we'd like to evaluate scripts which are inserted into a 
     // viewless document but this'll do for now.
     // See http://bugzilla.opendarwin.org/show_bug.cgi?id=5727
-    if (!getDocument()->frame())
+    if (!document()->frame())
         return;
     
     const AtomicString& url = getAttribute(srcAttr);
     if (!url.isEmpty()) {
         DeprecatedString charset = getAttribute(charsetAttr).deprecatedString();
-        m_cachedScript = getDocument()->docLoader()->requestScript(url, charset);
+        m_cachedScript = document()->docLoader()->requestScript(url, charset);
         m_cachedScript->ref(this);
         return;
     }
@@ -562,7 +562,7 @@ void HTMLScriptElement::insertedIntoDocument()
     // it should be evaluated, and evaluateScript only evaluates a script once.
     String scriptString = text();    
     if (!scriptString.isEmpty())
-        evaluateScript(getDocument()->URL(), scriptString);
+        evaluateScript(document()->URL(), scriptString);
 }
 
 void HTMLScriptElement::removedFromDocument()
@@ -597,7 +597,7 @@ void HTMLScriptElement::evaluateScript(const String& URL, const String& script)
     if (m_evaluated)
         return;
     
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (frame) {
         KJSProxy *proxy = frame->jScript();
         if (proxy) {
@@ -634,7 +634,7 @@ void HTMLScriptElement::setText(const String &value)
         removeChildren();
     }
     
-    appendChild(getDocument()->createTextNode(value.impl()), ec);
+    appendChild(document()->createTextNode(value.impl()), ec);
 }
 
 String HTMLScriptElement::htmlFor() const
@@ -681,7 +681,7 @@ void HTMLScriptElement::setDefer(bool defer)
 
 String HTMLScriptElement::src() const
 {
-    return getDocument()->completeURL(getAttribute(srcAttr));
+    return document()->completeURL(getAttribute(srcAttr));
 }
 
 void HTMLScriptElement::setSrc(const String &value)
@@ -721,14 +721,14 @@ void HTMLStyleElement::insertedIntoDocument()
 {
     HTMLElement::insertedIntoDocument();
     if (m_sheet)
-        getDocument()->updateStyleSelector();
+        document()->updateStyleSelector();
 }
 
 void HTMLStyleElement::removedFromDocument()
 {
     HTMLElement::removedFromDocument();
     if (m_sheet)
-        getDocument()->updateStyleSelector();
+        document()->updateStyleSelector();
 }
 
 void HTMLStyleElement::childrenChanged()
@@ -741,24 +741,24 @@ void HTMLStyleElement::childrenChanged()
 
     if (m_sheet) {
         if (static_cast<CSSStyleSheet *>(m_sheet.get())->isLoading())
-            getDocument()->stylesheetLoaded(); // Remove ourselves from the sheet list.
+            document()->stylesheetLoaded(); // Remove ourselves from the sheet list.
         m_sheet = 0;
     }
 
     m_loading = false;
     if ((m_type.isEmpty() || m_type == "text/css") // Type must be empty or CSS
          && (m_media.isNull() || m_media.contains("screen") || m_media.contains("all") || m_media.contains("print"))) {
-        getDocument()->addPendingSheet();
+        document()->addPendingSheet();
         m_loading = true;
         m_sheet = new CSSStyleSheet(this);
-        m_sheet->parseString(text, !getDocument()->inCompatMode());
+        m_sheet->parseString(text, !document()->inCompatMode());
         MediaList *media = new MediaList(m_sheet.get(), m_media);
         m_sheet->setMedia(media);
         m_loading = false;
     }
 
     if (!isLoading() && m_sheet)
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 bool HTMLStyleElement::isLoading() const
@@ -773,7 +773,7 @@ bool HTMLStyleElement::isLoading() const
 void HTMLStyleElement::sheetLoaded()
 {
     if (!isLoading())
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 bool HTMLStyleElement::disabled() const
@@ -820,13 +820,13 @@ HTMLTitleElement::~HTMLTitleElement()
 void HTMLTitleElement::insertedIntoDocument()
 {
     HTMLElement::insertedIntoDocument();
-    getDocument()->setTitle(m_title, this);
+    document()->setTitle(m_title, this);
 }
 
 void HTMLTitleElement::removedFromDocument()
 {
     HTMLElement::removedFromDocument();
-    getDocument()->removeTitle(this);
+    document()->removeTitle(this);
 }
 
 void HTMLTitleElement::childrenChanged()
@@ -837,7 +837,7 @@ void HTMLTitleElement::childrenChanged()
        if (c->nodeType() == TEXT_NODE || c->nodeType() == CDATA_SECTION_NODE)
            m_title += c->nodeValue();
     if (inDocument())
-        getDocument()->setTitle(m_title, this);
+        document()->setTitle(m_title, this);
 }
 
 String HTMLTitleElement::text() const
@@ -864,7 +864,7 @@ void HTMLTitleElement::setText(const String &value)
             removeChildren();
         }
     
-        appendChild(getDocument()->createTextNode(value.impl()), ec);
+        appendChild(document()->createTextNode(value.impl()), ec);
     }
 }
 
index 2076c53216655707c6da424f48f5f8a08da560d7..e6abf9d6a2eb038ad0c160fca1c32d36269e80e8 100644 (file)
@@ -49,7 +49,7 @@ HTMLImageLoader::~HTMLImageLoader()
 {
     if (m_image)
         m_image->deref(this);
-    m_element->getDocument()->removeImage(this);
+    m_element->document()->removeImage(this);
 }
 
 void HTMLImageLoader::setLoadingImage(CachedImage *loadingImage)
@@ -64,7 +64,7 @@ void HTMLImageLoader::updateFromElement()
     // If we're not making renderers for the page, then don't load images.  We don't want to slow
     // down the raw HTML parsing case by loading images we don't intend to display.
     Element* elem = element();
-    Document* doc = elem->getDocument();
+    Document* doc = elem->document();
     if (!doc->renderer())
         return;
 
@@ -104,7 +104,7 @@ void HTMLImageLoader::notifyFinished(CachedObject *image)
 {
     m_imageComplete = true;
     Element* elem = element();
-    Document* doc = elem->getDocument();
+    Document* doc = elem->document();
     doc->dispatchImageLoadEventSoon(this);
 #ifdef INSTRUMENT_LAYOUT_SCHEDULING
         if (!doc->ownerElement())
@@ -188,7 +188,7 @@ void HTMLImageElement::parseMappedAttribute(MappedAttribute *attr)
         if (attr->value().domString()[0] == '#')
             usemap = attr->value();
         else
-            usemap = getDocument()->completeURL(parseURL(attr->value()));
+            usemap = document()->completeURL(parseURL(attr->value()));
         m_isLink = !attr->isNull();
     } else if (attrName == ismapAttr)
         ismap = true;
@@ -202,8 +202,8 @@ void HTMLImageElement::parseMappedAttribute(MappedAttribute *attr)
         _compositeOperator = attr->value().domString();
     else if (attrName == nameAttr) {
         String newNameAttr = attr->value();
-        if (inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument* doc = static_cast<HTMLDocument*>(getDocument());
+        if (inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument* doc = static_cast<HTMLDocument*>(document());
             doc->removeNamedItem(oldNameAttr);
             doc->addNamedItem(newNameAttr);
         }
@@ -239,7 +239,7 @@ void HTMLImageElement::attach()
 
 void HTMLImageElement::insertedIntoDocument()
 {
-    Document* doc = getDocument();
+    Document* doc = document();
     if (doc->isHTMLDocument())
         static_cast<HTMLDocument*>(doc)->addNamedItem(oldNameAttr);
 
@@ -248,7 +248,7 @@ void HTMLImageElement::insertedIntoDocument()
 
 void HTMLImageElement::removedFromDocument()
 {
-    Document* doc = getDocument();
+    Document* doc = document();
     if (doc->isHTMLDocument())
         static_cast<HTMLDocument*>(doc)->removeNamedItem(oldNameAttr);
 
@@ -269,7 +269,7 @@ int HTMLImageElement::width(bool ignorePendingStylesheets) const
             return m_imageLoader.image()->imageSize().width();
     }
 
-    Document* doc = getDocument();
+    Document* doc = document();
     if (ignorePendingStylesheets)
         doc->updateLayoutIgnorePendingStylesheets();
     else
@@ -292,7 +292,7 @@ int HTMLImageElement::height(bool ignorePendingStylesheets) const
             return m_imageLoader.image()->imageSize().height();        
     }
 
-    Document* doc = getDocument();
+    Document* doc = document();
     if (ignorePendingStylesheets)
         doc->updateLayoutIgnorePendingStylesheets();
     else
@@ -385,7 +385,7 @@ void HTMLImageElement::setLongDesc(const String& value)
 
 String HTMLImageElement::src() const
 {
-    return getDocument()->completeURL(getAttribute(srcAttr));
+    return document()->completeURL(getAttribute(srcAttr));
 }
 
 void HTMLImageElement::setSrc(const String& value)
@@ -453,7 +453,7 @@ HTMLMapElement::HTMLMapElement(Document *doc)
 
 HTMLMapElement::~HTMLMapElement()
 {
-    getDocument()->removeImageMap(this);
+    document()->removeImageMap(this);
 }
 
 bool HTMLMapElement::checkDTD(const Node* newChild)
@@ -476,7 +476,7 @@ void HTMLMapElement::parseMappedAttribute(MappedAttribute *attr)
 {
     const QualifiedName& attrName = attr->name();
     if (attrName == idAttr || attrName == nameAttr) {
-        Document* doc = getDocument();
+        Document* doc = document();
         if (attrName == idAttr) {
             // Call base class so that hasID bit gets set.
             HTMLElement::parseMappedAttribute(attr);
@@ -658,7 +658,7 @@ void HTMLAreaElement::setCoords(const String& value)
 
 String HTMLAreaElement::href() const
 {
-    return getDocument()->completeURL(getAttribute(hrefAttr));
+    return document()->completeURL(getAttribute(hrefAttr));
 }
 
 void HTMLAreaElement::setHref(const String& value)
index 41961b46a476a167648d54e8719e99a69bba3487..7b4859a973505f99c6be8fa29dc14eba8bdf427c 100644 (file)
@@ -100,10 +100,10 @@ bool HTMLAnchorElement::isKeyboardFocusable() const
     if (!isFocusable())
         return false;
     
-    if (!getDocument()->frame())
+    if (!document()->frame())
         return false;
 
-    return getDocument()->frame()->tabsToLinks();
+    return document()->frame()->tabsToLinks();
 }
 
 void HTMLAnchorElement::defaultEventHandler(Event *evt)
@@ -168,8 +168,8 @@ void HTMLAnchorElement::defaultEventHandler(Event *evt)
             }
         }
         if (!evt->defaultPrevented()) {
-            if (getDocument()->frame())
-                getDocument()->frame()->urlSelected(url, utarget);
+            if (document()->frame())
+                document()->frame()->urlSelected(url, utarget);
         }
         evt->setDefaultHandled();
     }
@@ -238,7 +238,7 @@ String HTMLAnchorElement::href() const
     String href = getAttribute(hrefAttr);
     if (href.isNull())
         return href;
-    return getDocument()->completeURL(href);
+    return document()->completeURL(href);
 }
 
 void HTMLAnchorElement::setHref(const String &value)
@@ -328,14 +328,14 @@ void HTMLAnchorElement::setType(const String &value)
 
 void HTMLAnchorElement::blur()
 {
-    Document *d = getDocument();
+    Document *d = document();
     if (d->focusNode() == this)
         d->setFocusNode(0);
 }
 
 void HTMLAnchorElement::focus()
 {
-    getDocument()->setFocusNode(this);
+    document()->setFocusNode(this);
 }
 
 // -------------------------------------------------------------------------
index 39c3cb368e7795cafc32730fd88ebc79063ab9b1..33168ef12268af3375fcf49787b33e0e645f83d7 100644 (file)
@@ -111,18 +111,18 @@ void HTMLAppletElement::parseMappedAttribute(MappedAttribute *attr)
         addHTMLAlignment(attr);
     } else if (attr->name() == nameAttr) {
         String newNameAttr = attr->value();
-        if (inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-            document->removeNamedItem(oldNameAttr);
-            document->addNamedItem(newNameAttr);
+        if (inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+            doc->removeNamedItem(oldNameAttr);
+            doc->addNamedItem(newNameAttr);
         }
         oldNameAttr = newNameAttr;
     } else if (attr->name() == idAttr) {
         String newIdAttr = attr->value();
-        if (inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-            document->removeDocExtraNamedItem(oldIdAttr);
-            document->addDocExtraNamedItem(newIdAttr);
+        if (inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+            doc->removeDocExtraNamedItem(oldIdAttr);
+            doc->addDocExtraNamedItem(newIdAttr);
         }
         oldIdAttr = newIdAttr;
         // also call superclass
@@ -133,10 +133,10 @@ void HTMLAppletElement::parseMappedAttribute(MappedAttribute *attr)
 
 void HTMLAppletElement::insertedIntoDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->addNamedItem(oldNameAttr);
-        document->addDocExtraNamedItem(oldIdAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->addNamedItem(oldNameAttr);
+        doc->addDocExtraNamedItem(oldIdAttr);
     }
 
     HTMLElement::insertedIntoDocument();
@@ -144,10 +144,10 @@ void HTMLAppletElement::insertedIntoDocument()
 
 void HTMLAppletElement::removedFromDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->removeNamedItem(oldNameAttr);
-        document->removeDocExtraNamedItem(oldIdAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->removeNamedItem(oldNameAttr);
+        doc->removeDocExtraNamedItem(oldIdAttr);
     }
 
     HTMLElement::removedFromDocument();
@@ -160,7 +160,7 @@ bool HTMLAppletElement::rendererIsNeeded(RenderStyle *style)
 
 RenderObject *HTMLAppletElement::createRenderer(RenderArena *arena, RenderStyle *style)
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
 
     if (frame && frame->javaEnabled()) {
         HashMap<String, String> args;
@@ -169,14 +169,14 @@ RenderObject *HTMLAppletElement::createRenderer(RenderArena *arena, RenderStyle
         const AtomicString& codeBase = getAttribute(codebaseAttr);
         if(!codeBase.isNull())
             args.set("codeBase", codeBase);
-        const AtomicString& name = getAttribute(getDocument()->htmlMode() != Document::XHtml ? nameAttr : idAttr);
+        const AtomicString& name = getAttribute(document()->htmlMode() != Document::XHtml ? nameAttr : idAttr);
         if (!name.isNull())
             args.set("name", name);
         const AtomicString& archive = getAttribute(archiveAttr);
         if (!archive.isNull())
             args.set("archive", archive);
 
-        args.set("baseURL", getDocument()->baseURL());
+        args.set("baseURL", document()->baseURL());
 
         const AtomicString& mayScript = getAttribute(mayscriptAttr);
         if (!mayScript.isNull())
@@ -184,18 +184,18 @@ RenderObject *HTMLAppletElement::createRenderer(RenderArena *arena, RenderStyle
 
         // Other arguments (from <PARAM> tags) are added later.
         
-        return new (getDocument()->renderArena()) RenderApplet(this, args);
+        return new (document()->renderArena()) RenderApplet(this, args);
     }
 
     // ### remove me. we should never show an empty applet, instead
     // render the alternative content given by the webpage
-    return new (getDocument()->renderArena()) RenderEmptyApplet(this);
+    return new (document()->renderArena()) RenderEmptyApplet(this);
 }
 
 #if __APPLE__
 KJS::Bindings::Instance *HTMLAppletElement::getAppletInstance() const
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (!frame || !frame->javaEnabled())
         return 0;
 
@@ -369,7 +369,7 @@ bool HTMLEmbedElement::checkDTD(const Node* newChild)
 #if __APPLE__
 KJS::Bindings::Instance *HTMLEmbedElement::getEmbedInstance() const
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (!frame)
         return 0;
 
@@ -463,10 +463,10 @@ void HTMLEmbedElement::parseMappedAttribute(MappedAttribute *attr)
         }
     } else if (attr->name() == nameAttr) {
         String newNameAttr = attr->value();
-        if (inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-            document->removeNamedItem(oldNameAttr);
-            document->addNamedItem(newNameAttr);
+        if (inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+            doc->removeNamedItem(oldNameAttr);
+            doc->addNamedItem(newNameAttr);
         }
         oldNameAttr = newNameAttr;
     } else
@@ -475,7 +475,7 @@ void HTMLEmbedElement::parseMappedAttribute(MappedAttribute *attr)
 
 bool HTMLEmbedElement::rendererIsNeeded(RenderStyle *style)
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (!frame || !frame->pluginsEnabled())
         return false;
 
@@ -511,9 +511,9 @@ void HTMLEmbedElement::detach()
 
 void HTMLEmbedElement::insertedIntoDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->addNamedItem(oldNameAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->addNamedItem(oldNameAttr);
     }
 
     HTMLElement::insertedIntoDocument();
@@ -521,9 +521,9 @@ void HTMLEmbedElement::insertedIntoDocument()
 
 void HTMLEmbedElement::removedFromDocument()
 {
-    if (getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->removeNamedItem(oldNameAttr);
+    if (document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->removeNamedItem(oldNameAttr);
     }
 
     HTMLElement::removedFromDocument();
@@ -564,7 +564,7 @@ bool HTMLObjectElement::checkDTD(const Node* newChild)
 #if __APPLE__
 KJS::Bindings::Instance *HTMLObjectElement::getObjectInstance() const
 {
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (!frame)
         return 0;
 
@@ -662,18 +662,18 @@ void HTMLObjectElement::parseMappedAttribute(MappedAttribute *attr)
         setHTMLEventListener(unloadEvent, attr);
     } else if (attr->name() == nameAttr) {
             String newNameAttr = attr->value();
-            if (isDocNamedItem() && inDocument() && getDocument()->isHTMLDocument()) {
-                HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-                document->removeNamedItem(oldNameAttr);
-                document->addNamedItem(newNameAttr);
+            if (isDocNamedItem() && inDocument() && document()->isHTMLDocument()) {
+                HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+                doc->removeNamedItem(oldNameAttr);
+                doc->addNamedItem(newNameAttr);
             }
             oldNameAttr = newNameAttr;
     } else if (attr->name() == idAttr) {
         String newIdAttr = attr->value();
-        if (isDocNamedItem() && inDocument() && getDocument()->isHTMLDocument()) {
-            HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-            document->removeDocExtraNamedItem(oldIdAttr);
-            document->addDocExtraNamedItem(newIdAttr);
+        if (isDocNamedItem() && inDocument() && document()->isHTMLDocument()) {
+            HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+            doc->removeDocExtraNamedItem(oldIdAttr);
+            doc->addDocExtraNamedItem(newIdAttr);
         }
         oldIdAttr = newIdAttr;
         // also call superclass
@@ -693,7 +693,7 @@ bool HTMLObjectElement::rendererIsNeeded(RenderStyle *style)
     if (m_useFallbackContent || isImageType())
         return HTMLElement::rendererIsNeeded(style);
 
-    Frame *frame = getDocument()->frame();
+    Frame *frame = document()->frame();
     if (!frame || !frame->pluginsEnabled())
         return false;
     
@@ -770,10 +770,10 @@ void HTMLObjectElement::detach()
 
 void HTMLObjectElement::insertedIntoDocument()
 {
-    if (isDocNamedItem() && getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->addNamedItem(oldNameAttr);
-        document->addDocExtraNamedItem(oldIdAttr);
+    if (isDocNamedItem() && document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->addNamedItem(oldNameAttr);
+        doc->addDocExtraNamedItem(oldIdAttr);
     }
 
     HTMLElement::insertedIntoDocument();
@@ -781,10 +781,10 @@ void HTMLObjectElement::insertedIntoDocument()
 
 void HTMLObjectElement::removedFromDocument()
 {
-    if (isDocNamedItem() && getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
-        document->removeNamedItem(oldNameAttr);
-        document->removeDocExtraNamedItem(oldIdAttr);
+    if (isDocNamedItem() && document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
+        doc->removeNamedItem(oldNameAttr);
+        doc->removeDocExtraNamedItem(oldIdAttr);
     }
 
     HTMLElement::removedFromDocument();
@@ -865,14 +865,14 @@ void HTMLObjectElement::updateDocNamedItem()
             isNamedItem = false;
         child = child->nextSibling();
     }
-    if (isNamedItem != wasNamedItem && getDocument()->isHTMLDocument()) {
-        HTMLDocument *document = static_cast<HTMLDocument *>(getDocument());
+    if (isNamedItem != wasNamedItem && document()->isHTMLDocument()) {
+        HTMLDocument *doc = static_cast<HTMLDocument *>(document());
         if (isNamedItem) {
-            document->addNamedItem(oldNameAttr);
-            document->addDocExtraNamedItem(oldIdAttr);
+            doc->addNamedItem(oldNameAttr);
+            doc->addDocExtraNamedItem(oldIdAttr);
         } else {
-            document->removeNamedItem(oldNameAttr);
-            document->removeDocExtraNamedItem(oldIdAttr);
+            doc->removeNamedItem(oldNameAttr);
+            doc->removeDocExtraNamedItem(oldIdAttr);
         }
     }
     m_docNamedItem = isNamedItem;
@@ -1064,7 +1064,7 @@ void HTMLParamElement::parseMappedAttribute(MappedAttribute *attr)
     if (attr->name() == idAttr) {
         // Must call base class so that hasID bit gets set.
         HTMLElement::parseMappedAttribute(attr);
-        if (getDocument()->htmlMode() != Document::XHtml)
+        if (document()->htmlMode() != Document::XHtml)
             return;
         m_name = attr->value();
     } else if (attr->name() == nameAttr) {
index 931e1c0beff617297bcb4130f49432efb76051a9..586ba5b71eea16071806811419343c5bb2e6eaba 100644 (file)
@@ -133,7 +133,7 @@ HTMLElement *HTMLTableElement::createTHead(  )
     if(!head)
     {
         ExceptionCode ec = 0;
-        head = new HTMLTableSectionElement(theadTag, getDocument(), true /* implicit */);
+        head = new HTMLTableSectionElement(theadTag, document(), true /* implicit */);
         if(foot)
             insertBefore( head, foot, ec );
         else if(firstBody)
@@ -160,7 +160,7 @@ HTMLElement *HTMLTableElement::createTFoot(  )
     if (!foot)
     {
         ExceptionCode ec = 0;
-        foot = new HTMLTableSectionElement(tfootTag, getDocument(), true /*implicit */);
+        foot = new HTMLTableSectionElement(tfootTag, document(), true /*implicit */);
         if (firstBody)
             insertBefore( foot, firstBody, ec );
         else
@@ -185,7 +185,7 @@ HTMLElement *HTMLTableElement::createCaption(  )
     if(!tCaption)
     {
         ExceptionCode ec = 0;
-        tCaption = new HTMLTableCaptionElement(getDocument());
+        tCaption = new HTMLTableCaptionElement(document());
         insertBefore( tCaption, firstChild(), ec );
     }
     return tCaption;
@@ -209,7 +209,7 @@ HTMLElement *HTMLTableElement::insertRow( int index, ExceptionCode& ec)
     // (note: this is different from "if the table has no sections", since we can have
     // <TABLE><TR>)
     if(!firstBody && !head && !foot)
-        setTBody( new HTMLTableSectionElement(tbodyTag, getDocument(), true /* implicit */) );
+        setTBody( new HTMLTableSectionElement(tbodyTag, document(), true /* implicit */) );
 
     // IE treats index=-1 as default value meaning 'append after last'
     // This isn't in the DOM. So, not implemented yet.
@@ -305,7 +305,7 @@ ContainerNode* HTMLTableElement::addChild(PassRefPtr<Node> child)
     // The creation of <tbody> elements relies on the "childAllowed" check,
     // so we need to do it even for XML documents.
     assert(child->nodeType() != DOCUMENT_FRAGMENT_NODE);
-    if (!getDocument()->isHTMLDocument() && !childAllowed(child.get()))
+    if (!document()->isHTMLDocument() && !childAllowed(child.get()))
         return 0;
 
     ContainerNode* container = HTMLElement::addChild(child.get());
@@ -337,7 +337,7 @@ void HTMLTableElement::childrenChanged()
 bool HTMLTableElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
 {
     if (attrName == backgroundAttr) {
-        result = (MappedAttributeEntry)(eLastEntry + getDocument()->docID());
+        result = (MappedAttributeEntry)(eLastEntry + document()->docID());
         return false;
     }
     
@@ -414,7 +414,7 @@ void HTMLTableElement::parseMappedAttribute(MappedAttribute *attr)
     } else if (attr->name() == backgroundAttr) {
         String url = WebCore::parseURL(attr->value());
         if (!url.isEmpty())
-            addCSSImageProperty(attr, CSS_PROP_BACKGROUND_IMAGE, getDocument()->completeURL(url));
+            addCSSImageProperty(attr, CSS_PROP_BACKGROUND_IMAGE, document()->completeURL(url));
     } else if (attr->name() == frameAttr) {
     } else if (attr->name() == rulesAttr) {
     } else if (attr->name() == cellspacingAttr) {
@@ -456,7 +456,7 @@ CSSMutableStyleDeclaration* HTMLTableElement::additionalAttributeStyleDecl()
     CSSMappedAttributeDeclaration* decl = getMappedAttributeDecl(ePersistent, &attr);
     if (!decl) {
         decl = new CSSMappedAttributeDeclaration(0);
-        decl->setParent(getDocument()->elementSheet());
+        decl->setParent(document()->elementSheet());
         decl->setNode(this);
         decl->setStrictParsing(false); // Mapped attributes are just always quirky.
         
@@ -482,7 +482,7 @@ CSSMutableStyleDeclaration* HTMLTableElement::getSharedCellDecl()
     CSSMappedAttributeDeclaration* decl = getMappedAttributeDecl(ePersistent, &attr);
     if (!decl) {
         decl = new CSSMappedAttributeDeclaration(0);
-        decl->setParent(getDocument()->elementSheet());
+        decl->setParent(document()->elementSheet());
         decl->setNode(this);
         decl->setStrictParsing(false); // Mapped attributes are just always quirky.
         
@@ -626,7 +626,7 @@ void HTMLTableElement::setWidth(const String &value)
 bool HTMLTablePartElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
 {
     if (attrName == backgroundAttr) {
-        result = (MappedAttributeEntry)(eLastEntry + getDocument()->docID());
+        result = (MappedAttributeEntry)(eLastEntry + document()->docID());
         return false;
     }
     
@@ -653,7 +653,7 @@ void HTMLTablePartElement::parseMappedAttribute(MappedAttribute *attr)
     } else if (attr->name() == backgroundAttr) {
         String url = WebCore::parseURL(attr->value());
         if (!url.isEmpty())
-            addCSSImageProperty(attr, CSS_PROP_BACKGROUND_IMAGE, getDocument()->completeURL(url));
+            addCSSImageProperty(attr, CSS_PROP_BACKGROUND_IMAGE, document()->completeURL(url));
     } else if (attr->name() == bordercolorAttr) {
         if (!attr->value().isEmpty()) {
             addCSSColor(attr, CSS_PROP_BORDER_COLOR, attr->value());
@@ -724,7 +724,7 @@ HTMLElement *HTMLTableSectionElement::insertRow( int index, ExceptionCode& ec)
     }
     else
     {
-        r = new HTMLTableRowElement(getDocument());
+        r = new HTMLTableRowElement(document());
         if ( numRows == index || index == -1 )
             appendChild(r, ec);
         else {
@@ -902,7 +902,7 @@ HTMLElement *HTMLTableRowElement::insertCell( int index, ExceptionCode& ec)
         ec = INDEX_SIZE_ERR; // per the DOM
     else
     {
-        c = new HTMLTableCellElement(tdTag, getDocument());
+        c = new HTMLTableCellElement(tdTag, document());
         if(numCells == index || index == -1)
             appendChild(c, ec);
         else {
index 49bdf0005691199a5c3510ff0e3eba9292dd1a1b..8597f899b0ddaf3b022d16f2e9918e9669bfa8c0 100644 (file)
@@ -111,7 +111,7 @@ DOMNode::DOMNode(Node *n)
 
 DOMNode::~DOMNode()
 {
-  ScriptInterpreter::forgetDOMNodeForDocument(m_impl->getDocument(), m_impl.get());
+  ScriptInterpreter::forgetDOMNodeForDocument(m_impl->document(), m_impl.get());
 }
 
 void DOMNode::mark()
@@ -146,7 +146,7 @@ void DOMNode::mark()
   // Mark the whole tree; use the global set of roots to avoid reentering.
   markingRoots.add(root);
   for (Node *nodeToMark = root; nodeToMark; nodeToMark = nodeToMark->traverseNextNode()) {
-    DOMNode *wrapper = ScriptInterpreter::getDOMNodeForDocument(m_impl->getDocument(), nodeToMark);
+    DOMNode *wrapper = ScriptInterpreter::getDOMNodeForDocument(m_impl->document(), nodeToMark);
     if (wrapper) {
       if (!wrapper->marked())
         wrapper->mark();
@@ -1103,7 +1103,7 @@ JSValue *DOMElement::getValueProperty(ExecState *exec, int token) const
         // no DOM standard -- IE extension
         
         // Make sure our layout is up to date before we allow a query on these attributes.
-        element->getDocument()->updateLayoutIgnorePendingStylesheets();
+        element->document()->updateLayoutIgnorePendingStylesheets();
         
         RenderObject *rend = element->renderer();
         
@@ -1214,7 +1214,7 @@ JSValue *DOMElementProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj,
         return jsUndefined();
       case DOMElement::ScrollByLines:
       case DOMElement::ScrollByPages:
-        element.getDocument()->updateLayoutIgnorePendingStylesheets();
+        element.document()->updateLayoutIgnorePendingStylesheets();
         if (RenderObject *rend = element.renderer())
           if (rend->hasOverflowClip()) {
             KWQScrollDirection direction = KWQScrollDown;
@@ -1382,7 +1382,7 @@ bool checkNodeSecurity(ExecState *exec, Node *n)
     return false;
 
   // Check to see if the currently executing interpreter is allowed to access the specified node
-  Window *win = Window::retrieveWindow(n->getDocument()->frame());
+  Window *win = Window::retrieveWindow(n->document()->frame());
   return win && win->isSafeScript(exec);
 }
 
@@ -1393,7 +1393,7 @@ JSValue *toJS(ExecState *exec, PassRefPtr<Node> node)
   if (!n)
     return jsNull();
   ScriptInterpreter* interp = static_cast<ScriptInterpreter *>(exec->dynamicInterpreter());
-  Document *doc = n->getDocument();
+  Document *doc = n->document();
 
   if ((ret = interp->getDOMNodeForDocument(doc, n)))
     return ret;
index 7c27a1611dec1eacbd1c012447a62a67e07aedfc..a084d019d077229744e465182482580bebe907b1 100644 (file)
@@ -1320,7 +1320,7 @@ bool JSHTMLElement::implementsCall() const
 {
     HTMLElement *element = static_cast<HTMLElement *>(impl());
     if (element->hasTagName(embedTag) || element->hasTagName(objectTag) || element->hasTagName(appletTag)) {
-        Document* doc = element->getDocument();
+        Document* doc = element->document();
         KJSProxy *proxy = doc->frame()->jScript();
         ExecState *exec = proxy->interpreter()->globalExec();
         if (JSValue *runtimeObject = getRuntimeObject(exec, element))
@@ -1447,7 +1447,7 @@ JSValue *JSHTMLElement::bodyGetter(ExecState* exec, int token) const
         case BodyVLink:           return jsString(body.vLink());
         default: {
             // Update the document's layout before we compute these attributes.
-            Document *doc = body.getDocument();
+            Document *doc = body.document();
             doc->updateLayoutIgnorePendingStylesheets();
             FrameView *view = doc->view();
             switch (token) {
@@ -1823,7 +1823,7 @@ JSValue *JSHTMLElement::anchorGetter(ExecState* exec, int token) const
         case AnchorTarget:          return jsString(anchor.target());
         case AnchorType:            return jsString(anchor.type());
         case AnchorText:
-            anchor.getDocument()->updateLayoutIgnorePendingStylesheets();
+            anchor.document()->updateLayoutIgnorePendingStylesheets();
             return jsString(anchor.innerText());
     }
     return jsUndefined();
@@ -2146,7 +2146,7 @@ JSValue *JSHTMLElement::getValueProperty(ExecState *exec, int token) const
         case ElementInnerHTML:
             return jsString(element.innerHTML());
         case ElementInnerText:
-            impl()->getDocument()->updateLayoutIgnorePendingStylesheets();
+            impl()->document()->updateLayoutIgnorePendingStylesheets();
             return jsString(element.innerText());
         case ElementOuterHTML:
             return jsString(element.outerHTML());
@@ -2542,7 +2542,7 @@ void JSHTMLElement::bodySetter(ExecState *exec, int token, JSValue *value, const
             FrameView* sview = body.ownerDocument()->view();
             if (sview) {
                 // Update the document's layout before we compute these attributes.
-                body.getDocument()->updateLayoutIgnorePendingStylesheets();
+                body.document()->updateLayoutIgnorePendingStylesheets();
                 if (token == BodyScrollLeft)
                     sview->setContentsPos(value->toInt32(exec), sview->contentsY());
                 else
index 01f38d14d4e12fc05d5fe2baba8051869df3577d..212e976040c5d6e0883e0982eed559ff2b2ad8ff 100644 (file)
@@ -332,7 +332,7 @@ void JSNodeFilterCondition::mark()
 short JSNodeFilterCondition::acceptNode(Node* filterNode) const
 {
     Node *node = filterNode;
-    Frame *frame = node->getDocument()->frame();
+    Frame *frame = node->document()->frame();
     KJSProxy *proxy = frame->jScript();
     if (proxy && filter->implementsCall()) {
         JSLock lock;
index bdbb692d4b05c0b24dc7ac774c590e1761cc8965..ecd662c70a23800afae0375a47e7b9dd764e2eed 100644 (file)
@@ -85,7 +85,7 @@ JSValue *DOMAbstractViewProtoFunc::callAsFunction(ExecState *exec, JSObject *thi
         if (!arg0)
           return jsUndefined(); // throw exception?
         else {
-          arg0->getDocument()->updateLayoutIgnorePendingStylesheets();
+          arg0->document()->updateLayoutIgnorePendingStylesheets();
           return toJS(exec, abstractView.getComputedStyle(arg0, WebCore::String(args[1]->toString(exec)).impl()));
         }
       }
index f56fb8216749fe2319524ef15ecc2d32da45d9b7..046cca967c62913df276452fab50f81c7bbe1241 100644 (file)
@@ -115,7 +115,7 @@ void XBLBindingChain::failed()
     delete m_binding;
     m_binding = 0;
     
-    element()->getDocument()->bindingManager()->checkLoadState(element());
+    element()->document()->bindingManager()->checkLoadState(element());
 }
 
 // ==========================================================================================
@@ -142,7 +142,7 @@ XBLBinding::XBLBinding(XBLBindingChain* ch, const String& uri, XBLBinding* deriv
         m_id = "_xbl_first_binding";
     
     // Now kick off the load of the XBL document.
-    Document* doc = chain()->element()->getDocument();
+    Document* doc = chain()->element()->document();
     m_xblDocument = doc->docLoader()->requestXBLDocument(docURL);
     if (m_xblDocument)
         m_xblDocument->ref(this);
@@ -196,7 +196,7 @@ void XBLBinding::setXBLDocument(const String& url, XBLDocument* doc)
         return;
     }
     
-    chain()->element()->getDocument()->bindingManager()->checkLoadState(chain()->element());
+    chain()->element()->document()->bindingManager()->checkLoadState(chain()->element());
 }
 
 }
index c39049900167eaf609e0f3e81cc227fae9b8e329..8f1788e0c3351dc20015c70f3369fb5abf27e8be 100644 (file)
@@ -49,7 +49,7 @@ void XBLPrototypeBinding::initialize()
 
 XBLDocument* XBLPrototypeBinding::document() const
 {
-    return static_cast<XBLDocument*>(m_element->getDocument());
+    return static_cast<XBLDocument*>(m_element->document());
 }
 
 void XBLPrototypeBinding::addResource(const String& type, const String& src)
index 1203948fbb50064cb19bc0e5e3970d104d102714..7afafcc0e946f1cabebc6d9cd63ec09b424372d2 100644 (file)
@@ -52,7 +52,7 @@ XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href)
 
 XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href,  bool embedded)
     : StyleSheet(parentNode, href)
-    , m_ownerDocument(parentNode->getDocument())
+    , m_ownerDocument(parentNode->document())
     , m_stylesheetDoc(0)
     , m_embedded(embedded)
     , m_processed(true) // The root sheet starts off processed.
index 8c436537b20580841cda7b4f97348bacef00b072..648326a8ad100046c3ade6e90473290a5cc4f629 100644 (file)
@@ -188,7 +188,7 @@ static void freeXsltParamArray(const char **params)
 
 RefPtr<Document> XSLTProcessor::createDocumentFromSource(const DeprecatedString &sourceString, const DeprecatedString &sourceEncoding, const DeprecatedString &sourceMIMEType, Node *sourceNode, FrameView *view)
 {
-    RefPtr<Document> ownerDocument = sourceNode->getDocument();
+    RefPtr<Document> ownerDocument = sourceNode->document();
     bool sourceIsDocument = (sourceNode == ownerDocument.get());
     DeprecatedString documentSource = sourceString;
 
@@ -266,7 +266,7 @@ static xsltStylesheetPtr xsltStylesheetPointer(RefPtr<XSLStyleSheet> &cachedStyl
 
 static inline xmlDocPtr xmlDocPtrFromNode(Node *sourceNode, bool &shouldDelete)
 {
-    RefPtr<Document> ownerDocument = sourceNode->getDocument();
+    RefPtr<Document> ownerDocument = sourceNode->document();
     bool sourceIsDocument = (sourceNode == ownerDocument.get());
     
     xmlDocPtr sourceDoc = 0;
@@ -300,7 +300,7 @@ static inline DeprecatedString resultMIMEType(xmlDocPtr resultDoc, xsltStyleshee
 
 bool XSLTProcessor::transformToString(Node *sourceNode, DeprecatedString &mimeType, DeprecatedString &resultString, DeprecatedString &resultEncoding)
 {
-    RefPtr<Document> ownerDocument = sourceNode->getDocument();
+    RefPtr<Document> ownerDocument = sourceNode->document();
     RefPtr<XSLStyleSheet> cachedStylesheet = m_stylesheet;
     
     setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->docLoader());
index 4d466c7f05f9b08ecbc8ca6fd4990d57ae16db51..6ad4a28b9d9d35b5bc178907650dafb2ab2b9c3a 100644 (file)
@@ -102,8 +102,8 @@ void SVGAElement::defaultEventHandler(Event *evt)
         if (!evt->defaultPrevented()) {
             if(ownerDocument() && ownerDocument()->view() && ownerDocument()->frame())
             {
-                //getDocument()->view()->resetCursor();
-                getDocument()->frame()->urlSelected(url, utarget);
+                //document()->view()->resetCursor();
+                document()->frame()->urlSelected(url, utarget);
             }
         }
 
index cf100232042a5e40cb6b906248eae4e72fd8b008..1d098ebc2a2bff7251fa4ce025c1a664a9465f49 100644 (file)
@@ -128,7 +128,7 @@ void SVGAnimateColorElement::handleTimerEvent(double timePercentage)
             }
         }
 
-        getDocument()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
         m_connected = true;
 
         return;
@@ -220,7 +220,7 @@ void SVGAnimateColorElement::handleTimerEvent(double timePercentage)
             return;
         }
 
-        getDocument()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
         m_connected = false;
 
         // Reset...
index 6e1cbe2b9587bac2cacc209977ace66b2298f21b..4de9a952b33383b5f3930c04f49a5d1c0b652db9 100644 (file)
@@ -118,7 +118,7 @@ void SVGAnimateElement::handleTimerEvent(double timePercentage)
             }
         }
 
-        getDocument()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
         m_connected = true;
 
         return;
@@ -202,7 +202,7 @@ void SVGAnimateElement::handleTimerEvent(double timePercentage)
             return;
         }
 
-        getDocument()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
         m_connected = false;
 
         // Reset...
index 6c6d6ee4d95fc9867d67780057755e51f2efa524..25d2541d1715daae77b99b16057795121e6161b6 100644 (file)
@@ -168,7 +168,7 @@ void SVGAnimateTransformElement::handleTimerEvent(double timePercentage)
             }
         }
         
-        getDocument()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
         m_connected = true;
 
         return;
@@ -320,7 +320,7 @@ void SVGAnimateTransformElement::handleTimerEvent(double timePercentage)
             return;
         }
 
-        getDocument()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
         m_connected = false;
 
         // Reset...
index 4c123f6d69439877ef5f40ee913353578ca82af5..c68307f596eb177087f4bc35c2423b1de8b6f733 100644 (file)
@@ -401,7 +401,7 @@ double SVGAnimationElement::parseClockValue(const DeprecatedString &data) const
 
 void SVGAnimationElement::closeRenderer()
 {
-    getDocument()->accessSVGExtensions()->timeScheduler()->addTimer(this, lround(getStartTime()));
+    document()->accessSVGExtensions()->timeScheduler()->addTimer(this, lround(getStartTime()));
 }
 
 String SVGAnimationElement::targetAttribute() const
index b03ce5c3372e5cb1d74634f0760b0f342809b2ed..dc62a23e451715181d23391e40c51a94ed760c89 100644 (file)
@@ -96,7 +96,7 @@ KCanvasClipper *SVGClipPathElement::canvasResource()
         SVGElement *e = svg_dynamic_cast(n);
         if (e && e->isStyled()) {
             SVGStyledElement *styled = static_cast<SVGStyledElement *>(e);
-            RenderStyle *pathStyle = getDocument()->styleSelector()->createStyleForElement(styled, clipPathStyle);
+            RenderStyle *pathStyle = document()->styleSelector()->createStyleForElement(styled, clipPathStyle);
             if (KCanvasPath* pathData = styled->toPathData())
                 m_clipper->addClipData(pathData, (KCWindRule) pathStyle->svgStyle()->clipRule(), bbox);
             pathStyle->deref(canvas()->renderArena());
index f5b0781f44631f111f4b26272b1ab725edf2354f..b1ad6b53e083da10dcadf8b60db7172de9a7d22f 100644 (file)
@@ -108,7 +108,7 @@ AtomicString SVGElement::tryGetAttributeNS(const String& namespaceURI, const Str
 
 void SVGElement::addSVGEventListener(const AtomicString& eventType, const Attribute* attr)
 {
-    Element::setHTMLEventListener(eventType, getDocument()->accessSVGExtensions()->
+    Element::setHTMLEventListener(eventType, document()->accessSVGExtensions()->
         createSVGEventListener(attr->localName().domString(), attr->value(), this));
 }
 
index 9eb66dbb745c37301e88c598be9dd63e395a22c4..2cbb91a648f8440131eee41420f0be14a3f98db7 100644 (file)
@@ -152,7 +152,7 @@ void SVGGradientElement::rebuildStops() const
                 SVGStopElement *stop = static_cast<SVGStopElement *>(element);
                 float stopOffset = stop->offset()->baseVal();
                 
-                RenderStyle *stopStyle = getDocument()->styleSelector()->createStyleForElement(stop, gradientStyle);
+                RenderStyle *stopStyle = document()->styleSelector()->createStyleForElement(stop, gradientStyle);
                 Color c = stopStyle->svgStyle()->stopColor();
                 float opacity = stopStyle->svgStyle()->stopOpacity();
                 
index bb5978c94843cb2d622555c0d98af6ff43b790ab..c5a3d46ad71bad1cb754177fff13afb6481944a2 100644 (file)
@@ -56,7 +56,7 @@ float SVGHelper::PercentageOfViewport(float value, const SVGElement *viewportEle
         {
             // TODO: Shouldn't w/h be multiplied with the percentage values?!
             // AFAIK, this assumes width & height == 100%, Rob??
-            Document *doc = svg->getDocument();
+            Document *doc = svg->document();
             if(doc->documentElement() == svg)
             {
                 // We have to ask the canvas for the full "canvas size"...
index 8bfade9ecb1ded180c44366967c870c343cd1b1e..9025d999a29c52f3e6db73718a4b6a6ed4c8b6d4 100644 (file)
@@ -116,7 +116,7 @@ void SVGLinearGradientElement::buildGradient(KRenderingPaintServerGradient *_gra
         mat = KCanvasMatrix(gradientTransform()->baseVal()->consolidate()->matrix()->qmatrix());
 
     DeprecatedString ref = String(href()->baseVal()).deprecatedString();
-    KRenderingPaintServer *pserver = getPaintServerById(getDocument(), ref.mid(1));
+    KRenderingPaintServer *pserver = getPaintServerById(document(), ref.mid(1));
     
     if(pserver && (pserver->type() == PS_RADIAL_GRADIENT || pserver->type() == PS_LINEAR_GRADIENT))
     {
index 1337878b6cb68cd85d84373b41b9c98d77ae9f2c..de64a150b638de618ff60f84ae2b48bfb5629a75 100644 (file)
@@ -169,7 +169,7 @@ void SVGPatternElement::resourceNotification() const
 void SVGPatternElement::fillAttributesFromReferencePattern(const SVGPatternElement *target, KCanvasMatrix &patternTransformMatrix) const
 {
     DeprecatedString ref = String(href()->baseVal()).deprecatedString();
-    KRenderingPaintServer *refServer = getPaintServerById(getDocument(), ref.mid(1));
+    KRenderingPaintServer *refServer = getPaintServerById(document(), ref.mid(1));
 
     if(!refServer || refServer->type() != PS_PATTERN)
         return;
index 352c5b0cd8ccd9f9d6c443f7f64297fa9b59fa63..a6c868e717e61e919ab162eb50b3f65a7e90db6b 100644 (file)
@@ -136,7 +136,7 @@ void SVGRadialGradientElement::buildGradient(KRenderingPaintServerGradient *_gra
         mat = KCanvasMatrix(gradientTransform()->baseVal()->consolidate()->matrix()->qmatrix());
 
     DeprecatedString ref = String(href()->baseVal()).deprecatedString();
-    KRenderingPaintServer *pserver = getPaintServerById(getDocument(), ref.mid(1));
+    KRenderingPaintServer *pserver = getPaintServerById(document(), ref.mid(1));
 
     if(pserver && (pserver->type() == PS_RADIAL_GRADIENT || pserver->type() == PS_LINEAR_GRADIENT))
     {
index 8907b1485aa75bcbab933f2aee5815a73e7cd48c..00c9593593e909a632b543f008e0013a9ccdea02 100644 (file)
@@ -211,7 +211,7 @@ void SVGSVGElement::setCurrentScale(float scale)
 //    {
 //        float oldzoom = canvasView()->zoom();
 //        canvasView()->setZoom(scale);
-//        getDocument()->dispatchZoomEvent(oldzoom, scale);
+//        document()->dispatchZoomEvent(oldzoom, scale);
 //    }
 }
 
@@ -227,9 +227,9 @@ void SVGSVGElement::addSVGWindowEventListner(const AtomicString& eventType, cons
 {
     // FIXME: None of these should be window events long term.
     // Once we propertly support SVGLoad, etc.
-    RefPtr<EventListener> listener = getDocument()->accessSVGExtensions()->
+    RefPtr<EventListener> listener = document()->accessSVGExtensions()->
         createSVGEventListener(attr->localName().domString(), attr->value(), this);
-    getDocument()->setHTMLWindowEventListener(eventType, listener.release());
+    document()->setHTMLWindowEventListener(eventType, listener.release());
 }
 
 void SVGSVGElement::parseMappedAttribute(MappedAttribute *attr)
index 274e9dcbfeb569f3d4b638a0c4af5758f5637802..bda6100b91b9c21bd2f041f25c3e3a7a69fd7b98 100644 (file)
@@ -42,7 +42,7 @@ void SVGSetElement::handleTimerEvent(double timePercentage)
 {
     // Start condition.
     if (!m_connected) {    
-        getDocument()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->connectIntervalTimer(this);
         m_connected = true;
         return;
     }
@@ -61,7 +61,7 @@ void SVGSetElement::handleTimerEvent(double timePercentage)
 
     // End condition.
     if (timePercentage == 1.0) {
-        getDocument()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
+        document()->accessSVGExtensions()->timeScheduler()->disconnectIntervalTimer(this);
         m_connected = false;
 
         if (!isFrozen())
index 3370ab2d3787ebcbba418ffacf29be8cb58f4f7f..25a1b36274ee12233a1ee1de89fe7aca144a1607 100644 (file)
@@ -103,7 +103,7 @@ void SVGStyleElement::childrenChanged()
         m_loading = true;
  
         m_sheet = new CSSStyleSheet(this);
-        m_sheet->parseString(textContent(), false);//!getDocument()->inCompatMode());
+        m_sheet->parseString(textContent(), false);//!document()->inCompatMode());
 
         MediaList *mediaList = new MediaList(m_sheet.get(), _media);
         m_sheet->setMedia(mediaList);
@@ -111,7 +111,7 @@ void SVGStyleElement::childrenChanged()
     }
 
     if(!isLoading() && m_sheet)
-        getDocument()->stylesheetLoaded();
+        document()->stylesheetLoaded();
 }
 
 bool SVGStyleElement::isLoading() const
index 48f27e86df8f6053c5e81b34b9df2b078ee3ebad..b8aec945ae21507409658141c5bdfcfd28aee9d1 100644 (file)
@@ -118,7 +118,7 @@ void SVGStyledElement::attributeChanged(Attribute *attr, bool preserveDecls)
 
 RenderCanvas *SVGStyledElement::canvas() const
 {
-    return static_cast<RenderCanvas *>(getDocument()->renderer());
+    return static_cast<RenderCanvas *>(document()->renderer());
 }
 
 void SVGStyledElement::updateCanvasItem()
index 4f622d6f370a142bef160b8a554cd1828fec30a1..d2226641ab93b67d242f58426c8751513231a4db 100644 (file)
@@ -41,27 +41,27 @@ String SVGTitleElement::title() const
 void SVGTitleElement::closeRenderer()
 {
     SVGStyledElement::closeRenderer();
-    getDocument()->setTitle(textContent(), this);
+    document()->setTitle(textContent(), this);
 }
 
 void SVGTitleElement::insertedIntoDocument()
 {
     SVGStyledElement::insertedIntoDocument();
     if (firstChild())
-        getDocument()->setTitle(textContent(), this);
+        document()->setTitle(textContent(), this);
 }
 
 void SVGTitleElement::removedFromDocument()
 {
     SVGElement::removedFromDocument();
-    getDocument()->removeTitle(this);
+    document()->removeTitle(this);
 }
 
 void SVGTitleElement::childrenChanged()
 {
     SVGElement::childrenChanged();
     if (inDocument())
-        getDocument()->setTitle(textContent(), this);
+        document()->setTitle(textContent(), this);
 }
 
 }
index aedb67dc94ae906cec1fb3d1279d86c7424f1635..ea0a1e7672dd996a5554c85956629e44c4bc678e 100644 (file)
@@ -104,7 +104,7 @@ void SVGUseElement::closeRenderer()
     SVGElement *target = svg_dynamic_cast(targetElement);
     if (!target)
     {
-        //getDocument()->addForwardReference(this);
+        //document()->addForwardReference(this);
         return;
     }
 
@@ -117,7 +117,7 @@ void SVGUseElement::closeRenderer()
     ExceptionCode ec;
     String trans = String::sprintf("translate(%f, %f)", _x, _y);
     if(target->hasTagName(SVGNames::symbolTag)) {
-        RefPtr<SVGElement> dummy = new SVGSVGElement(SVGNames::svgTag, getDocument());
+        RefPtr<SVGElement> dummy = new SVGSVGElement(SVGNames::svgTag, document());
         if (_w > 0)
             dummy->setAttribute(SVGNames::widthAttr, wString);
         if (_h > 0)
@@ -130,13 +130,13 @@ void SVGUseElement::closeRenderer()
         }
         target->cloneChildNodes(dummy.get());
 
-        RefPtr<SVGElement> dummy2 = new SVGDummyElement(SVGNames::gTag, getDocument());
+        RefPtr<SVGElement> dummy2 = new SVGDummyElement(SVGNames::gTag, document());
         dummy2->setAttribute(SVGNames::transformAttr, trans);
         
         appendChild(dummy2, ec);
         dummy2->appendChild(dummy, ec);
     } else if(target->hasTagName(SVGNames::svgTag)) {
-        RefPtr<SVGDummyElement> dummy = new SVGDummyElement(SVGNames::gTag, getDocument());
+        RefPtr<SVGDummyElement> dummy = new SVGDummyElement(SVGNames::gTag, document());
         dummy->setAttribute(SVGNames::transformAttr, trans);
         
         RefPtr<SVGElement> root = static_pointer_cast<SVGElement>(target->cloneNode(true));
@@ -149,7 +149,7 @@ void SVGUseElement::closeRenderer()
         appendChild(dummy, ec);
         dummy->appendChild(root.release(), ec);
     } else {
-        RefPtr<SVGDummyElement> dummy = new SVGDummyElement(SVGNames::gTag, getDocument());
+        RefPtr<SVGDummyElement> dummy = new SVGDummyElement(SVGNames::gTag, document());
         dummy->setAttribute(SVGNames::transformAttr, trans);
         
         RefPtr<Node> root = target->cloneNode(true);
index 1457daf19d8ca2211c0de51ccc74ecde93028c15..d47e83835ec535a0946d5244fc2ca99ceb88e833 100644 (file)
@@ -715,7 +715,7 @@ static IntRect boundingBoxRect(RenderObject* obj)
         if (!actionElement)
             return;
 
-        if (Frame* f = actionElement->getDocument()->frame())
+        if (Frame* f = actionElement->document()->frame())
             Mac(f)->prepareForUserAction();
 
         actionElement->accessKeyAction(true);
@@ -842,7 +842,7 @@ static IntRect boundingBoxRect(RenderObject* obj)
         if (anchor) {
             DeprecatedString s = anchor->getAttribute(hrefAttr).deprecatedString();
             if (!s.isNull()) {
-                s = anchor->getDocument()->completeURL(s);
+                s = anchor->document()->completeURL(s);
                 return s.getNSString();
             }
         }
index 14f003c0ce5619bb4f5a176040a2011a6137c4aa..69f31071114efc9819ded981c685bbf79b654f2b 100644 (file)
@@ -141,7 +141,7 @@ static inline Frame* parentFromOwnerRenderer(RenderPart* ownerRenderer)
 {
     if (!ownerRenderer)
         return 0;
-    return ownerRenderer->node()->getDocument()->frame();
+    return ownerRenderer->node()->document()->frame();
 }
 
 Frame::Frame(Page* page, RenderPart* ownerRenderer) 
@@ -2857,7 +2857,7 @@ Frame *Frame::frameForWidget(const Widget *widget)
 Frame *Frame::frameForNode(Node *node)
 {
     ASSERT_ARG(node, node);
-    return node->getDocument()->frame();
+    return node->document()->frame();
 }
 
 Node* Frame::nodeForWidget(const Widget* widget)
@@ -2873,7 +2873,7 @@ void Frame::clearDocumentFocus(Widget *widget)
 {
     Node *node = nodeForWidget(widget);
     ASSERT(node);
-    node->getDocument()->setFocusNode(0);
+    node->document()->setFocusNode(0);
 }
 
 DeprecatedPtrList<Frame>& Frame::mutableInstances()
index fe7c1381f56f6c161bf49b8565604745dcb153ab..91b31dbb17b45d9668ddeb82bdc0e9e86adffa65 100644 (file)
@@ -960,7 +960,7 @@ bool FrameView::dispatchMouseEvent(const AtomicString& eventType, Node* targetNo
 
     // mouseout/mouseover
     if (setUnder) {
-        if (d->oldUnder && d->oldUnder->getDocument() != frame()->document())
+        if (d->oldUnder && d->oldUnder->document() != frame()->document())
             d->oldUnder = 0;
 
         if (d->oldUnder != targetNode) {
index 49e7996765d5941410a77951920086ad619abccc..5a1ca6bee59213308f9517d34eef147823318a0d 100644 (file)
@@ -118,7 +118,7 @@ void RenderBox::setStyle(RenderStyle *_style)
     
     // Set the text color if we're the body.
     if (isBody())
-        element()->getDocument()->setTextColor(_style->color());
+        element()->document()->setTextColor(_style->color());
     
     if (style()->outlineWidth() > 0 && style()->outlineSize() > maximalOutlineSize(PaintActionOutline))
         static_cast<RenderCanvas*>(document()->renderer())->setMaximalOutlineSize(style()->outlineSize());
index 98e360087534761a431d07800d9f01f593252637..14320a8f74d102df3288ec6b3c2e3d3a432028cd 100644 (file)
@@ -65,7 +65,7 @@ RenderCanvas::RenderCanvas(Node* node, FrameView *view)
     m_selectionEndPos = -1;
 
     // Create a new root layer for our layer hierarchy.
-    m_layer = new (node->getDocument()->renderArena()) RenderLayer(this);
+    m_layer = new (node->document()->renderArena()) RenderLayer(this);
 }
 
 RenderCanvas::~RenderCanvas()
@@ -181,7 +181,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
 {
     // Check to see if we are enclosed by a transparent layer.  If so, we cannot blit
     // when scrolling, and we need to use slow repaints.
-    Element* elt = element()->getDocument()->ownerElement();
+    Element* elt = element()->document()->ownerElement();
     if (view() && elt) {
         RenderLayer* layer = elt->renderer()->enclosingLayer();
         if (layer->isTransparent() || layer->transparentAncestor())
@@ -209,7 +209,7 @@ void RenderCanvas::repaintViewRectangle(const IntRect& ur, bool immediate)
         // We always just invalidate the root view, since we could be an iframe that is clipped out
         // or even invisible.
         IntRect r = intersection(ur, vr);
-        Element* elt = element()->getDocument()->ownerElement();
+        Element* elt = element()->document()->ownerElement();
         if (!elt)
             m_view->repaintRectangle(r, immediate);
         else {
index 2b1a3e5ac00a97de7ae6b4d8ec58fb9160966153..1344653237f83c05a61a0081b01c2d46be90d495 100644 (file)
@@ -292,7 +292,7 @@ void RenderImage::layout()
 HTMLMapElement* RenderImage::imageMap()
 {
     HTMLImageElement* i = element() && element()->hasTagName(imgTag) ? static_cast<HTMLImageElement*>(element()) : 0;
-    return i ? i->getDocument()->getImageMap(i->imageMap()) : 0;
+    return i ? i->document()->getImageMap(i->imageMap()) : 0;
 }
 
 bool RenderImage::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty,
index b4180719fae381e1220594d81235c7078e39a511..47526259bfb7f2dd3d6cec5493e943dbb4420dd5 100644 (file)
@@ -801,12 +801,12 @@ void
 RenderLayer::setHasHorizontalScrollbar(bool hasScrollbar)
 {
     if (hasScrollbar && !m_hBar) {
-        FrameView* scrollView = m_object->element()->getDocument()->view();
+        FrameView* scrollView = m_object->element()->document()->view();
         m_hBar = new QScrollBar(HorizontalScrollBar);
         m_hBar->setClient(this);
         scrollView->addChild(m_hBar, 0, -50000);
     } else if (!hasScrollbar && m_hBar) {
-        FrameView* scrollView = m_object->element()->getDocument()->view();
+        FrameView* scrollView = m_object->element()->document()->view();
         scrollView->removeChild(m_hBar);
         delete m_hBar;
         m_hBar = 0;
@@ -817,12 +817,12 @@ void
 RenderLayer::setHasVerticalScrollbar(bool hasScrollbar)
 {
     if (hasScrollbar && !m_vBar) {
-        FrameView* scrollView = m_object->element()->getDocument()->view();
+        FrameView* scrollView = m_object->element()->document()->view();
         m_vBar = new QScrollBar(VerticalScrollBar);
         m_vBar->setClient(this);
         scrollView->addChild(m_vBar, 0, -50000);
     } else if (!hasScrollbar && m_vBar) {
-        FrameView* scrollView = m_object->element()->getDocument()->view();
+        FrameView* scrollView = m_object->element()->document()->view();
         scrollView->removeChild(m_vBar);
         delete m_vBar;
         m_vBar = 0;
index e6a4e2c85334c69c832b1458ae59d9cc097da3eb..609ecc97d2b0e7af843d532408cd56739d7e75ff 100644 (file)
@@ -83,7 +83,7 @@ void RenderObject::operator delete(void* ptr, size_t sz)
 RenderObject *RenderObject::createObject(Node* node,  RenderStyle* style)
 {
     RenderObject *o = 0;
-    RenderArena* arena = node->getDocument()->renderArena();
+    RenderArena* arena = node->document()->renderArena();
     switch(style->display())
     {
     case NONE:
@@ -161,7 +161,7 @@ m_positioned( false ),
 m_relPositioned( false ),
 m_paintBackground( false ),
 
-m_isAnonymous( node == node->getDocument() ),
+m_isAnonymous( node == node->document() ),
 m_recalcMinMax( false ),
 m_isText( false ),
 m_inline( true ),
@@ -193,7 +193,7 @@ bool RenderObject::hasAncestor(const RenderObject *obj) const
 bool RenderObject::isRoot() const
 {
     return element() && element()->renderer() == this &&
-           element()->getDocument()->documentElement() == element();
+           element()->document()->documentElement() == element();
 }
 
 bool RenderObject::isBody() const
@@ -2504,7 +2504,7 @@ bool RenderObject::usesLineWidth() const
 QChar RenderObject::backslashAsCurrencySymbol() const
 {
     if (Node *node = element())
-        if (Decoder *decoder = node->getDocument()->decoder())
+        if (Decoder *decoder = node->document()->decoder())
             return decoder->encoding().backslashAsCurrencySymbol();
     return '\\';
 }
index 29d1db4e219051071f6abc3ca9abac6255f2d274..60b86a2465e6c7c639844b3470016fa5d282fb66 100644 (file)
@@ -326,7 +326,7 @@ public:
 
     // don't even think about making this method virtual!
     Node* element() const { return m_isAnonymous ? 0 : m_node; }
-    Document* document() const { return m_node->getDocument(); }
+    Document* document() const { return m_node->document(); }
     void setNode(Node* node) { m_node = node; }
     Node* node() const { return m_node; }
     
index 8d6c2eb03e546ce046dc8905d4f41ad08c55ed61..37c2666f8f0cc400e752a27735da79d186035b6f 100644 (file)
@@ -209,7 +209,7 @@ bool RenderTheme::isFocused(const RenderObject* o) const
 {
     if (!o->element())
         return false;
-    return o->element() == o->element()->getDocument()->focusNode();
+    return o->element() == o->element()->document()->focusNode();
 }
 
 bool RenderTheme::isPressed(const RenderObject* o) const
index ad87ce9360df28d5d6175f8e7c739e4c5e2e10d3..b12db0e3a1cec5663cde6d020c083402928a4075 100644 (file)
@@ -83,7 +83,7 @@ void RenderApplet::createWidgetIfNecessary()
                     HTMLParamElement* p = static_cast<HTMLParamElement*>(child);
                     m_args.set(p->name(), p->value());
                 }
-            setWidget(new JavaAppletWidget(IntSize(width, height), element()->getDocument()->frame(), m_args));
+            setWidget(new JavaAppletWidget(IntSize(width, height), element()->document()->frame(), m_args));
         }
     }
 }
index 06a5aeaedf803a3520d061f8e9793589458ecb7c..b9dd46fb40952fc847fa3d7ed59dda698a27a319 100644 (file)
@@ -244,7 +244,7 @@ RenderWidget::RenderWidget(WebCore::Node* node)
     m_widget = 0;
     // a replaced element doesn't support being anonymous
     ASSERT(node);
-    m_view = node->getDocument()->view();
+    m_view = node->document()->view();
 
     canvas()->addWidget(this);
 
@@ -393,7 +393,7 @@ void RenderWidget::focusIn(Widget*)
     RenderArena* arena = ref();
     RefPtr<Node> elem = element();
     if (elem)
-        elem->getDocument()->setFocusNode(elem);
+        elem->document()->setFocusNode(elem);
     deref(arena);
 }
 
@@ -401,8 +401,8 @@ void RenderWidget::focusOut(Widget*)
 {
     RenderArena* arena = ref();
     RefPtr<Node> elem = element();
-    if (elem && elem == elem->getDocument()->focusNode())
-        elem->getDocument()->setFocusNode(0);
+    if (elem && elem == elem->document()->focusNode())
+        elem->document()->setFocusNode(0);
     deref(arena);
 }