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 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class Element; | 43 class Element; |
44 class FloatSize; | 44 class FloatSize; |
45 class HTMLFrameOwnerElement; | 45 class HTMLFrameOwnerElement; |
46 class LocalFrame; | 46 class LocalFrame; |
47 class KURL; | 47 class KURL; |
48 class Node; | 48 class Node; |
49 class Page; | 49 class Page; |
50 class RenderBox; | 50 class RenderBox; |
51 class RenderEmbeddedObject; | 51 class RenderEmbeddedObject; |
52 class RenderObject; | 52 class RenderObject; |
| 53 class RenderPart; |
53 class RenderScrollbarPart; | 54 class RenderScrollbarPart; |
54 class RenderView; | 55 class RenderView; |
55 class RenderWidget; | |
56 struct CompositedSelectionBound; | 56 struct CompositedSelectionBound; |
57 | 57 |
58 typedef unsigned long long DOMTimeStamp; | 58 typedef unsigned long long DOMTimeStamp; |
59 | 59 |
60 // FIXME: Oilpan: move Widget (and thereby FrameView) to the heap. | 60 // FIXME: Oilpan: move Widget (and thereby FrameView) to the heap. |
61 class FrameView final : public ScrollView { | 61 class FrameView final : public ScrollView { |
62 public: | 62 public: |
63 friend class RenderView; | 63 friend class RenderView; |
64 friend class Internals; | 64 friend class Internals; |
65 | 65 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 void restoreScrollbar(); | 188 void restoreScrollbar(); |
189 | 189 |
190 void postLayoutTimerFired(Timer<FrameView>*); | 190 void postLayoutTimerFired(Timer<FrameView>*); |
191 | 191 |
192 bool wasScrolledByUser() const; | 192 bool wasScrolledByUser() const; |
193 void setWasScrolledByUser(bool); | 193 void setWasScrolledByUser(bool); |
194 | 194 |
195 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT
oParent; } | 195 bool safeToPropagateScrollToParent() const { return m_safeToPropagateScrollT
oParent; } |
196 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll
ToParent = isSafe; } | 196 void setSafeToPropagateScrollToParent(bool isSafe) { m_safeToPropagateScroll
ToParent = isSafe; } |
197 | 197 |
198 void addWidget(RenderWidget*); | 198 void addPart(RenderPart*); |
199 void removeWidget(RenderWidget*); | 199 void removePart(RenderPart*); |
| 200 |
200 void updateWidgetPositions(); | 201 void updateWidgetPositions(); |
201 | 202 |
202 void addWidgetToUpdate(RenderEmbeddedObject&); | 203 void addPartToUpdate(RenderEmbeddedObject&); |
203 | 204 |
204 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) over
ride; | 205 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) over
ride; |
205 void setPaintBehavior(PaintBehavior); | 206 void setPaintBehavior(PaintBehavior); |
206 PaintBehavior paintBehavior() const; | 207 PaintBehavior paintBehavior() const; |
207 bool isPainting() const; | 208 bool isPainting() const; |
208 bool hasEverPainted() const { return m_lastPaintTime; } | 209 bool hasEverPainted() const { return m_lastPaintTime; } |
209 void setNodeToDraw(Node*); | 210 void setNodeToDraw(Node*); |
210 | 211 |
211 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) over
ride; | 212 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) over
ride; |
212 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect)
override; | 213 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect)
override; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 346 |
346 private: | 347 private: |
347 explicit FrameView(LocalFrame*); | 348 explicit FrameView(LocalFrame*); |
348 | 349 |
349 void reset(); | 350 void reset(); |
350 void init(); | 351 void init(); |
351 | 352 |
352 virtual void frameRectsChanged() override; | 353 virtual void frameRectsChanged() override; |
353 virtual bool isFrameView() const override { return true; } | 354 virtual bool isFrameView() const override { return true; } |
354 | 355 |
355 friend class RenderWidget; | 356 friend class RenderPart; |
356 | 357 |
357 bool contentsInCompositedLayer() const; | 358 bool contentsInCompositedLayer() const; |
358 | 359 |
359 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); | 360 void applyOverflowToViewportAndSetRenderer(RenderObject*, ScrollbarMode& hMo
de, ScrollbarMode& vMode); |
360 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); | 361 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
361 | 362 |
362 void updateCounters(); | 363 void updateCounters(); |
363 void forceLayoutParentViewIfNeeded(); | 364 void forceLayoutParentViewIfNeeded(); |
364 void performPreLayoutTasks(); | 365 void performPreLayoutTasks(); |
365 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); | 366 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 { | 422 { |
422 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); | 423 return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); |
423 } | 424 } |
424 | 425 |
425 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache | 426 static double s_currentFrameTimeStamp; // used for detecting decoded resourc
e thrash in the cache |
426 static bool s_inPaintContents; | 427 static bool s_inPaintContents; |
427 | 428 |
428 LayoutSize m_size; | 429 LayoutSize m_size; |
429 | 430 |
430 typedef WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > Embedde
dObjectSet; | 431 typedef WillBeHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > Embedde
dObjectSet; |
431 WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > m_wid
getUpdateSet; | 432 WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderEmbeddedObject> > m_par
tUpdateSet; |
432 | 433 |
433 // FIXME: These are just "children" of the FrameView and should be RefPtr<Wi
dget> instead. | 434 // FIXME: These are just "children" of the FrameView and should be RefPtr<Wi
dget> instead. |
434 WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderWidget> > m_widgets; | 435 WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderPart> > m_parts; |
435 | 436 |
436 // Oilpan: the use of a persistent back reference 'emulates' the | 437 // Oilpan: the use of a persistent back reference 'emulates' the |
437 // RefPtr-cycle that is kept between the two objects non-Oilpan. | 438 // RefPtr-cycle that is kept between the two objects non-Oilpan. |
438 // | 439 // |
439 // That cycle is broken when a LocalFrame is detached by | 440 // That cycle is broken when a LocalFrame is detached by |
440 // FrameLoader::detachFromParent(), it then clears its | 441 // FrameLoader::detachFromParent(), it then clears its |
441 // FrameView's m_frame reference by calling setView(nullptr). | 442 // FrameView's m_frame reference by calling setView(nullptr). |
442 RefPtrWillBePersistent<LocalFrame> m_frame; | 443 RefPtrWillBePersistent<LocalFrame> m_frame; |
443 | 444 |
444 bool m_doFullPaintInvalidation; | 445 bool m_doFullPaintInvalidation; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); | 562 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); |
562 } | 563 } |
563 private: | 564 private: |
564 FrameView* m_view; | 565 FrameView* m_view; |
565 bool m_originalValue; | 566 bool m_originalValue; |
566 }; | 567 }; |
567 | 568 |
568 } // namespace blink | 569 } // namespace blink |
569 | 570 |
570 #endif // FrameView_h | 571 #endif // FrameView_h |
OLD | NEW |