WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
52103
Video with object-fit: cover can spill outside the box
https://bugs.webkit.org/show_bug.cgi?id=52103
Summary
Video with object-fit: cover can spill outside the box
Simon Fraser (smfr)
Reported
2011-01-07 22:07:07 PST
Follow-on from
bug 52040
: With object-fit: cover, <video> may spill outside the box, and we don't have a layer we can set masksToBounds on to clip it.
Attachments
Patch
(54.99 KB, patch)
2013-08-30 16:20 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(57.06 KB, patch)
2013-08-30 16:35 PDT
,
Simon Fraser (smfr)
dino
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Simon Pieters (:zcorpan)
Comment 1
2011-01-12 10:22:48 PST
object-fit:cover is supposed to spill outside the box when overflow:visible. No?
Simon Fraser (smfr)
Comment 2
2011-01-12 10:39:32 PST
So says the spec (not that I agree with it). But with overflow:hidden we'll have to fix this anyway.
Simon Pieters (:zcorpan)
Comment 3
2011-01-12 11:08:07 PST
We have the opposite problem in Opera, <video> is always clipped. However we could always change the spec to say that the content is always clipped regardless of 'overflow' if people think overflowing is useless/annoying.
Simon Pieters (:zcorpan)
Comment 4
2011-01-12 11:55:16 PST
...though maybe that ship has sailed for SVG content anyway.
Simon Fraser (smfr)
Comment 5
2011-01-12 12:36:06 PST
I think authors would not expect overflow for elements like <img> and <video>.
Simon Pieters (:zcorpan)
Comment 6
2011-01-13 00:08:15 PST
We could add overflow:hidden to the UA style sheet for those elements, maybe?
Simon Pieters (:zcorpan)
Comment 7
2011-01-13 06:42:12 PST
(spec bug
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11746
)
Simon Fraser (smfr)
Comment 8
2013-08-30 16:20:43 PDT
Created
attachment 210173
[details]
Patch
WebKit Commit Bot
Comment 9
2013-08-30 16:22:37 PDT
Attachment 210173
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/compositing/images/direct-image-object-fit-expected.txt', u'LayoutTests/compositing/images/direct-image-object-fit.html', u'LayoutTests/compositing/reflections/direct-image-object-fit-reflected-expected.txt', u'LayoutTests/compositing/reflections/direct-image-object-fit-reflected.html', u'LayoutTests/compositing/video/video-object-fit-expected.txt', u'LayoutTests/compositing/video/video-object-fit.html', u'LayoutTests/platform/mac/compositing/images/direct-image-object-fit-expected.txt', u'LayoutTests/platform/mac/compositing/reflections/direct-image-object-fit-reflected-expected.txt', u'LayoutTests/platform/mac/compositing/video/video-object-fit-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/page/Frame.h', u'Source/WebCore/platform/graphics/GraphicsLayer.h', u'Source/WebCore/platform/graphics/MediaPlayer.cpp', u'Source/WebCore/platform/graphics/MediaPlayer.h', u'Source/WebCore/platform/graphics/MediaPlayerPrivate.h', u'Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp', u'Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h', u'Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp', u'Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h', u'Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h', u'Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h', u'Source/WebCore/rendering/RenderLayerBacking.cpp', u'Source/WebCore/rendering/RenderLayerCompositor.cpp', u'Source/WebCore/rendering/RenderVideo.cpp', u'Source/WebCore/testing/Internals.cpp', u'Source/WebCore/testing/Internals.h', u'Source/WebCore/testing/Internals.idl']" exit_code: 1 Source/WebCore/testing/Internals.h:228: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/testing/Internals.h:229: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 2 in 30 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 10
2013-08-30 16:35:51 PDT
Created
attachment 210175
[details]
Patch
WebKit Commit Bot
Comment 11
2013-08-30 16:43:35 PDT
Attachment 210175
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/compositing/images/direct-image-object-fit-expected.txt', u'LayoutTests/compositing/images/direct-image-object-fit.html', u'LayoutTests/compositing/reflections/direct-image-object-fit-reflected-expected.txt', u'LayoutTests/compositing/reflections/direct-image-object-fit-reflected.html', u'LayoutTests/compositing/video/video-object-fit-expected.txt', u'LayoutTests/compositing/video/video-object-fit.html', u'LayoutTests/media/video-object-fit-change.html', u'LayoutTests/platform/mac/TestExpectations', u'LayoutTests/platform/mac/compositing/images/direct-image-object-fit-expected.txt', u'LayoutTests/platform/mac/compositing/reflections/direct-image-object-fit-reflected-expected.txt', u'LayoutTests/platform/mac/compositing/video/video-object-fit-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/page/Frame.h', u'Source/WebCore/platform/graphics/GraphicsLayer.h', u'Source/WebCore/platform/graphics/MediaPlayer.cpp', u'Source/WebCore/platform/graphics/MediaPlayer.h', u'Source/WebCore/platform/graphics/MediaPlayerPrivate.h', u'Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp', u'Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h', u'Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp', u'Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h', u'Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h', u'Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp', u'Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h', u'Source/WebCore/rendering/RenderLayerBacking.cpp', u'Source/WebCore/rendering/RenderLayerCompositor.cpp', u'Source/WebCore/rendering/RenderVideo.cpp', u'Source/WebCore/testing/Internals.cpp', u'Source/WebCore/testing/Internals.h', u'Source/WebCore/testing/Internals.idl']" exit_code: 1 Source/WebCore/testing/Internals.h:228: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/WebCore/testing/Internals.h:229: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 2 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dean Jackson
Comment 12
2013-08-30 16:46:28 PDT
Comment on
attachment 210175
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210175&action=review
> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:1797 > + bool needContentsClippingLayer = !m_contentsClippingRect.contains(m_contentsRect); > + bool gainedOrLostClippingLayer = false; > + if (needContentsClippingLayer) {
You don't need needContentsClippingLayer.
> LayoutTests/compositing/video/video-object-fit.html:52 > + }, 1500);
1.5s :(
Simon Fraser (smfr)
Comment 13
2013-08-30 17:13:56 PDT
https://trac.webkit.org/r154921
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug