Chromium Code Reviews| 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 "core/paint/ObjectPainter.h" | 5 #include "core/paint/ObjectPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBlock.h" | 7 #include "core/layout/LayoutBlock.h" |
| 8 #include "core/layout/LayoutInline.h" | 8 #include "core/layout/LayoutInline.h" |
| 9 #include "core/layout/LayoutObject.h" | 9 #include "core/layout/LayoutObject.h" |
| 10 #include "core/layout/LayoutTheme.h" | 10 #include "core/layout/LayoutTheme.h" |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 687 info.phase = PaintPhaseBlockBackground; | 687 info.phase = PaintPhaseBlockBackground; |
| 688 m_layoutObject.paint(info, paintOffset); | 688 m_layoutObject.paint(info, paintOffset); |
| 689 info.phase = PaintPhaseFloat; | 689 info.phase = PaintPhaseFloat; |
| 690 m_layoutObject.paint(info, paintOffset); | 690 m_layoutObject.paint(info, paintOffset); |
| 691 info.phase = PaintPhaseForeground; | 691 info.phase = PaintPhaseForeground; |
| 692 m_layoutObject.paint(info, paintOffset); | 692 m_layoutObject.paint(info, paintOffset); |
| 693 info.phase = PaintPhaseOutline; | 693 info.phase = PaintPhaseOutline; |
| 694 m_layoutObject.paint(info, paintOffset); | 694 m_layoutObject.paint(info, paintOffset); |
| 695 } | 695 } |
| 696 | 696 |
| 697 #if DCHECK_IS_ON() | |
| 698 void ObjectPainter::doCheckPaintOffset(const PaintInfo& paintInfo, | |
| 699 const LayoutPoint& paintOffset) { | |
| 700 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | |
| 701 return; | |
| 702 if (paintInfo.getGlobalPaintFlags() != GlobalPaintNormalPhase) | |
|
pdr.
2016/11/10 07:35:32
Is this just temporary because you're computing th
Xianzhu
2016/11/10 17:41:10
Added comments to explain this:
// If we are pain
pdr.
2016/11/10 18:54:11
I don't think this is a blocking issue for this pa
Xianzhu
2016/11/10 22:51:50
Yes. For example, during printing/multicol paintin
| |
| 703 return; | |
| 704 if (paintInfo.context.getPaintController().isSkippingCache()) | |
| 705 return; | |
| 706 // TODO(pdr): Let painter and paint property tree builder generate the same | |
| 707 // paint offset for LayoutScrollbarPart. | |
|
chrishtr
2016/11/10 18:42:00
Is there a bug filed for this?
Xianzhu
2016/11/10 22:51:50
pdr@ just filed crbug.com/664249. Added link here.
| |
| 708 if (m_layoutObject.isLayoutScrollbarPart()) | |
| 709 return; | |
| 710 | |
| 711 LayoutPoint adjustedPaintOffset = paintOffset; | |
| 712 if (m_layoutObject.isBox()) | |
| 713 adjustedPaintOffset += toLayoutBox(m_layoutObject).location(); | |
| 714 DCHECK(m_layoutObject.previousPaintOffset() == adjustedPaintOffset); | |
| 715 } | |
| 716 #endif | |
| 717 | |
| 697 } // namespace blink | 718 } // namespace blink |
| OLD | NEW |