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

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

Issue 10090001: Merge 112582 - REGRESSION (r110065-r110080): Content drawing outside overflow: hidden at ynet.co.il (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « LayoutTests/platform/wk2/Skipped ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * 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 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after
3715 childVisualOverflowRect.move(delta); 3715 childVisualOverflowRect.move(delta);
3716 addVisualOverflow(childVisualOverflowRect); 3716 addVisualOverflow(childVisualOverflowRect);
3717 } 3717 }
3718 3718
3719 void RenderBox::addLayoutOverflow(const LayoutRect& rect) 3719 void RenderBox::addLayoutOverflow(const LayoutRect& rect)
3720 { 3720 {
3721 LayoutRect clientBox = clientBoxRect(); 3721 LayoutRect clientBox = clientBoxRect();
3722 if (clientBox.contains(rect) || rect.isEmpty()) 3722 if (clientBox.contains(rect) || rect.isEmpty())
3723 return; 3723 return;
3724 3724
3725 // Lazily allocate our layer as we will need it to hold our scroll informati on
3726 // and for the clipping logic to work properly. Note that we *do* need a lay er
3727 // if we have some left overflow on an horizontal writing mode with ltr dire ction.
3728 if (hasOverflowClip())
3729 ensureLayer();
3730
3725 // For overflow clip objects, we don't want to propagate overflow into unrea chable areas. 3731 // For overflow clip objects, we don't want to propagate overflow into unrea chable areas.
3726 LayoutRect overflowRect(rect); 3732 LayoutRect overflowRect(rect);
3727 if (hasOverflowClip() || isRenderView()) { 3733 if (hasOverflowClip() || isRenderView()) {
3728 // Overflow is in the block's coordinate space and thus is flipped for h orizontal-bt and vertical-rl 3734 // Overflow is in the block's coordinate space and thus is flipped for h orizontal-bt and vertical-rl
3729 // writing modes. At this stage that is actually a simplification, sinc e we can treat horizontal-tb/bt as the same 3735 // writing modes. At this stage that is actually a simplification, sinc e we can treat horizontal-tb/bt as the same
3730 // and vertical-lr/rl as the same. 3736 // and vertical-lr/rl as the same.
3731 bool hasTopOverflow = !style()->isLeftToRightDirection() && !isHorizonta lWritingMode(); 3737 bool hasTopOverflow = !style()->isLeftToRightDirection() && !isHorizonta lWritingMode();
3732 bool hasLeftOverflow = !style()->isLeftToRightDirection() && isHorizonta lWritingMode(); 3738 bool hasLeftOverflow = !style()->isLeftToRightDirection() && isHorizonta lWritingMode();
3733 if (isFlexibleBox() && style()->isReverseFlexDirection()) { 3739 if (isFlexibleBox() && style()->isReverseFlexDirection()) {
3734 RenderFlexibleBox* flexibleBox = static_cast<RenderFlexibleBox*>(thi s); 3740 RenderFlexibleBox* flexibleBox = static_cast<RenderFlexibleBox*>(thi s);
(...skipping 14 matching lines...) Expand all
3749 3755
3750 // Now re-test with the adjusted rectangle and see if it has become unre achable or fully 3756 // Now re-test with the adjusted rectangle and see if it has become unre achable or fully
3751 // contained. 3757 // contained.
3752 if (clientBox.contains(overflowRect) || overflowRect.isEmpty()) 3758 if (clientBox.contains(overflowRect) || overflowRect.isEmpty())
3753 return; 3759 return;
3754 } 3760 }
3755 3761
3756 if (!m_overflow) 3762 if (!m_overflow)
3757 m_overflow = adoptPtr(new RenderOverflow(clientBox, borderBoxRect())); 3763 m_overflow = adoptPtr(new RenderOverflow(clientBox, borderBoxRect()));
3758 3764
3759 // Lazily allocate our layer as we will need it to hold our scroll informati on.
3760 if (hasOverflowClip())
3761 ensureLayer();
3762
3763 m_overflow->addLayoutOverflow(overflowRect); 3765 m_overflow->addLayoutOverflow(overflowRect);
3764 } 3766 }
3765 3767
3766 void RenderBox::addVisualOverflow(const LayoutRect& rect) 3768 void RenderBox::addVisualOverflow(const LayoutRect& rect)
3767 { 3769 {
3768 LayoutRect borderBox = borderBoxRect(); 3770 LayoutRect borderBox = borderBoxRect();
3769 if (borderBox.contains(rect) || rect.isEmpty()) 3771 if (borderBox.contains(rect) || rect.isEmpty())
3770 return; 3772 return;
3771 3773
3772 if (!m_overflow) 3774 if (!m_overflow)
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
4053 } 4055 }
4054 4056
4055 bool RenderBox::hasRelativeLogicalHeight() const 4057 bool RenderBox::hasRelativeLogicalHeight() const
4056 { 4058 {
4057 return style()->logicalHeight().isPercent() 4059 return style()->logicalHeight().isPercent()
4058 || style()->logicalMinHeight().isPercent() 4060 || style()->logicalMinHeight().isPercent()
4059 || style()->logicalMaxHeight().isPercent(); 4061 || style()->logicalMaxHeight().isPercent();
4060 } 4062 }
4061 4063
4062 } // namespace WebCore 4064 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/platform/wk2/Skipped ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698