| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 if (element->hasChildren() || param->haveAddedContentsBeforeEnd) { | 378 if (element->hasChildren() || param->haveAddedContentsBeforeEnd) { |
| 379 result.append("</"); | 379 result.append("</"); |
| 380 result.append(element->nodeName().lower()); | 380 result.append(element->nodeName().lower()); |
| 381 result.append('>'); | 381 result.append('>'); |
| 382 } else { | 382 } else { |
| 383 // Check whether we have to write end tag for empty element. | 383 // Check whether we have to write end tag for empty element. |
| 384 if (param->isHTMLDocument) { | 384 if (param->isHTMLDocument) { |
| 385 result.append('>'); | 385 result.append('>'); |
| 386 // FIXME: This code is horribly wrong. WebFrameSerializerImpl must die. | 386 // FIXME: This code is horribly wrong. WebFrameSerializerImpl must die. |
| 387 if (!element->isHTMLElement() || | 387 if (!element->isHTMLElement() || |
| 388 !toHTMLElement(element)->ieForbidsInsertHTML()) { | 388 toHTMLElement(element)->shouldSerializeEndTag()) { |
| 389 // We need to write end tag when it is required. | 389 // We need to write end tag when it is required. |
| 390 result.append("</"); | 390 result.append("</"); |
| 391 result.append(element->nodeName().lower()); | 391 result.append(element->nodeName().lower()); |
| 392 result.append('>'); | 392 result.append('>'); |
| 393 } | 393 } |
| 394 } else { | 394 } else { |
| 395 // For xml base document. | 395 // For xml base document. |
| 396 result.append(" />"); | 396 result.append(" />"); |
| 397 } | 397 } |
| 398 } | 398 } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 // Report empty contents for invalid URLs. | 480 // Report empty contents for invalid URLs. |
| 481 m_client->didSerializeDataForFrame( | 481 m_client->didSerializeDataForFrame( |
| 482 WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished); | 482 WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished); |
| 483 } | 483 } |
| 484 | 484 |
| 485 DCHECK(m_dataBuffer.isEmpty()); | 485 DCHECK(m_dataBuffer.isEmpty()); |
| 486 return didSerialization; | 486 return didSerialization; |
| 487 } | 487 } |
| 488 | 488 |
| 489 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |