| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 28 matching lines...) Expand all Loading... |
| 39 #include "core/editing/HTMLInterchange.h" | 39 #include "core/editing/HTMLInterchange.h" |
| 40 #include "core/editing/TextIterator.h" | 40 #include "core/editing/TextIterator.h" |
| 41 #include "core/editing/VisiblePosition.h" | 41 #include "core/editing/VisiblePosition.h" |
| 42 #include "core/editing/VisibleSelection.h" | 42 #include "core/editing/VisibleSelection.h" |
| 43 #include "core/editing/VisibleUnits.h" | 43 #include "core/editing/VisibleUnits.h" |
| 44 #include "core/html/HTMLBRElement.h" | 44 #include "core/html/HTMLBRElement.h" |
| 45 #include "core/html/HTMLDivElement.h" | 45 #include "core/html/HTMLDivElement.h" |
| 46 #include "core/html/HTMLLIElement.h" | 46 #include "core/html/HTMLLIElement.h" |
| 47 #include "core/html/HTMLOListElement.h" | 47 #include "core/html/HTMLOListElement.h" |
| 48 #include "core/html/HTMLParagraphElement.h" | 48 #include "core/html/HTMLParagraphElement.h" |
| 49 #include "core/html/HTMLTableElement.h" |
| 49 #include "core/html/HTMLUListElement.h" | 50 #include "core/html/HTMLUListElement.h" |
| 50 #include "core/page/Frame.h" | 51 #include "core/page/Frame.h" |
| 51 #include "core/rendering/RenderObject.h" | 52 #include "core/rendering/RenderObject.h" |
| 52 #include <wtf/Assertions.h> | 53 #include <wtf/Assertions.h> |
| 53 #include <wtf/StdLibExtras.h> | 54 #include <wtf/StdLibExtras.h> |
| 54 #include <wtf/unicode/CharacterNames.h> | 55 #include <wtf/unicode/CharacterNames.h> |
| 55 | 56 |
| 56 using namespace std; | 57 using namespace std; |
| 57 | 58 |
| 58 namespace WebCore { | 59 namespace WebCore { |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 return false; | 1163 return false; |
| 1163 | 1164 |
| 1164 return firstElement->hasEquivalentAttributes(secondElement); | 1165 return firstElement->hasEquivalentAttributes(secondElement); |
| 1165 } | 1166 } |
| 1166 | 1167 |
| 1167 bool isNonTableCellHTMLBlockElement(const Node* node) | 1168 bool isNonTableCellHTMLBlockElement(const Node* node) |
| 1168 { | 1169 { |
| 1169 return node->hasTagName(listingTag) | 1170 return node->hasTagName(listingTag) |
| 1170 || node->hasTagName(olTag) | 1171 || node->hasTagName(olTag) |
| 1171 || node->hasTagName(preTag) | 1172 || node->hasTagName(preTag) |
| 1172 || node->hasTagName(tableTag) | 1173 || isHTMLTableElement(node) |
| 1173 || node->hasTagName(ulTag) | 1174 || node->hasTagName(ulTag) |
| 1174 || node->hasTagName(xmpTag) | 1175 || node->hasTagName(xmpTag) |
| 1175 || node->hasTagName(h1Tag) | 1176 || node->hasTagName(h1Tag) |
| 1176 || node->hasTagName(h2Tag) | 1177 || node->hasTagName(h2Tag) |
| 1177 || node->hasTagName(h3Tag) | 1178 || node->hasTagName(h3Tag) |
| 1178 || node->hasTagName(h4Tag) | 1179 || node->hasTagName(h4Tag) |
| 1179 || node->hasTagName(h5Tag); | 1180 || node->hasTagName(h5Tag); |
| 1180 } | 1181 } |
| 1181 | 1182 |
| 1182 Position adjustedSelectionStartForStyleComputation(const VisibleSelection& selec
tion) | 1183 Position adjustedSelectionStartForStyleComputation(const VisibleSelection& selec
tion) |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1198 // if the selection starts just before a paragraph break, skip over it | 1199 // if the selection starts just before a paragraph break, skip over it |
| 1199 if (isEndOfParagraph(visiblePosition)) | 1200 if (isEndOfParagraph(visiblePosition)) |
| 1200 return visiblePosition.next().deepEquivalent().downstream(); | 1201 return visiblePosition.next().deepEquivalent().downstream(); |
| 1201 | 1202 |
| 1202 // otherwise, make sure to be at the start of the first selected node, | 1203 // otherwise, make sure to be at the start of the first selected node, |
| 1203 // instead of possibly at the end of the last node before the selection | 1204 // instead of possibly at the end of the last node before the selection |
| 1204 return visiblePosition.deepEquivalent().downstream(); | 1205 return visiblePosition.deepEquivalent().downstream(); |
| 1205 } | 1206 } |
| 1206 | 1207 |
| 1207 } // namespace WebCore | 1208 } // namespace WebCore |
| OLD | NEW |