| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 return; | 625 return; |
| 626 | 626 |
| 627 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { | 627 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
| 628 const LayoutBox& box = toLayoutBox(object); | 628 const LayoutBox& box = toLayoutBox(object); |
| 629 // The <input> elements can't have contents thus CSS overflow property | 629 // The <input> elements can't have contents thus CSS overflow property |
| 630 // doesn't apply. However for layout purposes we do generate child layout | 630 // doesn't apply. However for layout purposes we do generate child layout |
| 631 // objects for them, e.g. button label. We should clip the overflow from | 631 // objects for them, e.g. button label. We should clip the overflow from |
| 632 // those children. This is called control clip and we technically treat them | 632 // those children. This is called control clip and we technically treat them |
| 633 // like overflow clip. | 633 // like overflow clip. |
| 634 LayoutRect clipRect; | 634 LayoutRect clipRect; |
| 635 if (box.hasControlClip()) { | 635 if (box.shouldClipOverflow()) { |
| 636 clipRect = box.controlClipRect(context.current.paintOffset); | |
| 637 } else if (box.shouldClipOverflow()) { | |
| 638 clipRect = LayoutRect(pixelSnappedIntRect( | 636 clipRect = LayoutRect(pixelSnappedIntRect( |
| 639 box.overflowClipRect(context.current.paintOffset))); | 637 box.overflowClipRect(context.current.paintOffset))); |
| 640 } else { | 638 } else { |
| 641 if (auto* properties = object.getMutableForPainting().paintProperties()) { | 639 if (auto* properties = object.getMutableForPainting().paintProperties()) { |
| 642 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); | 640 context.forceSubtreeUpdate |= properties->clearInnerBorderRadiusClip(); |
| 643 context.forceSubtreeUpdate |= properties->clearOverflowClip(); | 641 context.forceSubtreeUpdate |= properties->clearOverflowClip(); |
| 644 } | 642 } |
| 645 return; | 643 return; |
| 646 } | 644 } |
| 647 | 645 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 updateOverflowClip(object, context); | 989 updateOverflowClip(object, context); |
| 992 updatePerspective(object, context); | 990 updatePerspective(object, context); |
| 993 updateSvgLocalToBorderBoxTransform(object, context); | 991 updateSvgLocalToBorderBoxTransform(object, context); |
| 994 updateScrollAndScrollTranslation(object, context); | 992 updateScrollAndScrollTranslation(object, context); |
| 995 updateOutOfFlowContext(object, context); | 993 updateOutOfFlowContext(object, context); |
| 996 | 994 |
| 997 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 995 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 998 } | 996 } |
| 999 | 997 |
| 1000 } // namespace blink | 998 } // namespace blink |
| OLD | NEW |