Changeset 39362 in webkit


Ignore:
Timestamp:
Dec 17, 2008 1:11:31 PM (15 years ago)
Author:
abarth@webkit.org
Message:

WebCore:

2008-12-17 Cary Clark < caryclark@google.com>

Reviewed by Darin Adler.
Landed by Adam Barth.

Add ENABLE_TEXT_CARET to permit the ANDROID platform
to invalidate and draw the caret in a separate thread.

  • page/Frame.cpp: (WebCore::Frame::clearCaretRectIfNeeded): Body of function does nothing if text caret is disabled. (WebCore::Frame::selectionLayoutChanged): Do nothing if text caret is disabled and the caret only blinked. (WebCore::Frame::caretBlinkTimerFired): (WebCore::Frame::paintCaret): (WebCore::Frame::paintDragCaret): Body of functions does nothing if text caret is disabled.

JavaScriptCore:

2008-12-17 Cary Clark <caryclark@google.com>

Reviewed by Darin Adler.
Landed by Adam Barth.

Add ENABLE_TEXT_CARET to permit the ANDROID platform
to invalidate and draw the caret in a separate thread.

  • wtf/Platform.h: Default ENABLE_TEXT_CARET to 1.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r39360 r39362  
     12008-12-17  Cary Clark  <caryclark@google.com>
     2
     3        Reviewed by Darin Adler.
     4        Landed by Adam Barth.
     5
     6        Add ENABLE_TEXT_CARET to permit the ANDROID platform
     7        to invalidate and draw the caret in a separate thread.
     8
     9        * wtf/Platform.h:
     10        Default ENABLE_TEXT_CARET to 1.
     11
    1122008-12-17  Alexey Proskuryakov  <ap@webkit.org>
    213
  • trunk/JavaScriptCore/wtf/Platform.h

    r39325 r39362  
    424424#endif
    425425
     426#if !defined(ENABLE_TEXT_CARET)
     427#define ENABLE_TEXT_CARET 1
     428#endif
     429
    426430/* CTI only supports x86 at the moment, and has only been tested on Mac and Windows. */
    427431#if !defined(ENABLE_JIT) && PLATFORM(X86) && (PLATFORM(MAC) || PLATFORM(WIN))
  • trunk/WebCore/ChangeLog

    r39350 r39362  
     12008-12-17  Cary Clark  < caryclark@google.com>
     2
     3        Reviewed by Darin Adler.
     4        Landed by Adam Barth.
     5
     6        Add ENABLE_TEXT_CARET to permit the ANDROID platform
     7        to invalidate and draw the caret in a separate thread.
     8
     9        * page/Frame.cpp:
     10        (WebCore::Frame::clearCaretRectIfNeeded): Body of
     11        function does nothing if text caret is disabled.
     12        (WebCore::Frame::selectionLayoutChanged): Do nothing
     13        if text caret is disabled and the caret only blinked.
     14        (WebCore::Frame::caretBlinkTimerFired):
     15        (WebCore::Frame::paintCaret):
     16        (WebCore::Frame::paintDragCaret): Body of
     17        functions does nothing if text caret is disabled.
     18
    1192008-12-16  Darin Adler  <darin@apple.com>
    220
  • trunk/WebCore/page/Frame.cpp

    r39306 r39362  
    526526void Frame::clearCaretRectIfNeeded()
    527527{
     528#if ENABLE(TEXT_CARET)
    528529    if (d->m_caretPaint) {
    529530        d->m_caretPaint = false;
    530531        selection()->invalidateCaretRect();
    531532    }
     533#endif
    532534}
    533535
     
    576578    bool caretRectChanged = selection()->recomputeCaretRect();
    577579
     580#if ENABLE(TEXT_CARET)
    578581    bool shouldBlink = d->m_caretVisible
    579582        && selection()->isCaret() && selection()->isContentEditable();
     
    595598        }
    596599    }
     600#else
     601    if (!caretRectChanged)
     602        return;
     603#endif
    597604
    598605    RenderView* view = contentRenderer();
     
    628635void Frame::caretBlinkTimerFired(Timer<Frame>*)
    629636{
     637#if ENABLE(TEXT_CARET)
    630638    ASSERT(d->m_caretVisible);
    631639    ASSERT(selection()->isCaret());
     
    635643    d->m_caretPaint = !caretPaint;
    636644    selection()->invalidateCaretRect();
     645#endif
    637646}
    638647
    639648void Frame::paintCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const
    640649{
     650#if ENABLE(TEXT_CARET)
    641651    if (d->m_caretPaint && d->m_caretVisible)
    642652        selection()->paintCaret(p, tx, ty, clipRect);
     653#endif
    643654}
    644655
    645656void Frame::paintDragCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const
    646657{
     658#if ENABLE(TEXT_CARET)
    647659    SelectionController* dragCaretController = d->m_page->dragCaretController();
    648660    ASSERT(dragCaretController->selection().isCaret());
    649661    if (dragCaretController->selection().start().node()->document()->frame() == this)
    650662        dragCaretController->paintCaret(p, tx, ty, clipRect);
     663#endif
    651664}
    652665
Note: See TracChangeset for help on using the changeset viewer.