[webkit-changes] [230326] trunk/Source

2018-04-05 Thread youenn
Title: [230326] trunk/Source








Revision 230326
Author you...@apple.com
Date 2018-04-05 22:23:19 -0700 (Thu, 05 Apr 2018)


Log Message
REGRESSION (r230223): LayoutTest http/tests/contentextensions/css-display-none-overflows-rule-data-1.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=184306

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add an option to not compile CSS rules since they are not useful in NetworkProcess.
Covered by tests no longer crashing in Debug WK2 bots.

* contentextensions/ContentExtension.cpp:
(WebCore::ContentExtensions::ContentExtension::create):
(WebCore::ContentExtensions::ContentExtension::ContentExtension):
* contentextensions/ContentExtension.h:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
* contentextensions/ContentExtensionsBackend.h:

Source/WebKit:

* NetworkProcess/NetworkContentRuleListManager.cpp:
(WebKit::NetworkContentRuleListManager::addContentRuleLists):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/contentextensions/ContentExtension.cpp
trunk/Source/WebCore/contentextensions/ContentExtension.h
trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkContentRuleListManager.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (230325 => 230326)

--- trunk/Source/WebCore/ChangeLog	2018-04-06 05:00:08 UTC (rev 230325)
+++ trunk/Source/WebCore/ChangeLog	2018-04-06 05:23:19 UTC (rev 230326)
@@ -1,3 +1,21 @@
+2018-04-05  Youenn Fablet  
+
+REGRESSION (r230223): LayoutTest http/tests/contentextensions/css-display-none-overflows-rule-data-1.html is crashing
+https://bugs.webkit.org/show_bug.cgi?id=184306
+
+Reviewed by Ryosuke Niwa.
+
+Add an option to not compile CSS rules since they are not useful in NetworkProcess.
+Covered by tests no longer crashing in Debug WK2 bots.
+
+* contentextensions/ContentExtension.cpp:
+(WebCore::ContentExtensions::ContentExtension::create):
+(WebCore::ContentExtensions::ContentExtension::ContentExtension):
+* contentextensions/ContentExtension.h:
+* contentextensions/ContentExtensionsBackend.cpp:
+(WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
+* contentextensions/ContentExtensionsBackend.h:
+
 2018-04-05  Brent Fulgham  
 
 WebContent process is calling CGDisplayUsesInvertedPolarity


Modified: trunk/Source/WebCore/contentextensions/ContentExtension.cpp (230325 => 230326)

--- trunk/Source/WebCore/contentextensions/ContentExtension.cpp	2018-04-06 05:00:08 UTC (rev 230325)
+++ trunk/Source/WebCore/contentextensions/ContentExtension.cpp	2018-04-06 05:23:19 UTC (rev 230326)
@@ -36,12 +36,12 @@
 namespace WebCore {
 namespace ContentExtensions {
 
-Ref ContentExtension::create(const String& identifier, Ref&& compiledExtension)
+Ref ContentExtension::create(const String& identifier, Ref&& compiledExtension, ShouldCompileCSS shouldCompileCSS)
 {
-return adoptRef(*new ContentExtension(identifier, WTFMove(compiledExtension)));
+return adoptRef(*new ContentExtension(identifier, WTFMove(compiledExtension), shouldCompileCSS));
 }
 
-ContentExtension::ContentExtension(const String& identifier, Ref&& compiledExtension)
+ContentExtension::ContentExtension(const String& identifier, Ref&& compiledExtension, ShouldCompileCSS shouldCompileCSS)
 : m_identifier(identifier)
 , m_compiledExtension(WTFMove(compiledExtension))
 {
@@ -55,8 +55,9 @@
 ASSERT((action & ~IfConditionFlag) == static_cast(action));
 m_universalActionsWithConditions.append(action);
 }
-
-compileGlobalDisplayNoneStyleSheet();
+
+if (shouldCompileCSS == ShouldCompileCSS::Yes)
+compileGlobalDisplayNoneStyleSheet();
 m_universalActionsWithoutConditions.shrinkToFit();
 m_universalActionsWithConditions.shrinkToFit();
 }


Modified: trunk/Source/WebCore/contentextensions/ContentExtension.h (230325 => 230326)

--- trunk/Source/WebCore/contentextensions/ContentExtension.h	2018-04-06 05:00:08 UTC (rev 230325)
+++ trunk/Source/WebCore/contentextensions/ContentExtension.h	2018-04-06 05:23:19 UTC (rev 230326)
@@ -41,7 +41,8 @@
 
 class ContentExtension : public RefCounted {
 public:
-static Ref create(const String& identifier, Ref&&);
+enum class ShouldCompileCSS { No, Yes };
+static Ref create(const String& identifier, Ref&&, ShouldCompileCSS = ShouldCompileCSS::Yes);
 
 const String& identifier() const { return m_identifier; }
 const CompiledContentExtension& compiledExtension() const { return m_compiledExtension.get(); }
@@ -51,7 +52,7 @@
 const Vector& universalActionsWithConditions(const URL& topURL);
 
 private:
-ContentExtension(const String& identifier, Ref&&);
+

[webkit-changes] [230325] trunk/Tools

2018-04-05 Thread youenn
Title: [230325] trunk/Tools








Revision 230325
Author you...@apple.com
Date 2018-04-05 22:00:08 -0700 (Thu, 05 Apr 2018)


Log Message
Test expectation updater should handle Win bot results
https://bugs.webkit.org/show_bug.cgi?id=184274

Reviewed by Ryosuke Niwa.

Add processing of win bot results.
They will update platform/win results.

Updated the script so that if there is no mac-wk2 results, it will still process specific results.

* Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py:
(TestExpectationUpdater.__init__):
(TestExpectationUpdater._bot_type):
(TestExpectationUpdater.do_update):
* Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py:
(MockAttachment):
(MockAttachment.__init__):
(MockAttachment.contents):
(MockBugzilla):
(MockBugzilla.__init__):
(MockBugzilla.fetch_bug):
(MockBugzilla.attachments):
(MockZip):
(MockZip.__init__):
(MockZip.unzip):
(MockZip.read):
(TestExpectationUpdaterTest.test_update_test_expectations):
(TestExpectationUpdaterTest):
(TestExpectationUpdaterTest.test_update_win_future_test_expectations):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (230324 => 230325)

--- trunk/Tools/ChangeLog	2018-04-06 04:57:10 UTC (rev 230324)
+++ trunk/Tools/ChangeLog	2018-04-06 05:00:08 UTC (rev 230325)
@@ -1,3 +1,35 @@
+2018-04-05  Youenn Fablet  
+
+Test expectation updater should handle Win bot results
+https://bugs.webkit.org/show_bug.cgi?id=184274
+
+Reviewed by Ryosuke Niwa.
+
+Add processing of win bot results.
+They will update platform/win results.
+
+Updated the script so that if there is no mac-wk2 results, it will still process specific results.
+
+* Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py:
+(TestExpectationUpdater.__init__):
+(TestExpectationUpdater._bot_type):
+(TestExpectationUpdater.do_update):
+* Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py:
+(MockAttachment):
+(MockAttachment.__init__):
+(MockAttachment.contents):
+(MockBugzilla):
+(MockBugzilla.__init__):
+(MockBugzilla.fetch_bug):
+(MockBugzilla.attachments):
+(MockZip):
+(MockZip.__init__):
+(MockZip.unzip):
+(MockZip.read):
+(TestExpectationUpdaterTest.test_update_test_expectations):
+(TestExpectationUpdaterTest):
+(TestExpectationUpdaterTest.test_update_win_future_test_expectations):
+
 2018-04-05  Zalan Bujtas  
 
 [LayoutReloaded] Fix static position for floating boxes when they don't fit the current line


Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py (230324 => 230325)

--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py	2018-04-06 04:57:10 UTC (rev 230324)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py	2018-04-06 05:00:08 UTC (rev 230325)
@@ -79,7 +79,7 @@
 bot_type = self._bot_type(attachment)
 if bot_type:
 self.platform_specific_attachments[bot_type] = attachment
-self.generic_attachment = self.platform_specific_attachments.pop("mac-wk2")
+self.generic_attachment = self.platform_specific_attachments.pop("mac-wk2") if "mac-wk2" in self.platform_specific_attachments else None
 else:
 attachment = attachment_fetcher.fetch_attachment(bugzilla_id)
 self.platform_specific_attachments = {self._bot_type(attachment): attachment} if is_attachment_platform_specific else {}
@@ -96,6 +96,8 @@
 return "mac-wk1"
 if "simulator" in name:
 return "ios-wk2"
+if "win-future" in name:
+return "win"
 return None
 
 def _tests_to_update(self, attachment, bot_type=None):
@@ -131,10 +133,11 @@
 self.filesystem.remove(expected_filename)
 
 def do_update(self):
-if not self.generic_attachment or not self.platform_specific_attachments:
+if not self.generic_attachment and not self.platform_specific_attachments:
 _log.info("No attachment to process")
 return
-self._update_from_generic_attachment()
+if self.generic_attachment:
+self._update_from_generic_attachment()
 for bot_type, attachment in self.platform_specific_attachments.iteritems():
 self._update_from_platform_specific_attachment(attachment, bot_type)
 


Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py (230324 => 230325)

--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py	2018-04-06 04:57:10 

[webkit-changes] [230324] trunk/Tools

2018-04-05 Thread zalan
Title: [230324] trunk/Tools








Revision 230324
Author za...@apple.com
Date 2018-04-05 21:57:10 -0700 (Thu, 05 Apr 2018)


Log Message
[LayoutReloaded] Fix static position for floating boxes when they don't fit the current line
https://bugs.webkit.org/show_bug.cgi?id=184354

Reviewed by Antti Koivisto.

Do not shrink the current line with the floating box unless it is on the current line.

* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-right-floats3.html: Added.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js
trunk/Tools/LayoutReloaded/test/index.html


Added Paths

trunk/Tools/LayoutReloaded/test/inline-with-right-floats3.html




Diff

Modified: trunk/Tools/ChangeLog (230323 => 230324)

--- trunk/Tools/ChangeLog	2018-04-06 04:44:32 UTC (rev 230323)
+++ trunk/Tools/ChangeLog	2018-04-06 04:57:10 UTC (rev 230324)
@@ -1,5 +1,23 @@
 2018-04-05  Zalan Bujtas  
 
+[LayoutReloaded] Fix static position for floating boxes when they don't fit the current line
+https://bugs.webkit.org/show_bug.cgi?id=184354
+
+Reviewed by Antti Koivisto.
+
+Do not shrink the current line with the floating box unless it is on the current line.
+
+* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
+(InlineFormattingContext.prototype._handleFloatingBox):
+(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
+* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
+(Line.prototype.addFloatingBox):
+(Line):
+* LayoutReloaded/test/index.html:
+* LayoutReloaded/test/inline-with-right-floats3.html: Added.
+
+2018-04-05  Zalan Bujtas  
+
 [LayoutReloaded] Add support for right floating boxes in inline formatting context
 https://bugs.webkit.org/show_bug.cgi?id=184351
 


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js (230323 => 230324)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-06 04:44:32 UTC (rev 230323)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-06 04:57:10 UTC (rev 230324)
@@ -103,11 +103,15 @@
 this._computeFloatingWidth(floatingBox);
 this._computeFloatingHeight(floatingBox);
 let displayBox = this.displayBox(floatingBox);
+// Position this float statically first, the floating context will figure it out the final position.
+let floatingStaticPosition = this._line().rect().topLeft();
 if (displayBox.width() > this._line().availableWidth())
-this._commitLine();
-// Position this float statically first, the floating context will figure it out the final position.
-displayBox.setTopLeft(this._line().rect().topLeft());
+floatingStaticPosition = new LayoutPoint(this._line().rect().bottom(), this.displayBox(this.formattingRoot()).contentBox().left());
+displayBox.setTopLeft(floatingStaticPosition);
 this.floatingContext().computePosition(floatingBox);
+// Check if the floating box is actually on the current line or got pushed further down.
+if (displayBox.top() >= this._line().rect().bottom())
+return;
 this._line().addFloatingBox(displayBox, Utils.isFloatingLeft(floatingBox));
 }
 
@@ -151,7 +155,7 @@
 if (root == floatFormattingRoot)
 return verticalPosition;
 let rootTop = Utils.mapPosition(root.topLeft(), root, floatFormattingRoot).top();
-return (rootTop + root.contentBox().top() + verticalPosition);
+return rootTop + root.contentBox().top() + verticalPosition;
 }
 
 _mapFloatingHorizontalPosition(horizontalPosition) {


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js (230323 => 230324)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js	2018-04-06 04:44:32 UTC (rev 230323)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js	2018-04-06 04:57:10 UTC (rev 230324)
@@ -58,10 +58,10 @@
 addFloatingBox(floatingDisplayBox, isFloatingLeft) {
 let width = floatingDisplayBox.width();
 ASSERT(width <= this.m_availableWidth);
-// Push non-floating boxes to the right.
 this.m_availableWidth -= width;
 if (!isFloatingLeft)
 return;
+// Push non-floating boxes to the right.
 for (let 

[webkit-changes] [230323] trunk/Source

2018-04-05 Thread bfulgham
Title: [230323] trunk/Source








Revision 230323
Author bfulg...@apple.com
Date 2018-04-05 21:44:32 -0700 (Thu, 05 Apr 2018)


Log Message
WebContent process is calling CGDisplayUsesInvertedPolarity
https://bugs.webkit.org/show_bug.cgi?id=184337


Reviewed by Zalan Bujtas.

The PlatformScreenMac code is still calling display-related routines directly, specifically
CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray. These should be brokered from
the UIProcess.

There's also no reason to avoid the brokering behavior on current WebKit builds. Remove
the compile guards so all macOS builds use this behavior.

Finally, add some ProcessPrivilege assertions to guard against accidentally calling these
routines in the future.

Source/WebCore:

Tested by existing regression tests.

* platform/PlatformScreen.h:
* platform/ScreenProperties.h:
(WebCore::ScreenProperties::encode const): Add new values.
(WebCore::ScreenProperties::decode):
* platform/mac/PlatformScreenMac.mm:
(WebCore::displayID): Add assertion that this is not calling display-related routines in
the WebContent process.
(WebCore::firstScreen): Ditto.
(WebCore::screenProperties): Moved higher in the file so it can be reused. Add calls to
CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray.
(WebCore::getScreenProperties): Moved higher in the file so it can be reused. Stop
double-hashing displayID.
(WebCore::screenIsMonochrome): Use cached values in WebContent process. Assert if this
code attempts a display-related routine in the WebContent process.
(WebCore::screenHasInvertedColors): Ditto.
(WebCore::screenDepth): Add assertion that this is not calling display-related routines in
the WebContent process.
(WebCore::screenDepthPerComponent): Ditto.
(WebCore::screenRect): Ditto.
(WebCore::screenAvailableRect): Ditto.
(WebCore::screen): Ditto.
(WebCore::screenColorSpace): Ditto.
(WebCore::screenSupportsExtendedColor): Ditto.

Source/WebKit:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess): Activate screen brokering code for all builds.
* WebProcess/WebProcess.cpp: Ditto.
* WebProcess/WebProcess.h: Ditto.
* WebProcess/WebProcess.messages.in: Ditto.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/PlatformScreen.h
trunk/Source/WebCore/platform/ScreenProperties.h
trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/WebProcess/WebProcess.cpp
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in




Diff

Modified: trunk/Source/WebCore/ChangeLog (230322 => 230323)

--- trunk/Source/WebCore/ChangeLog	2018-04-06 03:18:07 UTC (rev 230322)
+++ trunk/Source/WebCore/ChangeLog	2018-04-06 04:44:32 UTC (rev 230323)
@@ -1,3 +1,47 @@
+2018-04-05  Brent Fulgham  
+
+WebContent process is calling CGDisplayUsesInvertedPolarity
+https://bugs.webkit.org/show_bug.cgi?id=184337
+
+
+Reviewed by Zalan Bujtas.
+
+The PlatformScreenMac code is still calling display-related routines directly, specifically
+CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray. These should be brokered from
+the UIProcess.
+
+There's also no reason to avoid the brokering behavior on current WebKit builds. Remove
+the compile guards so all macOS builds use this behavior.
+
+Finally, add some ProcessPrivilege assertions to guard against accidentally calling these
+routines in the future.
+
+Tested by existing regression tests.
+
+* platform/PlatformScreen.h:
+* platform/ScreenProperties.h:
+(WebCore::ScreenProperties::encode const): Add new values.
+(WebCore::ScreenProperties::decode):
+* platform/mac/PlatformScreenMac.mm:
+(WebCore::displayID): Add assertion that this is not calling display-related routines in
+the WebContent process.
+(WebCore::firstScreen): Ditto.
+(WebCore::screenProperties): Moved higher in the file so it can be reused. Add calls to
+CGDisplayUsesInvertedPolarity and CGDisplayUsesForceToGray.
+(WebCore::getScreenProperties): Moved higher in the file so it can be reused. Stop
+double-hashing displayID.
+(WebCore::screenIsMonochrome): Use cached values in WebContent process. Assert if this
+code attempts a display-related routine in the WebContent process.
+(WebCore::screenHasInvertedColors): Ditto.
+(WebCore::screenDepth): Add assertion that this is not calling display-related routines in
+the WebContent process.
+(WebCore::screenDepthPerComponent): Ditto.
+(WebCore::screenRect): Ditto.
+(WebCore::screenAvailableRect): Ditto.
+(WebCore::screen): Ditto.
+(WebCore::screenColorSpace): Ditto.
+(WebCore::screenSupportsExtendedColor): 

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

2018-04-05 Thread dewei_zhu
Title: [230322] trunk/Websites/perf.webkit.org








Revision 230322
Author dewei_...@apple.com
Date 2018-04-05 20:18:07 -0700 (Thu, 05 Apr 2018)


Log Message
Fix a bug introduced in r230295 that A/B test result is not shown.
https://bugs.webkit.org/show_bug.cgi?id=184350

Reviewed by Ryosuke Niwa.

result.label should be assigned in `TestGroup._computeRequestedCommitSets`.

* public/v3/models/test-group.js:
(TestGroup.prototype._computeRequestedCommitSets):

Modified Paths

trunk/Websites/perf.webkit.org/ChangeLog
trunk/Websites/perf.webkit.org/public/v3/models/test-group.js




Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (230321 => 230322)

--- trunk/Websites/perf.webkit.org/ChangeLog	2018-04-06 03:10:20 UTC (rev 230321)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-04-06 03:18:07 UTC (rev 230322)
@@ -1,3 +1,15 @@
+2018-04-05  Dewei Zhu  
+
+Fix a bug introduced in r230295 that A/B test result is not shown.
+https://bugs.webkit.org/show_bug.cgi?id=184350
+
+Reviewed by Ryosuke Niwa.
+
+result.label should be assigned in `TestGroup._computeRequestedCommitSets`.
+
+* public/v3/models/test-group.js:
+(TestGroup.prototype._computeRequestedCommitSets):
+
 2018-03-29  Dewei Zhu  
 
 Added UI to show potential regressions in chart with t-testing against segmentations.


Modified: trunk/Websites/perf.webkit.org/public/v3/models/test-group.js (230321 => 230322)

--- trunk/Websites/perf.webkit.org/public/v3/models/test-group.js	2018-04-06 03:10:20 UTC (rev 230321)
+++ trunk/Websites/perf.webkit.org/public/v3/models/test-group.js	2018-04-06 03:18:07 UTC (rev 230322)
@@ -146,7 +146,7 @@
 if (beforeValues.length && afterValues.length) {
 const summary = metric.labelForDifference(beforeMean, afterMean, 'better', 'worse');
 result.changeType = summary.changeType;
-result.changeLabel = summary.changeLabel;
+result.label = summary.changeLabel;
 var isSignificant = Statistics.testWelchsT(beforeValues, afterValues);
 var significanceLabel = isSignificant ? 'significant' : 'insignificant';
 






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


[webkit-changes] [230321] trunk/Tools

2018-04-05 Thread zalan
Title: [230321] trunk/Tools








Revision 230321
Author za...@apple.com
Date 2018-04-05 20:10:20 -0700 (Thu, 05 Apr 2018)


Log Message
[LayoutReloaded] Add support for right floating boxes in inline formatting context
https://bugs.webkit.org/show_bug.cgi?id=184351

Reviewed by Antti Koivisto.

* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-right-float-simple.html: Added.
* LayoutReloaded/test/inline-with-right-floats2.html: Added.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js
trunk/Tools/LayoutReloaded/test/index.html


Added Paths

trunk/Tools/LayoutReloaded/test/inline-with-right-float-simple.html
trunk/Tools/LayoutReloaded/test/inline-with-right-floats2.html




Diff

Modified: trunk/Tools/ChangeLog (230320 => 230321)

--- trunk/Tools/ChangeLog	2018-04-06 02:38:41 UTC (rev 230320)
+++ trunk/Tools/ChangeLog	2018-04-06 03:10:20 UTC (rev 230321)
@@ -1,5 +1,22 @@
 2018-04-05  Zalan Bujtas  
 
+[LayoutReloaded] Add support for right floating boxes in inline formatting context
+https://bugs.webkit.org/show_bug.cgi?id=184351
+
+Reviewed by Antti Koivisto.
+
+* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
+(InlineFormattingContext.prototype._handleFloatingBox):
+(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
+* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
+(Line.prototype.addFloatingBox):
+(Line):
+* LayoutReloaded/test/index.html:
+* LayoutReloaded/test/inline-with-right-float-simple.html: Added.
+* LayoutReloaded/test/inline-with-right-floats2.html: Added.
+
+2018-04-05  Zalan Bujtas  
+
 [LayoutReloaded] Move floating box to the next line when needed
 https://bugs.webkit.org/show_bug.cgi?id=184349
 


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js (230320 => 230321)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-06 02:38:41 UTC (rev 230320)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-06 03:10:20 UTC (rev 230321)
@@ -102,13 +102,13 @@
 _handleFloatingBox(floatingBox) {
 this._computeFloatingWidth(floatingBox);
 this._computeFloatingHeight(floatingBox);
-let displayFloatingBox = this.displayBox(floatingBox);
-if (displayFloatingBox.width() > this._line().availableWidth())
+let displayBox = this.displayBox(floatingBox);
+if (displayBox.width() > this._line().availableWidth())
 this._commitLine();
 // Position this float statically first, the floating context will figure it out the final position.
-displayFloatingBox.setTopLeft(this._line().rect().topLeft());
+displayBox.setTopLeft(this._line().rect().topLeft());
 this.floatingContext().computePosition(floatingBox);
-this._line().addFloatingBox(displayFloatingBox.size());
+this._line().addFloatingBox(displayBox, Utils.isFloatingLeft(floatingBox));
 }
 
 _commitLine() {
@@ -151,7 +151,7 @@
 if (root == floatFormattingRoot)
 return verticalPosition;
 let rootTop = Utils.mapPosition(root.topLeft(), root, floatFormattingRoot).top();
-return rootTop += root.contentBox().top();
+return (rootTop + root.contentBox().top() + verticalPosition);
 }
 
 _mapFloatingHorizontalPosition(horizontalPosition) {


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js (230320 => 230321)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js	2018-04-06 02:38:41 UTC (rev 230320)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js	2018-04-06 03:10:20 UTC (rev 230321)
@@ -55,12 +55,15 @@
 this.m_lineRect.growBy(new LayoutSize(size.width(), 0));
 }
 
-addFloatingBox(size) {
-ASSERT(size.width() <= this.m_availableWidth);
+addFloatingBox(floatingDisplayBox, isFloatingLeft) {
+let width = floatingDisplayBox.width();
+ASSERT(width <= this.m_availableWidth);
 // Push non-floating boxes to the right.
-this.m_availableWidth -= size.width();
+this.m_availableWidth -= width;
+if (!isFloatingLeft)
+return;
 for (let lineBox of this.m_lineBoxes)
-lineBox.lineBoxRect.moveHorizontally(size.width());
-

[webkit-changes] [230320] trunk/JSTests

2018-04-05 Thread ross . kirsling
Title: [230320] trunk/JSTests








Revision 230320
Author ross.kirsl...@sony.com
Date 2018-04-05 19:38:41 -0700 (Thu, 05 Apr 2018)


Log Message
[test262] Mark line-terminator-normalisation-CR.js as a binary file.
https://bugs.webkit.org/show_bug.cgi?id=184341

Reviewed by Yusuke Suzuki.

This test is all about CR line endings, but `svn-apply` can't deal with them.
Treating the file as binary ensures that its contents never are never shown in a diff.

* .gitattributes: Added.

Modified Paths

trunk/JSTests/ChangeLog


Added Paths

trunk/JSTests/.gitattributes




Diff

Added: trunk/JSTests/.gitattributes (0 => 230320)

--- trunk/JSTests/.gitattributes	(rev 0)
+++ trunk/JSTests/.gitattributes	2018-04-06 02:38:41 UTC (rev 230320)
@@ -0,0 +1 @@
+test262/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js binary


Modified: trunk/JSTests/ChangeLog (230319 => 230320)

--- trunk/JSTests/ChangeLog	2018-04-06 02:25:41 UTC (rev 230319)
+++ trunk/JSTests/ChangeLog	2018-04-06 02:38:41 UTC (rev 230320)
@@ -1,3 +1,15 @@
+2018-04-05  Ross Kirsling  
+
+[test262] Mark line-terminator-normalisation-CR.js as a binary file.
+https://bugs.webkit.org/show_bug.cgi?id=184341
+
+Reviewed by Yusuke Suzuki.
+
+This test is all about CR line endings, but `svn-apply` can't deal with them.
+Treating the file as binary ensures that its contents never are never shown in a diff.
+
+* .gitattributes: Added.
+
 2018-04-05  Robin Morisset  
 
 Fix testcase (missing try/catch).






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


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

2018-04-05 Thread wilander
Title: [230319] trunk/Source/WebCore








Revision 230319
Author wilan...@apple.com
Date 2018-04-05 19:25:41 -0700 (Thu, 05 Apr 2018)


Log Message
Resource Load Statistics: Apply cookie blocking to setCookiesFromDOM()
https://bugs.webkit.org/show_bug.cgi?id=184346


Reviewed by Brent Fulgham.

Since these cookies can't be seen and are not sent in requests, I
can't write an automated test for them. This really should have been
done as part of: https://bugs.webkit.org/show_bug.cgi?id=180682.
That said, I have tested this manually.

* platform/network/mac/CookieJarMac.mm:
(WebCore::setCookiesFromDOM):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (230318 => 230319)

--- trunk/Source/WebCore/ChangeLog	2018-04-06 02:12:26 UTC (rev 230318)
+++ trunk/Source/WebCore/ChangeLog	2018-04-06 02:25:41 UTC (rev 230319)
@@ -1,3 +1,19 @@
+2018-04-05  John Wilander  
+
+Resource Load Statistics: Apply cookie blocking to setCookiesFromDOM()
+https://bugs.webkit.org/show_bug.cgi?id=184346
+
+
+Reviewed by Brent Fulgham.
+
+Since these cookies can't be seen and are not sent in requests, I
+can't write an automated test for them. This really should have been
+done as part of: https://bugs.webkit.org/show_bug.cgi?id=180682.
+That said, I have tested this manually.
+
+* platform/network/mac/CookieJarMac.mm:
+(WebCore::setCookiesFromDOM):
+
 2018-04-05  Zalan Bujtas  
 
 Folding anonymous blocks should not result in deleting content.


Modified: trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm (230318 => 230319)

--- trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm	2018-04-06 02:12:26 UTC (rev 230318)
+++ trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm	2018-04-06 02:25:41 UTC (rev 230319)
@@ -279,6 +279,9 @@
 ASSERT([filteredCookies.get() count] <= 1);
 
 #if HAVE(CFNETWORK_STORAGE_PARTITIONING)
+if (session.shouldBlockCookies(firstParty, url))
+return;
+
 String partition = session.cookieStoragePartition(firstParty, url, frameID, pageID);
 if (!partition.isEmpty())
 filteredCookies = applyPartitionToCookies(partition, filteredCookies.get());






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


[webkit-changes] [230318] trunk/Tools

2018-04-05 Thread zalan
Title: [230318] trunk/Tools








Revision 230318
Author za...@apple.com
Date 2018-04-05 19:12:26 -0700 (Thu, 05 Apr 2018)


Log Message
[LayoutReloaded] Move floating box to the next line when needed
https://bugs.webkit.org/show_bug.cgi?id=184349

Reviewed by Antti Koivisto.

* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleContent):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
(InlineFormattingContext):
(InlineFormattingContext.prototype._handleFloatingBoxes): Deleted.
(InlineFormattingContext.prototype._floatingBoxes): Deleted.
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addTextLineBox):
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/Utils.js:
(LayoutRect.prototype.moveHorizontally):
(LayoutRect.prototype.moveVertically):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-floats-when-they-dont-fit.html: Added.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/Line.js
trunk/Tools/LayoutReloaded/Utils.js
trunk/Tools/LayoutReloaded/test/index.html


Added Paths

trunk/Tools/LayoutReloaded/test/inline-with-floats-when-they-dont-fit.html




Diff

Modified: trunk/Tools/ChangeLog (230317 => 230318)

--- trunk/Tools/ChangeLog	2018-04-06 01:29:26 UTC (rev 230317)
+++ trunk/Tools/ChangeLog	2018-04-06 02:12:26 UTC (rev 230318)
@@ -1,3 +1,29 @@
+2018-04-05  Zalan Bujtas  
+
+[LayoutReloaded] Move floating box to the next line when needed
+https://bugs.webkit.org/show_bug.cgi?id=184349
+
+Reviewed by Antti Koivisto.
+
+* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
+(InlineFormattingContext.prototype.layout):
+(InlineFormattingContext.prototype._handleContent):
+(InlineFormattingContext.prototype._handleText):
+(InlineFormattingContext.prototype._handleFloatingBox):
+(InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
+(InlineFormattingContext):
+(InlineFormattingContext.prototype._handleFloatingBoxes): Deleted.
+(InlineFormattingContext.prototype._floatingBoxes): Deleted.
+* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
+(Line.prototype.addTextLineBox):
+(Line.prototype.addFloatingBox):
+(Line):
+* LayoutReloaded/Utils.js:
+(LayoutRect.prototype.moveHorizontally):
+(LayoutRect.prototype.moveVertically):
+* LayoutReloaded/test/index.html:
+* LayoutReloaded/test/inline-with-floats-when-they-dont-fit.html: Added.
+
 2018-04-05  Brady Eidson  
 
 Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js (230317 => 230318)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-06 01:29:26 UTC (rev 230317)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-06 02:12:26 UTC (rev 230318)
@@ -37,10 +37,7 @@
 // This is a post-order tree traversal layout.
 // The root container layout is done in the formatting context it lives in, not that one it creates, so let's start with the first child.
 this.m_line = this._createNewLine();
-// Collect floating boxes and layout them first.
-this._handleFloatingBoxes();
-//
-this._addToLayoutQueue(this.formattingRoot().firstInFlowChild());
+this._addToLayoutQueue(this.formattingRoot().firstInFlowOrFloatChild());
 while (this._descendantNeedsLayout()) {
 // Travers down on the descendants until we find a leaf node.
 while (true) {
@@ -49,18 +46,17 @@
 this.layoutState().layout(layoutBox);
 break;
 }
-if (!layoutBox.isContainer() || !layoutBox.hasChild())
+if (!layoutBox.isContainer() || !layoutBox.hasInFlowOrFloatChild())
 break;
-this._addToLayoutQueue(layoutBox.firstInFlowChild());
+this._addToLayoutQueue(layoutBox.firstInFlowOrFloatChild());
 }
 while (this._descendantNeedsLayout()) {
 let layoutBox = this._nextInLayoutQueue();
-if (layoutBox instanceof Layout.InlineBox)
-this._handleInlineBox(layoutBox);
+this._handleContent(layoutBox);
 // We are done with laying out this box.

[webkit-changes] [230317] trunk/Source/bmalloc

2018-04-05 Thread sbarati
Title: [230317] trunk/Source/bmalloc








Revision 230317
Author sbar...@apple.com
Date 2018-04-05 18:29:26 -0700 (Thu, 05 Apr 2018)


Log Message
IsoHeapImpl not IsoHeapImplBase should add itself to AllIsoHeaps
https://bugs.webkit.org/show_bug.cgi?id=184174

Reviewed by Filip Pizlo.

Otherwise, another thread may see a non-fully formed IsoHeapImpl.

* bmalloc/IsoHeapImpl.cpp:
(bmalloc::IsoHeapImplBase::IsoHeapImplBase):
(bmalloc::IsoHeapImplBase::addToAllIsoHeaps):
* bmalloc/IsoHeapImpl.h:
* bmalloc/IsoHeapImplInlines.h:
(bmalloc::IsoHeapImpl::IsoHeapImpl):

Modified Paths

trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc/IsoHeapImpl.cpp
trunk/Source/bmalloc/bmalloc/IsoHeapImpl.h
trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h




Diff

Modified: trunk/Source/bmalloc/ChangeLog (230316 => 230317)

--- trunk/Source/bmalloc/ChangeLog	2018-04-06 00:45:23 UTC (rev 230316)
+++ trunk/Source/bmalloc/ChangeLog	2018-04-06 01:29:26 UTC (rev 230317)
@@ -1,3 +1,19 @@
+2018-04-05  Saam Barati  
+
+IsoHeapImpl not IsoHeapImplBase should add itself to AllIsoHeaps
+https://bugs.webkit.org/show_bug.cgi?id=184174
+
+Reviewed by Filip Pizlo.
+
+Otherwise, another thread may see a non-fully formed IsoHeapImpl.
+
+* bmalloc/IsoHeapImpl.cpp:
+(bmalloc::IsoHeapImplBase::IsoHeapImplBase):
+(bmalloc::IsoHeapImplBase::addToAllIsoHeaps):
+* bmalloc/IsoHeapImpl.h:
+* bmalloc/IsoHeapImplInlines.h:
+(bmalloc::IsoHeapImpl::IsoHeapImpl):
+
 2018-04-05  Yusuke Suzuki  
 
 bmalloc StaticMutex's constructor should be constexpr


Modified: trunk/Source/bmalloc/bmalloc/IsoHeapImpl.cpp (230316 => 230317)

--- trunk/Source/bmalloc/bmalloc/IsoHeapImpl.cpp	2018-04-06 00:45:23 UTC (rev 230316)
+++ trunk/Source/bmalloc/bmalloc/IsoHeapImpl.cpp	2018-04-06 01:29:26 UTC (rev 230317)
@@ -33,7 +33,6 @@
 
 IsoHeapImplBase::IsoHeapImplBase()
 {
-PerProcess::get()->add(this);
 }
 
 IsoHeapImplBase::~IsoHeapImplBase()
@@ -40,6 +39,11 @@
 {
 }
 
+void IsoHeapImplBase::addToAllIsoHeaps()
+{
+PerProcess::get()->add(this);
+}
+
 void IsoHeapImplBase::scavengeNow()
 {
 Vector deferredDecommits;


Modified: trunk/Source/bmalloc/bmalloc/IsoHeapImpl.h (230316 => 230317)

--- trunk/Source/bmalloc/bmalloc/IsoHeapImpl.h	2018-04-06 00:45:23 UTC (rev 230316)
+++ trunk/Source/bmalloc/bmalloc/IsoHeapImpl.h	2018-04-06 01:29:26 UTC (rev 230317)
@@ -48,6 +48,7 @@
 
 protected:
 IsoHeapImplBase();
+void addToAllIsoHeaps();
 
 private:
 friend class AllIsoHeaps;


Modified: trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h (230316 => 230317)

--- trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h	2018-04-06 00:45:23 UTC (rev 230316)
+++ trunk/Source/bmalloc/bmalloc/IsoHeapImplInlines.h	2018-04-06 01:29:26 UTC (rev 230317)
@@ -36,6 +36,7 @@
 , m_inlineDirectory(*this)
 , m_allocator(*this)
 {
+addToAllIsoHeaps();
 }
 
 template






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


[webkit-changes] [230316] tags/Safari-605.2.2/

2018-04-05 Thread jmarcell
Title: [230316] tags/Safari-605.2.2/








Revision 230316
Author jmarc...@apple.com
Date 2018-04-05 17:45:23 -0700 (Thu, 05 Apr 2018)


Log Message
Tag Safari-605.2.2.

Added Paths

tags/Safari-605.2.2/




Diff




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


[webkit-changes] [230315] trunk

2018-04-05 Thread beidson
Title: [230315] trunk








Revision 230315
Author beid...@apple.com
Date 2018-04-05 16:18:01 -0700 (Thu, 05 Apr 2018)


Log Message
Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
 and https://bugs.webkit.org/show_bug.cgi?id=184318

Reviewed by Andy Estes.

Source/WebKit:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision): Don't consider a swap if the navigation is not in the main frame.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
(-[PSONScheme addMappingFromURLString:toData:]):
(-[PSONScheme webView:startURLSchemeTask:]):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (230314 => 230315)

--- trunk/Source/WebKit/ChangeLog	2018-04-05 21:21:50 UTC (rev 230314)
+++ trunk/Source/WebKit/ChangeLog	2018-04-05 23:18:01 UTC (rev 230315)
@@ -1,3 +1,13 @@
+2018-04-05  Brady Eidson  
+
+Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
+ and https://bugs.webkit.org/show_bug.cgi?id=184318
+
+Reviewed by Andy Estes.
+
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::receivedPolicyDecision): Don't consider a swap if the navigation is not in the main frame.
+
 2018-04-05  Ryosuke Niwa  
 
 WebContent process sometimes hangs in WebProcess::ensureNetworkProcessConnection


Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (230314 => 230315)

--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-04-05 21:21:50 UTC (rev 230314)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-04-05 23:18:01 UTC (rev 230315)
@@ -2350,7 +2350,7 @@
 if (activePolicyListener && activePolicyListener->policyListenerType() == PolicyListenerType::NavigationAction) {
 ASSERT(activePolicyListener->listenerID() == listenerID);
 
-if (action == PolicyAction::Use && navigation) {
+if (action == PolicyAction::Use && navigation && frame.isMainFrame()) {
 auto proposedProcess = process().processPool().processForNavigation(*this, *navigation, action);
 
 if (proposedProcess.ptr() != ()) {


Modified: trunk/Tools/ChangeLog (230314 => 230315)

--- trunk/Tools/ChangeLog	2018-04-05 21:21:50 UTC (rev 230314)
+++ trunk/Tools/ChangeLog	2018-04-05 23:18:01 UTC (rev 230315)
@@ -1,3 +1,15 @@
+2018-04-05  Brady Eidson  
+
+Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
+ and https://bugs.webkit.org/show_bug.cgi?id=184318
+
+Reviewed by Andy Estes.
+
+* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
+(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
+(-[PSONScheme addMappingFromURLString:toData:]):
+(-[PSONScheme webView:startURLSchemeTask:]):
+
 2018-04-05  Yusuke Suzuki  
 
 [WTF] Remove StaticLock


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (230314 => 230315)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2018-04-05 21:21:50 UTC (rev 230314)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2018-04-05 23:18:01 UTC (rev 230315)
@@ -73,6 +73,7 @@
 [receivedMessages addObject:@""];
 
 receivedMessage = true;
+seenPIDs.add([message.webView _webProcessIdentifier]);
 }
 @end
 
@@ -134,9 +135,11 @@
 @interface PSONScheme : NSObject  {
 const char* _bytes;
 HashMap _redirects;
+HashMap _dataMappings;
 }
 - (instancetype)initWithBytes:(const char*)bytes;
 - (void)addRedirectFromURLString:(NSString *)sourceURLString toURLString:(NSString *)destinationURLString;
+- (void)addMappingFromURLString:(NSString *)urlString toData:(const char*)data;
 @end
 
 @implementation PSONScheme
@@ -153,6 +156,11 @@
 _redirects.set(sourceURLString, destinationURLString);
 }
 
+- (void)addMappingFromURLString:(NSString *)urlString toData:(const char*)data
+{
+_dataMappings.set(urlString, [NSData dataWithBytesNoCopy:(void*)data length:strlen(data) freeWhenDone:NO]);
+}
+
 - (void)webView:(WKWebView *)webView startURLSchemeTask:(id )task
 {
 NSURL *finalURL = task.request.URL;
@@ -169,7 +177,9 @@
 RetainPtr response = adoptNS([[NSURLResponse alloc] initWithURL:finalURL MIMEType:@"text/html" expectedContentLength:1 textEncodingName:nil]);
 [task didReceiveResponse:response.get()];
 
-if (_bytes) {
+if (auto data = "" absoluteString]))
+[task didReceiveData:data.get()];
+else if (_bytes) {
 RetainPtr data = "" 

[webkit-changes] [230314] trunk/Source/WebKit

2018-04-05 Thread rniwa
Title: [230314] trunk/Source/WebKit








Revision 230314
Author rn...@webkit.org
Date 2018-04-05 14:21:50 -0700 (Thu, 05 Apr 2018)


Log Message
WebContent process sometimes hangs in WebProcess::ensureNetworkProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=184326

Reviewed by Chris Dumez.

The hang was caused by UI process never sending the reply back to GetNetworkProcessConnection
due to m_pendingOutgoingMachMessage being set and the event handler for DISPATCH_MACH_SEND_POSSIBLE
never getting called. This is because the event handler registration happens asynchronously,
and may not have completed by the time we send the first IPC to the web content process
in which case it can timeout and we may never get the callback.

Fixed the hang by waiting for the event handler registration to be completed using
dispatch_source_set_registration_handler. To do this, this patch adds a new boolean instance variable,
m_isInitializingSendSource, to Connection which is set to true between the time mach port is created
and until the event handler registration has been completed. platformCanSendOutgoingMessages returns
false while m_isInitializingSendSource is set to prevent the attempt to send messages like we do when
m_pendingOutgoingMachMessage is set to true.

* Platform/IPC/Connection.h:
(IPC::Connection::m_isInitializingSendSource): Added.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate): Set m_isInitializingSendSource to false.
(IPC::Connection::sendMessage): Assert that m_isInitializingSendSource is false.
(IPC::Connection::platformCanSendOutgoingMessages const): Return false if m_isInitializingSendSource
is set to true.
(IPC::Connection::sendOutgoingMessage): Assert that m_isInitializingSendSource is false.
(IPC::Connection::initializeSendSource): Set m_isInitializingSendSource to true temporarily until
dispatch_source_set_registration_handler's callback is called. Resume and send any pending outgoing
messages.
(IPC::Connection::resumeSendSource): Extracted from initializeSendSource.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/IPC/Connection.h
trunk/Source/WebKit/Platform/IPC/mac/ConnectionMac.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (230313 => 230314)

--- trunk/Source/WebKit/ChangeLog	2018-04-05 21:14:31 UTC (rev 230313)
+++ trunk/Source/WebKit/ChangeLog	2018-04-05 21:21:50 UTC (rev 230314)
@@ -1,3 +1,36 @@
+2018-04-05  Ryosuke Niwa  
+
+WebContent process sometimes hangs in WebProcess::ensureNetworkProcessConnection
+https://bugs.webkit.org/show_bug.cgi?id=184326
+
+Reviewed by Chris Dumez.
+
+The hang was caused by UI process never sending the reply back to GetNetworkProcessConnection
+due to m_pendingOutgoingMachMessage being set and the event handler for DISPATCH_MACH_SEND_POSSIBLE
+never getting called. This is because the event handler registration happens asynchronously,
+and may not have completed by the time we send the first IPC to the web content process
+in which case it can timeout and we may never get the callback.
+
+Fixed the hang by waiting for the event handler registration to be completed using
+dispatch_source_set_registration_handler. To do this, this patch adds a new boolean instance variable,
+m_isInitializingSendSource, to Connection which is set to true between the time mach port is created
+and until the event handler registration has been completed. platformCanSendOutgoingMessages returns
+false while m_isInitializingSendSource is set to prevent the attempt to send messages like we do when
+m_pendingOutgoingMachMessage is set to true.
+
+* Platform/IPC/Connection.h:
+(IPC::Connection::m_isInitializingSendSource): Added.
+* Platform/IPC/mac/ConnectionMac.mm:
+(IPC::Connection::platformInvalidate): Set m_isInitializingSendSource to false.
+(IPC::Connection::sendMessage): Assert that m_isInitializingSendSource is false.
+(IPC::Connection::platformCanSendOutgoingMessages const): Return false if m_isInitializingSendSource
+is set to true.
+(IPC::Connection::sendOutgoingMessage): Assert that m_isInitializingSendSource is false.
+(IPC::Connection::initializeSendSource): Set m_isInitializingSendSource to true temporarily until
+dispatch_source_set_registration_handler's callback is called. Resume and send any pending outgoing
+messages.
+(IPC::Connection::resumeSendSource): Extracted from initializeSendSource.
+
 2018-04-05  Youenn Fablet  
 
 WebRTC data channel only applications require capture permissions for direct connections


Modified: trunk/Source/WebKit/Platform/IPC/Connection.h (230313 => 230314)

--- trunk/Source/WebKit/Platform/IPC/Connection.h	2018-04-05 21:14:31 UTC (rev 230313)
+++ trunk/Source/WebKit/Platform/IPC/Connection.h	2018-04-05 21:21:50 UTC 

[webkit-changes] [230313] trunk

2018-04-05 Thread zalan
Title: [230313] trunk








Revision 230313
Author za...@apple.com
Date 2018-04-05 14:14:31 -0700 (Thu, 05 Apr 2018)


Log Message
Folding anonymous blocks should not result in deleting content.
https://bugs.webkit.org/show_bug.cgi?id=184339


Reviewed by Antti Koivisto.

Source/WebCore:

While folding multiple anonymous blocks (moving the children from next sibling over to previous sibling)
we should ensure that the block we are about to destroy does not gain new descendants.
In case of 4 sibling anonymous blocks (A B C D), while destroying B
1. we move C's children to A and destroy C.
2. While destroying C, we notice B and C as sibling anonymous blocks and we move
D's children over to B (even though B is going to be destroyed as we climb back on the stack).

In this patch, B is detached from the tree before we start moving renderers around so that a subsequent folding won't
find B anymore as a candidate.

Test: fast/block/crash-while-folding-anonymous-blocks.html

* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::detach):

LayoutTests:

* fast/block/crash-when-subtree-is-still-attached-expected.txt: Progressing. This test does not
intend to remove "foobar" text at all.
* fast/block/crash-while-folding-anonymous-blocks-expected.txt: Added.
* fast/block/crash-while-folding-anonymous-blocks.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/block/crash-when-subtree-is-still-attached-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp


Added Paths

trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks-expected.txt
trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks.html




Diff

Modified: trunk/LayoutTests/ChangeLog (230312 => 230313)

--- trunk/LayoutTests/ChangeLog	2018-04-05 20:09:09 UTC (rev 230312)
+++ trunk/LayoutTests/ChangeLog	2018-04-05 21:14:31 UTC (rev 230313)
@@ -1,3 +1,16 @@
+2018-04-05  Zalan Bujtas  
+
+Folding anonymous blocks should not result in deleting content.
+https://bugs.webkit.org/show_bug.cgi?id=184339
+
+
+Reviewed by Antti Koivisto.
+
+* fast/block/crash-when-subtree-is-still-attached-expected.txt: Progressing. This test does not 
+intend to remove "foobar" text at all.
+* fast/block/crash-while-folding-anonymous-blocks-expected.txt: Added.
+* fast/block/crash-while-folding-anonymous-blocks.html: Added.
+
 2018-03-21  Ryan Haddad  
 
 Rebaseline tests for High Sierra.


Modified: trunk/LayoutTests/fast/block/crash-when-subtree-is-still-attached-expected.txt (230312 => 230313)

--- trunk/LayoutTests/fast/block/crash-when-subtree-is-still-attached-expected.txt	2018-04-05 20:09:09 UTC (rev 230312)
+++ trunk/LayoutTests/fast/block/crash-when-subtree-is-still-attached-expected.txt	2018-04-05 21:14:31 UTC (rev 230313)
@@ -1,3 +1,4 @@
 PASS if
 no crash.
+foobar
 


Added: trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks-expected.txt (0 => 230313)

--- trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks-expected.txt	2018-04-05 21:14:31 UTC (rev 230313)
@@ -0,0 +1 @@
+


Added: trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks.html (0 => 230313)

--- trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks.html	(rev 0)
+++ trunk/LayoutTests/fast/block/crash-while-folding-anonymous-blocks.html	2018-04-05 21:14:31 UTC (rev 230313)
@@ -0,0 +1,33 @@
+
+if (window.testRunner)
+testRunner.dumpAsText();
+// Setting up 3 continuations in separate blocks.
+document.body.offsetHeight;
+
+let di = document.createElement("div");
+foo2.appendChild(di);
+foo2.style.display = "inline";
+document.body.offsetHeight;
+
+foo1.remove();
+foo3.remove();
+document.body.offsetHeight;
+
+foo2.remove();
+document.body.offsetHeight;
+
+let di2 = document.createElement("div");
+foo5.appendChild(di2);
+foo5.style.display = "inline";
+document.body.offsetHeight;
+
+foo4.remove();
+foo6.remove();
+foo5.remove();
+foo7.remove();
+foo9.remove();
+foo10.remove();
+document.body.offsetHeight;
+foo12.remove();
+document.body.offsetHeight;
+
\ No newline at end of file


Modified: trunk/Source/WebCore/ChangeLog (230312 => 230313)

--- trunk/Source/WebCore/ChangeLog	2018-04-05 20:09:09 UTC (rev 230312)
+++ trunk/Source/WebCore/ChangeLog	2018-04-05 21:14:31 UTC (rev 230313)
@@ -1,3 +1,26 @@
+2018-04-05  Zalan Bujtas  
+
+Folding anonymous blocks should not result in deleting content.
+https://bugs.webkit.org/show_bug.cgi?id=184339
+
+
+Reviewed by Antti Koivisto.
+
+While folding multiple anonymous blocks (moving the children from next sibling over to previous sibling)
+we should ensure that the block we 

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

2018-04-05 Thread aestes
Title: [230312] trunk/Source/WebCore








Revision 230312
Author aes...@apple.com
Date 2018-04-05 13:09:09 -0700 (Thu, 05 Apr 2018)


Log Message
Mark Payment Request as "Supported" in features.json
https://bugs.webkit.org/show_bug.cgi?id=184338

Reviewed by Anders Carlsson.

* features.json:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/features.json




Diff

Modified: trunk/Source/WebCore/ChangeLog (230311 => 230312)

--- trunk/Source/WebCore/ChangeLog	2018-04-05 20:02:19 UTC (rev 230311)
+++ trunk/Source/WebCore/ChangeLog	2018-04-05 20:09:09 UTC (rev 230312)
@@ -1,3 +1,12 @@
+2018-04-05  Andy Estes  
+
+Mark Payment Request as "Supported" in features.json
+https://bugs.webkit.org/show_bug.cgi?id=184338
+
+Reviewed by Anders Carlsson.
+
+* features.json:
+
 2018-04-05  Chris Dumez  
 
 Unreviewed, rolling out r230042.


Modified: trunk/Source/WebCore/features.json (230311 => 230312)

--- trunk/Source/WebCore/features.json	2018-04-05 20:02:19 UTC (rev 230311)
+++ trunk/Source/WebCore/features.json	2018-04-05 20:09:09 UTC (rev 230312)
@@ -982,11 +982,11 @@
 {
 "name": "Payment Request",
 "status": {
-"status": "Supported In Preview"
+"status": "Supported"
 },
 "url": "https://www.w3.org/TR/payment-request/",
 "webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=174796",
-"keywords": ["web payments", "payment request"],
+"keywords": ["web payments", "payment request", "apple pay"],
 "description": "An API for merchants to request payments from users."
 },
 {






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


[webkit-changes] [230311] trunk/Source/WebCore/PAL

2018-04-05 Thread wilander
Title: [230311] trunk/Source/WebCore/PAL








Revision 230311
Author wilan...@apple.com
Date 2018-04-05 13:02:19 -0700 (Thu, 05 Apr 2018)


Log Message
Add necessary colon to CFNetwork selector
https://bugs.webkit.org/show_bug.cgi?id=184335


Reviewed by Brent Fulgham.

* pal/spi/cf/CFNetworkSPI.h:
(setIgnoreHSTS):

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (230310 => 230311)

--- trunk/Source/WebCore/PAL/ChangeLog	2018-04-05 19:12:01 UTC (rev 230310)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-04-05 20:02:19 UTC (rev 230311)
@@ -1,3 +1,14 @@
+2018-04-05  John Wilander  
+
+Add necessary colon to CFNetwork selector
+https://bugs.webkit.org/show_bug.cgi?id=184335
+
+
+Reviewed by Brent Fulgham.
+
+* pal/spi/cf/CFNetworkSPI.h:
+(setIgnoreHSTS):
+
 2018-04-04  Per Arne Vollan  
 
 The layout test fast/canvas/canvas-blending-global-alpha.html is failing when the WebContent process does not have WindowServer access.


Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (230310 => 230311)

--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-04-05 19:12:01 UTC (rev 230310)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-04-05 20:02:19 UTC (rev 230311)
@@ -346,8 +346,8 @@
 
 static void setIgnoreHSTS(NSMutableURLRequest *request, bool ignoreHSTS)
 {
-if ([request respondsToSelector:@selector(_setIgnoreHSTS)])
-[request performSelector:@selector(_setIgnoreHSTS) withObject:[NSNumber numberWithBool:ignoreHSTS]];
+if ([request respondsToSelector:@selector(_setIgnoreHSTS:)])
+[request performSelector:@selector(_setIgnoreHSTS:) withObject:[NSNumber numberWithBool:ignoreHSTS]];
 }
 
 static bool ignoreHSTS(NSURLRequest *request)






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


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

2018-04-05 Thread commit-queue
Title: [230310] trunk/Source/_javascript_Core








Revision 230310
Author commit-qu...@webkit.org
Date 2018-04-05 12:12:01 -0700 (Thu, 05 Apr 2018)


Log Message
[MIPS] Optimize generated JIT code for branches
https://bugs.webkit.org/show_bug.cgi?id=183130

Patch by Stanislav Ocovaj  on 2018-04-05
Reviewed by Yusuke Suzuki.

The patch https://bugs.webkit.org/show_bug.cgi?id=101328 added two nop instructions to
branchEqual() and branchNotEqual() in order to allow the code generated by branchPtrWithPatch()
to be reverted back to branchPtrWithPatch after replacing it with a 4-instruction jump.
However, this adds a significant overhead for all other types of branches. Since these nop's
protect the code that is generated by branchPtrWithPatch, this function seems like a better
place to add them.

* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::repatchInt32):
(JSC::MIPSAssembler::revertJumpToMove):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchAdd32):
(JSC::MacroAssemblerMIPS::branchMul32):
(JSC::MacroAssemblerMIPS::branchSub32):
(JSC::MacroAssemblerMIPS::branchNeg32):
(JSC::MacroAssemblerMIPS::branchPtrWithPatch):
(JSC::MacroAssemblerMIPS::branchEqual):
(JSC::MacroAssemblerMIPS::branchNotEqual):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/assembler/MIPSAssembler.h
trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (230309 => 230310)

--- trunk/Source/_javascript_Core/ChangeLog	2018-04-05 18:50:26 UTC (rev 230309)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-04-05 19:12:01 UTC (rev 230310)
@@ -1,3 +1,29 @@
+2018-04-05  Stanislav Ocovaj  
+
+[MIPS] Optimize generated JIT code for branches
+https://bugs.webkit.org/show_bug.cgi?id=183130
+
+Reviewed by Yusuke Suzuki.
+
+The patch https://bugs.webkit.org/show_bug.cgi?id=101328 added two nop instructions to
+branchEqual() and branchNotEqual() in order to allow the code generated by branchPtrWithPatch()
+to be reverted back to branchPtrWithPatch after replacing it with a 4-instruction jump.
+However, this adds a significant overhead for all other types of branches. Since these nop's
+protect the code that is generated by branchPtrWithPatch, this function seems like a better
+place to add them.
+
+* assembler/MIPSAssembler.h:
+(JSC::MIPSAssembler::repatchInt32):
+(JSC::MIPSAssembler::revertJumpToMove):
+* assembler/MacroAssemblerMIPS.h:
+(JSC::MacroAssemblerMIPS::branchAdd32):
+(JSC::MacroAssemblerMIPS::branchMul32):
+(JSC::MacroAssemblerMIPS::branchSub32):
+(JSC::MacroAssemblerMIPS::branchNeg32):
+(JSC::MacroAssemblerMIPS::branchPtrWithPatch):
+(JSC::MacroAssemblerMIPS::branchEqual):
+(JSC::MacroAssemblerMIPS::branchNotEqual):
+
 2018-04-05  Yusuke Suzuki  
 
 [WTF] Remove StaticLock


Modified: trunk/Source/_javascript_Core/assembler/MIPSAssembler.h (230309 => 230310)

--- trunk/Source/_javascript_Core/assembler/MIPSAssembler.h	2018-04-05 18:50:26 UTC (rev 230309)
+++ trunk/Source/_javascript_Core/assembler/MIPSAssembler.h	2018-04-05 19:12:01 UTC (rev 230310)
@@ -944,8 +944,7 @@
 insn++;
 ASSERT((*insn & 0xfc00) == 0x3400); // ori
 *insn = (*insn & 0x) | (to & 0x);
-insn--;
-cacheFlush(insn, 2 * sizeof(MIPSWord));
+cacheFlush(from, 2 * sizeof(MIPSWord));
 }
 
 static int32_t readInt32(void* from)
@@ -1018,7 +1017,7 @@
 *insn = 0x;
 codeSize += sizeof(MIPSWord);
 }
-cacheFlush(insn, codeSize);
+cacheFlush(instructionStart, codeSize);
 }
 
 static void replaceWithJump(void* instructionStart, void* to)


Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h (230309 => 230310)

--- trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h	2018-04-05 18:50:26 UTC (rev 230309)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h	2018-04-05 19:12:01 UTC (rev 230310)
@@ -2002,18 +2002,18 @@
 nop
 b   Overflow
 nop
+b   No_overflow
 nop
 nop
 nop
-nop
 No_overflow:
 */
 move(dest, dataTempRegister);
 m_assembler.xorInsn(cmpTempRegister, dataTempRegister, src);
-m_assembler.bltz(cmpTempRegister, 12);
+m_assembler.bltz(cmpTempRegister, 10);
 m_assembler.addu(dest, dataTempRegister, src);
 m_assembler.xorInsn(cmpTempRegister, dest, dataTempRegister);
-m_assembler.bgez(cmpTempRegister, 9);
+m_assembler.bgez(cmpTempRegister, 7);
 m_assembler.nop();
 

[webkit-changes] [230309] branches/safari-605-branch/Source/WebCore

2018-04-05 Thread jmarcell
Title: [230309] branches/safari-605-branch/Source/WebCore








Revision 230309
Author jmarc...@apple.com
Date 2018-04-05 11:50:26 -0700 (Thu, 05 Apr 2018)


Log Message
Cherry-pick r228334. rdar://problem/38712636

Modified Paths

branches/safari-605-branch/Source/WebCore/ChangeLog
branches/safari-605-branch/Source/WebCore/page/cocoa/UserAgent.mm




Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (230308 => 230309)

--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-04-05 18:07:28 UTC (rev 230308)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-04-05 18:50:26 UTC (rev 230309)
@@ -1,5 +1,23 @@
 2018-04-05  Jason Marcell  
 
+Cherry-pick r228334. rdar://problem/38712636
+
+2018-02-09  Brent Fulgham  
+
+[macOS, iOS] Expose OS marketing version in UserAgent
+https://bugs.webkit.org/show_bug.cgi?id=182629
+
+
+Reviewed by Daniel Bates.
+
+Revert back to dynamically reading the operating system marketing version
+rather than using a hard-coded version.
+
+* page/cocoa/UserAgent.mm:
+(WebCore::systemMarketingVersionForUserAgentString):
+
+2018-04-05  Jason Marcell  
+
 Apply patch. rdar://problem/39191858
 
 fix-httponly-cookie


Modified: branches/safari-605-branch/Source/WebCore/page/cocoa/UserAgent.mm (230308 => 230309)

--- branches/safari-605-branch/Source/WebCore/page/cocoa/UserAgent.mm	2018-04-05 18:07:28 UTC (rev 230308)
+++ branches/safari-605-branch/Source/WebCore/page/cocoa/UserAgent.mm	2018-04-05 18:50:26 UTC (rev 230309)
@@ -26,6 +26,8 @@
 #import "config.h"
 #import "UserAgent.h"
 
+#import "SystemVersion.h"
+
 namespace WebCore {
 
 String systemMarketingVersionForUserAgentString()
@@ -33,17 +35,7 @@
 // Use underscores instead of dots because when we first added the Mac OS X version to the user agent string
 // we were concerned about old DHTML libraries interpreting "4." as Netscape 4. That's no longer a concern for us
 // but we're sticking with the underscores for compatibility with the format used by older versions of Safari.
-#if PLATFORM(MAC)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
-return ASCIILiteral("10_13_4");
-#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-return ASCIILiteral("10_12_6");
-#else
-return ASCIILiteral("10_11_6");
-#endif
-#else
-return ASCIILiteral("11_3");
-#endif
+return [systemMarketingVersion() stringByReplacingOccurrencesOfString:@"." withString:@"_"];
 }
 
 String userAgentBundleVersion()






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


[webkit-changes] [230308] trunk/Source/bmalloc

2018-04-05 Thread utatane . tea
Title: [230308] trunk/Source/bmalloc








Revision 230308
Author utatane@gmail.com
Date 2018-04-05 11:07:28 -0700 (Thu, 05 Apr 2018)


Log Message
bmalloc StaticMutex's constructor should be constexpr
https://bugs.webkit.org/show_bug.cgi?id=180600

Reviewed by Mark Lam.

StaticMutex and Mutex can be unified. This patch changes std::atomic_flag in StaticMutex
to std::atomic to add constexpr constructor to StaticMutex. Then, StaticMutex can
be initialized in static storage without calling any static initializers.
And we also rename StaticMutex to Mutex simply.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/AllIsoHeaps.cpp:
(bmalloc::AllIsoHeaps::AllIsoHeaps):
* bmalloc/AllIsoHeaps.h:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::tryAllocate):
(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::refillAllocatorSlowCase):
(bmalloc::Allocator::allocateLarge):
* bmalloc/CryptoRandom.cpp:
(bmalloc::ARC4RandomNumberGenerator::ARC4RandomNumberGenerator):
* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
* bmalloc/Deallocator.h:
(bmalloc::Deallocator::lineCache):
* bmalloc/DebugHeap.cpp:
(bmalloc::DebugHeap::DebugHeap):
* bmalloc/DebugHeap.h:
* bmalloc/Environment.cpp:
(bmalloc::Environment::Environment):
* bmalloc/Environment.h:
* bmalloc/Gigacage.cpp:
(Gigacage::disablePrimitiveGigacage):
(Gigacage::addPrimitiveDisableCallback):
(Gigacage::removePrimitiveDisableCallback):
* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap):
(bmalloc::Heap::freeableMemory):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::deallocateLineCache):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::allocateSmallBumpRangesByMetadata):
(bmalloc::Heap::allocateSmallBumpRangesByObject):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::isLarge):
(bmalloc::Heap::largeSize):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::externalCommit):
(bmalloc::Heap::externalDecommit):
* bmalloc/Heap.h:
(bmalloc::Heap::mutex):
(bmalloc::Heap::allocateSmallBumpRanges):
(bmalloc::Heap::derefSmallLine):
* bmalloc/IsoDeallocator.h:
* bmalloc/IsoHeap.h:
* bmalloc/IsoTLSDeallocatorEntry.h:
* bmalloc/IsoTLSDeallocatorEntryInlines.h:
(bmalloc::IsoTLSDeallocatorEntry::IsoTLSDeallocatorEntry):
* bmalloc/IsoTLSInlines.h:
(bmalloc::IsoTLS::ensureHeap):
* bmalloc/IsoTLSLayout.cpp:
(bmalloc::IsoTLSLayout::IsoTLSLayout):
(bmalloc::IsoTLSLayout::add):
* bmalloc/IsoTLSLayout.h:
* bmalloc/Mutex.cpp: Renamed from Source/bmalloc/bmalloc/StaticMutex.cpp.
(bmalloc::Mutex::lockSlowCase):
* bmalloc/Mutex.h:
(bmalloc::sleep):
(bmalloc::waitUntilFalse):
(bmalloc::Mutex::try_lock):
(bmalloc::Mutex::lock):
(bmalloc::Mutex::unlock):
(bmalloc::Mutex::Mutex): Deleted.
* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/PerProcess.cpp:
(bmalloc::getPerProcessData):
* bmalloc/PerProcess.h:
(bmalloc::PerProcess::mutex):
(bmalloc::PerProcess::getSlowCase):
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::freeableMemory):
* bmalloc/Scavenger.h:
* bmalloc/SmallLine.h:
(bmalloc::SmallLine::refCount):
(bmalloc::SmallLine::ref):
(bmalloc::SmallLine::deref):
* bmalloc/SmallPage.h:
(bmalloc::SmallPage::refCount):
(bmalloc::SmallPage::hasFreeLines const):
(bmalloc::SmallPage::setHasFreeLines):
(bmalloc::SmallPage::ref):
(bmalloc::SmallPage::deref):
* bmalloc/StaticMutex.h: Removed.
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
* bmalloc/VMHeap.h:
* bmalloc/Zone.cpp:
(bmalloc::Zone::Zone):
* bmalloc/Zone.h:
* bmalloc/bmalloc.cpp:
(bmalloc::api::tryLargeZeroedMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::isEnabled):
(bmalloc::api::setScavengerThreadQOSClass):
* bmalloc/bmalloc.h:

