| 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 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 | 882 |
| 883 if (isControl != m_element->isFormControlElement()) | 883 if (isControl != m_element->isFormControlElement()) |
| 884 return false; | 884 return false; |
| 885 | 885 |
| 886 if (isControl && !canShareStyleWithControl(element)) | 886 if (isControl && !canShareStyleWithControl(element)) |
| 887 return false; | 887 return false; |
| 888 | 888 |
| 889 if (style->transitions() || style->animations()) | 889 if (style->transitions() || style->animations()) |
| 890 return false; | 890 return false; |
| 891 | 891 |
| 892 if (style->affectedByDirectAdjacentRules()) | |
| 893 return false; | |
| 894 | |
| 895 #if USE(ACCELERATED_COMPOSITING) | 892 #if USE(ACCELERATED_COMPOSITING) |
| 896 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. | 893 // Turn off style sharing for elements that can gain layers for reasons outs
ide of the style system. |
| 897 // See comments in RenderObject::setStyle(). | 894 // See comments in RenderObject::setStyle(). |
| 898 if (element->hasTagName(iframeTag) || element->hasTagName(frameTag) || eleme
nt->hasTagName(embedTag) || element->hasTagName(objectTag) || element->hasTagNam
e(appletTag)) | 895 if (element->hasTagName(iframeTag) || element->hasTagName(frameTag) || eleme
nt->hasTagName(embedTag) || element->hasTagName(objectTag) || element->hasTagNam
e(appletTag)) |
| 899 return false; | 896 return false; |
| 900 #endif | 897 #endif |
| 901 | 898 |
| 902 if (equalIgnoringCase(element->fastGetAttribute(dirAttr), "auto") || equalIg
noringCase(m_element->fastGetAttribute(dirAttr), "auto")) | 899 if (equalIgnoringCase(element->fastGetAttribute(dirAttr), "auto") || equalIg
noringCase(m_element->fastGetAttribute(dirAttr), "auto")) |
| 903 return false; | 900 return false; |
| 904 | 901 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 924 if (count++ == cStyleSearchThreshold) | 921 if (count++ == cStyleSearchThreshold) |
| 925 return 0; | 922 return 0; |
| 926 } | 923 } |
| 927 return node; | 924 return node; |
| 928 } | 925 } |
| 929 | 926 |
| 930 static inline bool parentStylePreventsSharing(const RenderStyle* parentStyle) | 927 static inline bool parentStylePreventsSharing(const RenderStyle* parentStyle) |
| 931 { | 928 { |
| 932 return parentStyle->childrenAffectedByPositionalRules() | 929 return parentStyle->childrenAffectedByPositionalRules() |
| 933 || parentStyle->childrenAffectedByFirstChildRules() | 930 || parentStyle->childrenAffectedByFirstChildRules() |
| 934 || parentStyle->childrenAffectedByLastChildRules(); | 931 || parentStyle->childrenAffectedByLastChildRules() |
| 932 || parentStyle->childrenAffectedByDirectAdjacentRules(); |
| 935 } | 933 } |
| 936 | 934 |
| 937 RenderStyle* CSSStyleSelector::locateSharedStyle() | 935 RenderStyle* CSSStyleSelector::locateSharedStyle() |
| 938 { | 936 { |
| 939 if (!m_styledElement || !m_parentStyle) | 937 if (!m_styledElement || !m_parentStyle) |
| 940 return 0; | 938 return 0; |
| 941 // If the element has inline style it is probably unique. | 939 // If the element has inline style it is probably unique. |
| 942 if (m_styledElement->inlineStyleDecl()) | 940 if (m_styledElement->inlineStyleDecl()) |
| 943 return 0; | 941 return 0; |
| 944 // Ids stop style sharing if they show up in the stylesheets. | 942 // Ids stop style sharing if they show up in the stylesheets. |
| (...skipping 4556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5501 } | 5499 } |
| 5502 default: | 5500 default: |
| 5503 ASSERT_NOT_REACHED(); | 5501 ASSERT_NOT_REACHED(); |
| 5504 } | 5502 } |
| 5505 } | 5503 } |
| 5506 | 5504 |
| 5507 m_pendingImageProperties.clear(); | 5505 m_pendingImageProperties.clear(); |
| 5508 } | 5506 } |
| 5509 | 5507 |
| 5510 } // namespace WebCore | 5508 } // namespace WebCore |
| OLD | NEW |