| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 m_subtreeThrottled(false), | 197 m_subtreeThrottled(false), |
| 198 m_lifecycleUpdatesThrottled(false), | 198 m_lifecycleUpdatesThrottled(false), |
| 199 m_needsPaintPropertyUpdate(true), | 199 m_needsPaintPropertyUpdate(true), |
| 200 m_currentUpdateLifecyclePhasesTargetState( | 200 m_currentUpdateLifecyclePhasesTargetState( |
| 201 DocumentLifecycle::Uninitialized), | 201 DocumentLifecycle::Uninitialized), |
| 202 m_scrollAnchor(this), | 202 m_scrollAnchor(this), |
| 203 m_scrollbarManager(*this), | 203 m_scrollbarManager(*this), |
| 204 m_needsScrollbarsUpdate(false), | 204 m_needsScrollbarsUpdate(false), |
| 205 m_suppressAdjustViewSize(false), | 205 m_suppressAdjustViewSize(false), |
| 206 m_allowsLayoutInvalidationAfterLayoutClean(true), | 206 m_allowsLayoutInvalidationAfterLayoutClean(true), |
| 207 m_mainThreadScrollingReasons(0), | 207 m_mainThreadScrollingReasons(0) { |
| 208 m_mainThreadScrollingReasonsCounter( | |
| 209 MainThreadScrollingReason::kMainThreadScrollingReasonCount, | |
| 210 0) { | |
| 211 init(); | 208 init(); |
| 212 } | 209 } |
| 213 | 210 |
| 214 FrameView* FrameView::create(LocalFrame& frame) { | 211 FrameView* FrameView::create(LocalFrame& frame) { |
| 215 FrameView* view = new FrameView(frame); | 212 FrameView* view = new FrameView(frame); |
| 216 view->show(); | 213 view->show(); |
| 217 return view; | 214 return view; |
| 218 } | 215 } |
| 219 | 216 |
| 220 FrameView* FrameView::create(LocalFrame& frame, const IntSize& initialSize) { | 217 FrameView* FrameView::create(LocalFrame& frame, const IntSize& initialSize) { |
| (...skipping 4943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5164 .c_str()); | 5161 .c_str()); |
| 5165 return result; | 5162 return result; |
| 5166 } | 5163 } |
| 5167 | 5164 |
| 5168 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( | 5165 String result(MainThreadScrollingReason::mainThreadScrollingReasonsAsText( |
| 5169 m_mainThreadScrollingReasons) | 5166 m_mainThreadScrollingReasons) |
| 5170 .c_str()); | 5167 .c_str()); |
| 5171 return result; | 5168 return result; |
| 5172 } | 5169 } |
| 5173 | 5170 |
| 5174 void FrameView::adjustStyleRelatedMainThreadScrollingReasons( | |
| 5175 const uint32_t reason, | |
| 5176 bool increase) { | |
| 5177 int index = MainThreadScrollingReason::getReasonIndex(reason); | |
| 5178 DCHECK_GE(index, 0); | |
| 5179 m_mainThreadScrollingReasonsCounter[index] += increase ? 1 : -1; | |
| 5180 DCHECK_GE(m_mainThreadScrollingReasonsCounter[index], 0); | |
| 5181 } | |
| 5182 | |
| 5183 MainThreadScrollingReasons | |
| 5184 FrameView::getStyleRelatedMainThreadScrollingReasons() const { | |
| 5185 MainThreadScrollingReasons reasons = | |
| 5186 static_cast<MainThreadScrollingReasons>(0); | |
| 5187 for (uint32_t reason = 0; | |
| 5188 reason < MainThreadScrollingReason::kMainThreadScrollingReasonCount; | |
| 5189 ++reason) { | |
| 5190 if (m_mainThreadScrollingReasonsCounter[reason] > 0) { | |
| 5191 reasons |= 1 << reason; | |
| 5192 } | |
| 5193 } | |
| 5194 return reasons; | |
| 5195 } | |
| 5196 | |
| 5197 void FrameView::setViewportIntersectionFromParent( | 5171 void FrameView::setViewportIntersectionFromParent( |
| 5198 const IntRect& viewportIntersection) { | 5172 const IntRect& viewportIntersection) { |
| 5199 if (m_remoteViewportIntersection != viewportIntersection) { | 5173 if (m_remoteViewportIntersection != viewportIntersection) { |
| 5200 m_remoteViewportIntersection = viewportIntersection; | 5174 m_remoteViewportIntersection = viewportIntersection; |
| 5201 scheduleAnimation(); | 5175 scheduleAnimation(); |
| 5202 } | 5176 } |
| 5203 } | 5177 } |
| 5204 | 5178 |
| 5205 IntRect FrameView::remoteViewportIntersection() { | 5179 IntRect FrameView::remoteViewportIntersection() { |
| 5206 IntRect intersection(m_remoteViewportIntersection); | 5180 IntRect intersection(m_remoteViewportIntersection); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5260 void FrameView::setAnimationHost( | 5234 void FrameView::setAnimationHost( |
| 5261 std::unique_ptr<CompositorAnimationHost> host) { | 5235 std::unique_ptr<CompositorAnimationHost> host) { |
| 5262 m_animationHost = std::move(host); | 5236 m_animationHost = std::move(host); |
| 5263 } | 5237 } |
| 5264 | 5238 |
| 5265 LayoutUnit FrameView::caretWidth() const { | 5239 LayoutUnit FrameView::caretWidth() const { |
| 5266 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); | 5240 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); |
| 5267 } | 5241 } |
| 5268 | 5242 |
| 5269 } // namespace blink | 5243 } // namespace blink |
| OLD | NEW |