Modified Paths

trunk/Source/bmalloc/CMakeLists.txt
trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc/AllIsoHeaps.cpp
trunk/Source/bmalloc/bmalloc/AllIsoHeaps.h
trunk/Source/bmalloc/bmalloc/Allocator.cpp
trunk/Source/bmalloc/bmalloc/CryptoRandom.cpp
trunk/Source/bmalloc/bmalloc/Deallocator.cpp
trunk/Source/bmalloc/bmalloc/Deallocator.h
trunk/Source/bmalloc/bmalloc/DebugHeap.cpp
trunk/Source/bmalloc/bmalloc/DebugHeap.h
trunk/Source/bmalloc/bmalloc/Environment.cpp
trunk/Source/bmalloc/bmalloc/Environment.h
trunk/Source/bmalloc/bmalloc/Gigacage.cpp
trunk/Source/bmalloc/bmalloc/Heap.cpp
trunk/Source/bmalloc/bmalloc/Heap.h
trunk/Source/bmalloc/bmalloc/IsoDeallocator.h
trunk/Source/bmalloc/bmalloc/IsoHeap.h
trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntry.h
trunk/Source/bmalloc/bmalloc/IsoTLSDeallocatorEntryInlines.h
trunk/Source/bmalloc/bmalloc/IsoTLSInlines.h
trunk/Source/bmalloc/bmalloc/IsoTLSLayout.cpp
trunk/Source/bmalloc/bmalloc/IsoTLSLayout.h
trunk/Source/bmalloc/bmalloc/Mutex.h

