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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 if (!colorVisible) | 704 if (!colorVisible) |
705 return; | 705 return; |
706 | 706 |
707 bool boxShadowShouldBeAppliedToBackground = this->boxShadowShouldBeAppli
edToBackground(bleedAvoidance, box); | 707 bool boxShadowShouldBeAppliedToBackground = this->boxShadowShouldBeAppli
edToBackground(bleedAvoidance, box); |
708 GraphicsContextStateSaver shadowStateSaver(*context, boxShadowShouldBeAp
pliedToBackground); | 708 GraphicsContextStateSaver shadowStateSaver(*context, boxShadowShouldBeAp
pliedToBackground); |
709 if (boxShadowShouldBeAppliedToBackground) | 709 if (boxShadowShouldBeAppliedToBackground) |
710 applyBoxShadowForBackground(context, style()); | 710 applyBoxShadowForBackground(context, style()); |
711 | 711 |
712 if (hasRoundedBorder && bleedAvoidance != BackgroundBleedUseTransparency
Layer) { | 712 if (hasRoundedBorder && bleedAvoidance != BackgroundBleedUseTransparency
Layer) { |
713 RoundedRect border = backgroundRoundedRectAdjustedForBleedAvoidance(
context, rect, bleedAvoidance, box, boxSize, includeLeftEdge, includeRightEdge); | 713 RoundedRect border = backgroundRoundedRectAdjustedForBleedAvoidance(
context, rect, bleedAvoidance, box, boxSize, includeLeftEdge, includeRightEdge); |
714 context->fillRoundedRect(border, bgColor, style()->colorSpace()); | 714 if (border.isRenderable()) |
| 715 context->fillRoundedRect(border, bgColor, style()->colorSpace())
; |
| 716 else { |
| 717 context->save(); |
| 718 clipRoundedInnerRect(context, rect, border); |
| 719 context->fillRect(border.rect(), bgColor, style()->colorSpace())
; |
| 720 context->restore(); |
| 721 } |
715 } else | 722 } else |
716 context->fillRect(pixelSnappedIntRect(rect), bgColor, style()->color
Space()); | 723 context->fillRect(pixelSnappedIntRect(rect), bgColor, style()->color
Space()); |
717 | 724 |
718 return; | 725 return; |
719 } | 726 } |
720 | 727 |
721 // BorderFillBox radius clipping is taken care of by BackgroundBleedUseTrans
parencyLayer | 728 // BorderFillBox radius clipping is taken care of by BackgroundBleedUseTrans
parencyLayer |
722 bool clipToBorderRadius = hasRoundedBorder && !(isBorderFill && bleedAvoidan
ce == BackgroundBleedUseTransparencyLayer); | 729 bool clipToBorderRadius = hasRoundedBorder && !(isBorderFill && bleedAvoidan
ce == BackgroundBleedUseTransparencyLayer); |
723 GraphicsContextStateSaver clipToBorderStateSaver(*context, clipToBorderRadiu
s); | 730 GraphicsContextStateSaver clipToBorderStateSaver(*context, clipToBorderRadiu
s); |
724 if (clipToBorderRadius) { | 731 if (clipToBorderRadius) { |
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2787 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2781 for (RenderObject* child = startChild; child && child != endChild; ) { | 2788 for (RenderObject* child = startChild; child && child != endChild; ) { |
2782 // Save our next sibling as moveChildTo will clear it. | 2789 // Save our next sibling as moveChildTo will clear it. |
2783 RenderObject* nextSibling = child->nextSibling(); | 2790 RenderObject* nextSibling = child->nextSibling(); |
2784 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2791 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
2785 child = nextSibling; | 2792 child = nextSibling; |
2786 } | 2793 } |
2787 } | 2794 } |
2788 | 2795 |
2789 } // namespace WebCore | 2796 } // namespace WebCore |
OLD | NEW |