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

Side by Side Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 FloatRect VisualViewport::visibleRect() const 144 FloatRect VisualViewport::visibleRect() const
145 { 145 {
146 return FloatRect(location(), visibleSize()); 146 return FloatRect(location(), visibleSize());
147 } 147 }
148 148
149 FloatRect VisualViewport::visibleRectInDocument() const 149 FloatRect VisualViewport::visibleRectInDocument() const
150 { 150 {
151 if (!mainFrame() || !mainFrame()->view()) 151 if (!mainFrame() || !mainFrame()->view())
152 return FloatRect(); 152 return FloatRect();
153 153
154 FloatPoint viewLocation = FloatPoint(mainFrame()->view()->scrollableArea()-> scrollPositionDouble()); 154 FloatPoint viewLocation = FloatPoint(mainFrame()->view()->getScrollableArea( )->scrollPositionDouble());
155 return FloatRect(viewLocation, visibleSize()); 155 return FloatRect(viewLocation, visibleSize());
156 } 156 }
157 157
158 FloatRect VisualViewport::mainViewToViewportCSSPixels(const FloatRect& rect) con st 158 FloatRect VisualViewport::mainViewToViewportCSSPixels(const FloatRect& rect) con st
159 { 159 {
160 // Note, this is in CSS Pixels so we don't apply scale. 160 // Note, this is in CSS Pixels so we don't apply scale.
161 FloatRect rectInViewport = rect; 161 FloatRect rectInViewport = rect;
162 rectInViewport.moveBy(-location()); 162 rectInViewport.moveBy(-location());
163 return rectInViewport; 163 return rectInViewport;
164 } 164 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 return frameHost().settings().scrollAnimatorEnabled(); 424 return frameHost().settings().scrollAnimatorEnabled();
425 } 425 }
426 426
427 void VisualViewport::clearLayersForTreeView(WebLayerTreeView* layerTreeView) con st 427 void VisualViewport::clearLayersForTreeView(WebLayerTreeView* layerTreeView) con st
428 { 428 {
429 ASSERT(layerTreeView); 429 ASSERT(layerTreeView);
430 430
431 layerTreeView->clearViewportLayers(); 431 layerTreeView->clearViewportLayers();
432 } 432 }
433 433
434 HostWindow* VisualViewport::hostWindow() const 434 HostWindow* VisualViewport::getHostWindow() const
435 { 435 {
436 return &frameHost().chromeClient(); 436 return &frameHost().chromeClient();
437 } 437 }
438 438
439 DoubleRect VisualViewport::visibleContentRectDouble(IncludeScrollbarsInRect) con st 439 DoubleRect VisualViewport::visibleContentRectDouble(IncludeScrollbarsInRect) con st
440 { 440 {
441 return visibleRect(); 441 return visibleRect();
442 } 442 }
443 443
444 IntRect VisualViewport::visibleContentRect(IncludeScrollbarsInRect scrollbarIncl usion) const 444 IntRect VisualViewport::visibleContentRect(IncludeScrollbarsInRect scrollbarIncl usion) const
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 576
577 void VisualViewport::paintContents(const GraphicsLayer*, GraphicsContext&, Graph icsLayerPaintingPhase, const IntRect&) const 577 void VisualViewport::paintContents(const GraphicsLayer*, GraphicsContext&, Graph icsLayerPaintingPhase, const IntRect&) const
578 { 578 {
579 } 579 }
580 580
581 LocalFrame* VisualViewport::mainFrame() const 581 LocalFrame* VisualViewport::mainFrame() const
582 { 582 {
583 return frameHost().page().mainFrame() && frameHost().page().mainFrame()->isL ocalFrame() ? frameHost().page().deprecatedLocalMainFrame() : 0; 583 return frameHost().page().mainFrame() && frameHost().page().mainFrame()->isL ocalFrame() ? frameHost().page().deprecatedLocalMainFrame() : 0;
584 } 584 }
585 585
586 Widget* VisualViewport::widget() 586 Widget* VisualViewport::getWidget()
587 { 587 {
588 return mainFrame()->view(); 588 return mainFrame()->view();
589 } 589 }
590 590
591 FloatPoint VisualViewport::clampOffsetToBoundaries(const FloatPoint& offset) 591 FloatPoint VisualViewport::clampOffsetToBoundaries(const FloatPoint& offset)
592 { 592 {
593 FloatPoint clampedOffset(offset); 593 FloatPoint clampedOffset(offset);
594 clampedOffset = clampedOffset.shrunkTo(FloatPoint(maximumScrollPositionDoubl e())); 594 clampedOffset = clampedOffset.shrunkTo(FloatPoint(maximumScrollPositionDoubl e()));
595 clampedOffset = clampedOffset.expandedTo(FloatPoint(minimumScrollPositionDou ble())); 595 clampedOffset = clampedOffset.expandedTo(FloatPoint(minimumScrollPositionDou ble()));
596 return clampedOffset; 596 return clampedOffset;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } else if (graphicsLayer == m_rootTransformLayer) { 739 } else if (graphicsLayer == m_rootTransformLayer) {
740 name = "Root Transform Layer"; 740 name = "Root Transform Layer";
741 } else { 741 } else {
742 ASSERT_NOT_REACHED(); 742 ASSERT_NOT_REACHED();
743 } 743 }
744 744
745 return name; 745 return name;
746 } 746 }
747 747
748 } // namespace blink 748 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/VisualViewport.h ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698