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

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

Issue 1657483003: Add a border radius property to inherit it from a parent in a fallback content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L ayoutUnit /* lineBottom */) 220 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L ayoutUnit /* lineBottom */)
221 { 221 {
222 // Hit test all phases of replaced elements atomically, as though the replac ed element established its 222 // Hit test all phases of replaced elements atomically, as though the replac ed element established its
223 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab le elements in the CSS2.1 223 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab le elements in the CSS2.1
224 // specification.) 224 // specification.)
225 LayoutPoint childPoint = accumulatedOffset; 225 LayoutPoint childPoint = accumulatedOffset;
226 if (parent()->lineLayoutItem().hasFlippedBlocksWritingMode()) // Faster than calling containingBlock(). 226 if (parent()->lineLayoutItem().hasFlippedBlocksWritingMode()) // Faster than calling containingBlock().
227 childPoint = layoutObject().containingBlock()->flipForWritingModeForChil d(&toLayoutBox(layoutObject()), childPoint); 227 childPoint = layoutObject().containingBlock()->flipForWritingModeForChil d(&toLayoutBox(layoutObject()), childPoint);
228 228
229 bool inside = lineLayoutItem().hitTest(result, locationInContainer, childPoi nt);
pdr. 2016/01/31 21:32:36 The other nodeAtPoint functions follow a pattern w
Miyoung Shin(c) 2016/02/05 23:40:03 Your right. I found out we have only this issue wi
230
229 if (lineLayoutItem().style()->hasBorderRadius()) { 231 if (lineLayoutItem().style()->hasBorderRadius()) {
230 LayoutRect borderRect = logicalFrameRect(); 232 LayoutRect borderRect = logicalFrameRect();
231 borderRect.moveBy(accumulatedOffset); 233 borderRect.moveBy(accumulatedOffset);
232 FloatRoundedRect border = lineLayoutItem().style()->getRoundedBorderFor( borderRect); 234 FloatRoundedRect border = lineLayoutItem().style()->getRoundedBorderFor( borderRect);
233 if (!locationInContainer.intersects(border)) 235 if (!locationInContainer.intersects(border))
234 return false; 236 return false;
235 } 237 }
236 238 return inside;
237 return lineLayoutItem().hitTest(result, locationInContainer, childPoint);
238 } 239 }
239 240
240 const RootInlineBox& InlineBox::root() const 241 const RootInlineBox& InlineBox::root() const
241 { 242 {
242 if (m_parent) 243 if (m_parent)
243 return m_parent->root(); 244 return m_parent->root();
244 ASSERT(isRootInlineBox()); 245 ASSERT(isRootInlineBox());
245 return static_cast<const RootInlineBox&>(*this); 246 return static_cast<const RootInlineBox&>(*this);
246 } 247 }
247 248
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 411
411 void showLineTree(const blink::InlineBox* b) 412 void showLineTree(const blink::InlineBox* b)
412 { 413 {
413 if (b) 414 if (b)
414 b->showLineTreeForThis(); 415 b->showLineTreeForThis();
415 else 416 else
416 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 417 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
417 } 418 }
418 419
419 #endif 420 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698