[webkit-changes] [215721] trunk

2017-04-24 Thread jiewen_tan
Title: [215721] trunk








Revision 215721
Author jiewen_...@apple.com
Date 2017-04-24 22:10:00 -0700 (Mon, 24 Apr 2017)


Log Message
LayoutTests crypto/subtle/ecdsa-generate-key-sign-verify-p384.html and crypto/subtle/ecdsa-generate-key-sign-verify-p256.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=171059


Reviewed by Brent Fulgham.

Source/WebCore:

Covered by existing tests.

* crypto/mac/CryptoAlgorithmECDSAMac.cpp:
(WebCore::signECDSA):
Enhance ways to convert the DER signatures produced from CommonCrypto to r||s.

LayoutTests:

* TestExpectations:
Remove test expectations.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmECDSAMac.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (215720 => 215721)

--- trunk/LayoutTests/ChangeLog	2017-04-25 05:09:10 UTC (rev 215720)
+++ trunk/LayoutTests/ChangeLog	2017-04-25 05:10:00 UTC (rev 215721)
@@ -1,3 +1,14 @@
+2017-04-24  Jiewen Tan  
+
+LayoutTests crypto/subtle/ecdsa-generate-key-sign-verify-p384.html and crypto/subtle/ecdsa-generate-key-sign-verify-p256.html are flaky failures
+https://bugs.webkit.org/show_bug.cgi?id=171059
+
+
+Reviewed by Brent Fulgham.
+
+* TestExpectations:
+Remove test expectations.
+
 2017-04-24  Manuel Rego Casasnovas  
 
 [selectors4] :focus-within should use the flat tree


Modified: trunk/LayoutTests/TestExpectations (215720 => 215721)

--- trunk/LayoutTests/TestExpectations	2017-04-25 05:09:10 UTC (rev 215720)
+++ trunk/LayoutTests/TestExpectations	2017-04-25 05:10:00 UTC (rev 215721)
@@ -1287,9 +1287,4 @@
 
 webkit.org/b/171031 imported/w3c/web-platform-tests/XMLHttpRequest/getallresponseheaders-cl.htm [ Failure ]
 
-webkit.org/b/171059 crypto/subtle/ecdsa-generate-key-sign-verify-p384.html [ Pass Failure ]
-webkit.org/b/171059 crypto/subtle/ecdsa-generate-key-sign-verify-p256.html [ Pass Failure ]
-
-webkit.org/b/170921 imported/w3c/web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker.html [ Pass Failure ]
-
 webkit.org/b/170701 webrtc/datachannel/bufferedAmountLowThreshold.html [ Pass Failure ]


Modified: trunk/Source/WebCore/ChangeLog (215720 => 215721)

--- trunk/Source/WebCore/ChangeLog	2017-04-25 05:09:10 UTC (rev 215720)
+++ trunk/Source/WebCore/ChangeLog	2017-04-25 05:10:00 UTC (rev 215721)
@@ -1,3 +1,17 @@
+2017-04-24  Jiewen Tan  
+
+LayoutTests crypto/subtle/ecdsa-generate-key-sign-verify-p384.html and crypto/subtle/ecdsa-generate-key-sign-verify-p256.html are flaky failures
+https://bugs.webkit.org/show_bug.cgi?id=171059
+
+
+Reviewed by Brent Fulgham.
+
+Covered by existing tests.
+
+* crypto/mac/CryptoAlgorithmECDSAMac.cpp:
+(WebCore::signECDSA):
+Enhance ways to convert the DER signatures produced from CommonCrypto to r||s.
+
 2017-04-24  Manuel Rego Casasnovas  
 
 [selectors4] :focus-within should use the flat tree


Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmECDSAMac.cpp (215720 => 215721)

--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmECDSAMac.cpp	2017-04-25 05:09:10 UTC (rev 215720)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmECDSAMac.cpp	2017-04-25 05:10:00 UTC (rev 215721)
@@ -84,17 +84,34 @@
 // convert the DER binary into r + s
 Vector newSignature;
 newSignature.reserveCapacity(keyLengthInBytes * 2);
-size_t offset = 4;
-if (signature[offset] == InitialOctet)
-offset += 1;
-ASSERT_WITH_SECURITY_IMPLICATION(signature.size() > offset + keyLengthInBytes);
-newSignature.append(signature.data() + offset, keyLengthInBytes);
-offset += keyLengthInBytes + 2;
-if (signature[offset] == InitialOctet)
-offset += 1;
-ASSERT_WITH_SECURITY_IMPLICATION(signature.size() >= offset + keyLengthInBytes);
-newSignature.append(signature.data() + offset, keyLengthInBytes);
+size_t offset = 3; // skip tag, length, tag
 