[webkit-changes] [230307] trunk/Source/WebKit

2018-04-05 Thread youenn
Title: [230307] trunk/Source/WebKit








Revision 230307
Author you...@apple.com
Date 2018-04-05 10:43:35 -0700 (Thu, 05 Apr 2018)


Log Message
WebRTC data channel only applications require capture permissions for direct connections
https://bugs.webkit.org/show_bug.cgi?id=174500


Unreviewed.
Changed the code to suppress: "error: unused variable 'error' [-Werror,-Wunused-variable]"
Added some logging to this error case as a side bonus.


* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
(WebKit::NetworkMDNSRegister::registerMDNSName):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (230306 => 230307)

--- trunk/Source/WebKit/ChangeLog	2018-04-05 17:37:49 UTC (rev 230306)
+++ trunk/Source/WebKit/ChangeLog	2018-04-05 17:43:35 UTC (rev 230307)
@@ -1,3 +1,16 @@
+2018-04-05  Youenn Fablet  
+
+WebRTC data channel only applications require capture permissions for direct connections
+https://bugs.webkit.org/show_bug.cgi?id=174500
+
+
+Unreviewed.
+Changed the code to suppress: "error: unused variable 'error' [-Werror,-Wunused-variable]"
+Added some logging to this error case as a side bonus.
+
+* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
+(WebKit::NetworkMDNSRegister::registerMDNSName):
+
 2018-04-05  Carlos Garcia Campos  
 
 REGRESSION(r229831): Test WebKit2.ProvisionalURLAfterWillSendRequestCallback times out since r229831


