Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 return; | 290 return; |
| 291 widget->widgetPositionsUpdated(); | 291 widget->widgetPositionsUpdated(); |
| 292 } | 292 } |
| 293 | 293 |
| 294 bool LayoutPart::updateWidgetGeometry() | 294 bool LayoutPart::updateWidgetGeometry() |
| 295 { | 295 { |
| 296 Widget* widget = this->widget(); | 296 Widget* widget = this->widget(); |
| 297 ASSERT(widget); | 297 ASSERT(widget); |
| 298 | 298 |
| 299 LayoutRect contentBox = contentBoxRect(); | 299 LayoutRect contentBox = contentBoxRect(); |
| 300 LayoutRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(contentBox)).bou ndingBox()); | 300 LayoutRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(FloatRect(conten tBox))).boundingBox()); |
|
eae
2015/08/25 17:47:17
Might be easier to add a FloatQuad constructor tha
chrishtr
2015/08/25 18:30:44
I'd prefer not to, to make the performance more ob
| |
| 301 if (widget->isFrameView()) { | 301 if (widget->isFrameView()) { |
| 302 contentBox.setLocation(absoluteContentBox.location()); | 302 contentBox.setLocation(absoluteContentBox.location()); |
| 303 return setWidgetGeometry(contentBox); | 303 return setWidgetGeometry(contentBox); |
| 304 } | 304 } |
| 305 | 305 |
| 306 return setWidgetGeometry(absoluteContentBox); | 306 return setWidgetGeometry(absoluteContentBox); |
| 307 } | 307 } |
| 308 | 308 |
| 309 // Widgets are always placed on integer boundaries, so rounding the size is actu ally | 309 // Widgets are always placed on integer boundaries, so rounding the size is actu ally |
| 310 // the desired behavior. This function is here because it's otherwise seldom wha t we | 310 // the desired behavior. This function is here because it's otherwise seldom wha t we |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 338 if (widget() && widget()->isFrameView()) { | 338 if (widget() && widget()->isFrameView()) { |
| 339 FrameView* childFrameView = toFrameView(widget()); | 339 FrameView* childFrameView = toFrameView(widget()); |
| 340 PaintInvalidationState childViewPaintInvalidationState(*childFrameView-> layoutView(), paintInvalidationState); | 340 PaintInvalidationState childViewPaintInvalidationState(*childFrameView-> layoutView(), paintInvalidationState); |
| 341 toFrameView(widget())->invalidateTreeIfNeeded(childViewPaintInvalidation State); | 341 toFrameView(widget())->invalidateTreeIfNeeded(childViewPaintInvalidation State); |
| 342 } | 342 } |
| 343 | 343 |
| 344 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); | 344 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } | 347 } |
| OLD | NEW |