[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
enrica at apple.com
enrica at apple.com
Tue Jan 5 23:51:03 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit f2051372a61bb85c842154e17b341e3638a716e4
Author: enrica at apple.com <enrica at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 16 17:59:58 2009 +0000
CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore: WebCore::endsOfNodeAreVisuallyDistinctPositions + 115
<rdar://problem/7467108>
https://bugs.webkit.org/show_bug.cgi?id=32590
Reviewed by Adele Peterson.
WebCore:
If the element is a button there is no need to look at the children to calculate the caret position.
Test: editing/selection/button-right-click.html
* dom/Position.cpp:
(WebCore::Position::getInlineBoxAndOffset): Avoid calling recursively this method,
when starting from a button element.
LayoutTests:
* editing/selection/button-right-click-expected.txt: Added.
* editing/selection/button-right-click.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 188c5aa..2036df9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-16 Enrica Casucci <enrica at apple.com>
+
+ Reviewed by Adele Peterson.
+
+ CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore: WebCore::endsOfNodeAreVisuallyDistinctPositions + 115
+ <rdar://problem/7467108>
+ https://bugs.webkit.org/show_bug.cgi?id=32590
+
+ * editing/selection/button-right-click-expected.txt: Added.
+ * editing/selection/button-right-click.html: Added.
+
2009-12-16 Csaba Osztrogonác <ossy at webkit.org>
Rubber-stamped by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/editing/selection/button-right-click-expected.txt b/LayoutTests/editing/selection/button-right-click-expected.txt
new file mode 100644
index 0000000..a832258
--- /dev/null
+++ b/LayoutTests/editing/selection/button-right-click-expected.txt
@@ -0,0 +1,3 @@
+ Color
+Footer
+
diff --git a/LayoutTests/editing/selection/button-right-click.html b/LayoutTests/editing/selection/button-right-click.html
new file mode 100644
index 0000000..c04c49d
--- /dev/null
+++ b/LayoutTests/editing/selection/button-right-click.html
@@ -0,0 +1,25 @@
+<html>
+<head>
+<title>Right clicking on the button should not crash.</title>
+</head>
+<body>
+<span class="Apple-style-span" style="font-family: Tahoma, Arial; font-size: 13px;">
+<button type="button" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style: initial; border-color: initial; padding-top: 0.2em; padding-right: 0.2em; padding-bottom: 0.2em; padding-left: 0.2em; line-height: normal; font: inherit; color: inherit; white-space: nowrap; background-repeat: repeat-x; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(222, 222, 222); border-right-color: rgb(222, 222, 222); border-bottom-color: rgb(222, 222, 222); border-left-color: rgb(222, 222, 222); cursor: pointer; vertical-align: middle; text-align: center; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 255); -webkit-user-select: none; background-position: 0% 0%; ">
+ <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; line-height: normal; font: inherit; color: inherit; display: inline-block; border-style: initial; border-color: initial; vertical-align: middle; "></div>
+ <div id="test" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0.3em; padding-bottom: 0px; padding-left: 0.3em; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; line-height: normal; font: inherit; color: inherit; display: inline-block; border-style: initial; border-color: initial; vertical-align: middle; ">Color</div>
+</button>
+<div>Footer</div>
+</span>
+
+</body>
+<script>
+if (window.layoutTestController) {
+ window.layoutTestController.dumpAsText();
+ var elem = document.getElementById("test");
+ x = elem.offsetLeft + elem.offsetWidth / 2;
+ y = elem.offsetTop + elem.offsetHeight / 2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.contextClick();
+}
+</script>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 90f301f..c71854d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-16 Enrica Casucci <enrica at apple.com>
+
+ Reviewed by Adele Peterson.
+
+ CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore: WebCore::endsOfNodeAreVisuallyDistinctPositions + 115
+ <rdar://problem/7467108>
+ https://bugs.webkit.org/show_bug.cgi?id=32590
+
+ If the element is a button there is no need to look at the children to calculate the caret position.
+
+ Test: editing/selection/button-right-click.html
+
+ * dom/Position.cpp:
+ (WebCore::Position::getInlineBoxAndOffset): Avoid calling recursively this method,
+ when starting from a button element.
+
2009-12-16 Luiz Agostini <luiz.agostini at openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/dom/Position.cpp b/WebCore/dom/Position.cpp
index 0ff8262..c83965b 100644
--- a/WebCore/dom/Position.cpp
+++ b/WebCore/dom/Position.cpp
@@ -995,7 +995,7 @@ void Position::getInlineBoxAndOffset(EAffinity affinity, TextDirection primaryDi
RenderObject* renderer = node()->renderer();
if (!renderer->isText()) {
- if (renderer->isBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
+ if (!renderer->isRenderButton() && renderer->isBlockFlow() && hasRenderedNonAnonymousDescendantsWithHeight(renderer)) {
bool lastPosition = caretOffset == lastOffsetInNode(node());
Node* startNode = lastPosition ? node()->childNode(caretOffset - 1) : node()->childNode(caretOffset);
while (startNode && (!startNode->renderer() || (startNode->isTextNode() && toRenderText(startNode->renderer())->isAllCollapsibleWhitespace())))
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list