Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Work for some comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/events/WebInputEventConversion.h" 7 #include "core/events/WebInputEventConversion.h"
8 #include "core/exported/WebViewBase.h" 8 #include "core/exported/WebViewBase.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_);
haraken 2017/05/20 19:10:03 What is this change for?
peria 2017/05/30 08:25:44 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 ToIntSize(*last_pinch_anchor_css_.get() - ToIntSize(anchor_css))); 545 ToIntSize(*last_pinch_anchor_css_.get() - ToIntSize(anchor_css)));
548 } 546 }
549 if (scaled_event.GetType() == WebInputEvent::kGesturePinchEnd) { 547 if (scaled_event.GetType() == WebInputEvent::kGesturePinchEnd) {
550 last_pinch_anchor_css_.reset(); 548 last_pinch_anchor_css_.reset();
551 last_pinch_anchor_dip_.reset(); 549 last_pinch_anchor_dip_.reset();
552 } 550 }
553 return true; 551 return true;
554 } 552 }
555 553
556 } // namespace blink 554 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698