OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 2494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2505 rectToClipOut.inflate(-1); | 2505 rectToClipOut.inflate(-1); |
2506 } | 2506 } |
2507 | 2507 |
2508 if (!rectToClipOut.isEmpty()) { | 2508 if (!rectToClipOut.isEmpty()) { |
2509 context->clipOut(rectToClipOut); | 2509 context->clipOut(rectToClipOut); |
2510 } | 2510 } |
2511 } | 2511 } |
2512 } | 2512 } |
2513 | 2513 |
2514 // Draw only the shadow. | 2514 // Draw only the shadow. |
2515 DrawLooper drawLooper; | 2515 DrawLooper::Builder drawLooperBuilder; |
2516 drawLooper.addShadow(shadowOffset, shadowBlur, shadowColor, | 2516 drawLooperBuilder.addShadow(shadowOffset, shadowBlur, shadowColor, |
2517 DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresA
lpha); | 2517 DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresA
lpha); |
2518 context->setDrawLooper(drawLooper); | 2518 context->setDrawLooper(*drawLooperBuilder.detachDrawLooper()); |
2519 | 2519 |
2520 if (hasBorderRadius) { | 2520 if (hasBorderRadius) { |
2521 RoundedRect influenceRect(pixelSnappedIntRect(LayoutRect(shadowR
ect)), border.radii()); | 2521 RoundedRect influenceRect(pixelSnappedIntRect(LayoutRect(shadowR
ect)), border.radii()); |
2522 influenceRect.expandRadii(2 * shadowBlur + shadowSpread); | 2522 influenceRect.expandRadii(2 * shadowBlur + shadowSpread); |
2523 if (allCornersClippedOut(influenceRect, info.rect)) | 2523 if (allCornersClippedOut(influenceRect, info.rect)) |
2524 context->fillRect(fillRect, Color::black); | 2524 context->fillRect(fillRect, Color::black); |
2525 else { | 2525 else { |
2526 // TODO: support non-integer shadows - crbug.com/334829 | 2526 // TODO: support non-integer shadows - crbug.com/334829 |
2527 RoundedRect roundedFillRect = border; | 2527 RoundedRect roundedFillRect = border; |
2528 roundedFillRect.inflate(shadowSpread); | 2528 roundedFillRect.inflate(shadowSpread); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2792 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2793 for (RenderObject* child = startChild; child && child != endChild; ) { | 2793 for (RenderObject* child = startChild; child && child != endChild; ) { |
2794 // Save our next sibling as moveChildTo will clear it. | 2794 // Save our next sibling as moveChildTo will clear it. |
2795 RenderObject* nextSibling = child->nextSibling(); | 2795 RenderObject* nextSibling = child->nextSibling(); |
2796 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2796 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
2797 child = nextSibling; | 2797 child = nextSibling; |
2798 } | 2798 } |
2799 } | 2799 } |
2800 | 2800 |
2801 } // namespace WebCore | 2801 } // namespace WebCore |
OLD | NEW |