Status

Core Graveyard
XForms
RESOLVED FIXED
12 years ago
a year ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

({fixed1.8.0.5, fixed1.8.1})

Trunk
fixed1.8.0.5, fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

12 years ago
XBLize xf:message.
(Assignee)

Comment 1

12 years ago
Created attachment 217455 [details] [diff] [review]
like this.

This makes message to inherit delegatestub. This way SNB is easy to handle.
The UI part is implemented in XBL.
Attachment #217455 - Flags: review?(allan)
(Assignee)

Comment 2

12 years ago
Created attachment 217464 [details] [diff] [review]
using hasBoundNode, not getValue
Attachment #217455 - Attachment is obsolete: true
Attachment #217464 - Flags: review?(allan)
Attachment #217455 - Flags: review?(allan)

Updated

12 years ago
Status: NEW → ASSIGNED

Comment 3

12 years ago
Comment on attachment 217464 [details] [diff] [review]
using hasBoundNode, not getValue

> Index: nsXFormsMessageElement.cpp
> ===================================================================

>  NS_IMETHODIMP
>  nsXFormsMessageElement::WillChangeDocument(nsIDOMDocument *aNewDocument)
>  {
>    if (mDocument) {
>      if (mEphemeralTimer) {
> @@ -314,25 +244,26 @@ nsXFormsMessageElement::WillChangeDocume
>      // If we are currently trying to load an external message, cancel the
>      // request.
>      if (mChannel) {
>        mChannel->Cancel(NS_BINDING_ABORTED);
>      }
>    }
 
>    mDocument = aNewDocument;
> +  nsXFormsDelegateStub::WillChangeDocument(aNewDocument);
>    return NS_OK;
>  }
 
>  NS_IMETHODIMP
>  nsXFormsMessageElement::OnDestroyed()
>  {
> -  mElement = nsnull;
> -  mVisualElement = nsnull;
>    mChannel = nsnull;
> +  mDocument = nsnull;
> +  nsXFormsDelegateStub::OnDestroyed();
>    return NS_OK;
>  }

Shouldn't you return the error values from the superclasses in both of these functions?
 
> Index: resources/content/xforms.css
> ===================================================================

> +message[level="ephemeral"] > html|div.-moz-xforms-message-container,
> +hint > html|div.-moz-xforms-message-container {
> +  background-color: InfoBackground;
> +  color: InfoText;
> +  padding: 2px 3px;
> +  font: message-box;
> +  border: 1px black solid;
> +  position: absolute !important;
> +  z-index: 2147483647;
> +  width: auto;
> +  height: auto;
> +  display: inherit;
>  }

Do we want all this default styling? Until now our styling has been minimal for all controls. An empty message also show up as a small black box with this.
<xforms:message level="ephemeral"/>
Could previously be used to clear any currently shown ephemeral message.
(Assignee)

Comment 4

12 years ago
(In reply to comment #3)
> 
> Shouldn't you return the error values from the superclasses in both of these
> functions?

Oh, yes.

> 
> Do we want all this default styling?
Yes, the default should IMO look like normal tooltip.

> Until now our styling has been minimal for
> all controls. An empty message also show up as a small black box with this.
> <xforms:message level="ephemeral"/>
> Could previously be used to clear any currently shown ephemeral message.
> 
Oh, I didn't know this :) Couldn't you still make
this using message[level="ephemeral"] { display: none;}  ?


Comment 5

12 years ago
(In reply to comment #4)
> (In reply to comment #3)
> > 
> > Do we want all this default styling?
>
> Yes, the default should IMO look like normal tooltip.

Hmmm.
 
> > Until now our styling has been minimal for
> > all controls. An empty message also show up as a small black box with this.
> > <xforms:message level="ephemeral"/>
> > Could previously be used to clear any currently shown ephemeral message.
> > 
> Oh, I didn't know this :) Couldn't you still make
> this using message[level="ephemeral"] { display: none;}  ?

Then all my messages would disappear. Yes, problem solved ;-)

How about at least having an appearance="minimal" version without all the styling?

Comment 6

12 years ago
Created attachment 217852 [details]
"testcase"

Here's an example of trying to style the messages
(Assignee)

Comment 7

12 years ago
(In reply to comment #5)
> (In reply to comment #4)
> > Oh, I didn't know this :) Couldn't you still make
> > this using message[level="ephemeral"] { display: none;}  ?
> 
> Then all my messages would disappear. Yes, problem solved ;-)
> 

Äh, <message class="hide">
.hide {
  display: none;
}
(Assignee)

Comment 8

12 years ago
Created attachment 217868 [details]
"testcase" 2
(Assignee)

Comment 9

12 years ago
Created attachment 217871 [details] [diff] [review]
better styling
Attachment #217464 - Attachment is obsolete: true
Attachment #217464 - Flags: review?(allan)
Attachment #217871 - Flags: review?(allan)

Comment 10

12 years ago
Comment on attachment 217871 [details] [diff] [review]
better styling

Much better. r=me
Attachment #217871 - Flags: review?(allan) → review+
(Assignee)

Updated

12 years ago
Attachment #217871 - Flags: review?(doronr)

Updated

12 years ago
Attachment #217871 - Flags: review?(doronr) → review+
(Assignee)

Comment 11

12 years ago
Checking in Makefile.in;
/cvsroot/mozilla/extensions/xforms/Makefile.in,v  <--  Makefile.in
new revision: 1.56; previous revision: 1.55
done
RCS file: /cvsroot/mozilla/extensions/xforms/nsIXFormsEphemeralMessageUI.idl,v
done
Checking in nsIXFormsEphemeralMessageUI.idl;
/cvsroot/mozilla/extensions/xforms/nsIXFormsEphemeralMessageUI.idl,v  <--  nsIXFormsEphemeralMessageUI.idl
initial revision: 1.1
done
Checking in nsXFormsMessageElement.cpp;
/cvsroot/mozilla/extensions/xforms/nsXFormsMessageElement.cpp,v  <--  nsXFormsMessageElement.cpp
new revision: 1.19; previous revision: 1.18
done
Checking in resources/content/xforms.css;
/cvsroot/mozilla/extensions/xforms/resources/content/xforms.css,v  <--  xforms.css
new revision: 1.28; previous revision: 1.27
done
Checking in resources/content/xforms.xml;
/cvsroot/mozilla/extensions/xforms/resources/content/xforms.xml,v  <--  xforms.xml
new revision: 1.33; previous revision: 1.32
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch

Updated

11 years ago
Keywords: fixed1.8.1

Updated

11 years ago
Keywords: fixed1.8.0.5

Updated

11 years ago
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.