| 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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1989 | 1989 |
| 1990 LayoutPoint offsetToRootLayer; | 1990 LayoutPoint offsetToRootLayer; |
| 1991 if (rootLayer) | 1991 if (rootLayer) |
| 1992 convertToLayerCoords(rootLayer, offsetToRootLayer); | 1992 convertToLayerCoords(rootLayer, offsetToRootLayer); |
| 1993 LayoutRect rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndSta
ckingChildren(offsetToRootLayer); | 1993 LayoutRect rootRelativeBounds = physicalBoundingBoxIncludingReflectionAndSta
ckingChildren(offsetToRootLayer); |
| 1994 | 1994 |
| 1995 ClipPathOperation* clipPathOperation = layoutObject()->style()->clipPath(); | 1995 ClipPathOperation* clipPathOperation = layoutObject()->style()->clipPath(); |
| 1996 ASSERT(clipPathOperation); | 1996 ASSERT(clipPathOperation); |
| 1997 if (clipPathOperation->type() == ClipPathOperation::SHAPE) { | 1997 if (clipPathOperation->type() == ClipPathOperation::SHAPE) { |
| 1998 ShapeClipPathOperation* clipPath = toShapeClipPathOperation(clipPathOper
ation); | 1998 ShapeClipPathOperation* clipPath = toShapeClipPathOperation(clipPathOper
ation); |
| 1999 if (!clipPath->path(FloatRect(rootRelativeBounds)).contains(FloatPoint(h
itTestLocation.point()), clipPath->windRule())) | 1999 if (!clipPath->path(FloatRect(rootRelativeBounds)).contains(FloatPoint(h
itTestLocation.point()))) |
| 2000 return true; | 2000 return true; |
| 2001 } else { | 2001 } else { |
| 2002 ASSERT(clipPathOperation->type() == ClipPathOperation::REFERENCE); | 2002 ASSERT(clipPathOperation->type() == ClipPathOperation::REFERENCE); |
| 2003 ReferenceClipPathOperation* referenceClipPathOperation = toReferenceClip
PathOperation(clipPathOperation); | 2003 ReferenceClipPathOperation* referenceClipPathOperation = toReferenceClip
PathOperation(clipPathOperation); |
| 2004 Element* element = layoutObject()->document().getElementById(referenceCl
ipPathOperation->fragment()); | 2004 Element* element = layoutObject()->document().getElementById(referenceCl
ipPathOperation->fragment()); |
| 2005 if (isSVGClipPathElement(element) && element->layoutObject()) { | 2005 if (isSVGClipPathElement(element) && element->layoutObject()) { |
| 2006 LayoutSVGResourceClipper* clipper = toLayoutSVGResourceClipper(toLay
outSVGResourceContainer(element->layoutObject())); | 2006 LayoutSVGResourceClipper* clipper = toLayoutSVGResourceClipper(toLay
outSVGResourceContainer(element->layoutObject())); |
| 2007 if (!clipper->hitTestClipContent(FloatRect(rootRelativeBounds), Floa
tPoint(hitTestLocation.point()))) | 2007 if (!clipper->hitTestClipContent(FloatRect(rootRelativeBounds), Floa
tPoint(hitTestLocation.point()))) |
| 2008 return true; | 2008 return true; |
| 2009 } | 2009 } |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2830 | 2830 |
| 2831 void showLayerTree(const blink::LayoutObject* layoutObject) | 2831 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2832 { | 2832 { |
| 2833 if (!layoutObject) { | 2833 if (!layoutObject) { |
| 2834 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2834 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2835 return; | 2835 return; |
| 2836 } | 2836 } |
| 2837 showLayerTree(layoutObject->enclosingLayer()); | 2837 showLayerTree(layoutObject->enclosingLayer()); |
| 2838 } | 2838 } |
| 2839 #endif | 2839 #endif |
| OLD | NEW |