| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 // Do post action for end tag. | 402 // Do post action for end tag. |
| 403 result.append(postActionAfterSerializeEndTag(element, param)); | 403 result.append(postActionAfterSerializeEndTag(element, param)); |
| 404 // Save the result to data buffer. | 404 // Save the result to data buffer. |
| 405 saveHTMLContentToBuffer(result.toString(), param); | 405 saveHTMLContentToBuffer(result.toString(), param); |
| 406 } | 406 } |
| 407 | 407 |
| 408 void WebFrameSerializerImpl::buildContentForNode( | 408 void WebFrameSerializerImpl::buildContentForNode( |
| 409 Node* node, | 409 Node* node, |
| 410 SerializeDomParam* param) | 410 SerializeDomParam* param) |
| 411 { | 411 { |
| 412 switch (node->nodeType()) { | 412 switch (node->getNodeType()) { |
| 413 case Node::ELEMENT_NODE: | 413 case Node::ELEMENT_NODE: |
| 414 // Process open tag of element. | 414 // Process open tag of element. |
| 415 openTagToString(toElement(node), param); | 415 openTagToString(toElement(node), param); |
| 416 // Walk through the children nodes and process it. | 416 // Walk through the children nodes and process it. |
| 417 for (Node *child = node->firstChild(); child; child = child->nextSibling
()) | 417 for (Node *child = node->firstChild(); child; child = child->nextSibling
()) |
| 418 buildContentForNode(child, param); | 418 buildContentForNode(child, param); |
| 419 // Process end tag of element. | 419 // Process end tag of element. |
| 420 endTagToString(toElement(node), param); | 420 endTagToString(toElement(node), param); |
| 421 break; | 421 break; |
| 422 case Node::TEXT_NODE: | 422 case Node::TEXT_NODE: |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 // Report empty contents for invalid URLs. | 484 // Report empty contents for invalid URLs. |
| 485 m_client->didSerializeDataForFrame( | 485 m_client->didSerializeDataForFrame( |
| 486 WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished); | 486 WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished); |
| 487 } | 487 } |
| 488 | 488 |
| 489 ASSERT(m_dataBuffer.isEmpty()); | 489 ASSERT(m_dataBuffer.isEmpty()); |
| 490 return didSerialization; | 490 return didSerialization; |
| 491 } | 491 } |
| 492 | 492 |
| 493 } // namespace blink | 493 } // namespace blink |
| OLD | NEW |