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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2556993005: [blink] Split TaskType::Internal into InternalTimer and InternalLoading. (Closed)
Patch Set: One more fix Created 3 years, 12 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 | third_party/WebKit/Source/core/dom/TaskRunnerHelper.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 m_importsController(this, initializer.importsController()), 414 m_importsController(this, initializer.importsController()),
415 m_contextFeatures(ContextFeatures::defaultSwitch()), 415 m_contextFeatures(ContextFeatures::defaultSwitch()),
416 m_wellFormed(false), 416 m_wellFormed(false),
417 m_implementation(this, nullptr), 417 m_implementation(this, nullptr),
418 m_printing(NotPrinting), 418 m_printing(NotPrinting),
419 m_paginatedForScreen(false), 419 m_paginatedForScreen(false),
420 m_compatibilityMode(NoQuirksMode), 420 m_compatibilityMode(NoQuirksMode),
421 m_compatibilityModeLocked(false), 421 m_compatibilityModeLocked(false),
422 m_hasAutofocused(false), 422 m_hasAutofocused(false),
423 m_clearFocusedElementTimer( 423 m_clearFocusedElementTimer(
424 TaskRunnerHelper::get(TaskType::Internal, this), 424 TaskRunnerHelper::get(TaskType::UnspecedTimer, this),
425 this, 425 this,
426 &Document::clearFocusedElementTimerFired), 426 &Document::clearFocusedElementTimerFired),
427 m_domTreeVersion(++s_globalTreeVersion), 427 m_domTreeVersion(++s_globalTreeVersion),
428 m_styleVersion(0), 428 m_styleVersion(0),
429 m_listenerTypes(0), 429 m_listenerTypes(0),
430 m_mutationObserverTypes(0), 430 m_mutationObserverTypes(0),
431 m_styleEngine(this, nullptr), 431 m_styleEngine(this, nullptr),
432 m_styleSheetList(this, nullptr), 432 m_styleSheetList(this, nullptr),
433 m_visitedLinkState(VisitedLinkState::create(*this)), 433 m_visitedLinkState(VisitedLinkState::create(*this)),
434 m_visuallyOrdered(false), 434 m_visuallyOrdered(false),
435 m_readyState(Complete), 435 m_readyState(Complete),
436 m_parsingState(FinishedParsing), 436 m_parsingState(FinishedParsing),
437 m_gotoAnchorNeededAfterStylesheetsLoad(false), 437 m_gotoAnchorNeededAfterStylesheetsLoad(false),
438 m_containsValidityStyleRules(false), 438 m_containsValidityStyleRules(false),
439 m_containsPlugins(false), 439 m_containsPlugins(false),
440 m_updateFocusAppearanceSelectionBahavior(SelectionBehaviorOnFocus::Reset), 440 m_updateFocusAppearanceSelectionBahavior(SelectionBehaviorOnFocus::Reset),
441 m_ignoreDestructiveWriteCount(0), 441 m_ignoreDestructiveWriteCount(0),
442 m_throwOnDynamicMarkupInsertionCount(0), 442 m_throwOnDynamicMarkupInsertionCount(0),
443 m_markers(new DocumentMarkerController(*this)), 443 m_markers(new DocumentMarkerController(*this)),
444 m_updateFocusAppearanceTimer( 444 m_updateFocusAppearanceTimer(
445 TaskRunnerHelper::get(TaskType::Internal, this), 445 TaskRunnerHelper::get(TaskType::UnspecedTimer, this),
446 this, 446 this,
447 &Document::updateFocusAppearanceTimerFired), 447 &Document::updateFocusAppearanceTimerFired),
448 m_cssTarget(nullptr), 448 m_cssTarget(nullptr),
449 m_loadEventProgress(LoadEventNotRun), 449 m_loadEventProgress(LoadEventNotRun),
450 m_startTime(currentTime()), 450 m_startTime(currentTime()),
451 m_scriptRunner(ScriptRunner::create(this)), 451 m_scriptRunner(ScriptRunner::create(this)),
452 m_xmlVersion("1.0"), 452 m_xmlVersion("1.0"),
453 m_xmlStandalone(StandaloneUnspecified), 453 m_xmlStandalone(StandaloneUnspecified),
454 m_hasXMLDeclaration(0), 454 m_hasXMLDeclaration(0),
455 m_designMode(false), 455 m_designMode(false),
456 m_isRunningExecCommand(false), 456 m_isRunningExecCommand(false),
457 m_hasReceivedUserGesture(false), 457 m_hasReceivedUserGesture(false),
458 m_hasAnnotatedRegions(false), 458 m_hasAnnotatedRegions(false),
459 m_annotatedRegionsDirty(false), 459 m_annotatedRegionsDirty(false),
460 m_documentClasses(documentClasses), 460 m_documentClasses(documentClasses),
461 m_isViewSource(false), 461 m_isViewSource(false),
462 m_sawElementsInKnownNamespaces(false), 462 m_sawElementsInKnownNamespaces(false),
463 m_isSrcdocDocument(false), 463 m_isSrcdocDocument(false),
464 m_isMobileDocument(false), 464 m_isMobileDocument(false),
465 m_layoutView(0), 465 m_layoutView(0),
466 m_contextDocument(initializer.contextDocument()), 466 m_contextDocument(initializer.contextDocument()),
467 m_hasFullscreenSupplement(false), 467 m_hasFullscreenSupplement(false),
468 m_loadEventDelayCount(0), 468 m_loadEventDelayCount(0),
469 m_loadEventDelayTimer(TaskRunnerHelper::get(TaskType::Networking, this), 469 m_loadEventDelayTimer(TaskRunnerHelper::get(TaskType::Networking, this),
470 this, 470 this,
471 &Document::loadEventDelayTimerFired), 471 &Document::loadEventDelayTimerFired),
472 m_pluginLoadingTimer(TaskRunnerHelper::get(TaskType::Internal, this), 472 m_pluginLoadingTimer(
473 this, 473 TaskRunnerHelper::get(TaskType::UnspecedLoading, this),
474 &Document::pluginLoadingTimerFired), 474 this,
475 &Document::pluginLoadingTimerFired),
475 m_documentTiming(*this), 476 m_documentTiming(*this),
476 m_writeRecursionIsTooDeep(false), 477 m_writeRecursionIsTooDeep(false),
477 m_writeRecursionDepth(0), 478 m_writeRecursionDepth(0),
478 m_registrationContext(initializer.registrationContext(this)), 479 m_registrationContext(initializer.registrationContext(this)),
479 m_elementDataCacheClearTimer( 480 m_elementDataCacheClearTimer(
480 TaskRunnerHelper::get(TaskType::Internal, this), 481 TaskRunnerHelper::get(TaskType::UnspecedTimer, this),
481 this, 482 this,
482 &Document::elementDataCacheClearTimerFired), 483 &Document::elementDataCacheClearTimerFired),
483 m_timeline(DocumentTimeline::create(this)), 484 m_timeline(DocumentTimeline::create(this)),
484 m_compositorPendingAnimations(new CompositorPendingAnimations()), 485 m_compositorPendingAnimations(new CompositorPendingAnimations()),
485 m_templateDocumentHost(nullptr), 486 m_templateDocumentHost(nullptr),
486 m_didAssociateFormControlsTimer( 487 m_didAssociateFormControlsTimer(
487 TaskRunnerHelper::get(TaskType::Internal, this), 488 TaskRunnerHelper::get(TaskType::UnspecedLoading, this),
488 this, 489 this,
489 &Document::didAssociateFormControlsTimerFired), 490 &Document::didAssociateFormControlsTimerFired),
490 m_timers(TaskRunnerHelper::get(TaskType::Timer, this)->clone()), 491 m_timers(TaskRunnerHelper::get(TaskType::Timer, this)->clone()),
491 m_hasViewportUnits(false), 492 m_hasViewportUnits(false),
492 m_parserSyncPolicy(AllowAsynchronousParsing), 493 m_parserSyncPolicy(AllowAsynchronousParsing),
493 m_nodeCount(0), 494 m_nodeCount(0),
494 m_wouldLoadReason(Created), 495 m_wouldLoadReason(Created),
495 m_passwordCount(0) { 496 m_passwordCount(0) {
496 if (m_frame) { 497 if (m_frame) {
497 DCHECK(m_frame->page()); 498 DCHECK(m_frame->page());
(...skipping 3858 matching lines...) Expand 10 before | Expand all | Expand 10 after
4356 OriginAccessEntry::AllowRegisterableDomains)); 4357 OriginAccessEntry::AllowRegisterableDomains));
4357 } 4358 }
4358 return *m_accessEntryFromURL; 4359 return *m_accessEntryFromURL;
4359 } 4360 }
4360 4361
4361 void Document::sendSensitiveInputVisibility() { 4362 void Document::sendSensitiveInputVisibility() {
4362 if (m_sensitiveInputVisibilityTask.isActive()) 4363 if (m_sensitiveInputVisibilityTask.isActive())
4363 return; 4364 return;
4364 4365
4365 m_sensitiveInputVisibilityTask = 4366 m_sensitiveInputVisibilityTask =
4366 TaskRunnerHelper::get(TaskType::Internal, this) 4367 TaskRunnerHelper::get(TaskType::UnspecedLoading, this)
4367 ->postCancellableTask( 4368 ->postCancellableTask(
4368 BLINK_FROM_HERE, 4369 BLINK_FROM_HERE,
4369 WTF::bind(&Document::sendSensitiveInputVisibilityInternal, 4370 WTF::bind(&Document::sendSensitiveInputVisibilityInternal,
4370 wrapWeakPersistent(this))); 4371 wrapWeakPersistent(this)));
4371 } 4372 }
4372 4373
4373 void Document::sendSensitiveInputVisibilityInternal() { 4374 void Document::sendSensitiveInputVisibilityInternal() {
4374 if (!frame()) 4375 if (!frame())
4375 return; 4376 return;
4376 4377
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
6584 } 6585 }
6585 6586
6586 void showLiveDocumentInstances() { 6587 void showLiveDocumentInstances() {
6587 WeakDocumentSet& set = liveDocumentSet(); 6588 WeakDocumentSet& set = liveDocumentSet();
6588 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6589 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6589 for (Document* document : set) 6590 for (Document* document : set)
6590 fprintf(stderr, "- Document %p URL: %s\n", document, 6591 fprintf(stderr, "- Document %p URL: %s\n", document,
6591 document->url().getString().utf8().data()); 6592 document->url().getString().utf8().data());
6592 } 6593 }
6593 #endif 6594 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/TaskRunnerHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698