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. | 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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 } | 1326 } |
1327 | 1327 |
1328 void LayoutBox::setExtraBlockOffset(LayoutUnit blockOffest) { | 1328 void LayoutBox::setExtraBlockOffset(LayoutUnit blockOffest) { |
1329 if (!gExtraBlockOffsetMap) | 1329 if (!gExtraBlockOffsetMap) |
1330 gExtraBlockOffsetMap = new OverrideSizeMap; | 1330 gExtraBlockOffsetMap = new OverrideSizeMap; |
1331 gExtraBlockOffsetMap->set(this, blockOffest); | 1331 gExtraBlockOffsetMap->set(this, blockOffest); |
1332 } | 1332 } |
1333 | 1333 |
1334 void LayoutBox::clearExtraInlineAndBlockOffests() { | 1334 void LayoutBox::clearExtraInlineAndBlockOffests() { |
1335 if (gExtraInlineOffsetMap) | 1335 if (gExtraInlineOffsetMap) |
1336 gExtraInlineOffsetMap->remove(this); | 1336 gExtraInlineOffsetMap->erase(this); |
1337 if (gExtraBlockOffsetMap) | 1337 if (gExtraBlockOffsetMap) |
1338 gExtraBlockOffsetMap->remove(this); | 1338 gExtraBlockOffsetMap->erase(this); |
1339 } | 1339 } |
1340 | 1340 |
1341 LayoutUnit LayoutBox::adjustBorderBoxLogicalWidthForBoxSizing( | 1341 LayoutUnit LayoutBox::adjustBorderBoxLogicalWidthForBoxSizing( |
1342 float width) const { | 1342 float width) const { |
1343 LayoutUnit bordersPlusPadding = collapsedBorderAndCSSPaddingLogicalWidth(); | 1343 LayoutUnit bordersPlusPadding = collapsedBorderAndCSSPaddingLogicalWidth(); |
1344 LayoutUnit result(width); | 1344 LayoutUnit result(width); |
1345 if (style()->boxSizing() == EBoxSizing::kContentBox) | 1345 if (style()->boxSizing() == EBoxSizing::kContentBox) |
1346 return result + bordersPlusPadding; | 1346 return result + bordersPlusPadding; |
1347 return std::max(result, bordersPlusPadding); | 1347 return std::max(result, bordersPlusPadding); |
1348 } | 1348 } |
(...skipping 4345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5694 block->adjustChildDebugRect(rect); | 5694 block->adjustChildDebugRect(rect); |
5695 | 5695 |
5696 return rect; | 5696 return rect; |
5697 } | 5697 } |
5698 | 5698 |
5699 bool LayoutBox::shouldClipOverflow() const { | 5699 bool LayoutBox::shouldClipOverflow() const { |
5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); | 5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); |
5701 } | 5701 } |
5702 | 5702 |
5703 } // namespace blink | 5703 } // namespace blink |
OLD | NEW |