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

Side by Side Diff: Source/WebCore/editing/markup.cpp

Issue 6975019: Revert 85494 - MERGE 85090 - 2011-04-27 Enrica Casucci <enrica@apple.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 static bool isElementPresentational(const Node* node) 460 static bool isElementPresentational(const Node* node)
461 { 461 {
462 if (node->hasTagName(uTag) || node->hasTagName(sTag) || node->hasTagName(str ikeTag) 462 if (node->hasTagName(uTag) || node->hasTagName(sTag) || node->hasTagName(str ikeTag)
463 || node->hasTagName(iTag) || node->hasTagName(emTag) || node->hasTagName (bTag) || node->hasTagName(strongTag)) 463 || node->hasTagName(iTag) || node->hasTagName(emTag) || node->hasTagName (bTag) || node->hasTagName(strongTag))
464 return true; 464 return true;
465 RefPtr<CSSMutableStyleDeclaration> style = styleFromMatchedRulesAndInlineDec l(node); 465 RefPtr<CSSMutableStyleDeclaration> style = styleFromMatchedRulesAndInlineDec l(node);
466 if (!style) 466 if (!style)
467 return false; 467 return false;
468 return !propertyMissingOrEqualToNone(style.get(), CSSPropertyTextDecoration) || (!node->isBlockFlow() && !Editor::hasTransparentBackgroundColor(style.get()) ); 468 return !propertyMissingOrEqualToNone(style.get(), CSSPropertyTextDecoration) || !Editor::hasTransparentBackgroundColor(style.get());
469 } 469 }
470 470
471 static bool shouldIncludeWrapperForFullySelectedRoot(Node* fullySelectedRoot, CS SMutableStyleDeclaration* style) 471 static bool shouldIncludeWrapperForFullySelectedRoot(Node* fullySelectedRoot, CS SMutableStyleDeclaration* style)
472 { 472 {
473 if (fullySelectedRoot->isElementNode() && static_cast<Element*>(fullySelecte dRoot)->hasAttribute(backgroundAttr)) 473 if (fullySelectedRoot->isElementNode() && static_cast<Element*>(fullySelecte dRoot)->hasAttribute(backgroundAttr))
474 return true; 474 return true;
475 475
476 return style->getPropertyCSSValue(CSSPropertyBackgroundImage) || style->getP ropertyCSSValue(CSSPropertyBackgroundColor); 476 return style->getPropertyCSSValue(CSSPropertyBackgroundImage) || style->getP ropertyCSSValue(CSSPropertyBackgroundColor);
477 } 477 }
478 478
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 Vector<UChar> markup; 908 Vector<UChar> markup;
909 append(markup, "<a href=\""); 909 append(markup, "<a href=\"");
910 append(markup, url.string()); 910 append(markup, url.string());
911 append(markup, "\">"); 911 append(markup, "\">");
912 appendCharactersReplacingEntities(markup, title.characters(), title.length() , EntityMaskInPCDATA); 912 appendCharactersReplacingEntities(markup, title.characters(), title.length() , EntityMaskInPCDATA);
913 append(markup, "</a>"); 913 append(markup, "</a>");
914 return String::adopt(markup); 914 return String::adopt(markup);
915 } 915 }
916 916
917 } 917 }
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698