Modified: trunk/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp (230306 => 230307)

--- trunk/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp	2018-04-05 17:37:49 UTC (rev 230306)
+++ trunk/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp	2018-04-05 17:43:35 UTC (rev 230307)
@@ -97,11 +97,15 @@
 DNSServiceRef service;
 auto iterator = m_services.find(documentIdentifier);
 if (iterator == m_services.end()) {
-if (auto error = DNSServiceCreateConnection()) {
+auto error = DNSServiceCreateConnection();
+if (error) {
+RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName DNSServiceCreateConnection error %d", error);
 m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::DNSSD) }, 0);
 return;
 }
-if (auto error = DNSServiceSetDispatchQueue(service, dispatch_get_main_queue())) {
+error = DNSServiceSetDispatchQueue(service, dispatch_get_main_queue());
+if (error) {
+RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName DNSServiceCreateConnection error %d", error);
 m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::DNSSD) }, 0);
 return;
 }






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


[webkit-changes] [230306] trunk/JSTests

2018-04-05 Thread ryanhaddad
Title: [230306] trunk/JSTests








Revision 230306
Author ryanhad...@apple.com
Date 2018-04-05 10:37:49 -0700 (Thu, 05 Apr 2018)


Log Message
Fix testcase (missing try/catch).
https://bugs.webkit.org/show_bug.cgi?id=183657

