| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 if (localHitLayer && isHitCandidate(depthSortDescendants, zOffset, unfla
ttenedTransformState.get())) { | 680 if (localHitLayer && isHitCandidate(depthSortDescendants, zOffset, unfla
ttenedTransformState.get())) { |
| 681 hitLayer = localHitLayer; | 681 hitLayer = localHitLayer; |
| 682 if (!result.isRectBasedTest()) | 682 if (!result.isRectBasedTest()) |
| 683 result = tempResult; | 683 result = tempResult; |
| 684 if (!depthSortDescendants) | 684 if (!depthSortDescendants) |
| 685 return true; | 685 return true; |
| 686 } | 686 } |
| 687 } | 687 } |
| 688 | 688 |
| 689 LayoutRect layerBounds; | 689 LayoutRect layerBounds; |
| 690 // FIXME(sky): Remove foregroundRect. It's unused. | 690 ClipRect contentRect; |
| 691 ClipRect contentRect, foregroundRect; | |
| 692 ClipRectsContext clipRectsContext(rootLayer, RootRelativeClipRects); | 691 ClipRectsContext clipRectsContext(rootLayer, RootRelativeClipRects); |
| 693 layer()->clipper().calculateRects(clipRectsContext, localHitTestRect, layerB
ounds, contentRect, foregroundRect); | 692 layer()->clipper().calculateRects(clipRectsContext, localHitTestRect, layerB
ounds, contentRect); |
| 694 | 693 |
| 695 // Next we want to see if the mouse pos is inside the child RenderObjects of
the layer. | 694 // Next we want to see if the mouse pos is inside the child RenderObjects of
the layer. |
| 696 if (contentRect.intersects(localHitTestLocation)) { | 695 if (contentRect.intersects(localHitTestLocation)) { |
| 697 // Hit test with a temporary HitTestResult, because we only want to comm
it to 'result' if we know we're frontmost. | 696 // Hit test with a temporary HitTestResult, because we only want to comm
it to 'result' if we know we're frontmost. |
| 698 HitTestResult tempResult(result.hitTestLocation()); | 697 HitTestResult tempResult(result.hitTestLocation()); |
| 699 if (hitTestNonLayerDescendants(request, tempResult, layerBounds, localHi
tTestLocation) | 698 if (hitTestNonLayerDescendants(request, tempResult, layerBounds, localHi
tTestLocation) |
| 700 && isHitCandidate(false, zOffsetForContentsPtr, unflattenedTransform
State.get())) { | 699 && isHitCandidate(false, zOffsetForContentsPtr, unflattenedTransform
State.get())) { |
| 701 if (result.isRectBasedTest()) | 700 if (result.isRectBasedTest()) |
| 702 result.append(tempResult); | 701 result.append(tempResult); |
| 703 else | 702 else |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 { | 856 { |
| 858 float deviceScaleFactor = blink::deviceScaleFactor(frame()); | 857 float deviceScaleFactor = blink::deviceScaleFactor(frame()); |
| 859 context->setDeviceScaleFactor(deviceScaleFactor); | 858 context->setDeviceScaleFactor(deviceScaleFactor); |
| 860 | 859 |
| 861 LayoutPoint offsetFromRoot; | 860 LayoutPoint offsetFromRoot; |
| 862 layer()->convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot); | 861 layer()->convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot); |
| 863 | 862 |
| 864 LayerPaintingInfo localPaintingInfo(paintingInfo); | 863 LayerPaintingInfo localPaintingInfo(paintingInfo); |
| 865 | 864 |
| 866 LayoutRect layerBounds; | 865 LayoutRect layerBounds; |
| 867 // FIXME(sky): Remove foregroundRect. It's unused. | 866 ClipRect contentRect; |
| 868 ClipRect contentRect, foregroundRect; | |
| 869 ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipR
ects, localPaintingInfo.subPixelAccumulation); | 867 ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipR
ects, localPaintingInfo.subPixelAccumulation); |
| 870 layer()->clipper().calculateRects(clipRectsContext, localPaintingInfo.paintD
irtyRect, | 868 layer()->clipper().calculateRects(clipRectsContext, localPaintingInfo.paintD
irtyRect, |
| 871 layerBounds, contentRect, foregroundRect, | 869 layerBounds, contentRect, &offsetFromRoot); |
| 872 &offsetFromRoot); | |
| 873 | 870 |
| 874 if (!layer()->intersectsDamageRect(layerBounds, contentRect.rect(), localPai
ntingInfo.rootLayer, &offsetFromRoot)) | 871 if (!layer()->intersectsDamageRect(layerBounds, contentRect.rect(), localPai
ntingInfo.rootLayer, &offsetFromRoot)) |
| 875 return; | 872 return; |
| 876 | 873 |
| 877 LayoutRect rootRelativeBounds; | 874 LayoutRect rootRelativeBounds; |
| 878 bool rootRelativeBoundsComputed = false; | 875 bool rootRelativeBoundsComputed = false; |
| 879 | 876 |
| 880 // Apply clip-path to context. | 877 // Apply clip-path to context. |
| 881 GraphicsContextStateSaver clipStateSaver(*context, false); | 878 GraphicsContextStateSaver clipStateSaver(*context, false); |
| 882 | 879 |
| (...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3077 | 3074 |
| 3078 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3075 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3079 { | 3076 { |
| 3080 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3077 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3081 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3078 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3082 ASSERT(hasBackground == style.hasBackground()); | 3079 ASSERT(hasBackground == style.hasBackground()); |
| 3083 hasBorder = style.hasBorder(); | 3080 hasBorder = style.hasBorder(); |
| 3084 } | 3081 } |
| 3085 | 3082 |
| 3086 } // namespace blink | 3083 } // namespace blink |
| OLD | NEW |