| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1425 m_reflectionInfo->updateAfterStyleChange(oldStyle); | 1425 m_reflectionInfo->updateAfterStyleChange(oldStyle); |
| 1426 } else if (m_reflectionInfo) { | 1426 } else if (m_reflectionInfo) { |
| 1427 m_reflectionInfo->destroy(); | 1427 m_reflectionInfo->destroy(); |
| 1428 m_reflectionInfo = nullptr; | 1428 m_reflectionInfo = nullptr; |
| 1429 } | 1429 } |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 void DeprecatedPaintLayer::updateStackingNode() | 1432 void DeprecatedPaintLayer::updateStackingNode() |
| 1433 { | 1433 { |
| 1434 if (requiresStackingNode()) | 1434 if (requiresStackingNode()) |
| 1435 m_stackingNode = adoptPtr(new DeprecatedPaintLayerStackingNode(this)); | 1435 m_stackingNode = adoptPtr(new DeprecatedPaintLayerStackingNode(*layoutOb
ject())); |
| 1436 else | 1436 else |
| 1437 m_stackingNode = nullptr; | 1437 m_stackingNode = nullptr; |
| 1438 } | 1438 } |
| 1439 | 1439 |
| 1440 void DeprecatedPaintLayer::updateScrollableArea() | 1440 void DeprecatedPaintLayer::updateScrollableArea() |
| 1441 { | 1441 { |
| 1442 if (requiresScrollableArea()) | 1442 if (requiresScrollableArea()) |
| 1443 m_scrollableArea = adoptPtr(new DeprecatedPaintLayerScrollableArea(*this
)); | 1443 m_scrollableArea = adoptPtr(new DeprecatedPaintLayerScrollableArea(*this
)); |
| 1444 else | 1444 else |
| 1445 m_scrollableArea = nullptr; | 1445 m_scrollableArea = nullptr; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 Node* DeprecatedPaintLayer::enclosingElement() const | 1599 Node* DeprecatedPaintLayer::enclosingElement() const |
| 1600 { | 1600 { |
| 1601 for (LayoutObject* r = layoutObject(); r; r = r->parent()) { | 1601 for (LayoutObject* r = layoutObject(); r; r = r->parent()) { |
| 1602 if (Node* e = r->node()) | 1602 if (Node* e = r->node()) |
| 1603 return e; | 1603 return e; |
| 1604 } | 1604 } |
| 1605 ASSERT_NOT_REACHED(); | 1605 ASSERT_NOT_REACHED(); |
| 1606 return 0; | 1606 return 0; |
| 1607 } | 1607 } |
| 1608 | 1608 |
| 1609 bool DeprecatedPaintLayer::isInTopLayer() const | |
| 1610 { | |
| 1611 Node* node = layoutObject()->node(); | |
| 1612 return node && node->isElementNode() && toElement(node)->isInTopLayer(); | |
| 1613 } | |
| 1614 | |
| 1615 // Compute the z-offset of the point in the transformState. | 1609 // Compute the z-offset of the point in the transformState. |
| 1616 // This is effectively projecting a ray normal to the plane of ancestor, finding
where that | 1610 // This is effectively projecting a ray normal to the plane of ancestor, finding
where that |
| 1617 // ray intersects target, and computing the z delta between those two points. | 1611 // ray intersects target, and computing the z delta between those two points. |
| 1618 static double computeZOffset(const HitTestingTransformState& transformState) | 1612 static double computeZOffset(const HitTestingTransformState& transformState) |
| 1619 { | 1613 { |
| 1620 // We got an affine transform, so no z-offset | 1614 // We got an affine transform, so no z-offset |
| 1621 if (transformState.m_accumulatedTransform.isAffine()) | 1615 if (transformState.m_accumulatedTransform.isAffine()) |
| 1622 return 0; | 1616 return 0; |
| 1623 | 1617 |
| 1624 // Flatten the point into the target plane | 1618 // Flatten the point into the target plane |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2740 | 2734 |
| 2741 void showLayerTree(const blink::LayoutObject* layoutObject) | 2735 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2742 { | 2736 { |
| 2743 if (!layoutObject) { | 2737 if (!layoutObject) { |
| 2744 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2738 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2745 return; | 2739 return; |
| 2746 } | 2740 } |
| 2747 showLayerTree(layoutObject->enclosingLayer()); | 2741 showLayerTree(layoutObject->enclosingLayer()); |
| 2748 } | 2742 } |
| 2749 #endif | 2743 #endif |
| OLD | NEW |