+// If r < keyLengthInBytes, fill the head of r with 0s.
+size_t bytesToCopy = keyLengthInBytes;
+if (signature[offset] < keyLengthInBytes) {
+newSignature.resize(keyLengthInBytes - signature[offset]);
+memset(newSignature.data(), InitialOctet, keyLengthInBytes - signature[offset]);
+bytesToCopy = signature[offset];
+} else if (signature[offset] > keyLengthInBytes) // Otherwise skip the leading 0s of r.
+offset += signature[offset] - keyLengthInBytes;
+offset++; // skip length
+ASSERT_WITH_SECURITY_IMPLICATION(signature.size() > offset + bytesToCopy);
+newSignature.append(signature.data() + offset, bytesToCopy);
+offset += bytesToCopy + 1; // skip r, tag
+
+// If s < keyLengthInBytes, fill the head of s with 0s.
+bytesToCopy = keyLengthInBytes;
+if (signature[offset] < keyLengthInBytes) {
+size_t pos = 

[webkit-changes] [215718] trunk/Source/WebCore/platform/gtk/po

2017-04-24 Thread commit-queue
Title: [215718] trunk/Source/WebCore/platform/gtk/po








Revision 215718
Author commit-qu...@webkit.org
Date 2017-04-24 20:48:12 -0700 (Mon, 24 Apr 2017)


Log Message
[GTK] Fix extraction of translator comments
https://bugs.webkit.org/show_bug.cgi?id=170012

Patch by Piotr Drąg  on 2017-04-24
Reviewed by Michael Catanzaro.

* CMakeLists.txt: Remove “TRANSLATORS:” header, as it’s not used and might block extraction of translator comments.

Modified Paths

trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt
trunk/Source/WebCore/platform/gtk/po/ChangeLog




Diff

Modified: trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt (215717 => 215718)

--- trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt	2017-04-25 03:23:20 UTC (rev 215717)
+++ trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt	2017-04-25 03:48:12 UTC (rev 215718)
@@ -18,7 +18,7 @@
 DEPENDS ${potfiles_file}
 COMMAND xgettext
 --default-domain=${domain}
---add-comments=TRANSLATORS:
+--add-comments
 --msgid-bugs-address="http://bugs.webkit.org"
 --files-from=${potfiles_file}
 --package-version=${PROJECT_VERSION}


Modified: trunk/Source/WebCore/platform/gtk/po/ChangeLog (215717 => 215718)

--- trunk/Source/WebCore/platform/gtk/po/ChangeLog	2017-04-25 03:23:20 UTC (rev 215717)
+++ trunk/Source/WebCore/platform/gtk/po/ChangeLog	2017-04-25 03:48:12 UTC (rev 215718)
@@ -1,5 +1,14 @@
 2017-04-24  Piotr Drąg  
 
+[GTK] Fix extraction of translator comments
+https://bugs.webkit.org/show_bug.cgi?id=170012
+
+Reviewed by Michael Catanzaro.
+
+* CMakeLists.txt: Remove “TRANSLATORS:” header, as it’s not used and might block extraction of translator comments.
+
+2017-04-24  Piotr Drąg  
+
 [GTK] Update POTFILES.in
 
 It’s missing some files with translatable strings.






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


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

2017-04-24 Thread jcraig
Title: [215716] trunk/Websites/webkit.org








Revision 215716
Author jcr...@apple.com
Date 2017-04-24 20:21:29 -0700 (Mon, 24 Apr 2017)


Log Message
2017-04-24  James Craig  

Upload demo files for prefers-reduced-motion post
https://bugs.webkit.org/show_bug.cgi?id=170663

Rubber stamped by Jon Davis.

* blog-files/prefers-reduced-motion: Added.
* blog-files/prefers-reduced-motion/axi.png: Added.
* blog-files/prefers-reduced-motion/prm.htm: Added.

Modified Paths

trunk/Websites/webkit.org/ChangeLog


Added Paths

trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/
trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/axi.png
trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/prm.htm




Diff

Modified: trunk/Websites/webkit.org/ChangeLog (215715 => 215716)

--- trunk/Websites/webkit.org/ChangeLog	2017-04-25 02:53:49 UTC (rev 215715)
+++ trunk/Websites/webkit.org/ChangeLog	2017-04-25 03:21:29 UTC (rev 215716)
@@ -1,3 +1,14 @@
+2017-04-24  James Craig  
+
+Upload demo files for prefers-reduced-motion post
+https://bugs.webkit.org/show_bug.cgi?id=170663
+
+Rubber stamped by Jon Davis.
+
+* blog-files/prefers-reduced-motion: Added.
+* blog-files/prefers-reduced-motion/axi.png: Added.
+* blog-files/prefers-reduced-motion/prm.htm: Added.
+
 2017-04-18  Jon Davis  
 
 Images in WebKit.org blog article are stretched out


Added: trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/axi.png

(Binary files differ)

Index: trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/axi.png
===
--- trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/axi.png	2017-04-25 02:53:49 UTC (rev 215715)
+++ trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/axi.png	2017-04-25 03:21:29 UTC (rev 215716)
Property changes on: trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/axi.png
___

Added: svn:mime-type
+image/png
\ No newline at end of property

Added: trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/prm.htm (0 => 215716)

--- trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/prm.htm	(rev 0)
+++ trunk/Websites/webkit.org/blog-files/prefers-reduced-motion/prm.htm	2017-04-25 03:21:29 UTC (rev 215716)
@@ -0,0 +1,156 @@
+
+
+
+Demo: prefers-reduced-motion media query
+
+
+html {
+	font: 100% sans-serif;
+	font: -apple-system-body;
+}
+body {
+	font-size: 0.8em;
+	line-height: 1.1;
+}
+
+
+button {
+	cursor: pointer;
+	font-size: 1em;
+	-webkit-appearance: none;
+	border: solid 1px black;
+	color: black;
+	background-color: white;
+	padding: 0;
+	position: relative;
+}
+button::before {
+	display: block;
+	position: absolute;
+	content: " ";
+	top: 50%;
+	left: 50%;
+	width: 1px;
+	height: 1px;
+	opacity: 0;
+	background-color: rgba(255,100,100,0.3);
+	transition-duration: 0.4s;
+	transition-timing-function: ease-in-out;
+
+	/* Example 1: This value will be modified when 'reduce motion' is enabled. */
+	transition-property: top left width height opacity;
+}
+@media (prefers-reduced-motion) {
+	button::before {
+		/* Example 1: Now only animating the opacity... not size or position, which control the scale effect. */ 
+		transition-property: opacity;
+	}
+}
+button:hover::before, button:focus::before {
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+	opacity:1;
+}
+button > div {
+	margin: 1.5em 2em;
+}
+
+#twirl {
+position: relative;
+border: solid 1px black;
+overflow: hidden;
+}
+#twirl > div {
+	margin: 1.5em 2em;
+}
+
+@keyframes animation-twirl {  
+	0% {
+		transform: rotate(0deg);
+	}
+	100% {
+		transform: rotate(360deg);
+	}
+}
+
+#twirl::after {
+width: 2000px;
+height: 2000px;
+position: absolute;
+top: 50%;
+left: 50%;
+margin-left: -1000px;
+margin-top: -1000px;
+background: repeating-linear-gradient(140deg, rgba(0,0,0,0), rgba(0,0,0,0) 10px, rgba(200,200,200,0.3) 10px, rgba(200,200,200,0.3) 20px);
+background-size: cover;
+content: '';
+animation: animation-twirl 100s infinite;
+}
+
+/* Example 2: Disabling a ongoing, decorative background animation. */
+@media (prefers-reduced-motion) {
+	#twirl::after {
+		animation: none;
+	}
+}
+
+
+#indicator #prmValue {
+	display: inline-block;
+	padding: 0.2em 0.4em;
+	text-transform: uppercase;
+	border: solid 1px #666;
+	background-color: #eee;
+}
+#indicator a {
+	text-decoration: none;
+}
+
+
+
+
+
+Reduced Motion Demos
+
+To test these, enable the "Reduce Motion" setting.
+
+	iOS: Settings > General > Accessibility > Reduce Motion
+	macOS: System Preferences > Accessibility > Display > Reduce Motion
+
+
+Example 1: Using CSS to modify an interaction transition-property
+
+
+	
+		On hover/focus (or tap on mobile), a zoom/scale 

