OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005 Apple Computer, 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 // Likewise for the root editable element. | 367 // Likewise for the root editable element. |
368 Node* child = node->firstChild(); | 368 Node* child = node->firstChild(); |
369 while (child) { | 369 while (child) { |
370 Node* remove = child; | 370 Node* remove = child; |
371 child = child->nextSibling(); | 371 child = child->nextSibling(); |
372 removeNode(remove, shouldAssumeContentIsAlwaysEditable); | 372 removeNode(remove, shouldAssumeContentIsAlwaysEditable); |
373 } | 373 } |
374 | 374 |
375 // Make sure empty cell has some height, if a placeholder can be inserte
d. | 375 // Make sure empty cell has some height, if a placeholder can be inserte
d. |
376 document().updateLayoutIgnorePendingStylesheets(); | 376 document().updateLayoutIgnorePendingStylesheets(); |
377 RenderObject *r = node->renderer(); | 377 LayoutObject* r = node->renderer(); |
378 if (r && r->isTableCell() && toLayoutTableCell(r)->contentHeight() <= 0)
{ | 378 if (r && r->isTableCell() && toLayoutTableCell(r)->contentHeight() <= 0)
{ |
379 Position firstEditablePosition = firstEditablePositionInNode(node.ge
t()); | 379 Position firstEditablePosition = firstEditablePositionInNode(node.ge
t()); |
380 if (firstEditablePosition.isNotNull()) | 380 if (firstEditablePosition.isNotNull()) |
381 insertBlockPlaceholder(firstEditablePosition); | 381 insertBlockPlaceholder(firstEditablePosition); |
382 } | 382 } |
383 return; | 383 return; |
384 } | 384 } |
385 | 385 |
386 if (node == m_startBlock) { | 386 if (node == m_startBlock) { |
387 VisiblePosition previous = VisiblePosition(firstPositionInNode(m_startBl
ock.get())).previous(); | 387 VisiblePosition previous = VisiblePosition(firstPositionInNode(m_startBl
ock.get())).previous(); |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 visitor->trace(m_deleteIntoBlockquoteStyle); | 891 visitor->trace(m_deleteIntoBlockquoteStyle); |
892 visitor->trace(m_startRoot); | 892 visitor->trace(m_startRoot); |
893 visitor->trace(m_endRoot); | 893 visitor->trace(m_endRoot); |
894 visitor->trace(m_startTableRow); | 894 visitor->trace(m_startTableRow); |
895 visitor->trace(m_endTableRow); | 895 visitor->trace(m_endTableRow); |
896 visitor->trace(m_temporaryPlaceholder); | 896 visitor->trace(m_temporaryPlaceholder); |
897 CompositeEditCommand::trace(visitor); | 897 CompositeEditCommand::trace(visitor); |
898 } | 898 } |
899 | 899 |
900 } // namespace blink | 900 } // namespace blink |
OLD | NEW |