<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[212325] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/212325">212325</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2017-02-14 15:11:06 -0800 (Tue, 14 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>HTML Form Validation bubble should take minimum font size setting into consideration
https://bugs.webkit.org/show_bug.cgi?id=168271
&lt;rdar://problem/29869869&gt;

Reviewed by Simon Fraser.

Source/WebCore:

HTML Form Validation bubble should take minimum font size setting into consideration
for better accessibility.

Test: fast/forms/validation-message-minimum-font-size.html

* platform/ValidationBubble.h:
(WebCore::ValidationBubble::create):
(WebCore::ValidationBubble::fontSize):
* platform/ios/ValidationBubbleIOS.mm:
(WebCore::ValidationBubble::ValidationBubble):
* platform/mac/ValidationBubbleMac.mm:
(WebCore::ValidationBubble::ValidationBubble):
Update the ValidationBubble constructor to take in Settings. For now, there is a
single setting that is the minimum font size and that is taken into account when
setting the font size of the validation bubble text.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _contentsOfUserInterfaceItem:]):
Return font size used in the validation bubble.

(-[WebView showFormValidationMessage:withAnchorRect:]):
Pass minimum font size setting when constructing the validation bubble.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _contentsOfUserInterfaceItem:]):
Return font size used in the validation bubble.

* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::createValidationBubble):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showValidationMessage):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createValidationBubble):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showValidationMessage):
Pass minimum font size setting when constructing the form validation bubble.

Tools:

Extend UIScriptController's contentsOfUserInterfaceItem() to also return the
font size of the validation bubble.

Add an overridePreference() method to UIScriptController. This is currently
used to override the value of the minimumFontSize setting. testRunner's
overridePreference() is not usable on WK2 because it does not update the
value of the preference on the UIProcess side.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::overridePreference):
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::overridePreference):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::overridePreference):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::contentsOfUserInterfaceItem):
(WTR::UIScriptController::overridePreference):

LayoutTests:

Add layout test coverage.

