[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00

enrica at apple.com enrica at apple.com
Wed Mar 17 17:56:05 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit c9295103314d3ce005b745e6364e1c9f81b4e7bc
Author: enrica at apple.com <enrica at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 22 20:05:26 2010 +0000

    Reproducible crash in WebCore::nextLinePosition on Tweeteorites.com
    <rdar://problem/7615758>
    https://bugs.webkit.org/show_bug.cgi?id=35060
    
    Reviewed by Dan Bernstein.
    
    WebCore:
    
    Test: editing/selection/extend-byline-withfloat.html
    
    * editing/visible_units.cpp:
    (WebCore::previousLinePosition): Skip elements with zero height.
    (WebCore::nextLinePosition): Skip elements with zero height.
    
    LayoutTests:
    
    * editing/selection/extend-byline-withfloat-expected.txt: Added.
    * editing/selection/extend-byline-withfloat.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55098 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5a8dd8a..87acfe3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-22  Enrica Casucci  <enrica at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Reproducible crash in WebCore::nextLinePosition on Tweeteorites.com
+        <rdar://problem/7615758>
+        https://bugs.webkit.org/show_bug.cgi?id=35060
+
+        * editing/selection/extend-byline-withfloat-expected.txt: Added.
+        * editing/selection/extend-byline-withfloat.html: Added.
+
 2010-02-22  Chris Fleizach  <cfleizach at apple.com>
 
         Reviewed by Beth Dakin.
diff --git a/LayoutTests/editing/selection/extend-byline-withfloat-expected.txt b/LayoutTests/editing/selection/extend-byline-withfloat-expected.txt
new file mode 100644
index 0000000..df2ad59
--- /dev/null
+++ b/LayoutTests/editing/selection/extend-byline-withfloat-expected.txt
@@ -0,0 +1,6 @@
+This is the test case for bug 7615758
+
+Guys, is it okay that I kinda hate the obsequious rhetorical questions people ask when they want to sound like a wry, world-weary populist? 
+by hotdogsladies (Merlin Mann), 11 hours, 31 minutes ago.  
+Favorited by
+PASSPASS
diff --git a/LayoutTests/editing/selection/extend-byline-withfloat.html b/LayoutTests/editing/selection/extend-byline-withfloat.html
new file mode 100755
index 0000000..737f862
--- /dev/null
+++ b/LayoutTests/editing/selection/extend-byline-withfloat.html
@@ -0,0 +1,53 @@
+<html>
+<head>
+<style>
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{
+    margin:0;
+    padding:0;
+    border:0;
+    outline:0;
+    font-weight:inherit;
+    font-style:inherit;
+    font-size:100%;
+    font-family:inherit;
+    vertical-align:baseline
+}
+p{margin-top:5px;margin-bottom:10px}
+a{color:#f33e1b;text-decoration:none}
+span{padding-bottom:10px;height:53px;font-family:Helvetica;font-weight:300}
+a.subtle{text-decoration:none;color:inherit}
+.twitter_username,a.twitter_username{font-size:small;font-weight:bold;color:#555; text-decoration:none}
+.tweet_text_big a.very_subtle{visibility:hidden;text-decoration:none}
+.tweet_text_big{width:600px;margin-bottom:5px;left:160px;float:left}
+.tweet_subtext{display:block;margin-top:3px;padding-bottom:4px;font-size:small;color:#666}
+.tweet_subtext span.favoriteers-header{float:left;display:block;margin-top:8px;padding-top:8px;padding-right:5px}
+</style>
+</head>
+<body style="font-family: 'Helvetica'">
+<p>This is the test case for bug <a href="<rdar://problem/7615758>">7615758</a></p>
+<p class="tweet_text_big">
+    
+    Guys, is it okay that I kinda hate the obsequious rhetorical questions people ask when they want to sound like a wry, world-weary populist?
+    <br>
+    <span class="tweet_subtext">
+        by <a href="http://twitter.com/hotdogsladies" class="twitter_username">hotdogsladies</a> (Merlin Mann),
+        <a href="http://twitter.com/hotdogsladies/status/8639030323" class="subtle">11 hours, 31 minutes ago</a>.
+        <a href="/tweet/8639030323" title="Permalink" class="very_subtle">¶</a>
+        <br>
+        <span class="favoriteers-header">Favorited by</span>
+    </span>
+    </p>
+</body>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    document.execCommand("FindString", false, "populist");
+    var sel = getSelection();
+    sel.modify("extend", "forward", "line");
+    sel.modify("extend", "forward", "line");
+    document.write("PASS");
+    sel.modify("extend", "backward", "line");
+    document.write("PASS");
+</script>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6f9782b..9d3dcbf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-22  Enrica Casucci  <enrica at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Reproducible crash in WebCore::nextLinePosition on Tweeteorites.com
+        <rdar://problem/7615758>
+        https://bugs.webkit.org/show_bug.cgi?id=35060
+
+        Test: editing/selection/extend-byline-withfloat.html
+
+        * editing/visible_units.cpp:
+        (WebCore::previousLinePosition): Skip elements with zero height.
+        (WebCore::nextLinePosition): Skip elements with zero height.
+
 2010-02-22  Nate Chapin  <japhet at chromium.org>
 
         Unreviewed, Chromium build fix.
diff --git a/WebCore/editing/visible_units.cpp b/WebCore/editing/visible_units.cpp
index 84ace83..7040229 100644
--- a/WebCore/editing/visible_units.cpp
+++ b/WebCore/editing/visible_units.cpp
@@ -569,8 +569,12 @@ VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int
     visiblePosition.getInlineBoxAndOffset(box, ignoredCaretOffset);
     if (box) {
         root = box->root()->prevRootBox();
-        if (root)
+        // We want to skip zero height boxes.
+        // This could happen in case it is a TrailingFloatsRootInlineBox.
+        if (root && root->height())
             containingBlock = renderer->containingBlock();
+        else
+            root = 0;
     }
 
     if (!root) {
@@ -671,8 +675,12 @@ VisiblePosition nextLinePosition(const VisiblePosition &visiblePosition, int x)
     visiblePosition.getInlineBoxAndOffset(box, ignoredCaretOffset);
     if (box) {
         root = box->root()->nextRootBox();
-        if (root)
+        // We want to skip zero height boxes.
+        // This could happen in case it is a TrailingFloatsRootInlineBox.
+        if (root && root->height())
             containingBlock = renderer->containingBlock();
+        else
+            root = 0;
     }
 
     if (!root) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list