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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 return 0; | 789 return 0; |
790 | 790 |
791 // If the element has inline style it is probably unique. | 791 // If the element has inline style it is probably unique. |
792 if (state.styledElement()->inlineStyle()) | 792 if (state.styledElement()->inlineStyle()) |
793 return 0; | 793 return 0; |
794 if (state.styledElement()->isSVGElement() && toSVGElement(state.styledElemen
t())->animatedSMILStyleProperties()) | 794 if (state.styledElement()->isSVGElement() && toSVGElement(state.styledElemen
t())->animatedSMILStyleProperties()) |
795 return 0; | 795 return 0; |
796 // Ids stop style sharing if they show up in the stylesheets. | 796 // Ids stop style sharing if they show up in the stylesheets. |
797 if (state.styledElement()->hasID() && m_features.idsInRules.contains(state.s
tyledElement()->idForStyleResolution().impl())) | 797 if (state.styledElement()->hasID() && m_features.idsInRules.contains(state.s
tyledElement()->idForStyleResolution().impl())) |
798 return 0; | 798 return 0; |
| 799 // Active and hovered elements always make a chain towards the document node |
| 800 // and no siblings or cousins will have the same state. |
| 801 if (state.styledElement()->hovered()) |
| 802 return 0; |
| 803 if (state.styledElement()->active()) |
| 804 return 0; |
| 805 // There is always only one focused element. |
| 806 if (state.styledElement()->focused()) |
| 807 return 0; |
799 if (parentElementPreventsSharing(state.element()->parentElement())) | 808 if (parentElementPreventsSharing(state.element()->parentElement())) |
800 return 0; | 809 return 0; |
801 if (state.styledElement()->hasScopedHTMLStyleChild()) | 810 if (state.styledElement()->hasScopedHTMLStyleChild()) |
802 return 0; | 811 return 0; |
803 if (state.element() == state.document()->cssTarget()) | 812 if (state.element() == state.document()->cssTarget()) |
804 return 0; | 813 return 0; |
805 if (elementHasDirectionAuto(state.element())) | 814 if (elementHasDirectionAuto(state.element())) |
806 return 0; | 815 return 0; |
807 if (state.element()->hasActiveAnimations()) | 816 if (state.element()->hasActiveAnimations()) |
808 return 0; | 817 return 0; |
(...skipping 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3690 info.addMember(m_state, "state"); | 3699 info.addMember(m_state, "state"); |
3691 | 3700 |
3692 // FIXME: move this to a place where it would be called only once? | 3701 // FIXME: move this to a place where it would be called only once? |
3693 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 3702 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
3694 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 3703 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
3695 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); | 3704 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); |
3696 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 3705 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
3697 } | 3706 } |
3698 | 3707 |
3699 } // namespace WebCore | 3708 } // namespace WebCore |
OLD | NEW |