| Index: Source/core/paint/FrameSetPainter.cpp
|
| diff --git a/Source/core/paint/FrameSetPainter.cpp b/Source/core/paint/FrameSetPainter.cpp
|
| index 07e92c2fb91c56b4a18f7fd724fd2d7853feaf66..c25b844680c8cf2d25e2408573a1902647977191 100644
|
| --- a/Source/core/paint/FrameSetPainter.cpp
|
| +++ b/Source/core/paint/FrameSetPainter.cpp
|
| @@ -6,9 +6,9 @@
|
| #include "core/paint/FrameSetPainter.h"
|
|
|
| #include "core/html/HTMLFrameSetElement.h"
|
| +#include "core/layout/LayoutFrameSet.h"
|
| #include "core/layout/PaintInfo.h"
|
| #include "core/paint/GraphicsContextAnnotator.h"
|
| -#include "core/rendering/RenderFrameSet.h"
|
|
|
| namespace blink {
|
|
|
| @@ -36,13 +36,13 @@ void FrameSetPainter::paintColumnBorder(const PaintInfo& paintInfo, const IntRec
|
|
|
| // Fill first.
|
| GraphicsContext* context = paintInfo.context;
|
| - context->fillRect(borderRect, m_renderFrameSet.frameSet()->hasBorderColor() ? m_renderFrameSet.resolveColor(CSSPropertyBorderLeftColor) : borderFillColor());
|
| + context->fillRect(borderRect, m_layoutFrameSet.frameSet()->hasBorderColor() ? m_layoutFrameSet.resolveColor(CSSPropertyBorderLeftColor) : borderFillColor());
|
|
|
| // Now stroke the edges but only if we have enough room to paint both edges with a little
|
| // bit of the fill color showing through.
|
| if (borderRect.width() >= 3) {
|
| - context->fillRect(IntRect(borderRect.location(), IntSize(1, m_renderFrameSet.size().height())), borderStartEdgeColor());
|
| - context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()), IntSize(1, m_renderFrameSet.size().height())), borderEndEdgeColor());
|
| + context->fillRect(IntRect(borderRect.location(), IntSize(1, m_layoutFrameSet.size().height())), borderStartEdgeColor());
|
| + context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()), IntSize(1, m_layoutFrameSet.size().height())), borderEndEdgeColor());
|
| }
|
| }
|
|
|
| @@ -55,52 +55,52 @@ void FrameSetPainter::paintRowBorder(const PaintInfo& paintInfo, const IntRect&
|
|
|
| // Fill first.
|
| GraphicsContext* context = paintInfo.context;
|
| - context->fillRect(borderRect, m_renderFrameSet.frameSet()->hasBorderColor() ? m_renderFrameSet.resolveColor(CSSPropertyBorderLeftColor) : borderFillColor());
|
| + context->fillRect(borderRect, m_layoutFrameSet.frameSet()->hasBorderColor() ? m_layoutFrameSet.resolveColor(CSSPropertyBorderLeftColor) : borderFillColor());
|
|
|
| // Now stroke the edges but only if we have enough room to paint both edges with a little
|
| // bit of the fill color showing through.
|
| if (borderRect.height() >= 3) {
|
| - context->fillRect(IntRect(borderRect.location(), IntSize(m_renderFrameSet.size().width(), 1)), borderStartEdgeColor());
|
| - context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1), IntSize(m_renderFrameSet.size().width(), 1)), borderEndEdgeColor());
|
| + context->fillRect(IntRect(borderRect.location(), IntSize(m_layoutFrameSet.size().width(), 1)), borderStartEdgeColor());
|
| + context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1), IntSize(m_layoutFrameSet.size().width(), 1)), borderEndEdgeColor());
|
| }
|
| }
|
|
|
| void FrameSetPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
|
| {
|
| - ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_renderFrameSet);
|
| + ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_layoutFrameSet);
|
|
|
| if (paintInfo.phase != PaintPhaseForeground)
|
| return;
|
|
|
| - LayoutObject* child = m_renderFrameSet.firstChild();
|
| + LayoutObject* child = m_layoutFrameSet.firstChild();
|
| if (!child)
|
| return;
|
|
|
| - LayoutPoint adjustedPaintOffset = paintOffset + m_renderFrameSet.location();
|
| + LayoutPoint adjustedPaintOffset = paintOffset + m_layoutFrameSet.location();
|
|
|
| - size_t rows = m_renderFrameSet.rows().m_sizes.size();
|
| - size_t cols = m_renderFrameSet.columns().m_sizes.size();
|
| - LayoutUnit borderThickness = m_renderFrameSet.frameSet()->border();
|
| + size_t rows = m_layoutFrameSet.rows().m_sizes.size();
|
| + size_t cols = m_layoutFrameSet.columns().m_sizes.size();
|
| + LayoutUnit borderThickness = m_layoutFrameSet.frameSet()->border();
|
|
|
| LayoutUnit yPos = 0;
|
| for (size_t r = 0; r < rows; r++) {
|
| LayoutUnit xPos = 0;
|
| for (size_t c = 0; c < cols; c++) {
|
| child->paint(paintInfo, adjustedPaintOffset);
|
| - xPos += m_renderFrameSet.columns().m_sizes[c];
|
| - if (borderThickness && m_renderFrameSet.columns().m_allowBorder[c + 1]) {
|
| + xPos += m_layoutFrameSet.columns().m_sizes[c];
|
| + if (borderThickness && m_layoutFrameSet.columns().m_allowBorder[c + 1]) {
|
| paintColumnBorder(paintInfo, pixelSnappedIntRect(
|
| - LayoutRect(adjustedPaintOffset.x() + xPos, adjustedPaintOffset.y() + yPos, borderThickness, m_renderFrameSet.size().height())));
|
| + LayoutRect(adjustedPaintOffset.x() + xPos, adjustedPaintOffset.y() + yPos, borderThickness, m_layoutFrameSet.size().height())));
|
| xPos += borderThickness;
|
| }
|
| child = child->nextSibling();
|
| if (!child)
|
| return;
|
| }
|
| - yPos += m_renderFrameSet.rows().m_sizes[r];
|
| - if (borderThickness && m_renderFrameSet.rows().m_allowBorder[r + 1]) {
|
| + yPos += m_layoutFrameSet.rows().m_sizes[r];
|
| + if (borderThickness && m_layoutFrameSet.rows().m_allowBorder[r + 1]) {
|
| paintRowBorder(paintInfo, pixelSnappedIntRect(
|
| - LayoutRect(adjustedPaintOffset.x(), adjustedPaintOffset.y() + yPos, m_renderFrameSet.size().width(), borderThickness)));
|
| + LayoutRect(adjustedPaintOffset.x(), adjustedPaintOffset.y() + yPos, m_layoutFrameSet.size().width(), borderThickness)));
|
| yPos += borderThickness;
|
| }
|
| }
|
|
|