<isindex>

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

<isindex>

Boris Zbarsky
I just reenabled <isindex> on the reflow branch, but it lays out a little
differently -- the <hr>s do not go all the way across the page but stop at the
end of the text input.

If the previous rendering is desired, I could try to do it, but it's not
completely trivial, unless we set the display to "block !important" in ua.css or
something.

Let me know if you think compat in this aspect of <isindex> rendering is
important, ok?  And please cite urls!  ;)

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

L. David Baron
On Thursday 2006-04-27 20:51 -0500, Boris Zbarsky wrote:

> I just reenabled <isindex> on the reflow branch, but it lays out a little
> differently -- the <hr>s do not go all the way across the page but stop at
> the end of the text input.
>
> If the previous rendering is desired, I could try to do it, but it's not
> completely trivial, unless we set the display to "block !important" in
> ua.css or something.
>
> Let me know if you think compat in this aspect of <isindex> rendering is
> important, ok?  And please cite urls!  ;)
IIRC, <hr> width calculation is currently rather broken on the reflow
branch (they don't resize correctly, at least).  Is this something you
intentionally did, or something that just happened?

-David

--
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Boris Zbarsky
L. David Baron wrote:
> IIRC, <hr> width calculation is currently rather broken on the reflow
> branch (they don't resize correctly, at least).  Is this something you
> intentionally did, or something that just happened?

I haven't touched <hr>, so if I changed anything about it per se, it was
unintentional.

If you mean the <isindex> behavior, the problem is that it's display:inline by
default.  Since it's an nsAreaFrame and does block reflow "on the inside", I
made it a "replaced inline with block inside" kinda thing.  But for those the
pref width is just the intrinsic pref width, and being inline they don't get the
block treatment of having auto width mean expanding into all the available
space.  If I make <isindex> non-replaced, then it'll be treated as a
non-replaced inline by the reflow state, and not get a computed width, which
will confuse nsAreaFrame even more.

The <hr> behavior is just a consequence of them being as wide as their
containing block, which is correct.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Ian Hickson
On Thu, 27 Apr 2006, Boris Zbarsky wrote:
>
> If you mean the <isindex> behavior, the problem is that it's display:inline by
> default.  Since it's an nsAreaFrame and does block reflow "on the inside", I
> made it a "replaced inline with block inside" kinda thing.

You may wish to consider doing what the WHATWG spec currently suggests:

   http://whatwg.org/specs/web-apps/current-work/#isindex

It matches what Safari does and is similar to IE and Opera, IIRC.

--
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Jonas Sicking
In reply to this post by Boris Zbarsky
Ian Hickson wrote:

> On Thu, 27 Apr 2006, Boris Zbarsky wrote:
>
>>If you mean the <isindex> behavior, the problem is that it's display:inline by
>>default.  Since it's an nsAreaFrame and does block reflow "on the inside", I
>>made it a "replaced inline with block inside" kinda thing.
>
>
> You may wish to consider doing what the WHATWG spec currently suggests:
>
>    http://whatwg.org/specs/web-apps/current-work/#isindex
>
> It matches what Safari does and is similar to IE and Opera, IIRC.

Yeah, I actually think we should do it like this. It isn't pretty, but
it seems like the least effort.

Of course, another alternative is using XBL.

/ Jonas
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

L. David Baron
In reply to this post by Boris Zbarsky
On Thursday 2006-04-27 22:19 -0500, Boris Zbarsky wrote:
> L. David Baron wrote:
> >IIRC, <hr> width calculation is currently rather broken on the reflow
> >branch (they don't resize correctly, at least).  Is this something you
> >intentionally did, or something that just happened?

> If you mean the <isindex> behavior, the problem is that it's display:inline

Yes.

> by default.  Since it's an nsAreaFrame and does block reflow "on the
> inside", I made it a "replaced inline with block inside" kinda thing.  But

Could it stay more like 'inline' than 'inline-block'?  Since the <hr>
inside is a block, it would work the same way other block-within-inline
works, and the behavior wouldn't change.

Then again, I haven't looked at an <isindex> for a while, so I might be
misremembering what they look like.

-David

--
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Boris Zbarsky
Ian Hickson wrote:
> You may wish to consider doing what the WHATWG spec currently suggests:

So don't actually put an <isindex> node in the DOM and instead replace that with
the other stuff you propose?  That's actually a good bit more work than either
doing nothing or hacking layout if needed; it'd require some nontrivial (at
least for me) parser and content sink changes.

Not to mention that it doesn't allow setting accesskeys on the <isindex>, which
we seem to support right now.  Aaron wouldn't be happy with breaking that,
probably.  ;)

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Boris Zbarsky
L. David Baron wrote:
 > Could it stay more like 'inline' than 'inline-block'?  Since the <hr>
 > inside is a block, it would work the same way other block-within-inline
 > works, and the behavior wouldn't change.
 >
 > Then again, I haven't looked at an <isindex> for a while, so I might be
 > misremembering what they look like.

So the thing is that <isindex> has its own frame class, so it gets a subclass of
nsAreaFrame no matter what the display value.  I'm not quite sure how to make
one of those behave like an inline...

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Jonas Sicking
Jonas Sicking wrote:
> Yeah, I actually think we should do it like this. It isn't pretty, but
> it seems like the least effort.

Hey, if you can make that work, great.  ;)

> Of course, another alternative is using XBL.

I'm not sure how to implement nsIStatefulFrame or equivalent in XBL.  Apart from
that, if we moved submission and accesskey handling into the content, XBL would,
imo, be the way to go here.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Ian Hickson
In reply to this post by Boris Zbarsky
On Thu, 27 Apr 2006, Boris Zbarsky wrote:
>
> Not to mention that it doesn't allow setting accesskeys on the
> <isindex>, which we seem to support right now.  Aaron wouldn't be happy
> with breaking that, probably.  ;)

As specced, the access keys work fine on <isindex> (since they just
propagate to the input).

I agree that the change you have already made (which breaks <isindex>
rendering in certain cases nobody cares about) is easier to make than
changing the parser to be compatible with IE on this. I was just raising
the idea. :-)

--
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Jonas Sicking
In reply to this post by Boris Zbarsky
Boris Zbarsky wrote:
> I'm not sure how to implement nsIStatefulFrame or equivalent in XBL.  
> Apart from that, if we moved submission and accesskey handling into the
> content, XBL would, imo, be the way to go here.

Wouldn't it work if we stuck normal <input> elements into the binding?
I.e. would that store the state, or would we detect that it lives inside
a binding and abort? I seem to recall some code that aborted when we try
to store the state for anonymous content, but i'm not sure why we do that.

/ Jonas
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Martijn-4
On 4/28/06, Jonas Sicking <[hidden email]> wrote:
> Boris Zbarsky wrote:
> > I'm not sure how to implement nsIStatefulFrame or equivalent in XBL.
> > Apart from that, if we moved submission and accesskey handling into the
> > content, XBL would, imo, be the way to go here.
>
> Wouldn't it work if we stuck normal <input> elements into the binding?
> I.e. would that store the state, or would we detect that it lives inside
> a binding and abort? I seem to recall some code that aborted when we try
> to store the state for anonymous content, but i'm not sure why we do that.

That doesn't seem to work. This is about when clicking back the stored
value should be in the <isindex>, right?
But that seems already broken within Mozilla for <isindex> (also
tested in Mozilla1.7), so I don't think that's much of a problem.

But with an xbl binding you might need some scripting to get the right
submission going. Not sure if that's a problem.

I would love to make an xbl binding out of <isindex>. I think it would
also be quite easily to support the action attribute then.

Regards,
Martijn

>
> / Jonas
> _______________________________________________
> dev-tech-layout mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Jonas Sicking
Jonas Sicking wrote:
> Wouldn't it work if we stuck normal <input> elements into the binding?
> I.e. would that store the state, or would we detect that it lives inside
> a binding and abort? I seem to recall some code that aborted when we try
> to store the state for anonymous content, but i'm not sure why we do that.

Mostly because we can't create usable state keys for anonymous content and
because anonymous content ends up depending on presentation as things stand.  At
least that's my guess.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Jonas Sicking
Martijn wrote:
> But with an xbl binding you might need some scripting to get the right
> submission going. Not sure if that's a problem.

How do isindex submissions differ from normal form submissions in terms of the
data they generate?

> I would love to make an xbl binding out of <isindex>.

