| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 localHitTestLocation = HitTestLocation(localPoint); | 630 localHitTestLocation = HitTestLocation(localPoint); |
| 631 | 631 |
| 632 // Now do a hit test with the root layer shifted to be us. | 632 // Now do a hit test with the root layer shifted to be us. |
| 633 rootLayer = layer(); | 633 rootLayer = layer(); |
| 634 } | 634 } |
| 635 | 635 |
| 636 // Ensure our lists and 3d status are up-to-date. | 636 // Ensure our lists and 3d status are up-to-date. |
| 637 layer()->stackingNode()->updateLayerListsIfNeeded(); | 637 layer()->stackingNode()->updateLayerListsIfNeeded(); |
| 638 layer()->update3DTransformedDescendantStatus(); | 638 layer()->update3DTransformedDescendantStatus(); |
| 639 | 639 |
| 640 // Check for hit test on backface if backface-visibility is 'hidden' | |
| 641 if (localTransformState && style()->backfaceVisibility() == BackfaceVisibili
tyHidden) { | |
| 642 TransformationMatrix invertedMatrix = localTransformState->m_accumulated
Transform.inverse(); | |
| 643 // If the z-vector of the matrix is negative, the back is facing towards
the viewer. | |
| 644 if (invertedMatrix.m33() < 0) | |
| 645 return 0; | |
| 646 } | |
| 647 | |
| 648 RefPtr<HitTestingTransformState> unflattenedTransformState = localTransformS
tate; | 640 RefPtr<HitTestingTransformState> unflattenedTransformState = localTransformS
tate; |
| 649 if (localTransformState && !style()->preserves3D()) { | 641 if (localTransformState && !style()->preserves3D()) { |
| 650 // Keep a copy of the pre-flattening state, for computing z-offsets for
the container | 642 // Keep a copy of the pre-flattening state, for computing z-offsets for
the container |
| 651 unflattenedTransformState = HitTestingTransformState::create(*localTrans
formState); | 643 unflattenedTransformState = HitTestingTransformState::create(*localTrans
formState); |
| 652 // This layer is flattening, so flatten the state passed to descendants. | 644 // This layer is flattening, so flatten the state passed to descendants. |
| 653 localTransformState->flatten(); | 645 localTransformState->flatten(); |
| 654 } | 646 } |
| 655 | 647 |
| 656 // The following are used for keeping track of the z-depth of the hit point
of 3d-transformed | 648 // The following are used for keeping track of the z-depth of the hit point
of 3d-transformed |
| 657 // descendants. | 649 // descendants. |
| (...skipping 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3070 | 3062 |
| 3071 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3063 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3072 { | 3064 { |
| 3073 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3065 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3074 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3066 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3075 ASSERT(hasBackground == style.hasBackground()); | 3067 ASSERT(hasBackground == style.hasBackground()); |
| 3076 hasBorder = style.hasBorder(); | 3068 hasBorder = style.hasBorder(); |
| 3077 } | 3069 } |
| 3078 | 3070 |
| 3079 } // namespace blink | 3071 } // namespace blink |
| OLD | NEW |