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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/InlineFlowBox.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, 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public License 14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to 15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA. 17 * Boston, MA 02110-1301, USA.
18 */ 18 */
19 19
20 #include "core/layout/line/InlineFlowBox.h" 20 #include "core/layout/line/InlineFlowBox.h"
21 21
22 #include "core/CSSPropertyNames.h" 22 #include "core/CSSPropertyNames.h"
23 #include "core/dom/Document.h" 23 #include "core/dom/Document.h"
24 #include "core/layout/HitTestResult.h" 24 #include "core/layout/HitTestResult.h"
25 #include "core/layout/api/LineLayoutAPIShim.h"
25 #include "core/layout/api/LineLayoutBlockFlow.h" 26 #include "core/layout/api/LineLayoutBlockFlow.h"
26 #include "core/layout/api/LineLayoutBox.h" 27 #include "core/layout/api/LineLayoutBox.h"
27 #include "core/layout/api/LineLayoutInline.h" 28 #include "core/layout/api/LineLayoutInline.h"
28 #include "core/layout/api/LineLayoutListMarker.h" 29 #include "core/layout/api/LineLayoutListMarker.h"
29 #include "core/layout/api/LineLayoutRubyBase.h" 30 #include "core/layout/api/LineLayoutRubyBase.h"
30 #include "core/layout/api/LineLayoutRubyRun.h" 31 #include "core/layout/api/LineLayoutRubyRun.h"
31 #include "core/layout/api/LineLayoutRubyText.h" 32 #include "core/layout/api/LineLayoutRubyText.h"
32 #include "core/layout/line/GlyphOverflow.h" 33 #include "core/layout/line/GlyphOverflow.h"
33 #include "core/layout/line/InlineTextBox.h" 34 #include "core/layout/line/InlineTextBox.h"
34 #include "core/layout/line/RootInlineBox.h" 35 #include "core/layout/line/RootInlineBox.h"
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 break; 1022 break;
1022 1023
1023 if (culledParent.isLayoutInline() && LineLayoutInline(culledParent). hitTestCulledInline(result, locationInContainer, accumulatedOffset)) 1024 if (culledParent.isLayoutInline() && LineLayoutInline(culledParent). hitTestCulledInline(result, locationInContainer, accumulatedOffset))
1024 return true; 1025 return true;
1025 1026
1026 currLayoutItem = culledParent; 1027 currLayoutItem = culledParent;
1027 } 1028 }
1028 } 1029 }
1029 1030
1030 if (getLineLayoutItem().style()->hasBorderRadius()) { 1031 if (getLineLayoutItem().style()->hasBorderRadius()) {
1032 LayoutPoint adjustedLocation = accumulatedOffset + overflowRect.location ();
1033 if (getLineLayoutItem().isBox() && toLayoutBox(LineLayoutAPIShim::layout ObjectFrom(getLineLayoutItem()))->hitTestClippedOutByRoundedBorder(locationInCon tainer, adjustedLocation))
1034 return false;
1035
1031 LayoutRect borderRect = logicalFrameRect(); 1036 LayoutRect borderRect = logicalFrameRect();
1032 borderRect.moveBy(accumulatedOffset); 1037 borderRect.moveBy(accumulatedOffset);
1033 FloatRoundedRect border = getLineLayoutItem().style()->getRoundedBorderF or(borderRect, includeLogicalLeftEdge(), includeLogicalRightEdge()); 1038 FloatRoundedRect border = getLineLayoutItem().style()->getRoundedBorderF or(borderRect, includeLogicalLeftEdge(), includeLogicalRightEdge());
1034 if (!locationInContainer.intersects(border)) 1039 if (!locationInContainer.intersects(border))
1035 return false; 1040 return false;
1036 } 1041 }
1037 1042
1038 // Now check ourselves. 1043 // Now check ourselves.
1039 LayoutRect rect = InlineFlowBoxPainter(*this).frameRectClampedToLineTopAndBo ttomIfNeeded(); 1044 LayoutRect rect = InlineFlowBoxPainter(*this).frameRectClampedToLineTopAndBo ttomIfNeeded();
1040 1045
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 ASSERT(child->prevOnLine() == prev); 1313 ASSERT(child->prevOnLine() == prev);
1309 prev = child; 1314 prev = child;
1310 } 1315 }
1311 ASSERT(prev == m_lastChild); 1316 ASSERT(prev == m_lastChild);
1312 #endif 1317 #endif
1313 } 1318 }
1314 1319
1315 #endif 1320 #endif
1316 1321
1317 } // namespace blink 1322 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698