[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

sullivan at apple.com sullivan at apple.com
Thu Apr 8 02:22:43 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2158a4930afd43841b9dc3cd78159d4a69b7ebd1
Author: sullivan at apple.com <sullivan at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Mar 15 20:10:22 2010 +0000

    -[WebFrame setAlwaysHideHorizontal/VerticalScroller:] prevents keyboard scrolling
    <https://bugs.webkit.org/show_bug.cgi?id=36125>
    
    Reviewed by Adam Roben.
    
    * WebView/WebDynamicScrollBarsView.h:
    Added instance variables horizontalScrollingAllowedButScrollerHidden and
    verticalScrollingAllowedButScrollerHidden. Renamed instance variables
    hideHorizontal/VerticalScroller to alwaysHideHorizontal/VerticalScroller for clarity.
    Declared methods -horizontalScrollingAllowed and -verticalScrollingAllowed.
    Added comments.
    
    * WebView/WebDynamicScrollBarsView.mm:
    (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]):
    Updated for instance variable renaming.
    (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]):
    Ditto.
    (-[WebDynamicScrollBarsView horizontalScrollingAllowed]):
    New method, returns YES if the scroller is showing or the only reason that the scroller
    is not showing is that setAlwaysHideHorizontalScrolling has been called.
    (-[WebDynamicScrollBarsView verticalScrollingAllowed]):
    New method, returns YES if the scroller is showing or the only reason that the scroller
    is not showing is that setAlwaysHideVerticalScrolling has been called.
    (-[WebDynamicScrollBarsView updateScrollers]):
    Updated for instance variable renamings. Now updates horizontalScrollingAllowedButScrollerHidden
    and verticalScrollingAllowedButScrollerHidden. Now takes the always-hidden state into account
    in the early-return code path, to avoid taking it into account twice in the regular code path.
    
    * WebView/WebFrameView.mm:
    (-[WebFrameView _scrollToBeginningOfDocument]):
    Use _isScrollable instead of _hasScrollBars.
    (-[WebFrameView _scrollToEndOfDocument]):
    Ditto.
    (-[WebFrameView scrollToBeginningOfDocument:]):
    Use _largestScrollableChild instead of _largestChildWithScrollBars.
    (-[WebFrameView scrollToEndOfDocument:]):
    Ditto.
    (-[WebFrameView _pageVertically:]):
    Use _isScrollable and _largestScrollableChild instead of _hasScrollBars
    and _largestChildWithScrollBars.
    (-[WebFrameView _pageHorizontally:]):
    Ditto.
    (-[WebFrameView _scrollLineVertically:]):
    Ditto.
    (-[WebFrameView _scrollLineHorizontally:]):
    Ditto.
    (-[WebFrameView keyDown:]):
    Use _largestScrollableChild instead of _largestChildWithScrollBars.
    (-[WebFrameView _isScrollable]):
    New method, calls -[WebDynamicScrollBarsView horizontalScrollingAllowed] and
    -[WebDynamicScrollBarsView verticalScrollingAllowed]
    (-[WebFrameView _largestScrollableChild]):
    New method, like _largestChildWithScrollBars but uses _isScrollable.
    (-[WebFrameView _hasScrollBars]):
    Added a comment that this is no longer used by Safari, and can thus probably be
    deleted once we no longer want to support it for nightly build compatibility with
    old versions of Safari.
    (-[WebFrameView _largestChildWithScrollBars]):
    Ditto.
    
    * WebView/WebFrameViewPrivate.h:
    Declared -_isScrollable and -_largestScrollableChild. Added comments to
    _hasScrollBars and _largestChildWithScrollBars saying that they are no longer
    used by Safari, and can thus probably be deleted once we no longer want to
    support them for nightly build compatibility with old versions of Safari.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index e651568..e8558cf 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,5 +1,73 @@
 2010-03-15  John Sullivan  <sullivan at apple.com>
 
