[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:33:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c607fd45cd17d06d62c30ed8a50f6b0f8afd3e43
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Apr 9 23:04:13 2004 +0000
WebCore:
Reviewed by Ken.
- added "transparent mode"
* khtml/khtmlview.h: Added isTransparent and setTransparent functions.
* khtml/khtmlview.cpp:
(KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
(KHTMLView::isTransparent): Return isTransparent.
(KHTMLView::setTransparent): Set isTransparent.
* khtml/rendering/render_box.cpp:
(RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
is transparent; also don't draw a background. This is the same thing we do for subframes.
(RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
background color for the top frame when the view is transparent.
* khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
when the view is not transparent.
* kwq/WebCoreBridge.h: Added setDrawsBackground: method.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
(don't draw background), then set isTransparent to true on the KHTMLView.
WebKit:
Reviewed by Ken.
- added "transparent mode"
* WebView.subproj/WebFrameInternal.h: Added. Contains _updateDrawsBackground.
* WebView.subproj/WebFrame.m:
(-[WebFrame _makeDocumentView]): Call _updateDrawsBackground to tell the newly created
KHTMLView whether to draw a background or not.
(-[WebFrame _setState:]): Don't tell the scroll view to start drawing background if the
WebView is not supposed to draw a background.
(-[WebFrame _updateDrawsBackground]): Call setDrawsBackground: on the bridge, and do the
same for all subframes.
* WebView.subproj/WebFrameView.m: (-[WebFrameView setFrameSize:]): Only call setDrawsBackground:YES
on the scroll view if the WebView has drawsBackground set to YES.
* WebView.subproj/WebViewPrivate.h: Added new proposed API, setDrawsBackground and drawsBackground.
Also added drawsBackground boolean to private structure.
* WebView.subproj/WebView.m:
(-[WebView _commonInitializationWithFrameName:groupName:]): Set drawsBackground to YES by default.
(-[WebView setDrawsBackground:]): Added. Sets boolean and calls _updateDrawsBackground to update
the flag for each frame.
(-[WebView drawsBackground]): Added. Returns value of boolean.
(-[WebView _bridgeForCurrentSelection]): Tweaked comment for no good reason.
* WebView.subproj/WebViewInternal.h: Added, but empty for the moment.
* WebView.subproj/WebFramePrivate.h: Tweaked a bit.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 1166fbc..5e2dff4 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,29 @@
+2004-04-09 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - added "transparent mode"
+
+ * khtml/khtmlview.h: Added isTransparent and setTransparent functions.
+ * khtml/khtmlview.cpp:
+ (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
+ (KHTMLView::isTransparent): Return isTransparent.
+ (KHTMLView::setTransparent): Set isTransparent.
+
+ * khtml/rendering/render_box.cpp:
+ (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
+ is transparent; also don't draw a background. This is the same thing we do for subframes.
+ (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
+ background color for the top frame when the view is transparent.
+ * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.
+
+ * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
+ when the view is not transparent.
+
+ * kwq/WebCoreBridge.h: Added setDrawsBackground: method.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
+ (don't draw background), then set isTransparent to true on the KHTMLView.
+
2004-04-09 Ken Kocienda <kocienda at apple.com>
Reviewed by me
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index c13952c..5678bf6 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -4,7 +4,7 @@
* 1999 Lars Knoll <knoll at kde.org>
* 1999 Antti Koivisto <koivisto at kde.org>
* 2000 Dirk Mueller <mueller at kde.org>
- * Copyright (C) 2003 Apple Computer, Inc.
+ * Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -108,6 +108,7 @@ public:
mousePressed = false;
tooltip = 0;
doFullRepaint = true;
+ isTransparent = false;
#if APPLE_CHANGES
vmode = hmode = QScrollView::Auto;
firstLayout = true;
@@ -208,6 +209,7 @@ public:
bool needToInitScrollBars;
#endif
bool mousePressed;
+ bool isTransparent;
KHTMLToolTip *tooltip;
// Used by objects during layout to communicate repaints that need to take place only
@@ -1847,3 +1849,13 @@ void KHTMLView::complete()
}
}
+bool KHTMLView::isTransparent() const
+{
+ return d->isTransparent;
+}
+
+void KHTMLView::setTransparent(bool isTransparent)
+{
+ d->isTransparent = isTransparent;
+}
+
diff --git a/WebCore/khtml/khtmlview.h b/WebCore/khtml/khtmlview.h
index 687c07e..4ec9a65 100644
--- a/WebCore/khtml/khtmlview.h
+++ b/WebCore/khtml/khtmlview.h
@@ -5,7 +5,7 @@
(C) 1998, 1999 Torben Weis (weis at kde.org)
(C) 1999 Lars Knoll (knoll at kde.org)
(C) 1999 Antti Koivisto (koivisto at kde.org)
- Copyright (C) 2003 Apple Computer, Inc.
+ Copyright (C) 2004 Apple Computer, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -205,6 +205,9 @@ public:
void timerEvent ( QTimerEvent * );
void repaintRectangle(const QRect& r, bool immediate);
+
+ bool isTransparent() const;
+ void setTransparent(bool isTransparent);
#if APPLE_CHANGES
QWidget *topLevelWidget() const;
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index edee388..81ca6d8 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -3,7 +3,7 @@
*
* Copyright (C) 1999 Lars Knoll (knoll at kde.org)
* (C) 1999 Antti Koivisto (koivisto at kde.org)
- * Copyright (C) 2003 Apple Computer, Inc.
+ * Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -223,8 +223,14 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
// Only fill with a base color (e.g., white) if we're the root document, since iframes/frames with
// no background in the child document should show the parent's background.
if ((!c.isValid() || qAlpha(c.rgb()) == 0) && canvas()->view()) {
+ bool isTransparent;
DOM::NodeImpl* elt = element()->getDocument()->ownerElement();
- if (canBeTransparent && elt && elt->id() != ID_FRAME) // Frames are never transparent.
+ if (elt)
+ isTransparent = canBeTransparent && elt->id() != ID_FRAME; // Frames are never transparent.
+ else
+ isTransparent = canvas()->view()->isTransparent();
+
+ if (isTransparent)
canvas()->view()->useSlowRepaints(); // The parent must show behind the child.
else
c = canvas()->view()->palette().active().color(QColorGroup::Base);
@@ -306,7 +312,7 @@ void RenderBox::paintBackgroundExtended(QPainter *p, const QColor &c, CachedImag
if (c.isValid() && qAlpha(c.rgb()) > 0) {
// If we have an alpha and we are painting the root element, go ahead and blend with our default
// background color (typically white).
- if (qAlpha(c.rgb()) < 0xFF && isRoot())
+ if (qAlpha(c.rgb()) < 0xFF && isRoot() && !canvas()->view()->isTransparent())
p->fillRect(_tx, clipy, w, cliph, canvas()->view()->palette().active().color(QColorGroup::Base));
p->fillRect(_tx, clipy, w, cliph, c);
}
diff --git a/WebCore/khtml/rendering/render_canvas.cpp b/WebCore/khtml/rendering/render_canvas.cpp
index 86d5442..0dc9f3f 100644
--- a/WebCore/khtml/rendering/render_canvas.cpp
+++ b/WebCore/khtml/rendering/render_canvas.cpp
@@ -2,7 +2,7 @@
* This file is part of the HTML widget for KDE.
*
* Copyright (C) 1999 Lars Knoll (knoll at kde.org)
- * Copyright (C) 2003 Apple Computer, Inc.
+ * Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -244,7 +244,7 @@ void RenderCanvas::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
// This code typically only executes if the root element's visibility has been set to hidden.
// Only fill with a base color (e.g., white) if we're the root document, since iframes/frames with
// no background in the child document should show the parent's background.
- if (elt)
+ if (elt || view()->isTransparent())
view()->useSlowRepaints(); // The parent must show behind the child.
else
i.p->fillRect(i.r.x(), i.r.y(), i.r.width(), i.r.height(),
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index e8e707d..11eb7b7 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -867,8 +867,17 @@ void KWQKHTMLPart::redirectionTimerStartedOrStopped()
void KWQKHTMLPart::paint(QPainter *p, const QRect &rect)
{
#ifndef NDEBUG
- bool isPrinting = (p->device()->devType() == QInternal::Printer);
- if (!isPrinting && xmlDocImpl() && !xmlDocImpl()->ownerElement()) {
+ bool fillWithRed;
+ if (p->device()->devType() == QInternal::Printer)
+ fillWithRed = false; // Printing, don't fill with red (can't remember why).
+ else if (!xmlDocImpl() || xmlDocImpl()->ownerElement())
+ fillWithRed = false; // Subframe, don't fill with red.
+ else if (view() && view()->isTransparent())
+ fillWithRed = false; // Transparent, don't fill with red.
+ else
+ fillWithRed = true;
+
+ if (fillWithRed) {
p->fillRect(rect.x(), rect.y(), rect.width(), rect.height(), QColor(0xFF, 0, 0));
}
#endif
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index befc9c9..60fa140 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -269,6 +269,8 @@ typedef enum {
- (int)numPendingOrLoadingRequests;
+- (void)setDrawsBackground:(BOOL)drawsBackround;
+
- (NSColor *)bodyBackgroundColor;
- (NSColor *)selectionColor;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index e3aa9dd..271cd14 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -1378,4 +1378,10 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
TypingCommand::deleteKeyPressed(_part->xmlDocImpl());
}
+- (void)setDrawsBackground:(BOOL)drawsBackground
+{
+ if (_part && _part->view())
+ _part->view()->setTransparent(!drawsBackground);
+}
+
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index cc38e6e..36ab52b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,33 @@
+2004-04-09 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - added "transparent mode"
+
+ * WebView.subproj/WebFrameInternal.h: Added. Contains _updateDrawsBackground.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame _makeDocumentView]): Call _updateDrawsBackground to tell the newly created
+ KHTMLView whether to draw a background or not.
+ (-[WebFrame _setState:]): Don't tell the scroll view to start drawing background if the
+ WebView is not supposed to draw a background.
+ (-[WebFrame _updateDrawsBackground]): Call setDrawsBackground: on the bridge, and do the
+ same for all subframes.
+
+ * WebView.subproj/WebFrameView.m: (-[WebFrameView setFrameSize:]): Only call setDrawsBackground:YES
+ on the scroll view if the WebView has drawsBackground set to YES.
+
+ * WebView.subproj/WebViewPrivate.h: Added new proposed API, setDrawsBackground and drawsBackground.
+ Also added drawsBackground boolean to private structure.
+ * WebView.subproj/WebView.m:
+ (-[WebView _commonInitializationWithFrameName:groupName:]): Set drawsBackground to YES by default.
+ (-[WebView setDrawsBackground:]): Added. Sets boolean and calls _updateDrawsBackground to update
+ the flag for each frame.
+ (-[WebView drawsBackground]): Added. Returns value of boolean.
+ (-[WebView _bridgeForCurrentSelection]): Tweaked comment for no good reason.
+
+ * WebView.subproj/WebViewInternal.h: Added, but empty for the moment.
+ * WebView.subproj/WebFramePrivate.h: Tweaked a bit.
+
2004-04-08 Chris Blumenberg <cblu at apple.com>
Fixed:
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 642500f..5de78d0 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -350,6 +350,8 @@
83255720061DF71E007B8054,
846171FB0624AE5B0071A4A3,
8373435C0624EE0D00F3B289,
+ 930D02BC06275F640076701E,
+ 930D02BE06275F710076701E,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -2502,6 +2504,34 @@
//932
//933
//934
+ 930D02BB06275F640076701E = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = WebViewInternal.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 930D02BC06275F640076701E = {
+ fileRef = 930D02BB06275F640076701E;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 930D02BD06275F710076701E = {
+ fileEncoding = 4;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = WebFrameInternal.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 930D02BE06275F710076701E = {
+ fileRef = 930D02BD06275F710076701E;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
9311022803667CF1008635CE = {
fileEncoding = 4;
isa = PBXFileReference;
@@ -2972,6 +3002,7 @@
2D36FD5E03F78F9E00A80166,
39446074020F50ED0ECA1767,
F5143A370221DCCE01A80181,
+ 930D02BD06275F710076701E,
9CF0E249021361B00ECA16EA,
51A8B52E04282B5900CA2D3A,
51A8B52F04282B5900CA2D3A,
@@ -2992,6 +3023,7 @@
65A7D44A0568AB2600E70EF6,
51A8B579042834F700CA2D3A,
51A8B57A042834F700CA2D3A,
+ 930D02BB06275F640076701E,
51A8B57D0428353A00CA2D3A,
);
isa = PBXGroup;
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index c0a87f6..64ec3ec 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -3,7 +3,7 @@
Copyright (c) 2001, Apple, Inc. All rights reserved.
*/
-#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebFrameInternal.h>
#import <WebKit/DOM.h>
#import <WebKit/WebArchive.h>
@@ -29,7 +29,7 @@
#import <WebKit/WebPreferencesPrivate.h>
#import <WebKit/WebPlugin.h>
#import <WebKit/WebResourcePrivate.h>
-#import <WebKit/WebViewPrivate.h>
+#import <WebKit/WebViewInternal.h>
#import <WebKit/WebUIDelegate.h>
#import <Foundation/NSDictionary_NSURLExtras.h>
@@ -686,6 +686,7 @@ NSString *WebPageCacheDocumentViewKey = @"WebPageCacheDocumentViewKey";
// FIXME: We could save work and not do this for a top-level view that is not a WebHTMLView.
WebFrameView *v = _private->webFrameView;
[_private->bridge createKHTMLViewWithNSView:documentView marginWidth:[v _marginWidth] marginHeight:[v _marginHeight]];
+ [self _updateDrawsBackground];
[_private->bridge installInFrame:[v _scrollView]];
// Call setDataSource on the document view after it has been placed in the view hierarchy.
@@ -978,7 +979,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
if (_private->state == WebFrameStateComplete) {
NSScrollView *sv = [[self frameView] _scrollView];
- [sv setDrawsBackground:YES];
+ if ([[self webView] drawsBackground])
+ [sv setDrawsBackground:YES];
NSTimer *timer = _private->scheduledLayoutTimer;
_private->scheduledLayoutTimer = nil;
[_private setPreviousItem:nil];
@@ -2445,7 +2447,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
return [_private->bridge bodyBackgroundColor];
}
-- (void)_reloadForPluginChanges;
+- (void)_reloadForPluginChanges
{
NSView <WebDocumentView> *documentView = [[self frameView] documentView];
if ([documentView isKindOfClass:[WebNetscapePluginDocumentView class]]) {
@@ -2464,7 +2466,16 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
} else {
[[self childFrames] makeObjectsPerformSelector:@selector(_reloadForPluginChanges)];
}
+}
+
+ at end
+ at implementation WebFrame (WebInternal)
+
+- (void)_updateDrawsBackground
+{
+ [[self _bridge] setDrawsBackground:[[self webView] drawsBackground]];
+ [_private->children makeObjectsPerformSelector:@selector(_updateDrawsBackground)];
}
@end
diff --git a/WebKit/WebView.subproj/WebFrameInternal.h b/WebKit/WebView.subproj/WebFrameInternal.h
new file mode 100644
index 0000000..d10a28a
--- /dev/null
+++ b/WebKit/WebView.subproj/WebFrameInternal.h
@@ -0,0 +1,9 @@
+// This header contains WebFrame declarations that can be used anywhere in WebKit, but are neither SPI nor API.
+
+#import <WebKit/WebFramePrivate.h>
+
+ at interface WebFrame (WebInternal)
+
+- (void)_updateDrawsBackground;
+
+ at end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index 05c6382..42db384 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -6,6 +6,10 @@
Private header file.
*/
+// This header contains the WebFrame SPI.
+
+// But it also contains a bunch of internal stuff that should be moved to WebFrameInternal.h
+
#import <WebKit/WebFrame.h>
#import <WebKit/WebPolicyDelegatePrivate.h>
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 07dd024..c02af4c 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -536,7 +536,7 @@ static NSMutableDictionary *viewTypes;
- (void)setFrameSize:(NSSize)size
{
- if (!NSEqualSizes(size, [self frame].size)) {
+ if (!NSEqualSizes(size, [self frame].size) && [[[self webFrame] webView] drawsBackground]) {
[[self _scrollView] setDrawsBackground:YES];
}
[super setFrameSize:size];
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 4fb00d4..91ccb3f 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -3,7 +3,7 @@
Copyright 2001, 2002 Apple, Inc. All rights reserved.
*/
-#import <WebKit/WebViewPrivate.h>
+#import <WebKit/WebViewInternal.h>
#import <WebKit/WebAssertions.h>
#import <WebKit/WebBackForwardList.h>
@@ -23,7 +23,7 @@
#import <WebKit/WebDownload.h>
#import <WebKit/WebException.h>
#import <WebKit/WebFormDelegatePrivate.h>
-#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebFrameInternal.h>
#import <WebKit/WebFrameViewPrivate.h>
#import <WebKit/WebHistoryItemPrivate.h>
#import <WebKit/WebHTMLView.h>
@@ -1152,6 +1152,8 @@ NSMutableDictionary *countInvocations;
- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName
{
+ _private->drawsBackground = YES;
+
NSRect f = [self frame];
WebFrameView *wv = [[WebFrameView alloc] initWithFrame: NSMakeRect(0,0,f.size.width,f.size.height)];
[wv setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
@@ -1746,7 +1748,6 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
@end
-
@implementation WebView (WebIBActions)
- (IBAction)takeStringURLFrom: sender
@@ -1901,6 +1902,19 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
return [[WebIconDatabase sharedIconDatabase] iconForURL:[[[[self mainFrame] dataSource] _URL] _web_originalDataAsString] withSize:WebIconSmallSize];
}
+- (void)setDrawsBackground:(BOOL)drawsBackground
+{
+ if (_private->drawsBackground == drawsBackground)
+ return;
+ _private->drawsBackground = drawsBackground;
+ [[self mainFrame] _updateDrawsBackground];
+}
+
+- (BOOL)drawsBackground
+{
+ return _private->drawsBackground;
+}
+
@end
@implementation WebView (WebViewPrintingPrivate)
@@ -2027,7 +2041,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
- (WebBridge *)_bridgeForCurrentSelection
{
- // FIXME: This does not deal properly with subframes
+ // FIXME: This needs to be changed to deal properly with subframes.
return [[self mainFrame] _bridge];
}
diff --git a/WebKit/WebView.subproj/WebViewInternal.h b/WebKit/WebView.subproj/WebViewInternal.h
new file mode 100644
index 0000000..7a7ac2f
--- /dev/null
+++ b/WebKit/WebView.subproj/WebViewInternal.h
@@ -0,0 +1,3 @@
+// This header contains WebView declarations that can be used anywhere in the Web Kit, but are neither SPI nor API.
+
+#import <WebKit/WebViewPrivate.h>
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 1532d33..1902758 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -95,6 +95,8 @@ extern NSString *_WebMainFrameURLKey;
void *observationInfo;
NSArray *draggedTypes;
+
+ BOOL drawsBackground;
}
@end
@@ -106,6 +108,9 @@ extern NSString *_WebMainFrameURLKey;
- (NSString *)mainFrameTitle;
- (NSImage *)mainFrameIcon;
+- (void)setDrawsBackground:(BOOL)drawsBackround;
+- (BOOL)drawsBackground;
+
@end
@interface WebView (WebPrivate)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list