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

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

Issue 681023002: Remove a bunch of 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
« no previous file with comments | « sky/engine/core/events/MouseRelatedEvent.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('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) 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 float visibleContentScaleFactor() const { return m_visibleContentScaleFactor ; } 133 float visibleContentScaleFactor() const { return m_visibleContentScaleFactor ; }
134 void setVisibleContentScaleFactor(float); 134 void setVisibleContentScaleFactor(float);
135 135
136 float inputEventsScaleFactor() const; 136 float inputEventsScaleFactor() const;
137 IntSize inputEventsOffsetForEmulation() const; 137 IntSize inputEventsOffsetForEmulation() const;
138 void setInputEventsTransformForEmulation(const IntSize&, float); 138 void setInputEventsTransformForEmulation(const IntSize&, float);
139 139
140 // This is different than visibleContentRect() in that it ignores negative ( or overly positive) 140 // This is different than visibleContentRect() in that it ignores negative ( or overly positive)
141 // offsets from rubber-banding, and it takes zooming into account. 141 // offsets from rubber-banding, and it takes zooming into account.
142 LayoutRect viewportConstrainedVisibleContentRect() const;
143 void viewportConstrainedVisibleContentSizeChanged(bool widthChanged, bool he ightChanged); 142 void viewportConstrainedVisibleContentSizeChanged(bool widthChanged, bool he ightChanged);
144 143
145 AtomicString mediaType() const; 144 AtomicString mediaType() const;
146 void setMediaType(const AtomicString&); 145 void setMediaType(const AtomicString&);
147 146
148 void addSlowRepaintObject(); 147 void addSlowRepaintObject();
149 void removeSlowRepaintObject(); 148 void removeSlowRepaintObject();
150 bool hasSlowRepaintObjects() const { return m_slowRepaintObjectCount; } 149 bool hasSlowRepaintObjects() const { return m_slowRepaintObjectCount; }
151 150
152 // Fixed-position objects. 151 // Fixed-position objects.
(...skipping 14 matching lines...) Expand all
167 void removeWidget(RenderWidget*); 166 void removeWidget(RenderWidget*);
168 void updateWidgetPositions(); 167 void updateWidgetPositions();
169 168
170 void paintContents(GraphicsContext*, const IntRect& damageRect); 169 void paintContents(GraphicsContext*, const IntRect& damageRect);
171 void setPaintBehavior(PaintBehavior); 170 void setPaintBehavior(PaintBehavior);
172 PaintBehavior paintBehavior() const; 171 PaintBehavior paintBehavior() const;
173 bool isPainting() const; 172 bool isPainting() const;
174 bool hasEverPainted() const { return m_lastPaintTime; } 173 bool hasEverPainted() const { return m_lastPaintTime; }
175 void setNodeToDraw(Node*); 174 void setNodeToDraw(Node*);
176 175
177 // FIXME(sky): Remove
178 void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalOverhangA rea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
179
180 Color documentBackgroundColor() const; 176 Color documentBackgroundColor() const;
181 177
182 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; } 178 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; }
183 179
184 void updateLayoutAndStyleForPainting(); 180 void updateLayoutAndStyleForPainting();
185 void updateLayoutAndStyleIfNeededRecursive(); 181 void updateLayoutAndStyleIfNeededRecursive();
186 182
187 void invalidateTreeIfNeededRecursive(); 183 void invalidateTreeIfNeededRecursive();
188 184
189 void forceLayout(bool allowSubtree = false); 185 void forceLayout(bool allowSubtree = false);
(...skipping 10 matching lines...) Expand all
200 196
201 enum ScrollbarModesCalculationStrategy { RulesFromWebContentOnly, AnyRule }; 197 enum ScrollbarModesCalculationStrategy { RulesFromWebContentOnly, AnyRule };
202 void calculateScrollbarModesForLayoutAndSetViewportRenderer(ScrollbarMode& h Mode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule); 198 void calculateScrollbarModesForLayoutAndSetViewportRenderer(ScrollbarMode& h Mode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy = AnyRule);
203 199
204 // FIXME(sky): Maybe remove now that we're not a ScrollView? 200 // FIXME(sky): Maybe remove now that we're not a ScrollView?
205 IntPoint lastKnownMousePosition() const; 201 IntPoint lastKnownMousePosition() const;
206 bool shouldSetCursor() const; 202 bool shouldSetCursor() const;
207 203
208 void setCursor(const Cursor&); 204 void setCursor(const Cursor&);
209 205
210 // FIXME(sky): Remove
211 bool scrollbarsCanBeActive() const;
212
213 // FIXME: Remove this method once plugin loading is decoupled from layout. 206 // FIXME: Remove this method once plugin loading is decoupled from layout.
214 void flushAnyPendingPostLayoutTasks(); 207 void flushAnyPendingPostLayoutTasks();
215 208
216 void setTracksPaintInvalidations(bool); 209 void setTracksPaintInvalidations(bool);
217 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida tions; } 210 bool isTrackingPaintInvalidations() const { return m_isTrackingPaintInvalida tions; }
218 void resetTrackedPaintInvalidations(); 211 void resetTrackedPaintInvalidations();
219 212
220 String trackedPaintInvalidationRectsAsText() const; 213 String trackedPaintInvalidationRectsAsText() const;
221 214
222 typedef HashSet<ScrollableArea*> ScrollableAreaSet; 215 typedef HashSet<ScrollableArea*> ScrollableAreaSet;
(...skipping 18 matching lines...) Expand all
241 bool wheelEvent(const PlatformWheelEvent&); 234 bool wheelEvent(const PlatformWheelEvent&);
242 235
243 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; } 236 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; }
244 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; } 237 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; }
245 238
246 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; } 239 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; }
247 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } 240 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; }
248 241
249 bool isActive() const; 242 bool isActive() const;
250 243
251 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead.
252 IntSize scrollOffsetForFixedPosition() const;
253
254 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter 244 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter
255 // passed around the FrameView layout methods can be true while this returns 245 // passed around the FrameView layout methods can be true while this returns
256 // false. 246 // false.
257 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; } 247 bool isSubtreeLayout() const { return !!m_layoutSubtreeRoot; }
258 248
259 // Sets the tickmarks for the FrameView, overriding the default behavior 249 // Sets the tickmarks for the FrameView, overriding the default behavior
260 // which is to display the tickmarks corresponding to find results. 250 // which is to display the tickmarks corresponding to find results.
261 // If |m_tickmarks| is empty, the default behavior is restored. 251 // If |m_tickmarks| is empty, the default behavior is restored.
262 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark s; } 252 void setTickmarks(const Vector<IntRect>& tickmarks) { m_tickmarks = tickmark s; }
263 253
(...skipping 19 matching lines...) Expand all
283 IntPoint contentsToWindow(const IntPoint& contentsPoint) const { return cont entsToWindow(contentsPoint); } 273 IntPoint contentsToWindow(const IntPoint& contentsPoint) const { return cont entsToWindow(contentsPoint); }
284 IntRect windowToContents(const IntRect& windowRect) const { return convertFr omContainingWindow(windowRect); } 274 IntRect windowToContents(const IntRect& windowRect) const { return convertFr omContainingWindow(windowRect); }
285 IntRect contentsToWindow(const IntRect& contentsRect) const { return content sToWindow(contentsRect); } 275 IntRect contentsToWindow(const IntRect& contentsRect) const { return content sToWindow(contentsRect); }
286 IntSize scrollOffset() const { return IntSize(); } 276 IntSize scrollOffset() const { return IntSize(); }
287 IntPoint minimumScrollPosition() const { return IntPoint(); } 277 IntPoint minimumScrollPosition() const { return IntPoint(); }
288 IntPoint maximumScrollPosition() const { return IntPoint(); } 278 IntPoint maximumScrollPosition() const { return IntPoint(); }
289 IntPoint scrollPosition() const { return IntPoint(); } 279 IntPoint scrollPosition() const { return IntPoint(); }
290 bool scheduleAnimation(); 280 bool scheduleAnimation();
291 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t { return IntRect(IntPoint(), expandedIntSize(frameRect().size())); } 281 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t { return IntRect(IntPoint(), expandedIntSize(frameRect().size())); }
292 IntSize unscaledVisibleContentSize(IncludeScrollbarsInRect = ExcludeScrollba rs) const { return frameRect().size(); } 282 IntSize unscaledVisibleContentSize(IncludeScrollbarsInRect = ExcludeScrollba rs) const { return frameRect().size(); }
293 IntPoint clampScrollPosition(const IntPoint& scrollPosition) const { return scrollPosition; }
294 const IntPoint scrollOrigin() const { return IntPoint(); }
295 // FIXME(sky): Not clear what values these should return. This is just what they happen to be 283 // FIXME(sky): Not clear what values these should return. This is just what they happen to be
296 // returning today. 284 // returning today.
297 bool paintsEntireContents() const { return false; } 285 bool paintsEntireContents() const { return false; }
298 bool clipsPaintInvalidations() const { return true; } 286 bool clipsPaintInvalidations() const { return true; }
299 287
300 protected: 288 protected:
301 virtual void scrollContentsIfNeeded(); 289 virtual void scrollContentsIfNeeded();
302 bool scrollContentsFastPath(const IntSize& scrollDelta); 290 bool scrollContentsFastPath(const IntSize& scrollDelta);
303 void scrollContentsSlowPath(const IntRect& updateRect); 291 void scrollContentsSlowPath(const IntRect& updateRect);
304 292
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 virtual IntRect convertToContainingView(const IntRect&) const override; 331 virtual IntRect convertToContainingView(const IntRect&) const override;
344 virtual IntRect convertFromContainingView(const IntRect&) const override; 332 virtual IntRect convertFromContainingView(const IntRect&) const override;
345 virtual IntPoint convertToContainingView(const IntPoint&) const override; 333 virtual IntPoint convertToContainingView(const IntPoint&) const override;
346 virtual IntPoint convertFromContainingView(const IntPoint&) const override; 334 virtual IntPoint convertFromContainingView(const IntPoint&) const override;
347 335
348 void updateWidgetPositionsIfNeeded(); 336 void updateWidgetPositionsIfNeeded();
349 337
350 bool wasViewportResized(); 338 bool wasViewportResized();
351 void sendResizeEventIfNeeded(); 339 void sendResizeEventIfNeeded();
352 340
353 // FIXME(sky): Remove now that we're not a ScrollView?
354 void notifyPageThatContentAreaWillPaint() const;
355
356 void scrollPositionChanged(); 341 void scrollPositionChanged();
357 void didScrollTimerFired(Timer<FrameView>*); 342 void didScrollTimerFired(Timer<FrameView>*);
358 343
359 void updateLayersAndCompositingAfterScrollIfNeeded(); 344 void updateLayersAndCompositingAfterScrollIfNeeded();
360 void updateFixedElementPaintInvalidationRectsAfterScroll(); 345 void updateFixedElementPaintInvalidationRectsAfterScroll();
361 void updateCompositedSelectionBoundsIfNeeded(); 346 void updateCompositedSelectionBoundsIfNeeded();
362 347
363 void setLayoutSizeInternal(const IntSize&); 348 void setLayoutSizeInternal(const IntSize&);
364 349
365 bool paintInvalidationIsAllowed() const 350 bool paintInvalidationIsAllowed() const
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); 448 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue);
464 } 449 }
465 private: 450 private:
466 FrameView* m_view; 451 FrameView* m_view;
467 bool m_originalValue; 452 bool m_originalValue;
468 }; 453 };
469 454
470 } // namespace blink 455 } // namespace blink
471 456
472 #endif // FrameView_h 457 #endif // FrameView_h
OLDNEW
« no previous file with comments | « sky/engine/core/events/MouseRelatedEvent.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698