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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 { | 343 { |
344 } | 344 } |
345 | 345 |
346 virtual bool perform(ExceptionState& exceptionState) OVERRIDE | 346 virtual bool perform(ExceptionState& exceptionState) OVERRIDE |
347 { | 347 { |
348 return redo(exceptionState); | 348 return redo(exceptionState); |
349 } | 349 } |
350 | 350 |
351 virtual bool undo(ExceptionState& exceptionState) OVERRIDE | 351 virtual bool undo(ExceptionState& exceptionState) OVERRIDE |
352 { | 352 { |
353 // FIXME: Oilpan: The first .get() is unnecessary if m_oldNode is a | 353 m_parentNode->replaceChild(m_oldNode, m_newNode.get(), exceptionState); |
354 // Persistent or a Member. | |
355 m_parentNode->replaceChild(m_oldNode.get(), m_newNode.get(), exceptionSt
ate); | |
356 return !exceptionState.hadException(); | 354 return !exceptionState.hadException(); |
357 } | 355 } |
358 | 356 |
359 virtual bool redo(ExceptionState& exceptionState) OVERRIDE | 357 virtual bool redo(ExceptionState& exceptionState) OVERRIDE |
360 { | 358 { |
361 // FIXME: Oilpan: The first .get() is unnecessary if m_newNode is a | 359 m_parentNode->replaceChild(m_newNode, m_oldNode.get(), exceptionState); |
362 // Persistent or a Member. | |
363 m_parentNode->replaceChild(m_newNode.get(), m_oldNode.get(), exceptionSt
ate); | |
364 return !exceptionState.hadException(); | 360 return !exceptionState.hadException(); |
365 } | 361 } |
366 | 362 |
367 virtual void trace(Visitor* visitor) OVERRIDE | 363 virtual void trace(Visitor* visitor) OVERRIDE |
368 { | 364 { |
369 visitor->trace(m_parentNode); | 365 visitor->trace(m_parentNode); |
370 visitor->trace(m_newNode); | 366 visitor->trace(m_newNode); |
371 visitor->trace(m_oldNode); | 367 visitor->trace(m_oldNode); |
372 InspectorHistory::Action::trace(visitor); | 368 InspectorHistory::Action::trace(visitor); |
373 } | 369 } |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 return result; | 514 return result; |
519 } | 515 } |
520 | 516 |
521 void DOMEditor::trace(Visitor* visitor) | 517 void DOMEditor::trace(Visitor* visitor) |
522 { | 518 { |
523 visitor->trace(m_history); | 519 visitor->trace(m_history); |
524 } | 520 } |
525 | 521 |
526 } // namespace WebCore | 522 } // namespace WebCore |
527 | 523 |
OLD | NEW |