WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
196478
[WK2] Add support for Window's beforeprint / afterprint events
https://bugs.webkit.org/show_bug.cgi?id=196478
Summary
[WK2] Add support for Window's beforeprint / afterprint events
Chris Dumez
Reported
2019-04-01 20:03:33 PDT
Add support for Window's beforeprint / afterprint events as per: -
https://html.spec.whatwg.org/#dom-print
Blink and Gecko already support this.
Attachments
Patch
(32.83 KB, patch)
2019-04-01 20:10 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(34.44 KB, patch)
2019-04-02 11:46 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(34.75 KB, patch)
2019-04-02 12:41 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-04-01 20:10:32 PDT
Created
attachment 366463
[details]
Patch
Alex Christensen
Comment 2
2019-04-02 10:46:26 PDT
Comment on
attachment 366463
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=366463&action=review
> Tools/WebKitTestRunner/TestController.cpp:268 > + WKPageBeginPrinting(page, frame, WKPrintInfo { 1.0, 21.0, 29.7 }); > + WKPageEndPrinting(page);
The definition of these is inside #if PLATFORM(COCOA). I don't see any reason why.
Chris Dumez
Comment 3
2019-04-02 11:41:26 PDT
(In reply to Alex Christensen from
comment #2
)
> Comment on
attachment 366463
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=366463&action=review
> > > Tools/WebKitTestRunner/TestController.cpp:268 > > + WKPageBeginPrinting(page, frame, WKPrintInfo { 1.0, 21.0, 29.7 }); > > + WKPageEndPrinting(page); > > The definition of these is inside #if PLATFORM(COCOA). I don't see any > reason why.
Indeed, this was not intentional.
Chris Dumez
Comment 4
2019-04-02 11:46:30 PDT
Created
attachment 366515
[details]
Patch
Chris Dumez
Comment 5
2019-04-02 12:41:27 PDT
Created
attachment 366526
[details]
Patch
WebKit Commit Bot
Comment 6
2019-04-02 14:43:30 PDT
Comment on
attachment 366526
[details]
Patch Clearing flags on attachment: 366526 Committed
r243762
: <
https://trac.webkit.org/changeset/243762
>
WebKit Commit Bot
Comment 7
2019-04-02 14:43:32 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2019-04-02 14:44:20 PDT
<
rdar://problem/49535124
>
Fujii Hironori
Comment 9
2019-04-02 18:58:16 PDT
Committed
r243783
: <
https://trac.webkit.org/changeset/243783
>
Shawn Roberts
Comment 10
2019-04-05 09:49:38 PDT
It looks like changes in
https://trac.webkit.org/changeset/243762/webkit
is causing the following layout test to crash in iOS Simulator Debug editing/execCommand/print.html Is crashing 100% of the time locally and on the bots. Does not happen in prior revisions. Reproduced with: run-webkit-tests editing/execCommand/print.html --iterations 5 -f --debug --ios-simulator Crash Log:
https://build.webkit.org/results/Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r243933%20(3157)/editing/execCommand/print-crash-log.txt
Same crash locally.
Chris Dumez
Comment 11
2019-04-05 09:55:28 PDT
(In reply to Shawn Roberts from
comment #10
)
> It looks like changes in
https://trac.webkit.org/changeset/243762/webkit
is > causing the following layout test to crash in iOS Simulator Debug > > editing/execCommand/print.html > > Is crashing 100% of the time locally and on the bots. Does not happen in > prior revisions. > > Reproduced with: > > run-webkit-tests editing/execCommand/print.html --iterations 5 -f --debug > --ios-simulator > > Crash Log: > >
https://build.webkit.org/results/
> Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r243933%20(3157)/ > editing/execCommand/print-crash-log.txt > > Same crash locally.
Probably a side effect of calling beginPrinting() in WebKitTestRunner. I guess it uncovered a bug.
Chris Dumez
Comment 12
2019-04-05 09:58:58 PDT
(In reply to Chris Dumez from
comment #11
)
> (In reply to Shawn Roberts from
comment #10
) > > It looks like changes in
https://trac.webkit.org/changeset/243762/webkit
is > > causing the following layout test to crash in iOS Simulator Debug > > > > editing/execCommand/print.html > > > > Is crashing 100% of the time locally and on the bots. Does not happen in > > prior revisions. > > > > Reproduced with: > > > > run-webkit-tests editing/execCommand/print.html --iterations 5 -f --debug > > --ios-simulator > > > > Crash Log: > > > >
https://build.webkit.org/results/
> > Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r243933%20(3157)/ > > editing/execCommand/print-crash-log.txt > > > > Same crash locally. > > Probably a side effect of calling beginPrinting() in WebKitTestRunner. I > guess it uncovered a bug.
Ryosuke is more familiar with this code: #ifndef NDEBUG // we should always be able to make the affinity DOWNSTREAM, because going previous from an // UPSTREAM position can never yield another UPSTREAM position (unless line wrap length is 0!). if (prev.isNotNull() && m_affinity == UPSTREAM) { VisiblePosition temp = prev; temp.setAffinity(UPSTREAM); ASSERT(inSameLine(temp, prev)); } #endif We hit this assertion in VisiblePosition::previous().
Ryosuke Niwa
Comment 13
2019-04-05 13:09:17 PDT
(In reply to Chris Dumez from
comment #12
)
> (In reply to Chris Dumez from
comment #11
) > > (In reply to Shawn Roberts from
comment #10
) > > > It looks like changes in
https://trac.webkit.org/changeset/243762/webkit
is > > > causing the following layout test to crash in iOS Simulator Debug > > > > > > editing/execCommand/print.html > > > > > > Is crashing 100% of the time locally and on the bots. Does not happen in > > > prior revisions. > > > > > > Reproduced with: > > > > > > run-webkit-tests editing/execCommand/print.html --iterations 5 -f --debug > > > --ios-simulator > > > > > > Crash Log: > > > > > >
https://build.webkit.org/results/
> > > Apple%20iOS%2012%20Simulator%20Debug%20WK2%20(Tests)/r243933%20(3157)/ > > > editing/execCommand/print-crash-log.txt > > > > > > Same crash locally. > > > > Probably a side effect of calling beginPrinting() in WebKitTestRunner. I > > guess it uncovered a bug. > > Ryosuke is more familiar with this code: > #ifndef NDEBUG > // we should always be able to make the affinity DOWNSTREAM, because > going previous from an > // UPSTREAM position can never yield another UPSTREAM position (unless > line wrap length is 0!). > if (prev.isNotNull() && m_affinity == UPSTREAM) { > VisiblePosition temp = prev; > temp.setAffinity(UPSTREAM); > ASSERT(inSameLine(temp, prev)); > } > #endif > > We hit this assertion in VisiblePosition::previous().
We're not gonna be able to fix such an assertion anytime soon. I suggest we skip the test in debug builds for now.
Chris Dumez
Comment 14
2022-02-11 11:33:57 PST
***
Bug 19937
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug