| 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 10 matching lines...) Expand all Loading... |
| 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/editing/EditingStyle.h" | 28 #include "core/editing/EditingStyle.h" |
| 29 | 29 |
| 30 #include "CSSValueKeywords.h" | 30 #include "CSSValueKeywords.h" |
| 31 #include "HTMLFontElement.h" | |
| 32 #include "HTMLNames.h" | 31 #include "HTMLNames.h" |
| 33 #include "core/css/CSSComputedStyleDeclaration.h" | 32 #include "core/css/CSSComputedStyleDeclaration.h" |
| 34 #include "core/css/CSSParser.h" | 33 #include "core/css/CSSParser.h" |
| 35 #include "core/css/CSSRuleList.h" | 34 #include "core/css/CSSRuleList.h" |
| 36 #include "core/css/CSSStyleRule.h" | 35 #include "core/css/CSSStyleRule.h" |
| 37 #include "core/css/CSSValueList.h" | 36 #include "core/css/CSSValueList.h" |
| 38 #include "core/css/StylePropertySet.h" | 37 #include "core/css/StylePropertySet.h" |
| 39 #include "core/css/StyleResolver.h" | 38 #include "core/css/StyleResolver.h" |
| 40 #include "core/css/StyleRule.h" | 39 #include "core/css/StyleRule.h" |
| 41 #include "core/dom/Node.h" | 40 #include "core/dom/Node.h" |
| 42 #include "core/dom/NodeTraversal.h" | 41 #include "core/dom/NodeTraversal.h" |
| 43 #include "core/dom/Position.h" | 42 #include "core/dom/Position.h" |
| 44 #include "core/dom/QualifiedName.h" | 43 #include "core/dom/QualifiedName.h" |
| 45 #include "core/dom/StyledElement.h" | 44 #include "core/dom/StyledElement.h" |
| 46 #include "core/editing/ApplyStyleCommand.h" | 45 #include "core/editing/ApplyStyleCommand.h" |
| 47 #include "core/editing/Editor.h" | 46 #include "core/editing/Editor.h" |
| 48 #include "core/editing/FrameSelection.h" | 47 #include "core/editing/FrameSelection.h" |
| 49 #include "core/editing/HTMLInterchange.h" | 48 #include "core/editing/HTMLInterchange.h" |
| 50 #include "core/editing/VisibleUnits.h" | 49 #include "core/editing/VisibleUnits.h" |
| 51 #include "core/editing/htmlediting.h" | 50 #include "core/editing/htmlediting.h" |
| 51 #include "core/html/HTMLFontElement.h" |
| 52 #include "core/page/Frame.h" | 52 #include "core/page/Frame.h" |
| 53 #include "core/page/RuntimeCSSEnabled.h" | 53 #include "core/page/RuntimeCSSEnabled.h" |
| 54 #include "core/rendering/style/RenderStyle.h" | 54 #include "core/rendering/style/RenderStyle.h" |
| 55 #include <wtf/HashSet.h> | 55 #include <wtf/HashSet.h> |
| 56 | 56 |
| 57 namespace WebCore { | 57 namespace WebCore { |
| 58 | 58 |
| 59 // Editing style properties must be preserved during editing operation. | 59 // Editing style properties must be preserved during editing operation. |
| 60 // e.g. when a user inserts a new paragraph, all properties listed here must be
copied to the new paragraph. | 60 // e.g. when a user inserts a new paragraph, all properties listed here must be
copied to the new paragraph. |
| 61 // NOTE: Use editingProperties() to respect runtime enabling of properties. | 61 // NOTE: Use editingProperties() to respect runtime enabling of properties. |
| (...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1615 { | 1615 { |
| 1616 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1616 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1617 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); | 1617 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); |
| 1618 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1618 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 1619 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1619 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1620 } | 1620 } |
| 1621 return 0; | 1621 return 0; |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 } | 1624 } |
| OLD | NEW |