Unreviewed, rolling out r75725.
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jan 2011 19:38:11 +0000 (19:38 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jan 2011 19:38:11 +0000 (19:38 +0000)
http://trac.webkit.org/changeset/75725
https://bugs.webkit.org/show_bug.cgi?id=52317

Caused crashes in layout tests.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForStyleResolve):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/InputType.cpp:
* html/InputType.h:
* html/RangeInputType.cpp:
* html/RangeInputType.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::detach):
* html/shadow/SliderThumbElement.h:
(WebCore::SliderThumbElement::SliderThumbElement):
(WebCore::SliderThumbElement::create):
* rendering/MediaControlElements.cpp:
(WebCore::MediaControlInputElement::attach):
(WebCore::MediaControlInputElement::updateStyle):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::~RenderSlider):
(WebCore::RenderSlider::styleDidChange):
(WebCore::RenderSlider::createThumbStyle):
(WebCore::RenderSlider::thumbRect):
(WebCore::RenderSlider::layout):
(WebCore::RenderSlider::updateFromElement):
(WebCore::RenderSlider::mouseEventIsInThumb):
(WebCore::RenderSlider::mouseEventOffsetToThumb):
(WebCore::RenderSlider::setValueForPosition):
(WebCore::RenderSlider::positionForOffset):
(WebCore::RenderSlider::currentPosition):
(WebCore::RenderSlider::trackSize):
(WebCore::RenderSlider::forwardEvent):
(WebCore::RenderSlider::inDragMode):
* rendering/RenderSlider.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75728 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/RangeInputType.h
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h
Source/WebCore/rendering/MediaControlElements.cpp
Source/WebCore/rendering/RenderSlider.cpp
Source/WebCore/rendering/RenderSlider.h

index 79a7235eb8deabb3643711c16ff2f664226bc3a5..205626f3879978e267612450935b858bcbdaf26e 100644 (file)
@@ -1,3 +1,45 @@
+2011-01-13  Dimitri Glazkov  <dglazkov@chromium.org>
+
+        Unreviewed, rolling out r75725.
+        http://trac.webkit.org/changeset/75725
+        https://bugs.webkit.org/show_bug.cgi?id=52317
+
+        Caused crashes in layout tests.
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::initForStyleResolve):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::updateType):
+        * html/InputType.cpp:
+        * html/InputType.h:
+        * html/RangeInputType.cpp:
+        * html/RangeInputType.h:
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::SliderThumbElement::defaultEventHandler):
+        (WebCore::SliderThumbElement::detach):
+        * html/shadow/SliderThumbElement.h:
+        (WebCore::SliderThumbElement::SliderThumbElement):
+        (WebCore::SliderThumbElement::create):
+        * rendering/MediaControlElements.cpp:
+        (WebCore::MediaControlInputElement::attach):
+        (WebCore::MediaControlInputElement::updateStyle):
+        * rendering/RenderSlider.cpp:
+        (WebCore::RenderSlider::~RenderSlider):
+        (WebCore::RenderSlider::styleDidChange):
+        (WebCore::RenderSlider::createThumbStyle):
+        (WebCore::RenderSlider::thumbRect):
+        (WebCore::RenderSlider::layout):
+        (WebCore::RenderSlider::updateFromElement):
+        (WebCore::RenderSlider::mouseEventIsInThumb):
+        (WebCore::RenderSlider::mouseEventOffsetToThumb):
+        (WebCore::RenderSlider::setValueForPosition):
+        (WebCore::RenderSlider::positionForOffset):
+        (WebCore::RenderSlider::currentPosition):
+        (WebCore::RenderSlider::trackSize):
+        (WebCore::RenderSlider::forwardEvent):
+        (WebCore::RenderSlider::inDragMode):
+        * rendering/RenderSlider.h:
+
 2011-01-12  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Reviewed by Darin Adler.
