Title: [174561] tags/Safari-601.1.3/Source/WebCore

Diff

Modified: tags/Safari-601.1.3/Source/WebCore/ChangeLog (174560 => 174561)


--- tags/Safari-601.1.3/Source/WebCore/ChangeLog	2014-10-10 06:13:38 UTC (rev 174560)
+++ tags/Safari-601.1.3/Source/WebCore/ChangeLog	2014-10-10 06:21:32 UTC (rev 174561)
@@ -1,3 +1,7 @@
+2014-10-09  Babak Shafiei  <[email protected]>
+
+        Roll out r174405. <rdar://problem/18603925>
+
 2014-10-08  Myles C. Maxfield  <[email protected]>
 
         Unreviewed build fix after r174480. Broke iOS build.

Modified: tags/Safari-601.1.3/Source/WebCore/dom/Document.cpp (174560 => 174561)


--- tags/Safari-601.1.3/Source/WebCore/dom/Document.cpp	2014-10-10 06:13:38 UTC (rev 174560)
+++ tags/Safari-601.1.3/Source/WebCore/dom/Document.cpp	2014-10-10 06:21:32 UTC (rev 174561)
@@ -3001,6 +3001,15 @@
     m_viewportArguments = ViewportArguments(origin);
     processArguments(features, (void*)&m_viewportArguments, &setViewportFeature);
 
+#if PLATFORM(IOS)
+    // FIXME: <rdar://problem/8955959> Investigate moving to ToT WebKit's extended Viewport Implementation
+    // Moving to ToT's implementation would mean calling findConfigurationForViewportData, which does
+    // bounds checking and determining concrete values for ValueAuto which we already do in UIKit.
+    // To maintain old behavior, we just need to update a few values, leaving Auto's for UIKit.
+    if (Page* page = this->page())
+        finalizeViewportArguments(m_viewportArguments, page->chrome().screenSize());
+#endif
+
     updateViewportArguments();
 }
 

Modified: tags/Safari-601.1.3/Source/WebCore/dom/ViewportArguments.cpp (174560 => 174561)


--- tags/Safari-601.1.3/Source/WebCore/dom/ViewportArguments.cpp	2014-10-10 06:13:38 UTC (rev 174560)
+++ tags/Safari-601.1.3/Source/WebCore/dom/ViewportArguments.cpp	2014-10-10 06:21:32 UTC (rev 174561)
@@ -401,6 +401,21 @@
         reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, keyString, String());
 }
 
+#if PLATFORM(IOS)
+void finalizeViewportArguments(ViewportArguments& arguments, const FloatSize& screenSize)
+{
+    if (arguments.width == ViewportArguments::ValueDeviceWidth)
+        arguments.width = screenSize.width();
+    else if (arguments.width == ViewportArguments::ValueDeviceHeight)
+        arguments.width = screenSize.height();
+
+    if (arguments.height == ViewportArguments::ValueDeviceWidth)
+        arguments.height = screenSize.width();
+    else if (arguments.height == ViewportArguments::ValueDeviceHeight)
+        arguments.height = screenSize.height();
+}
+#endif
+
 static const char* viewportErrorMessageTemplate(ViewportErrorCode errorCode)
 {
     static const char* const errors[] = {

Modified: tags/Safari-601.1.3/Source/WebCore/dom/ViewportArguments.h (174560 => 174561)


--- tags/Safari-601.1.3/Source/WebCore/dom/ViewportArguments.h	2014-10-10 06:13:38 UTC (rev 174560)
+++ tags/Safari-601.1.3/Source/WebCore/dom/ViewportArguments.h	2014-10-10 06:21:32 UTC (rev 174561)
@@ -152,6 +152,10 @@
 void setViewportFeature(const String& keyString, const String& valueString, Document*, void* data);
 void reportViewportWarning(Document*, ViewportErrorCode, const String& replacement1, const String& replacement2);
 
+#if PLATFORM(IOS)
+void finalizeViewportArguments(ViewportArguments&, const FloatSize& screenSize);
+#endif
+
 } // namespace WebCore
 
 #endif // ViewportArguments_h

Modified: tags/Safari-601.1.3/Source/WebCore/page/ViewportConfiguration.cpp (174560 => 174561)


--- tags/Safari-601.1.3/Source/WebCore/page/ViewportConfiguration.cpp	2014-10-10 06:13:38 UTC (rev 174560)
+++ tags/Safari-601.1.3/Source/WebCore/page/ViewportConfiguration.cpp	2014-10-10 06:21:32 UTC (rev 174561)
@@ -272,8 +272,8 @@
 
     double minimumViewportArgumentsDimension = 10;
     double maximumViewportArgumentsDimension = 10000;
-    applyViewportArgument(m_configuration.width, viewportArgumentsOverridesWidth, viewportArgumentsLength(m_viewportArguments.width), minimumViewportArgumentsDimension, maximumViewportArgumentsDimension);
-    applyViewportArgument(m_configuration.height, viewportArgumentsOverridesHeight, viewportArgumentsLength(m_viewportArguments.height), minimumViewportArgumentsDimension, maximumViewportArgumentsDimension);
+    applyViewportArgument(m_configuration.width, viewportArgumentsOverridesWidth, m_viewportArguments.width, minimumViewportArgumentsDimension, maximumViewportArgumentsDimension);
+    applyViewportArgument(m_configuration.height, viewportArgumentsOverridesHeight, m_viewportArguments.height, minimumViewportArgumentsDimension, maximumViewportArgumentsDimension);
 
     if (viewportArgumentsOverridesInitialScale || viewportArgumentsOverridesWidth || viewportArgumentsOverridesHeight) {
         m_configuration.initialScaleIsSet = viewportArgumentsOverridesInitialScale;
@@ -290,15 +290,6 @@
 #endif
 }
 
-double ViewportConfiguration::viewportArgumentsLength(double length) const
-{
-    if (length == ViewportArguments::ValueDeviceWidth)
-        return activeMinimumLayoutSizeInScrollViewCoordinates().width();
-    if (length == ViewportArguments::ValueDeviceHeight)
-        return activeMinimumLayoutSizeInScrollViewCoordinates().height();
-    return length;
-}
-
 int ViewportConfiguration::layoutWidth() const
 {
     ASSERT(!constraintsAreAllRelative(m_configuration));

Modified: tags/Safari-601.1.3/Source/WebCore/page/ViewportConfiguration.h (174560 => 174561)


--- tags/Safari-601.1.3/Source/WebCore/page/ViewportConfiguration.h	2014-10-10 06:13:38 UTC (rev 174560)
+++ tags/Safari-601.1.3/Source/WebCore/page/ViewportConfiguration.h	2014-10-10 06:21:32 UTC (rev 174561)
@@ -105,7 +105,6 @@
     
 private:
     void updateConfiguration();
-    double viewportArgumentsLength(double length) const;
     int layoutWidth() const;
     int layoutHeight() const;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to