[webkit-changes] [225108] trunk/Source

2017-11-23 Thread zandobersek
Title: [225108] trunk/Source








Revision 225108
Author zandober...@gmail.com
Date 2017-11-23 01:17:08 -0800 (Thu, 23 Nov 2017)


Log Message
[CoordGraphics] Replace CoordinatedSurface, ThreadSafeCoordinatedSurface with CoordinatedBuffer
https://bugs.webkit.org/show_bug.cgi?id=179967

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Roll the CoordinatedSurface and ThreadSafeCoordinatedSurface classes
into one CoordinatedBuffer class.

CoordinatedBuffer class mimics CoordinatedSurface in providing the
Client class that allows specifying how the client should paint using a
GraphicsContext object. supportsAlpha() and size() methods are also
present, as well as paintToSurface(). uploadImage() retrieves the
Image that's created from the contained ImageBuffer, allowing the user
to then manually upload the buffer data onto the GPU.

CoordinatedBuffer otherwise serves as a drop-in replacement for the
CoordinatedSurface class, and the remaining changes in the
CoordiantedGraphics code reflect that.

No new tests -- no change in behavior.

* platform/TextureMapper.cmake:
* platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp: Added.
(WebCore::CoordinatedBuffer::create):
(WebCore::CoordinatedBuffer::CoordinatedBuffer):
(WebCore::CoordinatedBuffer::paintToSurface):
(WebCore::CoordinatedBuffer::uploadImage):
* platform/graphics/texmap/coordinated/CoordinatedBuffer.h: Added.
(WebCore::CoordinatedBuffer::supportsAlpha const):
(WebCore::CoordinatedBuffer::size const):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::update):
(WebCore::CoordinatedImageBacking::releaseSurfaceIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/graphics/texmap/coordinated/CoordinatedSurface.cpp: Removed.
* platform/graphics/texmap/coordinated/CoordinatedSurface.h: Removed.
* platform/graphics/texmap/coordinated/Tile.h:
* platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:

Source/WebKit:

Replace uses of CoordinatedSurface class with CoordinatedBuffer. The
ThreadSafeCoordinatedSurface class is removed, along with the code in
CoordinatedLayerTreeHost that established a CoordinatedSurface factory.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
(WebKit::CoordinatedBackingStoreTile::swapBuffers):
(WebKit::CoordinatedBackingStoreTile::setBackBuffer):
(WebKit::CoordinatedBackingStore::updateTile):
* Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
Rename m_surface to m_buffer, m_surfaceOffset to m_bufferOffset.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::createUpdateAtlas):
(WebKit::CoordinatedGraphicsScene::updateImageBacking):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.cpp: Removed.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadSafeCoordinatedSurface.h: Removed.
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::updateImageBacking):
(WebKit::CompositingCoordinator::createUpdateAtlas):
(WebKit::CompositingCoordinator::paintToSurface):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::~UpdateAtlas):
(WebKit::UpdateAtlas::paintOnAvailableBuffer):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:
Rename m_surface to m_buffer.
(WebKit::UpdateAtlas::size const):
(WebKit::UpdateAtlas::supportsAlpha const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/TextureMapper.cmake
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.h
trunk/Source/WebCore/platform/graphics/texmap/coordinated/Tile.h
trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStoreClient.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PlatformGTK.cmake
trunk/Source/WebKit/PlatformWPE.cmake
trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBack

[webkit-changes] [225109] trunk/LayoutTests

2017-11-23 Thread Ms2ger
Title: [225109] trunk/LayoutTests








Revision 225109
Author ms2...@igalia.com
Date 2017-11-23 02:31:07 -0800 (Thu, 23 Nov 2017)


Log Message
[WPE] Enable some more wpt tests.
https://bugs.webkit.org/show_bug.cgi?id=179939

Reviewed by Žan Doberšek.

* TestExpectations: Add the number of a bug I filed.
* platform/wpe/TestExpectations: Enable some smaller top-level wpt
  directories.
* platform/wpe/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt:
  Added: Service Workers are not yet enabled for WPE, which affects the
  results of this test in a harmless way.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/wpe/TestExpectations


Added Paths

trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/FileAPI/
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (225108 => 225109)

--- trunk/LayoutTests/ChangeLog	2017-11-23 09:17:08 UTC (rev 225108)
+++ trunk/LayoutTests/ChangeLog	2017-11-23 10:31:07 UTC (rev 225109)
@@ -1,3 +1,17 @@
+2017-11-23  Ms2ger  
+
+[WPE] Enable some more wpt tests.
+https://bugs.webkit.org/show_bug.cgi?id=179939
+
+Reviewed by Žan Doberšek.
+
+* TestExpectations: Add the number of a bug I filed.
+* platform/wpe/TestExpectations: Enable some smaller top-level wpt
+  directories.
+* platform/wpe/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt:
+  Added: Service Workers are not yet enabled for WPE, which affects the
+  results of this test in a harmless way.
+
 2017-11-22  Ali Juma  
 
 Implement VisualViewport API attributes


Modified: trunk/LayoutTests/TestExpectations (225108 => 225109)

--- trunk/LayoutTests/TestExpectations	2017-11-23 09:17:08 UTC (rev 225108)
+++ trunk/LayoutTests/TestExpectations	2017-11-23 10:31:07 UTC (rev 225109)
@@ -291,7 +291,7 @@
 imported/w3c/web-platform-tests/background-fetch [ Skip ]
 
 # We fail this reftest
-imported/w3c/web-platform-tests/encoding/eof-shift_jis.html [ ImageOnlyFailure ]
+webkit.org/b/179881 imported/w3c/web-platform-tests/encoding/eof-shift_jis.html [ ImageOnlyFailure ]
 
 # These tests are so slow that on debug builds they time out even if marked Slow, so skip them
 [ Debug ] imported/w3c/web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-cseuckr.html [ Skip ]


Modified: trunk/LayoutTests/platform/wpe/TestExpectations (225108 => 225109)

--- trunk/LayoutTests/platform/wpe/TestExpectations	2017-11-23 09:17:08 UTC (rev 225108)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2017-11-23 10:31:07 UTC (rev 225109)
@@ -213,6 +213,39 @@
 imported/w3c/web-platform-tests/dom/nodes/Document-constructor-svg.svg [ Timeout ]
 
 
+# WPT: cssom
+# ==
+imported/w3c/web-platform-tests/cssom [ Pass ]
+
+
+# WPT: domparsing
+# ===
+imported/w3c/web-platform-tests/domparsing [ Pass ]
+
+
+# WPT: encoding
+# =
+imported/w3c/web-platform-tests/encoding [ Pass ]
+
+# Platform-neutral expectations
+# -
+webkit.org/b/179881 imported/w3c/web-platform-tests/encoding/eof-shift_jis.html [ ImageOnlyFailure ]
+
+
+# WPT: FileAPI
+# 
+imported/w3c/web-platform-tests/FileAPI [ Pass ]
+
+# Platform-neutral expectations
+# -
+webkit.org/b/172099 imported/w3c/web-platform-tests/FileAPI/url/url_xmlhttprequest_img.html [ ImageOnlyFailure ]
+
+
+# WPT: url
+# 
+imported/w3c/web-platform-tests/url [ Pass ]
+
+
 # WPT: XMLHttpRequest
 # ===
 imported/w3c/web-platform-tests/XMLHttpRequest [ Pass ]


Added: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt (0 => 225109)

--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt	(rev 0)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt	2017-11-23 10:31:07 UTC (rev 225109)
@@ -0,0 +1,9 @@
+
+PASS "toNativeLineEndings" should not be supported 
+FAIL "FileError" should not be supported assert_false: expected false got true
+PASS "FileException" should not be supported 
+PASS Blob should not support slice prefixed 
+PASS BlobBuilder should not be supported. 
+PASS createFor method should not be supported 
+PASS Blob.close() should not be supported 
+






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


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

2017-11-23 Thread antti
Title: [225110] trunk/Source/WebCore








Revision 225110
Author an...@apple.com
Date 2017-11-23 02:45:26 -0800 (Thu, 23 Nov 2017)


Log Message
RenderBlockFlow::layoutRunsAndFloatsInRange is O(n^2) for runs of inlines without any text
https://bugs.webkit.org/show_bug.cgi?id=179950

Reviewed by Simon Fraser.

It calls createBidiRunsForLine for each line. createBidiRunsForLine traverses past the end of the line until
it finds the end of the current bidi run. If there is no text in the flow, it never finds anything and traverses
the entire flow. This is O(n^2) for the number of renderers in the flow.

Tested by PerformanceTests/Layout/inline-layout-no-text.html

* platform/text/BidiResolver.h:
(WebCore::BidiResolverBase::needsContinuePastEnd const):
(WebCore::BidiResolverBase::needsContinuePastEndInternal const):
(WebCore::DerivedClass>::createBidiRunsForLine):

When past end of line call needsContinuePastEnd() to see if we need to continue searching for the end of the bidi run.

* rendering/InlineIterator.h:
(WebCore::InlineBidiResolver::needsContinuePastEndInternal const):

InlineBidiResolver only returns runs up to the last renderer on the line and can bail out.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/text/BidiResolver.h
trunk/Source/WebCore/rendering/InlineIterator.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225109 => 225110)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 10:31:07 UTC (rev 225109)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 10:45:26 UTC (rev 225110)
@@ -1,3 +1,28 @@
+2017-11-23  Antti Koivisto  
+
+RenderBlockFlow::layoutRunsAndFloatsInRange is O(n^2) for runs of inlines without any text
+https://bugs.webkit.org/show_bug.cgi?id=179950
+
+Reviewed by Simon Fraser.
+
+It calls createBidiRunsForLine for each line. createBidiRunsForLine traverses past the end of the line until
+it finds the end of the current bidi run. If there is no text in the flow, it never finds anything and traverses
+the entire flow. This is O(n^2) for the number of renderers in the flow.
+
+Tested by PerformanceTests/Layout/inline-layout-no-text.html
+
+* platform/text/BidiResolver.h:
+(WebCore::BidiResolverBase::needsContinuePastEnd const):
+(WebCore::BidiResolverBase::needsContinuePastEndInternal const):
+(WebCore::DerivedClass>::createBidiRunsForLine):
+
+When past end of line call needsContinuePastEnd() to see if we need to continue searching for the end of the bidi run.
+
+* rendering/InlineIterator.h:
+(WebCore::InlineBidiResolver::needsContinuePastEndInternal const):
+
+InlineBidiResolver only returns runs up to the last renderer on the line and can bail out.
+
 2017-11-23  Zan Dobersek  
 
 [CoordGraphics] Replace CoordinatedSurface, ThreadSafeCoordinatedSurface with CoordinatedBuffer


Modified: trunk/Source/WebCore/platform/text/BidiResolver.h (225109 => 225110)

--- trunk/Source/WebCore/platform/text/BidiResolver.h	2017-11-23 10:31:07 UTC (rev 225109)
+++ trunk/Source/WebCore/platform/text/BidiResolver.h	2017-11-23 10:45:26 UTC (rev 225110)
@@ -245,6 +245,7 @@
 // FIXME: Instead of InlineBidiResolvers subclassing this method, we should
 // pass in some sort of Traits object which knows how to create runs for appending.
 void appendRun() { static_cast(*this).appendRunInternal(); }
+bool needsContinuePastEnd() const { return static_cast(*this).needsContinuePastEndInternal(); }
 
 Iterator m_current;
 // sor and eor are "start of run" and "end of run" respectively and correpond
@@ -277,6 +278,7 @@
 void reorderRunsFromLevels();
 void incrementInternal() { m_current.increment(); }
 void appendRunInternal();
+bool needsContinuePastEndInternal() const { return true; }
 
 Vector m_currentExplicitEmbeddingSequence;
 };
@@ -292,6 +294,7 @@
 
 void incrementInternal();
 void appendRunInternal();
+bool needsContinuePastEndInternal() const;
 Vector& isolatedRuns() { return m_isolatedRuns; }
 
 private:
@@ -880,7 +883,7 @@
 break;
 }
 
-if (pastEnd && m_eor == m_current) {
+if (pastEnd && (m_eor == m_current || !needsContinuePastEnd())) {
 if (!m_reachedEndOfLine) {
 m_eor = endOfLine;
 switch (m_status.eor) {


Modified: trunk/Source/WebCore/rendering/InlineIterator.h (225109 => 225110)

--- trunk/Source/WebCore/rendering/InlineIterator.h	2017-11-23 10:31:07 UTC (rev 225109)
+++ trunk/Source/WebCore/rendering/InlineIterator.h	2017-11-23 10:45:26 UTC (rev 225110)
@@ -586,4 +586,11 @@
 m_status.eor = U_OTHER_NEUTRAL;
 }
 
+template<>
+inline bool InlineBidiResolver::needsContinuePastEndInternal() const
+{
+// We don't collect runs beyond the endOfLine renderer. Stop traversing when the iterator moves to the next renderer to prevent O(n^2).
+return m_current.renderer() == endOfLi

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

2017-11-23 Thread zandobersek
Title: [225111] trunk/Source/WebCore








Revision 225111
Author zandober...@gmail.com
Date 2017-11-23 03:00:32 -0800 (Thu, 23 Nov 2017)


Log Message
[CoordGraphics] Early tile buffer update in TiledBackingStore::createTiles() is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=179968

Reviewed by Carlos Garcia Campos.

Under CoordinatedGraphicsLayer::updateContentBuffers(), the TiledBackingStore
object has the createTilesIfNeeded() method invoked, if necessary. This
invokes createTiles(), where the edge tiles are resized if necessary, and
the missing tiles are created. If any of those two cases is fulfilled, the
updateTileBuffers() method is invoked, updating any dirty tiles (i.e. the
ones that were resized or newly-created).

This specific invocation of updateTileBuffers() is not needed since it's the
very next method that's invoked on the TiledBackingStore object by
CoordinatedGraphicsLayer::updateContentBuffers(). It's therefore removed,
and the resizeEdgeTiles() method is changed to not return any value.

No new tests -- no change in behavior.

* platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::resizeEdgeTiles):
* platform/graphics/texmap/coordinated/TiledBackingStore.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225110 => 225111)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 10:45:26 UTC (rev 225110)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 11:00:32 UTC (rev 225111)
@@ -1,3 +1,29 @@
+2017-11-23  Zan Dobersek  
+
+[CoordGraphics] Early tile buffer update in TiledBackingStore::createTiles() is unnecessary
+https://bugs.webkit.org/show_bug.cgi?id=179968
+
+Reviewed by Carlos Garcia Campos.
+
+Under CoordinatedGraphicsLayer::updateContentBuffers(), the TiledBackingStore
+object has the createTilesIfNeeded() method invoked, if necessary. This
+invokes createTiles(), where the edge tiles are resized if necessary, and
+the missing tiles are created. If any of those two cases is fulfilled, the
+updateTileBuffers() method is invoked, updating any dirty tiles (i.e. the
+ones that were resized or newly-created).
+
+This specific invocation of updateTileBuffers() is not needed since it's the
+very next method that's invoked on the TiledBackingStore object by
+CoordinatedGraphicsLayer::updateContentBuffers(). It's therefore removed,
+and the resizeEdgeTiles() method is changed to not return any value.
+
+No new tests -- no change in behavior.
+
+* platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
+(WebCore::TiledBackingStore::createTiles):
+(WebCore::TiledBackingStore::resizeEdgeTiles):
+* platform/graphics/texmap/coordinated/TiledBackingStore.h:
+
 2017-11-23  Antti Koivisto  
 
 RenderBlockFlow::layoutRunsAndFloatsInRange is O(n^2) for runs of inlines without any text


Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp (225110 => 225111)

--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp	2017-11-23 10:45:26 UTC (rev 225110)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp	2017-11-23 11:00:32 UTC (rev 225111)
@@ -191,9 +191,8 @@
 
 // Resize tiles at the edge in case the contents size has changed, but only do so
 // after having dropped tiles outside the keep rect.
-bool didResizeTiles = false;
 if (previousRect != m_rect)
-didResizeTiles = resizeEdgeTiles();
+resizeEdgeTiles();
 
 // Search for the tile position closest to the viewport center that does not yet contain a tile.
 // Which position is considered the closest depends on the tileDistance function.
@@ -231,10 +230,6 @@
 }
 requiredTileCount -= tilesToCreateCount;
 
-// Paint the content of the newly created tiles or resized tiles.
-if (tilesToCreateCount || didResizeTiles)
-updateTileBuffers();
-
 // Re-call createTiles on a timer to cover the visible area with the newest shortest distance.
 m_pendingTileCreation = requiredTileCount;
 if (m_pendingTileCreation)
@@ -328,9 +323,8 @@
 ASSERT(coverRect.isEmpty() || keepRect.contains(coverRect));
 }
 
-bool TiledBackingStore::resizeEdgeTiles()
+void TiledBackingStore::resizeEdgeTiles()
 {
-bool wasResized = false;
 Vector tilesToRemove;
 for (auto& tile : m_tiles.values()) {
 Tile::Coordinate tileCoordinate = tile->coordinate();
@@ -338,16 +332,12 @@
 IntRect expectedTileRect = tileRectForCoordinate(tileCoordinate);
 if (expectedTileRect.isEmpty())
 tilesToRemove.append(tileCoordinate);
-else if (expect

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

2017-11-23 Thread zandobersek
Title: [225112] trunk/Source/WebCore








Revision 225112
Author zandober...@gmail.com
Date 2017-11-23 03:01:11 -0800 (Thu, 23 Nov 2017)


Log Message
[CoordGraphics] TiledBackingStore: use a reference to the client
https://bugs.webkit.org/show_bug.cgi?id=179969

Reviewed by Carlos Garcia Campos.

TiledBackingStore should keep a C++ reference to the TiledBackingStoreClient
object, and not a pointer. client() method is updated to reflect that, and
uses of this method and the member variable are updated accordingly.

No new tests -- no change in behavior.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::createBackingStore):
* platform/graphics/texmap/coordinated/Tile.cpp:
(WebCore::Tile::~Tile):
(WebCore::Tile::updateBackBuffer):
(WebCore::Tile::paintToSurfaceContext):
* platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::updateTileBuffers):
(WebCore::TiledBackingStore::createTiles):
* platform/graphics/texmap/coordinated/TiledBackingStore.h:
(WebCore::TiledBackingStore::client):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/Tile.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/TiledBackingStore.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225111 => 225112)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 11:00:32 UTC (rev 225111)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 11:01:11 UTC (rev 225112)
@@ -1,5 +1,31 @@
 2017-11-23  Zan Dobersek  
 
