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 // The backdrop pseudo element generates a new stacking context and its | 890 if (!canHaveGeneratedChildren(*parentLayoutObject)) |
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)) | |
894 return nullptr; | 891 return nullptr; |
895 | 892 |
896 ComputedStyle* parentStyle = parentLayoutObject->mutableStyle(); | 893 ComputedStyle* parentStyle = parentLayoutObject->mutableStyle(); |
897 if (ComputedStyle* cachedStyle = parentStyle->getCachedPseudoStyle(pseudoId)
) { | 894 if (ComputedStyle* cachedStyle = parentStyle->getCachedPseudoStyle(pseudoId)
) { |
898 if (!pseudoElementLayoutObjectIsNeeded(cachedStyle)) | 895 if (!pseudoElementLayoutObjectIsNeeded(cachedStyle)) |
899 return nullptr; | 896 return nullptr; |
900 return createPseudoElement(&parent, pseudoId); | 897 return createPseudoElement(&parent, pseudoId); |
901 } | 898 } |
902 | 899 |
903 StyleResolverState state(document(), &parent, parentStyle); | 900 StyleResolverState state(document(), &parent, parentStyle); |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 visitor->trace(m_siblingRuleSet); | 1743 visitor->trace(m_siblingRuleSet); |
1747 visitor->trace(m_uncommonAttributeRuleSet); | 1744 visitor->trace(m_uncommonAttributeRuleSet); |
1748 visitor->trace(m_watchedSelectorsRules); | 1745 visitor->trace(m_watchedSelectorsRules); |
1749 visitor->trace(m_treeBoundaryCrossingScopes); | 1746 visitor->trace(m_treeBoundaryCrossingScopes); |
1750 visitor->trace(m_styleSharingLists); | 1747 visitor->trace(m_styleSharingLists); |
1751 visitor->trace(m_pendingStyleSheets); | 1748 visitor->trace(m_pendingStyleSheets); |
1752 visitor->trace(m_document); | 1749 visitor->trace(m_document); |
1753 } | 1750 } |
1754 | 1751 |
1755 } // namespace blink | 1752 } // namespace blink |
OLD | NEW |