⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243762 in webkit


Ignore:
Timestamp:
Apr 2, 2019, 2:43:24 PM (7 years ago)
Author:
Chris Dumez
Message:

[WK2] Add support for Window's beforeprint / afterprint events
https://bugs.webkit.org/show_bug.cgi?id=196478

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/security-window/window-security.sub-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt:
  • web-platform-tests/html/dom/interfaces-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:

Source/WebCore:

Add support for Window's beforeprint / afterprint events as per:

Blink and Gecko already support this.

Test: printing/printing-events.html

  • dom/EventNames.h:
  • html/HTMLAttributeNames.in:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):

  • page/Page.cpp:

(WebCore::dispatchPrintEvent):
(WebCore::Page::dispatchBeforePrintEvent):
(WebCore::Page::dispatchAfterPrintEvent):

  • page/Page.h:
  • page/WindowEventHandlers.idl:

Source/WebKit:

Add support for Window's beforeprint / afterprint events as per:

Blink and Gecko already support this.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::endPrinting):

Tools:

Add minimal implementation for printFrame in WebKitTestRunner.

  • WebKitTestRunner/TestController.cpp:

(WTR::printFrame):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

LayoutTests:

Add layout test coverage.

  • TestExpectations:
  • platform/wk2/TestExpectations:
  • printing/printing-events-expected.txt: Added.
  • printing/printing-events.html: Added.
