OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006 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 20 matching lines...) Expand all Loading... |
31 #include "core/dom/NodeTraversal.h" | 31 #include "core/dom/NodeTraversal.h" |
32 #include "core/dom/Text.h" | 32 #include "core/dom/Text.h" |
33 #include "core/editing/EditingStyle.h" | 33 #include "core/editing/EditingStyle.h" |
34 #include "core/editing/InsertLineBreakCommand.h" | 34 #include "core/editing/InsertLineBreakCommand.h" |
35 #include "core/editing/VisibleUnits.h" | 35 #include "core/editing/VisibleUnits.h" |
36 #include "core/editing/htmlediting.h" | 36 #include "core/editing/htmlediting.h" |
37 #include "core/html/HTMLBRElement.h" | 37 #include "core/html/HTMLBRElement.h" |
38 #include "core/html/HTMLElement.h" | 38 #include "core/html/HTMLElement.h" |
39 #include "core/html/HTMLQuoteElement.h" | 39 #include "core/html/HTMLQuoteElement.h" |
40 #include "core/layout/LayoutObject.h" | 40 #include "core/layout/LayoutObject.h" |
41 #include "core/rendering/RenderText.h" | 41 #include "core/layout/LayoutText.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 using namespace HTMLNames; | 45 using namespace HTMLNames; |
46 | 46 |
47 // When inserting a new line, we want to avoid nesting empty divs if we can. Ot
herwise, when | 47 // When inserting a new line, we want to avoid nesting empty divs if we can. Ot
herwise, when |
48 // pasting, it's easy to have each new line be a div deeper than the previous.
E.g., in the case | 48 // pasting, it's easy to have each new line be a div deeper than the previous.
E.g., in the case |
49 // below, we want to insert at ^ instead of |. | 49 // below, we want to insert at ^ instead of |. |
50 // <div>foo<div>bar</div>|</div>^ | 50 // <div>foo<div>bar</div>|</div>^ |
51 static Element* highestVisuallyEquivalentDivBelowRoot(Element* startBlock) | 51 static Element* highestVisuallyEquivalentDivBelowRoot(Element* startBlock) |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 } | 429 } |
430 | 430 |
431 DEFINE_TRACE(InsertParagraphSeparatorCommand) | 431 DEFINE_TRACE(InsertParagraphSeparatorCommand) |
432 { | 432 { |
433 visitor->trace(m_style); | 433 visitor->trace(m_style); |
434 CompositeEditCommand::trace(visitor); | 434 CompositeEditCommand::trace(visitor); |
435 } | 435 } |
436 | 436 |
437 | 437 |
438 } // namespace blink | 438 } // namespace blink |
OLD | NEW |