-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add frameName to onNavigationRequested. #11371
Conversation
An additional parameter is now passed to onNavigationRequested with the name of the frame that originated the navigation request. isMainFrame can be emulated by checking if frameName is equal to an empty string, but hasn't been removed from the function signature.
I can't recall: is a cc: @detro |
Good question. Here's some wild, unsupported speculation. On the JS side, I expect However, I would also be okay with some other way to identify frames if necessary. (I can't distinguish between frames with only |
The code looks good! This needs some minimalistic testing, i.e. specially crafted page content with named iframe. |
Unnamed iframes are named like this: <html>
<iframe>
<html>
<iframe>some page</iframe>
</html>
</iframe>
</html> The inner iframe in this case is named:
The outer one is named:
The main WebPage has a frameName equal to an empty string. I agree that some tests should be added (but no guarantees on those arriving today from me). |
A null QWebFrame will cause frameName sent to onNavigationRequested to equal "" (an empty QString). see ariya#11374 ariya#11374
@kanzure Looks good. Just squash them into one commit. Also, no need to initialize QString using empty literal ( |
b3cd914
to
c4df640
Compare
573e969
to
b483dd6
Compare
1842ba8
to
842715b
Compare
e024f31
to
5d99f2a
Compare
An additional parameter is now passed to onNavigationRequested with the
name of the frame that originated the navigation request.
isMainFrame can be emulated by checking if frameName is equal to an
empty string, but hasn't been removed from the function signature for
backwards compatibility reasons.