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

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingStyle.cpp

Issue 1778743003: Make <custom-ident> not insert quotes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix FontFace.cpp Created 4 years, 9 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 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 m_applySuperscript = true; 1551 m_applySuperscript = true;
1552 break; 1552 break;
1553 } 1553 }
1554 1554
1555 if (style->getPropertyCSSValue(CSSPropertyColor)) { 1555 if (style->getPropertyCSSValue(CSSPropertyColor)) {
1556 m_applyFontColor = getFontColor(style).serialized(); 1556 m_applyFontColor = getFontColor(style).serialized();
1557 style->removeProperty(CSSPropertyColor); 1557 style->removeProperty(CSSPropertyColor);
1558 } 1558 }
1559 1559
1560 m_applyFontFace = style->getPropertyValue(CSSPropertyFontFamily); 1560 m_applyFontFace = style->getPropertyValue(CSSPropertyFontFamily);
1561 // Remove single quotes for Outlook 2007 compatibility. See https://bugs.web kit.org/show_bug.cgi?id=79448 1561 // Remove single quotes for Outlook 2007 compatibility. See https://bugs.web kit.org/show_bug.cgi?id=79448
Timothy Loh 2016/03/14 23:25:11 single -> double?
rwlbuis 2016/03/15 18:34:15 Done.
1562 m_applyFontFace.replaceWithLiteral('\'', ""); 1562 m_applyFontFace.replaceWithLiteral('\"', "");
Timothy Loh 2016/03/14 23:25:11 no need for backslash
rwlbuis 2016/03/15 18:34:15 Done.
1563 style->removeProperty(CSSPropertyFontFamily); 1563 style->removeProperty(CSSPropertyFontFamily);
1564 1564
1565 if (RefPtrWillBeRawPtr<CSSValue> fontSize = style->getPropertyCSSValue(CSSPr opertyFontSize)) { 1565 if (RefPtrWillBeRawPtr<CSSValue> fontSize = style->getPropertyCSSValue(CSSPr opertyFontSize)) {
1566 if (!fontSize->isPrimitiveValue()) { 1566 if (!fontSize->isPrimitiveValue()) {
1567 style->removeProperty(CSSPropertyFontSize); // Can't make sense of t he number. Put no font size. 1567 style->removeProperty(CSSPropertyFontSize); // Can't make sense of t he number. Put no font size.
1568 } else if (int legacyFontSize = legacyFontSizeFromCSSValue(document, toC SSPrimitiveValue(fontSize.get()), isMonospaceFont, UseLegacyFontSizeOnlyIfPixelV aluesMatch)) { 1568 } else if (int legacyFontSize = legacyFontSizeFromCSSValue(document, toC SSPrimitiveValue(fontSize.get()), isMonospaceFont, UseLegacyFontSizeOnlyIfPixelV aluesMatch)) {
1569 m_applyFontSize = String::number(legacyFontSize); 1569 m_applyFontSize = String::number(legacyFontSize);
1570 style->removeProperty(CSSPropertyFontSize); 1570 style->removeProperty(CSSPropertyFontSize);
1571 } 1571 }
1572 } 1572 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 { 1727 {
1728 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1728 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1729 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor); 1729 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu tedStyleDeclaration::create(ancestor);
1730 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1730 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1731 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1731 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1732 } 1732 }
1733 return nullptr; 1733 return nullptr;
1734 } 1734 }
1735 1735
1736 } // namespace blink 1736 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698