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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 // but their location have the row's location baked-in. | 410 // but their location have the row's location baked-in. |
411 // Similar adjustment is done in LayoutTableCell::offsetFromContainer(). | 411 // Similar adjustment is done in LayoutTableCell::offsetFromContainer(). |
412 if (boxModelObject.isTableCell()) { | 412 if (boxModelObject.isTableCell()) { |
413 LayoutObject* parentRow = boxModelObject.parent(); | 413 LayoutObject* parentRow = boxModelObject.parent(); |
414 ASSERT(parentRow && parentRow->isTableRow()); | 414 ASSERT(parentRow && parentRow->isTableRow()); |
415 context.current.paintOffset.moveBy(-toLayoutBox(parentRow)->topLeftL
ocation()); | 415 context.current.paintOffset.moveBy(-toLayoutBox(parentRow)->topLeftL
ocation()); |
416 } | 416 } |
417 } | 417 } |
418 } | 418 } |
419 | 419 |
420 void PaintPropertyTreeBuilder::buildTreeNodes(const LayoutObject& object, PaintP
ropertyTreeBuilderContext& context) | 420 void PaintPropertyTreeBuilder::buildTreeNodesForSelf(const LayoutObject& object,
PaintPropertyTreeBuilderContext& context) |
421 { | 421 { |
422 if (!object.isBoxModelObject() && !object.isSVG()) | 422 if (!object.isBoxModelObject() && !object.isSVG()) |
423 return; | 423 return; |
424 | 424 |
425 deriveBorderBoxFromContainerContext(object, context); | 425 deriveBorderBoxFromContainerContext(object, context); |
426 | 426 |
427 updatePaintOffsetTranslation(object, context); | 427 updatePaintOffsetTranslation(object, context); |
428 updateTransform(object, context); | 428 updateTransform(object, context); |
429 updateEffect(object, context); | 429 updateEffect(object, context); |
430 updateCssClip(object, context); | 430 updateCssClip(object, context); |
431 updateLocalBorderBoxContext(object, context); | 431 updateLocalBorderBoxContext(object, context); |
432 updateScrollbarPaintOffset(object, context); | 432 updateScrollbarPaintOffset(object, context); |
| 433 } |
| 434 |
| 435 void PaintPropertyTreeBuilder::buildTreeNodesForChildren(const LayoutObject& obj
ect, PaintPropertyTreeBuilderContext& context) |
| 436 { |
| 437 if (!object.isBoxModelObject() && !object.isSVG()) |
| 438 return; |
| 439 |
433 updateOverflowClip(object, context); | 440 updateOverflowClip(object, context); |
434 updatePerspective(object, context); | 441 updatePerspective(object, context); |
435 updateSvgLocalToBorderBoxTransform(object, context); | 442 updateSvgLocalToBorderBoxTransform(object, context); |
436 updateScrollTranslation(object, context); | 443 updateScrollTranslation(object, context); |
437 updateOutOfFlowContext(object, context); | 444 updateOutOfFlowContext(object, context); |
438 } | 445 } |
439 | 446 |
440 } // namespace blink | 447 } // namespace blink |
OLD | NEW |