[webkit-changes] [215714] trunk

2017-04-24 Thread wenson_hsieh
Title: [215714] trunk








Revision 215714
Author wenson_hs...@apple.com
Date 2017-04-24 19:35:02 -0700 (Mon, 24 Apr 2017)


Log Message
Respect fidelity order when reading web content from item providers
https://bugs.webkit.org/show_bug.cgi?id=171155


Reviewed by Tim Horton.

Source/WebCore:

Currently, when reading web content from pasteboards, we assume the old UIPasteboard/NSPasteboard model wherein
the destination must determine which of the items is considered to have the highest fidelity for the purposes of
inserting into an editable area. This destination-side fidelity ranking is determined solely by the NSArray
returned from Pasteboard::supportedPasteboardTypes, which lists compatible types in order from highest fidelity
to lowest fidelity. Pasteboard::read effectively iterates over this list of types in order, attempting to read
highest fidelity types and bailing when it first successfully reads data.

However, when our pasteboard is backed by UIItemProviders, we should instead read pasteboard types in order of
fidelity as specified by the source rather than the destination. To accomplish this, we introduce an alternate
codepath, Pasteboard::readRespectingUTIFidelities, which we take if Pasteboard::respectsUTIFidelities is true
(currently, this only applies for the purposes of data interaction). This version follows a different flow:
for each item in the pasteboard, we ask for just the UTIs for that item, in order of fidelity. For each item,
we then call readPasteboardWebContentDataForType to try and read data for that type, continuing until either
all UTIs have been attempted, or reading was successful.

This patch makes two additional adjustments. First, we introduce Pasteboard::getTypesByFidelityForItemAtIndex,
which is used by Pasteboard::readRespectingUTIFidelities when querying the list of supported UTIs for each
pasteboard item, sorted by highest to lowest fidelity.

Secondly, we refactor logic to write to the item provider pasteboard in PlatformPasteboardIOS. Since we are
now respecting fidelity rankings on the destination, the source must also register UTI types in the right
fidelity order. While this was mostly achieved using our existing method of writing a list of object
representations to the pasteboard and then all of the contents of a NSString => NSData dictionary containing
private UTI data, this approach has two flaws:
1.  We are unable to register high-priority custom types, followed by representing objects, followed by more
lower-priority custom types, since we assume that all custom types follow all representing objects.
2.  Since we're just iterating over a dictionary of NSString => NSData when registering custom UTI
representations to the item provider, there cannot inherently be any fidelity ordering for custom types.

