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

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

Issue 16358010: [CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 26 matching lines...) Expand all
37 37
38 LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter ator& end) 38 LineSegmentRange::LineSegmentRange(const InlineIterator& start, const InlineIter ator& end)
39 : start(start.root(), start.object(), start.offset()) 39 : start(start.root(), start.object(), start.offset())
40 , end(end.root(), end.object(), end.offset()) 40 , end(end.root(), end.object(), end.offset())
41 { 41 {
42 } 42 }
43 43
44 bool ExclusionShapeInsideInfo::isEnabledFor(const RenderBlock* renderer) 44 bool ExclusionShapeInsideInfo::isEnabledFor(const RenderBlock* renderer)
45 { 45 {
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 LayoutUnit newLineTop; 56 LayoutUnit newLineTop;
57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSeg mentWidth, m_lineHeight), newLineTop)) { 57 if (shape->firstIncludedIntervalLogicalTop(m_shapeLineTop, LayoutSize(minSeg mentWidth, m_lineHeight), newLineTop)) {
58 if (newLineTop > m_shapeLineTop) { 58 if (newLineTop > m_shapeLineTop) {
59 m_shapeLineTop = newLineTop; 59 m_shapeLineTop = newLineTop;
60 return true; 60 return true;
61 } 61 }
62 } 62 }
63 63
64 return false; 64 return false;
65 } 65 }
66 66
67 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698