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

Side by Side Diff: sky/engine/core/rendering/RenderLayerScrollableArea.cpp

Issue 870073003: Remove mouse events from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/page/Page.h ('k') | sky/engine/platform/BUILD.gn » ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "sky/engine/core/frame/LocalFrame.h" 51 #include "sky/engine/core/frame/LocalFrame.h"
52 #include "sky/engine/core/inspector/InspectorTraceEvents.h" 52 #include "sky/engine/core/inspector/InspectorTraceEvents.h"
53 #include "sky/engine/core/page/Chrome.h" 53 #include "sky/engine/core/page/Chrome.h"
54 #include "sky/engine/core/page/EventHandler.h" 54 #include "sky/engine/core/page/EventHandler.h"
55 #include "sky/engine/core/page/FocusController.h" 55 #include "sky/engine/core/page/FocusController.h"
56 #include "sky/engine/core/page/Page.h" 56 #include "sky/engine/core/page/Page.h"
57 #include "sky/engine/core/rendering/HitTestResult.h" 57 #include "sky/engine/core/rendering/HitTestResult.h"
58 #include "sky/engine/core/rendering/RenderGeometryMap.h" 58 #include "sky/engine/core/rendering/RenderGeometryMap.h"
59 #include "sky/engine/core/rendering/RenderView.h" 59 #include "sky/engine/core/rendering/RenderView.h"
60 #include "sky/engine/platform/PlatformGestureEvent.h" 60 #include "sky/engine/platform/PlatformGestureEvent.h"
61 #include "sky/engine/platform/PlatformMouseEvent.h"
62 #include "sky/engine/platform/graphics/GraphicsContextStateSaver.h" 61 #include "sky/engine/platform/graphics/GraphicsContextStateSaver.h"
63 #include "sky/engine/platform/scroll/ScrollAnimator.h" 62 #include "sky/engine/platform/scroll/ScrollAnimator.h"
64 #include "sky/engine/platform/scroll/Scrollbar.h" 63 #include "sky/engine/platform/scroll/Scrollbar.h"
65 #include "sky/engine/public/platform/Platform.h" 64 #include "sky/engine/public/platform/Platform.h"
66 65
67 namespace blink { 66 namespace blink {
68 67
69 RenderLayerScrollableArea::RenderLayerScrollableArea(RenderLayer& layer) 68 RenderLayerScrollableArea::RenderLayerScrollableArea(RenderLayer& layer)
70 : m_layer(layer) 69 : m_layer(layer)
71 , m_scrollsOverflow(false) 70 , m_scrollsOverflow(false)
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 199
201 setScrollOffset(toIntSize(newScrollOffset)); 200 setScrollOffset(toIntSize(newScrollOffset));
202 201
203 LocalFrame* frame = box().frame(); 202 LocalFrame* frame = box().frame();
204 ASSERT(frame); 203 ASSERT(frame);
205 204
206 RefPtr<FrameView> frameView = box().frameView(); 205 RefPtr<FrameView> frameView = box().frameView();
207 206
208 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer", "data", InspectorScrollLayerEvent::data(&box())); 207 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer", "data", InspectorScrollLayerEvent::data(&box()));
209 208
210 const RenderLayerModelObject* paintInvalidationContainer = box().containerFo rPaintInvalidation();
211
212 // Update the positions of our child layers (if needed as only fixed layers should be impacted by a scroll). 209 // Update the positions of our child layers (if needed as only fixed layers should be impacted by a scroll).
213 // We don't update compositing layers, because we need to do a deep update f rom the compositing ancestor. 210 // We don't update compositing layers, because we need to do a deep update f rom the compositing ancestor.
214 if (!frameView->isInPerformLayout()) { 211 if (!frameView->isInPerformLayout()) {
215 // If we're in the middle of layout, we'll just update layers once layou t has finished. 212 // If we're in the middle of layout, we'll just update layers once layou t has finished.
216 // FIXME(sky): Do we still need this? 213 // FIXME(sky): Do we still need this?
217 layer()->clipper().clearClipRectsIncludingDescendants(); 214 layer()->clipper().clearClipRectsIncludingDescendants();
218 } 215 }
219 216
220 // The caret rect needs to be invalidated after scrolling 217 // The caret rect needs to be invalidated after scrolling
221 frame->selection().setCaretRectNeedsUpdate(); 218 frame->selection().setCaretRectNeedsUpdate();
222 219
223 // TODO(ojan): Is there a better way to get this value now that we always ju st pass the empty
224 // FloatQuat to localToAbsoluteQuad?
225 FloatQuad quadForFakeMouseMoveEvent = paintInvalidationContainer->localToAbs oluteQuad(FloatQuad());
226 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent);
ojan 2015/01/23 22:23:06 Have we removed :hover? If not, then this change m
abarth-chromium 2015/01/23 22:39:29 IMHO, we should remove hover for now. We don't ha
227
228 // Schedule the scroll DOM event. 220 // Schedule the scroll DOM event.
229 if (box().node()) 221 if (box().node())
230 box().node()->document().enqueueScrollEventForNode(box().node()); 222 box().node()->document().enqueueScrollEventForNode(box().node());
231 } 223 }
232 224
233 IntPoint RenderLayerScrollableArea::scrollPosition() const 225 IntPoint RenderLayerScrollableArea::scrollPosition() const
234 { 226 {
235 return IntPoint(m_scrollOffset); 227 return IntPoint(m_scrollOffset);
236 } 228 }
237 229
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) 697 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild)
706 { 698 {
707 // We only want to track the topmost scroll child for scrollable areas with 699 // We only want to track the topmost scroll child for scrollable areas with
708 // overlay scrollbars. 700 // overlay scrollbars.
709 if (!hasOverlayScrollbars()) 701 if (!hasOverlayScrollbars())
710 return; 702 return;
711 m_nextTopmostScrollChild = scrollChild; 703 m_nextTopmostScrollChild = scrollChild;
712 } 704 }
713 705
714 } // namespace blink 706 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/page/Page.h ('k') | sky/engine/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698