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

Side by Side Diff: sky/engine/core/editing/EditingStyle.cpp

Issue 709203002: Remove more oilpan. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/editing/Caret.h ('k') | sky/engine/core/editing/Editor.h » ('j') | 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 static PassRefPtr<MutableStylePropertySet> getPropertiesNotIn(StylePropertySet* styleWithRedundantProperties, CSSStyleDeclaration* baseStyle); 145 static PassRefPtr<MutableStylePropertySet> getPropertiesNotIn(StylePropertySet* styleWithRedundantProperties, CSSStyleDeclaration* baseStyle);
146 enum LegacyFontSizeMode { AlwaysUseLegacyFontSize, UseLegacyFontSizeOnlyIfPixelV aluesMatch }; 146 enum LegacyFontSizeMode { AlwaysUseLegacyFontSize, UseLegacyFontSizeOnlyIfPixelV aluesMatch };
147 static int legacyFontSizeFromCSSValue(Document*, CSSPrimitiveValue*, FixedPitchF ontType, LegacyFontSizeMode); 147 static int legacyFontSizeFromCSSValue(Document*, CSSPrimitiveValue*, FixedPitchF ontType, LegacyFontSizeMode);
148 static bool isTransparentColorValue(CSSValue*); 148 static bool isTransparentColorValue(CSSValue*);
149 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*); 149 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*);
150 static bool hasTransparentBackgroundColor(StylePropertySet*); 150 static bool hasTransparentBackgroundColor(StylePropertySet*);
151 static PassRefPtr<CSSValue> backgroundColorInEffect(Node*); 151 static PassRefPtr<CSSValue> backgroundColorInEffect(Node*);
152 152
153 class HTMLElementEquivalent : public DummyBase<HTMLElementEquivalent> { 153 class HTMLElementEquivalent {
154 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 154 WTF_MAKE_FAST_ALLOCATED;
155 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(HTMLElementEquivalent); 155 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(HTMLElementEquivalent);
156 public: 156 public:
157 static PassOwnPtr<HTMLElementEquivalent> create(CSSPropertyID propertyID, CS SValueID primitiveValue, const HTMLQualifiedName& tagName) 157 static PassOwnPtr<HTMLElementEquivalent> create(CSSPropertyID propertyID, CS SValueID primitiveValue, const HTMLQualifiedName& tagName)
158 { 158 {
159 return adoptPtr(new HTMLElementEquivalent(propertyID, primitiveValue, ta gName)); 159 return adoptPtr(new HTMLElementEquivalent(propertyID, primitiveValue, ta gName));
160 } 160 }
161 161
162 virtual bool matches(const Element* element) const { return !m_tagName || el ement->hasTagName(*m_tagName); } 162 virtual bool matches(const Element* element) const { return !m_tagName || el ement->hasTagName(*m_tagName); }
163 virtual bool hasAttribute() const { return false; } 163 virtual bool hasAttribute() const { return false; }
164 virtual bool propertyExistsInStyle(const StylePropertySet* style) const { re turn style->getPropertyCSSValue(m_propertyID); } 164 virtual bool propertyExistsInStyle(const StylePropertySet* style) const { re turn style->getPropertyCSSValue(m_propertyID); }
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 { 1547 {
1548 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { 1548 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
1549 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor); 1549 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl aration::create(ancestor);
1550 if (!hasTransparentBackgroundColor(ancestorStyle.get())) 1550 if (!hasTransparentBackgroundColor(ancestorStyle.get()))
1551 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor ); 1551 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor );
1552 } 1552 }
1553 return nullptr; 1553 return nullptr;
1554 } 1554 }
1555 1555
1556 } 1556 }
OLDNEW
« no previous file with comments | « sky/engine/core/editing/Caret.h ('k') | sky/engine/core/editing/Editor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698