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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.h

Issue 2678683002: Delay instantiating InputDeviceCapabilities until accessed. (Closed)
Patch Set: rebased Created 3 years, 10 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
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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 19 matching lines...) Expand all
30 #include "core/HTMLNames.h" 30 #include "core/HTMLNames.h"
31 #include "core/css/CSSPrimitiveValue.h" 31 #include "core/css/CSSPrimitiveValue.h"
32 #include "core/css/CSSSelector.h" 32 #include "core/css/CSSSelector.h"
33 #include "core/dom/AXObjectCache.h" 33 #include "core/dom/AXObjectCache.h"
34 #include "core/dom/Attribute.h" 34 #include "core/dom/Attribute.h"
35 #include "core/dom/ContainerNode.h" 35 #include "core/dom/ContainerNode.h"
36 #include "core/dom/Document.h" 36 #include "core/dom/Document.h"
37 #include "core/dom/ElementData.h" 37 #include "core/dom/ElementData.h"
38 #include "core/dom/SpaceSplitString.h" 38 #include "core/dom/SpaceSplitString.h"
39 #include "core/html/CollectionType.h" 39 #include "core/html/CollectionType.h"
40 #include "core/input/InputDeviceCapabilities.h"
40 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
41 #include "platform/scroll/ScrollTypes.h" 42 #include "platform/scroll/ScrollTypes.h"
42 #include "public/platform/WebFocusType.h" 43 #include "public/platform/WebFocusType.h"
43 44
44 namespace blink { 45 namespace blink {
45 46
46 class ElementAnimations; 47 class ElementAnimations;
47 class Attr; 48 class Attr;
48 class Attribute; 49 class Attribute;
49 class CSSStyleDeclaration; 50 class CSSStyleDeclaration;
50 class ClientRect; 51 class ClientRect;
51 class ClientRectList; 52 class ClientRectList;
52 class CompositorMutation; 53 class CompositorMutation;
53 class CustomElementDefinition; 54 class CustomElementDefinition;
54 class DOMStringMap; 55 class DOMStringMap;
55 class DOMTokenList; 56 class DOMTokenList;
56 class ElementRareData; 57 class ElementRareData;
57 class ElementShadow; 58 class ElementShadow;
58 class ExceptionState; 59 class ExceptionState;
59 class Image; 60 class Image;
60 class InputDeviceCapabilities;
61 class Locale; 61 class Locale;
62 class MutableStylePropertySet; 62 class MutableStylePropertySet;
63 class NamedNodeMap; 63 class NamedNodeMap;
64 class ElementIntersectionObserverData; 64 class ElementIntersectionObserverData;
65 class PseudoElement; 65 class PseudoElement;
66 class ResizeObservation; 66 class ResizeObservation;
67 class ResizeObserver; 67 class ResizeObserver;
68 class ScrollState; 68 class ScrollState;
69 class ScrollStateCallback; 69 class ScrollStateCallback;
70 class ScrollToOptions; 70 class ScrollToOptions;
(...skipping 29 matching lines...) Expand all
100 Restore, 100 Restore,
101 None, 101 None,
102 }; 102 };
103 103
104 struct FocusParams { 104 struct FocusParams {
105 STACK_ALLOCATED(); 105 STACK_ALLOCATED();
106 106
107 FocusParams() {} 107 FocusParams() {}
108 FocusParams(SelectionBehaviorOnFocus selection, 108 FocusParams(SelectionBehaviorOnFocus selection,
109 WebFocusType focusType, 109 WebFocusType focusType,
110 InputDeviceCapabilities* capabilities) 110 const InputDeviceCapabilitiesValue& capabilities)
111 : selectionBehavior(selection), 111 : selectionBehavior(selection),
112 type(focusType), 112 type(focusType),
113 sourceCapabilities(capabilities) {} 113 sourceCapabilities(capabilities) {}
114 114
115 SelectionBehaviorOnFocus selectionBehavior = 115 SelectionBehaviorOnFocus selectionBehavior =
116 SelectionBehaviorOnFocus::Restore; 116 SelectionBehaviorOnFocus::Restore;
117 WebFocusType type = WebFocusTypeNone; 117 WebFocusType type = WebFocusTypeNone;
118 Member<InputDeviceCapabilities> sourceCapabilities = nullptr; 118 InputDeviceCapabilitiesValue sourceCapabilities;
119 }; 119 };
120 120
121 typedef HeapVector<Member<Attr>> AttrNodeList; 121 typedef HeapVector<Member<Attr>> AttrNodeList;
122 122
123 class CORE_EXPORT Element : public ContainerNode { 123 class CORE_EXPORT Element : public ContainerNode {
124 DEFINE_WRAPPERTYPEINFO(); 124 DEFINE_WRAPPERTYPEINFO();
125 125
126 public: 126 public:
127 static Element* create(const QualifiedName&, Document*); 127 static Element* create(const QualifiedName&, Document*);
128 ~Element() override; 128 ~Element() override;
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // isFocusable(), isKeyboardFocusable(), and isMouseFocusable() check 527 // isFocusable(), isKeyboardFocusable(), and isMouseFocusable() check
528 // whether the element can actually be focused. Callers should ensure 528 // whether the element can actually be focused. Callers should ensure
529 // ComputedStyle is up to date; 529 // ComputedStyle is up to date;
530 // e.g. by calling Document::updateLayoutTreeIgnorePendingStylesheets(). 530 // e.g. by calling Document::updateLayoutTreeIgnorePendingStylesheets().
531 bool isFocusable() const; 531 bool isFocusable() const;
532 virtual bool isKeyboardFocusable() const; 532 virtual bool isKeyboardFocusable() const;
533 virtual bool isMouseFocusable() const; 533 virtual bool isMouseFocusable() const;
534 bool isFocusedElementInDocument() const; 534 bool isFocusedElementInDocument() const;
535 Element* adjustedFocusedElementInTreeScope() const; 535 Element* adjustedFocusedElementInTreeScope() const;
536 536
537 virtual void dispatchFocusEvent( 537 virtual void dispatchFocusEvent(Element* oldFocusedElement,
538 Element* oldFocusedElement, 538 WebFocusType,
539 WebFocusType, 539 const InputDeviceCapabilitiesValue&);
540 InputDeviceCapabilities* sourceCapabilities = nullptr); 540 virtual void dispatchBlurEvent(Element* newFocusedElement,
541 virtual void dispatchBlurEvent( 541 WebFocusType,
542 Element* newFocusedElement, 542 const InputDeviceCapabilitiesValue&);
543 WebFocusType, 543 virtual void dispatchFocusInEvent(const AtomicString& eventType,
544 InputDeviceCapabilities* sourceCapabilities = nullptr); 544 Element* oldFocusedElement,
545 virtual void dispatchFocusInEvent( 545 WebFocusType,
546 const AtomicString& eventType, 546 const InputDeviceCapabilitiesValue&);
547 Element* oldFocusedElement, 547 void dispatchFocusOutEvent(const AtomicString& eventType,
548 WebFocusType, 548 Element* newFocusedElement,
549 InputDeviceCapabilities* sourceCapabilities = nullptr); 549 const InputDeviceCapabilitiesValue&);
550 void dispatchFocusOutEvent(
551 const AtomicString& eventType,
552 Element* newFocusedElement,
553 InputDeviceCapabilities* sourceCapabilities = nullptr);
554 550
555 virtual String innerText(); 551 virtual String innerText();
556 String outerText(); 552 String outerText();
557 String innerHTML() const; 553 String innerHTML() const;
558 String outerHTML() const; 554 String outerHTML() const;
559 void setInnerHTML(const String&, ExceptionState& = ASSERT_NO_EXCEPTION); 555 void setInnerHTML(const String&, ExceptionState& = ASSERT_NO_EXCEPTION);
560 void setOuterHTML(const String&, ExceptionState&); 556 void setOuterHTML(const String&, ExceptionState&);
561 557
562 Element* insertAdjacentElement(const String& where, 558 Element* insertAdjacentElement(const String& where,
563 Element* newChild, 559 Element* newChild,
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1187 #define DECLARE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1192 static T* create(const QualifiedName&, Document&) 1188 static T* create(const QualifiedName&, Document&)
1193 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 1189 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
1194 T* T::create(const QualifiedName& tagName, Document& document) { \ 1190 T* T::create(const QualifiedName& tagName, Document& document) { \
1195 return new T(tagName, document); \ 1191 return new T(tagName, document); \
1196 } 1192 }
1197 1193
1198 } // namespace blink 1194 } // namespace blink
1199 1195
1200 #endif // Element_h 1196 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698