| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 LayoutBlock* cb = o.containingBlock(); | 187 LayoutBlock* cb = o.containingBlock(); |
| 188 bool adjustForTableCells = cb ? cb->isTableCell() : false; | 188 bool adjustForTableCells = cb ? cb->isTableCell() : false; |
| 189 | 189 |
| 190 LayoutRect r; | 190 LayoutRect r; |
| 191 if (o.isText()) { | 191 if (o.isText()) { |
| 192 // FIXME: Would be better to dump the bounding box x and y rather than t
he first run's x and y, but that would involve updating | 192 // FIXME: Would be better to dump the bounding box x and y rather than t
he first run's x and y, but that would involve updating |
| 193 // many test results. | 193 // many test results. |
| 194 const LayoutText& text = toLayoutText(o); | 194 const LayoutText& text = toLayoutText(o); |
| 195 IntRect linesBox = text.linesBoundingBox(); | 195 IntRect linesBox = text.linesBoundingBox(); |
| 196 r = LayoutRect(IntRect(text.firstRunX(), text.firstRunY(), linesBox.widt
h(), linesBox.height())); | 196 r = LayoutRect(IntRect(text.firstRunX(), text.firstRunY(), linesBox.widt
h(), linesBox.height())); |
| 197 if (adjustForTableCells && !text.firstTextBox()) | 197 if (adjustForTableCells && !text.hasTextBoxes()) |
| 198 adjustForTableCells = false; | 198 adjustForTableCells = false; |
| 199 } else if (o.isLayoutInline()) { | 199 } else if (o.isLayoutInline()) { |
| 200 // FIXME: Would be better not to just dump 0, 0 as the x and y here. | 200 // FIXME: Would be better not to just dump 0, 0 as the x and y here. |
| 201 const LayoutInline& inlineFlow = toLayoutInline(o); | 201 const LayoutInline& inlineFlow = toLayoutInline(o); |
| 202 r = LayoutRect(IntRect(0, 0, inlineFlow.linesBoundingBox().width(), inli
neFlow.linesBoundingBox().height())); | 202 r = LayoutRect(IntRect(0, 0, inlineFlow.linesBoundingBox().width(), inli
neFlow.linesBoundingBox().height())); |
| 203 adjustForTableCells = false; | 203 adjustForTableCells = false; |
| 204 } else if (o.isTableCell()) { | 204 } else if (o.isTableCell()) { |
| 205 // FIXME: Deliberately dump the "inner" box of table cells, since that i
s what current results reflect. We'd like | 205 // FIXME: Deliberately dump the "inner" box of table cells, since that i
s what current results reflect. We'd like |
| 206 // to clean up the results to dump both the outer box and the intrinsic
padding so that both bits of information are | 206 // to clean up the results to dump both the outer box and the intrinsic
padding so that both bits of information are |
| 207 // captured by the results. | 207 // captured by the results. |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 element->document().updateLayout(); | 841 element->document().updateLayout(); |
| 842 | 842 |
| 843 LayoutObject* layoutObject = element->layoutObject(); | 843 LayoutObject* layoutObject = element->layoutObject(); |
| 844 if (!layoutObject || !layoutObject->isListItem()) | 844 if (!layoutObject || !layoutObject->isListItem()) |
| 845 return String(); | 845 return String(); |
| 846 | 846 |
| 847 return toLayoutListItem(layoutObject)->markerText(); | 847 return toLayoutListItem(layoutObject)->markerText(); |
| 848 } | 848 } |
| 849 | 849 |
| 850 } // namespace blink | 850 } // namespace blink |
| OLD | NEW |