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 |
390 static Color cssValueToColor(CSSValue* colorValue) | 394 static Color cssValueToColor(CSSValue* colorValue) |
391 { | 395 { |
392 if (!colorValue || (!colorValue->isColorValue() && !colorValue->isPrimitiveV
alue())) | 396 if (!colorValue || (!colorValue->isColorValue() && !colorValue->isPrimitiveV
alue())) |
393 return Color::transparent; | 397 return Color::transparent; |
394 | 398 |
395 if (colorValue->isColorValue()) | 399 if (colorValue->isColorValue()) |
396 return toCSSColorValue(colorValue)->value(); | 400 return toCSSColorValue(colorValue)->value(); |
397 | 401 |
398 Color color = 0; | 402 Color color = 0; |
399 // FIXME: Why ignore the return value? | 403 // FIXME: Why ignore the return value? |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 { | 1725 { |
1722 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1726 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
1723 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); | 1727 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); |
1724 if (!hasTransparentBackgroundColor(ancestorStyle)) | 1728 if (!hasTransparentBackgroundColor(ancestorStyle)) |
1725 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1729 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
1726 } | 1730 } |
1727 return nullptr; | 1731 return nullptr; |
1728 } | 1732 } |
1729 | 1733 |
1730 } // namespace blink | 1734 } // namespace blink |
OLD | NEW |