+        Reviewed by Adam Roben.
+        
+        -[WebFrame setAlwaysHideHorizontal/VerticalScroller:] prevents keyboard scrolling
+        <https://bugs.webkit.org/show_bug.cgi?id=36125>
+
+        * WebView/WebDynamicScrollBarsView.h:
+        Added instance variables horizontalScrollingAllowedButScrollerHidden and
+        verticalScrollingAllowedButScrollerHidden. Renamed instance variables 
+        hideHorizontal/VerticalScroller to alwaysHideHorizontal/VerticalScroller for clarity.
+        Declared methods -horizontalScrollingAllowed and -verticalScrollingAllowed.
+        Added comments.
+        
+        * WebView/WebDynamicScrollBarsView.mm:
+        (-[WebDynamicScrollBarsView setAlwaysHideHorizontalScroller:]):
+        Updated for instance variable renaming.
+        (-[WebDynamicScrollBarsView setAlwaysHideVerticalScroller:]):
+        Ditto.
+        (-[WebDynamicScrollBarsView horizontalScrollingAllowed]):
+        New method, returns YES if the scroller is showing or the only reason that the scroller
+        is not showing is that setAlwaysHideHorizontalScrolling has been called.
+        (-[WebDynamicScrollBarsView verticalScrollingAllowed]):
+        New method, returns YES if the scroller is showing or the only reason that the scroller
+        is not showing is that setAlwaysHideVerticalScrolling has been called.
+        (-[WebDynamicScrollBarsView updateScrollers]):
+        Updated for instance variable renamings. Now updates horizontalScrollingAllowedButScrollerHidden
+        and verticalScrollingAllowedButScrollerHidden. Now takes the always-hidden state into account
+        in the early-return code path, to avoid taking it into account twice in the regular code path.
+        
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView _scrollToBeginningOfDocument]):
+        Use _isScrollable instead of _hasScrollBars.
+        (-[WebFrameView _scrollToEndOfDocument]):
+        Ditto.
+        (-[WebFrameView scrollToBeginningOfDocument:]):
+        Use _largestScrollableChild instead of _largestChildWithScrollBars.
+        (-[WebFrameView scrollToEndOfDocument:]):
+        Ditto.
+        (-[WebFrameView _pageVertically:]):
+        Use _isScrollable and _largestScrollableChild instead of _hasScrollBars
+        and _largestChildWithScrollBars.
+        (-[WebFrameView _pageHorizontally:]):
+        Ditto.
+        (-[WebFrameView _scrollLineVertically:]):
+        Ditto.
+        (-[WebFrameView _scrollLineHorizontally:]):
+        Ditto.
+        (-[WebFrameView keyDown:]):
+        Use _largestScrollableChild instead of _largestChildWithScrollBars.
+        (-[WebFrameView _isScrollable]):
+        New method, calls -[WebDynamicScrollBarsView horizontalScrollingAllowed] and
+        -[WebDynamicScrollBarsView verticalScrollingAllowed]
+        (-[WebFrameView _largestScrollableChild]):
+        New method, like _largestChildWithScrollBars but uses _isScrollable.
+        (-[WebFrameView _hasScrollBars]):
+        Added a comment that this is no longer used by Safari, and can thus probably be
+        deleted once we no longer want to support it for nightly build compatibility with
+        old versions of Safari.
+        (-[WebFrameView _largestChildWithScrollBars]):
+        Ditto.
+        
+        * WebView/WebFrameViewPrivate.h:
+        Declared -_isScrollable and -_largestScrollableChild. Added comments to
+        _hasScrollBars and _largestChildWithScrollBars saying that they are no longer
+        used by Safari, and can thus probably be deleted once we no longer want to 
+        support them for nightly build compatibility with old versions of Safari.
+
+2010-03-15  John Sullivan  <sullivan at apple.com>
+
         Method name and parameter name mistakes from recent SPI addition
         <https://bugs.webkit.org/show_bug.cgi?id=36119>
 
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.h b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
index f674422..7771f49 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.h
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.h
@@ -45,15 +45,26 @@ extern const int WebCoreScrollbarAlwaysOn;
     unsigned inUpdateScrollersLayoutPass;
 
     BOOL allowsScrollersToOverlapContent;
