Merge pull request #11233 from brenca/devtools-fix

Small devtools fixes
This commit is contained in:
Cheng Zhao 2017-12-20 15:35:09 +09:00 committed by GitHub
commit 85ef42d99e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1369,15 +1369,18 @@ void NativeWindowViews::ShowAutofillPopup(
const gfx::RectF& bounds, const gfx::RectF& bounds,
const std::vector<base::string16>& values, const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) { const std::vector<base::string16>& labels) {
const auto* web_preferences =
WebContentsPreferences::FromWebContents(web_contents)->web_preferences();
bool is_offsceen = false; bool is_offsceen = false;
bool is_embedder_offscreen = false;
auto* web_contents_preferences =
WebContentsPreferences::FromWebContents(web_contents);
if (web_contents_preferences) {
const auto* web_preferences = web_contents_preferences->web_preferences();
web_preferences->GetBoolean("offscreen", &is_offsceen); web_preferences->GetBoolean("offscreen", &is_offsceen);
int guest_instance_id = 0; int guest_instance_id = 0;
web_preferences->GetInteger(options::kGuestInstanceID, &guest_instance_id); web_preferences->GetInteger(options::kGuestInstanceID, &guest_instance_id);
bool is_embedder_offscreen = false;
if (guest_instance_id) { if (guest_instance_id) {
auto manager = WebViewManager::GetWebViewManager(web_contents); auto manager = WebViewManager::GetWebViewManager(web_contents);
if (manager) { if (manager) {
@ -1388,6 +1391,7 @@ void NativeWindowViews::ShowAutofillPopup(
} }
} }
} }
}
autofill_popup_->CreateView( autofill_popup_->CreateView(
frame_host, frame_host,