| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } | 66 } |
| 67 | 67 |
| 68 DECLARE_VIRTUAL_TRACE(); | 68 DECLARE_VIRTUAL_TRACE(); |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 ApplyStyleCommand(Document&, const EditingStyle*, EditAction, EPropertyLevel
); | 71 ApplyStyleCommand(Document&, const EditingStyle*, EditAction, EPropertyLevel
); |
| 72 ApplyStyleCommand(Document&, const EditingStyle*, const Position& start, con
st Position& end, EditAction, EPropertyLevel); | 72 ApplyStyleCommand(Document&, const EditingStyle*, const Position& start, con
st Position& end, EditAction, EPropertyLevel); |
| 73 ApplyStyleCommand(PassRefPtrWillBeRawPtr<Element>, bool removeOnly, EditActi
on); | 73 ApplyStyleCommand(PassRefPtrWillBeRawPtr<Element>, bool removeOnly, EditActi
on); |
| 74 ApplyStyleCommand(Document&, const EditingStyle*, bool (*isInlineElementToRe
move)(const Element*), EditAction); | 74 ApplyStyleCommand(Document&, const EditingStyle*, bool (*isInlineElementToRe
move)(const Element*), EditAction); |
| 75 | 75 |
| 76 virtual void doApply() override; | 76 void doApply() override; |
| 77 virtual EditAction editingAction() const override; | 77 EditAction editingAction() const override; |
| 78 | 78 |
| 79 // style-removal helpers | 79 // style-removal helpers |
| 80 bool isStyledInlineElementToRemove(Element*) const; | 80 bool isStyledInlineElementToRemove(Element*) const; |
| 81 bool shouldApplyInlineStyleToRun(EditingStyle*, Node* runStart, Node* pastEn
dNode); | 81 bool shouldApplyInlineStyleToRun(EditingStyle*, Node* runStart, Node* pastEn
dNode); |
| 82 void removeConflictingInlineStyleFromRun(EditingStyle*, RefPtrWillBeMember<N
ode>& runStart, RefPtrWillBeMember<Node>& runEnd, PassRefPtrWillBeRawPtr<Node> p
astEndNode); | 82 void removeConflictingInlineStyleFromRun(EditingStyle*, RefPtrWillBeMember<N
ode>& runStart, RefPtrWillBeMember<Node>& runEnd, PassRefPtrWillBeRawPtr<Node> p
astEndNode); |
| 83 bool removeInlineStyleFromElement(EditingStyle*, PassRefPtrWillBeRawPtr<HTML
Element>, InlineStyleRemovalMode = RemoveIfNeeded, EditingStyle* extractedStyle
= nullptr); | 83 bool removeInlineStyleFromElement(EditingStyle*, PassRefPtrWillBeRawPtr<HTML
Element>, InlineStyleRemovalMode = RemoveIfNeeded, EditingStyle* extractedStyle
= nullptr); |
| 84 inline bool shouldRemoveInlineStyleFromElement(EditingStyle* style, HTMLElem
ent* element) {return removeInlineStyleFromElement(style, element, RemoveNone);} | 84 inline bool shouldRemoveInlineStyleFromElement(EditingStyle* style, HTMLElem
ent* element) {return removeInlineStyleFromElement(style, element, RemoveNone);} |
| 85 void replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*); | 85 void replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*); |
| 86 bool removeImplicitlyStyledElement(EditingStyle*, HTMLElement*, InlineStyleR
emovalMode, EditingStyle* extractedStyle); | 86 bool removeImplicitlyStyledElement(EditingStyle*, HTMLElement*, InlineStyleR
emovalMode, EditingStyle* extractedStyle); |
| 87 bool removeCSSStyle(EditingStyle*, HTMLElement*, InlineStyleRemovalMode = Re
moveIfNeeded, EditingStyle* extractedStyle = nullptr); | 87 bool removeCSSStyle(EditingStyle*, HTMLElement*, InlineStyleRemovalMode = Re
moveIfNeeded, EditingStyle* extractedStyle = nullptr); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 enum ShouldStyleAttributeBeEmpty { AllowNonEmptyStyleAttribute, StyleAttributeSh
ouldBeEmpty }; | 136 enum ShouldStyleAttributeBeEmpty { AllowNonEmptyStyleAttribute, StyleAttributeSh
ouldBeEmpty }; |
| 137 bool isEmptyFontTag(const Element*, ShouldStyleAttributeBeEmpty = StyleAttribute
ShouldBeEmpty); | 137 bool isEmptyFontTag(const Element*, ShouldStyleAttributeBeEmpty = StyleAttribute
ShouldBeEmpty); |
| 138 bool isLegacyAppleHTMLSpanElement(const Node*); | 138 bool isLegacyAppleHTMLSpanElement(const Node*); |
| 139 bool isStyleSpanOrSpanWithOnlyStyleAttribute(const Element*); | 139 bool isStyleSpanOrSpanWithOnlyStyleAttribute(const Element*); |
| 140 PassRefPtrWillBeRawPtr<HTMLSpanElement> createStyleSpanElement(Document&); | 140 PassRefPtrWillBeRawPtr<HTMLSpanElement> createStyleSpanElement(Document&); |
| 141 | 141 |
| 142 } // namespace blink | 142 } // namespace blink |
| 143 | 143 |
| 144 #endif | 144 #endif |
| OLD | NEW |