Location:
trunk
Files:
2 added
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243760 r243762  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Add support for Window's beforeprint / afterprint events
     4        https://bugs.webkit.org/show_bug.cgi?id=196478
     5
     6        Reviewed by Alex Christensen.
     7
     8        Add layout test coverage.
     9
     10        * TestExpectations:
     11        * platform/wk2/TestExpectations:
     12        * printing/printing-events-expected.txt: Added.
     13        * printing/printing-events.html: Added.
     14
    1152019-04-02  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/LayoutTests/TestExpectations

    r243693 r243762  
    5858editing/pasteboard/ios [ Skip ]
    5959editing/pasteboard/mac [ Skip ]
     60
     61# WebKit2 only.
     62printing/printing-events.html [ Skip ]
    6063
    6164http/tests/security/xss-DENIED-xsl-external-entity-no-logging.xml [ Skip ]
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r243757 r243762  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Add support for Window's beforeprint / afterprint events
     4        https://bugs.webkit.org/show_bug.cgi?id=196478
     5
     6        Reviewed by Alex Christensen.
     7
     8        Rebaseline WPT tests now that more checks are passing.
     9
     10        * web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt:
     11        * web-platform-tests/html/browsers/the-window-object/security-window/window-security.sub-expected.txt:
     12        * web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt:
     13        * web-platform-tests/html/dom/interfaces-expected.txt:
     14        * web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt:
     15        * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
     16
    1172019-04-02  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt

    r243634 r243762  
    1515PASS A SecurityError exception must be thrown when window.navigator is accessed from a different origin.
    1616PASS A SecurityError exception must be thrown when window.onabort is accessed from a different origin.
    17 FAIL A SecurityError exception must be thrown when window.onafterprint is accessed from a different origin. assert_true: window.onafterprint should exist. expected true got false
    18 FAIL A SecurityError exception must be thrown when window.onbeforeprint is accessed from a different origin. assert_true: window.onbeforeprint should exist. expected true got false
     17PASS A SecurityError exception must be thrown when window.onafterprint is accessed from a different origin.
     18PASS A SecurityError exception must be thrown when window.onbeforeprint is accessed from a different origin.
    1919PASS A SecurityError exception must be thrown when window.onbeforeunload is accessed from a different origin.
    2020PASS A SecurityError exception must be thrown when window.onblur is accessed from a different origin.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/security-window/window-security.sub-expected.txt

    r205169 r243762  
    1515PASS A SecurityError exception must be thrown when window.navigator is accessed from a different origin.
    1616PASS A SecurityError exception must be thrown when window.onabort is accessed from a different origin.
    17 FAIL A SecurityError exception must be thrown when window.onafterprint is accessed from a different origin. assert_true: window.onafterprint should exist. expected true got false
    18 FAIL A SecurityError exception must be thrown when window.onbeforeprint is accessed from a different origin. assert_true: window.onbeforeprint should exist. expected true got false
     17PASS A SecurityError exception must be thrown when window.onafterprint is accessed from a different origin.
     18PASS A SecurityError exception must be thrown when window.onbeforeprint is accessed from a different origin.
    1919PASS A SecurityError exception must be thrown when window.onbeforeunload is accessed from a different origin.
    2020PASS A SecurityError exception must be thrown when window.onblur is accessed from a different origin.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt

    r243634 r243762  
    7777PASS Window attribute: opener
    7878PASS Window attribute: onabort
    79 FAIL Window attribute: onafterprint assert_true: onafterprint in window expected true got false
    80 FAIL Window attribute: onbeforeprint assert_true: onbeforeprint in window expected true got false
     79PASS Window attribute: onafterprint
     80PASS Window attribute: onbeforeprint
    8181PASS Window attribute: onbeforeunload
    8282PASS Window attribute: onblur
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r243638 r243762  
    66CONSOLE MESSAGE: line 482: callback not yet supported
    77CONSOLE MESSAGE: line 482: callback not yet supported
    8 CONSOLE MESSAGE: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)
    9 CONSOLE MESSAGE: WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.)
    108HTML IDL tests
    119
     
    897895PASS HTMLBodyElement interface: attribute bgColor
    898896PASS HTMLBodyElement interface: attribute background
    899 FAIL HTMLBodyElement interface: attribute onafterprint assert_true: The prototype object must have a property "onafterprint" expected true got false
    900 FAIL HTMLBodyElement interface: attribute onbeforeprint assert_true: The prototype object must have a property "onbeforeprint" expected true got false
     897PASS HTMLBodyElement interface: attribute onafterprint
     898PASS HTMLBodyElement interface: attribute onbeforeprint
    901899PASS HTMLBodyElement interface: attribute onbeforeunload
    902900PASS HTMLBodyElement interface: attribute onhashchange
     
    921919PASS HTMLBodyElement interface: document.createElement("body") must inherit property "bgColor" with the proper type
    922920PASS HTMLBodyElement interface: document.createElement("body") must inherit property "background" with the proper type
    923 FAIL HTMLBodyElement interface: document.createElement("body") must inherit property "onafterprint" with the proper type assert_inherits: property "onafterprint" not found in prototype chain
    924 FAIL HTMLBodyElement interface: document.createElement("body") must inherit property "onbeforeprint" with the proper type assert_inherits: property "onbeforeprint" not found in prototype chain
     921PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onafterprint" with the proper type
     922PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onbeforeprint" with the proper type
    925923PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onbeforeunload" with the proper type
    926924PASS HTMLBodyElement interface: document.createElement("body") must inherit property "onhashchange" with the proper type
     
    46854683PASS Window interface: attribute onvolumechange
    46864684PASS Window interface: attribute onwaiting
    4687 FAIL Window interface: attribute onafterprint assert_own_property: The global object must have a property "onafterprint" expected property "onafterprint" missing
    4688 FAIL Window interface: attribute onbeforeprint assert_own_property: The global object must have a property "onbeforeprint" expected property "onbeforeprint" missing
     4685PASS Window interface: attribute onafterprint
     4686PASS Window interface: attribute onbeforeprint
    46894687PASS Window interface: attribute onbeforeunload
    46904688PASS Window interface: attribute onhashchange
     
    48284826PASS Window interface: window must inherit property "onvolumechange" with the proper type
    48294827PASS Window interface: window must inherit property "onwaiting" with the proper type
    4830 FAIL Window interface: window must inherit property "onafterprint" with the proper type assert_own_property: expected property "onafterprint" missing
    4831 FAIL Window interface: window must inherit property "onbeforeprint" with the proper type assert_own_property: expected property "onbeforeprint" missing
     4828PASS Window interface: window must inherit property "onafterprint" with the proper type
     4829PASS Window interface: window must inherit property "onbeforeprint" with the proper type
    48324830PASS Window interface: window must inherit property "onbeforeunload" with the proper type
    48334831PASS Window interface: window must inherit property "onhashchange" with the proper type
     
    53605358PASS HTMLFrameSetElement interface: attribute cols
    53615359PASS HTMLFrameSetElement interface: attribute rows
    5362 FAIL HTMLFrameSetElement interface: attribute onafterprint assert_true: The prototype object must have a property "onafterprint" expected true got false
    5363 FAIL HTMLFrameSetElement interface: attribute onbeforeprint assert_true: The prototype object must have a property "onbeforeprint" expected true got false
     5360PASS HTMLFrameSetElement interface: attribute onafterprint
     5361PASS HTMLFrameSetElement interface: attribute onbeforeprint
    53645362PASS HTMLFrameSetElement interface: attribute onbeforeunload
    53655363PASS HTMLFrameSetElement interface: attribute onhashchange
     
    53805378PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "cols" with the proper type
    53815379PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "rows" with the proper type
    5382 FAIL HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onafterprint" with the proper type assert_inherits: property "onafterprint" not found in prototype chain
    5383 FAIL HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onbeforeprint" with the proper type assert_inherits: property "onbeforeprint" not found in prototype chain
     5380PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onafterprint" with the proper type
     5381PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onbeforeprint" with the proper type
    53845382PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onbeforeunload" with the proper type
    53855383PASS HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onhashchange" with the proper type
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt

    r215916 r243762  
    1010PASS Return null when getting the scroll event handler of a windowless body
    1111PASS Ignore setting of scroll window event handlers on windowless body
    12 FAIL Return null when getting the afterprint event handler of a windowless body assert_equals: expected (object) null but got (undefined) undefined
    13 FAIL Ignore setting of afterprint window event handlers on windowless body assert_equals: expected (object) null but got (function) function "function () { return "Handler attached to windowless element"; }"
    14 FAIL Return null when getting the beforeprint event handler of a windowless body assert_equals: expected (object) null but got (undefined) undefined
    15 FAIL Ignore setting of beforeprint window event handlers on windowless body assert_equals: expected (object) null but got (function) function "function () { return "Handler attached to windowless element"; }"
     12PASS Return null when getting the afterprint event handler of a windowless body
     13PASS Ignore setting of afterprint window event handlers on windowless body
     14PASS Return null when getting the beforeprint event handler of a windowless body
     15PASS Ignore setting of beforeprint window event handlers on windowless body
    1616PASS Return null when getting the beforeunload event handler of a windowless body
    1717PASS Ignore setting of beforeunload window event handlers on windowless body
     
    5050PASS Return null when getting the scroll event handler of a windowless frameset
    5151PASS Ignore setting of scroll window event handlers on windowless frameset
    52 FAIL Return null when getting the afterprint event handler of a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
    53 FAIL Ignore setting of afterprint window event handlers on windowless frameset assert_equals: expected (object) null but got (function) function "function () { return "Handler attached to windowless element"; }"
    54 FAIL Return null when getting the beforeprint event handler of a windowless frameset assert_equals: expected (object) null but got (undefined) undefined
    55 FAIL Ignore setting of beforeprint window event handlers on windowless frameset assert_equals: expected (object) null but got (function) function "function () { return "Handler attached to windowless element"; }"
     52PASS Return null when getting the afterprint event handler of a windowless frameset
     53PASS Ignore setting of afterprint window event handlers on windowless frameset
     54PASS Return null when getting the beforeprint event handler of a windowless frameset
     55PASS Ignore setting of beforeprint window event handlers on windowless frameset
    5656PASS Return null when getting the beforeunload event handler of a windowless frameset
    5757PASS Ignore setting of beforeunload window event handlers on windowless frameset
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt

    r207040 r243762  
    66PASS resize
    77PASS scroll
    8 FAIL afterprint assert_equals: expected (function) function "function f() {
    9   return 0;
    10 }" but got (undefined) undefined
    11 FAIL beforeprint assert_equals: expected (function) function "function f() {
    12   return 0;
    13 }" but got (undefined) undefined
     8PASS afterprint
     9PASS beforeprint
    1410PASS beforeunload
    1511PASS hashchange
     
    2925PASS resize removal
    3026PASS scroll removal
    31 FAIL afterprint removal assert_equals: expected (object) null but got (undefined) undefined
    32 FAIL beforeprint removal assert_equals: expected (object) null but got (undefined) undefined
     27PASS afterprint removal
     28PASS beforeprint removal
    3329PASS beforeunload removal
    3430PASS hashchange removal
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r242043 r243762  
    703703imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.html [ Failure ]
    704704
     705printing/printing-events.html [ Pass ]
     706
    705707# Resource Load Statistics are only supported in WebKit2.
    706708http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction.html [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r243760 r243762  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Add support for Window's beforeprint / afterprint events
     4        https://bugs.webkit.org/show_bug.cgi?id=196478
     5
     6        Reviewed by Alex Christensen.
     7
     8        Add support for Window's beforeprint / afterprint events as per:
     9        - https://html.spec.whatwg.org/#dom-print
     10
     11        Blink and Gecko already support this.
     12
     13        Test: printing/printing-events.html
     14
     15        * dom/EventNames.h:
     16        * html/HTMLAttributeNames.in:
     17        * html/HTMLBodyElement.cpp:
     18        (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
     19        * page/Page.cpp:
     20        (WebCore::dispatchPrintEvent):
     21        (WebCore::Page::dispatchBeforePrintEvent):
     22        (WebCore::Page::dispatchAfterPrintEvent):
     23        * page/Page.h:
     24        * page/WindowEventHandlers.idl:
     25
    1262019-04-02  Zalan Bujtas  <zalan@apple.com>
    227
  • trunk/Source/WebCore/dom/EventNames.h

    r243106 r243762  
    6464    macro(addstream) \
    6565    macro(addtrack) \
     66    macro(afterprint) \
    6667    macro(animationcancel) \
    6768    macro(animationend) \
     
    7879    macro(beforeload) \
    7980    macro(beforepaste) \
     81    macro(beforeprint) \
    8082    macro(beforeunload) \
    8183    macro(beginEvent) \
  • trunk/Source/WebCore/html/HTMLAttributeNames.in

    r242534 r243762  
    203203onaccessiblesetvalue
    204204onaccessibleselect
     205onafterprint
    205206onanimationstart
    206207onanimationiteration
     
    214215onbeforeload
    215216onbeforepaste
     217onbeforeprint
    216218onbeforeunload
    217219onblur
  • trunk/Source/WebCore/html/HTMLBodyElement.cpp

    r238698 r243762  
    9999{
    100100    static const QualifiedName* const table[] = {
     101        &onafterprintAttr.get(),
     102        &onbeforeprintAttr.get(),
    101103        &onbeforeunloadAttr.get(),
    102104        &onblurAttr.get(),
  • trunk/Source/WebCore/page/Page.cpp

    r243643 r243762  
    29892989#endif // PLATFORM(MAC)
    29902990
     2991static void dispatchPrintEvent(Frame& mainFrame, const AtomicString& eventType)
     2992{
     2993    Vector<Ref<Frame>> frames;
     2994    for (auto* frame = &mainFrame; frame; frame = frame->tree().traverseNext())
     2995        frames.append(*frame);
     2996
     2997    for (auto& frame : frames) {
     2998        if (auto* window = frame->window())
     2999            window->dispatchEvent(Event::create(eventType, Event::CanBubble::No, Event::IsCancelable::No), window->document());
     3000    }
     3001}
     3002
     3003void Page::dispatchBeforePrintEvent()
     3004{
     3005    dispatchPrintEvent(m_mainFrame, eventNames().beforeprintEvent);
     3006}
     3007
     3008void Page::dispatchAfterPrintEvent()
     3009{
     3010    dispatchPrintEvent(m_mainFrame, eventNames().afterprintEvent);
     3011}
     3012
    29913013#if ENABLE(APPLE_PAY)
    29923014void Page::setPaymentCoordinator(std::unique_ptr<PaymentCoordinator>&& paymentCoordinator)
  • trunk/Source/WebCore/page/Page.h

    r243643 r243762  
    297297    WEBCORE_EXPORT void unmarkAllTextMatches();
    298298
     299    WEBCORE_EXPORT void dispatchBeforePrintEvent();
     300    WEBCORE_EXPORT void dispatchAfterPrintEvent();
     301
    299302    // find all the Ranges for the matching text.
    300303    // Upon return, indexForSelection will be one of the following:
  • trunk/Source/WebCore/page/WindowEventHandlers.idl

    r207040 r243762  
    3232    // are not yet implemented.
    3333
    34     // [WindowEventHandler] attribute EventHandler onafterprint;.
    35     // [WindowEventHandler] attribute EventHandler onbeforeprint;.
     34    [WindowEventHandler] attribute EventHandler onafterprint;
     35    [WindowEventHandler] attribute EventHandler onbeforeprint;
    3636    [WindowEventHandler] attribute EventHandler onbeforeunload;
    3737    [WindowEventHandler] attribute EventHandler onhashchange;
  • trunk/Source/WebKit/ChangeLog

    r243753 r243762  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Add support for Window's beforeprint / afterprint events
     4        https://bugs.webkit.org/show_bug.cgi?id=196478
     5
     6        Reviewed by Alex Christensen.
     7
     8        Add support for Window's beforeprint / afterprint events as per:
     9        - https://html.spec.whatwg.org/#dom-print
     10
     11        Blink and Gecko already support this.
     12
     13        * WebProcess/WebPage/WebPage.cpp:
     14        (WebKit::WebPage::beginPrinting):
     15        (WebKit::WebPage::endPrinting):
     16
    1172019-04-02  Wenson Hsieh  <wenson_hsieh@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp

    r243319 r243762  
    24072407}
    24082408
    2409 #if PLATFORM(COCOA)
    24102409static PrintInfo printInfoFromWKPrintInfo(const WKPrintInfo& printInfo)
    24112410{
     
    24272426}
    24282427
     2428#if PLATFORM(COCOA)
     2429void WKPageDrawPagesToPDF(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo, uint32_t first, uint32_t count, WKPageDrawToPDFFunction callback, void* context)
     2430{
     2431    toImpl(page)->drawPagesToPDF(toImpl(frame), printInfoFromWKPrintInfo(printInfo), first, count, DataCallback::create(toGenericCallbackFunction(context, callback)));
     2432}
     2433#endif
     2434
    24292435void WKPageBeginPrinting(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo)
    24302436{
     
    24322438}
    24332439
    2434 void WKPageDrawPagesToPDF(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo, uint32_t first, uint32_t count, WKPageDrawToPDFFunction callback, void* context)
    2435 {
    2436     toImpl(page)->drawPagesToPDF(toImpl(frame), printInfoFromWKPrintInfo(printInfo), first, count, DataCallback::create(toGenericCallbackFunction(context, callback)));
    2437 }
    2438 
    24392440void WKPageEndPrinting(WKPageRef page)
    24402441{
    24412442    toImpl(page)->endPrinting();
    24422443}
    2443 #endif
    24442444
    24452445bool WKPageGetIsControlledByAutomation(WKPageRef page)
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r243684 r243762  
    46084608#endif
    46094609
    4610     if (!m_printContext)
     4610    if (!m_printContext) {
    46114611        m_printContext = std::make_unique<PrintContext>(coreFrame);
     4612        m_page->dispatchBeforePrintEvent();
     4613    }
    46124614
    46134615    freezeLayerTree(LayerTreeFreezeReason::Printing);
     
    46284630    unfreezeLayerTree(LayerTreeFreezeReason::Printing);
    46294631
    4630     m_printContext = nullptr;
     4632    if (m_printContext) {
     4633        m_printContext = nullptr;
     4634        m_page->dispatchAfterPrintEvent();
     4635    }
    46314636}
    46324637
  • trunk/Tools/ChangeLog

    r243761 r243762  
     12019-04-02  Chris Dumez  <cdumez@apple.com>
     2
     3        [WK2] Add support for Window's beforeprint / afterprint events
     4        https://bugs.webkit.org/show_bug.cgi?id=196478
     5
     6        Reviewed by Alex Christensen.
     7
     8        Add minimal implementation for printFrame in WebKitTestRunner.
     9
     10        * WebKitTestRunner/TestController.cpp:
     11        (WTR::printFrame):
     12        (WTR::TestController::createOtherPage):
     13        (WTR::TestController::createWebViewWithOptions):
     14
    1152019-04-02  Aakash Jain  <aakash_jain@apple.com>
    216
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r243657 r243762  
    263263}
    264264
     265static void printFrame(WKPageRef page, WKFrameRef frame, const void*)
     266{
     267    WKPageBeginPrinting(page, frame, WKPrintInfo { 1.0, 21.0, 29.7 });
     268    WKPageEndPrinting(page);
     269}
     270
    265271static bool shouldAllowDeviceOrientationAndMotionAccess(WKPageRef, WKSecurityOriginRef origin, const void*)
    266272{
     
    321327        0, // drawHeader
    322328        0, // drawFooter
    323         0, // printFrame
     329        printFrame,
    324330        runModal,
    325331        0, // didCompleteRubberBandForMainFrame
     
    614620        0, // drawHeader
    615621        0, // drawFooter
    616         0, // printFrame
     622        printFrame,
    617623        runModal,
    618624        0, // didCompleteRubberBandForMainFrame
Note: See TracChangeset for help on using the changeset viewer.