[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mitz at apple.com mitz at apple.com
Wed Dec 22 11:17:26 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit efa06749f7225d0989cd95541da2c0e8d1326783
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jul 16 21:01:01 2010 +0000

    <rdar://problem/7527532> Crash beneath setSelection() during detach()
    https://bugs.webkit.org/show_bug.cgi?id=42020
    
    Reviewed by Simon Fraser.
    
    No test because I am unable to reproduce the crash.
    
    * rendering/RenderView.cpp:
    (WebCore::RenderView::setSelection): In the clearSelection() case, where the repaint mode is
    RepaintNewMinusOld, avoid making RenderBlockSelectionInfo instances, and thereby avoid calling
    localToAbsolute() during detach().
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63579 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0a256b1..e48e83d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-16  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        <rdar://problem/7527532> Crash beneath setSelection() during detach()
+        https://bugs.webkit.org/show_bug.cgi?id=42020
+
+        No test because I am unable to reproduce the crash.
+
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::setSelection): In the clearSelection() case, where the repaint mode is
+        RepaintNewMinusOld, avoid making RenderBlockSelectionInfo instances, and thereby avoid calling
+        localToAbsolute() during detach().
+
 2010-07-16  Anders Carlsson  <andersca at apple.com>
 
         Fix release build.
diff --git a/WebCore/rendering/RenderView.cpp b/WebCore/rendering/RenderView.cpp
index e5295f4..3264ad5 100644
--- a/WebCore/rendering/RenderView.cpp
+++ b/WebCore/rendering/RenderView.cpp
@@ -418,13 +418,15 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
         if ((os->canBeSelectionLeaf() || os == m_selectionStart || os == m_selectionEnd) && os->selectionState() != SelectionNone) {
             // Blocks are responsible for painting line gaps and margin gaps.  They must be examined as well.
             oldSelectedObjects.set(os, new RenderSelectionInfo(os, true));
-            RenderBlock* cb = os->containingBlock();
-            while (cb && !cb->isRenderView()) {
-                RenderBlockSelectionInfo* blockInfo = oldSelectedBlocks.get(cb);
-                if (blockInfo)
-                    break;
-                oldSelectedBlocks.set(cb, new RenderBlockSelectionInfo(cb));
-                cb = cb->containingBlock();
+            if (blockRepaintMode == RepaintNewXOROld) {
+                RenderBlock* cb = os->containingBlock();
+                while (cb && !cb->isRenderView()) {
+                    RenderBlockSelectionInfo* blockInfo = oldSelectedBlocks.get(cb);
+                    if (blockInfo)
+                        break;
+                    oldSelectedBlocks.set(cb, new RenderBlockSelectionInfo(cb));
+                    cb = cb->containingBlock();
+                }
             }
         }
 
@@ -527,8 +529,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
         RenderBlockSelectionInfo* newInfo = newSelectedBlocks.get(block);
         RenderBlockSelectionInfo* oldInfo = i->second;
         if (!newInfo || oldInfo->rects() != newInfo->rects() || oldInfo->state() != newInfo->state()) {
-            if (blockRepaintMode == RepaintNewXOROld)
-                oldInfo->repaint();
+            oldInfo->repaint();
             if (newInfo) {
                 newInfo->repaint();
                 newSelectedBlocks.remove(block);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list