[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:52:04 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8beca23bb2bd35a26be5b50bf34ae9eae91d259e
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 21 18:42:33 2004 +0000
WebCore:
Reviewed by John
* khtml/xml/dom_selection.cpp:
(DOM::Selection::modifyExtendingRightForward): Add LINE_BOUNDARY case to the switch statement in this
function. Use the startAndEndLineNodesIncludingNode helper which already existed to get the right
position.
(DOM::Selection::modifyMovingRightForward): Ditto
(DOM::Selection::modifyExtendingLeftBackward): Ditto
(DOM::Selection::modifyMovingLeftBackward): Ditto
* khtml/xml/dom_selection.h:
(DOM::Selection::): Add LINE_BOUNDARY constant to ETextGranularity enum. This
specifies a new kind of movement that we need to implement the "move-to beggining/end of line"
behavior which AppKit binds to cmd+left/right arrow keys.
* kwq/WebCoreBridge.h: Add WebSelectToLineBoundary constant. This matches
WebKit:
Reviewed by John
Add implementations for these methods. Formerly, they logged an error.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView moveToBeginningOfLine:]):
(-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
(-[WebHTMLView moveToEndOfLine:]):
(-[WebHTMLView moveToEndOfLineAndModifySelection:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6d90cd4..a3dd88d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2004-07-21 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by John
+
+ * khtml/xml/dom_selection.cpp:
+ (DOM::Selection::modifyExtendingRightForward): Add LINE_BOUNDARY case to the switch statement in this
+ function. Use the startAndEndLineNodesIncludingNode helper which already existed to get the right
+ position.
+ (DOM::Selection::modifyMovingRightForward): Ditto
+ (DOM::Selection::modifyExtendingLeftBackward): Ditto
+ (DOM::Selection::modifyMovingLeftBackward): Ditto
+ * khtml/xml/dom_selection.h:
+ (DOM::Selection::): Add LINE_BOUNDARY constant to ETextGranularity enum. This
+ specifies a new kind of movement that we need to implement the "move-to beggining/end of line"
+ behavior which AppKit binds to cmd+left/right arrow keys.
+ * kwq/WebCoreBridge.h: Add WebSelectToLineBoundary constant. This matches
+
2004-07-20 David Hyatt <hyatt at apple.com>
Fix for 3714434, user stylesheet is always parsed in strict mode, when it should honor the document's setting.
diff --git a/WebCore/khtml/editing/SelectionController.cpp b/WebCore/khtml/editing/SelectionController.cpp
index 147cca6..e66bc72 100644
--- a/WebCore/khtml/editing/SelectionController.cpp
+++ b/WebCore/khtml/editing/SelectionController.cpp
@@ -211,6 +211,12 @@ Position Selection::modifyExtendingRightForward(ETextGranularity granularity)
case LINE:
pos = pos.nextLinePosition(xPosForVerticalArrowNavigation(EXTENT));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(end().node(), end().offset(), selection);
+ pos = selection.end();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -235,6 +241,12 @@ Position Selection::modifyMovingRightForward(ETextGranularity granularity)
case LINE:
pos = end().nextLinePosition(xPosForVerticalArrowNavigation(END, state() == RANGE));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(end().node(), end().offset(), selection);
+ pos = selection.end();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -259,6 +271,12 @@ Position Selection::modifyExtendingLeftBackward(ETextGranularity granularity)
case LINE:
pos = pos.previousLinePosition(xPosForVerticalArrowNavigation(EXTENT));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(start().node(), start().offset(), selection);
+ pos = selection.start();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -283,6 +301,12 @@ Position Selection::modifyMovingLeftBackward(ETextGranularity granularity)
case LINE:
pos = start().previousLinePosition(xPosForVerticalArrowNavigation(START, state() == RANGE));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(start().node(), start().offset(), selection);
+ pos = selection.start();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
diff --git a/WebCore/khtml/editing/SelectionController.h b/WebCore/khtml/editing/SelectionController.h
index 72a12de..2b77862 100644
--- a/WebCore/khtml/editing/SelectionController.h
+++ b/WebCore/khtml/editing/SelectionController.h
@@ -48,7 +48,7 @@ public:
enum EState { NONE, CARET, RANGE };
enum EAlter { MOVE, EXTEND };
enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT };
- enum ETextGranularity { CHARACTER, WORD, LINE, PARAGRAPH };
+ enum ETextGranularity { CHARACTER, WORD, LINE, PARAGRAPH, LINE_BOUNDARY };
Selection();
Selection(const Range &);
diff --git a/WebCore/khtml/editing/selection.cpp b/WebCore/khtml/editing/selection.cpp
index 147cca6..e66bc72 100644
--- a/WebCore/khtml/editing/selection.cpp
+++ b/WebCore/khtml/editing/selection.cpp
@@ -211,6 +211,12 @@ Position Selection::modifyExtendingRightForward(ETextGranularity granularity)
case LINE:
pos = pos.nextLinePosition(xPosForVerticalArrowNavigation(EXTENT));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(end().node(), end().offset(), selection);
+ pos = selection.end();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -235,6 +241,12 @@ Position Selection::modifyMovingRightForward(ETextGranularity granularity)
case LINE:
pos = end().nextLinePosition(xPosForVerticalArrowNavigation(END, state() == RANGE));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(end().node(), end().offset(), selection);
+ pos = selection.end();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -259,6 +271,12 @@ Position Selection::modifyExtendingLeftBackward(ETextGranularity granularity)
case LINE:
pos = pos.previousLinePosition(xPosForVerticalArrowNavigation(EXTENT));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(start().node(), start().offset(), selection);
+ pos = selection.start();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -283,6 +301,12 @@ Position Selection::modifyMovingLeftBackward(ETextGranularity granularity)
case LINE:
pos = start().previousLinePosition(xPosForVerticalArrowNavigation(START, state() == RANGE));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(start().node(), start().offset(), selection);
+ pos = selection.start();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
diff --git a/WebCore/khtml/editing/selection.h b/WebCore/khtml/editing/selection.h
index 72a12de..2b77862 100644
--- a/WebCore/khtml/editing/selection.h
+++ b/WebCore/khtml/editing/selection.h
@@ -48,7 +48,7 @@ public:
enum EState { NONE, CARET, RANGE };
enum EAlter { MOVE, EXTEND };
enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT };
- enum ETextGranularity { CHARACTER, WORD, LINE, PARAGRAPH };
+ enum ETextGranularity { CHARACTER, WORD, LINE, PARAGRAPH, LINE_BOUNDARY };
Selection();
Selection(const Range &);
diff --git a/WebCore/khtml/xml/dom_selection.cpp b/WebCore/khtml/xml/dom_selection.cpp
index 147cca6..e66bc72 100644
--- a/WebCore/khtml/xml/dom_selection.cpp
+++ b/WebCore/khtml/xml/dom_selection.cpp
@@ -211,6 +211,12 @@ Position Selection::modifyExtendingRightForward(ETextGranularity granularity)
case LINE:
pos = pos.nextLinePosition(xPosForVerticalArrowNavigation(EXTENT));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(end().node(), end().offset(), selection);
+ pos = selection.end();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -235,6 +241,12 @@ Position Selection::modifyMovingRightForward(ETextGranularity granularity)
case LINE:
pos = end().nextLinePosition(xPosForVerticalArrowNavigation(END, state() == RANGE));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(end().node(), end().offset(), selection);
+ pos = selection.end();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -259,6 +271,12 @@ Position Selection::modifyExtendingLeftBackward(ETextGranularity granularity)
case LINE:
pos = pos.previousLinePosition(xPosForVerticalArrowNavigation(EXTENT));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(start().node(), start().offset(), selection);
+ pos = selection.start();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
@@ -283,6 +301,12 @@ Position Selection::modifyMovingLeftBackward(ETextGranularity granularity)
case LINE:
pos = start().previousLinePosition(xPosForVerticalArrowNavigation(START, state() == RANGE));
break;
+ case LINE_BOUNDARY: {
+ Selection selection;
+ startAndEndLineNodesIncludingNode(start().node(), start().offset(), selection);
+ pos = selection.start();
+ break;
+ }
case PARAGRAPH:
// not implemented
break;
diff --git a/WebCore/khtml/xml/dom_selection.h b/WebCore/khtml/xml/dom_selection.h
index 72a12de..2b77862 100644
--- a/WebCore/khtml/xml/dom_selection.h
+++ b/WebCore/khtml/xml/dom_selection.h
@@ -48,7 +48,7 @@ public:
enum EState { NONE, CARET, RANGE };
enum EAlter { MOVE, EXTEND };
enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT };
- enum ETextGranularity { CHARACTER, WORD, LINE, PARAGRAPH };
+ enum ETextGranularity { CHARACTER, WORD, LINE, PARAGRAPH, LINE_BOUNDARY };
Selection();
Selection(const Range &);
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 847767b..0ea3b3d 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -106,7 +106,8 @@ typedef enum {
WebSelectByCharacter,
WebSelectByWord,
WebSelectByLine,
- WebSelectByParagraph
+ WebSelectByParagraph,
+ WebSelectToLineBoundary,
} WebSelectionGranularity;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 22252e9..ff06b8d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -2,6 +2,18 @@
Reviewed by John
+ Add implementations for these methods. Formerly, they logged an error.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView moveToBeginningOfLine:]):
+ (-[WebHTMLView moveToBeginningOfLineAndModifySelection:]):
+ (-[WebHTMLView moveToEndOfLine:]):
+ (-[WebHTMLView moveToEndOfLineAndModifySelection:]):
+
+2004-07-21 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by John
+
Added some more handlers for standard Cocoa key bindings.
These are "secrets" of NSText, meaning they are not public API, but we choose to mimic.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 242b5a3..4dae157 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -2395,12 +2395,12 @@ static WebHTMLView *lastHitView = nil;
- (void)moveToBeginningOfLine:(id)sender
{
- ERROR("unimplemented");
+ [self _alterCurrentSelection:WebSelectByMoving direction:WebSelectLeft granularity:WebSelectToLineBoundary];
}
- (void)moveToBeginningOfLineAndModifySelection:(id)sender
{
- ERROR("unimplemented");
+ [self _alterCurrentSelection:WebSelectByExtending direction:WebSelectLeft granularity:WebSelectToLineBoundary];
}
- (void)moveToBeginningOfParagraph:(id)sender
@@ -2425,12 +2425,12 @@ static WebHTMLView *lastHitView = nil;
- (void)moveToEndOfLine:(id)sender
{
- ERROR("unimplemented");
+ [self _alterCurrentSelection:WebSelectByMoving direction:WebSelectRight granularity:WebSelectToLineBoundary];
}
- (void)moveToEndOfLineAndModifySelection:(id)sender
{
- ERROR("unimplemented");
+ [self _alterCurrentSelection:WebSelectByExtending direction:WebSelectRight granularity:WebSelectToLineBoundary];
}
- (void)moveToEndOfParagraph:(id)sender
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list