| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 // However, as soon as some content is entered, the line boxes will be | 1124 // However, as soon as some content is entered, the line boxes will be |
| 1125 // constructed and this kludge is not called any more. So only the caret size | 1125 // constructed and this kludge is not called any more. So only the caret size |
| 1126 // of an empty :first-line'd block is wrong. I think we can live with that. | 1126 // of an empty :first-line'd block is wrong. I think we can live with that. |
| 1127 const ComputedStyle& currentStyle = firstLineStyleRef(); | 1127 const ComputedStyle& currentStyle = firstLineStyleRef(); |
| 1128 | 1128 |
| 1129 enum CaretAlignment { AlignLeft, AlignRight, AlignCenter }; | 1129 enum CaretAlignment { AlignLeft, AlignRight, AlignCenter }; |
| 1130 | 1130 |
| 1131 CaretAlignment alignment = AlignLeft; | 1131 CaretAlignment alignment = AlignLeft; |
| 1132 | 1132 |
| 1133 switch (currentStyle.textAlign()) { | 1133 switch (currentStyle.textAlign()) { |
| 1134 case ETextAlign::Left: | 1134 case ETextAlign::kLeft: |
| 1135 case ETextAlign::WebkitLeft: | 1135 case ETextAlign::kWebkitLeft: |
| 1136 break; | 1136 break; |
| 1137 case ETextAlign::Center: | 1137 case ETextAlign::kCenter: |
| 1138 case ETextAlign::WebkitCenter: | 1138 case ETextAlign::kWebkitCenter: |
| 1139 alignment = AlignCenter; | 1139 alignment = AlignCenter; |
| 1140 break; | 1140 break; |
| 1141 case ETextAlign::Right: | 1141 case ETextAlign::kRight: |
| 1142 case ETextAlign::WebkitRight: | 1142 case ETextAlign::kWebkitRight: |
| 1143 alignment = AlignRight; | 1143 alignment = AlignRight; |
| 1144 break; | 1144 break; |
| 1145 case ETextAlign::Justify: | 1145 case ETextAlign::kJustify: |
| 1146 case ETextAlign::Start: | 1146 case ETextAlign::kStart: |
| 1147 if (!currentStyle.isLeftToRightDirection()) | 1147 if (!currentStyle.isLeftToRightDirection()) |
| 1148 alignment = AlignRight; | 1148 alignment = AlignRight; |
| 1149 break; | 1149 break; |
| 1150 case ETextAlign::End: | 1150 case ETextAlign::kEnd: |
| 1151 if (currentStyle.isLeftToRightDirection()) | 1151 if (currentStyle.isLeftToRightDirection()) |
| 1152 alignment = AlignRight; | 1152 alignment = AlignRight; |
| 1153 break; | 1153 break; |
| 1154 } | 1154 } |
| 1155 | 1155 |
| 1156 LayoutUnit x = borderLeft() + paddingLeft(); | 1156 LayoutUnit x = borderLeft() + paddingLeft(); |
| 1157 LayoutUnit maxX = width - borderRight() - paddingRight(); | 1157 LayoutUnit maxX = width - borderRight() - paddingRight(); |
| 1158 | 1158 |
| 1159 switch (alignment) { | 1159 switch (alignment) { |
| 1160 case AlignLeft: | 1160 case AlignLeft: |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1338 if (rootElementStyle->hasBackground()) | 1338 if (rootElementStyle->hasBackground()) |
| 1339 return false; | 1339 return false; |
| 1340 | 1340 |
| 1341 if (node() != document().firstBodyElement()) | 1341 if (node() != document().firstBodyElement()) |
| 1342 return false; | 1342 return false; |
| 1343 | 1343 |
| 1344 return true; | 1344 return true; |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 } // namespace blink | 1347 } // namespace blink |
| OLD | NEW |