| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 { | 993 { |
| 994 LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom)); | 994 LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom)); |
| 995 overflowRect.moveBy(paintOffset); | 995 overflowRect.moveBy(paintOffset); |
| 996 | 996 |
| 997 if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect))) | 997 if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect))) |
| 998 return; | 998 return; |
| 999 | 999 |
| 1000 if (paintInfo.phase == PaintPhaseMask) { | 1000 if (paintInfo.phase == PaintPhaseMask) { |
| 1001 paintMask(paintInfo, paintOffset); | 1001 paintMask(paintInfo, paintOffset); |
| 1002 return; | 1002 return; |
| 1003 } else if (paintInfo.phase == PaintPhaseForeground) { | |
| 1004 // Paint our background, border and box-shadow. | |
| 1005 paintBoxDecorationBackground(paintInfo, paintOffset); | |
| 1006 } | 1003 } |
| 1007 | 1004 |
| 1008 // Paint our children. | 1005 if (paintInfo.phase == PaintPhaseForeground) |
| 1009 if (paintInfo.phase != PaintPhaseSelfOutline) { | 1006 paintBoxDecorationBackground(paintInfo, paintOffset); |
| 1010 PaintInfo childInfo(paintInfo); | |
| 1011 childInfo.phase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPhas
eOutline : paintInfo.phase; | |
| 1012 | 1007 |
| 1013 if (childInfo.paintingRoot && childInfo.paintingRoot->isDescendantOf(&re
nderer())) | 1008 PaintInfo childInfo(paintInfo); |
| 1014 childInfo.paintingRoot = 0; | |
| 1015 else | |
| 1016 childInfo.updatePaintingRootForChildren(&renderer()); | |
| 1017 | 1009 |
| 1018 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { | 1010 if (childInfo.paintingRoot && childInfo.paintingRoot->isDescendantOf(&render
er())) |
| 1019 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPai
ntingLayer()) | 1011 childInfo.paintingRoot = 0; |
| 1020 curr->paint(childInfo, paintOffset, lineTop, lineBottom); | 1012 else |
| 1021 } | 1013 childInfo.updatePaintingRootForChildren(&renderer()); |
| 1014 |
| 1015 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
| 1016 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintin
gLayer()) |
| 1017 curr->paint(childInfo, paintOffset, lineTop, lineBottom); |
| 1022 } | 1018 } |
| 1023 } | 1019 } |
| 1024 | 1020 |
| 1025 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c,
const FillLayer& fillLayer, const LayoutRect& rect) | 1021 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c,
const FillLayer& fillLayer, const LayoutRect& rect) |
| 1026 { | 1022 { |
| 1027 if (fillLayer.next()) | 1023 if (fillLayer.next()) |
| 1028 paintFillLayers(paintInfo, c, *fillLayer.next(), rect); | 1024 paintFillLayers(paintInfo, c, *fillLayer.next(), rect); |
| 1029 paintFillLayer(paintInfo, c, fillLayer, rect); | 1025 paintFillLayer(paintInfo, c, fillLayer, rect); |
| 1030 } | 1026 } |
| 1031 | 1027 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 ASSERT(child->prevOnLine() == prev); | 1417 ASSERT(child->prevOnLine() == prev); |
| 1422 prev = child; | 1418 prev = child; |
| 1423 } | 1419 } |
| 1424 ASSERT(prev == m_lastChild); | 1420 ASSERT(prev == m_lastChild); |
| 1425 #endif | 1421 #endif |
| 1426 } | 1422 } |
| 1427 | 1423 |
| 1428 #endif | 1424 #endif |
| 1429 | 1425 |
| 1430 } // namespace blink | 1426 } // namespace blink |
| OLD | NEW |