Re: what's currently broken in dillo

Jorge Arellano Cid <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
Hi Sebastian,

On Sun, Jan 04, 2015 at 02:00:52PM +0100, Sebastian Geerken wrote:
> On Sa, Jan 03, 2015, Jorge Arellano Cid wrote:
> > [...]
> >   One  solution  I've  been  thinking  about  is to customize the
> > rendering  for  each  user.  In  general  terms, a user goes to a
> > handful  of websites regularly. Those sites are the ones he cares
> > more about.
> > 
> >    If  we for instance remember that for site X, the user prefers
> > no embedded CSS, that's it.
> > 
> >   This would be stored in a plain text file as a simple line. The
> > UI interface, under Tools|Customize may offer something like:
> > 
> >    [ ] Remember settings for this page
> >    [ ] Remember settings for this site
> > 
> >   That's it, after a few simple clicks, problem is gone.
> > 
> >   The  idea  is  this  to  be  exceptional,  this  is, used as an
> > exception  for a few sites as general rendering should solve most
> > cases.
> > 
> >   FWIW,  I'm  planning  to  make a list of these ideas to work on
> > this year and be of help in this area.
> 
> First of all, let's see how many problems fall into the "plain bug"
> category, and so are simple to fix (although it needs work and time).

  Yes, sure.

  Now, with some sites it's not clear whether something is a bug,
bad HTML, contradicting directives, etc. IMHO, just there, having
an  easy (i.e. user ready, click-click) way to customize can help
a lot.

  e.g.[1]   Here, I don't know what's wrong, but reading the text
in those colors clearly hurts. Avoiding embedded CSS "solves" the
problem with one click (from a user perspective).

  I may try coding it a bit and check how it feels.


[1] http://www.veteranstoday.com/2015/01/05/hate-conspiracies/


> Partly, this kind of customization is already possible by usage of
> user style sheets; perhaps we could add a (proprietary) extension for
> selecting specific sites.

  Yes,  but this solution requires good knowledge on CSS and HTML
and  some  digging  time  (as in the example above where we don't
know the problem in advance).

  OTOH,  clicking a pair of checkboxes and see whether that helps
is much easier. It's a user-level "solution".


> While we're at this: Attached is a page which renders differently in
> dillo and Firefox; the latter closes the "em" implicitely, so that the
> red box is below (not inside) the green one.

  It's very good you discovered this point!

> From my understanding,
> 
>  (i) this is incorrect HTML, but

  Yes.

> (ii) since "div" is not allowed within "em", this could be easily
>      detected, to mimic Firefox behaviour.

  Yes.

> This page is a simplified version of a real-word page, and in some
> cases, the implications for the rendering are quite extreme.

  Yes.

  IMO  this  is  a  good  place to nail some "rendering bugs" (by
reacting  as  FF to bad HTML). AFAIR, the HTML cleanup heuristics
were tuned before DIV was supported!

  I'll  work  on  this  now. Please let me know of any other tags
you've found in real pages that mess with DIV in this sense while
I  work  on it (for instance EM is in the phrase set which should
be treated similarly).

  It  may  end helping rendering of a lot of sites or just a few,
who knows, but's definitely worth the try.

  See attached toy-patch for the test case.


-- 
  Cheers
  Jorge.-

_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
em.diff (text/x-diff, 677 B)
diff -r a80c5e4a877b src/html.cc
--- a/src/html.cc	Mon Jan 05 14:55:34 2015 +0100
+++ b/src/html.cc	Tue Jan 06 13:11:24 2015 -0300
@@ -3501,7 +3501,7 @@ const TagInfo Tags[] = {
  {"div", B8(011110),'R',2, Html_tag_open_div, NULL, NULL},
  {"dl", B8(011010),'R',2, Html_tag_open_dl, NULL, Html_tag_close_par},
  {"dt", B8(010110),'O',1, Html_tag_open_dt, NULL, Html_tag_close_par},
- {"em", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
+ {"em", B8(010101),'R',1, Html_tag_open_default, NULL, NULL},
  {"embed", B8(010001),'F',0, Html_tag_open_embed, Html_tag_content_embed,NULL},
  /* fieldset */
  {"figcaption", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.