index 6363ca9b66abad4f974a16f7128f1a84d6eaa606..e1e639344aa9b2197e4bc0149a2ed620f2d385e7 100644 (file)
@@ -822,7 +822,12 @@ inline void CSSStyleSelector::initForStyleResolve(Element* e, RenderStyle* paren
 {
     m_checker.m_pseudoStyle = pseudoID;
 
-    m_parentNode = e ? e->parentOrHostNode() : 0;
+    m_parentNode = e ? e->parentNode() : 0;
+
+#if ENABLE(SVG)
+    if (!m_parentNode && e && e->isSVGElement() && e->isShadowRoot())
+        m_parentNode = e->shadowHost();
+#endif
 
     if (parentStyle)
         m_parentStyle = parentStyle;
index 7d2a3c542927444e028e0c92312b4eb188fcd28e..007639b21adde038050b72502b204a1017b1d44e 100644 (file)
@@ -447,9 +447,7 @@ void HTMLInputElement::updateType()
     bool neededActivationCallback = needsActivationCallback();
     bool didRespectHeightAndWidth = m_inputType->shouldRespectHeightAndWidthAttributes();
 
-    m_inputType->destroyShadowSubtree();
     m_inputType = newType.release();
-    m_inputType->createShadowSubtree();
 
     setNeedsWillValidateCheck();
 
index 729f204eb1a1ed0bfbb5756c3af4d1f0c1833e9a..be86399c04074f69776c9a712aa2256fafa0e2d6 100644 (file)
@@ -349,15 +349,6 @@ RenderObject* InputType::createRenderer(RenderArena*, RenderStyle* style) const
     return RenderObject::createObject(element(), style);
 }
 
-void InputType::createShadowSubtree()
-{
-}
-
-void InputType::destroyShadowSubtree()
-{
-    element()->setShadowRoot(0);
-}
-
 double InputType::parseToDouble(const String&, double defaultValue) const
 {
     return defaultValue;
index 0d1f6b89fc761ed9d75717e0063eb34c188c1122..4d25a974c300c2878fba628824d07074fffc929a 100644 (file)
@@ -171,12 +171,6 @@ public:
     virtual void accessKeyAction(bool sendToAnyElement);
     virtual bool canBeSuccessfulSubmitButton();
 
-
-    // Shadow tree handling
-
-    virtual void createShadowSubtree();
-    void destroyShadowSubtree();
-
     // Miscellaneous functions
 
     virtual bool rendererIsNeeded();
index 3fcb6415d30b487bc3fecfe421c36c30735a8316..5d71da7878717c6bfd3e38ea14bc23f3970b5c29 100644 (file)
@@ -37,7 +37,6 @@
 #include "HTMLParserIdioms.h"
 #include "KeyboardEvent.h"
 #include "RenderSlider.h"
-#include "SliderThumbElement.h"
 #include "StepRange.h"
 #include <limits>
 #include <wtf/MathExtras.h>
@@ -187,11 +186,6 @@ void RangeInputType::forwardEvent(Event* event)
         toRenderSlider(element()->renderer())->forwardEvent(event);
 }
 
-void RangeInputType::createShadowSubtree()
-{
-    element()->setShadowRoot(SliderThumbElement::create(element()->document()));
-}
-
 RenderObject* RangeInputType::createRenderer(RenderArena* arena, RenderStyle*) const
 {
     return new (arena) RenderSlider(element());
index 57eb2999cda59e5d24570ccc480c0f67ffed9116..7f341a765570ca19fba6dcff7e58a9e6d0623f0f 100644 (file)
@@ -58,7 +58,6 @@ private:
     virtual void handleKeydownEvent(KeyboardEvent*);
     virtual void forwardEvent(Event*);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) const;
-    virtual void createShadowSubtree();
     virtual double parseToDouble(const String&, double) const;
     virtual String serialize(double) const;
     virtual void accessKeyAction(bool sendToAnyElement);
index 79a009b7dffacbd0eaaf72b2504923dea660dcbb..55301c15ab06d4aba496a2784dc9be65a07017cc 100644 (file)
 #include "Frame.h"
 #include "MouseEvent.h"
 #include "RenderSlider.h"
-#include "RenderTheme.h"
 
 namespace WebCore {
 
-// FIXME: Find a way to cascade appearance (see the layout method) and get rid of this class.
-class RenderSliderThumb : public RenderBlock {
-public:
-    RenderSliderThumb(Node*);
-    virtual void layout();
-};
-
-
-RenderSliderThumb::RenderSliderThumb(Node* node)
-    : RenderBlock(node)
-{
-}
-
-void RenderSliderThumb::layout()
-{
-    // FIXME: Hard-coding this cascade of appearance is bad, because it's something
-    // that CSS usually does. We need to find a way to express this in CSS.
-    RenderStyle* parentStyle = parent()->style();
-    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);
-
-    if (style()->hasAppearance()) {
-        // FIXME: This should pass the style, not the renderer, to the theme.
-        theme()->adjustSliderThumbSize(this);
-    }
-    RenderBlock::layout();
-}
-
-RenderObject* SliderThumbElement::createRenderer(RenderArena* arena, RenderStyle*)
-{
-    return new (arena) RenderSliderThumb(this);
-}
-
 void SliderThumbElement::defaultEventHandler(Event* event)
 {
     if (!event->isMouseEvent()) {
-        HTMLDivElement::defaultEventHandler(event);
+        ShadowBlockElement::defaultEventHandler(event);
         return;
     }
 
@@ -133,7 +93,7 @@ void SliderThumbElement::defaultEventHandler(Event* event)
         }
     }
 
