[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:58:33 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fd69509ec1333d5eb5d5be8d6169340cbaa487ed
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 30 18:46:27 2003 +0000
Improvements to scrolling and layout. Also fixing 3264346, body overflow should
apply to document's scrollbars.
Reviewed by darin
* WebView.subproj/WebDynamicScrollBarsView.h:
* WebView.subproj/WebDynamicScrollBarsView.m:
(-[WebDynamicScrollBarsView initWithFrame:]):
(-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
(-[WebDynamicScrollBarsView updateScrollers]):
(-[WebDynamicScrollBarsView reflectScrolledClipView:]):
(-[WebDynamicScrollBarsView setAllowsScrolling:]):
(-[WebDynamicScrollBarsView allowsScrolling]):
(-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]):
(-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]):
(-[WebDynamicScrollBarsView allowsHorizontalScrolling]):
(-[WebDynamicScrollBarsView allowsVerticalScrolling]):
(-[WebDynamicScrollBarsView horizontalScrollingMode]):
(-[WebDynamicScrollBarsView verticalScrollingMode]):
(-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
(-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
(-[WebDynamicScrollBarsView setScrollingMode:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 8146e20..9fe260f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,28 @@
+2003-09-30 David Hyatt <hyatt at apple.com>
+
+ Improvements to scrolling and layout. Also fixing 3264346, body overflow should
+ apply to document's scrollbars.
+
+ Reviewed by darin
+
+ * WebView.subproj/WebDynamicScrollBarsView.h:
+ * WebView.subproj/WebDynamicScrollBarsView.m:
+ (-[WebDynamicScrollBarsView initWithFrame:]):
+ (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]):
+ (-[WebDynamicScrollBarsView updateScrollers]):
+ (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
+ (-[WebDynamicScrollBarsView setAllowsScrolling:]):
+ (-[WebDynamicScrollBarsView allowsScrolling]):
+ (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]):
+ (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]):
+ (-[WebDynamicScrollBarsView allowsHorizontalScrolling]):
+ (-[WebDynamicScrollBarsView allowsVerticalScrolling]):
+ (-[WebDynamicScrollBarsView horizontalScrollingMode]):
+ (-[WebDynamicScrollBarsView verticalScrollingMode]):
+ (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]):
+ (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
+ (-[WebDynamicScrollBarsView setScrollingMode:]):
+
2003-09-29 Chris Blumenberg <cblu at apple.com>
Fixed: <rdar://problem/3422739>: Plug-in streams not cancelled when plug-in returns error from NPP_NewStream
diff --git a/WebKit/WebView.subproj/WebDynamicScrollBarsView.h b/WebKit/WebView.subproj/WebDynamicScrollBarsView.h
index d0a5e51..3cc7869 100644
--- a/WebKit/WebView.subproj/WebDynamicScrollBarsView.h
+++ b/WebKit/WebView.subproj/WebDynamicScrollBarsView.h
@@ -14,9 +14,10 @@
@interface WebDynamicScrollBarsView : WebCoreScrollView <WebCoreFrameView>
{
- BOOL disallowsHorizontalScrolling;
- BOOL disallowsVerticalScrolling;
+ WebCoreScrollBarMode hScroll;
+ WebCoreScrollBarMode vScroll;
BOOL suppressLayout;
+ BOOL suppressScrollers;
}
- (void)setAllowsHorizontalScrolling:(BOOL)flag;
diff --git a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
index 2225fe8..12655f7 100644
--- a/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
+++ b/WebKit/WebView.subproj/WebDynamicScrollBarsView.m
@@ -12,11 +12,30 @@
@implementation WebDynamicScrollBarsView
+- (id)initWithFrame:(NSRect)frameRect
+{
+ [super initWithFrame:frameRect];
+
+ hScroll = WebCoreScrollBarAuto;
+ vScroll = WebCoreScrollBarAuto;
+
+ return self;
+}
+
- (void)setSuppressLayout: (BOOL)flag;
{
suppressLayout = flag;
}
+- (void)setScrollBarsSuppressed:(BOOL)suppressed repaintOnUnsuppress:(BOOL)repaint
+{
+ suppressScrollers = suppressed;
+ if (suppressed || repaint) {
+ [[self verticalScroller] setNeedsDisplay: !suppressed];
+ [[self horizontalScroller] setNeedsDisplay: !suppressed];
+ }
+}
+
- (void)updateScrollers
{
// We need to do the work below twice in the case where a scroll bar disappears,
@@ -30,18 +49,14 @@
BOOL hasHorizontalScroller = [self hasHorizontalScroller];
BOOL oldHasVertical = hasVerticalScroller;
BOOL oldHasHorizontal = hasHorizontalScroller;
-
- if (suppressLayout)
- return;
-
+
for (pass = 0; pass < 2; pass++) {
BOOL scrollsVertically;
BOOL scrollsHorizontally;
-
- if (![self allowsScrolling]) {
- scrollsVertically = NO;
- scrollsHorizontally = NO;
- } else {
+
+ if (!suppressLayout && !suppressScrollers &&
+ (hScroll == WebCoreScrollBarAuto || vScroll == WebCoreScrollBarAuto))
+ {
// Do a layout if pending, before checking if scrollbars are needed.
// This fixes 2969367, although may introduce a slowdown in live resize performance.
NSView *documentView = [self documentView];
@@ -54,20 +69,38 @@
NSSize documentSize = [documentView frame].size;
NSSize frameSize = [self frame].size;
- scrollsVertically = !disallowsVerticalScrolling && documentSize.height > frameSize.height;
+ scrollsVertically = (vScroll == WebCoreScrollBarAlwaysOn) ||
+ (vScroll == WebCoreScrollBarAuto && documentSize.height > frameSize.height);
if (scrollsVertically)
- scrollsHorizontally = !disallowsHorizontalScrolling && documentSize.width + [NSScroller scrollerWidth] > frameSize.width;
+ scrollsHorizontally = (hScroll == WebCoreScrollBarAlwaysOn) ||
+ (hScroll == WebCoreScrollBarAuto && documentSize.width + [NSScroller scrollerWidth] > frameSize.width);
else {
- scrollsHorizontally = !disallowsHorizontalScrolling && documentSize.width > frameSize.width;
+ scrollsHorizontally = (hScroll == WebCoreScrollBarAlwaysOn) ||
+ (hScroll == WebCoreScrollBarAuto && documentSize.width > frameSize.width);
if (scrollsHorizontally)
- scrollsVertically = !disallowsVerticalScrolling && documentSize.height + [NSScroller scrollerWidth] > frameSize.height;
+ scrollsVertically = (vScroll == WebCoreScrollBarAlwaysOn) ||
+ (vScroll == WebCoreScrollBarAuto && documentSize.height + [NSScroller scrollerWidth] > frameSize.height);
}
}
-
- [self setHasVerticalScroller:scrollsVertically];
- [self setHasHorizontalScroller:scrollsHorizontally];
- hasVerticalScroller = scrollsVertically;
- hasHorizontalScroller = scrollsHorizontally;
+ else {
+ scrollsHorizontally = (hScroll == WebCoreScrollBarAuto) ? hasHorizontalScroller : (hScroll == WebCoreScrollBarAlwaysOn);
+ scrollsVertically = (vScroll == WebCoreScrollBarAuto) ? hasVerticalScroller : (vScroll == WebCoreScrollBarAlwaysOn);
+ }
+
+ if (hasVerticalScroller != scrollsVertically) {
+ [self setHasVerticalScroller:scrollsVertically];
+ hasVerticalScroller = scrollsVertically;
+ }
+
+ if (hasHorizontalScroller != scrollsHorizontally) {
+ [self setHasHorizontalScroller:scrollsHorizontally];
+ hasHorizontalScroller = scrollsHorizontally;
+ }
+ }
+
+ if (suppressScrollers) {
+ [[self verticalScroller] setNeedsDisplay: NO];
+ [[self horizontalScroller] setNeedsDisplay: NO];
}
}
@@ -89,40 +122,78 @@
}
}
[super reflectScrolledClipView:clipView];
+
+ // Validate the scrollers if they're being suppressed.
+ if (suppressScrollers) {
+ [[self verticalScroller] setNeedsDisplay: NO];
+ [[self horizontalScroller] setNeedsDisplay: NO];
+ }
}
-- (void)setAllowsHorizontalScrolling:(BOOL)flag
+- (void)setAllowsScrolling:(BOOL)flag
{
- disallowsHorizontalScrolling = !flag;
+ hScroll = vScroll = (flag ? WebCoreScrollBarAuto : WebCoreScrollBarAlwaysOff);
[self updateScrollers];
}
-- (BOOL)allowsHorizontalScrolling
+- (BOOL)allowsScrolling
+{
+ return hScroll != WebCoreScrollBarAlwaysOff && vScroll != WebCoreScrollBarAlwaysOff;
+}
+
+- (void)setAllowsHorizontalScrolling:(BOOL)flag
{
- return !disallowsHorizontalScrolling;
+ hScroll = (flag ? WebCoreScrollBarAuto : WebCoreScrollBarAlwaysOff);
+ [self updateScrollers];
}
- (void)setAllowsVerticalScrolling:(BOOL)flag
{
- disallowsVerticalScrolling = !flag;
+ vScroll = (flag ? WebCoreScrollBarAuto : WebCoreScrollBarAlwaysOff);
[self updateScrollers];
}
+- (BOOL)allowsHorizontalScrolling
+{
+ return hScroll != WebCoreScrollBarAlwaysOff;
+}
+
- (BOOL)allowsVerticalScrolling
{
- return !disallowsVerticalScrolling;
+ return vScroll != WebCoreScrollBarAlwaysOff;
}
-- (void)setAllowsScrolling:(BOOL)flag
+-(WebCoreScrollBarMode)horizontalScrollingMode
+{
+ return hScroll;
+}
+
+-(WebCoreScrollBarMode)verticalScrollingMode
+{
+ return vScroll;
+}
+
+- (void)setHorizontalScrollingMode:(WebCoreScrollBarMode)mode
{
- disallowsVerticalScrolling = !flag;
- disallowsHorizontalScrolling = !flag;
+ if (mode == hScroll)
+ return;
+ hScroll = mode;
[self updateScrollers];
}
-- (BOOL)allowsScrolling
+- (void)setVerticalScrollingMode:(WebCoreScrollBarMode)mode
{
- return !disallowsHorizontalScrolling || !disallowsVerticalScrolling;
+ if (mode == vScroll)
+ return;
+ vScroll = mode;
+ [self updateScrollers];
}
+- (void)setScrollingMode:(WebCoreScrollBarMode)mode
+{
+ if (mode == vScroll && mode == hScroll)
+ return;
+ vScroll = hScroll = mode;
+ [self updateScrollers];
+}
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list