| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "core/editing/serializers/Serialization.h" | 29 #include "core/editing/serializers/Serialization.h" |
| 30 | 30 |
| 31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
| 32 #include "core/CSSValueKeywords.h" | 32 #include "core/CSSValueKeywords.h" |
| 33 #include "core/HTMLNames.h" | 33 #include "core/HTMLNames.h" |
| 34 #include "core/css/CSSPrimitiveValue.h" | 34 #include "core/css/CSSIdentifierValue.h" |
| 35 #include "core/css/CSSValue.h" | 35 #include "core/css/CSSValue.h" |
| 36 #include "core/css/StylePropertySet.h" | 36 #include "core/css/StylePropertySet.h" |
| 37 #include "core/dom/CDATASection.h" | 37 #include "core/dom/CDATASection.h" |
| 38 #include "core/dom/ChildListMutationScope.h" | 38 #include "core/dom/ChildListMutationScope.h" |
| 39 #include "core/dom/Comment.h" | 39 #include "core/dom/Comment.h" |
| 40 #include "core/dom/ContextFeatures.h" | 40 #include "core/dom/ContextFeatures.h" |
| 41 #include "core/dom/DocumentFragment.h" | 41 #include "core/dom/DocumentFragment.h" |
| 42 #include "core/dom/ElementTraversal.h" | 42 #include "core/dom/ElementTraversal.h" |
| 43 #include "core/dom/ExceptionCode.h" | 43 #include "core/dom/ExceptionCode.h" |
| 44 #include "core/dom/NodeTraversal.h" | 44 #include "core/dom/NodeTraversal.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 return ancestorToRetainStructureAndAppearanceForBlock(commonAncestorBlock); | 150 return ancestorToRetainStructureAndAppearanceForBlock(commonAncestorBlock); |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool propertyMissingOrEqualToNone(StylePropertySet* style, | 153 bool propertyMissingOrEqualToNone(StylePropertySet* style, |
| 154 CSSPropertyID propertyID) { | 154 CSSPropertyID propertyID) { |
| 155 if (!style) | 155 if (!style) |
| 156 return false; | 156 return false; |
| 157 const CSSValue* value = style->getPropertyCSSValue(propertyID); | 157 const CSSValue* value = style->getPropertyCSSValue(propertyID); |
| 158 if (!value) | 158 if (!value) |
| 159 return true; | 159 return true; |
| 160 if (!value->isPrimitiveValue()) | 160 if (!value->isIdentifierValue()) |
| 161 return false; | 161 return false; |
| 162 return toCSSPrimitiveValue(value)->getValueID() == CSSValueNone; | 162 return toCSSIdentifierValue(value)->getValueID() == CSSValueNone; |
| 163 } | 163 } |
| 164 | 164 |
| 165 template <typename Strategy> | 165 template <typename Strategy> |
| 166 static HTMLElement* highestAncestorToWrapMarkup( | 166 static HTMLElement* highestAncestorToWrapMarkup( |
| 167 const PositionTemplate<Strategy>& startPosition, | 167 const PositionTemplate<Strategy>& startPosition, |
| 168 const PositionTemplate<Strategy>& endPosition, | 168 const PositionTemplate<Strategy>& endPosition, |
| 169 EAnnotateForInterchange shouldAnnotate, | 169 EAnnotateForInterchange shouldAnnotate, |
| 170 Node* constrainingAncestor) { | 170 Node* constrainingAncestor) { |
| 171 Node* firstNode = startPosition.nodeAsRangeFirstNode(); | 171 Node* firstNode = startPosition.nodeAsRangeFirstNode(); |
| 172 // For compatibility reason, we use container node of start and end | 172 // For compatibility reason, we use container node of start and end |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 textNode->appendData(textNext->data()); | 767 textNode->appendData(textNext->data()); |
| 768 if (textNext->parentNode()) // Might have been removed by mutation event. | 768 if (textNext->parentNode()) // Might have been removed by mutation event. |
| 769 textNext->remove(exceptionState); | 769 textNext->remove(exceptionState); |
| 770 } | 770 } |
| 771 | 771 |
| 772 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>; | 772 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>; |
| 773 template class CORE_TEMPLATE_EXPORT | 773 template class CORE_TEMPLATE_EXPORT |
| 774 CreateMarkupAlgorithm<EditingInFlatTreeStrategy>; | 774 CreateMarkupAlgorithm<EditingInFlatTreeStrategy>; |
| 775 | 775 |
| 776 } // namespace blink | 776 } // namespace blink |
| OLD | NEW |