OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "HTMLNames.h" | 27 #include "HTMLNames.h" |
28 #include "core/dom/Document.h" | 28 #include "core/dom/Document.h" |
29 #include "core/dom/Element.h" | 29 #include "core/dom/Element.h" |
30 #include "core/dom/ExceptionCodePlaceholder.h" | 30 #include "core/dom/ExceptionCodePlaceholder.h" |
31 #include "core/dom/Range.h" | 31 #include "core/dom/Range.h" |
32 #include "core/editing/FormatBlockCommand.h" | 32 #include "core/editing/FormatBlockCommand.h" |
33 #include "core/editing/VisibleUnits.h" | 33 #include "core/editing/VisibleUnits.h" |
34 #include "core/editing/htmlediting.h" | 34 #include "core/editing/htmlediting.h" |
35 #include "core/html/HTMLElement.h" | |
36 | 35 |
37 namespace WebCore { | 36 namespace WebCore { |
38 | 37 |
39 using namespace HTMLNames; | 38 using namespace HTMLNames; |
40 | 39 |
41 static Node* enclosingBlockToSplitTreeTo(Node* startNode); | 40 static Node* enclosingBlockToSplitTreeTo(Node* startNode); |
42 static bool isElementForFormatBlock(const QualifiedName& tagName); | 41 static bool isElementForFormatBlock(const QualifiedName& tagName); |
43 static inline bool isElementForFormatBlock(Node* node) | 42 static inline bool isElementForFormatBlock(Node* node) |
44 { | 43 { |
45 return node->isElementNode() && isElementForFormatBlock(toElement(node)->tag
QName()); | 44 return node->isElementNode() && isElementForFormatBlock(toElement(node)->tag
QName()); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 return n; | 154 return n; |
156 if (isBlock(n)) | 155 if (isBlock(n)) |
157 lastBlock = n; | 156 lastBlock = n; |
158 if (isListElement(n)) | 157 if (isListElement(n)) |
159 return n->parentNode()->rendererIsEditable() ? n->parentNode() : n; | 158 return n->parentNode()->rendererIsEditable() ? n->parentNode() : n; |
160 } | 159 } |
161 return lastBlock; | 160 return lastBlock; |
162 } | 161 } |
163 | 162 |
164 } | 163 } |
OLD | NEW |