[webkit-changes] [200120] trunk/Source/WebCore

2016-04-26 Thread commit-queue
Title: [200120] trunk/Source/WebCore








Revision 200120
Author commit-qu...@webkit.org
Date 2016-04-26 20:21:58 -0700 (Tue, 26 Apr 2016)


Log Message
Support legacy HTTP headers in WebSockets
https://bugs.webkit.org/show_bug.cgi?id=157057

Patch by John Wilander  on 2016-04-26
Reviewed by Brent Fulgham.

No new tests since these headers are not officially supported and should not be used.

* platform/network/HTTPHeaderNames.in:
Added four legacy headers needed to support older WebSockets servers.
Two of them are in the draft from August 2010: https://whatwg.org/specs/web-socket-protocol/

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/HTTPHeaderNames.in




Diff

Modified: trunk/Source/WebCore/ChangeLog (200119 => 200120)

--- trunk/Source/WebCore/ChangeLog	2016-04-27 02:14:35 UTC (rev 200119)
+++ trunk/Source/WebCore/ChangeLog	2016-04-27 03:21:58 UTC (rev 200120)
@@ -1,3 +1,16 @@
+2016-04-26  John Wilander  
+
+Support legacy HTTP headers in WebSockets
+https://bugs.webkit.org/show_bug.cgi?id=157057
+
+Reviewed by Brent Fulgham.
+
+No new tests since these headers are not officially supported and should not be used.
+
+* platform/network/HTTPHeaderNames.in:
+Added four legacy headers needed to support older WebSockets servers.
+Two of them are in the draft from August 2010: https://whatwg.org/specs/web-socket-protocol/
+
 2016-04-26  Dean Jackson  
 
 RTL native  buttons should have arrows on left


Modified: trunk/Source/WebCore/platform/network/HTTPHeaderNames.in (200119 => 200120)

--- trunk/Source/WebCore/platform/network/HTTPHeaderNames.in	2016-04-27 02:14:35 UTC (rev 200119)
+++ trunk/Source/WebCore/platform/network/HTTPHeaderNames.in	2016-04-27 03:21:58 UTC (rev 200120)
@@ -108,3 +108,10 @@
 Icy-Name
 Icy-Title
 Icy-URL
+
+// These are specific to legacy WebSockets implementations
+// https://bugs.webkit.org/show_bug.cgi?id=157057
+Sec-WebSocket-Location
+Sec-WebSocket-Origin
+WebSocket-Location
+WebSocket-Origin






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200119] trunk/Source

2016-04-26 Thread commit-queue
Title: [200119] trunk/Source








Revision 200119
Author commit-qu...@webkit.org
Date 2016-04-26 19:14:35 -0700 (Tue, 26 Apr 2016)


Log Message
Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
https://bugs.webkit.org/show_bug.cgi?id=156991


Patch by Joseph Pecoraro  on 2016-04-26
Reviewed by Timothy Hatcher.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController init]):
Apply the same universal file access to WebKit1 Web Inspector views that
we apply to WebKit2 views. Explicitly always allow access to storage
for Web Inspector content just in case as we already allow universal
file access.

Source/WebKit2:

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Explicitly always allow access to storage for Web Inspector content just
in case, as we already allow universal file access.

Modified Paths

trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm




Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (200118 => 200119)

--- trunk/Source/WebKit/mac/ChangeLog	2016-04-27 02:02:28 UTC (rev 200118)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-04-27 02:14:35 UTC (rev 200119)
@@ -1,3 +1,18 @@
+2016-04-26  Joseph Pecoraro  
+
+Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
+https://bugs.webkit.org/show_bug.cgi?id=156991
+
+
+Reviewed by Timothy Hatcher.
+
+* WebCoreSupport/WebInspectorClient.mm:
+(-[WebInspectorWindowController init]):
+Apply the same universal file access to WebKit1 Web Inspector views that
+we apply to WebKit2 views. Explicitly always allow access to storage
+for Web Inspector content just in case as we already allow universal
+file access.
+
 2016-04-26  Beth Dakin  
 
 Check to make sure shouldRequestCandidates() before requesting candidates


Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm (200118 => 200119)

--- trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm	2016-04-27 02:02:28 UTC (rev 200118)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm	2016-04-27 02:14:35 UTC (rev 200119)
@@ -387,6 +387,9 @@
 [preferences setPlugInsEnabled:NO];
 [preferences setTabsToLinks:NO];
 [preferences setUserStyleSheetEnabled:NO];
+[preferences setAllowFileAccessFromFileURLs:YES];
+[preferences setAllowUniversalAccessFromFileURLs:YES];
+[preferences setStorageBlockingPolicy:WebAllowAllStorage];
 
 _frontendWebView = [[WebView alloc] init];
 [_frontendWebView setPreferences:preferences];


Modified: trunk/Source/WebKit2/ChangeLog (200118 => 200119)

--- trunk/Source/WebKit2/ChangeLog	2016-04-27 02:02:28 UTC (rev 200118)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-27 02:14:35 UTC (rev 200119)
@@ -1,3 +1,16 @@
+2016-04-26  Joseph Pecoraro  
+
+Uncaught Exception: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.
+https://bugs.webkit.org/show_bug.cgi?id=156991
+
+
+Reviewed by Timothy Hatcher.
+
+* UIProcess/mac/WebInspectorProxyMac.mm:
+(WebKit::WebInspectorProxy::platformCreateInspectorPage):
+Explicitly always allow access to storage for Web Inspector content just
+in case, as we already allow universal file access.
+
 2016-04-26  Myles C. Maxfield  
 
 [WK2] [OS X] Create API for switching RTL scrollbar policy


Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (200118 => 200119)

--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2016-04-27 02:02:28 UTC (rev 200118)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2016-04-27 02:14:35 UTC (rev 200119)
@@ -373,6 +373,7 @@
 #endif
 preferences._allowFileAccessFromFileURLs = YES;
 [configuration _setAllowUniversalAccessFromFileURLs:YES];
+preferences._storageBlockingPolicy = _WKStorageBlockingPolicyAllowAll;
 preferences._javaScriptRuntimeFlags = 0;
 if (isUnderTest()) {
 preferences._hiddenPageDOMTimerThrottlingEnabled = NO;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200118] trunk

2016-04-26 Thread dino
Title: [200118] trunk








Revision 200118
Author d...@apple.com
Date 2016-04-26 19:02:28 -0700 (Tue, 26 Apr 2016)


Log Message
RTL native  buttons should have arrows on left
https://bugs.webkit.org/show_bug.cgi?id=157055


Source/WebCore:

Reviewed by Myles Maxfield.

If the text direction is right-to-left, the select popup
buttons should have the arrows on the left side.

Test: fast/forms/select-writing-direction-natural.html

* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::popupButtonPadding): Takes a direction parameter.
(WebCore::RenderThemeMac::popupInternalPaddingBox): Checks the direction for the padding.
(WebCore::RenderThemeMac::setPopupButtonCellState): Tell the button to put the
arrows on the correct side.
(WebCore::RenderThemeMac::popupButton): Deleted an unnecessary comment.

LayoutTests:

Reviewed by Myles Maxfield.

* fast/forms/select-writing-direction-natural.html: Removed some incorrect
text in the test.
* platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt:
* platform/mac/fast/forms/select-writing-direction-natural-expected.png:
* platform/mac/fast/forms/select-writing-direction-natural-expected.txt:
* platform/mac/fast/text/international/bidi-menulist-expected.png:
* platform/mac/fast/text/international/bidi-menulist-expected.txt:
* platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
* platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/forms/select-writing-direction-natural.html
trunk/LayoutTests/platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt
trunk/LayoutTests/platform/mac/fast/forms/select-writing-direction-natural-expected.png
trunk/LayoutTests/platform/mac/fast/forms/select-writing-direction-natural-expected.txt
trunk/LayoutTests/platform/mac/fast/text/international/bidi-menulist-expected.png
trunk/LayoutTests/platform/mac/fast/text/international/bidi-menulist-expected.txt
trunk/LayoutTests/platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png
trunk/LayoutTests/platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderThemeMac.h
trunk/Source/WebCore/rendering/RenderThemeMac.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (200117 => 200118)

--- trunk/LayoutTests/ChangeLog	2016-04-27 01:28:03 UTC (rev 200117)
+++ trunk/LayoutTests/ChangeLog	2016-04-27 02:02:28 UTC (rev 200118)
@@ -1,3 +1,20 @@
+2016-04-26  Dean Jackson  
+
+RTL native  buttons should have arrows on left
+https://bugs.webkit.org/show_bug.cgi?id=157055
+
+Reviewed by Myles Maxfield.
+
+* fast/forms/select-writing-direction-natural.html: Removed some incorrect
+text in the test.
+* platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt:
+* platform/mac/fast/forms/select-writing-direction-natural-expected.png:
+* platform/mac/fast/forms/select-writing-direction-natural-expected.txt:
+* platform/mac/fast/text/international/bidi-menulist-expected.png:
+* platform/mac/fast/text/international/bidi-menulist-expected.txt:
+* platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
+* platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
+
 2016-04-26  Michael Saboff  
 
 [ES] Implement RegExp.prototype.@@replace and use it for String.prototype.replace


Modified: trunk/LayoutTests/fast/forms/select-writing-direction-natural.html (200117 => 200118)

--- trunk/LayoutTests/fast/forms/select-writing-direction-natural.html	2016-04-27 01:28:03 UTC (rev 200117)
+++ trunk/LayoutTests/fast/forms/select-writing-direction-natural.html	2016-04-27 02:02:28 UTC (rev 200118)
@@ -10,9 +10,6 @@
 Test for  REGRESSION: Popup button text should use "natural" directionality to match the items in the popup menu.
 
-
-In all of the popup buttons below, the letter A should be on the left and the letter א should be on the right.
-
 
 
 אA


Modified: trunk/LayoutTests/platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt (200117 => 200118)

--- trunk/LayoutTests/platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt	2016-04-27 01:28:03 UTC (rev 200117)
+++ trunk/LayoutTests/platform/ios-simulator/fast/forms/select-writing-direction-natural-expected.txt	2016-04-27 02:02:28 UTC (rev 200118)
@@ -16,12 +16,7 @@
 text run at (0,20) width 330: "directionality to match the items in the popup menu"
 RenderText {#text} at (329,20) size 5x19
   text run at (329,20) width 5: "."
-  RenderBlock {P} at (0,56) size 784x20
- 

[webkit-changes] [200117] trunk

2016-04-26 Thread msaboff
Title: [200117] trunk








Revision 200117
Author msab...@apple.com
Date 2016-04-26 18:28:03 -0700 (Tue, 26 Apr 2016)


Log Message
[ES] Implement RegExp.prototype.@@replace and use it for String.prototype.replace
https://bugs.webkit.org/show_bug.cgi?id=156562

Reviewed by Filip Pizlo.

Source/_javascript_Core:

Added builtins for String.prototype.replace as well as RegExp.prototype[Symbol.replace].

The String.prototype.replace also has an intrinsic, StringPrototypeReplaceIntrinsic.
This original intrinsic was copied to make StringPrototypeReplaceRegExpIntrinsic.
The difference between the two intrinsics is that StringPrototypeReplaceIntrinsic has
the same checks found in the new builtin hasObservableSideEffectsForStringReplace.
We implement these primordial checks for StringPrototypeReplaceIntrinsic in two places.
First, we do a trial check during ByteCode parsing time to see if the current
RegExp.prototype properties have changed from the original.  If they have, we don't
inline the intrinsic.  Later, in the fixup phase, we add nodes to the IR to emit the
checks at runtime.

The new intrinsic StringPrototypeReplaceRegExpIntrinsic is only available via the
private @replaceUsingRegExp, which is called in the String.prototype.replace builtin.
It is only called after hasObservableSideEffectsForStringReplace has been called

Both of these intrinsics are needed, because the JS code containing String.replace() calls
runs initially in the LLint and then the baseline JIT.  Even after the function tiers up
to the DFG JIT, the inlining budget may not allow StringPrototypeReplaceIntrinsic to be inlined.
Having StringPrototypeReplaceRegExpIntrinsic allows for the String.prototype.replace builtin to
get reasonable performance before the other intrinsic is inlined or when it can't.

* builtins/RegExpPrototype.js:
(match):
(getSubstitution):
(replace):
(search):
(split):
* builtins/StringPrototype.js:
(repeat):
(hasObservableSideEffectsForStringReplace):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(localeCompare):
New builtins for String.prototype.replace and RegExp.prototype[Symbol.replace].

* bytecode/BytecodeIntrinsicRegistry.cpp:
* bytecode/BytecodeIntrinsicRegistry.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupGetAndSetLocalsInBlock):
(JSC::DFG::FixupPhase::tryAddStringReplacePrimordialChecks):
(JSC::DFG::FixupPhase::checkArray):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::getRegExpPrototypeProperty):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::getRegExpPrototypeProperty):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
* runtime/CommonIdentifiers.h:
* runtime/Intrinsic.h:
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::finishCreation):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::replace):
(JSC::stringProtoFuncReplaceUsingRegExp):
(JSC::stringProtoFuncReplaceUsingStringSearch):
(JSC::operationStringProtoFuncReplaceGeneric):
(JSC::stringProtoFuncReplace): Deleted.
Added StringReplaceRegExp intrinsic.  Added checks for RegExp profiled arguments to StringReplace
that mirror what is in hasObservableSideEffectsForStringReplace().  If we aren't able to add the
checks, we OSR exit.  Add Graph::getPrimordialRegExpPrototypeProperty() as a helper to get the
primordial values from RegExp.prototype.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Added @regExpPrototypeSymbolReplace and
@hasObservableSideEffectsForStringReplace here instead og String.prototype so that we reduce the
number of objects we have to traverse.

* tests/es6.yaml: Changed expectations for the various replace related tests to passing.

* tests/stress/regexp-replace-proxy.js:
(assert):
(let.getProxyNullExec.new.Proxy):
(let.getSetProxyNullExec.new.Proxy):
(get resetTracking):
(let.getSetProxyMatches_comma.new.Proxy):
(set get getSetProxyNullExec):
(let.getSetProxyReplace_phoneNumber.new.Proxy):
(set get getSetProxyMatches_comma):
(let.getSetProxyReplaceUnicode_digit_nonGreedy.new.Proxy):
(set get resetTracking):
* tests/stress/string-replace-proxy.js:
(assert):
(let.getSetProxyReplace.new.Proxy.replace):
New tests.

LayoutTests:

Updated tests.  Needed to update js/regress-141098.js test, because builtins are
only compilied when called.  This test checks

[webkit-changes] [200115] trunk/Source/JavaScriptCore

2016-04-26 Thread mark . lam
Title: [200115] trunk/Source/_javascript_Core








Revision 200115
Author mark@apple.com
Date 2016-04-26 17:47:45 -0700 (Tue, 26 Apr 2016)


Log Message
Gardening: speculative build fix.

Not reviewed.

* API/JSWrapperMap.mm:

Modified Paths

trunk/Source/_javascript_Core/API/JSWrapperMap.mm
trunk/Source/_javascript_Core/ChangeLog




Diff

Modified: trunk/Source/_javascript_Core/API/JSWrapperMap.mm (200114 => 200115)

--- trunk/Source/_javascript_Core/API/JSWrapperMap.mm	2016-04-27 00:30:18 UTC (rev 200114)
+++ trunk/Source/_javascript_Core/API/JSWrapperMap.mm	2016-04-27 00:47:45 UTC (rev 200115)
@@ -49,7 +49,8 @@
 #endif
 extern "C" uint32_t dyld_get_program_sdk_version();
 
-#if PLATFORM(IOS)
+#if PLATFORM(APPLETV)
+#elif PLATFORM(IOS)
 static const uint32_t webkitFirstSDKVersionWithInitConstructorSupport = 0x8; // iOS 8.0.0
 #elif PLATFORM(MAC)
 static const uint32_t webkitFirstSDKVersionWithInitConstructorSupport = 0xA0A00; // OSX 10.10.0


Modified: trunk/Source/_javascript_Core/ChangeLog (200114 => 200115)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-27 00:30:18 UTC (rev 200114)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-27 00:47:45 UTC (rev 200115)
@@ -1,5 +1,13 @@
 2016-04-26  Mark Lam  
 
