Commit 41e6d26e authored by David Reveman's avatar David Reveman Committed by Commit Bot

Login: Fix horizontal flip for supervised user image grid.

Use flipped image instead of relying on css transform for image
preview. This allows both the grid image and the image preview
to be displayed correctly.

Bug: 779519
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Icd0fb45f1dc433d490f24d5342c250197e96c11b
Reviewed-on: https://chromium-review.googlesource.com/743693Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512564}
parent 41293d4e
...@@ -420,10 +420,6 @@ html[dir=rtl] #supervised-user-creation-image-preview { ...@@ -420,10 +420,6 @@ html[dir=rtl] #supervised-user-creation-image-preview {
display: none; display: none;
} }
.camera #supervised-user-creation-image-preview-img {
transform: rotateY(180deg);
}
.default-image #supervised-user-creation-image-preview-img { .default-image #supervised-user-creation-image-preview-img {
background: white; background: white;
border: solid 1px #cacaca; border: solid 1px #cacaca;
......
...@@ -462,9 +462,10 @@ cr.define('options', function() { ...@@ -462,9 +462,10 @@ cr.define('options', function() {
this.cameraTitle_ = this.capturedImageTitle_; this.cameraTitle_ = this.capturedImageTitle_;
this.cameraImage = previewImg.src; this.cameraImage = previewImg.src;
}.bind(this)); }.bind(this));
previewImg.src = canvas.toDataURL('image/png'); var imageUrl = this.flipFrame_(canvas);
previewImg.src = imageUrl;
var e = new Event('phototaken'); var e = new Event('phototaken');
e.dataURL = this.flipFrame_(canvas); e.dataURL = imageUrl;
this.dispatchEvent(e); this.dispatchEvent(e);
return true; return true;
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment