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

Side by Side Diff: Source/core/rendering/exclusions/ExclusionShapeOutsideInfo.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 18 matching lines...) Expand all
29 29
30 #include "config.h" 30 #include "config.h"
31 #include "core/rendering/exclusions/ExclusionShapeOutsideInfo.h" 31 #include "core/rendering/exclusions/ExclusionShapeOutsideInfo.h"
32 32
33 #include "core/rendering/RenderBox.h" 33 #include "core/rendering/RenderBox.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 bool ExclusionShapeOutsideInfo::isEnabledFor(const RenderBox* box) 36 bool ExclusionShapeOutsideInfo::isEnabledFor(const RenderBox* box)
37 { 37 {
38 ExclusionShapeValue* value = box->style()->shapeOutside(); 38 ExclusionShapeValue* value = box->style()->shapeOutside();
39 return (box->isFloatingWithShapeOutside() && value->type() == ExclusionShape Value::SHAPE) ? value->shape() : 0; 39 return (box->isFloatingWithShapeOutside() && value->type() == ExclusionShape Value::Shape) ? value->shape() : 0;
40 } 40 }
41 41
42 bool ExclusionShapeOutsideInfo::computeSegmentsForLine(LayoutUnit lineTop, Layou tUnit lineHeight) 42 bool ExclusionShapeOutsideInfo::computeSegmentsForLine(LayoutUnit lineTop, Layou tUnit lineHeight)
43 { 43 {
44 if (shapeSizeDirty() || m_lineTop != lineTop || m_lineHeight != lineHeight) { 44 if (shapeSizeDirty() || m_lineTop != lineTop || m_lineHeight != lineHeight) {
45 if (ExclusionShapeInfo<RenderBox, &RenderStyle::shapeOutside, &Exclusion Shape::getExcludedIntervals>::computeSegmentsForLine(lineTop, lineHeight)) { 45 if (ExclusionShapeInfo<RenderBox, &RenderStyle::shapeOutside, &Exclusion Shape::getExcludedIntervals>::computeSegmentsForLine(lineTop, lineHeight)) {
46 m_leftSegmentShapeBoundingBoxDelta = m_segments[0].logicalLeft - sha peLogicalLeft(); 46 m_leftSegmentShapeBoundingBoxDelta = m_segments[0].logicalLeft - sha peLogicalLeft();
47 m_rightSegmentShapeBoundingBoxDelta = m_segments[m_segments.size()-1 ].logicalRight - shapeLogicalRight(); 47 m_rightSegmentShapeBoundingBoxDelta = m_segments[m_segments.size()-1 ].logicalRight - shapeLogicalRight();
48 } else { 48 } else {
49 m_leftSegmentShapeBoundingBoxDelta = 0; 49 m_leftSegmentShapeBoundingBoxDelta = 0;
50 m_rightSegmentShapeBoundingBoxDelta = 0; 50 m_rightSegmentShapeBoundingBoxDelta = 0;
51 } 51 }
52 m_lineTop = lineTop; 52 m_lineTop = lineTop;
53 } 53 }
54 54
55 return m_segments.size(); 55 return m_segments.size();
56 } 56 }
57 57
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698