| Index: Source/core/html/shadow/SliderThumbElement.cpp
|
| diff --git a/Source/core/html/shadow/SliderThumbElement.cpp b/Source/core/html/shadow/SliderThumbElement.cpp
|
| index 775deb3aa00abce106ae6e2ac7614e6cdc0f3961..f9228bfcba91251fb5634389ef0562fe2acf7c94 100644
|
| --- a/Source/core/html/shadow/SliderThumbElement.cpp
|
| +++ b/Source/core/html/shadow/SliderThumbElement.cpp
|
| @@ -54,14 +54,14 @@ namespace WebCore {
|
|
|
| using namespace HTMLNames;
|
|
|
| -inline static Decimal sliderPosition(HTMLInputElement* element)
|
| +inline static Decimal sliderPosition(Handle<HTMLInputElement> element)
|
| {
|
| const StepRange stepRange(element->createStepRange(RejectAny));
|
| const Decimal oldValue = parseToDecimalForNumberType(element->value(), stepRange.defaultValue());
|
| return stepRange.proportionFromValue(stepRange.clampValue(oldValue));
|
| }
|
|
|
| -inline static bool hasVerticalAppearance(HTMLInputElement* input)
|
| +inline static bool hasVerticalAppearance(Handle<HTMLInputElement> input)
|
| {
|
| ASSERT(input->renderer());
|
| RenderStyle* sliderStyle = input->renderer()->style();
|
| @@ -137,7 +137,7 @@ private:
|
|
|
| void RenderSliderContainer::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
|
| {
|
| - HTMLInputElement* input = node()->shadowHost()->toInputElement();
|
| + Handle<HTMLInputElement> input = node()->shadowHost()->toInputElement();
|
| bool isVertical = hasVerticalAppearance(input);
|
|
|
| #if ENABLE(DATALIST_ELEMENT)
|
| @@ -165,7 +165,7 @@ void RenderSliderContainer::computeLogicalHeight(LayoutUnit logicalHeight, Layou
|
|
|
| void RenderSliderContainer::layout()
|
| {
|
| - HTMLInputElement* input = node()->shadowHost()->toInputElement();
|
| + Handle<HTMLInputElement> input = node()->shadowHost()->toInputElement();
|
| bool isVertical = hasVerticalAppearance(input);
|
| style()->setFlexDirection(isVertical ? FlowColumn : FlowRow);
|
| TextDirection oldTextDirection = style()->direction();
|
| @@ -246,7 +246,7 @@ bool SliderThumbElement::matchesReadWritePseudoClass() const
|
|
|
| Node* SliderThumbElement::focusDelegate()
|
| {
|
| - return hostInput();
|
| + return Handle<HTMLInputElement>(hostInput()).raw();
|
| }
|
|
|
| void SliderThumbElement::dragFrom(const LayoutPoint& point)
|
| @@ -257,8 +257,8 @@ void SliderThumbElement::dragFrom(const LayoutPoint& point)
|
|
|
| void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point)
|
| {
|
| - HTMLInputElement* input = hostInput();
|
| - HTMLElement* trackElement = sliderTrackElementOf(input);
|
| + Handle<HTMLInputElement> input = hostInput();
|
| + HTMLElement* trackElement = sliderTrackElementOf(input.raw());
|
|
|
| if (!input->renderer() || !renderBox() || !trackElement->renderBox())
|
| return;
|
| @@ -347,7 +347,7 @@ void SliderThumbElement::defaultEventHandler(Event* event)
|
|
|
| // FIXME: Should handle this readonly/disabled check in more general way.
|
| // Missing this kind of check is likely to occur elsewhere if adding it in each shadow element.
|
| - HTMLInputElement* input = hostInput();
|
| + Handle<HTMLInputElement> input = hostInput();
|
| if (!input || input->isDisabledOrReadOnly()) {
|
| stopDragging();
|
| HTMLDivElement::defaultEventHandler(event);
|
| @@ -378,7 +378,7 @@ void SliderThumbElement::defaultEventHandler(Event* event)
|
|
|
| bool SliderThumbElement::willRespondToMouseMoveEvents()
|
| {
|
| - const HTMLInputElement* input = hostInput();
|
| + Handle<const HTMLInputElement> input = hostInput();
|
| if (input && !input->isDisabledOrReadOnly() && m_inDragMode)
|
| return true;
|
|
|
| @@ -387,7 +387,7 @@ bool SliderThumbElement::willRespondToMouseMoveEvents()
|
|
|
| bool SliderThumbElement::willRespondToMouseClickEvents()
|
| {
|
| - const HTMLInputElement* input = hostInput();
|
| + Handle<const HTMLInputElement> input = hostInput();
|
| if (input && !input->isDisabledOrReadOnly())
|
| return true;
|
|
|
| @@ -403,7 +403,7 @@ void SliderThumbElement::detach()
|
| HTMLDivElement::detach();
|
| }
|
|
|
| -HTMLInputElement* SliderThumbElement::hostInput() const
|
| +Result<HTMLInputElement> SliderThumbElement::hostInput() const
|
| {
|
| // Only HTMLInputElement creates SliderThumbElement instances as its shadow nodes.
|
| // So, shadowHost() must be an HTMLInputElement.
|
| @@ -424,7 +424,7 @@ static const AtomicString& mediaSliderThumbShadowPseudoId()
|
|
|
| const AtomicString& SliderThumbElement::shadowPseudoId() const
|
| {
|
| - HTMLInputElement* input = hostInput();
|
| + Handle<HTMLInputElement> input = hostInput();
|
| if (!input)
|
| return sliderThumbShadowPseudoId();
|
|
|
| @@ -464,7 +464,7 @@ const AtomicString& SliderContainerElement::shadowPseudoId() const
|
| DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-media-slider-container", AtomicString::ConstructFromLiteral));
|
| DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-container", AtomicString::ConstructFromLiteral));
|
|
|
| - HTMLInputElement* input = shadowHost()->toInputElement();
|
| + Handle<HTMLInputElement> input = shadowHost()->toInputElement();
|
| if (!input)
|
| return sliderContainer;
|
|
|
|
|