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

2020-12-05 Thread simon . fraser
Title: [270480] trunk/Source/WebCore








Revision 270480
Author simon.fra...@apple.com
Date 2020-12-05 18:47:05 -0800 (Sat, 05 Dec 2020)


Log Message
REGRESSION (r268075): Animations at the top of https://browserbench.org/JetStream/ are very slow
https://bugs.webkit.org/show_bug.cgi?id=219447


Reviewed by Sam Weinig.

SVG images have their own Page, and when they request rendering updates, they have to go through
ChromeClient, but that was missing for the Page::renderingUpdateCompleted() code path.
Make scheduleRenderingUpdateInternal() and call it from the two relevant places.

I tried making both a ref test and a test using internals.renderingUpdateCount(), but neither
were reliable. There's no way to get a signal out from the 

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/Page.cpp
trunk/Source/WebCore/page/Page.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (270479 => 270480)

--- trunk/Source/WebCore/ChangeLog	2020-12-06 00:22:09 UTC (rev 270479)
+++ trunk/Source/WebCore/ChangeLog	2020-12-06 02:47:05 UTC (rev 270480)
@@ -1,3 +1,25 @@
+2020-12-05  Simon Fraser  
+
+REGRESSION (r268075): Animations at the top of https://browserbench.org/JetStream/ are very slow
+https://bugs.webkit.org/show_bug.cgi?id=219447
+
+
+Reviewed by Sam Weinig.
+
+SVG images have their own Page, and when they request rendering updates, they have to go through
+ChromeClient, but that was missing for the Page::renderingUpdateCompleted() code path.
+Make scheduleRenderingUpdateInternal() and call it from the two relevant places.
+
+I tried making both a ref test and a test using internals.renderingUpdateCount(), but neither
+were reliable. There's no way to get a signal out from the  2020-12-05  Said Abou-Hallawa  
 
 REGRESSION(r270458): Crash loading https://browserbench.org/JetStream/


Modified: trunk/Source/WebCore/page/Page.cpp (270479 => 270480)

--- trunk/Source/WebCore/page/Page.cpp	2020-12-06 00:22:09 UTC (rev 270479)
+++ trunk/Source/WebCore/page/Page.cpp	2020-12-06 02:47:05 UTC (rev 270480)
@@ -1414,14 +1414,19 @@
 {
 LOG_WITH_STREAM(EventLoop, stream << "Page " << this << " scheduleTimedRenderingUpdate() - requestedSteps " << requestedSteps << " remaining steps " << m_renderingUpdateRemainingSteps);
 if (m_renderingUpdateRemainingSteps.isEmpty()) {
-if (chrome().client().scheduleRenderingUpdate())
-return;
-renderingUpdateScheduler().scheduleRenderingUpdate();
+scheduleRenderingUpdateInternal();
 return;
 }
 computeUnfulfilledRenderingSteps(requestedSteps);
 }
 
+void Page::scheduleRenderingUpdateInternal()
+{
+if (chrome().client().scheduleRenderingUpdate())
+return;
+renderingUpdateScheduler().scheduleRenderingUpdate();
+}
+
 void Page::computeUnfulfilledRenderingSteps(OptionSet requestedSteps)
 {
 // m_renderingUpdateRemainingSteps only has more than one entry for the re-entrant rendering update triggered by testing.
@@ -1666,7 +1671,7 @@
 LOG_WITH_STREAM(EventLoop, stream << "Page " << this << " renderingUpdateCompleted() - steps " << m_renderingUpdateRemainingSteps << " unfulfilled steps " << m_unfulfilledRequestedSteps);
 
 if (m_unfulfilledRequestedSteps) {
-renderingUpdateScheduler().scheduleRenderingUpdate();
+scheduleRenderingUpdateInternal();
 m_unfulfilledRequestedSteps = { };
 }
 }


Modified: trunk/Source/WebCore/page/Page.h (270479 => 270480)

--- trunk/Source/WebCore/page/Page.h	2020-12-06 00:22:09 UTC (rev 270479)
+++ trunk/Source/WebCore/page/Page.h	2020-12-06 02:47:05 UTC (rev 270480)
@@ -869,6 +869,7 @@
 void doAfterUpdateRendering();
 void renderingUpdateCompleted();
 void computeUnfulfilledRenderingSteps(OptionSet);
+void scheduleRenderingUpdateInternal();
 
 RenderingUpdateScheduler& renderingUpdateScheduler();
 






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


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

2020-12-05 Thread said
Title: [270479] trunk/Source/WebCore








