| 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 3027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3038 | 3038 |
| 3039 void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, Pa
intInvalidationReason reason) | 3039 void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, Pa
intInvalidationReason reason) |
| 3040 { | 3040 { |
| 3041 if (!m_trackedObjectPaintInvalidations) | 3041 if (!m_trackedObjectPaintInvalidations) |
| 3042 return; | 3042 return; |
| 3043 | 3043 |
| 3044 ObjectPaintInvalidation invalidation = { client.debugName(), reason }; | 3044 ObjectPaintInvalidation invalidation = { client.debugName(), reason }; |
| 3045 m_trackedObjectPaintInvalidations->append(invalidation); | 3045 m_trackedObjectPaintInvalidations->append(invalidation); |
| 3046 } | 3046 } |
| 3047 | 3047 |
| 3048 PassRefPtr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const | 3048 std::unique_ptr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() co
nst |
| 3049 { | 3049 { |
| 3050 if (!m_trackedObjectPaintInvalidations) | 3050 if (!m_trackedObjectPaintInvalidations) |
| 3051 return nullptr; | 3051 return nullptr; |
| 3052 | 3052 |
| 3053 RefPtr<JSONArray> result = JSONArray::create(); | 3053 std::unique_ptr<JSONArray> result = JSONArray::create(); |
| 3054 for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().trav
erseNext()) { | 3054 for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().trav
erseNext()) { |
| 3055 if (!frame->isLocalFrame()) | 3055 if (!frame->isLocalFrame()) |
| 3056 continue; | 3056 continue; |
| 3057 if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()
) { | 3057 if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()
) { |
| 3058 for (const auto& item : *layoutView.frameView()->m_trackedObjectPain
tInvalidations) { | 3058 for (const auto& item : *layoutView.frameView()->m_trackedObjectPain
tInvalidations) { |
| 3059 RefPtr<JSONObject> itemJSON = JSONObject::create(); | 3059 std::unique_ptr<JSONObject> itemJSON = JSONObject::create(); |
| 3060 itemJSON->setString("object", item.name); | 3060 itemJSON->setString("object", item.name); |
| 3061 itemJSON->setString("reason", paintInvalidationReasonToString(it
em.reason)); | 3061 itemJSON->setString("reason", paintInvalidationReasonToString(it
em.reason)); |
| 3062 result->pushObject(itemJSON); | 3062 result->pushObject(std::move(itemJSON)); |
| 3063 } | 3063 } |
| 3064 } | 3064 } |
| 3065 } | 3065 } |
| 3066 return result; | 3066 return result; |
| 3067 } | 3067 } |
| 3068 | 3068 |
| 3069 void FrameView::addResizerArea(LayoutBox& resizerBox) | 3069 void FrameView::addResizerArea(LayoutBox& resizerBox) |
| 3070 { | 3070 { |
| 3071 if (!m_resizerAreas) | 3071 if (!m_resizerAreas) |
| 3072 m_resizerAreas = wrapUnique(new ResizerAreaSet); | 3072 m_resizerAreas = wrapUnique(new ResizerAreaSet); |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4276 } | 4276 } |
| 4277 | 4277 |
| 4278 bool FrameView::canThrottleRendering() const | 4278 bool FrameView::canThrottleRendering() const |
| 4279 { | 4279 { |
| 4280 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4280 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4281 return false; | 4281 return false; |
| 4282 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); | 4282 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot
tling); |
| 4283 } | 4283 } |
| 4284 | 4284 |
| 4285 } // namespace blink | 4285 } // namespace blink |
| OLD | NEW |