Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 285293007: Fix layoutOverflowRect in case of explicit 'overflow: scroll', but no overflow content (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 m_overflow->addVisualOverflow(rect); 4262 m_overflow->addVisualOverflow(rect);
4263 } 4263 }
4264 4264
4265 void RenderBox::addContentsVisualOverflow(const LayoutRect& rect) 4265 void RenderBox::addContentsVisualOverflow(const LayoutRect& rect)
4266 { 4266 {
4267 if (!hasOverflowClip()) { 4267 if (!hasOverflowClip()) {
4268 addVisualOverflow(rect); 4268 addVisualOverflow(rect);
4269 return; 4269 return;
4270 } 4270 }
4271 4271
4272 if (!m_overflow) { 4272 if (!m_overflow)
4273 LayoutRect clientBox = clientBoxRect(); 4273 m_overflow = adoptPtr(new RenderOverflow(clientBoxRect(), borderBoxRect( )));
Julien - ping for review 2014/05/19 14:36:19 This should be noOverflowRect() to match the rest
pals 2014/05/20 09:20:19 Done.
4274 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
4275 clientBox.move(-verticalScrollbarWidth(), 0);
4276 m_overflow = adoptPtr(new RenderOverflow(clientBox, borderBoxRect()));
4277 }
4278 m_overflow->addContentsVisualOverflow(rect); 4274 m_overflow->addContentsVisualOverflow(rect);
4279 } 4275 }
4280 4276
4281 void RenderBox::clearLayoutOverflow() 4277 void RenderBox::clearLayoutOverflow()
4282 { 4278 {
4283 if (!m_overflow) 4279 if (!m_overflow)
4284 return; 4280 return;
4285 4281
4286 if (!hasVisualOverflow() && contentsVisualOverflowRect().isEmpty()) { 4282 if (!hasVisualOverflow() && contentsVisualOverflowRect().isEmpty()) {
4287 m_overflow.clear(); 4283 m_overflow.clear();
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
4678 return 0; 4674 return 0;
4679 4675
4680 if (!layoutState && !flowThreadContainingBlock()) 4676 if (!layoutState && !flowThreadContainingBlock())
4681 return 0; 4677 return 0;
4682 4678
4683 RenderBlock* containerBlock = containingBlock(); 4679 RenderBlock* containerBlock = containingBlock();
4684 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4680 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4685 } 4681 }
4686 4682
4687 } // namespace WebCore 4683 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698