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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2780593002: Apply control clips in LayoutBox::clippingRect() (Closed)
Patch Set: none Created 3 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
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. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 IntSize result = 1143 IntSize result =
1144 scrollableArea->scrollOffsetInt() + originAdjustmentForScrollbars(); 1144 scrollableArea->scrollOffsetInt() + originAdjustmentForScrollbars();
1145 if (isHorizontalWritingMode() && 1145 if (isHorizontalWritingMode() &&
1146 shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) 1146 shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
1147 result.expand(-verticalScrollbarWidth(), 0); 1147 result.expand(-verticalScrollbarWidth(), 0);
1148 return result; 1148 return result;
1149 } 1149 }
1150 1150
1151 LayoutRect LayoutBox::clippingRect() const { 1151 LayoutRect LayoutBox::clippingRect() const {
1152 LayoutRect result = LayoutRect(LayoutRect::infiniteIntRect()); 1152 LayoutRect result = LayoutRect(LayoutRect::infiniteIntRect());
1153 if (hasOverflowClip() || style()->containsPaint()) 1153 if (shouldClipOverflow())
1154 result = overflowClipRect(LayoutPoint()); 1154 result = overflowClipRect(LayoutPoint());
1155 1155
1156 if (hasClip()) 1156 if (hasClip())
1157 result.intersect(clipRect(LayoutPoint())); 1157 result.intersect(clipRect(LayoutPoint()));
1158 1158
1159 return result; 1159 return result;
1160 } 1160 }
1161 1161
1162 bool LayoutBox::mapScrollingContentsRectToBoxSpace( 1162 bool LayoutBox::mapScrollingContentsRectToBoxSpace(
1163 TransformState& transformState, 1163 TransformState& transformState,
(...skipping 4589 matching lines...) Expand 10 before | Expand all | Expand 10 after
5753 5753
5754 void LayoutBox::MutableForPainting:: 5754 void LayoutBox::MutableForPainting::
5755 savePreviousContentBoxSizeAndLayoutOverflowRect() { 5755 savePreviousContentBoxSizeAndLayoutOverflowRect() {
5756 auto& rareData = layoutBox().ensureRareData(); 5756 auto& rareData = layoutBox().ensureRareData();
5757 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; 5757 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true;
5758 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); 5758 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size();
5759 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); 5759 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect();
5760 } 5760 }
5761 5761
5762 } // namespace blink 5762 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698