| OLD | NEW |
| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 bool hasContentElement(const Node*, ExceptionState&) const; | 114 bool hasContentElement(const Node*, ExceptionState&) const; |
| 115 size_t countElementShadow(const Node*, ExceptionState&) const; | 115 size_t countElementShadow(const Node*, ExceptionState&) const; |
| 116 const AtomicString& shadowPseudoId(Element*); | 116 const AtomicString& shadowPseudoId(Element*); |
| 117 | 117 |
| 118 // Animation testing. | 118 // Animation testing. |
| 119 void pauseAnimations(double pauseTime, ExceptionState&); | 119 void pauseAnimations(double pauseTime, ExceptionState&); |
| 120 bool isCompositedAnimation(Animation*); | 120 bool isCompositedAnimation(Animation*); |
| 121 void disableCompositedAnimation(Animation*); | 121 void disableCompositedAnimation(Animation*); |
| 122 void disableCSSAdditiveAnimations(); | 122 void disableCSSAdditiveAnimations(); |
| 123 | 123 |
| 124 // Modifies m_desiredFrameStartTime in BitmapImage to advance the next frame t
ime | 124 // Modifies m_desiredFrameStartTime in BitmapImage to advance the next frame |
| 125 // for testing whether animated images work properly. | 125 // time for testing whether animated images work properly. |
| 126 void advanceTimeForImage(Element* image, | 126 void advanceTimeForImage(Element* image, |
| 127 double deltaTimeInSeconds, | 127 double deltaTimeInSeconds, |
| 128 ExceptionState&); | 128 ExceptionState&); |
| 129 | 129 |
| 130 // Advances an animated image. For BitmapImage (e.g., animated gifs) this | 130 // Advances an animated image. For BitmapImage (e.g., animated gifs) this |
| 131 // will advance to the next frame. For SVGImage, this will trigger an | 131 // will advance to the next frame. For SVGImage, this will trigger an |
| 132 // animation update for CSS and advance the SMIL timeline by one frame. | 132 // animation update for CSS and advance the SMIL timeline by one frame. |
| 133 void advanceImageAnimation(Element* image, ExceptionState&); | 133 void advanceImageAnimation(Element* image, ExceptionState&); |
| 134 | 134 |
| 135 bool isValidContentSelect(Element* insertionPoint, ExceptionState&); | 135 bool isValidContentSelect(Element* insertionPoint, ExceptionState&); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 bool executeCommand(Document*, | 265 bool executeCommand(Document*, |
| 266 const String& name, | 266 const String& name, |
| 267 const String& value, | 267 const String& value, |
| 268 ExceptionState&); | 268 ExceptionState&); |
| 269 | 269 |
| 270 AtomicString htmlNamespace(); | 270 AtomicString htmlNamespace(); |
| 271 Vector<AtomicString> htmlTags(); | 271 Vector<AtomicString> htmlTags(); |
| 272 AtomicString svgNamespace(); | 272 AtomicString svgNamespace(); |
| 273 Vector<AtomicString> svgTags(); | 273 Vector<AtomicString> svgTags(); |
| 274 | 274 |
| 275 // This is used to test rect based hit testing like what's done on touch scree
ns. | 275 // This is used to test rect based hit testing like what's done on touch |
| 276 // screens. |
| 276 StaticNodeList* nodesFromRect(Document*, | 277 StaticNodeList* nodesFromRect(Document*, |
| 277 int x, | 278 int x, |
| 278 int y, | 279 int y, |
| 279 unsigned topPadding, | 280 unsigned topPadding, |
| 280 unsigned rightPadding, | 281 unsigned rightPadding, |
| 281 unsigned bottomPadding, | 282 unsigned bottomPadding, |
| 282 unsigned leftPadding, | 283 unsigned leftPadding, |
| 283 bool ignoreClipping, | 284 bool ignoreClipping, |
| 284 bool allowChildFrameContent, | 285 bool allowChildFrameContent, |
| 285 ExceptionState&) const; | 286 ExceptionState&) const; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 unsigned countHitRegions(CanvasRenderingContext*); | 467 unsigned countHitRegions(CanvasRenderingContext*); |
| 467 | 468 |
| 468 bool isInCanvasFontCache(Document*, const String&); | 469 bool isInCanvasFontCache(Document*, const String&); |
| 469 unsigned canvasFontCacheMaxFonts(); | 470 unsigned canvasFontCacheMaxFonts(); |
| 470 | 471 |
| 471 void setScrollChain(ScrollState*, | 472 void setScrollChain(ScrollState*, |
| 472 const HeapVector<Member<Element>>& elements, | 473 const HeapVector<Member<Element>>& elements, |
| 473 ExceptionState&); | 474 ExceptionState&); |
| 474 | 475 |
| 475 // Schedule a forced Blink GC run (Oilpan) at the end of event loop. | 476 // Schedule a forced Blink GC run (Oilpan) at the end of event loop. |
| 476 // Note: This is designed to be only used from PerformanceTests/BlinkGC to exp
licitly measure only Blink GC time. | 477 // Note: This is designed to be only used from PerformanceTests/BlinkGC to |
| 477 // Normal LayoutTests should use gc() instead as it would trigger both B
link GC and V8 GC. | 478 // explicitly measure only Blink GC time. Normal LayoutTests should use |
| 479 // gc() instead as it would trigger both Blink GC and V8 GC. |
| 478 void forceBlinkGCWithoutV8GC(); | 480 void forceBlinkGCWithoutV8GC(); |
| 479 | 481 |
| 480 String selectedHTMLForClipboard(); | 482 String selectedHTMLForClipboard(); |
| 481 String selectedTextForClipboard(); | 483 String selectedTextForClipboard(); |
| 482 | 484 |
| 483 void setVisualViewportOffset(int x, int y); | 485 void setVisualViewportOffset(int x, int y); |
| 484 int visualViewportHeight(); | 486 int visualViewportHeight(); |
| 485 int visualViewportWidth(); | 487 int visualViewportWidth(); |
| 486 // The scroll position of the visual viewport relative to the document origin. | 488 // The scroll position of the visual viewport relative to the document origin. |
| 487 double visualViewportScrollX(); | 489 double visualViewportScrollX(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 504 | 506 |
| 505 // Translate given platform monotonic time in seconds to high resolution | 507 // Translate given platform monotonic time in seconds to high resolution |
| 506 // document time in seconds | 508 // document time in seconds |
| 507 double monotonicTimeToZeroBasedDocumentTime(double, ExceptionState&); | 509 double monotonicTimeToZeroBasedDocumentTime(double, ExceptionState&); |
| 508 | 510 |
| 509 void setMediaElementNetworkState(HTMLMediaElement*, int state); | 511 void setMediaElementNetworkState(HTMLMediaElement*, int state); |
| 510 | 512 |
| 511 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 513 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
| 512 void triggerAutoplayViewportCheck(HTMLMediaElement*); | 514 void triggerAutoplayViewportCheck(HTMLMediaElement*); |
| 513 | 515 |
| 514 // Returns the run state of the node's scroll animator (see ScrollAnimatorComp
ositorCoordinater::RunState), | 516 // Returns the run state of the node's scroll animator (see |
| 515 // or -1 if the node does not have a scrollable area. | 517 // ScrollAnimatorCompositorCoordinater::RunState), or -1 if the node does not |
| 518 // have a scrollable area. |
| 516 String getScrollAnimationState(Node*) const; | 519 String getScrollAnimationState(Node*) const; |
| 517 | 520 |
| 518 // Returns the run state of the node's programmatic scroll animator (see Scrol
lAnimatorCompositorCoordinater::RunState), | 521 // Returns the run state of the node's programmatic scroll animator (see |
| 519 // or -1 if the node does not have a scrollable area. | 522 // ScrollAnimatorCompositorCoordinater::RunState), or -1 if the node does not |
| 523 // have a scrollable area. |
| 520 String getProgrammaticScrollAnimationState(Node*) const; | 524 String getProgrammaticScrollAnimationState(Node*) const; |
| 521 | 525 |
| 522 // Returns the visual rect of a node's LayoutObject. | 526 // Returns the visual rect of a node's LayoutObject. |
| 523 ClientRect* visualRect(Node*); | 527 ClientRect* visualRect(Node*); |
| 524 | 528 |
| 525 // Intentional crash. | 529 // Intentional crash. |
| 526 void crash(); | 530 void crash(); |
| 527 | 531 |
| 528 private: | 532 private: |
| 529 explicit Internals(ScriptState*); | 533 explicit Internals(ScriptState*); |
| 530 Document* contextDocument() const; | 534 Document* contextDocument() const; |
| 531 LocalFrame* frame() const; | 535 LocalFrame* frame() const; |
| 532 Vector<String> iconURLs(Document*, int iconTypesMask) const; | 536 Vector<String> iconURLs(Document*, int iconTypesMask) const; |
| 533 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&); | 537 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&); |
| 534 | 538 |
| 535 DocumentMarker* markerAt(Node*, | 539 DocumentMarker* markerAt(Node*, |
| 536 const String& markerType, | 540 const String& markerType, |
| 537 unsigned index, | 541 unsigned index, |
| 538 ExceptionState&); | 542 ExceptionState&); |
| 539 Member<InternalRuntimeFlags> m_runtimeFlags; | 543 Member<InternalRuntimeFlags> m_runtimeFlags; |
| 540 | 544 |
| 541 IterationSource* startIteration(ScriptState*, ExceptionState&) override; | 545 IterationSource* startIteration(ScriptState*, ExceptionState&) override; |
| 542 }; | 546 }; |
| 543 | 547 |
| 544 } // namespace blink | 548 } // namespace blink |
| 545 | 549 |
| 546 #endif // Internals_h | 550 #endif // Internals_h |
| OLD | NEW |