[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

leviw at chromium.org leviw at chromium.org
Sun Feb 20 23:17:45 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 7b201aad26e90c9fa000986ceac024f555abc7d5
Author: leviw at chromium.org <leviw at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 19 19:27:10 2011 +0000

    2011-01-19  Levi Weintraub  <leviw at chromium.org>
    
            Reviewed by Darin Adler.
    
            Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
            logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
            resulted in the caret being placed incorrectly in overflowing editable IFrame content.
    
            Long lines in non-white-space-pre editable documents show cursor in wrong place
            https://bugs.webkit.org/show_bug.cgi?id=48132
    
            * editing/selection/caret-painting-in-overflowing-autowrap-content.html: Added.
            * editing/selection/resources/iframe-positioning-caret-at-end.html: Added.
            * platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.checksum: Added.
            * platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.png: Added.
            * platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.txt: Added.
    2011-01-19  Levi Weintraub  <leviw at chromium.org>
    
            Reviewed by Darin Adler.
    
            Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
            logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
            resulted in the caret being placed incorrectly in overflowing editable IFrame content.
    
            Long lines in non-white-space-pre editable documents show cursor in wrong place
            https://bugs.webkit.org/show_bug.cgi?id=48132
    
            Test: editing/selection/caret-painting-in-overflowing-autowrap-content.html
    
            * rendering/RenderText.cpp:
            (WebCore::RenderText::localCaretRect):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76144 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9175d9b..f3d1176 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2011-01-19  Levi Weintraub  <leviw at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
+        logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
+        resulted in the caret being placed incorrectly in overflowing editable IFrame content.
+
+        Long lines in non-white-space-pre editable documents show cursor in wrong place
+        https://bugs.webkit.org/show_bug.cgi?id=48132
+
+        * editing/selection/caret-painting-in-overflowing-autowrap-content.html: Added.
+        * editing/selection/resources/iframe-positioning-caret-at-end.html: Added.
+        * platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.checksum: Added.
+        * platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.png: Added.
+        * platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.txt: Added.
+
 2011-01-19  Brian Weinstein  <bweinstein at apple.com>
 
         Update Windows expected results after r76115.
diff --git a/LayoutTests/editing/selection/caret-painting-in-overflowing-autowrap-content.html b/LayoutTests/editing/selection/caret-painting-in-overflowing-autowrap-content.html
new file mode 100644
index 0000000..522a84a
--- /dev/null
+++ b/LayoutTests/editing/selection/caret-painting-in-overflowing-autowrap-content.html
@@ -0,0 +1,7 @@
+<html>
+<body>
+
+<iframe src="resources/iframe-positioning-caret-at-end.html" style="border:1px solid black; width:300px; height:100px" id="iframe" onLoad="this.focus()"></iframe>
+<p>The caret should be able to be positioned at the end of the editable content in the IFrame.</p>
+</body></html>
+
diff --git a/LayoutTests/editing/selection/resources/iframe-positioning-caret-at-end.html b/LayoutTests/editing/selection/resources/iframe-positioning-caret-at-end.html
new file mode 100644
index 0000000..17cb91b
--- /dev/null
+++ b/LayoutTests/editing/selection/resources/iframe-positioning-caret-at-end.html
@@ -0,0 +1,12 @@
+<html><head></head>
+<script>
+ function runTest() {
+   document.designMode = 'on';
+   var selection = window.getSelection();
+   selection.setPosition(document.body, 1);
+   window.scrollTo(1000, 0);
+ };
+</script>
+<body onLoad="runTest();">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaXXX</body>
+</html>
+
diff --git a/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.checksum b/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.checksum
new file mode 100644
index 0000000..5095432
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.checksum
@@ -0,0 +1 @@
+49ab6961807b5cfbcb441bdf6ee124a4
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.png b/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.png
new file mode 100644
index 0000000..d6c5411
Binary files /dev/null and b/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.txt b/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.txt
new file mode 100644
index 0000000..fbbb8ee
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/selection/caret-painting-in-overflowing-autowrap-content-expected.txt
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock (anonymous) at (0,0) size 784x102
+        RenderPartObject {IFRAME} at (0,0) size 302x102 [border: (1px solid #000000)]
+          layer at (0,0) size 569x85
+            RenderView at (0,0) size 300x85
+          layer at (0,0) size 569x85
+            RenderBlock {HTML} at (0,0) size 300x85
+              RenderBody {BODY} at (8,8) size 284x69
+                RenderText {#text} at (0,0) size 561x18
+                  text run at (0,0) width 561: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaXXX"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,118) size 784x18
+        RenderText {#text} at (0,0) size 558x18
+          text run at (0,0) width 558: "The caret should be able to be positioned at the end of the editable content in the IFrame."
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 373667a..355a2c1 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-19  Levi Weintraub  <leviw at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Changing RenderText::localCaretRect to clip to its containing block's logicalLeft and
+        logicalRightLayoutOverflow instead of simply using logicalLeft and logicalRight, as this
+        resulted in the caret being placed incorrectly in overflowing editable IFrame content.
+
+        Long lines in non-white-space-pre editable documents show cursor in wrong place
+        https://bugs.webkit.org/show_bug.cgi?id=48132
+
+        Test: editing/selection/caret-painting-in-overflowing-autowrap-content.html
+
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::localCaretRect):
+
 2011-01-19  Chris Marrin  <cmarrin at apple.com>
 
         Reviewed by Simon Fraser.
diff --git a/Source/WebCore/rendering/RenderText.cpp b/Source/WebCore/rendering/RenderText.cpp
index 0d1bd91..e0b02a9 100644
--- a/Source/WebCore/rendering/RenderText.cpp
+++ b/Source/WebCore/rendering/RenderText.cpp
@@ -509,11 +509,11 @@ IntRect RenderText::localCaretRect(InlineBox* inlineBox, int caretOffset, int* e
     int leftEdge;
     int rightEdge;
     if (style()->autoWrap()) {
-        leftEdge = cb->logicalLeft();
-        rightEdge = cb->logicalRight();
+        leftEdge = cb->logicalLeftLayoutOverflow();
+        rightEdge = cb->logicalRightLayoutOverflow();
     } else {
-        leftEdge = min(cb->logicalLeft(), rootLeft);
-        rightEdge = max(cb->logicalRight(), rootRight);
+        leftEdge = min(cb->logicalLeftLayoutOverflow(), rootLeft);
+        rightEdge = max(cb->logicalRightLayoutOverflow(), rootRight);
     }
 
     bool rightAligned = false;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list