Commit fb958e8b authored by darin's avatar darin

Reviewed by Ken.

        - went through things marked "unimplemented" or "not implemented" and removed
          or implemented as many as possible

        * kwq/DOM.mm: (-[DOMNode dispatchEvent:]): Implemented.
        Also moved DOMAbstractView and DOMDocumentView into DOMViews.mm.
        * kwq/DOM-CSS.mm: (-[DOMDocument getComputedStyle::]): Implemented.

        * kwq/DOMEventsInternal.h: Added.
        * kwq/DOMEvents.mm:
        (-[DOMEvent type]): Implemented.
        (-[DOMEvent target]): Implemented.
        (-[DOMEvent currentTarget]): Implemented.
        (-[DOMEvent eventPhase]): Implemented.
        (-[DOMEvent bubbles]): Implemented.
        (-[DOMEvent cancelable]): Implemented.
        (-[DOMEvent timeStamp]): Implemented.
        (-[DOMEvent stopPropagation]): Implemented.
        (-[DOMEvent preventDefault]): Implemented.
        (-[DOMEvent initEvent:::]): Implemented.
        (-[DOMEvent _eventImpl]): Added.
        (-[DOMEvent _initWithEventImpl:]): Added.
        (+[DOMEvent _eventWithImpl:]): Added.
        (-[DOMMouseEvent _mouseEventImpl]): Added.
        (-[DOMMouseEvent screenX]): Implemented.
        (-[DOMMouseEvent screenY]): Implemented.
        (-[DOMMouseEvent clientX]): Implemented.
        (-[DOMMouseEvent clientY]): Implemented.
        (-[DOMMouseEvent ctrlKey]): Implemented.
        (-[DOMMouseEvent shiftKey]): Implemented.
        (-[DOMMouseEvent altKey]): Implemented.
        (-[DOMMouseEvent metaKey]): Implemented.
        (-[DOMMouseEvent button]): Implemented.
        (-[DOMMouseEvent relatedTarget]): Implemented.
        (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Implemented.
        (-[DOMMutationEvent _mutationEventImpl]): Added.
        (-[DOMMutationEvent relatedNode]): Implemented.
        (-[DOMMutationEvent prevValue]): Implemented.
        (-[DOMMutationEvent newValue]): Implemented.
        (-[DOMMutationEvent attrName]): Implemented.
        (-[DOMMutationEvent attrChange]): Implemented.
        (-[DOMMutationEvent initMutationEvent::::::::]):
        (-[DOMUIEvent _UIEventImpl]): Added.
        (-[DOMUIEvent view]): Implemented.
        (-[DOMUIEvent detail]): Implemented.
        (-[DOMUIEvent initUIEvent:::::]): Implemented.
        (-[DOMDocument createEvent:]): Implemented.

        * kwq/DOMHTMLInternal.h: Added.
        * kwq/DOMHTML.mm:
        (+[DOMHTMLOptionsCollection _optionsCollectionWithImpl:]): Added.
        (-[DOMHTMLOptionsCollection length]): Implemented.
        (-[DOMHTMLOptionsCollection setLength:]): Implemented.
        (-[DOMHTMLOptionsCollection item:]): Implemented.
        (-[DOMHTMLOptionsCollection namedItem:]): Implemented.
        (-[DOMHTMLSelectElement options]): Implemented.

        * kwq/DOMViews.h: Changed DOMDocumentView to be a category on DOMDocument
        rather than a separate class.
        * kwq/DOMViewsInternal.h: Added.
        * kwq/DOMViews.mm: Added.
        (-[DOMAbstractView document]): Implemnted.
        (-[DOMAbstractView _abstractViewImpl]): Added.
        (-[DOMAbstractView _initWithAbstractViewImpl:]): Added.
        (+[DOMAbstractView _abstractViewWithImpl:]): Added.
        (-[DOMDocument defaultView]): Implemented.

        * khtml/dom/dom2_views.h: Made AbstractView constructor public to allow creation in
        the bindings. Would not be necessary if the impl classes were used consistently.

        * khtml/html/html_formimpl.h: Added options() function to HTMLSelectElementImpl.
        Added HTMLOptionsCollectionImpl class.
        * khtml/html/html_formimpl.cpp:
        (HTMLSelectElementImpl::~HTMLSelectElementImpl): Added code to detach and deref the
        options collection.
        (HTMLSelectElementImpl::options): Create an options collection if needed.
        (HTMLOptionsCollectionImpl::length): Added. Not yet implemented.
        (HTMLOptionsCollectionImpl::setLength): Ditto.
        (HTMLOptionsCollectionImpl::item): Ditto.
        (HTMLOptionsCollectionImpl::namedItem): Ditto.

        * khtml/khtmlview.h: Move unused focusNextPrevChild virtual function inside !APPLE_CHANGES.
        * khtml/khtmlview.cpp: Put the tp, paintBuffer, and formCompletions fields entirely
        inside !APPLE_CHANGES. Also made QT_NO_TOOLTIP entirely disable the tooltip field.
        Also put focusNextPrevChild and formCompletionItems functions inside !APPLE_CHANGES.

        * khtml/rendering/render_text.h: Removed unused isFixedWidthFont member function.
        * khtml/rendering/render_text.cpp: Ditto.

        * kwq/KWQCursor.h: Removed unused pos member function.
        * kwq/KWQCursor.mm: Ditto.

        * kwq/KWQFontMetrics.h: Removed unused rightBearing and leftBearing member functions.
        * kwq/KWQFontMetrics.mm: Ditto.

        * kwq/KWQKComboBox.h: Removed KCompletionBase as a base class.

        * kwq/KWQKConfigBase.h: Removed unused readBoolEntry, writeEntry, and readListEntry
        member functions.
        * kwq/KWQKConfigBase.mm: Ditto.
        (KConfig::readEntry): Improved "not implemented" message to indicate which key is uinimplemented.
        (KConfig::readNumEntry): Ditto.
        (KConfig::readUnsignedNumEntry): Ditto.

        * kwq/KWQKLineEdit.h: Removed everything, since all the KLineEdit stuff was unused.
        Changed KLineEdit to just be a typedef for QLineEdit.

        * kwq/KWQSlot.mm: Removed slotAutoScroll.
        (KWQSlot::KWQSlot): And from here.
        (KWQSlot::call): And from here.

        * kwq/KWQTextStream.h: Removed unused QTextOStream and QTextIStream.
        * kwq/KWQTextStream.mm: Removed unused QTextIStream function. Also made buffer sizes larger
        so we don't have any problems on 64-bit systems. 10 bytes might not be long enough to sprintf an
        integer or a long or a pointer, but 100 bytes surely will.

        * kwq/KWQWidget.h: Removed unused focusNextPrevChild.
        * kwq/KWQWidget.mm: Ditto.

        * WebCore.pbproj/project.pbxproj: Removed some files, added others.

        * ForwardingHeaders/kcompletionbox.h: Emptied out, no KWQKCompletionBox.h any more.
        * ForwardingHeaders/kiconloader.h: Emptied out, no KWQKIconLoader.h any more.
        * ForwardingHeaders/kmimetype.h: Emptied out, no KWQKMimeType.h any more.
        * ForwardingHeaders/ksimpleconfig.h: Emptied out, no KWQKSimpleConfig.h any more.
        * ForwardingHeaders/qfontinfo.h: Emptied out, no KWQFontInfo.h any more.
        * ForwardingHeaders/qtooltip.h: Replaced with define of QT_NO_TOOLTIP, no
        KWQToolTip.h any more.

        * kwq/KWQCompletion.h: Removed.
        * kwq/KWQCompletion.mm: Removed.
        * kwq/KWQFontInfo.h: Removed.
        * kwq/KWQFontInfo.mm: Removed.
        * kwq/KWQKCompletionBox.h: Removed.
        * kwq/KWQKIconLoader.h: Removed.
        * kwq/KWQKIconLoader.mm: Removed.
        * kwq/KWQKMimeType.h: Removed.
        * kwq/KWQKMimeType.mm: Removed.
        * kwq/KWQKSimpleConfig.h: Removed.
        * kwq/KWQKSimpleConfig.mm: Removed.
        * kwq/KWQToolTip.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bf252036
2004-05-22 Darin Adler <darin@apple.com>
Reviewed by Ken.
- went through things marked "unimplemented" or "not implemented" and removed
or implemented as many as possible
* kwq/DOM.mm: (-[DOMNode dispatchEvent:]): Implemented.
Also moved DOMAbstractView and DOMDocumentView into DOMViews.mm.
* kwq/DOM-CSS.mm: (-[DOMDocument getComputedStyle::]): Implemented.
* kwq/DOMEventsInternal.h: Added.
* kwq/DOMEvents.mm:
(-[DOMEvent type]): Implemented.
(-[DOMEvent target]): Implemented.
(-[DOMEvent currentTarget]): Implemented.
(-[DOMEvent eventPhase]): Implemented.
(-[DOMEvent bubbles]): Implemented.
(-[DOMEvent cancelable]): Implemented.
(-[DOMEvent timeStamp]): Implemented.
(-[DOMEvent stopPropagation]): Implemented.
(-[DOMEvent preventDefault]): Implemented.
(-[DOMEvent initEvent:::]): Implemented.
(-[DOMEvent _eventImpl]): Added.
(-[DOMEvent _initWithEventImpl:]): Added.
(+[DOMEvent _eventWithImpl:]): Added.
(-[DOMMouseEvent _mouseEventImpl]): Added.
(-[DOMMouseEvent screenX]): Implemented.
(-[DOMMouseEvent screenY]): Implemented.
(-[DOMMouseEvent clientX]): Implemented.
(-[DOMMouseEvent clientY]): Implemented.
(-[DOMMouseEvent ctrlKey]): Implemented.
(-[DOMMouseEvent shiftKey]): Implemented.
(-[DOMMouseEvent altKey]): Implemented.
(-[DOMMouseEvent metaKey]): Implemented.
(-[DOMMouseEvent button]): Implemented.
(-[DOMMouseEvent relatedTarget]): Implemented.
(-[DOMMouseEvent initMouseEvent:::::::::::::::]): Implemented.
(-[DOMMutationEvent _mutationEventImpl]): Added.
(-[DOMMutationEvent relatedNode]): Implemented.
(-[DOMMutationEvent prevValue]): Implemented.
(-[DOMMutationEvent newValue]): Implemented.
(-[DOMMutationEvent attrName]): Implemented.
(-[DOMMutationEvent attrChange]): Implemented.
(-[DOMMutationEvent initMutationEvent::::::::]):
(-[DOMUIEvent _UIEventImpl]): Added.
(-[DOMUIEvent view]): Implemented.
(-[DOMUIEvent detail]): Implemented.
(-[DOMUIEvent initUIEvent:::::]): Implemented.
(-[DOMDocument createEvent:]): Implemented.
* kwq/DOMHTMLInternal.h: Added.
* kwq/DOMHTML.mm:
(+[DOMHTMLOptionsCollection _optionsCollectionWithImpl:]): Added.
(-[DOMHTMLOptionsCollection length]): Implemented.
(-[DOMHTMLOptionsCollection setLength:]): Implemented.
(-[DOMHTMLOptionsCollection item:]): Implemented.
(-[DOMHTMLOptionsCollection namedItem:]): Implemented.
(-[DOMHTMLSelectElement options]): Implemented.
* kwq/DOMViews.h: Changed DOMDocumentView to be a category on DOMDocument
rather than a separate class.
* kwq/DOMViewsInternal.h: Added.
* kwq/DOMViews.mm: Added.
(-[DOMAbstractView document]): Implemnted.
(-[DOMAbstractView _abstractViewImpl]): Added.
(-[DOMAbstractView _initWithAbstractViewImpl:]): Added.
(+[DOMAbstractView _abstractViewWithImpl:]): Added.
(-[DOMDocument defaultView]): Implemented.
* khtml/dom/dom2_views.h: Made AbstractView constructor public to allow creation in
the bindings. Would not be necessary if the impl classes were used consistently.
* khtml/html/html_formimpl.h: Added options() function to HTMLSelectElementImpl.
Added HTMLOptionsCollectionImpl class.
* khtml/html/html_formimpl.cpp:
(HTMLSelectElementImpl::~HTMLSelectElementImpl): Added code to detach and deref the
options collection.
(HTMLSelectElementImpl::options): Create an options collection if needed.
(HTMLOptionsCollectionImpl::length): Added. Not yet implemented.
(HTMLOptionsCollectionImpl::setLength): Ditto.
(HTMLOptionsCollectionImpl::item): Ditto.
(HTMLOptionsCollectionImpl::namedItem): Ditto.
* khtml/khtmlview.h: Move unused focusNextPrevChild virtual function inside !APPLE_CHANGES.
* khtml/khtmlview.cpp: Put the tp, paintBuffer, and formCompletions fields entirely
inside !APPLE_CHANGES. Also made QT_NO_TOOLTIP entirely disable the tooltip field.
Also put focusNextPrevChild and formCompletionItems functions inside !APPLE_CHANGES.
* khtml/rendering/render_text.h: Removed unused isFixedWidthFont member function.
* khtml/rendering/render_text.cpp: Ditto.
* kwq/KWQCursor.h: Removed unused pos member function.
* kwq/KWQCursor.mm: Ditto.
* kwq/KWQFontMetrics.h: Removed unused rightBearing and leftBearing member functions.
* kwq/KWQFontMetrics.mm: Ditto.
* kwq/KWQKComboBox.h: Removed KCompletionBase as a base class.
* kwq/KWQKConfigBase.h: Removed unused readBoolEntry, writeEntry, and readListEntry
member functions.
* kwq/KWQKConfigBase.mm: Ditto.
(KConfig::readEntry): Improved "not implemented" message to indicate which key is uinimplemented.
(KConfig::readNumEntry): Ditto.
(KConfig::readUnsignedNumEntry): Ditto.
* kwq/KWQKLineEdit.h: Removed everything, since all the KLineEdit stuff was unused.
Changed KLineEdit to just be a typedef for QLineEdit.
* kwq/KWQSlot.mm: Removed slotAutoScroll.
(KWQSlot::KWQSlot): And from here.
(KWQSlot::call): And from here.
* kwq/KWQTextStream.h: Removed unused QTextOStream and QTextIStream.
* kwq/KWQTextStream.mm: Removed unused QTextIStream function. Also made buffer sizes larger
so we don't have any problems on 64-bit systems. 10 bytes might not be long enough to sprintf an
integer or a long or a pointer, but 100 bytes surely will.
* kwq/KWQWidget.h: Removed unused focusNextPrevChild.
* kwq/KWQWidget.mm: Ditto.
* WebCore.pbproj/project.pbxproj: Removed some files, added others.
* ForwardingHeaders/kcompletionbox.h: Emptied out, no KWQKCompletionBox.h any more.
* ForwardingHeaders/kiconloader.h: Emptied out, no KWQKIconLoader.h any more.
* ForwardingHeaders/kmimetype.h: Emptied out, no KWQKMimeType.h any more.
* ForwardingHeaders/ksimpleconfig.h: Emptied out, no KWQKSimpleConfig.h any more.
* ForwardingHeaders/qfontinfo.h: Emptied out, no KWQFontInfo.h any more.
* ForwardingHeaders/qtooltip.h: Replaced with define of QT_NO_TOOLTIP, no
KWQToolTip.h any more.
* kwq/KWQCompletion.h: Removed.
* kwq/KWQCompletion.mm: Removed.
* kwq/KWQFontInfo.h: Removed.
* kwq/KWQFontInfo.mm: Removed.
* kwq/KWQKCompletionBox.h: Removed.
* kwq/KWQKIconLoader.h: Removed.
* kwq/KWQKIconLoader.mm: Removed.
* kwq/KWQKMimeType.h: Removed.
* kwq/KWQKMimeType.mm: Removed.
* kwq/KWQKSimpleConfig.h: Removed.
* kwq/KWQKSimpleConfig.mm: Removed.
* kwq/KWQToolTip.h: Removed.
2004-05-21 Darin Adler <darin@apple.com>
Reviewed by Maciej.
......@@ -193,8 +338,8 @@
Provide the methods to glue the WebView's editing delegate so that these methods work:
<rdar://problem/3655316>: "Editing:-webViewShouldBeginEditing:inDOMRange:methodunimplemented(WebKiteditingAPI)"
<rdar://problem/3655317>: "Editing:-webViewShouldEndEditing:inDOMRange:methodunimplemented(WebKiteditingAPI)"
<rdar://problem/3655316>: "Editing: -webViewShouldBeginEditing:inDOMRange: method unimplemented (WebKit editing API)"
<rdar://problem/3655317>: "Editing: -webViewShouldEndEditing:inDOMRange: method unimplemented (WebKit editing API)"
While I was in the neighborhood and working on understanding focus shifts, I fixed this bug as well:
......
#include "KWQToolTip.h"
#define QT_NO_TOOLTIP
This diff is collapsed.
......@@ -2,6 +2,7 @@
* This file is part of the DOM implementation for KDE.
*
* (C) 2001 Peter Kelly (pmk@post.com)
* Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -76,14 +77,14 @@ public:
* @internal
* not part of the DOM
*/
AbstractView(AbstractViewImpl *i);
AbstractViewImpl *handle() const;
bool isNull() const;
protected:
AbstractView(AbstractViewImpl *i);
AbstractViewImpl *impl;
};
} //namespace
}; //namespace
#endif
......@@ -2046,6 +2046,10 @@ HTMLSelectElementImpl::HTMLSelectElementImpl(DocumentPtr *doc, HTMLFormElementIm
HTMLSelectElementImpl::~HTMLSelectElementImpl()
{
if (getDocument()) getDocument()->deregisterMaintainsState(this);
if (m_options) {
m_options->detach();
m_options->deref();
}
}
NodeImpl::Id HTMLSelectElementImpl::id() const
......@@ -2375,6 +2379,15 @@ int HTMLSelectElementImpl::listToOptionIndex(int listIndex) const
return optionIndex;
}
HTMLOptionsCollectionImpl *HTMLSelectElementImpl::options()
{
if (!m_options) {
m_options = new HTMLOptionsCollectionImpl(this);
m_options->ref();
}
return m_options;
}
void HTMLSelectElementImpl::recalcListItems()
{
NodeImpl* current = firstChild();
......@@ -2972,10 +2985,6 @@ HTMLIsIndexElementImpl::HTMLIsIndexElementImpl(DocumentPtr *doc, HTMLFormElement
setName("isindex");
}
HTMLIsIndexElementImpl::~HTMLIsIndexElementImpl()
{
}
NodeImpl::Id HTMLIsIndexElementImpl::id() const
{
return ID_ISINDEX;
......@@ -2996,3 +3005,25 @@ void HTMLIsIndexElementImpl::parseHTMLAttribute(HTMLAttributeImpl* attr)
// -------------------------------------------------------------------------
unsigned long HTMLOptionsCollectionImpl::length() const
{
// Not yet implemented.
return 0;
}
void HTMLOptionsCollectionImpl::setLength(unsigned long length)
{
// Not yet implemented.
}
NodeImpl *HTMLOptionsCollectionImpl::item(unsigned long index) const
{
// Not yet implemented.
return 0;
}
NodeImpl *HTMLOptionsCollectionImpl::namedItem(const DOMString &name) const
{
// Not yet implemented.
return 0;
}
......@@ -4,7 +4,7 @@
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2003 Apple Computer, Inc.
* Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -58,6 +58,7 @@ class DOMString;
class HTMLGenericFormElementImpl;
class HTMLOptionElementImpl;
class HTMLImageLoader;
class HTMLOptionsCollectionImpl;
// -------------------------------------------------------------------------
......@@ -445,6 +446,8 @@ public:
DOMString value();
void setValue(DOMStringImpl* value);
HTMLOptionsCollectionImpl *options();
virtual bool maintainsState() { return true; }
virtual QString state();
......@@ -489,9 +492,10 @@ private:
protected:
mutable QMemArray<HTMLGenericFormElementImpl*> m_listItems;
HTMLOptionsCollectionImpl *m_options;
short m_minwidth;
short m_size : 15;
bool m_multiple : 1;
short m_size;
bool m_multiple;
bool m_recalcListItems;
};
......@@ -639,7 +643,6 @@ class HTMLIsIndexElementImpl : public HTMLInputElementImpl
{
public:
HTMLIsIndexElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f = 0);
~HTMLIsIndexElementImpl();
virtual Id id() const;
virtual void parseHTMLAttribute(HTMLAttributeImpl *attr);
......@@ -648,7 +651,24 @@ protected:
DOMString m_prompt;
};
// -------------------------------------------------------------------------
class HTMLOptionsCollectionImpl : public khtml::Shared<HTMLOptionsCollectionImpl>
{
public:
HTMLOptionsCollectionImpl(HTMLSelectElementImpl *impl) : m_select(impl) { }
unsigned long length() const;
void setLength(unsigned long);
NodeImpl *item(unsigned long index) const;
NodeImpl *namedItem(const DOMString &name) const;
void detach() { m_select = 0; }
private:
HTMLSelectElementImpl *m_select;
};
}; //namespace
} //namespace
#endif
......@@ -4819,6 +4819,7 @@ void KHTMLPart::stopAutoScroll()
#endif
}
#if !APPLE_CHANGES
void KHTMLPart::slotAutoScroll()
{
......@@ -4828,6 +4829,8 @@ void KHTMLPart::slotAutoScroll()
stopAutoScroll(); // Safety
}
#endif
void KHTMLPart::selectAll()
{
if(!d->m_doc) return;
......
......@@ -106,13 +106,17 @@ public:
repaintRects = 0;
underMouse = 0;
reset();
#if !APPLE_CHANGES
tp=0;
paintBuffer=0;
formCompletions=0;
#endif
layoutTimerId = 0;
allDataReceivedWhenTimerSet = false;
mousePressed = false;
#ifndef QT_NO_TOOLTIP
tooltip = 0;
#endif
doFullRepaint = true;
isTransparent = false;
#if APPLE_CHANGES
......@@ -125,13 +129,17 @@ public:
}
~KHTMLViewPrivate()
{
#if !APPLE_CHANGES
delete formCompletions;
delete tp; tp = 0;
delete paintBuffer; paintBuffer =0;
#endif
if (underMouse)
underMouse->deref();
#ifndef QT_NO_TOOLTIP
delete tooltip;
#endif
delete repaintRects;
}
void reset()
......@@ -177,8 +185,10 @@ public:
repaintRects->clear();
}
#if !APPLE_CHANGES
QPainter *tp;
QPixmap *paintBuffer;
#endif
NodeImpl *underMouse;
// the node that was selected when enter was pressed
......@@ -199,7 +209,9 @@ public:
bool ignoreWheelEvents;
int borderX, borderY;
#if !APPLE_CHANGES
KSimpleConfig *formCompletions;
#endif
int clickX, clickY, clickCount;
bool isDoubleClick;
......@@ -219,7 +231,9 @@ public:
#endif
bool mousePressed;
bool isTransparent;
#ifndef QT_NO_TOOLTIP
KHTMLToolTip *tooltip;
#endif
// Used by objects during layout to communicate repaints that need to take place only
// after all layout has been completed.
......@@ -1140,6 +1154,8 @@ void KHTMLView::contentsContextMenuEvent ( QContextMenuEvent *_ce )
#endif
}
#if !APPLE_CHANGES
bool KHTMLView::focusNextPrevChild( bool next )
{
// Now try to find the next child
......@@ -1173,6 +1189,8 @@ void KHTMLView::doAutoScroll()
}
}
#endif
DOM::NodeImpl *KHTMLView::nodeUnderMouse() const
{
return d->underMouse;
......@@ -1580,6 +1598,8 @@ void KHTMLView::restoreScrollBar ( )
#endif
}
#if !APPLE_CHANGES
QStringList KHTMLView::formCompletionItems(const QString &name) const
{
if (!m_part->settings()->isFormCompletionEnabled())
......@@ -1616,6 +1636,8 @@ void KHTMLView::addFormCompletionItem(const QString &name, const QString &value)
d->formCompletions->writeEntry(name, items);
}
#endif
bool KHTMLView::dispatchMouseEvent(int eventId, DOM::NodeImpl *targetNode, bool cancelable,
int detail,QMouseEvent *_mouse, bool setUnder,
int mouseEventType)
......
......@@ -178,8 +178,8 @@ public:
virtual void resizeEvent ( QResizeEvent * event );
virtual void showEvent ( QShowEvent * );
virtual void hideEvent ( QHideEvent *);
virtual bool focusNextPrevChild( bool next );
#if !APPLE_CHANGES
virtual bool focusNextPrevChild( bool next );
virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );
virtual void drawContents( QPainter* );
#endif
......
......@@ -3,7 +3,7 @@
*
* (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2003 Apple Computer, Inc.
* Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -1405,11 +1405,6 @@ QRect RenderText::getAbsoluteRepaintRect()
return cb->getAbsoluteRepaintRect();
}
bool RenderText::isFixedWidthFont() const
{
return QFontInfo(style()->font()).fixedPitch();
}
short RenderText::verticalPositionHint( bool firstLine ) const
{
return parent()->verticalPositionHint( firstLine );
......
......@@ -3,7 +3,7 @@
*
* (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2003 Apple Computer, Inc.
* Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -192,8 +192,6 @@ public:
virtual const QFont &font();
virtual short verticalPositionHint( bool firstLine ) const;
bool isFixedWidthFont() const;
void setText(DOM::DOMStringImpl *text, bool force=false);
void setTextWithOffset(DOM::DOMStringImpl *text, uint offset, uint len, bool force=false);
......
......@@ -27,19 +27,21 @@
#include <objc/objc-class.h>
#import <css/css_base.h>
#import <css/css_ruleimpl.h>
#import <css/css_stylesheetimpl.h>
#import <css/css_valueimpl.h>
#import <dom/css_value.h>
#import <dom/dom_string.h>
#import <qcolor.h>
#import <shared.h>
#import <xml/dom_stringimpl.h>
#import "css_base.h"
#import "css_ruleimpl.h"
#import "css_stylesheetimpl.h"
#import "css_valueimpl.h"
#import "css_value.h"
#import "dom_string.h"
#import "KWQColor.h"
#import "shared.h"
#import "dom_stringimpl.h"
#import "dom2_viewsimpl.h"
#import "DOMInternal.h"
#import "KWQAssertions.h"
using DOM::AbstractViewImpl;
using DOM::CounterImpl;
using DOM::CSSCharsetRuleImpl;
using DOM::CSSFontFaceRuleImpl;
......@@ -2440,8 +2442,8 @@ void removeWrapperForRGB(QRgb value)
- (DOMCSSStyleDeclaration *)getComputedStyle:(DOMElement *)elt :(NSString *)pseudoElt
{
ERROR("unimplemented");
return nil;
return [DOMCSSStyleDeclaration _styleDeclarationWithImpl:
AbstractViewImpl([self _documentImpl]).getComputedStyle([elt _elementImpl], DOMString(pseudoElt).implementation())];
}
@end
......@@ -49,6 +49,7 @@
#import <JavaScriptCore/WebScriptObjectPrivate.h>
#import "DOMEventsInternal.h"
#import "DOMHTML.h"
#import "DOMInternal.h"
#import "KWQAssertions.h"
......@@ -358,8 +359,10 @@ inline Document DocumentImpl::createInstance(DocumentImpl *impl)
- (BOOL)dispatchEvent:(DOMEvent *)event
{
ERROR("unimplemented");
return NO;
int exceptionCode = 0;
BOOL result = [self _nodeImpl]->dispatchEvent([event _eventImpl], exceptionCode);
raiseOnDOMError(exceptionCode);
return result;
}
@end
......@@ -1868,26 +1871,6 @@ inline Document DocumentImpl::createInstance(DocumentImpl *impl)
//------------------------------------------------------------------------------------------
@implementation DOMAbstractView
- (DOMDocumentView *)document
{
ERROR("unimplemented");
return nil;
}
@end
@implementation DOMDocumentView
- (DOMAbstractView *)defaultView
{
ERROR("unimplemented");
return nil;
}
@end
//------------------------------------------------------------------------------------------
@implementation DOMNodeFilter
......
......@@ -25,194 +25,247 @@
#import "DOMEvents.h"
#import "DOMEventsInternal.h"
#import "DOMViewsInternal.h"
#import "DOMInternal.h"
#import "KWQAssertions.h"
#import "dom_docimpl.h"
#import "dom2_eventsimpl.h"
#import "dom2_views.h"
#import "dom2_viewsimpl.h"
using DOM::EventImpl;
using DOM::MouseEventImpl;
using DOM::MutationEventImpl;
using DOM::UIEventImpl;
ALLOW_DOM_CAST(EventImpl)
@implementation DOMEvent
- (NSString *)type
{
ERROR("unimplemented");
return nil;
return [self _eventImpl]->type();
}
- (id <DOMEventTarget>)target
{
ERROR("unimplemented");
return nil;
return [DOMNode _nodeWithImpl:[self _eventImpl]->target()];
}
- (id <DOMEventTarget>)currentTarget
{
ERROR("unimplemented");
return nil;
return [DOMNode _nodeWithImpl:[self _eventImpl]->currentTarget()];
}
- (unsigned short)eventPhase
{
ERROR("unimplemented");
return 0;
return [self _eventImpl]->eventPhase();
}
- (BOOL)bubbles
{