+[CoordGraphics] TiledBackingStore: use a reference to the client
+https://bugs.webkit.org/show_bug.cgi?id=179969
+
+Reviewed by Carlos Garcia Campos.
+
+TiledBackingStore should keep a C++ reference to the TiledBackingStoreClient
+object, and not a pointer. client() method is updated to reflect that, and
+uses of this method and the member variable are updated accordingly.
+
+No new tests -- no change in behavior.
+
+* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+(WebCore::CoordinatedGraphicsLayer::createBackingStore):
+* platform/graphics/texmap/coordinated/Tile.cpp:
+(WebCore::Tile::~Tile):
+(WebCore::Tile::updateBackBuffer):
+(WebCore::Tile::paintToSurfaceContext):
+* platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
+(WebCore::TiledBackingStore::TiledBackingStore):
+(WebCore::TiledBackingStore::updateTileBuffers):
+(WebCore::TiledBackingStore::createTiles):
+* platform/graphics/texmap/coordinated/TiledBackingStore.h:
+(WebCore::TiledBackingStore::client):
+
+2017-11-23  Zan Dobersek  
+
 [CoordGraphics] Early tile buffer update in TiledBackingStore::createTiles() is unnecessary
 https://bugs.webkit.org/show_bug.cgi?id=179968
 


Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (225111 => 225112)

--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2017-11-23 11:00:32 UTC (rev 225111)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2017-11-23 11:01:11 UTC (rev 225112)
@@ -838,7 +838,7 @@
 
 void CoordinatedGraphicsLayer::createBackingStore()
 {
-m_mainBackingStore = std::make_unique(this, effectiveContentsScale());
+m_mainBackingStore = std::make_unique(*this, effectiveContentsScale());
 m_mainBackingStore->setSupportsAlpha(!contentsOpaque());
 }
 


Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/Tile.cpp (225111 => 225112)

--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/Tile.cpp	2017-11-23 11:00:32 UTC (rev 225111)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/Tile.cpp	2017-11-23 11:01:11 UTC (rev 225112)
@@ -48,7 +48,7 @@
 Tile::~Tile()
 {
 if (m_ID != InvalidTileID)
-m_tiledBackingStore.client()->removeTile(m_ID);
+m_tiledBackingStore.client().removeTile(m_ID);
 }
 
 bool Tile::isDirty() const
@@ -72,7 +72,7 @@
 
 SurfaceUpdateInfo updateInfo;
 
-if (!m_tiledBackingStore.client()->paintToSurface(m_dirtyRect.size(), updateInfo.atlasID, updateInfo.surfaceOffset, *this))
+if (!m_tiledBackingStore.client().paintToSurface(m_dirtyRect.size(), updateInfo.atlasID, updateInfo.surfaceOffset, *this))
 return false;
 
 updateInfo.updateRect = m_dirtyRect;
@@ -84,9 +84,9 @@
 // We may get an invalid ID due to wrap-around on overflow.
 if (m_ID == InvalidTileID)
 m_ID = id++;
-m_tiledBackingStore.client()->createTile(m_ID, m_tiledBackingStore.contentsScale());
+m_tiledBackingStore.client().createTile(m_ID, m_tile

[webkit-changes] [225113] trunk/Source

2017-11-23 Thread zandobersek
Title: [225113] trunk/Source








Revision 225113
Author zandober...@gmail.com
Date 2017-11-23 03:04:05 -0800 (Thu, 23 Nov 2017)


Log Message
[CoordGraphics] Remove relay CoordinatedBuffer::Client implementations
https://bugs.webkit.org/show_bug.cgi?id=179970

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Drop CoordinatedBuffer::painToSurface() in favor of a simpler
GraphicsContext reference getter that returns a reference to the
GraphicsContext object of the internal ImageBuffer.

Remove the ImageBackingSurfaceClient class that only acted as a relay
that enabled a CoordinatedBuffer to draw an image through its context.
Instead, we use the GraphicsContext of the allocated CoordinatedBuffer
to draw the image directly. We still use a rectangle whose size
matches the size of the given Image as the clipping area and as the
source and destination rectangle for the image.

No new tests -- no change in behavior.

* platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp:
(WebCore::CoordinatedBuffer::context):
(WebCore::CoordinatedBuffer::paintToSurface): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedBuffer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::update):
(WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient): Deleted.

Source/WebKit:

Drop the helper UpdateAtlasSurfaceClient class and instead directly use
the CoordinatedBuffer's GraphicsContext to perform clip and translation
operations based on the allocated rectangle, to pre-fill the target rect
with transparent color in case the alpha channel is supported, and to
then invoke CoordinatedBuffer::Client::paintToSurfaceContext() method,
passing the GraphicsContext as the argument.

* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::paintOnAvailableBuffer):
(): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.h
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225112 => 225113)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 11:01:11 UTC (rev 225112)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 11:04:05 UTC (rev 225113)
@@ -1,5 +1,33 @@
 2017-11-23  Zan Dobersek  
 
+[CoordGraphics] Remove relay CoordinatedBuffer::Client implementations
+https://bugs.webkit.org/show_bug.cgi?id=179970
+
+Reviewed by Carlos Garcia Campos.
+
+Drop CoordinatedBuffer::painToSurface() in favor of a simpler
+GraphicsContext reference getter that returns a reference to the
+GraphicsContext object of the internal ImageBuffer.
+
+Remove the ImageBackingSurfaceClient class that only acted as a relay
+that enabled a CoordinatedBuffer to draw an image through its context.
+Instead, we use the GraphicsContext of the allocated CoordinatedBuffer
+to draw the image directly. We still use a rectangle whose size
+matches the size of the given Image as the clipping area and as the
+source and destination rectangle for the image.
+
+No new tests -- no change in behavior.
+
+* platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp:
+(WebCore::CoordinatedBuffer::context):
+(WebCore::CoordinatedBuffer::paintToSurface): Deleted.
+* platform/graphics/texmap/coordinated/CoordinatedBuffer.h:
+* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
+(WebCore::CoordinatedImageBacking::update):
+(WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient): Deleted.
+
+2017-11-23  Zan Dobersek  
+
 [CoordGraphics] TiledBackingStore: use a reference to the client
 https://bugs.webkit.org/show_bug.cgi?id=179969
 


Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp (225112 => 225113)

--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp	2017-11-23 11:01:11 UTC (rev 225112)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp	2017-11-23 11:04:05 UTC (rev 225113)
@@ -50,14 +50,9 @@
 
 CoordinatedBuffer::~CoordinatedBuffer() = default;
 
