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

Side by Side Diff: sky/engine/core/frame/FrameView.h

Issue 684063002: Remove more frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 float inputEventsScaleFactor() const; 132 float inputEventsScaleFactor() const;
133 IntSize inputEventsOffsetForEmulation() const; 133 IntSize inputEventsOffsetForEmulation() const;
134 void setInputEventsTransformForEmulation(const IntSize&, float); 134 void setInputEventsTransformForEmulation(const IntSize&, float);
135 135
136 AtomicString mediaType() const; 136 AtomicString mediaType() const;
137 void setMediaType(const AtomicString&); 137 void setMediaType(const AtomicString&);
138 138
139 void postLayoutTimerFired(Timer<FrameView>*); 139 void postLayoutTimerFired(Timer<FrameView>*);
140 140
141 bool wasScrolledByUser() const;
142 void setWasScrolledByUser(bool);
143
144 void paintContents(GraphicsContext*, const IntRect& damageRect); 141 void paintContents(GraphicsContext*, const IntRect& damageRect);
145 void setPaintBehavior(PaintBehavior); 142 void setPaintBehavior(PaintBehavior);
146 PaintBehavior paintBehavior() const; 143 PaintBehavior paintBehavior() const;
147 bool isPainting() const; 144 bool isPainting() const;
148 bool hasEverPainted() const { return m_lastPaintTime; } 145 bool hasEverPainted() const { return m_lastPaintTime; }
149 void setNodeToDraw(Node*); 146 void setNodeToDraw(Node*);
150 147
151 Color documentBackgroundColor() const; 148 Color documentBackgroundColor() const;
152 149
153 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; } 150 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 typedef HashSet<RenderBox*> ResizerAreaSet; 186 typedef HashSet<RenderBox*> ResizerAreaSet;
190 void addResizerArea(RenderBox&); 187 void addResizerArea(RenderBox&);
191 void removeResizerArea(RenderBox&); 188 void removeResizerArea(RenderBox&);
192 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); } 189 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); }
193 190
194 // This function exists for ports that need to handle wheel events manually. 191 // This function exists for ports that need to handle wheel events manually.
195 // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but o n most other platforms 192 // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but o n most other platforms
196 // we need this function in order to do the scroll ourselves. 193 // we need this function in order to do the scroll ourselves.
197 bool wheelEvent(const PlatformWheelEvent&); 194 bool wheelEvent(const PlatformWheelEvent&);
198 195
199 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; }
200 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; }
201
202 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; } 196 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; }
203 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } 197 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; }
204 198
205 bool isActive() const; 199 bool isActive() const;
206 200
207 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter 201 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter
208 // passed around the FrameView layout methods can be true while this returns 202 // passed around the FrameView layout methods can be true while this returns
209 // false. 203 // false.
210 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } 204 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; }
211 205
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 void invalidateTreeIfNeeded(); 244 void invalidateTreeIfNeeded();
251 245
252 void gatherDebugLayoutRects(RenderObject* layoutRoot); 246 void gatherDebugLayoutRects(RenderObject* layoutRoot);
253 247
254 DocumentLifecycle& lifecycle() const; 248 DocumentLifecycle& lifecycle() const;
255 249
256 // FIXME(sky): Remove now that we're not a ScrollView? 250 // FIXME(sky): Remove now that we're not a ScrollView?
257 void contentRectangleForPaintInvalidation(const IntRect&); 251 void contentRectangleForPaintInvalidation(const IntRect&);
258 void contentsResized(); 252 void contentsResized();
259 253
260 // Override ScrollView methods to do point conversion via renderers, in orde r to
261 // take transforms into account.
262 virtual IntRect convertToContainingView(const IntRect&) const override;
263 virtual IntRect convertFromContainingView(const IntRect&) const override;
264 virtual IntPoint convertToContainingView(const IntPoint&) const override;
265 virtual IntPoint convertFromContainingView(const IntPoint&) const override;
266
267 bool wasViewportResized(); 254 bool wasViewportResized();
268 void sendResizeEventIfNeeded(); 255 void sendResizeEventIfNeeded();
269 256
270 void updateCompositedSelectionBoundsIfNeeded(); 257 void updateCompositedSelectionBoundsIfNeeded();
271 258
272 void setLayoutSizeInternal(const IntSize&); 259 void setLayoutSizeInternal(const IntSize&);
273 260
274 bool paintInvalidationIsAllowed() const 261 bool paintInvalidationIsAllowed() const
275 { 262 {
276 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); 263 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout();
(...skipping 26 matching lines...) Expand all
303 IntSize m_lastViewportSize; 290 IntSize m_lastViewportSize;
304 float m_lastZoomFactor; 291 float m_lastZoomFactor;
305 292
306 AtomicString m_mediaType; 293 AtomicString m_mediaType;
307 294
308 bool m_overflowStatusDirty; 295 bool m_overflowStatusDirty;
309 bool m_horizontalOverflow; 296 bool m_horizontalOverflow;
310 bool m_verticalOverflow; 297 bool m_verticalOverflow;
311 RenderObject* m_viewportRenderer; 298 RenderObject* m_viewportRenderer;
312 299
313 bool m_wasScrolledByUser;
314 bool m_inProgrammaticScroll;
315
316 double m_lastPaintTime; 300 double m_lastPaintTime;
317 301
318 bool m_isTrackingPaintInvalidations; // Used for testing. 302 bool m_isTrackingPaintInvalidations; // Used for testing.
319 Vector<IntRect> m_trackedPaintInvalidationRects; 303 Vector<IntRect> m_trackedPaintInvalidationRects;
320 304
321 RefPtr<Node> m_nodeToDraw; 305 RefPtr<Node> m_nodeToDraw;
322 PaintBehavior m_paintBehavior; 306 PaintBehavior m_paintBehavior;
323 bool m_isPainting; 307 bool m_isPainting;
324 308
325 OwnPtr<ScrollableAreaSet> m_scrollableAreas; 309 OwnPtr<ScrollableAreaSet> m_scrollableAreas;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); 343 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue);
360 } 344 }
361 private: 345 private:
362 FrameView* m_view; 346 FrameView* m_view;
363 bool m_originalValue; 347 bool m_originalValue;
364 }; 348 };
365 349
366 } // namespace blink 350 } // namespace blink
367 351
368 #endif // FrameView_h 352 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/frame/FrameView.cpp » ('j') | sky/engine/core/page/EventHandler.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698