+Gardening: speculative build fix.
+
+Not reviewed.
+
+* API/JSWrapperMap.mm:
+
+2016-04-26  Mark Lam  
+
 Update the compatibility version check for the ObjC API's InitConstructorSupport to use dyld_get_program_sdk_version().
 https://bugs.webkit.org/show_bug.cgi?id=157048
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200114] trunk/Source/JavaScriptCore

2016-04-26 Thread mark . lam
Title: [200114] trunk/Source/_javascript_Core








Revision 200114
Author mark@apple.com
Date 2016-04-26 17:30:18 -0700 (Tue, 26 Apr 2016)


Log Message
Update the compatibility version check for the ObjC API's InitConstructorSupport to use dyld_get_program_sdk_version().
https://bugs.webkit.org/show_bug.cgi?id=157048

Reviewed by Geoffrey Garen.

* API/JSWrapperMap.mm:
(supportsInitMethodConstructors):
(getJSExportProtocol):

Modified Paths

trunk/Source/_javascript_Core/API/JSWrapperMap.mm
trunk/Source/_javascript_Core/ChangeLog




Diff

Modified: trunk/Source/_javascript_Core/API/JSWrapperMap.mm (200113 => 200114)

--- trunk/Source/_javascript_Core/API/JSWrapperMap.mm	2016-04-26 23:26:19 UTC (rev 200113)
+++ trunk/Source/_javascript_Core/API/JSWrapperMap.mm	2016-04-27 00:30:18 UTC (rev 200114)
@@ -44,8 +44,17 @@
 
 #include 
 
-static const int32_t webkitFirstVersionWithInitConstructorSupport = 0x21A0400; // 538.4.0
+#if __has_include()
+#include 
+#endif
+extern "C" uint32_t dyld_get_program_sdk_version();
 
+#if PLATFORM(IOS)
+static const uint32_t webkitFirstSDKVersionWithInitConstructorSupport = 0x8; // iOS 8.0.0
+#elif PLATFORM(MAC)
+static const uint32_t webkitFirstSDKVersionWithInitConstructorSupport = 0xA0A00; // OSX 10.10.0
+#endif
+
 @class JSObjCClassInfo;
 
 @interface JSWrapperMap () 
@@ -650,12 +659,12 @@
 #if PLATFORM(APPLETV)
 // There are no old clients on Apple TV, so there's no need for backwards compatibility.
 return true;
+#else
+static uint32_t programSDKVersion = 0;
+if (!programSDKVersion)
+programSDKVersion = dyld_get_program_sdk_version();
+return programSDKVersion >= webkitFirstSDKVersionWithInitConstructorSupport;
 #endif
-
-static int32_t versionOfLinkTimeLibrary = 0;
-if (!versionOfLinkTimeLibrary)
-versionOfLinkTimeLibrary = NSVersionOfLinkTimeLibrary("_javascript_Core");
-return versionOfLinkTimeLibrary >= webkitFirstVersionWithInitConstructorSupport;
 }
 
 Protocol *getJSExportProtocol()


Modified: trunk/Source/_javascript_Core/ChangeLog (200113 => 200114)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 23:26:19 UTC (rev 200113)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-27 00:30:18 UTC (rev 200114)
@@ -1,3 +1,14 @@
+2016-04-26  Mark Lam  
+
+Update the compatibility version check for the ObjC API's InitConstructorSupport to use dyld_get_program_sdk_version().
+https://bugs.webkit.org/show_bug.cgi?id=157048
+
+Reviewed by Geoffrey Garen.
+
+* API/JSWrapperMap.mm:
+(supportsInitMethodConstructors):
+(getJSExportProtocol):
+
 2016-04-26  Benjamin Poulain  
 
 [JSC] GetByVal on Undecided use its children before its OSR Exit






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200113] trunk/Source/JavaScriptCore

2016-04-26 Thread commit-queue
Title: [200113] trunk/Source/_javascript_Core








Revision 200113
Author commit-qu...@webkit.org
Date 2016-04-26 16:26:19 -0700 (Tue, 26 Apr 2016)


Log Message
[JSC] GetByVal on Undecided use its children before its OSR Exit
https://bugs.webkit.org/show_bug.cgi?id=157046

Patch by Benjamin Poulain  on 2016-04-26
Reviewed by Mark Lam.

Very silly bug: GetByVal on Undecided uses its children before
the speculationCheck(). If we fail the speculation, we have already
lost how to recover the values.

The existing tests did not catch this because we tier up to B3
before such Exits happen. B3 has explicit liveness and did not suffer
from this bug.
The new test has a smaller warmup to exercise the OSR Exit in DFG
instead of FTL.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* tests/stress/get-by-val-on-undecided-out-of-bounds.js: Added.
(string_appeared_here.opaqueGetByValKnownArray):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp


Added Paths

trunk/Source/_javascript_Core/tests/stress/get-by-val-on-undecided-out-of-bounds.js




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200112 => 200113)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 23:09:57 UTC (rev 200112)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-26 23:26:19 UTC (rev 200113)
@@ -1,3 +1,25 @@
+2016-04-26  Benjamin Poulain  
+
+[JSC] GetByVal on Undecided use its children before its OSR Exit
+https://bugs.webkit.org/show_bug.cgi?id=157046
+
+Reviewed by Mark Lam.
+
+Very silly bug: GetByVal on Undecided uses its children before
+the speculationCheck(). If we fail the speculation, we have already
+lost how to recover the values.
+
+The existing tests did not catch this because we tier up to B3
+before such Exits happen. B3 has explicit liveness and did not suffer
+from this bug.
+The new test has a smaller warmup to exercise the OSR Exit in DFG
+instead of FTL.
+
+* dfg/DFGSpeculativeJIT64.cpp:
+(JSC::DFG::SpeculativeJIT::compile):
+* tests/stress/get-by-val-on-undecided-out-of-bounds.js: Added.
+(string_appeared_here.opaqueGetByValKnownArray):
+
 2016-04-26  Skachkov Oleksandr  
 
 calling super() a second time in a constructor should throw


Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (200112 => 200113)

--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2016-04-26 23:09:57 UTC (rev 200112)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2016-04-26 23:26:19 UTC (rev 200113)
@@ -2554,12 +2554,12 @@
 GPRReg indexGPR = index.gpr();
 GPRReg resultGPR = result.gpr();
 
+speculationCheck(OutOfBounds, JSValueRegs(), node,
+m_jit.branch32(MacroAssembler::LessThan, indexGPR, MacroAssembler::TrustedImm32(0)));
+
 use(node->child1());
 index.use();
 
-speculationCheck(OutOfBounds, JSValueRegs(), node,
-m_jit.branch32(MacroAssembler::LessThan, indexGPR, MacroAssembler::TrustedImm32(0)));
-
 m_jit.move(MacroAssembler::TrustedImm64(ValueUndefined), resultGPR);
 jsValueResult(resultGPR, node, UseChildrenCalledExplicitly);
 break;


Added: trunk/Source/_javascript_Core/tests/stress/get-by-val-on-undecided-out-of-bounds.js (0 => 200113)

--- trunk/Source/_javascript_Core/tests/stress/get-by-val-on-undecided-out-of-bounds.js	(rev 0)
+++ trunk/Source/_javascript_Core/tests/stress/get-by-val-on-undecided-out-of-bounds.js	2016-04-26 23:26:19 UTC (rev 200113)
@@ -0,0 +1,20 @@
+"use strict"
+
+function opaqueGetByValKnownArray(value)
+{
+let array = [];
+return array[value];
+}
+noInline(opaqueGetByValKnownArray);
+
+// Warm up without out-of-bounds access.
+for (let i = 0; i < 1e3; ++i) {
+if (opaqueGetByValKnownArray(0) !== undefined)
+throw "Failed opaqueGetByValKnownArray(0)";
+}
+
+// Then access out of bounds.
+for (let i = 0; i < 1e3; ++i) {
+if (opaqueGetByValKnownArray(-1) !== undefined)
+throw "Failed opaqueGetByValKnownArray(-1)";
+}
\ No newline at end of file






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200110] trunk/Source/WebCore

2016-04-26 Thread cdumez
Title: [200110] trunk/Source/WebCore








Revision 200110
Author cdu...@apple.com
Date 2016-04-26 15:53:54 -0700 (Tue, 26 Apr 2016)


Log Message
[Web IDL] Specify default values for optional parameters of type 'unsigned long'
https://bugs.webkit.org/show_bug.cgi?id=157043

Reviewed by Alex Christensen.

Specify default values for optional parameters of type 'unsigned long' and let
the bindings generator use WTF::Optional<> for the parameters that do not have
such default value.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createScriptProcessor): Deleted.
(WebCore::AudioContext::createChannelSplitter): Deleted.
(WebCore::AudioContext::createChannelMerger): Deleted.
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(CanUseWTFOptionalForParameter): Deleted.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::addRule):
* css/CSSStyleSheet.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp
trunk/Source/WebCore/Modules/webaudio/AudioContext.h
trunk/Source/WebCore/Modules/webaudio/AudioContext.idl
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
trunk/Source/WebCore/css/CSSStyleSheet.cpp
trunk/Source/WebCore/css/CSSStyleSheet.h
trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200109 => 200110)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 22:16:00 UTC (rev 200109)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 22:53:54 UTC (rev 200110)
@@ -1,3 +1,28 @@
+2016-04-26  Chris Dumez  
+
+[Web IDL] Specify default values for optional parameters of type 'unsigned long'
+https://bugs.webkit.org/show_bug.cgi?id=157043
+
+Reviewed by Alex Christensen.
+
+Specify default values for optional parameters of type 'unsigned long' and let
+the bindings generator use WTF::Optional<> for the parameters that do not have
+such default value.
+
+* Modules/webaudio/AudioContext.cpp:
+(WebCore::AudioContext::createScriptProcessor): Deleted.
+(WebCore::AudioContext::createChannelSplitter): Deleted.
+(WebCore::AudioContext::createChannelMerger): Deleted.
+* Modules/webaudio/AudioContext.h:
+* Modules/webaudio/AudioContext.idl:
+* bindings/scripts/CodeGeneratorJS.pm:
+(CanUseWTFOptionalForParameter): Deleted.
+* css/CSSStyleSheet.cpp:
+(WebCore::CSSStyleSheet::addRule):
+* css/CSSStyleSheet.h:
+* inspector/InspectorStyleSheet.cpp:
+(WebCore::InspectorStyleSheet::addRule):
+
 2016-04-26  Ryosuke Niwa  
 
 ASSERTION FAILED: m_templateInsertionModes.isEmpty() in WebCore::HTMLTreeBuilder::finished


Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (200109 => 200110)

--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2016-04-26 22:16:00 UTC (rev 200109)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp	2016-04-26 22:53:54 UTC (rev 200110)
@@ -481,18 +481,6 @@
 
 #endif
 
-RefPtr AudioContext::createScriptProcessor(size_t bufferSize, ExceptionCode& ec)
-{
-// Set number of input/output channels to stereo by default.
-return createScriptProcessor(bufferSize, 2, 2, ec);
-}
-
-RefPtr AudioContext::createScriptProcessor(size_t bufferSize, size_t numberOfInputChannels, ExceptionCode& ec)
-{
-// Set number of output channels to stereo by default.
-return createScriptProcessor(bufferSize, numberOfInputChannels, 2, ec);
-}
-
 RefPtr AudioContext::createScriptProcessor(size_t bufferSize, size_t numberOfInputChannels, size_t numberOfOutputChannels, ExceptionCode& ec)
 {
 ASSERT(isMainThread());
@@ -567,12 +555,6 @@
 return WTFMove(node);
 }
 
-RefPtr AudioContext::createChannelSplitter(ExceptionCode& ec)
-{
-const unsigned ChannelSplitterDefaultNumberOfOutputs = 6;
-return createChannelSplitter(ChannelSplitterDefaultNumberOfOutputs, ec);
-}
-
 RefPtr AudioContext::createChannelSplitter(size_t numberOfOutputs, ExceptionCode& ec)
 {
 ASSERT(isMainThread());
@@ -588,12 +570,6 @@
 return node;
 }
 
-RefPtr AudioContext::createChannelMerger(ExceptionCode& ec)
-{
-const unsigned ChannelMergerDefaultNumberOfInputs = 6;
-return createChannelMerger(ChannelMergerDefaultNumberOfInputs, ec);
-}
-
 RefPtr AudioContext::createChannelMerger(size_t numberOfInputs, ExceptionCode& ec)
 {
 ASSERT(isMainThread());


Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.h (200109 => 200110)

--- trunk/Source/WebCore/Modules/webaudio/AudioContext.h	2016-04-26 22:16:00 UTC (rev 200109)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.h	2016-04-26 22:53:54 UTC (rev 200110)
@@ -137,12 +137,8 @@
 Ref createConvolver();
 Ref createDynamicsCompressor();
 Ref createAnalyser();
-RefPtr createScriptProcessor(size_t bufferSize, ExceptionCode&);

[webkit-changes] [200109] trunk/Tools

2016-04-26 Thread rniwa
Title: [200109] trunk/Tools








Revision 200109
Author rn...@webkit.org
Date 2016-04-26 15:16:00 -0700 (Tue, 26 Apr 2016)


Log Message
Fix text in log files autogenerated by import-w3c-tests
https://bugs.webkit.org/show_bug.cgi?id=157021

Unreviewed. Fixing the second typo.

* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.write_import_log):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/w3c/test_importer.py




Diff

Modified: trunk/Tools/ChangeLog (200108 => 200109)

--- trunk/Tools/ChangeLog	2016-04-26 22:07:27 UTC (rev 200108)
+++ trunk/Tools/ChangeLog	2016-04-26 22:16:00 UTC (rev 200109)
@@ -1,3 +1,13 @@
+2016-04-26  Ryosuke Niwa  
+
+Fix text in log files autogenerated by import-w3c-tests
+https://bugs.webkit.org/show_bug.cgi?id=157021
+
+Unreviewed. Fixing the second typo.
+
+* Scripts/webkitpy/w3c/test_importer.py:
+(TestImporter.write_import_log):
+
 2016-04-26  Filip Pizlo  
 
 WebCore on Mac ignores the user's preferred region (country) while getting the language


Modified: trunk/Tools/Scripts/webkitpy/w3c/test_importer.py (200108 => 200109)

--- trunk/Tools/Scripts/webkitpy/w3c/test_importer.py	2016-04-26 22:07:27 UTC (rev 200108)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_importer.py	2016-04-26 22:16:00 UTC (rev 200109)
@@ -491,7 +491,7 @@
 import_log.append('Instead, create a pull request on the W3C CSS or WPT github:\n')
 import_log.append('\thttps://github.com/w3c/csswg-test\n')
 import_log.append('\thttps://github.com/w3c/web-platform-tests\n\n')
-import_log.append('Then run the Tools/Scripts/import-w3c-tests in Webkit to reimport\n\n')
+import_log.append('Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport\n\n')
 import_log.append('Do NOT modify or remove this file.\n\n')
 import_log.append('\n')
 import_log.append('Properties requiring vendor prefixes:\n')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200108] trunk

2016-04-26 Thread rniwa
Title: [200108] trunk








Revision 200108
Author rn...@webkit.org
Date 2016-04-26 15:07:27 -0700 (Tue, 26 Apr 2016)


Log Message
ASSERTION FAILED: m_templateInsertionModes.isEmpty() in WebCore::HTMLTreeBuilder::finished
https://bugs.webkit.org/show_bug.cgi?id=143519

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaselined the tests.

* web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset-expected.txt:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset-expected.txt:

Source/WebCore:

The assertion failure was caused by our parser inconsistently following the spec. Fixed it by making our HTML parser
match the latest HTML5 specification. See inline comments below.

Tests: fast/dom/HTMLTemplateElement/parsing-template-with-frameset.html
   html5lib/generated/run-template-data.html
   html5lib/generated/run-template-write.html
   imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant.html
   imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html
   imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): When parsing a template element for 'in body' insertion mode,
we process the token using the rules for 'in head' insertion mode, which sets the frameset-ok flag to "not ok".
In addition, 'in template' insertion mode should not special case a start tag whose tag name is "frame". Instead,
fallback to using 'in body' insertion mode.
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
(WebCore::HTMLTreeBuilder::processStartTag): 'in frameset' insertion mode should not special case a start tag whose
tag name is "template": https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inframeset
(WebCore::HTMLTreeBuilder::processEndTag): Ditto for an end tag whose name is "template".
(WebCore::HTMLTreeBuilder::processStartTagForInHead): When parsing a template element in 'in head' inserting mode,
we set the frameset-ok flag to "not ok": https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead

LayoutTests:

Rebaselined the html5lib tests (now passes all the test cases!) and added a regression test for an assertion.

* fast/dom/HTMLTemplateElement/parsing-template-with-frameset-expected.txt: Added.
* fast/dom/HTMLTemplateElement/parsing-template-with-frameset.html: Added.
* html5lib/generated/run-template-data-expected.txt:
* html5lib/generated/run-template-write-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/html5lib/generated/run-template-data-expected.txt
trunk/LayoutTests/html5lib/generated/run-template-write-expected.txt
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-as-a-descendant-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp


Added Paths

trunk/LayoutTests/fast/dom/HTMLTemplateElement/parsing-template-with-frameset-expected.txt
trunk/LayoutTests/fast/dom/HTMLTemplateElement/parsing-template-with-frameset.html




Diff

Modified: trunk/LayoutTests/ChangeLog (200107 => 200108)

--- trunk/LayoutTests/ChangeLog	2016-04-26 21:47:20 UTC (rev 200107)
+++ trunk/LayoutTests/ChangeLog	2016-04-26 22:07:27 UTC (rev 200108)
@@ -1,3 +1,17 @@
+2016-04-26  Ryosuke Niwa  
+
+ASSERTION FAILED: m_templateInsertionModes.isEmpty() in WebCore::HTMLTreeBuilder::finished
+https://bugs.webkit.org/show_bug.cgi?id=143519
+
+Reviewed by Darin Adler.
+
+Rebaselined the html5lib tests (now passes all the test cases!) and added a regression test for an assertion.
+
+* fast/dom/HTMLTemplateElement/parsing-template-with-frameset-expected.txt: Added.
+* fast/dom/HTMLTemplateElement/parsing-template-with-frameset.html: Added.
+* html5lib/generated/run-template-data-expected.txt:
+* html5lib/generated/run-template-write-expected.txt:
+
 2016-04-26  Skachkov Oleksandr  
 
 calling super() a second time in a constructor should throw


Added: trunk/LayoutTests/fast/dom/HTMLTemplateElement/parsing-template-with-frameset-expected.txt (0 => 200108)

--- trunk/LayoutTests/fast

[webkit-changes] [200106] trunk/Source

2016-04-26 Thread bdakin
Title: [200106] trunk/Source








Revision 200106
Author bda...@apple.com
Date 2016-04-26 13:09:32 -0700 (Tue, 26 Apr 2016)


Log Message
Check to make sure shouldRequestCandidates() before requesting candidates
https://bugs.webkit.org/show_bug.cgi?id=157038
-and corresponding-
rdar://problem/25910418

Reviewed by Tim Horton.

This patch limits requesting and showing candidates to cases where 
shouldRequestCandidates() is true. This patch also caches the sequence number 
returned by [NSSpellChecker requestCandidatesForSelectedRange:] to make sure 
it is equal to the sequence number sent to the callback handler so that we do 
not show candidates for old requests.

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::requestCandidatesForSelection):
(WebEditorClient::handleRequestedCandidates):
* WebView/WebView.mm:
(-[WebView showCandidates:forString:inRect:forSelectedRange:view:completionHandler:]):
(-[WebView shouldRequestCandidates]):
* WebView/WebViewInternal.h:

Source/WebKit2:

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateWebViewImplAdditions):
(WebKit::WebViewImpl::shouldRequestCandidates):
(WebKit::WebViewImpl::showCandidates):
(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
(WebKit::WebViewImpl::handleRequestedCandidates):

Modified Paths

trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
trunk/Source/WebKit/mac/WebView/WebView.mm
trunk/Source/WebKit/mac/WebView/WebViewInternal.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h
trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm




Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (200105 => 200106)

--- trunk/Source/WebKit/mac/ChangeLog	2016-04-26 20:01:13 UTC (rev 200105)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-04-26 20:09:32 UTC (rev 200106)
@@ -1,3 +1,27 @@
+2016-04-26  Beth Dakin  
+
+Check to make sure shouldRequestCandidates() before requesting candidates
+https://bugs.webkit.org/show_bug.cgi?id=157038
+-and corresponding-
+rdar://problem/25910418
+
+Reviewed by Tim Horton.
+
+This patch limits requesting and showing candidates to cases where 
+shouldRequestCandidates() is true. This patch also caches the sequence number 
+returned by [NSSpellChecker requestCandidatesForSelectedRange:] to make sure 
+it is equal to the sequence number sent to the callback handler so that we do 
+not show candidates for old requests.
+
+* WebCoreSupport/WebEditorClient.h:
+* WebCoreSupport/WebEditorClient.mm:
+(WebEditorClient::requestCandidatesForSelection):
+(WebEditorClient::handleRequestedCandidates):
+* WebView/WebView.mm:
+(-[WebView showCandidates:forString:inRect:forSelectedRange:view:completionHandler:]):
+(-[WebView shouldRequestCandidates]):
+* WebView/WebViewInternal.h:
+
 2016-04-25  Ryosuke Niwa  
 
 Remove the build flag for template elements


Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h (200105 => 200106)

--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2016-04-26 20:01:13 UTC (rev 200105)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2016-04-26 20:09:32 UTC (rev 200106)
@@ -190,6 +190,7 @@
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 RetainPtr m_paragraphContextForCandidateRequest;
 NSRange m_rangeForCandidates;
+NSInteger m_lastCandidateRequestSequenceNumber;
 #endif
 
 WeakPtrFactory m_weakPtrFactory;


Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (200105 => 200106)

--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2016-04-26 20:01:13 UTC (rev 200105)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2016-04-26 20:09:32 UTC (rev 200106)
@@ -1139,6 +1139,9 @@
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
 void WebEditorClient::requestCandidatesForSelection(const VisibleSelection& selection)
 {
+if (![m_webView shouldRequestCandidates])
+return;
+
 RefPtr selectedRange = selection.toNormalizedRange();
 if (!selectedRange)
 return;
@@ -1158,7 +1161,7 @@
 
 NSTextCheckingTypes checkingTypes = NSTextCheckingTypeSpelling | NSTextCheckingTypeReplacement | NSTextCheckingTypeCorrection;
 auto weakEditor = m_weakPtrFactory.createWeakPtr();
-[[NSSpellChecker sharedSpellChecker] requestCandidatesForSelectedRange:m_rangeForCandidates inString:m_paragraphContextForCandidateRequest.get() types:checkingTypes options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() completionHandler:[weakEditor](NSInteger sequenceNumber, NSArray *candidates) {
+m_lastCandidateRequestSequenceNumber = [[NSSpellChecker sharedSpellChecker] requestCandidatesForSelectedRange:m_r

[webkit-changes] [200105] trunk

2016-04-26 Thread fpizlo
Title: [200105] trunk








Revision 200105
Author fpi...@apple.com
Date 2016-04-26 13:01:13 -0700 (Tue, 26 Apr 2016)


Log Message
WebCore on Mac ignores the user's preferred region (country) while getting the language
https://bugs.webkit.org/show_bug.cgi?id=156993

Reviewed by Geoffrey Garen.

Source/WebCore:

This is tested by the NavigatorLanguage API test.

WebCore was previously getting the list of preferred languages, and for each one, deducing
the default region. That's wrong, since for example it doesn't respect the user's choice (in
System Preferences) to display dates/calenders/etc according to a different region (like how
I have my machine set to en-pl right now).

It might be possible for the country code we get via kCFLocaleCountryCode to be something
that our ICU doesn't handle. To defend against this, we search for the resulting country
code in ICU's ISO countries list. If it doesn't appear in that list, we fall back on old
behavior.

* platform/mac/Language.mm:
(WebCore::httpStyleLanguageCode):
(WebCore::isValidICUCountryCode):
(WebCore::platformUserPreferredLanguages):

Tools:

Change the test expectations for this test. If the variant is not explicitly specified in
the AppleLanguage, then we use the locale's country code, which this test assumes is US.

* TestWebKitAPI/Tests/mac/NavigatorLanguage.mm:
(TestWebKitAPI::languageForSystemLanguage):
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/Language.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/mac/NavigatorLanguage.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (200104 => 200105)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 19:49:19 UTC (rev 200104)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 20:01:13 UTC (rev 200105)
@@ -1,3 +1,27 @@
+2016-04-26  Filip Pizlo  
+
+WebCore on Mac ignores the user's preferred region (country) while getting the language
+https://bugs.webkit.org/show_bug.cgi?id=156993
+
+Reviewed by Geoffrey Garen.
+
+This is tested by the NavigatorLanguage API test.
+
+WebCore was previously getting the list of preferred languages, and for each one, deducing
+the default region. That's wrong, since for example it doesn't respect the user's choice (in
+System Preferences) to display dates/calenders/etc according to a different region (like how
+I have my machine set to en-pl right now).
+
+It might be possible for the country code we get via kCFLocaleCountryCode to be something
+that our ICU doesn't handle. To defend against this, we search for the resulting country
+code in ICU's ISO countries list. If it doesn't appear in that list, we fall back on old
+behavior.
+
+* platform/mac/Language.mm:
+(WebCore::httpStyleLanguageCode):
+(WebCore::isValidICUCountryCode):
+(WebCore::platformUserPreferredLanguages):
+
 2016-04-26  Myles C. Maxfield  
 
 Use auto-generated operators in FontPlatformData


Modified: trunk/Source/WebCore/platform/mac/Language.mm (200104 => 200105)

--- trunk/Source/WebCore/platform/mac/Language.mm	2016-04-26 19:49:19 UTC (rev 200104)
+++ trunk/Source/WebCore/platform/mac/Language.mm	2016-04-26 20:01:13 UTC (rev 200105)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2005, 2006, 2010, 2011, 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,6 +30,7 @@
 #import "CFBundleSPI.h"
 #import "WebCoreNSStringExtras.h"
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -69,12 +70,14 @@
 
 namespace WebCore {
 
-static String httpStyleLanguageCode(NSString *language)
+static String httpStyleLanguageCode(NSString *language, NSString *country)
 {
 SInt32 languageCode;
 SInt32 regionCode; 
 SInt32 scriptCode; 
-CFStringEncoding stringEncoding; 
+CFStringEncoding stringEncoding;
+
+bool languageDidSpecifyExplicitVariant = [language rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"-_"]].location != NSNotFound;
 
 // FIXME: This transformation is very wrong:
 // 1. There is no reason why CFBundle localization names would be at all related to language names as used on the Web.
@@ -87,9 +90,19 @@
 
 // Make the string lowercase.
 NSString *lowercaseLanguageCode = [language lowercaseString];
-
-// Turn a '_' into a '-' if it appears after a 2-letter language code.
+NSString *lowercaseCountryCode = [country lowercaseString];
+
+// If we see a "_" after a 2-letter language code:
+// If the country is valid and the language did not specify a variant, replace the "_" and
+// whatever comes after it with "-" followed by the country code.
+// Otherwise, replace the "_" with 

[webkit-changes] [200104] trunk/Source/WebCore

2016-04-26 Thread mmaxfield
Title: [200104] trunk/Source/WebCore








Revision 200104
Author mmaxfi...@apple.com
Date 2016-04-26 12:49:19 -0700 (Tue, 26 Apr 2016)


Log Message
Use auto-generated operators in FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=157037

Reviewed by Geoffrey Garen.

The only reason why they weren't used before is because Cairo was
using a raw pointer. However, RefPtr supports Cairo types, so this
patch migrates that pointer to a RefPtr. Therefore, we can remove
our custom operators (because they work the same way as auto-
generated ones do).

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData): Deleted.
(WebCore::FontPlatformData::operator=): Deleted.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::scaledFont):
(WebCore::FontPlatformData::hash):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::~FontPlatformData): Deleted.
(WebCore::FontPlatformData::platformDataInit): Deleted.
(WebCore::FontPlatformData::platformDataAssign): Deleted.
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::~FontPlatformData): Deleted.
(WebCore::FontPlatformData::platformDataInit): Deleted.
(WebCore::FontPlatformData::platformDataAssign): Deleted.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::~FontPlatformData): Deleted.
(WebCore::FontPlatformData::platformDataAssign): Deleted.
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp
trunk/Source/WebCore/platform/graphics/FontPlatformData.h
trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp
trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp
trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200103 => 200104)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 19:07:14 UTC (rev 200103)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 19:49:19 UTC (rev 200104)
@@ -1,3 +1,40 @@
+2016-04-26  Myles C. Maxfield  
+
+Use auto-generated operators in FontPlatformData
+https://bugs.webkit.org/show_bug.cgi?id=157037
+
+Reviewed by Geoffrey Garen.
+
+The only reason why they weren't used before is because Cairo was
+using a raw pointer. However, RefPtr supports Cairo types, so this
+patch migrates that pointer to a RefPtr. Therefore, we can remove
+our custom operators (because they work the same way as auto-
+generated ones do).
+
+No new tests because there is no behavior change.
+
+* platform/graphics/FontPlatformData.cpp:
+(WebCore::FontPlatformData::FontPlatformData): Deleted.
+(WebCore::FontPlatformData::operator=): Deleted.
+* platform/graphics/FontPlatformData.h:
+(WebCore::FontPlatformData::scaledFont):
+(WebCore::FontPlatformData::hash):
+* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+(WebCore::FontPlatformData::~FontPlatformData): Deleted.
+(WebCore::FontPlatformData::platformDataInit): Deleted.
+(WebCore::FontPlatformData::platformDataAssign): Deleted.
+* platform/graphics/win/FontPlatformDataCGWin.cpp:
+(WebCore::FontPlatformData::~FontPlatformData): Deleted.
+(WebCore::FontPlatformData::platformDataInit): Deleted.
+(WebCore::FontPlatformData::platformDataAssign): Deleted.
+* platform/graphics/win/FontPlatformDataCairoWin.cpp:
+(WebCore::FontPlatformData::platformDataInit):
+(WebCore::FontPlatformData::FontPlatformData):
+(WebCore::FontPlatformData::~FontPlatformData): Deleted.
+(WebCore::FontPlatformData::platformDataAssign): Deleted.
+* platform/graphics/win/FontPlatformDataWin.cpp:
+(WebCore::FontPlatformData::FontPlatformData): Deleted.
+
 2016-04-26  Zalan Bujtas  
 
 Add renderer address and needslayout state to inlineboxtree dump.


Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp (200103 => 200104)

--- trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2016-04-26 19:07:14 UTC (rev 200103)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2016-04-26 19:49:19 UTC (rev 200104)
@@ -62,15 +62,6 @@
 }
 #endif
 
-FontPlatformData::FontPlatformData(const FontPlatformData& source)
-: FontPlatformData(source.m_size, source.m_syntheticBold, source.m_syntheticOblique, source.m_orientation, source.m_widthVariant, source.m_textRenderingMode)
-{
-m_isHashTableDeletedValue = source.m_isHashTableDeletedValue;
-m_isColorBitmapFont = source.m_isColorBitmapFont;
-  

[webkit-changes] [200103] trunk/Source/WebCore

2016-04-26 Thread zalan
Title: [200103] trunk/Source/WebCore








Revision 200103
Author za...@apple.com
Date 2016-04-26 12:07:14 -0700 (Tue, 26 Apr 2016)


Log Message
Add renderer address and needslayout state to inlineboxtree dump.
https://bugs.webkit.org/show_bug.cgi?id=157035

Reviewed by Simon Fraser.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::showLineBox):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::showLineBox):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::printPrefix):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/InlineBox.cpp
trunk/Source/WebCore/rendering/InlineTextBox.cpp
trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200102 => 200103)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 18:40:41 UTC (rev 200102)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 19:07:14 UTC (rev 200103)
@@ -1,3 +1,17 @@
+2016-04-26  Zalan Bujtas  
+
+Add renderer address and needslayout state to inlineboxtree dump.
+https://bugs.webkit.org/show_bug.cgi?id=157035
+
+Reviewed by Simon Fraser.
+
+* rendering/InlineBox.cpp:
+(WebCore::InlineBox::showLineBox):
+* rendering/InlineTextBox.cpp:
+(WebCore::InlineTextBox::showLineBox):
+* rendering/SimpleLineLayoutFunctions.cpp:
+(WebCore::SimpleLineLayout::printPrefix):
+
 2016-04-26  Fujii Hironori  
 
 [curl] Requests interrupted when using https via proxy


Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (200102 => 200103)

