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

Side by Side Diff: Source/core/rendering/exclusions/ExclusionShapeInsideInfo.cpp

Issue 14892005: [CSS Exclusions] ExclusionShape bounding box methods should return LayoutRects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reverted LineSegment logicalLeft,Right type change Created 7 years, 7 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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside(); 46 ExclusionShapeValue* shapeValue = renderer->style()->resolvedShapeInside();
47 return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? sh apeValue->shape() : 0; 47 return (shapeValue && shapeValue->type() == ExclusionShapeValue::SHAPE) ? sh apeValue->shape() : 0;
48 } 48 }
49 49
50 bool ExclusionShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth) 50 bool ExclusionShapeInsideInfo::adjustLogicalLineTop(float minSegmentWidth)
51 { 51 {
52 const ExclusionShape* shape = computedShape(); 52 const ExclusionShape* shape = computedShape();
53 if (!shape || m_lineHeight <= 0 || logicalLineTop() > shapeLogicalBottom()) 53 if (!shape || m_lineHeight <= 0 || logicalLineTop() > shapeLogicalBottom())
54 return false; 54 return false;
55 55
56 float floatNewLineTop; 56 LayoutUnit newLineTop;
57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, FloatSize(minSegm entWidth, m_lineHeight), floatNewLineTop)) { 57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSeg mentWidth, m_lineHeight), newLineTop)) {
58 LayoutUnit newLineTop = floatLogicalTopToLayoutUnit(floatNewLineTop);
59 if (newLineTop > m_shapeLineTop) { 58 if (newLineTop > m_shapeLineTop) {
60 m_shapeLineTop = newLineTop; 59 m_shapeLineTop = newLineTop;
61 return true; 60 return true;
62 } 61 }
63 } 62 }
64 63
65 return false; 64 return false;
66 } 65 }
67 66
68 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698