chromium/third_party/blink/renderer/core/dom/element.h

/*
 * Copyright (C) 1999 Lars Knoll ([email protected])
 *           (C) 1999 Antti Koivisto ([email protected])
 *           (C) 2001 Peter Kelly ([email protected])
 *           (C) 2001 Dirk Mueller ([email protected])
 * Copyright (C) 2003-2011, 2013, 2014 Apple 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 THIRD_PARTY_BLINK_RENDERER_CORE_DOM_ELEMENT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_ELEMENT_H_

#include "base/check_op.h"
#include "base/dcheck_is_on.h"
#include "base/gtest_prod_util.h"
#include "base/types/pass_key.h"
#include "third_party/blink/public/common/input/pointer_id.h"
#include "third_party/blink/public/common/metrics/document_update_reason.h"
#include "third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom-blink-forward.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_typedefs.h"
#include "third_party/blink/renderer/core/animation/animatable.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/css_primitive_value.h"
#include "third_party/blink/renderer/core/css/css_selector.h"
#include "third_party/blink/renderer/core/css/resolver/cascade_filter.h"
#include "third_party/blink/renderer/core/css/style_recalc_change.h"
#include "third_party/blink/renderer/core/css/style_request.h"
#include "third_party/blink/renderer/core/dom/container_node.h"
#include "third_party/blink/renderer/core/dom/dom_high_res_time_stamp.h"
#include "third_party/blink/renderer/core/dom/element_data.h"
#include "third_party/blink/renderer/core/dom/events/simulated_click_options.h"
#include "third_party/blink/renderer/core/dom/focusgroup_flags.h"
#include "third_party/blink/renderer/core/dom/has_invalidation_flags.h"
#include "third_party/blink/renderer/core/dom/names_map.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/whitespace_attacher.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/trustedtypes/trusted_types_util.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/transform_view.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/region_capture_crop_id.h"
#include "third_party/blink/renderer/platform/restriction_target_id.h"
#include "third_party/blink/renderer/platform/text/text_direction.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string_table.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "ui/gfx/geometry/rect_f.h"

namespace gfx {
class QuadF;
class Vector2dF;
}  // namespace gfx

namespace blink {

class AccessibleNode;
class AnchorElementObserver;
class AnchorPositionScrollData;
class AriaNotificationOptions;
class Attr;
class Attribute;
class ContainerQueryData;
class ContainerQueryEvaluator;
class CSSPropertyName;
class CSSPropertyValueSet;
class CSSStyleDeclaration;
class CustomElementDefinition;
class CustomElementRegistry;
class DOMRect;
class DOMRectList;
class DOMStringMap;
class DOMTokenList;
class DisplayLockContext;
class DisplayStyle;
class Document;
class EditContext;
class ElementAnimations;
class ElementInternals;
class ElementIntersectionObserverData;
class ElementRareDataVector;
class ExceptionState;
class FocusOptions;
class HTMLElement;
class HTMLTemplateElement;
class Image;
class InputDeviceCapabilities;
class KURL;
class Locale;
class MutableCSSPropertyValueSet;
class NamedNodeMap;
class OutOfFlowData;
class PointerLockOptions;
class PopoverData;
class PseudoElement;
class ResizeObservation;
class ResizeObserver;
class ResizeObserverSize;
class ScrollIntoViewOptions;
class CheckVisibilityOptions;
class ScrollToOptions;
class ShadowRoot;
class ShadowRootInit;
class SpaceSplitString;
class StyleEngine;
class StyleHighlightData;
class StylePropertyMap;
class StylePropertyMapReadOnly;
class StyleRecalcContext;
class StyleScopeData;
class TextVisitor;
class V8UnionBooleanOrScrollIntoViewOptions;
class ComputedStyleBuilder;
class StyleAdjuster;

template <typename IDLType>
class FrozenArray;

enum class CSSPropertyID;
enum class CSSValueID;
enum class DisplayLockActivationReason;
enum class DocumentUpdateReason;

struct FocusParams;

ScrollOffset;

struct AttributeToNameTransform {};

AttributeNamesView;

enum SpellcheckAttributeState {};

enum class ElementFlags {};

enum class ShadowRootMode;

enum class SlotAssignmentMode {};
enum class FocusDelegation {};

enum class SelectionBehaviorOnFocus {};

enum class FocusableState {};

// https://html.spec.whatwg.org/C/#dom-document-nameditem-filter
enum class NamedItemType {};

enum class CommandEventType {};

AttrNodeList;

AttrNameToTrustedType;

class CORE_EXPORT Element : public ContainerNode, public Animatable {};

template <typename T>
bool IsElementOfType(const Node&);
template <>
inline bool IsElementOfType<const Element>(const Node& node) {}
template <typename T>
inline bool IsElementOfType(const Element& element) {}
template <>
inline bool IsElementOfType<const Element>(const Element&) {}

template <>
struct DowncastTraits<Element> {};

inline bool IsDisabledFormControl(const Node* node) {}

inline Element* Node::parentElement() const {}

inline bool Element::FastHasAttribute(const QualifiedName& name) const {}

inline const AtomicString& Element::FastGetAttribute(
    const QualifiedName& name) const {}

inline AttributeCollection Element::Attributes() const {}

inline AttributeCollection Element::AttributesWithoutUpdate() const {}

inline AttributeCollection Element::AttributesWithoutStyleUpdate() const {}

inline bool Element::hasAttributes() const {}

inline const AtomicString& Element::IdForStyleResolution() const {}

inline const AtomicString& Element::GetIdAttribute() const {}

inline const AtomicString& Element::GetNameAttribute() const {}

inline const AtomicString& Element::GetClassAttribute() const {}

inline void Element::SetIdAttribute(const AtomicString& value) {}

inline const SpaceSplitString& Element::ClassNames() const {}

inline bool Element::HasClassName(const AtomicString& class_name) const {}

inline bool Element::HasID() const {}

inline bool Element::HasClass() const {}

inline UniqueElementData& Element::EnsureUniqueElementData() {}

inline const CSSPropertyValueSet* Element::PresentationAttributeStyle() {}

inline void Element::SetTagNameForCreateElementNS(
    const QualifiedName& tag_name) {}

inline bool IsShadowHost(const Node* node) {}

inline bool IsShadowHost(const Node& node) {}

inline bool IsShadowHost(const Element* element) {}

inline bool IsShadowHost(const Element& element) {}

inline bool IsAtShadowBoundary(const Element* element) {}

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_DOM_ELEMENT_H_