[EFL][GTK] Move text selection/focus notification for a11y from gtk to atk directory
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2013 17:30:23 +0000 (17:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2013 17:30:23 +0000 (17:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110221

Patch by Mariusz Grzegorczyk <mariusz.g@samsung.com> on 2013-02-25
Reviewed by Martin Robinson.

Share implementation between efl and gtk.
Update build with changes made.

* GNUmakefile.list.am: Change WebCore/editing/gtk/FrameSelectionGtk.cpp to WebCore/editing/atk/FrameSelectionAtk.cpp to build.
* PlatformEfl.cmake: Add WebCore/editing/atk to include directories, add Webcore/editing/atk/FrameSelectionAtk.cpp to build.
* editing/FrameSelection.h: Omit notifyAccessibilityForSelectionChange() stub for EFL port.
(WebCore):
* editing/atk/FrameSelectionAtk.cpp: Renamed from Source/WebCore/editing/gtk/FrameSelectionGtk.cpp.
(WebCore):
(WebCore::emitTextSelectionChange):
(WebCore::maybeEmitTextFocusChange):
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/PlatformEfl.cmake
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/atk/FrameSelectionAtk.cpp [moved from Source/WebCore/editing/gtk/FrameSelectionGtk.cpp with 96% similarity]

index f5acdb3..a9cc91e 100644 (file)
@@ -1,3 +1,23 @@
+2013-02-25  Mariusz Grzegorczyk  <mariusz.g@samsung.com>
+
+        [EFL][GTK] Move text selection/focus notification for a11y from gtk to atk directory
+        https://bugs.webkit.org/show_bug.cgi?id=110221
+
+        Reviewed by Martin Robinson.
+
+        Share implementation between efl and gtk.
+        Update build with changes made.
+
+        * GNUmakefile.list.am: Change WebCore/editing/gtk/FrameSelectionGtk.cpp to WebCore/editing/atk/FrameSelectionAtk.cpp to build.
+        * PlatformEfl.cmake: Add WebCore/editing/atk to include directories, add Webcore/editing/atk/FrameSelectionAtk.cpp to build.
+        * editing/FrameSelection.h: Omit notifyAccessibilityForSelectionChange() stub for EFL port.
+        (WebCore):
+        * editing/atk/FrameSelectionAtk.cpp: Renamed from Source/WebCore/editing/gtk/FrameSelectionGtk.cpp.
+        (WebCore):
+        (WebCore::emitTextSelectionChange):
+        (WebCore::maybeEmitTextFocusChange):
+        (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
+
 2013-02-25  Alpha Lam  <hclam@chromium.org>
 
         GIFImageReader to read from source data directly
index 4dac58e..825225b 100644 (file)
@@ -6115,7 +6115,7 @@ webcoregtk_sources += \
        Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h \
        Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp \
        Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.h \
-       Source/WebCore/editing/gtk/FrameSelectionGtk.cpp \
+       Source/WebCore/editing/atk/FrameSelectionAtk.cpp \
        Source/WebCore/page/gtk/DragControllerGtk.cpp \
        Source/WebCore/page/gtk/EventHandlerGtk.cpp \
        Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp \
index d1d463f..535fbfe 100644 (file)
@@ -1,4 +1,5 @@
 list(APPEND WebCore_INCLUDE_DIRECTORIES
+    "${WEBCORE_DIR}/editing/atk"
     "${WEBCORE_DIR}/page/efl"
     "${WEBCORE_DIR}/platform/cairo"
     "${WEBCORE_DIR}/platform/efl"
@@ -34,6 +35,8 @@ list(APPEND WebCore_SOURCES
 
     editing/SmartReplaceICU.cpp
 
+    editing/atk/FrameSelectionAtk.cpp
+
     page/efl/DragControllerEfl.cpp
     page/efl/EventHandlerEfl.cpp
 
index 26442a0..1fe0472 100644 (file)
@@ -329,7 +329,7 @@ inline void FrameSelection::setTypingStyle(PassRefPtr<EditingStyle> style)
     m_typingStyle = style;
 }
 
-#if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(CHROMIUM))
+#if !(PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(CHROMIUM) || PLATFORM(EFL))
 inline void FrameSelection::notifyAccessibilityForSelectionChange()
 {
 }
@@ -16,7 +16,7 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "FrameSelection.h"
 
 #include "Frame.h"
 #include "WebKitAccessibleWrapperAtk.h"
 
+#if PLATFORM(EFL)
+#include <glib.h>
+#else
 #include <gtk/gtk.h>
+#endif
 
 #include <wtf/RefPtr.h>
 
@@ -81,14 +85,11 @@ void FrameSelection::notifyAccessibilityForSelectionChange()
     if (!AXObjectCache::accessibilityEnabled())
         return;
 
-    // Return for no valid selections.
     if (!m_selection.start().isNotNull() || !m_selection.end().isNotNull())
         return;
 
     RenderObject* focusedNode = m_selection.end().containerNode()->renderer();
     AccessibilityObject* accessibilityObject = m_frame->document()->axObjectCache()->getOrCreate(focusedNode);
-
-    // Need to check this as getOrCreate could return 0.
     if (!accessibilityObject)
         return;
 
@@ -97,7 +98,6 @@ void FrameSelection::notifyAccessibilityForSelectionChange()
     if (!object)
         return;
 
-    // Emit relatedsignals.
     emitTextSelectionChange(object.get(), m_selection, offset);
     maybeEmitTextFocusChange(object.release());
 }