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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.h

Issue 2683853005: bindings: Make some value iterator properties aliases to Array.prototype functions (Closed)
Patch Set: Remove constexpr from Internals.h to fix the Android build 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 10 matching lines...) Expand all
21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef Internals_h 27 #ifndef Internals_h
28 #define Internals_h 28 #define Internals_h
29 29
30 #include "bindings/core/v8/ExceptionState.h" 30 #include "bindings/core/v8/ExceptionState.h"
31 #include "bindings/core/v8/Iterable.h"
32 #include "bindings/core/v8/ScriptPromise.h" 31 #include "bindings/core/v8/ScriptPromise.h"
33 #include "bindings/core/v8/ScriptState.h" 32 #include "bindings/core/v8/ScriptState.h"
34 #include "bindings/core/v8/ScriptValue.h" 33 #include "bindings/core/v8/ScriptValue.h"
35 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
36 #include "core/css/CSSComputedStyleDeclaration.h" 35 #include "core/css/CSSComputedStyleDeclaration.h"
37 #include "core/page/scrolling/ScrollingCoordinator.h" 36 #include "core/page/scrolling/ScrollingCoordinator.h"
38 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
39 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
40 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
41 40
42 namespace blink { 41 namespace blink {
43 42
44 class Animation; 43 class Animation;
45 class CallbackFunctionTest; 44 class CallbackFunctionTest;
46 class CanvasRenderingContext; 45 class CanvasRenderingContext;
47 class ClientRect; 46 class ClientRect;
48 class ClientRectList; 47 class ClientRectList;
49 class DOMArrayBuffer; 48 class DOMArrayBuffer;
50 class DOMPoint; 49 class DOMPoint;
50 class DOMWindow;
51 class Dictionary;
51 class DictionaryTest; 52 class DictionaryTest;
52 class Document; 53 class Document;
53 class DocumentMarker; 54 class DocumentMarker;
54 class Element; 55 class Element;
55 class ExceptionState; 56 class ExceptionState;
56 class GCObservation; 57 class GCObservation;
57 class HTMLInputElement; 58 class HTMLInputElement;
58 class HTMLMediaElement; 59 class HTMLMediaElement;
59 class HTMLSelectElement; 60 class HTMLSelectElement;
60 class InternalRuntimeFlags; 61 class InternalRuntimeFlags;
61 class InternalSettings; 62 class InternalSettings;
62 class LayerRectList; 63 class LayerRectList;
63 class LocalDOMWindow; 64 class LocalDOMWindow;
64 class LocalFrame; 65 class LocalFrame;
65 class Location; 66 class Location;
66 class Node; 67 class Node;
67 class OriginTrialsTest; 68 class OriginTrialsTest;
68 class Page; 69 class Page;
69 class Range; 70 class Range;
70 class SerializedScriptValue; 71 class SerializedScriptValue;
71 class ShadowRoot; 72 class ShadowRoot;
72 class TypeConversions; 73 class TypeConversions;
73 class UnionTypesTest; 74 class UnionTypesTest;
74 class ScrollState; 75 class ScrollState;
75 template <typename NodeType> 76 template <typename NodeType>
76 class StaticNodeTypeList; 77 class StaticNodeTypeList;
77 using StaticNodeList = StaticNodeTypeList<Node>; 78 using StaticNodeList = StaticNodeTypeList<Node>;
78 79
79 class Internals final : public GarbageCollected<Internals>, 80 class Internals final : public GarbageCollected<Internals>,
80 public ScriptWrappable, 81 public ScriptWrappable {
81 public ValueIterable<int> {
82 DEFINE_WRAPPERTYPEINFO(); 82 DEFINE_WRAPPERTYPEINFO();
83 83
84 public: 84 public:
85 static Internals* create(ExecutionContext* context) { 85 static Internals* create(ExecutionContext* context) {
86 return new Internals(context); 86 return new Internals(context);
87 } 87 }
88 88
89 static void resetToConsistentState(Page*); 89 static void resetToConsistentState(Page*);
90 90
91 String elementLayoutTreeAsText(Element*, ExceptionState&); 91 String elementLayoutTreeAsText(Element*, ExceptionState&);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 int visualViewportWidth(); 486 int visualViewportWidth();
487 // The scroll position of the visual viewport relative to the document origin. 487 // The scroll position of the visual viewport relative to the document origin.
488 float visualViewportScrollX(); 488 float visualViewportScrollX();
489 float visualViewportScrollY(); 489 float visualViewportScrollY();
490 490
491 // Return true if the given use counter exists for the given document. 491 // Return true if the given use counter exists for the given document.
492 // |feature| must be one of the values from the UseCounter::Feature enum. 492 // |feature| must be one of the values from the UseCounter::Feature enum.
493 bool isUseCounted(Document*, uint32_t feature); 493 bool isUseCounted(Document*, uint32_t feature);
494 bool isCSSPropertyUseCounted(Document*, const String&); 494 bool isCSSPropertyUseCounted(Document*, const String&);
495 495
496 // Used by the iterable<>.
497 unsigned length() const { return 5; }
498 int anonymousIndexedGetter(uint32_t index) const { return index * index; }
499
496 String unscopableAttribute(); 500 String unscopableAttribute();
497 String unscopableMethod(); 501 String unscopableMethod();
498 502
499 ClientRectList* focusRingRects(Element*); 503 ClientRectList* focusRingRects(Element*);
500 ClientRectList* outlineRects(Element*); 504 ClientRectList* outlineRects(Element*);
501 505
502 void setCapsLockState(bool enabled); 506 void setCapsLockState(bool enabled);
503 507
504 bool setScrollbarVisibilityInScrollableArea(Node*, bool visible); 508 bool setScrollbarVisibilityInScrollableArea(Node*, bool visible);
505 509
(...skipping 28 matching lines...) Expand all
534 LocalFrame* frame() const; 538 LocalFrame* frame() const;
535 Vector<String> iconURLs(Document*, int iconTypesMask) const; 539 Vector<String> iconURLs(Document*, int iconTypesMask) const;
536 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&); 540 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&);
537 541
538 DocumentMarker* markerAt(Node*, 542 DocumentMarker* markerAt(Node*,
539 const String& markerType, 543 const String& markerType,
540 unsigned index, 544 unsigned index,
541 ExceptionState&); 545 ExceptionState&);
542 Member<InternalRuntimeFlags> m_runtimeFlags; 546 Member<InternalRuntimeFlags> m_runtimeFlags;
543 Member<Document> m_document; 547 Member<Document> m_document;
544
545 IterationSource* startIteration(ScriptState*, ExceptionState&) override;
546 }; 548 };
547 549
548 } // namespace blink 550 } // namespace blink
549 551
550 #endif // Internals_h 552 #endif // Internals_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/NodeList.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698