Title: [119243] trunk
Revision
119243
Author
[email protected]
Date
2012-06-01 09:35:49 -0700 (Fri, 01 Jun 2012)

Log Message

[EFL] EFL port does not enable WEB_INTENTS_TAG flag
https://bugs.webkit.org/show_bug.cgi?id=86866

Patch by Christophe Dumez <[email protected]> on 2012-06-01
Reviewed by Adam Barth.

.:

Enable WEB_INTENTS_TAG flag by default on EFL port.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:

Fix compilation error when WEB_INTENTS_TAG flag is enabled.
HTMLElement::insertedInto() takes a ContainerNode* in argument, not a
Node*.

Test: webintents/intent-tag.html

* CMakeLists.txt:
* html/HTMLIntentElement.cpp:
(WebCore::HTMLIntentElement::insertedInto):
* html/HTMLIntentElement.h:
(HTMLIntentElement):

Source/WebKit/efl:

Implement registerIntentService() in EFL's FrameLoaderClient.
Emit a "intent,service,register" signal on the frame when a new Web
Intent service registers.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore):
(WebCore::FrameLoaderClientEfl::registerIntentService):
* WebCoreSupport/FrameLoaderClientEfl.h:
(FrameLoaderClientEfl):
* ewk/ewk_frame.cpp:
(ewk_frame_intent_service_register):
* ewk/ewk_frame.h:
* ewk/ewk_frame_private.h:

Tools:

Catch new "intent,service,register" signal on the frame and print out
information about the Web Intent service in EFL's DumpRenderTree.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::createView):
(DumpRenderTreeChrome::onFrameCreated):
(DumpRenderTreeChrome::onFrameIntentServiceRegistration):
* DumpRenderTree/efl/DumpRenderTreeChrome.h:
(DumpRenderTreeChrome):

LayoutTests:

Unskip webintents/intent-tag.html now that the WEB_INTENTS_TAG flag is
enabled by default on EFL port.

* platform/efl/test_expectations.txt:

Modified Paths

Diff

Modified: trunk/ChangeLog (119242 => 119243)


--- trunk/ChangeLog	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/ChangeLog	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1,3 +1,16 @@
+2012-06-01  Christophe Dumez  <[email protected]>
+
+        [EFL] EFL port does not enable WEB_INTENTS_TAG flag
+        https://bugs.webkit.org/show_bug.cgi?id=86866
+
+        Reviewed by Adam Barth.
+
+        Enable WEB_INTENTS_TAG flag by default on EFL port.
+
+        * Source/cmake/OptionsEfl.cmake:
+        * Source/cmake/WebKitFeatures.cmake:
+        * Source/cmakeconfig.h.cmake:
+
 2012-05-31  Christophe Dumez  <[email protected]>
 
         [EFL] Enable CSS_IMAGE_SET flag

Modified: trunk/LayoutTests/ChangeLog (119242 => 119243)


--- trunk/LayoutTests/ChangeLog	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/LayoutTests/ChangeLog	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1,3 +1,15 @@
+2012-06-01  Christophe Dumez  <[email protected]>
+
+        [EFL] EFL port does not enable WEB_INTENTS_TAG flag
+        https://bugs.webkit.org/show_bug.cgi?id=86866
+
+        Reviewed by Adam Barth.
+
+        Unskip webintents/intent-tag.html now that the WEB_INTENTS_TAG flag is
+        enabled by default on EFL port.
+
+        * platform/efl/test_expectations.txt:
+
 2012-06-01  Dominik Röttsches  <[email protected]>
 
         [cairo] Pixel artifacts can be seen on reflections

Modified: trunk/LayoutTests/platform/efl/test_expectations.txt (119242 => 119243)


--- trunk/LayoutTests/platform/efl/test_expectations.txt	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/LayoutTests/platform/efl/test_expectations.txt	2012-06-01 16:35:49 UTC (rev 119243)
@@ -655,9 +655,6 @@
 BUGWK84167 : editing/selection/table-caret-3.html = IMAGE+TEXT
 BUGWK84167 : tables/mozilla/bugs/bug2479-2.html = IMAGE+TEXT
 
-// Incomplete Web Intents support
-BUGWK86866 SKIP : webintents/intent-tag.html = TEXT
-
 // EFL's LayoutTestController does not implement setAutomaticLinkDetectionEnabled
 BUGWK85463 SKIP : editing/inserting/typing-space-to-trigger-smart-link.html = FAIL
 

Modified: trunk/Source/WebCore/CMakeLists.txt (119242 => 119243)


