Diff
Modified: trunk/Source/WebKit/ChangeLog (227613 => 227614)
--- trunk/Source/WebKit/ChangeLog 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/ChangeLog 2018-01-25 18:43:46 UTC (rev 227614)
@@ -1,3 +1,22 @@
+2018-01-25 David Hyatt <[email protected]>
+
+ Enable lines clamp support for Apple Mail by default
+ https://bugs.webkit.org/show_bug.cgi?id=182113
+
+ Reviewed by Dean Jackson.
+
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode const):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::creationParameters):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/mac/WebPageProxyMac.mm:
+ (WebKit::WebPageProxy::appleMailLinesClampEnabled):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::m_cpuLimit):
+
2018-01-25 Sergio Villar Senin <[email protected]>
[WebVR][GTK][WPE] Remove the WebVR public API added in r227518
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (227613 => 227614)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2018-01-25 18:43:46 UTC (rev 227614)
@@ -94,6 +94,7 @@
encoder << smartInsertDeleteEnabled;
#endif
encoder << appleMailPaginationQuirkEnabled;
+ encoder << appleMailLinesClampEnabled;
encoder << shouldScaleViewToFitDocument;
encoder.encodeEnum(userInterfaceLayoutDirection);
encoder.encodeEnum(observedLayoutMilestones);
@@ -252,6 +253,9 @@
if (!decoder.decode(parameters.appleMailPaginationQuirkEnabled))
return std::nullopt;
+ if (!decoder.decode(parameters.appleMailLinesClampEnabled))
+ return std::nullopt;
+
if (!decoder.decode(parameters.shouldScaleViewToFitDocument))
return std::nullopt;
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (227613 => 227614)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2018-01-25 18:43:46 UTC (rev 227614)
@@ -151,6 +151,7 @@
bool smartInsertDeleteEnabled;
#endif
bool appleMailPaginationQuirkEnabled;
+ bool appleMailLinesClampEnabled;
bool shouldScaleViewToFitDocument;
WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (227613 => 227614)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-01-25 18:43:46 UTC (rev 227614)
@@ -5828,6 +5828,14 @@
#else
parameters.appleMailPaginationQuirkEnabled = false;
#endif
+
+#if PLATFORM(MAC)
+ // FIXME: Need to support iOS too, but there is no isAppleMail for iOS.
+ parameters.appleMailLinesClampEnabled = appleMailLinesClampEnabled();
+#else
+ parameters.appleMailLinesClampEnabled = false;
+#endif
+
#if PLATFORM(COCOA)
parameters.smartInsertDeleteEnabled = m_isSmartInsertDeleteEnabled;
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (227613 => 227614)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-01-25 18:43:46 UTC (rev 227614)
@@ -1507,6 +1507,11 @@
bool appleMailPaginationQuirkEnabled();
#endif
+#if PLATFORM(MAC)
+ // FIXME: Need to support iOS too, but there is no isAppleMail for iOS.
+ bool appleMailLinesClampEnabled();
+#endif
+
// Spelling and grammar.
void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
Modified: trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (227613 => 227614)
--- trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm 2018-01-25 18:43:46 UTC (rev 227614)
@@ -538,6 +538,11 @@
return MacApplication::isAppleMail();
}
+bool WebPageProxy::appleMailLinesClampEnabled()
+{
+ return MacApplication::isAppleMail();
+}
+
void WebPageProxy::setFont(const String& fontFamily, double fontSize, uint64_t fontTraits)
{
if (!isValid())
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (227613 => 227614)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-01-25 18:40:22 UTC (rev 227613)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-01-25 18:43:46 UTC (rev 227614)
@@ -554,7 +554,8 @@
m_page->settings().setMediaKeysStorageDirectory(manager->mediaKeyStorageDirectory());
#endif
m_page->settings().setAppleMailPaginationQuirkEnabled(parameters.appleMailPaginationQuirkEnabled);
-
+ m_page->settings().setAppleMailLinesClampEnabled(parameters.appleMailLinesClampEnabled);
+
if (parameters.viewScaleFactor != 1)
scaleView(parameters.viewScaleFactor);