| 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, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 InlineFlowBox* firstLine = flow->firstLineBox(); | 3251 InlineFlowBox* firstLine = flow->firstLineBox(); |
| 3252 InlineFlowBox* lastLine = flow->lastLineBox(); | 3252 InlineFlowBox* lastLine = flow->lastLineBox(); |
| 3253 if (firstLine && lastLine && firstLine != lastLine) { | 3253 if (firstLine && lastLine && firstLine != lastLine) { |
| 3254 setLogicalLeft(logicalLeftValue + marginLogicalLeftAlias + lastLine-
>borderLogicalLeft() + (lastLine->logicalLeft() - firstLine->logicalLeft())); | 3254 setLogicalLeft(logicalLeftValue + marginLogicalLeftAlias + lastLine-
>borderLogicalLeft() + (lastLine->logicalLeft() - firstLine->logicalLeft())); |
| 3255 return; | 3255 return; |
| 3256 } | 3256 } |
| 3257 } | 3257 } |
| 3258 | 3258 |
| 3259 LayoutUnit logicalLeftPos = logicalLeftValue + marginLogicalLeftAlias; | 3259 LayoutUnit logicalLeftPos = logicalLeftValue + marginLogicalLeftAlias; |
| 3260 computeLogicalLeftPositionedOffset(logicalLeftPos, this, logicalWidth(), con
tainerBlock, containerLogicalWidth); | 3260 computeLogicalLeftPositionedOffset(logicalLeftPos, this, logicalWidth(), con
tainerBlock, containerLogicalWidth); |
| 3261 setLogicalLeft(logicalLeftPos); | 3261 setLogicalLeft(logicalLeftPos.round()); |
| 3262 } | 3262 } |
| 3263 | 3263 |
| 3264 void RenderBox::computePositionedLogicalHeightReplaced() | 3264 void RenderBox::computePositionedLogicalHeightReplaced() |
| 3265 { | 3265 { |
| 3266 // The following is based off of the W3C Working Draft from April 11, 2006 o
f | 3266 // The following is based off of the W3C Working Draft from April 11, 2006 o
f |
| 3267 // CSS 2.1: Section 10.6.5 "Absolutely positioned, replaced elements" | 3267 // CSS 2.1: Section 10.6.5 "Absolutely positioned, replaced elements" |
| 3268 // <http://www.w3.org/TR/2005/WD-CSS21-20050613/visudet.html#abs-replaced-he
ight> | 3268 // <http://www.w3.org/TR/2005/WD-CSS21-20050613/visudet.html#abs-replaced-he
ight> |
| 3269 // (block-style-comments in this function correspond to text from the spec a
nd | 3269 // (block-style-comments in this function correspond to text from the spec a
nd |
| 3270 // the numbers correspond to numbers in spec) | 3270 // the numbers correspond to numbers in spec) |
| 3271 | 3271 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3380 * 6. If at this point the values are over-constrained, ignore the value | 3380 * 6. If at this point the values are over-constrained, ignore the value |
| 3381 * for 'bottom' and solve for that value. | 3381 * for 'bottom' and solve for that value. |
| 3382 \*-----------------------------------------------------------------------*/ | 3382 \*-----------------------------------------------------------------------*/ |
| 3383 // NOTE: It is not necessary to do this step because we don't end up using | 3383 // NOTE: It is not necessary to do this step because we don't end up using |
| 3384 // the value of 'bottom' regardless of whether the values are over-constrain
ed | 3384 // the value of 'bottom' regardless of whether the values are over-constrain
ed |
| 3385 // or not. | 3385 // or not. |
| 3386 | 3386 |
| 3387 // Use computed values to calculate the vertical position. | 3387 // Use computed values to calculate the vertical position. |
| 3388 LayoutUnit logicalTopPos = logicalTopValue + marginBeforeAlias; | 3388 LayoutUnit logicalTopPos = logicalTopValue + marginBeforeAlias; |
| 3389 computeLogicalTopPositionedOffset(logicalTopPos, this, logicalHeight(), cont
ainerBlock, containerLogicalHeight); | 3389 computeLogicalTopPositionedOffset(logicalTopPos, this, logicalHeight(), cont
ainerBlock, containerLogicalHeight); |
| 3390 setLogicalTop(logicalTopPos); | 3390 setLogicalTop(logicalTopPos.round()); |
| 3391 } | 3391 } |
| 3392 | 3392 |
| 3393 LayoutRect RenderBox::localCaretRect(InlineBox* box, int caretOffset, LayoutUnit
* extraWidthToEndOfLine) | 3393 LayoutRect RenderBox::localCaretRect(InlineBox* box, int caretOffset, LayoutUnit
* extraWidthToEndOfLine) |
| 3394 { | 3394 { |
| 3395 // VisiblePositions at offsets inside containers either a) refer to the posi
tions before/after | 3395 // VisiblePositions at offsets inside containers either a) refer to the posi
tions before/after |
| 3396 // those containers (tables and select elements) or b) refer to the position
inside an empty block. | 3396 // those containers (tables and select elements) or b) refer to the position
inside an empty block. |
| 3397 // They never refer to children. | 3397 // They never refer to children. |
| 3398 // FIXME: Paint the carets inside empty blocks differently than the carets b
efore/after elements. | 3398 // FIXME: Paint the carets inside empty blocks differently than the carets b
efore/after elements. |
| 3399 | 3399 |
| 3400 // FIXME: What about border and padding? | 3400 // FIXME: What about border and padding? |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3985 } | 3985 } |
| 3986 | 3986 |
| 3987 if (didSplitParentAnonymousBoxes) | 3987 if (didSplitParentAnonymousBoxes) |
| 3988 markBoxForRelayoutAfterSplit(this); | 3988 markBoxForRelayoutAfterSplit(this); |
| 3989 | 3989 |
| 3990 ASSERT(beforeChild->parent() == this); | 3990 ASSERT(beforeChild->parent() == this); |
| 3991 return beforeChild; | 3991 return beforeChild; |
| 3992 } | 3992 } |
| 3993 | 3993 |
| 3994 } // namespace WebCore | 3994 } // namespace WebCore |
| OLD | NEW |