Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp |
| index 02cf84f9dbd2a1216e737550be00b1e2d3201017..43555eb07f418623c438aaea01165f1d68953aa1 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp |
| @@ -2079,4 +2079,17 @@ void LayoutBlockFlow::invalidateDisplayItemClientsOfFirstLine() |
| firstRootBox->invalidateDisplayItemClientsRecursively(); |
| } |
| +PaintInvalidationReason LayoutBlockFlow::invalidatePaintIfNeeded(PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContainer) |
|
Xianzhu
2015/12/18 17:24:54
This will miss the LayoutButton case, but I think
|
| +{ |
| + PaintInvalidationReason reason = LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState, paintInvalidationContainer); |
| + if (reason == PaintInvalidationNone) |
| + return reason; |
| + RootInlineBox* line = firstRootBox(); |
| + if (!line || !line->isFirstLineStyle()) |
| + return reason; |
| + // It's the RootInlineBox that paints the ::first-line background. |
| + invalidateDisplayItemClient(*line); |
|
Xianzhu
2015/12/18 07:01:20
Will this always invalidate the first line, even i
mstensho (USE GERRIT)
2015/12/18 10:33:04
Yeah, looks like it. That wasn't my intention.
mstensho (USE GERRIT)
2015/12/18 13:11:11
Fixed it. Not sure if it's worth it, though. Could
Xianzhu
2015/12/18 17:24:54
Hmm enclosingFirstLineStyleBlock() seems not cheap
mstensho (USE GERRIT)
2015/12/21 10:54:10
Done. Added a comment too.
|
| + return reason; |
| +} |
| + |
| } |