Chromium Code Reviews| Index: Source/core/rendering/InlineFlowBox.cpp |
| diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp |
| index b1814adbde2b702cb8ea74996232465335de648e..65234efa0cd2d18497994deaaf1a99532050ca32 100644 |
| --- a/Source/core/rendering/InlineFlowBox.cpp |
| +++ b/Source/core/rendering/InlineFlowBox.cpp |
| @@ -1133,11 +1133,25 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, |
| childInfo.phase = paintPhase; |
| childInfo.updatePaintingRootForChildren(&renderer()); |
| - // Paint our children. |
| + float decorationThickness = 0; |
|
leviw_travelin_and_unemployed
2014/03/21 20:43:08
These should be scoped inside the if.
|
| + float finalThickness = 0; |
| + |
| + // 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
|
| if (paintPhase != PaintPhaseSelfOutline) { |
| for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
| - if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) |
| + if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) { |
| curr->paint(childInfo, paintOffset, lineTop, lineBottom); |
| + curr->getPaintDecorationSyle(childInfo, paintOffset, &decorationThickness); |
|
leviw_travelin_and_unemployed
2014/03/21 20:43:08
Why not have this method return decorationThicknes
|
| + if (finalThickness < decorationThickness) |
| + finalThickness = decorationThickness; |
| + } |
| + } |
| + |
| + // 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
|
| + for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { |
| + if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) { |
| + curr->paintDecorationStyle(childInfo, paintOffset, lineTop, lineBottom, finalThickness); |
| + } |
| } |
| } |
| } |