-void CoordinatedBuffer::paintToSurface(const IntRect& rect, Client& client)
+GraphicsContext& CoordinatedBuffer::context()
 {
-GraphicsContext& context = m_imageBuffer->context();
-context.save();
-context.clip(rect);
-context.translate(rect.x(), rect.y());
-client.paintToSurfaceContext(context);
-context.restore();
+return m_imageBuffer->context();
 }
 
 RefPtr CoordinatedBuffer::uploadImage()


Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.h (2251

[webkit-changes] [225114] trunk/LayoutTests

2017-11-23 Thread Ms2ger
Title: [225114] trunk/LayoutTests








Revision 225114
Author ms2...@igalia.com
Date 2017-11-23 05:09:26 -0800 (Thu, 23 Nov 2017)


Log Message
[WPE] Re-enable fast/dom/Document/CaretRangeFromPoint/replace-element.html.
https://bugs.webkit.org/show_bug.cgi?id=176820

Unreviewed test gardening.

The test started passing again in r221974.


* platform/wpe/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/wpe/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (225113 => 225114)

--- trunk/LayoutTests/ChangeLog	2017-11-23 11:04:05 UTC (rev 225113)
+++ trunk/LayoutTests/ChangeLog	2017-11-23 13:09:26 UTC (rev 225114)
@@ -1,5 +1,16 @@
 2017-11-23  Ms2ger  
 
+[WPE] Re-enable fast/dom/Document/CaretRangeFromPoint/replace-element.html.
+https://bugs.webkit.org/show_bug.cgi?id=176820
+
+Unreviewed test gardening.
+
+The test started passing again in r221974.
+
+* platform/wpe/TestExpectations:
+
+2017-11-23  Ms2ger  
+
 [WPE] Enable some more wpt tests.
 https://bugs.webkit.org/show_bug.cgi?id=179939
 


Modified: trunk/LayoutTests/platform/wpe/TestExpectations (225113 => 225114)

--- trunk/LayoutTests/platform/wpe/TestExpectations	2017-11-23 11:04:05 UTC (rev 225113)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2017-11-23 13:09:26 UTC (rev 225114)
@@ -903,8 +903,6 @@
 # Apparently fails on Mac, but I don't know for what reasons. It passes on GTK/WPE.
 webkit.org/b/138676 imported/w3c/canvas/2d.line.cap.round.html [ Pass ]
 
-webkit.org/b/176820 fast/dom/Document/CaretRangeFromPoint/replace-element.html [ Failure ]
-
 # Accessibility support isn't glued to any API yet.
 Bug(WPE) accessibility/ [ Skip ]
 Bug(WPE) perf/accessibility-title-ui-element.html [ Failure ]






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


[webkit-changes] [225115] trunk/Source

2017-11-23 Thread zandobersek
Title: [225115] trunk/Source








Revision 225115
Author zandober...@gmail.com
Date 2017-11-23 06:19:52 -0800 (Thu, 23 Nov 2017)


Log Message
[CoordGraphics] Simplify CoordinatedGraphicsLayer's content buffer updates
https://bugs.webkit.org/show_bug.cgi?id=179972

Reviewed by Carlos Garcia Campos.

Source/WebCore:

During layer flushes, when a CoordinatedGraphicsLayer's tiled backing store
has dirty tiles that need to be updated, the following chain of calls would
be invoked to perform the painting, starting in
CoordinatedGraphicsLayer::updateContentBuffers():
|- CoordinatedGraphicsLayer::updateContentBuffers()
 |- TiledBackingStore::updateTileBuffers()
  |- Tile::updateBackBuffer()
   |- CoordinatedGraphicsLayer::paintToSurface()
|- CompositingCoordinator::paintToSurface()
 |- UpdateAtlas::paintOnAvailableBuffer()
  |- ThreadSafeCoordinatedSurface::paintToSurface()
   |- Tile::paintToSurfaceContext()
|- CoordinatedGraphicsLayer::tiledBackingStorePaint()
 |- GraphicsLayer::paintGraphicsLayerContents()

That's a bit much.

In CoordinatedGraphicsLayer::updateContentBuffers(), we now first retrieve
all the dirty layers in our TiledBackingStore. We then iterate through them,
first establishing their ID and then retrieving an available CoordinatedBuffer
that we can use for painting. The CoordinatedBuffer is retrieved through
CompositingCoordinator, which is still caching these buffers via UpdateAtlas
objects.

With a CoordinatedBuffer available, we can then proceed with painting. The
painting context has to be properly set up to paint into the correct area of
the given buffer, and the alpha channel, if necessary, has to be addressed.
After properly positioning and scaling ourselves on the given context, we
can proceed with the GraphicsLayer::paintGraphicsLayerContents() call.

What's left is filling out the missing SurfaceUpdateInfo information which is
then passed to the updateTile() method that properly registers the tile
update we've just performed. The tile itself is marked clean. After the
iteration, we call the didUpdateTileBuffers() method in case any successful
tile update was indeed performed, incrementing the repaint counter.

That's it -- we clipped 8 calls from the call chain. We can now also remove
the CoordinatedBuffer::Client interface, as well as slim down the
TiledBackingStore interface. The Tile class is cleaned up a bit, with methods
shifted into a more sensible order.

No new tests -- no change in functionality.

* platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp:
* platform/graphics/texmap/coordinated/CoordinatedBuffer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::didUpdateTileBuffers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaint): Deleted.
(WebCore::CoordinatedGraphicsLayer::paintToSurface): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/Tile.cpp:
(WebCore::Tile::ensureTileID):
(WebCore::Tile::isDirty const):
(WebCore::Tile::invalidate):
(WebCore::Tile::markClean):
(WebCore::Tile::updateBackBuffer): Deleted.
(WebCore::Tile::paintToSurfaceContext): Deleted.
* platform/graphics/texmap/coordinated/Tile.h:
(WebCore::Tile::tileID const):
(WebCore::Tile::dirtyRect const):
* platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::dirtyTiles):
(WebCore::TiledBackingStore::updateTileBuffers): Deleted.
* platform/graphics/texmap/coordinated/TiledBackingStore.h:
* platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:

Source/WebKit:

In CompositingCoordinator, add the getCoordinatedBuffer() method, replacing
paintToSurface(). The new method traverses the list of UpdateAtlases and
returns any CoordinatedBuffer object that was free to use. If none exist,
a new UpdateAtlas object is created, and its CoordinatedBuffer is returned.

In  UpdateAtlas, the paintOnAvailableBuffer() method is replaced with
getCoordinatedBuffer(). The latter allocates the necessary area but then
returns a reference to the CoordinatedBuffer buffer, along with the atlas ID
and the allocated rectangle information, and does not invoke any painting
operation like paintOnAvailableBuffer() did.

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::getCoordinatedBuffer):
(WebKit::CompositingCoordinator::paintToSurface): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp:
(WebKit::UpdateAtlas::getCoordinatedBuffer):
(WebKit::UpdateAtlas::paintOnAvailableBuffer): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBuffer.cpp
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedB

[webkit-changes] [225116] trunk/LayoutTests

2017-11-23 Thread Ms2ger
Title: [225116] trunk/LayoutTests








Revision 225116
Author ms2...@igalia.com
Date 2017-11-23 07:50:13 -0800 (Thu, 23 Nov 2017)


Log Message
[WPE] Mark media/media-source/media-source-paint-to-canvas.html as passing.
https://bugs.webkit.org/show_bug.cgi?id=178706

Unreviewed test gardening.

It has passed since r225060.


* platform/wpe/TestExpectations:

[WPE] Re-enable fast/dom/Document/CaretRangeFromPoint/replace-element.html.
https://bugs.webkit.org/show_bug.cgi?id=176820

Unreviewed test gardening.

The test started passing again in r221974.

* platform/wpe/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/wpe/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (225115 => 225116)

--- trunk/LayoutTests/ChangeLog	2017-11-23 14:19:52 UTC (rev 225115)
+++ trunk/LayoutTests/ChangeLog	2017-11-23 15:50:13 UTC (rev 225116)
@@ -1,5 +1,14 @@
 2017-11-23  Ms2ger  
 
+[WPE] Mark media/media-source/media-source-paint-to-canvas.html as passing.
+https://bugs.webkit.org/show_bug.cgi?id=178706
+
+Unreviewed test gardening.
+
+It has passed since r225060.
+
+* platform/wpe/TestExpectations:
+
 [WPE] Re-enable fast/dom/Document/CaretRangeFromPoint/replace-element.html.
 https://bugs.webkit.org/show_bug.cgi?id=176820
 


Modified: trunk/LayoutTests/platform/wpe/TestExpectations (225115 => 225116)

--- trunk/LayoutTests/platform/wpe/TestExpectations	2017-11-23 14:19:52 UTC (rev 225115)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2017-11-23 15:50:13 UTC (rev 225116)
@@ -1036,8 +1036,6 @@
 webkit.org/b/178705 fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html [ Failure ]
 webkit.org/b/178705 webgl/1.0.2/conformance/rendering/multisample-corruption.html [ Failure ]
 
-webkit.org/b/178706 media/media-source/media-source-paint-to-canvas.html [ Failure ]
-
 webkit.org/b/179957 crypto/workers/subtle/aes-cbc-import-key-decrypt.html [ Pass Crash ]
 
 webkit.org/b/179759 js/dom/removing-Cf-characters.html [ Pass Crash ]






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


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

2017-11-23 Thread cdumez
Title: [225118] trunk/Source/WebKit








Revision 225118
Author cdu...@apple.com
Date 2017-11-23 09:51:46 -0800 (Thu, 23 Nov 2017)


Log Message
WebSWServerConnection should register/unregister itself with the StorageProcess
https://bugs.webkit.org/show_bug.cgi?id=179965

Reviewed by Darin Adler.

WebSWServerConnection should register/unregister itself with the StorageProcess instead of relying
on StorageToWebProcessConnection to do so on its behalf. This is less error-prone.

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::~WebSWServerConnection):
* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
(WebKit::StorageToWebProcessConnection::removeSWServerConnection):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp
trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (225117 => 225118)

--- trunk/Source/WebKit/ChangeLog	2017-11-23 17:32:42 UTC (rev 225117)
+++ trunk/Source/WebKit/ChangeLog	2017-11-23 17:51:46 UTC (rev 225118)
@@ -1,3 +1,21 @@
+2017-11-23  Chris Dumez  
+
+WebSWServerConnection should register/unregister itself with the StorageProcess
+https://bugs.webkit.org/show_bug.cgi?id=179965
+
+Reviewed by Darin Adler.
+
+WebSWServerConnection should register/unregister itself with the StorageProcess instead of relying
+on StorageToWebProcessConnection to do so on its behalf. This is less error-prone.
+
+* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
+(WebKit::WebSWServerConnection::WebSWServerConnection):
+(WebKit::WebSWServerConnection::~WebSWServerConnection):
+* StorageProcess/StorageToWebProcessConnection.cpp:
+(WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
+(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
+(WebKit::StorageToWebProcessConnection::removeSWServerConnection):
+
 2017-11-23  Darin Adler  
 
 Reduce WTF::String operations that do unnecessary Unicode operations instead of ASCII


Modified: trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp (225117 => 225118)

--- trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp	2017-11-23 17:32:42 UTC (rev 225117)
+++ trunk/Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp	2017-11-23 17:51:46 UTC (rev 225118)
@@ -61,10 +61,12 @@
 , m_sessionID(sessionID)
 , m_contentConnection(connection)
 {
+StorageProcess::singleton().registerSWServerConnection(*this);
 }
 
 WebSWServerConnection::~WebSWServerConnection()
 {
+StorageProcess::singleton().unregisterSWServerConnection(*this);
 }
 
 void WebSWServerConnection::disconnectedFromWebProcess()


Modified: trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp (225117 => 225118)

--- trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp	2017-11-23 17:32:42 UTC (rev 225117)
+++ trunk/Source/WebKit/StorageProcess/StorageToWebProcessConnection.cpp	2017-11-23 17:51:46 UTC (rev 225118)
@@ -60,11 +60,6 @@
 StorageToWebProcessConnection::~StorageToWebProcessConnection()
 {
 m_connection->invalidate();
-
-#if ENABLE(SERVICE_WORKER)
-for (auto& connection : m_swConnections.values())
-StorageProcess::singleton().unregisterSWServerConnection(*connection);
-#endif
 }
 
 void StorageToWebProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
@@ -149,10 +144,8 @@
 ASSERT(!m_swConnections.contains(serverConnectionIdentifier));
 
 auto addResult = m_swConnections.add(serverConnectionIdentifier, WTFMove(connection));
-ASSERT(addResult.isNewEntry);
+ASSERT_UNUSED(addResult, addResult.isNewEntry);
 
-StorageProcess::singleton().registerSWServerConnection(*(addResult.iterator->value));
-
 if (!StorageProcess::singleton().globalServerToContextConnection())
 StorageProcess::singleton().createServerToContextConnection();
 }
@@ -162,7 +155,6 @@
 ASSERT(m_swConnections.contains(serverConnectionIdentifier));
 
 auto connection = m_swConnections.take(serverConnectionIdentifier);
-StorageProcess::singleton().unregisterSWServerConnection(*connection);
 connection->disconnectedFromWebProcess();
 }
 






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


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

