| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 380 } |
| 381 | 381 |
| 382 EditingStyle::EditingStyle(CSSPropertyID propertyID, const String& value) | 382 EditingStyle::EditingStyle(CSSPropertyID propertyID, const String& value) |
| 383 : m_mutableStyle(nullptr) | 383 : m_mutableStyle(nullptr) |
| 384 , m_isMonospaceFont(false) | 384 , m_isMonospaceFont(false) |
| 385 , m_fontSizeDelta(NoFontDelta) | 385 , m_fontSizeDelta(NoFontDelta) |
| 386 { | 386 { |
| 387 setProperty(propertyID, value); | 387 setProperty(propertyID, value); |
| 388 } | 388 } |
| 389 | 389 |
| 390 EditingStyle::~EditingStyle() | |
| 391 { | |
| 392 } | |
| 393 | |
| 394 static Color cssValueToColor(CSSValue* colorValue) | 390 static Color cssValueToColor(CSSValue* colorValue) |
| 395 { | 391 { |
| 396 if (!colorValue || (!colorValue->isColorValue() && !colorValue->isPrimitiveV
alue())) | 392 if (!colorValue || (!colorValue->isColorValue() && !colorValue->isPrimitiveV
alue())) |
| 397 return Color::transparent; | 393 return Color::transparent; |
| 398 | 394 |
| 399 if (colorValue->isColorValue()) | 395 if (colorValue->isColorValue()) |
| 400 return toCSSColorValue(colorValue)->value(); | 396 return toCSSColorValue(colorValue)->value(); |
| 401 | 397 |
| 402 Color color = 0; | 398 Color color = 0; |
| 403 // FIXME: Why ignore the return value? | 399 // FIXME: Why ignore the return value? |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 { | 1721 { |
| 1726 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1722 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1727 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); | 1723 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); |
| 1728 if (!hasTransparentBackgroundColor(ancestorStyle)) | 1724 if (!hasTransparentBackgroundColor(ancestorStyle)) |
| 1729 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1725 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1730 } | 1726 } |
| 1731 return nullptr; | 1727 return nullptr; |
| 1732 } | 1728 } |
| 1733 | 1729 |
| 1734 } // namespace blink | 1730 } // namespace blink |
| OLD | NEW |