OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "web/DevToolsEmulator.h" | 5 #include "web/DevToolsEmulator.h" |
6 | 6 |
7 #include "core/exported/WebViewBase.h" | 7 #include "core/exported/WebViewBase.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/frame/VisualViewport.h" | 10 #include "core/frame/VisualViewport.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 // we end up with enabling emulation in this case. | 313 // we end up with enabling emulation in this case. |
314 if (web_view_impl_->MainFrameImpl()) | 314 if (web_view_impl_->MainFrameImpl()) |
315 web_view_impl_->MainFrameImpl()->GetFrameView()->UpdateLayout(); | 315 web_view_impl_->MainFrameImpl()->GetFrameView()->UpdateLayout(); |
316 } | 316 } |
317 | 317 |
318 void DevToolsEmulator::DisableMobileEmulation() { | 318 void DevToolsEmulator::DisableMobileEmulation() { |
319 if (!emulate_mobile_enabled_) | 319 if (!emulate_mobile_enabled_) |
320 return; | 320 return; |
321 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled( | 321 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled( |
322 is_overlay_scrollbars_enabled_); | 322 is_overlay_scrollbars_enabled_); |
323 RuntimeEnabledFeatures::setOrientationEventEnabled( | |
324 is_orientation_event_enabled_); | |
Yuki
2017/05/12 15:20:11
You can do this in a separate CL.
peria
2017/05/30 08:25:43
reverted.
| |
325 RuntimeEnabledFeatures::setMobileLayoutThemeEnabled( | 323 RuntimeEnabledFeatures::setMobileLayoutThemeEnabled( |
326 is_mobile_layout_theme_enabled_); | 324 is_mobile_layout_theme_enabled_); |
327 ComputedStyle::InvalidateInitialStyle(); | 325 ComputedStyle::InvalidateInitialStyle(); |
328 web_view_impl_->GetPage()->GetSettings().SetViewportEnabled(false); | 326 web_view_impl_->GetPage()->GetSettings().SetViewportEnabled(false); |
329 web_view_impl_->GetPage()->GetSettings().SetViewportMetaEnabled(false); | 327 web_view_impl_->GetPage()->GetSettings().SetViewportMetaEnabled(false); |
330 web_view_impl_->GetPage()->GetVisualViewport().InitializeScrollbars(); | 328 web_view_impl_->GetPage()->GetVisualViewport().InitializeScrollbars(); |
331 web_view_impl_->GetSettings()->SetShrinksViewportContentToFit(false); | 329 web_view_impl_->GetSettings()->SetShrinksViewportContentToFit(false); |
332 web_view_impl_->GetPage()->GetSettings().SetTextAutosizingEnabled( | 330 web_view_impl_->GetPage()->GetSettings().SetTextAutosizingEnabled( |
333 embedder_text_autosizing_enabled_); | 331 embedder_text_autosizing_enabled_); |
334 web_view_impl_->GetPage()->GetSettings().SetPreferCompositingToLCDTextEnabled( | 332 web_view_impl_->GetPage()->GetSettings().SetPreferCompositingToLCDTextEnabled( |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
551 last_pinch_anchor_css_.reset(); | 549 last_pinch_anchor_css_.reset(); |
552 last_pinch_anchor_dip_.reset(); | 550 last_pinch_anchor_dip_.reset(); |
553 } | 551 } |
554 return true; | 552 return true; |
555 } | 553 } |
556 | 554 |
557 return false; | 555 return false; |
558 } | 556 } |
559 | 557 |
560 } // namespace blink | 558 } // namespace blink |
OLD | NEW |