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

Side by Side Diff: Source/core/frame/LocalFrame.cpp

Issue 1147283002: Add ScrollDirectionPhysical enum in Scroll types. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 /* 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 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 return loader().stateMachine()->isDisplayingInitialEmptyDocument() && docume nt()->isSecureTransitionTo(url); 719 return loader().stateMachine()->isDisplayingInitialEmptyDocument() && docume nt()->isSecureTransitionTo(url);
720 } 720 }
721 721
722 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) 722 void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words)
723 { 723 {
724 spellChecker().removeSpellingMarkersUnderWords(words); 724 spellChecker().removeSpellingMarkersUnderWords(words);
725 } 725 }
726 726
727 static bool scrollAreaOnBothAxes(const FloatSize& delta, ScrollableArea& view) 727 static bool scrollAreaOnBothAxes(const FloatSize& delta, ScrollableArea& view)
728 { 728 {
729 bool scrolledHorizontal = view.scroll(ScrollLeft, ScrollByPrecisePixel, delt a.width()); 729 bool scrolledHorizontal = view.scroll(ScrollPhysicalLeft, ScrollByPrecisePix el, delta.width());
730 bool scrolledVertical = view.scroll(ScrollUp, ScrollByPrecisePixel, delta.he ight()); 730 bool scrolledVertical = view.scroll(ScrollPhysicalUp, ScrollByPrecisePixel, delta.height());
731 return scrolledHorizontal || scrolledVertical; 731 return scrolledHorizontal || scrolledVertical;
732 } 732 }
733 733
734 // Returns true if a scroll occurred. 734 // Returns true if a scroll occurred.
735 bool LocalFrame::applyScrollDelta(const FloatSize& delta, bool isScrollBegin) 735 bool LocalFrame::applyScrollDelta(const FloatSize& delta, bool isScrollBegin)
736 { 736 {
737 if (isScrollBegin) 737 if (isScrollBegin)
738 host()->topControls().scrollBegin(); 738 host()->topControls().scrollBegin();
739 739
740 if (!view() || delta.isZero()) 740 if (!view() || delta.isZero())
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 , m_textZoomFactor(parentTextZoomFactor(this)) 823 , m_textZoomFactor(parentTextZoomFactor(this))
824 , m_inViewSourceMode(false) 824 , m_inViewSourceMode(false)
825 { 825 {
826 if (isLocalRoot()) 826 if (isLocalRoot())
827 m_instrumentingAgents = InstrumentingAgents::create(); 827 m_instrumentingAgents = InstrumentingAgents::create();
828 else 828 else
829 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 829 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
830 } 830 }
831 831
832 } // namespace blink 832 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698