| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 4268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4279 | 4279 |
| 4280 // FIXME(305811): Refactor for OOPI. | 4280 // FIXME(305811): Refactor for OOPI. |
| 4281 FrameView* frameView = page()->deprecatedLocalMainFrame()->view(); | 4281 FrameView* frameView = page()->deprecatedLocalMainFrame()->view(); |
| 4282 if (!frameView) | 4282 if (!frameView) |
| 4283 return; | 4283 return; |
| 4284 | 4284 |
| 4285 ScrollableArea* scrollableArea = frameView->scrollableArea(); | 4285 ScrollableArea* scrollableArea = frameView->scrollableArea(); |
| 4286 if (scrollableArea->scrollPositionDouble() == scrollPosition) | 4286 if (scrollableArea->scrollPositionDouble() == scrollPosition) |
| 4287 return; | 4287 return; |
| 4288 | 4288 |
| 4289 bool oldProgrammaticScroll = frameView->inProgrammaticScroll(); | |
| 4290 frameView->setInProgrammaticScroll(programmaticScroll); | |
| 4291 scrollableArea->notifyScrollPositionChanged(scrollPosition); | 4289 scrollableArea->notifyScrollPositionChanged(scrollPosition); |
| 4292 frameView->setInProgrammaticScroll(oldProgrammaticScroll); | 4290 if (!programmaticScroll) |
| 4291 frameView->setWasScrolledByUser(true); |
| 4293 } | 4292 } |
| 4294 | 4293 |
| 4295 void WebViewImpl::applyViewportDeltas( | 4294 void WebViewImpl::applyViewportDeltas( |
| 4296 const WebFloatSize& pinchViewportDelta, | 4295 const WebFloatSize& pinchViewportDelta, |
| 4297 const WebFloatSize& outerViewportDelta, | 4296 const WebFloatSize& outerViewportDelta, |
| 4298 const WebFloatSize& elasticOverscrollDelta, | 4297 const WebFloatSize& elasticOverscrollDelta, |
| 4299 float pageScaleDelta, | 4298 float pageScaleDelta, |
| 4300 float topControlsShownRatioDelta) | 4299 float topControlsShownRatioDelta) |
| 4301 { | 4300 { |
| 4302 if (!mainFrameImpl()) | 4301 if (!mainFrameImpl()) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4467 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4466 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4468 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4467 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4469 } | 4468 } |
| 4470 | 4469 |
| 4471 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4470 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4472 { | 4471 { |
| 4473 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4472 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4474 } | 4473 } |
| 4475 | 4474 |
| 4476 } // namespace blink | 4475 } // namespace blink |
| OLD | NEW |