[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

darin at apple.com darin at apple.com
Thu Apr 8 00:33:44 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 4497f97a58c7d4c09eb64cf4031e8dcaefd07401
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 12 01:38:41 2009 +0000

    Small refactoring to get rid of some extra unneeded selection-related work
    in RenderLayer::scrollToOffset and separate caret and range selection
    logic in FrameView::layout. This may be useful later when changing how
    the range selection logic works to fix layout reentrancy problems.
    
    Reviewed by Dan Bernstein.
    
    * page/Frame.cpp: Removed invalidateSelection.
    * page/Frame.h: Ditto.
    
    * page/FrameView.cpp:
    (WebCore::FrameView::layout): Call SelectionController::setNeedsLayout
    and Frame::selectionLayoutChanged instead of calling
    Frame::invalidateSelection, which was just a function that called
    both of those others.
    
    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::scrollToOffset): Call
    SelectionController::setNeedsLayout instead of calling
    Frame::invalidateSelection. This call site only needs the caret-related
    work in that first function, not the other work formerly done by
    Frame::invalidateSelection. The caret works outside the normal
    painting and rendering system, and the range selection highlight is
    more or less inside it and doesn't need special handling when scrolling.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7eaff6c..809dc8d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2009-12-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Small refactoring to get rid of some extra unneeded selection-related work
+        in RenderLayer::scrollToOffset and separate caret and range selection
+        logic in FrameView::layout. This may be useful later when changing how
+        the range selection logic works to fix layout reentrancy problems.
+
+        * page/Frame.cpp: Removed invalidateSelection.
+        * page/Frame.h: Ditto.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout): Call SelectionController::setNeedsLayout
+        and Frame::selectionLayoutChanged instead of calling
+        Frame::invalidateSelection, which was just a function that called
+        both of those others.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollToOffset): Call
+        SelectionController::setNeedsLayout instead of calling
+        Frame::invalidateSelection. This call site only needs the caret-related
+        work in that first function, not the other work formerly done by
+        Frame::invalidateSelection. The caret works outside the normal
+        painting and rendering system, and the range selection highlight is
+        more or less inside it and doesn't need special handling when scrolling.
+
 2009-12-11  Brady Eidson  <beidson at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index b5c278d..fb1ff1d 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -556,12 +556,6 @@ void Frame::notifyRendererOfSelectionChange(bool userTriggered)
         toRenderTextControl(renderer)->selectionChanged(userTriggered);
 }
 
-void Frame::invalidateSelection()
-{
-    selection()->setNeedsLayout();
-    selectionLayoutChanged();
-}
-
 void Frame::setCaretVisible(bool flag)
 {
     if (m_caretVisible == flag)
diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h
index ca9a6d4..b47214a 100644
--- a/WebCore/page/Frame.h
+++ b/WebCore/page/Frame.h
@@ -259,8 +259,6 @@ namespace WebCore {
         void selectionLayoutChanged();
         void notifyRendererOfSelectionChange(bool userTriggered);
 
-        void invalidateSelection();
-
         void setCaretVisible(bool = true);
         void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
         void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 0b264f7..873b465 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -671,7 +671,8 @@ void FrameView::layout(bool allowSubtree)
         root->view()->popLayoutState();
     m_layoutRoot = 0;
 
-    m_frame->invalidateSelection();
+    m_frame->selection()->setNeedsLayout();
+    m_frame->selectionLayoutChanged();
    
     m_layoutSchedulingEnabled = true;
 
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 819afc7..c1639f5 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -1198,7 +1198,7 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repai
     // The caret rect needs to be invalidated after scrolling
     Frame* frame = renderer()->document()->frame();
     if (frame)
-        frame->invalidateSelection();
+        frame->selection()->setNeedsLayout();
 
     // Just schedule a full repaint of our object.
     if (repaint)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list