--- trunk/Source/WebCore/rendering/InlineBox.cpp	2016-04-26 18:40:41 UTC (rev 200102)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp	2016-04-26 19:07:14 UTC (rev 200103)
@@ -108,7 +108,7 @@
 
 void InlineBox::showLineBox(bool mark, int depth) const
 {
-fprintf(stderr, "--- --");
+fprintf(stderr, " %c-", isDirty() ? 'D' : '-');
 int printedCharacters = 0;
 if (mark) {
 fprintf(stderr, "*");


Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (200102 => 200103)

--- trunk/Source/WebCore/rendering/InlineTextBox.cpp	2016-04-26 18:40:41 UTC (rev 200102)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp	2016-04-26 19:07:14 UTC (rev 200103)
@@ -1073,7 +1073,7 @@
 
 void InlineTextBox::showLineBox(bool mark, int depth) const
 {
-fprintf(stderr, "--- --");
+fprintf(stderr, " %c-", isDirty() ? 'D' : '-');
 
 int printedCharacters = 0;
 if (mark) {
@@ -1087,7 +1087,7 @@
 value = value.substring(start(), len());
 value.replaceWithLiteral('\\', "");
 value.replaceWithLiteral('\n', "\\n");
-fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p) run(%d, %d) \"%s\"\n", boxName(), x(), y(), width(), height(), this, start(), start() + len(), value.utf8().data());
+fprintf(stderr, "%s  (%.2f, %.2f) (%.2f, %.2f) (%p) renderer->(%p) run(%d, %d) \"%s\"\n", boxName(), x(), y(), width(), height(), this, &renderer(), start(), start() + len(), value.utf8().data());
 }
 
 #endif


Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (200102 => 200103)

--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2016-04-26 18:40:41 UTC (rev 200102)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2016-04-26 19:07:14 UTC (rev 200103)
@@ -217,7 +217,7 @@
 #if ENABLE(TREE_DEBUGGING)
 static void printPrefix(int& printedCharacters, int depth)
 {
-fprintf(stderr, "--- --");
+fprintf(stderr, " --");
 printedCharacters = 0;
 while (++printedCharacters <= depth * 2)
 fputc(' ', stderr);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200101] trunk/Source/JavaScriptCore

2016-04-26 Thread mark . lam
Title: [200101] trunk/Source/_javascript_Core








Revision 200101
Author mark@apple.com
Date 2016-04-26 11:35:18 -0700 (Tue, 26 Apr 2016)


Log Message
Changed jsc options title to be more descriptive.
https://bugs.webkit.org/show_bug.cgi?id=157036

Reviewed by Joseph Pecoraro.

Let the title for --dumpOptions be "Modified JSC runtime options:" since it only
dumps overridden options.  The title for --options will remain "All JSC runtime
options:" since it dumps all all options with verbose detail.

* jsc.cpp:
(CommandLine::parseArguments):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/jsc.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200100 => 200101)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 18:27:08 UTC (rev 200100)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-26 18:35:18 UTC (rev 200101)
@@ -1,3 +1,17 @@
+2016-04-26  Mark Lam  
+
+Changed jsc options title to be more descriptive.
+https://bugs.webkit.org/show_bug.cgi?id=157036
+
+Reviewed by Joseph Pecoraro.
+
+Let the title for --dumpOptions be "Modified JSC runtime options:" since it only
+dumps overridden options.  The title for --options will remain "All JSC runtime
+options:" since it dumps all all options with verbose detail.
+
+* jsc.cpp:
+(CommandLine::parseArguments):
+
 2016-04-26  Oliver Hunt  
 
 Enable separated heap by default on ios


Modified: trunk/Source/_javascript_Core/jsc.cpp (200100 => 200101)

--- trunk/Source/_javascript_Core/jsc.cpp	2016-04-26 18:27:08 UTC (rev 200100)
+++ trunk/Source/_javascript_Core/jsc.cpp	2016-04-26 18:35:18 UTC (rev 200101)
@@ -2210,8 +2210,12 @@
 for (; i < argc; ++i)
 m_arguments.append(argv[i]);
 
-if (dumpOptionsLevel != JSC::Options::DumpLevel::None)
-JSC::Options::dumpAllOptions(stderr, dumpOptionsLevel, "All JSC runtime options:");
+if (dumpOptionsLevel != JSC::Options::DumpLevel::None) {
+const char* optionsTitle = (dumpOptionsLevel == JSC::Options::DumpLevel::Overridden)
+? "Modified JSC runtime options:"
+: "All JSC runtime options:";
+JSC::Options::dumpAllOptions(stderr, dumpOptionsLevel, optionsTitle);
+}
 JSC::Options::ensureOptionsAreCoherent();
 if (needToExit)
 jscExit(EXIT_SUCCESS);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200100] trunk/Source/WebCore

2016-04-26 Thread commit-queue
Title: [200100] trunk/Source/WebCore








Revision 200100
Author commit-qu...@webkit.org
Date 2016-04-26 11:27:08 -0700 (Tue, 26 Apr 2016)


Log Message
[curl] Requests interrupted when using https via proxy
https://bugs.webkit.org/show_bug.cgi?id=157028

Patch by Fujii Hironori  on 2016-04-26
Reviewed by Alex Christensen.

A proxy responds "200 Connection Established" to a CONNECT
method.  This response doesn't have Content-Type, then the
request is canceled due to a unsupported MIME type. This is not
a real response from the recipient server. It should not be
processed normally. Just ignore the response.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback):
Do nothing if httpCode is 0. This is the case of "200 Connection Established".

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200099 => 200100)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 18:22:40 UTC (rev 200099)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 18:27:08 UTC (rev 200100)
@@ -1,3 +1,20 @@
+2016-04-26  Fujii Hironori  
+
+[curl] Requests interrupted when using https via proxy
+https://bugs.webkit.org/show_bug.cgi?id=157028
+
+Reviewed by Alex Christensen.
+
+A proxy responds "200 Connection Established" to a CONNECT
+method.  This response doesn't have Content-Type, then the
+request is canceled due to a unsupported MIME type. This is not
+a real response from the recipient server. It should not be
+processed normally. Just ignore the response.
+
+* platform/network/curl/ResourceHandleManager.cpp:
+(WebCore::headerCallback):
+Do nothing if httpCode is 0. This is the case of "200 Connection Established".
+
 2016-04-26  Chris Dumez  
 
 Drop Dictionary from CanUseWTFOptionalForParameter()


Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (200099 => 200100)

--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2016-04-26 18:22:40 UTC (rev 200099)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp	2016-04-26 18:27:08 UTC (rev 200100)
@@ -482,6 +482,10 @@
 long httpCode = 0;
 curl_easy_getinfo(h, CURLINFO_RESPONSE_CODE, &httpCode);
 
+if (!httpCode) {
+// Comes here when receiving 200 Connection Established. Just return.
+return totalSize;
+}
 if (isHttpInfo(httpCode)) {
 // Just return when receiving http info, e.g. HTTP/1.1 100 Continue.
 // If not, the request might be cancelled, because the MIME type will be empty for this response.






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200099] trunk/Source/WebCore

2016-04-26 Thread cdumez
Title: [200099] trunk/Source/WebCore








Revision 200099
Author cdu...@apple.com
Date 2016-04-26 11:22:40 -0700 (Tue, 26 Apr 2016)


Log Message
Drop Dictionary from CanUseWTFOptionalForParameter()
https://bugs.webkit.org/show_bug.cgi?id=157023

Reviewed by Darin Adler.

As per Web IDL, optional dictionary parameters are always considered to have
a default value of an empty dictionary, unless otherwise specified. There is
therefore never any need to use Optional<> for it. Just implement this
behavior in the bindings generator and drop blacklisting of Dictionary from
CanUseWTFOptionalForParameter().

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
(CanUseWTFOptionalForParameter): Deleted.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOptionsObject):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200098 => 200099)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 18:20:09 UTC (rev 200098)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 18:22:40 UTC (rev 200099)
@@ -1,3 +1,22 @@
+2016-04-26  Chris Dumez  
+
+Drop Dictionary from CanUseWTFOptionalForParameter()
+https://bugs.webkit.org/show_bug.cgi?id=157023
+
+Reviewed by Darin Adler.
+
+As per Web IDL, optional dictionary parameters are always considered to have
+a default value of an empty dictionary, unless otherwise specified. There is
+therefore never any need to use Optional<> for it. Just implement this
+behavior in the bindings generator and drop blacklisting of Dictionary from
+CanUseWTFOptionalForParameter().
+
+* bindings/scripts/CodeGeneratorJS.pm:
+(GenerateParametersCheck):
+(CanUseWTFOptionalForParameter): Deleted.
+* bindings/scripts/test/JS/JSTestObj.cpp:
+(WebCore::jsTestObjPrototypeFunctionOptionsObject):
+
 2016-04-26  Antti Koivisto  
 
 RenderElement::style() should return const RenderStyle


Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200098 => 200099)

--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-26 18:20:09 UTC (rev 200098)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-26 18:22:40 UTC (rev 200099)
@@ -3383,13 +3383,48 @@
 return 0 if $codeGenerator->IsEnumType($type);
 return 0 if $codeGenerator->IsWrapperType($type);
 return 0 if $type eq "DOMString";
-return 0 if $type eq "Dictionary";
 return 0 if $type eq "any";
 return 0 if $type eq "unsigned long";
 
 return 1;
 }
 
+sub WillConvertUndefinedToDefaultParameterValue
+{
+my $parameterType = shift;
+my $defaultValue = shift;
+
+if ($defaultValue eq "[]") {
+# Dictionary(state, undefined) will construct an empty Dictionary.
+return 1 if $parameterType eq "Dictionary";
+
+# toRefPtrNativeArray() will convert undefined to an empty Vector.
+return 1 if $codeGenerator->GetArrayType($parameterType) or $codeGenerator->GetSequenceType($parameterType);
+}
+
+# toString() will convert undefined to the string "undefined";
+return 1 if $parameterType eq "DOMString" and $defaultValue eq "undefined";
+
+# JSValue::toBoolean() will convert undefined to false.
+return 1 if $parameterType eq "boolean" and $defaultValue eq "false";
+
+# JSValue::toInt*() / JSValue::toUint*() will convert undefined to 0.
+if ($defaultValue eq "0") {
+return 1 if $parameterType eq "byte" or $parameterType eq "octet";
+return 1 if $parameterType eq "short" or $parameterType eq "unsigned short";
+return 1 if $parameterType eq "long" or $parameterType eq "unsigned long";
+return 1 if $parameterType eq "long long" or $parameterType eq "unsigned long long";
+}
+
+if ($defaultValue eq "NaN") {
+# toNumber() / toFloat() convert undefined to NaN.
+return 1 if $parameterType eq "double" or $parameterType eq "unrestricted double";
+return 1 if $parameterType eq "float" or $parameterType eq "unrestricted float";
+}
+
+return 0;
+}
+
 sub GenerateParametersCheck
 {
 my $outputArray = shift;
@@ -3434,12 +3469,13 @@
 $implIncludes{"JSDOMBinding.h"} = 1;
 foreach my $parameter (@{$function->parameters}) {
 my $argType = $parameter->type;
+my $optional = $parameter->isOptional;
 
-# Optional arguments with [Optional] should generate an early call with fewer arguments.
-# Optional arguments with [Optional=...] should not generate the early call.
-# Optional Dictionary arguments always considered to have default of empty dictionary.
-my $optional = $parameter->isOptional;
-if ($optional && !defined($parameter->default) && !CanUseWTFOptionalFor

[webkit-changes] [200097] trunk/Source/JavaScriptCore

2016-04-26 Thread oliver
Title: [200097] trunk/Source/_javascript_Core








Revision 200097
Author oli...@apple.com
Date 2016-04-26 10:46:23 -0700 (Tue, 26 Apr 2016)


Log Message
2016-04-26  Oliver Hunt  

Enable separated heap by default on ios
https://bugs.webkit.org/show_bug.cgi?id=156720

Unreviewed roll-in of this change. There is only one
additional allocation involved in this logic, and that
is a duplicate mapping.

Either our tools are not report real memory usage
or this revision is not responsible for the regression.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/Options.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200096 => 200097)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 17:38:43 UTC (rev 200096)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-26 17:46:23 UTC (rev 200097)
@@ -1,3 +1,18 @@
+2016-04-26  Oliver Hunt  
+
+Enable separated heap by default on ios
+https://bugs.webkit.org/show_bug.cgi?id=156720
+
+Unreviewed roll-in of this change. There is only one
+additional allocation involved in this logic, and that
+is a duplicate mapping.
+
+Either our tools are not report real memory usage
+or this revision is not responsible for the regression.
+
+* runtime/Options.cpp:
+(JSC::recomputeDependentOptions):
+
 2016-04-26  Filip Pizlo  
 
 DFG backends shouldn't emit type checks at KnownBlah edges


Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (200096 => 200097)

--- trunk/Source/_javascript_Core/runtime/Options.cpp	2016-04-26 17:38:43 UTC (rev 200096)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2016-04-26 17:46:23 UTC (rev 200097)
@@ -341,6 +341,13 @@
 Options::useOSREntryToFTL() = false;
 }
 
+#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 10
+// Override globally for now. Longer term we'll just make the default
+// be to have this option enabled, and have platforms that don't support
+// it just silently use a single mapping.
+Options::useSeparatedWXHeap() = true;
+#endif
+
 // Compute the maximum value of the reoptimization retry counter. This is simply
 // the largest value at which we don't overflow the execute counter, when using it
 // to left-shift the execution counter by this amount. Currently the value ends






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200096] trunk/Source/JavaScriptCore

2016-04-26 Thread fpizlo
Title: [200096] trunk/Source/_javascript_Core








Revision 200096
Author fpi...@apple.com
Date 2016-04-26 10:38:43 -0700 (Tue, 26 Apr 2016)


Log Message
DFG backends shouldn't emit type checks at KnownBlah edges
https://bugs.webkit.org/show_bug.cgi?id=157025

Reviewed by Michael Saboff.

This fixes a crash I found when browsing Bing maps with forceEagerCompilation. I include a
100% repro test case.

The issue is that our code still doesn't fully appreciate the devious implications of
KnownBlah use kinds. Consider KnownCell for example. It means: "trust me, I know that this
value will be a cell". You aren't required to provide a proof when you use KnownCell. Often,
we use it as a result of a path-sensitive proof. The abstract interpreter is not
path-sensitive, so AI will be absolutely sure that the KnownCell use might see a non-cell.
This can lead to debug assertions (which this change removes) and it can lead to the backends
emitting a type check. That type check can be pure evil if the node that has this edge does
not have an exit origin. Such a node would have passed validation because the validater would
have thought that the node cannot exit (after all, according to the IR semantics, there is no
speculation at KnownCell).

This comprehensively fixes the issue by recognizing that Foo(KnownCell:@x) means: I have
already proved that by the time you start executing Foo, @x will already be a cell. I cannot
tell you how I proved this but you can rely on it anyway. AI now takes advantage of this
meaning and will always do filtering of KnownBlah edges regardless of whether the backend
actually emits any type checks for those edges. Since the filtering runs before the backend,
the backend will not emit any checks because it will know that the edge was already checked
(by whatever mechanism we used when we made the edge KnownBlah).

Note that it's good that we found this bug now. The DFG currently does very few
sparse-conditional or path-sensitive optimizations, but it will probably do more in the
future. The bug happens because GetByOffset and friends can achieve path-sensitive proofs via
watchpoints on the inferred type. Normally, AI can follow along with this proof. But in the
example program, and on Bing maps, we would GCSE one GetByOffset with another that had a
weaker proven type. That turned out to be completely sound - between the two GetByOffset's
there was a Branch to null check it. The inferred type of the second GetByOffset ended up
knowing that it cannot be null because null only occurred in some structures but not others.
If we added more sparse-conditional stuff to Branch, then AI would know how to follow along
with the proof but it would also create more situations where we'd have a path-sensitive
proof. So, it's good that we're now getting this right.

* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::filterEdgeByUse):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter::executeEdges):
(JSC::DFG::AbstractInterpreter::executeKnownEdgeTypes):
(JSC::DFG::AbstractInterpreter::verifyEdge):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
* tests/stress/path-sensitive-known-cell-crash.js: Added.
(bar):
(foo):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreter.h
trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
trunk/Source/_javascript_Core/dfg/DFGUseKind.h
trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp


Added Paths

trunk/Source/_javascript_Core/tests/stress/path-sensitive-known-cell-crash.js




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200095 => 200096)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 17:28:54 UTC (rev 200095)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-26 17:38:43 UTC (rev 200096)
@@ -1,3 +1,60 @@
+2016-04-26  Filip Pizlo  
+
+DFG backends shouldn't emit type checks at KnownBlah edges
+https://bugs.webkit.org/show_bug.cgi?id=157025
+
+Reviewed by Michael Saboff.
+
+This fixes a crash I found when browsing Bing maps with forceEagerCompilation. I include a
+100% repro test case.
+
+The issue is that our code still doesn't fully appreciate the devious implications of
+KnownBlah use kinds. Consider KnownCell for example. It means: "trust me, I know that this
+value will be a cell". You aren't required to provide a proof when you use KnownCell. Often,
+we use it as a result of a path-sensitive proof. The abstract interpreter is not
+path-sensitive, so AI will be absolutely sure that the KnownCell use might see a non-cell.
+This can lead to debug assertions (which this change removes) and it can lead to the back

[webkit-changes] [200095] trunk/Source/JavaScriptCore

2016-04-26 Thread barraclough
Title: [200095] trunk/Source/_javascript_Core








Revision 200095
Author barraclo...@apple.com
Date 2016-04-26 10:28:54 -0700 (Tue, 26 Apr 2016)


Log Message
Enable separated heap by default on ios
https://bugs.webkit.org/show_bug.cgi?id=156720

Unreviewed rollout - caused memory regression.

* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/Options.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200094 => 200095)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 17:20:29 UTC (rev 200094)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-26 17:28:54 UTC (rev 200095)
@@ -1,3 +1,13 @@
+2016-04-26  Gavin Barraclough  
+
+Enable separated heap by default on ios
+https://bugs.webkit.org/show_bug.cgi?id=156720
+
+Unreviewed rollout - caused memory regression.
+
+* runtime/Options.cpp:
+(JSC::recomputeDependentOptions):
+
 2016-04-26  Joseph Pecoraro  
 
 Improve jsc --help and making sampling options
@@ -1711,16 +1721,6 @@
 (JSC::JSDollarVMPrototype::finishCreation):
 (JSC::functionPrintValue): Deleted.
 
-2016-04-18  Oliver Hunt  
-
-Enable separated heap by default on ios
-https://bugs.webkit.org/show_bug.cgi?id=156720
-
-Reviewed by ggaren.
-
-* runtime/Options.cpp:
-(JSC::recomputeDependentOptions):
-
 2016-04-19  Mark Lam  
 
 Re-landing: ES6: Implement String.prototype.split and RegExp.prototype[@@split].


Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (200094 => 200095)

--- trunk/Source/_javascript_Core/runtime/Options.cpp	2016-04-26 17:20:29 UTC (rev 200094)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp	2016-04-26 17:28:54 UTC (rev 200095)
@@ -341,13 +341,6 @@
 Options::useOSREntryToFTL() = false;
 }
 
-#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 10
-// Override globally for now. Longer term we'll just make the default
-// be to have this option enabled, and have platforms that don't support
-// it just silently use a single mapping.
-Options::useSeparatedWXHeap() = true;
-#endif
-
 // Compute the maximum value of the reoptimization retry counter. This is simply
 // the largest value at which we don't overflow the execute counter, when using it
 // to left-shift the execution counter by this amount. Currently the value ends






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200094] trunk/Source/WebCore

2016-04-26 Thread mmaxfield
Title: [200094] trunk/Source/WebCore








Revision 200094
Author mmaxfi...@apple.com
Date 2016-04-26 10:20:29 -0700 (Tue, 26 Apr 2016)


Log Message
Make FontPlatformData immutable
https://bugs.webkit.org/show_bug.cgi?id=157024

Reviewed by Darin Adler.

This patch deletes all functions which modify a FontPlatformData once
it has been created. This makes for a cleaner design.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::Font::verticalRightOrientationFont):
(WebCore::Font::nonSyntheticItalicFont):
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::cloneWithOrientation):
(WebCore::FontPlatformData::cloneWithSyntheticOblique):
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::setIsSystemFont): Deleted.
(WebCore::FontPlatformData::setSize): Deleted.
(WebCore::FontPlatformData::setOrientation): Deleted.
(WebCore::FontPlatformData::setSyntheticOblique): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformInit):
(WebCore::Font::platformCharWidthInit):
(WebCore::createDerivativeFont):
(WebCore::Font::createFontWithoutSynthesizableFeatures):
(WebCore::Font::platformCreateScaledFont):
(WebCore::Font::platformWidthForGlyph):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::openTypeTable):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::platformDataInit):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/Font.cpp
trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp
trunk/Source/WebCore/platform/graphics/FontPlatformData.h
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
trunk/Source/WebCore/platform/graphics/freetype/FontPlatformData.h
trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp
trunk/Source/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp
trunk/Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp
trunk/Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200093 => 200094)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 17:17:46 UTC (rev 200093)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 17:20:29 UTC (rev 200094)
@@ -1,3 +1,43 @@
+2016-04-26  Myles C. Maxfield  
+
+Make FontPlatformData immutable
+https://bugs.webkit.org/show_bug.cgi?id=157024
+
+Reviewed by Darin Adler.
+
+This patch deletes all functions which modify a FontPlatformData once
+it has been created. This makes for a cleaner design.
+
+No new tests because there is no behavior change.
+
+* platform/graphics/Font.cpp:
+(WebCore::Font::verticalRightOrientationFont):
+(WebCore::Font::nonSyntheticItalicFont):
+* platform/graphics/FontPlatformData.cpp:
+(WebCore::FontPlatformData::FontPlatformData):
+(WebCore::FontPlatformData::cloneWithOrientation):
+(WebCore::FontPlatformData::cloneWithSyntheticOblique):
+* platform/graphics/FontPlatformData.h:
+(WebCore::FontPlatformData::setIsSystemFont): Deleted.
+(WebCore::FontPlatformData::setSize): Deleted.
+(WebCore::FontPlatformData::setOrientation): Deleted.
+(WebCore::FontPlatformData::setSyntheticOblique): Deleted.
+* platform/graphics/cocoa/FontCacheCoreText.cpp:
+(WebCore::FontCache::systemFallbackForCharacters):
+* platform/graphics/cocoa/FontCascadeCocoa.mm:
+(WebCore::FontCascade::drawGlyphs):
+* platform/graphics/cocoa/FontCocoa.mm:
+(WebCore::Font::platformInit):
+(WebCore::Font::platformCharWidthInit):
+(WebCore::createDerivativeFont):
+(WebCore::Font::createFontWithoutSynthesizableFeatures):
+(WebCore::Font::platformCreateScaledFont):
+(WebCore::Font::platformWidthForGlyph):
+* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
+(WebCore::FontPlatformData::openTypeTable):
+* platform/graphics/win/FontPlatformDataCairoWin.cpp:
+(WebCore::FontPlatformData::platformDataInit):
+
 2016-04-26  Ryan Haddad  
 
 Unreviewed, rolling out r200089.


Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (200093 => 200094)

