| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 return; | 302 return; |
| 303 | 303 |
| 304 LayoutRect newFrame = replacedContentRect(); | 304 LayoutRect newFrame = replacedContentRect(); |
| 305 DCHECK(newFrame.size() == roundedIntSize(newFrame.size())); | 305 DCHECK(newFrame.size() == roundedIntSize(newFrame.size())); |
| 306 bool boundsWillChange = LayoutSize(widget->frameRect().size()) != newFrame.s
ize(); | 306 bool boundsWillChange = LayoutSize(widget->frameRect().size()) != newFrame.s
ize(); |
| 307 | 307 |
| 308 FrameView* frameView = widget->isFrameView() ? toFrameView(widget) : nullptr
; | 308 FrameView* frameView = widget->isFrameView() ? toFrameView(widget) : nullptr
; |
| 309 | 309 |
| 310 // If frame bounds are changing mark the view for layout. Also check the | 310 // If frame bounds are changing mark the view for layout. Also check the |
| 311 // frame's page to make sure that the frame isn't in the process of being | 311 // frame's page to make sure that the frame isn't in the process of being |
| 312 // destroyed. | 312 // destroyed. If iframe scrollbars needs reconstruction from native to custo
m |
| 313 if (frameView && boundsWillChange && frameView->frame().page()) | 313 // scrollbar, then also we need to layout the frameview. |
| 314 if (frameView && frameView->frame().page() && (boundsWillChange || frameView
->needsScrollbarReconstruction())) |
| 314 frameView->setNeedsLayout(); | 315 frameView->setNeedsLayout(); |
| 315 | 316 |
| 316 updateWidgetGeometryInternal(); | 317 updateWidgetGeometryInternal(); |
| 317 | 318 |
| 318 // If view needs layout, either because bounds have changed or possibly | 319 // If view needs layout, either because bounds have changed or possibly |
| 319 // indicating content size is wrong, we have to do a layout to set the right | 320 // indicating content size is wrong, we have to do a layout to set the right |
| 320 // widget size. | 321 // widget size. |
| 321 if (frameView && frameView->needsLayout() && frameView->frame().page()) | 322 if (frameView && frameView->needsLayout() && frameView->frame().page()) |
| 322 frameView->layout(); | 323 frameView->layout(); |
| 323 | 324 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 371 |
| 371 bool LayoutPart::isThrottledFrameView() const | 372 bool LayoutPart::isThrottledFrameView() const |
| 372 { | 373 { |
| 373 if (!widget() || !widget()->isFrameView()) | 374 if (!widget() || !widget()->isFrameView()) |
| 374 return false; | 375 return false; |
| 375 const FrameView* frameView = toFrameView(widget()); | 376 const FrameView* frameView = toFrameView(widget()); |
| 376 return frameView->shouldThrottleRendering(); | 377 return frameView->shouldThrottleRendering(); |
| 377 } | 378 } |
| 378 | 379 |
| 379 } // namespace blink | 380 } // namespace blink |
| OLD | NEW |