To address both of these issues, we introduce two new objects that encapsulate how we register data to the item
provider pasteboard. WebItemProviderRegistrationInfo represents some data that can be registered to an item
provider (either an object conforming to UIItemProviderWriting, or an NSString and NSData).
WebItemProviderRegistrationInfoList represents a list of WebItemProviderRegistrationInfos in order of highest to
lowest fidelity. In PlatformPasteboardIOS, we transform PasteboardWebContent, PasteboardImage, and PasteboardURL
into a WebItemProviderRegistrationInfoList, which we then pass along to the WebItemProviderPasteboard. In
WebItemProviderPasteboard, we traverse the list of WebItemProviderRegistrationInfos in the list and register
each WebItemProviderRegistrationInfo's representing object or data to the item provider.

Test: DataInteractionTests.RespectsExternalSourceFidelityRankings.

* WebCore.xcodeproj/project.pbxproj:
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/ios/AbstractPasteboard.h:
* platform/ios/AbstractPasteboard.mm: Removed.

Moves WebItemProviderData, formerly implemented in AbstractPasteboard.mm, into WebItemProviderPasteboard.mm.
We can delete AbstractPasteboard.mm as a result.

* platform/ios/PasteboardIOS.mm:
(WebCore::readPasteboardWebContentDataForType):

Pull out common logic for reading data given a UTI type from the pasteboard into the PasteboardWebContentReader.
This is invoked from both the existing Pasteboard::read codepath, as well as the readRespectingUTIFidelities
codepath.

(WebCore::Pasteboard::read):

Refactored to call the new readPasteboardWebContentDataForType helper. Behavior should not have changed, unless
the pasteboard supports UTI fidelities.

(WebCore::Pasteboard::respectsUTIFidelities):
(WebCore::Pasteboard::readRespectingUTIFidelities):

An alternative to Pasteboard::read that considers source-side fidelity rankings of UTIs.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypesByFidelityForItemAtIndex):
(WebCore::PlatformPasteboard::writeObjectRepresentations):

Refactored to build a 

[webkit-changes] [215712] trunk/Source/WebCore/platform/gtk/po

2017-04-24 Thread commit-queue
Title: [215712] trunk/Source/WebCore/platform/gtk/po








Revision 215712
Author commit-qu...@webkit.org
Date 2017-04-24 19:10:14 -0700 (Mon, 24 Apr 2017)


Log Message
[GTK] Update POTFILES.in

It’s missing some files with translatable strings.
https://bugs.webkit.org/show_bug.cgi?id=171232

Patch by Piotr Drąg  on 2017-04-24
Reviewed by Michael Catanzaro.

* POTFILES.in: Update POTFILES.in.

Modified Paths

trunk/Source/WebCore/platform/gtk/po/ChangeLog
trunk/Source/WebCore/platform/gtk/po/POTFILES.in




Diff

Modified: trunk/Source/WebCore/platform/gtk/po/ChangeLog (215711 => 215712)

--- trunk/Source/WebCore/platform/gtk/po/ChangeLog	2017-04-25 01:44:32 UTC (rev 215711)
+++ trunk/Source/WebCore/platform/gtk/po/ChangeLog	2017-04-25 02:10:14 UTC (rev 215712)
@@ -1,3 +1,14 @@
+2017-04-24  Piotr Drąg  
+
+[GTK] Update POTFILES.in
+
+It’s missing some files with translatable strings.
+https://bugs.webkit.org/show_bug.cgi?id=171232
+
+Reviewed by Michael Catanzaro.
+
+* POTFILES.in: Update POTFILES.in.
+
 2017-04-24  Carlos Garcia Campos  
 
 [GTK] Switch to use ENABLE_REMOTE_INSPECTOR instead of ENABLE_INSPECTOR_SERVER for the remote inspector


Modified: trunk/Source/WebCore/platform/gtk/po/POTFILES.in (215711 => 215712)

--- trunk/Source/WebCore/platform/gtk/po/POTFILES.in	2017-04-25 01:44:32 UTC (rev 215711)
+++ trunk/Source/WebCore/platform/gtk/po/POTFILES.in	2017-04-25 02:10:14 UTC (rev 215712)
@@ -1,27 +1,40 @@
 # List of source files which contain translatable strings.
 LocalizedStringsGtk.cpp
 ../LocalizedStrings.cpp
+../network/soup/NetworkStorageSessionSoup.cpp
 ../../../WebKit2/Shared/WebErrors.cpp
 ../../../WebKit2/Shared/glib/WebErrorsGlib.cpp
 ../../../WebKit2/Shared/gtk/WebErrorsGtk.cpp
 ../../../WebKit2/Shared/soup/WebErrorsSoup.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitColorChooserRequest.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitDownload.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitEditorState.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitFindController.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitNotification.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitPrintCustomWidget.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitSettings.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitURIRequest.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebResource.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebsiteData.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitWebsiteDataManager.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWindowProperties.cpp
 ../../../WebKit2/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp
+../../../WebKit2/UIProcess/gtk/WebColorPickerGtk.cpp
 ../../../WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp
+../../../WebKit2/UIProcess/WebEditCommandProxy.cpp
+../../../WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.cpp
+../../../WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp
+../../../WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp






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


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

2017-04-24 Thread cdumez
Title: [215711] trunk/Source/WebCore








Revision 215711
Author cdu...@apple.com
Date 2017-04-24 18:44:32 -0700 (Mon, 24 Apr 2017)


Log Message
Regression(r204605): support for "cp874" charset alias was inadvertently dropped which may cause issues on certain Thai sites
https://bugs.webkit.org/show_bug.cgi?id=171128


Reviewed by Alexey Proskuryakov.

When using Thai as default language on MacOS, defaultTextEncodingNameForSystemLanguage()
was returning "cp874" encoding with was dropped in r204605 for not being part of the
encoding specification (https://encoding.spec.whatwg.org/#names-and-labels).

To address the issue, we map "cp874" encoding to the "dos-874" encoding which is
properly recognized. Without this, this could lead to issue on WebSites that do not
specify a charset.

* platform/text/TextEncodingRegistry.cpp:
(WebCore::defaultTextEncodingNameForSystemLanguage):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (215710 => 215711)

--- trunk/Source/WebCore/ChangeLog	2017-04-25 01:23:55 UTC (rev 215710)
+++ trunk/Source/WebCore/ChangeLog	2017-04-25 01:44:32 UTC (rev 215711)
@@ -1,3 +1,22 @@
+2017-04-24  Chris Dumez  
+
+Regression(r204605): support for "cp874" charset alias was inadvertently dropped which may cause issues on certain Thai sites
+https://bugs.webkit.org/show_bug.cgi?id=171128
+
+
+Reviewed by Alexey Proskuryakov.
+
+When using Thai as default language on MacOS, defaultTextEncodingNameForSystemLanguage()
+was returning "cp874" encoding with was dropped in r204605 for not being part of the
+encoding specification (https://encoding.spec.whatwg.org/#names-and-labels).
+
+To address the issue, we map "cp874" encoding to the "dos-874" encoding which is
+properly recognized. Without this, this could lead to issue on WebSites that do not
+specify a charset.
+
+* platform/text/TextEncodingRegistry.cpp:
+(WebCore::defaultTextEncodingNameForSystemLanguage):
+
 2017-04-24  Said Abou-Hallawa  
 
 [CG] Provide a type identifier hint to the CGImageSource so getting the type identifier is more accurate


Modified: trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp (215710 => 215711)

--- trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp	2017-04-25 01:23:55 UTC (rev 215710)
+++ trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp	2017-04-25 01:44:32 UTC (rev 215711)
@@ -377,6 +377,13 @@
 // On some OS versions, the result is CP949 (uppercase).
 if (equalLettersIgnoringASCIICase(systemEncodingName, "cp949"))
 systemEncodingName = ASCIILiteral("ks_c_5601-1987");
+
+// CFStringConvertEncodingToIANACharSetName() returns cp874 for kTextEncodingDOSThai, AKA windows-874.
+// Since "cp874" alias is not standard (https://encoding.spec.whatwg.org/#names-and-labels), map to
+// "dos-874" instead.
+if (equalLettersIgnoringASCIICase(systemEncodingName, "cp874"))
+systemEncodingName = ASCIILiteral("dos-874");
+
 return systemEncodingName;
 #else
 return ASCIILiteral("ISO-8859-1");






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


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

2017-04-24 Thread commit-queue
Title: [215710] trunk/Source/WebCore








Revision 215710
Author commit-qu...@webkit.org
Date 2017-04-24 18:23:55 -0700 (Mon, 24 Apr 2017)


Log Message
[CG] Provide a type identifier hint to the CGImageSource so getting the type identifier is more accurate
https://bugs.webkit.org/show_bug.cgi?id=171042

Patch by Said Abou-Hallawa  on 2017-04-24
Reviewed by Tim Horton.

The image URL can be used to get the type identifier hint. Without providing
this hint, the image type identifier is not accurate for image formats.

Also add a function to the ImageDecoder class to get the typeIdentifier. Add
all the pluming from the ImageDecoder till the Image class.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::advanceAnimation):
(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.cpp:
(WebCore::Image::sourceURL):
* platform/graphics/Image.h: Change the sourceURL() to return a URL so CG can create CFURLRef from it.
(WebCore::Image::uti):
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex):
(WebCore::ImageFrameCache::startAsyncDecodingQueue):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::stopAsyncDecodingQueue):
(WebCore::ImageFrameCache::clearMetadata):
(WebCore::ImageFrameCache::sourceURL):
(WebCore::ImageFrameCache::encodedDataStatus):
(WebCore::ImageFrameCache::uti):
(WebCore::ImageFrameCache::filenameExtension):
* platform/graphics/ImageFrameCache.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ensureDecoderAvailable):
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::uti):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::ImageDecoder): Pass the type identifier hint to CGImageSourceCreateIncremental().
(WebCore::ImageDecoder::uti):
(WebCore::ImageDecoder::filenameExtension):
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):
* platform/graphics/cg/ImageDecoderCG.h:
(WebCore::ImageDecoder::create):
* platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoder::encodedDataStatus):
* platform/graphics/win/ImageDecoderDirect2D.h:
(WebCore::ImageDecoder::create): Add an argument of type URL.
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::create): Add an argument of type URL.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::encodedDataStatus): Make it const.
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::encodedDataStatus):
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::encodedDataStatus):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::encodedDataStatus):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::encodedDataStatus):
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::encodedDataStatus):
* platform/image-decoders/png/PNGImageDecoder.h:
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::encodedDataStatus):
* platform/image-decoders/webp/WEBPImageDecoder.h:
* platform/spi/cg/ImageIOSPI.h: Added.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
trunk/Source/WebCore/platform/graphics/BitmapImage.h
trunk/Source/WebCore/platform/graphics/Image.cpp
trunk/Source/WebCore/platform/graphics/Image.h
trunk/Source/WebCore/platform/graphics/ImageFrameCache.cpp
trunk/Source/WebCore/platform/graphics/ImageFrameCache.h
trunk/Source/WebCore/platform/graphics/ImageSource.cpp
trunk/Source/WebCore/platform/graphics/ImageSource.h
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.h
trunk/Source/WebCore/platform/graphics/win/ImageDecoderDirect2D.cpp
trunk/Source/WebCore/platform/graphics/win/ImageDecoderDirect2D.h
trunk/Source/WebCore/platform/image-decoders/ImageDecoder.cpp
trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h
trunk/Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp
trunk/Source/WebCore/platform/image-decoders/bmp/BMPImageDecoder.h
trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
trunk/Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
trunk/Source/WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp

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

