| 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 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation); | 1092 lifecycle().advanceTo(DocumentLifecycle::InPaintInvalidation); |
| 1093 | 1093 |
| 1094 RELEASE_ASSERT(layoutView()); | 1094 RELEASE_ASSERT(layoutView()); |
| 1095 LayoutView& rootForPaintInvalidation = *layoutView(); | 1095 LayoutView& rootForPaintInvalidation = *layoutView(); |
| 1096 ASSERT(!rootForPaintInvalidation.needsLayout()); | 1096 ASSERT(!rootForPaintInvalidation.needsLayout()); |
| 1097 | 1097 |
| 1098 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval
idation.debugName().ascii()); | 1098 TRACE_EVENT1("blink", "FrameView::invalidateTree", "root", rootForPaintInval
idation.debugName().ascii()); |
| 1099 | 1099 |
| 1100 rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState); | 1100 rootForPaintInvalidation.invalidateTreeIfNeeded(paintInvalidationState); |
| 1101 | 1101 |
| 1102 if (!m_frame->settings() || !m_frame->settings()->rootLayerScrolls()) { | 1102 if (!m_frame->settings() || !m_frame->settings()->rootLayerScrolls()) |
| 1103 paintInvalidationState.setViewClippingAndScrollOffsetDisabled(true); | |
| 1104 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState); | 1103 invalidatePaintOfScrollControlsIfNeeded(paintInvalidationState); |
| 1105 paintInvalidationState.setViewClippingAndScrollOffsetDisabled(false); | |
| 1106 } | |
| 1107 | 1104 |
| 1108 #if ENABLE(ASSERT) | 1105 #if ENABLE(ASSERT) |
| 1109 layoutView()->assertSubtreeClearedPaintInvalidationState(); | 1106 layoutView()->assertSubtreeClearedPaintInvalidationFlags(); |
| 1110 #endif | 1107 #endif |
| 1111 | 1108 |
| 1112 if (m_frame->selection().isCaretBoundsDirty()) | 1109 if (m_frame->selection().isCaretBoundsDirty()) |
| 1113 m_frame->selection().invalidateCaretRect(); | 1110 m_frame->selection().invalidateCaretRect(); |
| 1114 | 1111 |
| 1115 m_doFullPaintInvalidation = false; | 1112 m_doFullPaintInvalidation = false; |
| 1116 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); | 1113 lifecycle().advanceTo(DocumentLifecycle::PaintInvalidationClean); |
| 1117 | 1114 |
| 1118 // Temporary callback for crbug.com/487345,402044 | 1115 // Temporary callback for crbug.com/487345,402044 |
| 1119 // TODO(ojan): Make this more general to be used by PositionObserver | 1116 // TODO(ojan): Make this more general to be used by PositionObserver |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 | 2104 |
| 2108 toLayoutCounter(layoutObject)->updateCounter(); | 2105 toLayoutCounter(layoutObject)->updateCounter(); |
| 2109 } | 2106 } |
| 2110 } | 2107 } |
| 2111 | 2108 |
| 2112 IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co
nst | 2109 IntRect FrameView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) co
nst |
| 2113 { | 2110 { |
| 2114 ASSERT(m_frame->view() == this); | 2111 ASSERT(m_frame->view() == this); |
| 2115 | 2112 |
| 2116 LayoutRect clipRect(LayoutPoint(), LayoutSize(visibleContentSize(scrollbarIn
clusion))); | 2113 LayoutRect clipRect(LayoutPoint(), LayoutSize(visibleContentSize(scrollbarIn
clusion))); |
| 2117 layoutView()->mapToVisibleRectInAncestorSpace(&layoutView()->containerForPai
ntInvalidation(), clipRect, nullptr); | 2114 layoutView()->mapToVisibleRectInAncestorSpace(&layoutView()->containerForPai
ntInvalidation(), clipRect); |
| 2118 return enclosingIntRect(clipRect); | 2115 return enclosingIntRect(clipRect); |
| 2119 } | 2116 } |
| 2120 | 2117 |
| 2121 bool FrameView::shouldUseIntegerScrollOffset() const | 2118 bool FrameView::shouldUseIntegerScrollOffset() const |
| 2122 { | 2119 { |
| 2123 if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextE
nabled()) | 2120 if (m_frame->settings() && !m_frame->settings()->preferCompositingToLCDTextE
nabled()) |
| 2124 return true; | 2121 return true; |
| 2125 | 2122 |
| 2126 return ScrollableArea::shouldUseIntegerScrollOffset(); | 2123 return ScrollableArea::shouldUseIntegerScrollOffset(); |
| 2127 } | 2124 } |
| (...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3965 LayoutRect viewRect = localFrame->contentLayoutObject()->viewRect(); | 3962 LayoutRect viewRect = localFrame->contentLayoutObject()->viewRect(); |
| 3966 const LayoutBoxModelObject& paintInvalidationContainer = localFrame->content
LayoutObject()->containerForPaintInvalidation(); | 3963 const LayoutBoxModelObject& paintInvalidationContainer = localFrame->content
LayoutObject()->containerForPaintInvalidation(); |
| 3967 // If the frame is being throttled, its compositing state may not be up to d
ate. | 3964 // If the frame is being throttled, its compositing state may not be up to d
ate. |
| 3968 if (!paintInvalidationContainer.enclosingLayer()->isAllowedToQueryCompositin
gState()) | 3965 if (!paintInvalidationContainer.enclosingLayer()->isAllowedToQueryCompositin
gState()) |
| 3969 return; | 3966 return; |
| 3970 const GraphicsLayer* graphicsLayer = paintInvalidationContainer.enclosingLay
er()->graphicsLayerBacking(); | 3967 const GraphicsLayer* graphicsLayer = paintInvalidationContainer.enclosingLay
er()->graphicsLayerBacking(); |
| 3971 | 3968 |
| 3972 if (!graphicsLayer) | 3969 if (!graphicsLayer) |
| 3973 return; | 3970 return; |
| 3974 | 3971 |
| 3975 PaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentLayoutObjec
t(), &paintInvalidationContainer, viewRect); | 3972 PaintLayer::mapRectToPaintInvalidationBacking(*localFrame->contentLayoutObje
ct(), paintInvalidationContainer, viewRect); |
| 3976 | 3973 |
| 3977 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3974 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
| 3978 } | 3975 } |
| 3979 | 3976 |
| 3980 void FrameView::setNeedsUpdateViewportIntersection() | 3977 void FrameView::setNeedsUpdateViewportIntersection() |
| 3981 { | 3978 { |
| 3982 m_needsUpdateViewportIntersection = true; | 3979 m_needsUpdateViewportIntersection = true; |
| 3983 for (FrameView* parent = parentFrameView(); parent; parent = parent->parentF
rameView()) | 3980 for (FrameView* parent = parentFrameView(); parent; parent = parent->parentF
rameView()) |
| 3984 parent->m_needsUpdateViewportIntersectionInSubtree = true; | 3981 parent->m_needsUpdateViewportIntersectionInSubtree = true; |
| 3985 } | 3982 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4095 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4092 return m_hiddenForThrottling && m_crossOriginForThrottling; |
| 4096 } | 4093 } |
| 4097 | 4094 |
| 4098 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const | 4095 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const |
| 4099 { | 4096 { |
| 4100 ASSERT(layoutView()); | 4097 ASSERT(layoutView()); |
| 4101 return *layoutView(); | 4098 return *layoutView(); |
| 4102 } | 4099 } |
| 4103 | 4100 |
| 4104 } // namespace blink | 4101 } // namespace blink |
| OLD | NEW |