Title: [125026] trunk
Revision
125026
Author
commit-qu...@webkit.org
Date
2012-08-08 05:53:18 -0700 (Wed, 08 Aug 2012)

Log Message

[EFL] Support DataList for <input type="range">
https://bugs.webkit.org/show_bug.cgi?id=92634

Patch by KwangYong Choi <ky0.c...@samsung.com> on 2012-08-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

DataList theme for EFL is implemented. DataList feature of
<input type="range"> is supported.

Test: fast/forms/datalist/input-list.html

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintSliderTrack):
(WebCore::RenderThemeEfl::sliderTickSize):
(WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeEfl::supportsDataListUI):
(WebCore):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

LayoutTests:

Update platform/efl/fast/forms/datalist/input-list-expected.txt because
range type of data list feature is passed.

* platform/efl/fast/forms/datalist/input-list-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (125025 => 125026)


--- trunk/LayoutTests/ChangeLog	2012-08-08 12:51:18 UTC (rev 125025)
+++ trunk/LayoutTests/ChangeLog	2012-08-08 12:53:18 UTC (rev 125026)
@@ -1,3 +1,15 @@
+2012-08-08  KwangYong Choi  <ky0.c...@samsung.com>
+
+        [EFL] Support DataList for <input type="range">
+        https://bugs.webkit.org/show_bug.cgi?id=92634
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Update platform/efl/fast/forms/datalist/input-list-expected.txt because
+        range type of data list feature is passed.
+
+        * platform/efl/fast/forms/datalist/input-list-expected.txt:
+
 2012-08-08  Matt Arsenault  <arse...@gmail.com>
 
         Crash when inspecting an element with border-image

Modified: trunk/LayoutTests/platform/efl/fast/forms/datalist/input-list-expected.txt (125025 => 125026)


--- trunk/LayoutTests/platform/efl/fast/forms/datalist/input-list-expected.txt	2012-08-08 12:51:18 UTC (rev 125025)
+++ trunk/LayoutTests/platform/efl/fast/forms/datalist/input-list-expected.txt	2012-08-08 12:53:18 UTC (rev 125026)
@@ -19,7 +19,7 @@
 FAIL document.getElementById("time").list should be [object HTMLDataListElement]. Was null.
 FAIL document.getElementById("datetime-local").list should be [object HTMLDataListElement]. Was null.
 FAIL document.getElementById("number").list should be [object HTMLDataListElement]. Was null.
-FAIL document.getElementById("range").list should be [object HTMLDataListElement]. Was null.
+PASS document.getElementById("range").list is document.getElementById("dl1")
 FAIL document.getElementById("color").list should be [object HTMLDataListElement]. Was null.
 PASS document.getElementById("hidden").list is null
 PASS document.getElementById("password").list is null

Modified: trunk/Source/WebCore/ChangeLog (125025 => 125026)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 12:51:18 UTC (rev 125025)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 12:53:18 UTC (rev 125026)
@@ -1,3 +1,24 @@
+2012-08-08  KwangYong Choi  <ky0.c...@samsung.com>
+
+        [EFL] Support DataList for <input type="range">
+        https://bugs.webkit.org/show_bug.cgi?id=92634
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        DataList theme for EFL is implemented. DataList feature of
+        <input type="range"> is supported.
+
+        Test: fast/forms/datalist/input-list.html
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::paintSliderTrack):
+        (WebCore::RenderThemeEfl::sliderTickSize):
+        (WebCore::RenderThemeEfl::sliderTickOffsetFromTrackCenter):
+        (WebCore::RenderThemeEfl::supportsDataListUI):
+        (WebCore):
+        * platform/efl/RenderThemeEfl.h:
+        (RenderThemeEfl):
+
 2012-08-08  Sergey Rogulenko  <rogule...@google.com>
 
         Web Inspector: renaming DOMNodeHighlighter to InspectorOverlay

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (125025 => 125026)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-08-08 12:51:18 UTC (rev 125025)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2012-08-08 12:53:18 UTC (rev 125026)
@@ -29,6 +29,7 @@
 #include "CSSValueKeywords.h"
 #include "GraphicsContext.h"
 #include "HTMLInputElement.h"
+#include "InputType.h"
 #include "NotImplemented.h"
 #include "Page.h"
 #include "PaintInfo.h"
@@ -747,8 +748,15 @@
 bool RenderThemeEfl::paintSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     if (object->style()->appearance() == SliderHorizontalPart)
-        return paintThemePart(object, SliderHorizontal, info, rect);
-    return paintThemePart(object, SliderVertical, info, rect);
+        paintThemePart(object, SliderHorizontal, info, rect);
+    else
+        paintThemePart(object, SliderVertical, info, rect);
+
+#if ENABLE(DATALIST_ELEMENT)
+    paintSliderTicks(object, info, rect);
+#endif
+
+    return false;
 }
 
 void RenderThemeEfl::adjustSliderTrackStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
@@ -792,17 +800,27 @@
 #if ENABLE(DATALIST_ELEMENT)
 IntSize RenderThemeEfl::sliderTickSize() const
 {
-    // FIXME: We need to set this to the size of one tick mark.
-    return IntSize(0, 0);
+    return IntSize(1, 6);
 }
 
 int RenderThemeEfl::sliderTickOffsetFromTrackCenter() const
 {
-    // FIXME: We need to set this to the position of the tick marks.
-    return 0;
+    static const int sliderTickOffset = -12;
+
+    return sliderTickOffset;
 }
 #endif
 
+bool RenderThemeEfl::supportsDataListUI(const AtomicString& type) const
+{
+#if ENABLE(DATALIST_ELEMENT)
+    // FIXME: We need to support other types.
+    return type == InputTypeNames::range();
+#else
+    return false;
+#endif
+}
+
 bool RenderThemeEfl::paintSliderThumb(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     // We've already painted it in paintSliderTrack(), no need to do anything here.

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (125025 => 125026)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h	2012-08-08 12:51:18 UTC (rev 125025)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h	2012-08-08 12:53:18 UTC (rev 125026)
@@ -166,6 +166,8 @@
     virtual int sliderTickOffsetFromTrackCenter() const OVERRIDE;
 #endif
 
+    virtual bool supportsDataListUI(const AtomicString&) const OVERRIDE;
+
     virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
 
     virtual void adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to