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

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

Issue 1929493002: Remove unnecessary uses of GarbageCollectedFinalized<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add two leftover classes needing same treatment Created 4 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
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingStyle.h ('k') | third_party/WebKit/Source/core/editing/InputMethodController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698