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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 return 0; | 776 return 0; |
777 | 777 |
778 // If the element has inline style it is probably unique. | 778 // If the element has inline style it is probably unique. |
779 if (state.styledElement()->inlineStyle()) | 779 if (state.styledElement()->inlineStyle()) |
780 return 0; | 780 return 0; |
781 if (state.styledElement()->isSVGElement() && toSVGElement(state.styledElemen
t())->animatedSMILStyleProperties()) | 781 if (state.styledElement()->isSVGElement() && toSVGElement(state.styledElemen
t())->animatedSMILStyleProperties()) |
782 return 0; | 782 return 0; |
783 // Ids stop style sharing if they show up in the stylesheets. | 783 // Ids stop style sharing if they show up in the stylesheets. |
784 if (state.styledElement()->hasID() && m_features.idsInRules.contains(state.s
tyledElement()->idForStyleResolution().impl())) | 784 if (state.styledElement()->hasID() && m_features.idsInRules.contains(state.s
tyledElement()->idForStyleResolution().impl())) |
785 return 0; | 785 return 0; |
| 786 // Active and hovered elements always make a chain towards the document node |
| 787 // and no siblings or cousins will have the same state. |
| 788 if (state.styledElement()->hovered()) |
| 789 return 0; |
| 790 if (state.styledElement()->active()) |
| 791 return 0; |
| 792 // There is always only one focused element. |
| 793 if (state.styledElement()->focused()) |
| 794 return 0; |
786 if (parentElementPreventsSharing(state.element()->parentElement())) | 795 if (parentElementPreventsSharing(state.element()->parentElement())) |
787 return 0; | 796 return 0; |
788 if (state.styledElement()->hasScopedHTMLStyleChild()) | 797 if (state.styledElement()->hasScopedHTMLStyleChild()) |
789 return 0; | 798 return 0; |
790 if (state.element() == state.document()->cssTarget()) | 799 if (state.element() == state.document()->cssTarget()) |
791 return 0; | 800 return 0; |
792 if (elementHasDirectionAuto(state.element())) | 801 if (elementHasDirectionAuto(state.element())) |
793 return 0; | 802 return 0; |
794 if (state.element()->hasActiveAnimations()) | 803 if (state.element()->hasActiveAnimations()) |
795 return 0; | 804 return 0; |
(...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3451 info.addMember(m_state, "state"); | 3460 info.addMember(m_state, "state"); |
3452 | 3461 |
3453 // FIXME: move this to a place where it would be called only once? | 3462 // FIXME: move this to a place where it would be called only once? |
3454 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 3463 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
3455 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 3464 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
3456 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); | 3465 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle"
); |
3457 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 3466 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
3458 } | 3467 } |
3459 | 3468 |
3460 } // namespace WebCore | 3469 } // namespace WebCore |
OLD | NEW |