Title: [87741] trunk/Source
Revision
87741
Author
x...@webkit.org
Date
2011-05-31 11:10:12 -0700 (Tue, 31 May 2011)

Log Message

2011-05-31  Xan Lopez  <xlo...@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
        https://bugs.webkit.org/show_bug.cgi?id=61791

        * bindings/gobject/GNUmakefile.am: add new files.
        * bindings/gobject/WebKitDOMCustom.cpp: Added.
        (webkit_dom_html_text_area_element_is_edited):
        (webkit_dom_html_input_element_is_edited):
        * bindings/gobject/WebKitDOMCustom.h: Added.
2011-05-31  Xan Lopez  <xlo...@igalia.com>

        Reviewed by Martin Robinson.

        [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
        https://bugs.webkit.org/show_bug.cgi?id=61791

        * GNUmakefile.am: add new files.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (87740 => 87741)


--- trunk/Source/WebCore/ChangeLog	2011-05-31 17:55:20 UTC (rev 87740)
+++ trunk/Source/WebCore/ChangeLog	2011-05-31 18:10:12 UTC (rev 87741)
@@ -1,3 +1,16 @@
+2011-05-31  Xan Lopez  <xlo...@igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
+        https://bugs.webkit.org/show_bug.cgi?id=61791
+
+        * bindings/gobject/GNUmakefile.am: add new files.
+        * bindings/gobject/WebKitDOMCustom.cpp: Added.
+        (webkit_dom_html_text_area_element_is_edited):
+        (webkit_dom_html_input_element_is_edited):
+        * bindings/gobject/WebKitDOMCustom.h: Added.
+
 2011-05-31  Noam Rosenthal  <noam.rosent...@nokia.com>
 
         Unreviewed build fix for Symbian.

Modified: trunk/Source/WebCore/bindings/gobject/GNUmakefile.am (87740 => 87741)


--- trunk/Source/WebCore/bindings/gobject/GNUmakefile.am	2011-05-31 17:55:20 UTC (rev 87740)
+++ trunk/Source/WebCore/bindings/gobject/GNUmakefile.am	2011-05-31 18:10:12 UTC (rev 87741)
@@ -365,6 +365,7 @@
 	DerivedSources/webkit/WebKitDOMDOMApplicationCache.h \
 	DerivedSources/webkit/WebKitDOMBarInfo.h \
 	DerivedSources/webkit/WebKitDOMConsole.h \
+	DerivedSources/webkit/WebKitDOMCustom.h \
 	DerivedSources/webkit/WebKitDOMDOMWindow.h \
 	DerivedSources/webkit/WebKitDOMDOMSelection.h \
 	DerivedSources/webkit/WebKitDOMEventTarget.h \
@@ -409,7 +410,7 @@
 endif
 
 gdom_class_list := $(subst WebKitDOM,, $(filter-out %Private, $(basename $(notdir $(webkitgtk_gdom_built_sources)))))
-gdom_class_list += Object EventTarget
+gdom_class_list += Custom EventTarget Object
 DerivedSources/webkit/webkitdom.h: $(WebCore)/bindings/scripts/gobject-generate-headers.pl $(WebCore)/bindings/gobject/GNUmakefile.am
 	$(AM_V_GEN)echo $(gdom_class_list) | $(PERL) $< gdom > $@
 
@@ -430,6 +431,9 @@
 $(top_builddir)/DerivedSources/webkit/WebKitDOMEventTargetPrivate.h: $(WebCore)/bindings/gobject/WebKitDOMEventTargetPrivate.h
 	$(AM_V_GEN)cp -f $< $@
 
+$(top_builddir)/DerivedSources/webkit/WebKitDOMCustom.h: $(WebCore)/bindings/gobject/WebKitDOMCustom.h
+	$(AM_V_GEN)cp -f $< $@
+
 # Filter out SVG for now
 gdom_feature_defines := $(filter-out ENABLE_INDEXED_DATABASE=1, $(filter-out ENABLE_SVG%, $(FEATURE_DEFINES)))
 DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h:: %.idl $(SCRIPTS_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm $(WebCore)/bindings/gobject/GNUmakefile.am

Added: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp (0 => 87741)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp	2011-05-31 18:10:12 UTC (rev 87741)
@@ -0,0 +1,42 @@
+/*
+ *  Copyright (C) 2011 Igalia S.L.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+#include "WebKitDOMCustom.h"
+
+#include "WebKitDOMHTMLInputElement.h"
+#include "WebKitDOMHTMLInputElementPrivate.h"
+#include "WebKitDOMHTMLTextAreaElement.h"
+#include "WebKitDOMHTMLTextAreaElementPrivate.h"
+
+using namespace WebKit;
+
+gboolean webkit_dom_html_text_area_element_is_edited(WebKitDOMHTMLTextAreaElement* area)
+{
+    g_return_val_if_fail(WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(area), FALSE);
+
+    return core(area)->lastChangeWasUserEdit();
+}
+
+gboolean webkit_dom_html_input_element_is_edited(WebKitDOMHTMLInputElement* input)
+{
+    g_return_val_if_fail(WEBKIT_DOM_IS_HTML_INPUT_ELEMENT(input), FALSE);
+
+    return core(input)->lastChangeWasUserEdit();
+}
+

Added: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h (0 => 87741)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h	2011-05-31 18:10:12 UTC (rev 87741)
@@ -0,0 +1,33 @@
+/*
+ *  Copyright (C) 2011 Igalia S.L.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef WebKitDOMCustom_h
+#define WebKitDOMCustom_h
+
+#include <glib.h>
+#include <webkit/webkitdefines.h>
+#include <webkit/webkitdomdefines.h>
+
+G_BEGIN_DECLS
+
+WEBKIT_API gboolean webkit_dom_html_text_area_element_is_edited(WebKitDOMHTMLTextAreaElement*);
+WEBKIT_API gboolean webkit_dom_html_input_element_is_edited(WebKitDOMHTMLInputElement*);
+
+G_END_DECLS
+
+#endif

Modified: trunk/Source/WebKit/gtk/ChangeLog (87740 => 87741)


--- trunk/Source/WebKit/gtk/ChangeLog	2011-05-31 17:55:20 UTC (rev 87740)
+++ trunk/Source/WebKit/gtk/ChangeLog	2011-05-31 18:10:12 UTC (rev 87741)
@@ -1,3 +1,12 @@
+2011-05-31  Xan Lopez  <xlo...@igalia.com>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited
+        https://bugs.webkit.org/show_bug.cgi?id=61791
+
+        * GNUmakefile.am: add new files.
+
 2011-05-27  Philippe Normand  <pnorm...@igalia.com>
 
         Reviewed by Martin Robinson.

Modified: trunk/Source/WebKit/gtk/GNUmakefile.am (87740 => 87741)


--- trunk/Source/WebKit/gtk/GNUmakefile.am	2011-05-31 17:55:20 UTC (rev 87740)
+++ trunk/Source/WebKit/gtk/GNUmakefile.am	2011-05-31 18:10:12 UTC (rev 87741)
@@ -165,6 +165,8 @@
 	Source/WebCore/bindings/gobject/GObjectEventListener.h \
 	Source/WebCore/bindings/gobject/WebKitDOMBinding.cpp \
 	Source/WebCore/bindings/gobject/WebKitDOMBinding.h \
+	Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp \
+	Source/WebCore/bindings/gobject/WebKitDOMCustom.h \
 	Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp \
 	Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h \
 	Source/WebCore/bindings/gobject/WebKitDOMEventTargetPrivate.h \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to