[Webkit-unassigned] [Bug 38140] Initial support for HTMLMeterElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 12 20:02:44 PDT 2010


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





--- Comment #26 from Kent Tamura <tkent at chromium.org>  2010-05-12 20:02:43 PST ---
(From update of attachment 55926)
WebCore/rendering/RenderTheme.cpp:924
 +          valueRect.setLocation(FloatPoint(innerRect.x(), innerRect.y() + (max - value) * scale));
Need static_cast<float>() because max, value and scale are double.

WebCore/rendering/RenderTheme.cpp:925
 +          valueRect.setSize(FloatSize(innerRect.width(), (value - min) * scale));
ditto.

WebCore/rendering/RenderTheme.cpp:929
 +          valueRect.setLocation(FloatPoint(innerRect.x() + (max - value) * scale, innerRect.y()));
ditto.

WebCore/rendering/RenderTheme.cpp:930
 +          valueRect.setSize(FloatSize((value - min) * scale, innerRect.height()));
ditto.

WebCore/rendering/RenderTheme.cpp:935
 +          valueRect.setSize(FloatSize((value - min) * scale, innerRect.height()));
ditto.

(In reply to comment #22)
> (In reply to comment #21)
> > (From update of attachment 55016 [details] [details])
> > WebCore/html/HTMLMeterElement.h:54
> >  +      virtual bool isOptionalFormControl() const { return true; }
> > This seems curious.  Why do we need to return false for isOptionalFormControl()?
> > 
> From http://dev.w3.org/html5/spec/Overview.html#attr-input-required , the required attribute applies only to input (and textarea) elements. All other form control elements return true.

isOptionalFormControl() is used only for checking whether :optional CSS selector is applied or not.
So your code mean that :optional is always applied to <meter>.
I don't think we need to make it true for elements without form values.
If you'd like to avoid form validation for <meter>, override recalcWillValidate(). See HTMLFieldSetElement.h.


> > Could you add a test confirming that <meter> tag behavior is not changed on platforms without ENABLE_METER_TAG?
> > For example, "<meter>56%</meter>" should work like "<span>56%</span>"
> This was discussed before, in https://bugs.webkit.org/show_bug.cgi?id=35937. There is no mechanism for adding conditions to html.css, so the new style definition will affect ports with this flag turned off. There is precedence with other new tags e.g. datagrid for doing the same.

I see.  How about parsing test?
I tried your patch on Mac without ENABLE_METER_TAG, and found <meter> tags were completely disappeared.

-- 
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