--- trunk/Source/WebCore/platform/graphics/Font.cpp	2016-04-26 17:17:46 UTC (rev 200093)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp	2016-04-26 17:20:29 UTC (rev 200094)
@@ -253,8 +253,7 @@
 if (!m_derivedFontData)
 m_derivedFontData = std::make_unique(i

[webkit-changes] [200093] trunk/Source/WebCore

2016-04-26 Thread ryanhaddad
Title: [200093] trunk/Source/WebCore








Revision 200093
Author ryanhad...@apple.com
Date 2016-04-26 10:17:46 -0700 (Tue, 26 Apr 2016)


Log Message
Unreviewed, rolling out r200089.

This change causes API test failures

Reverted changeset:

"WebCore on Mac ignores the user's preferred region (country)
while getting the language"
https://bugs.webkit.org/show_bug.cgi?id=156993
http://trac.webkit.org/changeset/200089

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/Language.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (200092 => 200093)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 16:47:33 UTC (rev 200092)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 17:17:46 UTC (rev 200093)
@@ -1,3 +1,16 @@
+2016-04-26  Ryan Haddad  
+
+Unreviewed, rolling out r200089.
+
+This change causes API test failures
+
+Reverted changeset:
+
+"WebCore on Mac ignores the user's preferred region (country)
+while getting the language"
+https://bugs.webkit.org/show_bug.cgi?id=156993
+http://trac.webkit.org/changeset/200089
+
 2016-04-26  Brent Fulgham  
 
 GuardMalloc crash in WebCore::HTMLFrameElementBase::marginHeight() 


Modified: trunk/Source/WebCore/platform/mac/Language.mm (200092 => 200093)

--- trunk/Source/WebCore/platform/mac/Language.mm	2016-04-26 16:47:33 UTC (rev 200092)
+++ trunk/Source/WebCore/platform/mac/Language.mm	2016-04-26 17:17:46 UTC (rev 200093)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003, 2005, 2006, 2010, 2011, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,6 @@
 #import "CFBundleSPI.h"
 #import "WebCoreNSStringExtras.h"
 #import 
-#import 
 #import 
 #import 
 #import 
@@ -70,7 +69,7 @@
 
 namespace WebCore {
 
-static String httpStyleLanguageCode(NSString *language, NSString *country)
+static String httpStyleLanguageCode(NSString *language)
 {
 SInt32 languageCode;
 SInt32 regionCode; 
@@ -88,19 +87,9 @@
 
 // Make the string lowercase.
 NSString *lowercaseLanguageCode = [language lowercaseString];
-NSString *lowercaseCountryCode = [country lowercaseString];
-
-// If we see a "_" after a 2-letter language code:
-// If the country is valid, replace the "_" and whatever comes after it with "-" followed by the
-// country code.
-// Otherwise, replace the "_" with a "-" and use whatever country
-// CFBundleCopyLocalizationForLocalizationInfo() returned.
+
+// Turn a '_' into a '-' if it appears after a 2-letter language code.
 if ([lowercaseLanguageCode length] >= 3 && [lowercaseLanguageCode characterAtIndex:2] == '_') {
-if (country)
-return [NSString stringWithFormat:@"%@-%@", [lowercaseLanguageCode substringWithRange:NSMakeRange(0, 2)], lowercaseCountryCode];
-
-// Fall back to older behavior, which used the original language-based code but just changed
-// the "_" to a "-".
 RetainPtr mutableLanguageCode = adoptNS([lowercaseLanguageCode mutableCopy]);
 [mutableLanguageCode.get() replaceCharactersInRange:NSMakeRange(2, 1) withString:@"-"];
 return mutableLanguageCode.get();
@@ -109,18 +98,6 @@
 return lowercaseLanguageCode;
 }
 
-static bool isValidICUCountryCode(NSString* countryCode)
-{
-const char* const* countries = uloc_getISOCountries();
-const char* countryUTF8 = [countryCode UTF8String];
-for (unsigned i = 0; countries[i]; ++i) {
-const char* possibleCountry = countries[i];
-if (!strcmp(countryUTF8, possibleCountry))
-return true;
-}
-return false;
-}
-
 Vector platformUserPreferredLanguages()
 {
 #if PLATFORM(MAC)
@@ -136,19 +113,13 @@
 Vector& userPreferredLanguages = preferredLanguages();
 
 if (userPreferredLanguages.isEmpty()) {
-RetainPtr locale = adoptCF(CFLocaleCopyCurrent());
-NSString *countryCode = (NSString *)CFLocaleGetValue(locale.get(), kCFLocaleCountryCode);
-
-if (!isValidICUCountryCode(countryCode))
-countryCode = nil;
-
 RetainPtr languages = adoptCF(CFLocaleCopyPreferredLanguages());
 CFIndex languageCount = CFArrayGetCount(languages.get());
 if (!languageCount)
 userPreferredLanguages.append("en");
 else {
 for (CFIndex i = 0; i < languageCount; i++)
-userPreferredLanguages.append(httpStyleLanguageCode((NSString *)CFArrayGetValueAtIndex(languages.get(), i), countryCode));
+userPreferredLanguages.append(httpStyleLanguageCode((NSString *)CFArrayGetValueAtIndex(languages.get(), i)));
 }
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit

[webkit-changes] [200092] trunk/Source/JavaScriptCore

2016-04-26 Thread commit-queue
Title: [200092] trunk/Source/_javascript_Core








Revision 200092
Author commit-qu...@webkit.org
Date 2016-04-26 09:47:33 -0700 (Tue, 26 Apr 2016)


Log Message
Improve jsc --help and making sampling options
https://bugs.webkit.org/show_bug.cgi?id=157015

Patch by Joseph Pecoraro  on 2016-04-26
Reviewed by Saam Barati.

Simplify sampling options to be easier to remember:

  * --reportSamplingProfilerData => --sample
  * --samplingProfilerTimingInterval => --sampleInterval

Update the --help to mention --sample, and restore the behavior of
--options outputing all possible options so you can discover which
options are available.

* jsc.cpp:
(printUsageStatement):
(CommandLine::parseArguments):
Improve help and modify option dumping.

* runtime/Options.h:
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::SamplingProfiler):
Rename the sampling interval option.

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/jsc.cpp
trunk/Source/_javascript_Core/runtime/Options.h
trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (200091 => 200092)

--- trunk/Source/_javascript_Core/ChangeLog	2016-04-26 16:45:13 UTC (rev 200091)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-26 16:47:33 UTC (rev 200092)
@@ -1,3 +1,29 @@
+2016-04-26  Joseph Pecoraro  
+
+Improve jsc --help and making sampling options
+https://bugs.webkit.org/show_bug.cgi?id=157015
+
+Reviewed by Saam Barati.
+
+Simplify sampling options to be easier to remember:
+
+  * --reportSamplingProfilerData => --sample
+  * --samplingProfilerTimingInterval => --sampleInterval
+
+Update the --help to mention --sample, and restore the behavior of
+--options outputing all possible options so you can discover which
+options are available.
+
+* jsc.cpp:
+(printUsageStatement):
+(CommandLine::parseArguments):
+Improve help and modify option dumping.
+
+* runtime/Options.h:
+* runtime/SamplingProfiler.cpp:
+(JSC::SamplingProfiler::SamplingProfiler):
+Rename the sampling interval option.
+
 2016-04-26  Commit Queue  
 
 Unreviewed, rolling out r200083.


Modified: trunk/Source/_javascript_Core/jsc.cpp (200091 => 200092)

--- trunk/Source/_javascript_Core/jsc.cpp	2016-04-26 16:45:13 UTC (rev 200091)
+++ trunk/Source/_javascript_Core/jsc.cpp	2016-04-26 16:47:33 UTC (rev 200092)
@@ -2100,8 +2100,9 @@
 fprintf(stderr, "  -p   Outputs profiling data to a file\n");
 fprintf(stderr, "  -x Output exit code before terminating\n");
 fprintf(stderr, "\n");
+fprintf(stderr, "  --sample   Collects and outputs sampling profiler data\n");
 fprintf(stderr, "  --options  Dumps all JSC VM options and exits\n");
-fprintf(stderr, "  --dumpOptions  Dumps all JSC VM options before continuing\n");
+fprintf(stderr, "  --dumpOptions  Dumps all non-default JSC VM options before continuing\n");
 fprintf(stderr, "  --=  Sets the specified JSC VM option\n");
 fprintf(stderr, "\n");
 
@@ -2113,7 +2114,7 @@
 Options::initialize();
 
 int i = 1;
-bool needToDumpOptions = false;
+JSC::Options::DumpLevel dumpOptionsLevel = JSC::Options::DumpLevel::None;
 bool needToExit = false;
 
 bool hasBadJSCOptions = false;
@@ -2171,15 +2172,15 @@
 printUsageStatement(true);
 
 if (!strcmp(arg, "--options")) {
-needToDumpOptions = true;
+dumpOptionsLevel = JSC::Options::DumpLevel::Verbose;
 needToExit = true;
 continue;
 }
 if (!strcmp(arg, "--dumpOptions")) {
-needToDumpOptions = true;
+dumpOptionsLevel = JSC::Options::DumpLevel::Overridden;
 continue;
 }
-if (!strcmp(arg, "--reportSamplingProfilerData")) {
+if (!strcmp(arg, "--sample")) {
 JSC::Options::useSamplingProfiler() = true;
 JSC::Options::collectSamplingProfilerDataForJSCShell() = true;
 m_dumpSamplingProfilerData = true;
@@ -2209,8 +2210,8 @@
 for (; i < argc; ++i)
 m_arguments.append(argv[i]);
 
-if (needToDumpOptions)
-JSC::Options::dumpAllOptions(stderr, JSC::Options::DumpLevel::Overridden, "All JSC runtime options:");
+if (dumpOptionsLevel != JSC::Options::DumpLevel::None)
+JSC::Options::dumpAllOptions(stderr, dumpOptionsLevel, "All JSC runtime options:");
 JSC::Options::ensureOptionsAreCoherent();
 if (needToExit)
 jscExit(EXIT_SUCCESS);


Modified: trunk/Source/_javascript_Core/runtime/Options.h (200091 => 200092)

--- trunk/Source/_javascript_Core/runtime/Options.h	2016-04-26 16:45:13 UTC (rev 200091)
+++ trunk/Source/_javascript_Core/runtime/Options.h	2016-04-26 16:47:33 UTC (rev 200092)
@@ -315,11 +315,14 @@
 v(unsigned, forceRA

[webkit-changes] [200091] trunk/Source/WebCore

2016-04-26 Thread bfulgham
Title: [200091] trunk/Source/WebCore








Revision 200091
Author bfulg...@apple.com
Date 2016-04-26 09:45:13 -0700 (Tue, 26 Apr 2016)


Log Message
GuardMalloc crash in WebCore::HTMLFrameElementBase::marginHeight() 
https://bugs.webkit.org/show_bug.cgi?id=157020


Reviewed by Darin Adler.

Calls to setIntegralAttribute triggers event handling code, which can cause
the underlying m_frameOwnerElement member to be deleted. We could clone this
object, but since we only want the width and height we should just read them
while we know the object is in a good state, then execute the potentially
mutating methods.

Tested by imported/blink/fast/dom/HTMLBodyElement/body-inserting-iframe-crash.html.

* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Read margin width and height before
calling setIntegralAttribute.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLBodyElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200090 => 200091)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 16:33:55 UTC (rev 200090)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 16:45:13 UTC (rev 200091)
@@ -1,3 +1,23 @@
+2016-04-26  Brent Fulgham  
+
+GuardMalloc crash in WebCore::HTMLFrameElementBase::marginHeight() 
+https://bugs.webkit.org/show_bug.cgi?id=157020
+
+
+Reviewed by Darin Adler.
+
+Calls to setIntegralAttribute triggers event handling code, which can cause
+the underlying m_frameOwnerElement member to be deleted. We could clone this
+object, but since we only want the width and height we should just read them
+while we know the object is in a good state, then execute the potentially
+mutating methods.
+
+Tested by imported/blink/fast/dom/HTMLBodyElement/body-inserting-iframe-crash.html.
+
+* html/HTMLBodyElement.cpp:
+(WebCore::HTMLBodyElement::insertedInto): Read margin width and height before
+calling setIntegralAttribute.
+
 2016-04-25  Filip Pizlo  
 
 WebCore on Mac ignores the user's preferred region (country) while getting the language


Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (200090 => 200091)

--- trunk/Source/WebCore/html/HTMLBodyElement.cpp	2016-04-26 16:33:55 UTC (rev 200090)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp	2016-04-26 16:45:13 UTC (rev 200091)
@@ -193,17 +193,22 @@
 // FIXME: It's surprising this is web compatible since it means a marginwidth and marginheight attribute can
 // magically appear on the  of all documents embedded through  or .
 // FIXME: Perhaps this code should be in attach() instead of here.
-HTMLFrameOwnerElement* ownerElement = document().ownerElement();
-if (is(ownerElement)) {
-HTMLFrameElementBase& ownerFrameElement = downcast(*ownerElement);
-int marginWidth = ownerFrameElement.marginWidth();
-if (marginWidth != -1)
-setIntegralAttribute(marginwidthAttr, marginWidth);
-int marginHeight = ownerFrameElement.marginHeight();
-if (marginHeight != -1)
-setIntegralAttribute(marginheightAttr, marginHeight);
-}
+auto* ownerElement = document().ownerElement();
+if (!is(ownerElement))
+return InsertionDone;
+
+auto& ownerFrameElement = downcast(*ownerElement);
 
+// Read values from the owner before setting any attributes, since setting an attribute can run arbitrary
+// _javascript_, which might delete the owner element.
+int marginWidth = ownerFrameElement.marginWidth();
+int marginHeight = ownerFrameElement.marginHeight();
+
+if (marginWidth != -1)
+setIntegralAttribute(marginwidthAttr, marginWidth);
+if (marginHeight != -1)
+setIntegralAttribute(marginheightAttr, marginHeight);
+
 return InsertionDone;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200090] trunk/Websites/perf.webkit.org

2016-04-26 Thread rniwa
Title: [200090] trunk/Websites/perf.webkit.org








Revision 200090
Author rn...@webkit.org
Date 2016-04-26 09:33:55 -0700 (Tue, 26 Apr 2016)


Log Message
Chart status should always be computed against prior values
https://bugs.webkit.org/show_bug.cgi?id=157014

Reviewed by Darin Adler.

Compare the current value against the last baseline or target value that appear before the current value in time
so that the comparison stay the same even when new baseline and target values are reported. Also include the compared
baseline or target value in the label for clarity.

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype._computeChartStatus):
(ChartStatusView.prototype._computeChartStatus.labelForDiff):
(ChartStatusView.prototype._findLastPointPriorToTime): Extracted from _relativeDifferenceToLaterPointInTimeSeries.
Now finds the last point before the current point's time if there is any, or the last point in baseline / target.
(ChartStatusView.prototype._relativeDifferenceToLaterPointInTimeSeries): Deleted.
* public/v3/models/metric.js:
(Metric.prototype.makeFormatter): Don't use SI units for unit-less metrics.

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js
trunk/Websites/perf.webkit.org/public/v3/models/metric.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (200089 => 200090)

--- trunk/Websites/perf.webkit.org/ChangeLog	2016-04-26 16:22:32 UTC (rev 200089)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2016-04-26 16:33:55 UTC (rev 200090)
@@ -1,3 +1,23 @@
+2016-04-26  Ryosuke Niwa  
+
+Chart status should always be computed against prior values
+https://bugs.webkit.org/show_bug.cgi?id=157014
+
+Reviewed by Darin Adler.
+
+Compare the current value against the last baseline or target value that appear before the current value in time
+so that the comparison stay the same even when new baseline and target values are reported. Also include the compared
+baseline or target value in the label for clarity.
+
+* public/v3/components/chart-status-view.js:
+(ChartStatusView.prototype._computeChartStatus):
+(ChartStatusView.prototype._computeChartStatus.labelForDiff):
+(ChartStatusView.prototype._findLastPointPriorToTime): Extracted from _relativeDifferenceToLaterPointInTimeSeries.
+Now finds the last point before the current point's time if there is any, or the last point in baseline / target.
+(ChartStatusView.prototype._relativeDifferenceToLaterPointInTimeSeries): Deleted.
+* public/v3/models/metric.js:
+(Metric.prototype.makeFormatter): Don't use SI units for unit-less metrics.
+
 2016-04-13  Ryosuke Niwa  
 
 REGRESSION(r199444): Perf dashboard always fetches all measurement sets


Modified: trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js (200089 => 200090)

--- trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js	2016-04-26 16:22:32 UTC (rev 200089)
+++ trunk/Websites/perf.webkit.org/public/v3/components/chart-status-view.js	2016-04-26 16:33:55 UTC (rev 200090)
@@ -112,33 +112,38 @@
 if (!currentPoint)
 currentPoint = currentTimeSeriesData[currentTimeSeriesData.length - 1];
 
-var diffFromBaseline = this._relativeDifferenceToLaterPointInTimeSeries(currentPoint, baselineTimeSeriesData);
-var diffFromTarget = this._relativeDifferenceToLaterPointInTimeSeries(currentPoint, targetTimeSeriesData);
+var baselinePoint = this._findLastPointPriorToTime(currentPoint, baselineTimeSeriesData);
+var diffFromBaseline = baselinePoint !== undefined ? (currentPoint.value - baselinePoint.value) / baselinePoint.value : undefined;
 
+var targetPoint = this._findLastPointPriorToTime(currentPoint, targetTimeSeriesData);
+var diffFromTarget = targetPoint !== undefined ? (currentPoint.value - targetPoint.value) / targetPoint.value : undefined;
+
 var label = '';
 var className = '';
 
-function labelForDiff(diff, name, comparison)
+function labelForDiff(diff, referencePoint, name, comparison)
 {
-return Math.abs(diff * 100).toFixed(1) + '% ' + comparison + ' ' + name;
+var relativeDiff = Math.abs(diff * 100).toFixed(1);
+var referenceValue = referencePoint ? ` (${formatter(referencePoint.value)})` : '';
+return `${relativeDiff}% ${comparison} ${name}${referenceValue}`;
 }
 
 var smallerIsBetter = metric.isSmallerBetter();
 if (diffFromBaseline !== undefined && diffFromTarget !== undefined) {
 if (diffFromBaseline > 0 == smallerIsBetter) {
-label = labelForDiff(diffFromBaseline, 'baseline', 'worse than');
+label = labelForDiff(diffFromBaseline, baselinePoint, 'baseline', 'worse than');
 className = 'worse';
 

[webkit-changes] [200089] trunk/Source/WebCore

2016-04-26 Thread fpizlo
Title: [200089] trunk/Source/WebCore








Revision 200089
Author fpi...@apple.com
Date 2016-04-26 09:22:32 -0700 (Tue, 26 Apr 2016)


Log Message
WebCore on Mac ignores the user's preferred region (country) while getting the language
https://bugs.webkit.org/show_bug.cgi?id=156993

Reviewed by Geoffrey Garen.

I don't know how to test this since this depends on user settings.

WebCore was previously getting the list of preferred languages, and for each one, deducing
the default region. That's wrong, since for example it doesn't respect the user's choice (in
System Preferences) to display dates/calenders/etc according to a different region (like how
I have my machine set to en-pl right now).

It might be possible for the country code we get via kCFLocaleCountryCode to be something
that our ICU doesn't handle. To defend against this, we search for the resulting country
code in ICU's ISO countries list. If it doesn't appear in that list, we fall back on old
behavior.

* platform/mac/Language.mm:
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/Language.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (200088 => 200089)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 16:12:19 UTC (rev 200088)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 16:22:32 UTC (rev 200089)
@@ -1,3 +1,26 @@
+2016-04-25  Filip Pizlo  
+
+WebCore on Mac ignores the user's preferred region (country) while getting the language
+https://bugs.webkit.org/show_bug.cgi?id=156993
+
+Reviewed by Geoffrey Garen.
+
+I don't know how to test this since this depends on user settings.
+
+WebCore was previously getting the list of preferred languages, and for each one, deducing
+the default region. That's wrong, since for example it doesn't respect the user's choice (in
+System Preferences) to display dates/calenders/etc according to a different region (like how
+I have my machine set to en-pl right now).
+
+It might be possible for the country code we get via kCFLocaleCountryCode to be something
+that our ICU doesn't handle. To defend against this, we search for the resulting country
+code in ICU's ISO countries list. If it doesn't appear in that list, we fall back on old
+behavior.
+
+* platform/mac/Language.mm:
+(WebCore::httpStyleLanguageCode):
+(WebCore::platformUserPreferredLanguages):
+
 2016-04-26  Chris Dumez  
 
 [Web IDL] Specify default values for optional parameters of TypedArray types


Modified: trunk/Source/WebCore/platform/mac/Language.mm (200088 => 200089)

--- trunk/Source/WebCore/platform/mac/Language.mm	2016-04-26 16:12:19 UTC (rev 200088)
+++ trunk/Source/WebCore/platform/mac/Language.mm	2016-04-26 16:22:32 UTC (rev 200089)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2005, 2006, 2010, 2011, 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,6 +30,7 @@
 #import "CFBundleSPI.h"
 #import "WebCoreNSStringExtras.h"
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -69,7 +70,7 @@
 
 namespace WebCore {
 
-static String httpStyleLanguageCode(NSString *language)
+static String httpStyleLanguageCode(NSString *language, NSString *country)
 {
 SInt32 languageCode;
 SInt32 regionCode; 
@@ -87,9 +88,19 @@
 
 // Make the string lowercase.
 NSString *lowercaseLanguageCode = [language lowercaseString];
-
-// Turn a '_' into a '-' if it appears after a 2-letter language code.
+NSString *lowercaseCountryCode = [country lowercaseString];
+
+// If we see a "_" after a 2-letter language code:
+// If the country is valid, replace the "_" and whatever comes after it with "-" followed by the
+// country code.
+// Otherwise, replace the "_" with a "-" and use whatever country
+// CFBundleCopyLocalizationForLocalizationInfo() returned.
 if ([lowercaseLanguageCode length] >= 3 && [lowercaseLanguageCode characterAtIndex:2] == '_') {
+if (country)
+return [NSString stringWithFormat:@"%@-%@", [lowercaseLanguageCode substringWithRange:NSMakeRange(0, 2)], lowercaseCountryCode];
+
+// Fall back to older behavior, which used the original language-based code but just changed
+// the "_" to a "-".
 RetainPtr mutableLanguageCode = adoptNS([lowercaseLanguageCode mutableCopy]);
 [mutableLanguageCode.get() replaceCharactersInRange:NSMakeRange(2, 1) withString:@"-"];
 return mutableLanguageCode.get();
@@ -98,6 +109,18 @@
 return lowercaseLanguageCode;
 }
 
+static bool isValidICUCountryCode(NSString* countryCode)
+{
+const char* const* countries = uloc_getISOC

[webkit-changes] [200087] trunk/Source/WebCore

2016-04-26 Thread cdumez
Title: [200087] trunk/Source/WebCore








Revision 200087
Author cdu...@apple.com
Date 2016-04-26 09:07:57 -0700 (Tue, 26 Apr 2016)


Log Message
[Web IDL] Specify default values for optional parameters of type 'long' / 'unrestricted double'
https://bugs.webkit.org/show_bug.cgi?id=157012

Reviewed by Darin Adler.

Specify default values for optional parameters of type 'long' / 'unrestricted double'
and let the bindings generator use WTF::Optional<> for the ones that do not have a
default value.

* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::insertDTMF):
(WebCore::RTCDTMFSender::didPlayTone): Deleted.
* Modules/mediastream/RTCDTMFSender.h:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::start):
(WebCore::AudioBufferSourceNode::startPlaying): Deleted.
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createDelay): Deleted.
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start): Deleted.
(WebCore::AudioScheduledSourceNode::stop): Deleted.
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(CanUseWTFOptionalForParameter): Deleted.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue): Deleted.
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): Deleted.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): Deleted.
(WebCore::jsTestObjConstructorFunctionClassMethod2): Deleted.
(WebCore::jsTestObjConstructorFunctionOverloadedMethod1): Deleted.
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): Deleted.
* html/HTMLInputElement.idl:
* page/WindowTimers.idl:
* testing/Internals.h:
* testing/Internals.idl:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp
trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h
trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h
trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp
trunk/Source/WebCore/Modules/webaudio/AudioContext.h
trunk/Source/WebCore/Modules/webaudio/AudioContext.idl
trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp
trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h
trunk/Source/WebCore/Modules/webaudio/OscillatorNode.idl
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
trunk/Source/WebCore/page/WindowTimers.idl
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl




Diff

