OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 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 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2583 } | 2583 } |
2584 | 2584 |
2585 static bool isRootmostFixedOrStickyLayer(RenderLayer* layer) | 2585 static bool isRootmostFixedOrStickyLayer(RenderLayer* layer) |
2586 { | 2586 { |
2587 if (layer->renderer()->isStickyPositioned()) | 2587 if (layer->renderer()->isStickyPositioned()) |
2588 return true; | 2588 return true; |
2589 | 2589 |
2590 if (layer->renderer()->style()->position() != FixedPosition) | 2590 if (layer->renderer()->style()->position() != FixedPosition) |
2591 return false; | 2591 return false; |
2592 | 2592 |
2593 for (RenderLayer* stackingContainer = layer->stackingContainer(); stackingCo
ntainer; stackingContainer = stackingContainer->stackingContainer()) { | 2593 for (RenderLayer* stackingContainer = layer->ancestorStackingContainer(); st
ackingContainer; stackingContainer = stackingContainer->ancestorStackingContaine
r()) { |
2594 if (stackingContainer->isComposited() && stackingContainer->renderer()->
style()->position() == FixedPosition) | 2594 if (stackingContainer->isComposited() && stackingContainer->renderer()->
style()->position() == FixedPosition) |
2595 return false; | 2595 return false; |
2596 } | 2596 } |
2597 | 2597 |
2598 return true; | 2598 return true; |
2599 } | 2599 } |
2600 | 2600 |
2601 void RenderLayerCompositor::updateViewportConstraintStatus(RenderLayer* layer) | 2601 void RenderLayerCompositor::updateViewportConstraintStatus(RenderLayer* layer) |
2602 { | 2602 { |
2603 if (isRootmostFixedOrStickyLayer(layer)) | 2603 if (isRootmostFixedOrStickyLayer(layer)) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2716 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); | 2716 info.addMember(m_layerForScrollCorner, "layerForScrollCorner"); |
2717 #if ENABLE(RUBBER_BANDING) | 2717 #if ENABLE(RUBBER_BANDING) |
2718 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); | 2718 info.addMember(m_layerForOverhangAreas, "layerForOverhangAreas"); |
2719 info.addMember(m_contentShadowLayer, "contentShadowLayer"); | 2719 info.addMember(m_contentShadowLayer, "contentShadowLayer"); |
2720 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); | 2720 info.addMember(m_layerForTopOverhangArea, "layerForTopOverhangArea"); |
2721 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); | 2721 info.addMember(m_layerForBottomOverhangArea, "layerForBottomOverhangArea"); |
2722 #endif | 2722 #endif |
2723 } | 2723 } |
2724 | 2724 |
2725 } // namespace WebCore | 2725 } // namespace WebCore |
OLD | NEW |