[webkit-changes] [249608] trunk/Source

2019-09-06 Thread mark . lam
Title: [249608] trunk/Source








Revision 249608
Author mark@apple.com
Date 2019-09-06 22:42:11 -0700 (Fri, 06 Sep 2019)


Log Message
Harden protection of the Gigacage Config parameters.
https://bugs.webkit.org/show_bug.cgi?id=201570


Reviewed by Saam Barati.

Source/bmalloc:

1. Rename protectGigacageBasePtrs() and unprotectGigacageBasePtrs() to
   freezeGigacageConfig() and unfreezeGigacageConfig() respectively.

   Also move the alignment check in protectGigacageBasePtrs() into ensureGigacage().
   There's no need to check it more than once.

2. Introduce permanentlyFreezeGigacageConfig() which permanently makes the
   Config ReadOnly.  Once invoked, the Config cannot be made writable again.

   This is made possible by using vm_protect with a true set_maximum argument.
   We also add a g_gigacageConfig.isPermanentlyFrozen flag that we assert.
   Note: this permanence is only true for OS(DARWIN) since vm_protect is Mach API.

3. Rename disableDisablingPrimitiveGigacageIfShouldBeEnabled() to
   forbidDisablingPrimitiveGigacage() because "disablingDisabling" is a tongue
   twister.

   Also, we don't want to make it conditional on "IfShouldBeEnabled".  We want
   forbidDisablingPrimitiveGigacage() to be irreversible.  It is up to the client
   to ensure that the Gigacage is already initialized (if possible) before
   invoking forbidDisablingPrimitiveGigacage().  Conceptually, the forbidding
   isn't about guaranteeing that the Gigacage is enabled.  It only takes away the
   option to disable it.

   That said, forbidDisablingPrimitiveGigacage() is only invoked by clients that
   care about keeping the Gigacage enabled.  So, it does a sanity check (with an
   assertion) that if !GIGACAGE_ALLOCATION_CAN_FAIL, then the Gigacage should be
   have been initialized and enabled before invoking it.

   We also make sure that forbidDisablingPrimitiveGigacage() calls
   permanentlyFreezeGigacageConfig() unconditionally.  It is safe to call it more
   than once.  This guarantees that the Config is permanently frozen after this,
   even if a bug should inadvertantly set the
   g_gigacageConfig.disablingPrimitiveGigacageIsForbidden flag before
   forbidDisablingPrimitiveGigacage() is invoked.

4. Assert that ensureGigacage() is only called once.

5. Assert that shouldBeEnabled() is only called once.
   Also moved its cached result into the Config so that it can be frozen.

* bmalloc/Gigacage.cpp:
(Gigacage::bmalloc::freezeGigacageConfig):
(Gigacage::bmalloc::unfreezeGigacageConfig):
(Gigacage::bmalloc::permanentlyFreezeGigacageConfig):
(Gigacage::bmalloc::UnfreezeGigacageConfigScope::UnfreezeGigacageConfigScope):
(Gigacage::bmalloc::UnfreezeGigacageConfigScope::~UnfreezeGigacageConfigScope):
(Gigacage::ensureGigacage):
(Gigacage::disablePrimitiveGigacage):
(Gigacage::verifyGigacageIsEnabled):
(Gigacage::forbidDisablingPrimitiveGigacage):
(Gigacage::isDisablingPrimitiveGigacageForbidden):
(Gigacage::shouldBeEnabled):
(Gigacage::bmalloc::protectGigacageBasePtrs): Deleted.
(Gigacage::bmalloc::unprotectGigacageBasePtrs): Deleted.
(Gigacage::bmalloc::UnprotectGigacageBasePtrsScope::UnprotectGigacageBasePtrsScope): Deleted.
(Gigacage::bmalloc::UnprotectGigacageBasePtrsScope::~UnprotectGigacageBasePtrsScope): Deleted.
(Gigacage::primitiveGigacageDisabled): Deleted.
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): Deleted.
(Gigacage::isDisablingPrimitiveGigacageDisabled): Deleted.
* bmalloc/Gigacage.h:
(Gigacage::isPrimitiveGigacagePermanentlyEnabled):
(Gigacage::canPrimitiveGigacageBeDisabled):
(Gigacage::forbidDisablingPrimitiveGigacage):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): Deleted.

Source/_javascript_Core:

Just renaming some function names here.

* assembler/testmasm.cpp:
(JSC::testCagePreservesPACFailureBit):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::cageConditionally):
* jsc.cpp:
(jscmain):

Source/WebKit:

Just renaming a function name here.

* WebProcess/WebProcess.cpp:

Source/WTF:

Just renaming some function names here.

* wtf/Gigacage.h:
(Gigacage::forbidDisablingPrimitiveGigacage):
(Gigacage::isDisablingPrimitiveGigacageForbidden):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled): Deleted.
(Gigacage::isDisablingPrimitiveGigacageDisabled): Deleted.

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/assembler/testmasm.cpp
trunk/Source/_javascript_Core/jit/AssemblyHelpers.h
trunk/Source/_javascript_Core/jsc.cpp
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/Gigacage.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebProcess.cpp
trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc/Gigacage.cpp
trunk/Source/bmalloc/bmalloc/Gigacage.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (249607 => 249608)

--- trunk/Source/_javascript_Core/ChangeLog	2019-09-07 04:19:52 UTC (rev 249607)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-09-07 05:42:11 UTC (rev 249608)
@@ -1,3 +1,20 

[webkit-changes] [249607] trunk

2019-09-06 Thread drousso
Title: [249607] trunk








Revision 249607
Author drou...@apple.com
Date 2019-09-06 21:19:52 -0700 (Fri, 06 Sep 2019)


Log Message
Web Inspector: CSS Formatter: the closing } of nested @media aren't indented
https://bugs.webkit.org/show_bug.cgi?id=201560

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
(FormatterContentBuilder.prototype.removeLastNewline):
It's possible that there were multiple newlines in a row, so we should update `_startOfLine`
to be `true` if the previous line was empty.

LayoutTests:

* inspector/formatting/resources/css-tests/media-query.css:
* inspector/formatting/resources/css-tests/media-query-expected.css:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query-expected.css
trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query.css
trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterContentBuilder.js




Diff

Modified: trunk/LayoutTests/ChangeLog (249606 => 249607)

--- trunk/LayoutTests/ChangeLog	2019-09-07 03:19:32 UTC (rev 249606)
+++ trunk/LayoutTests/ChangeLog	2019-09-07 04:19:52 UTC (rev 249607)
@@ -1,3 +1,13 @@
+2019-09-06  Devin Rousso  
+
+Web Inspector: CSS Formatter: the closing } of nested @media aren't indented
+https://bugs.webkit.org/show_bug.cgi?id=201560
+
+Reviewed by Joseph Pecoraro.
+
+* inspector/formatting/resources/css-tests/media-query.css:
+* inspector/formatting/resources/css-tests/media-query-expected.css:
+
 2019-09-06  Wenson Hsieh  
 
 Incorrect selection rect revealed after pasting images in a contenteditable element


Modified: trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query-expected.css (249606 => 249607)

--- trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query-expected.css	2019-09-07 03:19:32 UTC (rev 249606)
+++ trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query-expected.css	2019-09-07 04:19:52 UTC (rev 249607)
@@ -19,6 +19,14 @@
 }
 }
 
+@media print {
+@media screen {
+body {
+color: red;
+}
+}
+}
+
 /* MEDIA QUERY */
 @media screen and (max-device-width: 480px) {
 html {


Modified: trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query.css (249606 => 249607)

--- trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query.css	2019-09-07 03:19:32 UTC (rev 249606)
+++ trunk/LayoutTests/inspector/formatting/resources/css-tests/media-query.css	2019-09-07 04:19:52 UTC (rev 249607)
@@ -1,5 +1,6 @@
 /* MEDIA QUERY INDENTATION */
 @media print{body,#main,#content{color:#000!important;}a,a:link,a:visited{color:#000!important;text-decoration:none!important;}#tabs,#globalheader,#globalfooter,#directorynav,.noprint,.hide{display:none!important;}#main a.pdf,#main a.html,#main a.qt,#main a.ical,#main a.dl,#main a.dmg,#main a.zip,#main a.keynote,#main a.audio{padding-left:0;background-image:none;}}
+@media print{@media screen{body{color:red;}}}
 
 /* MEDIA QUERY */
 @media screen and(max-device-width:480px){html{-webkit-text-size-adjust:none;}}


Modified: trunk/Source/WebInspectorUI/ChangeLog (249606 => 249607)

--- trunk/Source/WebInspectorUI/ChangeLog	2019-09-07 03:19:32 UTC (rev 249606)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-09-07 04:19:52 UTC (rev 249607)
@@ -1,5 +1,17 @@
 2019-09-06  Devin Rousso  
 
+Web Inspector: CSS Formatter: the closing } of nested @media aren't indented
+https://bugs.webkit.org/show_bug.cgi?id=201560
+
+Reviewed by Joseph Pecoraro.
+
+* UserInterface/Workers/Formatter/FormatterContentBuilder.js:
+(FormatterContentBuilder.prototype.removeLastNewline):
+It's possible that there were multiple newlines in a row, so we should update `_startOfLine`
+to be `true` if the previous line was empty.
+
+2019-09-06  Devin Rousso  
+
 Web Inspector: CSS Formatter: links to CSS resources don't map to the right line after pretty printing if the line is after a multiline comment
 https://bugs.webkit.org/show_bug.cgi?id=201559
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterContentBuilder.js (249606 => 249607)

--- trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterContentBuilder.js	2019-09-07 03:19:32 UTC (rev 249606)
+++ trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/FormatterContentBuilder.js	2019-09-07 04:19:52 UTC (rev 249607)
@@ -160,9 +160,9 @@
 if (this.lastTokenWasNewline) {
 this._popFormattedContent();
 this._formattedLineEndings.pop();
-this._startOfLine = false;
 this.lastTokenWasNewline = this.lastToken === "\n";
 this.lastTokenWasWhitespace = this.lastToken === " ";
+this._startOfLine = this.lastTokenWasNewline;
 }
 }
 

[webkit-changes] [249606] tags/Safari-608.2.11.1.3/

2019-09-06 Thread bshafiei
Title: [249606] tags/Safari-608.2.11.1.3/








Revision 249606
Author bshaf...@apple.com
Date 2019-09-06 20:19:32 -0700 (Fri, 06 Sep 2019)


Log Message
Tag Safari-608.2.11.1.3.

Added Paths

tags/Safari-608.2.11.1.3/




Diff




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


[webkit-changes] [249605] trunk

2019-09-06 Thread wenson_hsieh
Title: [249605] trunk








Revision 249605
Author wenson_hs...@apple.com
Date 2019-09-06 19:58:12 -0700 (Fri, 06 Sep 2019)


Log Message
Incorrect selection rect revealed after pasting images in a contenteditable element
https://bugs.webkit.org/show_bug.cgi?id=201549


Reviewed by Simon Fraser.

Source/WebCore:

Editor::replaceSelectionWithFragment currently scrolls to reveal the selection after inserting the given
DocumentFragment. However, this scrolling occurs before any inserted images have loaded yet, which causes the
wrong caret rect to be revealed, since all image elements inserted during paste will be empty.

To fix this, we defer revealing the selection after inserting the fragment until after all images that have
been inserted are done loading. While waiting for images to load, if any layers which may be scrolled as a
result of revealing the selection are scrolled, we additionally cancel the deferred selection reveal. See
comments below for more detail.

Tests: editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll.html
   editing/pasteboard/reveal-selection-after-pasting-images.html
   PasteImage.RevealSelectionAfterPastingImage

* editing/Editing.cpp:
(WebCore::visibleImageElementsInRangeWithNonLoadedImages):

Add a new helper to iterate through a range and collect all image elements in that range, that contain cached
images that have not finished loading yet.

* editing/Editing.h:
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):

Instead of always immediately revealing the selection after applying the ReplaceSelectionCommand, collect the
image elements that were just inserted, and avoid immediately revealing the selection if any of these images
have non-null cached images, but are not loaded yet. Instead, hold on to these images in a set, remove them once
they finish loading using the new method below, and once all images are removed, reveal the selection.

