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

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

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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void adjustViewSize(); 148 void adjustViewSize();
149 149
150 virtual IntRect windowClipRect(bool clipToContents = true) const; 150 virtual IntRect windowClipRect(bool clipToContents = true) const;
151 IntRect windowClipRectForFrameOwner(const HTMLFrameOwnerElement*, bool clipT oLayerContents) const; 151 IntRect windowClipRectForFrameOwner(const HTMLFrameOwnerElement*, bool clipT oLayerContents) const;
152 152
153 virtual IntRect windowResizerRect() const; 153 virtual IntRect windowResizerRect() const;
154 154
155 virtual float visibleContentScaleFactor() const OVERRIDE { return m_visibleC ontentScaleFactor; } 155 virtual float visibleContentScaleFactor() const OVERRIDE { return m_visibleC ontentScaleFactor; }
156 void setVisibleContentScaleFactor(float); 156 void setVisibleContentScaleFactor(float);
157 157
158 virtual float inputEventsScaleFactor() const OVERRIDE { return visibleConten tScaleFactor() * m_inputEventsScaleFactorForEmulation; }
pfeldman 2013/09/30 12:42:38 Move definition into .cpp
dgozman 2013/10/01 15:26:34 Done.
159 void setInputEventsScaleFactorForEmulation(float);
160
158 virtual void setScrollPosition(const IntPoint&) OVERRIDE; 161 virtual void setScrollPosition(const IntPoint&) OVERRIDE;
159 virtual void repaintFixedElementsAfterScrolling(); 162 virtual void repaintFixedElementsAfterScrolling();
160 virtual void updateFixedElementsAfterScrolling(); 163 virtual void updateFixedElementsAfterScrolling();
161 virtual bool shouldRubberBandInDirection(ScrollDirection) const; 164 virtual bool shouldRubberBandInDirection(ScrollDirection) const;
162 virtual bool requestScrollPositionUpdate(const IntPoint&) OVERRIDE; 165 virtual bool requestScrollPositionUpdate(const IntPoint&) OVERRIDE;
163 virtual bool isRubberBandInProgress() const OVERRIDE; 166 virtual bool isRubberBandInProgress() const OVERRIDE;
164 void setScrollPositionNonProgrammatically(const IntPoint&); 167 void setScrollPositionNonProgrammatically(const IntPoint&);
165 168
166 // This is different than visibleContentRect() in that it ignores negative ( or overly positive) 169 // This is different than visibleContentRect() in that it ignores negative ( or overly positive)
167 // offsets from rubber-banding, and it takes zooming into account. 170 // offsets from rubber-banding, and it takes zooming into account.
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; 532 OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects;
530 533
531 static double s_normalDeferredRepaintDelay; 534 static double s_normalDeferredRepaintDelay;
532 static double s_initialDeferredRepaintDelayDuringLoading; 535 static double s_initialDeferredRepaintDelayDuringLoading;
533 static double s_maxDeferredRepaintDelayDuringLoading; 536 static double s_maxDeferredRepaintDelayDuringLoading;
534 static double s_deferredRepaintDelayIncrementDuringLoading; 537 static double s_deferredRepaintDelayIncrementDuringLoading;
535 538
536 bool m_hasSoftwareFilters; 539 bool m_hasSoftwareFilters;
537 540
538 float m_visibleContentScaleFactor; 541 float m_visibleContentScaleFactor;
542 float m_inputEventsScaleFactorForEmulation;
539 543
540 PartialLayoutState m_partialLayout; 544 PartialLayoutState m_partialLayout;
541 }; 545 };
542 546
543 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) 547 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
544 { 548 {
545 if (m_isVisuallyNonEmpty) 549 if (m_isVisuallyNonEmpty)
546 return; 550 return;
547 m_visuallyNonEmptyCharacterCount += count; 551 m_visuallyNonEmptyCharacterCount += count;
548 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout. 552 // Use a threshold value to prevent very small amounts of visible content fr om triggering didFirstVisuallyNonEmptyLayout.
(...skipping 25 matching lines...) Expand all
574 ASSERT(!widget || widget->isFrameView()); 578 ASSERT(!widget || widget->isFrameView());
575 return static_cast<const FrameView*>(widget); 579 return static_cast<const FrameView*>(widget);
576 } 580 }
577 581
578 // This will catch anyone doing an unnecessary cast. 582 // This will catch anyone doing an unnecessary cast.
579 void toFrameView(const FrameView*); 583 void toFrameView(const FrameView*);
580 584
581 } // namespace WebCore 585 } // namespace WebCore
582 586
583 #endif // FrameView_h 587 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698