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

Side by Side Diff: Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp

Issue 334253005: Custom Elements: Encapsulates Async and Sync Queues into one class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 , m_queue(import->loader()->microtaskQueue()) 54 , m_queue(import->loader()->microtaskQueue())
55 { 55 {
56 } 56 }
57 57
58 CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep() 58 CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep()
59 { 59 {
60 } 60 }
61 61
62 void CustomElementMicrotaskImportStep::parentWasChanged() 62 void CustomElementMicrotaskImportStep::parentWasChanged()
63 { 63 {
64 m_queue = CustomElementMicrotaskQueue::create(); 64 m_queue = CustomElementSyncMicrotaskQueue::create();
65 m_import.clear(); 65 m_import.clear();
66 } 66 }
67 67
68 bool CustomElementMicrotaskImportStep::shouldWaitForImport() const 68 bool CustomElementMicrotaskImportStep::shouldWaitForImport() const
69 { 69 {
70 return m_import && !m_import->loader()->isDone(); 70 return m_import && !m_import->loader()->isDone();
71 } 71 }
72 72
73 void CustomElementMicrotaskImportStep::didUpgradeAllCustomElements() 73 void CustomElementMicrotaskImportStep::didUpgradeAllCustomElements()
74 { 74 {
(...skipping 21 matching lines...) Expand all
96 96
97 #if !defined(NDEBUG) 97 #if !defined(NDEBUG)
98 void CustomElementMicrotaskImportStep::show(unsigned indent) 98 void CustomElementMicrotaskImportStep::show(unsigned indent)
99 { 99 {
100 fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWa itForImport(), m_import && m_import->isSync(), m_import ? m_import->url().string ().utf8().data() : "null"); 100 fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWa itForImport(), m_import && m_import->isSync(), m_import ? m_import->url().string ().utf8().data() : "null");
101 m_queue->show(indent + 1); 101 m_queue->show(indent + 1);
102 } 102 }
103 #endif 103 #endif
104 104
105 } // namespace WebCore 105 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698