[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 18:31:27 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4890d0686fd4bf2240f0336e3598495175abf8d7
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 13 17:27:55 2010 +0000
2010-12-13 Benjamin Kalman <kalman at chromium.org>
Reviewed by Ojan Vafai.
Shift-End does not select to the end of the line
https://bugs.webkit.org/show_bug.cgi?id=50610
* editing/selection/extend-to-line-boundary-expected.txt: Added.
* editing/selection/extend-to-line-boundary.html: Added.
2010-12-13 Benjamin Kalman <kalman at chromium.org>
Reviewed by Ojan Vafai.
Shift-End does not select to the end of the line
https://bugs.webkit.org/show_bug.cgi?id=50610
Test: editing/selection/extend-to-line-boundary.html
* editing/SelectionController.cpp:
(WebCore::SelectionController::positionForPlatform): Use visibleStart/visibleEnd rather than
start/end.
(WebCore::SelectionController::modifyExtendingForward):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index fa29e9e..1605ed4 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-13 Benjamin Kalman <kalman at chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Shift-End does not select to the end of the line
+ https://bugs.webkit.org/show_bug.cgi?id=50610
+
+ * editing/selection/extend-to-line-boundary-expected.txt: Added.
+ * editing/selection/extend-to-line-boundary.html: Added.
+
2010-12-13 Pavel Feldman <pfeldman at chromium.org>
Not reviewed: rebaseline xss tests for window.onerror.
diff --git a/LayoutTests/editing/selection/extend-to-line-boundary-expected.txt b/LayoutTests/editing/selection/extend-to-line-boundary-expected.txt
new file mode 100644
index 0000000..884b167
--- /dev/null
+++ b/LayoutTests/editing/selection/extend-to-line-boundary-expected.txt
@@ -0,0 +1,4 @@
+Tests selecting from the start of a line to the end using lineboundary
+| "
+Lorem ipsum dolor sit amet, <#selection-anchor>consectetur adipisicing elit, sed <#selection-focus>do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+"
diff --git a/LayoutTests/editing/selection/extend-to-line-boundary.html b/LayoutTests/editing/selection/extend-to-line-boundary.html
new file mode 100644
index 0000000..9dc31a7
--- /dev/null
+++ b/LayoutTests/editing/selection/extend-to-line-boundary.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+
+<style>
+ #textContainer {
+ width: 200px;
+ }
+</style>
+
+<div contenteditable id="textContainer">
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+</div>
+
+<script src="../../resources/dump-as-markup.js"></script>
+<script>
+ textContainer = document.getElementById("textContainer");
+ text = textContainer.childNodes[0];
+
+ getSelection().setBaseAndExtent(text, 0);
+ getSelection().modify("move", "forward", "line");
+ getSelection().modify("extend", "forward", "lineboundary");
+
+ Markup.description("Tests selecting from the start of a line to the end using lineboundary");
+ Markup.dump(textContainer);
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2604a88..cb78c61 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-13 Benjamin Kalman <kalman at chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Shift-End does not select to the end of the line
+ https://bugs.webkit.org/show_bug.cgi?id=50610
+
+ Test: editing/selection/extend-to-line-boundary.html
+
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::positionForPlatform): Use visibleStart/visibleEnd rather than
+ start/end.
+ (WebCore::SelectionController::modifyExtendingForward):
+
2010-12-13 Adam Roben <aroben at apple.com>
Windows build fix after r73914
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index bc00442..3cc8859 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -302,19 +302,17 @@ TextDirection SelectionController::directionOfEnclosingBlock()
VisiblePosition SelectionController::positionForPlatform(bool isGetStart) const
{
- Position pos;
Settings* settings = m_frame ? m_frame->settings() : 0;
if (settings && settings->editingBehaviorType() == EditingMacBehavior)
- pos = isGetStart ? m_selection.start() : m_selection.end();
+ return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd();
else {
// Linux and Windows always extend selections from the extent endpoint.
// FIXME: VisibleSelection should be fixed to ensure as an invariant that
// base/extent always point to the same nodes as start/end, but which points
// to which depends on the value of isBaseFirst. Then this can be changed
// to just return m_sel.extent().
- pos = m_selection.isBaseFirst() ? m_selection.end() : m_selection.start();
+ return m_selection.isBaseFirst() ? m_selection.visibleEnd() : m_selection.visibleStart();
}
- return VisiblePosition(pos, m_selection.affinity());
}
VisiblePosition SelectionController::startForPlatform() const
@@ -385,9 +383,7 @@ VisiblePosition SelectionController::modifyExtendingForward(TextGranularity gran
pos = endOfSentence(endForPlatform());
break;
case LineBoundary:
- pos = endForPlatform();
- pos.setAffinity(UPSTREAM);
- pos = logicalEndOfLine(pos);
+ pos = logicalEndOfLine(endForPlatform());
break;
case ParagraphBoundary:
pos = endOfParagraph(endForPlatform());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list