2017-11-23 Thread dino
Title: [225119] trunk/Source/WebCore








Revision 225119
Author d...@apple.com
Date 2017-11-23 11:00:20 -0800 (Thu, 23 Nov 2017)


Log Message
Add a base class for HTMLCanvasElement and OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=179701


Post-review updates from Darin Adler review.

* html/CanvasBase.cpp:
(WebCore::CanvasBase::asHTMLCanvasElement): Deleted. Replaced by having the call
sites get the reference and do the correct downcast<>.
* html/CanvasBase.h: Remove asHTMLCanvasElement. Add pure virtual ref/deref functions
so they can be overridden by subclasses. Unfortunately they can't be called ref/deref otherwise
they conflict with Node.
* html/HTMLCanvasElement.h: Add the type traits, so is(canvasBase) will
work.
* html/HTMLTagNames.in: Specify the  element as having custom type traits.
* html/OffscreenCanvas.h: Lots of overrides to finals.
* html/canvas/CanvasRenderingContext.cpp: Use canvasBase.de/refCanvasBase rather than
casting.
(WebCore::CanvasRenderingContext::ref):
(WebCore::CanvasRenderingContext::deref):
* html/canvas/CanvasRenderingContext.h: Lots of overrides to finals.
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/ImageBitmapRenderingContext.cpp:
(WebCore::ImageBitmapRenderingContext::canvas const):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::canvas):
* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::canvas const):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::recordCanvasAction):
* inspector/agents/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::recordCanvasAction):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/CanvasBase.cpp
trunk/Source/WebCore/html/CanvasBase.h
trunk/Source/WebCore/html/HTMLCanvasElement.h
trunk/Source/WebCore/html/HTMLTagNames.in
trunk/Source/WebCore/html/OffscreenCanvas.h
trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp
trunk/Source/WebCore/html/canvas/CanvasRenderingContext.h
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h
trunk/Source/WebCore/html/canvas/ImageBitmapRenderingContext.cpp
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
trunk/Source/WebCore/html/canvas/WebGPURenderingContext.cpp
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
trunk/Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225118 => 225119)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 17:51:46 UTC (rev 225118)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 19:00:20 UTC (rev 225119)
@@ -1,3 +1,39 @@
+2017-11-22  Dean Jackson  
+
+Add a base class for HTMLCanvasElement and OffscreenCanvas
+https://bugs.webkit.org/show_bug.cgi?id=179701
+
+
+Post-review updates from Darin Adler review.
+
+* html/CanvasBase.cpp:
+(WebCore::CanvasBase::asHTMLCanvasElement): Deleted. Replaced by having the call
+sites get the reference and do the correct downcast<>.
+* html/CanvasBase.h: Remove asHTMLCanvasElement. Add pure virtual ref/deref functions
+so they can be overridden by subclasses. Unfortunately they can't be called ref/deref otherwise
+they conflict with Node.
+* html/HTMLCanvasElement.h: Add the type traits, so is(canvasBase) will
+work.
+* html/HTMLTagNames.in: Specify the  element as having custom type traits.
+* html/OffscreenCanvas.h: Lots of overrides to finals.
+* html/canvas/CanvasRenderingContext.cpp: Use canvasBase.de/refCanvasBase rather than
+casting.
+(WebCore::CanvasRenderingContext::ref):
+(WebCore::CanvasRenderingContext::deref):
+* html/canvas/CanvasRenderingContext.h: Lots of overrides to finals.
+* html/canvas/CanvasRenderingContext2D.h:
+* html/canvas/ImageBitmapRenderingContext.cpp:
+(WebCore::ImageBitmapRenderingContext::canvas const):
+* html/canvas/WebGLRenderingContextBase.cpp:
+(WebCore::WebGLRenderingContextBase::create):
+(WebCore::WebGLRenderingContextBase::canvas):
+* html/canvas/WebGPURenderingContext.cpp:
+(WebCore::WebGPURenderingContext::canvas const):
+* inspector/InspectorInstrumentation.h:
+(WebCore::InspectorInstrumentation::recordCanvasAction):
+* inspector/agents/InspectorCanvasAgent.cpp:
+(WebCore::InspectorCanvasAgent::recordCanvasAction):
+
 2017-11-23  Darin Adler  
 
 Reduce WTF::String operations that do unnecessary Unicode operations instead of ASCII


Modified: trunk/Source/WebCore/html/CanvasBase.cpp (225118 => 225119)

--- trunk/Source/WebCore/html/CanvasBase.cpp	2017-11-23 17:51:46 UTC (rev 225118)
+++ trunk/Source/WebCore/html/CanvasBase.cpp	2017-11-23 19:00:20 UTC (rev 225119)
@@ -35,11 +35,4 @@
 {
 }
 
-HTMLCanvasElement* CanvasBase::asHTMLCanvasElement()
-{
-if (!isHTMLCanvasElement())
- 

[webkit-changes] [225120] trunk/Source

2017-11-23 Thread commit-queue
Title: [225120] trunk/Source








Revision 225120
Author commit-qu...@webkit.org
Date 2017-11-23 11:36:08 -0800 (Thu, 23 Nov 2017)


Log Message
Remove unneeded ScriptController::processingUserGesture() forwarding functions
https://bugs.webkit.org/show_bug.cgi?id=179954

Patch by Sam Weinig  on 2017-11-23
Reviewed by Darin Adler.

Replace ScriptController::processingUserGesture() and ScriptController::processingUserGestureForMedia()
with direct calls to the corresponding UserGestureIndicator functions.

Source/WebCore:

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::openPaymentSetup):
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::speak):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::processingUserGesture): Deleted.
(WebCore::ScriptController::processingUserGestureForMedia): Deleted.
* bindings/js/ScriptController.h:
* dom/Document.cpp:
(WebCore::Document::processingUserGestureForMedia const):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::handleDOMActivateEvent):
* html/FileInputType.cpp:
(WebCore::FileInputType::handleDOMActivateEvent):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::submitFromJavaScript):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::shouldOpenExternalURLsPolicyToApply):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::allowPopUp):
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):

Source/WebKit:

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::isProcessingUserGesture):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addResourceRequest):

Source/WebKitLegacy/mac:

