WebKit Bugzilla
Attachment 339114 Details for
Bug 185067
: Test bug (please ignore)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Test patch
bug-185067-20180430093638.patch (text/plain), 7.76 KB, created by
Wenson Hsieh
on 2018-04-30 09:36:39 PDT
(
hide
)
Description:
Test patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-04-30 09:36:39 PDT
Size:
7.76 KB
patch
obsolete
>Subversion Revision: 231141 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a9717c7e5088cd9207ceb416b4e236a9bdfeb962..a7268922a49ab88622f8e841feef7b2fe34a29f9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,12 @@ >+2018-04-30 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Test bug (please ignore) >+ https://bugs.webkit.org/show_bug.cgi?id=185067 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Only an EWS pass. Nothing to see here. >+ > 2018-04-28 Zalan Bujtas <zalan@apple.com> > > [LFC] Add LayoutTreeBuilder class to generate the layout tree >diff --git a/Source/WebCore/dom/ViewportArguments.cpp b/Source/WebCore/dom/ViewportArguments.cpp >index a77b979ca8586da9577fbb21dd8e88c1afa4581f..28d2f591c2d2cf97c24fe02409d60b62c76f13fc 100644 >--- a/Source/WebCore/dom/ViewportArguments.cpp >+++ b/Source/WebCore/dom/ViewportArguments.cpp >@@ -421,8 +421,6 @@ void setViewportFeature(ViewportArguments& arguments, Document& document, String > arguments.shrinkToFit = findBooleanValue(document, key, value); > else if (equalLettersIgnoringASCIICase(key, "viewport-fit") && document.settings().viewportFitEnabled()) > arguments.viewportFit = parseViewportFitValue(document, key, value); >- else if (equalLettersIgnoringASCIICase(key, "min-device-width") && RuntimeEnabledFeatures::sharedFeatures().minDeviceWidthEnabled()) >- arguments.minDeviceWidth = numericPrefix(document, key, value); > else > reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, key); > } >@@ -478,7 +476,7 @@ TextStream& operator<<(TextStream& ts, const ViewportArguments& viewportArgument > { > TextStream::IndentScope indentScope(ts); > >- ts << "\n" << indent << "(width " << viewportArguments.width << ", minWidth " << viewportArguments.minWidth << ", maxWidth " << viewportArguments.maxWidth << ", minDeviceWidth " << viewportArguments.minDeviceWidth << ")"; >+ ts << "\n" << indent << "(width " << viewportArguments.width << ", minWidth " << viewportArguments.minWidth << ", maxWidth " << viewportArguments.maxWidth << ")"; > ts << "\n" << indent << "(height " << viewportArguments.height << ", minHeight " << viewportArguments.minHeight << ", maxHeight " << viewportArguments.maxHeight << ")"; > ts << "\n" << indent << "(zoom " << viewportArguments.zoom << ", minZoom " << viewportArguments.minZoom << ", maxZoom " << viewportArguments.maxZoom << ")"; > >diff --git a/Source/WebCore/dom/ViewportArguments.h b/Source/WebCore/dom/ViewportArguments.h >index 4a8e8cbdf433cf3887248a524d44af122b167aa5..4f1afea34001b8bbd9c26fa20b1c167de79582fb 100644 >--- a/Source/WebCore/dom/ViewportArguments.h >+++ b/Source/WebCore/dom/ViewportArguments.h >@@ -93,7 +93,6 @@ struct ViewportArguments { > float width { ValueAuto }; > float minWidth { ValueAuto }; > float maxWidth { ValueAuto }; >- float minDeviceWidth { ValueAuto }; > float height { ValueAuto }; > float minHeight { ValueAuto }; > float maxHeight { ValueAuto }; >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h >index 29c49d144b97a279859c968f10d23b510df4a030..2e60b0c38e5416364722ec2bdccf129d4132b88c 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.h >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h >@@ -253,9 +253,6 @@ public: > void setFromOriginResponseHeaderEnabled(bool isEnabled) { m_fromOriginResponseHeaderEnabled = isEnabled; } > bool fromOriginResponseHeaderEnabled() const { return m_fromOriginResponseHeaderEnabled; } > >- void setMinDeviceWidthEnabled(bool isEnabled) { m_minDeviceWidthEnabled = isEnabled; } >- bool minDeviceWidthEnabled() const { return m_minDeviceWidthEnabled; } >- > WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures(); > > private: >diff --git a/Source/WebCore/page/ViewportConfiguration.cpp b/Source/WebCore/page/ViewportConfiguration.cpp >index 648b8d307c7517d601a770905b2f0c8c425840ac..3126d9f7b9cc93a4062981b2ad9e7db133e6bfd5 100644 >--- a/Source/WebCore/page/ViewportConfiguration.cpp >+++ b/Source/WebCore/page/ViewportConfiguration.cpp >@@ -45,11 +45,8 @@ static bool constraintsAreAllRelative(const ViewportConfiguration::Parameters& c > } > #endif > >-static float computedMinDeviceWidth(float minDeviceWidth) >+static float platformDeviceWidthOverride() > { >- if (minDeviceWidth != ViewportArguments::ValueAuto) >- return minDeviceWidth; >- > #if ENABLE(EXTRA_ZOOM_MODE) > return 320; > #else >@@ -135,9 +132,10 @@ IntSize ViewportConfiguration::layoutSize() const > return IntSize(layoutWidth(), layoutHeight()); > } > >-bool ViewportConfiguration::shouldOverrideDeviceWidthWithMinDeviceWidth() const >+bool ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit() const > { >- return m_viewLayoutSize.width() < computedMinDeviceWidth(m_viewportArguments.minDeviceWidth); >+ auto viewWidth = m_viewLayoutSize.width(); >+ return m_viewportArguments.shrinkToFit != 0. && 0 < viewWidth && viewWidth < platformDeviceWidthOverride(); > } > > bool ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints() const >@@ -145,7 +143,7 @@ bool ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints() const > if (!m_canIgnoreScalingConstraints) > return false; > >- if (shouldOverrideDeviceWidthWithMinDeviceWidth()) >+ if (shouldOverrideDeviceWidthAndShrinkToFit()) > return true; > > if (!m_configuration.allowsShrinkToFit) >@@ -183,7 +181,7 @@ bool ViewportConfiguration::shouldIgnoreScalingConstraints() const > > bool ViewportConfiguration::shouldIgnoreScalingConstraintsRegardlessOfContentSize() const > { >- return m_canIgnoreScalingConstraints && shouldOverrideDeviceWidthWithMinDeviceWidth(); >+ return m_canIgnoreScalingConstraints && shouldOverrideDeviceWidthAndShrinkToFit(); > } > > double ViewportConfiguration::initialScaleFromSize(double width, double height, bool shouldIgnoreScalingConstraints) const >@@ -371,7 +369,7 @@ void ViewportConfiguration::updateConfiguration() > m_configuration.allowsUserScaling = m_viewportArguments.userZoom != 0.; > > if (booleanViewportArgumentIsSet(m_viewportArguments.shrinkToFit)) >- m_configuration.allowsShrinkToFit = shouldOverrideDeviceWidthWithMinDeviceWidth() || m_viewportArguments.shrinkToFit != 0.; >+ m_configuration.allowsShrinkToFit = m_viewportArguments.shrinkToFit != 0.; > > m_configuration.avoidsUnsafeArea = m_viewportArguments.viewportFit != ViewportFit::Cover; > >@@ -380,12 +378,12 @@ void ViewportConfiguration::updateConfiguration() > > void ViewportConfiguration::updateMinimumLayoutSize() > { >- if (!m_viewLayoutSize.width() || !shouldOverrideDeviceWidthWithMinDeviceWidth()) { >+ if (!shouldOverrideDeviceWidthAndShrinkToFit()) { > m_minimumLayoutSize = m_viewLayoutSize; > return; > } > >- auto minDeviceWidth = computedMinDeviceWidth(m_viewportArguments.minDeviceWidth); >+ float minDeviceWidth = platformDeviceWidthOverride(); > m_minimumLayoutSize = FloatSize(minDeviceWidth, std::roundf(m_viewLayoutSize.height() * (minDeviceWidth / m_viewLayoutSize.width()))); > } > >diff --git a/Source/WebCore/page/ViewportConfiguration.h b/Source/WebCore/page/ViewportConfiguration.h >index bff1007677f2345c9a9517a52765abd370babd1e..f790cf60db838dd8c5c677fc9fa494a6fa1bed6d 100644 >--- a/Source/WebCore/page/ViewportConfiguration.h >+++ b/Source/WebCore/page/ViewportConfiguration.h >@@ -82,7 +82,7 @@ public: > const ViewportArguments& viewportArguments() const { return m_viewportArguments; } > WEBCORE_EXPORT bool setViewportArguments(const ViewportArguments&); > >- bool shouldOverrideDeviceWidthWithMinDeviceWidth() const; >+ bool shouldOverrideDeviceWidthAndShrinkToFit() const; > > WEBCORE_EXPORT bool setCanIgnoreScalingConstraints(bool); > void setForceAlwaysUserScalable(bool forceAlwaysUserScalable) { m_forceAlwaysUserScalable = forceAlwaysUserScalable; }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185067
:
338967
| 339114