lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev patch


From: Vlad Harchev
Subject: Re: lynx-dev patch
Date: Tue, 13 Jul 1999 23:10:11 +0500 (SAMST)

On Tue, 13 Jul 1999, Vlad Harchev wrote:

> On Tue, 13 Jul 1999, Vlad Harchev wrote:
> 
> > On Tue, 13 Jul 1999, David Woolley wrote:
> > 
> > > > 
> > > > begin 644 patch.gz
> > > > M'XL("`QGC#<``W!A=&-H`.P\:W/:R+*?X5?,2:IBS"N(AY]QSF*0`[L8?'C$
> > > 
> > > My initial reaction to the actual code is that it is short sighted and
> > > changed in the wrong place.  A proper CSS implementation would allow
> > > justification to be turned back on in nested structures (and possibly
> > > not turned on at the outermost level).  This implementation assumes
> > > that it is turned on by the HTML element, inherited through most,
> > > and turned off by a few, and once off it it off until the element
> > > that turned it off is popped from the parse stack.
> > 
> >  Currenlty justification is turned on by element, but for elements that 
> > can't
> > contain anything reasonable to justify (except CENTER), they are
> >  BANNER,CENTER, H[1-6], PRE, SAMP, TABLE, XMP
> >  so IMO there is no loss in flexibility.  And as for CENTER, I seems only
> > badly formatted document use it (the style sheets should be used for this),
> > so we don't loose a lot (at least documents that are wrapped in CENTER are
> > very rare).
> 
>  I forget to say, the patch also detects the alignment of the current style,
> so even there are no those special elements in the stack, the text won't be
> justified if text->style->alignment!=HT_LEFT or HT_JUSTIFY.

 Sorry for another addition, but it seems to me that we can remove CENTER from
that list (since it already makes alignment of text to be center, so text
won't be justifuied) - I tested - it's works. So IMO the last inconsistence
with justification is removed.

Tom, here is a patch (to be applied after my last patch):

--- HTMLDTD.c-old       Tue Jul 13 23:08:51 1999
+++ HTMLDTD.c   Tue Jul 13 22:56:15 1999
@@ -1406,7 +1406,7 @@
  { P("BR")     , gen_attr,     HTML_GEN_ATTRIBUTES,    SGML_EMPTY,T_BR},
  { P("BUTTON") , button_attr,  HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON},
  { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION},
- { P0("CENTER")        , div_attr,     HTML_DIV_ATTRIBUTES,    
SGML_MIXED,T_CENTER},
+ { P("CENTER") , div_attr,     HTML_DIV_ATTRIBUTES,    SGML_MIXED,T_CENTER},
  { P("CITE")   , gen_attr,     HTML_GEN_ATTRIBUTES,    SGML_EMPTY,T_CITE},
  { P("CODE")   , gen_attr,     HTML_GEN_ATTRIBUTES,    SGML_MIXED,T_CODE},
  { P("COL")    , col_attr,     HTML_COL_ATTRIBUTES,    SGML_EMPTY,T_COL},
@@ -1527,7 +1527,7 @@
  { P("BR")     , gen_attr,     HTML_GEN_ATTRIBUTES,    SGML_EMPTY,T_BR},
  { P("BUTTON") , button_attr,  HTML_BUTTON_ATTRIBUTES, SGML_MIXED,T_BUTTON},
  { P("CAPTION") , caption_attr, HTML_CAPTION_ATTRIBUTES, SGML_MIXED,T_CAPTION},
- { P0("CENTER")        , div_attr,     HTML_DIV_ATTRIBUTES,    
SGML_MIXED,T_CENTER},
+ { P("CENTER") , div_attr,     HTML_DIV_ATTRIBUTES,    SGML_MIXED,T_CENTER},
  { P("CITE")   , gen_attr,     HTML_GEN_ATTRIBUTES,    SGML_MIXED,T_CITE},
  { P("CODE")   , gen_attr,     HTML_GEN_ATTRIBUTES,    SGML_MIXED,T_CODE},
  { P("COL")    , col_attr,     HTML_COL_ATTRIBUTES,    SGML_EMPTY,T_COL},


 Best regards,
  -Vlad


reply via email to

[Prev in Thread] Current Thread [Next in Thread]