diff options
author | timloh@chromium.org <timloh@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-01-03 08:28:33 +0000 |
---|---|---|
committer | timloh@chromium.org <timloh@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-01-03 08:28:33 +0000 |
commit | 8af50013137c20ed375aca9d6e2820f70f5f22e0 (patch) | |
tree | 14e9fadf3ba59ff0caedca48ecbef363be54a46d /third_party/WebKit/LayoutTests/fast/masking | |
parent | fc946da9719c46904ce9cb23336ee46eff9be9df (diff) | |
download | chromium_src-8af50013137c20ed375aca9d6e2820f70f5f22e0.zip chromium_src-8af50013137c20ed375aca9d6e2820f70f5f22e0.tar.gz chromium_src-8af50013137c20ed375aca9d6e2820f70f5f22e0.tar.bz2 |
Move viewport unit resolution to style recalc time
This patch moves the resolution of viewport units to style recalc time.
Currently viewport units are left unresolved during style recalcs which
leads to several problems (see linked bugs). Moving the resolution will
fix these problems, as well as reduce the plumbing that goes on.
This patch is touches a lot of files since the valueForLength functions
now no longer need a RenderView, but the interesting changes are in:
- CSSToLengthConversionData -> CSSPrimitiveValue, for moving resolution
to style recalc time
- Length / LengthFunction, no longer needs to know about viewport units
- FrameView -> Document -> MatchedPropertiesCache, for scheduling style
recalcs upon resize
Viewport Lengths are currently also used in viewport descriptions (that
is, @viewport and the viewport meta tag). I've added to Length two more
enum values (DeviceWidth and DeviceHeight), alongside ExtendToZoom.
Note that getComputedStyle will now do the right thing and return pixel
values when viewport units are used. This behaviour matches Firefox and
the css3-cascade spec.
I've added a test for the most starred bug (124331) and for the various
other issues fixed by this patch I'll make test-only patches.
Note that calc integration with viewport units will be fixed separately
to simplify reviews.
TBR=dglazkov@chromium.org
BUG=124331,137617,125709,261298,173407,322365,310874,311465
Review URL: https://codereview.chromium.org/82083002
git-svn-id: svn://svn.chromium.org/blink/trunk@164448 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/masking')
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt | 12 | ||||
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape.html | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt b/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt index 858d63e..ff5eba3 100644 --- a/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt @@ -29,15 +29,15 @@ PASS computedStyle("-webkit-clip-path", "circle(1.5rem at .5rem 1rem)") is "circ PASS innerStyle("-webkit-clip-path", "circle(1vw, 1vw, 1vw)") is "circle(1vw, 1vw, 1vw)" PASS innerStyle("-webkit-clip-path", "circle(1vh, 1vh, 1vh)") is "circle(1vh, 1vh, 1vh)" PASS innerStyle("-webkit-clip-path", "circle(1vmin, 1vmin, 1vmin)") is "circle(1vmin, 1vmin, 1vmin)" -PASS computedStyle("-webkit-clip-path", "circle(.5vw, 1vw, 1.5vw)") is "circle(0.5vw, 1vw, 1.5vw)" -PASS computedStyle("-webkit-clip-path", "circle(.5vh, 1vh, 1.5vh)") is "circle(0.5vh, 1vh, 1.5vh)" -PASS computedStyle("-webkit-clip-path", "circle(.5vmin, 1vmin, 1.5vmin)") is "circle(0.5vmin, 1vmin, 1.5vmin)" +PASS computedStyle("-webkit-clip-path", "circle(.5vw, 1vw, 1.5vw)") is "circle(4px, 8px, 12px)" +PASS computedStyle("-webkit-clip-path", "circle(.5vh, 1vh, 1.5vh)") is "circle(3px, 6px, 9px)" +PASS computedStyle("-webkit-clip-path", "circle(.5vmin, 1vmin, 1.5vmin)") is "circle(3px, 6px, 9px)" PASS innerStyle("-webkit-clip-path", "circle(1vw at 1vw 1vw)") is "circle(1vw at 1vw 1vw)" PASS innerStyle("-webkit-clip-path", "circle(1vh at 1vh 1vh)") is "circle(1vh at 1vh 1vh)" PASS innerStyle("-webkit-clip-path", "circle(1vmin at 1vmin 1vmin)") is "circle(1vmin at 1vmin 1vmin)" -PASS computedStyle("-webkit-clip-path", "circle(1.5vw at .5vw 1vw)") is "circle(1.5vw at 0.5vw 1vw)" -PASS computedStyle("-webkit-clip-path", "circle(1.5vh at .5vh 1vh)") is "circle(1.5vh at 0.5vh 1vh)" -PASS computedStyle("-webkit-clip-path", "circle(1.5vmin at .5vmin 1vmin)") is "circle(1.5vmin at 0.5vmin 1vmin)" +PASS computedStyle("-webkit-clip-path", "circle(1.5vw at .5vw 1vw)") is "circle(12px at 4px 8px)" +PASS computedStyle("-webkit-clip-path", "circle(1.5vh at .5vh 1vh)") is "circle(9px at 3px 6px)" +PASS computedStyle("-webkit-clip-path", "circle(1.5vmin at .5vmin 1vmin)") is "circle(9px at 3px 6px)" PASS innerStyle("-webkit-clip-path", "circle(100%, 100%, 100%)") is "circle(100%, 100%, 100%)" PASS innerStyle("-webkit-clip-path", "circle(100% at 100% 100%)") is "circle(100% at 100% 100%)" PASS innerStyle("-webkit-clip-path", "rectangle(45%, 45%, 90%, 60%, 25%, 10%)") is "rectangle(45%, 45%, 90%, 60%, 25%, 10%)" diff --git a/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape.html b/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape.html index 28a02d8..657b421 100644 --- a/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape.html +++ b/third_party/WebKit/LayoutTests/fast/masking/parsing-clip-path-shape.html @@ -81,17 +81,17 @@ testInner("-webkit-clip-path", "circle(1vw, 1vw, 1vw)", "circle(1vw, 1vw, 1vw)") testInner("-webkit-clip-path", "circle(1vh, 1vh, 1vh)", "circle(1vh, 1vh, 1vh)"); testInner("-webkit-clip-path", "circle(1vmin, 1vmin, 1vmin)", "circle(1vmin, 1vmin, 1vmin)"); -testComputed("-webkit-clip-path", "circle(.5vw, 1vw, 1.5vw)", "circle(0.5vw, 1vw, 1.5vw)"); -testComputed("-webkit-clip-path", "circle(.5vh, 1vh, 1.5vh)", "circle(0.5vh, 1vh, 1.5vh)"); -testComputed("-webkit-clip-path", "circle(.5vmin, 1vmin, 1.5vmin)", "circle(0.5vmin, 1vmin, 1.5vmin)"); +testComputed("-webkit-clip-path", "circle(.5vw, 1vw, 1.5vw)", "circle(4px, 8px, 12px)"); +testComputed("-webkit-clip-path", "circle(.5vh, 1vh, 1.5vh)", "circle(3px, 6px, 9px)"); +testComputed("-webkit-clip-path", "circle(.5vmin, 1vmin, 1.5vmin)", "circle(3px, 6px, 9px)"); testInner("-webkit-clip-path", "circle(1vw at 1vw 1vw)", "circle(1vw at 1vw 1vw)"); testInner("-webkit-clip-path", "circle(1vh at 1vh 1vh)", "circle(1vh at 1vh 1vh)"); testInner("-webkit-clip-path", "circle(1vmin at 1vmin 1vmin)", "circle(1vmin at 1vmin 1vmin)"); -testComputed("-webkit-clip-path", "circle(1.5vw at .5vw 1vw)", "circle(1.5vw at 0.5vw 1vw)"); -testComputed("-webkit-clip-path", "circle(1.5vh at .5vh 1vh)", "circle(1.5vh at 0.5vh 1vh)"); -testComputed("-webkit-clip-path", "circle(1.5vmin at .5vmin 1vmin)", "circle(1.5vmin at 0.5vmin 1vmin)"); +testComputed("-webkit-clip-path", "circle(1.5vw at .5vw 1vw)", "circle(12px at 4px 8px)"); +testComputed("-webkit-clip-path", "circle(1.5vh at .5vh 1vh)", "circle(9px at 3px 6px)"); +testComputed("-webkit-clip-path", "circle(1.5vmin at .5vmin 1vmin)", "circle(9px at 3px 6px)"); // percentage lengths - units testInner("-webkit-clip-path", "circle(100%, 100%, 100%)", "circle(100%, 100%, 100%)"); |