* Plugins/WebPluginController.mm:
(-[WebPluginController processingUserGesture]):
* WebView/WebView.mm:
(-[WebView _isProcessingUserGesture]):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp
trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp
trunk/Source/WebCore/bindings/js/ScriptController.cpp
trunk/Source/WebCore/bindings/js/ScriptController.h
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp
trunk/Source/WebCore/html/ColorInputType.cpp
trunk/Source/WebCore/html/FileInputType.cpp
trunk/Source/WebCore/html/HTMLFormElement.cpp
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
trunk/Source/WebCore/loader/FrameLoader.cpp
trunk/Source/WebCore/page/DOMWindow.cpp
trunk/Source/WebCore/page/PointerLockController.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Plugins/WebPluginController.mm
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (225119 => 225120)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 19:00:20 UTC (rev 225119)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 19:36:08 UTC (rev 225120)
@@ -1,3 +1,46 @@
+2017-11-23  Sam Weinig  
+
+Remove unneeded ScriptController::processingUserGesture() forwarding functions
+https://bugs.webkit.org/show_bug.cgi?id=179954
+
+Reviewed by Darin Adler.
+
+Replace ScriptController::processingUserGesture() and ScriptController::processingUserGestureForMedia()
+with direct calls to the corresponding UserGestureIndicator functions.
+
+* Modules/applepay/ApplePaySession.cpp:
+(WebCore::ApplePaySession::create):
+(WebCore::ApplePaySession::openPaymentSetup):
+* Modules/speech/SpeechSynthesis.cpp:
+(WebCore::SpeechSynthesis::speak):
+* bindings/js/ScriptController.cpp:
+(WebCore::ScriptController::processingUserGesture): Deleted.
+(WebCore::ScriptController::processingUserGestureForMedia): Deleted.
+* bindings/js/ScriptController.h:
+* dom/Document.cpp:
+(WebCore::Document::processingUserGestureForMedia const):
+* html/BaseChooserOnlyDateAndTimeInputType.cpp:
+(WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
+* html/ColorInputType.cpp:
+(WebCore::ColorInputType::handleDOMActivateEvent):
+* html/FileInputType.cpp:
+(WebCore::FileInputType::handleDOMActivateEvent):
+* html/HTMLFormElement.cpp:
+(WebCore::HTMLFormElement::submitFromJavaScript):
+* html/HTMLPlugInImageElement.cpp:
+(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+(WebCore::HTMLPlugInImageE

[webkit-changes] [225121] trunk

2017-11-23 Thread simon . fraser
Title: [225121] trunk








Revision 225121
Author simon.fra...@apple.com
Date 2017-11-23 13:33:44 -0800 (Thu, 23 Nov 2017)


Log Message
Add support for CanvasPattern.setTransform()
https://bugs.webkit.org/show_bug.cgi?id=179935

Reviewed by Sam Weinig.

Source/WebCore:

Add support for setTransform() on CanvasPattern, per

It uses [MayThrowException] since the "validate and fixup" steps for DOMMatrix can throw
an exception.

Under the hood, the transform is just pushed onto Pattern as the patternSpaceTransform().

Minor cleanup in Pattern.

Test: fast/canvas/canvas-pattern-with-transform.html

* html/canvas/CanvasPattern.cpp:
(WebCore::CanvasPattern::setTransform):
* html/canvas/CanvasPattern.h:
* html/canvas/CanvasPattern.idl:
* platform/graphics/Pattern.h:

LayoutTests:

Moved the test previously known as canvas-pattern-transform.html to canvas-pattern-with-transform.html
and added a new test.

* fast/canvas/canvas-pattern-transform-expected.txt:
* fast/canvas/canvas-pattern-transform.html:
* fast/canvas/canvas-pattern-with-transform-expected.txt: Copied from LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt.
* fast/canvas/canvas-pattern-with-transform.html: Copied from LayoutTests/fast/canvas/canvas-pattern-transform.html.
* fast/canvas/canvas-pattern-with-transform.js: Renamed from LayoutTests/fast/canvas/canvas-pattern-transform.js.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt
trunk/LayoutTests/fast/canvas/canvas-pattern-transform.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/CanvasPattern.cpp
trunk/Source/WebCore/html/canvas/CanvasPattern.h
trunk/Source/WebCore/html/canvas/CanvasPattern.idl
trunk/Source/WebCore/platform/graphics/Pattern.h
trunk/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp


Added Paths

trunk/LayoutTests/fast/canvas/canvas-pattern-with-transform-expected.txt
trunk/LayoutTests/fast/canvas/canvas-pattern-with-transform.html
trunk/LayoutTests/fast/canvas/canvas-pattern-with-transform.js


Removed Paths

trunk/LayoutTests/fast/canvas/canvas-pattern-transform.js




Diff

Modified: trunk/LayoutTests/ChangeLog (225120 => 225121)

--- trunk/LayoutTests/ChangeLog	2017-11-23 19:36:08 UTC (rev 225120)
+++ trunk/LayoutTests/ChangeLog	2017-11-23 21:33:44 UTC (rev 225121)
@@ -1,3 +1,19 @@
+2017-11-23  Simon Fraser  
+
+Add support for CanvasPattern.setTransform()
+https://bugs.webkit.org/show_bug.cgi?id=179935
+
+Reviewed by Sam Weinig.
+
+Moved the test previously known as canvas-pattern-transform.html to canvas-pattern-with-transform.html
+and added a new test.
+
+* fast/canvas/canvas-pattern-transform-expected.txt:
+* fast/canvas/canvas-pattern-transform.html:
+* fast/canvas/canvas-pattern-with-transform-expected.txt: Copied from LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt.
+* fast/canvas/canvas-pattern-with-transform.html: Copied from LayoutTests/fast/canvas/canvas-pattern-transform.html.
+* fast/canvas/canvas-pattern-with-transform.js: Renamed from LayoutTests/fast/canvas/canvas-pattern-transform.js.
+
 2017-11-23  Ms2ger  
 
 [WPE] Mark media/media-source/media-source-paint-to-canvas.html as passing.


Modified: trunk/LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt (225120 => 225121)

--- trunk/LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt	2017-11-23 19:36:08 UTC (rev 225120)
+++ trunk/LayoutTests/fast/canvas/canvas-pattern-transform-expected.txt	2017-11-23 21:33:44 UTC (rev 225121)
@@ -1,18 +1,179 @@
-Series of tests to ensure correct behaviour on transform of a pattern
+PASS successfullyParsed is true
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+TEST COMPLETE
+PASS function () {
+ctx.setTransform({a: 1, m11: 11, b: 2, m12: 12, c: 3, m21: 21, d: 4, m22: 22, e: 5, m41: 41, f: 6, m42: 42});
+} threw exception TypeError: init.a and init.m11 do not match.
 
+Testing canvas repeat transform  pattern transform 
+Checking point 4 4
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 124 124
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 64 32
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 64 96
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 32 64
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 96 64
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 32 32
+PASS imgdata[0] is expectedRed
+PASS imgdata[1] is expectedGreen
+PASS imgdata[2] is expectedBlue
+Checking point 96 3

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

2017-11-23 Thread simon . fraser
Title: [225122] trunk/Source/WebCore








Revision 225122
Author simon.fra...@apple.com
Date 2017-11-23 14:20:09 -0800 (Thu, 23 Nov 2017)


Log Message
FELighting cleanup and optimization
https://bugs.webkit.org/show_bug.cgi?id=179933

Reviewed by Darin Adler.

Make FELighting about 25% faster by maintaining an "alpha" window of the alpha
values of the 9 pixels surrounding the current pixel, and sliding this window over
when moving to the next pixel. This avoids reading the same alpha values from the original
buffer multiple times.

Clean up LightSource and subclasses, adding SPECIALIZE_TYPE_TRAITS macros,
and turning updatePaintingData() into a function with no side effects that returns
the required data.

Remove explicit 'inline' keywords, allowing the compiler to make inlining decisions.

* platform/graphics/cpu/arm/filters/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
* platform/graphics/filters/DistantLightSource.cpp:
(WebCore::DistantLightSource::initPaintingData):
(WebCore::DistantLightSource::computePixelLightingData const):
(WebCore::DistantLightSource::updatePaintingData): Deleted.
* platform/graphics/filters/DistantLightSource.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::LightingData::interiorNormal const):
(WebCore::FELighting::setPixel):
(WebCore::FELighting::setPixelInternal):
(WebCore::FELighting::platformApplyGenericPaint):
(WebCore::FELighting::platformApplyGeneric):
(WebCore::FELighting::platformApply):
(WebCore::FELighting::drawLighting):
(WebCore::FELighting::inlineSetPixel): Deleted.
* platform/graphics/filters/FELighting.h:
(WebCore::FELighting::AlphaWindow::topLeft const):
(WebCore::FELighting::AlphaWindow::left const):
(WebCore::FELighting::AlphaWindow::bottomLeft const):
(WebCore::FELighting::AlphaWindow::top const):
(WebCore::FELighting::AlphaWindow::center const):
(WebCore::FELighting::AlphaWindow::bottom const):
(WebCore::FELighting::AlphaWindow::setTop):
(WebCore::FELighting::AlphaWindow::setCenter):
(WebCore::FELighting::AlphaWindow::setBottom):
(WebCore::FELighting::AlphaWindow::setTopRight):
(WebCore::FELighting::AlphaWindow::setRight):
(WebCore::FELighting::AlphaWindow::setBottomRight):
(WebCore::FELighting::AlphaWindow::shiftRow):
(WebCore::FELighting::AlphaWindow::shift):
* platform/graphics/filters/LightSource.h:
* platform/graphics/filters/PointLightSource.cpp:
(WebCore::PointLightSource::computePixelLightingData const):
(WebCore::PointLightSource::updatePaintingData): Deleted.
* platform/graphics/filters/PointLightSource.h:
* platform/graphics/filters/SpotLightSource.cpp:
(WebCore::SpotLightSource::initPaintingData):
(WebCore::SpotLightSource::computePixelLightingData const):
(WebCore::SpotLightSource::updatePaintingData): Deleted.
* platform/graphics/filters/SpotLightSource.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h
trunk/Source/WebCore/platform/graphics/filters/DistantLightSource.cpp
trunk/Source/WebCore/platform/graphics/filters/DistantLightSource.h
trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp
trunk/Source/WebCore/platform/graphics/filters/FELighting.h
trunk/Source/WebCore/platform/graphics/filters/LightSource.h
trunk/Source/WebCore/platform/graphics/filters/PointLightSource.cpp
trunk/Source/WebCore/platform/graphics/filters/PointLightSource.h
trunk/Source/WebCore/platform/graphics/filters/SpotLightSource.cpp
trunk/Source/WebCore/platform/graphics/filters/SpotLightSource.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (225121 => 225122)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 21:33:44 UTC (rev 225121)
+++ trunk/Source/WebCore/ChangeLog	2017-11-23 22:20:09 UTC (rev 225122)
@@ -1,5 +1,65 @@
 2017-11-23  Simon Fraser  
 
+FELighting cleanup and optimization
+https://bugs.webkit.org/show_bug.cgi?id=179933
+
+Reviewed by Darin Adler.
+
+Make FELighting about 25% faster by maintaining an "alpha" window of the alpha
+values of the 9 pixels surrounding the current pixel, and sliding this window over
+when moving to the next pixel. This avoids reading the same alpha values from the original
+buffer multiple times.
+
+Clean up LightSource and subclasses, adding SPECIALIZE_TYPE_TRAITS macros,
+and turning updatePaintingData() into a function with no side effects that returns
+the required data.
+
+Remove explicit 'inline' keywords, allowing the compiler to make inlining decisions.
+
+* platform/graphics/cpu/arm/filters/FELightingNEON.h:
+(WebCore::FELighting::platformApplyNeon):
+* platform/graphics/filters/DistantLightSource.cpp:
+(WebCore::DistantLightSource::initPaintingData):
+(WebCore::DistantLightSource::computePixelLightingData const):
+(WebCore::DistantLightSource::updatePaintingData): Deleted.
+* platform/graphics/filters/DistantLightSource.h:
+* platform/graphics/filters

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

2017-11-23 Thread simon . fraser
Title: [225123] trunk/Source/_javascript_Core








Revision 225123
Author simon.fra...@apple.com
Date 2017-11-23 14:23:15 -0800 (Thu, 23 Nov 2017)


Log Message
Minor ArrayBufferView cleanup
https://bugs.webkit.org/show_bug.cgi?id=179966

Reviewed by Darin Adler.

Use void* for data pointers when we don't need to do offset math. Use const for
source pointers.

Prefer uint8_t* to char*.

Add comments noting that the assertions should not be made release assertions
as recommended by the style checker, since the point is to avoid the virtual byteLength()
call in release.

* runtime/ArrayBufferView.h:
(JSC::ArrayBufferView::setImpl):
(JSC::ArrayBufferView::setRangeImpl):
(JSC::ArrayBufferView::getRangeImpl):
(JSC::ArrayBufferView::zeroRangeImpl):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/ArrayBufferView.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (225122 => 225123)

--- trunk/Source/_javascript_Core/ChangeLog	2017-11-23 22:20:09 UTC (rev 225122)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-11-23 22:23:15 UTC (rev 225123)
@@ -1,3 +1,25 @@
+2017-11-23  Simon Fraser  
+
+Minor ArrayBufferView cleanup
+https://bugs.webkit.org/show_bug.cgi?id=179966
+
+Reviewed by Darin Adler.
+
+Use void* for data pointers when we don't need to do offset math. Use const for
+source pointers.
+
+Prefer uint8_t* to char*.
+
+Add comments noting that the assertions should not be made release assertions
+as recommended by the style checker, since the point is to avoid the virtual byteLength()
+call in release.
+
+* runtime/ArrayBufferView.h:
+(JSC::ArrayBufferView::setImpl):
+(JSC::ArrayBufferView::setRangeImpl):
+(JSC::ArrayBufferView::getRangeImpl):
+(JSC::ArrayBufferView::zeroRangeImpl):
+
 2017-11-23  Darin Adler  
 
 Reduce WTF::String operations that do unnecessary Unicode operations instead of ASCII


Modified: trunk/Source/_javascript_Core/runtime/ArrayBufferView.h (225122 => 225123)

--- trunk/Source/_javascript_Core/runtime/ArrayBufferView.h	2017-11-23 22:20:09 UTC (rev 225122)
+++ trunk/Source/_javascript_Core/runtime/ArrayBufferView.h	2017-11-23 22:23:15 UTC (rev 225123)
@@ -118,8 +118,8 @@
 inline bool setImpl(ArrayBufferView*, unsigned byteOffset);
 
 // Caller passes in bufferByteLength to avoid a virtual function call.
-inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength);
-inline bool getRangeImpl(char* destination, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength);
+inline bool setRangeImpl(const void* data, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength);
+inline bool getRangeImpl(void* destination, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength);
 
 inline bool zeroRangeImpl(unsigned byteOffset, size_t rangeByteLength);
 
@@ -168,13 +168,14 @@
 return false;
 }
 
