Changeset 62623 in webkit


Ignore:
Timestamp:
Jul 6, 2010 10:05:28 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-07-06 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Fix <nobr><nobr> case in HTMLTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=41735

  • html5lib/runner-expected-html5.txt:

2010-07-06 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Fix <nobr><nobr> case in HTMLTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=41735

We were both not handling <nobr> correctly, as well as
never hitting the <nobr> case because our formatting
elements check was overzealous.

  • html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody):
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r62622 r62623  
     12010-07-06  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Fix <nobr><nobr> case in HTMLTreeBuilder
     6        https://bugs.webkit.org/show_bug.cgi?id=41735
     7
     8        * html5lib/runner-expected-html5.txt:
     9
    1102010-07-06  Kent Tamura  <tkent@chromium.org>
    211
  • trunk/LayoutTests/html5lib/resources/webkit01.dat

    r62603 r62623  
    394394|       <li>
    395395|       <li>
     396
     397#data
     398<div><b></div><div><nobr>a<nobr>
     399#errors
     400#document
     401| <html>
     402|   <head>
     403|   <body>
     404|     <div>
     405|       <b>
     406|     <div>
     407|       <b>
     408|         <nobr>
     409|           "a"
     410|         <nobr>
  • trunk/LayoutTests/html5lib/runner-expected-html5.txt

    r62621 r62623  
    36736717
    36836818
    369 20
    370 21
    37136922
    372370
     
    429427|       "
    430428foo"
    431 
    432 Test 20 of 23 in resources/tests3.dat failed. Input:
    433 <!doctype html><nobr><nobr><nobr>
    434 Got:
    435 | <!DOCTYPE html>
    436 | <html>
    437 |   <head>
    438 |   <body>
    439 |     <nobr>
    440 |       <nobr>
    441 |         <nobr>
    442 Expected:
    443 | <!DOCTYPE html>
    444 | <html>
    445 |   <head>
    446 |   <body>
    447 |     <nobr>
    448 |     <nobr>
    449 |     <nobr>
    450 
    451 Test 21 of 23 in resources/tests3.dat failed. Input:
    452 <!doctype html><nobr><nobr></nobr><nobr>
    453 Got:
    454 | <!DOCTYPE html>
    455 | <html>
    456 |   <head>
    457 |   <body>
    458 |     <nobr>
    459 |       <nobr>
    460 |       <nobr>
    461 Expected:
    462 | <!DOCTYPE html>
    463 | <html>
    464 |   <head>
    465 |   <body>
    466 |     <nobr>
    467 |     <nobr>
    468 |     <nobr>
    469429
    470430Test 22 of 23 in resources/tests3.dat failed. Input:
  • trunk/LayoutTests/html5lib/runner-expected.txt

    r62613 r62623  
    4698469830
    4699469931
    4700 
    4701 Test 15 of 32 in resources/webkit01.dat failed. Input:
     470033
     4701
     4702Test 15 of 33 in resources/webkit01.dat failed. Input:
    47024703<p>Test</p<p>Test2</p>
    47034704Got:
     
    47154716|       "TestTest2"
    47164717
    4717 Test 17 of 32 in resources/webkit01.dat failed. Input:
     4718Test 17 of 33 in resources/webkit01.dat failed. Input:
    47184719<A>test< /A>
    47194720Got:
     
    47314732|       "test< /A>"
    47324733
    4733 Test 20 of 32 in resources/webkit01.dat failed. Input:
     4734Test 20 of 33 in resources/webkit01.dat failed. Input:
    47344735<body></br foo="bar"></body>
    47354736Got:
     
    47454746|     <br>
    47464747
    4747 Test 22 of 32 in resources/webkit01.dat failed. Input:
     4748Test 22 of 33 in resources/webkit01.dat failed. Input:
    47484749<body></body></br foo="bar">
    47494750Got:
     
    47594760|     <br>
    47604761
    4761 Test 24 of 32 in resources/webkit01.dat failed. Input:
     4762Test 24 of 33 in resources/webkit01.dat failed. Input:
    47624763<html><body></body></html><!-- Hi there -->
    47634764Got:
     
    47724773| <!--  Hi there  -->
    47734774
    4774 Test 26 of 32 in resources/webkit01.dat failed. Input:
     4775Test 26 of 33 in resources/webkit01.dat failed. Input:
    47754776<html><body></body></html>x<!-- Hi there --></html><!-- Again -->
    47764777Got:
     
    47894790| <!--  Again  -->
    47904791
    4791 Test 27 of 32 in resources/webkit01.dat failed. Input:
     4792Test 27 of 33 in resources/webkit01.dat failed. Input:
    47924793<html><body></body></html>x<!-- Hi there --></body></html><!-- Again -->
    47934794Got:
     
    48064807| <!--  Again  -->
    48074808
    4808 Test 28 of 32 in resources/webkit01.dat failed. Input:
     4809Test 28 of 33 in resources/webkit01.dat failed. Input:
    48094810<html><body><ruby><div><rp>xx</rp></div></ruby></body></html>
    48104811Got:
     
    48254826|         "xx"
    48264827
    4827 Test 29 of 32 in resources/webkit01.dat failed. Input:
     4828Test 29 of 33 in resources/webkit01.dat failed. Input:
    48284829<html><body><ruby><div><rt>xx</rt></div></ruby></body></html>
    48294830Got:
     
    48444845|         "xx"
    48454846
    4846 Test 30 of 32 in resources/webkit01.dat failed. Input:
     4847Test 30 of 33 in resources/webkit01.dat failed. Input:
    48474848<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6-->
    48484849Got:
     
    48744875| <!-- 6 -->
    48754876
    4876 Test 31 of 32 in resources/webkit01.dat failed. Input:
     4877Test 31 of 33 in resources/webkit01.dat failed. Input:
    48774878<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select>
    48784879Got:
     
    49174918|         <option>
    49184919|           "G"
     4920
     4921Test 33 of 33 in resources/webkit01.dat failed. Input:
     4922<div><b></div><div><nobr>a<nobr>
     4923Got:
     4924| <html>
     4925|   <head>
     4926|   <body>
     4927|     <div>
     4928|       <b>
     4929|     <b>
     4930|       <div>
     4931|         <nobr>
     4932|           "a"
     4933|         <nobr>
     4934Expected:
     4935| <html>
     4936|   <head>
     4937|   <body>
     4938|     <div>
     4939|       <b>
     4940|     <div>
     4941|       <b>
     4942|         <nobr>
     4943|           "a"
     4944|         <nobr>
    49194945resources/doctype01.dat: PASS
    49204946
  • trunk/LayoutTests/html5lib/webkit-resumer-expected.txt

    r62520 r62623  
    8148141363.125
    8158151364.126
     8161392.1
     8171393.2
     8181394.3
     8191395.4
     8201396.5
     8211397.6
     8221398.7
     8231399.8
     8241400.9
     8251401.10
     8261402.11
     8271403.12
     8281404.13
     8291405.14
     8301406.15
     8311407.16
     8321408.17
     8331409.18
     8341410.19
     8351411.20
     8361412.21
     8371413.22
     8381414.23
     8391415.24
     8401416.25
     8411417.26
     8421418.27
     8431419.28
     8441420.29
     8451421.30
     8461422.31
  • trunk/WebCore/ChangeLog

    r62621 r62623  
     12010-07-06  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Fix <nobr><nobr> case in HTMLTreeBuilder
     6        https://bugs.webkit.org/show_bug.cgi?id=41735
     7
     8        We were both not handling <nobr> correctly, as well as
     9        never hitting the <nobr> case because our formatting
     10        elements check was overzealous.
     11
     12        * html/HTMLTreeBuilder.cpp:
     13        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
     14
    1152010-07-06  Adam Barth  <abarth@webkit.org>
    216
  • trunk/WebCore/html/HTMLTreeBuilder.cpp

    r62621 r62623  
    185185}
    186186
    187 bool isNonAnchorFormattingTag(const AtomicString& tagName)
     187bool isNonAnchorNonNobrFormattingTag(const AtomicString& tagName)
    188188{
    189189    return tagName == bTag
     
    193193        || tagName == fontTag
    194194        || tagName == iTag
    195         || tagName == nobrTag
    196195        || tagName == sTag
    197196        || tagName == smallTag
     
    200199        || tagName == ttTag
    201200        || tagName == uTag;
     201}
     202
     203bool isNonAnchorFormattingTag(const AtomicString& tagName)
     204{
     205    return tagName == nobrTag
     206        || isNonAnchorNonNobrFormattingTag(tagName);
    202207}
    203208
     
    652657        return;
    653658    }
    654     if (isNonAnchorFormattingTag(token.name())) {
     659    if (isNonAnchorNonNobrFormattingTag(token.name())) {
    655660        m_tree.reconstructTheActiveFormattingElements();
    656661        m_tree.insertFormattingElement(token);
     
    659664    if (token.name() == nobrTag) {
    660665        m_tree.reconstructTheActiveFormattingElements();
    661         notImplemented();
     666        if (m_tree.openElements()->inScope(nobrTag)) {
     667            parseError(token);
     668            processFakeEndTag(nobrTag);
     669            m_tree.reconstructTheActiveFormattingElements();
     670        }
    662671        m_tree.insertFormattingElement(token);
    663672        return;
Note: See TracChangeset for help on using the changeset viewer.