[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:32:18 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b23a002083b8139b30f9363eeb39cd969e7fbab4
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Apr 5 20:46:50 2004 +0000
Tests:
Made PDFBundle compilable and made it test the new selection SPI.
* PDFBundle/Apple.pdf: Added.
* PDFBundle/PDFBundle.pbproj/project.pbxproj:
* PDFBundle/PDFView.h:
* PDFBundle/PDFView.m:
(-[PDFResourceDelegate connection:didReceiveData:]):
(-[PDFResourceDelegate connectionDidFinishLoading:]):
(-[PDFResourceDelegate connection:didFailLoadingWithError:]):
(-[PDFView initWithFrame:pageURL:resourceURL:container:]):
(-[PDFView dealloc]):
(-[PDFView setIsSelected:]):
(-[PDFView isSelected]):
(-[PDFView drawRect:]):
(-[PDFView layout]):
(-[PDFRepresentation receivedError:withDataSource:]):
(-[PDFRepresentation title]):
(+[PDFPluginViewFactory pluginViewWithArguments:]):
* PDFBundle/pdf.html: Added.
WebCore:
Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
Reviewed by kocienda.
* WebCore.pbproj/project.pbxproj:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected
* khtml/rendering/render_replaced.h:
(khtml::RenderWidget::selectionState): new override
* kwq/KWQWidget.h:
* kwq/KWQWidget.mm:
(QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:]
(QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:]
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectionColor]): new
WebKit:
Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
Reviewed by kocienda.
* Plugins.subproj/WebPlugin.h: extended SPI for selection
* Plugins.subproj/WebPluginContainer.h: ditto
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController selectionColor]): new, calls [WebCoreBridge selectionColor]
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge setIsSelected:forView:]): new, calls [WebPlugin setIsSelected:]
(-[WebBridge isViewSelected:]): new, calls [WebPlugin isSelected]
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5833585..08bfc24 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2004-04-05 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
+
+ Reviewed by kocienda.
+
+ * WebCore.pbproj/project.pbxproj:
+ * khtml/rendering/render_replaced.cpp:
+ (RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected
+ * khtml/rendering/render_replaced.h:
+ (khtml::RenderWidget::selectionState): new override
+ * kwq/KWQWidget.h:
+ * kwq/KWQWidget.mm:
+ (QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:]
+ (QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:]
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge selectionColor]): new
+
2004-04-03 David Hyatt <hyatt at apple.com>
Fix for 3601728, text overlaps borders at ejai.org. Remove all the code in addForbidden for
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index cf72d39..fa98855 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -294,7 +294,6 @@
F523D2CB02DE4438018635CA,
F523D2CD02DE4438018635CA,
F523D2CF02DE4438018635CA,
- BC7294FE03804B5600A80166,
BC7C965303E9EE7000A80004,
F523D2D302DE4438018635CA,
F523D2D502DE4438018635CA,
@@ -532,6 +531,7 @@
BE91FC8D06133666005E3790,
BE91FC9206133697005E3790,
832556E5061DF155007B8054,
+ 832557C4061E3172007B8054,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -1218,6 +1218,20 @@
settings = {
};
};
+ 832557C3061E3172007B8054 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ path = render_arena.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 832557C4061E3172007B8054 = {
+ fileRef = 832557C3061E3172007B8054;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
//830
//831
//832
@@ -2135,26 +2149,12 @@
refType = 4;
sourceTree = "<group>";
};
- BC7294FC03804B5600A80166 = {
- fileEncoding = 30;
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- path = render_arena.h;
- refType = 4;
- sourceTree = "<group>";
- };
BC7294FD03804B5600A80166 = {
fileRef = BC7294FB03804B5600A80166;
isa = PBXBuildFile;
settings = {
};
};
- BC7294FE03804B5600A80166 = {
- fileRef = BC7294FC03804B5600A80166;
- isa = PBXBuildFile;
- settings = {
- };
- };
BC74596205954CC80058C893 = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -5965,7 +5965,6 @@
F523D2A102DE4438018635CA,
F523D2A402DE4438018635CA,
F523D2A302DE4438018635CA,
- BC7294FC03804B5600A80166,
BC7294FB03804B5600A80166,
BC7C964F03E9EE7000A80004,
BC7C964E03E9EE7000A80004,
@@ -6003,12 +6002,12 @@
F523D2C402DE4438018635CA,
F523D2C702DE4438018635CA,
F523D2C602DE4438018635CA,
+ 832557C3061E3172007B8054,
BC7294FB03804B5600A80166,
- BC7294FC03804B5600A80166,
- BCF0192403D3802200B2D04D,
BCF0192503D3802200B2D04D,
- BC32C2EC048BF95C00A8000B,
+ BCF0192403D3802200B2D04D,
BC32C2ED048BF95C00A8000B,
+ BC32C2EC048BF95C00A8000B,
);
isa = PBXGroup;
path = rendering;
diff --git a/WebCore/khtml/rendering/render_replaced.cpp b/WebCore/khtml/rendering/render_replaced.cpp
index bdb7385..a9a399c 100644
--- a/WebCore/khtml/rendering/render_replaced.cpp
+++ b/WebCore/khtml/rendering/render_replaced.cpp
@@ -22,9 +22,9 @@
*
*/
#include "render_replaced.h"
-#include "render_canvas.h"
#include "render_arena.h"
+#include "render_canvas.h"
#include <assert.h>
#include <qwidget.h>
@@ -494,4 +494,12 @@ void RenderWidget::updateWidgetPositions()
}
#endif
+void RenderWidget::setSelectionState(SelectionState s)
+{
+ if (m_selectionState != s) {
+ m_selectionState = s;
+ m_widget->setIsSelected(m_selectionState != SelectionNone);
+ }
+}
+
#include "render_replaced.moc"
diff --git a/WebCore/khtml/rendering/render_replaced.h b/WebCore/khtml/rendering/render_replaced.h
index b01bbd3..1f7e91f 100644
--- a/WebCore/khtml/rendering/render_replaced.h
+++ b/WebCore/khtml/rendering/render_replaced.h
@@ -83,6 +83,9 @@ public:
RenderArena *ref() { _ref++; return renderArena(); }
void deref(RenderArena *arena);
+
+ virtual SelectionState selectionState() const {return m_selectionState;}
+ virtual void setSelectionState(SelectionState s);
#if APPLE_CHANGES
void sendConsumedMouseUp(const QPoint &mousePos, int button, int state);
@@ -101,6 +104,8 @@ protected:
bool m_deleteWidget;
QWidget *m_widget;
KHTMLView* m_view;
+
+ SelectionState m_selectionState : 3 ;
};
};
diff --git a/WebCore/kwq/KWQWidget.h b/WebCore/kwq/KWQWidget.h
index 5777282..4cd12d2 100644
--- a/WebCore/kwq/KWQWidget.h
+++ b/WebCore/kwq/KWQWidget.h
@@ -155,6 +155,9 @@ public:
void setDrawingAlpha(float alpha);
void sendConsumedMouseUp();
+
+ void setIsSelected(bool isSelected);
+ bool isSelected();
private:
KWQWidgetPrivate *data;
diff --git a/WebCore/kwq/KWQWidget.mm b/WebCore/kwq/KWQWidget.mm
index 7fbe2ff..1c8bcde 100644
--- a/WebCore/kwq/KWQWidget.mm
+++ b/WebCore/kwq/KWQWidget.mm
@@ -549,3 +549,13 @@ void QWidget::sendConsumedMouseUp()
0, 0);
KWQ_UNBLOCK_EXCEPTIONS;
}
+
+void QWidget::setIsSelected(bool isSelected)
+{
+ [KWQKHTMLPart::bridgeForWidget(this) setIsSelected:isSelected forView:getView()];
+}
+
+bool QWidget::isSelected()
+{
+ return [KWQKHTMLPart::bridgeForWidget(this) isViewSelected:getView()];
+}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index b3dd52a..d67316b 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -266,6 +266,7 @@ typedef enum {
- (int)numPendingOrLoadingRequests;
- (NSColor *)bodyBackgroundColor;
+- (NSColor *)selectionColor;
- (void)adjustViewSize;
@@ -423,6 +424,9 @@ typedef enum {
- (void)editingKeyDown:(NSEvent *)event;
+- (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view;
+- (BOOL)isViewSelected:(NSView *)view;
+
@end
// This interface definition allows those who hold a WebCoreBridge * to call all the methods
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index a8fb8df..516402c 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -1254,6 +1254,18 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
return _part->bodyBackgroundColor();
}
+- (NSColor *)selectionColor
+{
+ RenderCanvas* root = static_cast<khtml::RenderCanvas *>(_part->xmlDocImpl()->renderer());
+ if (root) {
+ RenderStyle *pseudoStyle = root->getPseudoStyle(RenderStyle::SELECTION);
+ if (pseudoStyle && pseudoStyle->backgroundColor().isValid()) {
+ return pseudoStyle->backgroundColor().getNSColor();
+ }
+ }
+ return _part->usesInactiveTextBackgroundColor() ? [NSColor secondarySelectedControlColor] : [NSColor selectedTextBackgroundColor];
+}
+
- (void)adjustViewSize
{
KHTMLView *view = _part->view();
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index da8c046..9282041 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2004-04-05 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
+
+ Reviewed by kocienda.
+
+ * Plugins.subproj/WebPlugin.h: extended SPI for selection
+ * Plugins.subproj/WebPluginContainer.h: ditto
+ * Plugins.subproj/WebPluginController.m:
+ (-[WebPluginController selectionColor]): new, calls [WebCoreBridge selectionColor]
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge setIsSelected:forView:]): new, calls [WebPlugin setIsSelected:]
+ (-[WebBridge isViewSelected:]): new, calls [WebPlugin isSelected]
+
2004-04-02 Chris Blumenberg <cblu at apple.com>
Forgot to add the WebKit copy of DOMExtensions.h.
diff --git a/WebKit/Plugins.subproj/WebPlugin.h b/WebKit/Plugins.subproj/WebPlugin.h
index 03734e8..6a0cd55 100644
--- a/WebKit/Plugins.subproj/WebPlugin.h
+++ b/WebKit/Plugins.subproj/WebPlugin.h
@@ -54,4 +54,11 @@
*/
- (void)pluginDestroy;
- at end
\ No newline at end of file
+ at end
+
+ at protocol WebPluginSelection <NSObject>
+
+- (void)setIsSelected:(BOOL)isSelected;
+- (BOOL)isSelected;
+
+ at end
diff --git a/WebKit/Plugins.subproj/WebPluginContainer.h b/WebKit/Plugins.subproj/WebPluginContainer.h
index aa4185d..4fab383 100644
--- a/WebKit/Plugins.subproj/WebPluginContainer.h
+++ b/WebKit/Plugins.subproj/WebPluginContainer.h
@@ -31,4 +31,6 @@
*/
- (void)showStatus:(NSString *)message;
+- (NSColor *)selectionColor;
+
@end
\ No newline at end of file
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index 812b63f..b8c928b 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -18,6 +18,8 @@
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebUIDelegate.h>
+#import <WebCore/WebCoreBridge.h>
+
#import <Foundation/NSURL_NSURLExtras.h>
#import <Foundation/NSURLRequest.h>
@@ -150,4 +152,9 @@
[[v _UIDelegateForwarder] webView:v setStatusText:message];
}
+- (NSColor *)selectionColor
+{
+ return [[_HTMLView _bridge] selectionColor];
+}
+
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 080a030..330c459 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -1183,4 +1183,16 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
[[_frame webView] editingKeyDown:event];
}
+- (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view
+{
+ if ([view conformsToProtocol:@protocol(WebPluginSelection)]) {
+ [(id <WebPluginSelection>)view setIsSelected:isSelected];
+ }
+}
+
+- (BOOL)isViewSelected:(NSView *)view
+{
+ return [view conformsToProtocol:@protocol(WebPluginSelection)] ? [(id <WebPluginSelection>)view isSelected] : NO;
+}
+
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list