| Differences between
and this patch
- a/Source/WebCore/ChangeLog +29 lines
Lines 1-5 a/Source/WebCore/ChangeLog_sec1
1
2017-04-27  Chris Dumez  <cdumez@apple.com>
1
2017-04-27  Chris Dumez  <cdumez@apple.com>
2
2
3
        Stop using legacy ClientRect / ClientRectList in Internals
4
        https://bugs.webkit.org/show_bug.cgi?id=171412
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Stop using legacy ClientRect / ClientRectList in Internals and use
9
        DOMRect instead.
10
11
        * dom/DOMRect.idl:
12
        * page/Page.cpp:
13
        (WebCore::Page::nonFastScrollableRects):
14
        (WebCore::Page::touchEventRectsForEvent):
15
        (WebCore::Page::passiveTouchEventListenerRects):
16
        * page/Page.h:
17
        * testing/Internals.cpp:
18
        (WebCore::Internals::absoluteCaretBounds):
19
        (WebCore::Internals::boundingBox):
20
        (WebCore::Internals::inspectorHighlightRects):
21
        (WebCore::Internals::layoutViewportRect):
22
        (WebCore::Internals::visualViewportRect):
23
        (WebCore::Internals::touchEventRectsForEvent):
24
        (WebCore::Internals::passiveTouchEventListenerRects):
25
        (WebCore::Internals::nonFastScrollableRects):
26
        (WebCore::Internals::selectionBounds):
27
        * testing/Internals.h:
28
        * testing/Internals.idl:
29
30
2017-04-27  Chris Dumez  <cdumez@apple.com>
31
3
        Range.getClientRects() / getBoundingClientRect() should return DOMRect types
32
        Range.getClientRects() / getBoundingClientRect() should return DOMRect types
4
        https://bugs.webkit.org/show_bug.cgi?id=171393
33
        https://bugs.webkit.org/show_bug.cgi?id=171393
5
34
- a/Source/WebCore/dom/DOMRect.idl +1 lines
Lines 28-33 a/Source/WebCore/dom/DOMRect.idl_sec1
28
[
28
[
29
    Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
29
    Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0,
30
        optional unrestricted double width = 0, optional unrestricted double height = 0),
30
        optional unrestricted double width = 0, optional unrestricted double height = 0),
31
    ExportMacro=WEBCORE_EXPORT,
31
    Exposed=(Window,Worker),
32
    Exposed=(Window,Worker),
32
    ImplementationLacksVTable
33
    ImplementationLacksVTable
33
]
34
]
- a/Source/WebCore/page/Page.cpp -7 / +7 lines
Lines 28-37 a/Source/WebCore/page/Page.cpp_sec1
28
#include "CSSAnimationController.h"
28
#include "CSSAnimationController.h"
29
#include "Chrome.h"
29
#include "Chrome.h"
30
#include "ChromeClient.h"
30
#include "ChromeClient.h"
31
#include "ClientRectList.h"
32
#include "ConstantPropertyMap.h"
31
#include "ConstantPropertyMap.h"
33
#include "ContextMenuClient.h"
32
#include "ContextMenuClient.h"
34
#include "ContextMenuController.h"
33
#include "ContextMenuController.h"
34
#include "DOMRect.h"
35
#include "DatabaseProvider.h"
35
#include "DatabaseProvider.h"
36
#include "DiagnosticLoggingClient.h"
36
#include "DiagnosticLoggingClient.h"
37
#include "DiagnosticLoggingKeys.h"
37
#include "DiagnosticLoggingKeys.h"
Lines 405-411 String Page::synchronousScrollingReasonsAsText() a/Source/WebCore/page/Page.cpp_sec2
405
    return String();
405
    return String();
