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

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1207103002: Update WebLocalFrameImpl and RotationViewportAnchor for root layer scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/tests/PinchViewportTest.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 void WebLocalFrameImpl::setContentSettingsClient(WebContentSettingsClient* conte ntSettingsClient) 662 void WebLocalFrameImpl::setContentSettingsClient(WebContentSettingsClient* conte ntSettingsClient)
663 { 663 {
664 m_contentSettingsClient = contentSettingsClient; 664 m_contentSettingsClient = contentSettingsClient;
665 } 665 }
666 666
667 void WebLocalFrameImpl::setSharedWorkerRepositoryClient(WebSharedWorkerRepositor yClient* client) 667 void WebLocalFrameImpl::setSharedWorkerRepositoryClient(WebSharedWorkerRepositor yClient* client)
668 { 668 {
669 m_sharedWorkerRepositoryClient = SharedWorkerRepositoryClientImpl::create(cl ient); 669 m_sharedWorkerRepositoryClient = SharedWorkerRepositoryClientImpl::create(cl ient);
670 } 670 }
671 671
672 ScrollableArea* WebLocalFrameImpl::layoutViewportScrollableArea() const
673 {
674 if (FrameView* view = frameView())
675 return view->layoutViewportScrollableArea();
676 return nullptr;
677 }
678
672 WebSize WebLocalFrameImpl::scrollOffset() const 679 WebSize WebLocalFrameImpl::scrollOffset() const
673 { 680 {
674 FrameView* view = frameView(); 681 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
675 if (!view) 682 return toIntSize(scrollableArea->scrollPosition());
676 return WebSize(); 683 return WebSize();
677 return view->scrollOffset();
678 } 684 }
679 685
680 WebSize WebLocalFrameImpl::minimumScrollOffset() const 686 WebSize WebLocalFrameImpl::minimumScrollOffset() const
681 { 687 {
682 FrameView* view = frameView(); 688 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
683 if (!view) 689 return toIntSize(scrollableArea->minimumScrollPosition());
684 return WebSize(); 690 return WebSize();
685 return toIntSize(view->minimumScrollPosition());
686 } 691 }
687 692
688 WebSize WebLocalFrameImpl::maximumScrollOffset() const 693 WebSize WebLocalFrameImpl::maximumScrollOffset() const
689 { 694 {
690 FrameView* view = frameView(); 695 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
691 if (!view) 696 return toIntSize(scrollableArea->maximumScrollPosition());
692 return WebSize(); 697 return WebSize();
693 return toIntSize(view->maximumScrollPosition());
694 } 698 }
695 699
696 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset) 700 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset)
697 { 701 {
698 if (FrameView* view = frameView()) 702 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea())
699 view->setScrollPosition(IntPoint(offset.width, offset.height), Programma ticScroll); 703 scrollableArea->setScrollPosition(IntPoint(offset.width, offset.height), ProgrammaticScroll);
700 } 704 }
701 705
702 WebSize WebLocalFrameImpl::contentsSize() const 706 WebSize WebLocalFrameImpl::contentsSize() const
703 { 707 {
704 if (FrameView* view = frameView()) 708 if (FrameView* view = frameView())
705 return view->contentsSize(); 709 return view->contentsSize();
706 return WebSize(); 710 return WebSize();
707 } 711 }
708 712
709 bool WebLocalFrameImpl::hasVisibleContent() const 713 bool WebLocalFrameImpl::hasVisibleContent() const
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 } 2188 }
2185 2189
2186 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2190 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2187 { 2191 {
2188 if (!frame()) 2192 if (!frame())
2189 return WebSandboxFlags::None; 2193 return WebSandboxFlags::None;
2190 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2194 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2191 } 2195 }
2192 2196
2193 } // namespace blink 2197 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/tests/PinchViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698