| 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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 | 1085 |
| 1086 #if ENABLE(ASSERT) | 1086 #if ENABLE(ASSERT) |
| 1087 layoutView()->assertSubtreeClearedPaintInvalidationState(); | 1087 layoutView()->assertSubtreeClearedPaintInvalidationState(); |
| 1088 #endif | 1088 #endif |
| 1089 | 1089 |
| 1090 if (m_frame->selection().isCaretBoundsDirty()) | 1090 if (m_frame->selection().isCaretBoundsDirty()) |
| 1091 m_frame->selection().invalidateCaretRect(); | 1091 m_frame->selection().invalidateCaretRect(); |
| 1092 | 1092 |
| 1093 m_doFullPaintInvalidation = false; | 1093 m_doFullPaintInvalidation = false; |
| 1094 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); | 1094 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
| 1095 |
| 1096 // Temporary callback for crbug.com/487345,402044 |
| 1097 // TODO(ojan): Make this more general to be used by PositionObserver |
| 1098 // and rAF throttling. |
| 1099 IntRect visibleRect = rootFrameToContents(computeVisibleArea()); |
| 1100 rootForPaintInvalidation.sendMediaPositionChangeNotifications(visibleRect); |
| 1101 } |
| 1102 |
| 1103 IntRect FrameView::computeVisibleArea() |
| 1104 { |
| 1105 // Return our clipping bounds in the root frame. |
| 1106 IntRect us(frameRect()); |
| 1107 if (FrameView* parent = parentFrameView()) { |
| 1108 us = parent->contentsToRootFrame(us); |
| 1109 IntRect parentRect = parent->computeVisibleArea(); |
| 1110 if (parentRect.isEmpty()) |
| 1111 return IntRect(); |
| 1112 |
| 1113 us.intersect(parentRect); |
| 1114 } |
| 1115 |
| 1116 return us; |
| 1095 } | 1117 } |
| 1096 | 1118 |
| 1097 DocumentLifecycle& FrameView::lifecycle() const | 1119 DocumentLifecycle& FrameView::lifecycle() const |
| 1098 { | 1120 { |
| 1099 return m_frame->document()->lifecycle(); | 1121 return m_frame->document()->lifecycle(); |
| 1100 } | 1122 } |
| 1101 | 1123 |
| 1102 LayoutBox* FrameView::embeddedContentBox() const | 1124 LayoutBox* FrameView::embeddedContentBox() const |
| 1103 { | 1125 { |
| 1104 LayoutView* layoutView = this->layoutView(); | 1126 LayoutView* layoutView = this->layoutView(); |
| (...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 } | 4080 } |
| 4059 | 4081 |
| 4060 bool FrameView::canThrottleRendering() const | 4082 bool FrameView::canThrottleRendering() const |
| 4061 { | 4083 { |
| 4062 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4084 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
| 4063 return false; | 4085 return false; |
| 4064 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4086 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4065 } | 4087 } |
| 4066 | 4088 |
| 4067 } // namespace blink | 4089 } // namespace blink |
| OLD | NEW |