Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: sky/engine/core/editing/EditingStyle.cpp

Issue 942933003: Remove almost all clients of isHTMLElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sky/engine/core/editing/EditingStyle.h ('k') | sky/engine/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698