| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 { | 401 { |
| 402 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. | 402 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. |
| 403 ASSERT(!needsLayout()); | 403 ASSERT(!needsLayout()); |
| 404 // RenderViews should never be called to paint with an offset not on device
pixels. | 404 // RenderViews should never be called to paint with an offset not on device
pixels. |
| 405 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); | 405 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); |
| 406 | 406 |
| 407 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 407 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
| 408 | 408 |
| 409 // This avoids painting garbage between columns if there is a column gap. | 409 // This avoids painting garbage between columns if there is a column gap. |
| 410 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated
) | 410 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated
) |
| 411 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC
olor()); | 411 paintInfo.getContext()->fillRect(paintInfo.getRect(), m_frameView->baseB
ackgroundColor()); |
| 412 | 412 |
| 413 paintObject(paintInfo, paintOffset); | 413 paintObject(paintInfo, paintOffset); |
| 414 } | 414 } |
| 415 | 415 |
| 416 static inline bool isComposited(RenderObject* object) | 416 static inline bool isComposited(RenderObject* object) |
| 417 { | 417 { |
| 418 return object->hasLayer() && toRenderLayerModelObject(object)->layer()->isCo
mposited(); | 418 return object->hasLayer() && toRenderLayerModelObject(object)->layer()->isCo
mposited(); |
| 419 } | 419 } |
| 420 | 420 |
| 421 static inline bool rendererObscuresBackground(RenderObject* rootObject) | 421 static inline bool rendererObscuresBackground(RenderObject* rootObject) |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 485 |
| 486 // This code typically only executes if the root element's visibility has be
en set to hidden, | 486 // This code typically only executes if the root element's visibility has be
en set to hidden, |
| 487 // if there is a transform on the <html>, or if there is a page scale factor
less than 1. | 487 // if there is a transform on the <html>, or if there is a page scale factor
less than 1. |
| 488 // Only fill with the base background color (typically white) if we're the r
oot document, | 488 // Only fill with the base background color (typically white) if we're the r
oot document, |
| 489 // since iframes/frames with no background in the child document should show
the parent's background. | 489 // since iframes/frames with no background in the child document should show
the parent's background. |
| 490 if (frameView()->isTransparent()) // FIXME: This needs to be dynamic. We sh
ould be able to go back to blitting if we ever stop being transparent. | 490 if (frameView()->isTransparent()) // FIXME: This needs to be dynamic. We sh
ould be able to go back to blitting if we ever stop being transparent. |
| 491 frameView()->setCannotBlitToWindow(); // The parent must show behind the
child. | 491 frameView()->setCannotBlitToWindow(); // The parent must show behind the
child. |
| 492 else { | 492 else { |
| 493 Color baseColor = frameView()->baseBackgroundColor(); | 493 Color baseColor = frameView()->baseBackgroundColor(); |
| 494 if (baseColor.alpha()) { | 494 if (baseColor.alpha()) { |
| 495 CompositeOperator previousOperator = paintInfo.context->compositeOpe
ration(); | 495 CompositeOperator previousOperator = paintInfo.getContext()->composi
teOperation(); |
| 496 paintInfo.context->setCompositeOperation(CompositeCopy); | 496 paintInfo.getContext()->setCompositeOperation(CompositeCopy); |
| 497 paintInfo.context->fillRect(paintInfo.rect, baseColor); | 497 paintInfo.getContext()->fillRect(paintInfo.getRect(), baseColor); |
| 498 paintInfo.context->setCompositeOperation(previousOperator); | 498 paintInfo.getContext()->setCompositeOperation(previousOperator); |
| 499 } else | 499 } else { |
| 500 paintInfo.context->clearRect(paintInfo.rect); | 500 paintInfo.getContext()->clearRect(paintInfo.getRect()); |
| 501 } |
| 501 } | 502 } |
| 502 } | 503 } |
| 503 | 504 |
| 504 bool RenderView::shouldRepaint(const LayoutRect& r) const | 505 bool RenderView::shouldRepaint(const LayoutRect& r) const |
| 505 { | 506 { |
| 506 if (printing() || r.width() == 0 || r.height() == 0) | 507 if (printing() || r.width() == 0 || r.height() == 0) |
| 507 return false; | 508 return false; |
| 508 | 509 |
| 509 if (!m_frameView) | 510 if (!m_frameView) |
| 510 return false; | 511 return false; |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 #endif | 1149 #endif |
| 1149 | 1150 |
| 1150 if (layoutState) | 1151 if (layoutState) |
| 1151 layoutState->m_isPaginated = m_fragmenting; | 1152 layoutState->m_isPaginated = m_fragmenting; |
| 1152 | 1153 |
| 1153 if (m_flowThreadState != RenderObject::NotInsideFlowThread) | 1154 if (m_flowThreadState != RenderObject::NotInsideFlowThread) |
| 1154 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); | 1155 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); |
| 1155 } | 1156 } |
| 1156 | 1157 |
| 1157 } // namespace WebCore | 1158 } // namespace WebCore |
| OLD | NEW |