(WebCore::Editor::revealSelectionIfNeededAfterLoadingImageForElement):
(WebCore::Editor::renderLayerDidScroll):

Called whenever a scrollable RenderLayer is scrolled (or in the case of FrameView, the root layer). In the case
where Editor is waiting to reveal the selection, we check to see if the scrolled layer is an ancestor of the
layer enclosing the start of the selection.

(WebCore::Editor::respondToChangedSelection):

If the selection changes between pasting and waiting for pasted images to load, just cancel waiting to reveal
the selection after pasting.

* editing/Editor.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::insertedContentRange const):

Add a helper method to grab the Range of content inserted after applying the command.

* editing/ReplaceSelectionCommand.h:
* page/FrameView.cpp:
(WebCore::FrameView::scrollPositionChanged):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::didFinishLoadingImageForElement):

Notify Editor after an image finishes loading.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):

Source/WebKit:

Tweak some existing logic to use the new visibleImageElementsInRangeWithNonLoadedImages helper function. See
WebCore for more details.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didConcludeEditDrag):

Tools:

Add an API test to exercise the scenario where we scroll to reveal the selection after pasting an image that was
directly written to the pasteboard.

* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:

LayoutTests:

Add a couple of new layout tests.

* editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll-expected.txt: Added.
* editing/pasteboard/do-not-reveal-selection-after-programmatic-scroll.html: Added.

This test verifies that we don't try to scroll to reveal the caret after pasting, if the scroll position was
changed before the images finished loading.

* editing/pasteboard/reveal-selection-after-pasting-images-expected.txt: Added.
* editing/pasteboard/reveal-selection-after-pasting-images.html: Added.
* platform/ios/editing/pasteboard/reveal-selection-after-pasting-images-expected.txt: Added.

This test verifies that we reveal the caret after loading multiple pasted images in a selection, and dispatch a
scroll event in the process.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/Editing.cpp
trunk/Source/WebCore/editing/Editing.h
trunk/Source/WebCore/editing/Editor.cpp
trunk/Source/WebCore/editing/Editor.h
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
trunk/Source/WebCore/editing/ReplaceSelectionCommand.h
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/page/FrameView.h
trunk/Source/WebCore/page/Page.cpp
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm


Added Paths


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

2019-09-06 Thread bfulgham
Title: [249604] trunk/Source/WebCore








Revision 249604
Author bfulg...@apple.com
Date 2019-09-06 19:39:25 -0700 (Fri, 06 Sep 2019)


Log Message
PathDirect2D Cleanups
https://bugs.webkit.org/show_bug.cgi?id=201534

Reviewed by Fujii Hironori.

1. Add a COMPtr<> move operator.
2. Reduce copying ID2D1Geometry objects.
3. Protect against using the ID2D1PathGeometry after the
   ID2D1GeometrySink's Close operation is used.
4. Add a debug-only 'refCount' function to COMPtr to help
   track down memory errors.

* platform/graphics/Path.h:
(WebCore::Path::activePath const): Deleted.
* platform/graphics/win/Direct2DOperations.cpp:
(WebCore::Direct2D::fillPath):
(WebCore::Direct2D::drawPath):
* platform/graphics/win/PathDirect2D.cpp:
* platform/win/COMPtr.h:
(COMPtr::COMPtr):
(=):
(refCount):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/Path.h
trunk/Source/WebCore/platform/graphics/win/Direct2DOperations.cpp
trunk/Source/WebCore/platform/graphics/win/PathDirect2D.cpp
trunk/Source/WebCore/platform/win/COMPtr.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (249603 => 249604)

--- trunk/Source/WebCore/ChangeLog	2019-09-07 01:53:20 UTC (rev 249603)
+++ trunk/Source/WebCore/ChangeLog	2019-09-07 02:39:25 UTC (rev 249604)
@@ -1,3 +1,28 @@
+2019-09-06  Brent Fulgham  
+
+PathDirect2D Cleanups
+https://bugs.webkit.org/show_bug.cgi?id=201534
+
+Reviewed by Fujii Hironori.
+
+1. Add a COMPtr<> move operator.
+2. Reduce copying ID2D1Geometry objects.
+3. Protect against using the ID2D1PathGeometry after the
+   ID2D1GeometrySink's Close operation is used.
+4. Add a debug-only 'refCount' function to COMPtr to help
+   track down memory errors.
+
+* platform/graphics/Path.h:
+(WebCore::Path::activePath const): Deleted.
+* platform/graphics/win/Direct2DOperations.cpp:
+(WebCore::Direct2D::fillPath):
+(WebCore::Direct2D::drawPath):
+* platform/graphics/win/PathDirect2D.cpp:
+* platform/win/COMPtr.h:
+(COMPtr::COMPtr):
+(=):
+(refCount):
+
 2019-09-06  Chris Dumez  
 
 Move the ResourceLoadObserver logic to WebKit2


Modified: trunk/Source/WebCore/platform/graphics/Path.h (249603 => 249604)

--- trunk/Source/WebCore/platform/graphics/Path.h	2019-09-07 01:53:20 UTC (rev 249603)
+++ trunk/Source/WebCore/platform/graphics/Path.h	2019-09-07 02:39:25 UTC (rev 249604)
@@ -194,14 +194,12 @@
 #endif
 
 #if USE(DIRECT2D)
-ID2D1GeometrySink* activePath() const { return m_activePath.get(); }
 void appendGeometry(ID2D1Geometry*);
 void createGeometryWithFillMode(WindRule, COMPtr&) const;
-void drawDidComplete();
 
-HRESULT initializePathState();
 void openFigureAtCurrentPointIfNecessary();
-void closeAnyOpenGeometries();
+void closeAnyOpenGeometries(unsigned figureEndStyle) const;
+void clearGeometries();
 #endif
 
 #ifndef NDEBUG
@@ -210,10 +208,10 @@
 
 private:
 #if USE(DIRECT2D)
+Vector m_geometries;
 COMPtr m_path;
-COMPtr m_activePathGeometry;
-COMPtr m_activePath;
-size_t m_openFigureCount { 0 };
+mutable COMPtr m_activePath;
+mutable bool m_figureIsOpened { false };
 #else
 PlatformPathPtr m_path { nullptr };
 #endif


Modified: trunk/Source/WebCore/platform/graphics/win/Direct2DOperations.cpp (249603 => 249604)

--- trunk/Source/WebCore/platform/graphics/win/Direct2DOperations.cpp	2019-09-07 01:53:20 UTC (rev 249603)
+++ trunk/Source/WebCore/platform/graphics/win/Direct2DOperations.cpp	2019-09-07 02:39:25 UTC (rev 249604)
@@ -495,11 +495,7 @@
 
 void fillPath(PlatformContextDirect2D& platformContext, const Path& path, const FillSource& fillSource, const ShadowState& shadowState)
 {
-if (path.activePath()) {
-// Make sure it's closed. This might fail if the path was already closed, so
-// ignore the return value.
-path.activePath()->Close();
-}
+path.closeAnyOpenGeometries(D2D1_FIGURE_END_OPEN);
 
 auto context = platformContext.renderTarget();
 
@@ -582,8 +578,7 @@
 {
 auto context = platformContext.renderTarget();
 
-if (path.activePath())
-path.activePath()->Close();
+path.closeAnyOpenGeometries(D2D1_FIGURE_END_OPEN);
 
 context->SetTags(1, __LINE__);
 


Modified: trunk/Source/WebCore/platform/graphics/win/PathDirect2D.cpp (249603 => 249604)

--- trunk/Source/WebCore/platform/graphics/win/PathDirect2D.cpp	2019-09-07 01:53:20 UTC (rev 249603)
+++ trunk/Source/WebCore/platform/graphics/win/PathDirect2D.cpp	2019-09-07 02:39:25 UTC (rev 249604)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc.  All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ 

[webkit-changes] [249603] trunk/Source

2019-09-06 Thread cdumez
Title: [249603] trunk/Source








Revision 249603
Author cdu...@apple.com
Date 2019-09-06 18:53:20 -0700 (Fri, 06 Sep 2019)


Log Message
Move the ResourceLoadObserver logic to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=201517

Reviewed by Brent Fulgham.

Move the ResourceLoadObserver logic to WebKit2 since it is not used by WebKit1. This allows us to simplify
code.

In a follow-up patch, I will simplify the code even further by leveraging the fact that a WebContent process
is always associated with a single WebsiteDataStore / sessionID:
- No need for a HashMap of sessionIDs
- No need to even allocate the ResourceLoadObserver if the WebProcess is associated with an ephemeral session.

Source/WebCore:

* dom/Document.h:
* loader/ResourceLoadObserver.cpp:
(WebCore::sharedObserver):
(WebCore::ResourceLoadObserver::setShared):
(WebCore::ResourceLoadObserver::shared):
* loader/ResourceLoadObserver.h:
(WebCore::ResourceLoadObserver::~ResourceLoadObserver):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):
(WebCore::ResourceLoadObserver::statisticsForURL):
(WebCore::ResourceLoadObserver::updateCentralStatisticsStore):
(WebCore::ResourceLoadObserver::clearState):
(WebCore::ResourceLoadObserver::setShouldLogUserInteraction):
* page/DeprecatedGlobalSettings.h:

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* Sources.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp: Copied from Source/WebCore/loader/ResourceLoadObserver.cpp.
(WebKit::is3xxRedirect):
(WebKit::WebResourceLoadObserver::WebResourceLoadObserver):
(WebKit::WebResourceLoadObserver::shouldLog const):
(WebKit::WebResourceLoadObserver::requestStorageAccessUnderOpener):
(WebKit::WebResourceLoadObserver::ensureResourceStatisticsForRegistrableDomain):
(WebKit::WebResourceLoadObserver::scheduleNotificationIfNeeded):
(WebKit::WebResourceLoadObserver::updateCentralStatisticsStore):
(WebKit::WebResourceLoadObserver::statisticsForURL):
(WebKit::WebResourceLoadObserver::takeStatistics):
(WebKit::WebResourceLoadObserver::clearState):
(WebKit::WebResourceLoadObserver::nonNullOwnerURL const):
(WebKit::WebResourceLoadObserver::logFontLoad):
(WebKit::WebResourceLoadObserver::logCanvasRead):
(WebKit::WebResourceLoadObserver::logCanvasWriteOrMeasure):
(WebKit::WebResourceLoadObserver::logNavigatorAPIAccessed):
(WebKit::WebResourceLoadObserver::logScreenAPIAccessed):
(WebKit::WebResourceLoadObserver::logSubresourceLoading):
(WebKit::WebResourceLoadObserver::logWebSocketLoading):
(WebKit::WebResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
* WebProcess/WebCoreSupport/WebResourceLoadObserver.h: Added.
* WebProcess/WebProcess.cpp:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.h
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.h
trunk/Source/WebCore/page/DeprecatedGlobalSettings.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
trunk/Source/WebKit/Sources.txt
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/WebProcess.cpp


Added Paths

trunk/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (249602 => 249603)

--- trunk/Source/WebCore/ChangeLog	2019-09-07 00:42:34 UTC (rev 249602)
+++ trunk/Source/WebCore/ChangeLog	2019-09-07 01:53:20 UTC (rev 249603)
@@ -1,3 +1,39 @@
+2019-09-06  Chris Dumez  
+
+Move the ResourceLoadObserver logic to WebKit2
+https://bugs.webkit.org/show_bug.cgi?id=201517
+
+Reviewed by Brent Fulgham.
+
+Move the ResourceLoadObserver logic to WebKit2 since it is not used by WebKit1. This allows us to simplify
+code.
+
+In a follow-up patch, I will simplify the code even further by leveraging the fact that a WebContent process
+is always associated with a single WebsiteDataStore / sessionID:
+- No need for a HashMap of sessionIDs
+- No need to even allocate the ResourceLoadObserver if the WebProcess is associated with an ephemeral session.
+
+* dom/Document.h:
+* loader/ResourceLoadObserver.cpp:
+(WebCore::sharedObserver):
+(WebCore::ResourceLoadObserver::setShared):
+  

[webkit-changes] [249602] trunk/Tools

2019-09-06 Thread jlewis3
Title: [249602] trunk/Tools








Revision 249602
Author jlew...@apple.com
Date 2019-09-06 17:42:34 -0700 (Fri, 06 Sep 2019)


Log Message
Unreviewed, rolling out r249582.

This caused results.html fail to be created on internal
testers.

Reverted changeset:

"run-webkit-test: Allow results to be uploaded without scm
checkout"
https://bugs.webkit.org/show_bug.cgi?id=200787
https://trac.webkit.org/changeset/249582

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
trunk/Tools/Scripts/webkitpy/port/base.py


Removed Paths

trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py
trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (249601 => 249602)

--- trunk/Tools/ChangeLog	2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/ChangeLog	2019-09-07 00:42:34 UTC (rev 249602)
@@ -1,3 +1,17 @@
+2019-09-06  Matt Lewis  
+
+Unreviewed, rolling out r249582.
+
+This caused results.html fail to be created on internal
+testers.
+
+Reverted changeset:
+
+"run-webkit-test: Allow results to be uploaded without scm
+checkout"
+https://bugs.webkit.org/show_bug.cgi?id=200787
+https://trac.webkit.org/changeset/249582
+
 2019-09-06  Aakash Jain  
 
 [ews-app] Status bubble should only display important messages in pop-over - part 2


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py (249601 => 249602)

--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py	2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py	2019-09-07 00:42:34 UTC (rev 249602)
@@ -34,7 +34,6 @@
 
 from .svn import SVN
 from .git import Git
-from .stub_repository import StubRepository
 
 _log = logging.getLogger(__name__)
 
@@ -75,9 +74,6 @@
 if Git.in_working_directory(real_path, executive=self._executive):
 return Git(cwd=real_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
 
-if StubRepository.in_working_directory(real_path, filesystem=self._filesystem):
-return StubRepository(cwd=real_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
-
 return None
 
 


Deleted: trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py (249601 => 249602)

--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py	2019-09-07 00:24:17 UTC (rev 249601)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/stub_repository.py	2019-09-07 00:42:34 UTC (rev 249602)
@@ -1,72 +0,0 @@
-# Copyright (c) 2019 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * 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 HOLDERS AND 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
-# OWNER OR 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.
-#
-# Python module for interacting with an SCM system (like SVN or Git)
-
-import logging
-import json
-
-from webkitpy.common.system.filesystem import FileSystem
-from .scm import SCM
-
-_log = logging.getLogger(__name__)
-
-
-class StubRepository(SCM):
-_stub_repository_json = 'checkout_information.json'
-
-def __init__(self, cwd, filesystem, **kwargs):
-self._filesystem = filesystem
-
-@classmethod
-def _find_parent_path_matching_callback_condition(cls, path, callback, filesystem=None):
-if not filesystem:
-filesystem = FileSystem()
-path = filesystem.abspath(path)
-while path:
-if filesystem.exists(filesystem.join(path, cls._stub_repository_json)):
-return callback(path)
-path = filesystem.dirname(path)
-return None
-
-

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

2019-09-06 Thread jiewen_tan
Title: [249600] trunk/Source/WebKit








Revision 249600
Author jiewen_...@apple.com
Date 2019-09-06 17:08:13 -0700 (Fri, 06 Sep 2019)


Log Message
[WebAuthn] Make WebAuthn default off and let clients turn it on at will
https://bugs.webkit.org/show_bug.cgi?id=201439


Reviewed by Youenn Fablet.

This patch makes WebAuthn default off such that clients that have the right entitlements
could turn it on and we don't risk at turning on a Web API that does nothing by default.

This patch doesn't add any SPI to turn the feature on as it is currently doable via
- [WKPreferencesPrivate _setEnabled:forExperimentalFeature:].

* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultWebAuthenticationEnabled): Deleted.
* Shared/WebPreferencesDefaultValues.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebPreferences.yaml
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (249599 => 249600)

--- trunk/Source/WebKit/ChangeLog	2019-09-06 23:09:00 UTC (rev 249599)
+++ trunk/Source/WebKit/ChangeLog	2019-09-07 00:08:13 UTC (rev 249600)
@@ -1,3 +1,22 @@
+2019-09-06  Jiewen Tan  
+
+[WebAuthn] Make WebAuthn default off and let clients turn it on at will
+https://bugs.webkit.org/show_bug.cgi?id=201439
+
+
+Reviewed by Youenn Fablet.
+
+This patch makes WebAuthn default off such that clients that have the right entitlements
+could turn it on and we don't risk at turning on a Web API that does nothing by default.
+
+This patch doesn't add any SPI to turn the feature on as it is currently doable via
+- [WKPreferencesPrivate _setEnabled:forExperimentalFeature:].
+
+* Shared/WebPreferences.yaml:
+* Shared/WebPreferencesDefaultValues.cpp:
+(WebKit::defaultWebAuthenticationEnabled): Deleted.
+* Shared/WebPreferencesDefaultValues.h:
+
 2019-09-06  Alex Christensen  
 
 Deprecate all WKCookieManagerRef functions


Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (249599 => 249600)

--- trunk/Source/WebKit/Shared/WebPreferences.yaml	2019-09-06 23:09:00 UTC (rev 249599)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml	2019-09-07 00:08:13 UTC (rev 249600)
@@ -767,7 +767,7 @@
 
 WebAuthenticationEnabled:
   type: bool
-  defaultValue: defaultWebAuthenticationEnabled()
+  defaultValue: false
   humanReadableName: "Web Authentication"
   humanReadableDescription: "Enable Web Authentication support"
   webcoreBinding: RuntimeEnabledFeatures


Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (249599 => 249600)

--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2019-09-06 23:09:00 UTC (rev 249599)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2019-09-07 00:08:13 UTC (rev 249600)
@@ -64,15 +64,4 @@
 
 #endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
 
-bool defaultWebAuthenticationEnabled()
-{
-#if PLATFORM(IOS_FAMILY)
-return WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isSafariViewService();
-#elif PLATFORM(MAC)
-return true;
-#else
-return false;
-#endif
-}
-
 } // namespace WebKit


Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (249599 => 249600)

--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2019-09-06 23:09:00 UTC (rev 249599)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2019-09-07 00:08:13 UTC (rev 249600)
@@ -285,6 +285,4 @@
 bool defaultTextAutosizingUsesIdempotentMode();
 #endif
 
-bool defaultWebAuthenticationEnabled();
-
 } // namespace WebKit






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


[webkit-changes] [249599] trunk/JSTests

2019-09-06 Thread mark . lam
Title: [249599] trunk/JSTests








Revision 249599
Author mark@apple.com
Date 2019-09-06 16:09:00 -0700 (Fri, 06 Sep 2019)


Log Message
Gardening: speculative test fix to green bots.
https://bugs.webkit.org/show_bug.cgi?id=201529


Not reviewed.

* stress/test-out-of-memory.js:

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/stress/test-out-of-memory.js




Diff

Modified: trunk/JSTests/ChangeLog (249598 => 249599)

--- trunk/JSTests/ChangeLog	2019-09-06 22:59:40 UTC (rev 249598)
+++ trunk/JSTests/ChangeLog	2019-09-06 23:09:00 UTC (rev 249599)
@@ -1,3 +1,13 @@
+2019-09-06  Mark Lam  
+
+Gardening: speculative test fix to green bots.
+https://bugs.webkit.org/show_bug.cgi?id=201529
+
+
+Not reviewed.
+
+* stress/test-out-of-memory.js:
+
 2019-09-06  Ross Kirsling  
 
 Math.round() produces wrong result for value prior to 0.5


Modified: trunk/JSTests/stress/test-out-of-memory.js (249598 => 249599)

--- trunk/JSTests/stress/test-out-of-memory.js	2019-09-06 22:59:40 UTC (rev 249598)
+++ trunk/JSTests/stress/test-out-of-memory.js	2019-09-06 23:09:00 UTC (rev 249599)
@@ -11,10 +11,11 @@
 
 new Promise(foo);
 
+var arrays = [];
 var exception;
 try {
 for (let i = 0; i < 1000; i++)
-new ArrayBuffer(1000);
+arrays.push(new ArrayBuffer(1000));
 
 } catch (e) {
 exception = e;






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


[webkit-changes] [249598] trunk/Tools

2019-09-06 Thread aakash_jain
Title: [249598] trunk/Tools








Revision 249598
Author aakash_j...@apple.com
Date 2019-09-06 15:59:40 -0700 (Fri, 06 Sep 2019)


Log Message
[ews-app] Status bubble should only display important messages in pop-over - part 2
https://bugs.webkit.org/show_bug.cgi?id=201557

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble): Add few more strings to STEPS_TO_HIDE.

Modified Paths

trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py (249597 => 249598)

--- trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2019-09-06 22:49:56 UTC (rev 249597)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py	2019-09-06 22:59:40 UTC (rev 249598)
@@ -56,8 +56,9 @@
 STEPS_TO_HIDE = ['^Archived built product$', '^Uploaded built product$', '^Transferred archive to S3$',
  '^Archived test results$', '^Uploaded test results$', '^Extracted test results$',
  '^Downloaded built product$', '^Extracted built product$',
- '^Cleaned and updated working directory$', '^Checked out required revision$',
- '^Validated patch$', '^Killed old processes$', '^Configured build$', '^OS:.*Xcode:', '(skipped)']
+ '^Cleaned and updated working directory$', '^Checked out required revision$', '^Updated working directory$',
+ '^Validated patch$', '^Killed old processes$', '^Configured build$', '^OS:.*Xcode:', '(skipped)',
+ '^Printed configuration$', '^Checked patch relevance$']
 DAYS_TO_CHECK = 3
 BUILDER_ICON = u'\U0001f6e0'
 TESTER_ICON = u'\U0001f9ea'


