OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 // practice is a significant performance savings. | 543 // practice is a significant performance savings. |
544 Layer()->AddLayerHitTestRects(rects); | 544 Layer()->AddLayerHitTestRects(rects); |
545 } | 545 } |
546 } else { | 546 } else { |
547 LayoutObject::AddLayerHitTestRects(rects, current_layer, layer_offset, | 547 LayoutObject::AddLayerHitTestRects(rects, current_layer, layer_offset, |
548 container_rect); | 548 container_rect); |
549 } | 549 } |
550 } | 550 } |
551 | 551 |
552 DISABLE_CFI_PERF | 552 DISABLE_CFI_PERF |
553 void LayoutBoxModelObject::InvalidateTreeIfNeeded( | 553 void LayoutBoxModelObject::DeprecatedInvalidateTree( |
554 const PaintInvalidationState& paint_invalidation_state) { | 554 const PaintInvalidationState& paint_invalidation_state) { |
555 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 555 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
556 EnsureIsReadyForPaintInvalidation(); | 556 EnsureIsReadyForPaintInvalidation(); |
557 | 557 |
558 PaintInvalidationState new_paint_invalidation_state(paint_invalidation_state, | 558 PaintInvalidationState new_paint_invalidation_state(paint_invalidation_state, |
559 *this); | 559 *this); |
560 if (!ShouldCheckForPaintInvalidationWithPaintInvalidationState( | 560 if (!ShouldCheckForPaintInvalidationWithPaintInvalidationState( |
561 new_paint_invalidation_state)) | 561 new_paint_invalidation_state)) |
562 return; | 562 return; |
563 | 563 |
564 if (MayNeedPaintInvalidationSubtree()) | 564 if (MayNeedPaintInvalidationSubtree()) |
565 new_paint_invalidation_state | 565 new_paint_invalidation_state |
566 .SetForceSubtreeInvalidationCheckingWithinContainer(); | 566 .SetForceSubtreeInvalidationCheckingWithinContainer(); |
567 | 567 |
568 ObjectPaintInvalidator paint_invalidator(*this); | 568 ObjectPaintInvalidator paint_invalidator(*this); |
569 LayoutRect previous_visual_rect = VisualRect(); | 569 LayoutRect previous_visual_rect = VisualRect(); |
570 LayoutPoint previous_location = paint_invalidator.LocationInBacking(); | 570 LayoutPoint previous_location = paint_invalidator.LocationInBacking(); |
571 PaintInvalidationReason reason = | 571 PaintInvalidationReason reason = |
572 InvalidatePaint(new_paint_invalidation_state); | 572 DeprecatedInvalidatePaint(new_paint_invalidation_state); |
573 | 573 |
574 if (previous_location != paint_invalidator.LocationInBacking()) { | 574 if (previous_location != paint_invalidator.LocationInBacking()) { |
575 new_paint_invalidation_state | 575 new_paint_invalidation_state |
576 .SetForceSubtreeInvalidationCheckingWithinContainer(); | 576 .SetForceSubtreeInvalidationCheckingWithinContainer(); |
577 } | 577 } |
578 | 578 |
579 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't have | 579 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't have |
580 // enough saved information to do accurate check of clipping change. Will | 580 // enough saved information to do accurate check of clipping change. Will |
581 // remove when we remove rect-based paint invalidation. | 581 // remove when we remove rect-based paint invalidation. |
582 if (previous_visual_rect != VisualRect() && | 582 if (previous_visual_rect != VisualRect() && |
583 !UsesCompositedScrolling() | 583 !UsesCompositedScrolling() |
584 // Note that isLayoutView() below becomes unnecessary after the launch of | 584 // Note that isLayoutView() below becomes unnecessary after the launch of |
585 // root layer scrolling. | 585 // root layer scrolling. |
586 && (HasOverflowClip() || IsLayoutView())) { | 586 && (HasOverflowClip() || IsLayoutView())) { |
587 new_paint_invalidation_state | 587 new_paint_invalidation_state |
588 .SetForceSubtreeInvalidationRectUpdateWithinContainer(); | 588 .SetForceSubtreeInvalidationRectUpdateWithinContainer(); |
589 } | 589 } |
590 | 590 |
591 new_paint_invalidation_state.UpdateForChildren(reason); | 591 new_paint_invalidation_state.UpdateForChildren(reason); |
592 InvalidatePaintOfSubtreesIfNeeded(new_paint_invalidation_state); | 592 DeprecatedInvalidatePaintOfSubtrees(new_paint_invalidation_state); |
593 | 593 |
594 ClearPaintInvalidationFlags(); | 594 ClearPaintInvalidationFlags(); |
595 } | 595 } |
596 | 596 |
597 void LayoutBoxModelObject::AddOutlineRectsForNormalChildren( | 597 void LayoutBoxModelObject::AddOutlineRectsForNormalChildren( |
598 Vector<LayoutRect>& rects, | 598 Vector<LayoutRect>& rects, |
599 const LayoutPoint& additional_offset, | 599 const LayoutPoint& additional_offset, |
600 IncludeBlockVisualOverflowOrNot include_block_overflows) const { | 600 IncludeBlockVisualOverflowOrNot include_block_overflows) const { |
601 for (LayoutObject* child = SlowFirstChild(); child; | 601 for (LayoutObject* child = SlowFirstChild(); child; |
602 child = child->NextSibling()) { | 602 child = child->NextSibling()) { |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1482 if (root_element_style->HasBackground()) | 1482 if (root_element_style->HasBackground()) |
1483 return false; | 1483 return false; |
1484 | 1484 |
1485 if (GetNode() != GetDocument().FirstBodyElement()) | 1485 if (GetNode() != GetDocument().FirstBodyElement()) |
1486 return false; | 1486 return false; |
1487 | 1487 |
1488 return true; | 1488 return true; |
1489 } | 1489 } |
1490 | 1490 |
1491 } // namespace blink | 1491 } // namespace blink |
OLD | NEW |