Modified: trunk/Source/WebCore/ChangeLog (200086 => 200087)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 15:03:37 UTC (rev 200086)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 16:07:57 UTC (rev 200087)
@@ -1,3 +1,53 @@
+2016-04-26  Chris Dumez  
+
+[Web IDL] Specify default values for optional parameters of type 'long' / 'unrestricted double'
+https://bugs.webkit.org/show_bug.cgi?id=157012
+
+Reviewed by Darin Adler.
+
+Specify default values for optional parameters of type 'long' / 'unrestricted double'
+and let the bindings generator use WTF::Optional<> for the ones that do not have a
+default value.
+
+* Modules/mediastream/RTCDTMFSender.cpp:
+(WebCore::RTCDTMFSender::insertDTMF):
+(WebCore::RTCDTMFSender::didPlayTone): Deleted.
+* Modules/mediastream/RTCDTMFSender.h:
+* Modules/webaudio/AudioBufferSourceNode.cpp:
+(WebCore::AudioBufferSourceNode::start):
+(WebCore::AudioBufferSourceNode::startPlaying): Deleted.
+* Modules/webaudio/AudioBufferSourceNode.h:
+* Modules/webaudio/AudioBufferSourceNode.idl:
+* Modules/webaudio/AudioContext.cpp:
+(WebCore::AudioContext::createDelay): Deleted.
+* Modules/webaudio/AudioContext.h:
+* Modules/webaudio/AudioContext.idl:
+* Modules/webaudio/AudioScheduledSourceNode.cpp:
+(WebCore::AudioScheduledSourceNode::start): Deleted.
+(WebCore::AudioScheduledSourceNode::stop): Deleted.
+* Modules/webaudio/AudioScheduledSourceNode.h:
+  

[webkit-changes] [200088] trunk/Source/WebCore

2016-04-26 Thread cdumez
Title: [200088] trunk/Source/WebCore








Revision 200088
Author cdu...@apple.com
Date 2016-04-26 09:12:19 -0700 (Tue, 26 Apr 2016)


Log Message
[Web IDL] Specify default values for optional parameters of TypedArray types
https://bugs.webkit.org/show_bug.cgi?id=157017

Reviewed by Darin Adler.

Specify default values for optional parameters of TypedArray types and let
the bindings generator use WTF::Optional<> for the ones that do not have a
default value.

* bindings/scripts/CodeGeneratorJS.pm:
(CanUseWTFOptionalForParameter): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::webkitGenerateKeyRequest):
(WebCore::HTMLMediaElement::webkitAddKey):
(WebCore::HTMLMediaElement::webkitCancelKeyRequest): Deleted.
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.idl:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
trunk/Source/WebCore/html/HTMLMediaElement.cpp
trunk/Source/WebCore/html/HTMLMediaElement.h
trunk/Source/WebCore/html/HTMLMediaElement.idl




Diff

Modified: trunk/Source/WebCore/ChangeLog (200087 => 200088)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 16:07:57 UTC (rev 200087)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 16:12:19 UTC (rev 200088)
@@ -1,5 +1,25 @@
 2016-04-26  Chris Dumez  
 
+[Web IDL] Specify default values for optional parameters of TypedArray types
+https://bugs.webkit.org/show_bug.cgi?id=157017
+
+Reviewed by Darin Adler.
+
+Specify default values for optional parameters of TypedArray types and let
+the bindings generator use WTF::Optional<> for the ones that do not have a
+default value.
+
+* bindings/scripts/CodeGeneratorJS.pm:
+(CanUseWTFOptionalForParameter): Deleted.
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::webkitGenerateKeyRequest):
+(WebCore::HTMLMediaElement::webkitAddKey):
+(WebCore::HTMLMediaElement::webkitCancelKeyRequest): Deleted.
+* html/HTMLMediaElement.h:
+* html/HTMLMediaElement.idl:
+
+2016-04-26  Chris Dumez  
+
 [Web IDL] Specify default values for optional parameters of type 'long' / 'unrestricted double'
 https://bugs.webkit.org/show_bug.cgi?id=157012
 


Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200087 => 200088)

--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-26 16:07:57 UTC (rev 200087)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-04-26 16:12:19 UTC (rev 200088)
@@ -3381,7 +3381,6 @@
 return 0 if $parameter->isVariadic;
 return 0 if $codeGenerator->IsCallbackInterface($type);
 return 0 if $codeGenerator->IsEnumType($type);
-return 0 if $codeGenerator->IsTypedArrayType($type);
 return 0 if $codeGenerator->IsWrapperType($type);
 return 0 if $type eq "DOMString";
 return 0 if $type eq "Dictionary";


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (200087 => 200088)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-04-26 16:07:57 UTC (rev 200087)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-04-26 16:12:19 UTC (rev 200088)
@@ -3114,7 +3114,7 @@
 #endif
 
 #if ENABLE(ENCRYPTED_MEDIA)
-void HTMLMediaElement::webkitGenerateKeyRequest(const String& keySystem, PassRefPtr initData, ExceptionCode& ec)
+void HTMLMediaElement::webkitGenerateKeyRequest(const String& keySystem, RefPtr&& initData, ExceptionCode& ec)
 {
 #if ENABLE(ENCRYPTED_MEDIA_V2)
 static bool firstTime = true;
@@ -3134,7 +3134,7 @@
 return;
 }
 
-const unsigned char* initDataPointer = 0;
+const unsigned char* initDataPointer = nullptr;
 unsigned initDataLength = 0;
 if (initData) {
 initDataPointer = initData->data();
@@ -3145,11 +3145,6 @@
 ec = exceptionCodeForMediaKeyException(result);
 }
 
-void HTMLMediaElement::webkitGenerateKeyRequest(const String& keySystem, ExceptionCode& ec)
-{
-webkitGenerateKeyRequest(keySystem, Uint8Array::create(0), ec);
-}
-
 void HTMLMediaElement::webkitAddKey(const String& keySystem, PassRefPtr key, PassRefPtr initData, const String& sessionId, ExceptionCode& ec)
 {
 #if ENABLE(ENCRYPTED_MEDIA_V2)
@@ -3180,7 +3175,7 @@
 return;
 }
 
-const unsigned char* initDataPointer = 0;
+const unsigned char* initDataPointer = nullptr;
 unsigned initDataLength = 0;
 if (initData) {
 initDataPointer = initData->data();
@@ -3191,11 +3186,6 @@
 ec = exceptionCodeForMediaKeyException(result);
 }
 
-void HTMLMediaElement::webkitAddKey(const String& keySystem, PassRefPtr key, ExceptionCode& ec)
-{
-webkitAddKey(keySystem, key, Uint8Array::create(0), String(), ec);
-}
-
 void HTMLMediaElement::webkitCancelKeyRequest(const String& keySystem, const String& sessionId, ExceptionCode& ec)
 {
 if (keySystem.isEmpty()) {


Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (200087 => 200088)

--- trunk/Source/WebCore/html/HTMLMediaElement.h	2016-04-26 

[webkit-changes] [200086] trunk/Source/WebInspectorUI

2016-04-26 Thread commit-queue
Title: [200086] trunk/Source/WebInspectorUI








Revision 200086
Author commit-qu...@webkit.org
Date 2016-04-26 08:03:37 -0700 (Tue, 26 Apr 2016)


Log Message
Web Inspector: Clarify Heap Snapshot instance Retained Size by hiding retained size of non-dominated children
https://bugs.webkit.org/show_bug.cgi?id=157018

Patch by Joseph Pecoraro  on 2016-04-26
Reviewed by Timothy Hatcher.

* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
(WebInspector.HeapSnapshotNodeProxy):
(WebInspector.HeapSnapshotNodeProxy.deserialize):
* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype.serializeNode):
Include dominatorNodeIdentifier in the default proxy properties.

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get node):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByBase):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot > .data-grid td .sub-retained):
Save the base HeapSnapshotInstanceDataGridNode so that it can be referenced by
children. When expanding an instance, hide the retained size for children
that are not dominated by the base object. Show the retained size for children
for children that are dominated. If dominated directly, show the size in the
normal black. If dominated transitively, show the size in a dimmed gray.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js
trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstanceDataGridNode.js
trunk/Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.css
trunk/Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (200085 => 200086)

--- trunk/Source/WebInspectorUI/ChangeLog	2016-04-26 14:58:50 UTC (rev 200085)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-04-26 15:03:37 UTC (rev 200086)
@@ -1,3 +1,32 @@
+2016-04-26  Joseph Pecoraro  
+
+Web Inspector: Clarify Heap Snapshot instance Retained Size by hiding retained size of non-dominated children
+https://bugs.webkit.org/show_bug.cgi?id=157018
+
+Reviewed by Timothy Hatcher.
+
+* UserInterface/Proxies/HeapSnapshotNodeProxy.js:
+(WebInspector.HeapSnapshotNodeProxy):
+(WebInspector.HeapSnapshotNodeProxy.deserialize):
+* UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
+(HeapSnapshot.prototype.serializeNode):
+Include dominatorNodeIdentifier in the default proxy properties.
+
+* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
+(WebInspector.HeapSnapshotInstanceDataGridNode):
+(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get node):
+(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
+(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByBase):
+(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
+(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
+* UserInterface/Views/HeapSnapshotInstancesContentView.css:
+(.heap-snapshot > .data-grid td .sub-retained):
+Save the base HeapSnapshotInstanceDataGridNode so that it can be referenced by
+children. When expanding an instance, hide the retained size for children
+that are not dominated by the base object. Show the retained size for children
+for children that are dominated. If dominated directly, show the size in the
+normal black. If dominated transitively, show the size in a dimmed gray.
+
 2016-04-25  Matt Baker  
 
 Web Inspector: hook up grid row filtering in the new Timelines UI


Modified: trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js (200085 => 200086)

--- trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js	2016-04-26 14:58:50 UTC (rev 200085)
+++ trunk/Source/WebInspectorUI/UserInterface/Proxies/HeapSnapshotNodeProxy.js	2016-04-26 15:03:37 UTC (rev 200086)
@@ -25,7 +25,7 @@
 
 WebInspector.HeapSnapshotNodeProxy = class HeapSnapshotNodeProxy
 {
-constructor(snapshotObjectId, identifier, className, size, retainedSize, internal, gcRoot, hasChildren)
+constructor(snapshotObjectId, identifier, className, size, retainedSize, internal, gcRoot, dominatorNodeIdentifier, hasChildren)
 {
 this._proxyObjectId = snapshotObjectId;
 
@@ -35,6 +35,7 @@
 this.retainedSize = retainedSize;
 this.internal = internal;
 this.gcRoot = gcRoot;
+this.dominatorNodeIdentifi

[webkit-changes] [200082] trunk/Websites/webkit.org

2016-04-26 Thread timothy
Title: [200082] trunk/Websites/webkit.org








Revision 200082
Author timo...@apple.com
Date 2016-04-26 06:52:15 -0700 (Tue, 26 Apr 2016)


Log Message
Remove hard-wraps from the feature policy markdown so it renders full width on the site.

* feature-policy.md:

Modified Paths

trunk/Websites/webkit.org/ChangeLog
trunk/Websites/webkit.org/feature-policy.md




Diff

Modified: trunk/Websites/webkit.org/ChangeLog (200081 => 200082)

--- trunk/Websites/webkit.org/ChangeLog	2016-04-26 13:32:57 UTC (rev 200081)
+++ trunk/Websites/webkit.org/ChangeLog	2016-04-26 13:52:15 UTC (rev 200082)
@@ -1,3 +1,9 @@
+2016-04-26  Timothy Hatcher  
+
+Remove hard-wraps from the feature policy markdown so it renders full width on the site.
+
+* feature-policy.md:
+
 2016-04-14  Edward O'Connor  
 
 Publish the Web-exposed feature policy on webkit.org.


Modified: trunk/Websites/webkit.org/feature-policy.md (200081 => 200082)

--- trunk/Websites/webkit.org/feature-policy.md	2016-04-26 13:32:57 UTC (rev 200081)
+++ trunk/Websites/webkit.org/feature-policy.md	2016-04-26 13:52:15 UTC (rev 200082)
@@ -1,28 +1,14 @@
 ### Runtime flags
 
-Generally, new author-facing features should be implemented behind
-**runtime flags**. Initially, such flags should be disabled on trunk. As
-work on a feature matures, its flag may be enabled on trunk. Eventually,
-runtime flags guarding widely deployed, stable features should be
-removed.
+Generally, new author-facing features should be implemented behind **runtime flags**. Initially, such flags should be disabled on trunk. As work on a feature matures, its flag may be enabled on trunk. Eventually, runtime flags guarding widely deployed, stable features should be removed.
 
-The following criteria define when runtime flags should be enabled or
-disabled **on trunk**. This policy is not intended to embody or
-communicate a feature release policy for any particular WebKit port or
-product which embeds WebKit. It is the responsibility of each port to
-determine if or when runtime flags should be enabled or disabled for
-release. Ports are encouraged to document any additional criteria they
-may use.
+The following criteria define when runtime flags should be enabled or disabled **on trunk**. This policy is not intended to embody or communicate a feature release policy for any particular WebKit port or product which embeds WebKit. It is the responsibility of each port to determine if or when runtime flags should be enabled or disabled for release. Ports are encouraged to document any additional criteria they may use.
 
-In some cases, compile time flags should be used in addition to or
-instead of runtime flags:
+In some cases, compile time flags should be used in addition to or instead of runtime flags:
 
-* When merely compiling a feature in significantly impacts the
-  hackability or livability of trunk.
-* When a feature requires a platform-specific backend that is not
-  available on all platforms.
-* When some ports or platforms have resource constraints which require
-  the ability to remove the feature completely from builds.
+* When merely compiling a feature in significantly impacts the hackability or livability of trunk.
+* When a feature requires a platform-specific backend that is not available on all platforms.
+* When some ports or platforms have resource constraints which require the ability to remove the feature completely from builds.
 * When a feature is otherwise only relevant to some ports or platforms.
 
 That said, runtime flags are preferred whenever feasible.
@@ -31,33 +17,23 @@
 
 * When work on the feature begins.
 * When the feature is not intended to be Web-exposed.
-* When the feature is defined in a Web standard which is immature or is
-  likely to incompatibly change.
-* If enabling the feature would negatively affect the livability of
-  trunk. (In such cases a compile-time flag may also be warranted.)
+* When the feature is defined in a Web standard which is immature or is likely to incompatibly change.
+* If enabling the feature would negatively affect the livability of trunk. (In such cases a compile-time flag may also be warranted.)
 
 Later, a runtime flag may be **enabled on trunk**:
 
-* When the feature is defined in a mature Web standard which is
-  unlikely to incompatibly change.
-* If the implementation of the feature is relatively mature and it is
-  ready for wider testing or review.
+* When the feature is defined in a mature Web standard which is unlikely to incompatibly change.
+* If the implementation of the feature is relatively mature and it is ready for wider testing or review.
 * If support for the feature is required for Web compatibility.
 
-Eventually, a runtime flag may be removed and the feature made **always
-on**:
+Eventually, a runtime flag may be removed and the feature made **always on**:
 
-* When most or all major ports of WebKit are shipping the feature and
-  none plan to turn it off.
+* When most or all maj

[webkit-changes] [200081] releases/WebKitGTK/webkit-2.12/Source/WebCore

2016-04-26 Thread carlosgc
Title: [200081] releases/WebKitGTK/webkit-2.12/Source/WebCore








Revision 200081
Author carlo...@webkit.org
Date 2016-04-26 06:32:57 -0700 (Tue, 26 Apr 2016)


Log Message
Merge r200046 - [GTK] Crashes if DISPLAY is unset
https://bugs.webkit.org/show_bug.cgi?id=156972

Reviewed by Carlos Garcia Campos.

If DISPLAY is unset then m_display will be NULL, crashing WebKit
when XCloseDisplay is called in the PlatformDisplayX11 destructor.

* platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::~PlatformDisplayX11):

Modified Paths

releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog
releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp




Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (200080 => 200081)

--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-26 13:20:38 UTC (rev 200080)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-26 13:32:57 UTC (rev 200081)
@@ -1,3 +1,16 @@
+2016-04-25  Alberto Garcia  
+
+[GTK] Crashes if DISPLAY is unset
+https://bugs.webkit.org/show_bug.cgi?id=156972
+
+Reviewed by Carlos Garcia Campos.
+
+If DISPLAY is unset then m_display will be NULL, crashing WebKit
+when XCloseDisplay is called in the PlatformDisplayX11 destructor.
+
+* platform/graphics/x11/PlatformDisplayX11.cpp:
+(WebCore::PlatformDisplayX11::~PlatformDisplayX11):
+
 2016-04-20  Chris Dumez  
 
 Crash under WebCore::TextIterator::subrange()


Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp (200080 => 200081)

--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp	2016-04-26 13:20:38 UTC (rev 200080)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp	2016-04-26 13:32:57 UTC (rev 200081)
@@ -37,8 +37,8 @@
 
 PlatformDisplayX11::PlatformDisplayX11()
 : m_display(XOpenDisplay(nullptr))
-, m_ownedDisplay(true)
 {
+m_ownedDisplay = m_display != nullptr;
 }
 
 PlatformDisplayX11::PlatformDisplayX11(Display* display)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200080] trunk

2016-04-26 Thread youenn . fablet
Title: [200080] trunk








Revision 200080
Author youenn.fab...@crf.canon.fr
Date 2016-04-26 06:20:38 -0700 (Tue, 26 Apr 2016)


Log Message
Drop [UsePointersEvenForNonNullableObjectArguments] from SpeechSynthesis
https://bugs.webkit.org/show_bug.cgi?id=156901

Reviewed by Darin Adler.

Source/WebCore:

SpeechSynthesis.speak will now throw in case of bad parameters instead of silently failing.
Started refactoring to use more references where possible.

Covered by updated test.

* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::startSpeakingImmediately): Refactored to get a reference.
(WebCore::SpeechSynthesis::speak):
(WebCore::SpeechSynthesis::fireEvent):
(WebCore::SpeechSynthesis::handleSpeakingCompleted): Removing first item in utteranceQueue unconditionally,
since that would crash in Debug mode otherwise.
(WebCore::SpeechSynthesis::boundaryEventOccurred):
(WebCore::SpeechSynthesis::didStartSpeaking):
(WebCore::SpeechSynthesis::didPauseSpeaking):
(WebCore::SpeechSynthesis::didResumeSpeaking):
(WebCore::SpeechSynthesis::didFinishSpeaking):
(WebCore::SpeechSynthesis::speakingErrorOccurred):
* Modules/speech/SpeechSynthesis.h:
* Modules/speech/SpeechSynthesis.idl:

LayoutTests:

Updated test to handle speak throwing behavior in case of bad parameters.

* fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt:
* fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt
trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp
trunk/Source/WebCore/Modules/speech/SpeechSynthesis.h
trunk/Source/WebCore/Modules/speech/SpeechSynthesis.idl




Diff

Modified: trunk/LayoutTests/ChangeLog (200079 => 200080)

--- trunk/LayoutTests/ChangeLog	2016-04-26 13:17:27 UTC (rev 200079)
+++ trunk/LayoutTests/ChangeLog	2016-04-26 13:20:38 UTC (rev 200080)
@@ -1,5 +1,17 @@
 2016-04-26  Youenn Fablet  
 
+Drop [UsePointersEvenForNonNullableObjectArguments] from SpeechSynthesis
+https://bugs.webkit.org/show_bug.cgi?id=156901
+
+Reviewed by Darin Adler.
+
+Updated test to handle speak throwing behavior in case of bad parameters.
+
+* fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt:
+* fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html:
+
+2016-04-26  Youenn Fablet  
+
 Drop [UsePointersEvenForNonNullableObjectArguments] from EventTarget
 https://bugs.webkit.org/show_bug.cgi?id=156977
 


Modified: trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt (200079 => 200080)

--- trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt	2016-04-26 13:17:27 UTC (rev 200079)
+++ trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt	2016-04-26 13:20:38 UTC (rev 200080)
@@ -3,6 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS speechSynthesis.speak('Hello World') threw exception TypeError: Type error.
 PASS successfullyParsed is true
 
 TEST COMPLETE


Modified: trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html (200079 => 200080)

--- trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html	2016-04-26 13:17:27 UTC (rev 200079)
+++ trunk/LayoutTests/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html	2016-04-26 13:20:38 UTC (rev 200080)
@@ -12,7 +12,7 @@
 description("This tests that passing in the wrong type of data won't crash speech synthesis code");
 
  // Don't crash. Speak is supposed to take an utterance, not a string.
- speechSynthesis.speak('Hello World');
+ shouldThrow("speechSynthesis.speak('Hello World')");
 
  // Don't crash. An utterance voice is supposed to take a voice object, not a string.
  var x = new SpeechSynthesisUtterance('Hello World');


Modified: trunk/Source/WebCore/ChangeLog (200079 => 200080)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 13:17:27 UTC (rev 200079)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 13:20:38 UTC (rev 200080)
@@ -1,5 +1,32 @@
 2016-04-26  Youenn Fablet  
 
+Drop [UsePointersEvenForNonNullableObjectArguments] from SpeechSynthesis
+https://bugs.webkit.org/show_bug.cgi?id=156901
+
+Reviewed by Darin Adler.
+
+SpeechSynthesis.speak will now throw in case of bad parameters instead of silently failing.
+Started refactoring to use more references where possible.
+
+Covered by updated test.
+
+* Modules/speech/SpeechSynthesis.cpp:
+(WebCore::SpeechSynthesis::startSpeakingImmediately): Refactored to get a reference.
+(WebCore::SpeechSynthesis::speak):
+(WebCore::Speech

[webkit-changes] [200079] trunk/Source/WebCore

2016-04-26 Thread youenn . fablet
Title: [200079] trunk/Source/WebCore








Revision 200079
Author youenn.fab...@crf.canon.fr
Date 2016-04-26 06:17:27 -0700 (Tue, 26 Apr 2016)


Log Message
Drop [UsePointersEvenForNonNullableObjectArguments] from WebKitNamedFlow
https://bugs.webkit.org/show_bug.cgi?id=156979

Reviewed by Chris Dumez.

No change of behavior.

* dom/WebKitNamedFlow.idl: Marking contentNode parameter as nullable.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/WebKitNamedFlow.idl




Diff

Modified: trunk/Source/WebCore/ChangeLog (200078 => 200079)

--- trunk/Source/WebCore/ChangeLog	2016-04-26 13:03:13 UTC (rev 200078)
+++ trunk/Source/WebCore/ChangeLog	2016-04-26 13:17:27 UTC (rev 200079)
@@ -1,5 +1,16 @@
 2016-04-26  Youenn Fablet  
 
+Drop [UsePointersEvenForNonNullableObjectArguments] from WebKitNamedFlow
+https://bugs.webkit.org/show_bug.cgi?id=156979
+
+Reviewed by Chris Dumez.
+
+No change of behavior.
+
+* dom/WebKitNamedFlow.idl: Marking contentNode parameter as nullable.
+
+2016-04-26  Youenn Fablet  
+
 Drop [UsePointersEvenForNonNullableObjectArguments] from EventTarget
 https://bugs.webkit.org/show_bug.cgi?id=156977
 


Modified: trunk/Source/WebCore/dom/WebKitNamedFlow.idl (200078 => 200079)

--- trunk/Source/WebCore/dom/WebKitNamedFlow.idl	2016-04-26 13:03:13 UTC (rev 200078)
+++ trunk/Source/WebCore/dom/WebKitNamedFlow.idl	2016-04-26 13:17:27 UTC (rev 200079)
@@ -28,15 +28,15 @@
  */
 
 [
-UsePointersEvenForNonNullableObjectArguments,
+GenerateIsReachable=ImplOwnerNodeRoot,
 NoInterfaceObject,
-GenerateIsReachable=ImplOwnerNodeRoot,
 ] interface WebKitNamedFlow : EventTarget
 {
 readonly attribute DOMString name;
 readonly attribute boolean overset;
 readonly attribute long firstEmptyRegionIndex;
-NodeList getRegionsByContent(Node contentNode);
+// FIXME: contentNode should not be nullable.
+NodeList getRegionsByContent(Node? contentNode);
 NodeList getRegions();
 NodeList getContent();
 };






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200078] trunk

2016-04-26 Thread youenn . fablet
Title: [200078] trunk








Revision 200078
Author youenn.fab...@crf.canon.fr
Date 2016-04-26 06:03:13 -0700 (Tue, 26 Apr 2016)


Log Message
Drop [UsePointersEvenForNonNullableObjectArguments] from EventTarget
https://bugs.webkit.org/show_bug.cgi?id=156977

Reviewed by Chris Dumez.

Source/WebCore:

No change of behavior.

* dom/EventTarget.idl:

LayoutTests:

* fast/events/dispatchEvent-crash-expected.txt:
* fast/events/dispatchEvent-crash.html: Ensuring exceptions are logged.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/events/dispatchEvent-crash-expected.txt
trunk/LayoutTests/fast/events/dispatchEvent-crash.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/EventTarget.idl




Diff

Modified: trunk/LayoutTests/ChangeLog (200077 => 200078)

--- trunk/LayoutTests/ChangeLog	2016-04-26 08:16:24 UTC (rev 200077)
+++ trunk/LayoutTests/ChangeLog	2016-04-26 13:03:13 UTC (rev 200078)
@@ -1,3 +1,13 @@
+2016-04-26  Youenn Fablet  
+
+Drop [UsePointersEvenForNonNullableObjectArguments] from EventTarget
+https://bugs.webkit.org/show_bug.cgi?id=156977
+
+Reviewed by Chris Dumez.
+
+* fast/events/dispatchEvent-crash-expected.txt:
+* fast/events/dispatchEvent-crash.html: Ensuring exceptions are logged.
+
 2016-04-25  Ryosuke Niwa  
 
 Update template element tests


Modified: trunk/LayoutTests/fast/events/dispatchEvent-crash-expected.txt (200077 => 200078)

--- trunk/LayoutTests/fast/events/dispatchEvent-crash-expected.txt	2016-04-26 08:16:24 UTC (rev 200077)
+++ trunk/LayoutTests/fast/events/dispatchEvent-crash-expected.txt	2016-04-26 13:03:13 UTC (rev 200078)
@@ -1 +1,28 @@
 This is a test for https://bugs.webkit.org/show_bug.cgi?id=21063 (NULL pointer crash in dispatchEvent(null)). It passes if it does not crash.
+
+Exception thrown for null: TypeError: Type error
+Exception thrown for undefined: TypeError: Type error
+Exception thrown for string: TypeError: Type error
+Exception thrown for 0: TypeError: Type error
+Exception thrown for object: TypeError: Type error
+Exception thrown for null: TypeError: Type error
+Exception thrown for undefined: TypeError: Type error
+Exception thrown for string: TypeError: Type error
+Exception thrown for 0: TypeError: Type error
+Exception thrown for object: TypeError: Type error
+Exception thrown for null: TypeError: Type error
+Exception thrown for undefined: TypeError: Type error
+Exception thrown for string: TypeError: Type error
+Exception thrown for 0: TypeError: Type error
+Exception thrown for object: TypeError: Type error
+Exception thrown for null: TypeError: Type error
+Exception thrown for undefined: TypeError: Type error
+Exception thrown for string: TypeError: Type error
+Exception thrown for 0: TypeError: Type error
+Exception thrown for object: TypeError: Type error
+Exception thrown for null: TypeError: Type error
+Exception thrown for undefined: TypeError: Type error
+Exception thrown for string: TypeError: Type error
+Exception thrown for 0: TypeError: Type error
+Exception thrown for object: TypeError: Type error
+


Modified: trunk/LayoutTests/fast/events/dispatchEvent-crash.html (200077 => 200078)

--- trunk/LayoutTests/fast/events/dispatchEvent-crash.html	2016-04-26 08:16:24 UTC (rev 200077)
+++ trunk/LayoutTests/fast/events/dispatchEvent-crash.html	2016-04-26 13:03:13 UTC (rev 200078)
@@ -1,5 +1,10 @@
 This is a test for https://bugs.webkit.org/show_bug.cgi?id=21063 (NULL pointer crash in dispatchEvent(null)).  It passes if it does not crash.
+
 
+function log(message) {
+document.getElementById("log").innerHTML += message + "
"; +} +
if (window.testRunner) testRunner.dumpAsText(); @@ -11,26 +16,31 @@ try { eventTarget.dispatchEvent(null); } catch(e) { +log("Exception thrown for null: " + e); } try { eventTarget.dispatchEvent(undefined); } catch(e) { +log("Exception thrown for undefined: " + e); } try { eventTarget.dispatchEvent("string"); } catch(e) { +log("Exception thrown for string: " + e); } try { eventTarget.dispatchEvent(0); } catch(e) { +log("Exception thrown for 0: " + e); }

[webkit-changes] [200077] trunk/Source/WebKit2

2016-04-26 Thread gyuyoung . kim
Title: [200077] trunk/Source/WebKit2








Revision 200077
Author gyuyoung@webkit.org
Date 2016-04-26 01:16:24 -0700 (Tue, 26 Apr 2016)


Log Message
[EFL] Update expectation result in ewk_context_preferred_languages API test
https://bugs.webkit.org/show_bug.cgi?id=157027

Reviewed by Carlos Garcia Campos.

platformLanguage() has been returning lower case value since r199815. Thus existing expected result
needs to be updated together.

* UIProcess/API/efl/tests/test_ewk2_context.cpp: Change en-US with en-us.
(TEST_F):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (200076 => 200077)

--- trunk/Source/WebKit2/ChangeLog	2016-04-26 07:28:20 UTC (rev 200076)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-26 08:16:24 UTC (rev 200077)
@@ -1,3 +1,16 @@
+2016-04-26  Gyuyoung Kim  
+
+[EFL] Update expectation result in ewk_context_preferred_languages API test
+https://bugs.webkit.org/show_bug.cgi?id=157027
+
+Reviewed by Carlos Garcia Campos.
+
+platformLanguage() has been returning lower case value since r199815. Thus existing expected result
+needs to be updated together.
+
+* UIProcess/API/efl/tests/test_ewk2_context.cpp: Change en-US with en-us.
+(TEST_F):
+
 2016-04-26  Zan Dobersek  
 
 Mark two methods in the CoordinatedGraphicsScene and the


Modified: trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp (200076 => 200077)

--- trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp	2016-04-26 07:28:20 UTC (rev 200076)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp	2016-04-26 08:16:24 UTC (rev 200077)
@@ -329,6 +329,6 @@
 
 ewk_context_preferred_languages_set(nullptr);
 ASSERT_TRUE(loadUrlSync(httpServer->getURLForPath("/index.html").data()));
-ASSERT_STREQ("en-US", s_acceptLanguages);
+ASSERT_STREQ("en-us", s_acceptLanguages);
 free(s_acceptLanguages);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200076] trunk/Source/WebKit2

2016-04-26 Thread zandobersek
Title: [200076] trunk/Source/WebKit2








Revision 200076
Author zandober...@gmail.com
Date 2016-04-26 00:28:20 -0700 (Tue, 26 Apr 2016)


Log Message
Mark two methods in the CoordinatedGraphicsScene and the
ThreadedCoordinatedLayerTreeHost classes as overrides, fixing
the compiler warnings.

Rubber-stamped by Carlos Garcia Campos.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h




Diff

Modified: trunk/Source/WebKit2/ChangeLog (200075 => 200076)

--- trunk/Source/WebKit2/ChangeLog	2016-04-26 05:56:12 UTC (rev 200075)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-26 07:28:20 UTC (rev 200076)
@@ -1,3 +1,14 @@
+2016-04-26  Zan Dobersek  
+
+Mark two methods in the CoordinatedGraphicsScene and the
+ThreadedCoordinatedLayerTreeHost classes as overrides, fixing
+the compiler warnings.
+
+Rubber-stamped by Carlos Garcia Campos.
+
+* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
+* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
+
 2016-04-25  Ryosuke Niwa  
 
 Remove the build flag for template elements


Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h (200075 => 200076)

--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h	2016-04-26 05:56:12 UTC (rev 200075)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h	2016-04-26 07:28:20 UTC (rev 200076)
@@ -77,7 +77,7 @@
 
 WebCore::TextureMapperLayer* findScrollableContentsLayerAt(const WebCore::FloatPoint&);
 
-virtual void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset);
+void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) override;
 
 // The painting thread must lock the main thread to use below two methods, because two methods access members that the main thread manages. See m_client.
 // Currently, QQuickWebPage::updatePaintNode() locks the main thread before calling both methods.


Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h (200075 => 200076)

--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h	2016-04-26 05:56:12 UTC (rev 200075)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h	2016-04-26 07:28:20 UTC (rev 200076)
@@ -97,7 +97,7 @@
 void scheduleAnimation() override;
 #endif
 
-void setViewOverlayRootLayer(WebCore::GraphicsLayer*);
+void setViewOverlayRootLayer(WebCore::GraphicsLayer*) override;
 static RefPtr createCoordinatedSurface(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags);
 
 protected:






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes