Commit 42e58c6d authored by ggaren's avatar ggaren

LayoutTests:

        Reviewed by Darin.

        * fast/dom/prototype-chain-expected.txt: Updated to reflect new
        prototype chain.

WebCore:

        Reviewed by Darin.

        - Fixed some crashes in event dispatch and settled the question of 
        when getDocument() can return NULL, removing superfluous NULL checks.

        I promise to check in a test case soon, but I need to land this before
        the global rename happens, and I left the test file on my other machine.

        Here's what I did:

        (1) Removed NULL checks for getDocument() in cases where we know it
        should not return NULL (which turned out to be all but one). Replaced 
        with ASSERT inside getDocument(). Tested to ensure there was no 
        regression @ albertsons.com.

        (2) Added the EventTargetNode class, which represents Nodes that
        implement the DOM EventTarget interface. Discussed this design with
        Maciej and Hyatt. The previous dsign -- assuming that all Nodes were 
        EventTargets -- made it possible to crash WebKit by, for example, 
        dispatching a mouse event to a documentType node that was not 
        associated with a document.

        (3) Reflected (2) into the JS bindings and touched JSDOMCore.cpp to 
        force a re-build.

        (4) Using classInfo checking, strengthened type constraints on 
        JavaScript method dispatch so that you can't finagle JavaScript into, 
        for example, invoking a document-dependent method belonging to a
        node type that's guaranteed to have a document on a node type that may
        not have one. 

        (5) Pushed some IE-specific JS bindings that depend on a node having a 
        document down from DOMNode to DOMElement. (An element always has a 
        document.) Tested that Firefox's behavior matched. Confirmed with MSDN.

        (6) Updated Objc bindigns to throw an exception if you try to use
        the event interface on a node that doesn't support it. Discussed this
        design with Maciej and TimH.

        (7) Consolidated repeated documentElement-finding code in the Position 
        class into the Position::documentElement() method. Did the same for
        repeated top-level document finding and DocumentImpl::topDocument().
        
        * WebCore+SVG/KDOMHeaders.h:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMCore.cpp:
        * bindings/objc/DOM.mm:
        (-[DOMNode addEventListener:::]):
        (-[DOMNode removeEventListener:::]):
        (-[DOMNode dispatchEvent:]):
        (-[DOMNode KJS::Bindings::]):
        * bridge/mac/MacFrame.mm:
        (WebCore::MacFrame::keyEvent):
        (WebCore::MacFrame::dispatchCPPEvent):
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge setSelectedDOMRange:affinity:closeTyping:]):
        (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
        * css/css_base.cpp:
        (WebCore::StyleBaseImpl::baseURL):
        * css/css_computedstyle.cpp:
        (WebCore::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        * css/css_valueimpl.cpp:
        (WebCore::CSSMutableStyleDeclarationImpl::removeProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::setProperty):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * dom/Attr.idl:
        * dom/CharacterData.idl:
        * dom/CharacterDataImpl.cpp:
        (WebCore::CharacterDataImpl::CharacterDataImpl):
        (WebCore::CharacterDataImpl::rendererIsNeeded):
        (WebCore::CharacterDataImpl::dump):
        * dom/CharacterDataImpl.h:
        * dom/ContainerNodeImpl.cpp:
        (WebCore::ContainerNodeImpl::ContainerNodeImpl):
        (WebCore::ContainerNodeImpl::removeChild):
        (WebCore::ContainerNodeImpl::attach):
        (WebCore::ContainerNodeImpl::detach):
        (WebCore::ContainerNodeImpl::insertedIntoDocument):
        (WebCore::ContainerNodeImpl::removedFromDocument):
        (WebCore::ContainerNodeImpl::insertedIntoTree):
        (WebCore::ContainerNodeImpl::removedFromTree):
        (WebCore::ContainerNodeImpl::setFocus):
        (WebCore::ContainerNodeImpl::setActive):
        (WebCore::ContainerNodeImpl::setHovered):
        (WebCore::dispatchChildInsertionEvents):
        (WebCore::dispatchChildRemovalEvents):
        * dom/ContainerNodeImpl.h:
        * dom/DOMImplementationImpl.cpp:
        (WebCore::DOMImplementationImpl::createDocument):
        * dom/DocumentImpl.cpp:
        (WebCore::DocumentImpl::removeAllEventListenersFromAllNodes):
        (WebCore::DocumentImpl::removeAllDisconnectedNodeEventListeners):
        (WebCore::DocumentImpl::getAccObjectCache):
        (WebCore::DocumentImpl::setFocusNode):
        (WebCore::DocumentImpl::topDocument):
        * dom/Element.idl:
        * dom/EventTargetNodeImpl.cpp: Added.
        (WebCore::EventTargetNodeImpl::EventTargetNodeImpl):
        (WebCore::EventTargetNodeImpl::~EventTargetNodeImpl):
        (WebCore::EventTargetNodeImpl::insertedIntoDocument):
        (WebCore::EventTargetNodeImpl::removedFromDocument):
        (WebCore::EventTargetNodeImpl::addEventListener):
        (WebCore::EventTargetNodeImpl::removeEventListener):
        (WebCore::EventTargetNodeImpl::removeAllEventListeners):
        (WebCore::EventTargetNodeImpl::handleLocalEvents):
        (WebCore::EventTargetNodeImpl::dispatchGenericEvent):
        (WebCore::EventTargetNodeImpl::dispatchEvent):
        (WebCore::EventTargetNodeImpl::dispatchSubtreeModifiedEvent):
        (WebCore::EventTargetNodeImpl::dispatchWindowEvent):
        (WebCore::EventTargetNodeImpl::dispatchUIEvent):
        (WebCore::EventTargetNodeImpl::dispatchKeyEvent):
        (WebCore::EventTargetNodeImpl::dispatchMouseEvent):
        (WebCore::EventTargetNodeImpl::dispatchSimulatedMouseEvent):
        (WebCore::EventTargetNodeImpl::dispatchWheelEvent):
        (WebCore::EventTargetNodeImpl::dispatchHTMLEvent):
        (WebCore::EventTargetNodeImpl::removeHTMLEventListener):
        (WebCore::EventTargetNodeImpl::setHTMLEventListener):
        (WebCore::EventTargetNodeImpl::getHTMLEventListener):
        (WebCore::EventTargetNodeImpl::disabled):
        (WebCore::EventTargetNodeImpl::defaultEventHandler):
        (WebCore::EventTargetNodeImpl::dump):
        * dom/EventTargetNodeImpl.h: Added.
        (WebCore::EventTargetNodeImpl::isEventTargetNode):
        (WebCore::EventTargetNodeImpl::preDispatchEventHandler):
        (WebCore::EventTargetNodeImpl::postDispatchEventHandler):
        (WebCore::EventTarget):
        (WebCore::forbidEventDispatch):
        (WebCore::allowEventDispatch):
        (WebCore::eventDispatchForbidden):
        * dom/NodeImpl.cpp:
        (WebCore::NodeImpl::NodeImpl):
        (WebCore::NodeImpl::~NodeImpl):
        (WebCore::NodeImpl::dump):
        (WebCore::NodeImpl::detach):
        (WebCore::NodeImpl::insertedIntoDocument):
        (WebCore::NodeImpl::removedFromDocument):
        * dom/NodeImpl.h:
        (WebCore::NodeImpl::isEventTargetNode):
        (WebCore::NodeImpl::isLink):
        (WebCore::NodeImpl::getDocument):
        (WebCore::NodeImpl::inDocument):
        * dom/dom2_eventsimpl.cpp:
        (WebCore::MouseRelatedEventImpl::receivedTarget):
        * dom/dom2_rangeimpl.cpp:
        (WebCore::RangeImpl::commonAncestorContainer):
        * dom/dom_elementimpl.cpp:
        (WebCore::inHTMLDocument):
        (WebCore::ElementImpl::focus):
        (WebCore::ElementImpl::blur):
        (WebCore::StyledElementImpl::parseMappedAttribute):
        * dom/dom_position.cpp:
        (WebCore::Position::documentElement):
        * dom/dom_position.h:
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::computeAndStoreNodeDesiredStyle):
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::needsCaretRepaint):
        * editing/visible_units.cpp:
        (WebCore::previousBoundary):
        (WebCore::nextBoundary):
        (WebCore::previousLinePosition):
        (WebCore::nextLinePosition):
        (WebCore::startOfDocument):
        (WebCore::endOfDocument):
        * khtml/ecma/kjs_dom.cpp:
        (KJS::DOMNode::mark):
        (KJS::DOMNode::getValueProperty):
        (KJS::DOMNode::putValueProperty):
        (KJS::DOMNodeProtoFunc::callAsFunction):
        (KJS::DOMEventTargetNode::DOMEventTargetNode):
        (KJS::DOMEventTargetNode::getOwnPropertySlot):
        (KJS::DOMEventTargetNode::getValueProperty):
        (KJS::DOMEventTargetNode::put):
        (KJS::DOMEventTargetNode::putValueProperty):
        (KJS::DOMEventTargetNode::setListener):
        (KJS::DOMEventTargetNode::getListener):
        (KJS::DOMEventTargetNode::pushEventHandlerScope):
        (KJS::DOMEventTargetNodeProtoFunc::callAsFunction):
        (KJS::):
        (KJS::DOMDocument::DOMDocument):
        (KJS::DOMDocument::getOwnPropertySlot):
        (KJS::DOMDocument::put):
        (KJS::DOMDocument::putValueProperty):
        (KJS::DOMDocumentProtoFunc::callAsFunction):
        (KJS::DOMElement::DOMElement):
        (KJS::DOMElement::getValueProperty):
        (KJS::DOMElement::put):
        (KJS::DOMElement::putValueProperty):
        (KJS::DOMElement::getOwnPropertySlot):
        (KJS::DOMElementProtoFunc::callAsFunction):
        (KJS::checkNodeSecurity):
        * khtml/ecma/kjs_dom.h:
        (KJS::DOMNode::):
        (KJS::DOMEventTargetNode::):
        (KJS::DOMElement::):
        * khtml/ecma/kjs_events.cpp:
        (KJS::JSLazyEventListener::parseCode):
        (KJS::getNodeEventListener):
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::bodyGetter):
        (KJS::HTMLElement::anchorGetter):
        (KJS::HTMLElement::getValueProperty):
        (KJS::HTMLElement::bodySetter):
        * khtml/ecma/kjs_views.cpp:
        (KJS::DOMAbstractViewProtoFunc::callAsFunction):
        * khtml/html/HTMLFormElementImpl.cpp:
        (WebCore::HTMLFormElementImpl::registerFormElement):
        (WebCore::HTMLFormElementImpl::removeFormElement):
        * khtml/html/HTMLGenericFormElementImpl.cpp:
        (WebCore::HTMLGenericFormElementImpl::insertedIntoTree):
        * khtml/html/HTMLInputElementImpl.cpp:
        (WebCore::HTMLInputElementImpl::~HTMLInputElementImpl):
        (WebCore::HTMLInputElementImpl::focus):
        * khtml/html/HTMLOptionElementImpl.cpp:
        (WebCore::HTMLOptionElementImpl::text):
        * khtml/html/HTMLSelectElementImpl.cpp:
        (WebCore::HTMLSelectElementImpl::~HTMLSelectElementImpl):
        * khtml/html/HTMLTextAreaElementImpl.cpp:
        (WebCore::HTMLTextAreaElementImpl::~HTMLTextAreaElementImpl):
        * khtml/html/html_baseimpl.cpp:
        (WebCore::HTMLBodyElementImpl::insertedIntoDocument):
        (WebCore::HTMLFrameElementImpl::isURLAllowed):
        (WebCore::HTMLFrameElementImpl::openURL):
        (WebCore::HTMLFrameElementImpl::frameWidth):
        (WebCore::HTMLFrameElementImpl::frameHeight):
        * khtml/html/html_imageimpl.cpp:
        (WebCore::HTMLImageLoader::~HTMLImageLoader):
        (WebCore::HTMLImageLoader::updateFromElement):
        (WebCore::HTMLImageLoader::notifyFinished):
        (WebCore::HTMLImageElementImpl::width):
        (WebCore::HTMLImageElementImpl::height):
        (WebCore::HTMLMapElementImpl::~HTMLMapElementImpl):
        * khtml/html/html_inlineimpl.cpp:
        (WebCore::HTMLAnchorElementImpl::defaultEventHandler):
        * khtml/html/htmltokenizer.cpp:
        (WebCore::HTMLTokenizer::notifyFinished):
        * ksvg2/svg/SVGAnimateColorElementImpl.cpp:
        (SVGAnimateColorElementImpl::handleTimerEvent):
        * ksvg2/svg/SVGAnimateElementImpl.cpp:
        (SVGAnimateElementImpl::handleTimerEvent):
        * ksvg2/svg/SVGAnimateTransformElementImpl.cpp:
        (SVGAnimateTransformElementImpl::handleTimerEvent):
        * ksvg2/svg/SVGAnimationElementImpl.cpp:
        (SVGAnimationElementImpl::closeRenderer):
        * ksvg2/svg/SVGDOMImplementationImpl.cpp:
        * ksvg2/svg/SVGDocumentImpl.cpp:
        (WebCore::SVGDocumentImpl::dispatchRecursiveEvent):
        * ksvg2/svg/SVGDocumentImpl.h:
        * ksvg2/svg/SVGImageElementImpl.cpp:
        * ksvg2/svg/SVGSetElementImpl.cpp:
        (SVGSetElementImpl::handleTimerEvent):
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject mouseButtonListener]):
        (-[KWQAccObject accessibilityPerformAction:]):
        * kwq/KWQTextArea.mm:
        (-[KWQTextAreaTextView dispatchHTMLEvent:]):
        * page/Frame.cpp:
        (WebCore::dispatchKHTMLEditableContentChanged):
        * page/FrameView.cpp:
        (WebCore::FrameView::dispatchDragEvent):
        (WebCore::FrameView::dispatchMouseEvent):
        (WebCore::FrameView::viewportWheelEvent):
        * rendering/render_layer.cpp:
        (WebCore::RenderLayer::scrollToOffset):
        * rendering/render_object.cpp:
        (WebCore::RenderObject::shouldSelect):
        (WebCore::RenderObject::backslashAsCurrencySymbol):
        * rendering/render_replaced.cpp:
        (WebCore::RenderWidget::sendConsumedMouseUp):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0589f07a
