| 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/PaintInfo.h" | 5 #include "core/paint/PaintInfo.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 void PaintInfo::updatePaintingRootForChildren(const LayoutObject* layoutObject) |
| 10 { |
| 11 if (!paintingRoot) |
| 12 return; |
| 13 |
| 14 // If we're the painting root, kids draw normally, and see root of nullptr. |
| 15 if (paintingRoot == layoutObject) { |
| 16 paintingRoot = nullptr; |
| 17 return; |
| 18 } |
| 19 } |
| 20 |
| 21 bool PaintInfo::shouldPaintWithinRoot(const LayoutObject* layoutObject) const |
| 22 { |
| 23 return !paintingRoot || paintingRoot == layoutObject; |
| 24 } |
| 25 |
| 9 void PaintInfo::updateCullRect(const AffineTransform& localToParentTransform) | 26 void PaintInfo::updateCullRect(const AffineTransform& localToParentTransform) |
| 10 { | 27 { |
| 11 m_cullRect.updateCullRect(localToParentTransform); | 28 m_cullRect.updateCullRect(localToParentTransform); |
| 12 } | 29 } |
| 13 | 30 |
| 14 } // namespace blink | 31 } // namespace blink |
| OLD | NEW |