Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 #include "core/html/HTMLIFrameElement.h" | 31 #include "core/html/HTMLIFrameElement.h" |
| 32 #include "core/html/HTMLVideoElement.h" | 32 #include "core/html/HTMLVideoElement.h" |
| 33 #include "core/inspector/InspectorTraceEvents.h" | 33 #include "core/inspector/InspectorTraceEvents.h" |
| 34 #include "core/layout/HitTestResult.h" | 34 #include "core/layout/HitTestResult.h" |
| 35 #include "core/layout/LayoutFlowThread.h" | 35 #include "core/layout/LayoutFlowThread.h" |
| 36 #include "core/layout/LayoutGeometryMap.h" | 36 #include "core/layout/LayoutGeometryMap.h" |
| 37 #include "core/layout/LayoutMedia.h" | 37 #include "core/layout/LayoutMedia.h" |
| 38 #include "core/layout/LayoutPart.h" | 38 #include "core/layout/LayoutPart.h" |
| 39 #include "core/layout/LayoutQuote.h" | 39 #include "core/layout/LayoutQuote.h" |
| 40 #include "core/layout/LayoutScrollbarPart.h" | 40 #include "core/layout/LayoutScrollbarPart.h" |
| 41 #include "core/layout/ViewFragmentationContext.h" | |
| 41 #include "core/layout/compositing/PaintLayerCompositor.h" | 42 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 42 #include "core/page/Page.h" | 43 #include "core/page/Page.h" |
| 43 #include "core/paint/PaintLayer.h" | 44 #include "core/paint/PaintLayer.h" |
| 44 #include "core/paint/ViewPainter.h" | 45 #include "core/paint/ViewPainter.h" |
| 45 #include "core/svg/SVGDocumentExtensions.h" | 46 #include "core/svg/SVGDocumentExtensions.h" |
| 46 #include "platform/TraceEvent.h" | 47 #include "platform/TraceEvent.h" |
| 47 #include "platform/TracedValue.h" | 48 #include "platform/TracedValue.h" |
| 48 #include "platform/geometry/FloatQuad.h" | 49 #include "platform/geometry/FloatQuad.h" |
| 49 #include "platform/geometry/TransformState.h" | 50 #include "platform/geometry/TransformState.h" |
| 50 #include "platform/graphics/paint/PaintController.h" | 51 #include "platform/graphics/paint/PaintController.h" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 242 } | 243 } |
| 243 | 244 |
| 244 ASSERT(!m_layoutState); | 245 ASSERT(!m_layoutState); |
| 245 if (!needsLayout()) | 246 if (!needsLayout()) |
| 246 return; | 247 return; |
| 247 | 248 |
| 248 LayoutState rootLayoutState(pageLogicalHeight(), pageLogicalHeightChanged(), *this); | 249 LayoutState rootLayoutState(pageLogicalHeight(), pageLogicalHeightChanged(), *this); |
| 249 | 250 |
| 250 m_pageLogicalHeightChanged = false; | 251 m_pageLogicalHeightChanged = false; |
| 251 | 252 |
| 253 if (m_pageLogicalHeight) { | |
| 254 if (!m_fragmentationContext) | |
| 255 m_fragmentationContext = adoptPtr(new ViewFragmentationContext(*this )); | |
| 256 } else { | |
| 257 if (m_fragmentationContext) | |
| 258 m_fragmentationContext.clear(); | |
|
leviw_travelin_and_unemployed
2015/12/08 19:00:55
It seems a little weird to new a ViewFragmentation
mstensho (USE GERRIT)
2015/12/08 20:09:12
Gets *page* height, not just any height. Right?
T
| |
| 259 } | |
| 260 | |
| 252 layoutContent(); | 261 layoutContent(); |
| 253 | 262 |
| 254 if (layoutOverflowRect() != oldLayoutOverflowRect) { | 263 if (layoutOverflowRect() != oldLayoutOverflowRect) { |
| 255 // The document element paints the viewport background, so we need to in validate it when | 264 // The document element paints the viewport background, so we need to in validate it when |
| 256 // layout overflow changes. | 265 // layout overflow changes. |
| 257 // FIXME: Improve viewport background styling/invalidation/painting. crb ug.com/475115 | 266 // FIXME: Improve viewport background styling/invalidation/painting. crb ug.com/475115 |
| 258 if (Element* documentElement = document().documentElement()) { | 267 if (Element* documentElement = document().documentElement()) { |
| 259 if (LayoutObject* rootObject = documentElement->layoutObject()) | 268 if (LayoutObject* rootObject = documentElement->layoutObject()) |
| 260 rootObject->setShouldDoFullPaintInvalidation(); | 269 rootObject->setShouldDoFullPaintInvalidation(); |
| 261 } | 270 } |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 973 } | 982 } |
| 974 | 983 |
| 975 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect ) | 984 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect ) |
| 976 { | 985 { |
| 977 for (auto& media : m_mediaForPositionNotification) { | 986 for (auto& media : m_mediaForPositionNotification) { |
| 978 media->notifyPositionMayHaveChanged(visibleRect); | 987 media->notifyPositionMayHaveChanged(visibleRect); |
| 979 } | 988 } |
| 980 } | 989 } |
| 981 | 990 |
| 982 } // namespace blink | 991 } // namespace blink |
| OLD | NEW |