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

Side by Side Diff: Source/core/editing/markup.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some small fixes to (hopefully) fix some broken tests Created 5 years, 6 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) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Igalia S.L. 4 * Copyright (C) 2011 Igalia S.L.
5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 static inline HTMLElement* ancestorToRetainStructureAndAppearanceWithNoLayoutObj ect(Node* commonAncestor) 154 static inline HTMLElement* ancestorToRetainStructureAndAppearanceWithNoLayoutObj ect(Node* commonAncestor)
155 { 155 {
156 HTMLElement* commonAncestorBlock = toHTMLElement(enclosingNodeOfType(firstPo sitionInOrBeforeNode(commonAncestor), isHTMLBlockElement)); 156 HTMLElement* commonAncestorBlock = toHTMLElement(enclosingNodeOfType(firstPo sitionInOrBeforeNode(commonAncestor), isHTMLBlockElement));
157 return ancestorToRetainStructureAndAppearanceForBlock(commonAncestorBlock); 157 return ancestorToRetainStructureAndAppearanceForBlock(commonAncestorBlock);
158 } 158 }
159 159
160 bool propertyMissingOrEqualToNone(StylePropertySet* style, CSSPropertyID propert yID) 160 bool propertyMissingOrEqualToNone(StylePropertySet* style, CSSPropertyID propert yID)
161 { 161 {
162 if (!style) 162 if (!style)
163 return false; 163 return false;
164 RefPtrWillBeRawPtr<CSSValue> value = style->getPropertyCSSValue(propertyID); 164 NullableCSSValue value = style->getPropertyCSSValue(propertyID);
165 if (!value) 165 if (!value)
166 return true; 166 return true;
167 if (!value->isPrimitiveValue()) 167 if (!value->isPrimitiveValue())
168 return false; 168 return false;
169 return toCSSPrimitiveValue(value.get())->getValueID() == CSSValueNone; 169 return toCSSPrimitiveValue(value)->getValueID() == CSSValueNone;
170 } 170 }
171 171
172 static bool isPresentationalHTMLElement(const Node* node) 172 static bool isPresentationalHTMLElement(const Node* node)
173 { 173 {
174 if (!node->isHTMLElement()) 174 if (!node->isHTMLElement())
175 return false; 175 return false;
176 176
177 const HTMLElement& element = toHTMLElement(*node); 177 const HTMLElement& element = toHTMLElement(*node);
178 return element.hasTagName(uTag) || element.hasTagName(sTag) || element.hasTa gName(strikeTag) 178 return element.hasTagName(uTag) || element.hasTagName(sTag) || element.hasTa gName(strikeTag)
179 || element.hasTagName(iTag) || element.hasTagName(emTag) || element.hasT agName(bTag) || element.hasTagName(strongTag); 179 || element.hasTagName(iTag) || element.hasTagName(emTag) || element.hasT agName(bTag) || element.hasTagName(strongTag);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 695
696 RefPtrWillBeRawPtr<Text> textNext = toText(next); 696 RefPtrWillBeRawPtr<Text> textNext = toText(next);
697 textNode->appendData(textNext->data()); 697 textNode->appendData(textNext->data());
698 if (textNext->parentNode()) // Might have been removed by mutation event. 698 if (textNext->parentNode()) // Might have been removed by mutation event.
699 textNext->remove(exceptionState); 699 textNext->remove(exceptionState);
700 } 700 }
701 701
702 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>; 702 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>;
703 703
704 } 704 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698