-    HTMLDivElement::defaultEventHandler(event);
+    ShadowBlockElement::defaultEventHandler(event);
 }
 
 void SliderThumbElement::detach()
@@ -142,7 +102,7 @@ void SliderThumbElement::detach()
         if (Frame* frame = document()->frame())
             frame->eventHandler()->setCapturingMouseEventsNode(0);      
     }
-    HTMLDivElement::detach();
+    ShadowBlockElement::detach();
 }
 
 }
index 7219186243fd8dbe94732f8444e2e8102ba4aa62..5220f2bdaef0caa368e2b2eb00aeb6011ef7795c 100644 (file)
@@ -33,9 +33,8 @@
 #define SliderThumbElement_h
 
 #include "FloatPoint.h"
-#include "HTMLDivElement.h"
-#include "HTMLNames.h"
 #include "RenderStyleConstants.h"
+#include "ShadowElement.h"
 #include <wtf/Forward.h>
 
 namespace WebCore {
@@ -44,9 +43,9 @@ class HTMLElement;
 class Event;
 class FloatPoint;
 
-class SliderThumbElement : public HTMLDivElement {
+class SliderThumbElement : public ShadowBlockElement {
 public:
-    static PassRefPtr<SliderThumbElement> create(Document*);
+    static PassRefPtr<SliderThumbElement> create(HTMLElement* shadowParent);
 
     bool inDragMode() const { return m_inDragMode; }
 
@@ -54,23 +53,22 @@ public:
     virtual void detach();
     virtual AtomicString shadowPseudoId() const;
 
-private:
-    SliderThumbElement(Document*);
-    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+private:        
+    SliderThumbElement(HTMLElement* shadowParent);
 
     FloatPoint m_offsetToThumb;
     bool m_inDragMode;
 };
 
-inline SliderThumbElement::SliderThumbElement(Document* document)
-    : HTMLDivElement(HTMLNames::divTag, document)
+inline SliderThumbElement::SliderThumbElement(HTMLElement* shadowParent)
+    : ShadowBlockElement(shadowParent)
     , m_inDragMode(false)
 {
 }
 
-inline PassRefPtr<SliderThumbElement> SliderThumbElement::create(Document* document)
+inline PassRefPtr<SliderThumbElement> SliderThumbElement::create(HTMLElement* shadowParent)
 {
-    return adoptRef(new SliderThumbElement(document));
+    return adoptRef(new SliderThumbElement(shadowParent));
 }
 
 inline AtomicString SliderThumbElement::shadowPseudoId() const
@@ -79,12 +77,7 @@ inline AtomicString SliderThumbElement::shadowPseudoId() const
     return sliderThumb;
 }
 
-inline SliderThumbElement* toSliderThumbElement(Node* node)
-{
-    ASSERT(!node || node->isHTMLElement());
-    return static_cast<SliderThumbElement*>(node);
 }
 
-}
 
 #endif
index e27181ec88be3369f459cfcfe8fa758bbca03fd6..e5e5ae58b6c1ee74b9ab999b14e83cc6bc697474 100644 (file)
@@ -449,12 +449,6 @@ void MediaControlInputElement::attach()
         parentNode()->renderer()->addChild(renderer, sibling ? sibling->renderer() : 0);
     }  
     ContainerNode::attach();
-    // FIXME: Currently, MeidaControlInput circumvents the normal attachment
-    // and style recalc cycle and thus we need to add extra logic to be aware of
-    // the shadow DOM. Remove this once all media controls are transitioned to use the regular
-    // style calculation.
-    if (Node* shadowNode = shadowRoot())
-        shadowNode->attach();
 }
 
 void MediaControlInputElement::updateStyle()
@@ -473,13 +467,6 @@ void MediaControlInputElement::updateStyle()
         attach();
     else if (renderer())
         renderer()->setStyle(style.get());
-
-    // FIXME: Currently, MeidaControlInput circumvents the normal attachment
-    // and style recalc cycle and thus we need to add extra logic to be aware of
-    // the shadow DOM. Remove this once all media controls are transitioned to use
-    // the new shadow DOM.
-    if (Node* shadowNode = shadowRoot())
-        shadowNode->recalcStyle(Node::Force);
 }
     
 bool MediaControlInputElement::hitTest(const IntPoint& absPoint)
index b0dc0d9f98eb363e037961aed68e98f76e4a68d6..5eff8262270cc7e63256f7beceec4ce67000db63 100644 (file)
@@ -61,6 +61,8 @@ RenderSlider::RenderSlider(HTMLInputElement* element)
 
 RenderSlider::~RenderSlider()
 {
+    if (m_thumb)
+        m_thumb->detach();
 }
 
 int RenderSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirectionMode, LinePositionMode) const
@@ -99,14 +101,37 @@ void RenderSlider::computePreferredLogicalWidths()
     setPreferredLogicalWidthsDirty(false); 
 }
 
+void RenderSlider::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+{
+    RenderBlock::styleDidChange(diff, oldStyle);
+
+    if (m_thumb)
+        m_thumb->renderer()->setStyle(createThumbStyle(style()));
+}
+
+PassRefPtr<RenderStyle> RenderSlider::createThumbStyle(const RenderStyle* parentStyle)
+{
+    RefPtr<RenderStyle> thumbStyle = document()->styleSelector()->styleForElement(m_thumb.get(), style(), false);
+
+    if (parentStyle->appearance() == SliderVerticalPart)
+        thumbStyle->setAppearance(SliderThumbVerticalPart);
+    else if (parentStyle->appearance() == SliderHorizontalPart)
+        thumbStyle->setAppearance(SliderThumbHorizontalPart);
+    else if (parentStyle->appearance() == MediaSliderPart)
+        thumbStyle->setAppearance(MediaSliderThumbPart);
+    else if (parentStyle->appearance() == MediaVolumeSliderPart)
+        thumbStyle->setAppearance(MediaVolumeSliderThumbPart);
+
+    return thumbStyle.release();
+}
+
 IntRect RenderSlider::thumbRect()
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    if (!thumbElement)
+    if (!m_thumb)
         return IntRect();
 
     IntRect thumbRect;
