Changeset 207248 in webkit
- Timestamp:
- Oct 12, 2016 4:01:32 PM (8 years ago)
- Location:
- branches/safari-602.2.14.0-branch
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-602.2.14.0-branch/LayoutTests/ChangeLog
r207247 r207248 1 2016-10-11 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r203522. rdar://problem/28476959 4 5 2016-07-21 Daniel Bates <dabates@apple.com> 6 7 REGRESSION: Plugin replaced YouTube Flash videos always have the same width 8 https://bugs.webkit.org/show_bug.cgi?id=159998 9 <rdar://problem/27462285> 10 11 Reviewed by Simon Fraser. 12 13 Unskip existing iOS layout tests, update tests and expected results. 14 15 * platform/ios-simulator/TestExpectations: 16 * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt: Updated expected result based on the 17 changes to test youtube-flash-plugin-iframe.html. 18 * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width-expected.txt: Updated expected result 19 based on the changes to test youtube-flash-plugin-iframe-no-height-or-width.html. 20 * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html: Modified to check the 21 width of each embedded YouTube video to ensure that we respect it (if specified). 22 * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html: Substitute pseudo id -webkit-plugin-replacement 23 for -apple-youtube-shadow-iframe as the later was renamed to the former in <https://trac.webkit.org/changeset/168442>. 24 Fix misspelling of the word "embed" in a comment. 25 1 26 2016-10-11 Matthew Hanson <matthew_hanson@apple.com> 2 27 -
branches/safari-602.2.14.0-branch/LayoutTests/platform/ios-simulator/TestExpectations
r204212 r207248 2556 2556 # iOS tests that assert: 2557 2557 platform/ios-simulator/ios/fast/text/combining-enclosing-keycap.html 2558 platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html2559 platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html2560 2558 2561 2559 # Kerning, Ligatures, and Printer Fonts caused these tests to fail. -
branches/safari-602.2.14.0-branch/LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt
r178197 r207248 17 17 PASS objectNoEmbed.tagName is "OBJECT" 18 18 PASS document.querySelectorAll("iframe").length is 1 19 PASS internals.shadowPseudoId(normalEmbedShadowRoot.firstChild) is "- apple-youtube-shadow-iframe"19 PASS internals.shadowPseudoId(normalEmbedShadowRoot.firstChild) is "-webkit-plugin-replacement" 20 20 PASS normalEmbedShadowRoot.firstChild.firstChild.tagName is "IFRAME" 21 PASS internals.shadowPseudoId(objectEmbedShadowRoot.firstChild) is "- apple-youtube-shadow-iframe"21 PASS internals.shadowPseudoId(objectEmbedShadowRoot.firstChild) is "-webkit-plugin-replacement" 22 22 PASS objectEmbedShadowRoot.firstChild.firstChild.tagName is "IFRAME" 23 PASS internals.shadowPseudoId(objectNoEmbedShadowRoot.firstChild) is "- apple-youtube-shadow-iframe"23 PASS internals.shadowPseudoId(objectNoEmbedShadowRoot.firstChild) is "-webkit-plugin-replacement" 24 24 PASS objectNoEmbedShadowRoot.firstChild.firstChild.tagName is "IFRAME" 25 25 Normal Embed: -
branches/safari-602.2.14.0-branch/LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width-expected.txt
r178197 r207248 13 13 14 14 TEST COMPLETE 15 PASS getComputedStyle(embedNoHeight).width is "425px" 15 16 PASS getComputedStyle(embedNoHeight).height is "150px" 16 17 PASS getComputedStyle(embedNoWidth).width is "300px" 18 PASS getComputedStyle(embedNoWidth).height is "350px" 17 19 PASS getComputedStyle(embedNoWidthHeight).width is "300px" 18 20 PASS getComputedStyle(embedNoWidthHeight).height is "150px" 21 PASS getComputedStyle(objectNoHeight).width is "425px" 19 22 PASS getComputedStyle(objectNoHeight).height is "150px" 20 23 PASS getComputedStyle(objectNoWidth).width is "300px" 24 PASS getComputedStyle(objectNoWidth).height is "350px" 21 25 PASS getComputedStyle(objectNoWidthHeight).width is "300px" 22 26 PASS getComputedStyle(objectNoWidthHeight).height is "150px" -
branches/safari-602.2.14.0-branch/LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html
r178197 r207248 17 17 setTimeout(function() { 18 18 embedNoHeight = document.getElementById('embed-no-height'); 19 shouldBe('getComputedStyle(embedNoHeight).height', '"150px"') 19 shouldBe('getComputedStyle(embedNoHeight).width', '"425px"'); 20 shouldBe('getComputedStyle(embedNoHeight).height', '"150px"'); 20 21 21 22 embedNoWidth = document.getElementById('embed-no-width'); 22 shouldBe('getComputedStyle(embedNoWidth).width', '"300px"') 23 shouldBe('getComputedStyle(embedNoWidth).width', '"300px"'); 24 shouldBe('getComputedStyle(embedNoWidth).height', '"350px"'); 23 25 24 26 embedNoWidthHeight = document.getElementById('embed-no-width-or-height'); … … 27 29 28 30 objectNoHeight = document.getElementById('object-no-height'); 29 shouldBe('getComputedStyle(objectNoHeight).height', '"150px"') 31 shouldBe('getComputedStyle(objectNoHeight).width', '"425px"'); 32 shouldBe('getComputedStyle(objectNoHeight).height', '"150px"'); 30 33 31 34 objectNoWidth = document.getElementById('object-no-width'); 32 shouldBe('getComputedStyle(objectNoWidth).width', '"300px"') 35 shouldBe('getComputedStyle(objectNoWidth).width', '"300px"'); 36 shouldBe('getComputedStyle(objectNoWidth).height', '"350px"'); 33 37 34 38 objectNoWidthHeight = document.getElementById('object-no-width-or-height'); -
branches/safari-602.2.14.0-branch/LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html
r178197 r207248 21 21 objectNoEmbed = document.getElementById('object-no-embed'); 22 22 23 // Test we don't change any embe /object tag to iframe.23 // Test we don't change any embed/object tag to iframe. 24 24 shouldBe('normalEmbed.tagName', '"EMBED"'); 25 25 shouldBe('elinkEmbed.tagName', '"EMBED"'); … … 32 32 // Test we have the shadow root and the iframe player. 33 33 normalEmbedShadowRoot = internals.shadowRoot(normalEmbed); 34 shouldBe('internals.shadowPseudoId(normalEmbedShadowRoot.firstChild)', '"- apple-youtube-shadow-iframe"');34 shouldBe('internals.shadowPseudoId(normalEmbedShadowRoot.firstChild)', '"-webkit-plugin-replacement"'); 35 35 shouldBe('normalEmbedShadowRoot.firstChild.firstChild.tagName', '"IFRAME"'); 36 36 37 37 objectEmbedShadowRoot = internals.shadowRoot(objectEmbed); 38 shouldBe('internals.shadowPseudoId(objectEmbedShadowRoot.firstChild)', '"- apple-youtube-shadow-iframe"');38 shouldBe('internals.shadowPseudoId(objectEmbedShadowRoot.firstChild)', '"-webkit-plugin-replacement"'); 39 39 shouldBe('objectEmbedShadowRoot.firstChild.firstChild.tagName', '"IFRAME"'); 40 40 41 41 objectNoEmbedShadowRoot = internals.shadowRoot(objectNoEmbed); 42 shouldBe('internals.shadowPseudoId(objectNoEmbedShadowRoot.firstChild)', '"- apple-youtube-shadow-iframe"');42 shouldBe('internals.shadowPseudoId(objectNoEmbedShadowRoot.firstChild)', '"-webkit-plugin-replacement"'); 43 43 shouldBe('objectNoEmbedShadowRoot.firstChild.firstChild.tagName', '"IFRAME"'); 44 44 -
branches/safari-602.2.14.0-branch/Source/WebCore/ChangeLog
r207247 r207248 1 2016-10-11 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r203522. rdar://problem/28476959 4 5 2016-07-21 Daniel Bates <dabates@apple.com> 6 7 REGRESSION: Plugin replaced YouTube Flash videos always have the same width 8 https://bugs.webkit.org/show_bug.cgi?id=159998 9 <rdar://problem/27462285> 10 11 Reviewed by Simon Fraser. 12 13 Fixes an issue where the width of a plugin replaced YouTube video loaded via an HTML embed 14 element would always have the same width regardless of value of the width attribute. 15 16 For YouTube Flash videos the YouTube plugin replacement substitutes a shadow DOM subtree 17 for the default renderer of an HTML embed element. The root of this shadow DOM subtree 18 is an HTML div element. Currently we set inline styles on this <div> when it is instantiated. 19 In particular, we set inline display and position to "inline-block" and "relative", respectively, 20 and set an invalid height and width (we specify a font weight value instead of a CSS length value 21 - this causes an ASSERT_NOT_REACHED() assertion failure in StyleBuilderConverter::convertLengthSizing() 22 in a debug build). These styles never worked as intended and we ultimately created an inline 23 renderer (ignoring display "inline-block") that had auto width and height. Instead it is sufficient 24 to remove all these inline styles and create a RenderBlockFlow renderer for this <div> so that it 25 renders as a block, non-replaced element to achieve the intended illusion that the <embed> is a 26 single element. 27 28 * html/shadow/YouTubeEmbedShadowElement.cpp: Remove unused header HTMLEmbedElement.h and include 29 header RenderBlockFlow.h. Also update copyright in license block. 30 (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement): Remove inline styles as these 31 never worked as intended. 32 (WebCore::YouTubeEmbedShadowElement::createElementRenderer): Override; create a block-flow 33 renderer for us so that we layout as a block, non-replaced element. 34 * html/shadow/YouTubeEmbedShadowElement.h: 35 1 36 2016-10-11 Matthew Hanson <matthew_hanson@apple.com> 2 37 -
branches/safari-602.2.14.0-branch/Source/WebCore/html/shadow/YouTubeEmbedShadowElement.cpp
r183975 r207248 1 1 /* 2 * Copyright (C) 2012 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2012-2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #include "YouTubeEmbedShadowElement.h" 28 28 29 #include " HTMLEmbedElement.h"29 #include "RenderBlockFlow.h" 30 30 31 31 namespace WebCore { … … 40 40 { 41 41 setPseudo(AtomicString("-webkit-plugin-replacement", AtomicString::ConstructFromLiteral)); 42 } 42 43 43 setInlineStyleProperty(CSSPropertyDisplay, CSSValueInlineBlock); 44 setInlineStyleProperty(CSSPropertyPosition, CSSValueRelative); 45 setInlineStyleProperty(CSSPropertyWidth, CSSValue100); 46 setInlineStyleProperty(CSSPropertyHeight, CSSValue100); 44 RenderPtr<RenderElement> YouTubeEmbedShadowElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) 45 { 46 return createRenderer<RenderBlockFlow>(*this, WTFMove(style)); 47 47 } 48 48 -
branches/safari-602.2.14.0-branch/Source/WebCore/html/shadow/YouTubeEmbedShadowElement.h
r183975 r207248 36 36 static Ref<YouTubeEmbedShadowElement> create(Document&); 37 37 38 RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; 39 38 40 private: 39 41 YouTubeEmbedShadowElement(Document&);
Note: See TracChangeset
for help on using the changeset viewer.