OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/paint/InlineFlowBoxPainter.h" | 6 #include "core/paint/InlineFlowBoxPainter.h" |
7 | 7 |
8 #include "core/layout/Layer.h" | 8 #include "core/layout/Layer.h" |
9 #include "core/layout/PaintInfo.h" | 9 #include "core/layout/PaintInfo.h" |
10 #include "core/layout/line/InlineFlowBox.h" | 10 #include "core/layout/line/InlineFlowBox.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 bool containingBlockPaintsContinuationOutline = inlineFlow.continuat
ion() || inlineFlow.isInlineElementContinuation(); | 36 bool containingBlockPaintsContinuationOutline = inlineFlow.continuat
ion() || inlineFlow.isInlineElementContinuation(); |
37 if (containingBlockPaintsContinuationOutline) { | 37 if (containingBlockPaintsContinuationOutline) { |
38 // FIXME: See https://bugs.webkit.org/show_bug.cgi?id=54690. We
currently don't reconnect inline continuations | 38 // FIXME: See https://bugs.webkit.org/show_bug.cgi?id=54690. We
currently don't reconnect inline continuations |
39 // after a child removal. As a result, those merged inlines do n
ot get seperated and hence not get enclosed by | 39 // after a child removal. As a result, those merged inlines do n
ot get seperated and hence not get enclosed by |
40 // anonymous blocks. In this case, it is better to bail out and
paint it ourself. | 40 // anonymous blocks. In this case, it is better to bail out and
paint it ourself. |
41 RenderBlock* enclosingAnonymousBlock = m_inlineFlowBox.renderer(
).containingBlock(); | 41 RenderBlock* enclosingAnonymousBlock = m_inlineFlowBox.renderer(
).containingBlock(); |
42 if (!enclosingAnonymousBlock->isAnonymousBlock()) { | 42 if (!enclosingAnonymousBlock->isAnonymousBlock()) { |
43 containingBlockPaintsContinuationOutline = false; | 43 containingBlockPaintsContinuationOutline = false; |
44 } else { | 44 } else { |
45 cb = enclosingAnonymousBlock->containingBlock(); | 45 cb = enclosingAnonymousBlock->containingBlock(); |
46 for (RenderBoxModelObject* box = m_inlineFlowBox.boxModelObj
ect(); box != cb; box = box->parent()->enclosingBoxModelObject()) { | 46 for (LayoutBoxModelObject* box = m_inlineFlowBox.boxModelObj
ect(); box != cb; box = box->parent()->enclosingBoxModelObject()) { |
47 if (box->hasSelfPaintingLayer()) { | 47 if (box->hasSelfPaintingLayer()) { |
48 containingBlockPaintsContinuationOutline = false; | 48 containingBlockPaintsContinuationOutline = false; |
49 break; | 49 break; |
50 } | 50 } |
51 } | 51 } |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 if (containingBlockPaintsContinuationOutline) { | 55 if (containingBlockPaintsContinuationOutline) { |
56 // Add ourselves to the containing block of the entire continuat
ion so that it can | 56 // Add ourselves to the containing block of the entire continuat
ion so that it can |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 rect.setHeight(logicalHeight); | 330 rect.setHeight(logicalHeight); |
331 } else { | 331 } else { |
332 rect.setX(logicalTop); | 332 rect.setX(logicalTop); |
333 rect.setWidth(logicalHeight); | 333 rect.setWidth(logicalHeight); |
334 } | 334 } |
335 } | 335 } |
336 return rect; | 336 return rect; |
337 } | 337 } |
338 | 338 |
339 } // namespace blink | 339 } // namespace blink |
OLD | NEW |