-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6793 from brave/mpilgrim_fix_ua_remote_frame_farb…
…ling Change default in ShouldUseUserAgentOverride for OOPIF
- Loading branch information
Showing
5 changed files
with
80 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc | ||
index c110db6a32bba72c7a89137fa39377c58f0061d8..bd82ce78d6be98b8369e8dbeb5c364fbd24c4578 100644 | ||
--- a/content/renderer/render_frame_impl.cc | ||
+++ b/content/renderer/render_frame_impl.cc | ||
@@ -5030,7 +5030,7 @@ bool RenderFrameImpl::ShouldUseUserAgentOverride() const { | ||
// Temporarily return early and fix properly as part of | ||
// https://crbug.com/426555. | ||
if (render_view_->GetWebView()->MainFrame()->IsWebRemoteFrame()) | ||
- return false; | ||
+ return true; | ||
WebLocalFrame* main_frame = | ||
render_view_->GetWebView()->MainFrame()->ToWebLocalFrame(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE HTML> | ||
<!-- navigator.userAgent iframe test --> | ||
<html> | ||
<head> | ||
<title></title> | ||
</head> | ||
<body> | ||
<script> | ||
window.parent.postMessage(navigator.userAgent, '*'); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE HTML> | ||
<!-- navigator.userAgent iframe test --> | ||
<html> | ||
<head> | ||
<title></title> | ||
</head> | ||
<body> | ||
<script> | ||
window.onmessage = function(event) { | ||
if (navigator.userAgent == event.data) { | ||
document.title = "pass"; | ||
} | ||
} | ||
</script> | ||
<iframe src="ua-iframe.html" id="test"></iframe> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE HTML> | ||
<!-- navigator.userAgent iframe test --> | ||
<html> | ||
<head> | ||
<title></title> | ||
</head> | ||
<body> | ||
<script> | ||
window.onmessage = function(event) { | ||
if (navigator.userAgent == event.data) { | ||
document.title = "pass"; | ||
} | ||
} | ||
var iframe = document.createElement("iframe"); | ||
iframe.src = document.location.href.replace("b.com", "z.com").replace("remote-", ""); | ||
document.body.appendChild(iframe); | ||
</script> | ||
</body> | ||
</html> |