| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 234 } |
| 235 | 235 |
| 236 double VisualViewport::clientWidth() | 236 double VisualViewport::clientWidth() |
| 237 { | 237 { |
| 238 if (!mainFrame()) | 238 if (!mainFrame()) |
| 239 return 0; | 239 return 0; |
| 240 | 240 |
| 241 updateStyleAndLayoutIgnorePendingStylesheets(); | 241 updateStyleAndLayoutIgnorePendingStylesheets(); |
| 242 | 242 |
| 243 double width = adjustScrollForAbsoluteZoom(visibleSize().width(), mainFrame(
)->pageZoomFactor()); | 243 double width = adjustScrollForAbsoluteZoom(visibleSize().width(), mainFrame(
)->pageZoomFactor()); |
| 244 return width - mainFrame()->view()->verticalScrollbarWidth(); | 244 return width - mainFrame()->view()->verticalScrollbarWidth() / m_scale; |
| 245 } | 245 } |
| 246 | 246 |
| 247 double VisualViewport::clientHeight() | 247 double VisualViewport::clientHeight() |
| 248 { | 248 { |
| 249 if (!mainFrame()) | 249 if (!mainFrame()) |
| 250 return 0; | 250 return 0; |
| 251 | 251 |
| 252 updateStyleAndLayoutIgnorePendingStylesheets(); | 252 updateStyleAndLayoutIgnorePendingStylesheets(); |
| 253 | 253 |
| 254 double height = adjustScrollForAbsoluteZoom(visibleSize().height(), mainFram
e()->pageZoomFactor()); | 254 double height = adjustScrollForAbsoluteZoom(visibleSize().height(), mainFram
e()->pageZoomFactor()); |
| 255 return height - mainFrame()->view()->horizontalScrollbarHeight(); | 255 return height - mainFrame()->view()->horizontalScrollbarHeight() / m_scale; |
| 256 } | 256 } |
| 257 | 257 |
| 258 double VisualViewport::pageScale() | 258 double VisualViewport::pageScale() |
| 259 { | 259 { |
| 260 updateStyleAndLayoutIgnorePendingStylesheets(); | 260 updateStyleAndLayoutIgnorePendingStylesheets(); |
| 261 | 261 |
| 262 return m_scale; | 262 return m_scale; |
| 263 } | 263 } |
| 264 | 264 |
| 265 void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
) | 265 void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
) |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 } else if (graphicsLayer == m_rootTransformLayer.get()) { | 832 } else if (graphicsLayer == m_rootTransformLayer.get()) { |
| 833 name = "Root Transform Layer"; | 833 name = "Root Transform Layer"; |
| 834 } else { | 834 } else { |
| 835 ASSERT_NOT_REACHED(); | 835 ASSERT_NOT_REACHED(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 return name; | 838 return name; |
| 839 } | 839 } |
| 840 | 840 |
| 841 } // namespace blink | 841 } // namespace blink |
| OLD | NEW |