| 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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "wtf/BitVector.h" | 45 #include "wtf/BitVector.h" |
| 46 | 46 |
| 47 namespace WebCore { | 47 namespace WebCore { |
| 48 | 48 |
| 49 static bool isSkippableComponentForInvalidation(const CSSSelector& selector) | 49 static bool isSkippableComponentForInvalidation(const CSSSelector& selector) |
| 50 { | 50 { |
| 51 if (selector.m_match == CSSSelector::Tag | 51 if (selector.m_match == CSSSelector::Tag |
| 52 || selector.m_match == CSSSelector::Id | 52 || selector.m_match == CSSSelector::Id |
| 53 || selector.isAttributeSelector()) | 53 || selector.isAttributeSelector()) |
| 54 return true; | 54 return true; |
| 55 if (selector.m_match == CSSSelector::PseudoElement) { |
| 56 switch (selector.m_pseudoType) { |
| 57 case CSSSelector::PseudoBefore: |
| 58 case CSSSelector::PseudoAfter: |
| 59 case CSSSelector::PseudoBackdrop: |
| 60 return true; |
| 61 default: |
| 62 return false; |
| 63 } |
| 64 } |
| 55 if (selector.m_match != CSSSelector::PseudoClass) | 65 if (selector.m_match != CSSSelector::PseudoClass) |
| 56 return false; | 66 return false; |
| 57 switch (selector.pseudoType()) { | 67 switch (selector.pseudoType()) { |
| 58 case CSSSelector::PseudoEmpty: | 68 case CSSSelector::PseudoEmpty: |
| 59 case CSSSelector::PseudoFirstChild: | 69 case CSSSelector::PseudoFirstChild: |
| 60 case CSSSelector::PseudoFirstOfType: | 70 case CSSSelector::PseudoFirstOfType: |
| 61 case CSSSelector::PseudoLastChild: | 71 case CSSSelector::PseudoLastChild: |
| 62 case CSSSelector::PseudoLastOfType: | 72 case CSSSelector::PseudoLastOfType: |
| 63 case CSSSelector::PseudoOnlyChild: | 73 case CSSSelector::PseudoOnlyChild: |
| 64 case CSSSelector::PseudoOnlyOfType: | 74 case CSSSelector::PseudoOnlyOfType: |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 453 } |
| 444 | 454 |
| 445 invalidationClasses.remove(oldSize, invalidationClasses.size() - oldSize); | 455 invalidationClasses.remove(oldSize, invalidationClasses.size() - oldSize); |
| 446 element->clearChildNeedsStyleInvalidation(); | 456 element->clearChildNeedsStyleInvalidation(); |
| 447 element->clearNeedsStyleInvalidation(); | 457 element->clearNeedsStyleInvalidation(); |
| 448 | 458 |
| 449 return thisElementNeedsStyleRecalc; | 459 return thisElementNeedsStyleRecalc; |
| 450 } | 460 } |
| 451 | 461 |
| 452 } // namespace WebCore | 462 } // namespace WebCore |
| OLD | NEW |