| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include "sky/engine/config.h" | 21 #include "sky/engine/config.h" |
| 22 #include "sky/engine/core/rendering/RenderView.h" | 22 #include "sky/engine/core/rendering/RenderView.h" |
| 23 | 23 |
| 24 #include "gen/sky/platform/RuntimeEnabledFeatures.h" | 24 #include "gen/sky/platform/RuntimeEnabledFeatures.h" |
| 25 #include "sky/engine/core/dom/Document.h" | 25 #include "sky/engine/core/dom/Document.h" |
| 26 #include "sky/engine/core/dom/Element.h" | 26 #include "sky/engine/core/dom/Element.h" |
| 27 #include "sky/engine/core/frame/LocalFrame.h" | 27 #include "sky/engine/core/frame/LocalFrame.h" |
| 28 #include "sky/engine/core/page/Page.h" | 28 #include "sky/engine/core/page/Page.h" |
| 29 #include "sky/engine/core/rendering/GraphicsContextAnnotator.h" | |
| 30 #include "sky/engine/core/rendering/HitTestResult.h" | 29 #include "sky/engine/core/rendering/HitTestResult.h" |
| 31 #include "sky/engine/core/rendering/RenderGeometryMap.h" | 30 #include "sky/engine/core/rendering/RenderGeometryMap.h" |
| 32 #include "sky/engine/core/rendering/RenderLayer.h" | 31 #include "sky/engine/core/rendering/RenderLayer.h" |
| 33 #include "sky/engine/platform/TraceEvent.h" | 32 #include "sky/engine/platform/TraceEvent.h" |
| 34 #include "sky/engine/platform/geometry/FloatQuad.h" | 33 #include "sky/engine/platform/geometry/FloatQuad.h" |
| 35 #include "sky/engine/platform/geometry/TransformState.h" | 34 #include "sky/engine/platform/geometry/TransformState.h" |
| 36 #include "sky/engine/platform/graphics/GraphicsContext.h" | 35 #include "sky/engine/platform/graphics/GraphicsContext.h" |
| 37 | 36 |
| 38 namespace blink { | 37 namespace blink { |
| 39 | 38 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 191 } |
| 193 } | 192 } |
| 194 | 193 |
| 195 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 194 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
| 196 { | 195 { |
| 197 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. | 196 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. |
| 198 ASSERT(!needsLayout()); | 197 ASSERT(!needsLayout()); |
| 199 // RenderViews should never be called to paint with an offset not on device
pixels. | 198 // RenderViews should never be called to paint with an offset not on device
pixels. |
| 200 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); | 199 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); |
| 201 | 200 |
| 202 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | |
| 203 | |
| 204 // This avoids painting garbage between columns if there is a column gap. | 201 // This avoids painting garbage between columns if there is a column gap. |
| 205 if (m_frameView && style()->isOverflowPaged()) | 202 if (m_frameView && style()->isOverflowPaged()) |
| 206 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC
olor()); | 203 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC
olor()); |
| 207 | 204 |
| 208 paintObject(paintInfo, paintOffset); | 205 paintObject(paintInfo, paintOffset); |
| 209 } | 206 } |
| 210 | 207 |
| 211 static inline bool rendererObscuresBackground(RenderBox* rootBox) | 208 static inline bool rendererObscuresBackground(RenderBox* rootBox) |
| 212 { | 209 { |
| 213 ASSERT(rootBox); | 210 ASSERT(rootBox); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 m_iframes.remove(iframe); | 476 m_iframes.remove(iframe); |
| 480 } | 477 } |
| 481 | 478 |
| 482 void RenderView::updateIFramesAfterLayout() | 479 void RenderView::updateIFramesAfterLayout() |
| 483 { | 480 { |
| 484 for (auto& iframe: m_iframes) | 481 for (auto& iframe: m_iframes) |
| 485 iframe->updateWidgetBounds(); | 482 iframe->updateWidgetBounds(); |
| 486 } | 483 } |
| 487 | 484 |
| 488 } // namespace blink | 485 } // namespace blink |
| OLD | NEW |