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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 264 |
265 // If our zoom factor changes and we have a defined scrollLeft/Top, we need to | 265 // If our zoom factor changes and we have a defined scrollLeft/Top, we need to |
266 // adjust that value into the new zoomed coordinate space. Note that the new | 266 // adjust that value into the new zoomed coordinate space. Note that the new |
267 // scroll offset may be outside the normal min/max range of the scrollable | 267 // scroll offset may be outside the normal min/max range of the scrollable |
268 // area, which is weird but OK, because the scrollable area will update its | 268 // area, which is weird but OK, because the scrollable area will update its |
269 // min/max in updateAfterLayout(). | 269 // min/max in updateAfterLayout(). |
270 if (hasOverflowClip() && oldStyle && | 270 if (hasOverflowClip() && oldStyle && |
271 oldStyle->effectiveZoom() != newStyle.effectiveZoom()) { | 271 oldStyle->effectiveZoom() != newStyle.effectiveZoom()) { |
272 PaintLayerScrollableArea* scrollableArea = this->getScrollableArea(); | 272 PaintLayerScrollableArea* scrollableArea = this->getScrollableArea(); |
273 ASSERT(scrollableArea); | 273 ASSERT(scrollableArea); |
274 // We use scrollOffset() rather than scrollPosition(), because scrollOffset
is the distance | 274 // We use scrollOffset() rather than scrollPosition(), because scrollOffset |
275 // from the beginning of flow for the box, which is the dimension we want to
preserve. | 275 // is the distance from the beginning of flow for the box, which is the |
| 276 // dimension we want to preserve. |
276 ScrollOffset oldOffset = scrollableArea->scrollOffset(); | 277 ScrollOffset oldOffset = scrollableArea->scrollOffset(); |
277 if (oldOffset.width() || oldOffset.height()) { | 278 if (oldOffset.width() || oldOffset.height()) { |
278 ScrollOffset newOffset = oldOffset.scaledBy(newStyle.effectiveZoom() / | 279 ScrollOffset newOffset = oldOffset.scaledBy(newStyle.effectiveZoom() / |
279 oldStyle->effectiveZoom()); | 280 oldStyle->effectiveZoom()); |
280 scrollableArea->setScrollOffsetUnconditionally(newOffset); | 281 scrollableArea->setScrollOffsetUnconditionally(newOffset); |
281 } | 282 } |
282 } | 283 } |
283 | 284 |
284 // Our opaqueness might have changed without triggering layout. | 285 // Our opaqueness might have changed without triggering layout. |
285 if (diff.needsPaintInvalidation()) { | 286 if (diff.needsPaintInvalidation()) { |
(...skipping 5327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5613 LayoutRect rect = frameRect(); | 5614 LayoutRect rect = frameRect(); |
5614 | 5615 |
5615 LayoutBlock* block = containingBlock(); | 5616 LayoutBlock* block = containingBlock(); |
5616 if (block) | 5617 if (block) |
5617 block->adjustChildDebugRect(rect); | 5618 block->adjustChildDebugRect(rect); |
5618 | 5619 |
5619 return rect; | 5620 return rect; |
5620 } | 5621 } |
5621 | 5622 |
5622 } // namespace blink | 5623 } // namespace blink |
OLD | NEW |