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

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

Issue 10391190: Merge 117361 - REGRESSION(r92823): WebKit strips font-weight: normal from b element when copying (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 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 | « LayoutTests/editing/pasteboard/paste-text-with-style-5-expected.txt ('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) 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 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 ASSERT(styleWithRedundantProperties); 1486 ASSERT(styleWithRedundantProperties);
1487 ASSERT(baseStyle); 1487 ASSERT(baseStyle);
1488 RefPtr<StylePropertySet> result = styleWithRedundantProperties->copy(); 1488 RefPtr<StylePropertySet> result = styleWithRedundantProperties->copy();
1489 1489
1490 result->removeEquivalentProperties(baseStyle); 1490 result->removeEquivalentProperties(baseStyle);
1491 1491
1492 RefPtr<CSSValue> baseTextDecorationsInEffect = baseStyle->getPropertyCSSValu eInternal(CSSPropertyWebkitTextDecorationsInEffect); 1492 RefPtr<CSSValue> baseTextDecorationsInEffect = baseStyle->getPropertyCSSValu eInternal(CSSPropertyWebkitTextDecorationsInEffect);
1493 diffTextDecorations(result.get(), CSSPropertyTextDecoration, baseTextDecorat ionsInEffect.get()); 1493 diffTextDecorations(result.get(), CSSPropertyTextDecoration, baseTextDecorat ionsInEffect.get());
1494 diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect, baseTextDecorationsInEffect.get()); 1494 diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect, baseTextDecorationsInEffect.get());
1495 1495
1496 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyFontSize) && fontWeigh tIsBold(result.get()) == fontWeightIsBold(baseStyle)) 1496 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyFontWeight) && fontWei ghtIsBold(result.get()) == fontWeightIsBold(baseStyle))
1497 result->removeProperty(CSSPropertyFontWeight); 1497 result->removeProperty(CSSPropertyFontWeight);
1498 1498
1499 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getRGBAFontC olor(result.get()) == getRGBAFontColor(baseStyle)) 1499 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getRGBAFontC olor(result.get()) == getRGBAFontColor(baseStyle))
1500 result->removeProperty(CSSPropertyColor); 1500 result->removeProperty(CSSPropertyColor);
1501 1501
1502 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) && getTextA lignment(result.get()) == getTextAlignment(baseStyle)) 1502 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) && getTextA lignment(result.get()) == getTextAlignment(baseStyle))
1503 result->removeProperty(CSSPropertyTextAlign); 1503 result->removeProperty(CSSPropertyTextAlign);
1504 1504
1505 return result; 1505 return result;
1506 } 1506 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 { 1577 {
1578 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1578 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1579 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor); 1579 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor);
1580 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1580 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1581 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1581 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1582 } 1582 }
1583 return 0; 1583 return 0;
1584 } 1584 }
1585 1585
1586 } 1586 }
OLDNEW
« no previous file with comments | « LayoutTests/editing/pasteboard/paste-text-with-style-5-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698