* fast/forms/validation-message-minimum-font-size-expected.txt: Added.
* fast/forms/validation-message-minimum-font-size.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformValidationBubbleh">trunk/Source/WebCore/platform/ValidationBubble.h</a></li>
<li><a href="#trunkSourceWebCoreplatformiosValidationBubbleIOSmm">trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacValidationBubbleMacmm">trunk/Source/WebCore/platform/mac/ValidationBubbleMac.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosUIScriptControllerIOSmm">trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacUIScriptControllerMacmm">trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextBindingsUIScriptControlleridl">trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextUIScriptControllercpp">trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp</a></li>
<li><a href="#trunkToolsTestRunnerSharedUIScriptContextUIScriptControllerh">trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunneriosUIScriptControllerIOSmm">trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacUIScriptControllerMacmm">trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformsvalidationmessageminimumfontsizeexpectedtxt">trunk/LayoutTests/fast/forms/validation-message-minimum-font-size-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsvalidationmessageminimumfontsizehtml">trunk/LayoutTests/fast/forms/validation-message-minimum-font-size.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/LayoutTests/ChangeLog        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-02-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTML Form Validation bubble should take minimum font size setting into consideration
+        https://bugs.webkit.org/show_bug.cgi?id=168271
+        &lt;rdar://problem/29869869&gt;
+
+        Reviewed by Simon Fraser.
+
+        Add layout test coverage.
+
+        * fast/forms/validation-message-minimum-font-size-expected.txt: Added.
+        * fast/forms/validation-message-minimum-font-size.html: Added.
+
</ins><span class="cx"> 2017-02-14  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove debug flag from flaky test imported/w3c/web-platform-tests/dom/events/EventListener-invoke-legacy.html.
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsvalidationmessageminimumfontsizeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/validation-message-minimum-font-size-expected.txt (0 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/validation-message-minimum-font-size-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/forms/validation-message-minimum-font-size-expected.txt        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Required text input: 
+Tests that the font used for validation bubble is aware of the minimumFontSize setting.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+PASS validationBubbleContents.fontSize &gt; 0 is true
+PASS validationBubbleContents.fontSize &lt; 24 is true
+PASS validationBubbleContents.fontSize is 24
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsvalidationmessageminimumfontsizehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/validation-message-minimum-font-size.html (0 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/validation-message-minimum-font-size.html                                (rev 0)
+++ trunk/LayoutTests/fast/forms/validation-message-minimum-font-size.html        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;form&gt;
+  Required text input: &lt;input type=&quot;text&quot; id=&quot;required_text_input&quot; required&gt;&lt;input id=&quot;required_text_input_submit&quot; type=&quot;submit&quot;&gt;
+&lt;/form&gt;
+&lt;div id=&quot;description&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+description(&quot;Tests that the font used for validation bubble is aware of the minimumFontSize setting.&quot;);
+jsTestIsAsync = true;
+
+function getValidationBubbleContents()
+{
+    return `
+    (function() {
+        return JSON.stringify(uiController.contentsOfUserInterfaceItem('validationBubble'));
+    })();`
+}
+
+function setMinimumFontSize()
+{
+    return `
+    (function() {
+        uiController.overridePreference('WebKitMinimumFontSize', '24');
+        uiController.uiScriptComplete(&quot;Done&quot;);
+    })();`
+}
+
+onload = function() {
+    input = document.getElementById(&quot;required_text_input&quot;);
+    submit = document.getElementById(&quot;required_text_input_submit&quot;);
+    submit.click();
+
+    testRunner.runUIScript(getValidationBubbleContents(), function(result) {
+        validationBubbleContents = JSON.parse(result).validationBubble;
+        shouldBeTrue(&quot;validationBubbleContents.fontSize &gt; 0&quot;);
+        shouldBeTrue(&quot;validationBubbleContents.fontSize &lt; 24&quot;);
+
+        testRunner.runUIScript(setMinimumFontSize(), function() {
+            submit.click();
+
+            testRunner.runUIScript(getValidationBubbleContents(), function(result) {
+                validationBubbleContents = JSON.parse(result).validationBubble;
+                shouldBe(&quot;validationBubbleContents.fontSize&quot;, &quot;24&quot;);
+                finishJSTest();
+            });
+        });
+    });
+}
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebCore/ChangeLog        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2017-02-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTML Form Validation bubble should take minimum font size setting into consideration
+        https://bugs.webkit.org/show_bug.cgi?id=168271
+        &lt;rdar://problem/29869869&gt;
+
+        Reviewed by Simon Fraser.
+
+        HTML Form Validation bubble should take minimum font size setting into consideration
+        for better accessibility.
+
+        Test: fast/forms/validation-message-minimum-font-size.html
+
+        * platform/ValidationBubble.h:
+        (WebCore::ValidationBubble::create):
+        (WebCore::ValidationBubble::fontSize):
+        * platform/ios/ValidationBubbleIOS.mm:
+        (WebCore::ValidationBubble::ValidationBubble):
+        * platform/mac/ValidationBubbleMac.mm:
+        (WebCore::ValidationBubble::ValidationBubble):
+        Update the ValidationBubble constructor to take in Settings. For now, there is a
+        single setting that is the minimum font size and that is taken into account when
+        setting the font size of the validation bubble text.
+
</ins><span class="cx"> 2017-02-14  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [MediaStream] add navigator.getUserMedia for compatibility with legacy content
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformValidationBubbleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ValidationBubble.h (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ValidationBubble.h        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebCore/platform/ValidationBubble.h        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -55,14 +55,19 @@
</span><span class="cx"> 
</span><span class="cx"> class ValidationBubble : public RefCounted&lt;ValidationBubble&gt; {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;ValidationBubble&gt; create(PlatformView* view, const String&amp; message)
</del><ins>+    struct Settings {
+        double minimumFontSize { 0 };
+    };
+
+    static Ref&lt;ValidationBubble&gt; create(PlatformView* view, const String&amp; message, const Settings&amp; settings)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new ValidationBubble(view, message));
</del><ins>+        return adoptRef(*new ValidationBubble(view, message, settings));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT ~ValidationBubble();
</span><span class="cx"> 
</span><span class="cx">     const String&amp; message() const { return m_message; }
</span><ins>+    double fontSize() const { return m_fontSize; }
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     WEBCORE_EXPORT void setAnchorRect(const IntRect&amp; anchorRect, UIViewController* presentingViewController = nullptr);
</span><span class="lines">@@ -72,10 +77,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WEBCORE_EXPORT ValidationBubble(PlatformView*, const String&amp; message);
</del><ins>+    WEBCORE_EXPORT ValidationBubble(PlatformView*, const String&amp; message, const Settings&amp;);
</ins><span class="cx"> 
</span><span class="cx">     PlatformView* m_view;
</span><span class="cx">     String m_message;
</span><ins>+    double m_fontSize { 0 };
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     RetainPtr&lt;NSPopover&gt; m_popover;
</span><span class="cx"> #elif PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosValidationBubbleIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> static const CGFloat verticalPadding = 9;
</span><span class="cx"> static const CGFloat maxLabelWidth = 300;
</span><span class="cx"> 
</span><del>-ValidationBubble::ValidationBubble(UIView* view, const String&amp; message)
</del><ins>+ValidationBubble::ValidationBubble(UIView* view, const String&amp; message, const Settings&amp; settings)
</ins><span class="cx">     : m_view(view)
</span><span class="cx">     , m_message(message)
</span><span class="cx"> {
</span><span class="lines">@@ -110,7 +110,8 @@
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;UILabel&gt; label = adoptNS([[getUILabelClass() alloc] initWithFrame:CGRectZero]);
</span><span class="cx">     [label setText:message];
</span><del>-    [label setFont:[getUIFontClass() systemFontOfSize:14.0]];
</del><ins>+    m_fontSize = std::max(settings.minimumFontSize, 14.0);
+    [label setFont:[getUIFontClass() systemFontOfSize:m_fontSize]];
</ins><span class="cx">     [label setLineBreakMode:NSLineBreakByTruncatingTail];
</span><span class="cx">     [label setNumberOfLines:4];
</span><span class="cx">     [popoverView addSubview:label.get()];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacValidationBubbleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ValidationBubbleMac.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ValidationBubbleMac.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebCore/platform/mac/ValidationBubbleMac.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> static const CGFloat verticalPadding = 5;
</span><span class="cx"> static const CGFloat maxLabelWidth = 300;
</span><span class="cx"> 
</span><del>-ValidationBubble::ValidationBubble(NSView* view, const String&amp; message)
</del><ins>+ValidationBubble::ValidationBubble(NSView* view, const String&amp; message, const Settings&amp; settings)
</ins><span class="cx">     : m_view(view)
</span><span class="cx">     , m_message(message)
</span><span class="cx"> {
</span><span class="lines">@@ -64,6 +64,8 @@
</span><span class="cx">     [label setDrawsBackground:NO];
</span><span class="cx">     [label setBordered:NO];
</span><span class="cx">     [label setStringValue:message];
</span><ins>+    m_fontSize = std::max(settings.minimumFontSize, 13.0);
+    [label setFont:[NSFont systemFontOfSize:m_fontSize]];
</ins><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100
</span><span class="cx">     [label setMaximumNumberOfLines:4];
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2017-02-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTML Form Validation bubble should take minimum font size setting into consideration
+        https://bugs.webkit.org/show_bug.cgi?id=168271
+        &lt;rdar://problem/29869869&gt;
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebView.mm:
+        (-[WebView _contentsOfUserInterfaceItem:]):
+        Return font size used in the validation bubble.
+
+        (-[WebView showFormValidationMessage:withAnchorRect:]):
+        Pass minimum font size setting when constructing the validation bubble.
+
</ins><span class="cx"> 2017-02-14  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove an unused delegate method
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -4341,7 +4341,8 @@
</span><span class="cx">     if ([userInterfaceItem isEqualToString:@&quot;validationBubble&quot;]) {
</span><span class="cx">         auto* validationBubble = _private-&gt;formValidationBubble.get();
</span><span class="cx">         String message = validationBubble ? validationBubble-&gt;message() : emptyString();
</span><del>-        return @{ userInterfaceItem: @{ @&quot;message&quot;: (NSString *)message } };
</del><ins>+        double fontSize = validationBubble ? validationBubble-&gt;fontSize() : 0;
+        return @{ userInterfaceItem: @{ @&quot;message&quot;: (NSString *)message, @&quot;fontSize&quot;: [NSNumber numberWithDouble:fontSize] } };
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return nil;
</span><span class="lines">@@ -9326,7 +9327,8 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: We should enable this on iOS as well.
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    _private-&gt;formValidationBubble = ValidationBubble::create(self, message);
</del><ins>+    double minimumFontSize = _private-&gt;page ? _private-&gt;page-&gt;settings().minimumFontSize() : 0;
+    _private-&gt;formValidationBubble = ValidationBubble::create(self, message, { minimumFontSize });
</ins><span class="cx">     _private-&gt;formValidationBubble-&gt;showRelativeTo(enclosingIntRect([self _convertRectFromRootView:anchorRect]));
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(message);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/ChangeLog        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2017-02-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTML Form Validation bubble should take minimum font size setting into consideration
+        https://bugs.webkit.org/show_bug.cgi?id=168271
+        &lt;rdar://problem/29869869&gt;
+
+        Reviewed by Simon Fraser.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _contentsOfUserInterfaceItem:]):
+        Return font size used in the validation bubble.
+
+        * UIProcess/PageClient.h:
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::createValidationBubble):
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::showValidationMessage):
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::createValidationBubble):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::showValidationMessage):
+        Pass minimum font size setting when constructing the form validation bubble.
+
</ins><span class="cx"> 2017-02-14  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r211879.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -4876,7 +4876,8 @@
</span><span class="cx">     if ([userInterfaceItem isEqualToString:@&quot;validationBubble&quot;]) {
</span><span class="cx">         auto* validationBubble = _page-&gt;validationBubble();
</span><span class="cx">         String message = validationBubble ? validationBubble-&gt;message() : emptyString();
</span><del>-        return @{ userInterfaceItem: @{ @&quot;message&quot;: (NSString *)message } };
</del><ins>+        double fontSize = validationBubble ? validationBubble-&gt;fontSize() : 0;
+        return @{ userInterfaceItem: @{ @&quot;message&quot;: (NSString *)message, @&quot;fontSize&quot;: [NSNumber numberWithDouble:fontSize] } };
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &lt;WebCore/AlternativeTextClient.h&gt;
</span><span class="cx"> #include &lt;WebCore/EditorClient.h&gt;
</span><span class="cx"> #include &lt;WebCore/UserInterfaceLayoutDirection.h&gt;
</span><ins>+#include &lt;WebCore/ValidationBubble.h&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -48,7 +49,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class Cursor;
</span><span class="cx"> class TextIndicator;
</span><del>-class ValidationBubble;
</del><span class="cx"> class WebMediaSessionManager;
</span><span class="cx"> enum class TextIndicatorWindowLifetime : uint8_t;
</span><span class="cx"> enum class TextIndicatorWindowDismissalAnimation : uint8_t;
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    virtual Ref&lt;WebCore::ValidationBubble&gt; createValidationBubble(const String&amp; message) = 0;
</del><ins>+    virtual Ref&lt;WebCore::ValidationBubble&gt; createValidationBubble(const String&amp; message, const WebCore::ValidationBubble::Settings&amp;) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     std::unique_ptr&lt;WebContextMenuProxy&gt; createContextMenuProxy(WebPageProxy&amp;, const ContextMenuContextData&amp;, const UserData&amp;) override;
</span><span class="cx"> #endif
</span><del>-    Ref&lt;WebCore::ValidationBubble&gt; createValidationBubble(const String&amp; message) final;
</del><ins>+    Ref&lt;WebCore::ValidationBubble&gt; createValidationBubble(const String&amp; message, const WebCore::ValidationBubble::Settings&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     void setTextIndicator(Ref&lt;WebCore::TextIndicator&gt;, WebCore::TextIndicatorWindowLifetime) override;
</span><span class="cx">     void clearTextIndicator(WebCore::TextIndicatorWindowDismissalAnimation) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -757,9 +757,9 @@
</span><span class="cx">     return ([UIView userInterfaceLayoutDirectionForSemanticContentAttribute:[m_webView semanticContentAttribute]] == UIUserInterfaceLayoutDirectionLeftToRight) ? WebCore::UserInterfaceLayoutDirection::LTR : WebCore::UserInterfaceLayoutDirection::RTL;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;ValidationBubble&gt; PageClientImpl::createValidationBubble(const String&amp; message)
</del><ins>+Ref&lt;ValidationBubble&gt; PageClientImpl::createValidationBubble(const String&amp; message, const ValidationBubble::Settings&amp; settings)
</ins><span class="cx"> {
</span><del>-    return ValidationBubble::create(m_contentView, message);
</del><ins>+    return ValidationBubble::create(m_contentView, message, settings);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATA_INTERACTION)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -1095,7 +1095,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::showValidationMessage(const IntRect&amp; anchorClientRect, const String&amp; message)
</span><span class="cx"> {
</span><del>-    m_validationBubble = m_pageClient.createValidationBubble(message);
</del><ins>+    m_validationBubble = m_pageClient.createValidationBubble(message, { m_preferences-&gt;minimumFontSize() });
</ins><span class="cx">     m_validationBubble-&gt;setAnchorRect(anchorClientRect, uiClient().presentingViewController());
</span><span class="cx"> 
</span><span class="cx">     // If we are currently doing a scrolling / zoom animation, then we'll delay showing the validation
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     RefPtr&lt;WebColorPicker&gt; createColorPicker(WebPageProxy*, const WebCore::Color&amp; initialColor, const WebCore::IntRect&amp;) override;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    Ref&lt;WebCore::ValidationBubble&gt; createValidationBubble(const String&amp; message) final;
</del><ins>+    Ref&lt;WebCore::ValidationBubble&gt; createValidationBubble(const String&amp; message, const WebCore::ValidationBubble::Settings&amp;) final;
</ins><span class="cx"> 
</span><span class="cx">     void setTextIndicator(Ref&lt;WebCore::TextIndicator&gt;, WebCore::TextIndicatorWindowLifetime) override;
</span><span class="cx">     void clearTextIndicator(WebCore::TextIndicatorWindowDismissalAnimation) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -440,9 +440,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-Ref&lt;ValidationBubble&gt; PageClientImpl::createValidationBubble(const String&amp; message)
</del><ins>+Ref&lt;ValidationBubble&gt; PageClientImpl::createValidationBubble(const String&amp; message, const ValidationBubble::Settings&amp; settings)
</ins><span class="cx"> {
</span><del>-    return ValidationBubble::create(m_view, message);
</del><ins>+    return ValidationBubble::create(m_view, message, settings);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::setTextIndicator(Ref&lt;TextIndicator&gt; textIndicator, WebCore::TextIndicatorWindowLifetime lifetime)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -597,7 +597,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::showValidationMessage(const IntRect&amp; anchorClientRect, const String&amp; message)
</span><span class="cx"> {
</span><del>-    m_validationBubble = m_pageClient.createValidationBubble(message);
</del><ins>+    m_validationBubble = m_pageClient.createValidationBubble(message, { m_preferences-&gt;minimumFontSize() });
</ins><span class="cx">     m_validationBubble-&gt;showRelativeTo(anchorClientRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/ChangeLog        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2017-02-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        HTML Form Validation bubble should take minimum font size setting into consideration
+        https://bugs.webkit.org/show_bug.cgi?id=168271
+        &lt;rdar://problem/29869869&gt;
+
+        Reviewed by Simon Fraser.
+
+        Extend UIScriptController's contentsOfUserInterfaceItem() to also return the
+        font size of the validation bubble.
+
+        Add an overridePreference() method to UIScriptController. This is currently
+        used to override the value of the minimumFontSize setting. testRunner's
+        overridePreference() is not usable on WK2 because it does not update the
+        value of the preference on the UIProcess side.
+
+        * DumpRenderTree/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptController::overridePreference):
+        * DumpRenderTree/mac/UIScriptControllerMac.mm:
+        (WTR::UIScriptController::overridePreference):
+        * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
+        * TestRunnerShared/UIScriptContext/UIScriptController.h:
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptController::overridePreference):
+        * WebKitTestRunner/mac/UIScriptControllerMac.mm:
+        (WTR::UIScriptController::contentsOfUserInterfaceItem):
+        (WTR::UIScriptController::overridePreference):
+
</ins><span class="cx"> 2017-02-14  Florian Bruhin  &lt;git@the-compiler.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Use a set instead of a list for tests when parsing expectations
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosUIScriptControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -159,6 +159,10 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UIScriptController::overridePreference(JSStringRef preferenceRef, JSStringRef valueRef)
+{
+}
+
</ins><span class="cx"> static CGPoint contentOffsetBoundedInValidRange(UIScrollView *scrollView, CGPoint contentOffset)
</span><span class="cx"> {
</span><span class="cx">     UIEdgeInsets contentInsets = scrollView.contentInset;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacUIScriptControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -94,6 +94,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UIScriptController::overridePreference(JSStringRef preferenceRef, JSStringRef valueRef)
+{
+    WebPreferences *preferences = mainFrame.webView.preferences;
+
+    RetainPtr&lt;CFStringRef&gt; value = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, valueRef));
+    if (JSStringIsEqualToUTF8CString(preferenceRef, &quot;WebKitMinimumFontSize&quot;))
+        preferences.minimumFontSize = [(NSString *)value.get() doubleValue];
+}
+
</ins><span class="cx"> void UIScriptController::removeViewFromWindow(JSValueRef callback)
</span><span class="cx"> {
</span><span class="cx">     unsigned callbackID = m_context-&gt;prepareForAsyncTask(callback, CallbackTypeNonPersistent);
</span></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextBindingsUIScriptControlleridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -222,4 +222,5 @@
</span><span class="cx">     void removeViewFromWindow(object callback);
</span><span class="cx">     void addViewToWindow(object callback);
</span><span class="cx"> 
</span><ins>+    void overridePreference(DOMString preference, DOMString value);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextUIScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -397,6 +397,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UIScriptController::overridePreference(JSStringRef, JSStringRef)
+{
+}
+
</ins><span class="cx"> #endif // !PLATFORM(COCOA)
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkToolsTestRunnerSharedUIScriptContextUIScriptControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx">     void selectFormAccessoryPickerRow(long);
</span><span class="cx">     
</span><span class="cx">     JSObjectRef contentsOfUserInterfaceItem(JSStringRef) const;
</span><ins>+    void overridePreference(JSStringRef preference, JSStringRef value);
</ins><span class="cx">     
</span><span class="cx">     void scrollToOffset(long x, long y);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -678,6 +678,7 @@
</span><span class="cx">     static WKStringRef sansSerifFontFamily = WKStringCreateWithUTF8CString(&quot;Helvetica&quot;);
</span><span class="cx">     static WKStringRef serifFontFamily = WKStringCreateWithUTF8CString(&quot;Times&quot;);
</span><span class="cx"> 
</span><ins>+    WKPreferencesSetMinimumFontSize(preferences, 0);
</ins><span class="cx">     WKPreferencesSetStandardFontFamily(preferences, standardFontFamily);
</span><span class="cx">     WKPreferencesSetCursiveFontFamily(preferences, cursiveFontFamily);
</span><span class="cx">     WKPreferencesSetFantasyFontFamily(preferences, fantasyFontFamily);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunneriosUIScriptControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -651,6 +651,17 @@
</span><span class="cx">     webView.didEndScrollingCallback = nil;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UIScriptController::overridePreference(JSStringRef preferenceRef, JSStringRef valueRef)
+{
+    TestRunnerWKWebView *webView = TestController::singleton().mainWebView()-&gt;platformView();
+    WKPreferences *preferences = webView.configuration.preferences;
+
+    String preference = toWTFString(toWK(preferenceRef));
+    String value = toWTFString(toWK(valueRef));
+    if (preference == &quot;WebKitMinimumFontSize&quot;)
+        preferences.minimumFontSize = value.toDouble();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+}
+
</ins><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacUIScriptControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm (212324 => 212325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm        2017-02-14 22:51:34 UTC (rev 212324)
+++ trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm        2017-02-14 23:11:06 UTC (rev 212325)
</span><span class="lines">@@ -131,6 +131,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void UIScriptController::overridePreference(JSStringRef preferenceRef, JSStringRef valueRef)
+{
+#if WK_API_ENABLED
+    TestRunnerWKWebView *webView = TestController::singleton().mainWebView()-&gt;platformView();
+    WKPreferences *preferences = webView.configuration.preferences;
+
+    String preference = toWTFString(toWK(preferenceRef));
+    String value = toWTFString(toWK(valueRef));
+    if (preference == &quot;WebKitMinimumFontSize&quot;)
+        preferences.minimumFontSize = value.toDouble();
+#else
+    UNUSED_PARAM(preferenceRef);
+    UNUSED_PARAM(valueRef);
+#endif
+}
+
</ins><span class="cx"> void UIScriptController::removeViewFromWindow(JSValueRef callback)
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED
</span></span></pre>
</div>
</div>

</body>
</html>