Modified: trunk/Tools/ChangeLog (249597 => 249598)

--- trunk/Tools/ChangeLog	2019-09-06 22:49:56 UTC (rev 249597)
+++ trunk/Tools/ChangeLog	2019-09-06 22:59:40 UTC (rev 249598)
@@ -1,3 +1,13 @@
+2019-09-06  Aakash Jain  
+
+[ews-app] Status bubble should only display important messages in pop-over - part 2
+https://bugs.webkit.org/show_bug.cgi?id=201557
+
+Reviewed by Jonathan Bedard.
+
+* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+(StatusBubble): Add few more strings to STEPS_TO_HIDE.
+
 2019-09-06  Alex Christensen  
 
 Deprecate all WKCookieManagerRef functions






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


[webkit-changes] [249597] trunk

2019-09-06 Thread ross . kirsling
Title: [249597] trunk








Revision 249597
Author ross.kirsl...@sony.com
Date 2019-09-06 15:49:56 -0700 (Fri, 06 Sep 2019)


Log Message
Math.round() produces wrong result for value prior to 0.5
https://bugs.webkit.org/show_bug.cgi?id=185115

Reviewed by Saam Barati.

JSTests:

* stress/math-round-basics.js:
Add positive/negative test cases.

* test262/expectations.yaml:
Mark test passing.

