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

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

Issue 919423002: Audited and renamed uses of methods and variables named RootView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again Created 5 years, 10 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/core/frame/PinchViewport.h ('k') | Source/core/html/HTMLInputElement.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) 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 { 108 {
109 TRACE_EVENT0("blink", "PinchViewport::mainFrameDidChangeSize"); 109 TRACE_EVENT0("blink", "PinchViewport::mainFrameDidChangeSize");
110 110
111 // In unit tests we may not have initialized the layer tree. 111 // In unit tests we may not have initialized the layer tree.
112 if (m_innerViewportScrollLayer) 112 if (m_innerViewportScrollLayer)
113 m_innerViewportScrollLayer->setSize(contentsSize()); 113 m_innerViewportScrollLayer->setSize(contentsSize());
114 114
115 clampToBoundaries(); 115 clampToBoundaries();
116 } 116 }
117 117
118 FloatSize PinchViewport::visibleSize() const
119 {
120 FloatSize scaledSize(m_size);
121 scaledSize.expand(0, m_topControlsAdjustment);
122 scaledSize.scale(1 / m_scale);
123 return scaledSize;
124 }
125
118 FloatRect PinchViewport::visibleRect() const 126 FloatRect PinchViewport::visibleRect() const
119 { 127 {
120 FloatSize scaledSize(m_size); 128 return FloatRect(location(), visibleSize());
121 scaledSize.expand(0, m_topControlsAdjustment);
122 scaledSize.scale(1 / m_scale);
123 return FloatRect(m_offset, scaledSize);
124 } 129 }
125 130
126 FloatRect PinchViewport::visibleRectInDocument() const 131 FloatRect PinchViewport::visibleRectInDocument() const
127 { 132 {
128 if (!mainFrame() || !mainFrame()->view()) 133 if (!mainFrame() || !mainFrame()->view())
129 return FloatRect(); 134 return FloatRect();
130 135
131 FloatRect viewRect = mainFrame()->view()->scrollableArea()->visibleContentRe ct(); 136 FloatRect viewRect = mainFrame()->view()->scrollableArea()->visibleContentRe ct();
132 FloatRect pinchRect = visibleRect(); 137 FloatRect pinchRect = visibleRect();
133 pinchRect.moveBy(viewRect.location()); 138 pinchRect.moveBy(viewRect.location());
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 } else if (graphicsLayer == m_rootTransformLayer) { 606 } else if (graphicsLayer == m_rootTransformLayer) {
602 name = "Root Transform Layer"; 607 name = "Root Transform Layer";
603 } else { 608 } else {
604 ASSERT_NOT_REACHED(); 609 ASSERT_NOT_REACHED();
605 } 610 }
606 611
607 return name; 612 return name;
608 } 613 }
609 614
610 } // namespace blink 615 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/PinchViewport.h ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698