Unreviewed.

* stress/large-unshift-splice.js

Patch by Robin Morisset  on 2018-04-05

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/stress/large-unshift-splice.js




Diff

Modified: trunk/JSTests/ChangeLog (230305 => 230306)

--- trunk/JSTests/ChangeLog	2018-04-05 17:32:08 UTC (rev 230305)
+++ trunk/JSTests/ChangeLog	2018-04-05 17:37:49 UTC (rev 230306)
@@ -1,3 +1,12 @@
+2018-04-05  Robin Morisset  
+
+Fix testcase (missing try/catch).
+https://bugs.webkit.org/show_bug.cgi?id=183657
+
+Unreviewed.
+
+* stress/large-unshift-splice.js
+
 2018-04-04  Filip Pizlo  
 
 REGRESSION(r222563): removed DoubleReal type check causes tons of crashes because CSE has never known how to handle SaneChain


Modified: trunk/JSTests/stress/large-unshift-splice.js (230305 => 230306)

--- trunk/JSTests/stress/large-unshift-splice.js	2018-04-05 17:32:08 UTC (rev 230305)
+++ trunk/JSTests/stress/large-unshift-splice.js	2018-04-05 17:37:49 UTC (rev 230306)
@@ -9,8 +9,10 @@
 return a;
 }
 
