Changeset 64698 in webkit
- Timestamp:
- Aug 4, 2010 5:34:36 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64697 r64698 1 2010-08-04 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Pick up spec change w.r.t. replacement character and <frameset> 6 https://bugs.webkit.org/show_bug.cgi?id=43073 7 8 * html5lib/runner-expected-html5.txt: 9 1 10 2010-08-04 Andrew Wilson <atwilson@chromium.org> 2 11 -
trunk/LayoutTests/html5lib/runner-expected-html5.txt
r64237 r64698 163 163 resources/tests19.dat: 164 164 63 165 77166 78167 80168 81169 165 101 170 166 102 … … 190 186 | <body> 191 187 | <keygen> 192 193 Test 77 of 102 in resources/tests19.dat failed. Input:194 <html>�<frameset></frameset>195 Got:196 | <html>197 | <head>198 | <body>199 | "�"200 Expected:201 | <html>202 | <head>203 | <frameset>204 205 Test 78 of 102 in resources/tests19.dat failed. Input:206 <html> � <frameset></frameset>207 Got:208 | <html>209 | <head>210 | <body>211 | "� "212 Expected:213 | <html>214 | <head>215 | <frameset>216 217 Test 80 of 102 in resources/tests19.dat failed. Input:218 <html>��<frameset></frameset>219 Got:220 | <html>221 | <head>222 | <body>223 | "��"224 Expected:225 | <html>226 | <head>227 | <frameset>228 229 Test 81 of 102 in resources/tests19.dat failed. Input:230 <html>�231 <frameset></frameset>232 Got:233 | <html>234 | <head>235 | <body>236 | "�237 "238 Expected:239 | <html>240 | <head>241 | <frameset>242 188 243 189 Test 101 of 102 in resources/tests19.dat failed. Input: -
trunk/WebCore/ChangeLog
r64695 r64698 1 2010-08-04 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Pick up spec change w.r.t. replacement character and <frameset> 6 https://bugs.webkit.org/show_bug.cgi?id=43073 7 8 Apparently this fixes parsing for some home router configuration pages. 9 10 * html/HTMLTreeBuilder.cpp: 11 (WebCore::HTMLTreeBuilder::processCharacterBuffer): 12 1 13 2010-08-04 Gavin Barraclough <barraclough@apple.com> 2 14 -
trunk/WebCore/html/HTMLTreeBuilder.cpp
r64237 r64698 62 62 namespace { 63 63 64 inline bool isTreeBuilderWhitepace(UChar cc) 65 { 66 return cc == '\t' || cc == '\x0A' || cc == '\x0C' || cc == '\x0D' || cc == ' '; 67 } 68 69 inline bool hasNonWhitespace(const String& string) 64 inline bool isTreeBuilderWhitepace(UChar c) 65 { 66 // FIXME: Consider branch permutations. 67 return c == '\t' || c == '\x0A' || c == '\x0C' || c == '\x0D' || c == ' '; 68 } 69 70 inline bool isTreeBuilderWhitepaceOrReplacementCharacter(UChar c) 71 { 72 return isTreeBuilderWhitepace(c) || c == 0xFFFD; 73 } 74 75 template<bool isSpecialCharacter(UChar c)> 76 inline bool isAllSpecialCharacters(const String& string) 70 77 { 71 78 const UChar* characters = string.characters(); 72 79 const unsigned length = string.length(); 73 80 for (unsigned i = 0; i < length; ++i) { 74 if (!isTreeBuilderWhitepace(characters[i])) 75 return true; 76 } 77 return false; 81 if (!isSpecialCharacter(characters[i])) 82 return false; 83 } 84 return true; 85 } 86 87 inline bool isAllWhitespace(const String& string) 88 { 89 return isAllSpecialCharacters<isTreeBuilderWhitepace>(string); 90 } 91 92 inline bool isAllWhitespaceOrReplacementCharacters(const String& string) 93 { 94 return isAllSpecialCharacters<isTreeBuilderWhitepaceOrReplacementCharacter>(string); 78 95 } 79 96 … … 2492 2509 String characters = buffer.takeRemaining(); 2493 2510 m_tree.insertTextNode(characters); 2494 if (m_framesetOk && hasNonWhitespace(characters))2511 if (m_framesetOk && !isAllWhitespaceOrReplacementCharacters(characters)) 2495 2512 m_framesetOk = false; 2496 2513 break; … … 2566 2583 String characters = buffer.takeRemaining(); 2567 2584 m_tree.insertTextNode(characters); 2568 if (m_framesetOk && hasNonWhitespace(characters))2585 if (m_framesetOk && !isAllWhitespace(characters)) 2569 2586 m_framesetOk = false; 2570 2587 break; … … 2710 2727 { 2711 2728 String characters = String::adopt(m_pendingTableCharacters); 2712 if ( hasNonWhitespace(characters)) {2729 if (!isAllWhitespace(characters)) { 2713 2730 // FIXME: parse error 2714 2731 HTMLConstructionSite::RedirectToFosterParentGuard redirecter(m_tree);
Note: See TracChangeset
for help on using the changeset viewer.