OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 // of the ancestors are first letter. | 880 // of the ancestors are first letter. |
881 if (pseudoId < FirstInternalPseudoId && pseudoId != PseudoIdFirstLetter && !
parentLayoutObject->style()->hasPseudoStyle(pseudoId)) | 881 if (pseudoId < FirstInternalPseudoId && pseudoId != PseudoIdFirstLetter && !
parentLayoutObject->style()->hasPseudoStyle(pseudoId)) |
882 return nullptr; | 882 return nullptr; |
883 | 883 |
884 if (pseudoId == PseudoIdBackdrop && !parent.isInTopLayer()) | 884 if (pseudoId == PseudoIdBackdrop && !parent.isInTopLayer()) |
885 return nullptr; | 885 return nullptr; |
886 | 886 |
887 if (pseudoId == PseudoIdFirstLetter && (parent.isSVGElement() || !FirstLette
rPseudoElement::firstLetterTextLayoutObject(parent))) | 887 if (pseudoId == PseudoIdFirstLetter && (parent.isSVGElement() || !FirstLette
rPseudoElement::firstLetterTextLayoutObject(parent))) |
888 return nullptr; | 888 return nullptr; |
889 | 889 |
890 if (!canHaveGeneratedChildren(*parentLayoutObject)) | 890 // The backdrop pseudo element generates a new stacking context and its |
| 891 // layout object does not become a child of |parentLayoutObject|. The |
| 892 // exemption is needed so that replaced content also gets a backdrop. |
| 893 if (pseudoId != PseudoIdBackdrop && !canHaveGeneratedChildren(*parentLayoutO
bject)) |
891 return nullptr; | 894 return nullptr; |
892 | 895 |
893 ComputedStyle* parentStyle = parentLayoutObject->mutableStyle(); | 896 ComputedStyle* parentStyle = parentLayoutObject->mutableStyle(); |
894 if (ComputedStyle* cachedStyle = parentStyle->getCachedPseudoStyle(pseudoId)
) { | 897 if (ComputedStyle* cachedStyle = parentStyle->getCachedPseudoStyle(pseudoId)
) { |
895 if (!pseudoElementLayoutObjectIsNeeded(cachedStyle)) | 898 if (!pseudoElementLayoutObjectIsNeeded(cachedStyle)) |
896 return nullptr; | 899 return nullptr; |
897 return createPseudoElement(&parent, pseudoId); | 900 return createPseudoElement(&parent, pseudoId); |
898 } | 901 } |
899 | 902 |
900 StyleResolverState state(document(), &parent, parentStyle); | 903 StyleResolverState state(document(), &parent, parentStyle); |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 visitor->trace(m_siblingRuleSet); | 1746 visitor->trace(m_siblingRuleSet); |
1744 visitor->trace(m_uncommonAttributeRuleSet); | 1747 visitor->trace(m_uncommonAttributeRuleSet); |
1745 visitor->trace(m_watchedSelectorsRules); | 1748 visitor->trace(m_watchedSelectorsRules); |
1746 visitor->trace(m_treeBoundaryCrossingScopes); | 1749 visitor->trace(m_treeBoundaryCrossingScopes); |
1747 visitor->trace(m_styleSharingLists); | 1750 visitor->trace(m_styleSharingLists); |
1748 visitor->trace(m_pendingStyleSheets); | 1751 visitor->trace(m_pendingStyleSheets); |
1749 visitor->trace(m_document); | 1752 visitor->trace(m_document); |
1750 } | 1753 } |
1751 | 1754 |
1752 } // namespace blink | 1755 } // namespace blink |
OLD | NEW |