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

Side by Side Diff: Source/core/frame/FrameView.h

Issue 157553002: Remove the Pagination struct, clean up viewport scroll policy propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
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
11 License as published by the Free Software Foundation; either 11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version. 12 version 2 of the License, or (at your option) any later version.
13 13
14 This library is distributed in the hope that it will be useful, 14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details. 17 Library General Public License for more details.
18 18
19 You should have received a copy of the GNU Library General Public License 19 You should have received a copy of the GNU Library General Public License
20 along with this library; see the file COPYING.LIB. If not, write to 20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA. 22 Boston, MA 02110-1301, USA.
23 */ 23 */
24 24
25 #ifndef FrameView_h 25 #ifndef FrameView_h
26 #define FrameView_h 26 #define FrameView_h
27 27
28 #include "core/frame/AdjustViewSizeOrNot.h" 28 #include "core/frame/AdjustViewSizeOrNot.h"
29 #include "core/rendering/Pagination.h"
30 #include "core/rendering/PaintPhase.h" 29 #include "core/rendering/PaintPhase.h"
31 #include "core/rendering/PartialLayoutState.h" 30 #include "core/rendering/PartialLayoutState.h"
32 #include "platform/geometry/LayoutRect.h" 31 #include "platform/geometry/LayoutRect.h"
33 #include "platform/graphics/Color.h" 32 #include "platform/graphics/Color.h"
34 #include "platform/scroll/ScrollView.h" 33 #include "platform/scroll/ScrollView.h"
35 #include "wtf/Forward.h" 34 #include "wtf/Forward.h"
36 #include "wtf/OwnPtr.h" 35 #include "wtf/OwnPtr.h"
37 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
38 37
39 namespace WebCore { 38 namespace WebCore {
40 39
41 class AXObjectCache; 40 class AXObjectCache;
42 class Element; 41 class Element;
43 class FloatSize; 42 class FloatSize;
44 class Frame; 43 class Frame;
45 class KURL; 44 class KURL;
46 class Node; 45 class Node;
47 class Page; 46 class Page;
48 class RenderBox; 47 class RenderBox;
49 class RenderEmbeddedObject; 48 class RenderEmbeddedObject;
50 class RenderObject; 49 class RenderObject;
51 class RenderScrollbarPart; 50 class RenderScrollbarPart;
52 class RenderStyle; 51 class RenderStyle;
53 class RenderWidget; 52 class RenderWidget;
54 53
55 Pagination::Mode paginationModeForRenderStyle(RenderStyle*);
56
57 typedef unsigned long long DOMTimeStamp; 54 typedef unsigned long long DOMTimeStamp;
58 55
59 class FrameView FINAL : public ScrollView { 56 class FrameView FINAL : public ScrollView {
60 public: 57 public:
61 friend class RenderView; 58 friend class RenderView;
62 friend class Internals; 59 friend class Internals;
63 60
64 static PassRefPtr<FrameView> create(Frame*); 61 static PassRefPtr<FrameView> create(Frame*);
65 static PassRefPtr<FrameView> create(Frame*, const IntSize& initialSize); 62 static PassRefPtr<FrameView> create(Frame*, const IntSize& initialSize);
66 63
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 void removeResizerArea(RenderBox*); 284 void removeResizerArea(RenderBox*);
288 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); } 285 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); }
289 286
290 virtual void removeChild(Widget*) OVERRIDE; 287 virtual void removeChild(Widget*) OVERRIDE;
291 288
292 // This function exists for ports that need to handle wheel events manually. 289 // This function exists for ports that need to handle wheel events manually.
293 // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but o n most other platforms 290 // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but o n most other platforms
294 // we need this function in order to do the scroll ourselves. 291 // we need this function in order to do the scroll ourselves.
295 bool wheelEvent(const PlatformWheelEvent&); 292 bool wheelEvent(const PlatformWheelEvent&);
296 293
297 const Pagination& pagination() const { return m_pagination; }
298
299 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; } 294 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; }
300 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; } 295 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro ll = programmaticScroll; }
301 296
302 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; } 297 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters = hasSoftwareFilters; }
303 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } 298 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; }
304 299
305 virtual bool isActive() const OVERRIDE; 300 virtual bool isActive() const OVERRIDE;
306 301
307 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead. 302 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead.
308 IntSize scrollOffsetForFixedPosition() const; 303 IntSize scrollOffsetForFixedPosition() const;
(...skipping 20 matching lines...) Expand all
329 virtual void frameRectsChanged() OVERRIDE; 324 virtual void frameRectsChanged() OVERRIDE;
330 virtual bool isFrameView() const OVERRIDE { return true; } 325 virtual bool isFrameView() const OVERRIDE { return true; }
331 326
332 friend class RenderWidget; 327 friend class RenderWidget;
333 bool useSlowRepaints(bool considerOverlap = true) const; 328 bool useSlowRepaints(bool considerOverlap = true) const;
334 bool useSlowRepaintsIfNotOverlapped() const; 329 bool useSlowRepaintsIfNotOverlapped() const;
335 void updateCanBlitOnScrollRecursively(); 330 void updateCanBlitOnScrollRecursively();
336 bool contentsInCompositedLayer() const; 331 bool contentsInCompositedLayer() const;
337 332
338 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo de, ScrollbarMode& vMode); 333 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo de, ScrollbarMode& vMode);
339 void applyPaginationToViewport();
340 void setPagination(const Pagination&);
341
342 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); 334 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow);
343 335
344 void paintControlTints(); 336 void paintControlTints();
345 337
346 void updateCounters(); 338 void updateCounters();
347 void autoSizeIfEnabled(); 339 void autoSizeIfEnabled();
348 void forceLayoutParentViewIfNeeded(); 340 void forceLayoutParentViewIfNeeded();
349 void performPreLayoutTasks(); 341 void performPreLayoutTasks();
350 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); 342 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout);
351 void scheduleOrPerformPostLayoutTasks(); 343 void scheduleOrPerformPostLayoutTasks();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 float m_lastZoomFactor; 449 float m_lastZoomFactor;
458 450
459 AtomicString m_mediaType; 451 AtomicString m_mediaType;
460 AtomicString m_mediaTypeWhenNotPrinting; 452 AtomicString m_mediaTypeWhenNotPrinting;
461 453
462 bool m_overflowStatusDirty; 454 bool m_overflowStatusDirty;
463 bool m_horizontalOverflow; 455 bool m_horizontalOverflow;
464 bool m_verticalOverflow; 456 bool m_verticalOverflow;
465 RenderObject* m_viewportRenderer; 457 RenderObject* m_viewportRenderer;
466 458
467 Pagination m_pagination;
468
469 bool m_wasScrolledByUser; 459 bool m_wasScrolledByUser;
470 bool m_inProgrammaticScroll; 460 bool m_inProgrammaticScroll;
471 bool m_safeToPropagateScrollToParent; 461 bool m_safeToPropagateScrollToParent;
472 462
473 double m_lastPaintTime; 463 double m_lastPaintTime;
474 464
475 bool m_isTrackingRepaints; // Used for testing. 465 bool m_isTrackingRepaints; // Used for testing.
476 Vector<IntRect> m_trackedRepaintRects; 466 Vector<IntRect> m_trackedRepaintRects;
477 467
478 RefPtr<Node> m_nodeToDraw; 468 RefPtr<Node> m_nodeToDraw;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 m_view->setCanRepaintDuringPerformLayout(m_originalValue); 551 m_view->setCanRepaintDuringPerformLayout(m_originalValue);
562 } 552 }
563 private: 553 private:
564 FrameView* m_view; 554 FrameView* m_view;
565 bool m_originalValue; 555 bool m_originalValue;
566 }; 556 };
567 557
568 } // namespace WebCore 558 } // namespace WebCore
569 559
570 #endif // FrameView_h 560 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698