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

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, 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) 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L ayoutUnit /* lineBottom */) 221 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L ayoutUnit /* lineBottom */)
222 { 222 {
223 // Hit test all phases of replaced elements atomically, as though the replac ed element established its 223 // Hit test all phases of replaced elements atomically, as though the replac ed element established its
224 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab le elements in the CSS2.1 224 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab le elements in the CSS2.1
225 // specification.) 225 // specification.)
226 LayoutPoint childPoint = accumulatedOffset; 226 LayoutPoint childPoint = accumulatedOffset;
227 if (parent()->lineLayoutItem().hasFlippedBlocksWritingMode()) // Faster than calling containingBlock(). 227 if (parent()->lineLayoutItem().hasFlippedBlocksWritingMode()) // Faster than calling containingBlock().
228 childPoint = layoutObject().containingBlock()->flipForWritingModeForChil d(&toLayoutBox(layoutObject()), childPoint); 228 childPoint = layoutObject().containingBlock()->flipForWritingModeForChil d(&toLayoutBox(layoutObject()), childPoint);
229 229
230 if (lineLayoutItem().style()->hasBorderRadius()) {
231 LayoutRect borderRect = logicalFrameRect();
232 borderRect.moveBy(accumulatedOffset);
233 FloatRoundedRect border = lineLayoutItem().style()->getRoundedBorderFor( borderRect);
234 if (!locationInContainer.intersects(border))
235 return false;
236 }
237
238 return lineLayoutItem().hitTest(result, locationInContainer, childPoint); 230 return lineLayoutItem().hitTest(result, locationInContainer, childPoint);
239 } 231 }
240 232
241 const RootInlineBox& InlineBox::root() const 233 const RootInlineBox& InlineBox::root() const
242 { 234 {
243 if (m_parent) 235 if (m_parent)
244 return m_parent->root(); 236 return m_parent->root();
245 ASSERT(isRootInlineBox()); 237 ASSERT(isRootInlineBox());
246 return static_cast<const RootInlineBox&>(*this); 238 return static_cast<const RootInlineBox&>(*this);
247 } 239 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 403
412 void showLineTree(const blink::InlineBox* b) 404 void showLineTree(const blink::InlineBox* b)
413 { 405 {
414 if (b) 406 if (b)
415 b->showLineTreeForThis(); 407 b->showLineTreeForThis();
416 else 408 else
417 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 409 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
418 } 410 }
419 411
420 #endif 412 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698