2017-04-24 Thread ryanhaddad
Title: [215709] trunk/Source/WebCore








Revision 215709
Author ryanhad...@apple.com
Date 2017-04-24 17:43:36 -0700 (Mon, 24 Apr 2017)


Log Message
Unreviewed build fix.

* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
(WebCore::encryptAES_GCM):
(WebCore::decyptAES_GCM):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (215708 => 215709)

--- trunk/Source/WebCore/ChangeLog	2017-04-25 00:30:31 UTC (rev 215708)
+++ trunk/Source/WebCore/ChangeLog	2017-04-25 00:43:36 UTC (rev 215709)
@@ -1,3 +1,11 @@
+2017-04-24  Ryan Haddad  
+
+Unreviewed build fix.
+
+* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
+(WebCore::encryptAES_GCM):
+(WebCore::decyptAES_GCM):
+
 2017-04-24  Said Abou-Hallawa  
 
 Whitelist supported image MIME types


Modified: trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp (215708 => 215709)

--- trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp	2017-04-25 00:30:31 UTC (rev 215708)
+++ trunk/Source/WebCore/crypto/mac/CryptoAlgorithmAES_GCMMac.cpp	2017-04-25 00:43:36 UTC (rev 215709)
@@ -42,7 +42,10 @@
 Vector cipherText(plainText.size()); // Per section 5.2.1.2: http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
 Vector tag(desiredTagLengthInBytes);
 // tagLength is actual an input 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 CCCryptorStatus status = CCCryptorGCM(kCCEncrypt, kCCAlgorithmAES, key.data(), key.size(), iv.data(), iv.size(), additionalData.data(), additionalData.size(), plainText.data(), plainText.size(), cipherText.data(), tag.data(), );
+#pragma clang diagnostic pop
 if (status)
 return Exception { OperationError };
 
@@ -57,7 +60,10 @@
 Vector tag(desiredTagLengthInBytes);
 size_t offset = cipherText.size() - desiredTagLengthInBytes;
 // tagLength is actual an input 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 CCCryptorStatus status = CCCryptorGCM(kCCDecrypt, kCCAlgorithmAES, key.data(), key.size(), iv.data(), iv.size(), additionalData.data(), additionalData.size(), cipherText.data(), offset, plainText.data(), tag.data(), );
+#pragma clang diagnostic pop
 if (status)
 return Exception { OperationError };
 






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


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

2017-04-24 Thread beidson
Title: [215707] trunk/Source/WebKit2








Revision 215707
Author beid...@apple.com
Date 2017-04-24 17:18:52 -0700 (Mon, 24 Apr 2017)


Log Message
WebProcessPools should always have a WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=171252

Reviewed by Alex Christensen.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::registerSharedResourceLoadObserver): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetWebsiteDataStore):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::isAssociatedProcessPool):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp
trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h
trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp
trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit2/UIProcess/WebProcessPool.h
trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (215706 => 215707)

