Commit a187c5b1 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Make a separated header file for blink::CreateElementFlags

We're going to use blink::CreateElementFlags in more header files, and
would like to avoid to include huge Document.h.

This CL has no behavior changes.

Bug: 805280
Change-Id: I64c89995cda3f76f1e75b6cf20af05f0e8eb2e24
Reviewed-on: https://chromium-review.googlesource.com/888191Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532134}
parent c4f79c34
......@@ -50,6 +50,7 @@ blink_core_sources("dom") {
"ContextLifecycleNotifier.h",
"ContextLifecycleObserver.cpp",
"ContextLifecycleObserver.h",
"CreateElementFlags.h",
"DOMException.cpp",
"DOMException.h",
"DOMHighResTimeStamp.h",
......
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
* (C) 2006 Alexey Proskuryakov (ap@webkit.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
* rights reserved.
* Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
* (http://www.torchmobile.com/)
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2011 Google Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef CreateElementFlags_h
#define CreateElementFlags_h
enum CreateElementFlags {
kCreatedByParser = 1 << 0,
// Synchronous custom elements flag:
// https://dom.spec.whatwg.org/#concept-create-element
// TODO(kojii): Remove these flags, add an option not to queue upgrade, and
// let parser/DOM methods to upgrade synchronously when necessary.
kSynchronousCustomElements = 0 << 1,
kAsynchronousCustomElements = 1 << 1,
// Aliases by callers.
// Clone a node: https://dom.spec.whatwg.org/#concept-node-clone
kCreatedByCloneNode = kAsynchronousCustomElements,
kCreatedByImportNode = kCreatedByCloneNode,
// https://dom.spec.whatwg.org/#dom-document-createelement
kCreatedByCreateElement = kSynchronousCustomElements,
// https://html.spec.whatwg.org/#create-an-element-for-the-token
kCreatedByFragmentParser = kCreatedByParser | kAsynchronousCustomElements,
};
#endif // CreateElementFlags_h
......@@ -39,6 +39,7 @@
#include "core/CoreExport.h"
#include "core/animation/WorkletAnimationController.h"
#include "core/dom/ContainerNode.h"
#include "core/dom/CreateElementFlags.h"
#include "core/dom/DocumentEncodingData.h"
#include "core/dom/DocumentInit.h"
#include "core/dom/DocumentLifecycle.h"
......@@ -218,25 +219,6 @@ enum ShadowCascadeOrder {
kShadowCascadeV1
};
enum CreateElementFlags {
kCreatedByParser = 1 << 0,
// Synchronous custom elements flag:
// https://dom.spec.whatwg.org/#concept-create-element
// TODO(kojii): Remove these flags, add an option not to queue upgrade, and
// let parser/DOM methods to upgrade synchronously when necessary.
kSynchronousCustomElements = 0 << 1,
kAsynchronousCustomElements = 1 << 1,
// Aliases by callers.
// Clone a node: https://dom.spec.whatwg.org/#concept-node-clone
kCreatedByCloneNode = kAsynchronousCustomElements,
kCreatedByImportNode = kCreatedByCloneNode,
// https://dom.spec.whatwg.org/#dom-document-createelement
kCreatedByCreateElement = kSynchronousCustomElements,
// https://html.spec.whatwg.org/#create-an-element-for-the-token
kCreatedByFragmentParser = kCreatedByParser | kAsynchronousCustomElements,
};
// Collect data about deferred loading of offscreen cross-origin documents. All
// cross-origin documents log Created. Only those that would load log a reason.
// We can then see the % of cross-origin documents that never have to load.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment