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 4951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5171 .c_str()); | 5168 .c_str()); |
5172 return result; | 5169 return result; |
5173 } | 5170 } |
5174 | 5171 |
5175 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( | 5172 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( |
5176 m_mainThreadScrollingReasons) | 5173 m_mainThreadScrollingReasons) |
5177 .c_str()); | 5174 .c_str()); |
5178 return result; | 5175 return result; |
5179 } | 5176 } |
5180 | 5177 |
5181 void FrameView::adjustStyleRelatedMainThreadScrollingReasons( | |
5182 const uint32_t reason, | |
5183 bool increase) { | |
5184 int index = MainThreadScrollingReason::getReasonIndex(reason); | |
5185 DCHECK_GE(index, 0); | |
5186 m_mainThreadScrollingReasonsCounter[index] += increase ? 1 : -1; | |
5187 DCHECK_GE(m_mainThreadScrollingReasonsCounter[index], 0); | |
5188 } | |
5189 | |
5190 MainThreadScrollingReasons | |
5191 FrameView::getStyleRelatedMainThreadScrollingReasons() const { | |
5192 MainThreadScrollingReasons reasons = | |
5193 static_cast<MainThreadScrollingReasons>(0); | |
5194 for (uint32_t reason = 0; | |
5195 reason < MainThreadScrollingReason::kMainThreadScrollingReasonCount; | |
5196 ++reason) { | |
5197 if (m_mainThreadScrollingReasonsCounter[reason] > 0) { | |
5198 reasons |= 1 << reason; | |
5199 } | |
5200 } | |
5201 return reasons; | |
5202 } | |
5203 | |
5204 void FrameView::setViewportIntersectionFromParent( | 5178 void FrameView::setViewportIntersectionFromParent( |
5205 const IntRect& viewportIntersection) { | 5179 const IntRect& viewportIntersection) { |
5206 if (m_remoteViewportIntersection != viewportIntersection) { | 5180 if (m_remoteViewportIntersection != viewportIntersection) { |
5207 m_remoteViewportIntersection = viewportIntersection; | 5181 m_remoteViewportIntersection = viewportIntersection; |
5208 scheduleAnimation(); | 5182 scheduleAnimation(); |
5209 } | 5183 } |
5210 } | 5184 } |
5211 | 5185 |
5212 IntRect FrameView::remoteViewportIntersection() { | 5186 IntRect FrameView::remoteViewportIntersection() { |
5213 IntRect intersection(m_remoteViewportIntersection); | 5187 IntRect intersection(m_remoteViewportIntersection); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5267 void FrameView::setAnimationHost( | 5241 void FrameView::setAnimationHost( |
5268 std::unique_ptr<CompositorAnimationHost> host) { | 5242 std::unique_ptr<CompositorAnimationHost> host) { |
5269 m_animationHost = std::move(host); | 5243 m_animationHost = std::move(host); |
5270 } | 5244 } |
5271 | 5245 |
5272 LayoutUnit FrameView::caretWidth() const { | 5246 LayoutUnit FrameView::caretWidth() const { |
5273 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5247 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
5274 } | 5248 } |
5275 | 5249 |
5276 } // namespace blink | 5250 } // namespace blink |
OLD | NEW |