| 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 } | |
| 355 } | 348 } |
| 356 | 349 |
| 357 void PaintPropertyTreeBuilder::updateOverflowClip(const LayoutObject& object, Pa
intPropertyTreeBuilderContext& context) | 350 void PaintPropertyTreeBuilder::updateOverflowClip(const LayoutObject& object, Pa
intPropertyTreeBuilderContext& context) |
| 358 { | 351 { |
| 359 if (!object.isBox()) | 352 if (!object.isBox()) |
| 360 return; | 353 return; |
| 361 const LayoutBox& box = toLayoutBox(object); | 354 const LayoutBox& box = toLayoutBox(object); |
| 362 | 355 |
| 363 // The <input> elements can't have contents thus CSS overflow property doesn
't apply. | 356 // The <input> elements can't have contents thus CSS overflow property doesn
't apply. |
| 364 // However for layout purposes we do generate child layout objects for them,
e.g. button label. | 357 // 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... |
| 580 return; | 573 return; |
| 581 | 574 |
| 582 updateOverflowClip(object, context); | 575 updateOverflowClip(object, context); |
| 583 updatePerspective(object, context); | 576 updatePerspective(object, context); |
| 584 updateSvgLocalToBorderBoxTransform(object, context); | 577 updateSvgLocalToBorderBoxTransform(object, context); |
| 585 updateScrollAndScrollTranslation(object, context); | 578 updateScrollAndScrollTranslation(object, context); |
| 586 updateOutOfFlowContext(object, context); | 579 updateOutOfFlowContext(object, context); |
| 587 } | 580 } |
| 588 | 581 |
| 589 } // namespace blink | 582 } // namespace blink |
| OLD | NEW |