| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/editing/commands/ApplyStyleCommand.h" | 5 #include "core/editing/commands/ApplyStyleCommand.h" |
| 6 | 6 |
| 7 #include "core/css/StylePropertySet.h" | 7 #include "core/css/StylePropertySet.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/editing/EditingTestBase.h" | 9 #include "core/editing/EditingTestBase.h" |
| 10 #include "core/editing/FrameSelection.h" | 10 #include "core/editing/FrameSelection.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 SelectionInDOMTree::Builder() | 37 SelectionInDOMTree::Builder() |
| 38 .collapse(Position(li, PositionAnchorType::BeforeAnchor)) | 38 .collapse(Position(li, PositionAnchorType::BeforeAnchor)) |
| 39 .build()); | 39 .build()); |
| 40 | 40 |
| 41 MutableStylePropertySet* style = | 41 MutableStylePropertySet* style = |
| 42 MutableStylePropertySet::create(HTMLQuirksMode); | 42 MutableStylePropertySet::create(HTMLQuirksMode); |
| 43 style->setProperty(CSSPropertyTextAlign, "center"); | 43 style->setProperty(CSSPropertyTextAlign, "center"); |
| 44 ApplyStyleCommand::create(document(), EditingStyle::create(style), | 44 ApplyStyleCommand::create(document(), EditingStyle::create(style), |
| 45 InputEvent::InputType::FormatJustifyCenter, | 45 InputEvent::InputType::FormatJustifyCenter, |
| 46 ApplyStyleCommand::ForceBlockProperties) | 46 ApplyStyleCommand::ForceBlockProperties) |
| 47 ->apply(EditCommandSource::kDOM); | 47 ->apply(); |
| 48 // Shouldn't crash. | 48 // Shouldn't crash. |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace blink | 51 } // namespace blink |
| OLD | NEW |