OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 m_subtreeThrottled(false), | 196 m_subtreeThrottled(false), |
197 m_lifecycleUpdatesThrottled(false), | 197 m_lifecycleUpdatesThrottled(false), |
198 m_needsPaintPropertyUpdate(true), | 198 m_needsPaintPropertyUpdate(true), |
199 m_currentUpdateLifecyclePhasesTargetState( | 199 m_currentUpdateLifecyclePhasesTargetState( |
200 DocumentLifecycle::Uninitialized), | 200 DocumentLifecycle::Uninitialized), |
201 m_scrollAnchor(this), | 201 m_scrollAnchor(this), |
202 m_scrollbarManager(*this), | 202 m_scrollbarManager(*this), |
203 m_needsScrollbarsUpdate(false), | 203 m_needsScrollbarsUpdate(false), |
204 m_suppressAdjustViewSize(false), | 204 m_suppressAdjustViewSize(false), |
205 m_allowsLayoutInvalidationAfterLayoutClean(true), | 205 m_allowsLayoutInvalidationAfterLayoutClean(true), |
206 m_mainThreadScrollingReasons(0), | 206 m_mainThreadScrollingReasons(0) { |
207 m_mainThreadScrollingReasonsCounter( | |
208 MainThreadScrollingReason::kMainThreadScrollingReasonCount, | |
209 0) { | |
210 init(); | 207 init(); |
211 } | 208 } |
212 | 209 |
213 FrameView* FrameView::create(LocalFrame& frame) { | 210 FrameView* FrameView::create(LocalFrame& frame) { |
214 FrameView* view = new FrameView(frame); | 211 FrameView* view = new FrameView(frame); |
215 view->show(); | 212 view->show(); |
216 return view; | 213 return view; |
217 } | 214 } |
218 | 215 |
219 FrameView* FrameView::create(LocalFrame& frame, const IntSize& initialSize) { | 216 FrameView* FrameView::create(LocalFrame& frame, const IntSize& initialSize) { |
(...skipping 4921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5141 .c_str()); | 5138 .c_str()); |
5142 return result; | 5139 return result; |
5143 } | 5140 } |
5144 | 5141 |
5145 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( | 5142 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( |
5146 m_mainThreadScrollingReasons) | 5143 m_mainThreadScrollingReasons) |
5147 .c_str()); | 5144 .c_str()); |
5148 return result; | 5145 return result; |
5149 } | 5146 } |
5150 | 5147 |
5151 void FrameView::adjustStyleRelatedMainThreadScrollingReasons( | |
5152 const uint32_t reason, | |
5153 bool increase) { | |
5154 int index = MainThreadScrollingReason::getReasonIndex(reason); | |
5155 DCHECK_GE(index, 0); | |
5156 m_mainThreadScrollingReasonsCounter[index] += increase ? 1 : -1; | |
5157 DCHECK_GE(m_mainThreadScrollingReasonsCounter[index], 0); | |
5158 } | |
5159 | |
5160 MainThreadScrollingReasons | |
5161 FrameView::getStyleRelatedMainThreadScrollingReasons() const { | |
5162 MainThreadScrollingReasons reasons = | |
5163 static_cast<MainThreadScrollingReasons>(0); | |
5164 for (uint32_t reason = 0; | |
5165 reason < MainThreadScrollingReason::kMainThreadScrollingReasonCount; | |
5166 ++reason) { | |
5167 if (m_mainThreadScrollingReasonsCounter[reason] > 0) { | |
5168 reasons |= 1 << reason; | |
5169 } | |
5170 } | |
5171 return reasons; | |
5172 } | |
5173 | |
5174 void FrameView::setViewportIntersectionFromParent( | 5148 void FrameView::setViewportIntersectionFromParent( |
5175 const IntRect& viewportIntersection) { | 5149 const IntRect& viewportIntersection) { |
5176 if (m_remoteViewportIntersection != viewportIntersection) { | 5150 if (m_remoteViewportIntersection != viewportIntersection) { |
5177 m_remoteViewportIntersection = viewportIntersection; | 5151 m_remoteViewportIntersection = viewportIntersection; |
5178 scheduleAnimation(); | 5152 scheduleAnimation(); |
5179 } | 5153 } |
5180 } | 5154 } |
5181 | 5155 |
5182 IntRect FrameView::remoteViewportIntersection() { | 5156 IntRect FrameView::remoteViewportIntersection() { |
5183 IntRect intersection(m_remoteViewportIntersection); | 5157 IntRect intersection(m_remoteViewportIntersection); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5237 void FrameView::setAnimationHost( | 5211 void FrameView::setAnimationHost( |
5238 std::unique_ptr<CompositorAnimationHost> host) { | 5212 std::unique_ptr<CompositorAnimationHost> host) { |
5239 m_animationHost = std::move(host); | 5213 m_animationHost = std::move(host); |
5240 } | 5214 } |
5241 | 5215 |
5242 LayoutUnit FrameView::caretWidth() const { | 5216 LayoutUnit FrameView::caretWidth() const { |
5243 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5217 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
5244 } | 5218 } |
5245 | 5219 |
5246 } // namespace blink | 5220 } // namespace blink |
OLD | NEW |