Summary: | [CSS Shapes] Add BoxShape and FloatRoundingRect classes | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Hans Muller <giles_joplin> | ||||||||||||||
Component: | CSS | Assignee: | Hans Muller <giles_joplin> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, gyuyoung.kim, kondapallykalyan, rakuco | ||||||||||||||
Priority: | P2 | ||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | 124416 | ||||||||||||||||
Bug Blocks: | 124173, 124605, 124606 | ||||||||||||||||
Attachments: |
|
Description
Hans Muller
2013-11-14 09:33:57 PST
A BoxShape class would represent margin-box, border-box, padding-box, and content-box values, see http://dev.w3.org/csswg/css-shapes/#typedef-box. A float analog of RoundedRect is needed to represent a BoxShape's shape-margin and shape-padding bounds. A FloatRoundedRect is a rounded rectangle with four elliptical corners, each with its own pair of radii. Created attachment 217342 [details]
Path
Added the BoxShape class. It's now used to represent shape-outside box values: [margin/border/padding/content]-box. BoxShape depends on a new FloatRoundedRect class, which is a float analog of the existing (int) RoundedRect class.
Attachment 217342 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/GNUmakefile.list.am', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj', u'Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/platform/graphics/FloatRoundedRect.cpp', u'Source/WebCore/platform/graphics/FloatRoundedRect.h', u'Source/WebCore/rendering/shapes/BoxShape.cpp', u'Source/WebCore/rendering/shapes/BoxShape.h', u'Source/WebCore/rendering/shapes/Shape.cpp']" exit_code: 1
Source/WebCore/platform/graphics/FloatRoundedRect.h:42: Missing space inside { }. [whitespace/braces] [5]
Total errors found: 1 in 11 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 217348 [details]
Patch
Fixed a styleO.
Created attachment 217358 [details]
Patch
Resync'd.
Created attachment 217360 [details]
Patch
Remove diff for the leading mystery characters in the header for /Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Created attachment 217451 [details]
Patch
Updated the ChangeLog entry:
Added the BoxShape class. It's now used to represent shape-outside box values: [margin/border/padding/content]-box. BoxShape depends on a new FloatRoundedRect class, which is a float analog of the existing (int) RoundedRect class. The FloatRoundedRect class contains the same basic methods and accessors as BorderRect and adds a set of four methods, for example topLeftCorner(), that return a FloatRect that represents the bounds of one elliptical corner. I also added a method, xInterceptsAtY() that returns two X coordinates of the intersection between a horizontal line and the rounded rectangle.
Comment on attachment 217451 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=217451&action=review > Source/WebCore/platform/graphics/FloatRoundedRect.cpp:4 > +/* > + * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. > + * Copyright (C) 2010 Google Inc. All rights reserved. > + * Copyright (C) 2013 Xidorn Quan (quanxunzhen@gmail.com) This doesn't match the .h > Source/WebCore/platform/graphics/FloatRoundedRect.cpp:106 > + if (y < rect().y() || y >= rect().maxY()) Double space before || > Source/WebCore/platform/graphics/FloatRoundedRect.h:2 > +/* > + * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 2013 Created attachment 217473 [details]
Patch
Made the requested changes.
Comment on attachment 217473 [details] Patch Clearing flags on attachment: 217473 Committed r159583: <http://trac.webkit.org/changeset/159583> All reviewed patches have been landed. Closing bug. |