-    RenderBox* thumb = toRenderBox(thumbElement->renderer());
+    RenderBox* thumb = toRenderBox(m_thumb->renderer());
 
     thumbRect.setWidth(thumb->style()->width().calcMinValue(contentWidth()));
     thumbRect.setHeight(thumb->style()->height().calcMinValue(contentHeight()));
@@ -128,8 +153,7 @@ void RenderSlider::layout()
 {
     ASSERT(needsLayout());
 
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    RenderBox* thumb = thumbElement ? toRenderBox(thumbElement->renderer()) : 0;
+    RenderBox* thumb = m_thumb ? toRenderBox(m_thumb->renderer()) : 0;
 
     IntSize baseSize(borderAndPaddingWidth(), borderAndPaddingHeight());
 
@@ -176,35 +200,43 @@ void RenderSlider::layout()
     setNeedsLayout(false);
 }
 
-SliderThumbElement* RenderSlider::sliderThumbElement() const
+void RenderSlider::updateFromElement()
 {
-    return toSliderThumbElement(static_cast<Element*>(node())->shadowRoot());
+    // Layout will take care of the thumb's size and position.
+    if (!m_thumb) {
+        m_thumb = SliderThumbElement::create(static_cast<HTMLElement*>(node()));
+        RefPtr<RenderStyle> thumbStyle = createThumbStyle(style());
+        m_thumb->setRenderer(m_thumb->createRenderer(renderArena(), thumbStyle.get()));
+        m_thumb->renderer()->setStyle(thumbStyle.release());
+        m_thumb->setAttached();
+        m_thumb->setInDocument();
+        addChild(m_thumb->renderer());
+    }
+    setNeedsLayout(true);
 }
 
 bool RenderSlider::mouseEventIsInThumb(MouseEvent* evt)
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    if (!thumbElement || !thumbElement->renderer())
+    if (!m_thumb || !m_thumb->renderer())
         return false;
 
 #if ENABLE(VIDEO)
     if (style()->appearance() == MediaSliderPart || style()->appearance() == MediaVolumeSliderPart) {
-        MediaControlInputElement* sliderThumb = static_cast<MediaControlInputElement*>(thumbElement->renderer()->node());
+        MediaControlInputElement *sliderThumb = static_cast<MediaControlInputElement*>(m_thumb->renderer()->node());
         return sliderThumb->hitTest(evt->absoluteLocation());
     }
 #endif
 
-    FloatPoint localPoint = thumbElement->renderBox()->absoluteToLocal(evt->absoluteLocation(), false, true);
-    IntRect thumbBounds = thumbElement->renderBox()->borderBoxRect();
+    FloatPoint localPoint = m_thumb->renderBox()->absoluteToLocal(evt->absoluteLocation(), false, true);
+    IntRect thumbBounds = m_thumb->renderBox()->borderBoxRect();
     return thumbBounds.contains(roundedIntPoint(localPoint));
 }
 
 FloatPoint RenderSlider::mouseEventOffsetToThumb(MouseEvent* evt)
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    ASSERT(thumbElement && thumbElement->renderer());
-    FloatPoint localPoint = thumbElement->renderBox()->absoluteToLocal(evt->absoluteLocation(), false, true);
-    IntRect thumbBounds = thumbElement->renderBox()->borderBoxRect();
+    ASSERT(m_thumb && m_thumb->renderer());
+    FloatPoint localPoint = m_thumb->renderBox()->absoluteToLocal(evt->absoluteLocation(), false, true);
+    IntRect thumbBounds = m_thumb->renderBox()->borderBoxRect();
     FloatPoint offset;
     offset.setX(thumbBounds.x() + thumbBounds.width() / 2 - localPoint.x());
     offset.setY(thumbBounds.y() + thumbBounds.height() / 2 - localPoint.y());
@@ -213,8 +245,7 @@ FloatPoint RenderSlider::mouseEventOffsetToThumb(MouseEvent* evt)
 
 void RenderSlider::setValueForPosition(int position)
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    if (!thumbElement || !thumbElement->renderer())
+    if (!m_thumb || !m_thumb->renderer())
         return;
 
     HTMLInputElement* element = static_cast<HTMLInputElement*>(node());
@@ -239,45 +270,40 @@ void RenderSlider::setValueForPosition(int position)
 
 int RenderSlider::positionForOffset(const IntPoint& p)
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    if (!thumbElement || !thumbElement->renderer())
+    if (!m_thumb || !m_thumb->renderer())
         return 0;
 
     int position;
     if (style()->appearance() == SliderVerticalPart || style()->appearance() == MediaVolumeSliderPart)
-        position = p.y() - thumbElement->renderBox()->height() / 2;
+        position = p.y() - m_thumb->renderBox()->height() / 2;
     else
-        position = p.x() - thumbElement->renderBox()->width() / 2;
+        position = p.x() - m_thumb->renderBox()->width() / 2;
     
     return max(0, min(position, trackSize()));
 }
 
 int RenderSlider::currentPosition()
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    ASSERT(thumbElement && thumbElement->renderer());
+    ASSERT(m_thumb);
+    ASSERT(m_thumb->renderer());
 
     if (style()->appearance() == SliderVerticalPart || style()->appearance() == MediaVolumeSliderPart)
-        return toRenderBox(thumbElement->renderer())->y() - contentBoxRect().y();
-    return toRenderBox(thumbElement->renderer())->x() - contentBoxRect().x();
+        return toRenderBox(m_thumb->renderer())->y() - contentBoxRect().y();
+    return toRenderBox(m_thumb->renderer())->x() - contentBoxRect().x();
 }
 
 int RenderSlider::trackSize()
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    ASSERT(thumbElement && thumbElement->renderer());
+    ASSERT(m_thumb);
+    ASSERT(m_thumb->renderer());
 
     if (style()->appearance() == SliderVerticalPart || style()->appearance() == MediaVolumeSliderPart)
-        return contentHeight() - thumbElement->renderBox()->height();
-    return contentWidth() - thumbElement->renderBox()->width();
+        return contentHeight() - m_thumb->renderBox()->height();
+    return contentWidth() - m_thumb->renderBox()->width();
 }
 
 void RenderSlider::forwardEvent(Event* event)
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    if (!thumbElement)
-        return;
-
     if (event->isMouseEvent()) {
         MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);
         if (event->type() == eventNames().mousedownEvent && mouseEvent->button() == LeftButton) {
@@ -288,13 +314,12 @@ void RenderSlider::forwardEvent(Event* event)
         }
     }
 
-    thumbElement->defaultEventHandler(event);
+    m_thumb->defaultEventHandler(event);
 }
 
 bool RenderSlider::inDragMode() const
 {
-    SliderThumbElement* thumbElement = sliderThumbElement();
-    return thumbElement && thumbElement->inDragMode();
+    return m_thumb && m_thumb->inDragMode();
 }
 
 } // namespace WebCore
index 5fb592191000b3c3d54dab7dc80fb506b8da0f6f..03779a39da66fafd5c6c8f4dcde5182093fad390 100644 (file)
@@ -45,10 +45,8 @@ namespace WebCore {
         virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
         virtual void computePreferredLogicalWidths();
         virtual void layout();
+        virtual void updateFromElement();
 
-        // FIXME: Eventually, the logic of manipulating slider thumb should move to
-        // SliderThumbElement and accessing sliderThumbElement should not be necessary in this class.
-        SliderThumbElement* sliderThumbElement() const;
         bool mouseEventIsInThumb(MouseEvent*);
         FloatPoint mouseEventOffsetToThumb(MouseEvent*);
 
@@ -58,10 +56,16 @@ namespace WebCore {
 
         int currentPosition();
 
+        virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
+
         virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
 
+        PassRefPtr<RenderStyle> createThumbStyle(const RenderStyle* parentStyle);
+
         int trackSize();
 
+        RefPtr<SliderThumbElement> m_thumb;
+
         friend class SliderThumbElement;
     };