--- trunk/Source/WebKit2/ChangeLog	2017-04-25 00:14:31 UTC (rev 215706)
+++ trunk/Source/WebKit2/ChangeLog	2017-04-25 00:18:52 UTC (rev 215707)
@@ -1,3 +1,24 @@
+2017-04-24  Brady Eidson  
+
+WebProcessPools should always have a WebsiteDataStore
+https://bugs.webkit.org/show_bug.cgi?id=171252
+
+Reviewed by Alex Christensen.
+
+* UIProcess/API/APIWebsiteDataStore.cpp:
+(API::WebsiteDataStore::registerSharedResourceLoadObserver): Deleted.
+* UIProcess/API/APIWebsiteDataStore.h:
+* UIProcess/API/C/WKContext.cpp:
+(WKContextGetWebsiteDataStore):
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitialize):
+* UIProcess/WebProcessPool.cpp:
+(WebKit::WebProcessPool::WebProcessPool):
+(WebKit::WebProcessPool::createWebPage):
+* UIProcess/WebProcessPool.h:
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::isAssociatedProcessPool):
+
 2017-04-24  Youenn Fablet  
 
 Set defaults video getUserMedia constraints


Modified: trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp (215706 => 215707)

--- trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp	2017-04-25 00:14:31 UTC (rev 215706)
+++ trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp	2017-04-25 00:18:52 UTC (rev 215707)
@@ -87,11 +87,6 @@
 m_websiteDataStore->setResourceLoadStatisticsEnabled(enabled);
 }
 
-void WebsiteDataStore::registerSharedResourceLoadObserver()
-{
-m_websiteDataStore->registerSharedResourceLoadObserver();
-}
-
 #if !PLATFORM(COCOA) && !PLATFORM(GTK)
 WebKit::WebsiteDataStore::Configuration WebsiteDataStore::defaultDataStoreConfiguration()
 {


Modified: trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h (215706 => 215707)

--- trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h	2017-04-25 00:14:31 UTC (rev 215706)
+++ trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h	2017-04-25 00:18:52 UTC (rev 215707)
@@ -46,7 +46,6 @@
 
 bool resourceLoadStatisticsEnabled() const;
 void setResourceLoadStatisticsEnabled(bool);
-void registerSharedResourceLoadObserver();
 
 WebKit::WebsiteDataStore& websiteDataStore() { return *m_websiteDataStore; }
 HTTPCookieStore& httpCookieStore();


Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp (215706 => 215707)

--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp	2017-04-25 00:14:31 UTC (rev 215706)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp	2017-04-25 00:18:52 UTC (rev 215707)
@@ -404,7 +404,7 @@
 
 WKWebsiteDataStoreRef WKContextGetWebsiteDataStore(WKContextRef context)
 {
-return toAPI(toImpl(context)->websiteDataStore());
+return toAPI((context)->websiteDataStore());
 }
 
 WKApplicationCacheManagerRef WKContextGetApplicationCacheManager(WKContextRef context)


Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (215706 => 215707)

--- trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2017-04-25 00:14:31 UTC (rev 215706)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2017-04-25 00:18:52 UTC (rev 215707)
@@ -149,8 +149,7 @@
 
 setLegacyCustomProtocolManagerClient(std::make_unique());
 
-if (m_websiteDataStore)
-m_websiteDataStore->registerSharedResourceLoadObserver();
+m_websiteDataStore->websiteDataStore().registerSharedResourceLoadObserver();
 }
 
 #if PLATFORM(IOS)


Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (215706 => 215707)

--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	

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

2017-04-24 Thread commit-queue
Title: [215706] trunk/Source/WebCore








Revision 215706
Author commit-qu...@webkit.org
Date 2017-04-24 17:14:31 -0700 (Mon, 24 Apr 2017)


Log Message
Whitelist supported image MIME types
https://bugs.webkit.org/show_bug.cgi?id=171077

Patch by Said Abou-Hallawa  on 2017-04-24
Reviewed by Tim Horton.

Restrict the CG port image formats to a known whitelist. Build this list from image
UTI's instead of MIME types, since the image UTI's is a superset of the MIME types.
Use this list to build the list of supported image MIME types.

* PlatformAppleWin.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
* platform/graphics/cg/UTIRegistry.cpp: Added.
(WebCore::allowedImageUTIs):
(WebCore::isAllowedImageUTI):
* platform/graphics/cg/UTIRegistry.h: Added.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PlatformAppleWin.cmake
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp


Added Paths

trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp
trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (215705 => 215706)

--- trunk/Source/WebCore/ChangeLog	2017-04-25 00:05:20 UTC (rev 215705)
+++ trunk/Source/WebCore/ChangeLog	2017-04-25 00:14:31 UTC (rev 215706)
@@ -1,3 +1,23 @@
+2017-04-24  Said Abou-Hallawa  
+
+Whitelist supported image MIME types
+https://bugs.webkit.org/show_bug.cgi?id=171077
+
+Reviewed by Tim Horton.
+
+Restrict the CG port image formats to a known whitelist. Build this list from image
+UTI's instead of MIME types, since the image UTI's is a superset of the MIME types.
+Use this list to build the list of supported image MIME types.
+
+* PlatformAppleWin.cmake:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/MIMETypeRegistry.cpp:
+(WebCore::initializeSupportedImageMIMETypes):
+* platform/graphics/cg/UTIRegistry.cpp: Added.
+(WebCore::allowedImageUTIs):
+(WebCore::isAllowedImageUTI):
+* platform/graphics/cg/UTIRegistry.h: Added.
+
 2017-04-24  Nan Wang  
 
 AX: Crash at WebCore::AXObjectCache::characterOffsetForIndex(int, WebCore::AccessibilityObject const*) + 703


