| 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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (floatType != FloatingObject::FloatLeftRight) { | 200 if (floatType != FloatingObject::FloatLeftRight) { |
| 201 if (hasLowestFloatLogicalBottomCached(isInHorizontalWritingMode, floatTy
pe)) | 201 if (hasLowestFloatLogicalBottomCached(isInHorizontalWritingMode, floatTy
pe)) |
| 202 return getCachedlowestFloatLogicalBottom(floatType); | 202 return getCachedlowestFloatLogicalBottom(floatType); |
| 203 } else { | 203 } else { |
| 204 if (hasLowestFloatLogicalBottomCached(isInHorizontalWritingMode, Floatin
gObject::FloatLeft) && hasLowestFloatLogicalBottomCached(isInHorizontalWritingMo
de, FloatingObject::FloatRight)) { | 204 if (hasLowestFloatLogicalBottomCached(isInHorizontalWritingMode, Floatin
gObject::FloatLeft) && hasLowestFloatLogicalBottomCached(isInHorizontalWritingMo
de, FloatingObject::FloatRight)) { |
| 205 return std::max(getCachedlowestFloatLogicalBottom(FloatingObject::Fl
oatLeft), | 205 return std::max(getCachedlowestFloatLogicalBottom(FloatingObject::Fl
oatLeft), |
| 206 getCachedlowestFloatLogicalBottom(FloatingObject::FloatRight)); | 206 getCachedlowestFloatLogicalBottom(FloatingObject::FloatRight)); |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 LayoutUnit lowestFloatBottom = 0; | 210 LayoutUnit lowestFloatBottom; |
| 211 const FloatingObjectSet& floatingObjectSet = set(); | 211 const FloatingObjectSet& floatingObjectSet = set(); |
| 212 FloatingObjectSetIterator end = floatingObjectSet.end(); | 212 FloatingObjectSetIterator end = floatingObjectSet.end(); |
| 213 if (floatType == FloatingObject::FloatLeftRight) { | 213 if (floatType == FloatingObject::FloatLeftRight) { |
| 214 FloatingObject* lowestFloatingObjectLeft = nullptr; | 214 FloatingObject* lowestFloatingObjectLeft = nullptr; |
| 215 FloatingObject* lowestFloatingObjectRight = nullptr; | 215 FloatingObject* lowestFloatingObjectRight = nullptr; |
| 216 LayoutUnit lowestFloatBottomLeft = 0; | 216 LayoutUnit lowestFloatBottomLeft; |
| 217 LayoutUnit lowestFloatBottomRight = 0; | 217 LayoutUnit lowestFloatBottomRight; |
| 218 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end
; ++it) { | 218 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end
; ++it) { |
| 219 FloatingObject& floatingObject = *it->get(); | 219 FloatingObject& floatingObject = *it->get(); |
| 220 if (floatingObject.isPlaced()) { | 220 if (floatingObject.isPlaced()) { |
| 221 FloatingObject::Type curType = floatingObject.type(); | 221 FloatingObject::Type curType = floatingObject.type(); |
| 222 LayoutUnit curFloatLogicalBottom = m_layoutObject->logicalBottom
ForFloat(floatingObject); | 222 LayoutUnit curFloatLogicalBottom = m_layoutObject->logicalBottom
ForFloat(floatingObject); |
| 223 if (curType & FloatingObject::FloatLeft && curFloatLogicalBottom
> lowestFloatBottomLeft) { | 223 if (curType & FloatingObject::FloatLeft && curFloatLogicalBottom
> lowestFloatBottomLeft) { |
| 224 lowestFloatBottomLeft = curFloatLogicalBottom; | 224 lowestFloatBottomLeft = curFloatLogicalBottom; |
| 225 lowestFloatingObjectLeft = &floatingObject; | 225 lowestFloatingObjectLeft = &floatingObject; |
| 226 } | 226 } |
| 227 if (curType & FloatingObject::FloatRight && curFloatLogicalBotto
m > lowestFloatBottomRight) { | 227 if (curType & FloatingObject::FloatRight && curFloatLogicalBotto
m > lowestFloatBottomRight) { |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 } | 554 } |
| 555 | 555 |
| 556 String ValueToString<FloatingObject*>::string(const FloatingObject* floatingObje
ct) | 556 String ValueToString<FloatingObject*>::string(const FloatingObject* floatingObje
ct) |
| 557 { | 557 { |
| 558 return String::format("%p (%gx%g %gx%g)", floatingObject, floatingObject->fr
ameRect().x().toFloat(), floatingObject->frameRect().y().toFloat(), floatingObje
ct->frameRect().maxX().toFloat(), floatingObject->frameRect().maxY().toFloat()); | 558 return String::format("%p (%gx%g %gx%g)", floatingObject, floatingObject->fr
ameRect().x().toFloat(), floatingObject->frameRect().y().toFloat(), floatingObje
ct->frameRect().maxX().toFloat(), floatingObject->frameRect().maxY().toFloat()); |
| 559 } | 559 } |
| 560 #endif | 560 #endif |
| 561 | 561 |
| 562 | 562 |
| 563 } // namespace blink | 563 } // namespace blink |
| OLD | NEW |