| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 DEFINE_STATIC_LOCAL(Vector<OwnPtr<HTMLElementEquivalent> >, HTMLElementEquiv
alents, ()); | 452 DEFINE_STATIC_LOCAL(Vector<OwnPtr<HTMLElementEquivalent> >, HTMLElementEquiv
alents, ()); |
| 453 return HTMLElementEquivalents; | 453 return HTMLElementEquivalents; |
| 454 } | 454 } |
| 455 | 455 |
| 456 static const Vector<OwnPtr<HTMLAttributeEquivalent> >& htmlAttributeEquivalents(
) | 456 static const Vector<OwnPtr<HTMLAttributeEquivalent> >& htmlAttributeEquivalents(
) |
| 457 { | 457 { |
| 458 DEFINE_STATIC_LOCAL(Vector<OwnPtr<HTMLAttributeEquivalent> >, HTMLAttributeE
quivalents, ()); | 458 DEFINE_STATIC_LOCAL(Vector<OwnPtr<HTMLAttributeEquivalent> >, HTMLAttributeE
quivalents, ()); |
| 459 return HTMLAttributeEquivalents; | 459 return HTMLAttributeEquivalents; |
| 460 } | 460 } |
| 461 | 461 |
| 462 bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const HTMLElement* elemen
t) | 462 bool EditingStyle::elementIsStyledSpanOrHTMLEquivalent(const Element* element) |
| 463 { | 463 { |
| 464 ASSERT(element); | 464 ASSERT(element); |
| 465 bool elementIsSpanOrElementEquivalent = false; | 465 bool elementIsSpanOrElementEquivalent = false; |
| 466 const Vector<OwnPtr<HTMLElementEquivalent> >& HTMLElementEquivalents = htmlE
lementEquivalents(); | 466 const Vector<OwnPtr<HTMLElementEquivalent> >& HTMLElementEquivalents = htmlE
lementEquivalents(); |
| 467 size_t i; | 467 size_t i; |
| 468 for (i = 0; i < HTMLElementEquivalents.size(); ++i) { | 468 for (i = 0; i < HTMLElementEquivalents.size(); ++i) { |
| 469 if (HTMLElementEquivalents[i]->matches(element)) { | 469 if (HTMLElementEquivalents[i]->matches(element)) { |
| 470 elementIsSpanOrElementEquivalent = true; | 470 elementIsSpanOrElementEquivalent = true; |
| 471 break; | 471 break; |
| 472 } | 472 } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 { | 578 { |
| 579 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 579 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 580 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); | 580 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); |
| 581 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 581 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 582 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 582 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 583 } | 583 } |
| 584 return nullptr; | 584 return nullptr; |
| 585 } | 585 } |
| 586 | 586 |
| 587 } | 587 } |
| OLD | NEW |