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

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: Moved input events adjustments to Blink 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 , m_isTrackingRepaints(false) 174 , m_isTrackingRepaints(false)
175 , m_shouldUpdateWhileOffscreen(true) 175 , m_shouldUpdateWhileOffscreen(true)
176 , m_deferSetNeedsLayouts(0) 176 , m_deferSetNeedsLayouts(0)
177 , m_setNeedsLayoutWasDeferred(false) 177 , m_setNeedsLayoutWasDeferred(false)
178 , m_scrollCorner(0) 178 , m_scrollCorner(0)
179 , m_shouldAutoSize(false) 179 , m_shouldAutoSize(false)
180 , m_inAutoSize(false) 180 , m_inAutoSize(false)
181 , m_didRunAutosize(false) 181 , m_didRunAutosize(false)
182 , m_hasSoftwareFilters(false) 182 , m_hasSoftwareFilters(false)
183 , m_visibleContentScaleFactor(1) 183 , m_visibleContentScaleFactor(1)
184 , m_inputEventsScaleFactorForEmulation(1)
184 , m_partialLayout() 185 , m_partialLayout()
185 { 186 {
186 ASSERT(m_frame); 187 ASSERT(m_frame);
187 init(); 188 init();
188 189
189 if (!isMainFrame()) 190 if (!isMainFrame())
190 return; 191 return;
191 192
192 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed); 193 ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
193 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed); 194 ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2547 2548
2548 void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor) 2549 void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor)
2549 { 2550 {
2550 if (m_visibleContentScaleFactor == visibleContentScaleFactor) 2551 if (m_visibleContentScaleFactor == visibleContentScaleFactor)
2551 return; 2552 return;
2552 2553
2553 m_visibleContentScaleFactor = visibleContentScaleFactor; 2554 m_visibleContentScaleFactor = visibleContentScaleFactor;
2554 updateScrollbars(scrollOffset()); 2555 updateScrollbars(scrollOffset());
2555 } 2556 }
2556 2557
2558 void FrameView::setInputEventsScaleFactorForEmulation(float contentScaleFactor)
2559 {
2560 if (m_inputEventsScaleFactorForEmulation == contentScaleFactor)
2561 return;
2562
2563 m_inputEventsScaleFactorForEmulation = contentScaleFactor;
2564 updateScrollbars(scrollOffset());
2565 }
2566
2557 bool FrameView::scrollbarsCanBeActive() const 2567 bool FrameView::scrollbarsCanBeActive() const
2558 { 2568 {
2559 if (m_frame->view() != this) 2569 if (m_frame->view() != this)
2560 return false; 2570 return false;
2561 2571
2562 return !!m_frame->document(); 2572 return !!m_frame->document();
2563 } 2573 }
2564 2574
2565 ScrollableArea* FrameView::enclosingScrollableArea() const 2575 ScrollableArea* FrameView::enclosingScrollableArea() const
2566 { 2576 {
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3411 return frame().document()->existingAXObjectCache(); 3421 return frame().document()->existingAXObjectCache();
3412 return 0; 3422 return 0;
3413 } 3423 }
3414 3424
3415 bool FrameView::isMainFrame() const 3425 bool FrameView::isMainFrame() const
3416 { 3426 {
3417 return m_frame->page() && m_frame->page()->mainFrame() == m_frame; 3427 return m_frame->page() && m_frame->page()->mainFrame() == m_frame;
3418 } 3428 }
3419 3429
3420 } // namespace WebCore 3430 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698