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

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

Issue 1419143007: Fix bug in CSSOM window.scroll api (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inert scroll events for visual viewport Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | no next file » | 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 FloatPoint clampedOffset(clampOffsetToBoundaries(location)); 209 FloatPoint clampedOffset(clampOffsetToBoundaries(location));
210 210
211 if (clampedOffset != m_offset) { 211 if (clampedOffset != m_offset) {
212 m_offset = clampedOffset; 212 m_offset = clampedOffset;
213 scrollAnimator()->setCurrentPosition(m_offset); 213 scrollAnimator()->setCurrentPosition(m_offset);
214 214
215 // SVG runs with accelerated compositing disabled so no ScrollingCoordin ator. 215 // SVG runs with accelerated compositing disabled so no ScrollingCoordin ator.
216 if (ScrollingCoordinator* coordinator = frameHost().page().scrollingCoor dinator()) 216 if (ScrollingCoordinator* coordinator = frameHost().page().scrollingCoor dinator())
217 coordinator->scrollableAreaScrollLayerDidChange(this); 217 coordinator->scrollableAreaScrollLayerDidChange(this);
218 218
219 if (Document* document = mainFrame()->document()) 219 if (!frameHost().settings().inertVisualViewport()) {
220 document->enqueueScrollEventForNode(document); 220 if (Document* document = mainFrame()->document())
221 document->enqueueScrollEventForNode(document);
222 }
221 223
222 mainFrame()->loader().client()->didChangeScrollOffset(); 224 mainFrame()->loader().client()->didChangeScrollOffset();
223 valuesChanged = true; 225 valuesChanged = true;
224 } 226 }
225 227
226 if (!valuesChanged) 228 if (!valuesChanged)
227 return; 229 return;
228 230
229 InspectorInstrumentation::didUpdateLayout(mainFrame()); 231 InspectorInstrumentation::didUpdateLayout(mainFrame());
230 mainFrame()->loader().saveScrollState(); 232 mainFrame()->loader().saveScrollState();
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 } else if (graphicsLayer == m_rootTransformLayer) { 737 } else if (graphicsLayer == m_rootTransformLayer) {
736 name = "Root Transform Layer"; 738 name = "Root Transform Layer";
737 } else { 739 } else {
738 ASSERT_NOT_REACHED(); 740 ASSERT_NOT_REACHED();
739 } 741 }
740 742
741 return name; 743 return name;
742 } 744 }
743 745
744 } // namespace blink 746 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698