Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: Source/web/WebPageSerializerImpl.cpp

Issue 334713006: Use stricter typing for NodeLists throughout the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPageSerializer.cpp ('k') | Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/web/WebPageSerializer.cpp ('k') | Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698