| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 if (context.current.scroll && !object.document().settings()->threadedScrolli
ngEnabled()) | 338 if (context.current.scroll && !object.document().settings()->threadedScrolli
ngEnabled()) |
| 339 context.current.scroll->addMainThreadScrollingReasons(MainThreadScrollin
gReason::kThreadedScrollingDisabled); | 339 context.current.scroll->addMainThreadScrollingReasons(MainThreadScrollin
gReason::kThreadedScrollingDisabled); |
| 340 | 340 |
| 341 if (object.isBackgroundAttachmentFixedObject()) { | 341 if (object.isBackgroundAttachmentFixedObject()) { |
| 342 auto* scrollNode = context.current.scroll; | 342 auto* scrollNode = context.current.scroll; |
| 343 while (scrollNode && !scrollNode->hasMainThreadScrollingReasons(MainThre
adScrollingReason::kHasBackgroundAttachmentFixedObjects)) { | 343 while (scrollNode && !scrollNode->hasMainThreadScrollingReasons(MainThre
adScrollingReason::kHasBackgroundAttachmentFixedObjects)) { |
| 344 scrollNode->addMainThreadScrollingReasons(MainThreadScrollingReason:
:kHasBackgroundAttachmentFixedObjects); | 344 scrollNode->addMainThreadScrollingReasons(MainThreadScrollingReason:
:kHasBackgroundAttachmentFixedObjects); |
| 345 scrollNode = scrollNode->parent(); | 345 scrollNode = scrollNode->parent(); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 if (object.styleRef().position() == StickyPosition) { |
| 349 auto* scrollNode = context.current.scroll; |
| 350 while (scrollNode && !scrollNode->hasMainThreadScrollingReasons(MainThre
adScrollingReason::kHasStickyPositionObjects)) { |
| 351 scrollNode->addMainThreadScrollingReasons(MainThreadScrollingReason:
:kHasStickyPositionObjects); |
| 352 scrollNode = scrollNode->parent(); |
| 353 } |
| 354 } |
| 348 } | 355 } |
| 349 | 356 |
| 350 void PaintPropertyTreeBuilder::updateOverflowClip(const LayoutObject& object, Pa
intPropertyTreeBuilderContext& context) | 357 void PaintPropertyTreeBuilder::updateOverflowClip(const LayoutObject& object, Pa
intPropertyTreeBuilderContext& context) |
| 351 { | 358 { |
| 352 if (!object.isBox()) | 359 if (!object.isBox()) |
| 353 return; | 360 return; |
| 354 const LayoutBox& box = toLayoutBox(object); | 361 const LayoutBox& box = toLayoutBox(object); |
| 355 | 362 |
| 356 // The <input> elements can't have contents thus CSS overflow property doesn
't apply. | 363 // The <input> elements can't have contents thus CSS overflow property doesn
't apply. |
| 357 // However for layout purposes we do generate child layout objects for them,
e.g. button label. | 364 // However for layout purposes we do generate child layout objects for them,
e.g. button label. |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 return; | 580 return; |
| 574 | 581 |
| 575 updateOverflowClip(object, context); | 582 updateOverflowClip(object, context); |
| 576 updatePerspective(object, context); | 583 updatePerspective(object, context); |
| 577 updateSvgLocalToBorderBoxTransform(object, context); | 584 updateSvgLocalToBorderBoxTransform(object, context); |
| 578 updateScrollAndScrollTranslation(object, context); | 585 updateScrollAndScrollTranslation(object, context); |
| 579 updateOutOfFlowContext(object, context); | 586 updateOutOfFlowContext(object, context); |
| 580 } | 587 } |
| 581 | 588 |
| 582 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |