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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 } | 379 } |
380 | 380 |
381 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const | 381 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const |
382 { | 382 { |
383 // Record the entire size of the contents of the frame. Note that we don't j
ust | 383 // Record the entire size of the contents of the frame. Note that we don't j
ust |
384 // use the viewport size (containing block) here because we want to ensure t
his includes | 384 // use the viewport size (containing block) here because we want to ensure t
his includes |
385 // all children (so we can avoid walking them explicitly). | 385 // all children (so we can avoid walking them explicitly). |
386 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize())); | 386 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize())); |
387 } | 387 } |
388 | 388 |
389 bool RenderView::requiresColumns(int desiredColumnCount) const | |
390 { | |
391 if (m_frameView) | |
392 return m_frameView->pagination().mode != Pagination::Unpaginated; | |
393 | |
394 return RenderBlock::requiresColumns(desiredColumnCount); | |
395 } | |
396 | |
397 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 389 void RenderView::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
398 { | 390 { |
399 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. | 391 // If we ever require layout but receive a paint anyway, something has gone
horribly wrong. |
400 ASSERT(!needsLayout()); | 392 ASSERT(!needsLayout()); |
401 // RenderViews should never be called to paint with an offset not on device
pixels. | 393 // RenderViews should never be called to paint with an offset not on device
pixels. |
402 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); | 394 ASSERT(LayoutPoint(IntPoint(paintOffset.x(), paintOffset.y())) == paintOffse
t); |
403 | 395 |
404 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 396 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
405 | 397 |
406 // This avoids painting garbage between columns if there is a column gap. | 398 // This avoids painting garbage between columns if there is a column gap. |
407 if (m_frameView && m_frameView->pagination().mode != Pagination::Unpaginated
) | 399 if (m_frameView && style()->isOverflowPaged()) |
408 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC
olor()); | 400 paintInfo.context->fillRect(paintInfo.rect, m_frameView->baseBackgroundC
olor()); |
409 | 401 |
410 paintObject(paintInfo, paintOffset); | 402 paintObject(paintInfo, paintOffset); |
411 } | 403 } |
412 | 404 |
413 static inline bool rendererObscuresBackground(RenderBox* rootBox) | 405 static inline bool rendererObscuresBackground(RenderBox* rootBox) |
414 { | 406 { |
415 ASSERT(rootBox); | 407 ASSERT(rootBox); |
416 RenderStyle* style = rootBox->style(); | 408 RenderStyle* style = rootBox->style(); |
417 if (style->visibility() != VISIBLE | 409 if (style->visibility() != VISIBLE |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 return true; | 1130 return true; |
1139 if (childStyle->top().isPercent() || childStyle->height().isPercent(
) || childStyle->minHeight().isPercent() || childStyle->maxHeight().isPercent()
|| !childStyle->bottom().isAuto()) | 1131 if (childStyle->top().isPercent() || childStyle->height().isPercent(
) || childStyle->minHeight().isPercent() || childStyle->maxHeight().isPercent()
|| !childStyle->bottom().isAuto()) |
1140 return true; | 1132 return true; |
1141 } | 1133 } |
1142 } | 1134 } |
1143 | 1135 |
1144 return false; | 1136 return false; |
1145 } | 1137 } |
1146 | 1138 |
1147 } // namespace WebCore | 1139 } // namespace WebCore |
OLD | NEW |