--- trunk/Source/WebCore/CMakeLists.txt	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-06-01 16:35:49 UTC (rev 119243)
@@ -288,6 +288,7 @@
     html/HTMLHtmlElement.idl
     html/HTMLIFrameElement.idl
     html/HTMLImageElement.idl
+    html/HTMLIntentElement.idl
     html/HTMLInputElement.idl
     html/HTMLKeygenElement.idl
     html/HTMLLabelElement.idl
@@ -800,6 +801,7 @@
     html/HTMLIFrameElement.cpp
     html/HTMLImageElement.cpp
     html/HTMLImageLoader.cpp
+    html/HTMLIntentElement.cpp
     html/HTMLInputElement.cpp
     html/HTMLKeygenElement.cpp
     html/HTMLLIElement.cpp

Modified: trunk/Source/WebCore/ChangeLog (119242 => 119243)


--- trunk/Source/WebCore/ChangeLog	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebCore/ChangeLog	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1,3 +1,22 @@
+2012-06-01  Christophe Dumez  <[email protected]>
+
+        [EFL] EFL port does not enable WEB_INTENTS_TAG flag
+        https://bugs.webkit.org/show_bug.cgi?id=86866
+
+        Reviewed by Adam Barth.
+
+        Fix compilation error when WEB_INTENTS_TAG flag is enabled.
+        HTMLElement::insertedInto() takes a ContainerNode* in argument, not a
+        Node*.
+
+        Test: webintents/intent-tag.html
+
+        * CMakeLists.txt:
+        * html/HTMLIntentElement.cpp:
+        (WebCore::HTMLIntentElement::insertedInto):
+        * html/HTMLIntentElement.h:
+        (HTMLIntentElement):
+
 2012-06-01  Dominik Röttsches  <[email protected]>
 
         [cairo] Pixel artifacts can be seen on reflections

Modified: trunk/Source/WebCore/html/HTMLIntentElement.cpp (119242 => 119243)


--- trunk/Source/WebCore/html/HTMLIntentElement.cpp	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebCore/html/HTMLIntentElement.cpp	2012-06-01 16:35:49 UTC (rev 119243)
@@ -51,7 +51,7 @@
     return adoptRef(new HTMLIntentElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest HTMLIntentElement::insertedInto(Node* insertionPoint)
+Node::InsertionNotificationRequest HTMLIntentElement::insertedInto(ContainerNode* insertionPoint)
 {
     HTMLElement::insertedInto(insertionPoint);
 

Modified: trunk/Source/WebCore/html/HTMLIntentElement.h (119242 => 119243)


--- trunk/Source/WebCore/html/HTMLIntentElement.h	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebCore/html/HTMLIntentElement.h	2012-06-01 16:35:49 UTC (rev 119243)
@@ -42,7 +42,7 @@
 private:
     HTMLIntentElement(const QualifiedName&, Document*);
 
-    virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE;
+    virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebKit/efl/ChangeLog (119242 => 119243)


--- trunk/Source/WebKit/efl/ChangeLog	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebKit/efl/ChangeLog	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1,5 +1,26 @@
 2012-06-01  Christophe Dumez  <[email protected]>
 
+        [EFL] EFL port does not enable WEB_INTENTS_TAG flag
+        https://bugs.webkit.org/show_bug.cgi?id=86866
+
+        Reviewed by Adam Barth.
+
+        Implement registerIntentService() in EFL's FrameLoaderClient.
+        Emit a "intent,service,register" signal on the frame when a new Web
+        Intent service registers.
+
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore):
+        (WebCore::FrameLoaderClientEfl::registerIntentService):
+        * WebCoreSupport/FrameLoaderClientEfl.h:
+        (FrameLoaderClientEfl):
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_intent_service_register):
+        * ewk/ewk_frame.h:
+        * ewk/ewk_frame_private.h:
+
+2012-06-01  Christophe Dumez  <[email protected]>
+
         [EFL] ewk_intent_data_get() is not needed and can be removed
         https://bugs.webkit.org/show_bug.cgi?id=88072
 

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (119242 => 119243)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1051,6 +1051,21 @@
 }
 #endif
 
