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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 | 2759 |
2760 if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChil
dBlockBackground) | 2760 if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChil
dBlockBackground) |
2761 && visibleToHitTestRequest(request) | 2761 && visibleToHitTestRequest(request) |
2762 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { | 2762 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { |
2763 updateHitTestResult(result, locationInContainer.point() - localOffset); | 2763 updateHitTestResult(result, locationInContainer.point() - localOffset); |
2764 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. | 2764 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. |
2765 if (!result.addNodeToRectBasedTestResult(nodeForHitTest(), request, loca
tionInContainer)) | 2765 if (!result.addNodeToRectBasedTestResult(nodeForHitTest(), request, loca
tionInContainer)) |
2766 return true; | 2766 return true; |
2767 } | 2767 } |
2768 | 2768 |
| 2769 if (style()->clipPath()) { |
| 2770 switch (style()->clipPath()->type()) { |
| 2771 case ClipPathOperation::SHAPE: { |
| 2772 ShapeClipPathOperation* clipPath = toShapeClipPathOperation(style()-
>clipPath()); |
| 2773 // FIXME: handle marginBox etc. |
| 2774 if (!clipPath->path(borderBoxRect()).contains(locationInContainer.po
int() - localOffset, clipPath->windRule())) |
| 2775 return false; |
| 2776 break; |
| 2777 } |
| 2778 case ClipPathOperation::REFERENCE: |
| 2779 // FIXME: handle REFERENCE |
| 2780 break; |
| 2781 } |
| 2782 } |
| 2783 |
2769 // If we have clipping, then we can't have any spillout. | 2784 // If we have clipping, then we can't have any spillout. |
2770 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); | 2785 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); |
2771 bool useClip = (hasControlClip() || useOverflowClip); | 2786 bool useClip = (hasControlClip() || useOverflowClip); |
2772 bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.int
ersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(over
flowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); | 2787 bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.int
ersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(over
flowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); |
2773 if (checkChildren) { | 2788 if (checkChildren) { |
2774 // Hit test descendants first. | 2789 // Hit test descendants first. |
2775 LayoutSize scrolledOffset(localOffset); | 2790 LayoutSize scrolledOffset(localOffset); |
2776 if (hasOverflowClip()) | 2791 if (hasOverflowClip()) |
2777 scrolledOffset -= scrolledContentOffset(); | 2792 scrolledOffset -= scrolledContentOffset(); |
2778 | 2793 |
(...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4899 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4914 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
4900 { | 4915 { |
4901 showRenderObject(); | 4916 showRenderObject(); |
4902 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4917 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
4903 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4918 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
4904 } | 4919 } |
4905 | 4920 |
4906 #endif | 4921 #endif |
4907 | 4922 |
4908 } // namespace WebCore | 4923 } // namespace WebCore |
OLD | NEW |