Source/WebCore:
Add support for deleting emoji on GTK
https://bugs.webkit.org/show_bug.cgi?id=141419

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-30
Reviewed by Gustavo Noronha Silva.

The code for deleting special group of characters was specific for
COCOA and EFL platforms. The fix consists on add GTK to the #if
preprocessor directive.

* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffsetForBackwardDeletion):

LayoutTests:
Update expectations for delete-emoji test since the bug is fixed now.
https://bugs.webkit.org/show_bug.cgi?id=141419

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-30
Reviewed by Gustavo Noronha Silva.

* platform/gtk/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@182137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8ba7331..24c17e0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
+
+        Update expectations for delete-emoji test since the bug is fixed now.
+        https://bugs.webkit.org/show_bug.cgi?id=141419
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * platform/gtk/TestExpectations:
+
 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
 
         `currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
diff --git a/LayoutTests/platform/gtk/TestExpectations b/LayoutTests/platform/gtk/TestExpectations
index 264f33c..f1ec138 100644
--- a/LayoutTests/platform/gtk/TestExpectations
+++ b/LayoutTests/platform/gtk/TestExpectations
@@ -540,7 +540,6 @@
 webkit.org/b/141072 accessibility/frame-disconnect-textmarker-cache-crash.html [ Failure ]
 
 webkit.org/b/141423 css3/calc/line-height.html [ Failure ]
-webkit.org/b/141419 editing/deleting/delete-emoji.html [ Failure ]
 webkit.org/b/141423 editing/pasteboard/simplfiying-markup-should-not-strip-content.html [ Failure ]
 webkit.org/b/141423 fast/css/font-shorthand-from-longhands.html [ Failure ]
 webkit.org/b/141423 fast/css/font-shorthand-line-height.html [ Failure ]
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 40dc849..ef7c32b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
+
+        Add support for deleting emoji on GTK
+        https://bugs.webkit.org/show_bug.cgi?id=141419
+
+        Reviewed by Gustavo Noronha Silva.
+
+        The code for deleting special group of characters was specific for
+        COCOA and EFL platforms. The fix consists on add GTK to the #if
+        preprocessor directive.
+
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::previousOffsetForBackwardDeletion):
+
 2015-03-30  Benjamin Poulain  <benjamin@webkit.org>
 
         Start the features.json files
diff --git a/Source/WebCore/rendering/RenderText.cpp b/Source/WebCore/rendering/RenderText.cpp
index 8dd05a2..bf05674 100644
--- a/Source/WebCore/rendering/RenderText.cpp
+++ b/Source/WebCore/rendering/RenderText.cpp
@@ -1401,7 +1401,7 @@
     return result;
 }
 
-#if PLATFORM(COCOA) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL) || PLATFORM(GTK)
 
 #define HANGUL_CHOSEONG_START (0x1100)
 #define HANGUL_CHOSEONG_END (0x115F)
@@ -1443,7 +1443,7 @@
 
 int RenderText::previousOffsetForBackwardDeletion(int current) const
 {
-#if PLATFORM(COCOA) || PLATFORM(EFL)
+#if PLATFORM(COCOA) || PLATFORM(EFL) || PLATFORM(GTK)
     ASSERT(m_text);
     StringImpl& text = *m_text.impl();
     UChar32 character;