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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h

Issue 2595783002: [Editing] Add null check in |DeleteSelectionCommand::removeRedundantBlocks()| (Closed)
Patch Set: dominicc's suggestion: Use unit test instead of layout test Created 3 years, 12 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) 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 20 matching lines...) Expand all
31 #include "core/html/HTMLElement.h" 31 #include "core/html/HTMLElement.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 class EditingStyle; 35 class EditingStyle;
36 class HTMLSpanElement; 36 class HTMLSpanElement;
37 class StyleChange; 37 class StyleChange;
38 38
39 enum ShouldIncludeTypingStyle { IncludeTypingStyle, IgnoreTypingStyle }; 39 enum ShouldIncludeTypingStyle { IncludeTypingStyle, IgnoreTypingStyle };
40 40
41 class ApplyStyleCommand final : public CompositeEditCommand { 41 class CORE_EXPORT ApplyStyleCommand final : public CompositeEditCommand {
42 public: 42 public:
43 enum EPropertyLevel { PropertyDefault, ForceBlockProperties }; 43 enum EPropertyLevel { PropertyDefault, ForceBlockProperties };
44 enum InlineStyleRemovalMode { RemoveIfNeeded, RemoveAlways, RemoveNone }; 44 enum InlineStyleRemovalMode { RemoveIfNeeded, RemoveAlways, RemoveNone };
45 enum EAddStyledElement { AddStyledElement, DoNotAddStyledElement }; 45 enum EAddStyledElement { AddStyledElement, DoNotAddStyledElement };
46 typedef bool (*IsInlineElementToRemoveFunction)(const Element*); 46 typedef bool (*IsInlineElementToRemoveFunction)(const Element*);
47 47
48 static ApplyStyleCommand* create(Document& document, 48 static ApplyStyleCommand* create(Document& document,
49 const EditingStyle* style, 49 const EditingStyle* style,
50 InputEvent::InputType inputType, 50 InputEvent::InputType inputType,
51 EPropertyLevel level = PropertyDefault) { 51 EPropertyLevel level = PropertyDefault) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 StyleAttributeShouldBeEmpty 208 StyleAttributeShouldBeEmpty
209 }; 209 };
210 bool isEmptyFontTag(const Element*, 210 bool isEmptyFontTag(const Element*,
211 ShouldStyleAttributeBeEmpty = StyleAttributeShouldBeEmpty); 211 ShouldStyleAttributeBeEmpty = StyleAttributeShouldBeEmpty);
212 bool isLegacyAppleHTMLSpanElement(const Node*); 212 bool isLegacyAppleHTMLSpanElement(const Node*);
213 bool isStyleSpanOrSpanWithOnlyStyleAttribute(const Element*); 213 bool isStyleSpanOrSpanWithOnlyStyleAttribute(const Element*);
214 214
215 } // namespace blink 215 } // namespace blink
216 216
217 #endif 217 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698