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. If iframe scrollbars needs reconstruction from native to custo
m | 312 // destroyed. |
313 // scrollbar, then also we need to layout the frameview. | 313 if (frameView && boundsWillChange && frameView->frame().page()) |
314 if (frameView && frameView->frame().page() && (boundsWillChange || frameView
->needsScrollbarReconstruction())) | |
315 frameView->setNeedsLayout(); | 314 frameView->setNeedsLayout(); |
316 | 315 |
317 updateWidgetGeometryInternal(); | 316 updateWidgetGeometryInternal(); |
318 | 317 |
319 // If view needs layout, either because bounds have changed or possibly | 318 // If view needs layout, either because bounds have changed or possibly |
320 // indicating content size is wrong, we have to do a layout to set the right | 319 // indicating content size is wrong, we have to do a layout to set the right |
321 // widget size. | 320 // widget size. |
322 if (frameView && frameView->needsLayout() && frameView->frame().page()) | 321 if (frameView && frameView->needsLayout() && frameView->frame().page()) |
323 frameView->layout(); | 322 frameView->layout(); |
324 | 323 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 370 |
372 bool LayoutPart::isThrottledFrameView() const | 371 bool LayoutPart::isThrottledFrameView() const |
373 { | 372 { |
374 if (!widget() || !widget()->isFrameView()) | 373 if (!widget() || !widget()->isFrameView()) |
375 return false; | 374 return false; |
376 const FrameView* frameView = toFrameView(widget()); | 375 const FrameView* frameView = toFrameView(widget()); |
377 return frameView->shouldThrottleRendering(); | 376 return frameView->shouldThrottleRendering(); |
378 } | 377 } |
379 | 378 |
380 } // namespace blink | 379 } // namespace blink |
OLD | NEW |