Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 240423005: [CSS Shapes] Can't select content within the area of the floating box when clip-path is applied (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // FIXME: handle REFERENCE
krit 2014/04/16 18:51:08 I would do a switch here to make sure you cover al
2770 if (style()->clipPath()->type() == 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()))
krit 2014/04/16 18:51:08 Not sure if that is a win here. What about checkin
2774 return false;
2775 }
2776 }
2777
2768 // If we have clipping, then we can't have any spillout. 2778 // If we have clipping, then we can't have any spillout.
2769 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); 2779 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
2770 bool useClip = (hasControlClip() || useOverflowClip); 2780 bool useClip = (hasControlClip() || useOverflowClip);
2771 bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.int ersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(over flowClipRect(adjustedLocation, IncludeOverlayScrollbarSize))); 2781 bool checkChildren = !useClip || (hasControlClip() ? locationInContainer.int ersects(controlClipRect(adjustedLocation)) : locationInContainer.intersects(over flowClipRect(adjustedLocation, IncludeOverlayScrollbarSize)));
2772 if (checkChildren) { 2782 if (checkChildren) {
2773 // Hit test descendants first. 2783 // Hit test descendants first.
2774 LayoutSize scrolledOffset(localOffset); 2784 LayoutSize scrolledOffset(localOffset);
2775 if (hasOverflowClip()) 2785 if (hasOverflowClip())
2776 scrolledOffset -= scrolledContentOffset(); 2786 scrolledOffset -= scrolledContentOffset();
2777 2787
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
4907 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 4917 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
4908 { 4918 {
4909 showRenderObject(); 4919 showRenderObject();
4910 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 4920 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
4911 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 4921 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
4912 } 4922 }
4913 4923
4914 #endif 4924 #endif
4915 4925
4916 } // namespace WebCore 4926 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698