Modified: trunk/Source/WebCore/PlatformAppleWin.cmake (215705 => 215706)

--- trunk/Source/WebCore/PlatformAppleWin.cmake	2017-04-25 00:05:20 UTC (rev 215705)
+++ trunk/Source/WebCore/PlatformAppleWin.cmake	2017-04-25 00:14:31 UTC (rev 215706)
@@ -138,6 +138,7 @@
 platform/graphics/cg/PatternCG.cpp
 platform/graphics/cg/SubimageCacheWithTimer.cpp
 platform/graphics/cg/TransformationMatrixCG.cpp
+platform/graphics/cg/UTIRegistry.cpp
 
 platform/graphics/opentype/OpenTypeCG.cpp
 


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (215705 => 215706)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-04-25 00:05:20 UTC (rev 215705)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-04-25 00:14:31 UTC (rev 215706)
@@ -2515,6 +2515,8 @@
 		5597F8271D91C3130066BC21 /* ImageFrameCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5597F8251D91C3130066BC21 /* ImageFrameCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		55A336F71D8209F40022C4C7 /* NativeImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F61D8209F40022C4C7 /* NativeImage.h */; };
 		55A336F91D821E3C0022C4C7 /* ImageBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		55AF14E51EAAC59B0026EEAA /* UTIRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 55AF14E31EAAC59B0026EEAA /* UTIRegistry.cpp */; };
+		55AF14E61EAAC59B0026EEAA /* UTIRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55AF14E41EAAC59B0026EEAA /* UTIRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		570440531E5278B200356601 /* CryptoAlgorithmAES_CFB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5712526A1E52527C008FF369 /* CryptoAlgorithmAES_CFB.cpp */; };
 		570440581E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 570440571E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp */; };
 		5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 570440591E53936200356601 /* JSAesCbcCfbParams.h */; };
@@ -10236,6 +10238,8 @@
 		5597F8251D91C3130066BC21 /* ImageFrameCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageFrameCache.h; sourceTree = ""; };
 		55A336F61D8209F40022C4C7 /* NativeImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeImage.h; sourceTree = ""; };
 		55A336F81D821E3C0022C4C7 /* ImageBackingStore.h 

[webkit-changes] [215705] trunk

2017-04-24 Thread n_wang
Title: [215705] trunk








Revision 215705
Author n_w...@apple.com
Date 2017-04-24 17:05:20 -0700 (Mon, 24 Apr 2017)


Log Message
AX: Crash at WebCore::AXObjectCache::characterOffsetForIndex(int, WebCore::AccessibilityObject const*) + 703
https://bugs.webkit.org/show_bug.cgi?id=171247

Reviewed by Chris Fleizach.

Source/WebCore:

Crashed because we were passing a nil node into rootAXEditableElement(). Fixed it by
adding a null check.

Test: accessibility/mac/input-string-for-range-crash.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::characterOffsetForIndex):

LayoutTests:

* accessibility/mac/input-string-for-range-crash-expected.txt: Added.
* accessibility/mac/input-string-for-range-crash.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/AXObjectCache.cpp


Added Paths

trunk/LayoutTests/accessibility/mac/input-string-for-range-crash-expected.txt
trunk/LayoutTests/accessibility/mac/input-string-for-range-crash.html




Diff

Modified: trunk/LayoutTests/ChangeLog (215704 => 215705)

--- trunk/LayoutTests/ChangeLog	2017-04-25 00:04:00 UTC (rev 215704)
+++ trunk/LayoutTests/ChangeLog	2017-04-25 00:05:20 UTC (rev 215705)
@@ -1,3 +1,13 @@
+2017-04-24  Nan Wang  
+
+AX: Crash at WebCore::AXObjectCache::characterOffsetForIndex(int, WebCore::AccessibilityObject const*) + 703
+https://bugs.webkit.org/show_bug.cgi?id=171247
+
+Reviewed by Chris Fleizach.
+
+* accessibility/mac/input-string-for-range-crash-expected.txt: Added.
+* accessibility/mac/input-string-for-range-crash.html: Added.
+
 2017-04-24  Youenn Fablet  
 
 Set defaults video getUserMedia constraints


Added: trunk/LayoutTests/accessibility/mac/input-string-for-range-crash-expected.txt (0 => 215705)

--- trunk/LayoutTests/accessibility/mac/input-string-for-range-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/accessibility/mac/input-string-for-range-crash-expected.txt	2017-04-25 00:05:20 UTC (rev 215705)
@@ -0,0 +1,11 @@
+
+This tests that calling stringForRange on an input element won't cause crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+abcd
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/accessibility/mac/input-string-for-range-crash.html (0 => 215705)

--- trunk/LayoutTests/accessibility/mac/input-string-for-range-crash.html	(rev 0)
+++ trunk/LayoutTests/accessibility/mac/input-string-for-range-crash.html	2017-04-25 00:05:20 UTC (rev 215705)
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ +
+ +

+
+ +