Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1092)

Unified Diff: Source/core/rendering/RenderSliderThumb.cpp

Issue 403523003: Move Shadow DOM renderers into rendering/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderSliderThumb.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/rendering/RenderSliderThumb.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698