| Differences between
and this patch
- a/Source/WebKit/efl/ChangeLog +13 lines
Lines 1-3 a/Source/WebKit/efl/ChangeLog_sec1
1
2012-03-08  ChangSeok Oh  <shivamidow@gmail.com>
2
3
        [EFL] [DRT] Implement scheduleAsynchronousKeyDown.
4
        https://bugs.webkit.org/show_bug.cgi?id=79601
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Added a new API to deliver all mutations explicitly.
9
10
        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
11
        (DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary):
12
        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
13
1
2012-03-02  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
14
2012-03-02  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2
15
3
        [EFL] Enabling 'Inspect Element' in Ewk_Context_Menu_Action.
16
        [EFL] Enabling 'Inspect Element' in Ewk_Context_Menu_Action.
- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp +8 lines
Lines 37-42 a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp_sec1
37
#include <PrintContext.h>
37
#include <PrintContext.h>
38
#include <RenderTreeAsText.h>
38
#include <RenderTreeAsText.h>
39
#include <Settings.h>
39
#include <Settings.h>
40
#include <WebKitMutationObserver.h>
40
#include <bindings/js/GCController.h>
41
#include <bindings/js/GCController.h>
41
#include <history/HistoryItem.h>
42
#include <history/HistoryItem.h>
42
#include <workers/WorkerThread.h>
43
#include <workers/WorkerThread.h>
Lines 405-407 void DumpRenderTreeSupportEfl::dumpConfigurationForViewport(Evas_Object* ewkView a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp_sec2
405
    restrictScaleFactorToInitialScaleIfNotUserScalable(attributes);
406
    restrictScaleFactorToInitialScaleIfNotUserScalable(attributes);
406
    fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attributes.layoutSize.width(), attributes.layoutSize.height(), attributes.initialScale, attributes.minimumScale, attributes.maximumScale, attributes.userScalable);
407
    fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attributes.layoutSize.width(), attributes.layoutSize.height(), attributes.initialScale, attributes.minimumScale, attributes.maximumScale, attributes.userScalable);
407
}
408
}
409
410
void DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary()
411
{
412
#if ENABLE(MUTATION_OBSERVERS)
413
    WebCore::WebKitMutationObserver::deliverAllMutations();
414
#endif
415
}
- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h +2 lines
Lines 79-84 public: a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h_sec1
79
    static void setMockScrollbarsEnabled(bool);
79
    static void setMockScrollbarsEnabled(bool);
80
80
81
    static void dumpConfigurationForViewport(Evas_Object* ewkView, int deviceDPI, const WebCore::IntSize& deviceSize, const WebCore::IntSize& availableSize);
81
    static void dumpConfigurationForViewport(Evas_Object* ewkView, int deviceDPI, const WebCore::IntSize& deviceSize, const WebCore::IntSize& availableSize);
82
83
    static void deliverAllMutationsIfNecessary();
82
};
84
};
83
85
84
#endif // DumpRenderTreeSupportEfl_h
86
#endif // DumpRenderTreeSupportEfl_h
- a/Tools/ChangeLog +22 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2012-03-08  ChangSeok Oh  <shivamidow@gmail.com>
2
3
        [EFL] [DRT] Implement scheduleAsynchronousKeyDown.
4
        https://bugs.webkit.org/show_bug.cgi?id=79601
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Extracted shareable code from keyDownCallback and then added createKeyEventInfo.
9
        createKeyEventInfo creates a new structure KeyEventInfo that has keyName and modifiers
10
        and is taken over to sendKeyDown.
11
        Added sendKeyDown and sendAsynchronousKeyDown to evaluate keyDown event directly
12
        and asynchronously. Eventually, sendAsynchronousKeyDown calls sendKeyDown.
13
14
        * DumpRenderTree/efl/EventSender.cpp:
15
        (KeyEventInfo::KeyEventInfo):
16
        (KeyEventInfo):
17
        (createKeyEventInfo):
18
        (sendKeyDown):
19
        (keyDownCallback):
20
        (sendAsynchronousKeyDown):
21
        (scheduleAsynchronousKeyDownCallback):
22
1
2012-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
23
2012-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2
24
3
        Unreviewed, rolling out r110115.
25
        Unreviewed, rolling out r110115.
- a/Tools/DumpRenderTree/efl/EventSender.cpp -12 / +56 lines
Lines 4-10 a/Tools/DumpRenderTree/efl/EventSender.cpp_sec1
4
 * Copyright (C) 2009 Holger Hans Peter Freyther
4
 * Copyright (C) 2009 Holger Hans Peter Freyther
5
 * Copyright (C) 2010 Igalia S.L.
5
 * Copyright (C) 2010 Igalia S.L.
6
 * Copyright (C) 2011 ProFUSION Embedded Systems
6
 * Copyright (C) 2011 ProFUSION Embedded Systems
7
 * Copyright (C) 2011 Samsung Electronics
7
 * Copyright (C) 2011, 2012 Samsung Electronics
8
 *
8
 *
9
 * Redistribution and use in source and binary forms, with or without
9
 * Redistribution and use in source and binary forms, with or without
10
 * modification, are permitted provided that the following conditions
10
 * modification, are permitted provided that the following conditions
Lines 103-108 enum ZoomEvent { a/Tools/DumpRenderTree/efl/EventSender.cpp_sec2
103
    ZoomOut
103
    ZoomOut
104
};
104
};
105
105
106
struct KeyEventInfo {
107
    KeyEventInfo(const char* keyName, EvasKeyModifier modifiers)
108
        : keyName(keyName)
109
        , modifiers(modifiers)
110
    {
111
    }
112
113
    const char* keyName;
114
    EvasKeyModifier modifiers;
115
};
116
106
static void setEvasModifiers(Evas* evas, EvasKeyModifier modifiers)
117
static void setEvasModifiers(Evas* evas, EvasKeyModifier modifiers)
107
{
118
{
108
    static const char* modifierNames[] = { "Control", "Shift", "Alt", "Super" };
119
    static const char* modifierNames[] = { "Control", "Shift", "Alt", "Super" };
Lines 399-412 static const char* keyNameFromJSValue(JSStringRef character) a/Tools/DumpRenderTree/efl/EventSender.cpp_sec3
399
    return 0;
410
    return 0;
400
}
411
}
401
412
402
static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
413
static PassOwnPtr<KeyEventInfo> createKeyEventInfo(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
403
{
414
{
404
    Evas_Object* view = ewk_frame_view_get(browser->mainFrame());
415
    if (!ewk_frame_view_get(browser->mainFrame()))
405
    if (!view)
416
        return nullptr;
406
        return JSValueMakeUndefined(context);
407
417
408
    if (argumentCount < 1)
418
    if (argumentCount < 1)
409
        return JSValueMakeUndefined(context);
419
        return nullptr;
410
420
411
    // handle location argument.
421
    // handle location argument.
412
    int location = DomKeyLocationStandard;
422
    int location = DomKeyLocationStandard;
Lines 415-439 static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS a/Tools/DumpRenderTree/efl/EventSender.cpp_sec4
415
425
416
    JSRetainPtr<JSStringRef> character(Adopt, JSValueToStringCopy(context, arguments[0], exception));
426
    JSRetainPtr<JSStringRef> character(Adopt, JSValueToStringCopy(context, arguments[0], exception));
417
    if (exception && *exception)
427
    if (exception && *exception)
418
        return JSValueMakeUndefined(context);
428
        return nullptr;
419
429
420
    // send the event
430
    EvasKeyModifier modifiers = EvasKeyModifierNone;
421
    Evas* evas = evas_object_evas_get(view);
422
    if (argumentCount >= 2)
431
    if (argumentCount >= 2)
423
        setEvasModifiers(evas, modifiersFromJSValue(context, arguments[1]));
432
        modifiers = modifiersFromJSValue(context, arguments[1]);
424
433
425
    const CString cCharacter = character.get()->ustring().utf8();
434
    const CString cCharacter = character.get()->ustring().utf8();
426
    const char* keyName = (location == DomKeyLocationNumpad) ? keyPadNameFromJSValue(character.get()) : keyNameFromJSValue(character.get());
435
    const char* keyName = (location == DomKeyLocationNumpad) ? keyPadNameFromJSValue(character.get()) : keyNameFromJSValue(character.get());
427
428
    if (!keyName)
436
    if (!keyName)
429
        keyName = cCharacter.data();
437
        keyName = cCharacter.data();
430
438
439
    return adoptPtr(new KeyEventInfo(keyName, modifiers));
440
}
441
442
static void sendKeyDown(Evas* evas, PassOwnPtr<KeyEventInfo> keyEventInfo)
443
{
444
    if (!keyEventInfo)
445
        return;
446
447
    const char* keyName = keyEventInfo->keyName;
448
    EvasKeyModifier modifiers = keyEventInfo->modifiers;
449
431
    DumpRenderTreeSupportEfl::layoutFrame(browser->mainFrame());
450
    DumpRenderTreeSupportEfl::layoutFrame(browser->mainFrame());
451
452
    ASSERT(evas);
453
    setEvasModifiers(evas, modifiers);
432
    evas_event_feed_key_down(evas, keyName, keyName, keyName, 0, 0, 0);
454
    evas_event_feed_key_down(evas, keyName, keyName, keyName, 0, 0, 0);
433
    evas_event_feed_key_up(evas, keyName, keyName, keyName, 0, 1, 0);
455
    evas_event_feed_key_up(evas, keyName, keyName, keyName, 0, 1, 0);
434
435
    setEvasModifiers(evas, EvasKeyModifierNone);
456
    setEvasModifiers(evas, EvasKeyModifierNone);
436
457
458
    DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary();
459
}
460
461
static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
462
{
463
    OwnPtr<KeyEventInfo> keyEventInfo = createKeyEventInfo(context, argumentCount, arguments, exception);
464
    sendKeyDown(evas_object_evas_get(browser->mainFrame()), keyEventInfo.release());
465
437
    return JSValueMakeUndefined(context);
466
    return JSValueMakeUndefined(context);
438
}
467
}
439
468
Lines 508-513 static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function a/Tools/DumpRenderTree/efl/EventSender.cpp_sec5
508
    return JSValueMakeUndefined(context);
537
    return JSValueMakeUndefined(context);
509
}
538
}
510
539
540
static Eina_Bool sendAsynchronousKeyDown(void* userData)
541
{
542
    OwnPtr<KeyEventInfo> keyEventInfo = adoptPtr(static_cast<KeyEventInfo*>(userData));
543
    sendKeyDown(evas_object_evas_get(browser->mainFrame()), keyEventInfo.release());
544
    return ECORE_CALLBACK_CANCEL;
545
}
546
547
static JSValueRef scheduleAsynchronousKeyDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
548
{
549
    OwnPtr<KeyEventInfo> keyEventInfo = createKeyEventInfo(context, argumentCount, arguments, exception);
550
    ecore_idler_add(sendAsynchronousKeyDown, static_cast<void*>(keyEventInfo.leakPtr()));
551
    return JSValueMakeUndefined(context);
552
}
553
511
static JSStaticFunction staticFunctions[] = {
554
static JSStaticFunction staticFunctions[] = {
512
    { "mouseScrollBy", mouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
555
    { "mouseScrollBy", mouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
513
    { "continuousMouseScrollBy", continuousMouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
556
    { "continuousMouseScrollBy", continuousMouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Lines 516-521 static JSStaticFunction staticFunctions[] = { a/Tools/DumpRenderTree/efl/EventSender.cpp_sec6
516
    { "mouseMoveTo", mouseMoveToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
559
    { "mouseMoveTo", mouseMoveToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
517
    { "keyDown", keyDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
560
    { "keyDown", keyDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
518
    { "scheduleAsynchronousClick", scheduleAsynchronousClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
561
    { "scheduleAsynchronousClick", scheduleAsynchronousClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
562
    { "scheduleAsynchronousKeyDown", scheduleAsynchronousKeyDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
519
    { "scalePageBy", scalePageByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
563
    { "scalePageBy", scalePageByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
520
    { "textZoomIn", textZoomInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
564
    { "textZoomIn", textZoomInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
521
    { "textZoomOut", textZoomOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
565
    { "textZoomOut", textZoomOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- a/LayoutTests/ChangeLog +13 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2012-03-08  ChangSeok Oh  <shivamidow@gmail.com>
2
3
        [EFL] [DRT] Implement scheduleAsynchronousKeyDown.
4
        https://bugs.webkit.org/show_bug.cgi?id=79601
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Removed following two skipped tests.
9
        fast/mutation/end-of-task-delivery.html
10
        fast/mutation/inline-event-listener.html
11
12
        * platform/efl/Skipped:
13
1
2012-03-08  Shinya Kawanaka  <shinyak@chromium.org>
14
2012-03-08  Shinya Kawanaka  <shinyak@chromium.org>
2
15
3
        <shadow> should be rendered correctly.
16
        <shadow> should be rendered correctly.
- a/LayoutTests/platform/efl/Skipped -5 lines
Lines 1226-1236 http/tests/globalhistory a/LayoutTests/platform/efl/Skipped_sec1
1226
# PasteBoard::plainText() does not support file names.
1226
# PasteBoard::plainText() does not support file names.
1227
editing/pasteboard/drag-files-to-editable-element.html
1227
editing/pasteboard/drag-files-to-editable-element.html
1228
1228
1229
# Fails because MutationObservers are not notified at end-of-task
1230
# https://bugs.webkit.org/show_bug.cgi?id=78290
1231
fast/mutation/end-of-task-delivery.html
1232
fast/mutation/inline-event-listener.html
1233
1234
# Fails because of the security policy of the user agent?
1229
# Fails because of the security policy of the user agent?
1235
# http://webkit.org/b/79604
1230
# http://webkit.org/b/79604
1236
fast/mutation/database-callback-delivery.html
1231
fast/mutation/database-callback-delivery.html

Return to Bug 79601