[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:37:58 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ff7f36b51fd8303952caeba3306e79348308f7e3
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 11 01:43:45 2002 +0000
* Tests/html/mousetest.html: Added.
Fixed broken DOM handling of click count. DOM click
events can be tested with Labyrinth/Test/html/mousetest.html.
Preparation work for double and triple click selection.
* khtml/khtml_events.cpp:
* khtml/khtml_events.h:
* khtml/khtml_part.cpp:
(KHTMLPart::khtmlMouseTripleClickEvent):
* khtml/khtml_part.h:
* khtml/khtmlview.cpp:
(KHTMLView::viewportMousePressEvent):
(KHTMLView::viewportMouseTripleClickEvent):
(KHTMLView::viewportMouseDoubleClickEvent):
(KHTMLView::viewportMouseReleaseEvent):
* khtml/khtmlview.h:
* kwq/KWQEvent.mm:
(QMouseEvent::QMouseEvent):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge mouseUp:]):
(-[WebCoreBridge mouseDown:]):
* kwq/qt/qevent.h:
Renamed method.
* Preferences.subproj/AppearancePreferences.m:
(-[AppearancePreferences toggleDisplayImages:]):
(-[AppearancePreferences initializeFromDefaults]):
Renamed method.
* WebView.subproj/WebPreferences.h:
* WebView.subproj/WebPreferences.m:
(-[WebPreferences _updateWebCoreSettings]):
(-[WebPreferences setWillLoadImagesAutomatically:]):
(-[WebPreferences willLoadImagesAutomatically]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 01cc2ca..2838e39 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-09-10 Richard Williamson (Local) <rjw at apple.com>
+
+ Fixed broken DOM handling of click count. DOM click
+ events can be tested with Labyrinth/Test/html/mousetest.html.
+ Preparation work for double and triple click selection.
+
+ * khtml/khtml_events.cpp:
+ * khtml/khtml_events.h:
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::khtmlMouseTripleClickEvent):
+ * khtml/khtml_part.h:
+ * khtml/khtmlview.cpp:
+ (KHTMLView::viewportMousePressEvent):
+ (KHTMLView::viewportMouseTripleClickEvent):
+ (KHTMLView::viewportMouseDoubleClickEvent):
+ (KHTMLView::viewportMouseReleaseEvent):
+ * khtml/khtmlview.h:
+ * kwq/KWQEvent.mm:
+ (QMouseEvent::QMouseEvent):
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge mouseUp:]):
+ (-[WebCoreBridge mouseDown:]):
+ * kwq/qt/qevent.h:
+
2002-09-10 David Hyatt <hyatt at apple.com>
Fix FOUC to behave correctly. I was smoking crack when I
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 01cc2ca..2838e39 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2002-09-10 Richard Williamson (Local) <rjw at apple.com>
+
+ Fixed broken DOM handling of click count. DOM click
+ events can be tested with Labyrinth/Test/html/mousetest.html.
+ Preparation work for double and triple click selection.
+
+ * khtml/khtml_events.cpp:
+ * khtml/khtml_events.h:
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::khtmlMouseTripleClickEvent):
+ * khtml/khtml_part.h:
+ * khtml/khtmlview.cpp:
+ (KHTMLView::viewportMousePressEvent):
+ (KHTMLView::viewportMouseTripleClickEvent):
+ (KHTMLView::viewportMouseDoubleClickEvent):
+ (KHTMLView::viewportMouseReleaseEvent):
+ * khtml/khtmlview.h:
+ * kwq/KWQEvent.mm:
+ (QMouseEvent::QMouseEvent):
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge mouseUp:]):
+ (-[WebCoreBridge mouseDown:]):
+ * kwq/qt/qevent.h:
+
2002-09-10 David Hyatt <hyatt at apple.com>
Fix FOUC to behave correctly. I was smoking crack when I
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 01cc2ca..2838e39 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2002-09-10 Richard Williamson (Local) <rjw at apple.com>
+
+ Fixed broken DOM handling of click count. DOM click
+ events can be tested with Labyrinth/Test/html/mousetest.html.
+ Preparation work for double and triple click selection.
+
+ * khtml/khtml_events.cpp:
+ * khtml/khtml_events.h:
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::khtmlMouseTripleClickEvent):
+ * khtml/khtml_part.h:
+ * khtml/khtmlview.cpp:
+ (KHTMLView::viewportMousePressEvent):
+ (KHTMLView::viewportMouseTripleClickEvent):
+ (KHTMLView::viewportMouseDoubleClickEvent):
+ (KHTMLView::viewportMouseReleaseEvent):
+ * khtml/khtmlview.h:
+ * kwq/KWQEvent.mm:
+ (QMouseEvent::QMouseEvent):
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge mouseUp:]):
+ (-[WebCoreBridge mouseDown:]):
+ * kwq/qt/qevent.h:
+
2002-09-10 David Hyatt <hyatt at apple.com>
Fix FOUC to behave correctly. I was smoking crack when I
diff --git a/WebCore/khtml/khtml_events.cpp b/WebCore/khtml/khtml_events.cpp
index 9eede6b..ca50f72 100644
--- a/WebCore/khtml/khtml_events.cpp
+++ b/WebCore/khtml/khtml_events.cpp
@@ -60,6 +60,10 @@ const char *khtml::MousePressEvent::s_strMousePressEvent = "khtml/Events/MousePr
const char *khtml::MouseDoubleClickEvent::s_strMouseDoubleClickEvent = "khtml/Events/MouseDoubleClickEvent";
+#ifdef APPLE_CHANGES
+const char *khtml::MouseTripleClickEvent::s_strMouseTripleClickEvent = "khtml/Events/MouseTripleClickEvent";
+#endif
+
const char *khtml::MouseMoveEvent::s_strMouseMoveEvent = "khtml/Events/MouseMoveEvent";
const char *khtml::MouseReleaseEvent::s_strMouseReleaseEvent = "khtml/Events/MouseReleaseEvent";
diff --git a/WebCore/khtml/khtml_events.h b/WebCore/khtml/khtml_events.h
index bc99ccd..e552bde 100644
--- a/WebCore/khtml/khtml_events.h
+++ b/WebCore/khtml/khtml_events.h
@@ -92,6 +92,22 @@ private:
static const char *s_strMouseDoubleClickEvent;
};
+class MouseTripleClickEvent : public MouseEvent
+{
+public:
+ MouseTripleClickEvent( QMouseEvent *mouseEvent, int x, int y,
+ const DOM::DOMString &url, const DOM::DOMString& target,
+ const DOM::Node &innerNode)
+ : MouseEvent( s_strMouseTripleClickEvent, mouseEvent, x, y, url, target, innerNode )
+ {}
+
+ static bool test( const QEvent *event )
+ { return KParts::Event::test( event, s_strMouseTripleClickEvent ); }
+
+private:
+ static const char *s_strMouseTripleClickEvent;
+};
+
class MouseMoveEvent : public MouseEvent
{
public:
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 6589d6b..a112dbc 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -3974,6 +3974,12 @@ void KHTMLPart::khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent * )
{
}
+#ifdef APPLE_CHANGES
+void KHTMLPart::khtmlMouseTripleClickEvent( khtml::MouseTripleClickEvent * )
+{
+}
+#endif
+
void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
{
QMouseEvent *_mouse = event->qmouseEvent();
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index 27ba140..4dd5f9f 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -73,6 +73,7 @@ namespace khtml
class MouseEvent;
class MousePressEvent;
class MouseDoubleClickEvent;
+ class MouseTripleClickEvent;
class MouseMoveEvent;
class MouseReleaseEvent;
class DrawContentsEvent;
@@ -766,6 +767,11 @@ protected:
* Eventhandler for the khtml::MouseDoubleClickEvent.
*/
virtual void khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent * );
+
+#ifdef APPLE_CHANGES
+ virtual void khtmlMouseTripleClickEvent( khtml::MouseTripleClickEvent * );
+#endif
+
/**
* Eventhandler for the khtml::MouseDoubleMoveEvent.
*/
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index e8b993c..f766908 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -443,6 +443,7 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
DOM::NodeImpl::MouseEvent mev( _mouse->stateAfter(), DOM::NodeImpl::MousePress );
m_part->xmlDocImpl()->prepareMouseEvent( false, xm, ym, &mev );
+#ifndef APPLE_CHANGES
if (d->clickCount > 0 &&
QPoint(d->clickX-xm,d->clickY-ym).manhattanLength() <= QApplication::startDragDistance())
d->clickCount++;
@@ -451,6 +452,9 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
d->clickX = xm;
d->clickY = ym;
}
+#else
+ d->clickCount = _mouse->clickCount();
+#endif
bool swallowEvent = dispatchMouseEvent(EventImpl::MOUSEDOWN_EVENT,mev.innerNode.handle(),true,
d->clickCount,_mouse,true,DOM::NodeImpl::MousePress);
@@ -465,6 +469,10 @@ void KHTMLView::viewportMousePressEvent( QMouseEvent *_mouse )
}
}
+void KHTMLView::viewportMouseTripleClickEvent( QMouseEvent *_mouse )
+{
+}
+
void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
{
if(!m_part->xmlDocImpl()) return;
@@ -479,6 +487,7 @@ void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
DOM::NodeImpl::MouseEvent mev( _mouse->stateAfter(), DOM::NodeImpl::MouseDblClick );
m_part->xmlDocImpl()->prepareMouseEvent( false, xm, ym, &mev );
+#ifndef APPLE_CHANGES
// We do the same thing as viewportMousePressEvent() here, since the DOM does not treat
// single and double-click events as separate (only the detail, i.e. number of clicks differs)
// In other words an even detail value for a mouse click event means a double click, and an
@@ -490,6 +499,9 @@ void KHTMLView::viewportMouseDoubleClickEvent( QMouseEvent *_mouse )
d->clickX = xm;
d->clickY = ym;
}
+#else
+ d->clickCount = _mouse->clickCount();
+#endif
bool swallowEvent = dispatchMouseEvent(EventImpl::MOUSEDOWN_EVENT,mev.innerNode.handle(),true,
d->clickCount,_mouse,true,DOM::NodeImpl::MouseDblClick);
@@ -620,8 +632,10 @@ void KHTMLView::viewportMouseReleaseEvent( QMouseEvent * _mouse )
bool swallowEvent = dispatchMouseEvent(EventImpl::MOUSEUP_EVENT,mev.innerNode.handle(),true,
d->clickCount,_mouse,false,DOM::NodeImpl::MouseRelease);
+#ifndef APPLE_CHANGES
if (d->clickCount > 0 &&
QPoint(d->clickX-xm,d->clickY-ym).manhattanLength() <= QApplication::startDragDistance())
+#endif
dispatchMouseEvent(EventImpl::CLICK_EVENT,mev.innerNode.handle(),true,
d->clickCount,_mouse,true,DOM::NodeImpl::MouseRelease);
diff --git a/WebCore/khtml/khtmlview.h b/WebCore/khtml/khtmlview.h
index 6feaaa7..7eff4bf 100644
--- a/WebCore/khtml/khtmlview.h
+++ b/WebCore/khtml/khtmlview.h
@@ -166,6 +166,9 @@ public:
virtual void viewportMousePressEvent( QMouseEvent * );
virtual void focusOutEvent( QFocusEvent * );
virtual void viewportMouseDoubleClickEvent( QMouseEvent * );
+#ifdef APPLE_CHANGES
+ virtual void viewportMouseTripleClickEvent( QMouseEvent * );
+#endif
virtual void viewportMouseMoveEvent(QMouseEvent *);
virtual void viewportMouseReleaseEvent(QMouseEvent *);
#ifndef QT_NO_WHEELEVENT
diff --git a/WebCore/kwq/KWQEvent.h b/WebCore/kwq/KWQEvent.h
index c4d09a4..2190d5a 100644
--- a/WebCore/kwq/KWQEvent.h
+++ b/WebCore/kwq/KWQEvent.h
@@ -66,6 +66,7 @@ private:
class QMouseEvent : public QEvent {
public:
QMouseEvent(Type type, const QPoint &pos, int button, int state);
+ QMouseEvent(Type type, const QPoint &pos, int button, int state, int clickCount);
QMouseEvent(Type type, const QPoint &pos, const QPoint &global, int button, int state);
int x() { return _position.x(); }
@@ -76,12 +77,13 @@ public:
ButtonState button() { return _button; }
ButtonState state() { return _state; }
ButtonState stateAfter();
+ int clickCount() { return _clickCount; }
private:
QPoint _position;
ButtonState _button;
ButtonState _state;
-
+ int _clickCount;
};
class QTimerEvent : public QEvent {
diff --git a/WebCore/kwq/KWQEvent.mm b/WebCore/kwq/KWQEvent.mm
index dbbd773..9683041 100644
--- a/WebCore/kwq/KWQEvent.mm
+++ b/WebCore/kwq/KWQEvent.mm
@@ -36,6 +36,11 @@ QMouseEvent::QMouseEvent( Type t, const QPoint &pos, int b, int s )
{
}
+QMouseEvent::QMouseEvent( Type t, const QPoint &pos, int b, int s, int cs )
+ : QEvent(t), _position(pos), _button((ButtonState)b), _state((ButtonState)s), _clickCount(cs)
+{
+}
+
QMouseEvent::QMouseEvent(Type t, const QPoint &pos, const QPoint &, int b, int s)
: QEvent(t), _position(pos), _button((ButtonState)b), _state((ButtonState)s)
{
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 29d9900..c9d0998 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -362,8 +362,8 @@ using khtml::RenderPart;
}
state |= [self stateForEvent:event];
- QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
if (part->impl->view()) {
+ QMouseEvent kEvent(QEvent::MouseButtonRelease, QPoint((int)p.x, (int)p.y), button, state, [event clickCount]);
part->impl->view()->viewportMouseReleaseEvent(&kEvent);
}
}
@@ -371,7 +371,7 @@ using khtml::RenderPart;
- (void)mouseDown:(NSEvent *)event
{
NSPoint p = [event locationInWindow];
-
+
int button, state;
switch ([event type]) {
case NSRightMouseUp:
@@ -389,9 +389,15 @@ using khtml::RenderPart;
}
state |= [self stateForEvent:event];
- QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state);
if (part->impl->view()) {
- part->impl->view()->viewportMousePressEvent(&kEvent);
+ if ([event clickCount] % 2 == 0){
+ QMouseEvent kEvent(QEvent::MouseButtonDblClick, QPoint((int)p.x, (int)p.y), button, state, [event clickCount]);
+ part->impl->view()->viewportMouseDoubleClickEvent(&kEvent);
+ }
+ else {
+ QMouseEvent kEvent(QEvent::MouseButtonPress, QPoint((int)p.x, (int)p.y), button, state, [event clickCount]);
+ part->impl->view()->viewportMousePressEvent(&kEvent);
+ }
}
}
diff --git a/WebCore/kwq/qt/qevent.h b/WebCore/kwq/qt/qevent.h
index c4d09a4..2190d5a 100644
--- a/WebCore/kwq/qt/qevent.h
+++ b/WebCore/kwq/qt/qevent.h
@@ -66,6 +66,7 @@ private:
class QMouseEvent : public QEvent {
public:
QMouseEvent(Type type, const QPoint &pos, int button, int state);
+ QMouseEvent(Type type, const QPoint &pos, int button, int state, int clickCount);
QMouseEvent(Type type, const QPoint &pos, const QPoint &global, int button, int state);
int x() { return _position.x(); }
@@ -76,12 +77,13 @@ public:
ButtonState button() { return _button; }
ButtonState state() { return _state; }
ButtonState stateAfter();
+ int clickCount() { return _clickCount; }
private:
QPoint _position;
ButtonState _button;
ButtonState _state;
-
+ int _clickCount;
};
class QTimerEvent : public QEvent {
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3307be5..acae739 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,11 @@
+2002-09-10 Richard Williamson (Local) <rjw at apple.com>
+
+ * WebView.subproj/WebPreferences.h:
+ * WebView.subproj/WebPreferences.m:
+ (-[WebPreferences _updateWebCoreSettings]):
+ (-[WebPreferences setWillLoadImagesAutomatically:]):
+ (-[WebPreferences willLoadImagesAutomatically]):
+
2002-09-10 Chris Blumenberg <cblu at apple.com>
Report download handler errors
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 3307be5..acae739 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-09-10 Richard Williamson (Local) <rjw at apple.com>
+
+ * WebView.subproj/WebPreferences.h:
+ * WebView.subproj/WebPreferences.m:
+ (-[WebPreferences _updateWebCoreSettings]):
+ (-[WebPreferences setWillLoadImagesAutomatically:]):
+ (-[WebPreferences willLoadImagesAutomatically]):
+
2002-09-10 Chris Blumenberg <cblu at apple.com>
Report download handler errors
diff --git a/WebKit/WebView.subproj/WebPreferences.h b/WebKit/WebView.subproj/WebPreferences.h
index 5d447d0..efbf3f4 100644
--- a/WebKit/WebView.subproj/WebPreferences.h
+++ b/WebKit/WebView.subproj/WebPreferences.h
@@ -66,34 +66,15 @@
- (BOOL)allowAnimatedImageLooping;
- (void)setAllowAnimatedImageLooping: (BOOL)flag;
-- (void)setDisplayImages: (BOOL)flag;
-- (BOOL)displayImages;
+- (void)setWillLoadImagesAutomatically: (BOOL)flag;
+- (BOOL)willLoadImagesAutomatically;
@end
#ifdef READY_FOR_PRIMETIME
-
-/*
- =============================================================================
-
- Here is some not-yet-implemented API that we might want to get around to.
- Someday we might have preferences on a per-URL basis.
-*/
-
-+ getPreferencesForURL: (NSURL *);
-
-// Encoding that will be used in none specified on page? or in header?
-+ setEncoding: (NSString *)encoding;
-+ (NSString *)encoding;
-
-// Document refreshes allowed
- setRefreshEnabled: (BOOL)flag;
- (BOOL)refreshEnabled;
-// Should images be loaded.
-- (void)setAutoloadImages: (BOOL)flag;
-- (BOOL)autoloadImages;
-
/*
Specify whether only local references ( stylesheets, images, scripts, subdocuments )
should be loaded. ( default false - everything is loaded, if the more specific
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index 6a6138a..60ff54d 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -64,7 +64,7 @@
[settings setSansSerifFontFamily:[self sansSerifFontFamily]];
[settings setSerifFontFamily:[self serifFontFamily]];
[settings setStandardFontFamily:[self standardFontFamily]];
- [settings setWillLoadImagesAutomatically:[self displayImages]];
+ [settings setWillLoadImagesAutomatically:[self willLoadImagesAutomatically]];
if ([self userStyleSheetEnabled]) {
[settings setUserStyleSheetLocation:[self userStyleSheetLocation]];
@@ -341,13 +341,13 @@
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitAllowAnimatedImageLoopingPreferenceKey];
}
-- (void)setDisplayImages: (BOOL)flag
+- (void)setWillLoadImagesAutomatically: (BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitDisplayImagesKey];
[self _updateWebCoreSettings];
}
-- (BOOL)displayImages
+- (BOOL)willLoadImagesAutomatically
{
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitDisplayImagesKey];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list