[Webkit-unassigned] [Bug 36259] <input type=range> does not validate correctly without a renderer and the tests are incorrect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 18 18:50:33 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=36259


David Kilzer (ddkilzer) <ddkilzer at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #51082|review?                     |review+
               Flag|                            |




--- Comment #15 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2010-03-18 18:50:33 PST ---
(From update of attachment 51082)
> diff --git a/WebCore/html/StepRange.cpp b/WebCore/html/StepRange.cpp
> new file mode 100644
> index 0000000..78f0365
> --- /dev/null
> +++ b/WebCore/html/StepRange.cpp
> @@ -0,0 +1,80 @@
> +/*
> + * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.

Nit:  Update copyright to include 2010.

> +double sliderPosition(HTMLInputElement* element)
> +{
> +    StepRange range(element);
> +    return range.proportionFromValue(range.valueFromElement(element));
> +}

I think this method should remain in RenderSlider.cpp.  It's of no use outside
that class.

> diff --git a/WebCore/html/StepRange.h b/WebCore/html/StepRange.h
> new file mode 100644
> index 0000000..7b2388e
> --- /dev/null
> +++ b/WebCore/html/StepRange.h
> @@ -0,0 +1,60 @@
> +/*
> + * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.

Nit:  Update copyright to include 2010.

> +struct StepRange {

Just make it a class.  I don't see an advantage to leaving it a struct.

I would also inherit from non-copyable to make it explicit that we don't
support copying these objects.

> +    double valueFromElement(HTMLInputElement*, bool* wasClamped = 0);

Again, I think this method should stay in RenderSlider.cpp as a static method.

+++ b/WebCore/rendering/RenderSlider.cpp

Update the copyright here, too.  :)

r=me with the above changes.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list