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 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4276 m_overflow->addVisualOverflow(rect); | 4276 m_overflow->addVisualOverflow(rect); |
4277 } | 4277 } |
4278 | 4278 |
4279 void RenderBox::addContentsVisualOverflow(const LayoutRect& rect) | 4279 void RenderBox::addContentsVisualOverflow(const LayoutRect& rect) |
4280 { | 4280 { |
4281 if (!hasOverflowClip()) { | 4281 if (!hasOverflowClip()) { |
4282 addVisualOverflow(rect); | 4282 addVisualOverflow(rect); |
4283 return; | 4283 return; |
4284 } | 4284 } |
4285 | 4285 |
4286 if (!m_overflow) { | 4286 if (!m_overflow) |
4287 LayoutRect clientBox = clientBoxRect(); | 4287 m_overflow = adoptPtr(new RenderOverflow(noOverflowRect(), borderBoxRect
())); |
4288 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) | |
4289 clientBox.move(-verticalScrollbarWidth(), 0); | |
4290 m_overflow = adoptPtr(new RenderOverflow(clientBox, borderBoxRect())); | |
4291 } | |
4292 m_overflow->addContentsVisualOverflow(rect); | 4288 m_overflow->addContentsVisualOverflow(rect); |
4293 } | 4289 } |
4294 | 4290 |
4295 void RenderBox::clearLayoutOverflow() | 4291 void RenderBox::clearLayoutOverflow() |
4296 { | 4292 { |
4297 if (!m_overflow) | 4293 if (!m_overflow) |
4298 return; | 4294 return; |
4299 | 4295 |
4300 if (!hasVisualOverflow() && contentsVisualOverflowRect().isEmpty()) { | 4296 if (!hasVisualOverflow() && contentsVisualOverflowRect().isEmpty()) { |
4301 m_overflow.clear(); | 4297 m_overflow.clear(); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4692 return 0; | 4688 return 0; |
4693 | 4689 |
4694 if (!layoutState && !flowThreadContainingBlock()) | 4690 if (!layoutState && !flowThreadContainingBlock()) |
4695 return 0; | 4691 return 0; |
4696 | 4692 |
4697 RenderBlock* containerBlock = containingBlock(); | 4693 RenderBlock* containerBlock = containingBlock(); |
4698 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4694 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4699 } | 4695 } |
4700 | 4696 |
4701 } // namespace WebCore | 4697 } // namespace WebCore |
OLD | NEW |