OLD | NEW |
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 void removeResizerArea(RenderBox*); | 286 void removeResizerArea(RenderBox*); |
290 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); } | 287 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); } |
291 | 288 |
292 virtual void removeChild(Widget*) OVERRIDE; | 289 virtual void removeChild(Widget*) OVERRIDE; |
293 | 290 |
294 // This function exists for ports that need to handle wheel events manually. | 291 // This function exists for ports that need to handle wheel events manually. |
295 // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but o
n most other platforms | 292 // On Mac WebKit1 the underlying NSScrollView just does the scrolling, but o
n most other platforms |
296 // we need this function in order to do the scroll ourselves. | 293 // we need this function in order to do the scroll ourselves. |
297 bool wheelEvent(const PlatformWheelEvent&); | 294 bool wheelEvent(const PlatformWheelEvent&); |
298 | 295 |
299 const Pagination& pagination() const { return m_pagination; } | |
300 | |
301 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; } | 296 bool inProgrammaticScroll() const { return m_inProgrammaticScroll; } |
302 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro
ll = programmaticScroll; } | 297 void setInProgrammaticScroll(bool programmaticScroll) { m_inProgrammaticScro
ll = programmaticScroll; } |
303 | 298 |
304 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters =
hasSoftwareFilters; } | 299 void setHasSoftwareFilters(bool hasSoftwareFilters) { m_hasSoftwareFilters =
hasSoftwareFilters; } |
305 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } | 300 bool hasSoftwareFilters() const { return m_hasSoftwareFilters; } |
306 | 301 |
307 virtual bool isActive() const OVERRIDE; | 302 virtual bool isActive() const OVERRIDE; |
308 | 303 |
309 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead. | 304 // DEPRECATED: Use viewportConstrainedVisibleContentRect() instead. |
310 IntSize scrollOffsetForFixedPosition() const; | 305 IntSize scrollOffsetForFixedPosition() const; |
(...skipping 20 matching lines...) Expand all Loading... |
331 virtual void frameRectsChanged() OVERRIDE; | 326 virtual void frameRectsChanged() OVERRIDE; |
332 virtual bool isFrameView() const OVERRIDE { return true; } | 327 virtual bool isFrameView() const OVERRIDE { return true; } |
333 | 328 |
334 friend class RenderWidget; | 329 friend class RenderWidget; |
335 bool useSlowRepaints(bool considerOverlap = true) const; | 330 bool useSlowRepaints(bool considerOverlap = true) const; |
336 bool useSlowRepaintsIfNotOverlapped() const; | 331 bool useSlowRepaintsIfNotOverlapped() const; |
337 void updateCanBlitOnScrollRecursively(); | 332 void updateCanBlitOnScrollRecursively(); |
338 bool contentsInCompositedLayer() const; | 333 bool contentsInCompositedLayer() const; |
339 | 334 |
340 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); | 335 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); |
341 void applyPaginationToViewport(); | |
342 void setPagination(const Pagination&); | |
343 | |
344 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); | 336 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
345 | 337 |
346 void paintControlTints(); | 338 void paintControlTints(); |
347 | 339 |
348 void updateCounters(); | 340 void updateCounters(); |
349 void autoSizeIfEnabled(); | 341 void autoSizeIfEnabled(); |
350 void forceLayoutParentViewIfNeeded(); | 342 void forceLayoutParentViewIfNeeded(); |
351 void performPreLayoutTasks(); | 343 void performPreLayoutTasks(); |
352 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); | 344 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); |
353 void scheduleOrPerformPostLayoutTasks(); | 345 void scheduleOrPerformPostLayoutTasks(); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 float m_lastZoomFactor; | 453 float m_lastZoomFactor; |
462 | 454 |
463 AtomicString m_mediaType; | 455 AtomicString m_mediaType; |
464 AtomicString m_mediaTypeWhenNotPrinting; | 456 AtomicString m_mediaTypeWhenNotPrinting; |
465 | 457 |
466 bool m_overflowStatusDirty; | 458 bool m_overflowStatusDirty; |
467 bool m_horizontalOverflow; | 459 bool m_horizontalOverflow; |
468 bool m_verticalOverflow; | 460 bool m_verticalOverflow; |
469 RenderObject* m_viewportRenderer; | 461 RenderObject* m_viewportRenderer; |
470 | 462 |
471 Pagination m_pagination; | |
472 | |
473 bool m_wasScrolledByUser; | 463 bool m_wasScrolledByUser; |
474 bool m_inProgrammaticScroll; | 464 bool m_inProgrammaticScroll; |
475 bool m_safeToPropagateScrollToParent; | 465 bool m_safeToPropagateScrollToParent; |
476 | 466 |
477 double m_lastPaintTime; | 467 double m_lastPaintTime; |
478 | 468 |
479 bool m_isTrackingRepaints; // Used for testing. | 469 bool m_isTrackingRepaints; // Used for testing. |
480 Vector<IntRect> m_trackedRepaintRects; | 470 Vector<IntRect> m_trackedRepaintRects; |
481 | 471 |
482 RefPtr<Node> m_nodeToDraw; | 472 RefPtr<Node> m_nodeToDraw; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 m_view->setCanRepaintDuringPerformLayout(m_originalValue); | 557 m_view->setCanRepaintDuringPerformLayout(m_originalValue); |
568 } | 558 } |
569 private: | 559 private: |
570 FrameView* m_view; | 560 FrameView* m_view; |
571 bool m_originalValue; | 561 bool m_originalValue; |
572 }; | 562 }; |
573 | 563 |
574 } // namespace WebCore | 564 } // namespace WebCore |
575 | 565 |
576 #endif // FrameView_h | 566 #endif // FrameView_h |
OLD | NEW |