406
}
406
}
407
407
408
Ref<ClientRectList> Page::nonFastScrollableRects()
408
Vector<Ref<DOMRect>> Page::nonFastScrollableRects()
409
{
409
{
410
    if (Document* document = m_mainFrame->document())
410
    if (Document* document = m_mainFrame->document())
411
        document->updateLayout();
411
        document->updateLayout();
Lines 421-430 Ref<ClientRectList> Page::nonFastScrollableRects() a/Source/WebCore/page/Page.cpp_sec3
421
    for (size_t i = 0; i < rects.size(); ++i)
421
    for (size_t i = 0; i < rects.size(); ++i)
422
        quads[i] = FloatRect(rects[i]);
422
        quads[i] = FloatRect(rects[i]);
423
423
424
    return ClientRectList::create(quads);
424
    return DOMRect::createVector(quads);
425
}
425
}
426
426
427
Ref<ClientRectList> Page::touchEventRectsForEvent(const String& eventName)
427
Vector<Ref<DOMRect>> Page::touchEventRectsForEvent(const String& eventName)
428
{
428
{
429
    if (Document* document = m_mainFrame->document()) {
429
    if (Document* document = m_mainFrame->document()) {
430
        document->updateLayout();
430
        document->updateLayout();
Lines 444-453 Ref<ClientRectList> Page::touchEventRectsForEvent(const String& eventName) a/Source/WebCore/page/Page.cpp_sec4
444
    for (size_t i = 0; i < rects.size(); ++i)
444
    for (size_t i = 0; i < rects.size(); ++i)
445
        quads[i] = FloatRect(rects[i]);
445
        quads[i] = FloatRect(rects[i]);
446
446
447
    return ClientRectList::create(quads);
447
    return DOMRect::createVector(quads);
448
}
448
}
449
449
450
Ref<ClientRectList> Page::passiveTouchEventListenerRects()
450
Vector<Ref<DOMRect>> Page::passiveTouchEventListenerRects()
451
{
451
{
452
    if (Document* document = m_mainFrame->document()) {
452
    if (Document* document = m_mainFrame->document()) {
453
        document->updateLayout();
453
        document->updateLayout();
Lines 464-470 Ref<ClientRectList> Page::passiveTouchEventListenerRects() a/Source/WebCore/page/Page.cpp_sec5
464
    for (size_t i = 0; i < rects.size(); ++i)
464
    for (size_t i = 0; i < rects.size(); ++i)
465
        quads[i] = FloatRect(rects[i]);
465
        quads[i] = FloatRect(rects[i]);
466
466
467
    return ClientRectList::create(quads);
467
    return DOMRect::createVector(quads);
468
}
468
}
469
469
470
#if ENABLE(VIEW_MODE_CSS_MEDIA)
470
#if ENABLE(VIEW_MODE_CSS_MEDIA)
- a/Source/WebCore/page/Page.h -4 / +4 lines
Lines 81-90 class BackForwardController; a/Source/WebCore/page/Page.h_sec1
81
class BackForwardClient;
81
class BackForwardClient;
82
class Chrome;
82
class Chrome;
83
class ChromeClient;
83
class ChromeClient;
84
class ClientRectList;
85
class Color;
84
class Color;
86
class ContextMenuClient;
85
class ContextMenuClient;
87
class ContextMenuController;
86
class ContextMenuController;
87
class DOMRect;
88
class DatabaseProvider;
88
class DatabaseProvider;
89
class DiagnosticLoggingClient;
89
class DiagnosticLoggingClient;
90
class DragCaretController;
90
class DragCaretController;
Lines 239-248 public: a/Source/WebCore/page/Page.h_sec2
239
239
240
    WEBCORE_EXPORT String scrollingStateTreeAsText();
240
    WEBCORE_EXPORT String scrollingStateTreeAsText();
241
    WEBCORE_EXPORT String synchronousScrollingReasonsAsText();
241
    WEBCORE_EXPORT String synchronousScrollingReasonsAsText();
242
    WEBCORE_EXPORT Ref<ClientRectList> nonFastScrollableRects();
242
    WEBCORE_EXPORT Vector<Ref<DOMRect>> nonFastScrollableRects();
243
243
244
    WEBCORE_EXPORT Ref<ClientRectList> touchEventRectsForEvent(const String& eventName);
244
    WEBCORE_EXPORT Vector<Ref<DOMRect>> touchEventRectsForEvent(const String& eventName);
245
    WEBCORE_EXPORT Ref<ClientRectList> passiveTouchEventListenerRects();
245
    WEBCORE_EXPORT Vector<Ref<DOMRect>> passiveTouchEventListenerRects();
246
246
247
    Settings& settings() const { return *m_settings; }
247
    Settings& settings() const { return *m_settings; }
248
    ProgressTracker& progress() const { return *m_progress; }
248
    ProgressTracker& progress() const { return *m_progress; }
- a/Source/WebCore/testing/Internals.cpp -20 / +19 lines
Lines 40-50 a/Source/WebCore/testing/Internals.cpp_sec1
40
#include "CSSSupportsRule.h"
40
#include "CSSSupportsRule.h"
41
#include "CachedImage.h"
41
#include "CachedImage.h"
42
#include "CachedResourceLoader.h"
42
#include "CachedResourceLoader.h"
43
#include "ClientRect.h"
44
#include "ClientRectList.h"
45
#include "ComposedTreeIterator.h"
43
#include "ComposedTreeIterator.h"
46
#include "Cursor.h"
44
#include "Cursor.h"
47
#include "DOMPath.h"
45
#include "DOMPath.h"
46
#include "DOMRect.h"
48
#include "DOMStringList.h"
47
#include "DOMStringList.h"
49
#include "DOMWindow.h"
48
#include "DOMWindow.h"
50
#include "DisplayList.h"
49
#include "DisplayList.h"
Lines 1328-1352 void Internals::setMockMediaCaptureDevicesEnabled(bool enabled) a/Source/WebCore/testing/Internals.cpp_sec2
1328
1327
1329
#endif
1328
#endif
1330
1329
1331
ExceptionOr<Ref<ClientRect>> Internals::absoluteCaretBounds()
1330
ExceptionOr<Ref<DOMRect>> Internals::absoluteCaretBounds()
1332
{
1331
{
1333
    Document* document = contextDocument();
1332
    Document* document = contextDocument();
1334
    if (!document || !document->frame())
1333
    if (!document || !document->frame())
1335
        return Exception { INVALID_ACCESS_ERR };
1334
        return Exception { INVALID_ACCESS_ERR };
1336
1335
1337
    return ClientRect::create(document->frame()->selection().absoluteCaretBounds());
1336
    return DOMRect::create(document->frame()->selection().absoluteCaretBounds());
1338
}
1337
}
1339
1338
1340
Ref<ClientRect> Internals::boundingBox(Element& element)
1339
Ref<DOMRect> Internals::boundingBox(Element& element)
1341
{
1340
{
1342
    element.document().updateLayoutIgnorePendingStylesheets();
1341
    element.document().updateLayoutIgnorePendingStylesheets();
1343
    auto renderer = element.renderer();
1342
    auto renderer = element.renderer();
1344
    if (!renderer)
1343
    if (!renderer)
1345
        return ClientRect::create();
1344
        return DOMRect::create();
1346
    return ClientRect::create(renderer->absoluteBoundingBoxRectIgnoringTransforms());
1345
    return DOMRect::create(renderer->absoluteBoundingBoxRectIgnoringTransforms());
1347
}
1346
}
1348
1347
1349
ExceptionOr<Ref<ClientRectList>> Internals::inspectorHighlightRects()
1348
ExceptionOr<Vector<Ref<DOMRect>>> Internals::inspectorHighlightRects()
1350
{
1349
{
1351
    Document* document = contextDocument();
1350
    Document* document = contextDocument();
1352
    if (!document || !document->page())
1351
    if (!document || !document->page())
Lines 1354-1360 ExceptionOr<Ref<ClientRectList>> Internals::inspectorHighlightRects() a/Source/WebCore/testing/Internals.cpp_sec3
1354
1353
1355
    Highlight highlight;
1354
    Highlight highlight;
1356
    document->page()->inspectorController().getHighlight(highlight, InspectorOverlay::CoordinateSystem::View);
1355
    document->page()->inspectorController().getHighlight(highlight, InspectorOverlay::CoordinateSystem::View);
1357
    return ClientRectList::create(highlight.quads);
1356
    return DOMRect::createVector(highlight.quads);
1358
}
1357
}
1359
1358
1360
ExceptionOr<String> Internals::inspectorHighlightObject()
1359
ExceptionOr<String> Internals::inspectorHighlightObject()
Lines 1496-1502 ExceptionOr<void> Internals::setScrollViewPosition(int x, int y) a/Source/WebCore/testing/Internals.cpp_sec4
1496
    return { };
1495
    return { };
1497
}
1496
}
1498
1497
1499
ExceptionOr<Ref<ClientRect>> Internals::layoutViewportRect()
1498
ExceptionOr<Ref<DOMRect>> Internals::layoutViewportRect()
1500
{
1499
{
1501
    Document* document = contextDocument();
1500
    Document* document = contextDocument();
1502
    if (!document || !document->frame())
1501
    if (!document || !document->frame())
Lines 1505-1514 ExceptionOr<Ref<ClientRect>> Internals::layoutViewportRect() a/Source/WebCore/testing/Internals.cpp_sec5
1505
    document->updateLayoutIgnorePendingStylesheets();
1504
    document->updateLayoutIgnorePendingStylesheets();
1506
1505
1507
    auto& frameView = *document->view();
1506
    auto& frameView = *document->view();
1508
    return ClientRect::create(frameView.layoutViewportRect());
1507
    return DOMRect::create(frameView.layoutViewportRect());
1509
}
1508
}
1510
1509
1511
ExceptionOr<Ref<ClientRect>> Internals::visualViewportRect()
1510
ExceptionOr<Ref<DOMRect>> Internals::visualViewportRect()
1512
{
1511
{
1513
    Document* document = contextDocument();
1512
    Document* document = contextDocument();
1514
    if (!document || !document->frame())
1513
    if (!document || !document->frame())
Lines 1517-1523 ExceptionOr<Ref<ClientRect>> Internals::visualViewportRect() a/Source/WebCore/testing/Internals.cpp_sec6
1517
    document->updateLayoutIgnorePendingStylesheets();
1516
    document->updateLayoutIgnorePendingStylesheets();
1518
1517
1519
    auto& frameView = *document->view();
1518
    auto& frameView = *document->view();
1520
    return ClientRect::create(frameView.visualViewportRect());
1519
    return DOMRect::create(frameView.visualViewportRect());
1521
}
1520
}
1522
1521
1523
ExceptionOr<void> Internals::setViewBaseBackgroundColor(const String& colorValue)
1522
ExceptionOr<void> Internals::setViewBaseBackgroundColor(const String& colorValue)
Lines 1790-1796 ExceptionOr<unsigned> Internals::touchEventHandlerCount() a/Source/WebCore/testing/Internals.cpp_sec7
1790
    return document->touchEventHandlerCount();
1789
    return document->touchEventHandlerCount();
1791
}
1790
}
1792
1791
1793
ExceptionOr<Ref<ClientRectList>> Internals::touchEventRectsForEvent(const String& eventName)
1792
ExceptionOr<Vector<Ref<DOMRect>>> Internals::touchEventRectsForEvent(const String& eventName)
1794
{
1793
{
1795
    Document* document = contextDocument();
1794
    Document* document = contextDocument();
1796
    if (!document || !document->page())
1795
    if (!document || !document->page())
Lines 1799-1805 ExceptionOr<Ref<ClientRectList>> Internals::touchEventRectsForEvent(const String a/Source/WebCore/testing/Internals.cpp_sec8
1799
    return document->page()->touchEventRectsForEvent(eventName);
1798
    return document->page()->touchEventRectsForEvent(eventName);
1800
}
1799
}
1801
1800
1802
ExceptionOr<Ref<ClientRectList>> Internals::passiveTouchEventListenerRects()
1801
ExceptionOr<Vector<Ref<DOMRect>>> Internals::passiveTouchEventListenerRects()
1803
{
1802
{
1804
    Document* document = contextDocument();
1803
    Document* document = contextDocument();
1805
    if (!document || !document->page())
1804
    if (!document || !document->page())
Lines 2321-2327 ExceptionOr<String> Internals::mainThreadScrollingReasons() const a/Source/WebCore/testing/Internals.cpp_sec9
2321
    return page->synchronousScrollingReasonsAsText();
2320
    return page->synchronousScrollingReasonsAsText();
2322
}
2321
}
2323
2322
2324
ExceptionOr<RefPtr<ClientRectList>> Internals::nonFastScrollableRects() const
2323
ExceptionOr<Vector<Ref<DOMRect>>> Internals::nonFastScrollableRects() const
2325
{
2324
{
2326
    Document* document = contextDocument();
2325
    Document* document = contextDocument();
2327
    if (!document || !document->frame())
2326
    if (!document || !document->frame())
Lines 2329-2337 ExceptionOr<RefPtr<ClientRectList>> Internals::nonFastScrollableRects() const a/Source/WebCore/testing/Internals.cpp_sec10
2329
2328
2330
    Page* page = document->page();
2329
    Page* page = document->page();
2331
    if (!page)
2330
    if (!page)
2332
        return nullptr;
2331
        return Vector<Ref<DOMRect>> { };
2333
2332
2334
    return RefPtr<ClientRectList> { page->nonFastScrollableRects() };
2333
    return page->nonFastScrollableRects();
2335
}
2334
}
2336
2335
2337
ExceptionOr<void> Internals::setElementUsesDisplayListDrawing(Element& element, bool usesDisplayListDrawing)
2336
ExceptionOr<void> Internals::setElementUsesDisplayListDrawing(Element& element, bool usesDisplayListDrawing)
Lines 3122-3134 double Internals::closestTimeToTimeRanges(double time, TimeRanges& ranges) a/Source/WebCore/testing/Internals.cpp_sec11
3122
3121
3123
#endif
3122
#endif
3124
3123
3125
ExceptionOr<Ref<ClientRect>> Internals::selectionBounds()
3124
ExceptionOr<Ref<DOMRect>> Internals::selectionBounds()
3126
{
3125
{
3127
    Document* document = contextDocument();
3126
    Document* document = contextDocument();
3128
    if (!document || !document->frame())
3127
    if (!document || !document->frame())
3129
        return Exception { INVALID_ACCESS_ERR };
3128
        return Exception { INVALID_ACCESS_ERR };
3130
3129
3131
    return ClientRect::create(document->frame()->selection().selectionBounds());
3130
    return DOMRect::create(document->frame()->selection().selectionBounds());
3132
}
3131
}
3133
3132
3134
#if ENABLE(VIBRATION)
3133
#if ENABLE(VIBRATION)
- a/Source/WebCore/testing/Internals.h -11 / +10 lines
Lines 42-49 a/Source/WebCore/testing/Internals.h_sec1
42
namespace WebCore {
42
namespace WebCore {
43
43
44
class AudioContext;
44
class AudioContext;
45
class ClientRect;
45
class DOMRect;
46
class ClientRectList;
47
class DOMURL;
46
class DOMURL;
48
class DOMWindow;
47
class DOMWindow;
49
class Document;
48
class Document;
Lines 179-189 public: a/Source/WebCore/testing/Internals.h_sec2
179
    ExceptionOr<Vector<String>> formControlStateOfPreviousHistoryItem();
178
    ExceptionOr<Vector<String>> formControlStateOfPreviousHistoryItem();
180
    ExceptionOr<void> setFormControlStateOfPreviousHistoryItem(const Vector<String>&);
179
    ExceptionOr<void> setFormControlStateOfPreviousHistoryItem(const Vector<String>&);
181
180
182
    ExceptionOr<Ref<ClientRect>> absoluteCaretBounds();
181
    ExceptionOr<Ref<DOMRect>> absoluteCaretBounds();
183
182
184
    Ref<ClientRect> boundingBox(Element&);
183
    Ref<DOMRect> boundingBox(Element&);
185
184
186
    ExceptionOr<Ref<ClientRectList>> inspectorHighlightRects();
185
    ExceptionOr<Vector<Ref<DOMRect>>> inspectorHighlightRects();
187
    ExceptionOr<String> inspectorHighlightObject();
186
    ExceptionOr<String> inspectorHighlightObject();
188
187
189
    ExceptionOr<unsigned> markerCountForNode(Node&, const String&);
188
    ExceptionOr<unsigned> markerCountForNode(Node&, const String&);
Lines 200-207 public: a/Source/WebCore/testing/Internals.h_sec3
200
199
201
    ExceptionOr<void> setScrollViewPosition(int x, int y);
200
    ExceptionOr<void> setScrollViewPosition(int x, int y);
202
201
203
    ExceptionOr<Ref<ClientRect>> layoutViewportRect();
202
    ExceptionOr<Ref<DOMRect>> layoutViewportRect();
204
    ExceptionOr<Ref<ClientRect>> visualViewportRect();
203
    ExceptionOr<Ref<DOMRect>> visualViewportRect();
205
204
206
    ExceptionOr<void> setViewBaseBackgroundColor(const String& colorValue);
205
    ExceptionOr<void> setViewBaseBackgroundColor(const String& colorValue);
207
206
Lines 243-250 public: a/Source/WebCore/testing/Internals.h_sec4
243
    ExceptionOr<unsigned> wheelEventHandlerCount();
242
    ExceptionOr<unsigned> wheelEventHandlerCount();
244
    ExceptionOr<unsigned> touchEventHandlerCount();
243
    ExceptionOr<unsigned> touchEventHandlerCount();
245
244
246
    ExceptionOr<Ref<ClientRectList>> touchEventRectsForEvent(const String&);
245
    ExceptionOr<Vector<Ref<DOMRect>>> touchEventRectsForEvent(const String&);
247
    ExceptionOr<Ref<ClientRectList>> passiveTouchEventListenerRects();
246
    ExceptionOr<Vector<Ref<DOMRect>>> passiveTouchEventListenerRects();
248
247
249
    ExceptionOr<RefPtr<NodeList>> nodesFromRect(Document&, int x, int y, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent) const;
248
    ExceptionOr<RefPtr<NodeList>> nodesFromRect(Document&, int x, int y, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent) const;
250
249
Lines 298-304 public: a/Source/WebCore/testing/Internals.h_sec5
298
    ExceptionOr<String> repaintRectsAsText() const;
297
    ExceptionOr<String> repaintRectsAsText() const;
299
    ExceptionOr<String> scrollingStateTreeAsText() const;
298
    ExceptionOr<String> scrollingStateTreeAsText() const;
300
    ExceptionOr<String> mainThreadScrollingReasons() const;
299
    ExceptionOr<String> mainThreadScrollingReasons() const;
301
    ExceptionOr<RefPtr<ClientRectList>> nonFastScrollableRects() const;
300
    ExceptionOr<Vector<Ref<DOMRect>>> nonFastScrollableRects() const;
302
301
303
    ExceptionOr<void> setElementUsesDisplayListDrawing(Element&, bool usesDisplayListDrawing);
302
    ExceptionOr<void> setElementUsesDisplayListDrawing(Element&, bool usesDisplayListDrawing);
304
    ExceptionOr<void> setElementTracksDisplayListReplay(Element&, bool isTrackingReplay);
303
    ExceptionOr<void> setElementTracksDisplayListReplay(Element&, bool isTrackingReplay);
Lines 449-455 public: a/Source/WebCore/testing/Internals.h_sec6
449
    double closestTimeToTimeRanges(double time, TimeRanges&);
448
    double closestTimeToTimeRanges(double time, TimeRanges&);
450
#endif
449
#endif
451
450
452
    ExceptionOr<Ref<ClientRect>> selectionBounds();
451
    ExceptionOr<Ref<DOMRect>> selectionBounds();
453
452
454
#if ENABLE(VIBRATION)
453
#if ENABLE(VIBRATION)
455
    bool isVibrating();
454
    bool isVibrating();
- a/Source/WebCore/testing/Internals.idl -9 / +9 lines
Lines 148-158 enum EventThrottlingBehavior { a/Source/WebCore/testing/Internals.idl_sec1
148
    [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
148
    [MayThrowException] sequence<DOMString> formControlStateOfPreviousHistoryItem();
149
    [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
149
    [MayThrowException] void setFormControlStateOfPreviousHistoryItem(sequence<DOMString> values);
150
150
151
    [MayThrowException] ClientRect absoluteCaretBounds();
151
    [MayThrowException] DOMRect absoluteCaretBounds();
152
152
153
    ClientRect boundingBox(Element element);
153
    DOMRect boundingBox(Element element);
154
154
155
    [MayThrowException] ClientRectList inspectorHighlightRects();
155
    [MayThrowException] sequence<DOMRect> inspectorHighlightRects();
156
    [MayThrowException] DOMString inspectorHighlightObject();
156
    [MayThrowException] DOMString inspectorHighlightObject();
157
157
158
    [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
158
    [MayThrowException] unsigned long markerCountForNode(Node node, DOMString markerType);
Lines 167-174 enum EventThrottlingBehavior { a/Source/WebCore/testing/Internals.idl_sec2
167
167
168
    [MayThrowException] void setScrollViewPosition(long x, long y);
168
    [MayThrowException] void setScrollViewPosition(long x, long y);
169
169
170
    [MayThrowException] ClientRect layoutViewportRect();
170
    [MayThrowException] DOMRect layoutViewportRect();
171
    [MayThrowException] ClientRect visualViewportRect();
171
    [MayThrowException] DOMRect visualViewportRect();
172
172
173
    [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
173
    [MayThrowException] void setViewBaseBackgroundColor(DOMString colorValue);
174
174
Lines 215-222 enum EventThrottlingBehavior { a/Source/WebCore/testing/Internals.idl_sec3
215
    [MayThrowException] unsigned long wheelEventHandlerCount();
215
    [MayThrowException] unsigned long wheelEventHandlerCount();
216
    [MayThrowException] unsigned long touchEventHandlerCount();
216
    [MayThrowException] unsigned long touchEventHandlerCount();
217
217
218
    [MayThrowException] ClientRectList touchEventRectsForEvent(DOMString eventName);
218
    [MayThrowException] sequence<DOMRect> touchEventRectsForEvent(DOMString eventName);
219
    [MayThrowException] ClientRectList passiveTouchEventListenerRects();
219
    [MayThrowException] sequence<DOMRect> passiveTouchEventListenerRects();
220
220
221
    [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
221
    [MayThrowException] NodeList? nodesFromRect(Document document, long x, long y,
222
        unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
222
        unsigned long topPadding, unsigned long rightPadding, unsigned long bottomPadding, unsigned long leftPadding,
Lines 273-279 enum EventThrottlingBehavior { a/Source/WebCore/testing/Internals.idl_sec4
273
273
274
    [MayThrowException] DOMString scrollingStateTreeAsText();
274
    [MayThrowException] DOMString scrollingStateTreeAsText();
275
    [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
275
    [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons().
276
    [MayThrowException] ClientRectList? nonFastScrollableRects();
276
    [MayThrowException] sequence<DOMRect> nonFastScrollableRects();
277
277
278
    [MayThrowException] DOMString repaintRectsAsText();
278
    [MayThrowException] DOMString repaintRectsAsText();
279
279
Lines 432-438 enum EventThrottlingBehavior { a/Source/WebCore/testing/Internals.idl_sec5
432
    [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
432
    [MayThrowException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
433
    boolean isPluginSnapshotted(Element element);
433
    boolean isPluginSnapshotted(Element element);
434
434
435
    [MayThrowException] ClientRect selectionBounds();
435
    [MayThrowException] DOMRect selectionBounds();
436
436
437
    [Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
437
    [Conditional=MEDIA_SOURCE] void initializeMockMediaSource();
438
    [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
438
    [Conditional=MEDIA_SOURCE] sequence<DOMString> bufferedSamplesForTrackID(SourceBuffer buffer, DOMString trackID);
- a/LayoutTests/ChangeLog +22 lines
Lines 1-5 a/LayoutTests/ChangeLog_sec1
1
2017-04-27  Chris Dumez  <cdumez@apple.com>
1
2017-04-27  Chris Dumez  <cdumez@apple.com>
2
2
3
        Stop using legacy ClientRect / ClientRectList in Internals
4
        https://bugs.webkit.org/show_bug.cgi?id=171412
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Rebaseline existing tests as DOMRect has more properties than ClientRect.
9
10
        * fast/visual-viewport/nonzoomed-rects-expected.txt:
11
        * fast/visual-viewport/rtl-nonzoomed-rects-expected.txt:
12
        * fast/visual-viewport/rtl-zoomed-rects-expected.txt:
13
        * fast/visual-viewport/rubberbanding-viewport-rects-expected.txt:
14
        * fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:
15
        * fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt:
16
        * fast/visual-viewport/zoomed-fixed-expected.txt:
17
        * fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
18
        * fast/visual-viewport/zoomed-rects-expected.txt:
19
        * inspector/dom/hideHighlight-expected.txt:
20
        * inspector/dom/highlightQuad-expected.txt:
21
        * inspector/dom/highlightRect-expected.txt:
22
23
2017-04-27  Chris Dumez  <cdumez@apple.com>
24
3
        Range.getClientRects() / getBoundingClientRect() should return DOMRect types
25
        Range.getClientRects() / getBoundingClientRect() should return DOMRect types
4
        https://bugs.webkit.org/show_bug.cgi?id=171393
26
        https://bugs.webkit.org/show_bug.cgi?id=171393
5
27
- a/LayoutTests/fast/visual-viewport/nonzoomed-rects-expected.txt -8 / +8 lines
Lines 3-22 This test scrolls the page and checks that the layout and visual viewports respo a/LayoutTests/fast/visual-viewport/nonzoomed-rects-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
JSON.stringify(internals.layoutViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
6
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
7
JSON.stringify(internals.visualViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
7
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
8
8
9
Scrolled to 475, 525
9
Scrolled to 475, 525
10
JSON.stringify(internals.layoutViewportRect()) is {"top":525,"right":1260,"bottom":1110,"left":475,"width":785,"height":585}
10
JSON.stringify(internals.layoutViewportRect()) is {"x":475,"y":525,"width":785,"height":585,"top":525,"right":1260,"bottom":1110,"left":475}
11
JSON.stringify(internals.visualViewportRect()) is {"top":525,"right":1260,"bottom":1110,"left":475,"width":785,"height":585}
11
JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":525,"width":785,"height":585,"top":525,"right":1260,"bottom":1110,"left":475}
12
12
13
Scrolled to 100, 776
13
Scrolled to 100, 776
14
JSON.stringify(internals.layoutViewportRect()) is {"top":776,"right":885,"bottom":1361,"left":100,"width":785,"height":585}
14
JSON.stringify(internals.layoutViewportRect()) is {"x":100,"y":776,"width":785,"height":585,"top":776,"right":885,"bottom":1361,"left":100}
15
JSON.stringify(internals.visualViewportRect()) is {"top":776,"right":885,"bottom":1361,"left":100,"width":785,"height":585}
15
JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":776,"width":785,"height":585,"top":776,"right":885,"bottom":1361,"left":100}
16
16
17
Scrolled to 50, 300
17
Scrolled to 50, 300
18
JSON.stringify(internals.layoutViewportRect()) is {"top":300,"right":835,"bottom":885,"left":50,"width":785,"height":585}
18
JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":300,"width":785,"height":585,"top":300,"right":835,"bottom":885,"left":50}
19
JSON.stringify(internals.visualViewportRect()) is {"top":300,"right":835,"bottom":885,"left":50,"width":785,"height":585}
19
JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":300,"width":785,"height":585,"top":300,"right":835,"bottom":885,"left":50}
20
PASS successfullyParsed is true
20
PASS successfullyParsed is true
21
21
22
TEST COMPLETE
22
TEST COMPLETE
- a/LayoutTests/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt -8 / +8 lines
Lines 3-22 This test scrolls the page and checks that the layout and visual viewports respo a/LayoutTests/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
JSON.stringify(internals.layoutViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
6
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
7
JSON.stringify(internals.visualViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
7
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
8
8
9
Scrolled to -475, 525
9
Scrolled to -475, 525
10
JSON.stringify(internals.layoutViewportRect()) is {"top":525,"right":310,"bottom":1110,"left":-475,"width":785,"height":585}
10
JSON.stringify(internals.layoutViewportRect()) is {"x":-475,"y":525,"width":785,"height":585,"top":525,"right":310,"bottom":1110,"left":-475}
11
JSON.stringify(internals.visualViewportRect()) is {"top":525,"right":310,"bottom":1110,"left":-475,"width":785,"height":585}
11
JSON.stringify(internals.visualViewportRect()) is {"x":-475,"y":525,"width":785,"height":585,"top":525,"right":310,"bottom":1110,"left":-475}
12
12
13
Scrolled to -100, 776
13
Scrolled to -100, 776
14
JSON.stringify(internals.layoutViewportRect()) is {"top":776,"right":685,"bottom":1361,"left":-100,"width":785,"height":585}
14
JSON.stringify(internals.layoutViewportRect()) is {"x":-100,"y":776,"width":785,"height":585,"top":776,"right":685,"bottom":1361,"left":-100}
15
JSON.stringify(internals.visualViewportRect()) is {"top":776,"right":685,"bottom":1361,"left":-100,"width":785,"height":585}
15
JSON.stringify(internals.visualViewportRect()) is {"x":-100,"y":776,"width":785,"height":585,"top":776,"right":685,"bottom":1361,"left":-100}
16
16
17
Scrolled to -50, 300
17
Scrolled to -50, 300
18
JSON.stringify(internals.layoutViewportRect()) is {"top":300,"right":735,"bottom":885,"left":-50,"width":785,"height":585}
18
JSON.stringify(internals.layoutViewportRect()) is {"x":-50,"y":300,"width":785,"height":585,"top":300,"right":735,"bottom":885,"left":-50}
19
JSON.stringify(internals.visualViewportRect()) is {"top":300,"right":735,"bottom":885,"left":-50,"width":785,"height":585}
19
JSON.stringify(internals.visualViewportRect()) is {"x":-50,"y":300,"width":785,"height":585,"top":300,"right":735,"bottom":885,"left":-50}
20
PASS successfullyParsed is true
20
PASS successfullyParsed is true
21
21
22
TEST COMPLETE
22
TEST COMPLETE
- a/LayoutTests/fast/visual-viewport/rtl-zoomed-rects-expected.txt -8 / +8 lines
Lines 3-22 This test zooms and scrolls the page and checks that the layout and visual viewp a/LayoutTests/fast/visual-viewport/rtl-zoomed-rects-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
JSON.stringify(internals.layoutViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
6
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
7
JSON.stringify(internals.visualViewportRect()) is {"top":0,"right":392.5,"bottom":292.5,"left":0,"width":392.5,"height":292.5}
7
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":392.5,"height":292.5,"top":0,"right":392.5,"bottom":292.5,"left":0}
8
8
9
Scrolled to -475, 525
9
Scrolled to -475, 525
10
JSON.stringify(internals.layoutViewportRect()) is {"top":232.5,"right":310,"bottom":817.5,"left":-475,"width":785,"height":585}
10
JSON.stringify(internals.layoutViewportRect()) is {"x":-475,"y":232.5,"width":785,"height":585,"top":232.5,"right":310,"bottom":817.5,"left":-475}
11
JSON.stringify(internals.visualViewportRect()) is {"top":525,"right":-82.5,"bottom":817.5,"left":-475,"width":392.5,"height":292.5}
11
JSON.stringify(internals.visualViewportRect()) is {"x":-475,"y":525,"width":392.5,"height":292.5,"top":525,"right":-82.5,"bottom":817.5,"left":-475}
12
12
13
Scrolled to -100, 776
13
Scrolled to -100, 776
14
JSON.stringify(internals.layoutViewportRect()) is {"top":483.5,"right":310,"bottom":1068.5,"left":-475,"width":785,"height":585}
14
JSON.stringify(internals.layoutViewportRect()) is {"x":-475,"y":483.5,"width":785,"height":585,"top":483.5,"right":310,"bottom":1068.5,"left":-475}
15
JSON.stringify(internals.visualViewportRect()) is {"top":776,"right":292.5,"bottom":1068.5,"left":-100,"width":392.5,"height":292.5}
15
JSON.stringify(internals.visualViewportRect()) is {"x":-100,"y":776,"width":392.5,"height":292.5,"top":776,"right":292.5,"bottom":1068.5,"left":-100}
16
16
17
Scrolled to -50, 300
17
Scrolled to -50, 300
18
JSON.stringify(internals.layoutViewportRect()) is {"top":300,"right":342.5,"bottom":885,"left":-442.5,"width":785,"height":585}
18
JSON.stringify(internals.layoutViewportRect()) is {"x":-442.5,"y":300,"width":785,"height":585,"top":300,"right":342.5,"bottom":885,"left":-442.5}
19
JSON.stringify(internals.visualViewportRect()) is {"top":300,"right":342.5,"bottom":592.5,"left":-50,"width":392.5,"height":292.5}
19
JSON.stringify(internals.visualViewportRect()) is {"x":-50,"y":300,"width":392.5,"height":292.5,"top":300,"right":342.5,"bottom":592.5,"left":-50}
20
PASS successfullyParsed is true
20
PASS successfullyParsed is true
21
21
22
TEST COMPLETE
22
TEST COMPLETE
- a/LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt -6 / +6 lines
Lines 4-19 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt_sec1
4
4
5
5
6
Scrolled to -123, -234
6
Scrolled to -123, -234
7
JSON.stringify(layoutViewport) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
7
JSON.stringify(layoutViewport) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
8
JSON.stringify(visualViewport) is {"top":-234,"right":662,"bottom":351,"left":-123,"width":785,"height":585}
8
JSON.stringify(visualViewport) is {"x":-123,"y":-234,"width":785,"height":585,"top":-234,"right":662,"bottom":351,"left":-123}
9
9
10
Scrolled to 475, 525
10
Scrolled to 475, 525
11
JSON.stringify(layoutViewport) is {"top":525,"right":1260,"bottom":1110,"left":475,"width":785,"height":585}
11
JSON.stringify(layoutViewport) is {"x":475,"y":525,"width":785,"height":585,"top":525,"right":1260,"bottom":1110,"left":475}
12
JSON.stringify(visualViewport) is {"top":525,"right":1260,"bottom":1110,"left":475,"width":785,"height":585}
12
JSON.stringify(visualViewport) is {"x":475,"y":525,"width":785,"height":585,"top":525,"right":1260,"bottom":1110,"left":475}
13
13
14
Scrolled to 1800, 1850
14
Scrolled to 1800, 1850
15
JSON.stringify(layoutViewport) is {"top":1695,"right":2008,"bottom":2280,"left":1223,"width":785,"height":585}
15
JSON.stringify(layoutViewport) is {"x":1223,"y":1695,"width":785,"height":585,"top":1695,"right":2008,"bottom":2280,"left":1223}
16
JSON.stringify(visualViewport) is {"top":1850,"right":2585,"bottom":2435,"left":1800,"width":785,"height":585}
16
JSON.stringify(visualViewport) is {"x":1800,"y":1850,"width":785,"height":585,"top":1850,"right":2585,"bottom":2435,"left":1800}
17
PASS successfullyParsed is true
17
PASS successfullyParsed is true
18
18
19
TEST COMPLETE
19
TEST COMPLETE
- a/LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt -6 / +6 lines
Lines 4-19 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt_sec1
4
4
5
5
6
Scrolled to -123, -234
6
Scrolled to -123, -234
7
JSON.stringify(layoutViewport) is {"top":-234,"right":662,"bottom":351,"left":-123,"width":785,"height":585}
7
JSON.stringify(layoutViewport) is {"x":-123,"y":-234,"width":785,"height":585,"top":-234,"right":662,"bottom":351,"left":-123}
8
JSON.stringify(visualViewport) is {"top":-234,"right":662,"bottom":351,"left":-123,"width":785,"height":585}
8
JSON.stringify(visualViewport) is {"x":-123,"y":-234,"width":785,"height":585,"top":-234,"right":662,"bottom":351,"left":-123}
9
9
10
Scrolled to 475, 525
10
Scrolled to 475, 525
11
JSON.stringify(layoutViewport) is {"top":525,"right":1260,"bottom":1110,"left":475,"width":785,"height":585}
11
JSON.stringify(layoutViewport) is {"x":475,"y":525,"width":785,"height":585,"top":525,"right":1260,"bottom":1110,"left":475}
12
JSON.stringify(visualViewport) is {"top":525,"right":1260,"bottom":1110,"left":475,"width":785,"height":585}
12
JSON.stringify(visualViewport) is {"x":475,"y":525,"width":785,"height":585,"top":525,"right":1260,"bottom":1110,"left":475}
13
13
14
Scrolled to 1800, 1850
14
Scrolled to 1800, 1850
15
JSON.stringify(layoutViewport) is {"top":1850,"right":2585,"bottom":2435,"left":1800,"width":785,"height":585}
15
JSON.stringify(layoutViewport) is {"x":1800,"y":1850,"width":785,"height":585,"top":1850,"right":2585,"bottom":2435,"left":1800}
16
JSON.stringify(visualViewport) is {"top":1850,"right":2585,"bottom":2435,"left":1800,"width":785,"height":585}
16
JSON.stringify(visualViewport) is {"x":1800,"y":1850,"width":785,"height":585,"top":1850,"right":2585,"bottom":2435,"left":1800}
17
PASS successfullyParsed is true
17
PASS successfullyParsed is true
18
18
19
TEST COMPLETE
19
TEST COMPLETE
- a/LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt -6 / +6 lines
Lines 4-19 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE a/LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-header-footer-expected.txt_sec1
4
4
5
5
6
Scrolled to -123, -234
6
Scrolled to -123, -234
7
JSON.stringify(layoutViewport) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
7
JSON.stringify(layoutViewport) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
8
JSON.stringify(visualViewport) is {"top":-234,"right":662,"bottom":299,"left":-123,"width":785,"height":533}
8
JSON.stringify(visualViewport) is {"x":-123,"y":-234,"width":785,"height":533,"top":-234,"right":662,"bottom":299,"left":-123}
9
9
10
Scrolled to 475, 525
10
Scrolled to 475, 525
11
JSON.stringify(layoutViewport) is {"top":473,"right":1260,"bottom":1058,"left":475,"width":785,"height":585}
11
JSON.stringify(layoutViewport) is {"x":475,"y":473,"width":785,"height":585,"top":473,"right":1260,"bottom":1058,"left":475}
12
JSON.stringify(visualViewport) is {"top":473,"right":1260,"bottom":1058,"left":475,"width":785,"height":585}
12
JSON.stringify(visualViewport) is {"x":475,"y":473,"width":785,"height":585,"top":473,"right":1260,"bottom":1058,"left":475}
13
13
14
Scrolled to 1800, 1700
14
Scrolled to 1800, 1700
15
JSON.stringify(layoutViewport) is {"top":1648,"right":2008,"bottom":2233,"left":1223,"width":785,"height":585}
15
JSON.stringify(layoutViewport) is {"x":1223,"y":1648,"width":785,"height":585,"top":1648,"right":2008,"bottom":2233,"left":1223}
16
JSON.stringify(visualViewport) is {"top":1648,"right":2585,"bottom":2233,"left":1800,"width":785,"height":585}
16
JSON.stringify(visualViewport) is {"x":1800,"y":1648,"width":785,"height":585,"top":1648,"right":2585,"bottom":2233,"left":1800}
17
PASS successfullyParsed is true
17
PASS successfullyParsed is true
18
18
19
TEST COMPLETE
19
TEST COMPLETE
- a/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt -8 / +8 lines
Lines 3-10 This test zooms and scrolls the page and checks the positions of fixed-position a/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
JSON.stringify(internals.layoutViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
6
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
7
JSON.stringify(internals.visualViewportRect()) is {"top":0,"right":392.5,"bottom":292.5,"left":0,"width":392.5,"height":292.5}
7
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":392.5,"height":292.5,"top":0,"right":392.5,"bottom":292.5,"left":0}
8
client rect of top:
8
client rect of top:
9
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
9
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
10
client rect of bottom:
10
client rect of bottom:
Lines 15-22 client rect of right: a/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt_sec2
15
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
15
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
16
16
17
Scrolled to 475, 525
17
Scrolled to 475, 525
18
JSON.stringify(internals.layoutViewportRect()) is {"top":232.5,"right":867.5,"bottom":817.5,"left":82.5,"width":785,"height":585}
18
JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":232.5,"width":785,"height":585,"top":232.5,"right":867.5,"bottom":817.5,"left":82.5}
19
JSON.stringify(internals.visualViewportRect()) is {"top":525,"right":867.5,"bottom":817.5,"left":475,"width":392.5,"height":292.5}
19
JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":525,"width":392.5,"height":292.5,"top":525,"right":867.5,"bottom":817.5,"left":475}
20
client rect of top:
20
client rect of top:
21
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-392.5,"y":-292.5,"width":785,"height":100,"top":-292.5,"right":392.5,"bottom":-192.5,"left":-392.5}
21
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-392.5,"y":-292.5,"width":785,"height":100,"top":-292.5,"right":392.5,"bottom":-192.5,"left":-392.5}
22
client rect of bottom:
22
client rect of bottom:
Lines 27-34 client rect of right: a/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt_sec3
27
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":292.5,"y":-292.5,"width":100,"height":585,"top":-292.5,"right":392.5,"bottom":292.5,"left":292.5}
27
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":292.5,"y":-292.5,"width":100,"height":585,"top":-292.5,"right":392.5,"bottom":292.5,"left":292.5}
28
28
29
Scrolled to 100, 776
29
Scrolled to 100, 776
30
JSON.stringify(internals.layoutViewportRect()) is {"top":483.5,"right":867.5,"bottom":1068.5,"left":82.5,"width":785,"height":585}
30
JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":483.5,"width":785,"height":585,"top":483.5,"right":867.5,"bottom":1068.5,"left":82.5}
31
JSON.stringify(internals.visualViewportRect()) is {"top":776,"right":492.5,"bottom":1068.5,"left":100,"width":392.5,"height":292.5}
31
JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":776,"width":392.5,"height":292.5,"top":776,"right":492.5,"bottom":1068.5,"left":100}
32
client rect of top:
32
client rect of top:
33
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-17.5,"y":-292.5,"width":785,"height":100,"top":-292.5,"right":767.5,"bottom":-192.5,"left":-17.5}
33
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-17.5,"y":-292.5,"width":785,"height":100,"top":-292.5,"right":767.5,"bottom":-192.5,"left":-17.5}
34
client rect of bottom:
34
client rect of bottom:
Lines 39-46 client rect of right: a/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt_sec4
39
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":667.5,"y":-292.5,"width":100,"height":585,"top":-292.5,"right":767.5,"bottom":292.5,"left":667.5}
39
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":667.5,"y":-292.5,"width":100,"height":585,"top":-292.5,"right":767.5,"bottom":292.5,"left":667.5}
40
40
41
Scrolled to 50, 300
41
Scrolled to 50, 300
42
JSON.stringify(internals.layoutViewportRect()) is {"top":300,"right":835,"bottom":885,"left":50,"width":785,"height":585}
42
JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":300,"width":785,"height":585,"top":300,"right":835,"bottom":885,"left":50}
43
JSON.stringify(internals.visualViewportRect()) is {"top":300,"right":442.5,"bottom":592.5,"left":50,"width":392.5,"height":292.5}
43
JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":300,"width":392.5,"height":292.5,"top":300,"right":442.5,"bottom":592.5,"left":50}
44
client rect of top:
44
client rect of top:
45
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
45
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
46
client rect of bottom:
46
client rect of bottom:
- a/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt -8 / +8 lines
Lines 3-10 This test zooms and scrolls the page and checks the positions of fixed-position a/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
JSON.stringify(internals.layoutViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
6
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
7
JSON.stringify(internals.visualViewportRect()) is {"top":0,"right":392.5,"bottom":271,"left":0,"width":392.5,"height":271}
7
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":392.5,"height":271,"top":0,"right":392.5,"bottom":271,"left":0}
8
client rect of top:
8
client rect of top:
9
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
9
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
10
client rect of bottom:
10
client rect of bottom:
Lines 15-22 client rect of right: a/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt_sec2
15
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
15
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
16
16
17
Scrolled to 475, 525
17
Scrolled to 475, 525
18
JSON.stringify(internals.layoutViewportRect()) is {"top":211,"right":867.5,"bottom":796,"left":82.5,"width":785,"height":585}
18
JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":211,"width":785,"height":585,"top":211,"right":867.5,"bottom":796,"left":82.5}
19
JSON.stringify(internals.visualViewportRect()) is {"top":503.5,"right":867.5,"bottom":796,"left":475,"width":392.5,"height":292.5}
19
JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":503.5,"width":392.5,"height":292.5,"top":503.5,"right":867.5,"bottom":796,"left":475}
20
client rect of top:
20
client rect of top:
21
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-392.5,"y":-314,"width":785,"height":100,"top":-314,"right":392.5,"bottom":-214,"left":-392.5}
21
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-392.5,"y":-314,"width":785,"height":100,"top":-314,"right":392.5,"bottom":-214,"left":-392.5}
22
client rect of bottom:
22
client rect of bottom:
Lines 27-34 client rect of right: a/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt_sec3
27
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":292.5,"y":-314,"width":100,"height":585,"top":-314,"right":392.5,"bottom":271,"left":292.5}
27
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":292.5,"y":-314,"width":100,"height":585,"top":-314,"right":392.5,"bottom":271,"left":292.5}
28
28
29
Scrolled to 100, 776
29
Scrolled to 100, 776
30
JSON.stringify(internals.layoutViewportRect()) is {"top":462,"right":867.5,"bottom":1047,"left":82.5,"width":785,"height":585}
30
JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":462,"width":785,"height":585,"top":462,"right":867.5,"bottom":1047,"left":82.5}
31
JSON.stringify(internals.visualViewportRect()) is {"top":754.5,"right":492.5,"bottom":1047,"left":100,"width":392.5,"height":292.5}
31
JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":754.5,"width":392.5,"height":292.5,"top":754.5,"right":492.5,"bottom":1047,"left":100}
32
client rect of top:
32
client rect of top:
33
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-17.5,"y":-314,"width":785,"height":100,"top":-314,"right":767.5,"bottom":-214,"left":-17.5}
33
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-17.5,"y":-314,"width":785,"height":100,"top":-314,"right":767.5,"bottom":-214,"left":-17.5}
34
client rect of bottom:
34
client rect of bottom:
Lines 39-46 client rect of right: a/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt_sec4
39
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":667.5,"y":-314,"width":100,"height":585,"top":-314,"right":767.5,"bottom":271,"left":667.5}
39
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":667.5,"y":-314,"width":100,"height":585,"top":-314,"right":767.5,"bottom":271,"left":667.5}
40
40
41
Scrolled to 50, 300
41
Scrolled to 50, 300
42
JSON.stringify(internals.layoutViewportRect()) is {"top":278.5,"right":835,"bottom":863.5,"left":50,"width":785,"height":585}
42
JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":278.5,"width":785,"height":585,"top":278.5,"right":835,"bottom":863.5,"left":50}
43
JSON.stringify(internals.visualViewportRect()) is {"top":278.5,"right":442.5,"bottom":571,"left":50,"width":392.5,"height":292.5}
43
JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":278.5,"width":392.5,"height":292.5,"top":278.5,"right":442.5,"bottom":571,"left":50}
44
client rect of top:
44
client rect of top:
45
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":-21.5,"width":785,"height":100,"top":-21.5,"right":785,"bottom":78.5,"left":0}
45
JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":-21.5,"width":785,"height":100,"top":-21.5,"right":785,"bottom":78.5,"left":0}
46
client rect of bottom:
46
client rect of bottom:
- a/LayoutTests/fast/visual-viewport/zoomed-rects-expected.txt -8 / +8 lines
Lines 3-22 This test zooms and scrolls the page and checks that the layout and visual viewp a/LayoutTests/fast/visual-viewport/zoomed-rects-expected.txt_sec1
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
4
5
5
6
JSON.stringify(internals.layoutViewportRect()) is {"top":0,"right":785,"bottom":585,"left":0,"width":785,"height":585}
6
JSON.stringify(internals.layoutViewportRect()) is {"x":0,"y":0,"width":785,"height":585,"top":0,"right":785,"bottom":585,"left":0}
7
JSON.stringify(internals.visualViewportRect()) is {"top":0,"right":392.5,"bottom":292.5,"left":0,"width":392.5,"height":292.5}
7
JSON.stringify(internals.visualViewportRect()) is {"x":0,"y":0,"width":392.5,"height":292.5,"top":0,"right":392.5,"bottom":292.5,"left":0}
8
8
9
Scrolled to 475, 525
9
Scrolled to 475, 525
10
JSON.stringify(internals.layoutViewportRect()) is {"top":232.5,"right":867.5,"bottom":817.5,"left":82.5,"width":785,"height":585}
10
JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":232.5,"width":785,"height":585,"top":232.5,"right":867.5,"bottom":817.5,"left":82.5}
11
JSON.stringify(internals.visualViewportRect()) is {"top":525,"right":867.5,"bottom":817.5,"left":475,"width":392.5,"height":292.5}
11
JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":525,"width":392.5,"height":292.5,"top":525,"right":867.5,"bottom":817.5,"left":475}
12
12
13
Scrolled to 100, 776
13
Scrolled to 100, 776
14
JSON.stringify(internals.layoutViewportRect()) is {"top":483.5,"right":867.5,"bottom":1068.5,"left":82.5,"width":785,"height":585}
14
JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":483.5,"width":785,"height":585,"top":483.5,"right":867.5,"bottom":1068.5,"left":82.5}
15
JSON.stringify(internals.visualViewportRect()) is {"top":776,"right":492.5,"bottom":1068.5,"left":100,"width":392.5,"height":292.5}
15
JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":776,"width":392.5,"height":292.5,"top":776,"right":492.5,"bottom":1068.5,"left":100}
16
16
17
Scrolled to 50, 300
17
Scrolled to 50, 300
18
JSON.stringify(internals.layoutViewportRect()) is {"top":300,"right":835,"bottom":885,"left":50,"width":785,"height":585}
18
JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":300,"width":785,"height":585,"top":300,"right":835,"bottom":885,"left":50}
19
JSON.stringify(internals.visualViewportRect()) is {"top":300,"right":442.5,"bottom":592.5,"left":50,"width":392.5,"height":292.5}
19
JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":300,"width":392.5,"height":292.5,"top":300,"right":442.5,"bottom":592.5,"left":50}
20
PASS successfullyParsed is true
20
PASS successfullyParsed is true
21
21
22
TEST COMPLETE
22
TEST COMPLETE
- a/LayoutTests/inspector/dom/hideHighlight-expected.txt -2 / +2 lines
Lines 7-20 PASS: Should not be a highlight yet. a/LayoutTests/inspector/dom/hideHighlight-expected.txt_sec1
7
7
8
-- Running test case: HighlightRect
8
-- Running test case: HighlightRect
9
PASS: Should be one highlight rect.
9
PASS: Should be one highlight rect.
10
Highlight Rect: {"top":0,"right":100,"bottom":100,"left":0,"width":100,"height":100}
10
Highlight Rect: {"x":0,"y":0,"width":100,"height":100,"top":0,"right":100,"bottom":100,"left":0}
11
11
12
-- Running test case: HideHighlight
12
-- Running test case: HideHighlight
13
PASS: Should be no highlight.
13
PASS: Should be no highlight.
14
14
15
-- Running test case: HighlightQuad
15
-- Running test case: HighlightQuad
16
PASS: Should be one highlight rect.
16
PASS: Should be one highlight rect.
17
Highlight Rect: {"top":100,"right":150,"bottom":200,"left":50,"width":100,"height":100}
17
Highlight Rect: {"x":50,"y":100,"width":100,"height":100,"top":100,"right":150,"bottom":200,"left":50}
18
18
19
-- Running test case: HideHighlight
19
-- Running test case: HideHighlight
20
PASS: Should be no highlight.
20
PASS: Should be no highlight.
- a/LayoutTests/inspector/dom/highlightQuad-expected.txt -6 / +6 lines
Lines 7-33 PASS: Should not be a highlight yet. a/LayoutTests/inspector/dom/highlightQuad-expected.txt_sec1
7
7
8
-- Running test case: HighlightSmallRectWithQuad
8
-- Running test case: HighlightSmallRectWithQuad
9
PASS: Should be one highlight rect.
9
PASS: Should be one highlight rect.
10
Highlight Rect: {"top":0,"right":100,"bottom":100,"left":0,"width":100,"height":100}
10
Highlight Rect: {"x":0,"y":0,"width":100,"height":100,"top":0,"right":100,"bottom":100,"left":0}
11
11
12
-- Running test case: HighlightSmallQuadViewportCoordinates
12
-- Running test case: HighlightSmallQuadViewportCoordinates
13
PASS: Should be one highlight rect.
13
PASS: Should be one highlight rect.
14
Highlight Rect: {"top":100,"right":150,"bottom":200,"left":50,"width":100,"height":100}
14
Highlight Rect: {"x":50,"y":100,"width":100,"height":100,"top":100,"right":150,"bottom":200,"left":50}
15
15
16
-- Running test case: HighlightSmallQuadPageCoordinates
16
-- Running test case: HighlightSmallQuadPageCoordinates
17
PASS: Should be one highlight rect.
17
PASS: Should be one highlight rect.
18
Highlight Rect: {"top":90,"right":140,"bottom":190,"left":40,"width":100,"height":100}
18
Highlight Rect: {"x":40,"y":90,"width":100,"height":100,"top":90,"right":140,"bottom":190,"left":40}
19
19
20
-- Running test case: HighlightSmallUnspecifiedCoordinatesUsesViewportCoordinates
20
-- Running test case: HighlightSmallUnspecifiedCoordinatesUsesViewportCoordinates
21
PASS: Should be one highlight rect.
21
PASS: Should be one highlight rect.
22
Highlight Rect: {"top":100,"right":150,"bottom":200,"left":50,"width":100,"height":100}
22
Highlight Rect: {"x":50,"y":100,"width":100,"height":100,"top":100,"right":150,"bottom":200,"left":50}
23
23
24
-- Running test case: HighlightLargeQuadViewportCoordinates
24
-- Running test case: HighlightLargeQuadViewportCoordinates
25
PASS: Should be one highlight rect.
25
PASS: Should be one highlight rect.
26
Highlight Rect: {"top":0,"right":1000,"bottom":2000,"left":0,"width":1000,"height":2000}
26
Highlight Rect: {"x":0,"y":0,"width":1000,"height":2000,"top":0,"right":1000,"bottom":2000,"left":0}
27
27
28
-- Running test case: HighlightLargeQuadPageCoordinates
28
-- Running test case: HighlightLargeQuadPageCoordinates
29
PASS: Should be one highlight rect.
29
PASS: Should be one highlight rect.
30
Highlight Rect: {"top":-10,"right":990,"bottom":1990,"left":-10,"width":1000,"height":2000}
30
Highlight Rect: {"x":-10,"y":-10,"width":1000,"height":2000,"top":-10,"right":990,"bottom":1990,"left":-10}
31
31
32
-- Running test case: BadQuadShouldError
32
-- Running test case: BadQuadShouldError
33
PASS: Should produce an error.
33
PASS: Should produce an error.
- a/LayoutTests/inspector/dom/highlightRect-expected.txt -6 / +6 lines
Lines 7-31 PASS: Should not be a highlight yet. a/LayoutTests/inspector/dom/highlightRect-expected.txt_sec1
7
7
8
-- Running test case: HighlightSmallRectViewportCoordinates
8
-- Running test case: HighlightSmallRectViewportCoordinates
9
PASS: Should be one highlight rect.
9
PASS: Should be one highlight rect.
10
Highlight Rect: {"top":0,"right":100,"bottom":200,"left":0,"width":100,"height":200}
10
Highlight Rect: {"x":0,"y":0,"width":100,"height":200,"top":0,"right":100,"bottom":200,"left":0}
11
11
12
-- Running test case: HighlightSmallRectPageCoordinates
12
-- Running test case: HighlightSmallRectPageCoordinates
13
PASS: Should be one highlight rect.
13
PASS: Should be one highlight rect.
14
Highlight Rect: {"top":-10,"right":90,"bottom":190,"left":-10,"width":100,"height":200}
14
Highlight Rect: {"x":-10,"y":-10,"width":100,"height":200,"top":-10,"right":90,"bottom":190,"left":-10}
15
15
16
-- Running test case: HighlightSmallRectUnspecifiedCoordinatesUsesViewportCoordinates
16
-- Running test case: HighlightSmallRectUnspecifiedCoordinatesUsesViewportCoordinates
17
PASS: Should be one highlight rect.
17
PASS: Should be one highlight rect.
18
Highlight Rect: {"top":0,"right":100,"bottom":200,"left":0,"width":100,"height":200}
18
Highlight Rect: {"x":0,"y":0,"width":100,"height":200,"top":0,"right":100,"bottom":200,"left":0}
19
19
20
-- Running test case: HighlightLargeRectViewportCoordinates
20
-- Running test case: HighlightLargeRectViewportCoordinates
21
PASS: Should be one highlight rect.
21
PASS: Should be one highlight rect.
22
Highlight Rect: {"top":0,"right":100000,"bottom":200000,"left":0,"width":100000,"height":200000}
22
Highlight Rect: {"x":0,"y":0,"width":100000,"height":200000,"top":0,"right":100000,"bottom":200000,"left":0}
23
23
24
-- Running test case: HighlightLargeRectPageCoordinates
24
-- Running test case: HighlightLargeRectPageCoordinates
25
PASS: Should be one highlight rect.
25
PASS: Should be one highlight rect.
26
Highlight Rect: {"top":-10,"right":99990,"bottom":199990,"left":-10,"width":100000,"height":200000}
26
Highlight Rect: {"x":-10,"y":-10,"width":100000,"height":200000,"top":-10,"right":99990,"bottom":199990,"left":-10}
27
27
28
-- Running test case: HighlightEmptyRect
28
-- Running test case: HighlightEmptyRect
29
PASS: Should be one highlight rect.
29
PASS: Should be one highlight rect.
30
Highlight Rect: {"top":0,"right":0,"bottom":0,"left":0,"width":0,"height":0}
30
Highlight Rect: {"x":0,"y":0,"width":0,"height":0,"top":0,"right":0,"bottom":0,"left":0}
31
31

Return to Bug 171412