Revision 270479
Author s...@apple.com
Date 2020-12-05 16:22:09 -0800 (Sat, 05 Dec 2020)


Log Message
REGRESSION(r270458): Crash loading https://browserbench.org/JetStream/
https://bugs.webkit.org/show_bug.cgi?id=219568

Reviewed by Tim Horton.

Get the backendSize before sinking it into a NativeImage.

* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::drawConsuming):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (270478 => 270479)

--- trunk/Source/WebCore/ChangeLog	2020-12-05 22:17:10 UTC (rev 270478)
+++ trunk/Source/WebCore/ChangeLog	2020-12-06 00:22:09 UTC (rev 270479)
@@ -1,3 +1,15 @@
+2020-12-05  Said Abou-Hallawa  
+
+REGRESSION(r270458): Crash loading https://browserbench.org/JetStream/
+https://bugs.webkit.org/show_bug.cgi?id=219568
+
+Reviewed by Tim Horton.
+
+Get the backendSize before sinking it into a NativeImage.
+
+* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
+(WebCore::ImageBufferIOSurfaceBackend::drawConsuming):
+
 2020-12-04  Wenson Hsieh  
 
 [Concurrent display lists] Synchronize display list rendering across remote image buffers


Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp (270478 => 270479)

--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp	2020-12-05 22:17:10 UTC (rev 270478)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp	2020-12-06 00:22:09 UTC (rev 270479)
@@ -155,8 +155,9 @@
 FloatRect adjustedSrcRect = srcRect;
 adjustedSrcRect.scale(resolutionScale());
 
+auto backendSize = this->backendSize();
 if (auto image = sinkIntoNativeImage())
-destContext.drawNativeImage(*image, backendSize(), destRect, adjustedSrcRect, options);
+destContext.drawNativeImage(*image, backendSize, destRect, adjustedSrcRect, options);
 }
 
 RetainPtr ImageBufferIOSurfaceBackend::toCFData(const String& mimeType, Optional quality, PreserveResolution preserveResolution) const






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


[webkit-changes] [270478] trunk

2020-12-05 Thread wenson_hsieh
Title: [270478] trunk








Revision 270478
Author wenson_hs...@apple.com
Date 2020-12-05 14:17:10 -0800 (Sat, 05 Dec 2020)


Log Message
[Concurrent display lists] Synchronize display list rendering across remote image buffers
https://bugs.webkit.org/show_bug.cgi?id=219091


Reviewed by Geoff Garen.

Source/WebCore:

See Source/WebKit/ChangeLog for more details.

* platform/graphics/ImageBuffer.h:
* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::append):
* platform/graphics/displaylists/DisplayListItemBuffer.cpp:
(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::copyTo const):
(WebCore::DisplayList::ItemBuffer::swapWritableBufferIfNeeded):

Add plumbing so that `didAppendData` can inform the client whether the data was appended after switching to a
new buffer. In WebKit2's remote image buffer, we use this information to determine whether or not we need to
send a wakeup message to the GPU process. Namely, in the case of `DidChangeItemBuffer::Yes`, we don't need to
wake up the GPU process even though the unread bytes count was 0 before we advanced, since the GPU process will
automatically progress to this item buffer when it's done processing items in the previous item buffer.

See WebKit changes (in `RemoteImageBufferProxy`) for more details.

(WebCore::DisplayList::ItemBuffer::append):
(WebCore::DisplayList::ItemBuffer::didAppendData):
(WebCore::DisplayList::ItemBuffer::appendEncodedData): Deleted.
* platform/graphics/displaylists/DisplayListItemBuffer.h:

Add a new `ItemBufferWritingClient` method to inform clients when new bytes are appended to an item buffer,
given the additional number of bytes added and the item buffer handle.

(WebCore::DisplayList::ItemBuffer::append):
(WebCore::DisplayList::ItemBuffer::uncheckedAppend):
* platform/graphics/displaylists/DisplayListItemType.cpp:
(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

Remove MetaCommandEnd. I introduced this item type because I was going to make the GPU process always sleep for
more display list item data, but I've since changed the approach so that the GPU process goes to sleep naturally
when it's done processing all unread bytes.

* platform/graphics/displaylists/DisplayListItemType.h:
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::operator<<):
* platform/graphics/displaylists/DisplayListItems.h:
* platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::flushContext):

Add a new helper method to append a `FlushContext` item via the display list recorder, to ensure that the
appropriate recorder delegate methods are invoked when appending a "flush context" item.

* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::replay):
* platform/graphics/displaylists/DisplayListReplayer.h:

Source/WebKit:

Refactors the existing concurrent display list processing mechanism, such that we no longer update the unread
bytes count every 512 items (or when flushing the drawing context), and instead update it every time we append
display list item data. In order to achieve this without making it impossible for multiple display-list backed
image buffers to render simultaneously, we also add support for synchronizing display list items across
different image buffers by using the new meta command items added in bug #219262. As detailed in the ChangeLog
for that bug, a stream of display list data written by the web process and consumed by the GPU process is now
structured like so:

Wakeup message initiates display list processing with Image Buffer A and Item Buffer 1
|
|   MetaCommandChangeDestinationImageBuffer(B)
|   |
|   |  MetaCommandChangeItemBuffer(2)
|   ||
|   ||
v   vv
+---+++
| ++ +--+ |
| | Destination| | Destination  | | Item Buffer 1
| | Image Buffer A | | Image Buffer B   | |
| ++ +--+ |
+-+

+-+
| +--+ +---+  |
| | Dst. Image   | | Destination Image |  Unused  | Item Buffer 2
| | Buffer B | | Buffer A  |  Capacity|
| +--+ +---+  |
+-+-+-+
  ^
  |
  |

[webkit-changes] [270477] trunk

2020-12-05 Thread Hironori . Fujii
Title: [270477] trunk








Revision 270477
Author hironori.fu...@sony.com
Date 2020-12-05 13:28:48 -0800 (Sat, 05 Dec 2020)


Log Message
Remove ENABLE_GRAPHICS_CONTEXT_GL by replacing it with ENABLE(WEBGL)
https://bugs.webkit.org/show_bug.cgi?id=219551

Reviewed by Kenneth Russell.

.:

* Source/CMakeLists.txt:
* Source/cmake/GStreamerDependencies.cmake:
* Source/cmake/OptionsFTW.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

GraphicsContextGL is a module only for WebGL. ENABLE_WEBGL should
be removed if all ports enable it.

* CMakeLists.txt:
* page/Chrome.cpp:
(WebCore::Chrome::windowScreenDidChange):
* platform/graphics/ANGLEWebKitBridge.cpp:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/FormatConverter.cpp:
* platform/graphics/FormatConverter.h:
* platform/graphics/GLContext.cpp:
* platform/graphics/GLContext.h:
* platform/graphics/GraphicsContextGL.cpp:
* platform/graphics/GraphicsContextGL.h:
* platform/graphics/GraphicsContextGLAttributes.h:
* platform/graphics/GraphicsContextGLImageExtractor.cpp:
* platform/graphics/GraphicsContextGLImageExtractor.h:
* platform/graphics/OpenGLShims.cpp:
* platform/graphics/angle/ExtensionsGLANGLE.cpp:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
* platform/graphics/angle/GraphicsContextGLANGLEUtilities.h:
* platform/graphics/angle/TemporaryANGLESetting.cpp:
* platform/graphics/cairo/GraphicsContextGLCairo.cpp:
* platform/graphics/cg/GraphicsContextGLCG.cpp:
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
* platform/graphics/cv/GraphicsContextGLCV.h:
* platform/graphics/cv/GraphicsContextGLCVANGLE.cpp:
* platform/graphics/cv/GraphicsContextGLCVANGLE.h:
* platform/graphics/egl/GLContextEGL.cpp:
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h:
* platform/graphics/opengl/ExtensionsGLOpenGL.cpp:
* platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:
* platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp:
* platform/graphics/opengl/GraphicsContextGLOpenGLPrivate.cpp:
* platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
* platform/graphics/opengl/TemporaryOpenGLSetting.h:
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
* platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:
* platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:
* platform/graphics/win/GraphicsContextGLDirect2D.cpp:

Source/WebKit:

* CMakeLists.txt:
* UIProcess/API/glib/WebKitProtocolHandler.cpp:
(WebKit::WebKitProtocolHandler::handleGPU):
* UIProcess/gtk/HardwareAccelerationManager.cpp:
(WebKit::HardwareAccelerationManager::HardwareAccelerationManager):

Source/WTF:

* wtf/Platform.h:
* wtf/PlatformEnable.h:

Modified Paths

trunk/ChangeLog
trunk/Source/CMakeLists.txt
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/Platform.h
trunk/Source/WTF/wtf/PlatformEnable.h
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/Chrome.cpp
trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp
trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
trunk/Source/WebCore/platform/graphics/FormatConverter.cpp
trunk/Source/WebCore/platform/graphics/FormatConverter.h
trunk/Source/WebCore/platform/graphics/GLContext.cpp
trunk/Source/WebCore/platform/graphics/GLContext.h
trunk/Source/WebCore/platform/graphics/GraphicsContextGL.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h
trunk/Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h
trunk/Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.h
trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp
trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLEUtilities.h
trunk/Source/WebCore/platform/graphics/angle/TemporaryANGLESetting.cpp
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCV.h
trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.cpp
trunk/Source/WebCore/platform/graphics/cv/GraphicsContextGLCVANGLE.h

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

2020-12-05 Thread andresg_22
Title: [270476] trunk/Source/WebCore








Revision 270476
Author andresg...@apple.com
Date 2020-12-05 13:25:31 -0800 (Sat, 05 Dec 2020)


Log Message
Prelininary refactoring of TextMarker and TextMarkerRange.
https://bugs.webkit.org/show_bug.cgi?id=219491

Reviewed by Chris Fleizach.

Covered by existing tests.

TextMarker and TextMarkerRange should become classes on their own right.
As a first step in that direction, this patch moves all the static
functions in WebAccessibilityObjectWrapperMac.mm to make conversions
between TextMarkers and TextMarkerRanges to and from other types to
AXObjectCacheMac.mm.
In addition, removed all ObjectiveC wrappers to these functions and
instead call the functions directly where needed. This is relevant now
with the arrival of isolated tree mode because it saves a non-trivial
call to the wrapper's axBackingObject getter. Furthermore, all the
conversion functions are doing now the appropriate thread check, since
they all need to run on the main thread.
Fixed the handling of the NSAccessibilityMisspellingTextMarkerRangeParameterizedAttribute
request that was calling accessibilityMisspellingSearchCriteriaForParameterizedAttribute
off of the main thread.

* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXTextMarkerRange):
(WebCore::textMarkerRangeFromMarkers):
(WebCore::AXTextMarkerRangeStart):
(WebCore::AXTextMarkerRangeEnd):
(WebCore::getBytesFromAXTextMarker):
(WebCore::accessibilityObjectForTextMarker):
(WebCore::textMarkerForVisiblePosition):
(WebCore::visiblePositionForTextMarker):
(WebCore::textMarkerRangeFromVisiblePositions):
(WebCore::visiblePositionRangeForTextMarkerRange):
(WebCore::textMarkerForCharacterOffset):
(WebCore::characterOffsetForTextMarker):
(WebCore::startOrEndTextMarkerForRange):
(WebCore::textMarkerRangeFromRange):
(WebCore::rangeForTextMarkerRange):
* accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(accessibilityTextOperationForParameterizedAttribute):
(accessibilityMisspellingSearchCriteriaForParameterizedAttribute):
(-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
(-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
(-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
(-[WebAccessibilityObjectWrapper debugDescriptionForTextMarker:]):
(-[WebAccessibilityObjectWrapper debugDescriptionForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapper showNodeForTextMarker:]):
(-[WebAccessibilityObjectWrapper showNodeTreeForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerRangeAtTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
(-[WebAccessibilityObjectWrapper textMarkerForTextMarker:atUnit:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(AXTextMarkerRangeStart): MOved to AXObjectCacheMac.mm.
(AXTextMarkerRangeEnd): MOved to AXObjectCacheMac.mm.
(getBytesFromAXTextMarker): MOved to AXObjectCacheMac.mm.
(isTextMarkerIgnored): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]): Deleted.
(accessibilityObjectForTextMarker): MOved to AXObjectCacheMac.mm.
(-[WebAccessibilityObjectWrapper textMarkerForCharacterOffset:]): Deleted.
(textMarkerForCharacterOffset): MOved to AXObjectCacheMac.mm.
(-[WebAccessibilityObjectWrapper rangeForTextMarkerRange:]): Deleted.
(characterOffsetForTextMarker): MOved to AXObjectCacheMac.mm.
(-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]): Deleted.
(visiblePositionForTextMarker): MOved to AXObjectCacheMac.mm.
(visiblePositionRangeForTextMarkerRange): MOved to AXObjectCacheMac.mm.
(-[WebAccessibilityObjectWrapper visiblePositionForTextMarker:]): Deleted.
(-[WebAccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (270475 => 270476)

--- trunk/Source/WebCore/ChangeLog	2020-12-05 21:18:17 UTC (rev 270475)
+++ trunk/Source/WebCore/ChangeLog	2020-12-05 21:25:31 UTC (rev 270476)
@@ -1,3 +1,81 @@
+2020-12-05  Andres Gonzalez  
+
+Prelininary refactoring of TextMarker and TextMarkerRange.
+https://bugs.webkit.org/show_bug.cgi?id=219491
+
+Reviewed by Chris 

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

2020-12-05 Thread simon . fraser
Title: [270475] trunk/Source/WebCore








Revision 270475
Author simon.fra...@apple.com
Date 2020-12-05 13:18:17 -0800 (Sat, 05 Dec 2020)


Log Message
Add ScrollAnimation files to the Xcode project
https://bugs.webkit.org/show_bug.cgi?id=219566

Reviewed by Yusuke Suzuki.

ScrollAnimation* files were added to Sources.txt but not the Xcode project.

* WebCore.xcodeproj/project.pbxproj:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj




Diff

Modified: trunk/Source/WebCore/ChangeLog (270474 => 270475)

--- trunk/Source/WebCore/ChangeLog	2020-12-05 18:53:41 UTC (rev 270474)
+++ trunk/Source/WebCore/ChangeLog	2020-12-05 21:18:17 UTC (rev 270475)
@@ -1,5 +1,16 @@
 2020-12-05  Simon Fraser  
 
+Add ScrollAnimation files to the Xcode project
+https://bugs.webkit.org/show_bug.cgi?id=219566
+
+Reviewed by Yusuke Suzuki.
+
+ScrollAnimation* files were added to Sources.txt but not the Xcode project.
+
+* WebCore.xcodeproj/project.pbxproj:
+
+2020-12-05  Simon Fraser  
+
 [LFC Display] Store the display tree as a tree of stacking items
 https://bugs.webkit.org/show_bug.cgi?id=219315
 


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (270474 => 270475)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-12-05 18:53:41 UTC (rev 270474)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-12-05 21:18:17 UTC (rev 270475)
@@ -6130,6 +6130,10 @@
 		0FC0516A219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeOverflowScrollingNodeMac.h; sourceTree = ""; };
 		0FC4B00422B9A02C00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeOverflowScrollProxyNode.h; sourceTree = ""; };
 		0FC4B00522B9A02D00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeOverflowScrollProxyNode.mm; sourceTree = ""; };
+		0FC692BA257C0F400098E3F9 /* ScrollAnimationKinetic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollAnimationKinetic.h; sourceTree = ""; };
+		0FC692BC257C0F410098E3F9 /* ScrollAnimationKinetic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAnimationKinetic.cpp; sourceTree = ""; };
+		0FC692BD257C0F410098E3F9 /* ScrollAnimationSmooth.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAnimationSmooth.cpp; sourceTree = ""; };
+		0FC692BE257C0F420098E3F9 /* ScrollAnimationSmooth.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollAnimationSmooth.h; sourceTree = ""; };
 		0FCF33230F2B9715004B6795 /* ColorCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorCG.cpp; sourceTree = ""; };
 		0FCF332A0F2B9A25004B6795 /* WebLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebLayer.mm; sourceTree = ""; };
 		0FCF332B0F2B9A25004B6795 /* WebLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebLayer.h; sourceTree = ""; };
@@ -27549,6 +27553,10 @@
 C1E1D235203DF15400584665 /* ScreenProperties.h */,
 BC8AE34C12EA096A00EB3AE6 /* ScrollableArea.cpp */,
 BC8AE34D12EA096A00EB3AE6 /* ScrollableArea.h */,
+0FC692BC257C0F410098E3F9 /* ScrollAnimationKinetic.cpp */,
+0FC692BA257C0F400098E3F9 /* ScrollAnimationKinetic.h */,
+0FC692BD257C0F410098E3F9 /* ScrollAnimationSmooth.cpp */,
+0FC692BE257C0F420098E3F9 /* ScrollAnimationSmooth.h */,
 CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */,
 CA3BF67D10D99BAE00E6CE53 /* ScrollAnimator.h */,
 BCAA90C20A7EBA60008B1229 /* Scrollbar.cpp */,






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


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

2020-12-05 Thread simon . fraser
Title: [270474] trunk/Source/WebCore








Revision 270474
Author simon.fra...@apple.com
Date 2020-12-05 10:53:41 -0800 (Sat, 05 Dec 2020)


Log Message
[LFC Display] Store the display tree as a tree of stacking items
https://bugs.webkit.org/show_bug.cgi?id=219315

Reviewed by Zalan Bujtas.

Currently the display tree is a full tree, crossing stacking context boundaries, and the
z-order lists are built at paint time.

Change to a tree of StackingItems, where a StackingItem exists for each box that
participates in the z-order sorting algorithm (i.e. boxes that are positioned, or have
styles that create stacking context). Each StackingItem owns the subtree of Display::Boxes
that it paints, and those subtrees are not otherwise connected.

The Display::Tree owns the root StackingItem, and each StackingItem owns its child
StackingItems. The StackingItem tree is built at display tree building time by storing state
in the BuildingState stack. StackingItems are added to the z-order lists of their parent
item at creation time; when done processing boxes for a StackingItem, we then sort its
z-order lists.

Add Box::participatesInZOrderSorting() and a LineBreakBox flag, and call that function
instead of the version on Display::Style to work around webkit.org/b/219335 for now.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* display/DisplayLayerController.cpp:
* display/DisplayTree.cpp:
(WebCore::Display::Tree::Tree):
(WebCore::Display::Tree::rootBox const):
* display/DisplayTree.h:
(WebCore::Display::Tree::rootStackingItem const):
(WebCore::Display::Tree::rootBox const): Deleted.
* display/DisplayTreeBuilder.cpp:
(WebCore::Display::TreeBuilder::build):
(WebCore::Display::TreeBuilder::pushStateForBoxDescendants):
(WebCore::Display::TreeBuilder::popState):
(WebCore::Display::TreeBuilder::insertIntoTree):
(WebCore::Display::TreeBuilder::buildInlineDisplayTree):
(WebCore::Display::TreeBuilder::recursiveBuildDisplayTree):
(WebCore::Display::outputDisplayBox):
(WebCore::Display::outputDisplayTree):
(WebCore::Display::displayTreeAsText):
(WebCore::Display::outputStackingTree):
(WebCore::Display::showDisplayTree):
* display/DisplayTreeBuilder.h:
* display/css/DisplayBox.cpp:
(WebCore::Display::Box::participatesInZOrderSorting const):
* display/css/DisplayBox.h:
(WebCore::Display::Box::isLineBreakBox const):
* display/css/DisplayBoxFactory.cpp:
(WebCore::Display::BoxFactory::displayBoxForRootBox const):
(WebCore::Display::BoxFactory::displayBoxForLayoutBox const):
(WebCore::Display::BoxFactory::setupBoxModelBox const):
* display/css/DisplayBoxFactory.h:
* display/css/DisplayCSSPainter.cpp:
(WebCore::Display::CSSPainter::recursivePaintDescendantsForPhase):
(WebCore::Display::CSSPainter::paintAtomicallyPaintedBox):
(WebCore::Display::CSSPainter::paintStackingContext):
(WebCore::Display::CSSPainter::paintTree):
(WebCore::Display::CSSPainter::isStackingContextPaintingBoundary): Deleted.
(WebCore::Display::CSSPainter::participatesInZOrderSorting): Deleted.
(WebCore::Display::CSSPainter::collectStackingContextDescendants): Deleted.
(WebCore::Display::CSSPainter::recursiveCollectLayers): Deleted.
* display/css/DisplayCSSPainter.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/display/DisplayLayerController.cpp
trunk/Source/WebCore/display/DisplayTree.cpp
trunk/Source/WebCore/display/DisplayTree.h
trunk/Source/WebCore/display/DisplayTreeBuilder.cpp
trunk/Source/WebCore/display/DisplayTreeBuilder.h
trunk/Source/WebCore/display/css/DisplayBox.cpp
trunk/Source/WebCore/display/css/DisplayBox.h
trunk/Source/WebCore/display/css/DisplayBoxFactory.cpp
trunk/Source/WebCore/display/css/DisplayBoxFactory.h
trunk/Source/WebCore/display/css/DisplayCSSPainter.cpp
trunk/Source/WebCore/display/css/DisplayCSSPainter.h


Added Paths

trunk/Source/WebCore/display/css/DisplayStackingItem.cpp
trunk/Source/WebCore/display/css/DisplayStackingItem.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (270473 => 270474)

--- trunk/Source/WebCore/ChangeLog	2020-12-05 14:23:02 UTC (rev 270473)
+++ trunk/Source/WebCore/ChangeLog	2020-12-05 18:53:41 UTC (rev 270474)
@@ -1,3 +1,69 @@
+2020-12-05  Simon Fraser  
+
+[LFC Display] Store the display tree as a tree of stacking items
+https://bugs.webkit.org/show_bug.cgi?id=219315
+
+Reviewed by Zalan Bujtas.
+
+Currently the display tree is a full tree, crossing stacking context boundaries, and the
+z-order lists are built at paint time.
+
+Change to a tree of StackingItems, where a StackingItem exists for each box that
+participates in the z-order sorting algorithm (i.e. boxes that are positioned, or have
+styles that create stacking context). Each StackingItem owns the subtree of Display::Boxes
+that it paints, and those subtrees are not otherwise connected.
+
+The Display::Tree owns the root StackingItem, and each 

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

2020-12-05 Thread zalan
Title: [270473] trunk/Source/WebCore








Revision 270473
Author za...@apple.com
Date 2020-12-05 06:23:02 -0800 (Sat, 05 Dec 2020)


Log Message
[LFC][IFC] Create an inline box for  when it's the first box on the line
https://bugs.webkit.org/show_bug.cgi?id=219556

Reviewed by Antti Koivisto.

When the line starts with inline-box-end (), we need to create an inline box for that box itself
and for its ancestors as well.

This fixes css1/units/rounding.html with ALLOW_INLINES enabled.

* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (270472 => 270473)

--- trunk/Source/WebCore/ChangeLog	2020-12-05 14:21:39 UTC (rev 270472)
+++ trunk/Source/WebCore/ChangeLog	2020-12-05 14:23:02 UTC (rev 270473)
@@ -1,5 +1,20 @@
 2020-12-05  Zalan Bujtas  
 
+[LFC][IFC] Create an inline box for  when it's the first box on the line
+https://bugs.webkit.org/show_bug.cgi?id=219556
+
+Reviewed by Antti Koivisto.
+
+When the line starts with inline-box-end (), we need to create an inline box for that box itself
+and for its ancestors as well.
+
+This fixes css1/units/rounding.html with ALLOW_INLINES enabled.
+
+* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
+(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
+
+2020-12-05  Zalan Bujtas  
+
 [LFC][Integration] Do not construct a new layout box for every inline box end (InlineWalker)
 https://bugs.webkit.org/show_bug.cgi?id=219557
 


Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp (270472 => 270473)

--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp	2020-12-05 14:21:39 UTC (rev 270472)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp	2020-12-05 14:23:02 UTC (rev 270473)
@@ -232,17 +232,20 @@
 // e.g.
 // normally the inline box closing forms a continuous content
 // unless it's forced to the next line
-if (isRootBox(firstRunParentLayoutBox) && !firstRun.isInlineBoxEnd())
+auto firstRunNeedsInlineBox = firstRun.isInlineBoxEnd();
+if (!firstRunNeedsInlineBox && isRootBox(firstRunParentLayoutBox))
 return;
+Vector layoutBoxesWithoutInlineBoxes;
+if (firstRunNeedsInlineBox)
+layoutBoxesWithoutInlineBoxes.append(());
 auto* ancestor = 
-Vector ancestorsWithoutInlineBoxes;
 while (!isRootBox(*ancestor)) {
-ancestorsWithoutInlineBoxes.append(ancestor);
+layoutBoxesWithoutInlineBoxes.append(ancestor);
 ancestor = >parent();
 }
-// Construct the missing LineBox::InlineBoxes starting with the topmost ancestor.
-for (auto* ancestor : WTF::makeReversedRange(ancestorsWithoutInlineBoxes)) {
-auto inlineBox = LineBox::InlineLevelBox::createInlineBox(*ancestor, horizontalAligmentOffset, lineBox.logicalWidth());
+// Construct the missing LineBox::InlineBoxes starting with the topmost layout box.
+for (auto* layoutBox : WTF::makeReversedRange(layoutBoxesWithoutInlineBoxes)) {
+auto inlineBox = LineBox::InlineLevelBox::createInlineBox(*layoutBox, horizontalAligmentOffset, lineBox.logicalWidth());
 setVerticalGeometryForInlineBox(*inlineBox);
 lineBox.addInlineLevelBox(WTFMove(inlineBox));
 }






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


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

2020-12-05 Thread zalan
Title: [270472] trunk/Source/WebCore








Revision 270472
Author za...@apple.com
Date 2020-12-05 06:21:39 -0800 (Sat, 05 Dec 2020)


Log Message
[LFC][Integration] Do not construct a new layout box for every inline box end (InlineWalker)
https://bugs.webkit.org/show_bug.cgi?id=219557

Reviewed by Antti Koivisto.

We use the InlineWalker to walk the inline part of the render tree to build the corresponding layout (sub)tree.

With content e.g text, InlineWalker visits
1.  (RenderInline)
2. text (RenderText)
3.  (RenderInline)

This patch ensures that we don't create yet another layout box for step #3.

* layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::buildTree):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (270471 => 270472)

--- trunk/Source/WebCore/ChangeLog	2020-12-05 11:54:00 UTC (rev 270471)
+++ trunk/Source/WebCore/ChangeLog	2020-12-05 14:21:39 UTC (rev 270472)
@@ -1,3 +1,22 @@
+2020-12-05  Zalan Bujtas  
+
+[LFC][Integration] Do not construct a new layout box for every inline box end (InlineWalker)
+https://bugs.webkit.org/show_bug.cgi?id=219557
+
+Reviewed by Antti Koivisto.
+
+We use the InlineWalker to walk the inline part of the render tree to build the corresponding layout (sub)tree.
+
+With content e.g text, InlineWalker visits
+1.  (RenderInline)
+2. text (RenderText)
+3.  (RenderInline)
+
+This patch ensures that we don't create yet another layout box for step #3.
+
+* layout/integration/LayoutIntegrationBoxTree.cpp:
+(WebCore::LayoutIntegration::BoxTree::buildTree):
+
 2020-12-04  Chris Dumez  
 
 Simplify audio resampling code


Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp (270471 => 270472)

--- trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2020-12-05 11:54:00 UTC (rev 270471)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp	2020-12-05 14:21:39 UTC (rev 270472)
@@ -91,6 +91,8 @@
 };
 
 for (auto walker = InlineWalker(m_flow); !walker.atEnd(); walker.advance()) {
+if (walker.atEndOfInline())
+continue;
 auto& childRenderer = *walker.current();
 auto childBox = createChildBox(childRenderer);
 appendChild(WTFMove(childBox), childRenderer);






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


[webkit-changes] [270471] trunk/LayoutTests

2020-12-05 Thread dpino
Title: [270471] trunk/LayoutTests








Revision 270471
Author dp...@igalia.com
Date 2020-12-05 03:54:00 -0800 (Sat, 05 Dec 2020)


Log Message
[GTK] Unreviewed test gardening. Gardened more media-source timeouts.

* platform/gtk/TestExpectations:

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (270470 => 270471)

--- trunk/LayoutTests/ChangeLog	2020-12-05 05:59:55 UTC (rev 270470)
+++ trunk/LayoutTests/ChangeLog	2020-12-05 11:54:00 UTC (rev 270471)
@@ -1,3 +1,9 @@
+2020-12-05  Diego Pino Garcia  
+
+[GTK] Unreviewed test gardening. Gardened more media-source timeouts.
+
+* platform/gtk/TestExpectations:
+
 2020-12-04  Lauro Moura  
 
 [GLIB] Gardening media-source timeouts


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (270470 => 270471)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2020-12-05 05:59:55 UTC (rev 270470)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2020-12-05 11:54:00 UTC (rev 270471)
@@ -411,26 +411,64 @@
 
 # MSE failures
 webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/URL-createObjectURL-revoke.html [ Failure ]
-# See also bug #175578
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-changetype.html [ Failure Crash ]
-# Crash is webkit.org/b/176020
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Failure ]
-# Crash in bug #176019
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-endofstream.html [ Failure ]
-webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-errors.html [ Failure ]
+
+# Timing out after r270435.
+webkit.org/b/219565 http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-changetype.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-duration.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-endofstream.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-errors.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-duration-boundaryconditions.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-replay.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-seek-beyond-duration.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html [ Skip ]
+webkit.org/b/219565 imported/w3c/web-platform-tests/media-source/mediasource-correct-frames-after-reappend.html [ Skip ]
+webkit.org/b/219565 media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html [ Skip ]
+webkit.org/b/219565 media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html [ Skip ]
+webkit.org/b/219565 media/encrypted-media/clearKey/clearKey-message-cenc-event-mse.html [ Skip ]
+webkit.org/b/219565 media/encrypted-media/clearKey/clearKey-webm-video-playback-mse.html [ Skip ]
+
+# REGRESSION(r270435). Uncomment failures below after bug is fixed.
+# See also bug #175578.
+# webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Failure ]
+# webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-append-buffer.html [ Failure ]
+# webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-avtracks.html [ Failure ]
+# webkit.org/b/167108 imported/w3c/web-platform-tests/media-source/mediasource-buffered.html [ Failure ]
+# webkit.org/b/167108