OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 BorderValue prev_border = o.Style()->BorderTop(); | 212 BorderValue prev_border = o.Style()->BorderTop(); |
213 if (!box.BorderTop()) { | 213 if (!box.BorderTop()) { |
214 ts << " none"; | 214 ts << " none"; |
215 } else { | 215 } else { |
216 ts << " (" << box.BorderTop() << "px "; | 216 ts << " (" << box.BorderTop() << "px "; |
217 PrintBorderStyle(ts, o.Style()->BorderTopStyle()); | 217 PrintBorderStyle(ts, o.Style()->BorderTopStyle()); |
218 ts << o.ResolveColor(CSSPropertyBorderTopColor) << ")"; | 218 ts << o.ResolveColor(CSSPropertyBorderTopColor) << ")"; |
219 } | 219 } |
220 | 220 |
221 if (o.Style()->BorderRight() != prev_border) { | 221 if (!o.Style()->BorderRightEquals(prev_border)) { |
222 prev_border = o.Style()->BorderRight(); | 222 prev_border = o.Style()->BorderRight(); |
223 if (!box.BorderRight()) { | 223 if (!box.BorderRight()) { |
224 ts << " none"; | 224 ts << " none"; |
225 } else { | 225 } else { |
226 ts << " (" << box.BorderRight() << "px "; | 226 ts << " (" << box.BorderRight() << "px "; |
227 PrintBorderStyle(ts, o.Style()->BorderRightStyle()); | 227 PrintBorderStyle(ts, o.Style()->BorderRightStyle()); |
228 ts << o.ResolveColor(CSSPropertyBorderRightColor) << ")"; | 228 ts << o.ResolveColor(CSSPropertyBorderRightColor) << ")"; |
229 } | 229 } |
230 } | 230 } |
231 | 231 |
232 if (o.Style()->BorderBottom() != prev_border) { | 232 if (!o.Style()->BorderBottomEquals(prev_border)) { |
233 prev_border = box.Style()->BorderBottom(); | 233 prev_border = box.Style()->BorderBottom(); |
234 if (!box.BorderBottom()) { | 234 if (!box.BorderBottom()) { |
235 ts << " none"; | 235 ts << " none"; |
236 } else { | 236 } else { |
237 ts << " (" << box.BorderBottom() << "px "; | 237 ts << " (" << box.BorderBottom() << "px "; |
238 PrintBorderStyle(ts, o.Style()->BorderBottomStyle()); | 238 PrintBorderStyle(ts, o.Style()->BorderBottomStyle()); |
239 ts << o.ResolveColor(CSSPropertyBorderBottomColor) << ")"; | 239 ts << o.ResolveColor(CSSPropertyBorderBottomColor) << ")"; |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
243 if (o.Style()->BorderLeft() != prev_border) { | 243 if (!o.Style()->BorderLeftEquals(prev_border)) { |
244 prev_border = o.Style()->BorderLeft(); | 244 prev_border = o.Style()->BorderLeft(); |
245 if (!box.BorderLeft()) { | 245 if (!box.BorderLeft()) { |
246 ts << " none"; | 246 ts << " none"; |
247 } else { | 247 } else { |
248 ts << " (" << box.BorderLeft() << "px "; | 248 ts << " (" << box.BorderLeft() << "px "; |
249 PrintBorderStyle(ts, o.Style()->BorderLeftStyle()); | 249 PrintBorderStyle(ts, o.Style()->BorderLeftStyle()); |
250 ts << o.ResolveColor(CSSPropertyBorderLeftColor) << ")"; | 250 ts << o.ResolveColor(CSSPropertyBorderLeftColor) << ")"; |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 element->GetDocument().UpdateStyleAndLayout(); | 878 element->GetDocument().UpdateStyleAndLayout(); |
879 | 879 |
880 LayoutObject* layout_object = element->GetLayoutObject(); | 880 LayoutObject* layout_object = element->GetLayoutObject(); |
881 if (!layout_object || !layout_object->IsListItem()) | 881 if (!layout_object || !layout_object->IsListItem()) |
882 return String(); | 882 return String(); |
883 | 883 |
884 return ToLayoutListItem(layout_object)->MarkerText(); | 884 return ToLayoutListItem(layout_object)->MarkerText(); |
885 } | 885 } |
886 | 886 |
887 } // namespace blink | 887 } // namespace blink |
OLD | NEW |