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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp

Issue 2107763002: show source code, when location change is pending. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698