| OLD | NEW |
| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 { | 139 { |
| 140 return FloatRect(location(), visibleSize()); | 140 return FloatRect(location(), visibleSize()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 FloatRect PinchViewport::visibleRectInDocument() const | 143 FloatRect PinchViewport::visibleRectInDocument() const |
| 144 { | 144 { |
| 145 if (!mainFrame() || !mainFrame()->view()) | 145 if (!mainFrame() || !mainFrame()->view()) |
| 146 return FloatRect(); | 146 return FloatRect(); |
| 147 | 147 |
| 148 FloatPoint viewLocation = FloatPoint(mainFrame()->view()->scrollableArea()->
scrollPositionDouble()); | 148 FloatPoint viewLocation = FloatPoint(mainFrame()->view()->scrollableArea()->
scrollPositionDouble()); |
| 149 FloatRect pinchRect = visibleRect(); | 149 return FloatRect(viewLocation, visibleSize()); |
| 150 pinchRect.moveBy(viewLocation); | |
| 151 return pinchRect; | |
| 152 } | 150 } |
| 153 | 151 |
| 154 FloatRect PinchViewport::mainViewToViewportCSSPixels(const FloatRect& rect) cons
t | 152 FloatRect PinchViewport::mainViewToViewportCSSPixels(const FloatRect& rect) cons
t |
| 155 { | 153 { |
| 156 // Note, this is in CSS Pixels so we don't apply scale. | 154 // Note, this is in CSS Pixels so we don't apply scale. |
| 157 FloatRect rectInViewport = rect; | 155 FloatRect rectInViewport = rect; |
| 158 rectInViewport.moveBy(-location()); | 156 rectInViewport.moveBy(-location()); |
| 159 return rectInViewport; | 157 return rectInViewport; |
| 160 } | 158 } |
| 161 | 159 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 } else if (graphicsLayer == m_rootTransformLayer) { | 650 } else if (graphicsLayer == m_rootTransformLayer) { |
| 653 name = "Root Transform Layer"; | 651 name = "Root Transform Layer"; |
| 654 } else { | 652 } else { |
| 655 ASSERT_NOT_REACHED(); | 653 ASSERT_NOT_REACHED(); |
| 656 } | 654 } |
| 657 | 655 |
| 658 return name; | 656 return name; |
| 659 } | 657 } |
| 660 | 658 |
| 661 } // namespace blink | 659 } // namespace blink |
| OLD | NEW |