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

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

Issue 2750153002: getClientRects() shouldn't clip against any ancestors. (Closed)
Patch Set: Created 3 years, 9 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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 LayoutRect boundingRectInFlowThread(offsetFromFlowThread, 132 LayoutRect boundingRectInFlowThread(offsetFromFlowThread,
133 descendant.frameRect().size()); 133 descendant.frameRect().size());
134 // Set up a fragments relative to the descendant, in the flow thread 134 // Set up a fragments relative to the descendant, in the flow thread
135 // coordinate space, and convert each of them, individually, to absolute 135 // coordinate space, and convert each of them, individually, to absolute
136 // coordinates. 136 // coordinates.
137 for (FragmentainerIterator iterator(*this, boundingRectInFlowThread); 137 for (FragmentainerIterator iterator(*this, boundingRectInFlowThread);
138 !iterator.atEnd(); iterator.advance()) { 138 !iterator.atEnd(); iterator.advance()) {
139 LayoutRect fragment = boundingRectInFlowThread; 139 LayoutRect fragment = boundingRectInFlowThread;
140 // We use inclusiveIntersect() because intersect() would reset the 140 // We use inclusiveIntersect() because intersect() would reset the
141 // coordinates for zero-height objects. 141 // coordinates for zero-height objects.
142 fragment.inclusiveIntersect(iterator.fragmentainerInFlowThread()); 142 LayoutRect clipRect = iterator.clipRectInFlowThread(
143 MultiColumnFragmentainerGroup::BlockDirectionAxis);
144 fragment.inclusiveIntersect(clipRect);
143 fragment.moveBy(-offsetFromFlowThread); 145 fragment.moveBy(-offsetFromFlowThread);
144 quads.push_back(descendant.localToAbsoluteQuad(FloatRect(fragment), mode)); 146 quads.push_back(descendant.localToAbsoluteQuad(FloatRect(fragment), mode));
145 } 147 }
146 } 148 }
147 149
148 bool LayoutFlowThread::nodeAtPoint(HitTestResult& result, 150 bool LayoutFlowThread::nodeAtPoint(HitTestResult& result,
149 const HitTestLocation& locationInContainer, 151 const HitTestLocation& locationInContainer,
150 const LayoutPoint& accumulatedOffset, 152 const LayoutPoint& accumulatedOffset,
151 HitTestAction hitTestAction) { 153 HitTestAction hitTestAction) {
152 if (hitTestAction == HitTestBlockBackground) 154 if (hitTestAction == HitTestBlockBackground)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 234
233 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded( 235 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(
234 const MultiColumnSetInterval& interval) { 236 const MultiColumnSetInterval& interval) {
235 if (m_result) 237 if (m_result)
236 return; 238 return;
237 if (interval.low() <= m_offset && interval.high() > m_offset) 239 if (interval.low() <= m_offset && interval.high() > m_offset)
238 m_result = interval.data(); 240 m_result = interval.data();
239 } 241 }
240 242
241 } // namespace blink 243 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698