-let ARRAY_LENGTH = 0x1000;
-let a = make_contig_arr(ARRAY_LENGTH);
-let b = make_contig_arr(0xff00);
-b.unshift(a.length-0x1, 0);
-Array.prototype.splice.apply(a, b);
+try {
+let ARRAY_LENGTH = 0x1000;
+let a = make_contig_arr(ARRAY_LENGTH);
+let b = make_contig_arr(0xff00);
+b.unshift(a.length-0x1, 0);
+Array.prototype.splice.apply(a, b);
+} catch (e) {}






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


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

2018-04-05 Thread cdumez
Title: [230305] trunk/Source/WebCore








Revision 230305
Author cdu...@apple.com
Date 2018-04-05 10:32:08 -0700 (Thu, 05 Apr 2018)


Log Message
Unreviewed, rolling out r230042.

It is no longer needed now that it is safe to construct a
SecurityOrigin from an on-main thread

Reverted changeset:

"WebSocket::didReceiveMessage() may construct a SecurityOrigin
object on a non-main thread"
https://bugs.webkit.org/show_bug.cgi?id=184068
https://trac.webkit.org/changeset/230042

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/websockets/WebSocket.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (230304 => 230305)

--- trunk/Source/WebCore/ChangeLog	2018-04-05 17:22:32 UTC (rev 230304)
+++ trunk/Source/WebCore/ChangeLog	2018-04-05 17:32:08 UTC (rev 230305)
@@ -1,3 +1,17 @@
+2018-04-05  Chris Dumez  
+
+Unreviewed, rolling out r230042.
+
+It is no longer needed now that it is safe to construct a
+SecurityOrigin from an on-main thread
+
+Reverted changeset:
+
+"WebSocket::didReceiveMessage() may construct a SecurityOrigin
+object on a non-main thread"
+https://bugs.webkit.org/show_bug.cgi?id=184068
+https://trac.webkit.org/changeset/230042
+
 2018-04-05  Yusuke Suzuki  
 
 [WTF] Remove StaticLock


Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.cpp (230304 => 230305)

--- trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2018-04-05 17:22:32 UTC (rev 230304)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.cpp	2018-04-05 17:32:08 UTC (rev 230305)
@@ -572,7 +572,7 @@
 if (m_state != OPEN)
 return;
 ASSERT(scriptExecutionContext());
-dispatchEvent(MessageEvent::create(msg, SecurityOriginData::fromURL(m_url).toString()));
+dispatchEvent(MessageEvent::create(msg, SecurityOrigin::create(m_url)->toString()));
 }
 
 void WebSocket::didReceiveBinaryData(Vector&& binaryData)






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


[webkit-changes] [230304] trunk/LayoutTests

2018-04-05 Thread ryanhaddad
Title: [230304] trunk/LayoutTests








Revision 230304
Author ryanhad...@apple.com
Date 2018-04-05 10:22:32 -0700 (Thu, 05 Apr 2018)


Log Message
Rebaseline tests for High Sierra.

Unreviewed test gardening.

* platform/mac-sierra/fast/forms/input-table-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/input-table-expected.txt.
* platform/mac-sierra/tables/mozilla/bugs/bug30692-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt.
* platform/mac/fast/forms/input-table-expected.txt:
* platform/mac/tables/mozilla/bugs/bug30692-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/fast/forms/input-table-expected.txt
trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt


Added Paths

trunk/LayoutTests/platform/mac-sierra/fast/forms/input-table-expected.txt
trunk/LayoutTests/platform/mac-sierra/tables/mozilla/bugs/bug30692-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (230303 => 230304)

--- trunk/LayoutTests/ChangeLog	2018-04-05 17:22:21 UTC (rev 230303)
+++ trunk/LayoutTests/ChangeLog	2018-04-05 17:22:32 UTC (rev 230304)
@@ -1,3 +1,14 @@
+2018-03-21  Ryan Haddad  
+
+Rebaseline tests for High Sierra.
+
+Unreviewed test gardening.
+
+* platform/mac-sierra/fast/forms/input-table-expected.txt: Copied from LayoutTests/platform/mac/fast/forms/input-table-expected.txt.
+* platform/mac-sierra/tables/mozilla/bugs/bug30692-expected.txt: Copied from LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt.
+* platform/mac/fast/forms/input-table-expected.txt:
+* platform/mac/tables/mozilla/bugs/bug30692-expected.txt:
+
 2018-04-04  Ryan Haddad  
 
 Update TestExpectations for http/tests/media/video-buffered-range-contains-currentTime.html.


Modified: trunk/LayoutTests/platform/mac/fast/forms/input-table-expected.txt (230303 => 230304)

--- trunk/LayoutTests/platform/mac/fast/forms/input-table-expected.txt	2018-04-05 17:22:21 UTC (rev 230303)
+++ trunk/LayoutTests/platform/mac/fast/forms/input-table-expected.txt	2018-04-05 17:22:32 UTC (rev 230304)
@@ -86,8 +86,8 @@
   RenderBlock {DIV} at (3,3) size 24x13
 layer at (20,432) size 194x13
   RenderBlock {DIV} at (3,3) size 194x13