-char* base = static_cast(baseAddress());
+uint8_t* base = static_cast(baseAddress());
 memmove(base + byteOffset, array->baseAddress(), array->byteLength());
 return true;
 }
 
-bool ArrayBufferView::setRangeImpl(const char* data, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength)
+bool ArrayBufferView::setRangeImpl(const void* data, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength)
 {
+// Do not replace with RELEASE_ASSERT; we want to avoid the virtual byteLength() function call in release.
 ASSERT_WITH_SECURITY_IMPLICATION(bufferByteLength == byteLength());
 if (byteOffset > bufferByteLength
 || byteOffset + dataByteLength > bufferByteLength
@@ -183,13 +184,14 @@
 return false;
 }
 
-char* base = static_cast(baseAddress());
+uint8_t* base = static_cast(baseAddress());
 memmove(base + byteOffset, data, dataByteLength);
 return true;
 }
 
-bool ArrayBufferView::getRangeImpl(char* destination, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength)
+bool ArrayBufferView::getRangeImpl(void* destination, size_t dataByteLength, unsigned byteOffset, unsigned bufferByteLength)
 {
+// Do not replace with RELEASE_ASSERT; we want to avoid the virtual byteLength() function call in release.
 ASSERT_WITH_SECURITY_IMPLICATION(bufferByteLength == byteLength());
 if (byteOffset > bufferByteLength
 || byteOffset + dataByteLength > bufferByteLength
@@ -198,7 +200,7 @@
 return false;
 }
 
-char* base = static_cast(baseAddress());
+const uint8_t* base = static_cast(baseAddress());
 memmove(destination, base + byteOffset, dataByteLength);
 return true;
 }
@@ -212,7 +214,7 @@
 return false;
 }
 
-char* base = static_cast(baseAddress());
+uint8_t* base = static_cast(baseAddress());
 memset(base + b

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

2017-11-23 Thread clopez
Title: [225124] trunk/Source/WebCore








Revision 225124
Author clo...@igalia.com
Date 2017-11-23 16:35:31 -0800 (Thu, 23 Nov 2017)


Log Message
[GTK] [Debug] Fix build after r225117.
https://bugs.webkit.org/show_bug.cgi?id=179907

Unreviewed build fix.

r225117 renamed containsOnlyASCII() to isAllASCII().
And this reference was not updated for the GTK Debug build.

No new tests, its a build fix.

* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225123 => 225124)

--- trunk/Source/WebCore/ChangeLog	2017-11-23 22:23:15 UTC (rev 225123)
+++ trunk/Source/WebCore/ChangeLog	2017-11-24 00:35:31 UTC (rev 225124)
@@ -1,3 +1,18 @@
+2017-11-23  Carlos Alberto Lopez Perez  
+
+[GTK] [Debug] Fix build after r225117.
+https://bugs.webkit.org/show_bug.cgi?id=179907
+
+Unreviewed build fix.
+
+r225117 renamed containsOnlyASCII() to isAllASCII().
+And this reference was not updated for the GTK Debug build.
+
+No new tests, its a build fix.
+
+* loader/archive/mhtml/MHTMLArchive.cpp:
+(WebCore::MHTMLArchive::generateMHTMLData):
+
 2017-11-23  Simon Fraser  
 
 FELighting cleanup and optimization


Modified: trunk/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp (225123 => 225124)

--- trunk/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp	2017-11-23 22:23:15 UTC (rev 225123)
+++ trunk/Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp	2017-11-24 00:35:31 UTC (rev 225124)
@@ -160,7 +160,7 @@
 stringBuilder.append("\"\r\n\r\n");
 
 // We use utf8() below instead of ascii() as ascii() replaces CRLFs with ?? (we still only have put ASCII characters in it).
-ASSERT(stringBuilder.toString().containsOnlyASCII());
+ASSERT(stringBuilder.toString().isAllASCII());
 CString asciiString = stringBuilder.toString().utf8();
 auto mhtmlData = SharedBuffer::create();
 mhtmlData->append(asciiString.data(), asciiString.length());






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


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

2017-11-23 Thread fpizlo
Title: [225125] trunk/Source/bmalloc








Revision 225125
Author fpi...@apple.com
Date 2017-11-23 16:47:58 -0800 (Thu, 23 Nov 2017)


Log Message
Isolated Heaps caused an increase in reported leaks on the bots
https://bugs.webkit.org/show_bug.cgi?id=179463

Reviewed by Darin Adler.

This fixes the way isoheaps interact with system tools:

- Opts into the VMHeap API so that the leaks tool can find isoheap memory.

- Opts into the DebugHeap/Environment APIs so that we turn off isoheap allocation if memory
  debugging options are in use.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/DebugHeap.h:
* bmalloc/IsoHeap.h:
* bmalloc/IsoPage.cpp: Added.
(bmalloc::IsoPageBase::allocatePageMemory):
* bmalloc/IsoPage.h:
* bmalloc/IsoPageInlines.h:
(bmalloc::IsoPage::tryCreate):
* bmalloc/IsoTLS.cpp:
(bmalloc::IsoTLS::deallocateSlow):
(bmalloc::IsoTLS::ensureEntries):
(bmalloc::IsoTLS::isUsingDebugHeap):
(bmalloc::IsoTLS::debugMalloc):
* bmalloc/IsoTLS.h:
* bmalloc/IsoTLSInlines.h:
(bmalloc::IsoTLS::allocate):
(bmalloc::IsoTLS::deallocate):
(bmalloc::IsoTLS::allocateImpl):
(bmalloc::IsoTLS::allocateFast):
(bmalloc::IsoTLS::allocateSlow):
(bmalloc::IsoTLS::deallocateImpl):
(bmalloc::IsoTLS::deallocateFast):
(bmalloc::IsoTLS::ensureHeapAndEntries):
(bmalloc::IsoTLS::allocator): Deleted.
(bmalloc::IsoTLS::deallocator): Deleted.
* bmalloc/bmalloc.cpp:
(bmalloc::api::tryLargeMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::scavenge):
(bmalloc::api::isEnabled):
(bmalloc::api::setScavengerThreadQOSClass):
* bmalloc/bmalloc.h:
(bmalloc::api::tryLargeMemalignVirtual): Deleted.
(bmalloc::api::freeLargeVirtual): Deleted.
(bmalloc::api::scavenge): Deleted.
(bmalloc::api::isEnabled): Deleted.
(bmalloc::api::setScavengerThreadQOSClass): Deleted.

