OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. | 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. |
3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 if (equivalent->matches(element) && | 1057 if (equivalent->matches(element) && |
1058 equivalent->attributeName() != HTMLNames::dirAttr) | 1058 equivalent->attributeName() != HTMLNames::dirAttr) |
1059 matchedAttributes++; | 1059 matchedAttributes++; |
1060 } | 1060 } |
1061 | 1061 |
1062 if (!elementIsSpanOrElementEquivalent && !matchedAttributes) { | 1062 if (!elementIsSpanOrElementEquivalent && !matchedAttributes) { |
1063 // element is not a span, a html element equivalent, or font element. | 1063 // element is not a span, a html element equivalent, or font element. |
1064 return false; | 1064 return false; |
1065 } | 1065 } |
1066 | 1066 |
1067 if (element->getAttribute(HTMLNames::classAttr) == AppleStyleSpanClass) | |
1068 matchedAttributes++; | |
1069 | |
1070 if (element->hasAttribute(HTMLNames::styleAttr)) { | 1067 if (element->hasAttribute(HTMLNames::styleAttr)) { |
1071 if (const StylePropertySet* style = element->inlineStyle()) { | 1068 if (const StylePropertySet* style = element->inlineStyle()) { |
1072 unsigned propertyCount = style->propertyCount(); | 1069 unsigned propertyCount = style->propertyCount(); |
1073 for (unsigned i = 0; i < propertyCount; ++i) { | 1070 for (unsigned i = 0; i < propertyCount; ++i) { |
1074 if (!isEditingProperty(style->propertyAt(i).id())) | 1071 if (!isEditingProperty(style->propertyAt(i).id())) |
1075 return false; | 1072 return false; |
1076 } | 1073 } |
1077 } | 1074 } |
1078 matchedAttributes++; | 1075 matchedAttributes++; |
1079 } | 1076 } |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1771 const CSSIdentifierValue& identifierValue = toCSSIdentifierValue(*value); | 1768 const CSSIdentifierValue& identifierValue = toCSSIdentifierValue(*value); |
1772 if (CSSValueXSmall <= identifierValue.getValueID() && | 1769 if (CSSValueXSmall <= identifierValue.getValueID() && |
1773 identifierValue.getValueID() <= CSSValueWebkitXxxLarge) | 1770 identifierValue.getValueID() <= CSSValueWebkitXxxLarge) |
1774 return identifierValue.getValueID() - CSSValueXSmall + 1; | 1771 return identifierValue.getValueID() - CSSValueXSmall + 1; |
1775 } | 1772 } |
1776 | 1773 |
1777 return 0; | 1774 return 0; |
1778 } | 1775 } |
1779 | 1776 |
1780 } // namespace blink | 1777 } // namespace blink |
OLD | NEW |