Changeset 39362 in webkit
- Timestamp:
- Dec 17, 2008 1:11:31 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r39360 r39362 1 2008-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 1 12 2008-12-17 Alexey Proskuryakov <ap@webkit.org> 2 13 -
trunk/JavaScriptCore/wtf/Platform.h
r39325 r39362 424 424 #endif 425 425 426 #if !defined(ENABLE_TEXT_CARET) 427 #define ENABLE_TEXT_CARET 1 428 #endif 429 426 430 /* CTI only supports x86 at the moment, and has only been tested on Mac and Windows. */ 427 431 #if !defined(ENABLE_JIT) && PLATFORM(X86) && (PLATFORM(MAC) || PLATFORM(WIN)) -
trunk/WebCore/ChangeLog
r39350 r39362 1 2008-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 1 19 2008-12-16 Darin Adler <darin@apple.com> 2 20 -
trunk/WebCore/page/Frame.cpp
r39306 r39362 526 526 void Frame::clearCaretRectIfNeeded() 527 527 { 528 #if ENABLE(TEXT_CARET) 528 529 if (d->m_caretPaint) { 529 530 d->m_caretPaint = false; 530 531 selection()->invalidateCaretRect(); 531 532 } 533 #endif 532 534 } 533 535 … … 576 578 bool caretRectChanged = selection()->recomputeCaretRect(); 577 579 580 #if ENABLE(TEXT_CARET) 578 581 bool shouldBlink = d->m_caretVisible 579 582 && selection()->isCaret() && selection()->isContentEditable(); … … 595 598 } 596 599 } 600 #else 601 if (!caretRectChanged) 602 return; 603 #endif 597 604 598 605 RenderView* view = contentRenderer(); … … 628 635 void Frame::caretBlinkTimerFired(Timer<Frame>*) 629 636 { 637 #if ENABLE(TEXT_CARET) 630 638 ASSERT(d->m_caretVisible); 631 639 ASSERT(selection()->isCaret()); … … 635 643 d->m_caretPaint = !caretPaint; 636 644 selection()->invalidateCaretRect(); 645 #endif 637 646 } 638 647 639 648 void Frame::paintCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const 640 649 { 650 #if ENABLE(TEXT_CARET) 641 651 if (d->m_caretPaint && d->m_caretVisible) 642 652 selection()->paintCaret(p, tx, ty, clipRect); 653 #endif 643 654 } 644 655 645 656 void Frame::paintDragCaret(GraphicsContext* p, int tx, int ty, const IntRect& clipRect) const 646 657 { 658 #if ENABLE(TEXT_CARET) 647 659 SelectionController* dragCaretController = d->m_page->dragCaretController(); 648 660 ASSERT(dragCaretController->selection().isCaret()); 649 661 if (dragCaretController->selection().start().node()->document()->frame() == this) 650 662 dragCaretController->paintCaret(p, tx, ty, clipRect); 663 #endif 651 664 } 652 665
Note: See TracChangeset
for help on using the changeset viewer.