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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 } | 563 } |
564 // There are other styles that style rules can give to style spans, | 564 // There are other styles that style rules can give to style spans, |
565 // but these are the two important ones because they'll prevent | 565 // but these are the two important ones because they'll prevent |
566 // inserted content from appearing in the right paragraph. | 566 // inserted content from appearing in the right paragraph. |
567 // FIXME: Hyatt is concerned that selectively using display:inline w
ill give inconsistent | 567 // FIXME: Hyatt is concerned that selectively using display:inline w
ill give inconsistent |
568 // results. We already know one issue because td elements ignore the
ir display property | 568 // results. We already know one issue because td elements ignore the
ir display property |
569 // in quirks mode (which Mail.app is always in). We should look for
an alternative. | 569 // in quirks mode (which Mail.app is always in). We should look for
an alternative. |
570 | 570 |
571 // Mutate using the CSSOM wrapper so we get the same event behavior
as a script. | 571 // Mutate using the CSSOM wrapper so we get the same event behavior
as a script. |
572 if (isEnclosingBlock(element)) | 572 if (isEnclosingBlock(element)) |
573 element->style()->setPropertyInternal(CSSPropertyDisplay, "inlin
e", false, IGNORE_EXCEPTION); | 573 element->style()->setPropertyInternal(CSSPropertyDisplay, String
(), "inline", false, IGNORE_EXCEPTION); |
574 if (element->layoutObject() && element->layoutObject()->style()->isF
loating()) | 574 if (element->layoutObject() && element->layoutObject()->style()->isF
loating()) |
575 element->style()->setPropertyInternal(CSSPropertyFloat, "none",
false, IGNORE_EXCEPTION); | 575 element->style()->setPropertyInternal(CSSPropertyFloat, String()
, "none", false, IGNORE_EXCEPTION); |
576 } | 576 } |
577 } | 577 } |
578 } | 578 } |
579 | 579 |
580 static bool isProhibitedParagraphChild(const AtomicString& name) | 580 static bool isProhibitedParagraphChild(const AtomicString& name) |
581 { | 581 { |
582 // https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibi
ted-paragraph-child | 582 // https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibi
ted-paragraph-child |
583 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, elements, ()); | 583 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, elements, ()); |
584 if (elements.isEmpty()) { | 584 if (elements.isEmpty()) { |
585 elements.add(addressTag.localName()); | 585 elements.add(addressTag.localName()); |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 DEFINE_TRACE(ReplaceSelectionCommand) | 1543 DEFINE_TRACE(ReplaceSelectionCommand) |
1544 { | 1544 { |
1545 visitor->trace(m_startOfInsertedContent); | 1545 visitor->trace(m_startOfInsertedContent); |
1546 visitor->trace(m_endOfInsertedContent); | 1546 visitor->trace(m_endOfInsertedContent); |
1547 visitor->trace(m_insertionStyle); | 1547 visitor->trace(m_insertionStyle); |
1548 visitor->trace(m_documentFragment); | 1548 visitor->trace(m_documentFragment); |
1549 CompositeEditCommand::trace(visitor); | 1549 CompositeEditCommand::trace(visitor); |
1550 } | 1550 } |
1551 | 1551 |
1552 } // namespace blink | 1552 } // namespace blink |
OLD | NEW |