| 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/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 // apply. However for layout purposes we do generate child layout objects for | 455 // apply. However for layout purposes we do generate child layout objects for |
| 456 // them, e.g. button label. We should clip the overflow from those children. | 456 // them, e.g. button label. We should clip the overflow from those children. |
| 457 // This is called control clip and we technically treat them like overflow | 457 // This is called control clip and we technically treat them like overflow |
| 458 // clip. | 458 // clip. |
| 459 LayoutRect clipRect; | 459 LayoutRect clipRect; |
| 460 if (box.hasControlClip()) { | 460 if (box.hasControlClip()) { |
| 461 clipRect = box.controlClipRect(context.current.paintOffset); | 461 clipRect = box.controlClipRect(context.current.paintOffset); |
| 462 } else if (box.hasOverflowClip() || box.styleRef().containsPaint() || | 462 } else if (box.hasOverflowClip() || box.styleRef().containsPaint() || |
| 463 (box.isSVGRoot() && | 463 (box.isSVGRoot() && |
| 464 toLayoutSVGRoot(box).shouldApplyViewportClip())) { | 464 toLayoutSVGRoot(box).shouldApplyViewportClip())) { |
| 465 clipRect = box.overflowClipRect(context.current.paintOffset); | 465 clipRect = LayoutRect( |
| 466 pixelSnappedIntRect(box.overflowClipRect(context.current.paintOffset))); |
| 466 } else { | 467 } else { |
| 467 if (auto* properties = object.getMutableForPainting().paintProperties()) { | 468 if (auto* properties = object.getMutableForPainting().paintProperties()) { |
| 468 properties->clearInnerBorderRadiusClip(); | 469 properties->clearInnerBorderRadiusClip(); |
| 469 properties->clearOverflowClip(); | 470 properties->clearOverflowClip(); |
| 470 } | 471 } |
| 471 return; | 472 return; |
| 472 } | 473 } |
| 473 | 474 |
| 474 if (box.styleRef().hasBorderRadius()) { | 475 if (box.styleRef().hasBorderRadius()) { |
| 475 auto innerBorder = box.styleRef().getRoundedInnerBorderFor( | 476 auto innerBorder = box.styleRef().getRoundedInnerBorderFor( |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 return; | 791 return; |
| 791 | 792 |
| 792 updateOverflowClip(object, context); | 793 updateOverflowClip(object, context); |
| 793 updatePerspective(object, context); | 794 updatePerspective(object, context); |
| 794 updateSvgLocalToBorderBoxTransform(object, context); | 795 updateSvgLocalToBorderBoxTransform(object, context); |
| 795 updateScrollAndScrollTranslation(object, context); | 796 updateScrollAndScrollTranslation(object, context); |
| 796 updateOutOfFlowContext(object, context); | 797 updateOutOfFlowContext(object, context); |
| 797 } | 798 } |
| 798 | 799 |
| 799 } // namespace blink | 800 } // namespace blink |
| OLD | NEW |