Title: [87995] trunk
- Revision
- 87995
- Author
- [email protected]
- Date
- 2011-06-03 01:36:04 -0700 (Fri, 03 Jun 2011)
Log Message
2011-06-03 Dominic Cooney <[email protected]>
Reviewed by Kent Tamura.
Adds a test that range input clones have the right kind of slider.
https://bugs.webkit.org/show_bug.cgi?id=61982
* fast/html/clone-range-expected.txt: Added.
* fast/html/clone-range.html: Added.
* platform/win/Skipped: Test needs DRT functionality not in this port.
2011-06-03 Dominic Cooney <[email protected]>
Reviewed by Kent Tamura.
Cloned range input sliders should be SliderThumbElements, not divs.
https://bugs.webkit.org/show_bug.cgi?id=61982
Test: fast/html/clone-range.html
* html/shadow/SliderThumbElement.h:
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Create a SliderThumbElement when being cloned.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (87994 => 87995)
--- trunk/LayoutTests/ChangeLog 2011-06-03 08:22:42 UTC (rev 87994)
+++ trunk/LayoutTests/ChangeLog 2011-06-03 08:36:04 UTC (rev 87995)
@@ -1,3 +1,14 @@
+2011-06-03 Dominic Cooney <[email protected]>
+
+ Reviewed by Kent Tamura.
+
+ Adds a test that range input clones have the right kind of slider.
+ https://bugs.webkit.org/show_bug.cgi?id=61982
+
+ * fast/html/clone-range-expected.txt: Added.
+ * fast/html/clone-range.html: Added.
+ * platform/win/Skipped: Test needs DRT functionality not in this port.
+
2011-06-03 Laszlo Gombos <[email protected]>
Reviewed by Csaba Osztrogonác.
Added: trunk/LayoutTests/fast/html/clone-range-expected.txt (0 => 87995)
--- trunk/LayoutTests/fast/html/clone-range-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/html/clone-range-expected.txt 2011-06-03 08:36:04 UTC (rev 87995)
@@ -0,0 +1,9 @@
+Tests that a range input's slider is cloned along with its host. There should be a second range input in the document and it should have a slider positioned at zero.
+
+
+PASS dolly.clientHeight is sheep.clientHeight
+PASS layoutTestController.shadowPseudoId(dollyShadow.firstChild) is layoutTestController.shadowPseudoId(sheepShadow.firstChild)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/html/clone-range.html (0 => 87995)
--- trunk/LayoutTests/fast/html/clone-range.html (rev 0)
+++ trunk/LayoutTests/fast/html/clone-range.html 2011-06-03 08:36:04 UTC (rev 87995)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<link rel="stylesheet" href=""
+</head>
+<body>
+<p>
+Tests that a range input's slider is cloned along with its host. There
+should be a second range input in the document and it should have a
+slider positioned at zero.
+</p>
+<input type="range" id="sheep" style="display: block; width: 100px;">
+<div id="console"></div>
+<script>
+var sheep = document.querySelector('#sheep');
+var dolly = sheep.cloneNode();
+
+sheep.insertAdjacentElement('afterEnd', dolly);
+
+// Cloned element should be the same size. Having zero height is one
+// symptom of a broken clone.
+shouldBe('dolly.clientHeight', 'sheep.clientHeight');
+
+if (window.layoutTestController) {
+ var sheepShadow = layoutTestController.shadowRoot(sheep);
+ var dollyShadow = layoutTestController.shadowRoot(dolly);
+ shouldBe('layoutTestController.shadowPseudoId(dollyShadow.firstChild)',
+ 'layoutTestController.shadowPseudoId(sheepShadow.firstChild)');
+}
+
+dolly.value = 0;
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/platform/win/Skipped (87994 => 87995)
--- trunk/LayoutTests/platform/win/Skipped 2011-06-03 08:22:42 UTC (rev 87994)
+++ trunk/LayoutTests/platform/win/Skipped 2011-06-03 08:36:04 UTC (rev 87995)
@@ -1285,6 +1285,7 @@
# Windows DRT needs an implementation of shadowRoot
# https://bugs.webkit.org/show_bug.cgi?id=59081
fast/dom/shadow
+fast/html/clone-range.html
inspector/elements/shadow-dom.html
media/audio-controls-do-not-fade-out.html
media/video-controls-visible-audio-only.html
Modified: trunk/Source/WebCore/ChangeLog (87994 => 87995)
--- trunk/Source/WebCore/ChangeLog 2011-06-03 08:22:42 UTC (rev 87994)
+++ trunk/Source/WebCore/ChangeLog 2011-06-03 08:36:04 UTC (rev 87995)
@@ -1,3 +1,15 @@
+2011-06-03 Dominic Cooney <[email protected]>
+
+ Reviewed by Kent Tamura.
+
+ Cloned range input sliders should be SliderThumbElements, not divs.
+ https://bugs.webkit.org/show_bug.cgi?id=61982
+
+ Test: fast/html/clone-range.html
+
+ * html/shadow/SliderThumbElement.h:
+ (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Create a SliderThumbElement when being cloned.
+
2011-06-02 Yury Semikhatsky <[email protected]>
Reviewed by Pavel Feldman.
Modified: trunk/Source/WebCore/html/shadow/SliderThumbElement.h (87994 => 87995)
--- trunk/Source/WebCore/html/shadow/SliderThumbElement.h 2011-06-03 08:22:42 UTC (rev 87994)
+++ trunk/Source/WebCore/html/shadow/SliderThumbElement.h 2011-06-03 08:36:04 UTC (rev 87995)
@@ -60,12 +60,12 @@
private:
SliderThumbElement(Document*);
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+ virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() const;
void startDragging();
void stopDragging();
void setPositionFromPoint(const IntPoint&);
HTMLInputElement* hostInput();
- FloatPoint m_offsetToThumb;
bool m_inDragMode;
};
@@ -80,6 +80,11 @@
return adoptRef(new SliderThumbElement(document));
}
+inline PassRefPtr<Element> SliderThumbElement::cloneElementWithoutAttributesAndChildren() const
+{
+ return create(document());
+}
+
inline SliderThumbElement* toSliderThumbElement(Node* node)
{
ASSERT(!node || node->isHTMLElement());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes