Bug 124052 - [CSS Shapes] Shapes do not resolve dimensions specified in viewport units
Summary: [CSS Shapes] Shapes do not resolve dimensions specified in viewport units
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bem Jones-Bey
Depends on: 87846
Blocks: 89256
  Show dependency treegraph
Reported: 2013-11-08 10:23 PST by Bear Travis
Modified: 2014-05-08 12:15 PDT (History)
15 users (show)

See Also:

Testcase (986 bytes, text/html)
2013-11-08 10:23 PST, Bear Travis
no flags Details
Patch (32.70 KB, patch)
2014-05-07 16:22 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff
Patch (33.46 KB, patch)
2014-05-08 11:35 PDT, Bem Jones-Bey
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bear Travis 2013-11-08 10:23:03 PST
Created attachment 216409 [details]

When an element's height is set in viewport units, percentages in a shape do not resolve.
The shape resolves the percentages as if height were auto.
Comment 1 Bem Jones-Bey 2014-03-27 11:00:16 PDT
I believe this is actually caused by the same root cause as Bug 87846, and I'm working on a fix for that.
Comment 2 Bem Jones-Bey 2014-04-03 13:44:52 PDT
This isn't related to Bug 87846 at all, in fact shapes fail to work with viewport units in general, even specified on the shape itself. This is because the RenderView is not passed down into the code that computes the lengths. It is true that the fix for Bug 87846 will fix this, but depending on how long it takes to fix Bug 87846, I may fix this separately.
Comment 3 Rebecca Hauck 2014-04-28 17:27:09 PDT
Viewport units are also not computed on shape-margin.
Comment 4 Bem Jones-Bey 2014-05-07 16:22:38 PDT
Created attachment 231028 [details]
Comment 5 Dirk Schulze 2014-05-08 10:04:16 PDT
Comment on attachment 231028 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=231028&action=review


> Source/WebCore/css/BasicShapeFunctions.cpp:268
> +float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate& center, float boxDimension, RenderView* view)

Can you use a reference instead of a pointer?

> Source/WebCore/css/BasicShapeFunctions.h:48
> +float floatValueForCenterCoordinate(const BasicShapeCenterCoordinate&, float, RenderView*);


> Source/WebCore/css/LengthFunctions.h:41
> +FloatSize floatSizeForLengthSize(const LengthSize&, const FloatSize&, RenderView* = 0);

Hm, ok.
Comment 6 WebKit Commit Bot 2014-05-08 10:38:58 PDT
Comment on attachment 231028 [details]

Rejecting attachment 231028 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
eBox.dia -c /Volumes/Data/EWS/WebKit/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/RenderDeprecatedFlexibleBox.o


The following build commands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/RenderBlock.o rendering/RenderBlock.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Full output: http://webkit-queues.appspot.com/results/6359674257408000
Comment 7 Bem Jones-Bey 2014-05-08 11:35:02 PDT
Created attachment 231083 [details]
Comment 8 WebKit Commit Bot 2014-05-08 12:15:05 PDT
Comment on attachment 231083 [details]

Clearing flags on attachment: 231083

Committed r168481: <http://trac.webkit.org/changeset/168481>
Comment 9 WebKit Commit Bot 2014-05-08 12:15:11 PDT
All reviewed patches have been landed.  Closing bug.