Closed
Bug 283219
Opened 20 years ago
Closed 20 years ago
trigger with appearance minimal scenario fails
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aaronr, Assigned: smaug)
References
Details
Attachments
(9 files, 1 obsolete file)
|
1.13 KB,
application/xhtml+xml
|
Details | |
|
1.01 KB,
application/xhtml+xml
|
Details | |
|
1.01 KB,
application/xhtml+xml
|
Details | |
|
8.84 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.00 KB,
application/xhtml+xml
|
Details | |
|
1.38 KB,
patch
|
Details | Diff | Splinter Review | |
|
10.29 KB,
patch
|
Details | Diff | Splinter Review | |
|
10.24 KB,
patch
|
Details | Diff | Splinter Review | |
|
985 bytes,
patch
|
Details | Diff | Splinter Review |
Testcase submitted by a XForms user of a common XForms scenario used by XForms developers combining @appearance="minimal" on a trigger with CSS underlining style to create a trigger that looks just like a HTML link. Currently we just show a pushbutton since we haven't implemented @appearance="minimal" on trigger elements, yet.
Updated•20 years ago
|
Status: NEW → ASSIGNED
Comment 2•20 years ago
|
||
This patch creates a <span> when @appearance="minimal", but DOMActivate does not work. What am I doing wrong? Styling is not working either, should I copy the style attribute from the <trigger> to the span?
| Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > Styling is not working either, should I copy the style attribute from the > <trigger> to the span? Style attribute is defined only for (X)HTML, XUL and SVG elements, so I'd say the test case is not valid. This doesn't mention style attribute: "A host language is expected to add attributes such as xml:lang as well as an attribute, named class, that holds a list of strings that can be matched by CSS class selectors."
Comment 4•20 years ago
|
||
Here is an updated test case using XHTML 1 strict (style and @class) instead of @style. The issue of whether the host language provides @style on XForms controls is one of whether your host language is XHTML transitional or XHTML strict, and is unrelated to this functionality.
| Assignee | ||
Updated•20 years ago
|
Attachment #175335 -
Attachment mime type: application/xhtml+xm → application/xhtml+xml
Comment 5•20 years ago
|
||
| Assignee | ||
Comment 6•20 years ago
|
||
We should/could extend XTF so that we can specify the name of the class attribute. So something like nsIAtom nsIXTFElement::getClassAttributeName() which would then internally be actually nsIStyledContent::GetClassAttributeName(). I'll open a new bug for this.
Comment 7•20 years ago
|
||
DOMActivate is UI Event, so this patch creates such a one instead... but it still does not work :(
Attachment #175293 -
Attachment is obsolete: true
| Assignee | ||
Comment 8•20 years ago
|
||
Maybe we could just (un)style the button. Adding something like this to the xforms.css (didn't test): @namespace xf url(http://www.w3.org/2002/xforms); @namespace html url(http://www.w3.org/1999/xhtml); xf|button[appearance=minimal] > html|button { background: transparent; border:none; color: inherit; margin: 0px; padding: 0px; }
| Assignee | ||
Comment 9•20 years ago
|
||
Comment on attachment 175340 [details]
Proper placement of @class on trigger instead of on label
you could write valid CSS ;)
Comment 10•20 years ago
|
||
Please accept my apologies for carelessness in cut and paste.
| Assignee | ||
Comment 11•20 years ago
|
||
This makes minimal trigger and submit *look* more like a normal text, which can then be styled to look like a link. For class attribute the patch in Bug 283366 is needed.
Comment 12•20 years ago
|
||
(In reply to comment #11) > Created an attachment (id=175474) [edit] > alternative patch > > This makes minimal trigger and submit *look* more like a normal text, which > can then be styled to look like a link. > For class attribute the patch in Bug 283366 is needed. Hmmm, it's fine to do it that way as we can do what we want. But using a span f.x. allows one to get the minimal trigger word wrapped, which I personally think is nicer.
| Assignee | ||
Comment 13•20 years ago
|
||
Dispatching UIEvents should work now. (Bug 283637)
| Assignee | ||
Comment 14•20 years ago
|
||
Comment on attachment 175422 [details] [diff] [review] Using UIEvent DOMActivate works now with this patch, but dynamic changes to the appearance attribute don't do anything.
| Assignee | ||
Comment 15•20 years ago
|
||
Attachment #175755 -
Flags: review?(allan)
Comment 16•20 years ago
|
||
Comment on attachment 175755 [details] [diff] [review] based on attachment 175422 [details] [diff] [review] , supports dynamic changes r=me
Attachment #175755 -
Flags: review?(allan) → review+
Comment 17•20 years ago
|
||
Comment on attachment 175755 [details] [diff] [review] based on attachment 175422 [details] [diff] [review] , supports dynamic changes >+ if (aName == nsXFormsAtoms::appearance) { >+ if (mIsMinimal != aValue.EqualsLiteral("minimal")) { >+ nsCOMPtr<nsIDOMNode> parent; >+ nsCOMPtr<nsIDOMNode> next; >+ nsCOMPtr<nsIDOMNode> tmp; can't you define them all on one line? r=doron
Attachment #175755 -
Flags: review+
| Assignee | ||
Comment 18•20 years ago
|
||
Assignee: aaronr → smaug
Comment 19•20 years ago
|
||
checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 20•20 years ago
|
||
oops.
Comment 21•20 years ago
|
||
(In reply to comment #20) > Created an attachment (id=176037) [edit] > s/WillSetAttribute/AttributeSet/ > > oops. Checked it in.
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•