Handle meta viewport in HTMLPreloadScanner
[WebKit-https.git] / Source / WebCore / ChangeLog
index 6184e7f..c0b7dd2 100644 (file)
@@ -1,3 +1,29 @@
+2015-05-07  Yoav Weiss  <yoav@yoav.ws>
+
+        Handle meta viewport in HTMLPreloadScanner
+        https://bugs.webkit.org/show_bug.cgi?id=144640
+
+        Reviewed by Dean Jackson.
+
+        Add support for the <meta> tag to the HTMLPreloadScanner
+        and when the meta tag's name is viewport, get the document
+        to process the tag's attribute value, and set its ViewportArgument.
+
+        Tests: fast/dom/HTMLMetaElement/meta-preloader.html
+
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::tagIdFor): Added meta.
+        (WebCore::TokenPreloadScanner::initiatorFor): Added meta.
+        (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered.
+        (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
+        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags.
+        (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working.
+        * html/parser/HTMLPreloadScanner.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function.
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2015-05-07  Zalan Bujtas  <zalan@apple.com>
 
         REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width.