Sounds good to me if it happens.  I'd love to nix nsIsIndexFrame.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Martijn-4
On 4/28/06, Boris Zbarsky <[hidden email]> wrote:
> Martijn wrote:
> > But with an xbl binding you might need some scripting to get the right
> > submission going. Not sure if that's a problem.
>
> How do isindex submissions differ from normal form submissions in terms of the
> data they generate?

>From http://www.htmlhelp.com/reference/html40/block/isindex.html
"
When the user presses the enter key within the input field, the input
field's text is sent to the server in a query string appended to the
document's base URI. The query string takes the form
"?text+of+input+field"; spaces are encoded as "+".
"
>From my simple testing, this seems correct. Although when the query is
submitted to a different server, then I get an extra "=" appended.

> > I would love to make an xbl binding out of <isindex>.
>
> Sounds good to me if it happens.  I'd love to nix nsIsIndexFrame.

Maybe something similar is possible with <keygen> ?

Regards,
Martijn

> -Boris
> _______________________________________________
> dev-tech-layout mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Boris Zbarsky
Martijn wrote:
>> From http://www.htmlhelp.com/reference/html40/block/isindex.html
> "
> When the user presses the enter key within the input field, the input
> field's text is sent to the server in a query string appended to the
> document's base URI. The query string takes the form
> "?text+of+input+field"; spaces are encoded as "+".
> "
>> From my simple testing, this seems correct. Although when the query is
> submitted to a different server, then I get an extra "=" appended.

Hmm... That's pretty different from what forms submit, but I suppose you could
just set document.location from XBL... Have to be a little careful with
charsets.  :(

> Maybe something similar is possible with <keygen> ?

Maybe, but that's actually used from what I can tell (unlike <isindex>), so I'm
worried about breaking it....  Right now it's done in the parser, actually, the
way Hixie proposes handling <isindex>.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Martijn-4
On 4/28/06, Boris Zbarsky <[hidden email]> wrote:
> > Maybe something similar is possible with <keygen> ?
>
> Maybe, but that's actually used from what I can tell (unlike <isindex>), so I'm
> worried about breaking it....  Right now it's done in the parser, actually, the
> way Hixie proposes handling <isindex>.

The parser doesn't really like that, see:
https://bugzilla.mozilla.org/show_bug.cgi?id=101019
https://bugzilla.mozilla.org/show_bug.cgi?id=322657

I didn't know that <keygen> was used. IE6 doesn't seem to support it.
I'm not really what <keygen> is doing, anyway.

Regards,
Martijn

> -Boris
> _______________________________________________
> dev-tech-layout mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Boris Zbarsky
Martijn wrote:
> I didn't know that <keygen> was used. IE6 doesn't seem to support it.

Huh.  "Odd".  I wonder how https://ca2.mit.edu/fcgi-bin/ca works in IE6 (which
it does claim to support).  In Gecko after you log in you get a page with a
keygen tag.

> I'm not really what <keygen> is doing, anyway.

It's used to client-side generate a key for a personal certificate (so the
server doesn't ever know your private key).  See
http://wp.netscape.com/eng/security/comm4-keygen.html

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Boris Zbarsky
In reply to this post by Boris Zbarsky
Martijn wrote:
> I didn't know that <keygen> was used. IE6 doesn't seem to support it.

IE6 supports an ActiveX equivalent.  See
http://www.pseudonym.org/ssl/ssl_msclient_certs.html

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: <isindex>

Martijn-4
In reply to this post by Boris Zbarsky
On 4/28/06, Boris Zbarsky <[hidden email]> wrote:
> Martijn wrote:
> > I didn't know that <keygen> was used. IE6 doesn't seem to support it.
>
> Huh.  "Odd".  I wonder how https://ca2.mit.edu/fcgi-bin/ca works in IE6 (which
> it does claim to support).  In Gecko after you log in you get a page with a
> keygen tag.

I don't know how it works, but according to this page:
http://www.ehtml.com/html/reference/keygen.htm
IE6 doesn't support <keygen>. Also, I'm seeing nothing in a page with
a <keygen> in it, so it seems to me it isn't supported.


> > I'm not really what <keygen> is doing, anyway.
>
> It's used to client-side generate a key for a personal certificate (so the
> server doesn't ever know your private key).  See
> http://wp.netscape.com/eng/security/comm4-keygen.html

Ok, thanks.


Regards,
Martijn

> -Boris
> _______________________________________________
> dev-tech-layout mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-layout
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout