| 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 FloatSize skippedContainersOffset; | 628 FloatSize skippedContainersOffset; |
| 629 LayoutBlock* containingBlock = this->containingBlock(); | 629 LayoutBlock* containingBlock = this->containingBlock(); |
| 630 // Skip anonymous containing blocks. | 630 // Skip anonymous containing blocks. |
| 631 while (containingBlock->isAnonymous()) { | 631 while (containingBlock->isAnonymous()) { |
| 632 skippedContainersOffset += toFloatSize(FloatPoint(containingBlock->frame
Rect().location())); | 632 skippedContainersOffset += toFloatSize(FloatPoint(containingBlock->frame
Rect().location())); |
| 633 containingBlock = containingBlock->containingBlock(); | 633 containingBlock = containingBlock->containingBlock(); |
| 634 } | 634 } |
| 635 LayoutBox* scrollAncestor = layer()->ancestorOverflowLayer()->isRootLayer()
? nullptr : toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject()); | 635 LayoutBox* scrollAncestor = layer()->ancestorOverflowLayer()->isRootLayer()
? nullptr : toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject()); |
| 636 | 636 |
| 637 LayoutRect containerContentRect = containingBlock->layoutOverflowRect(); | 637 LayoutRect containerContentRect = containingBlock->layoutOverflowRect(); |
| 638 LayoutUnit maxContainerWidth = containingBlock->containingBlockLogicalWidthF
orContent(); | 638 LayoutUnit maxContainerWidth = containingBlock->isLayoutView() ? containingB
lock->logicalWidth() : containingBlock->containingBlockLogicalWidthForContent(); |
| 639 // Sticky positioned element ignore any override logical width on the contai
ning block (as they don't call | 639 // Sticky positioned element ignore any override logical width on the contai
ning block (as they don't call |
| 640 // containingBlockLogicalWidthForContent). It's unclear whether this is tota
lly fine. | 640 // containingBlockLogicalWidthForContent). It's unclear whether this is tota
lly fine. |
| 641 // Compute the container-relative area within which the sticky element is al
lowed to move. | 641 // Compute the container-relative area within which the sticky element is al
lowed to move. |
| 642 LayoutUnit maxWidth = containingBlock->availableLogicalWidth(); | 642 LayoutUnit maxWidth = containingBlock->availableLogicalWidth(); |
| 643 | 643 |
| 644 // This is removing the padding of the containing block's overflow rect to g
et the flow | 644 // This is removing the padding of the containing block's overflow rect to g
et the flow |
| 645 // box rectangle and removing the margin of the sticky element to ensure tha
t space between | 645 // box rectangle and removing the margin of the sticky element to ensure tha
t space between |
| 646 // the sticky element and its containing flow box. It is an open issue wheth
er the margin | 646 // the sticky element and its containing flow box. It is an open issue wheth
er the margin |
| 647 // should collapse (See https://www.w3.org/TR/css-position-3/#sticky-pos). | 647 // should collapse (See https://www.w3.org/TR/css-position-3/#sticky-pos). |
| 648 containerContentRect.contractEdges( | 648 containerContentRect.contractEdges( |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 if (rootElementStyle->hasBackground()) | 1123 if (rootElementStyle->hasBackground()) |
| 1124 return false; | 1124 return false; |
| 1125 | 1125 |
| 1126 if (node() != document().firstBodyElement()) | 1126 if (node() != document().firstBodyElement()) |
| 1127 return false; | 1127 return false; |
| 1128 | 1128 |
| 1129 return true; | 1129 return true; |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 } // namespace blink | 1132 } // namespace blink |
| OLD | NEW |