[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
eric at webkit.org
eric at webkit.org
Fri Feb 26 22:21:53 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit c708c87aea6da857d73f3753cdfa72b2a8d0f786
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 17 02:49:36 2010 +0000
2010-02-16 MORITA Hajime <morrita at gmail.com>
Reviewed by Nikolas Zimmermann.
REGRESSION: SVG text disappaears after double click
https://bugs.webkit.org/show_bug.cgi?id=34880
* platform/mac/svg/text/selection-doubleclick-expected.checksum: Added.
* platform/mac/svg/text/selection-doubleclick-expected.png: Added.
* platform/mac/svg/text/selection-doubleclick-expected.txt: Added.
* platform/mac/svg/text/selection-tripleclick-expected.checksum: Added.
* platform/mac/svg/text/selection-tripleclick-expected.png: Added.
* platform/mac/svg/text/selection-tripleclick-expected.txt: Added.
* svg/text/selection-doubleclick.svg: Added.
* svg/text/selection-tripleclick.svg: Added.
2010-02-16 MORITA Hajime <morrita at gmail.com>
Reviewed by Nikolas Zimmermann.
REGRESSION: SVG text disappaears after double click
https://bugs.webkit.org/show_bug.cgi?id=34880
Tests: svg/text/selection-doubleclick.svg
svg/text/selection-tripleclick.svg
* rendering/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBoxPaintWalker::mayHaveSelection):
Use InlineTextBox::selectionStartEnd() instead of
RenderObject::selectionStartEnd() because latter may span multiple
comparing startPos and endPos is irrelevant in some cases.
former selectionStartEnd() is for single line and comparing
startPos and endPos will make sense.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e0d3d73..128f1d7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-16 MORITA Hajime <morrita at gmail.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ REGRESSION: SVG text disappaears after double click
+ https://bugs.webkit.org/show_bug.cgi?id=34880
+
+ * platform/mac/svg/text/selection-doubleclick-expected.checksum: Added.
+ * platform/mac/svg/text/selection-doubleclick-expected.png: Added.
+ * platform/mac/svg/text/selection-doubleclick-expected.txt: Added.
+ * platform/mac/svg/text/selection-tripleclick-expected.checksum: Added.
+ * platform/mac/svg/text/selection-tripleclick-expected.png: Added.
+ * platform/mac/svg/text/selection-tripleclick-expected.txt: Added.
+ * svg/text/selection-doubleclick.svg: Added.
+ * svg/text/selection-tripleclick.svg: Added.
+
2010-02-16 Yusuke Sato <yusukes at chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.checksum b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.checksum
new file mode 100644
index 0000000..ab13fe3
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.checksum
@@ -0,0 +1 @@
+c1000b75048a1656c121b2abe9f42d81
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png
new file mode 100644
index 0000000..1c6c6fa
Binary files /dev/null and b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.txt b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.txt
new file mode 100644
index 0000000..8f9d062
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/selection-doubleclick-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGText {text} at (14,10) size 53x11 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,-9) size 53x11
+ chunk 1 text run 1 at (14.00,10.00) startOffset 0 endOffset 11 width 53.00: "foo bar baz"
+ RenderSVGText {text} at (14,20) size 39x11 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,-9) size 39x11
+ chunk 1 text run 1 at (14.00,20.00) startOffset 0 endOffset 9 width 39.00: "next line"
+selection start: position 4 of child 0 {#text} of child 1 {text} of child 0 {svg} of document
+selection end: position 7 of child 0 {#text} of child 1 {text} of child 0 {svg} of document
diff --git a/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.checksum b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.checksum
new file mode 100644
index 0000000..ec3e9a2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.checksum
@@ -0,0 +1 @@
+4092027ddf8a883958306101d92f52ef
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png
new file mode 100644
index 0000000..19ea2e5
Binary files /dev/null and b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.txt b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.txt
new file mode 100644
index 0000000..42ddcec
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/text/selection-tripleclick-expected.txt
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 800x600
+ RenderSVGText {text} at (14,10) size 53x11 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,-9) size 53x11
+ chunk 1 text run 1 at (14.00,10.00) startOffset 0 endOffset 11 width 53.00: "foo bar baz"
+ RenderSVGText {text} at (14,20) size 39x11 contains 1 chunk(s)
+ RenderSVGInlineText {#text} at (0,-9) size 39x11
+ chunk 1 text run 1 at (14.00,20.00) startOffset 0 endOffset 9 width 39.00: "next line"
+selection start: position 0 of child 0 {#text} of child 1 {text} of child 0 {svg} of document
+selection end: position 0 of child 3 {text} of child 0 {svg} of document
diff --git a/LayoutTests/svg/text/selection-doubleclick.svg b/LayoutTests/svg/text/selection-doubleclick.svg
new file mode 100644
index 0000000..1aee715
--- /dev/null
+++ b/LayoutTests/svg/text/selection-doubleclick.svg
@@ -0,0 +1,20 @@
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 160 120">
+ <text id="line1" x="14" y="10" font-family="Arial" font-size="10" fill="black">foo bar baz</text>
+ <text id="line2" x="14" y="20" font-family="Arial" font-size="10" fill="black">next line</text>
+<script>
+var bbox = document.getElementById("line1").getBBox();
+var cx = (bbox.x + bbox.width)/2;
+var cy = (bbox.y + bbox.height)/2;
+
+if (eventSender) {
+ eventSender.mouseMoveTo(cx, cy);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+if (window.layoutTestController)
+ window.layoutTestController.dumpSelectionRect();
+</script>
+</svg>
diff --git a/LayoutTests/svg/text/selection-tripleclick.svg b/LayoutTests/svg/text/selection-tripleclick.svg
new file mode 100644
index 0000000..afb4fe0
--- /dev/null
+++ b/LayoutTests/svg/text/selection-tripleclick.svg
@@ -0,0 +1,22 @@
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 160 120">
+ <text id="line1" x="14" y="10" font-family="Arial" font-size="10" fill="black">foo bar baz</text>
+ <text id="line2" x="14" y="20" font-family="Arial" font-size="10" fill="black">next line</text>
+<script>
+var bbox = document.getElementById("line1").getBBox();
+var cx = (bbox.x + bbox.width)/2;
+var cy = (bbox.y + bbox.height)/2;
+
+if (eventSender) {
+ eventSender.mouseMoveTo(cx, cy);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+}
+
+if (window.layoutTestController)
+ window.layoutTestController.dumpSelectionRect();
+</script>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 54823a9..d98c7b4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-02-16 MORITA Hajime <morrita at gmail.com>
+
+ Reviewed by Nikolas Zimmermann.
+
+ REGRESSION: SVG text disappaears after double click
+ https://bugs.webkit.org/show_bug.cgi?id=34880
+
+ Tests: svg/text/selection-doubleclick.svg
+ svg/text/selection-tripleclick.svg
+
+ * rendering/SVGRootInlineBox.cpp:
+ (WebCore::SVGRootInlineBoxPaintWalker::mayHaveSelection):
+ Use InlineTextBox::selectionStartEnd() instead of
+ RenderObject::selectionStartEnd() because latter may span multiple
+ comparing startPos and endPos is irrelevant in some cases.
+ former selectionStartEnd() is for single line and comparing
+ startPos and endPos will make sense.
+
2010-02-16 Jessie Berlin <jberlin at webkit.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/rendering/SVGRootInlineBox.cpp b/WebCore/rendering/SVGRootInlineBox.cpp
index 6cc3ced..03b9db4 100644
--- a/WebCore/rendering/SVGRootInlineBox.cpp
+++ b/WebCore/rendering/SVGRootInlineBox.cpp
@@ -363,10 +363,10 @@ struct SVGRootInlineBoxPaintWalker {
ASSERT(!m_chunkStarted);
}
- bool mayHaveSelection(InlineBox* box) const
+ bool mayHaveSelection(SVGInlineTextBox* box) const
{
int selectionStart = 0, selectionEnd = 0;
- box->renderer()->selectionStartEnd(selectionStart, selectionEnd);
+ box->selectionStartEnd(selectionStart, selectionEnd);
return selectionStart < selectionEnd;
}
@@ -436,13 +436,13 @@ struct SVGRootInlineBoxPaintWalker {
m_paintInfo.rect = m_savedInfo.rect;
}
- bool setupBackground(InlineBox* /*box*/)
+ bool setupBackground(SVGInlineTextBox* /*box*/)
{
m_textPaintInfo.subphase = SVGTextPaintSubphaseBackground;
return true;
}
- bool setupFill(InlineBox* box)
+ bool setupFill(SVGInlineTextBox* box)
{
InlineFlowBox* flowBox = box->parent();
@@ -464,7 +464,7 @@ struct SVGRootInlineBoxPaintWalker {
return false;
}
- bool setupFillSelection(InlineBox* box)
+ bool setupFillSelection(SVGInlineTextBox* box)
{
InlineFlowBox* flowBox = box->parent();
@@ -492,7 +492,7 @@ struct SVGRootInlineBoxPaintWalker {
return false;
}
- bool setupStroke(InlineBox* box)
+ bool setupStroke(SVGInlineTextBox* box)
{
InlineFlowBox* flowBox = box->parent();
@@ -516,7 +516,7 @@ struct SVGRootInlineBoxPaintWalker {
return false;
}
- bool setupStrokeSelection(InlineBox* box)
+ bool setupStrokeSelection(SVGInlineTextBox* box)
{
InlineFlowBox* flowBox = box->parent();
@@ -545,7 +545,7 @@ struct SVGRootInlineBoxPaintWalker {
return false;
}
- bool setupForeground(InlineBox* /*box*/)
+ bool setupForeground(SVGInlineTextBox* /*box*/)
{
teardownFillPaintServer();
teardownStrokePaintServer();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list