The default bug view has changed. See this FAQ.

Add a meterbar and meterchunk appearances

RESOLVED FIXED in mozilla16

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: Vincent LAMOTTE, Assigned: Yoan TEBOUL)

Tracking

(Blocks: 2 bugs, {dev-doc-complete})

Trunk
mozilla16
dev-doc-complete
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: 

Introduce a new meterbar choice for -moz-appearance.

Reproducible: Always
(Reporter)

Updated

6 years ago
Depends on: 555985
Version: unspecified → Trunk
(Reporter)

Updated

6 years ago
Blocks: 555958
No longer depends on: 555985
(Reporter)

Updated

6 years ago
Blocks: 555985
No longer blocks: 555958
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 1

6 years ago
Created attachment 536847 [details] [diff] [review]
patch_v1.0

Added meterbar and meterchunk moz-appearances, and renamed a fonction in xpwidgets which can now be used for both meter and progress elements.
Comment on attachment 536847 [details] [diff] [review]
patch_v1.0

You don't need the "-vertical" for meterbar and meterchunk.

>diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h
>--- a/layout/style/nsCSSKeywordList.h
>+++ b/layout/style/nsCSSKeywordList.h
>@@ -328,16 +328,17 @@ CSS_KEY(lowercase, lowercase)
> CSS_KEY(ltr, ltr)
> CSS_KEY(manual, manual)
> CSS_KEY(margin-box, margin_box)
> CSS_KEY(matrix, matrix)
> CSS_KEY(medium, medium)
> CSS_KEY(menu, menu)
> CSS_KEY(menutext, menutext)
> CSS_KEY(message-box, message_box)
>+CSS_KEY(meter, meter)

Why is that needed?

>diff --git a/widget/src/xpwidgets/nsNativeTheme.cpp b/widget/src/xpwidgets/nsNativeTheme.cpp
>--- a/widget/src/xpwidgets/nsNativeTheme.cpp
>+++ b/widget/src/xpwidgets/nsNativeTheme.cpp
>@@ -467,18 +468,19 @@ nsNativeTheme::IsIndeterminateProgress(n
>     return aEventStates.HasState(NS_EVENT_STATE_INDETERMINATE);
>   }
>
>   return aFrame->GetContent()->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::mode,
>                                            NS_LITERAL_STRING("undetermined"),
>                                            eCaseMatters);
> }
>
>+// progressbar and meterbar:
> PRBool
>-nsNativeTheme::IsVerticalProgress(nsIFrame* aFrame)
>+nsNativeTheme::IsVerticalProgressMeter(nsIFrame* aFrame)

I would prefer to not change that for the moment. One reason is that the name is confusing because "progressmeter" is a XUL element. You could rename that "IsVerticalProgressOrMeter" to fix this but do we really need this new method for the moment? If you really want to add it, I think "IsVerticalFormControl" would be a better name given that other form controls might use the same system. And if you change the name, change the callers too ;)
(Assignee)

Comment 3

6 years ago
Created attachment 537125 [details] [diff] [review]
patch_v1.1

Mounir's comment taken into account.
Attachment #536847 - Attachment is obsolete: true
Comment on attachment 537125 [details] [diff] [review]
patch_v1.1

>diff --git a/layout/style/forms.css b/layout/style/forms.css
> ::-moz-meter-bar {
>   display: inline-block ! important;
>   float: none ! important;
>   position: static ! important;
>   overflow: visible ! important;
>-  /* Add a new moz-appearance : Bug 660232
>-    * -moz-appearance: meterchunk;
>-    */
>+  -moz-appearance: meterchunk;

Could you put this on top of the block? and leave a blank line before "display: inline-block"?

f=me with that
Attachment #537125 - Flags: review?(roc)
Attachment #537125 - Flags: feedback+
(Assignee)

Comment 5

6 years ago
Created attachment 537142 [details] [diff] [review]
patch_v1.2
Attachment #537125 - Attachment is obsolete: true
Attachment #537125 - Flags: review?(roc)
Attachment #537142 - Flags: review+
Summary: Add a -moz-appearance: meterbar → Add a meterbar and meterchunk appearances
Duplicate of this bug: 660232
Assignee: nobody → yoan.teboul
Status: NEW → ASSIGNED
I don't know if the appearances are listed somewhere, in the doubt, adding 'dev-doc-needed'.
Keywords: dev-doc-needed
(Assignee)

Comment 8

6 years ago
Created attachment 538052 [details] [diff] [review]
patch_v1.3
Attachment #537142 - Attachment is obsolete: true
Blocks: 662870
(Assignee)

Updated

6 years ago
Blocks: 663490
https://hg.mozilla.org/mozilla-central/rev/2a991342f5d5
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Added the two values in:
https://developer.mozilla.org/en-US/docs/CSS/-moz-appearance
and updated
https://developer.mozilla.org/en-US/docs/Firefox_16_for_developers
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.