+#if ENABLE(WEB_INTENTS_TAG)
+void FrameLoaderClientEfl::registerIntentService(const String& action, const String& type, const KURL& href, const String& title, const String& disposition)
+{
+    CString actionStr = action.utf8();
+    CString typeStr = type.utf8();
+    CString hrefStr = href.string().utf8();
+    CString titleStr = title.utf8();
+    CString dispositionStr = disposition.utf8();
+
+    Ewk_Intent_Service_Info serviceInfo = { actionStr.data(), typeStr.data(), hrefStr.data(), titleStr.data(), dispositionStr.data() };
+
+    ewk_frame_intent_service_register(m_frame, &serviceInfo);
+}
+#endif
+
 PassRefPtr<FrameNetworkingContext> FrameLoaderClientEfl::createNetworkingContext()
 {
     return FrameNetworkingContextEfl::create(EWKPrivate::coreFrame(m_frame), m_frame);

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h (119242 => 119243)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h	2012-06-01 16:35:49 UTC (rev 119243)
@@ -188,6 +188,9 @@
 #if ENABLE(WEB_INTENTS)
     virtual void dispatchIntent(PassRefPtr<WebCore::IntentRequest>);
 #endif
+#if ENABLE(WEB_INTENTS_TAG)
+    virtual void registerIntentService(const String& action, const String& type, const KURL& href, const String& title, const String& disposition);
+#endif
 
     virtual WTF::PassRefPtr<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&);
     virtual void setTitle(const StringWithDirection& title, const KURL&);

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (119242 => 119243)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1587,7 +1587,20 @@
 
 /**
  * @internal
+ * Reports an intent service registration.
  *
+ * Emits signal: "intent,service,register" with pointer to a Ewk_Intent_Service_Info.
+ */
+void ewk_frame_intent_service_register(Evas_Object* ewkFrame, Ewk_Intent_Service_Info* info)
+{
+#if ENABLE(WEB_INTENTS_TAG)
+    evas_object_smart_callback_call(ewkFrame, "intent,service,register", info);
+#endif
+}
+
+/**
+ * @internal
+ *
  * Reports contents size changed.
  */
 void ewk_frame_contents_size_changed(Evas_Object* ewkFrame, Evas_Coord width, Evas_Coord height)

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.h (119242 => 119243)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.h	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.h	2012-06-01 16:35:49 UTC (rev 119243)
@@ -41,6 +41,7 @@
  *    contents were changed
  *  - "icon,changed", void: frame favicon changed.
  *  - "intent,new", Ewk_Intent_Request*: reports new intent.
+ *  - "intent,service,register", Ewk_Intent_Service_Info*: reports new intent service registration.
  *  - "load,committed", void: reports load committed.
  *  - "load,document,finished", void: frame finished loading the document.
  *  - "load,error", const Ewk_Frame_Load_Error*: reports load failed
@@ -183,6 +184,17 @@
     Eina_Bool is_entire_page_blocked; /** < indicates if the entire page was blocked by XSSAuditor */
 };
 
+/// Creates a type name for Ewk_Intent_Service_Info.
+typedef struct _Ewk_Intent_Service_Info Ewk_Intent_Service_Info;
+
+struct _Ewk_Intent_Service_Info {
+    const char *action; /**< an opaque string indicating the behavior class the service supports. */
+    const char *type; /**< a string specifying the type of payload data the service can accept. */
+    const char *href; /**< service URI. */
+    const char *title; /**< A human-readable title for the service. */
+    const char *disposition; /**< A hint about whether the service can be run "inline" or in a new "window". */
+};
+
 /// Enum containing hit test data types
 typedef enum {
     EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT = 1 << 1,

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame_private.h (119242 => 119243)


--- trunk/Source/WebKit/efl/ewk/ewk_frame_private.h	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame_private.h	2012-06-01 16:35:49 UTC (rev 119243)
@@ -70,6 +70,7 @@
 void ewk_frame_force_layout(Evas_Object* ewkFrame);
 void ewk_frame_icon_changed(Evas_Object* ewkFrame);
 void ewk_frame_intent_new(Evas_Object* ewkFrame, Ewk_Intent_Request* request);
+void ewk_frame_intent_service_register(Evas_Object* ewkFrame, Ewk_Intent_Service_Info* info);
 
 WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* ewkFrame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
 

Modified: trunk/Source/cmake/OptionsEfl.cmake (119242 => 119243)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-06-01 16:35:49 UTC (rev 119243)
@@ -86,6 +86,7 @@
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_INTENTS ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_INTENTS_TAG ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WORKERS ON)
 

Modified: trunk/Source/cmake/WebKitFeatures.cmake (119242 => 119243)


--- trunk/Source/cmake/WebKitFeatures.cmake	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/cmake/WebKitFeatures.cmake	2012-06-01 16:35:49 UTC (rev 119243)
@@ -93,6 +93,7 @@
     WEBKIT_OPTION_DEFINE(ENABLE_WEBGL "Toggle 3D canvas (WebGL) support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_WEB_AUDIO "Toggle Web Audio support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_WEB_INTENTS "Toggle Web Intents support" OFF)
+    WEBKIT_OPTION_DEFINE(ENABLE_WEB_INTENTS_TAG "Toogle HTMLIntentElement tag support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_WEB_SOCKETS "Toggle Web Sockets support" ON)
     WEBKIT_OPTION_DEFINE(ENABLE_WEB_TIMING "Toggle Web Timing support" OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_WORKERS "Toggle Web Workers support" OFF)

Modified: trunk/Source/cmakeconfig.h.cmake (119242 => 119243)


--- trunk/Source/cmakeconfig.h.cmake	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Source/cmakeconfig.h.cmake	2012-06-01 16:35:49 UTC (rev 119243)
@@ -75,6 +75,7 @@
 #cmakedefine01 ENABLE_WEBGL
 #cmakedefine01 ENABLE_WEB_AUDIO
 #cmakedefine01 ENABLE_WEB_INTENTS
+#cmakedefine01 ENABLE_WEB_INTENTS_TAG
 #cmakedefine01 ENABLE_WEB_SOCKETS
 #cmakedefine01 ENABLE_WEB_TIMING
 #cmakedefine01 ENABLE_WORKERS

Modified: trunk/Tools/ChangeLog (119242 => 119243)


--- trunk/Tools/ChangeLog	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Tools/ChangeLog	2012-06-01 16:35:49 UTC (rev 119243)
@@ -1,3 +1,20 @@
+2012-06-01  Christophe Dumez  <[email protected]>
+
+        [EFL] EFL port does not enable WEB_INTENTS_TAG flag
+        https://bugs.webkit.org/show_bug.cgi?id=86866
+
+        Reviewed by Adam Barth.
+
+        Catch new "intent,service,register" signal on the frame and print out
+        information about the Web Intent service in EFL's DumpRenderTree.
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        (DumpRenderTreeChrome::createView):
+        (DumpRenderTreeChrome::onFrameCreated):
+        (DumpRenderTreeChrome::onFrameIntentServiceRegistration):
+        * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+        (DumpRenderTreeChrome):
+
 2012-06-01  Martin Robinson  <[email protected]>
 
         The ChangeLog parser cannot handle reviewers with initials in their name

Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (119242 => 119243)


--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2012-06-01 16:35:49 UTC (rev 119243)
@@ -116,6 +116,7 @@
     Evas_Object* mainFrame = ewk_view_frame_main_get(view);
     evas_object_smart_callback_add(mainFrame, "icon,changed", onFrameIconChanged, 0);
     evas_object_smart_callback_add(mainFrame, "intent,new", onFrameIntentNew, 0);
+    evas_object_smart_callback_add(mainFrame, "intent,service,register", onFrameIntentServiceRegistration, 0);
     evas_object_smart_callback_add(mainFrame, "load,provisional", onFrameProvisionalLoad, 0);
     evas_object_smart_callback_add(mainFrame, "load,provisional,failed", onFrameProvisionalLoadFailed, 0);
     evas_object_smart_callback_add(mainFrame, "load,committed", onFrameLoadCommitted, 0);
@@ -536,6 +537,7 @@
 
     evas_object_smart_callback_add(frame, "icon,changed", onFrameIconChanged, 0);
     evas_object_smart_callback_add(frame, "intent,new", onFrameIntentNew, 0);
+    evas_object_smart_callback_add(frame, "intent,service,register", onFrameIntentServiceRegistration, 0);
     evas_object_smart_callback_add(frame, "load,provisional", onFrameProvisionalLoad, 0);
     evas_object_smart_callback_add(frame, "load,provisional,failed", onFrameProvisionalLoadFailed, 0);
     evas_object_smart_callback_add(frame, "load,committed", onFrameLoadCommitted, 0);
@@ -732,3 +734,14 @@
         free(data);
     }
 }
+
+void DumpRenderTreeChrome::onFrameIntentServiceRegistration(void*, Evas_Object*, void* eventInfo)
+{
+    Ewk_Intent_Service_Info* serviceInfo = static_cast<Ewk_Intent_Service_Info*>(eventInfo);
+    printf("Registered Web Intent Service: action="" type=%s title=%s url="" disposition=%s\n",
+           serviceInfo->action,
+           serviceInfo->type,
+           serviceInfo->title,
+           serviceInfo->href,
+           serviceInfo->disposition);
+}

Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h (119242 => 119243)


--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h	2012-06-01 16:19:43 UTC (rev 119242)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h	2012-06-01 16:35:49 UTC (rev 119243)
@@ -122,6 +122,7 @@
     static void onNewResourceRequest(void*, Evas_Object*, void*);
 
     static void onFrameIntentNew(void*, Evas_Object*, void*);
+    static void onFrameIntentServiceRegistration(void*, Evas_Object*, void*);
 };
 
 #endif // DumpRenderTreeChrome_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to