Modified Paths

trunk/Source/bmalloc/CMakeLists.txt
trunk/Source/bmalloc/ChangeLog
trunk/Source/bmalloc/bmalloc/IsoPage.h
trunk/Source/bmalloc/bmalloc/IsoPageInlines.h
trunk/Source/bmalloc/bmalloc/IsoTLS.cpp
trunk/Source/bmalloc/bmalloc/IsoTLS.h
trunk/Source/bmalloc/bmalloc/IsoTLSInlines.h
trunk/Source/bmalloc/bmalloc/bmalloc.cpp
trunk/Source/bmalloc/bmalloc/bmalloc.h
trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj


Added Paths

trunk/Source/bmalloc/bmalloc/IsoPage.cpp




Diff

Modified: trunk/Source/bmalloc/CMakeLists.txt (225124 => 225125)

--- trunk/Source/bmalloc/CMakeLists.txt	2017-11-24 00:35:31 UTC (rev 225124)
+++ trunk/Source/bmalloc/CMakeLists.txt	2017-11-24 00:47:58 UTC (rev 225125)
@@ -18,6 +18,7 @@
 bmalloc/Heap.cpp
 bmalloc/HeapKind.cpp
 bmalloc/IsoHeapImpl.cpp
+bmalloc/IsoPage.cpp
 bmalloc/IsoTLS.cpp
 bmalloc/IsoTLSEntry.cpp
 bmalloc/IsoTLSLayout.cpp


Modified: trunk/Source/bmalloc/ChangeLog (225124 => 225125)

--- trunk/Source/bmalloc/ChangeLog	2017-11-24 00:35:31 UTC (rev 225124)
+++ trunk/Source/bmalloc/ChangeLog	2017-11-24 00:47:58 UTC (rev 225125)
@@ -1,3 +1,55 @@
+2017-11-16  Filip Pizlo  
+
+Isolated Heaps caused an increase in reported leaks on the bots
+https://bugs.webkit.org/show_bug.cgi?id=179463
+
+Reviewed by Darin Adler.
+
+This fixes the way isoheaps interact with system tools:
+
+- Opts into the VMHeap API so that the leaks tool can find isoheap memory.
+
+- Opts into the DebugHeap/Environment APIs so that we turn off isoheap allocation if memory
+  debugging options are in use.
+
+* bmalloc.xcodeproj/project.pbxproj:
+* bmalloc/DebugHeap.h:
+* bmalloc/IsoHeap.h:
+* bmalloc/IsoPage.cpp: Added.
+(bmalloc::IsoPageBase::allocatePageMemory):
+* bmalloc/IsoPage.h:
+* bmalloc/IsoPageInlines.h:
+(bmalloc::IsoPage::tryCreate):
+* bmalloc/IsoTLS.cpp:
+(bmalloc::IsoTLS::deallocateSlow):
+(bmalloc::IsoTLS::ensureEntries):
+(bmalloc::IsoTLS::isUsingDebugHeap):
+(bmalloc::IsoTLS::debugMalloc):
+* bmalloc/IsoTLS.h:
+* bmalloc/IsoTLSInlines.h:
+(bmalloc::IsoTLS::allocate):
+(bmalloc::IsoTLS::deallocate):
+(bmalloc::IsoTLS::allocateImpl):
+(bmalloc::IsoTLS::allocateFast):
+(bmalloc::IsoTLS::allocateSlow):
+(bmalloc::IsoTLS::deallocateImpl):
+(bmalloc::IsoTLS::deallocateFast):
+(bmalloc::IsoTLS::ensureHeapAndEntries):
+(bmalloc::IsoTLS::allocator): Deleted.
+(bmalloc::IsoTLS::deallocator): Deleted.
+* bmalloc/bmalloc.cpp:
+(bmalloc::api::tryLargeMemalignVirtual):
+(bmalloc::api::freeLargeVirtual):
+(bmalloc::api::scavenge):
+(bmalloc::api::isEnabled):
+(bmalloc::api::setScavengerThreadQOSClass):
+* bmalloc/bmalloc.h:
+(bmalloc::api::tryLargeMemalignVirtual): Deleted.
+(bmalloc::api::freeLargeVirtual): Deleted.
+(bmalloc::api::scavenge): Deleted.
+(bmalloc::api::isEnabled): Deleted.
+(bmalloc::api::setScavengerThreadQOSClass):

[webkit-changes] [225126] trunk/LayoutTests

2017-11-23 Thread clopez
Title: [225126] trunk/LayoutTests








Revision 225126
Author clo...@igalia.com
Date 2017-11-23 17:25:56 -0800 (Thu, 23 Nov 2017)


Log Message
REGRESSION(r225098): [GTK] Gardening of tests after r225098.
https://bugs.webkit.org/show_bug.cgi?id=179989

Unreviewed.

Mark new expected failures meanwhile the issue is not fixed.

* platform/gtk/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (225125 => 225126)

--- trunk/LayoutTests/ChangeLog	2017-11-24 00:47:58 UTC (rev 225125)
+++ trunk/LayoutTests/ChangeLog	2017-11-24 01:25:56 UTC (rev 225126)
@@ -1,3 +1,14 @@
+2017-11-23  Carlos Alberto Lopez Perez  
+
+REGRESSION(r225098): [GTK] Gardening of tests after r225098.
+https://bugs.webkit.org/show_bug.cgi?id=179989
+
+Unreviewed.
+
+Mark new expected failures meanwhile the issue is not fixed.
+
+* platform/gtk/TestExpectations:
+
 2017-11-23  Simon Fraser  
 
 Add support for CanvasPattern.setTransform()


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (225125 => 225126)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2017-11-24 00:47:58 UTC (rev 225125)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2017-11-24 01:25:56 UTC (rev 225126)
@@ -1196,6 +1196,19 @@
 
 webkit.org/b/179052 compositing/contents-format/subpixel-antialiased-nested-layer.html [ Failure ]
 
+webkit.org/b/179989 http/tests/misc/prefetch-purpose.html [ Timeout ]
+webkit.org/b/179989 http/tests/misc/link-rel-prefetch-and-subresource.html [ Timeout ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/subresource.html [ Timeout ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch-onload.html [ Timeout ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch-onerror.html [ Timeout ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/prefetch.html [ Timeout ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html [ Timeout ]
+webkit.org/b/179989 fast/dom/HTMLLinkElement/link-and-subresource-test.html [ Timeout ]
+webkit.org/b/179989 fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html [ Failure ]
+webkit.org/b/179989 fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html [ Failure ]
+webkit.org/b/179989 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html [ Failure ]
+webkit.org/b/179989 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html [ Failure ]
+
 #
 # End of Expected failures
 #






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


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

2017-11-23 Thread commit-queue
Title: [225127] trunk/Source/WebCore








Revision 225127
Author commit-qu...@webkit.org
Date 2017-11-23 21:39:57 -0800 (Thu, 23 Nov 2017)


Log Message
[Win] PasteboardWin.cpp(653): error C2039: 'containsOnlyASCII': is not a member of 'WTF::String'
https://bugs.webkit.org/show_bug.cgi?id=179991

Unreviewed build fix.

No new tests (No behaviour change).

Patch by Fujii Hironori  on 2017-11-23

* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Renamed containsOnlyASCII() to isAllASCII().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/win/PasteboardWin.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (225126 => 225127)

--- trunk/Source/WebCore/ChangeLog	2017-11-24 01:25:56 UTC (rev 225126)
+++ trunk/Source/WebCore/ChangeLog	2017-11-24 05:39:57 UTC (rev 225127)
@@ -1,3 +1,15 @@
+2017-11-23  Fujii Hironori  
+
+[Win] PasteboardWin.cpp(653): error C2039: 'containsOnlyASCII': is not a member of 'WTF::String'
+https://bugs.webkit.org/show_bug.cgi?id=179991
+
+Unreviewed build fix.
+
+No new tests (No behaviour change).
+
+* platform/win/PasteboardWin.cpp:
+(WebCore::Pasteboard::writeURLToDataObject): Renamed containsOnlyASCII() to isAllASCII().
+
 2017-11-23  Carlos Alberto Lopez Perez  
 
 [GTK] [Debug] Fix build after r225117.


Modified: trunk/Source/WebCore/platform/win/PasteboardWin.cpp (225126 => 225127)

--- trunk/Source/WebCore/platform/win/PasteboardWin.cpp	2017-11-24 01:25:56 UTC (rev 225126)
+++ trunk/Source/WebCore/platform/win/PasteboardWin.cpp	2017-11-24 05:39:57 UTC (rev 225127)
@@ -650,7 +650,7 @@
 WebCore::writeURL(m_writableDataObject.get(), kurl, titleStr, true, true);
 
 String url = ""
-ASSERT(url.containsOnlyASCII()); // URL::string() is URL encoded.
+ASSERT(url.isAllASCII()); // URL::string() is URL encoded.
 
 String fsPath = filesystemPathFromUrlOrTitle(url, titleStr, L".URL", true);
 String contentString("[InternetShortcut]\r\nURL=" + url + "\r\n");






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