Changeset 209439 in webkit


Ignore:
Timestamp:
Dec 6, 2016, 5:23:54 PM (9 years ago)
Author:
dino@apple.com
Message:

Apply styling to media documents with modern controls
https://bugs.webkit.org/show_bug.cgi?id=165499
<rdar://problems/29543847>

Reviewed by Antoine Quint.

Source/WebCore:

Existing MediaDocuments got styling from the injected style
sheet, which had rules for such documents. The modern media controls
use a scoped style rule, so we can't touch the document style. Instead,
inline the style directly from MediaDocument.

Test: media/modern-media-controls/media-documents/background-color-and-centering.html

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure):

LayoutTests:

Make sure that the small test video has the correct background,
and is not anchored to the top left of the page.

  • media/modern-media-controls/media-documents/background-color-and-centering-expected.html: Added.
  • media/modern-media-controls/media-documents/background-color-and-centering.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r209437 r209439  
     12016-12-06  Dean Jackson  <dino@apple.com>
     2
     3        Apply styling to media documents with modern controls
     4        https://bugs.webkit.org/show_bug.cgi?id=165499
     5        <rdar://problems/29543847>
     6
     7        Reviewed by Antoine Quint.
     8
     9        Make sure that the small test video has the correct background,
     10        and is not anchored to the top left of the page.
     11
     12        * media/modern-media-controls/media-documents/background-color-and-centering-expected.html: Added.
     13        * media/modern-media-controls/media-documents/background-color-and-centering.html: Added.
     14
    1152016-12-05  Jiewen Tan  <jiewen_tan@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r209438 r209439  
     12016-12-06  Dean Jackson  <dino@apple.com>
     2
     3        Apply styling to media documents with modern controls
     4        https://bugs.webkit.org/show_bug.cgi?id=165499
     5        <rdar://problems/29543847>
     6
     7        Reviewed by Antoine Quint.
     8
     9        Existing MediaDocuments got styling from the injected style
     10        sheet, which had rules for such documents. The modern media controls
     11        use a scoped style rule, so we can't touch the document style. Instead,
     12        inline the style directly from MediaDocument.
     13
     14        Test: media/modern-media-controls/media-documents/background-color-and-centering.html
     15
     16        * html/MediaDocument.cpp:
     17        (WebCore::MediaDocumentParser::createDocumentStructure):
     18
    1192016-12-06  Zalan Bujtas  <zalan@apple.com>
    220
  • trunk/Source/WebCore/html/MediaDocument.cpp

    r208658 r209439  
    9999    auto metaElement = HTMLMetaElement::create(document);
    100100    metaElement->setAttributeWithoutSynchronization(nameAttr, AtomicString("viewport", AtomicString::ConstructFromLiteral));
    101     metaElement->setAttributeWithoutSynchronization(contentAttr, AtomicString("width=device-width,initial-scale=1,user-scalable=no", AtomicString::ConstructFromLiteral));
     101    metaElement->setAttributeWithoutSynchronization(contentAttr, AtomicString("width=device-width,initial-scale=1", AtomicString::ConstructFromLiteral));
    102102    headElement->appendChild(metaElement);
    103103#endif
Note: See TracChangeset for help on using the changeset viewer.