-    BOOL hideHorizontalScroller;
-    BOOL hideVerticalScroller;
+    BOOL alwaysHideHorizontalScroller;
+    BOOL alwaysHideVerticalScroller;
+    BOOL horizontalScrollingAllowedButScrollerHidden;
+    BOOL verticalScrollingAllowedButScrollerHidden;
 }
 
 // This was originally added for Safari's benefit, but Safari has not used it for a long time.
 // Perhaps it can be removed.
 - (void)setAllowsHorizontalScrolling:(BOOL)flag;
 
+// Determines whether the scrollers should be drawn outside of the content (as in normal scroll views)
+// or should overlap the content.
 - (void)setAllowsScrollersToOverlapContent:(BOOL)flag;
+
+// These methods hide the scrollers in a way that does not prevent scrolling.
 - (void)setAlwaysHideHorizontalScroller:(BOOL)flag;
 - (void)setAlwaysHideVerticalScroller:(BOOL)flag;
+
+// These methods return YES if the scrollers are visible, or if the only reason that they are not
+// visible is that they have been suppressed by setAlwaysHideHorizontal/VerticalScroller:.
+- (BOOL)horizontalScrollingAllowed;
+- (BOOL)verticalScrollingAllowed;
 @end
diff --git a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
index bbf8227..b1a8c8d 100644
--- a/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
+++ b/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
@@ -68,22 +68,32 @@ const int WebCoreScrollbarAlwaysOn = ScrollbarAlwaysOn;
 
 - (void)setAlwaysHideHorizontalScroller:(BOOL)shouldBeHidden
 {
-    if (hideHorizontalScroller == shouldBeHidden)
+    if (alwaysHideHorizontalScroller == shouldBeHidden)
         return;
 
-    hideHorizontalScroller = shouldBeHidden;
+    alwaysHideHorizontalScroller = shouldBeHidden;
     [self updateScrollers];
 }
 
 - (void)setAlwaysHideVerticalScroller:(BOOL)shouldBeHidden
 {
-    if (hideVerticalScroller == shouldBeHidden)
+    if (alwaysHideVerticalScroller == shouldBeHidden)
         return;
         
-    hideVerticalScroller = shouldBeHidden;
+    alwaysHideVerticalScroller = shouldBeHidden;
     [self updateScrollers];
 }
 
+- (BOOL)horizontalScrollingAllowed
+{
+    return horizontalScrollingAllowedButScrollerHidden || [self hasHorizontalScroller];
+}
+
+- (BOOL)verticalScrollingAllowed
+{
+    return verticalScrollingAllowedButScrollerHidden || [self hasVerticalScroller];
+}
+
 @end
 
 @implementation WebDynamicScrollBarsView (WebInternal)
@@ -169,11 +179,16 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
         newHasHorizontalScroller = (hScroll == ScrollbarAlwaysOn);
     if (vScroll != ScrollbarAuto)
         newHasVerticalScroller = (vScroll == ScrollbarAlwaysOn);
-        
-    newHasHorizontalScroller &= !hideHorizontalScroller;
-    newHasVerticalScroller &= !hideVerticalScroller;
     
     if (!documentView || suppressLayout || suppressScrollers || (hScroll != ScrollbarAuto && vScroll != ScrollbarAuto)) {
+        horizontalScrollingAllowedButScrollerHidden = newHasHorizontalScroller && alwaysHideHorizontalScroller;
+        if (horizontalScrollingAllowedButScrollerHidden)
+            newHasHorizontalScroller = NO;
+        
+        verticalScrollingAllowedButScrollerHidden = newHasVerticalScroller && alwaysHideVerticalScroller;
+        if (verticalScrollingAllowedButScrollerHidden)
+            newHasVerticalScroller = NO;
+        
         inUpdateScrollers = YES;
         if (hasHorizontalScroller != newHasHorizontalScroller)
             [self setHasHorizontalScroller:newHasHorizontalScroller];
@@ -212,9 +227,14 @@ static const unsigned cMaxUpdateScrollbarsPass = 2;
     if (!newHasVerticalScroller && hasVerticalScroller && hScroll != ScrollbarAlwaysOn)
         newHasHorizontalScroller = NO;
 
-    newHasHorizontalScroller &= !hideHorizontalScroller;
-    newHasVerticalScroller &= !hideVerticalScroller;
-
+    horizontalScrollingAllowedButScrollerHidden = newHasHorizontalScroller && alwaysHideHorizontalScroller;
+    if (horizontalScrollingAllowedButScrollerHidden)
+        newHasHorizontalScroller = NO;
+    
+    verticalScrollingAllowedButScrollerHidden = newHasVerticalScroller && alwaysHideVerticalScroller;
+    if (verticalScrollingAllowedButScrollerHidden)
+        newHasVerticalScroller = NO;
+        
     if (hasHorizontalScroller != newHasHorizontalScroller) {
         inUpdateScrollers = YES;
         [self setHasHorizontalScroller:newHasHorizontalScroller];
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index 422b605..9ded8e1 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -532,7 +532,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 {
     if ([self _scrollOverflowInDirection:ScrollUp granularity:ScrollByDocument])
         return YES;
-    if (![self _hasScrollBars])
+    if (![self _isScrollable])
         return NO;
     NSPoint point = [[[self _scrollView] documentView] frame].origin;
     return [[self _contentView] _scrollTo:&point animate:YES];
@@ -542,7 +542,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 {
     if ([self _scrollOverflowInDirection:ScrollDown granularity:ScrollByDocument])
         return YES;
-    if (![self _hasScrollBars])
+    if (![self _isScrollable])
         return NO;
     NSRect frame = [[[self _scrollView] documentView] frame];
     NSPoint point = NSMakePoint(frame.origin.x, NSMaxY(frame));
@@ -554,7 +554,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     if ([self _scrollToBeginningOfDocument])
         return;
     
-    if (WebFrameView *child = [self _largestChildWithScrollBars]) {
+    if (WebFrameView *child = [self _largestScrollableChild]) {
         if ([child _scrollToBeginningOfDocument])
             return;
     }
@@ -566,7 +566,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     if ([self _scrollToEndOfDocument])
         return;
 
-    if (WebFrameView *child = [self _largestChildWithScrollBars]) {
+    if (WebFrameView *child = [self _largestScrollableChild]) {
         if ([child _scrollToEndOfDocument])
             return;
     }
@@ -619,8 +619,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByPage])
         return YES;
     
-    if (![self _hasScrollBars])
-        return [[self _largestChildWithScrollBars] _pageVertically:up];
+    if (![self _isScrollable])
+        return [[self _largestScrollableChild] _pageVertically:up];
 
     float delta = [self _verticalPageScrollDistance];
     return [self _scrollVerticallyBy:up ? -delta : delta];
@@ -631,8 +631,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByPage])
         return YES;
 
-    if (![self _hasScrollBars])
-        return [[self _largestChildWithScrollBars] _pageHorizontally:left];
+    if (![self _isScrollable])
+        return [[self _largestScrollableChild] _pageHorizontally:left];
     
     float delta = [self _horizontalPageScrollDistance];
     return [self _scrollHorizontallyBy:left ? -delta : delta];
@@ -643,8 +643,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     if ([self _scrollOverflowInDirection:up ? ScrollUp : ScrollDown granularity:ScrollByLine])
         return YES;
 
-    if (![self _hasScrollBars])
-        return [[self _largestChildWithScrollBars] _scrollLineVertically:up];
+    if (![self _isScrollable])
+        return [[self _largestScrollableChild] _scrollLineVertically:up];
     
     float delta = [self _verticalKeyboardScrollDistance];
     return [self _scrollVerticallyBy:up ? -delta : delta];
@@ -655,8 +655,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     if ([self _scrollOverflowInDirection:left ? ScrollLeft : ScrollRight granularity:ScrollByLine])
         return YES;
 
-    if (![self _hasScrollBars])
-        return [[self _largestChildWithScrollBars] _scrollLineHorizontally:left];
+    if (![self _isScrollable])
+        return [[self _largestScrollableChild] _scrollLineHorizontally:left];
 
     float delta = [self _horizontalKeyboardScrollDistance];
     return [self _scrollHorizontallyBy:left ? -delta : delta];
@@ -730,7 +730,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                 // Checking for a control will allow events to percolate 
                 // correctly when the focus is on a form control and we
                 // are in full keyboard access mode.
-                if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) || [self _firstResponderIsFormControl]) {
+                if ((![self allowsScrolling] && ![self _largestScrollableChild]) || [self _firstResponderIsFormControl]) {
                     callSuper = YES;
                     break;
                 }
@@ -742,7 +742,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                 callSuper = NO;
                 break;
             case NSPageUpFunctionKey:
-                if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+                if (![self allowsScrolling] && ![self _largestScrollableChild]) {
                     callSuper = YES;
                     break;
                 }
@@ -750,7 +750,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                 callSuper = NO;
                 break;
             case NSPageDownFunctionKey:
-                if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+                if (![self allowsScrolling] && ![self _largestScrollableChild]) {
                     callSuper = YES;
                     break;
                 }
@@ -758,7 +758,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                 callSuper = NO;
                 break;
             case NSHomeFunctionKey:
-                if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+                if (![self allowsScrolling] && ![self _largestScrollableChild]) {
                     callSuper = YES;
                     break;
                 }
@@ -766,7 +766,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                 callSuper = NO;
                 break;
             case NSEndFunctionKey:
-                if (![self allowsScrolling] && ![self _largestChildWithScrollBars]) {
+                if (![self allowsScrolling] && ![self _largestScrollableChild]) {
                     callSuper = YES;
                     break;
                 }
@@ -779,7 +779,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                     callSuper = YES;
                     break;
                 }
-                if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) ||
+                if ((![self allowsScrolling] && ![self _largestScrollableChild]) ||
                     [[[self window] firstResponder] isKindOfClass:[NSPopUpButton class]]) {
                     // Let arrow keys go through to pop up buttons
                     // <rdar://problem/3455910>: hitting up or down arrows when focus is on a 
@@ -802,7 +802,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                     callSuper = YES;
                     break;
                 }
-                if ((![self allowsScrolling] && ![self _largestChildWithScrollBars]) ||
+                if ((![self allowsScrolling] && ![self _largestScrollableChild]) ||
                     [[[self window] firstResponder] isKindOfClass:[NSPopUpButton class]]) {
                     // Let arrow keys go through to pop up buttons
                     // <rdar://problem/3455910>: hitting up or down arrows when focus is on a 
@@ -834,7 +834,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                     [self _goBack];
                 } else {
                     // Now check scrolling related keys.
-                    if ((![self allowsScrolling] && ![self _largestChildWithScrollBars])) {
+                    if ((![self allowsScrolling] && ![self _largestScrollableChild])) {
                         callSuper = YES;
                         break;
                     }
@@ -862,7 +862,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
                     [self _goForward];
                 } else {
                     // Now check scrolling related keys.
-                    if ((![self allowsScrolling] && ![self _largestChildWithScrollBars])) {
+                    if ((![self allowsScrolling] && ![self _largestScrollableChild])) {
                         callSuper = YES;
                         break;
                     }
@@ -939,14 +939,52 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     return frame.size.height * frame.size.width;
 }
 
+- (BOOL)_isScrollable
+{
+    WebDynamicScrollBarsView *scrollView = [self _scrollView];
+    return [scrollView horizontalScrollingAllowed] || [scrollView verticalScrollingAllowed];
+}
+
+- (WebFrameView *)_largestScrollableChild
+{
+    WebFrameView *largest = nil;
+    NSArray *frameChildren = [[self webFrame] childFrames];
+    
+    unsigned i;
+    for (i=0; i < [frameChildren count]; i++) {
+        WebFrameView *childFrameView = [[frameChildren objectAtIndex:i] frameView];
+        WebFrameView *scrollableFrameView = [childFrameView _isScrollable] ? childFrameView : [childFrameView _largestScrollableChild];
+        if (!scrollableFrameView)
+            continue;
+        
+        // Some ads lurk in child frames of zero width and height, see radar 4406994. These don't count as scrollable.
+        // Maybe someday we'll discover that this minimum area check should be larger, but this covers the known cases.
+        float area = [scrollableFrameView _area];
+        if (area < 1.0)
+            continue;
+        
+        if (!largest || (area > [largest _area])) {
+            largest = scrollableFrameView;
+        }
+    }
+    
+    return largest;
+}
+
 - (BOOL)_hasScrollBars
 {
+    // FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+    // clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed 
+    // once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
     NSScrollView *scrollView = [self _scrollView];
     return [scrollView hasHorizontalScroller] || [scrollView hasVerticalScroller];
 }
 
 - (WebFrameView *)_largestChildWithScrollBars
 {
+    // FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+    // clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed 
+    // once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
     WebFrameView *largest = nil;
     NSArray *frameChildren = [[self webFrame] childFrames];
     
diff --git a/WebKit/mac/WebView/WebFrameViewPrivate.h b/WebKit/mac/WebView/WebFrameViewPrivate.h
index 47c053e..93d36ec 100644
--- a/WebKit/mac/WebView/WebFrameViewPrivate.h
+++ b/WebKit/mac/WebView/WebFrameViewPrivate.h
@@ -30,13 +30,19 @@
 
 @interface WebFrameView (WebPrivate)
 
+// FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+// clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed 
+// once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
 /*!
     @method _largestChildWithScrollBars
     @abstract Of the child WebFrameViews that are displaying scroll bars, determines which has the largest area.
     @result A child WebFrameView that is displaying scroll bars, or nil if none.
-*/
+ */
 - (WebFrameView *)_largestChildWithScrollBars;
 
+// FIXME: This method was used by Safari 4.0.x and older versions, but has not been used by any other WebKit
+// clients to my knowledge, and will not be used by future versions of Safari. It can probably be removed 
+// once we no longer need to keep nightly WebKit builds working with Safari 4.0.x and earlier.
 /*!
     @method _hasScrollBars
     @result YES if at least one scroll bar is currently displayed
@@ -44,6 +50,21 @@
 - (BOOL)_hasScrollBars;
 
 /*!
+    @method _largestScrollableChild
+    @abstract Of the child WebFrameViews that allow scrolling, determines which has the largest area.
+    @result A child WebFrameView that is scrollable, or nil if none.
+ */
+- (WebFrameView *)_largestScrollableChild;
+
+/*!
+    @method _isScrollable
+    @result YES if scrolling is currently possible, whether or not scroll bars are currently showing. This
+    differs from -allowsScrolling in that the latter method only checks whether scrolling has been
+    explicitly disallowed via a call to setAllowsScrolling:NO.
+ */
+- (BOOL)_isScrollable;
+
+/*!
     @method _contentView
     @result The content view (NSClipView) of the WebFrameView's scroll view.
  */

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list