OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2009 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 setNodeAttribute(element, styleAttr, AtomicString(inlineStyle->asTex
t())); | 543 setNodeAttribute(element, styleAttr, AtomicString(inlineStyle->asTex
t())); |
544 if (isSpanWithoutAttributesOrUnstyledStyleSpan(element)) | 544 if (isSpanWithoutAttributesOrUnstyledStyleSpan(element)) |
545 removeNodePreservingChildren(element); | 545 removeNodePreservingChildren(element); |
546 } | 546 } |
547 } | 547 } |
548 } | 548 } |
549 | 549 |
550 static HTMLElement* highestEmbeddingAncestor(Node* startNode, Node* enclosingNod
e) | 550 static HTMLElement* highestEmbeddingAncestor(Node* startNode, Node* enclosingNod
e) |
551 { | 551 { |
552 for (Node* n = startNode; n && n != enclosingNode; n = n->parentNode()) { | 552 for (Node* n = startNode; n && n != enclosingNode; n = n->parentNode()) { |
553 if (n->isHTMLElement() && getIdentifierValue(CSSComputedStyleDeclaration
::create(n).get(), CSSPropertyUnicodeBidi) == CSSValueEmbed) | 553 if (n->isHTMLElement() |
| 554 && EditingStyle::isEmbedOrIsolate(getIdentifierValue(CSSComputedStyl
eDeclaration::create(n).get(), CSSPropertyUnicodeBidi))) { |
554 return toHTMLElement(n); | 555 return toHTMLElement(n); |
| 556 } |
555 } | 557 } |
556 | 558 |
557 return 0; | 559 return 0; |
558 } | 560 } |
559 | 561 |
560 void ApplyStyleCommand::applyInlineStyle(EditingStyle* style) | 562 void ApplyStyleCommand::applyInlineStyle(EditingStyle* style) |
561 { | 563 { |
562 RefPtrWillBeRawPtr<ContainerNode> startDummySpanAncestor = nullptr; | 564 RefPtrWillBeRawPtr<ContainerNode> startDummySpanAncestor = nullptr; |
563 RefPtrWillBeRawPtr<ContainerNode> endDummySpanAncestor = nullptr; | 565 RefPtrWillBeRawPtr<ContainerNode> endDummySpanAncestor = nullptr; |
564 | 566 |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 DEFINE_TRACE(ApplyStyleCommand) | 1596 DEFINE_TRACE(ApplyStyleCommand) |
1595 { | 1597 { |
1596 visitor->trace(m_style); | 1598 visitor->trace(m_style); |
1597 visitor->trace(m_start); | 1599 visitor->trace(m_start); |
1598 visitor->trace(m_end); | 1600 visitor->trace(m_end); |
1599 visitor->trace(m_styledInlineElement); | 1601 visitor->trace(m_styledInlineElement); |
1600 CompositeEditCommand::trace(visitor); | 1602 CompositeEditCommand::trace(visitor); |
1601 } | 1603 } |
1602 | 1604 |
1603 } | 1605 } |
OLD | NEW |