WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211808
[WK2] Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API
https://bugs.webkit.org/show_bug.cgi?id=211808
Summary
[WK2] Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API
Chris Dumez
Reported
2020-05-12 14:42:12 PDT
Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API. This is only SPI and is only used for slightly different printing behavior in Safari. Framesets are no longer supported in HTML5 and are now super rare. Support for this C API adds quite a bit of code complexity and crashes such as <
rdar://problem/60322282
>, it just does not seem worse it anymore.
Attachments
Patch
(24.07 KB, patch)
2020-05-12 14:47 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(25.63 KB, patch)
2020-05-12 15:10 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2020-05-12 14:47:55 PDT
Created
attachment 399181
[details]
Patch
Darin Adler
Comment 2
2020-05-12 14:53:53 PDT
Comment on
attachment 399181
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399181&action=review
> Source/WebKit/UIProcess/API/C/WKFrame.cpp:125 > bool WKFrameIsFrameSet(WKFrameRef frameRef)
Is there an "SPI deprecation" thing to be done?
> Source/WebKit/UIProcess/API/C/WKPage.cpp:393 > - return toAPI(toImpl(pageRef)->frameSetLargestFrame()); > + return nullptr;
Would it be safer to return the main frame rather than null?
Alex Christensen
Comment 3
2020-05-12 14:55:05 PDT
Comment on
attachment 399181
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399181&action=review
>> Source/WebKit/UIProcess/API/C/WKFrame.cpp:125 >> bool WKFrameIsFrameSet(WKFrameRef frameRef) > > Is there an "SPI deprecation" thing to be done?
WK_C_API_DEPRECATED
Alex Christensen
Comment 4
2020-05-12 14:57:18 PDT
Comment on
attachment 399181
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399181&action=review
>> Source/WebKit/UIProcess/API/C/WKPage.cpp:393 >> + return nullptr; > > Would it be safer to return the main frame rather than null?
If we remove the use of this function (and please mention the radar where you do such) then we only need to keep the C functions in the binary so SafariForWebKitDevelopment can start with open source builds of WebKit, which is probably NBD in this case.
Chris Dumez
Comment 5
2020-05-12 15:06:27 PDT
Comment on
attachment 399181
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399181&action=review
>>> Source/WebKit/UIProcess/API/C/WKFrame.cpp:125 >>> bool WKFrameIsFrameSet(WKFrameRef frameRef) >> >> Is there an "SPI deprecation" thing to be done? > > WK_C_API_DEPRECATED
Will add.
>>> Source/WebKit/UIProcess/API/C/WKPage.cpp:393 >>> + return nullptr; >> >> Would it be safer to return the main frame rather than null? > > If we remove the use of this function (and please mention the radar where you do such) then we only need to keep the C functions in the binary so SafariForWebKitDevelopment can start with open source builds of WebKit, which is probably NBD in this case.
Yes, I will follow-up and drop corresponding code from client. Returning nullptr here is safe. This method could always return null and would only return non-null when there is a frameset. Returning the main frame would be a behavior change and may actually cause a behavior change in client too. I have checked that the only client of this SPI properly null-checks the result.
Chris Dumez
Comment 6
2020-05-12 15:10:22 PDT
Created
attachment 399185
[details]
Patch
EWS
Comment 7
2020-05-12 16:38:47 PDT
Committed
r261586
: <
https://trac.webkit.org/changeset/261586
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 399185
[details]
.
Radar WebKit Bug Importer
Comment 8
2020-05-12 16:39:23 PDT
<
rdar://problem/63159822
>
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