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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 } | 657 } |
658 view()->frameView()->setContentIsOpaque(isOpaqueRoot); | 658 view()->frameView()->setContentIsOpaque(isOpaqueRoot); |
659 } | 659 } |
660 | 660 |
661 // Paint the color first underneath all images, culled if background image o
ccludes it. | 661 // Paint the color first underneath all images, culled if background image o
ccludes it. |
662 // FIXME: In the bgLayer->hasFiniteBounds() case, we could improve the culli
ng test | 662 // FIXME: In the bgLayer->hasFiniteBounds() case, we could improve the culli
ng test |
663 // by verifying whether the background image covers the entire layout rect. | 663 // by verifying whether the background image covers the entire layout rect. |
664 if (!bgLayer->next()) { | 664 if (!bgLayer->next()) { |
665 IntRect backgroundRect(pixelSnappedIntRect(scrolledPaintRect)); | 665 IntRect backgroundRect(pixelSnappedIntRect(scrolledPaintRect)); |
666 bool boxShadowShouldBeAppliedToBackground = this->boxShadowShouldBeAppli
edToBackground(bleedAvoidance, box); | 666 bool boxShadowShouldBeAppliedToBackground = this->boxShadowShouldBeAppli
edToBackground(bleedAvoidance, box); |
667 if (boxShadowShouldBeAppliedToBackground || !shouldPaintBackgroundImage
|| !bgLayer->hasOpaqueImage(this) || !bgLayer->hasRepeatXY()) { | 667 if (boxShadowShouldBeAppliedToBackground || !shouldPaintBackgroundImage
|| !bgLayer->hasOpaqueImage(this) || !bgLayer->hasRepeatXY() || (isOpaqueRoot &&
!toRenderBox(this)->height())) { |
668 if (!boxShadowShouldBeAppliedToBackground) | 668 if (!boxShadowShouldBeAppliedToBackground) |
669 backgroundRect.intersect(paintInfo.rect); | 669 backgroundRect.intersect(paintInfo.rect); |
670 | 670 |
671 GraphicsContextStateSaver shadowStateSaver(*context, boxShadowShould
BeAppliedToBackground); | 671 GraphicsContextStateSaver shadowStateSaver(*context, boxShadowShould
BeAppliedToBackground); |
672 if (boxShadowShouldBeAppliedToBackground) | 672 if (boxShadowShouldBeAppliedToBackground) |
673 applyBoxShadowForBackground(context, this); | 673 applyBoxShadowForBackground(context, this); |
674 | 674 |
675 if (isOpaqueRoot) { | 675 if (isOpaqueRoot) { |
676 // If we have an alpha and we are painting the root element, go
ahead and blend with the base background color. | 676 // If we have an alpha and we are painting the root element, go
ahead and blend with the base background color. |
677 Color baseColor = view()->frameView()->baseBackgroundColor(); | 677 Color baseColor = view()->frameView()->baseBackgroundColor(); |
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2809 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2809 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
2810 for (RenderObject* child = startChild; child && child != endChild; ) { | 2810 for (RenderObject* child = startChild; child && child != endChild; ) { |
2811 // Save our next sibling as moveChildTo will clear it. | 2811 // Save our next sibling as moveChildTo will clear it. |
2812 RenderObject* nextSibling = child->nextSibling(); | 2812 RenderObject* nextSibling = child->nextSibling(); |
2813 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2813 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
2814 child = nextSibling; | 2814 child = nextSibling; |
2815 } | 2815 } |
2816 } | 2816 } |
2817 | 2817 |
2818 } // namespace WebCore | 2818 } // namespace WebCore |
OLD | NEW |