Index: Source/core/rendering/RenderSliderThumb.cpp |
diff --git a/Source/core/html/shadow/ProgressShadowElement.h b/Source/core/rendering/RenderSliderThumb.cpp |
similarity index 59% |
copy from Source/core/html/shadow/ProgressShadowElement.h |
copy to Source/core/rendering/RenderSliderThumb.cpp |
index 825b0b68437593bc4857bd50eb86409a87b53a7c..66e8e850e18b73c8af4f96d054b6c6b321527833 100644 |
--- a/Source/core/html/shadow/ProgressShadowElement.h |
+++ b/Source/core/rendering/RenderSliderThumb.cpp |
@@ -29,53 +29,38 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef ProgressShadowElement_h |
-#define ProgressShadowElement_h |
+#include "config.h" |
+#include "core/rendering/RenderSliderThumb.h" |
-#include "core/html/HTMLDivElement.h" |
-#include "wtf/Forward.h" |
+#include "core/rendering/RenderTheme.h" |
+#include "core/rendering/style/RenderStyle.h" |
namespace WebCore { |
-class HTMLProgressElement; |
- |
-class ProgressShadowElement : public HTMLDivElement { |
-public: |
- explicit ProgressShadowElement(Document&); |
- HTMLProgressElement* progressElement() const; |
- |
-protected: |
- virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
-}; |
- |
-class ProgressInnerElement FINAL : public ProgressShadowElement { |
-public: |
- DECLARE_NODE_FACTORY(ProgressInnerElement); |
- |
-private: |
- explicit ProgressInnerElement(Document&); |
- |
- virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
- virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
-}; |
- |
-class ProgressBarElement FINAL : public ProgressShadowElement { |
-public: |
- DECLARE_NODE_FACTORY(ProgressBarElement); |
- |
-private: |
- explicit ProgressBarElement(Document&); |
-}; |
- |
-class ProgressValueElement FINAL : public ProgressShadowElement { |
-public: |
- DECLARE_NODE_FACTORY(ProgressValueElement); |
- void setWidthPercentage(double); |
+RenderSliderThumb::RenderSliderThumb(SliderThumbElement* element) |
+ : RenderBlockFlow(element) |
+{ |
+} |
-private: |
- explicit ProgressValueElement(Document&); |
-}; |
+void RenderSliderThumb::updateAppearance(RenderStyle* parentStyle) |
+{ |
+ if (parentStyle->appearance() == SliderVerticalPart) |
+ style()->setAppearance(SliderThumbVerticalPart); |
+ else if (parentStyle->appearance() == SliderHorizontalPart) |
+ style()->setAppearance(SliderThumbHorizontalPart); |
+ else if (parentStyle->appearance() == MediaSliderPart) |
+ style()->setAppearance(MediaSliderThumbPart); |
+ else if (parentStyle->appearance() == MediaVolumeSliderPart) |
+ style()->setAppearance(MediaVolumeSliderThumbPart); |
+ else if (parentStyle->appearance() == MediaFullScreenVolumeSliderPart) |
+ style()->setAppearance(MediaFullScreenVolumeSliderThumbPart); |
+ if (style()->hasAppearance()) |
+ RenderTheme::theme().adjustSliderThumbSize(style(), toElement(node())); |
+} |
+bool RenderSliderThumb::isSliderThumb() const |
+{ |
+ return true; |
} |
-#endif // ProgressShadowElement_h |
+} // namespace WebCore |