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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 m_inSynchronousPostLayout = false; | 200 m_inSynchronousPostLayout = false; |
201 m_layoutCount = 0; | 201 m_layoutCount = 0; |
202 m_nestedLayoutCount = 0; | 202 m_nestedLayoutCount = 0; |
203 m_postLayoutTasksTimer.stop(); | 203 m_postLayoutTasksTimer.stop(); |
204 m_updateWidgetsTimer.stop(); | 204 m_updateWidgetsTimer.stop(); |
205 m_firstLayout = true; | 205 m_firstLayout = true; |
206 m_safeToPropagateScrollToParent = true; | 206 m_safeToPropagateScrollToParent = true; |
207 m_lastViewportSize = IntSize(); | 207 m_lastViewportSize = IntSize(); |
208 m_lastZoomFactor = 1.0f; | 208 m_lastZoomFactor = 1.0f; |
209 m_isTrackingPaintInvalidations = false; | 209 m_isTrackingPaintInvalidations = false; |
210 m_trackedPaintInvalidationRects.clear(); | |
211 m_lastPaintTime = 0; | 210 m_lastPaintTime = 0; |
212 m_isPainting = false; | 211 m_isPainting = false; |
213 m_visuallyNonEmptyCharacterCount = 0; | 212 m_visuallyNonEmptyCharacterCount = 0; |
214 m_visuallyNonEmptyPixelCount = 0; | 213 m_visuallyNonEmptyPixelCount = 0; |
215 m_isVisuallyNonEmpty = false; | 214 m_isVisuallyNonEmpty = false; |
216 clearScrollAnchor(); | 215 clearScrollAnchor(); |
217 m_viewportConstrainedObjects.clear(); | 216 m_viewportConstrainedObjects.clear(); |
218 m_layoutSubtreeRootList.clear(); | 217 m_layoutSubtreeRootList.clear(); |
219 } | 218 } |
220 | 219 |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1647 Page* page = frame().page(); | 1646 Page* page = frame().page(); |
1648 if (!page) | 1647 if (!page) |
1649 return nullptr; | 1648 return nullptr; |
1650 return &page->chromeClient(); | 1649 return &page->chromeClient(); |
1651 } | 1650 } |
1652 | 1651 |
1653 void FrameView::contentRectangleForPaintInvalidation(const IntRect& rectInConten
t) | 1652 void FrameView::contentRectangleForPaintInvalidation(const IntRect& rectInConten
t) |
1654 { | 1653 { |
1655 ASSERT(!m_frame->ownerLayoutObject()); | 1654 ASSERT(!m_frame->ownerLayoutObject()); |
1656 | 1655 |
1657 if (m_isTrackingPaintInvalidations) { | |
1658 m_trackedPaintInvalidationRects.append(contentsToFrame(rectInContent)); | |
1659 // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangl
eForPaint | |
1660 // is going away entirely once all layout tests are FCM. In the short | |
1661 // term, no code should be tracking non-composited FrameView paint inval
idations. | |
1662 RELEASE_ASSERT_NOT_REACHED(); | |
1663 } | |
1664 | |
1665 IntRect paintRect = rectInContent; | 1656 IntRect paintRect = rectInContent; |
1666 if (clipsPaintInvalidations()) | 1657 if (clipsPaintInvalidations()) |
1667 paintRect.intersect(visibleContentRect()); | 1658 paintRect.intersect(visibleContentRect()); |
1668 if (paintRect.isEmpty()) | 1659 if (paintRect.isEmpty()) |
1669 return; | 1660 return; |
1670 | 1661 |
1671 if (HostWindow* window = hostWindow()) | 1662 if (HostWindow* window = hostWindow()) |
1672 window->invalidateRect(contentsToRootFrame(paintRect)); | 1663 window->invalidateRect(contentsToRootFrame(paintRect)); |
1673 } | 1664 } |
1674 | 1665 |
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2837 | 2828 |
2838 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), | 2829 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), |
2839 "FrameView::setTracksPaintInvalidations", TRACE_EVENT_SCOPE_GLOBAL, "ena
bled", trackPaintInvalidations); | 2830 "FrameView::setTracksPaintInvalidations", TRACE_EVENT_SCOPE_GLOBAL, "ena
bled", trackPaintInvalidations); |
2840 | 2831 |
2841 resetTrackedPaintInvalidations(); | 2832 resetTrackedPaintInvalidations(); |
2842 m_isTrackingPaintInvalidations = trackPaintInvalidations; | 2833 m_isTrackingPaintInvalidations = trackPaintInvalidations; |
2843 } | 2834 } |
2844 | 2835 |
2845 void FrameView::resetTrackedPaintInvalidations() | 2836 void FrameView::resetTrackedPaintInvalidations() |
2846 { | 2837 { |
2847 m_trackedPaintInvalidationRects.clear(); | |
2848 if (LayoutView* layoutView = this->layoutView()) | 2838 if (LayoutView* layoutView = this->layoutView()) |
2849 layoutView->compositor()->resetTrackedPaintInvalidationRects(); | 2839 layoutView->compositor()->resetTrackedPaintInvalidationRects(); |
2850 } | 2840 } |
2851 | 2841 |
2852 String FrameView::trackedPaintInvalidationRectsAsText() const | |
2853 { | |
2854 TextStream ts; | |
2855 if (!m_trackedPaintInvalidationRects.isEmpty()) { | |
2856 ts << "(repaint rects\n"; | |
2857 for (size_t i = 0; i < m_trackedPaintInvalidationRects.size(); ++i) | |
2858 ts << " (rect " << m_trackedPaintInvalidationRects[i].x() << " " <<
m_trackedPaintInvalidationRects[i].y() << " " << m_trackedPaintInvalidationRect
s[i].width() << " " << m_trackedPaintInvalidationRects[i].height() << ")\n"; | |
2859 ts << ")\n"; | |
2860 } | |
2861 return ts.release(); | |
2862 } | |
2863 | |
2864 void FrameView::addResizerArea(LayoutBox& resizerBox) | 2842 void FrameView::addResizerArea(LayoutBox& resizerBox) |
2865 { | 2843 { |
2866 if (!m_resizerAreas) | 2844 if (!m_resizerAreas) |
2867 m_resizerAreas = adoptPtr(new ResizerAreaSet); | 2845 m_resizerAreas = adoptPtr(new ResizerAreaSet); |
2868 m_resizerAreas->add(&resizerBox); | 2846 m_resizerAreas->add(&resizerBox); |
2869 } | 2847 } |
2870 | 2848 |
2871 void FrameView::removeResizerArea(LayoutBox& resizerBox) | 2849 void FrameView::removeResizerArea(LayoutBox& resizerBox) |
2872 { | 2850 { |
2873 if (!m_resizerAreas) | 2851 if (!m_resizerAreas) |
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3971 | 3949 |
3972 if (!graphicsLayer) | 3950 if (!graphicsLayer) |
3973 return; | 3951 return; |
3974 | 3952 |
3975 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3953 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
3976 | 3954 |
3977 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3955 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3978 } | 3956 } |
3979 | 3957 |
3980 } // namespace blink | 3958 } // namespace blink |
OLD | NEW |