2006-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
* fast/dom/prototype-chain-expected.txt: Updated to reflect new
prototype chain.
2006-03-17 Beth Dakin <bdakin@apple.com> 2006-03-17 Beth Dakin <bdakin@apple.com>
Reviewed by hyatt Reviewed by hyatt
......
...@@ -2,20 +2,24 @@ This page prints out the prototype chains of select DOM objects. Older versions ...@@ -2,20 +2,24 @@ This page prints out the prototype chains of select DOM objects. Older versions
NOTE: This test will start failing if you change the layout of a related prototype chain in WebCore. That does not necessarily mean that you have done something wrong; you may just need to check in new results. NOTE: This test will start failing if you change the layout of a related prototype chain in WebCore. That does not necessarily mean that you have done something wrong; you may just need to check in new results.
----- [object HTMLDocument] (3 prototypes) ----- ----- [object HTMLDocument] (4 prototypes) -----
[object Object] [object Object]
[object DOMNode] [object DOMNode]
[object DOMEventTargetNode]
[object DOMDocument] [object DOMDocument]
----- [object DIV] (4 prototypes) ----- ----- [object DIV] (5 prototypes) -----
[object Object] [object Object]
[object DOMNode] [object DOMNode]
[object DOMEventTargetNode]
[object DOMElement] [object DOMElement]
[object JSElement] [object JSElement]
......
2006-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
- Fixed some crashes in event dispatch and settled the question of
when getDocument() can return NULL, removing superfluous NULL checks.
I promise to check in a test case soon, but I need to land this before
the global rename happens, and I left the test file on my other machine.
Here's what I did:
(1) Removed NULL checks for getDocument() in cases where we know it
should not return NULL (which turned out to be all but one). Replaced
with ASSERT inside getDocument(). Tested to ensure there was no
regression @ albertsons.com.
(2) Added the EventTargetNode class, which represents Nodes that
implement the DOM EventTarget interface. Discussed this design with
Maciej and Hyatt. The previous dsign -- assuming that all Nodes were
EventTargets -- made it possible to crash WebKit by, for example,
dispatching a mouse event to a documentType node that was not
associated with a document.
(3) Reflected (2) into the JS bindings and touched JSDOMCore.cpp to
force a re-build.
(4) Using classInfo checking, strengthened type constraints on
JavaScript method dispatch so that you can't finagle JavaScript into,
for example, invoking a document-dependent method belonging to a
node type that's guaranteed to have a document on a node type that may
not have one.
(5) Pushed some IE-specific JS bindings that depend on a node having a
document down from DOMNode to DOMElement. (An element always has a
document.) Tested that Firefox's behavior matched. Confirmed with MSDN.
(6) Updated Objc bindigns to throw an exception if you try to use
the event interface on a node that doesn't support it. Discussed this
design with Maciej and TimH.
(7) Consolidated repeated documentElement-finding code in the Position
class into the Position::documentElement() method. Did the same for
repeated top-level document finding and DocumentImpl::topDocument().
* WebCore+SVG/KDOMHeaders.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMCore.cpp:
* bindings/objc/DOM.mm:
(-[DOMNode addEventListener:::]):
(-[DOMNode removeEventListener:::]):
(-[DOMNode dispatchEvent:]):
(-[DOMNode KJS::Bindings::]):
* bridge/mac/MacFrame.mm:
(WebCore::MacFrame::keyEvent):
(WebCore::MacFrame::dispatchCPPEvent):
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge setSelectedDOMRange:affinity:closeTyping:]):
(-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
* css/css_base.cpp:
(WebCore::StyleBaseImpl::baseURL):
* css/css_computedstyle.cpp:
(WebCore::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
* css/css_valueimpl.cpp:
(WebCore::CSSMutableStyleDeclarationImpl::removeProperty):
(WebCore::CSSMutableStyleDeclarationImpl::setProperty):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/CharacterDataImpl.cpp:
(WebCore::CharacterDataImpl::CharacterDataImpl):
(WebCore::CharacterDataImpl::rendererIsNeeded):
(WebCore::CharacterDataImpl::dump):
* dom/CharacterDataImpl.h:
* dom/ContainerNodeImpl.cpp:
(WebCore::ContainerNodeImpl::ContainerNodeImpl):
(WebCore::ContainerNodeImpl::removeChild):
(WebCore::ContainerNodeImpl::attach):
(WebCore::ContainerNodeImpl::detach):
(WebCore::ContainerNodeImpl::insertedIntoDocument):
(WebCore::ContainerNodeImpl::removedFromDocument):
(WebCore::ContainerNodeImpl::insertedIntoTree):
(WebCore::ContainerNodeImpl::removedFromTree):
(WebCore::ContainerNodeImpl::setFocus):
(WebCore::ContainerNodeImpl::setActive):
(WebCore::ContainerNodeImpl::setHovered):
(WebCore::dispatchChildInsertionEvents):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNodeImpl.h:
* dom/DOMImplementationImpl.cpp:
(WebCore::DOMImplementationImpl::createDocument):
* dom/DocumentImpl.cpp:
(WebCore::DocumentImpl::removeAllEventListenersFromAllNodes):
(WebCore::DocumentImpl::removeAllDisconnectedNodeEventListeners):
(WebCore::DocumentImpl::getAccObjectCache):
(WebCore::DocumentImpl::setFocusNode):
(WebCore::DocumentImpl::topDocument):
* dom/Element.idl:
* dom/EventTargetNodeImpl.cpp: Added.
(WebCore::EventTargetNodeImpl::EventTargetNodeImpl):
(WebCore::EventTargetNodeImpl::~EventTargetNodeImpl):
(WebCore::EventTargetNodeImpl::insertedIntoDocument):
(WebCore::EventTargetNodeImpl::removedFromDocument):
(WebCore::EventTargetNodeImpl::addEventListener):
(WebCore::EventTargetNodeImpl::removeEventListener):
(WebCore::EventTargetNodeImpl::removeAllEventListeners):
(WebCore::EventTargetNodeImpl::handleLocalEvents):
(WebCore::EventTargetNodeImpl::dispatchGenericEvent):
(WebCore::EventTargetNodeImpl::dispatchEvent):
(WebCore::EventTargetNodeImpl::dispatchSubtreeModifiedEvent):
(WebCore::EventTargetNodeImpl::dispatchWindowEvent):
(WebCore::EventTargetNodeImpl::dispatchUIEvent):
(WebCore::EventTargetNodeImpl::dispatchKeyEvent):
(WebCore::EventTargetNodeImpl::dispatchMouseEvent):
(WebCore::EventTargetNodeImpl::dispatchSimulatedMouseEvent):
(WebCore::EventTargetNodeImpl::dispatchWheelEvent):
(WebCore::EventTargetNodeImpl::dispatchHTMLEvent):
(WebCore::EventTargetNodeImpl::removeHTMLEventListener):
(WebCore::EventTargetNodeImpl::setHTMLEventListener):
(WebCore::EventTargetNodeImpl::getHTMLEventListener):
(WebCore::EventTargetNodeImpl::disabled):
(WebCore::EventTargetNodeImpl::defaultEventHandler):
(WebCore::EventTargetNodeImpl::dump):
* dom/EventTargetNodeImpl.h: Added.
(WebCore::EventTargetNodeImpl::isEventTargetNode):
(WebCore::EventTargetNodeImpl::preDispatchEventHandler):
(WebCore::EventTargetNodeImpl::postDispatchEventHandler):
(WebCore::EventTarget):
(WebCore::forbidEventDispatch):
(WebCore::allowEventDispatch):
(WebCore::eventDispatchForbidden):
* dom/NodeImpl.cpp:
(WebCore::NodeImpl::NodeImpl):
(WebCore::NodeImpl::~NodeImpl):
(WebCore::NodeImpl::dump):
(WebCore::NodeImpl::detach):
(WebCore::NodeImpl::insertedIntoDocument):
(WebCore::NodeImpl::removedFromDocument):
* dom/NodeImpl.h:
(WebCore::NodeImpl::isEventTargetNode):
(WebCore::NodeImpl::isLink):
(WebCore::NodeImpl::getDocument):
(WebCore::NodeImpl::inDocument):
* dom/dom2_eventsimpl.cpp:
(WebCore::MouseRelatedEventImpl::receivedTarget):
* dom/dom2_rangeimpl.cpp:
(WebCore::RangeImpl::commonAncestorContainer):
* dom/dom_elementimpl.cpp:
(WebCore::inHTMLDocument):
(WebCore::ElementImpl::focus):
(WebCore::ElementImpl::blur):
(WebCore::StyledElementImpl::parseMappedAttribute):
* dom/dom_position.cpp:
(WebCore::Position::documentElement):
* dom/dom_position.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::computeAndStoreNodeDesiredStyle):
* editing/SelectionController.cpp:
(WebCore::SelectionController::needsCaretRepaint):
* editing/visible_units.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):
(WebCore::startOfDocument):
(WebCore::endOfDocument):
* khtml/ecma/kjs_dom.cpp:
(KJS::DOMNode::mark):
(KJS::DOMNode::getValueProperty):
(KJS::DOMNode::putValueProperty):
(KJS::DOMNodeProtoFunc::callAsFunction):
(KJS::DOMEventTargetNode::DOMEventTargetNode):
(KJS::DOMEventTargetNode::getOwnPropertySlot):
(KJS::DOMEventTargetNode::getValueProperty):
(KJS::DOMEventTargetNode::put):
(KJS::DOMEventTargetNode::putValueProperty):
(KJS::DOMEventTargetNode::setListener):
(KJS::DOMEventTargetNode::getListener):
(KJS::DOMEventTargetNode::pushEventHandlerScope):
(KJS::DOMEventTargetNodeProtoFunc::callAsFunction):
(KJS::):
(KJS::DOMDocument::DOMDocument):
(KJS::DOMDocument::getOwnPropertySlot):
(KJS::DOMDocument::put):
(KJS::DOMDocument::putValueProperty):
(KJS::DOMDocumentProtoFunc::callAsFunction):
(KJS::DOMElement::DOMElement):
(KJS::DOMElement::getValueProperty):
(KJS::DOMElement::put):
(KJS::DOMElement::putValueProperty):
(KJS::DOMElement::getOwnPropertySlot):
(KJS::DOMElementProtoFunc::callAsFunction):
(KJS::checkNodeSecurity):
* khtml/ecma/kjs_dom.h:
(KJS::DOMNode::):
(KJS::DOMEventTargetNode::):
(KJS::DOMElement::):
* khtml/ecma/kjs_events.cpp:
(KJS::JSLazyEventListener::parseCode):
(KJS::getNodeEventListener):
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::bodyGetter):
(KJS::HTMLElement::anchorGetter):
(KJS::HTMLElement::getValueProperty):
(KJS::HTMLElement::bodySetter):
* khtml/ecma/kjs_views.cpp:
(KJS::DOMAbstractViewProtoFunc::callAsFunction):
* khtml/html/HTMLFormElementImpl.cpp:
(WebCore::HTMLFormElementImpl::registerFormElement):
(WebCore::HTMLFormElementImpl::removeFormElement):
* khtml/html/HTMLGenericFormElementImpl.cpp:
(WebCore::HTMLGenericFormElementImpl::insertedIntoTree):
* khtml/html/HTMLInputElementImpl.cpp:
(WebCore::HTMLInputElementImpl::~HTMLInputElementImpl):
(WebCore::HTMLInputElementImpl::focus):
* khtml/html/HTMLOptionElementImpl.cpp:
(WebCore::HTMLOptionElementImpl::text):
* khtml/html/HTMLSelectElementImpl.cpp:
(WebCore::HTMLSelectElementImpl::~HTMLSelectElementImpl):
* khtml/html/HTMLTextAreaElementImpl.cpp:
(WebCore::HTMLTextAreaElementImpl::~HTMLTextAreaElementImpl):
* khtml/html/html_baseimpl.cpp:
(WebCore::HTMLBodyElementImpl::insertedIntoDocument):
(WebCore::HTMLFrameElementImpl::isURLAllowed):
(WebCore::HTMLFrameElementImpl::openURL):
(WebCore::HTMLFrameElementImpl::frameWidth):
(WebCore::HTMLFrameElementImpl::frameHeight):
* khtml/html/html_imageimpl.cpp:
(WebCore::HTMLImageLoader::~HTMLImageLoader):
(WebCore::HTMLImageLoader::updateFromElement):
(WebCore::HTMLImageLoader::notifyFinished):
(WebCore::HTMLImageElementImpl::width):
(WebCore::HTMLImageElementImpl::height):
(WebCore::HTMLMapElementImpl::~HTMLMapElementImpl):
* khtml/html/html_inlineimpl.cpp:
(WebCore::HTMLAnchorElementImpl::defaultEventHandler):
* khtml/html/htmltokenizer.cpp:
(WebCore::HTMLTokenizer::notifyFinished):
* ksvg2/svg/SVGAnimateColorElementImpl.cpp:
(SVGAnimateColorElementImpl::handleTimerEvent):
* ksvg2/svg/SVGAnimateElementImpl.cpp:
(SVGAnimateElementImpl::handleTimerEvent):
* ksvg2/svg/SVGAnimateTransformElementImpl.cpp:
(SVGAnimateTransformElementImpl::handleTimerEvent):
* ksvg2/svg/SVGAnimationElementImpl.cpp:
(SVGAnimationElementImpl::closeRenderer):
* ksvg2/svg/SVGDOMImplementationImpl.cpp:
* ksvg2/svg/SVGDocumentImpl.cpp:
(WebCore::SVGDocumentImpl::dispatchRecursiveEvent):
* ksvg2/svg/SVGDocumentImpl.h:
* ksvg2/svg/SVGImageElementImpl.cpp:
* ksvg2/svg/SVGSetElementImpl.cpp:
(SVGSetElementImpl::handleTimerEvent):
* kwq/KWQAccObject.mm:
(-[KWQAccObject mouseButtonListener]):
(-[KWQAccObject accessibilityPerformAction:]):
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView dispatchHTMLEvent:]):
* page/Frame.cpp:
(WebCore::dispatchKHTMLEditableContentChanged):
* page/FrameView.cpp:
(WebCore::FrameView::dispatchDragEvent):
(WebCore::FrameView::dispatchMouseEvent):
(WebCore::FrameView::viewportWheelEvent):
* rendering/render_layer.cpp:
(WebCore::RenderLayer::scrollToOffset):
* rendering/render_object.cpp:
(WebCore::RenderObject::shouldSelect):
(WebCore::RenderObject::backslashAsCurrencySymbol):
* rendering/render_replaced.cpp:
(WebCore::RenderWidget::sendConsumedMouseUp):
2006-03-17 David Hyatt <hyatt@apple.com> 2006-03-17 David Hyatt <hyatt@apple.com>
Fix for 7837, make opacity work with table rows. Make transparent backgrounds Fix for 7837, make opacity work with table rows. Make transparent backgrounds
...@@ -4,14 +4,14 @@ namespace khtml { ...@@ -4,14 +4,14 @@ namespace khtml {
} }
namespace DOM { namespace DOM {
class NodeImpl; class EventTargetNodeImpl;
} }
namespace KDOM { namespace KDOM {
using namespace DOM; using namespace DOM;
using namespace khtml; using namespace khtml;
typedef khtml::StyleListImpl CSSStyleSelectorList; typedef khtml::StyleListImpl CSSStyleSelectorList;
typedef NodeImpl EventTargetImpl; typedef EventTargetNodeImpl EventTargetImpl;
} }
#include "Shared.h" #include "Shared.h"
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
14EC267F09CA07E000E1EEEC /* EventTargetNodeImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 14EC267D09CA07E000E1EEEC /* EventTargetNodeImpl.h */; };
14EC268009CA07E000E1EEEC /* EventTargetNodeImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14EC267E09CA07E000E1EEEC /* EventTargetNodeImpl.cpp */; };
1A2154EE099A11A800343DF8 /* JSDOMCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2154EC099A11A800343DF8 /* JSDOMCore.cpp */; }; 1A2154EE099A11A800343DF8 /* JSDOMCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2154EC099A11A800343DF8 /* JSDOMCore.cpp */; };
1A2154EF099A11A800343DF8 /* JSDOMEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2154ED099A11A800343DF8 /* JSDOMEvents.cpp */; }; 1A2154EF099A11A800343DF8 /* JSDOMEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2154ED099A11A800343DF8 /* JSDOMEvents.cpp */; };
1A69D381085627410009880D /* domparser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A69D37F085627410009880D /* domparser.h */; }; 1A69D381085627410009880D /* domparser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A69D37F085627410009880D /* domparser.h */; };
...@@ -1124,6 +1126,8 @@ ...@@ -1124,6 +1126,8 @@
/* End PBXBuildStyle section */ /* End PBXBuildStyle section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
14EC267D09CA07E000E1EEEC /* EventTargetNodeImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTargetNodeImpl.h; sourceTree = "<group>"; };
14EC267E09CA07E000E1EEEC /* EventTargetNodeImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTargetNodeImpl.cpp; sourceTree = "<group>"; };
1A2154EC099A11A800343DF8 /* JSDOMCore.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMCore.cpp; path = bindings/js/JSDOMCore.cpp; sourceTree = "<group>"; }; 1A2154EC099A11A800343DF8 /* JSDOMCore.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMCore.cpp; path = bindings/js/JSDOMCore.cpp; sourceTree = "<group>"; };
1A2154ED099A11A800343DF8 /* JSDOMEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMEvents.cpp; path = bindings/js/JSDOMEvents.cpp; sourceTree = "<group>"; }; 1A2154ED099A11A800343DF8 /* JSDOMEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMEvents.cpp; path = bindings/js/JSDOMEvents.cpp; sourceTree = "<group>"; };
1A69D37F085627410009880D /* domparser.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = domparser.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 1A69D37F085627410009880D /* domparser.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = domparser.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
...@@ -1577,7 +1581,7 @@ ...@@ -1577,7 +1581,7 @@
A81872110977D3C0005826D9 /* ContainerNodeImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContainerNodeImpl.h; sourceTree = "<group>"; }; A81872110977D3C0005826D9 /* ContainerNodeImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContainerNodeImpl.h; sourceTree = "<group>"; };
A81872120977D3C0005826D9 /* NodeImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeImpl.cpp; sourceTree = "<group>"; }; A81872120977D3C0005826D9 /* NodeImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeImpl.cpp; sourceTree = "<group>"; };
A81872130977D3C0005826D9 /* NameNodeListImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NameNodeListImpl.h; sourceTree = "<group>"; }; A81872130977D3C0005826D9 /* NameNodeListImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NameNodeListImpl.h; sourceTree = "<group>"; };
A81872140977D3C0005826D9 /* ContainerNodeImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ContainerNodeImpl.cpp; sourceTree = "<group>"; }; A81872140977D3C0005826D9 /* ContainerNodeImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContainerNodeImpl.cpp; sourceTree = "<group>"; };
A81872150977D3C0005826D9 /* ChildNodeListImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ChildNodeListImpl.h; sourceTree = "<group>"; }; A81872150977D3C0005826D9 /* ChildNodeListImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ChildNodeListImpl.h; sourceTree = "<group>"; };
A81872160977D3C0005826D9 /* NodeListImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeListImpl.cpp; sourceTree = "<group>"; }; A81872160977D3C0005826D9 /* NodeListImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = NodeListImpl.cpp; sourceTree = "<group>"; };
A81872170977D3C0005826D9 /* NodeImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeImpl.h; sourceTree = "<group>"; }; A81872170977D3C0005826D9 /* NodeImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NodeImpl.h; sourceTree = "<group>"; };
...@@ -3847,6 +3851,8 @@ ...@@ -3847,6 +3851,8 @@
93EEC1F709C2877700C515D1 /* WheelEvent.idl */, 93EEC1F709C2877700C515D1 /* WheelEvent.idl */,
F523D30902DE4476018635CA /* xml_tokenizer.cpp */, F523D30902DE4476018635CA /* xml_tokenizer.cpp */,
F523D30A02DE4476018635CA /* xml_tokenizer.h */, F523D30A02DE4476018635CA /* xml_tokenizer.h */,
14EC267D09CA07E000E1EEEC /* EventTargetNodeImpl.h */,
14EC267E09CA07E000E1EEEC /* EventTargetNodeImpl.cpp */,
); );
path = dom; path = dom;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4446,6 +4452,7 @@ ...@@ -4446,6 +4452,7 @@
9352071E09BD3BBB00F2038D /* WebCoreWidgetHolder.h in Headers */, 9352071E09BD3BBB00F2038D /* WebCoreWidgetHolder.h in Headers */,
935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */, 935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */,
9352088209BD45E900F2038D /* CookieJar.h in Headers */, 9352088209BD45E900F2038D /* CookieJar.h in Headers */,
14EC267F09CA07E000E1EEEC /* EventTargetNodeImpl.h in Headers */,
93EEC1FA09C2877700C515D1 /* DocPtr.h in Headers */, 93EEC1FA09C2877700C515D1 /* DocPtr.h in Headers */,
93EEC20009C2877700C515D1 /* CanvasRenderingContext2D.h in Headers */, 93EEC20009C2877700C515D1 /* CanvasRenderingContext2D.h in Headers */,
93EEC20109C2877700C515D1 /* CanvasStyle.h in Headers */, 93EEC20109C2877700C515D1 /* CanvasStyle.h in Headers */,
...@@ -5600,6 +5607,7 @@ ...@@ -5600,6 +5607,7 @@
935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */, 935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */,
9352084509BD43B900F2038D /* Language.mm in Sources */, 9352084509BD43B900F2038D /* Language.mm in Sources */,
9352087709BD453400F2038D /* CookieJar.mm in Sources */, 9352087709BD453400F2038D /* CookieJar.mm in Sources */,
14EC268009CA07E000E1EEEC /* EventTargetNodeImpl.cpp in Sources */,
93E47C5C09BE2BBB0019C5C1 /* PageMac.mm in Sources */, 93E47C5C09BE2BBB0019C5C1 /* PageMac.mm in Sources */,
93EEC1FF09C2877700C515D1 /* CanvasRenderingContext2D.cpp in Sources */, 93EEC1FF09C2877700C515D1 /* CanvasRenderingContext2D.cpp in Sources */,
93EEC20209C2877700C515D1 /* CanvasGradient.cpp in Sources */, 93EEC20209C2877700C515D1 /* CanvasGradient.cpp in Sources */,
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// The files below are all generated by a script. // The files below are all generated by a script.
#include "JSAttr.cpp" #include "JSAttr.cpp"
#include "JSCharacterData.cpp" #include "JSCharacterData.cpp"
#include "JSDocumentType.cpp" #include "JSDocumentType.cpp"
......
...@@ -412,21 +412,30 @@ static ListenerMap *listenerMap; ...@@ -412,21 +412,30 @@ static ListenerMap *listenerMap;
- (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture - (void)addEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
{ {
if (![self _nodeImpl]->isEventTargetNode())
raiseDOMException(DOM_NOT_SUPPORTED_ERR);
EventListener *wrapper = ObjCEventListener::create(listener); EventListener *wrapper = ObjCEventListener::create(listener);
[self _nodeImpl]->addEventListener(type, wrapper, useCapture); EventTargetNodeCast([self _nodeImpl])->addEventListener(type, wrapper, useCapture);
wrapper->deref(); wrapper->deref();
} }
- (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture - (void)removeEventListener:(NSString *)type :(id <DOMEventListener>)listener :(BOOL)useCapture
{ {
if (![self _nodeImpl]->isEventTargetNode())
raiseDOMException(DOM_NOT_SUPPORTED_ERR);
if (EventListener *wrapper = ObjCEventListener::find(listener)) if (EventListener *wrapper = ObjCEventListener::find(listener))
[self _nodeImpl]->removeEventListener(type, wrapper, useCapture); EventTargetNodeCast([self _nodeImpl])->removeEventListener(type, wrapper, useCapture);
} }
- (BOOL)dispatchEvent:(DOMEvent *)event - (BOOL)dispatchEvent:(DOMEvent *)event
{ {
if (![self _nodeImpl]->isEventTargetNode())
raiseDOMException(DOM_NOT_SUPPORTED_ERR);
ExceptionCode ec = 0; ExceptionCode ec = 0;
BOOL result = [self _nodeImpl]->dispatchEvent([event _eventImpl], ec); BOOL result = EventTargetNodeCast([self _nodeImpl])->dispatchEvent([event _eventImpl], ec);
raiseOnDOMError(ec); raiseOnDOMError(ec);
return result; return result;
} }
...@@ -657,19 +666,11 @@ static ListenerMap *listenerMap; ...@@ -657,19 +666,11 @@ static ListenerMap *listenerMap;
- (const KJS::Bindings::RootObject *)_executionContext - (const KJS::Bindings::RootObject *)_executionContext
{ {
NodeImpl *n = [self _nodeImpl]; if (NodeImpl *n = [self _nodeImpl])
if (!n) if (MacFrame *f = Mac(n->getDocument()->frame()))
return 0; return f->executionContextForDOM();
DocumentImpl *doc = n->getDocument(); return 0;
if (!doc)
return 0;
MacFrame *p = Mac(doc->frame());
if (!p)
return 0;
return p->executionContextForDOM();
} }
@end @end
......
...@@ -1369,7 +1369,7 @@ bool MacFrame::keyEvent(NSEvent *event) ...@@ -1369,7 +1369,7 @@ bool MacFrame::keyEvent(NSEvent *event)
_currentEvent = KWQRetain(event); _currentEvent = KWQRetain(event);
KeyEvent qEvent(event); KeyEvent qEvent(event);
result = !node->dispatchKeyEvent(qEvent); result = !EventTargetNodeCast(node)->dispatchKeyEvent(qEvent);
// We want to send both a down and a press for the initial key event. // We want to send both a down and a press for the initial key event.
// To get KHTML to do this, we send a second KeyPress with "is repeat" set to true, // To get KHTML to do this, we send a second KeyPress with "is repeat" set to true,
...@@ -1377,7 +1377,7 @@ bool MacFrame::keyEvent(NSEvent *event) ...@@ -1377,7 +1377,7 @@ bool MacFrame::keyEvent(NSEvent *event)
// That's not a great hack; it would be good to do this in a better way. // That's not a great hack; it would be good to do this in a better way.
if ([event type] == NSKeyDown && ![event isARepeat]) { if ([event type] == NSKeyDown && ![event isARepeat]) {
KeyEvent repeatEvent(event, true); KeyEvent repeatEvent(event, true);
if (!node->dispatchKeyEvent(repeatEvent)) if (!EventTargetNodeCast(node)->dispatchKeyEvent(repeatEvent))
result = true; result = true;
} }
...@@ -1784,7 +1784,7 @@ bool MacFrame::dispatchCPPEvent(const AtomicString &eventType, KWQClipboard::Acc ...@@ -1784,7 +1784,7 @@ bool MacFrame::dispatchCPPEvent(const AtomicString &eventType, KWQClipboard::Acc
ExceptionCode ec = 0; ExceptionCode ec = 0;
RefPtr<EventImpl> evt = new ClipboardEventImpl(eventType, true, true, clipboard.get()); RefPtr<EventImpl> evt = new ClipboardEventImpl(eventType, true, true, clipboard.get());
target->dispatchEvent(evt, ec, true); EventTargetNodeCast(target)->dispatchEvent(evt, ec, true);
bool noDefaultProcessing = evt->defaultPrevented(); bool noDefaultProcessing = evt->defaultPrevented();
// invalidate clipboard here for security // invalidate clipboard here for security
......
...@@ -1700,7 +1700,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element) ...@@ -1700,7 +1700,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
NodeImpl *endContainer = [[range endContainer] _nodeImpl]; NodeImpl *endContainer = [[range endContainer] _nodeImpl];
ASSERT(startContainer); ASSERT(startContainer);
ASSERT(endContainer); ASSERT(endContainer);
ASSERT(startContainer->getDocument());
ASSERT(startContainer->getDocument() == endContainer->getDocument()); ASSERT(startContainer->getDocument() == endContainer->getDocument());
m_frame->document()->updateLayoutIgnorePendingStylesheets(); m_frame->document()->updateLayoutIgnorePendingStylesheets();
...@@ -1849,7 +1848,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element) ...@@ -1849,7 +1848,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
if (startContainer == nil || endContainer == nil) if (startContainer == nil || endContainer == nil)
return nil; return nil;
ASSERT(startContainer->getDocument());
ASSERT(startContainer->getDocument() == endContainer->getDocument()); ASSERT(startContainer->getDocument() == endContainer->getDocument());
m_frame->document()->updateLayoutIgnorePendingStylesheets(); m_frame->document()->updateLayoutIgnorePendingStylesheets();
......
...@@ -59,13 +59,13 @@ DOMString StyleBaseImpl::baseURL() ...@@ -59,13 +59,13 @@ DOMString StyleBaseImpl::baseURL()
return sheet->href(); return sheet->href();
// find parent // find parent
if(sheet->parent()) return sheet->parent()->baseURL(); if(sheet->parent())
return sheet->parent()->baseURL();
if(!sheet->ownerNode()) return DOMString(); if(!sheet->ownerNode())
return DOMString();
DocumentImpl *doc = sheet->ownerNode()->getDocument(); return sheet->ownerNode()->getDocument()->baseURL();
return doc->baseURL();
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
......
...@@ -315,9 +315,8 @@ PassRefPtr<CSSValueImpl> CSSComputedStyleDeclarationImpl::getPropertyCSSValue(in ...@@ -315,9 +315,8 @@ PassRefPtr<CSSValueImpl> CSSComputedStyleDeclarationImpl::getPropertyCSSValue(in