[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:19:50 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 516962a18e0d237762d72c30cee6e4f4a09a1319
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jun 15 22:15:52 2002 +0000
2002-06-15 Richard Williamson <rjw at apple.com>
Fixed factoring problem.
* kwq/KWQScrollView.mm:
(-[NSView _IF_getDocumentView]):
(-[NSView _IF_isScrollView]):
(QScrollView::visibleWidth):
(QScrollView::visibleHeight):
(QScrollView::contentsWidth):
(QScrollView::contentsHeight):
(QScrollView::contentsX):
(QScrollView::contentsY):
(QScrollView::setContentsPos):
(QScrollView::addChild):
(QScrollView::resizeContents):
(QScrollView::contentsToViewport):
(QScrollView::viewportToContents):
* kwq/qt/qscrollview.h:
Fixed _bridge not accounting for provisional data source,
broke access to window.frames during load.
* WebCoreSupport.subproj/IFWebCoreBridge.mm:
(-[IFWebFrame _bridge]):
(-[IFWebCoreBridge children]):
* WebView.subproj/IFWebFramePrivate.mm:
(-[IFWebFrame _isLoadComplete]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 52dd04b..21616b1 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ Fixed factoring problem.
+
+ * kwq/KWQScrollView.mm:
+ (-[NSView _IF_getDocumentView]):
+ (-[NSView _IF_isScrollView]):
+ (QScrollView::visibleWidth):
+ (QScrollView::visibleHeight):
+ (QScrollView::contentsWidth):
+ (QScrollView::contentsHeight):
+ (QScrollView::contentsX):
+ (QScrollView::contentsY):
+ (QScrollView::setContentsPos):
+ (QScrollView::addChild):
+ (QScrollView::resizeContents):
+ (QScrollView::contentsToViewport):
+ (QScrollView::viewportToContents):
+ * kwq/qt/qscrollview.h:
+
2002-06-15 Darin Adler <darin at apple.com>
* kwq/WebCoreBridge.mm:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 52dd04b..21616b1 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,23 @@
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ Fixed factoring problem.
+
+ * kwq/KWQScrollView.mm:
+ (-[NSView _IF_getDocumentView]):
+ (-[NSView _IF_isScrollView]):
+ (QScrollView::visibleWidth):
+ (QScrollView::visibleHeight):
+ (QScrollView::contentsWidth):
+ (QScrollView::contentsHeight):
+ (QScrollView::contentsX):
+ (QScrollView::contentsY):
+ (QScrollView::setContentsPos):
+ (QScrollView::addChild):
+ (QScrollView::resizeContents):
+ (QScrollView::contentsToViewport):
+ (QScrollView::viewportToContents):
+ * kwq/qt/qscrollview.h:
+
2002-06-15 Darin Adler <darin at apple.com>
* kwq/WebCoreBridge.mm:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 52dd04b..21616b1 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,23 @@
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ Fixed factoring problem.
+
+ * kwq/KWQScrollView.mm:
+ (-[NSView _IF_getDocumentView]):
+ (-[NSView _IF_isScrollView]):
+ (QScrollView::visibleWidth):
+ (QScrollView::visibleHeight):
+ (QScrollView::contentsWidth):
+ (QScrollView::contentsHeight):
+ (QScrollView::contentsX):
+ (QScrollView::contentsY):
+ (QScrollView::setContentsPos):
+ (QScrollView::addChild):
+ (QScrollView::resizeContents):
+ (QScrollView::contentsToViewport):
+ (QScrollView::viewportToContents):
+ * kwq/qt/qscrollview.h:
+
2002-06-15 Darin Adler <darin at apple.com>
* kwq/WebCoreBridge.mm:
diff --git a/WebCore/kwq/KWQScrollView.h b/WebCore/kwq/KWQScrollView.h
index ce1ebc6..19768b9 100644
--- a/WebCore/kwq/KWQScrollView.h
+++ b/WebCore/kwq/KWQScrollView.h
@@ -78,8 +78,6 @@ public:
void ensureVisible(int,int);
void ensureVisible(int,int,int,int);
-
- NSView *getDocumentView() const;
};
#endif
diff --git a/WebCore/kwq/KWQScrollView.mm b/WebCore/kwq/KWQScrollView.mm
index 88f7d4a..ea9844a 100644
--- a/WebCore/kwq/KWQScrollView.mm
+++ b/WebCore/kwq/KWQScrollView.mm
@@ -29,123 +29,120 @@
/*
This class implementation does NOT actually emulate the Qt QScrollView.
- Instead our WebPageView, like any other NSView can be set as the document
- to a standard NSScrollView.
+ It does provide an implementation that khtml will use to interact with
+ WebKit's IFWebView documentView and our NSScrollView subclass.
- We do implement the placeWidget() function to essentially addSubview views
- onto this view.
+ QScrollView's view is a NSScrollView (or subclass of NSScrollView) in most
+ cases (except for provisional widgets). That scrollview is a subview of an
+ IFWebView. The IFWebView's documentView will also be the scroll view's
+ documentView.
+
+ The IFWebView's size is the frame size. The IFWebView's documentView
+ corresponds to the frame content size. The scrollview itself is autosized to the
+ IFWebView's size (see QWidget::resize).
*/
-QScrollView::QScrollView(QWidget *parent, const char *name, int f)
- : QFrame(parent)
-{
-}
+ at interface NSView (IFExtensions)
+- (BOOL)_IF_isScrollView;
+- (NSView *)_IF_getDocumentView;
+ at end
+
-static NSView *getDocumentView(NSView *view)
+ at implementation NSView (IFExtensions)
+- (NSView *)_IF_getDocumentView
{
- if ([view respondsToSelector:@selector(documentView)]) {
- id untypedView = view;
- view = [untypedView documentView];
+ if ([self respondsToSelector: @selector(documentView)]){
+ NSScrollView *sv = (NSScrollView *)self; // Compile complains about in-line cast.
+ return [sv documentView];
}
- return view;
+ return nil;
}
-static NSView *getDocumentView(const QWidget *widget)
+
+- (BOOL)_IF_isScrollView
{
- return getDocumentView(widget->getView());
+ if([self isKindOfClass: [NSScrollView class]])
+ return YES;
+ return NO;
}
+ at end
+
-NSView *QScrollView::getDocumentView() const
+QScrollView::QScrollView(QWidget *parent, const char *name, int f)
+ : QFrame(parent)
{
- return ::getDocumentView(this);
}
+
QWidget* QScrollView::viewport() const
{
return const_cast<QScrollView *>(this);
}
+
int QScrollView::visibleWidth() const
{
-#if 0
- id view = getView();
- NSScrollView *scrollView = [[view superview] superview];
- int visibleWidth;
-
- if (scrollView != nil && [scrollView isKindOfClass: [NSScrollView class]])
- visibleWidth = (int)[scrollView documentVisibleRect].size.width;
- else
- visibleWidth = (int)[view bounds].size.width;
- return visibleWidth;
-#else
NSScrollView *view = (NSScrollView *)getView();
int visibleWidth;
- if (view != nil && [view isKindOfClass:[NSScrollView class]]){
+ if ([view _IF_isScrollView]){
visibleWidth = (int)[view documentVisibleRect].size.width;
}
else
visibleWidth = (int)[view bounds].size.width;
- if (visibleWidth <= 0)
- visibleWidth = 200;
+
return visibleWidth;
-#endif
}
int QScrollView::visibleHeight() const
{
-#if 0
- id view = getView();
- NSScrollView *scrollView = [[view superview] superview];
- int visibleHeight;
-
- if (scrollView != nil && [scrollView isKindOfClass: [NSScrollView class]]){
- visibleHeight = (int)[scrollView documentVisibleRect].size.height;
- }
- else
- visibleHeight = (int)[view bounds].size.height;
- return visibleHeight;
-#else
NSScrollView *view = (NSScrollView *)getView();
int visibleHeight;
- if (view != nil && [view isKindOfClass:[NSScrollView class]]){
+ if ([view _IF_isScrollView]){
visibleHeight = (int)[view documentVisibleRect].size.height;
}
else
visibleHeight = (int)[view bounds].size.height;
- if (visibleHeight <= 0)
- visibleHeight = 200;
return visibleHeight;
-#endif
}
int QScrollView::contentsWidth() const
{
- return (int)[getDocumentView() bounds].size.width;
+ NSView *docView, *view = getView();
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ return (int)[docView bounds].size.width;
+ return (int)[view bounds].size.width;
}
int QScrollView::contentsHeight() const
{
- return (int)[getDocumentView() bounds].size.height;
+ NSView *docView, *view = getView();
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ return (int)[docView bounds].size.height;
+ return (int)[view bounds].size.height;
}
int QScrollView::contentsX() const
{
- NSScrollView *view = (NSScrollView *)getView();
- if ([view respondsToSelector:@selector(documentView)])
- return (int)[[view documentView] bounds].origin.x;
+ NSView *docView, *view = getView();
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ return (int)[docView bounds].origin.x;
return 0;
}
int QScrollView::contentsY() const
{
- NSScrollView *view = (NSScrollView *)getView();
- if ([view respondsToSelector:@selector(documentView)])
- return (int)[[view documentView] bounds].origin.y;
+ NSView *docView, *view = getView();
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ return (int)[docView bounds].origin.y;
return 0;
}
@@ -166,11 +163,16 @@ void QScrollView::scrollBy(int dx, int dy)
void QScrollView::setContentsPos(int x, int y)
{
+ NSView *docView, *view = getView();
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ view = docView;
+
if (x < 0)
x = 0;
if (y < 0)
y = 0;
- [getDocumentView() scrollPoint: NSMakePoint(x,y)];
+ [view scrollPoint: NSMakePoint(x,y)];
}
void QScrollView::setVScrollBarMode(ScrollBarMode)
@@ -185,13 +187,20 @@ void QScrollView::setHScrollBarMode(ScrollBarMode)
void QScrollView::addChild(QWidget* child, int x, int y)
{
- NSView *thisView, *subView;
+ NSView *thisView, *thisDocView, *subView;
if (child->x() != x || child->y() != y)
child->move(x, y);
- thisView = getDocumentView();
- subView = ::getDocumentView(child);
+ thisView = getView();
+ thisDocView = [thisView _IF_getDocumentView];
+ if (thisDocView)
+ thisView = thisDocView;
+
+ subView = child->getView();
+ if ([subView _IF_isScrollView]) {
+ subView = [subView superview];
+ }
if ([subView superview] == thisView) {
return;
@@ -211,20 +220,16 @@ void QScrollView::removeChild(QWidget* child)
void QScrollView::resizeContents(int w, int h)
{
KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", getView(), [[[getView() class] className] cString], w, h);
- if ([getView() isKindOfClass:[NSScrollView class]]){
- NSView *wview = getDocumentView();
+ NSView *view = getView();
+ if ([view _IF_isScrollView]){
+ view = [view _IF_getDocumentView];
- KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", wview, [[[wview class] className] cString], w, h);
- //w -= (int)[NSScroller scrollerWidth];
- //w -= 1;
+ KWQDEBUGLEVEL (KWQ_LOG_FRAMES, "%p %s at w %d h %d\n", view, [[[view class] className] cString], w, h);
if (w < 0)
w = 0;
- // Why isn't there a scrollerHeight?
- //h -= (int)[NSScroller scrollerWidth];
- //h -= 1;
if (h < 0)
h = 0;
- [wview setFrameSize:NSMakeSize(w,h)];
+ [view setFrameSize: NSMakeSize (w,h)];
}
else {
resize (w, h);
@@ -256,7 +261,13 @@ QPoint QScrollView::contentsToViewport(const QPoint &p)
void QScrollView::contentsToViewport(int x, int y, int& vx, int& vy)
{
- NSPoint np = [getDocumentView() convertPoint: NSMakePoint (x, y) toView: nil];
+ NSView *docView, *view = getView();
+
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ view = docView;
+
+ NSPoint np = [view convertPoint: NSMakePoint (x, y) toView: nil];
vx = (int)np.x;
vy = (int)np.y;
@@ -264,7 +275,13 @@ void QScrollView::contentsToViewport(int x, int y, int& vx, int& vy)
void QScrollView::viewportToContents(int vx, int vy, int& x, int& y)
{
- NSPoint np = [getDocumentView() convertPoint: NSMakePoint (vx, vy) fromView: nil];
+ NSView *docView, *view = getView();
+
+ docView = [view _IF_getDocumentView];
+ if (docView)
+ view = docView;
+
+ NSPoint np = [view convertPoint: NSMakePoint (vx, vy) fromView: nil];
x = (int)np.x;
y = (int)np.y;
diff --git a/WebCore/kwq/qt/qscrollview.h b/WebCore/kwq/qt/qscrollview.h
index ce1ebc6..19768b9 100644
--- a/WebCore/kwq/qt/qscrollview.h
+++ b/WebCore/kwq/qt/qscrollview.h
@@ -78,8 +78,6 @@ public:
void ensureVisible(int,int);
void ensureVisible(int,int,int,int);
-
- NSView *getDocumentView() const;
};
#endif
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index dea5013..03a004c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ * ChangeLog:
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebFrame _bridge]):
+ (-[IFWebCoreBridge children]):
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFrame _isLoadComplete]):
+
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ Fixed _bridge not accounting for provisional data source,
+ broke access to window.frames during load.
+
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebFrame _bridge]):
+ (-[IFWebCoreBridge children]):
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFrame _isLoadComplete]):
+
2002-06-15 Darin Adler <darin at apple.com>
* WebView.subproj/IFHTMLView.mm:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index dea5013..03a004c 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,23 @@
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ * ChangeLog:
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebFrame _bridge]):
+ (-[IFWebCoreBridge children]):
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFrame _isLoadComplete]):
+
+2002-06-15 Richard Williamson <rjw at apple.com>
+
+ Fixed _bridge not accounting for provisional data source,
+ broke access to window.frames during load.
+
+ * WebCoreSupport.subproj/IFWebCoreBridge.mm:
+ (-[IFWebFrame _bridge]):
+ (-[IFWebCoreBridge children]):
+ * WebView.subproj/IFWebFramePrivate.mm:
+ (-[IFWebFrame _isLoadComplete]):
+
2002-06-15 Darin Adler <darin at apple.com>
* WebView.subproj/IFHTMLView.mm:
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
index fbd4e4e..58f4425 100644
--- a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
@@ -39,7 +39,12 @@
- (IFWebCoreBridge *)_bridge
{
- return [[self dataSource] _bridge];
+ IFWebCoreBridge *aBridge;
+
+ aBridge = [[self dataSource] _bridge];
+ if (!aBridge)
+ aBridge = [[self provisionalDataSource] _bridge];
+ return aBridge;
}
@end
@@ -78,7 +83,9 @@
NSMutableArray *children = [NSMutableArray arrayWithCapacity:[frames count]];
IFWebFrame *frame;
while ((frame = [e nextObject])) {
- [children addObject:[frame _bridge]];
+ IFWebCoreBridge *aBridge = [frame _bridge];
+ if (aBridge)
+ [children addObject:aBridge];
}
return children;
}
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index fbd4e4e..58f4425 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -39,7 +39,12 @@
- (IFWebCoreBridge *)_bridge
{
- return [[self dataSource] _bridge];
+ IFWebCoreBridge *aBridge;
+
+ aBridge = [[self dataSource] _bridge];
+ if (!aBridge)
+ aBridge = [[self provisionalDataSource] _bridge];
+ return aBridge;
}
@end
@@ -78,7 +83,9 @@
NSMutableArray *children = [NSMutableArray arrayWithCapacity:[frames count]];
IFWebFrame *frame;
while ((frame = [e nextObject])) {
- [children addObject:[frame _bridge]];
+ IFWebCoreBridge *aBridge = [frame _bridge];
+ if (aBridge)
+ [children addObject:aBridge];
}
return children;
}
diff --git a/WebKit/WebView.subproj/IFWebFramePrivate.mm b/WebKit/WebView.subproj/IFWebFramePrivate.mm
index a1b2d4f..5c8e43c 100644
--- a/WebKit/WebView.subproj/IFWebFramePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebFramePrivate.mm
@@ -369,10 +369,12 @@ static const char * const stateNames[6] = {
// able to just draw the document associated with this
// frame, but that doesn't work. Not sure why.
[mainDocumentView setNeedsDisplay: YES];
+ [mainDocumentView display];
// This should be redundant, given the setNeedsDisplay: on the
// main view above.
[thisDocumentView setNeedsDisplay: YES];
+ [thisDocumentView display];
[[ds _locationChangeHandler] locationChangeDone: [ds mainDocumentError]];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index a1b2d4f..5c8e43c 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -369,10 +369,12 @@ static const char * const stateNames[6] = {
// able to just draw the document associated with this
// frame, but that doesn't work. Not sure why.
[mainDocumentView setNeedsDisplay: YES];
+ [mainDocumentView display];
// This should be redundant, given the setNeedsDisplay: on the
// main view above.
[thisDocumentView setNeedsDisplay: YES];
+ [thisDocumentView display];
[[ds _locationChangeHandler] locationChangeDone: [ds mainDocumentError]];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list