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 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2758 | 2758 |
2759 if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChil
dBlockBackground) | 2759 if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChil
dBlockBackground) |
2760 && visibleToHitTestRequest(request) | 2760 && visibleToHitTestRequest(request) |
2761 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { | 2761 && isPointInOverflowControl(result, locationInContainer.point(), adjuste
dLocation)) { |
2762 updateHitTestResult(result, locationInContainer.point() - localOffset); | 2762 updateHitTestResult(result, locationInContainer.point() - localOffset); |
2763 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. | 2763 // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet
. |
2764 if (!result.addNodeToRectBasedTestResult(nodeForHitTest(), request, loca
tionInContainer)) | 2764 if (!result.addNodeToRectBasedTestResult(nodeForHitTest(), request, loca
tionInContainer)) |
2765 return true; | 2765 return true; |
2766 } | 2766 } |
2767 | 2767 |
| 2768 if (style()->clipPath()) { |
| 2769 switch (style()->clipPath()->type()) { |
| 2770 case ClipPathOperation::SHAPE: { |
| 2771 ShapeClipPathOperation* clipPath = toShapeClipPathOperation(style()-
>clipPath()); |
| 2772 // FIXME: handle marginBox etc. |
| 2773 if (!clipPath->path(borderBoxRect()).contains(locationInContainer.po
int() - localOffset, clipPath->windRule())) |
| 2774 return false; |
| 2775 break; |
| 2776 } |
| 2777 case ClipPathOperation::REFERENCE: |
| 2778 // FIXME: handle REFERENCE |
| 2779 break; |
| 2780 } |
| 2781 } |
| 2782 |
2768 // If we have clipping, then we can't have any spillout. | 2783 // If we have clipping, then we can't have any spillout. |
2769 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); | 2784 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); |
2770 bool useClip = (hasControlClip() || useOverflowClip); | 2785 bool useClip = (hasControlClip() || useOverflowClip); |
2771 bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.int
ersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(over
flowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); | 2786 bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.int
ersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(over
flowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); |
2772 if (checkChildren) { | 2787 if (checkChildren) { |
2773 // Hit test descendants first. | 2788 // Hit test descendants first. |
2774 LayoutSize scrolledOffset(localOffset); | 2789 LayoutSize scrolledOffset(localOffset); |
2775 if (hasOverflowClip()) | 2790 if (hasOverflowClip()) |
2776 scrolledOffset -= scrolledContentOffset(); | 2791 scrolledOffset -= scrolledContentOffset(); |
2777 | 2792 |
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4907 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4922 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
4908 { | 4923 { |
4909 showRenderObject(); | 4924 showRenderObject(); |
4910 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4925 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
4911 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4926 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
4912 } | 4927 } |
4913 | 4928 |
4914 #endif | 4929 #endif |
4915 | 4930 |
4916 } // namespace WebCore | 4931 } // namespace WebCore |
OLD | NEW |