| 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 27 matching lines...) Expand all Loading... |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 RenderPart::RenderPart(Element* node) | 40 RenderPart::RenderPart(Element* node) |
| 41 : RenderWidget(node) | 41 : RenderWidget(node) |
| 42 { | 42 { |
| 43 setInline(false); | 43 setInline(false); |
| 44 } | 44 } |
| 45 | 45 |
| 46 RenderPart::~RenderPart() | 46 RenderPart::~RenderPart() |
| 47 { | 47 { |
| 48 clearWidget(); | |
| 49 } | 48 } |
| 50 | 49 |
| 51 void RenderPart::setWidget(PassRefPtr<Widget> widget) | 50 void RenderPart::attachWidget(Widget* widget) |
| 52 { | 51 { |
| 53 if (widget == this->widget()) | 52 RenderWidget::attachWidget(widget); |
| 54 return; | |
| 55 | |
| 56 RenderWidget::setWidget(widget); | |
| 57 | |
| 58 // make sure the scrollbars are set correctly for restore | |
| 59 // ### find better fix | |
| 60 viewCleared(); | 53 viewCleared(); |
| 61 } | 54 } |
| 62 | 55 |
| 56 void RenderPart::detachWidget(Widget* widget) |
| 57 { |
| 58 RenderWidget::detachWidget(widget); |
| 59 viewCleared(); |
| 60 } |
| 61 |
| 63 void RenderPart::viewCleared() | 62 void RenderPart::viewCleared() |
| 64 { | 63 { |
| 65 } | 64 } |
| 66 | 65 |
| 67 bool RenderPart::requiresLayer() const | 66 bool RenderPart::requiresLayer() const |
| 68 { | 67 { |
| 69 if (RenderWidget::requiresLayer()) | 68 if (RenderWidget::requiresLayer()) |
| 70 return true; | 69 return true; |
| 71 | 70 |
| 72 return requiresAcceleratedCompositing(); | 71 return requiresAcceleratedCompositing(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitT
estLocation.roundedPoint()); | 138 Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitT
estLocation.roundedPoint()); |
| 140 if (frameScrollbar) | 139 if (frameScrollbar) |
| 141 result.setScrollbar(frameScrollbar); | 140 result.setScrollbar(frameScrollbar); |
| 142 } | 141 } |
| 143 } | 142 } |
| 144 | 143 |
| 145 return RenderWidget::nodeAtPoint(request, result, locationInContainer, accum
ulatedOffset, action); | 144 return RenderWidget::nodeAtPoint(request, result, locationInContainer, accum
ulatedOffset, action); |
| 146 } | 145 } |
| 147 | 146 |
| 148 } | 147 } |
| OLD | NEW |