| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 // There are other styles that style rules can give to style spans, but | 680 // There are other styles that style rules can give to style spans, but |
| 681 // these are the two important ones because they'll prevent inserted | 681 // these are the two important ones because they'll prevent inserted |
| 682 // content from appearing in the right paragraph. | 682 // content from appearing in the right paragraph. |
| 683 // FIXME: Hyatt is concerned that selectively using display:inline will | 683 // FIXME: Hyatt is concerned that selectively using display:inline will |
| 684 // give inconsistent results. We already know one issue because td | 684 // give inconsistent results. We already know one issue because td |
| 685 // elements ignore their display property in quirks mode (which Mail.app | 685 // elements ignore their display property in quirks mode (which Mail.app |
| 686 // is always in). We should look for an alternative. | 686 // is always in). We should look for an alternative. |
| 687 | 687 |
| 688 // Mutate using the CSSOM wrapper so we get the same event behavior as a | 688 // Mutate using the CSSOM wrapper so we get the same event behavior as a |
| 689 // script. | 689 // script. |
| 690 if (isEnclosingBlock(element)) | 690 if (isEnclosingBlock(element)) { |
| 691 element->style()->setPropertyInternal( | 691 element->style()->setPropertyInternal(CSSPropertyDisplay, String(), |
| 692 CSSPropertyDisplay, String(), "inline", false, IGNORE_EXCEPTION); | 692 "inline", false, nullptr, |
| 693 IGNORE_EXCEPTION); |
| 694 } |
| 693 if (element->layoutObject() && | 695 if (element->layoutObject() && |
| 694 element->layoutObject()->style()->isFloating()) | 696 element->layoutObject()->style()->isFloating()) { |
| 695 element->style()->setPropertyInternal(CSSPropertyFloat, String(), | 697 element->style()->setPropertyInternal(CSSPropertyFloat, String(), |
| 696 "none", false, IGNORE_EXCEPTION); | 698 "none", false, nullptr, |
| 699 IGNORE_EXCEPTION); |
| 700 } |
| 697 } | 701 } |
| 698 } | 702 } |
| 699 } | 703 } |
| 700 | 704 |
| 701 static bool isProhibitedParagraphChild(const AtomicString& name) { | 705 static bool isProhibitedParagraphChild(const AtomicString& name) { |
| 702 // https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibite
d-paragraph-child | 706 // https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibite
d-paragraph-child |
| 703 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, elements, | 707 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, elements, |
| 704 ({ | 708 ({ |
| 705 addressTag.localName(), articleTag.localName(), | 709 addressTag.localName(), articleTag.localName(), |
| 706 asideTag.localName(), blockquoteTag.localName(), | 710 asideTag.localName(), blockquoteTag.localName(), |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 visitor->trace(m_startOfInsertedContent); | 2134 visitor->trace(m_startOfInsertedContent); |
| 2131 visitor->trace(m_endOfInsertedContent); | 2135 visitor->trace(m_endOfInsertedContent); |
| 2132 visitor->trace(m_insertionStyle); | 2136 visitor->trace(m_insertionStyle); |
| 2133 visitor->trace(m_documentFragment); | 2137 visitor->trace(m_documentFragment); |
| 2134 visitor->trace(m_startOfInsertedRange); | 2138 visitor->trace(m_startOfInsertedRange); |
| 2135 visitor->trace(m_endOfInsertedRange); | 2139 visitor->trace(m_endOfInsertedRange); |
| 2136 CompositeEditCommand::trace(visitor); | 2140 CompositeEditCommand::trace(visitor); |
| 2137 } | 2141 } |
| 2138 | 2142 |
| 2139 } // namespace blink | 2143 } // namespace blink |
| OLD | NEW |