| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 // Return now if user only needs to serialize specified frame, not including | 466 // Return now if user only needs to serialize specified frame, not including |
| 467 // all sub-frames. | 467 // all sub-frames. |
| 468 if (!m_recursiveSerialization) | 468 if (!m_recursiveSerialization) |
| 469 return; | 469 return; |
| 470 // Collect all frames inside the specified frame. | 470 // Collect all frames inside the specified frame. |
| 471 for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) { | 471 for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) { |
| 472 WebLocalFrameImpl* currentFrame = m_frames[i]; | 472 WebLocalFrameImpl* currentFrame = m_frames[i]; |
| 473 // Get current using document. | 473 // Get current using document. |
| 474 Document* currentDoc = currentFrame->frame()->document(); | 474 Document* currentDoc = currentFrame->frame()->document(); |
| 475 // Go through sub-frames. | 475 // Go through sub-frames. |
| 476 RefPtrWillBeRawPtr<HTMLCollection> all = currentDoc->all(); | 476 RefPtrWillBeRawPtr<HTMLAllCollection> all = currentDoc->all(); |
| 477 | 477 |
| 478 for (unsigned i = 0; Element* element = all->item(i); ++i) { | 478 for (unsigned i = 0; Element* element = all->item(i); ++i) { |
| 479 if (!element->isHTMLElement()) | 479 if (!element->isHTMLElement()) |
| 480 continue; | 480 continue; |
| 481 WebLocalFrameImpl* webFrame = | 481 WebLocalFrameImpl* webFrame = |
| 482 WebLocalFrameImpl::fromFrameOwnerElement(element); | 482 WebLocalFrameImpl::fromFrameOwnerElement(element); |
| 483 if (webFrame) | 483 if (webFrame) |
| 484 m_frames.append(webFrame); | 484 m_frames.append(webFrame); |
| 485 } | 485 } |
| 486 } | 486 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 515 | 515 |
| 516 encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &p
aram, ForceFlush); | 516 encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &p
aram, ForceFlush); |
| 517 } | 517 } |
| 518 | 518 |
| 519 ASSERT(m_dataBuffer.isEmpty()); | 519 ASSERT(m_dataBuffer.isEmpty()); |
| 520 m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSeriali
zerClient::AllFramesAreFinished); | 520 m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSeriali
zerClient::AllFramesAreFinished); |
| 521 return didSerialization; | 521 return didSerialization; |
| 522 } | 522 } |
| 523 | 523 |
| 524 } // namespace blink | 524 } // namespace blink |
| OLD | NEW |