| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 return; | 355 return; |
| 356 const LayoutBox& box = toLayoutBox(object); | 356 const LayoutBox& box = toLayoutBox(object); |
| 357 | 357 |
| 358 // The <input> elements can't have contents thus CSS overflow property doesn
't apply. | 358 // The <input> elements can't have contents thus CSS overflow property doesn
't apply. |
| 359 // However for layout purposes we do generate child layout objects for them,
e.g. button label. | 359 // However for layout purposes we do generate child layout objects for them,
e.g. button label. |
| 360 // We should clip the overflow from those children. This is called control c
lip and we | 360 // We should clip the overflow from those children. This is called control c
lip and we |
| 361 // technically treat them like overflow clip. | 361 // technically treat them like overflow clip. |
| 362 LayoutRect clipRect; | 362 LayoutRect clipRect; |
| 363 if (box.hasControlClip()) { | 363 if (box.hasControlClip()) { |
| 364 clipRect = box.controlClipRect(context.current.paintOffset); | 364 clipRect = box.controlClipRect(context.current.paintOffset); |
| 365 } else if (box.hasOverflowClip() || (box.isSVGRoot() && toLayoutSVGRoot(box)
.shouldApplyViewportClip())) { | 365 } else if (box.hasOverflowClip() || box.styleRef().containsPaint() || (box.i
sSVGRoot() && toLayoutSVGRoot(box).shouldApplyViewportClip())) { |
| 366 clipRect = box.overflowClipRect(context.current.paintOffset); | 366 clipRect = box.overflowClipRect(context.current.paintOffset); |
| 367 } else { | 367 } else { |
| 368 if (ObjectPaintProperties* properties = object.getMutableForPainting().o
bjectPaintProperties()) | 368 if (ObjectPaintProperties* properties = object.getMutableForPainting().o
bjectPaintProperties()) |
| 369 properties->clearOverflowClip(); | 369 properties->clearOverflowClip(); |
| 370 return; | 370 return; |
| 371 } | 371 } |
| 372 | 372 |
| 373 // TODO(pdr): We should create an entry in ObjectPaintProperties for border
radius to ensure | 373 // TODO(pdr): We should create an entry in ObjectPaintProperties for border
radius to ensure |
| 374 // the owership model of properties is simple for incremental updates. | 374 // the owership model of properties is simple for incremental updates. |
| 375 // This need to be in top-level block to hold the reference until we finish
creating the normal clip node. | 375 // This need to be in top-level block to hold the reference until we finish
creating the normal clip node. |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 return; | 579 return; |
| 580 | 580 |
| 581 updateOverflowClip(object, context); | 581 updateOverflowClip(object, context); |
| 582 updatePerspective(object, context); | 582 updatePerspective(object, context); |
| 583 updateSvgLocalToBorderBoxTransform(object, context); | 583 updateSvgLocalToBorderBoxTransform(object, context); |
| 584 updateScrollAndScrollTranslation(object, context); | 584 updateScrollAndScrollTranslation(object, context); |
| 585 updateOutOfFlowContext(object, context); | 585 updateOutOfFlowContext(object, context); |
| 586 } | 586 } |
| 587 | 587 |
| 588 } // namespace blink | 588 } // namespace blink |
| OLD | NEW |