Source/_javascript_Core:

Our Math.round implementation goes in the wrong direction for double values like 0.49994.
This requires just a subtle adjustment for three of our four versions; only baseline JIT needed a full rewrite.

Specifically:
  - While 0.49994 is representable, 1 - 0.49994 is not (it turns into 0.5),
so taking the difference between ceil(value)` and `value` is problematic.
  - The baseline implementation was doing `floor(x + 0.5)` for positive doubles and slowpathing negative ones
(by falling back to jsRound). This patch gives baseline a legitimate implementation too.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithRounding):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArithRound):
* jit/ThunkGenerators.cpp:
(JSC::roundThunkGenerator):
* runtime/MathCommon.cpp:

Modified Paths

trunk/JSTests/ChangeLog
trunk/JSTests/stress/math-round-basics.js
trunk/JSTests/test262/expectations.yaml
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp
trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp
trunk/Source/_javascript_Core/runtime/MathCommon.cpp




Diff

Modified: trunk/JSTests/ChangeLog (249596 => 249597)

--- trunk/JSTests/ChangeLog	2019-09-06 22:34:03 UTC (rev 249596)
+++ trunk/JSTests/ChangeLog	2019-09-06 22:49:56 UTC (rev 249597)
@@ -1,3 +1,16 @@
+2019-09-06  Ross Kirsling  
+
+Math.round() produces wrong result for value prior to 0.5
+https://bugs.webkit.org/show_bug.cgi?id=185115
+
+Reviewed by Saam Barati.
+
+* stress/math-round-basics.js:
+Add positive/negative test cases.
+
+* test262/expectations.yaml:
+Mark test passing.
+
 2019-09-06  Mark Lam  
 
 Move web-assembly-constructors-should-not-override-global-object-property.js below JSTests/wasm/stress.


Modified: trunk/JSTests/stress/math-round-basics.js (249596 => 249597)

--- trunk/JSTests/stress/math-round-basics.js	2019-09-06 22:34:03 UTC (rev 249596)
+++ trunk/JSTests/stress/math-round-basics.js	2019-09-06 22:49:56 UTC (rev 249597)
@@ -81,6 +81,14 @@
 if (roundedValue !== Number.NEGATIVE_INFINITY)
 throw "mathRoundOnDoubles(Number.NEGATIVE_INFINITY) = " + roundedValue;
 
+var roundedValue = mathRoundOnDoubles(0.5 - Number.EPSILON / 4);
+if (roundedValue !== 0 || (1 / roundedValue) !== Infinity)
+throw "mathRoundOnDoubles(0.5 - Number.EPSILON / 4) = " + roundedValue;
+
+var roundedValue = mathRoundOnDoubles(-0.5 + Number.EPSILON / 4);
+if (roundedValue !== 0 || (1 / roundedValue) !== -Infinity)
+throw "mathRoundOnDoubles(-0.5 + Number.EPSILON / 4) = " + roundedValue;
+
 var boolean = !!(i % 2);
 var roundedBoolean = mathRoundOnBooleans(boolean);
 if (roundedBoolean != boolean)


Modified: trunk/JSTests/test262/expectations.yaml (249596 => 249597)

--- trunk/JSTests/test262/expectations.yaml	2019-09-06 22:34:03 UTC (rev 249596)
+++ trunk/JSTests/test262/expectations.yaml	2019-09-06 22:49:56 UTC (rev 249597)
@@ -1212,9 +1212,6 @@
 test/built-ins/Map/proto-from-ctor-realm.js:
   default: 'Test262Error: Expected SameValue(«[object Map]», «[object Map]») to be true'
   strict mode: 'Test262Error: Expected SameValue(«[object Map]», «[object Map]») to be true'
-test/built-ins/Math/round/S15.8.2.15_A7.js:
-  default: "Test262Error: #4: '1 / Math.round(0.49994) !== 1 / 0'"
-  strict mode: "Test262Error: #4: '1 / Math.round(0.49994) !== 1 / 0'"
 test/built-ins/Number/proto-from-ctor-realm.js:
   default: 'Test262Error: Expected SameValue(«0», «0») to be true'
   strict mode: 'Test262Error: Expected SameValue(«0», «0») to be true'


Modified: trunk/Source/_javascript_Core/ChangeLog (249596 => 249597)

--- trunk/Source/_javascript_Core/ChangeLog	2019-09-06 22:34:03 UTC (rev 249596)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-09-06 22:49:56 UTC (rev 249597)
@@ -1,3 +1,27 @@
+2019-09-06  Ross Kirsling  
+
+Math.round() produces wrong result for value prior to 0.5
+https://bugs.webkit.org/show_bug.cgi?id=185115
+
+Reviewed by Saam Barati.
+
+Our Math.round implementation goes in the wrong direction for double values like 0.49994.
+This requires just a subtle adjustment for three of our four versions; only baseline JIT needed a full rewrite.
+
+Specifically:
+  - While 0.49994 is representable, 1 - 0.49994 is not (it turns 

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

2019-09-06 Thread drousso
Title: [249596] trunk/Source/WebInspectorUI








Revision 249596
Author drou...@apple.com
Date 2019-09-06 15:34:03 -0700 (Fri, 06 Sep 2019)


Log Message
Web Inspector: CSS Formatter: links to CSS resources don't map to the right line after pretty printing if the line is after a multiline comment
https://bugs.webkit.org/show_bug.cgi?id=201559

Reviewed by Joseph Pecoraro.

Newlines in multiline comments weren't added as line endings, so they weren't considered
when a source code location updated after pretty printing.

* UserInterface/Workers/Formatter/CSSFormatter.js:
(CSSFormatter.prototype._format):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/CSSFormatter.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (249595 => 249596)

--- trunk/Source/WebInspectorUI/ChangeLog	2019-09-06 22:23:35 UTC (rev 249595)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-09-06 22:34:03 UTC (rev 249596)
@@ -1,3 +1,16 @@
+2019-09-06  Devin Rousso  
+
+Web Inspector: CSS Formatter: links to CSS resources don't map to the right line after pretty printing if the line is after a multiline comment
+https://bugs.webkit.org/show_bug.cgi?id=201559
+
+Reviewed by Joseph Pecoraro.
+
+Newlines in multiline comments weren't added as line endings, so they weren't considered
+when a source code location updated after pretty printing.
+
+* UserInterface/Workers/Formatter/CSSFormatter.js:
+(CSSFormatter.prototype._format):
+
 2019-09-06  Joseph Pecoraro  
 
 Web Inspector: Better position for Sources tab when enabling the experimental setting


Modified: trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/CSSFormatter.js (249595 => 249596)

--- trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/CSSFormatter.js	2019-09-06 22:23:35 UTC (rev 249595)
+++ trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/CSSFormatter.js	2019-09-06 22:34:03 UTC (rev 249596)
@@ -270,8 +270,18 @@
 this._builder.appendNewline(true);
 }
 
-this._builder.appendToken(specialSequenceText, startIndex);
+specialSequenceText.split(`\n`).forEach((line, i, lines) => {
+if (line) {
+this._builder.appendToken(line, startIndex);
+startIndex += line.length;
+}
 
+if (i < lines.length - 1) {
+this._builder.appendNewline(true);
+++startIndex;
+}
+});
+
 i = endIndex;
 c = this._sourceText[i];
 
@@ -298,7 +308,6 @@
 
 if (/\s/.test(c)) {
 if (c === `\n`) {
-this._builder.addOriginalLineEnding(i);
 if (!this._builder.lastTokenWasNewline) {
 while (this._builder.lastTokenWasWhitespace)
 this._builder.removeLastWhitespace();






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


[webkit-changes] [249595] trunk/LayoutTests

2019-09-06 Thread ryanhaddad
Title: [249595] trunk/LayoutTests








Revision 249595
Author ryanhad...@apple.com
Date 2019-09-06 15:23:35 -0700 (Fri, 06 Sep 2019)


Log Message
REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
https://bugs.webkit.org/show_bug.cgi?id=201550

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations: Mark the test as flaky to speed up EWS while we investigate the root cause.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (249594 => 249595)

--- trunk/LayoutTests/ChangeLog	2019-09-06 22:15:51 UTC (rev 249594)
+++ trunk/LayoutTests/ChangeLog	2019-09-06 22:23:35 UTC (rev 249595)
@@ -1,3 +1,12 @@
+2019-09-06  Ryan Haddad  
+
+REGRESSION: http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html is frequently timing out on iOS EWS bots
+https://bugs.webkit.org/show_bug.cgi?id=201550
+
+Unreviewed test gardening.
+
+* platform/ios-wk2/TestExpectations: Mark the test as flaky to speed up EWS while we investigate the root cause.
+
 2019-09-06  Said Abou-Hallawa  
 
 REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction


Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (249594 => 249595)

--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2019-09-06 22:15:51 UTC (rev 249594)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2019-09-06 22:23:35 UTC (rev 249595)
@@ -1354,3 +1354,5 @@
 
 # problem with blur handling
 mathml/focus-event-handling.html [ Failure ]
+
+webkit.org/b/201550 http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations.html [ Pass Timeout ]






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


[webkit-changes] [249594] trunk

2019-09-06 Thread commit-queue
Title: [249594] trunk








Revision 249594
Author commit-qu...@webkit.org
Date 2019-09-06 15:15:51 -0700 (Fri, 06 Sep 2019)


Log Message
REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction
https://bugs.webkit.org/show_bug.cgi?id=201402

Patch by Said Abou-Hallawa  on 2019-09-06
Reviewed by Youenn Fablet and Daniel Bates.

Source/WebCore:

Add the static functions resolvePromises() and rejectPromises(). These
functions take an lvalue reference to a Vector of promises. Inside them,
the lvalue reference argument are exchanged with an empty Vector of
promises then the promises are processed. This clears m_decodingPromises
and fixes the leak.

Add an internal API which returns the count of the pending promises of
an HTMLImageElement. This internal API will be used in the attached test.

Test: fast/images/decode-resolve-reject-no-leak.html

* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const):
* loader/ImageLoader.cpp:
(WebCore::resolvePromises):
ImageLoader::decode() calls BitmapImage::decode() and moves m_decodingPromises
in capture. When decoding finishes, this function is called to resolve the
promises. But ImageLoader might get deleted before the image decoding
finishes. So this function has to be static.

(WebCore::rejectPromises):
(WebCore::ImageLoader::resolveDecodePromises):
(WebCore::ImageLoader::rejectDecodePromises):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::decode):
(WebCore::resolveDecodePromises): Deleted.
(WebCore::rejectDecodePromises): Deleted.
* loader/ImageLoader.h:
(WebCore::ImageLoader::pendingDecodePromisesCountForTesting const):
* testing/Internals.cpp:
(WebCore::Internals::imagePendingDecodePromisesCountForTesting):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/images/decode-resolve-reject-no-leak-expected.txt: Added.
* fast/images/decode-resolve-reject-no-leak.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLImageElement.h
trunk/Source/WebCore/loader/ImageLoader.cpp
trunk/Source/WebCore/loader/ImageLoader.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl


Added Paths

trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak-expected.txt
trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak.html




Diff

Modified: trunk/LayoutTests/ChangeLog (249593 => 249594)

--- trunk/LayoutTests/ChangeLog	2019-09-06 21:57:31 UTC (rev 249593)
+++ trunk/LayoutTests/ChangeLog	2019-09-06 22:15:51 UTC (rev 249594)
@@ -1,5 +1,15 @@
 2019-09-06  Said Abou-Hallawa  
 
+REGRESSION (r249367): m_decodingPromises grows indefinitely until ImageLoader destruction
+https://bugs.webkit.org/show_bug.cgi?id=201402
+
+Reviewed by Youenn Fablet and Daniel Bates.
+
+* fast/images/decode-resolve-reject-no-leak-expected.txt: Added.
+* fast/images/decode-resolve-reject-no-leak.html: Added.
+
+2019-09-06  Said Abou-Hallawa  
+
 Prefer null namespace 'href' over 'xlink:href' on SVG elements
 https://bugs.webkit.org/show_bug.cgi?id=195802
 


Added: trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak-expected.txt (0 => 249594)

--- trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak-expected.txt	2019-09-06 22:15:51 UTC (rev 249594)
@@ -0,0 +1,15 @@
+Test HTMLImageElement::decode() does not leak the pending promises after resolving or rejecting them.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Decoding a bitmap image - promises will be resolved:
+PASS internals.imagePendingDecodePromisesCountForTesting(image) is 0
+Decoding a SVG image - promises will be resolved:
+PASS internals.imagePendingDecodePromisesCountForTesting(image) is 0
+Decoding a broken image - promises will be rejected:
+PASS internals.imagePendingDecodePromisesCountForTesting(image) is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak.html (0 => 249594)

--- trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak.html	(rev 0)
+++ trunk/LayoutTests/fast/images/decode-resolve-reject-no-leak.html	2019-09-06 22:15:51 UTC (rev 249594)
@@ -0,0 +1,74 @@
+
+
+