[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:11:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 2a7e4dc4608646e24f8313bb192964d56233bbcc
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 14 17:30:40 2003 +0000
Reviewed by John.
- first half of fix for 3457162 -- selecting text during a page load that blows the text field
away causes a crash
The WebCore part of this fix is to generalize the "defers loading" feature to all mouse clicks,
rather than just doing it for mouse clicks on the combo box.
* kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
Remove code to defer loading.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Put the code here
instead.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5349882..a30e549 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2003-11-14 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - first half of fix for 3457162 -- selecting text during a page load that blows the text field
+ away causes a crash
+
+ The WebCore part of this fix is to generalize the "defers loading" feature to all mouse clicks,
+ rather than just doing it for mouse clicks on the combo box.
+
+ * kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
+ Remove code to defer loading.
+ * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Put the code here
+ instead.
+
2003-11-14 John Sullivan <sullivan at apple.com>
- fixed <rdar://problem/3483585>: Option-tab in a text field inputs
diff --git a/WebCore/kwq/KWQComboBox.mm b/WebCore/kwq/KWQComboBox.mm
index f8c1bfd..cbe0ff9 100644
--- a/WebCore/kwq/KWQComboBox.mm
+++ b/WebCore/kwq/KWQComboBox.mm
@@ -334,30 +334,10 @@ void QComboBox::setWritingDirection(QPainter::TextDirection direction)
- (BOOL)trackMouse:(NSEvent *)event inRect:(NSRect)rect ofView:(NSView *)view untilMouseUp:(BOOL)flag
{
- // We need to "defer loading" and defer timers while we are tracking the menu.
- // That's because we don't want the new page to load while the user is holding the mouse down.
- // Normally, this is not a problem because we use a different run loop mode, but pop-up menus
- // use a Carbon implementation, and it uses the default run loop mode.
- // See bugs 3021018 and 3242460 for some more information.
-
WebCoreBridge *bridge = [KWQKHTMLPart::bridgeForWidget(widget) retain];
- BOOL wasDeferringLoading = [bridge defersLoading];
- if (!wasDeferringLoading) {
- [bridge setDefersLoading:YES];
- }
- BOOL wasDeferringTimers = QObject::defersTimers();
- if (!wasDeferringTimers) {
- QObject::setDefersTimers(true);
- }
BOOL result = [super trackMouse:event inRect:rect ofView:view untilMouseUp:flag];
- if (!wasDeferringTimers) {
- QObject::setDefersTimers(false);
- }
- if (!wasDeferringLoading) {
- [bridge setDefersLoading:NO];
- }
if (result) {
- // Give khtml a chance to fix up its event state, since the popup eats all the
+ // Give KHTML a chance to fix up its event state, since the popup eats all the
// events during tracking. [NSApp currentEvent] is still the original mouseDown
// at this point!
[bridge part]->sendFakeEventsAfterWidgetTracking(event);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 199c5b8..f81b2d6 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1668,11 +1668,30 @@ bool KWQKHTMLPart::passWidgetMouseDownEventToWidget(QWidget* widget)
}
}
+ // We need to "defer loading" and defer timers while we are tracking the mouse.
+ // That's because we don't want the new page to load while the user is holding the mouse down.
+
+ BOOL wasDeferringLoading = [_bridge defersLoading];
+ if (!wasDeferringLoading) {
+ [_bridge setDefersLoading:YES];
+ }
+ BOOL wasDeferringTimers = QObject::defersTimers();
+ if (!wasDeferringTimers) {
+ QObject::setDefersTimers(true);
+ }
+
ASSERT(!_sendingEventToSubview);
_sendingEventToSubview = true;
[view mouseDown:_currentEvent];
_sendingEventToSubview = false;
+ if (!wasDeferringTimers) {
+ QObject::setDefersTimers(false);
+ }
+ if (!wasDeferringLoading) {
+ [_bridge setDefersLoading:NO];
+ }
+
// Remember which view we sent the event to, so we can direct the release event properly.
_mouseDownView = view;
_mouseDownWasInSubframe = false;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list