Changeset 116475 in webkit
- Timestamp:
- May 8, 2012 6:32:43 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116473 r116475 1 2012-05-08 Kangil Han <kangil.han@samsung.com> 2 3 [EFL][DRT] Implement TextInputController. 4 https://bugs.webkit.org/show_bug.cgi?id=78559 5 6 Reviewed by Martin Robinson. 7 8 TextInputController has been created for an input emulation purpose in DRT. 9 However, not like other ports, EFL doesn't have it. 10 Therefore, this patch will enable EFL port to have an input emulation in DRT. 11 12 * platform/efl/Skipped: 13 1 14 2012-05-08 Jon Lee <jonlee@apple.com> 2 15 -
trunk/LayoutTests/platform/efl/Skipped
r116464 r116475 210 210 editing/text-iterator/basic-iteration.html 211 211 212 # EFL's DRT needs a TextInputController213 editing/input/ime-composition-clearpreedit.html 212 # EFL's DRT key down bug 213 # https://bugs.webkit.org/show_bug.cgi?id=84710 214 214 editing/input/password-echo-passnode.html 215 215 editing/input/password-echo-passnode2.html 216 editing/input/password-echo-passnode3.html 217 editing/input/password-echo-textnode.html 216 217 # EFL's editor doesn't cancel composition as change of value 218 # https://bugs.webkit.org/show_bug.cgi?id=85122 218 219 editing/input/setting-input-value-cancel-ime-composition.html 219 editing/inserting/caret-position.html 220 editing/inserting/insert-composition-whitespace.html 221 editing/selection/5825350-1.html 222 editing/selection/5825350-2.html 223 editing/selection/mixed-editability-10.html 224 editing/selection/move-left-right.html 225 fast/dom/tab-in-right-alignment.html 226 fast/events/ime-composition-events-001.html 220 221 # EFL's textarea and textfield doesn't handle whitespace style 222 # https://bugs.webkit.org/show_bug.cgi?id=85123 227 223 fast/forms/cursor-at-editable-content-boundary.html 228 fast/forms/input-maxlength-ime-completed.html229 fast/forms/input-maxlength-ime-preedit.html230 fast/text/international/thai-cursor-position.html231 svg/text/caret-in-svg-text.xhtml232 224 233 225 # EFL's LayoutTestController does not implement setMediaType … … 1795 1787 transitions/svg-text-shadow-transition.html 1796 1788 transitions/svg-transitions.html 1789 fast/dom/Window/window-properties.html 1790 fast/dom/prototype-inheritance-2.html 1797 1791 1798 1792 # EFL DRT doesn't fully support http tests yet. These tests make timeout error. -
trunk/Source/WebKit/efl/ChangeLog
r116470 r116475 1 2012-05-08 Kangil Han <kangil.han@samsung.com> 2 3 [EFL][DRT] Implement TextInputController. 4 https://bugs.webkit.org/show_bug.cgi?id=78559 5 6 Reviewed by Martin Robinson. 7 8 TextInputController has been created for an input emulation purpose in DRT. 9 However, not like other ports, EFL doesn't have it. 10 Therefore, this patch will enable EFL port to have an input emulation in DRT. 11 12 * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: 13 (DumpRenderTreeSupportEfl::setComposition): 14 (DumpRenderTreeSupportEfl::hasComposition): 15 (DumpRenderTreeSupportEfl::compositionRange): 16 (DumpRenderTreeSupportEfl::confirmComposition): 17 (DumpRenderTreeSupportEfl::firstRectForCharacterRange): 18 (DumpRenderTreeSupportEfl::selectedRange): 19 * WebCoreSupport/DumpRenderTreeSupportEfl.h: 20 1 21 2012-04-23 Raphael Kubo da Costa <rakuco@webkit.org> 2 22 -
trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
r116470 r116475 44 44 #include <RenderTreeAsText.h> 45 45 #include <Settings.h> 46 #include <TextIterator.h> 46 47 #include <WebKitMutationObserver.h> 47 48 #include <bindings/js/GCController.h> … … 616 617 corePage->settings()->setAuthorAndUserStylesEnabled(enabled); 617 618 } 619 620 void DumpRenderTreeSupportEfl::setComposition(Evas_Object* ewkView, const char* text, int start, int length) 621 { 622 WebCore::Page* page = EWKPrivate::corePage(ewkView); 623 if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame()) 624 return; 625 626 WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor(); 627 if (!editor || (!editor->canEdit() && !editor->hasComposition())) 628 return; 629 630 const String compositionString = String::fromUTF8(text); 631 Vector<WebCore::CompositionUnderline> underlines; 632 underlines.append(WebCore::CompositionUnderline(0, compositionString.length(), WebCore::Color(0, 0, 0), false)); 633 editor->setComposition(compositionString, underlines, start, start + length); 634 } 635 636 bool DumpRenderTreeSupportEfl::hasComposition(const Evas_Object* ewkView) 637 { 638 const WebCore::Page* page = EWKPrivate::corePage(ewkView); 639 if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame()) 640 return false; 641 642 const WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor(); 643 if (!editor) 644 return false; 645 646 return editor->hasComposition(); 647 } 648 649 bool DumpRenderTreeSupportEfl::compositionRange(Evas_Object* ewkView, int* start, int* length) 650 { 651 *start = *length = 0; 652 653 WebCore::Page* page = EWKPrivate::corePage(ewkView); 654 if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame()) 655 return false; 656 657 WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor(); 658 if (!editor || !editor->hasComposition()) 659 return false; 660 661 *start = editor->compositionStart(); 662 *length = editor->compositionEnd() - *start; 663 return true; 664 } 665 666 void DumpRenderTreeSupportEfl::confirmComposition(Evas_Object* ewkView, const char* text) 667 { 668 WebCore::Page* page = EWKPrivate::corePage(ewkView); 669 if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame()) 670 return; 671 672 WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor(); 673 if (!editor) 674 return; 675 676 if (!editor->hasComposition()) { 677 editor->insertText(String::fromUTF8(text), 0); 678 return; 679 } 680 681 if (text) { 682 editor->confirmComposition(String::fromUTF8(text)); 683 return; 684 } 685 editor->confirmComposition(); 686 } 687 688 WebCore::IntRect DumpRenderTreeSupportEfl::firstRectForCharacterRange(Evas_Object* ewkView, int location, int length) 689 { 690 WebCore::Page* page = EWKPrivate::corePage(ewkView); 691 if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame() || !page->focusController()->focusedOrMainFrame()->editor()) 692 return WebCore::IntRect(); 693 694 if ((location + length < location) && (location + length)) 695 length = 0; 696 697 WebCore::Frame* frame = page->focusController()->focusedOrMainFrame(); 698 WebCore::Editor* editor = frame->editor(); 699 700 RefPtr<WebCore::Range> range = WebCore::TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length); 701 if (!range) 702 return WebCore::IntRect(); 703 704 return editor->firstRectForRange(range.get()); 705 } 706 707 bool DumpRenderTreeSupportEfl::selectedRange(Evas_Object* ewkView, int* start, int* length) 708 { 709 if (!(start && length)) 710 return false; 711 712 WebCore::Page* page = EWKPrivate::corePage(ewkView); 713 if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame()) 714 return false; 715 716 WebCore::Frame* frame = page->focusController()->focusedOrMainFrame(); 717 RefPtr<WebCore::Range> range = frame->selection()->toNormalizedRange().get(); 718 if (!range) 719 return false; 720 721 WebCore::Element* selectionRoot = frame->selection()->rootEditableElement(); 722 WebCore::Element* scope = selectionRoot ? selectionRoot : frame->document()->documentElement(); 723 724 RefPtr<WebCore::Range> testRange = WebCore::Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset()); 725 *start = WebCore::TextIterator::rangeLength(testRange.get()); 726 727 WebCore::ExceptionCode ec; 728 testRange->setEnd(range->endContainer(), range->endOffset(), ec); 729 *length = WebCore::TextIterator::rangeLength(testRange.get()); 730 731 return true; 732 } -
trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
r116470 r116475 99 99 static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef); 100 100 static void setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool); 101 102 // TextInputController 103 static void setComposition(Evas_Object*, const char*, int, int); 104 static bool hasComposition(const Evas_Object*); 105 static bool compositionRange(Evas_Object*, int*, int*); 106 static void confirmComposition(Evas_Object*, const char*); 107 static WebCore::IntRect firstRectForCharacterRange(Evas_Object*, int, int); 108 static bool selectedRange(Evas_Object*, int*, int*); 101 109 }; 102 110 -
trunk/Tools/ChangeLog
r116470 r116475 1 2012-05-08 Kangil Han <kangil.han@samsung.com> 2 3 [EFL][DRT] Implement TextInputController. 4 https://bugs.webkit.org/show_bug.cgi?id=78559 5 6 Reviewed by Martin Robinson. 7 8 TextInputController has been created for an input emulation purpose in DRT. 9 However, not like other ports, EFL doesn't have it. 10 Therefore, this patch will enable EFL port to have an input emulation in DRT. 11 12 * DumpRenderTree/efl/CMakeLists.txt: 13 * DumpRenderTree/efl/DumpRenderTreeChrome.cpp: 14 (DumpRenderTreeChrome::onWindowObjectCleared): 15 * DumpRenderTree/efl/TextInputController.cpp: Added. 16 (setMarkedTextCallback): 17 (hasMarkedTextCallback): 18 (markedRangeCallback): 19 (insertTextCallback): 20 (unmarkTextCallback): 21 (firstRectForCharacterRangeCallback): 22 (selectedRangeCallback): 23 (makeTextInputController): 24 * DumpRenderTree/efl/TextInputController.h: Added. 25 1 26 2012-04-23 Raphael Kubo da Costa <rakuco@webkit.org> 2 27 -
trunk/Tools/DumpRenderTree/efl/CMakeLists.txt
r116049 r116475 16 16 ${TOOLS_DIR}/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 17 17 ${TOOLS_DIR}/DumpRenderTree/efl/PixelDumpSupportEfl.cpp 18 ${TOOLS_DIR}/DumpRenderTree/efl/TextInputController.cpp 18 19 ${TOOLS_DIR}/DumpRenderTree/efl/WorkQueueItemEfl.cpp 19 20 ) -
trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
r116416 r116475 34 34 #include "LayoutTestController.h" 35 35 #include "NotImplemented.h" 36 #include "TextInputController.h" 36 37 #include "WebCoreSupport/DumpRenderTreeSupportEfl.h" 37 38 #include "WebCoreTestSupport.h" … … 369 370 kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0); 370 371 372 JSRetainPtr<JSStringRef> textInputControllerName(JSStringCreateWithUTF8CString("textInputController")); 373 JSObjectSetProperty(objectClearedInfo->context, objectClearedInfo->windowObject, 374 textInputControllerName.get(), 375 makeTextInputController(objectClearedInfo->context), 376 kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0); 377 371 378 WebCoreTestSupport::injectInternalsObject(objectClearedInfo->context); 372 379 }
Note: See TracChangeset
for help on using the changeset viewer.