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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1126 } | 1126 } |
1127 | 1127 |
1128 if (paintInfo.phase == PaintPhaseMask) | 1128 if (paintInfo.phase == PaintPhaseMask) |
1129 return; | 1129 return; |
1130 | 1130 |
1131 PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPh aseOutline : paintInfo.phase; | 1131 PaintPhase paintPhase = paintInfo.phase == PaintPhaseChildOutlines ? PaintPh aseOutline : paintInfo.phase; |
1132 PaintInfo childInfo(paintInfo); | 1132 PaintInfo childInfo(paintInfo); |
1133 childInfo.phase = paintPhase; | 1133 childInfo.phase = paintPhase; |
1134 childInfo.updatePaintingRootForChildren(&renderer()); | 1134 childInfo.updatePaintingRootForChildren(&renderer()); |
1135 | 1135 |
1136 // Paint our children. | 1136 float decorationThickness = 0; |
leviw_travelin_and_unemployed
2014/03/21 20:43:08
These should be scoped inside the if.
| |
1137 float finalThickness = 0; | |
1138 | |
1139 // Paint our childrens and calculate underline thickness | |
leviw_travelin_and_unemployed
2014/03/21 20:43:08
s/childrens/children/, but I don't think this comm
| |
1137 if (paintPhase != PaintPhaseSelfOutline) { | 1140 if (paintPhase != PaintPhaseSelfOutline) { |
1138 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { | 1141 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
1139 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPai ntingLayer()) | 1142 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPai ntingLayer()) { |
1140 curr->paint(childInfo, paintOffset, lineTop, lineBottom); | 1143 curr->paint(childInfo, paintOffset, lineTop, lineBottom); |
1144 curr->getPaintDecorationSyle(childInfo, paintOffset, &decoration Thickness); | |
leviw_travelin_and_unemployed
2014/03/21 20:43:08
Why not have this method return decorationThicknes
| |
1145 if (finalThickness < decorationThickness) | |
1146 finalThickness = decorationThickness; | |
1147 } | |
1148 } | |
1149 | |
1150 // We have underline thickness now, let draw it | |
leviw_travelin_and_unemployed
2014/03/21 20:43:08
s/let/lets/, but again I don't think this comment
| |
1151 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { | |
1152 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPai ntingLayer()) { | |
1153 curr->paintDecorationStyle(childInfo, paintOffset, lineTop, line Bottom, finalThickness); | |
1154 } | |
1141 } | 1155 } |
1142 } | 1156 } |
1143 } | 1157 } |
1144 | 1158 |
1145 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect, CompositeOperator op) | 1159 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer* fillLayer, const LayoutRect& rect, CompositeOperator op) |
1146 { | 1160 { |
1147 if (!fillLayer) | 1161 if (!fillLayer) |
1148 return; | 1162 return; |
1149 paintFillLayers(paintInfo, c, fillLayer->next(), rect, op); | 1163 paintFillLayers(paintInfo, c, fillLayer->next(), rect, op); |
1150 paintFillLayer(paintInfo, c, fillLayer, rect, op); | 1164 paintFillLayer(paintInfo, c, fillLayer, rect, op); |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1643 ASSERT(child->prevOnLine() == prev); | 1657 ASSERT(child->prevOnLine() == prev); |
1644 prev = child; | 1658 prev = child; |
1645 } | 1659 } |
1646 ASSERT(prev == m_lastChild); | 1660 ASSERT(prev == m_lastChild); |
1647 #endif | 1661 #endif |
1648 } | 1662 } |
1649 | 1663 |
1650 #endif | 1664 #endif |
1651 | 1665 |
1652 } // namespace WebCore | 1666 } // namespace WebCore |
OLD | NEW |