OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 return placeholder.release(); | 864 return placeholder.release(); |
865 } | 865 } |
866 | 866 |
867 PassRefPtrWillBeRawPtr<HTMLBRElement> CompositeEditCommand::addBlockPlaceholderI
fNeeded(Element* container) | 867 PassRefPtrWillBeRawPtr<HTMLBRElement> CompositeEditCommand::addBlockPlaceholderI
fNeeded(Element* container) |
868 { | 868 { |
869 if (!container) | 869 if (!container) |
870 return nullptr; | 870 return nullptr; |
871 | 871 |
872 document().updateLayoutIgnorePendingStylesheets(); | 872 document().updateLayoutIgnorePendingStylesheets(); |
873 | 873 |
874 RenderObject* renderer = container->renderer(); | 874 LayoutObject* renderer = container->renderer(); |
875 if (!renderer || !renderer->isRenderBlockFlow()) | 875 if (!renderer || !renderer->isRenderBlockFlow()) |
876 return nullptr; | 876 return nullptr; |
877 | 877 |
878 // append the placeholder to make sure it follows | 878 // append the placeholder to make sure it follows |
879 // any unrendered blocks | 879 // any unrendered blocks |
880 RenderBlockFlow* block = toRenderBlockFlow(renderer); | 880 RenderBlockFlow* block = toRenderBlockFlow(renderer); |
881 if (block->size().height() == 0 || (block->isListItem() && toRenderListItem(
block)->isEmpty())) | 881 if (block->size().height() == 0 || (block->isListItem() && toRenderListItem(
block)->isEmpty())) |
882 return appendBlockPlaceholder(container); | 882 return appendBlockPlaceholder(container); |
883 | 883 |
884 return nullptr; | 884 return nullptr; |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 } | 1498 } |
1499 | 1499 |
1500 void CompositeEditCommand::trace(Visitor* visitor) | 1500 void CompositeEditCommand::trace(Visitor* visitor) |
1501 { | 1501 { |
1502 visitor->trace(m_commands); | 1502 visitor->trace(m_commands); |
1503 visitor->trace(m_composition); | 1503 visitor->trace(m_composition); |
1504 EditCommand::trace(visitor); | 1504 EditCommand::trace(visitor); |
1505 } | 1505 } |
1506 | 1506 |
1507 } // namespace blink | 1507 } // namespace blink |
OLD | NEW |