| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 ancestorOverflowLayer->getScrollableArea()->stickyConstraintsMap().at( | 311 ancestorOverflowLayer->getScrollableArea()->stickyConstraintsMap().at( |
| 312 &m_owningLayer); | 312 &m_owningLayer); |
| 313 | 313 |
| 314 // Find the layout offset of the unshifted sticky box within its | 314 // Find the layout offset of the unshifted sticky box within its |
| 315 // compositingContainer. If the enclosing layer is not the scroller, then | 315 // compositingContainer. If the enclosing layer is not the scroller, then |
| 316 // the offset must be adjusted to include the scroll offset to keep it | 316 // the offset must be adjusted to include the scroll offset to keep it |
| 317 // relative to compositingContainer. | 317 // relative to compositingContainer. |
| 318 LayoutPoint enclosingLayerOffset; | 318 LayoutPoint enclosingLayerOffset; |
| 319 compositingContainer->convertToLayerCoords(ancestorOverflowLayer, | 319 compositingContainer->convertToLayerCoords(ancestorOverflowLayer, |
| 320 enclosingLayerOffset); | 320 enclosingLayerOffset); |
| 321 if (compositingContainer != ancestorOverflowLayer) { | 321 DCHECK(!scrollParent() || scrollParent() == ancestorOverflowLayer); |
| 322 if (!scrollParent() && compositingContainer != ancestorOverflowLayer) { |
| 322 enclosingLayerOffset += LayoutSize( | 323 enclosingLayerOffset += LayoutSize( |
| 323 ancestorOverflowLayer->getScrollableArea()->getScrollOffset()); | 324 ancestorOverflowLayer->getScrollableArea()->getScrollOffset()); |
| 324 } | 325 } |
| 325 | 326 |
| 326 FloatPoint stickyBoxOffset = | 327 FloatPoint stickyBoxOffset = |
| 327 constraints.scrollContainerRelativeStickyBoxRect().location(); | 328 constraints.scrollContainerRelativeStickyBoxRect().location(); |
| 328 DCHECK(!m_contentOffsetInCompositingLayerDirty); | 329 DCHECK(!m_contentOffsetInCompositingLayerDirty); |
| 329 stickyBoxOffset.moveBy(FloatPoint(-enclosingLayerOffset) - | 330 stickyBoxOffset.moveBy(FloatPoint(-enclosingLayerOffset) - |
| 330 FloatSize(contentOffsetInCompositingLayer())); | 331 FloatSize(contentOffsetInCompositingLayer())); |
| 331 | 332 |
| (...skipping 3155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3487 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3488 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
| 3488 name = "Decoration Layer"; | 3489 name = "Decoration Layer"; |
| 3489 } else { | 3490 } else { |
| 3490 ASSERT_NOT_REACHED(); | 3491 ASSERT_NOT_REACHED(); |
| 3491 } | 3492 } |
| 3492 | 3493 |
| 3493 return name; | 3494 return name; |
| 3494 } | 3495 } |
| 3495 | 3496 |
| 3496 } // namespace blink | 3497 } // namespace blink |
| OLD | NEW |