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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1109 | 1109 |
1110 #if ENABLE(ASSERT) | 1110 #if ENABLE(ASSERT) |
1111 layoutView()->assertSubtreeClearedPaintInvalidationState(); | 1111 layoutView()->assertSubtreeClearedPaintInvalidationState(); |
1112 #endif | 1112 #endif |
1113 | 1113 |
1114 if (m_frame->selection().isCaretBoundsDirty()) | 1114 if (m_frame->selection().isCaretBoundsDirty()) |
1115 m_frame->selection().invalidateCaretRect(); | 1115 m_frame->selection().invalidateCaretRect(); |
1116 | 1116 |
1117 m_doFullPaintInvalidation = false; | 1117 m_doFullPaintInvalidation = false; |
1118 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); | 1118 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
1119 | |
1120 if (RuntimeEnabledFeatures::intersectionObserverEnabled()) { | |
1121 computeIntersectionObservations(paintInvalidationState); | |
1122 } | |
1123 } | |
1124 | |
1125 void FrameView::computeIntersectionObservations(PaintInvalidationState& paintInv alidationState) | |
1126 { | |
1127 ASSERT(layoutView()); | |
1128 | |
1129 if (FrameView* parent = parentFrameView()) { | |
ojan
2015/09/21 03:49:09
Does this handle clipping correctly if you have mu
| |
1130 m_clippedBounds = IntRect(frameRect().location(), paintInvalidationState .clipRect().pixelSnappedSize()); | |
1131 m_clippedBounds = parent->contentsToRootFrame(m_clippedBounds); | |
1132 m_clippedBounds.intersect(parent->contentsToRootFrame(parent->m_clippedB ounds)); | |
1133 if (!m_clippedBounds.isEmpty()) { | |
ojan
2015/09/21 03:49:09
Nit: no curlies
MikeB
2015/09/24 19:04:04
Done.
| |
1134 m_clippedBounds = rootFrameToContents(m_clippedBounds); | |
1135 } | |
1136 } else { | |
1137 m_clippedBounds = pixelSnappedIntRect(paintInvalidationState.clipRect()) ; | |
1138 } | |
1139 | |
1140 layoutView()->computeIntersectionObservations(FloatRect(m_clippedBounds)); | |
1119 } | 1141 } |
1120 | 1142 |
1121 DocumentLifecycle& FrameView::lifecycle() const | 1143 DocumentLifecycle& FrameView::lifecycle() const |
1122 { | 1144 { |
1123 return m_frame->document()->lifecycle(); | 1145 return m_frame->document()->lifecycle(); |
1124 } | 1146 } |
1125 | 1147 |
1126 LayoutBox* FrameView::embeddedContentBox() const | 1148 LayoutBox* FrameView::embeddedContentBox() const |
1127 { | 1149 { |
1128 LayoutView* layoutView = this->layoutView(); | 1150 LayoutView* layoutView = this->layoutView(); |
(...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3963 | 3985 |
3964 if (!graphicsLayer) | 3986 if (!graphicsLayer) |
3965 return; | 3987 return; |
3966 | 3988 |
3967 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); | 3989 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); |
3968 | 3990 |
3969 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); | 3991 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); |
3970 } | 3992 } |
3971 | 3993 |
3972 } // namespace blink | 3994 } // namespace blink |
OLD | NEW |