| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/PaintPropertyTreeBuilder.h" | 5 #include "core/paint/PaintPropertyTreeBuilder.h" |
| 6 | 6 |
| 7 #include "core/dom/DOMNodeIds.h" | 7 #include "core/dom/DOMNodeIds.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 return; | 629 return; |
| 630 | 630 |
| 631 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { | 631 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
| 632 const LayoutBox& box = toLayoutBox(object); | 632 const LayoutBox& box = toLayoutBox(object); |
| 633 // The <input> elements can't have contents thus CSS overflow property | 633 // The <input> elements can't have contents thus CSS overflow property |
| 634 // doesn't apply. However for layout purposes we do generate child layout | 634 // doesn't apply. However for layout purposes we do generate child layout |
| 635 // objects for them, e.g. button label. We should clip the overflow from | 635 // objects for them, e.g. button label. We should clip the overflow from |
| 636 // those children. This is called control clip and we technically treat them | 636 // those children. This is called control clip and we technically treat them |
| 637 // like overflow clip. | 637 // like overflow clip. |
| 638 LayoutRect clipRect; | 638 LayoutRect clipRect; |
| 639 if (box.hasControlClip()) { | 639 if (box.shouldClipOverflow()) { |
| 640 clipRect = box.controlClipRect(context.current.paintOffset); | |
| 641 } else if (box.shouldClipOverflow()) { | |
| 642 clipRect = LayoutRect(pixelSnappedIntRect( | 640 clipRect = LayoutRect(pixelSnappedIntRect( |
| 643 box.overflowClipRect(context.current.paintOffset))); | 641 box.overflowClipRect(context.current.paintOffset))); |
| 644 } else { | 642 } else { |
| 645 if (auto* properties = object.getMutableForPainting().paintProperties()) { | 643 if (auto* properties = object.getMutableForPainting().paintProperties()) { |
| 646 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); | 644 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); |
| 647 context.forceSubtreeUpdate |= properties->clearOverflowClip(); | 645 context.forceSubtreeUpdate |= properties->clearOverflowClip(); |
| 648 } | 646 } |
| 649 return; | 647 return; |
| 650 } | 648 } |
| 651 | 649 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 updateOverflowClip(object, context); | 996 updateOverflowClip(object, context); |
| 999 updatePerspective(object, context); | 997 updatePerspective(object, context); |
| 1000 updateSvgLocalToBorderBoxTransform(object, context); | 998 updateSvgLocalToBorderBoxTransform(object, context); |
| 1001 updateScrollAndScrollTranslation(object, context); | 999 updateScrollAndScrollTranslation(object, context); |
| 1002 updateOutOfFlowContext(object, context); | 1000 updateOutOfFlowContext(object, context); |
| 1003 | 1001 |
| 1004 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 1002 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 1005 } | 1003 } |
| 1006 | 1004 |
| 1007 } // namespace blink | 1005 } // namespace blink |
| OLD | NEW |