| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 top -= toRenderInline(&boxModelObject)->borderTop(); | 250 top -= toRenderInline(&boxModelObject)->borderTop(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 // Get the logical top of the region this object starts in | 253 // Get the logical top of the region this object starts in |
| 254 // and compute the object's top, relative to the region's top. | 254 // and compute the object's top, relative to the region's top. |
| 255 LayoutUnit regionLogicalTop = startRegion->pageLogicalTopForOffset(t
op); | 255 LayoutUnit regionLogicalTop = startRegion->pageLogicalTopForOffset(t
op); |
| 256 LayoutUnit topRelativeToRegion = top - regionLogicalTop; | 256 LayoutUnit topRelativeToRegion = top - regionLogicalTop; |
| 257 referencePoint.setY(startRegion->offsetTop() + topRelativeToRegion); | 257 referencePoint.setY(startRegion->offsetTop() + topRelativeToRegion); |
| 258 | 258 |
| 259 // Since the top has been overriden, check if the | 259 // Since the top has been overriden, check if the |
| 260 // relative/sticky positioning must be reconsidered. | 260 // relative positioning must be reconsidered. |
| 261 if (boxModelObject.isRelPositioned()) | 261 if (boxModelObject.isRelPositioned()) |
| 262 referencePoint.move(0, boxModelObject.relativePositionOffset().h
eight()); | 262 referencePoint.move(0, boxModelObject.relativePositionOffset().h
eight()); |
| 263 else if (boxModelObject.isStickyPositioned()) | |
| 264 referencePoint.move(0, boxModelObject.stickyPositionOffset().hei
ght()); | |
| 265 } | 263 } |
| 266 | 264 |
| 267 // Since we're looking for the offset relative to the body, we must also | 265 // Since we're looking for the offset relative to the body, we must also |
| 268 // take into consideration the borders of the region. | 266 // take into consideration the borders of the region. |
| 269 referencePoint.move(startRegion->borderLeft(), startRegion->borderTop())
; | 267 referencePoint.move(startRegion->borderLeft(), startRegion->borderTop())
; |
| 270 } | 268 } |
| 271 | 269 |
| 272 return referencePoint; | 270 return referencePoint; |
| 273 } | 271 } |
| 274 | 272 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 { | 529 { |
| 532 if (!m_renderFlowThread) | 530 if (!m_renderFlowThread) |
| 533 return; | 531 return; |
| 534 RenderView* view = m_renderFlowThread->view(); | 532 RenderView* view = m_renderFlowThread->view(); |
| 535 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); | 533 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl
owThread); |
| 536 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); | 534 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo
wThread); |
| 537 } | 535 } |
| 538 | 536 |
| 539 | 537 |
| 540 } // namespace WebCore | 538 } // namespace WebCore |
| OLD | NEW |