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

Side by Side Diff: Source/core/editing/RemoveCSSPropertyCommand.cpp

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized Created 6 years, 6 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, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2008 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 16 matching lines...) Expand all
27 #include "core/editing/RemoveCSSPropertyCommand.h" 27 #include "core/editing/RemoveCSSPropertyCommand.h"
28 28
29 #include "bindings/v8/ExceptionStatePlaceholder.h" 29 #include "bindings/v8/ExceptionStatePlaceholder.h"
30 #include "core/css/CSSStyleDeclaration.h" 30 #include "core/css/CSSStyleDeclaration.h"
31 #include "core/css/StylePropertySet.h" 31 #include "core/css/StylePropertySet.h"
32 #include "core/dom/Element.h" 32 #include "core/dom/Element.h"
33 #include "wtf/Assertions.h" 33 #include "wtf/Assertions.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document& document, PassRefPt r<Element> element, CSSPropertyID property) 37 RemoveCSSPropertyCommand::RemoveCSSPropertyCommand(Document& document, PassRefPt rWillBeRawPtr<Element> element, CSSPropertyID property)
38 : SimpleEditCommand(document) 38 : SimpleEditCommand(document)
39 , m_element(element) 39 , m_element(element)
40 , m_property(property) 40 , m_property(property)
41 , m_important(false) 41 , m_important(false)
42 { 42 {
43 ASSERT(m_element); 43 ASSERT(m_element);
44 } 44 }
45 45
46 RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand() 46 RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand()
47 { 47 {
(...skipping 11 matching lines...) Expand all
59 // Mutate using the CSSOM wrapper so we get the same event behavior as a scr ipt. 59 // Mutate using the CSSOM wrapper so we get the same event behavior as a scr ipt.
60 // Setting to null string removes the property. We don't have internal versi on of removeProperty. 60 // Setting to null string removes the property. We don't have internal versi on of removeProperty.
61 m_element->style()->setPropertyInternal(m_property, String(), false, IGNORE_ EXCEPTION); 61 m_element->style()->setPropertyInternal(m_property, String(), false, IGNORE_ EXCEPTION);
62 } 62 }
63 63
64 void RemoveCSSPropertyCommand::doUnapply() 64 void RemoveCSSPropertyCommand::doUnapply()
65 { 65 {
66 m_element->style()->setPropertyInternal(m_property, m_oldValue, m_important, IGNORE_EXCEPTION); 66 m_element->style()->setPropertyInternal(m_property, m_oldValue, m_important, IGNORE_EXCEPTION);
67 } 67 }
68 68
69 void RemoveCSSPropertyCommand::trace(Visitor* visitor)
70 {
71 visitor->trace(m_element);
72 SimpleEditCommand::trace(visitor);
73 }
74
69 } // namespace WebCore 75 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/RemoveCSSPropertyCommand.h ('k') | Source/core/editing/RemoveFormatCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698