| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 // contains this squashed layer's clipping ancestor. The clip rect is | 481 // contains this squashed layer's clipping ancestor. The clip rect is |
| 482 // returned in the coordinate space of the given squashed layer. If there is | 482 // returned in the coordinate space of the given squashed layer. If there is |
| 483 // no such containing layer, returns the infinite rect. | 483 // no such containing layer, returns the infinite rect. |
| 484 // FIXME: unify this code with the code that sets up m_ancestorClippingLayer. | 484 // FIXME: unify this code with the code that sets up m_ancestorClippingLayer. |
| 485 // They are doing very similar things. | 485 // They are doing very similar things. |
| 486 static IntRect LocalClipRectForSquashedLayer( | 486 static IntRect LocalClipRectForSquashedLayer( |
| 487 const PaintLayer& reference_layer, | 487 const PaintLayer& reference_layer, |
| 488 const GraphicsLayerPaintInfo&, | 488 const GraphicsLayerPaintInfo&, |
| 489 const Vector<GraphicsLayerPaintInfo>& layers); | 489 const Vector<GraphicsLayerPaintInfo>& layers); |
| 490 | 490 |
| 491 // Conservatively check that a border-radius clip does not clip a child. | |
| 492 // This is a fast approximate test. Depending on the shape of the child and | |
| 493 // the size of the border radius, this method may return false when in fact | |
| 494 // the child is not clipped. We accept the approximation because most border | |
| 495 // radii are small and the outcome is used to reduce the number of layers, | |
| 496 // not influence correctness. | |
| 497 bool AncestorRoundedCornersWontClip( | |
| 498 const LayoutBoxModelObject& child, | |
| 499 const LayoutBoxModelObject& clipping_ancestor); | |
| 500 | |
| 501 // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing | 491 // Return true in |owningLayerIsClipped| iff |m_owningLayer|'s compositing |
| 502 // ancestor is not a descendant (inclusive) of the clipping container for | 492 // ancestor is not a descendant (inclusive) of the clipping container for |
| 503 // |m_owningLayer|. Return true in |owningLayerIsMasked| iff | 493 // |m_owningLayer|. Return true in |owningLayerIsMasked| iff |
| 504 // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor | 494 // |owningLayerIsClipped| is true and |m_owningLayer|'s compositing ancestor |
| 505 // is not a descendant (inclusive) of a container that applies a mask for | 495 // is not a descendant (inclusive) of a container that applies a mask for |
| 506 // |m_owningLayer|. | 496 // |m_owningLayer|. |
| 507 void OwningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( | 497 void OwningLayerClippedOrMaskedByLayerNotAboveCompositedAncestor( |
| 508 const PaintLayer* scroll_parent, | 498 const PaintLayer* scroll_parent, |
| 509 bool& owning_layer_is_clipped, | 499 bool& owning_layer_is_clipped, |
| 510 bool& owning_layer_is_masked); | 500 bool& owning_layer_is_masked); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 unsigned background_paints_onto_graphics_layer_ : 1; | 697 unsigned background_paints_onto_graphics_layer_ : 1; |
| 708 | 698 |
| 709 bool draws_background_onto_content_layer_; | 699 bool draws_background_onto_content_layer_; |
| 710 | 700 |
| 711 friend class CompositedLayerMappingTest; | 701 friend class CompositedLayerMappingTest; |
| 712 }; | 702 }; |
| 713 | 703 |
| 714 } // namespace blink | 704 } // namespace blink |
| 715 | 705 |
| 716 #endif // CompositedLayerMapping_h | 706 #endif // CompositedLayerMapping_h |
| OLD | NEW |