[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:27:52 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 811bddb124339c5e023e9acfd47afa318cc8c992
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 29 20:38:43 2002 +0000
Fixed 3009074. Added [WebHTMLView jumpToSelection:] and related user interface
item validation.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView jumpToSelection:]):
(-[WebHTMLView validateUserInterfaceItem:]):
Fixed 3009074. Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
* khtml/khtml_part.cpp:
(KHTMLPart::jumpToSelection):
* khtml/khtml_part.h:
* kwq/KWQKHTMLPartImpl.h:
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::jumpToSelection):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge jumpToSelection]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 5ecd744..a1c6214 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,19 @@
2002-07-29 Richard Williamson <rjw at apple.com>
+ Fixed 3009074. Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::jumpToSelection):
+ * khtml/khtml_part.h:
+ * kwq/KWQKHTMLPartImpl.h:
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::jumpToSelection):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge jumpToSelection]):
+
+2002-07-29 Richard Williamson <rjw at apple.com>
+
Fixed 3009067. We were not correctly testing the first character of the node string. Fixed in KWQString.
This highlighted another problem. KWQ does not support unichar * string find w/ case sensitive argument.
KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so QStrings passed
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5ecd744..a1c6214 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,19 @@
2002-07-29 Richard Williamson <rjw at apple.com>
+ Fixed 3009074. Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::jumpToSelection):
+ * khtml/khtml_part.h:
+ * kwq/KWQKHTMLPartImpl.h:
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::jumpToSelection):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge jumpToSelection]):
+
+2002-07-29 Richard Williamson <rjw at apple.com>
+
Fixed 3009067. We were not correctly testing the first character of the node string. Fixed in KWQString.
This highlighted another problem. KWQ does not support unichar * string find w/ case sensitive argument.
KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so QStrings passed
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5ecd744..a1c6214 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,19 @@
2002-07-29 Richard Williamson <rjw at apple.com>
+ Fixed 3009074. Added KHTMLPart::jumpToSelection and related scaffolding (part impl, bridge, etc.)
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::jumpToSelection):
+ * khtml/khtml_part.h:
+ * kwq/KWQKHTMLPartImpl.h:
+ * kwq/KWQKHTMLPartImpl.mm:
+ (KWQKHTMLPartImpl::jumpToSelection):
+ * kwq/WebCoreBridge.h:
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge jumpToSelection]):
+
+2002-07-29 Richard Williamson <rjw at apple.com>
+
Fixed 3009067. We were not correctly testing the first character of the node string. Fixed in KWQString.
This highlighted another problem. KWQ does not support unichar * string find w/ case sensitive argument.
KWQString implements QString::find(const char *chs, int index, bool caseSensitive), so QStrings passed
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index a0e00a2..1269a6e 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -2110,6 +2110,12 @@ QString KHTMLPart::selectedText() const
return text.mid(start, end-start);
}
+void KHTMLPart::jumpToSelection()
+{
+ impl->jumpToSelection();
+}
+
+
bool KHTMLPart::hasSelection() const
{
return ( !d->m_selectionStart.isNull() &&
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index becd7c6..5c0d535 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -1090,7 +1090,8 @@ private:
friend class KHTMLPartPrivate;
#ifdef APPLE_CHANGES
-public:
+public:
+ void jumpToSelection();
void setStatusBarText(const QString &);
KWQKHTMLPartImpl *impl;
friend class KWQKHTMLPartImpl;
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index de80a74..a959617 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -107,6 +107,8 @@ public:
bool isFrameSet();
+ void jumpToSelection();
+
void overURL(const QString &url, const QString &target, int modifierState);
private:
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 560d800..477dae4 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -29,6 +29,7 @@
#import <html_documentimpl.h>
#import <render_root.h>
#import <render_frames.h>
+#import <render_text.h>
#import <khtmlpart_p.h>
#import <khtmlview.h>
@@ -721,3 +722,23 @@ void KWQKHTMLPartImpl::overURL( const QString &url, const QString &target, int m
setStatusBarText(QString::fromNSString([NSString stringWithFormat:format, url.getNSString()]));
}
+
+
+void KWQKHTMLPartImpl::jumpToSelection()
+{
+ // Assumes that selection will only ever be text nodes. This is currently
+ // true, but will it always be so?
+ if (d->m_selectionStart != 0){
+ khtml::RenderObject *ro = static_cast<khtml::RenderObject *>(d->m_selectionStart.handle()->renderer());
+
+ if (strcmp(ro->renderName(), "RenderText") == 0){
+ int x = 0, y = 0;
+ khtml::RenderText *rt = static_cast<khtml::RenderText *>(d->m_selectionStart.handle()->renderer());
+ rt->posOfChar(d->m_startOffset, x, y);
+ // The -50 offset is copied from KHTMLPart::findTextNext, which sets the contents position
+ // after finding a matched text string.
+ d->m_view->setContentsPos(x-50, y-50);
+ }
+ }
+}
+
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index de80a74..a959617 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -107,6 +107,8 @@ public:
bool isFrameSet();
+ void jumpToSelection();
+
void overURL(const QString &url, const QString &target, int modifierState);
private:
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 560d800..477dae4 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -29,6 +29,7 @@
#import <html_documentimpl.h>
#import <render_root.h>
#import <render_frames.h>
+#import <render_text.h>
#import <khtmlpart_p.h>
#import <khtmlview.h>
@@ -721,3 +722,23 @@ void KWQKHTMLPartImpl::overURL( const QString &url, const QString &target, int m
setStatusBarText(QString::fromNSString([NSString stringWithFormat:format, url.getNSString()]));
}
+
+
+void KWQKHTMLPartImpl::jumpToSelection()
+{
+ // Assumes that selection will only ever be text nodes. This is currently
+ // true, but will it always be so?
+ if (d->m_selectionStart != 0){
+ khtml::RenderObject *ro = static_cast<khtml::RenderObject *>(d->m_selectionStart.handle()->renderer());
+
+ if (strcmp(ro->renderName(), "RenderText") == 0){
+ int x = 0, y = 0;
+ khtml::RenderText *rt = static_cast<khtml::RenderText *>(d->m_selectionStart.handle()->renderer());
+ rt->posOfChar(d->m_startOffset, x, y);
+ // The -50 offset is copied from KHTMLPart::findTextNext, which sets the contents position
+ // after finding a matched text string.
+ d->m_view->setContentsPos(x-50, y-50);
+ }
+ }
+}
+
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 6a4ef66..12f0927 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -118,6 +118,7 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (NSDictionary *)elementAtPoint:(NSPoint)point;
- (BOOL)searchFor: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)caseFlag;
+- (void)jumpToSelection;
@end
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 02f775e..71dd377 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -448,4 +448,9 @@ using namespace khtml;
return part->findTextNext (QString::fromCFString((CFStringRef)string), forward, caseFlag, FALSE);
}
+- (void)jumpToSelection
+{
+ part->jumpToSelection();
+}
+
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 62d6fa1..c1d7b06 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,14 @@
2002-07-29 Richard Williamson <rjw at apple.com>
+ Fixed 3009074. Added [WebHTMLView jumpToSelection:] and related user interface
+ item validation.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView jumpToSelection:]):
+ (-[WebHTMLView validateUserInterfaceItem:]):
+
+2002-07-29 Richard Williamson <rjw at apple.com>
+
Fixed 3009085. Implemented takeFindStringFromSelection: on WebHTMLView and WebTextView.
Also added user interface item validation for that method.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 62d6fa1..c1d7b06 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,14 @@
2002-07-29 Richard Williamson <rjw at apple.com>
+ Fixed 3009074. Added [WebHTMLView jumpToSelection:] and related user interface
+ item validation.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView jumpToSelection:]):
+ (-[WebHTMLView validateUserInterfaceItem:]):
+
+2002-07-29 Richard Williamson <rjw at apple.com>
+
Fixed 3009085. Implemented takeFindStringFromSelection: on WebHTMLView and WebTextView.
Also added user interface item validation for that method.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 949b7c7..31b5a8f 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -83,6 +83,11 @@
[bridge selectAll];
}
+- (void)jumpToSelection: sender
+{
+ [[self _bridge] jumpToSelection];
+}
+
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
{
@@ -92,6 +97,8 @@
return [self hasSelection];
else if (action == @selector(takeFindStringFromSelection:))
return [self hasSelection];
+ else if (action == @selector(jumpToSelection:))
+ return [self hasSelection];
return YES;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list