OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
3 * Copyright (C) 2005 Alexey Proskuryakov. | 3 * Copyright (C) 2005 Alexey Proskuryakov. |
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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 // not to do this at all | 829 // not to do this at all |
830 if (node->hasTagName(h1Tag) | 830 if (node->hasTagName(h1Tag) |
831 || node->hasTagName(h2Tag) | 831 || node->hasTagName(h2Tag) |
832 || node->hasTagName(h3Tag) | 832 || node->hasTagName(h3Tag) |
833 || node->hasTagName(h4Tag) | 833 || node->hasTagName(h4Tag) |
834 || node->hasTagName(h5Tag) | 834 || node->hasTagName(h5Tag) |
835 || node->hasTagName(h6Tag) | 835 || node->hasTagName(h6Tag) |
836 || node->hasTagName(pTag)) { | 836 || node->hasTagName(pTag)) { |
837 LayoutStyle* style = r->style(); | 837 LayoutStyle* style = r->style(); |
838 if (style) { | 838 if (style) { |
839 int bottomMargin = toRenderBox(r)->collapsedMarginAfter(); | 839 int bottomMargin = toLayoutBox(r)->collapsedMarginAfter(); |
840 int fontSize = style->fontDescription().computedPixelSize(); | 840 int fontSize = style->fontDescription().computedPixelSize(); |
841 if (bottomMargin * 2 >= fontSize) | 841 if (bottomMargin * 2 >= fontSize) |
842 return true; | 842 return true; |
843 } | 843 } |
844 } | 844 } |
845 | 845 |
846 return false; | 846 return false; |
847 } | 847 } |
848 | 848 |
849 // Whether or not we should emit a character as we enter m_node (if it's a conta
iner) or as we hit it (if it's atomic). | 849 // Whether or not we should emit a character as we enter m_node (if it's a conta
iner) or as we hit it (if it's atomic). |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 return createPlainText(it); | 1177 return createPlainText(it); |
1178 } | 1178 } |
1179 | 1179 |
1180 String plainText(const Position& start, const Position& end, TextIteratorBehavio
rFlags behavior) | 1180 String plainText(const Position& start, const Position& end, TextIteratorBehavio
rFlags behavior) |
1181 { | 1181 { |
1182 TextIterator it(start, end, behavior); | 1182 TextIterator it(start, end, behavior); |
1183 return createPlainText(it); | 1183 return createPlainText(it); |
1184 } | 1184 } |
1185 | 1185 |
1186 } | 1186 } |
OLD | NEW |