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

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Another rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FrameView.h ('k') | Source/core/page/Screen.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 , m_isTrackingRepaints(false) 182 , m_isTrackingRepaints(false)
183 , m_shouldUpdateWhileOffscreen(true) 183 , m_shouldUpdateWhileOffscreen(true)
184 , m_deferSetNeedsLayouts(0) 184 , m_deferSetNeedsLayouts(0)
185 , m_setNeedsLayoutWasDeferred(false) 185 , m_setNeedsLayoutWasDeferred(false)
186 , m_scrollCorner(0) 186 , m_scrollCorner(0)
187 , m_shouldAutoSize(false) 187 , m_shouldAutoSize(false)
188 , m_inAutoSize(false) 188 , m_inAutoSize(false)
189 , m_didRunAutosize(false) 189 , m_didRunAutosize(false)
190 , m_hasSoftwareFilters(false) 190 , m_hasSoftwareFilters(false)
191 , m_visibleContentScaleFactor(1) 191 , m_visibleContentScaleFactor(1)
192 , m_inputEventsScaleFactorForEmulation(1)
192 , m_partialLayout() 193 , m_partialLayout()
193 { 194 {
194 ASSERT(m_frame); 195 ASSERT(m_frame);
195 init(); 196 init();
196 197
197 if (!isMainFrame()) 198 if (!isMainFrame())
198 return; 199 return;
199 200
200 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); 201 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
201 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); 202 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
(...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 2543
2543 void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor) 2544 void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor)
2544 { 2545 {
2545 if (m_visibleContentScaleFactor == visibleContentScaleFactor) 2546 if (m_visibleContentScaleFactor == visibleContentScaleFactor)
2546 return; 2547 return;
2547 2548
2548 m_visibleContentScaleFactor = visibleContentScaleFactor; 2549 m_visibleContentScaleFactor = visibleContentScaleFactor;
2549 updateScrollbars(scrollOffset()); 2550 updateScrollbars(scrollOffset());
2550 } 2551 }
2551 2552
2553 void FrameView::setInputEventsScaleFactorForEmulation(float contentScaleFactor)
2554 {
2555 if (m_inputEventsScaleFactorForEmulation == contentScaleFactor)
2556 return;
2557
2558 m_inputEventsScaleFactorForEmulation = contentScaleFactor;
2559 }
2560
2561 float FrameView::inputEventsScaleFactor() const
2562 {
2563 return visibleContentScaleFactor() * m_inputEventsScaleFactorForEmulation;
2564 }
2565
2552 bool FrameView::scrollbarsCanBeActive() const 2566 bool FrameView::scrollbarsCanBeActive() const
2553 { 2567 {
2554 if (m_frame->view() != this) 2568 if (m_frame->view() != this)
2555 return false; 2569 return false;
2556 2570
2557 return !!m_frame->document(); 2571 return !!m_frame->document();
2558 } 2572 }
2559 2573
2560 ScrollableArea* FrameView::enclosingScrollableArea() const 2574 ScrollableArea* FrameView::enclosingScrollableArea() const
2561 { 2575 {
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3406 return frame().document()->existingAXObjectCache(); 3420 return frame().document()->existingAXObjectCache();
3407 return 0; 3421 return 0;
3408 } 3422 }
3409 3423
3410 bool FrameView::isMainFrame() const 3424 bool FrameView::isMainFrame() const
3411 { 3425 {
3412 return m_frame->page() && m_frame->page()->mainFrame() == m_frame; 3426 return m_frame->page() && m_frame->page()->mainFrame() == m_frame;
3413 } 3427 }
3414 3428
3415 } // namespace WebCore 3429 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/FrameView.h ('k') | Source/core/page/Screen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698