WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56001
<meter> should only support horizontal indicator
https://bugs.webkit.org/show_bug.cgi?id=56001
Summary
<meter> should only support horizontal indicator
Hajime Morrita
Reported
2011-03-09 01:03:27 PST
Current <meter> change its appearance based on its dimension. But such kind of style-determined-by-layout behavior is tricky to implement and may (and did) cause some layout instability. (See
https://lists.webkit.org/pipermail/webkit-dev/2011-March/016140.html
) Instead of this dynamic appearance switching, WebKit should provide the way to choose the visual direction by styles. Because text-direction is used to switch its visual between rtl and ltr, writing-mode looks a good candidate for the knob. Why don't provide two separate -webkit-appearance (like meter-vertical and meter-horizontal)? Because WebKit allows user-styling for form controls via pseudo classes like -webkit-meter, and this user-style is enabled by specifying "-webkit-appearance: none". Here we already use -webkit-appearance, thus cannot give meter-vertical appearance for it.
Attachments
Patch
(456.68 KB, patch)
2011-03-10 00:39 PST
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Patch
(442.65 KB, patch)
2011-03-30 19:51 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Patch
(443.04 KB, patch)
2011-03-31 09:27 PDT
,
Hajime Morrita
no flags
Details
Formatted Diff
Diff
Added skip list entries that need expectation update.
(445.70 KB, patch)
2011-04-01 08:47 PDT
,
Hajime Morrita
dglazkov
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2011-03-09 10:40:55 PST
What do you think about adding a whole new CSS property? writing-mode still seems to say not quite what we mean.
Simon Fraser (smfr)
Comment 2
2011-03-09 10:49:30 PST
I don't think writing-mode is the right property to use.
Hajime Morrita
Comment 3
2011-03-10 00:39:26 PST
Created
attachment 85292
[details]
Patch
Hajime Morrita
Comment 4
2011-03-10 00:40:33 PST
Hi Dimitri, could you take a look? This is a preparation for making <meter> new-shadowish.
Dimitri Glazkov (Google)
Comment 5
2011-03-10 14:28:47 PST
(In reply to
comment #4
)
> Hi Dimitri, could you take a look? > This is a preparation for making <meter> new-shadowish.
Given that Simon also thinks that writing-mode is the right approach, perhaps we should have a quick discussion first.
Dimitri Glazkov (Google)
Comment 6
2011-03-10 14:28:58 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > > Hi Dimitri, could you take a look? > > This is a preparation for making <meter> new-shadowish. > > Given that Simon also thinks that writing-mode is NOT the right approach, perhaps we should have a quick discussion first.
Dave Hyatt
Comment 7
2011-03-10 14:47:15 PST
Yeah writing-mode is really not the correct approach here.
Dave Hyatt
Comment 8
2011-03-10 14:48:21 PST
Comment on
attachment 85292
[details]
Patch Can't use writing-mode like this. That isn't what it is for at all.
Dave Hyatt
Comment 9
2011-03-10 14:49:38 PST
Meters orientation should just have to be explicitly specified IMO. We need to just get that fixed in the standard.
Dimitri Glazkov (Google)
Comment 10
2011-03-10 14:52:15 PST
like <meter orientation="vertical">?
Dimitri Glazkov (Google)
Comment 11
2011-03-10 15:56:47 PST
(In reply to
comment #9
)
> Meters orientation should just have to be explicitly specified IMO. We need to just get that fixed in the standard.
After talking with Hixie, he's suggesting adding "-webkit-direction" (or similar) CSS property instead. WDYT?
Ian 'Hixie' Hickson
Comment 12
2011-03-10 16:54:09 PST
The auto-orientation capability is similar to how Cocoa's NSSlider control automatically picks the best orientation (see its isVertical API). It increases the odds that people will make pretty pages. I think -webkit-direction should have three values, 'auto' (the initial value, implementing the spec), and 'horizontal' and 'vertical' (which force a particular direction). Maybe -webkit-control-direction to avoid confusion with 'direction'.
Hajime Morrita
Comment 13
2011-03-10 21:17:00 PST
Sorry for coming late and making the patch before reading simon's comment. (I just missed it...) Okay, I'm going to introduce -webkit-control-direction. The original intention to make direction explicit is that eliminate "auto"-like behavior because it requires layout to determine direction, that causes complicated situation. So I think it's OK to make the default value "horizontal" because there is no vertical meter indicator for native controls.
Dimitri Glazkov (Google)
Comment 14
2011-03-10 21:19:35 PST
(In reply to
comment #13
)
> Sorry for coming late and making the patch before reading simon's comment. (I just missed it...) > > Okay, I'm going to introduce -webkit-control-direction. > The original intention to make direction explicit is that eliminate "auto"-like behavior > because it requires layout to determine direction, that causes complicated situation. > So I think it's OK to make the default value "horizontal" because > there is no vertical meter indicator for native controls.
Hang on, hang on -- the discussion isn't over yet. Let Hyatt chime in.
Simon Fraser (smfr)
Comment 15
2011-03-11 09:04:24 PST
FYI I would prefer the name to contain 'orientation' rather than 'direction'. I'm still not sure that a normal property is the correct approach here. Maybe a pseudoclass?
Dimitri Glazkov (Google)
Comment 16
2011-03-11 09:10:25 PST
(In reply to
comment #15
)
> FYI I would prefer the name to contain 'orientation' rather than 'direction'. I'm still not sure that a normal property is the correct approach here. Maybe a pseudoclass?
Dimitri Glazkov (Google)
Comment 17
2011-03-11 09:12:10 PST
(In reply to
comment #16
)
> (In reply to
comment #15
) > > FYI I would prefer the name to contain 'orientation' rather than 'direction'. I'm still not sure that a normal property is the correct approach here. Maybe a pseudoclass?
(In reply to
comment #15
)
> FYI I would prefer the name to contain 'orientation' rather than 'direction'. I'm still not sure that a normal property is the correct approach here. Maybe a pseudoclass?
Sorry for double-posting. A pseudoclass wouldn't be enough, since it doesn't allow us to set the orientation by itself. Or perhaps I am misunderstanding... Can you pseudocode the pseudoclass idea for me?
Hajime Morrita
Comment 18
2011-03-25 01:20:26 PDT
How about to ask whatwg@ for dropping vertical meter from the spec? There is no vertical meter/indicator on any platform and Opera, which is the only browser that supports <meter> other than WebKit, also doesn't support it.
Dimitri Glazkov (Google)
Comment 19
2011-03-25 07:39:08 PDT
(In reply to
comment #18
)
> How about to ask whatwg@ for dropping vertical meter from the spec? > There is no vertical meter/indicator on any platform and > Opera, which is the only browser that supports <meter> other than WebKit, also doesn't support it.
Let's go with this notion for now. Implement horizontal only. We'll figure out what to do with spec later.
Hajime Morrita
Comment 20
2011-03-30 19:51:32 PDT
Created
attachment 87660
[details]
Patch
Hajime Morrita
Comment 21
2011-03-30 19:52:44 PDT
Hi Dimitri, thank you for the suggestion!
> Let's go with this notion for now. Implement horizontal only. We'll figure out what to do with spec later.
So I removed vertical related code. It got simpler now.
Dimitri Glazkov (Google)
Comment 22
2011-03-30 20:15:22 PDT
Comment on
attachment 87660
[details]
Patch this should become even simpler once you switch it to the shadow DOM.
Hajime Morrita
Comment 23
2011-03-31 09:27:51 PDT
Created
attachment 87746
[details]
Patch
Hajime Morrita
Comment 24
2011-03-31 09:29:06 PDT
Comment on
attachment 87746
[details]
Patch Oops. I intended to land it...
Hajime Morrita
Comment 25
2011-03-31 09:32:14 PDT
Committed
r82589
: <
http://trac.webkit.org/changeset/82589
>
WebKit Review Bot
Comment 26
2011-03-31 10:33:58 PDT
http://trac.webkit.org/changeset/82589
might have broken Qt Linux Release The following tests are not passing: fast/dom/HTMLMeterElement/meter-boundary-values.html fast/dom/HTMLMeterElement/meter-optimums.html fast/dom/HTMLMeterElement/meter-styles-changing-pseudo.html fast/dom/HTMLMeterElement/meter-styles.html
Adam Barth
Comment 27
2011-03-31 11:15:44 PDT
I'm rolling out this patch because it turned many bots red and the author did not appear to be available to help repair them.
Hajime Morrita
Comment 28
2011-04-01 08:47:29 PDT
Created
attachment 87863
[details]
Added skip list entries that need expectation update.
Dimitri Glazkov (Google)
Comment 29
2011-04-01 08:53:33 PDT
Comment on
attachment 87863
[details]
Added skip list entries that need expectation update. let's try again.
Hajime Morrita
Comment 30
2011-04-01 08:59:30 PDT
Committed
r82686
: <
http://trac.webkit.org/changeset/82686
>
WebKit Review Bot
Comment 31
2011-04-01 09:52:57 PDT
http://trac.webkit.org/changeset/82686
might have broken Windows 7 Release (Tests) The following tests are not passing: fast/dom/HTMLMeterElement/meter-appearances-capacity.html fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug