| 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, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 4750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4761 return true; | 4761 return true; |
| 4762 | 4762 |
| 4763 // If we don't have a background/border/mask, then nothing to do. | 4763 // If we don't have a background/border/mask, then nothing to do. |
| 4764 if (!hasBoxDecorationBackground()) | 4764 if (!hasBoxDecorationBackground()) |
| 4765 return false; | 4765 return false; |
| 4766 | 4766 |
| 4767 if (mustInvalidateFillLayersPaintOnWidthChange(style()->backgroundLayers())) | 4767 if (mustInvalidateFillLayersPaintOnWidthChange(style()->backgroundLayers())) |
| 4768 return true; | 4768 return true; |
| 4769 | 4769 |
| 4770 // Our fill layers are ok. Let's check border. | 4770 // Our fill layers are ok. Let's check border. |
| 4771 if (style()->hasBorder() && canRenderBorderImage()) | 4771 if (style()->hasBorderDecoration() && canRenderBorderImage()) |
| 4772 return true; | 4772 return true; |
| 4773 | 4773 |
| 4774 return false; | 4774 return false; |
| 4775 } | 4775 } |
| 4776 | 4776 |
| 4777 bool LayoutBox::mustInvalidateBackgroundOrBorderPaintOnHeightChange() const | 4777 bool LayoutBox::mustInvalidateBackgroundOrBorderPaintOnHeightChange() const |
| 4778 { | 4778 { |
| 4779 if (hasMask() && mustInvalidateFillLayersPaintOnHeightChange(style()->maskLa
yers())) | 4779 if (hasMask() && mustInvalidateFillLayersPaintOnHeightChange(style()->maskLa
yers())) |
| 4780 return true; | 4780 return true; |
| 4781 | 4781 |
| 4782 // If we don't have a background/border/mask, then nothing to do. | 4782 // If we don't have a background/border/mask, then nothing to do. |
| 4783 if (!hasBoxDecorationBackground()) | 4783 if (!hasBoxDecorationBackground()) |
| 4784 return false; | 4784 return false; |
| 4785 | 4785 |
| 4786 if (mustInvalidateFillLayersPaintOnHeightChange(style()->backgroundLayers())
) | 4786 if (mustInvalidateFillLayersPaintOnHeightChange(style()->backgroundLayers())
) |
| 4787 return true; | 4787 return true; |
| 4788 | 4788 |
| 4789 // Our fill layers are ok. Let's check border. | 4789 // Our fill layers are ok. Let's check border. |
| 4790 if (style()->hasBorder() && canRenderBorderImage()) | 4790 if (style()->hasBorderDecoration() && canRenderBorderImage()) |
| 4791 return true; | 4791 return true; |
| 4792 | 4792 |
| 4793 return false; | 4793 return false; |
| 4794 } | 4794 } |
| 4795 | 4795 |
| 4796 bool LayoutBox::canRenderBorderImage() const | 4796 bool LayoutBox::canRenderBorderImage() const |
| 4797 { | 4797 { |
| 4798 if (!style()->hasBorder()) | 4798 if (!style()->hasBorderDecoration()) |
| 4799 return false; | 4799 return false; |
| 4800 | 4800 |
| 4801 StyleImage* borderImage = style()->borderImage().image(); | 4801 StyleImage* borderImage = style()->borderImage().image(); |
| 4802 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4802 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
| 4803 } | 4803 } |
| 4804 | 4804 |
| 4805 } // namespace blink | 4805 } // namespace blink |
| OLD | NEW |