| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 if (!chunk->startingScript && (it->type() == HTMLToken::StartTag || it->
type() == HTMLToken::EndTag)) | 453 if (!chunk->startingScript && (it->type() == HTMLToken::StartTag || it->
type() == HTMLToken::EndTag)) |
| 454 elementTokenCount++; | 454 elementTokenCount++; |
| 455 | 455 |
| 456 if (document()->frame() && document()->frame()->navigationScheduler().lo
cationChangePending()) { | 456 if (document()->frame() && document()->frame()->navigationScheduler().lo
cationChangePending()) { |
| 457 | 457 |
| 458 // To match main-thread parser behavior (which never checks location
ChangePending on the EOF path) | 458 // To match main-thread parser behavior (which never checks location
ChangePending on the EOF path) |
| 459 // we peek to see if this chunk has an EOF and process it anyway. | 459 // we peek to see if this chunk has an EOF and process it anyway. |
| 460 if (tokens->last().type() == HTMLToken::EndOfFile) { | 460 if (tokens->last().type() == HTMLToken::EndOfFile) { |
| 461 ASSERT(m_speculations.isEmpty()); // There should never be any c
hunks after the EOF. | 461 ASSERT(m_speculations.isEmpty()); // There should never be any c
hunks after the EOF. |
| 462 prepareToStopParsing(); | 462 prepareToStopParsing(); |
| 463 } | 463 » » break; |
| 464 break; | 464 } |
| 465 } | 465 } |
| 466 | 466 |
| 467 m_textPosition = it->textPosition(); | 467 m_textPosition = it->textPosition(); |
| 468 | 468 |
| 469 constructTreeFromCompactHTMLToken(*it); | 469 constructTreeFromCompactHTMLToken(*it); |
| 470 | 470 |
| 471 if (isStopped()) | 471 if (isStopped()) |
| 472 break; | 472 break; |
| 473 | 473 |
| 474 if (!m_triedLoadingLinkHeaders && document()->loader()) { | 474 if (!m_triedLoadingLinkHeaders && document()->loader()) { |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 DEFINE_STATIC_LOCAL(CustomCountHistogram, successHistogram, ("PreloadSca
nner.DocumentWrite.ExecutionTime.Success", 1, 10000, 50)); | 1126 DEFINE_STATIC_LOCAL(CustomCountHistogram, successHistogram, ("PreloadSca
nner.DocumentWrite.ExecutionTime.Success", 1, 10000, 50)); |
| 1127 successHistogram.count(duration); | 1127 successHistogram.count(duration); |
| 1128 } else { | 1128 } else { |
| 1129 DEFINE_STATIC_LOCAL(CustomCountHistogram, failureHistogram, ("PreloadSca
nner.DocumentWrite.ExecutionTime.Failure", 1, 10000, 50)); | 1129 DEFINE_STATIC_LOCAL(CustomCountHistogram, failureHistogram, ("PreloadSca
nner.DocumentWrite.ExecutionTime.Failure", 1, 10000, 50)); |
| 1130 failureHistogram.count(duration); | 1130 failureHistogram.count(duration); |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 } // namespace blink | 1135 } // namespace blink |
| OLD | NEW |