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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 return false; | 342 return false; |
343 | 343 |
344 RefPtr<LayoutPart> protector(this); | 344 RefPtr<LayoutPart> protector(this); |
345 RefPtrWillBeRawPtr<Node> protectedNode(node()); | 345 RefPtrWillBeRawPtr<Node> protectedNode(node()); |
346 widget->setFrameRect(newFrame); | 346 widget->setFrameRect(newFrame); |
347 return widget->frameRect().size() != newFrame.size(); | 347 return widget->frameRect().size() != newFrame.size(); |
348 } | 348 } |
349 | 349 |
350 void LayoutPart::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
paintInvalidationState) | 350 void LayoutPart::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
paintInvalidationState) |
351 { | 351 { |
352 if (widget() && widget()->isFrameView()) { | 352 if (widget() && widget()->isFrameView() && !isThrottledFrameView()) { |
353 FrameView* childFrameView = toFrameView(widget()); | 353 FrameView* childFrameView = toFrameView(widget()); |
354 // |childFrameView| is in another document, which could be | 354 // |childFrameView| is in another document, which could be |
355 // missing its LayoutView. TODO(jchaffraix): Ideally we should | 355 // missing its LayoutView. TODO(jchaffraix): Ideally we should |
356 // not need this code. | 356 // not need this code. |
357 if (LayoutView* childLayoutView = childFrameView->layoutView()) { | 357 if (LayoutView* childLayoutView = childFrameView->layoutView()) { |
358 PaintInvalidationState childViewPaintInvalidationState(*childLayoutV
iew, paintInvalidationState); | 358 PaintInvalidationState childViewPaintInvalidationState(paintInvalida
tionState, *childLayoutView); |
359 childFrameView->invalidateTreeIfNeeded(childViewPaintInvalidationSta
te); | 359 childFrameView->invalidateTreeIfNeeded(childViewPaintInvalidationSta
te); |
360 } | 360 } |
361 } | 361 } |
362 | 362 |
363 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); | 363 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); |
364 } | 364 } |
365 | 365 |
366 bool LayoutPart::isThrottledFrameView() const | 366 bool LayoutPart::isThrottledFrameView() const |
367 { | 367 { |
368 if (!widget() || !widget()->isFrameView()) | 368 if (!widget() || !widget()->isFrameView()) |
369 return false; | 369 return false; |
370 const FrameView* frameView = toFrameView(widget()); | 370 const FrameView* frameView = toFrameView(widget()); |
371 return frameView->shouldThrottleRendering(); | 371 return frameView->shouldThrottleRendering(); |
372 } | 372 } |
373 | 373 |
374 } // namespace blink | 374 } // namespace blink |
OLD | NEW |