-RenderText {#text} at (0,0) size 60x13
-  text run at (0,0) width 60: "width 100%"
+RenderText {#text} at (0,0) size 61x13
+  text run at (0,0) width 61: "width 100%"
 layer at (22,551) size 64x13
   RenderBlock {DIV} at (3,3) size 64x13
 RenderText {#text} at (0,0) size 51x13


Modified: trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt (230303 => 230304)

--- trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt	2018-04-05 17:22:21 UTC (rev 230303)
+++ trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt	2018-04-05 17:22:32 UTC (rev 230304)
@@ -47,8 +47,8 @@
 layer at (11,96) size 622x69 clip at (12,97) size 620x67
   RenderTextControl {TEXTAREA} at (1,1) size 623x70 [bgcolor=#FF] [border: (1px solid #00)]
 RenderBlock {DIV} at (3,3) size 617x13
-  RenderText {#text} at (0,0) size 222x13
-text run at (0,0) width 222: "BUG: the height of the textarea is not 80%"
+  RenderText {#text} at (0,0) size 223x13
+text run at (0,0) width 223: "BUG: the height of the textarea is not 80%"
 layer at (11,208) size 622x80 clip at (12,209) size 620x78
   RenderTextControl {TEXTAREA} at (1,1) size 623x80 [bgcolor=#FF] [border: (1px solid #00)]
 RenderBlock {DIV} at (3,3) size 617x13


Copied: trunk/LayoutTests/platform/mac-sierra/fast/forms/input-table-expected.txt (from rev 230300, trunk/LayoutTests/platform/mac/fast/forms/input-table-expected.txt) (0 => 230304)

--- trunk/LayoutTests/platform/mac-sierra/fast/forms/input-table-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/mac-sierra/fast/forms/input-table-expected.txt	2018-04-05 17:22:32 UTC (rev 230304)
@@ -0,0 +1,98 @@
+layer at (0,0) size 785x705
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x705
+  RenderBlock {HTML} at (0,0) size 785x705
+RenderBody {BODY} at (8,8) size 769x689
+  RenderBlock (anonymous) at (0,0) size 769x18
+RenderText {#text} at (0,0) size 252x18
+  text run at (0,0) width 252: "This tests minMaxWidth for text fields."
+  RenderBlock {P} at (0,34) size 769x18
+RenderText {#text} at (0,0) size 70x18
+  text run at (0,0) width 70: "Test case 1"
+  RenderTable {TABLE} at (0,68) size 118x41 [border: (3px solid #FF)]
+RenderTableSection {TBODY} at (3,3) size 112x35
+  RenderTableRow {TR} at (0,2) size 112x31
+RenderTableCell {TD} at (2,2) size 108x31 [border: (3px solid #FF)] [r=0 c=0 rs=1 cs=1]
+  RenderTextControl {INPUT} at (4,6) size 100x19 [bgcolor=#FF] [border: (2px inset #00)]

[webkit-changes] [230303] trunk

2018-04-05 Thread utatane . tea
Title: [230303] trunk








Revision 230303
Author utatane@gmail.com
Date 2018-04-05 10:22:21 -0700 (Thu, 05 Apr 2018)


Log Message
[WTF] Remove StaticLock
https://bugs.webkit.org/show_bug.cgi?id=184332

Reviewed by Mark Lam.

Source/_javascript_Core:

* API/JSValue.mm:
(handerForStructTag):
* API/JSVirtualMachine.mm:
(+[JSVMWrapperCache addWrapper:forJSContextGroupRef:]):
(+[JSVMWrapperCache wrapperForJSContextGroupRef:]):
* API/glib/JSCVirtualMachine.cpp:
(addWrapper):
(removeWrapper):
* assembler/testmasm.cpp:
* b3/air/testair.cpp:
* b3/testb3.cpp:
* bytecode/SuperSampler.cpp:
* dfg/DFGCommon.cpp:
* dfg/DFGCommonData.cpp:
* dynbench.cpp:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::tryCopyOtherThreadStacks):
* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteTargetHandleRunSourceGlobal):
(Inspector::RemoteTargetQueueTaskOnGlobalQueue):
* interpreter/CLoopStack.cpp:
* parser/SourceProvider.cpp:
* profiler/ProfilerDatabase.cpp:
* profiler/ProfilerUID.cpp:
(JSC::Profiler::UID::create):
* runtime/IntlObject.cpp:
(JSC::numberingSystemsForLocale):
* runtime/JSLock.cpp:
* runtime/JSLock.h:
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::registerForReportAtExit):
* runtime/VM.cpp:
* wasm/WasmFaultSignalHandler.cpp:

Source/WebCore:

No behavior change.

* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::performOpenAndVerify):
(WebCore::Database::closeDatabase):
(WebCore::Database::getCachedVersion const):
(WebCore::Database::setCachedVersion):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::openDatabaseMutex):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::allActiveWebSocketsMutex):
* Modules/websockets/WebSocket.h:
* bridge/objc/WebScriptObject.mm:
* crypto/CryptoAlgorithmRegistry.cpp:
(WebCore::CryptoAlgorithmRegistry::identifier):
(WebCore::CryptoAlgorithmRegistry::name):
(WebCore::CryptoAlgorithmRegistry::create):
(WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
* dom/Node.cpp:
* platform/URL.cpp:
* platform/graphics/FontCache.cpp:
* platform/graphics/MediaPlayer.cpp:
* platform/ios/QuickLook.mm:
* platform/ios/WebSQLiteDatabaseTrackerClient.mm:
* platform/ios/wak/WebCoreThread.mm:
* platform/ios/wak/WebCoreThreadRun.cpp:
* platform/network/cf/LoaderRunLoopCF.cpp:
(WebCore::loaderRunLoop):
* platform/network/curl/CurlContext.cpp:
(WebCore::CurlShareHandle::mutexFor):
* platform/network/curl/CurlContext.h:
* platform/sql/SQLiteDatabaseTracker.cpp:
(WebCore::SQLiteDatabaseTracker::incrementTransactionInProgressCount):
(WebCore::SQLiteDatabaseTracker::decrementTransactionInProgressCount):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::buildBaseTextCodecMaps):
(WebCore::newTextCodec):
(WebCore::atomicCanonicalTextEncodingName):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThreadCount):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::~WorkerThread):
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):

Source/WebKitLegacy/ios:

* WebCoreSupport/WebFixedPositionContent.mm:

Source/WebKitLegacy/mac:

* DOM/DOMInternal.mm:
(getDOMWrapper):
(addDOMWrapper):
(removeDOMWrapper):

Source/WebKitLegacy/win:

* WebKitQuartzCoreAdditions/CAView.cpp:
(WKQCA::CAView::releaseAllD3DResources):
* WebLocalizableStrings.cpp:

Source/WTF:

Now, WTF::StaticLock is `using StaticLock = Lock`. Lock just works
in either static storage and dynamic storage. Remove StaticLock and
always use Lock.

We also remove StaticWordLock and StaticReadWriteLock. And we add
WTF::RecursiveLock, which is RecursiveLockAdapter.

* wtf/HashTable.cpp:
(WTF::HashTableStats::recordCollisionAtCount):
(WTF::HashTableStats::dumpStats):
* wtf/Language.cpp:
(WTF::userPreferredLanguages):
* wtf/Lock.h:
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
* wtf/ParkingLot.cpp:
* wtf/ReadWriteLock.h:
* wtf/RecursiveLockAdapter.h:
* wtf/StackStats.cpp:
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
* wtf/StackStats.h:
* wtf/ThreadMessage.cpp:
(WTF::sendMessageScoped):
* wtf/ThreadingPthreads.cpp:
* wtf/ThreadingWin.cpp:
* wtf/WordLock.h:
* wtf/cf/LanguageCF.cpp:
(WTF::languagePreferencesDidChange):
(WTF::platformUserPreferredLanguages):
* wtf/dtoa.cpp:
* wtf/text/AtomicStringImpl.cpp:
* wtf/text/StringView.cpp:
(WTF::StringView::invalidate):
(WTF::StringView::adoptUnderlyingString):
(WTF::StringView::setUnderlyingString):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::Collator):
(WTF::Collator::~Collator):
* wtf/win/LanguageWin.cpp:
(WTF::platformLanguage):

Tools:

* DumpRenderTree/_javascript_Threading.cpp:

Modified Paths

trunk/Source/_javascript_Core/API/JSValue.mm
trunk/Source/_javascript_Core/API/JSVirtualMachine.mm

[webkit-changes] [230302] branches/safari-605-branch

2018-04-05 Thread jmarcell
Title: [230302] branches/safari-605-branch








Revision 230302
Author jmarc...@apple.com
Date 2018-04-05 10:05:12 -0700 (Thu, 05 Apr 2018)


Log Message
Cherry-pick r230287. rdar://problem/39208588

REGRESSION(r222563): removed DoubleReal type check causes tons of crashes because CSE has never known how to handle SaneChain
https://bugs.webkit.org/show_bug.cgi?id=184319

Reviewed by Saam Barati.

JSTests:

* stress/array-push-nan-to-double-array-cse-sane-and-insane-chain.js: Added.
(foo):
(bar):
* stress/array-push-nan-to-double-array.js: Added.
(foo):
(bar):

Source/_javascript_Core:

In r222581, we replaced type checks about DoubleReal in ArrayPush in the DFG/FTL backends with
assertions. That's correct because FixupPhase was emitting those checks as Check(DoubleRealRep:) before
the ArrayPush.

But this revealed a longstanding CSE bug: CSE will happily match a SaneChain GetByVal with a InBounds
GetByVal. SaneChain can return NaN while InBounds cannot. This means that if we first use AI to
eliminate the Check(DoubleRealRep:) based on the input being a GetByVal(InBounds) but then replace that
with a GetByVal(SaneChain), then we will hit the assertion.

This teaches CSE to not replace GetByVal(InBounds) with GetByVal(SaneChain) and vice versa. That gets
tricky because PutByVal can match either. So, we use the fact that it's legal for a store to def() more
than once: PutByVal now defs() a HeapLocation for InBounds and a HeapLocation for SaneChain.

* dfg/DFGCSEPhase.cpp:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArrayPush):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

branches/safari-605-branch/JSTests/ChangeLog
branches/safari-605-branch/Source/_javascript_Core/ChangeLog
branches/safari-605-branch/Source/_javascript_Core/dfg/DFGCSEPhase.cpp
branches/safari-605-branch/Source/_javascript_Core/dfg/DFGClobberize.h
branches/safari-605-branch/Source/_javascript_Core/dfg/DFGHeapLocation.cpp
branches/safari-605-branch/Source/_javascript_Core/dfg/DFGHeapLocation.h
branches/safari-605-branch/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
branches/safari-605-branch/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp


Added Paths

branches/safari-605-branch/JSTests/stress/array-push-nan-to-double-array-cse-sane-and-insane-chain.js
branches/safari-605-branch/JSTests/stress/array-push-nan-to-double-array.js




Diff

Modified: branches/safari-605-branch/JSTests/ChangeLog (230301 => 230302)

--- branches/safari-605-branch/JSTests/ChangeLog	2018-04-05 17:05:08 UTC (rev 230301)
+++ branches/safari-605-branch/JSTests/ChangeLog	2018-04-05 17:05:12 UTC (rev 230302)
@@ -1,3 +1,63 @@
+2018-04-05  Jason Marcell  
+
+Cherry-pick r230287. rdar://problem/39208588
+
+REGRESSION(r222563): removed DoubleReal type check causes tons of crashes because CSE has never known how to handle SaneChain
+https://bugs.webkit.org/show_bug.cgi?id=184319
+
+Reviewed by Saam Barati.
+
+JSTests:
+
+* stress/array-push-nan-to-double-array-cse-sane-and-insane-chain.js: Added.
+(foo):
+(bar):
+* stress/array-push-nan-to-double-array.js: Added.
+(foo):
+(bar):
+
+Source/_javascript_Core:
+
+In r222581, we replaced type checks about DoubleReal in ArrayPush in the DFG/FTL backends with
+assertions. That's correct because FixupPhase was emitting those checks as Check(DoubleRealRep:) before
+the ArrayPush.
+
+But this revealed a longstanding CSE bug: CSE will happily match a SaneChain GetByVal with a InBounds
+GetByVal. SaneChain can return NaN while InBounds cannot. This means that if we first use AI to
+eliminate the Check(DoubleRealRep:) based on the input being a GetByVal(InBounds) but then replace that
+with a GetByVal(SaneChain), then we will hit the assertion.
+
+This teaches CSE to not replace GetByVal(InBounds) with GetByVal(SaneChain) and vice versa. That gets
+tricky because PutByVal can match either. So, we use the fact that it's legal for a store to def() more
+than once: PutByVal now defs() a HeapLocation for InBounds and a HeapLocation for SaneChain.
+
+* dfg/DFGCSEPhase.cpp:
+* dfg/DFGClobberize.h:
+(JSC::DFG::clobberize):
+* dfg/DFGHeapLocation.cpp:
+(WTF::printInternal):
+* dfg/DFGHeapLocation.h:
+* dfg/DFGSpeculativeJIT.cpp:
+(JSC::DFG::SpeculativeJIT::compileArrayPush):
+
+
+
+git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+2018-04-04  Filip Pizlo  
+
+REGRESSION(r222563): removed DoubleReal type check causes tons of crashes 

[webkit-changes] [230301] branches/safari-605-branch

2018-04-05 Thread jmarcell
Title: [230301] branches/safari-605-branch








Revision 230301
Author jmarc...@apple.com
Date 2018-04-05 10:05:08 -0700 (Thu, 05 Apr 2018)


Log Message
Apply patch. rdar://problem/39191858

fix-httponly-cookie

Modified Paths

branches/safari-605-branch/LayoutTests/ChangeLog
branches/safari-605-branch/Source/WebCore/ChangeLog
branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
branches/safari-605-branch/Source/WebCore/loader/appcache/ApplicationCacheGroup.h


Added Paths

branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt
branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only.php
branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/manifest-protected-script.php
branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope1/
branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.php
branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope2/
branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope2/cookie-protected-script.php




Diff

Modified: branches/safari-605-branch/LayoutTests/ChangeLog (230300 => 230301)

--- branches/safari-605-branch/LayoutTests/ChangeLog	2018-04-05 15:50:26 UTC (rev 230300)
+++ branches/safari-605-branch/LayoutTests/ChangeLog	2018-04-05 17:05:08 UTC (rev 230301)
@@ -1,3 +1,19 @@
+2018-04-05  Jason Marcell  
+
+Apply patch. rdar://problem/39191858
+
+fix-httponly-cookie
+
+2018-04-04  Youenn Fablet  
+
+iOS 11.4 Beta WKWebView does not send cookies with HttpOnly flag set, for cache manifest request and its resources
+
+
+Reviewed by Brady Eidson.
+
+* http/tests/appcache/document-cookie-http-only-expected.txt: Added.
+* http/tests/appcache/document-cookie-http-only.php: Added.
+
 2018-04-03  Jason Marcell  
 
 Cherry-pick r230172. rdar://problem/39155049


Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt (0 => 230301)

--- branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt	(rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only-expected.txt	2018-04-05 17:05:08 UTC (rev 230301)
@@ -0,0 +1,5 @@
+CONSOLE MESSAGE: line 1: ApplicationCache is deprecated. Please use ServiceWorkers instead.
+This tests that HttpOnly cookies set on the main document are used when accessing resources in the manifest.
+This also tests that cookies used by appcache resource loading are scoped properly.
+PASSED: Cookie should not be visible from _javascript_.
+PASSED: Script Cookie is set to 'script'


Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only.php (0 => 230301)

--- branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only.php	(rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/document-cookie-http-only.php	2018-04-05 17:05:08 UTC (rev 230301)
@@ -0,0 +1,34 @@
+
+
+
+This tests that HttpOnly cookies set on the main document are used when accessing resources in the manifest.
+This also tests that cookies used by appcache resource loading are scoped properly.
+Not checked cookie yet
+Not run yet
+
+if (window.testRunner) {
+testRunner.dumpAsText()
+testRunner.waitUntilDone();
+}
+
+var cookieTest = document.cookie === "" ? "PASSED" : "FAILED";
+log.innerHTML = cookieTest + ": Cookie should not be visible from _javascript_.";
+
+function dynamicScriptLoad() {
+var script = document.createElement("script");
+script.type = "text/_javascript_";
+script.src = ""
+document.getElementsByTagName("head")[0].appendChild(script);
+}
+
+function cached()
+{
+setTimeout("dynamicScriptLoad();", 0);
+}
+
+applicationCache.addEventListener('cached', cached, false);
+
+


Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/manifest-protected-script.php (0 => 230301)

--- branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/manifest-protected-script.php	(rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/manifest-protected-script.php	2018-04-05 17:05:08 UTC (rev 230301)
@@ -0,0 +1,12 @@
+


Added: branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.php (0 => 230301)

--- branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.php	(rev 0)
+++ branches/safari-605-branch/LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.php	2018-04-05 17:05:08 UTC (rev 230301)
@@ -0,0 +1,13 @@
+


Added: 

[webkit-changes] [230300] trunk/Tools

2018-04-05 Thread zalan
Title: [230300] trunk/Tools








Revision 230300
Author za...@apple.com
Date 2018-04-05 08:50:26 -0700 (Thu, 05 Apr 2018)


Log Message
[LayoutReloaded] Find the correct left edge for a line when floating boxes are in parent formatting context.
https://bugs.webkit.org/show_bug.cgi?id=184330

Reviewed by Antti Koivisto.

In inline formatting context, the floating boxes can come from the parent (block) formatting context. Let's
take them into account when computing the line edges.

* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.left):
(FloatingContext.prototype.right):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._createNewLine):
(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
(InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
(InlineFormattingContext.prototype._mapFloatingPosition): Deleted.
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/multiple-left-floats-on-line-from-parent-formatting-context.html: Added.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/LayoutReloaded/FormattingContext/FloatingContext.js
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js
trunk/Tools/LayoutReloaded/test/index.html


Added Paths

trunk/Tools/LayoutReloaded/test/multiple-left-floats-on-line-from-parent-formatting-context.html




Diff

Modified: trunk/Tools/ChangeLog (230299 => 230300)

--- trunk/Tools/ChangeLog	2018-04-05 15:21:15 UTC (rev 230299)
+++ trunk/Tools/ChangeLog	2018-04-05 15:50:26 UTC (rev 230300)
@@ -1,5 +1,26 @@
 2018-04-05  Zalan Bujtas  
 
+[LayoutReloaded] Find the correct left edge for a line when floating boxes are in parent formatting context.
+https://bugs.webkit.org/show_bug.cgi?id=184330
+
+Reviewed by Antti Koivisto.
+
+In inline formatting context, the floating boxes can come from the parent (block) formatting context. Let's
+take them into account when computing the line edges.
+
+* LayoutReloaded/FormattingContext/FloatingContext.js:
+(FloatingContext.prototype.left):
+(FloatingContext.prototype.right):
+* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
+(InlineFormattingContext.prototype._createNewLine):
+(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
+(InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
+(InlineFormattingContext.prototype._mapFloatingPosition): Deleted.
+* LayoutReloaded/test/index.html:
+* LayoutReloaded/test/multiple-left-floats-on-line-from-parent-formatting-context.html: Added.
+
+2018-04-05  Zalan Bujtas  
+
 [LayoutReloaded] Collect floating boxes in inline formatting context and layout them first.
 https://bugs.webkit.org/show_bug.cgi?id=184329
 


Modified: trunk/Tools/LayoutReloaded/FormattingContext/FloatingContext.js (230299 => 230300)

--- trunk/Tools/LayoutReloaded/FormattingContext/FloatingContext.js	2018-04-05 15:21:15 UTC (rev 230299)
+++ trunk/Tools/LayoutReloaded/FormattingContext/FloatingContext.js	2018-04-05 15:50:26 UTC (rev 230300)
@@ -46,18 +46,18 @@
 
 left(verticalPosition) {
 // Relative to the formatting context's root.
-let leftFloatings = this._leftFloatings();
-if (!leftFloatings.length)
+let leftFloating = this._findFloatingAtVerticalPosition(verticalPosition, this._leftFloatings());
+if (!leftFloating)
 return Number.NaN;
-return this._mapDisplayMarginBoxToFormattingRoot(leftFloatings[leftFloatings.length - 1]).right();
+return this._mapDisplayMarginBoxToFormattingRoot(leftFloating).right();
 }
 
 right(verticalPosition) {
 // Relative to the formatting context's root.
-let rightFloatings = this._rightFloatings();
-if (!rightFloatings.length)
+let rightFloating = this._findFloatingAtVerticalPosition(verticalPosition, this._rightFloatings());
+if (!rightFloating)
 return Number.NaN;
-return this._mapDisplayMarginBoxToFormattingRoot(rightFloatings[rightFloatings.length - 1]).left();
+return this._mapDisplayMarginBoxToFormattingRoot(rightFloating).left();
 }
 
 bottom() {


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js (230299 => 230300)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-05 15:21:15 UTC (rev 230299)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-05 15:50:26 UTC (rev 230300)
@@ -119,9 +119,14 @@
 
 _createNewLine() {
 let lineRect = this.displayBox(this.formattingRoot()).contentBox();
-let floatingLeft = this._mapFloatingPosition(this.floatingContext().left());
-let 

[webkit-changes] [230299] trunk/Tools

2018-04-05 Thread zalan
Title: [230299] trunk/Tools








Revision 230299
Author za...@apple.com
Date 2018-04-05 08:21:15 -0700 (Thu, 05 Apr 2018)


Log Message
[LayoutReloaded] Collect floating boxes in inline formatting context and layout them first.
https://bugs.webkit.org/show_bug.cgi?id=184329

Reviewed by Antti Koivisto.

Let's do this for now. There might be some cases where this violates layout.

* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._outOfFlowDescendants):
(FormattingContext):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleFloatingBoxes):
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._floatingBoxes):
(InlineFormattingContext):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/multiple-left-floats-on-line-simple.html: Added.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/LayoutReloaded/FormattingContext/FormattingContext.js
trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js
trunk/Tools/LayoutReloaded/test/index.html


Added Paths

trunk/Tools/LayoutReloaded/test/multiple-left-floats-on-line-simple.html




Diff

Modified: trunk/Tools/ChangeLog (230298 => 230299)

--- trunk/Tools/ChangeLog	2018-04-05 09:01:26 UTC (rev 230298)
+++ trunk/Tools/ChangeLog	2018-04-05 15:21:15 UTC (rev 230299)
@@ -1,3 +1,24 @@
+2018-04-05  Zalan Bujtas  
+
+[LayoutReloaded] Collect floating boxes in inline formatting context and layout them first.
+https://bugs.webkit.org/show_bug.cgi?id=184329
+
+Reviewed by Antti Koivisto.
+
+Let's do this for now. There might be some cases where this violates layout.
+
+* LayoutReloaded/FormattingContext/FormattingContext.js:
+(FormattingContext.prototype._outOfFlowDescendants):
+(FormattingContext):
+* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
+(InlineFormattingContext.prototype.layout):
+(InlineFormattingContext.prototype._handleFloatingBoxes):
+(InlineFormattingContext.prototype._handleFloatingBox):
+(InlineFormattingContext.prototype._floatingBoxes):
+(InlineFormattingContext):
+* LayoutReloaded/test/index.html:
+* LayoutReloaded/test/multiple-left-floats-on-line-simple.html: Added.
+
 2018-04-04  Youenn Fablet  
 
 WebRTC data channel only applications require capture permissions for direct connections


Modified: trunk/Tools/LayoutReloaded/FormattingContext/FormattingContext.js (230298 => 230299)

--- trunk/Tools/LayoutReloaded/FormattingContext/FormattingContext.js	2018-04-05 09:01:26 UTC (rev 230298)
+++ trunk/Tools/LayoutReloaded/FormattingContext/FormattingContext.js	2018-04-05 15:21:15 UTC (rev 230299)
@@ -148,5 +148,4 @@
 }
 return outOfFlowBoxes;
 }
-
 }


Modified: trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js (230298 => 230299)

--- trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-05 09:01:26 UTC (rev 230298)
+++ trunk/Tools/LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js	2018-04-05 15:21:15 UTC (rev 230299)
@@ -37,7 +37,10 @@
 // This is a post-order tree traversal layout.
 // The root container layout is done in the formatting context it lives in, not that one it creates, so let's start with the first child.
 this.m_line = this._createNewLine();
-this._addToLayoutQueue(this.formattingRoot().firstChild());
+// Collect floating boxes and layout them first.
+this._handleFloatingBoxes();
+//
+this._addToLayoutQueue(this.formattingRoot().firstInFlowChild());
 while (this._descendantNeedsLayout()) {
 // Travers down on the descendants until we find a leaf node.
 while (true) {
@@ -48,18 +51,16 @@
 }
 if (!layoutBox.isContainer() || !layoutBox.hasChild())
 break;
-this._addToLayoutQueue(layoutBox.firstChild());
+this._addToLayoutQueue(layoutBox.firstInFlowChild());
 }
 while (this._descendantNeedsLayout()) {
 let layoutBox = this._nextInLayoutQueue();
 if (layoutBox instanceof Layout.InlineBox)
 this._handleInlineBox(layoutBox);
-else if (layoutBox.isFloatingPositioned())
-this._handleFloatingBox(layoutBox);
 // We are done with laying out this box.
 this._removeFromLayoutQueue(layoutBox);
-if (layoutBox.nextSibling()) {
-this._addToLayoutQueue(layoutBox.nextSibling());
+if (layoutBox.nextInFlowSibling()) {
+

[webkit-changes] [230298] trunk/Source/WebKit

2018-04-05 Thread carlosgc
Title: [230298] trunk/Source/WebKit








Revision 230298
Author carlo...@webkit.org
Date 2018-04-05 02:01:26 -0700 (Thu, 05 Apr 2018)


Log Message
REGRESSION(r229831): Test WebKit2.ProvisionalURLAfterWillSendRequestCallback times out since r229831
https://bugs.webkit.org/show_bug.cgi?id=184293

Reviewed by Alex Christensen.

The problem is that after willSendRequest callback changes the request, the load is cancelled while
transitioning to committed state. This happens because the load is not waiting for the response policy check, so
it continues and when transitioning to committed, FrameLoader::closeURL() invalidates the current policy check
that causes a load failure. The new request returned by the API doesn't have any requester, so it's no longer
considered a main resource load. In the network process the resource load task doesn't wait for the response
policy and continues the load, sending the data to the web process. Once the first data is received, the load
transitions to commit, but the response policy check is still ongoing. This can only happen when using the C API
(I don't know about the Cocoa API), but not with the GLib API because it doesn't allow to create a new request,
only to modify the passed in one. With the C API we loss other internal things of the request like the priority,
but I guess the most important one is the requester.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (230297 => 230298)

--- trunk/Source/WebKit/ChangeLog	2018-04-05 08:00:49 UTC (rev 230297)
+++ trunk/Source/WebKit/ChangeLog	2018-04-05 09:01:26 UTC (rev 230298)
@@ -1,3 +1,24 @@
+2018-04-05  Carlos Garcia Campos  
+
+REGRESSION(r229831): Test WebKit2.ProvisionalURLAfterWillSendRequestCallback times out since r229831
+https://bugs.webkit.org/show_bug.cgi?id=184293
+
+Reviewed by Alex Christensen.
+
+The problem is that after willSendRequest callback changes the request, the load is cancelled while
+transitioning to committed state. This happens because the load is not waiting for the response policy check, so
+it continues and when transitioning to committed, FrameLoader::closeURL() invalidates the current policy check
+that causes a load failure. The new request returned by the API doesn't have any requester, so it's no longer
+considered a main resource load. In the network process the resource load task doesn't wait for the response
+policy and continues the load, sending the data to the web process. Once the first data is received, the load
+transitions to commit, but the response policy check is still ongoing. This can only happen when using the C API
+(I don't know about the Cocoa API), but not with the GLib API because it doesn't allow to create a new request,
+only to modify the passed in one. With the C API we loss other internal things of the request like the priority,
+but I guess the most important one is the requester.
+
+* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+(WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
+
 2018-04-04  Ryan Haddad  
 
 Unreviewed, rolling out r230283.


Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (230297 => 230298)

--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2018-04-05 08:00:49 UTC (rev 230297)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2018-04-05 09:01:26 UTC (rev 230298)
@@ -209,7 +209,12 @@
 if (!webPage)
 return;
 
+// The API can return a completely new request. We should ensure that at least the requester
+// is kept, so that if this is a main resource load it's still considered as such.
+auto requester = request.requester();
 webPage->injectedBundleResourceLoadClient().willSendRequestForFrame(*webPage, *m_frame, identifier, request, redirectResponse);
+if (!request.isNull())
+request.setRequester(requester);
 }
 
 bool WebFrameLoaderClient::shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier)






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


[webkit-changes] [230297] trunk/Source/ThirdParty/libwebrtc

2018-04-05 Thread commit-queue
Title: [230297] trunk/Source/ThirdParty/libwebrtc








Revision 230297
Author commit-qu...@webkit.org
Date 2018-04-05 01:00:49 -0700 (Thu, 05 Apr 2018)


Log Message
[GTK] Add CMake package search for vpx and libevent libraries
https://bugs.webkit.org/show_bug.cgi?id=184257

Patch by Alejandro G. Castro  on 2018-04-05
Reviewed by Michael Catanzaro.

Add new cmake search files for libevent, vpx and alsa-lib, this
makes a cleaner detection of the libraries.

* CMakeLists.txt: Use the new cmake find files to detect the
package and add a better error message when the library is not
there.
* Source/cmake/FindAlsaLib.cmake: Added.
* Source/cmake/FindLibEvent.cmake: Added.
* Source/cmake/FindVpx.cmake: Added.

Modified Paths

trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt
trunk/Source/ThirdParty/libwebrtc/ChangeLog


Added Paths

trunk/Source/ThirdParty/libwebrtc/cmake/
trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake
trunk/Source/ThirdParty/libwebrtc/cmake/FindLibEvent.cmake
trunk/Source/ThirdParty/libwebrtc/cmake/FindVpx.cmake




Diff

Modified: trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt (230296 => 230297)

--- trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt	2018-04-05 05:00:46 UTC (rev 230296)
+++ trunk/Source/ThirdParty/libwebrtc/CMakeLists.txt	2018-04-05 08:00:49 UTC (rev 230297)
@@ -1,7 +1,21 @@
 
-find_library(VPX_LIBRARY vpx)
-find_library(EVENT_LIBRARY event)
+set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
+find_package(Vpx 1.7.0)
+if (NOT LIBVPX_FOUND)
+message(FATAL_ERROR "libvpx is needed for USE_LIBWEBRTC.")
+endif ()
+
+find_package(LibEvent)
+if (NOT LIBEVENT_FOUND)
+message(FATAL_ERROR "libevent is needed for USE_LIBWEBRTC.")
+endif ()
+
+find_package(AlsaLib)
+if (NOT ALSALIB_FOUND)
+message(FATAL_ERROR "alsa-lib is needed for USE_LIBWEBRTC.")
+endif ()
+
 set(webrtc_SOURCES
 Source/third_party/boringssl/err_data.c
 Source/third_party/boringssl/src/crypto/asn1/a_bitstr.c


Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (230296 => 230297)

--- trunk/Source/ThirdParty/libwebrtc/ChangeLog	2018-04-05 05:00:46 UTC (rev 230296)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog	2018-04-05 08:00:49 UTC (rev 230297)
@@ -1,3 +1,20 @@
+2018-04-05  Alejandro G. Castro  
+
+[GTK] Add CMake package search for vpx and libevent libraries
+https://bugs.webkit.org/show_bug.cgi?id=184257
+
+Reviewed by Michael Catanzaro.
+
+Add new cmake search files for libevent, vpx and alsa-lib, this
+makes a cleaner detection of the libraries.
+
+* CMakeLists.txt: Use the new cmake find files to detect the
+package and add a better error message when the library is not
+there.
+* Source/cmake/FindAlsaLib.cmake: Added.
+* Source/cmake/FindLibEvent.cmake: Added.
+* Source/cmake/FindVpx.cmake: Added.
+
 2018-04-03  Youenn Fablet  
 
 RealtimeOutgoingVideoSourceMac should pass a ObjCFrameBuffer buffer


Added: trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake (0 => 230297)

--- trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake	(rev 0)
+++ trunk/Source/ThirdParty/libwebrtc/cmake/FindAlsaLib.cmake	2018-04-05 08:00:49 UTC (rev 230297)
@@ -0,0 +1,33 @@
+# - Try to find alsa library.
+# Once done, this will define
+#
+#  ALSALIB_FOUND - system has alsa library.
+#
+# Copyright (C) 2018 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_ALSALIB alsa)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Alsalib DEFAULT_MSG PC_ALSALIB_VERSION)


Added: