Changeset 147070 in webkit


Ignore:
Timestamp:
Mar 27, 2013 11:39:05 PM (11 years ago)
Author:
keishi@webkit.org
Message:

Dragging to edge should always snap to min/max.
https://bugs.webkit.org/show_bug.cgi?id=113477

Reviewed by Kent Tamura.

Source/WebCore:

Dragging to the edge of a slider should always snap to the min/max.

Test: fast/forms/range/range-slow-drag-to-edge.html

  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::setPositionFromPoint):

LayoutTests:

  • fast/forms/range/range-slow-drag-to-edge-expected.txt: Added.
  • fast/forms/range/range-slow-drag-to-edge.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147056 r147070  
     12013-03-27  Keishi Hattori  <keishi@webkit.org>
     2
     3        Dragging to edge should always snap to min/max.
     4        https://bugs.webkit.org/show_bug.cgi?id=113477
     5
     6        Reviewed by Kent Tamura.
     7
     8        * fast/forms/range/range-slow-drag-to-edge-expected.txt: Added.
     9        * fast/forms/range/range-slow-drag-to-edge.html: Added.
     10
    1112013-03-27  Shinya Kawanaka  <shinyak@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r147058 r147070  
     12013-03-27  Keishi Hattori  <keishi@webkit.org>
     2
     3        Dragging to edge should always snap to min/max.
     4        https://bugs.webkit.org/show_bug.cgi?id=113477
     5
     6        Reviewed by Kent Tamura.
     7
     8        Dragging to the edge of a slider should always snap to the min/max.
     9
     10        Test: fast/forms/range/range-slow-drag-to-edge.html
     11
     12        * html/shadow/SliderThumbElement.cpp:
     13        (WebCore::SliderThumbElement::setPositionFromPoint):
     14
    1152013-03-27  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp

    r146977 r147070  
    287287    }
    288288    position = max<LayoutUnit>(0, min(position, trackSize));
    289     if (position == currentPosition)
    290         return;
    291 
    292289    const Decimal ratio = Decimal::fromDouble(static_cast<double>(position) / trackSize);
    293290    const Decimal fraction = isVertical || !isLeftToRightDirection ? Decimal(1) - ratio : ratio;
     
    309306#endif
    310307
     308    String valueString = serializeForNumberType(value);
     309    if (valueString == input->value())
     310        return;
     311
    311312    // FIXME: This is no longer being set from renderer. Consider updating the method name.
    312     input->setValueFromRenderer(serializeForNumberType(value));
     313    input->setValueFromRenderer(valueString);
    313314    renderer()->setNeedsLayout(true);
    314315    input->dispatchFormControlChangeEvent();
Note: See TracChangeset for help on using the changeset viewer.