Commit fd19bb38 authored by darin's avatar darin

2006-10-04 Darin Adler <darin@apple.com>

        Reviewed by Geoff.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11132
          Caret disappears when you're typing

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::setSelection): Remove unnecessary call to
        clearCaretRectIfNeeded. The recomputeCaretRect now takes care of this.
        (WebCore::SelectionController::recomputeCaretRect): Explicitly set m_needsLayout
        to false so we can get the old caret repaint rect. Later we need to change the
        design so getting the rect doesn't have a side effect of causing a layout without
        invalidation.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 01ad47aa
2006-10-04 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix http://bugs.webkit.org/show_bug.cgi?id=11132
Caret disappears when you're typing
* editing/SelectionController.cpp:
(WebCore::SelectionController::setSelection): Remove unnecessary call to
clearCaretRectIfNeeded. The recomputeCaretRect now takes care of this.
(WebCore::SelectionController::recomputeCaretRect): Explicitly set m_needsLayout
to false so we can get the old caret repaint rect. Later we need to change the
design so getting the rect doesn't have a side effect of causing a layout without
invalidation.
2006-10-03 David Harrison <harrison@apple.com>
Reviewed by Maciej.
......@@ -103,8 +103,6 @@ void SelectionController::setSelection(const Selection& s, bool closeTyping, boo
if (m_sel == s)
return;
m_frame->clearCaretRectIfNeeded();
Selection oldSelection = m_sel;
m_sel = s;
......@@ -799,8 +797,14 @@ bool SelectionController::recomputeCaretRect()
if (!m_needsLayout)
return false;
// Set m_needsLayout to false to get the "old" repaint rect,
// since caretRepaintRect currently recomputes the rect if
// m_needsLayout is true. It's a problem if that ever happens
// outside this function, so we need to change that design in
// the future.
m_needsLayout = false;
IntRect oldRect = caretRepaintRect();
layout();
m_needsLayout = true;
IntRect newRect = caretRepaintRect();
if (oldRect == newRect)
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment