Chromium Code Reviews| 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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 916 | 916 |
| 917 void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint Offset) | 917 void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint Offset) |
| 918 { | 918 { |
| 919 // FIXME(sky): Remove | 919 // FIXME(sky): Remove |
| 920 } | 920 } |
| 921 | 921 |
| 922 void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& pa intRect) | 922 void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& pa intRect) |
| 923 { | 923 { |
| 924 // Figure out if we need to push a transparency layer to render our mask. | 924 // Figure out if we need to push a transparency layer to render our mask. |
| 925 bool pushTransparencyLayer = false; | 925 bool pushTransparencyLayer = false; |
| 926 bool compositedMask = hasLayer() && layer()->hasCompositedMask(); | |
| 927 bool flattenCompositingLayers = view()->frameView() && view()->frameView()-> paintBehavior() & PaintBehaviorFlattenCompositingLayers; | 926 bool flattenCompositingLayers = view()->frameView() && view()->frameView()-> paintBehavior() & PaintBehaviorFlattenCompositingLayers; |
|
ojan
2014/11/29 01:48:15
FWIW, I would guess that a lot of these PaintBehav
ojan
2014/11/29 01:48:15
FWIW, I would guess that a lot of these PaintBehav
| |
| 928 CompositeOperator compositeOp = CompositeSourceOver; | 927 CompositeOperator compositeOp = CompositeSourceOver; |
| 929 | 928 |
| 930 bool allMaskImagesLoaded = true; | 929 bool allMaskImagesLoaded = true; |
| 931 | 930 |
| 932 if (!compositedMask || flattenCompositingLayers) { | 931 if (flattenCompositingLayers) { |
| 933 pushTransparencyLayer = true; | 932 pushTransparencyLayer = true; |
| 934 StyleImage* maskBoxImage = style()->maskBoxImage().image(); | 933 StyleImage* maskBoxImage = style()->maskBoxImage().image(); |
| 935 const FillLayer& maskLayers = style()->maskLayers(); | 934 const FillLayer& maskLayers = style()->maskLayers(); |
| 936 | 935 |
| 937 // Don't render a masked element until all the mask images have loaded, to prevent a flash of unmasked content. | 936 // Don't render a masked element until all the mask images have loaded, to prevent a flash of unmasked content. |
| 938 if (maskBoxImage) | 937 if (maskBoxImage) |
| 939 allMaskImagesLoaded &= maskBoxImage->isLoaded(); | 938 allMaskImagesLoaded &= maskBoxImage->isLoaded(); |
| 940 | 939 |
| 941 allMaskImagesLoaded &= maskLayers.imagesAreLoaded(); | 940 allMaskImagesLoaded &= maskLayers.imagesAreLoaded(); |
| 942 | 941 |
| (...skipping 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3489 | 3488 |
| 3490 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3489 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3491 { | 3490 { |
| 3492 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3491 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3493 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3492 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3494 ASSERT(hasBackground == style.hasBackground()); | 3493 ASSERT(hasBackground == style.hasBackground()); |
| 3495 hasBorder = style.hasBorder(); | 3494 hasBorder = style.hasBorder(); |
| 3496 } | 3495 } |
| 3497 | 3496 |
| 3498 } // namespace blink | 3497 } // namespace blink |
| OLD | NEW |