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

Side by Side Diff: Source/core/rendering/shapes/BoxShapeTest.cpp

Issue 226373002: [CSS Shapes] shape-margin in percentage units always computes to 0px (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove webkit prefixes Created 6 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
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | Source/core/rendering/shapes/Shape.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 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 25 matching lines...) Expand all
36 #include <gtest/gtest.h> 36 #include <gtest/gtest.h>
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class BoxShapeTest : public ::testing::Test { 40 class BoxShapeTest : public ::testing::Test {
41 protected: 41 protected:
42 BoxShapeTest() { } 42 BoxShapeTest() { }
43 43
44 PassOwnPtr<Shape> createBoxShape(const RoundedRect& bounds, float shapeMargi n) 44 PassOwnPtr<Shape> createBoxShape(const RoundedRect& bounds, float shapeMargi n)
45 { 45 {
46 return Shape::createLayoutBoxShape(bounds, TopToBottomWritingMode, Lengt h(shapeMargin, Fixed)); 46 return Shape::createLayoutBoxShape(bounds, TopToBottomWritingMode, shape Margin);
47 } 47 }
48 }; 48 };
49 49
50 } // namespace WebCore 50 } // namespace WebCore
51 51
52 namespace { 52 namespace {
53 53
54 using namespace WebCore; 54 using namespace WebCore;
55 55
56 #define TEST_EXCLUDED_INTERVAL(shapePtr, lineTop, lineHeight, expectedLeft, expe ctedRight) \ 56 #define TEST_EXCLUDED_INTERVAL(shapePtr, lineTop, lineHeight, expectedLeft, expe ctedRight) \
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100); 135 TEST_EXCLUDED_INTERVAL(shape, 10, 95, 0, 100);
136 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100); 136 TEST_EXCLUDED_INTERVAL(shape, 5, 25, 0, 100);
137 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100); 137 TEST_EXCLUDED_INTERVAL(shape, 15, 6, 0, 100);
138 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100); 138 TEST_EXCLUDED_INTERVAL(shape, 20, 50, 0, 100);
139 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100); 139 TEST_EXCLUDED_INTERVAL(shape, 69, 5, 0, 100);
140 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f); 140 TEST_EXCLUDED_INTERVAL(shape, 85, 10, 0, 97.320511f);
141 } 141 }
142 142
143 } // namespace 143 } // namespace
OLDNEW
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.cpp ('k') | Source/core/rendering/shapes/Shape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698