[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
mitz at apple.com
mitz at apple.com
Thu Feb 4 21:21:50 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 27bbd3dd206484b77b246c1a0e75f1c9ba07a61b
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 20 17:45:15 2010 +0000
<rdar://problem/7489504> Clicking on an overflow scrollbar when the window doesn't have
focus only focuses the window; it should start scrolling too
https://bugs.webkit.org/show_bug.cgi?id=33906
Reviewed by Simon Fraser.
* Misc/WebElementDictionary.mm:
(+[WebElementDictionary initializeLookupTable]): Initialize WebElementIsInScrollBarKey.
(-[WebElementDictionary _isInScrollBar]): Added. Returns whether the HitTestResult contains
a scroll bar.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _isScrollBarEvent:]): Added. Returns whether the event point is in a scroll
bar in this view.
(-[WebHTMLView acceptsFirstMouse:]): Accept scroll bar events.
* WebView/WebView.mm: Define WebElementIsInScrollBarKey.
* WebView/WebViewPrivate.h: Declare WebElementIsInScrollBarKey.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 689ec77..d4a1fd3 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,22 @@
+2010-01-20 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7489504> Clicking on an overflow scrollbar when the window doesn't have
+ focus only focuses the window; it should start scrolling too
+ https://bugs.webkit.org/show_bug.cgi?id=33906
+
+ * Misc/WebElementDictionary.mm:
+ (+[WebElementDictionary initializeLookupTable]): Initialize WebElementIsInScrollBarKey.
+ (-[WebElementDictionary _isInScrollBar]): Added. Returns whether the HitTestResult contains
+ a scroll bar.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _isScrollBarEvent:]): Added. Returns whether the event point is in a scroll
+ bar in this view.
+ (-[WebHTMLView acceptsFirstMouse:]): Accept scroll bar events.
+ * WebView/WebView.mm: Define WebElementIsInScrollBarKey.
+ * WebView/WebViewPrivate.h: Declare WebElementIsInScrollBarKey.
+
2010-01-19 Dan Bernstein <mitz at apple.com>
Redo Tiger build fix without making WebTypesInternal.h a private header
diff --git a/WebKit/mac/Misc/WebElementDictionary.mm b/WebKit/mac/Misc/WebElementDictionary.mm
index aa703e0..7779392 100644
--- a/WebKit/mac/Misc/WebElementDictionary.mm
+++ b/WebKit/mac/Misc/WebElementDictionary.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -91,6 +91,7 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
addLookupKey(WebElementLinkLabelKey, @selector(_textContent));
addLookupKey(WebElementLinkIsLiveKey, @selector(_isLiveLink));
addLookupKey(WebElementIsContentEditableKey, @selector(_isContentEditable));
+ addLookupKey(WebElementIsInScrollBarKey, @selector(_isInScrollBar));
}
- (id)initWithHitTestResult:(const HitTestResult&)result
@@ -254,4 +255,9 @@ static NSString* NSStringOrNil(String coreString)
return [NSNumber numberWithBool:_result->isContentEditable()];
}
+- (NSNumber *)_isInScrollBar
+{
+ return [NSNumber numberWithBool:_result->scrollbar() != 0];
+}
+
@end
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 5dc66ee..2a20acd 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* (C) 2006, 2007 Graham Dennis (graham.dennis at gmail.com)
*
* Redistribution and use in source and binary forms, with or without
@@ -3309,6 +3309,12 @@ WEBCORE_COMMAND(yankAndSelect)
return [[[self elementAtPoint:point allowShadowContent:YES] objectForKey:WebElementIsSelectedKey] boolValue];
}
+- (BOOL)_isScrollBarEvent:(NSEvent *)event
+{
+ NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
+ return [[[self elementAtPoint:point allowShadowContent:YES] objectForKey:WebElementIsInScrollBarKey] boolValue];
+}
+
- (BOOL)acceptsFirstMouse:(NSEvent *)event
{
// There's a chance that responding to this event will run a nested event loop, and
@@ -3331,6 +3337,8 @@ WEBCORE_COMMAND(yankAndSelect)
[hitHTMLView _setMouseDownEvent:event];
if ([hitHTMLView _isSelectionEvent:event])
result = coreFrame->eventHandler()->eventMayStartDrag(event);
+ else if ([hitHTMLView _isScrollBarEvent:event])
+ result = true;
[hitHTMLView _setMouseDownEvent:nil];
}
return result;
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index e3d2e27..bcbaaaf 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -377,6 +377,7 @@ NSString *WebElementLinkURLKey = @"WebElementLinkURL";
NSString *WebElementSpellingToolTipKey = @"WebElementSpellingToolTip";
NSString *WebElementTitleKey = @"WebElementTitle";
NSString *WebElementLinkIsLiveKey = @"WebElementLinkIsLive";
+NSString *WebElementIsInScrollBarKey = @"WebElementIsInScrollBar";
NSString *WebElementIsContentEditableKey = @"WebElementIsContentEditableKey";
NSString *WebViewProgressStartedNotification = @"WebProgressStartedNotification";
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index d3e6f62..4d1145e 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -67,6 +67,7 @@ extern NSString *WebElementIsContentEditableKey; // NSNumber indicating whether
// other WebElementDictionary keys
extern NSString *WebElementLinkIsLiveKey; // NSNumber of BOOL indictating whether the link is live or not
+extern NSString *WebElementIsInScrollBarKey;
// One of the subviews of the WebView entered compositing mode.
extern NSString *_WebViewDidStartAcceleratedCompositingNotification;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list