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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/EllipsisBox.cpp

Issue 1630793002: Stop hit testing culled inlines when a match is found (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simpler approach, but duplicated code Created 4 years, 10 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 // FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once 47 // FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once
48 // the transition to LayoutUnit-based types is complete (crbug.com/321237) 48 // the transition to LayoutUnit-based types is complete (crbug.com/321237)
49 LayoutPoint adjustedLocation = accumulatedOffset + topLeft(); 49 LayoutPoint adjustedLocation = accumulatedOffset + topLeft();
50 50
51 LayoutPoint boxOrigin = locationIncludingFlipping(); 51 LayoutPoint boxOrigin = locationIncludingFlipping();
52 boxOrigin.moveBy(accumulatedOffset); 52 boxOrigin.moveBy(accumulatedOffset);
53 LayoutRect boundsRect(boxOrigin, size()); 53 LayoutRect boundsRect(boxOrigin, size());
54 if (visibleToHitTestRequest(result.hitTestRequest()) && boundsRect.intersect s(LayoutRect(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0)))) { 54 if (visibleToHitTestRequest(result.hitTestRequest()) && boundsRect.intersect s(LayoutRect(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0)))) {
55 lineLayoutItem().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation)); 55 lineLayoutItem().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
56 // FIXME: the call to rawValue() below is temporary and should be remove d once the transition 56 if (result.addNodeToListBasedTestResult(lineLayoutItem().node(), locatio nInContainer, boundsRect) == StopHitTesting)
57 // to LayoutUnit-based types is complete (crbug.com/321237)
58 if (!result.addNodeToListBasedTestResult(lineLayoutItem().node(), locati onInContainer, boundsRect))
59 return true; 57 return true;
60 } 58 }
61 59
62 return false; 60 return false;
63 } 61 }
64 62
65 const char* EllipsisBox::boxName() const 63 const char* EllipsisBox::boxName() const
66 { 64 {
67 return "EllipsisBox"; 65 return "EllipsisBox";
68 } 66 }
69 67
70 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698