| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 } | 217 } |
| 218 | 218 |
| 219 void RenderPart::layout() | 219 void RenderPart::layout() |
| 220 { | 220 { |
| 221 ASSERT(needsLayout()); | 221 ASSERT(needsLayout()); |
| 222 | 222 |
| 223 clearNeedsLayout(); | 223 clearNeedsLayout(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 // FIXME: factor into PartPainter. |
| 226 void RenderPart::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | 227 void RenderPart::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
| 227 { | 228 { |
| 228 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); | 229 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this); |
| 229 | 230 |
| 230 if (!shouldPaint(paintInfo, paintOffset)) | 231 if (!shouldPaint(paintInfo, paintOffset)) |
| 231 return; | 232 return; |
| 232 | 233 |
| 233 LayoutPoint adjustedPaintOffset = paintOffset + location(); | 234 LayoutPoint adjustedPaintOffset = paintOffset + location(); |
| 234 | 235 |
| 235 if (hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground
|| paintInfo.phase == PaintPhaseSelection)) | 236 if (hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground
|| paintInfo.phase == PaintPhaseSelection)) |
| 236 paintBoxDecorationBackground(paintInfo, adjustedPaintOffset); | 237 paintBoxDecorationBackground(paintInfo, adjustedPaintOffset); |
| 237 | 238 |
| 238 if (paintInfo.phase == PaintPhaseMask) { | 239 if (paintInfo.phase == PaintPhaseMask) { |
| 239 paintMask(paintInfo, adjustedPaintOffset); | 240 paintMask(paintInfo, adjustedPaintOffset); |
| 240 return; | 241 return; |
| 241 } | 242 } |
| 242 | 243 |
| 243 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe
lfOutline) && style()->hasOutline()) | 244 if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSe
lfOutline) && style()->hasOutline()) |
| 244 paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size())); | 245 ObjectPainter(*this).paintOutline(paintInfo, LayoutRect(adjustedPaintOff
set, size())); |
| 245 | 246 |
| 246 if (paintInfo.phase != PaintPhaseForeground) | 247 if (paintInfo.phase != PaintPhaseForeground) |
| 247 return; | 248 return; |
| 248 | 249 |
| 249 if (style()->hasBorderRadius()) { | 250 if (style()->hasBorderRadius()) { |
| 250 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size()); | 251 LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size()); |
| 251 | 252 |
| 252 if (borderRect.isEmpty()) | 253 if (borderRect.isEmpty()) |
| 253 return; | 254 return; |
| 254 | 255 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 if (widget->frameRect() == newFrame) | 396 if (widget->frameRect() == newFrame) |
| 396 return false; | 397 return false; |
| 397 | 398 |
| 398 RefPtrWillBeRawPtr<RenderPart> protector(this); | 399 RefPtrWillBeRawPtr<RenderPart> protector(this); |
| 399 RefPtrWillBeRawPtr<Node> protectedNode(node()); | 400 RefPtrWillBeRawPtr<Node> protectedNode(node()); |
| 400 widget->setFrameRect(newFrame); | 401 widget->setFrameRect(newFrame); |
| 401 return widget->frameRect().size() != newFrame.size(); | 402 return widget->frameRect().size() != newFrame.size(); |
| 402 } | 403 } |
| 403 | 404 |
| 404 } | 405 } |
| OLD | NEW |