| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 // Hit testing needs to walk in the backwards direction from paint. | 666 // Hit testing needs to walk in the backwards direction from paint. |
| 667 // Forward compare and then reverse instead of just reverse comparing | 667 // Forward compare and then reverse instead of just reverse comparing |
| 668 // so that elements with the same z-index are walked in reverse tree order. | 668 // so that elements with the same z-index are walked in reverse tree order. |
| 669 std::stable_sort(layers.begin(), layers.end(), forwardCompareZIndex); | 669 std::stable_sort(layers.begin(), layers.end(), forwardCompareZIndex); |
| 670 layers.reverse(); | 670 layers.reverse(); |
| 671 | 671 |
| 672 bool hitLayer = false; | 672 bool hitLayer = false; |
| 673 for (auto& currentLayer : layers) { | 673 for (auto& currentLayer : layers) { |
| 674 HitTestResult tempResult(result.hitTestLocation()); | 674 HitTestResult tempResult(result.hitTestLocation()); |
| 675 bool localHitLayer = currentLayer->hitTestLayer(rootLayer, layer(), requ
est, tempResult, | 675 bool localHitLayer = currentLayer->hitTestLayer(rootLayer, layer(), requ
est, tempResult, |
| 676 hitTestRect, hitTestLocation, localTransformState.get(), zOffsetForD
escendantsPtr); | 676 localHitTestRect, localHitTestLocation, localTransformState.get(), z
OffsetForDescendantsPtr); |
| 677 | 677 |
| 678 // If it a rect-based test, we can safely append the temporary result si
nce it might had hit | 678 // If it a rect-based test, we can safely append the temporary result si
nce it might had hit |
| 679 // nodes but not necesserily had hitLayer set. | 679 // nodes but not necesserily had hitLayer set. |
| 680 if (result.isRectBasedTest()) | 680 if (result.isRectBasedTest()) |
| 681 result.append(tempResult); | 681 result.append(tempResult); |
| 682 | 682 |
| 683 if (localHitLayer && isHitCandidate(depthSortDescendants, zOffset, unfla
ttenedTransformState.get())) { | 683 if (localHitLayer && isHitCandidate(depthSortDescendants, zOffset, unfla
ttenedTransformState.get())) { |
| 684 hitLayer = localHitLayer; | 684 hitLayer = localHitLayer; |
| 685 if (!result.isRectBasedTest()) | 685 if (!result.isRectBasedTest()) |
| 686 result = tempResult; | 686 result = tempResult; |
| (...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3072 | 3072 |
| 3073 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3073 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3074 { | 3074 { |
| 3075 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3075 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3076 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3076 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3077 ASSERT(hasBackground == style.hasBackground()); | 3077 ASSERT(hasBackground == style.hasBackground()); |
| 3078 hasBorder = style.hasBorder(); | 3078 hasBorder = style.hasBorder(); |
| 3079 } | 3079 } |
| 3080 | 3080 |
| 3081 } // namespace blink | 3081 } // namespace blink |
| OLD | NEW |