[webkit-dev] problem with parsing DIVs

David Kilzer ddkilzer at webkit.org
Wed Feb 6 07:55:29 PST 2008


Hi Marcin,

It's always a good idea to file a bug on bugs.webkit.org to track a specific
issue, but this looks like a situation where there are nested HTML comments
(which is NOT valid HTML):

> <!-- <div class="signature"><table border=0 cellspacing=0 cellpadding=0
> width=100% height=100%><tr><td><!--signature--><!--koni....

The HTML5 Spec (and WebKit's parser) don't allow for nested HTML comments.  As
soon as a sequence of "-->" characters is seen, that ends the comment started
by "<!--".

If you want to comment out HTML, you must make sure not to nest the comments. 
Hope that helps!

Dave


Marcin Giedz <giedz at arise.pl> wrote:

> Hello,
> 
> First of all really thanks for Holger how gave me small but very useful
> advice about "how to get simon/printing" branch from git. 
> Now I'm able to print pages !!!! This is absolutely great job guys!!!!
> 
> 
> And now some new story.
> 
> Please find 2 HTML in attachment: one with DIV's and second without.
> If you open first file (with DIVs) in webkit then it's being rendered badly -
> I mean there is big hole and then HTML body, but if you remove this line:
> 
> <!-- <div class="signature"><table border=0 cellspacing=0 cellpadding=0
> width=100% height=100%><tr><td><!--signature--><!--koni....
> 
> then this page is shown OK - second file (OK_without_DIVS).
> 
> If I open the same file (BAD_xxx) in Konquerror or Firefox it's being
> rendered OK. So I assume the problem is in WebKit. Could you please take a
> look at that?
> 
> If you need anything else please let me know. 
> 
> These files 
> 
> 
> Because of HTML structure I couldn't send it public.
> 
> Regards,
> Marcin 
> 
> 
> 
> 
> 
> 
> -- 
> ARISE M.Giedz, T.Żebruń sp.j.
> http: www.arise.pl
> mail: giedz at arise.pl
> tel: +48 502 537 157
> 
> 
> 
---------------------------------
58551:58552 at media print {@page { size: landscape; }div.abs { position:
absolute; left: 0px; top: 0px; }.extendedtext { position: relative; font-size:
16pt; left: 40mm; width: 190mm; height: 10mm; }.signature { position: relative;
left: 235mm; top: 10mm; width: 140px; height: 40mm; }.signature td {
vertical-align: bottom; text-align: right; }.signature_at_bottom { position:
relative; left: 235mm; width: 140px; height: 154mm; padding-bottom: 10mm;
}.signature_at_bottom td { vertical-align: bottom; text-align: right;
}div.screen_extendedtext { position: absolute; visibility:
hidden;}div.screen_signature { position: absolute; visibility:
hidden;}div.screen_signature_at_bottom { position: absolute; visibility:
hidden;}}@media screen {div.abs { position: absolute; visibility: hidden; left:
0px; top: 0px; }.extendedtext { position: relative; }.signature { position:
relative; }.signature_at_bottom { position: relative; }div.screen_extendedtext
{ position: relative; left: 140px; top: 0px; width: 780px; height: 30px;
font-size: 16pt; margin-bottom: -50px; }div.screen_signature { position:
relative; left: 850px; top: 180px; width: 140px; height: 140px; margin-bottom:
-50px; margin-top: -130px; }div.screen_signature_at_bottom { position:
relative; width: 140px; height: 140px; margin-top: -50px; left: 850px; }}






Strona 1 z 1
      
      AAA aaa.       
    ul. AA 234
    Warsaw  02-234
    Tel. +xxxxxxxxxxx
	Fax. +xxxxxxxxxx              
POTWIERDZENIE TRANSAKCJI DLA KLIENTA : SPRZEDA¯ 
    TRANSACTIONS CONFIRMATION  FOR CLIENT :  SELL     
Warszawa,      xx.xx.200x
      xx:xx:xx
     
  
      Klient / Client :    GIEDZ  -            Numer rachunku / Account No.    
123456789            Depozytariusz / Custody    BANK                           
                 Fax / Fax.     xxxx/yyyyy             

          Data sesji / Trade date: xx.yy.200x
    Data rozliczenia / Settlement Date : xx.xx.200x 00:00:00        Lp         

Kod Papieru/
    ISIN Code
        Nazwa papieru
    Security Name    Kod Oper.    Gie³da Rynek
    Stock Exch
    Market    IloϾ
    Quantity    Kurs
    Price    WartoϾ brutto
    Gross amount    Kwota
    Prowizji
    Commission    WartoϾ netto
    Net amount              
1
              
PLxxxxx
        XXX    XXX    
X    
123    
123    
123    
123    
123              
2
              
PLXXXX
        SSS    EEE    
Q    
234    
234    
234    
2343    
234              

              

                
    
    
Razem/Total    
1234    
345    
4543  
       Dokument jest wydrukiem komputerowym i nie wymaga podpisu.
This document is produced automatically and no signature is required.          
             

---------------------------------
58551:58552 at media print {@page { size: landscape; }div.abs { position:
absolute; left: 0px; top: 0px; }.extendedtext { position: relative; font-size:
16pt; left: 40mm; width: 190mm; height: 10mm; }.signature { position: relative;
left: 235mm; top: 10mm; width: 140px; height: 40mm; }.signature td {
vertical-align: bottom; text-align: right; }.signature_at_bottom { position:
relative; left: 235mm; width: 140px; height: 154mm; padding-bottom: 10mm;
}.signature_at_bottom td { vertical-align: bottom; text-align: right;
}div.screen_extendedtext { position: absolute; visibility:
hidden;}div.screen_signature { position: absolute; visibility:
hidden;}div.screen_signature_at_bottom { position: absolute; visibility:
hidden;}}@media screen {div.abs { position: absolute; visibility: hidden; left:
0px; top: 0px; }.extendedtext { position: relative; }.signature { position:
relative; }.signature_at_bottom { position: relative; }div.screen_extendedtext
{ position: relative; left: 140px; top: 0px; width: 780px; height: 30px;
font-size: 16pt; margin-bottom: -50px; }div.screen_signature { position:
relative; left: 850px; top: 180px; width: 140px; height: 140px; margin-bottom:
-50px; margin-top: -130px; }div.screen_signature_at_bottom { position:
relative; width: 140px; height: 140px; margin-top: -50px; left: 850px; }}

-->
-->-->-->-->
Strona 1 z 1
      
      AAA aaa.       
    ul. AA 234
    Warsaw  02-234
    Tel. +xxxxxxxxxxx
	Fax. +xxxxxxxxxx              
POTWIERDZENIE TRANSAKCJI DLA KLIENTA : SPRZEDA¯ 
    TRANSACTIONS CONFIRMATION  FOR CLIENT :  SELL     
Warszawa,      xx.xx.200x
      xx:xx:xx
     
  
      Klient / Client :    GIEDZ  -            Numer rachunku / Account No.    
123456789            Depozytariusz / Custody    BANK                           
                 Fax / Fax.     xxxx/yyyyy             

          Data sesji / Trade date: xx.yy.200x
    Data rozliczenia / Settlement Date : xx.xx.200x 00:00:00        Lp         

Kod Papieru/
    ISIN Code
        Nazwa papieru
    Security Name    Kod Oper.    Gie³da Rynek
    Stock Exch
    Market    IloϾ
    Quantity    Kurs
    Price    WartoϾ brutto
    Gross amount    Kwota
    Prowizji
    Commission    WartoϾ netto
    Net amount              
1
              
PLxxxxx
        XXX    XXX    
X    
123    
123    
123    
123    
123              
2
              
PLXXXX
        SSS    EEE    
Q    
234    
234    
234    
2343    
234              

              

                
    
    
Razem/Total    
1234    
345    
4543  
       Dokument jest wydrukiem komputerowym i nie wymaga podpisu.
This document is produced automatically and no signature is required.          
             
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
> 



More information about the webkit-dev mailing list