Rendering of illegal widths (incl "px", which used to be legal)
James C <[email protected]>
| Newsgroups | gmane.comp.web.dillo.devel |
|---|---|
| Message-ID | <CACZ9Q6gyG8CN_j_p0_jxVuCkptsKoqbYjUZK05p_bo1vrAMG2g@mail.gmail.com> |
Hello All,
The row of three pictures on this web-page:
http://www.avrprojects.net/index.php?view=article&id=61
renders badly in dillo, and differently from Chrome and firefox,
because two of them have:
width="180px"
which the source-code for dillo 3.0.4 (html.cc at about line 1450)
tells me used to be legal html, but isn't anymore.
Dillo:
- reports this as a web bug (with which I agree)
- sets the length to auto (which I think means using the default width)
To minimise the damage from illegal pages, without hiding the problem,
I propose to assume that the numbers in all widths are sensible, and
to complain about, but ignore, the trailing garbage.
I also discovered that the bug message and another, suppressed,
message had type problems, which I have addressed in a way that looks
reasonable on osx.
My proposed patch is below. Please be aware that Jorge and I started
a conversation about whether this was the right thing to do, which
wedged.
I tested this proposed change by hacking up saved copies of the
web-page in various ways. One of them, which makes a mess of the bug
message, is attached, but they are not really a clean test-case. I am
not aware of any automated test into which this change should be
added. If someone can point me toward one, then I will think about
how to test it cleanly.
Regards,
James.
-----------------------
$ diff html.cc.orig html.cc
1483,1485c1483,1488
< if (*end && !isspace (*end)) {
< BUG_MSG("Garbage after length: %s\n", attr);
< l = CSS_CREATE_LENGTH(0.0, CSS_LENGTH_TYPE_AUTO);
---
> while (end && isspace(*end))
> ++end;
> if (end && *end) {
> BUG_MSG("Garbage after length: '%s'; "
> "ignoring garbage; using %g (possibly in pixels)\n",
> attr, CSS_LENGTH_VALUE(l));
1489c1492
< _MSG("a_Html_parse_length: \"%s\" %d\n", attr, CSS_LENGTH_VALUE(l));
---
> _MSG("a_Html_parse_length: \"%s\" %g\n", attr, CSS_LENGTH_VALUE(l));
-----------------------
ps
I am contemplating getting involved in other trivial rendering
problems, and thinking about the todos in dpid/main.c:204 and
dpid/main.c:297. My interest in the todos is that dillo functions
with gmail, but keeps (de facto) logging me out by discarding my
session cookie.
Could someone please point me to generic advice about:
- which source tree I should be building (Jorge mentioned GROWS, but I
don't know what that means)
- how to use mercurial to develop multiple patches in parallel and
keep them separate, while running a built program that includes all of
them
?
_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
avr-04.html
(text/html, 15 KB)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >
<head>
<base href="http://www.avrprojects.net/index.php" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="avr, atmel, attiny2313, atmega8, atmega328, bascom, avr-gcc, c-programming, arduino, robotics, free projects" />
<meta name="description" content="avr microcontroller projects, free projects for 8-bit atmel avr microcontrollers." />
<meta name="generator" content="Joomla! - Open Source Content Management" />
<title>avrprojects</title>
<link href="/templates/beez_20/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<link href="http://www.avrprojects.net/index.php/component/search/?id=61:attiny-board&catid=37:avr-projects&Itemid=57&format=opensearch" rel="search" title="Search avrprojects" type="application/opensearchdescription+xml" />
<link rel="stylesheet" href="/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="/templates/beez_20/css/position.css" type="text/css" media="screen,projection" />
<link rel="stylesheet" href="/templates/beez_20/css/layout.css" type="text/css" media="screen,projection" />
<link rel="stylesheet" href="/templates/beez_20/css/print.css" type="text/css" media="print" />
<link rel="stylesheet" href="/templates/beez_20/css/general.css" type="text/css" />
<link rel="stylesheet" href="/templates/beez_20/css/personal.css" type="text/css" />
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/media/system/js/core.js" type="text/javascript"></script>
<script src="/media/system/js/caption.js" type="text/javascript"></script>
<script src="/media/system/js/mootools-more.js" type="text/javascript"></script>
<script src="/templates/beez_20/javascript/md_stylechanger.js" type="text/javascript"></script>
<script src="/templates/beez_20/javascript/hide.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEvent('load', function() {
new JCaption('img.caption');
});
</script>
<!--[if lte IE 6]>
<link href="/templates/beez_20/css/ieonly.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#line {
width:98% ;
}
.logoheader {
height:200px;
}
#header ul.menu {
display:block !important;
width:98.2% ;
}
</style>
<![endif]-->
<!--[if IE 7]>
<link href="/templates/beez_20/css/ie7only.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script type="text/javascript">
var big ='72%';
var small='53%';
var altopen='is open';
var altclose='is closed';
var bildauf='/templates/beez_20/images/plus.png';
var bildzu='/templates/beez_20/images/minus.png';
var rightopen='Open info';
var rightclose='Close info';
var fontSizeTitle='Font size';
var bigger='Bigger';
var reset='Reset';
var smaller='Smaller';
var biggerTitle='Increase size';
var resetTitle='Revert styles to default';
var smallerTitle='Decrease size';
</script>
</head>
<body>
<div id="all">
<div id="back">
<div id="header">
<div class="logoheader">
<h1 id="logo">
AVRPROJECTS <span class="header1">
Projects and Tutorials for 8-bit microcontrollers </span></h1>
</div><!-- end logoheader -->
<ul class="skiplinks">
<li><a href="#main" class="u2">Skip to content</a></li>
<li><a href="#nav" class="u2">Jump to main navigation and login</a></li>
</ul>
<h2 class="unseen">Nav view search</h2>
<h3 class="unseen">Navigation</h3>
<div class="custom" >
<p align="center">
<script type="text/javascript">// <![CDATA[
google_ad_client = "ca-pub-1528466198817014";
/* blok_groot */
google_ad_slot = "2043105625";
google_ad_width = 728;
google_ad_height = 90;
// ]]></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[
// ]]></script>
</p></div>
<ul class="menu">
<li class="item-101 current"><a href="/" >Home</a></li><li class="item-125 parent"><a href="/index.php/avr-project" >AVR Projects</a></li><li class="item-138 parent"><a href="/index.php/about-avr" >About AVR</a></li><li class="item-137"><a href="/index.php/avr-books" >AVR Books</a></li><li class="item-141"><a href="/index.php/news" >News</a></li><li class="item-122"><a href="/index.php/links" >Links</a></li><li class="item-120"><a href="/index.php/contact-us" >Contact Us</a></li></ul>
<div id="line">
<div id="fontsize"></div>
<h3 class="unseen">Search</h3>
<form action="/index.php/component/content/?Itemid=57" method="post">
<div class="search">
<label for="mod-search-searchword">Search...</label><input name="searchword" id="mod-search-searchword" maxlength="20" class="inputbox" type="text" size="20" value="Search..." onblur="if (this.value=='') this.value='Search...';" onfocus="if (this.value=='Search...') this.value='';" /><input type="submit" value="Search" class="button" onclick="this.form.searchword.focus();"/> <input type="hidden" name="task" value="search" />
<input type="hidden" name="option" value="com_search" />
<input type="hidden" name="Itemid" value="57" />
</div>
</form>
</div> <!-- end line -->
</div><!-- end header -->
<div id="contentarea">
<div id="breadcrumbs">
<div class="breadcrumbs">
<span class="showHere">You are here: </span><span>Home</span></div>
</div>
<div class="left1 leftbigger" id="nav">
<div class="moduletable">
<div class="custom" >
<p><span style="color: #3366ff; font-size: x-large; font-family: 'times new roman', times;"><a href="http://www.bizztronix.net" target="_blank" title="www.bizztronix.net"><span style="color: #3366ff;">www.bizztronix.net</span></a></span></p></div>
</div>
<div class="moduletable">
<div class="custom" >
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- left_ad -->
<p><ins class="adsbygoogle" style="display: inline-block; width: 200px; height: 200px;" data-ad-client="ca-pub-1528466198817014" data-ad-slot="6265221627"></ins></p>
<script type="text/javascript">// <![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
// ]]></script></div>
</div>
<div id="area-3" class="tabouter"><ul class="tabs"><li class="tab"><a href="#" id="link_106" class="linkopen" onclick="tabshow('module_106');return false">latest</a></li><li class="tab"><a href="#" id="link_88" class="linkopen" onclick="tabshow('module_88');return false">most read</a></li><li class="tab"><a href="#" id="link_103" class="linkopen" onclick="tabshow('module_103');return false">statistics</a></li></ul><div tabindex="-1" class="tabcontent tabopen" id="module_106"><ul class="latestnews">
<li>
<a href="/index.php/avr-project/avr-projects-with-led-s/116-rgb-led-color-mixer-2">
RGB LED Color Mixer (Mood Light) (2)</a>
</li>
<li>
<a href="/index.php/news/115-rocket-man">
Rocket Man</a>
</li>
<li>
<a href="/index.php/news/114-world-smallest-helicopter">
World Smallest Helicopter</a>
</li>
<li>
<a href="/index.php/avr-project/avr-projects-with-led-s/113-led-vu-meter">
LED VU meter</a>
</li>
<li>
<a href="/index.php/avr-project/avr-c-programming-tutorials/112-4-bit-lcd-interface">
AVR 4-bit LCD interface for C</a>
</li>
</ul>
<a href="#" class="unseen" onclick="nexttab('module_106');return false;" id="next_106">Next Tab</a></div><div tabindex="-1" class="tabcontent tabopen" id="module_88"><ul class="mostread">
<li>
<a href="/index.php/avr-project/avr-projects/68-lcd-thermometer-lm35">
LCD Thermometer LM35</a>
</li>
<li>
<a href="/index.php/avr-project/avr-projects-with-led-s/79-dot-matrix-scrolling-led">
Dot Matrix Scrolling Message</a>
</li>
<li>
<a href="/index.php/avr-project/avr-projects-with-led-s/81-running-led">
Running LED</a>
</li>
<li>
<a href="/index.php/avr-project/avr-projects-with-led-s/78-digital-led-thermometer">
Digital LED Thermometer</a>
</li>
<li>
<a href="/index.php/avr-project/avr-programming-hardware/55-usb-port-programmer">
USB Port Programmer</a>
</li>
</ul>
<a href="#" class="unseen" onclick="nexttab('module_88');return false;" id="next_88">Next Tab</a></div><div tabindex="-1" class="tabcontent tabopen" id="module_103"><dl class="stats-module">
<dt>Visitors</dt>
<dd>7</dd>
<dt>Articles</dt>
<dd>62</dd>
<dt>Web Links</dt>
<dd>7</dd>
<dt>Articles View Hits</dt>
<dd>1406524</dd>
</dl>
</div></div>
</div><!-- end navi -->
<div id="wrapper2" >
<div id="main">
<div id="system-message-container">
</div>
<div class="item-page">
<h2>
ATTiny Board </h2>
<dl class="article-info">
<dt class="article-info-term">Details</dt>
<dd class="hits">
Hits: 38963 </dd>
</dl>
<table id="inhoud" style="width: 100%; height: 165px;" border="1" cellpadding="5">
<tbody>
<tr>
<td><img class="caption" src="/images/avr07082.jpg" border="0" width="180px" height="135" style="display: block; margin-left: auto; margin-right: auto;" /></td>
<td><a href="/images/attiny board_sch.jpg" target="blank"><img src="/images/attiny board_sch.jpg" border="0" alt="ATTiny Board_sch.jpg" width="180 in" style="display: block; margin-left: auto; margin-right: auto;" /></a></td>
<td><a href="/images/attiny board_brd.jpg" target="blank"><img src="/images/attiny board_brd.jpg" border="0" alt="ATTiny Board_brd.jpg" width="10% in" style="display: block; margin-left: auto; margin-right: auto;" /></a></td>
</tr>
</tbody>
</table>
<h4>Description</h4>
<p>With this small board you can program most of the AVR ATTiny microcontrollers or you can build your projects to use it in a stand alone application. It can be powered with a 9V battery because it has 5V voltage regulator on it. The voltage regulator can give 1000mA current. The power to the board can also be supplied with a wall wart. Low power external devices like a LCD module can be powered via the board itself.</p>
<p>The board supports programming of:</p>
<table id="lijst" style="width: 590px; height: 134px;">
<tbody>
<tr><th>DIP8 Tiny</th><th>DIP20 Tiny</th><th>DIP20 obsolete</th></tr>
<tr>
<td>
<ul>
<li>ATTiny12</li>
<li>ATTiny13</li>
<li>ATTiny15</li>
<li>ATTiny25</li>
<li>ATTiny28</li>
<li>ATTiny45</li>
<li>ATTiny85</li>
</ul>
</td>
<td>
<ul>
<li>ATTiny2313</li>
</ul>
</td>
<td>
<ul>
<li>AT90S1200</li>
<li>AT90S2313</li>
</ul>
</td>
</tr>
</tbody>
</table>
<h4>Hardware</h4>
<p>The board contains the AVR 10 pin standard ISP connector with which you can program the device on the board. On the board itself there is space enough to place a textool ZIF-socket so you can insert the device into the socket, program it and easily take it out again. The board contain two different sockets for the DIP8 and DIP20 ATTiny microcontrollers.</p>
<p>Programming of the device in one of the sockets can be done when the board is connected to the STK500 or with an ISP programming cable connected to the parallel port of your PC, in that case you need the software <a href="http://www.ic-prog.com/" target="_blank">IC-Prog 1.05C</a> or BASCOM-AVR to program your device.</p>
<p><a href="/index.php/avr-project/avr-programming-software/58-ic-prog">Here</a> you can learn how to use the software and and how to program your ATTiny device.</p>
<p>The ports B and D of the ATTiny2313 are connected to the outside world via two 10pin headers. The 5V power supply is also available on the 10pin headers.</p>
<h4>Software</h4>
<p>There are several projects on this site that you can try and use with the ISP-board:</p>
<ul>
<li>Blink a LED</li>
<li>LCD@AVR</li>
<li>LCD Thermometer DS1621</li>
<li>LCD Themometer LM35</li>
<li>Real Time Clock</li>
</ul>
<p>This project is available pre-assambled and tested at <a href="http://www.bizztronix.net">www.bizztronix.net</a><a href="http://www.bizztronix.net" target="_blank"><br /></a></p>
<p> </p>
<ul class="pagenav">
<li class="pagenav-next">
<a href="/index.php/avr-project/avr-projects/60-attiny2313-board-rs232" rel="next">Next ></a>
</li>
</ul>
</div>
</div><!-- end main -->
</div><!-- end wrapper -->
<div class="wrap"></div>
</div> <!-- end contentarea -->
</div><!-- back -->
</div><!-- all -->
<div id="footer-outer">
<div id="footer-sub">
<div id="footer">
<p>
Powered by <a href="http://www.avrprojects.net/">avrprojects</a>
</p>
</div><!-- end footer -->
</div>
</div>
<!-- Start of StatCounter Code for Joomla -->
<script type="text/javascript">
var sc_project=3825317;
var sc_invisible=1;
var sc_security="9d8fe7c6";
</script>
<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script>
<noscript><div class="statcounter"><a title="joomla stats"
href="http://statcounter.com/joomla/" target="_blank"><img
class="statcounter"
src="http://c.statcounter.com/3825317/0/9d8fe7c6/1/"
alt="joomla stats"></a></div></noscript>
<!-- End of StatCounter Code for Joomla -->
</body>
</html>