| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 { | 298 { |
| 299 } | 299 } |
| 300 | 300 |
| 301 virtual bool perform(ExceptionState& exceptionState) OVERRIDE | 301 virtual bool perform(ExceptionState& exceptionState) OVERRIDE |
| 302 { | 302 { |
| 303 return redo(exceptionState); | 303 return redo(exceptionState); |
| 304 } | 304 } |
| 305 | 305 |
| 306 virtual bool undo(ExceptionState& exceptionState) OVERRIDE | 306 virtual bool undo(ExceptionState& exceptionState) OVERRIDE |
| 307 { | 307 { |
| 308 m_parentNode->replaceChild(m_oldNode, m_newNode.get(), exceptionState); | 308 // FIXME: Oilpan: The first .get() is unnecessary if m_oldNode is a |
| 309 // Persistent or a Member. |
| 310 m_parentNode->replaceChild(m_oldNode.get(), m_newNode.get(), exceptionSt
ate); |
| 309 return !exceptionState.hadException(); | 311 return !exceptionState.hadException(); |
| 310 } | 312 } |
| 311 | 313 |
| 312 virtual bool redo(ExceptionState& exceptionState) OVERRIDE | 314 virtual bool redo(ExceptionState& exceptionState) OVERRIDE |
| 313 { | 315 { |
| 314 m_parentNode->replaceChild(m_newNode, m_oldNode.get(), exceptionState); | 316 // FIXME: Oilpan: The first .get() is unnecessary if m_newNode is a |
| 317 // Persistent or a Member. |
| 318 m_parentNode->replaceChild(m_newNode.get(), m_oldNode.get(), exceptionSt
ate); |
| 315 return !exceptionState.hadException(); | 319 return !exceptionState.hadException(); |
| 316 } | 320 } |
| 317 | 321 |
| 318 private: | 322 private: |
| 319 RefPtr<Node> m_parentNode; | 323 RefPtr<Node> m_parentNode; |
| 320 RefPtr<Node> m_newNode; | 324 RefPtr<Node> m_newNode; |
| 321 RefPtr<Node> m_oldNode; | 325 RefPtr<Node> m_oldNode; |
| 322 }; | 326 }; |
| 323 | 327 |
| 324 class DOMEditor::SetNodeValueAction FINAL : public InspectorHistory::Action { | 328 class DOMEditor::SetNodeValueAction FINAL : public InspectorHistory::Action { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 bool DOMEditor::replaceWholeText(Text* textNode, const String& text, ErrorString
* errorString) | 456 bool DOMEditor::replaceWholeText(Text* textNode, const String& text, ErrorString
* errorString) |
| 453 { | 457 { |
| 454 TrackExceptionState exceptionState; | 458 TrackExceptionState exceptionState; |
| 455 bool result = replaceWholeText(textNode, text, exceptionState); | 459 bool result = replaceWholeText(textNode, text, exceptionState); |
| 456 populateErrorString(exceptionState, errorString); | 460 populateErrorString(exceptionState, errorString); |
| 457 return result; | 461 return result; |
| 458 } | 462 } |
| 459 | 463 |
| 460 } // namespace WebCore | 464 } // namespace WebCore |
| 461 | 465 |
| OLD | NEW |