OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "core/html/HTMLIFrameElement.h" | 29 #include "core/html/HTMLIFrameElement.h" |
30 #include "core/page/Page.h" | 30 #include "core/page/Page.h" |
31 #include "core/rendering/ColumnInfo.h" | 31 #include "core/rendering/ColumnInfo.h" |
32 #include "core/rendering/FlowThreadController.h" | 32 #include "core/rendering/FlowThreadController.h" |
33 #include "core/rendering/GraphicsContextAnnotator.h" | 33 #include "core/rendering/GraphicsContextAnnotator.h" |
34 #include "core/rendering/HitTestResult.h" | 34 #include "core/rendering/HitTestResult.h" |
35 #include "core/rendering/RenderFlowThread.h" | 35 #include "core/rendering/RenderFlowThread.h" |
36 #include "core/rendering/RenderGeometryMap.h" | 36 #include "core/rendering/RenderGeometryMap.h" |
37 #include "core/rendering/RenderLayer.h" | 37 #include "core/rendering/RenderLayer.h" |
38 #include "core/rendering/RenderPart.h" | 38 #include "core/rendering/RenderPart.h" |
| 39 #include "core/rendering/RenderQuote.h" |
39 #include "core/rendering/RenderSelectionInfo.h" | 40 #include "core/rendering/RenderSelectionInfo.h" |
40 #include "core/rendering/compositing/CompositedLayerMapping.h" | 41 #include "core/rendering/compositing/CompositedLayerMapping.h" |
41 #include "core/rendering/compositing/RenderLayerCompositor.h" | 42 #include "core/rendering/compositing/RenderLayerCompositor.h" |
42 #include "core/svg/SVGDocumentExtensions.h" | 43 #include "core/svg/SVGDocumentExtensions.h" |
43 #include "platform/RuntimeEnabledFeatures.h" | 44 #include "platform/RuntimeEnabledFeatures.h" |
44 #include "platform/TraceEvent.h" | 45 #include "platform/TraceEvent.h" |
45 #include "platform/geometry/FloatQuad.h" | 46 #include "platform/geometry/FloatQuad.h" |
46 #include "platform/geometry/TransformState.h" | 47 #include "platform/geometry/TransformState.h" |
47 #include "platform/graphics/GraphicsContext.h" | 48 #include "platform/graphics/GraphicsContext.h" |
48 | 49 |
49 namespace blink { | 50 namespace blink { |
50 | 51 |
51 RenderView::RenderView(Document* document) | 52 RenderView::RenderView(Document* document) |
52 : RenderBlockFlow(document) | 53 : RenderBlockFlow(document) |
53 , m_frameView(document->view()) | 54 , m_frameView(document->view()) |
54 , m_selectionStart(0) | 55 , m_selectionStart(nullptr) |
55 , m_selectionEnd(0) | 56 , m_selectionEnd(nullptr) |
56 , m_selectionStartPos(-1) | 57 , m_selectionStartPos(-1) |
57 , m_selectionEndPos(-1) | 58 , m_selectionEndPos(-1) |
58 , m_pageLogicalHeight(0) | 59 , m_pageLogicalHeight(0) |
59 , m_pageLogicalHeightChanged(false) | 60 , m_pageLogicalHeightChanged(false) |
60 , m_layoutState(0) | 61 , m_layoutState(0) |
61 , m_renderQuoteHead(0) | 62 , m_renderQuoteHead(nullptr) |
62 , m_renderCounterCount(0) | 63 , m_renderCounterCount(0) |
63 , m_hitTestCount(0) | 64 , m_hitTestCount(0) |
64 { | 65 { |
65 // init RenderObject attributes | 66 // init RenderObject attributes |
66 setInline(false); | 67 setInline(false); |
67 | 68 |
68 m_minPreferredLogicalWidth = 0; | 69 m_minPreferredLogicalWidth = 0; |
69 m_maxPreferredLogicalWidth = 0; | 70 m_maxPreferredLogicalWidth = 0; |
70 | 71 |
71 setPreferredLogicalWidthsDirty(MarkOnlyThis); | 72 setPreferredLogicalWidthsDirty(MarkOnlyThis); |
72 | 73 |
73 setPositionState(AbsolutePosition); // to 0,0 :) | 74 setPositionState(AbsolutePosition); // to 0,0 :) |
74 } | 75 } |
75 | 76 |
76 RenderView::~RenderView() | 77 RenderView::~RenderView() |
77 { | 78 { |
78 } | 79 } |
79 | 80 |
| 81 void RenderView::trace(Visitor* visitor) |
| 82 { |
| 83 visitor->trace(m_selectionStart); |
| 84 visitor->trace(m_selectionEnd); |
| 85 visitor->trace(m_renderQuoteHead); |
| 86 RenderBlockFlow::trace(visitor); |
| 87 } |
| 88 |
80 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) | 89 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) |
81 { | 90 { |
82 return hitTest(request, result.hitTestLocation(), result); | 91 return hitTest(request, result.hitTestLocation(), result); |
83 } | 92 } |
84 | 93 |
85 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) | 94 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) |
86 { | 95 { |
87 TRACE_EVENT0("blink", "RenderView::hitTest"); | 96 TRACE_EVENT0("blink", "RenderView::hitTest"); |
88 m_hitTestCount++; | 97 m_hitTestCount++; |
89 | 98 |
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 return viewWidth(IncludeScrollbars) / scale; | 1002 return viewWidth(IncludeScrollbars) / scale; |
994 } | 1003 } |
995 | 1004 |
996 double RenderView::layoutViewportHeight() const | 1005 double RenderView::layoutViewportHeight() const |
997 { | 1006 { |
998 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 1007 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
999 return viewHeight(IncludeScrollbars) / scale; | 1008 return viewHeight(IncludeScrollbars) / scale; |
1000 } | 1009 } |
1001 | 1010 |
1002 } // namespace blink | 1011 } // namespace blink |
OLD | NEW |