[webkit-changes] [232252] trunk/Tools

2018-05-28 Thread sihui_liu
Title: [232252] trunk/Tools








Revision 232252
Author sihui_...@apple.com
Date 2018-05-28 20:46:35 -0700 (Mon, 28 May 2018)


Log Message
Add an API test to check process privilege when using Cookie API
https://bugs.webkit.org/show_bug.cgi?id=185406

Reviewed by Geoffrey Garen.

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm




Diff

Modified: trunk/Tools/ChangeLog (232251 => 232252)

--- trunk/Tools/ChangeLog	2018-05-29 02:40:43 UTC (rev 232251)
+++ trunk/Tools/ChangeLog	2018-05-29 03:46:35 UTC (rev 232252)
@@ -1,3 +1,15 @@
+2018-05-28  Sihui Liu  
+
+Add an API test to check process privilege when using Cookie API
+https://bugs.webkit.org/show_bug.cgi?id=185406
+
+Reviewed by Geoffrey Garen.
+
+Add API test coverage.
+
+* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
+(TEST):
+
 2018-05-28  Thibault Saunier  
 
 [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (232251 => 232252)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2018-05-29 02:40:43 UTC (rev 232251)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2018-05-29 03:46:35 UTC (rev 232252)
@@ -32,6 +32,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -194,6 +195,41 @@
 runTestWithWebsiteDataStore([WKWebsiteDataStore defaultDataStore]);
 }
 
+TEST(WebKit, WKHTTPCookieStoreProcessPrivilege)
+{
+// Make sure UI process has no privilege at the beginning.
+WTF::setProcessPrivileges({ });
+
+[[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] {
+gotFlag = true;
+}];
+TestWebKitAPI::Util::run();
+gotFlag = false;
+
+globalCookieStore = [[WKWebsiteDataStore defaultDataStore] httpCookieStore];
+
+RetainPtr cookie = [NSHTTPCookie cookieWithProperties:@{
+NSHTTPCookiePath: @"/",
+NSHTTPCookieName: @"Cookie",
+NSHTTPCookieValue: @"Value",
+NSHTTPCookieDomain: @".www.webkit.org",
+}];
+
+[globalCookieStore setCookie:cookie.get() completionHandler:[]() {
+gotFlag = true;
+}];
+TestWebKitAPI::Util::run();
+gotFlag = false;
+
+
+[globalCookieStore getAllCookies:^(NSArray*cookies) {
+ASSERT_EQ(1u, cookies.count);
+gotFlag = true;
+}];
+TestWebKitAPI::Util::run();
+gotFlag = false;
+}
+
 TEST(WebKit, WKHTTPCookieStoreHttpOnly) 
 {
 WKWebsiteDataStore* dataStore = [WKWebsiteDataStore defaultDataStore];






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


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

2018-05-28 Thread zalan
Title: [232251] trunk/Source/WebCore








Revision 232251
Author za...@apple.com
Date 2018-05-28 19:40:43 -0700 (Mon, 28 May 2018)


Log Message
Unreviewed build fix.

* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::Rect::operator LayoutRect const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/displaytree/DisplayBox.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (232250 => 232251)

--- trunk/Source/WebCore/ChangeLog	2018-05-28 20:39:14 UTC (rev 232250)
+++ trunk/Source/WebCore/ChangeLog	2018-05-29 02:40:43 UTC (rev 232251)
@@ -1,5 +1,12 @@
 2018-05-28  Zalan Bujtas  
 
+Unreviewed build fix.
+
+* layout/displaytree/DisplayBox.h:
+(WebCore::Display::Box::Rect::operator LayoutRect const):
+
+2018-05-28  Zalan Bujtas  
+
 [LFC] Add Rect interface to Display::Box
 https://bugs.webkit.org/show_bug.cgi?id=186019
 


Modified: trunk/Source/WebCore/layout/displaytree/DisplayBox.h (232250 => 232251)

--- trunk/Source/WebCore/layout/displaytree/DisplayBox.h	2018-05-28 20:39:14 UTC (rev 232250)
+++ trunk/Source/WebCore/layout/displaytree/DisplayBox.h	2018-05-29 02:40:43 UTC (rev 232251)
@@ -82,6 +82,8 @@
 
 void expand(LayoutUnit, LayoutUnit);
 
+operator LayoutRect() const { return m_rect; }
+
 private:
 #if !ASSERT_DISABLED
 void invalidateTop() { m_hasValidTop = false; }






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


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

2018-05-28 Thread zalan
Title: [232250] trunk/Source/WebCore








Revision 232250
Author za...@apple.com
Date 2018-05-28 13:39:14 -0700 (Mon, 28 May 2018)


Log Message
[LFC] Add Rect interface to Display::Box
https://bugs.webkit.org/show_bug.cgi?id=186019

Reviewed by Antti Koivisto.

Having a dedicated Rect class and moving the geometry invalidation to it enables us to call
displayBox.contentBox().left() even when the widht/height are not computed yet.
Also having Rect with top/left/bottom/right interface is more aligned with the rest of the layout code than x/y/maxX/maxY.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::contentHeightForFormattingContextRoot):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
* layout/displaytree/DisplayBox.cpp:
(WebCore::Display::Box::marginBox const):
(WebCore::Display::Box::borderBox const):
(WebCore::Display::Box::paddingBox const):
(WebCore::Display::Box::contentBox const):
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::Rect::invalidateTop):
(WebCore::Display::Box::Rect::invalidateLeft):
(WebCore::Display::Box::Rect::invalidateWidth):
(WebCore::Display::Box::Rect::invalidateHeight):
(WebCore::Display::Box::Rect::hasValidPosition const):
(WebCore::Display::Box::Rect::hasValidSize const):
(WebCore::Display::Box::Rect::hasValidGeometry const):
(WebCore::Display::Box::rect const):
(WebCore::Display::Box::top const):
(WebCore::Display::Box::left const):
(WebCore::Display::Box::bottom const):
(WebCore::Display::Box::right const):
(WebCore::Display::Box::topLeft const):
(WebCore::Display::Box::bottomRight const):
(WebCore::Display::Box::size const):
(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::setTopLeft):
(WebCore::Display::Box::setTop):
(WebCore::Display::Box::setLeft):
(WebCore::Display::Box::setWidth):
(WebCore::Display::Box::setHeight):
(WebCore::Display::Box::Rect::invalidatePosition):
(WebCore::Display::Box::Rect::setHasValidPosition):
(WebCore::Display::Box::Rect::Rect):
(WebCore::Display::Box::Rect::top const):
(WebCore::Display::Box::Rect::left const):
(WebCore::Display::Box::Rect::bottom const):
(WebCore::Display::Box::Rect::right const):
(WebCore::Display::Box::Rect::topLeft const):
(WebCore::Display::Box::Rect::bottomRight const):
(WebCore::Display::Box::Rect::size const):
(WebCore::Display::Box::Rect::width const):
(WebCore::Display::Box::Rect::height const):
(WebCore::Display::Box::Rect::setTopLeft):
(WebCore::Display::Box::Rect::setTop):
(WebCore::Display::Box::Rect::setLeft):
(WebCore::Display::Box::Rect::setWidth):
(WebCore::Display::Box::Rect::setHeight):
(WebCore::Display::Box::Rect::shiftLeftTo):
(WebCore::Display::Box::Rect::shiftRightTo):
(WebCore::Display::Box::Rect::shiftTopTo):
(WebCore::Display::Box::Rect::shiftBottomTo):
(WebCore::Display::Box::Rect::expand):
(WebCore::Display::Box::invalidateTop): Deleted.
(WebCore::Display::Box::invalidateLeft): Deleted.
(WebCore::Display::Box::invalidateWidth): Deleted.
(WebCore::Display::Box::invalidateHeight): Deleted.
(WebCore::Display::Box::hasValidPosition const): Deleted.
(WebCore::Display::Box::hasValidSize const): Deleted.
(WebCore::Display::Box::hasValidGeometry const): Deleted.
(WebCore::Display::Box::invalidatePosition): Deleted.
(WebCore::Display::Box::setHasValidPosition): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/FormattingContextGeometry.cpp
trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
trunk/Source/WebCore/layout/displaytree/DisplayBox.cpp
trunk/Source/WebCore/layout/displaytree/DisplayBox.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (232249 => 232250)

--- trunk/Source/WebCore/ChangeLog	2018-05-28 18:56:34 UTC (rev 232249)
+++ trunk/Source/WebCore/ChangeLog	2018-05-28 20:39:14 UTC (rev 232250)
@@ -1,5 +1,80 @@
 2018-05-28  Zalan Bujtas  
 
+[LFC] Add Rect interface to Display::Box
+https://bugs.webkit.org/show_bug.cgi?id=186019
+
+Reviewed by Antti Koivisto.
+
+Having a dedicated Rect class and moving the geometry invalidation to it enables us to call
+displayBox.contentBox().left() even when the widht/height are not computed yet.
+Also having Rect with top/left/bottom/right interface is more aligned with the rest of the layout code than x/y/maxX/maxY.
+
+* layout/FormattingContextGeometry.cpp:
+(WebCore::Layout::contentHeightForFormattingContextRoot):
+* layout/blockformatting/BlockFormattingContextGeometry.cpp:
+(WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
+* layout/displaytree/DisplayBox.cpp:
+(WebCore::Display::Box::marginBox const):
+(WebCore::Display::Box::borderBox const):
+(WebCore::Display::Box::paddingBox const):
+(WebCore::Display::Box::contentBox const):
+* layout/displaytree/DisplayBox.h:
+

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

2018-05-28 Thread zalan
Title: [232248] trunk/Source/WebCore








Revision 232248
Author za...@apple.com
Date 2018-05-28 10:55:18 -0700 (Mon, 28 May 2018)


Log Message
[LFC] Add layout tree verification.
https://bugs.webkit.org/show_bug.cgi?id=186018

Reviewed by Antti Koivisto.

Compare layout and render tree geometry and output the mismtaching rectangles.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj: Add missing headers and make then private.
* layout/LayoutContext.h:
* layout/Verification.cpp: Added.
(WebCore::Layout::outputMismatchedBoxInformationIfNeeded):
(WebCore::Layout::verifySubtree):
(WebCore::Layout::LayoutContext::verifyAndOutputLayoutTree const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/layout/LayoutContext.h


Added Paths

trunk/Source/WebCore/layout/Verification.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (232247 => 232248)

--- trunk/Source/WebCore/ChangeLog	2018-05-28 16:03:39 UTC (rev 232247)
+++ trunk/Source/WebCore/ChangeLog	2018-05-28 17:55:18 UTC (rev 232248)
@@ -1,3 +1,20 @@
+2018-05-28  Zalan Bujtas  
+
+[LFC] Add layout tree verification.
+https://bugs.webkit.org/show_bug.cgi?id=186018
+
+Reviewed by Antti Koivisto.
+
+Compare layout and render tree geometry and output the mismtaching rectangles.
+
+* Sources.txt:
+* WebCore.xcodeproj/project.pbxproj: Add missing headers and make then private.
+* layout/LayoutContext.h:
+* layout/Verification.cpp: Added.
+(WebCore::Layout::outputMismatchedBoxInformationIfNeeded):
+(WebCore::Layout::verifySubtree):
+(WebCore::Layout::LayoutContext::verifyAndOutputLayoutTree const):
+
 2018-05-28  Sam Weinig  
 
 Modernize SVGRenderStyleDefs.h


Modified: trunk/Source/WebCore/Sources.txt (232247 => 232248)

--- trunk/Source/WebCore/Sources.txt	2018-05-28 16:03:39 UTC (rev 232247)
+++ trunk/Source/WebCore/Sources.txt	2018-05-28 17:55:18 UTC (rev 232248)
@@ -1219,6 +1219,7 @@
 layout/FormattingContextGeometry.cpp
 layout/FormattingState.cpp
 layout/LayoutContext.cpp
+layout/Verification.cpp
 layout/blockformatting/BlockFormattingContext.cpp
 layout/blockformatting/BlockFormattingContextGeometry.cpp
 layout/blockformatting/BlockFormattingState.cpp


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (232247 => 232248)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-05-28 16:03:39 UTC (rev 232247)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2018-05-28 17:55:18 UTC (rev 232248)
@@ -391,25 +391,34 @@
 		0FFD4D6118651FA300512F6E /* AsyncScrollingCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FFD4D5F18651FA300512F6E /* AsyncScrollingCoordinator.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */; };
 		112B34D51E60B98300BB310A /* SimpleLineLayoutPagination.h in Headers */ = {isa = PBXBuildFile; fileRef = 112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */; };
+		11310CF120BA4A1B0065A8D0 /* Invalidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 115F7805209CBCBD00739C13 /* Invalidation.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF220BA4A320065A8D0 /* LayoutTreeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 11100FD7209514DF0081AA6C /* LayoutTreeBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF320BA4A370065A8D0 /* LayoutReplaced.h in Headers */ = {isa = PBXBuildFile; fileRef = 111C615620AD1AE1005B82FA /* LayoutReplaced.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF420BA4A3D0065A8D0 /* LayoutIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 11100FC72092764C0081AA6C /* LayoutIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF520BA4A4C0065A8D0 /* LayoutDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 11B042FB20B0E21400828A6B /* LayoutDescendantIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF620BA4A560065A8D0 /* LayoutChildIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 11100FC920927CBC0081AA6C /* LayoutChildIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF720BA4A620065A8D0 /* LayoutAncestorIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 11100FCA2092868D0081AA6C /* LayoutAncestorIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF820BA4A6A0065A8D0 /* InlineInvalidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1123AFDC209ABBBA00736ACC /* InlineInvalidation.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		11310CF920BA4A7D0065A8D0 /* BlockInvalidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1123AFD9209ABB2000736ACC /* BlockInvalidation.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		113409DA203E038000C66915 /* RenderTreeBuilderContinuation.h 

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

2018-05-28 Thread zalan
Title: [232249] trunk/Source/WebCore








Revision 232249
Author za...@apple.com
Date 2018-05-28 11:56:34 -0700 (Mon, 28 May 2018)


Log Message
[LFC] Add formatting context testing codepath in FrameViewLayoutContext
https://bugs.webkit.org/show_bug.cgi?id=186036

Reviewed by Antti Koivisto.

This is to verify the formatting context layout correctness.

* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::LayoutContext):
(WebCore::Layout::LayoutContext::initializeRoot):
* layout/LayoutContext.h:
(WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
* page/FrameViewLayoutContext.cpp:
(WebCore::layoutUsingFormattingContext):
(WebCore::FrameViewLayoutContext::layout):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/LayoutContext.cpp
trunk/Source/WebCore/layout/LayoutContext.h
trunk/Source/WebCore/page/FrameViewLayoutContext.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (232248 => 232249)

--- trunk/Source/WebCore/ChangeLog	2018-05-28 17:55:18 UTC (rev 232248)
+++ trunk/Source/WebCore/ChangeLog	2018-05-28 18:56:34 UTC (rev 232249)
@@ -1,5 +1,23 @@
 2018-05-28  Zalan Bujtas  
 
+[LFC] Add formatting context testing codepath in FrameViewLayoutContext
+https://bugs.webkit.org/show_bug.cgi?id=186036
+
+Reviewed by Antti Koivisto.
+
+This is to verify the formatting context layout correctness.
+
+* layout/LayoutContext.cpp:
+(WebCore::Layout::LayoutContext::LayoutContext):
+(WebCore::Layout::LayoutContext::initializeRoot):
+* layout/LayoutContext.h:
+(WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
+* page/FrameViewLayoutContext.cpp:
+(WebCore::layoutUsingFormattingContext):
+(WebCore::FrameViewLayoutContext::layout):
+
+2018-05-28  Zalan Bujtas  
+
 [LFC] Add layout tree verification.
 https://bugs.webkit.org/show_bug.cgi?id=186018
 


Modified: trunk/Source/WebCore/layout/LayoutContext.cpp (232248 => 232249)

--- trunk/Source/WebCore/layout/LayoutContext.cpp	2018-05-28 17:55:18 UTC (rev 232248)
+++ trunk/Source/WebCore/layout/LayoutContext.cpp	2018-05-28 18:56:34 UTC (rev 232249)
@@ -45,11 +45,37 @@
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(LayoutContext);
 
-LayoutContext::LayoutContext(const Box& root)
-: m_root(makeWeakPtr(const_cast(root)))
+LayoutContext::LayoutContext()
 {
 }
 
+void LayoutContext::initializeRoot(const Container& root, const LayoutSize& containerSize)
+{
+m_root = makeWeakPtr(const_cast(root));
+auto& displayBox = createDisplayBox(root);
+// Root is always at 0 0 with no margin 
+displayBox.setTopLeft({ });
+displayBox.setWidth(containerSize.width());
+displayBox.setHeight(containerSize.height());
+displayBox.setMargin({ });
+
+auto& style = root.style();
+// FIXME: m_root could very well be a formatting context root with ancestors and resolvable border and padding (as opposed to the topmost root)  
+displayBox.setBorder({
+style.borderTop().width(),
+style.borderLeft().width(),
+style.borderBottom().width(),
+style.borderRight().width()
+
+});
+displayBox.setPadding({
+valueForLength(style.paddingTop(), containerSize.width()),
+valueForLength(style.paddingLeft(), containerSize.width()),
+valueForLength(style.paddingBottom(), containerSize.width()),
+valueForLength(style.paddingRight(), containerSize.width())
+});
+}
+
 void LayoutContext::updateLayout()
 {
 ASSERT(!m_formattingContextRootListForLayout.isEmpty());


Modified: trunk/Source/WebCore/layout/LayoutContext.h (232248 => 232249)

--- trunk/Source/WebCore/layout/LayoutContext.h	2018-05-28 17:55:18 UTC (rev 232248)
+++ trunk/Source/WebCore/layout/LayoutContext.h	2018-05-28 18:56:34 UTC (rev 232249)
@@ -58,13 +58,10 @@
 class LayoutContext {
 WTF_MAKE_ISO_ALLOCATED(LayoutContext);
 public:
-LayoutContext(const Box& root);
+LayoutContext();
 
+void initializeRoot(const Container&, const LayoutSize&);
 void updateLayout();
-
-Display::Box& createDisplayBox(const Box&);
-Display::Box* displayBoxForLayoutBox(const Box& layoutBox) const { return m_layoutToDisplayBox.get(); }
-
 void styleChanged(const Box&, StyleDiff);
 
 enum class UpdateType {
@@ -83,8 +80,11 @@
 // For testing purposes only
 void verifyAndOutputMismatchingLayoutTree(const RenderView&) const;
 
+Display::Box& createDisplayBox(const Box&);
+Display::Box* displayBoxForLayoutBox(const Box& layoutBox) const { return m_layoutToDisplayBox.get(); }
+
 private:
-WeakPtr m_root;
+WeakPtr m_root;
 HashSet m_formattingContextRootListForLayout;
 HashMap> m_formattingStates;
 HashMap> m_layoutToDisplayBox;


Modified: trunk/Source/WebCore/page/FrameViewLayoutContext.cpp (232248 => 232249)

--- trunk/Source/WebCore/page/FrameViewLayoutContext.cpp	2018-05-28 17:55:18 UTC (rev 232248)
+++ 

[webkit-changes] [232247] trunk/LayoutTests

2018-05-28 Thread csaavedra
Title: [232247] trunk/LayoutTests








Revision 232247
Author csaave...@igalia.com
Date 2018-05-28 09:03:39 -0700 (Mon, 28 May 2018)


Log Message
[GTK][WPE] AppCache test gardening

Some appcache tests were flaky due to console output, see
https://bugs.webkit.org/show_bug.cgi?id=185431 for more info.
Fixing those by dumping the output to stderr instead.

At the same time, clean up the expectations for appcache tests,
many were now passing, so several old bugs got closed now.

Unreviewed gardening.
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (232246 => 232247)

--- trunk/LayoutTests/ChangeLog	2018-05-28 15:20:04 UTC (rev 232246)
+++ trunk/LayoutTests/ChangeLog	2018-05-28 16:03:39 UTC (rev 232247)
@@ -1,5 +1,20 @@
 2018-05-28  Claudio Saavedra  
 
+[GTK][WPE] AppCache test gardening
+
+Some appcache tests were flaky due to console output, see
+https://bugs.webkit.org/show_bug.cgi?id=185431 for more info.
+Fixing those by dumping the output to stderr instead.
+
+At the same time, clean up the expectations for appcache tests,
+many were now passing, so several old bugs got closed now.
+
+Unreviewed gardening.
+* platform/gtk/TestExpectations:
+* platform/wpe/TestExpectations:
+
+2018-05-28  Claudio Saavedra  
+
 [GTK][WPE] transitions/interrupted-transition-hardware.html failing
 
 Unreviewed gardening, image-only failure.


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (232246 => 232247)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2018-05-28 15:20:04 UTC (rev 232246)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2018-05-28 16:03:39 UTC (rev 232247)
@@ -1138,8 +1138,6 @@
 webkit.org/b/175419 http/wpt/service-workers [ Failure Pass ]
 webkit.org/b/175419 http/tests/inspector/network/resource-response-service-worker.html [ Skip ]
 webkit.org/b/175419 imported/w3c/web-platform-tests/service-workers [ Skip ]
-webkit.org/b/175419 http/tests/appcache/main-resource-redirect-with-sw.html [ Skip ]
-webkit.org/b/175419 http/tests/appcache/main-resource-redirect.html [ Skip ]
 webkit.org/b/175419 http/wpt/service-workers/navigation-redirect-main-frame.https.html [ Skip ]
 webkit.org/b/175419 http/wpt/service-workers/third-party-registration.html [ Skip ]
 
@@ -1373,8 +1371,6 @@
 webkit.org/b/49179 animations/stop-animation-on-suspend.html [ Failure Pass ]
 webkit.org/b/49179 legacy-animation-engine/animations/stop-animation-on-suspend.html [ Failure Pass ]
 
-webkit.org/b/61121 http/tests/appcache/interrupted-update.html [ Failure Pass ]
-
 webkit.org/b/94119 storage/websql/database-lock-after-reload.html [ Failure Pass ]
 webkit.org/b/132283 storage/websql/read-transactions-running-concurrently.html [ Failure Pass ]
 
@@ -1819,7 +1815,7 @@
 
 webkit.org/b/160135 http/tests/security/contentSecurityPolicy/video-with-http-url-allowed-by-csp-media-src-star.html [ Failure Pass ]
 webkit.org/b/160136 http/tests/security/cross-origin-plugin-private-browsing-toggled-allowed.html [ Failure Pass ]
-webkit.org/b/142488 http/tests/appcache/404-resource-with-slow-main-resource.php [ Failure Pass ]
+webkit.org/b/142488 http/tests/appcache/404-resource-with-slow-main-resource.php [ DumpJSConsoleLogInStdErr ]
 webkit.org/b/162685 http/tests/cache/disk-cache/disk-cache-204-status-code.html [ Failure Pass ]
 
 webkit.org/b/160137 svg/custom/non-scaling-stroke-update.svg [ ImageOnlyFailure Pass ]
@@ -2230,8 +2226,6 @@
 webkit.org/b/168373 media/media-source/media-source-error-crash.html [ Timeout ]
 webkit.org/b/168373 media/media-source/only-bcp47-language-tags-accepted-as-valid.html [ Timeout ]
 
-webkit.org/b/168569 http/tests/appcache/main-resource-fallback-for-network-error-crash.html [ Timeout ]
-
 webkit.org/b/169211 fast/parser/adoption-agency-unload-iframe-4.html [ Timeout ]
 
 webkit.org/b/172284 svg/animations/animated-svg-image-outside-viewport-paused.html [ Timeout ]
@@ -2500,9 +2494,6 @@
 webkit.org/b/139357 fast/workers/worker-crash-with-invalid-location.html [ Skip ]
 webkit.org/b/139357 http/tests/media/video-accept-encoding.html [ Failure ]
 
-# Appcache manifest is still downloaded in the WebProcess
-webkit.org/b/138736 http/tests/appcache/auth.html [ Skip ]
-
 # There is no network load scheduling or prioritization with NetworkProcess.
 webkit.org/b/123431 http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html [ Failure Pass ]
 webkit.org/b/123431 http/tests/local/link-stylesheet-load-order-preload.html [ Pass Failure ]


Modified: trunk/LayoutTests/platform/wpe/TestExpectations (232246 => 232247)

--- trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-28 15:20:04 UTC (rev 232246)
+++ 

[webkit-changes] [232245] trunk/LayoutTests

2018-05-28 Thread csaavedra
Title: [232245] trunk/LayoutTests








Revision 232245
Author csaave...@igalia.com
Date 2018-05-28 06:25:01 -0700 (Mon, 28 May 2018)


Log Message
[GTK][WPE] transitions/interrupted-transition-hardware.html failing

Unreviewed gardening, image-only failure.
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

Modified Paths

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




Diff

Modified: trunk/LayoutTests/ChangeLog (232244 => 232245)

--- trunk/LayoutTests/ChangeLog	2018-05-28 12:26:05 UTC (rev 232244)
+++ trunk/LayoutTests/ChangeLog	2018-05-28 13:25:01 UTC (rev 232245)
@@ -1,3 +1,11 @@
+2018-05-28  Claudio Saavedra  
+
+[GTK][WPE] transitions/interrupted-transition-hardware.html failing
+
+Unreviewed gardening, image-only failure.
+* platform/gtk/TestExpectations:
+* platform/wpe/TestExpectations:
+
 2018-05-26  Yusuke Suzuki  
 
 [JSC] Rename Array#flatten to flat


Modified: trunk/LayoutTests/platform/gtk/TestExpectations (232244 => 232245)

--- trunk/LayoutTests/platform/gtk/TestExpectations	2018-05-28 12:26:05 UTC (rev 232244)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2018-05-28 13:25:01 UTC (rev 232245)
@@ -3399,6 +3399,8 @@
 
 webkit.org/b/185913 fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html [ Failure ]
 
+webkit.org/b/186035 transitions/interrupted-transition-hardware.html [ ImageOnlyFailure ]
+
 #
 # End of non-crashing, non-flaky tests failing
 #


Modified: trunk/LayoutTests/platform/wpe/TestExpectations (232244 => 232245)

--- trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-28 12:26:05 UTC (rev 232244)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2018-05-28 13:25:01 UTC (rev 232245)
@@ -1171,3 +1171,5 @@
 webkit.org/b/185676 fullscreen/requestFullscreen-escape-key.html [ Failure ]
 webkit.org/b/185676 fullscreen/video-controls-rtl.html [ Failure ]
 webkit.org/b/185676 fullscreen/full-screen-plugin.html [ Timeout ]
+
+webkit.org/b/186035 transitions/interrupted-transition-hardware.html [ ImageOnlyFailure ]






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


[webkit-changes] [232244] trunk/Source

2018-05-28 Thread utatane . tea
Title: [232244] trunk/Source








Revision 232244
Author utatane@gmail.com
Date 2018-05-28 05:26:05 -0700 (Mon, 28 May 2018)


Log Message
[WTF] Add clz32 / clz64 for MSVC
https://bugs.webkit.org/show_bug.cgi?id=186023

Reviewed by Daniel Bates.

Source/_javascript_Core:

Move clz32 and clz64 to WTF.

* runtime/MathCommon.h:
(JSC::clz32): Deleted.
(JSC::clz64): Deleted.

Source/WTF:

This patch adds efficient implementations of clz32 and clz64 for MSVC.
While MSVC has _lzcnt intrinsic, it is only valid if the CPU has lzcnt instruction.
Instead of checking cpuid here, we just use _BitScanReverse and _BitScanReverse64.

* wtf/MathExtras.h:
(WTF::clz32):
(WTF::clz64):

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/runtime/MathCommon.h
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/MathExtras.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (232243 => 232244)

--- trunk/Source/_javascript_Core/ChangeLog	2018-05-28 10:57:19 UTC (rev 232243)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-05-28 12:26:05 UTC (rev 232244)
@@ -1,3 +1,16 @@
+2018-05-27  Yusuke Suzuki  
+
+[WTF] Add clz32 / clz64 for MSVC
+https://bugs.webkit.org/show_bug.cgi?id=186023
+
+Reviewed by Daniel Bates.
+
+Move clz32 and clz64 to WTF.
+
+* runtime/MathCommon.h:
+(JSC::clz32): Deleted.
+(JSC::clz64): Deleted.
+
 2018-05-27  Caio Lima  
 
 [ESNext][BigInt] Implement "+" and "-" unary operation


Modified: trunk/Source/_javascript_Core/runtime/MathCommon.h (232243 => 232244)

--- trunk/Source/_javascript_Core/runtime/MathCommon.h	2018-05-28 10:57:19 UTC (rev 232243)
+++ trunk/Source/_javascript_Core/runtime/MathCommon.h	2018-05-28 12:26:05 UTC (rev 232244)
@@ -47,44 +47,6 @@
 return -9007199254740991.0;
 }
 
-inline int clz32(uint32_t number)
-{
-#if COMPILER(GCC_OR_CLANG)
-int zeroCount = 32;
-if (number)
-zeroCount = __builtin_clz(number);
-return zeroCount;
-#else
-int zeroCount = 0;
-for (int i = 31; i >= 0; i--) {
-if (!(number >> i))
-zeroCount++;
-else
-break;
-}
-return zeroCount;
-#endif
-}
-
-inline int clz64(uint64_t number)
-{
-#if COMPILER(GCC_OR_CLANG)
-int zeroCount = 64;
-if (number)
-zeroCount = __builtin_clzll(number);
-return zeroCount;
-#else
-int zeroCount = 0;
-for (int i = 63; i >= 0; i--) {
-if (!(number >> i))
-zeroCount++;
-else
-break;
-}
-return zeroCount;
-#endif
-}
-
 // This in the ToInt32 operation is defined in section 9.5 of the ECMA-262 spec.
 // Note that this operation is identical to ToUInt32 other than to interpretation
 // of the resulting bit-pattern (as such this method is also called to implement


Modified: trunk/Source/WTF/ChangeLog (232243 => 232244)

--- trunk/Source/WTF/ChangeLog	2018-05-28 10:57:19 UTC (rev 232243)
+++ trunk/Source/WTF/ChangeLog	2018-05-28 12:26:05 UTC (rev 232244)
@@ -1,3 +1,18 @@
+2018-05-27  Yusuke Suzuki  
+
+[WTF] Add clz32 / clz64 for MSVC
+https://bugs.webkit.org/show_bug.cgi?id=186023
+
+Reviewed by Daniel Bates.
+
+This patch adds efficient implementations of clz32 and clz64 for MSVC.
+While MSVC has _lzcnt intrinsic, it is only valid if the CPU has lzcnt instruction.
+Instead of checking cpuid here, we just use _BitScanReverse and _BitScanReverse64.
+
+* wtf/MathExtras.h:
+(WTF::clz32):
+(WTF::clz64):
+
 2018-05-26  Filip Pizlo  
 
 testair sometimes crashes due to races in initialization of ARC4RandomNumberGenerator


Modified: trunk/Source/WTF/wtf/MathExtras.h (232243 => 232244)

--- trunk/Source/WTF/wtf/MathExtras.h	2018-05-28 10:57:19 UTC (rev 232243)
+++ trunk/Source/WTF/wtf/MathExtras.h	2018-05-28 12:26:05 UTC (rev 232244)
@@ -524,6 +524,56 @@
 shuffleVector(vector, vector.size(), randomFunc);
 }
 
+inline unsigned clz32(uint32_t number)
+{
+#if COMPILER(GCC_OR_CLANG)
+if (number)
+return __builtin_clz(number);
+return 32;
+#elif COMPILER(MSVC)
+// Visual Studio 2008 or upper have __lzcnt, but we can't detect Intel AVX at compile time.
+// So we use bit-scan-reverse operation to calculate clz.
+unsigned long ret = 0;
+if (_BitScanReverse(, number))
+return 31 - ret;
+return 32;
+#else
+unsigned zeroCount = 0;
+for (int i = 31; i >= 0; i--) {
+if (!(number >> i))
+zeroCount++;
+else
+break;
+}
+return zeroCount;
+#endif
+}
+
+inline unsigned clz64(uint64_t number)
+{
+#if COMPILER(GCC_OR_CLANG)
+if (number)
+return __builtin_clzll(number);
+return 64;
+#elif COMPILER(MSVC)
+// Visual Studio 2008 or upper have __lzcnt, but we can't detect Intel AVX at compile time.
+// So we use bit-scan-reverse 

[webkit-changes] [232243] releases/WebKitGTK/webkit-2.21.3/

2018-05-28 Thread carlosgc
Title: [232243] releases/WebKitGTK/webkit-2.21.3/








Revision 232243
Author carlo...@webkit.org
Date 2018-05-28 03:57:19 -0700 (Mon, 28 May 2018)


Log Message
WebKitGTK+ 2.21.3

Added Paths

releases/WebKitGTK/webkit-2.21.3/




Diff




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


[webkit-changes] [232242] trunk

2018-05-28 Thread carlosgc
Title: [232242] trunk








Revision 232242
Author carlo...@webkit.org
Date 2018-05-28 03:56:08 -0700 (Mon, 28 May 2018)


Log Message
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.3 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

* gtk/NEWS: Add release notes for 2.21.3.

Modified Paths

trunk/ChangeLog
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/gtk/NEWS
trunk/Source/cmake/OptionsGTK.cmake




Diff

Modified: trunk/ChangeLog (232241 => 232242)

--- trunk/ChangeLog	2018-05-28 10:15:45 UTC (rev 232241)
+++ trunk/ChangeLog	2018-05-28 10:56:08 UTC (rev 232242)
@@ -1,3 +1,9 @@
+2018-05-28  Carlos Garcia Campos  
+
+Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.3 release.
+
+* Source/cmake/OptionsGTK.cmake: Bump version numbers.
+
 2018-05-25  Adrian Perez de Castro  
 
 Unreviewed. Update OptionsWPE.cmake and NEWS for 2.21.2 release.


Modified: trunk/Source/WebKit/ChangeLog (232241 => 232242)

--- trunk/Source/WebKit/ChangeLog	2018-05-28 10:15:45 UTC (rev 232241)
+++ trunk/Source/WebKit/ChangeLog	2018-05-28 10:56:08 UTC (rev 232242)
@@ -1,3 +1,9 @@
+2018-05-28  Carlos Garcia Campos  
+
+Unreviewed. Update OptionsGTK.cmake and NEWS for 2.21.3 release.
+
+* gtk/NEWS: Add release notes for 2.21.3.
+
 2018-05-27  Dan Bernstein  
 
 Reverted the changes made for https://webkit.org/b/186016


Modified: trunk/Source/WebKit/gtk/NEWS (232241 => 232242)

--- trunk/Source/WebKit/gtk/NEWS	2018-05-28 10:15:45 UTC (rev 232241)
+++ trunk/Source/WebKit/gtk/NEWS	2018-05-28 10:56:08 UTC (rev 232242)
@@ -1,4 +1,17 @@
 =
+WebKitGTK+ 2.21.3
+=
+
+What's new in WebKitGTK+ 2.21.3?
+
+  - Ensure memory monitor properly notifies all child processes.
+  - Add maximize, minimize and fullscreen window commands to WebDriver.
+  - Fix a network process crash when trying to get cookies of about:blank page.
+  - Fix UI process crash when closing the window under Wayland.
+  - Disable Gigacage if mmap fails to allocate in Linux.
+  - Fix several crashes and rendering issues.
+
+=
 WebKitGTK+ 2.21.2
 =
 


Modified: trunk/Source/cmake/OptionsGTK.cmake (232241 => 232242)

--- trunk/Source/cmake/OptionsGTK.cmake	2018-05-28 10:15:45 UTC (rev 232241)
+++ trunk/Source/cmake/OptionsGTK.cmake	2018-05-28 10:56:08 UTC (rev 232242)
@@ -1,11 +1,11 @@
 include(GNUInstallDirs)
 include(VersioningUtils)
 
-SET_PROJECT_VERSION(2 21 2)
+SET_PROJECT_VERSION(2 21 3)
 set(WEBKITGTK_API_VERSION 4.0)
 
-CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 67 0 30)
-CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(_javascript_CORE 27 0 9)
+CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 67 1 30)
+CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(_javascript_CORE 27 1 9)
 
 # These are shared variables, but we special case their definition so that we can use the
 # CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.






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


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

2018-05-28 Thread commit-queue
Title: [232241] trunk/Source/WebCore








Revision 232241
Author commit-qu...@webkit.org
Date 2018-05-28 03:15:45 -0700 (Mon, 28 May 2018)


Log Message
[Web Animations] Test webanimations/css-animations.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=186031

Patch by Carlos Garcia Campos  on 2018-05-28
Reviewed by Antoine Quint.

This is another case of std::optional value being used while it's nullopt, I guess this started to fail when we
stopped using the WTF implementation of std::optional. The problem is that we try to get the current iteration
of a declarative animation when the active time is unresolved.

* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::invalidateDOMEvents): Use value_or(0) instead of value() to get the current
iteration of the effect.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/animation/DeclarativeAnimation.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (232240 => 232241)

--- trunk/Source/WebCore/ChangeLog	2018-05-28 08:18:35 UTC (rev 232240)
+++ trunk/Source/WebCore/ChangeLog	2018-05-28 10:15:45 UTC (rev 232241)
@@ -1,3 +1,18 @@
+2018-05-28  Carlos Garcia Campos  
+
+[Web Animations] Test webanimations/css-animations.html is crashing
+https://bugs.webkit.org/show_bug.cgi?id=186031
+
+Reviewed by Antoine Quint.
+
+This is another case of std::optional value being used while it's nullopt, I guess this started to fail when we
+stopped using the WTF implementation of std::optional. The problem is that we try to get the current iteration
+of a declarative animation when the active time is unresolved.
+
+* animation/DeclarativeAnimation.cpp:
+(WebCore::DeclarativeAnimation::invalidateDOMEvents): Use value_or(0) instead of value() to get the current
+iteration of the effect.
+
 2018-05-28  Thibault Saunier  
 
 [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.


Modified: trunk/Source/WebCore/animation/DeclarativeAnimation.cpp (232240 => 232241)

--- trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2018-05-28 08:18:35 UTC (rev 232240)
+++ trunk/Source/WebCore/animation/DeclarativeAnimation.cpp	2018-05-28 10:15:45 UTC (rev 232241)
@@ -123,7 +123,7 @@
 auto* animationEffect = effect();
 
 auto isPending = pending();
-auto iteration = animationEffect ? animationEffect->currentIteration().value() : 0;
+auto iteration = animationEffect ? animationEffect->currentIteration().value_or(0) : 0;
 auto currentPhase = animationEffect ? animationEffect->phase() : phaseWithoutEffect();
 
 bool wasActive = m_previousPhase == AnimationEffectReadOnly::Phase::Active;






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


[webkit-changes] [232240] trunk

2018-05-28 Thread commit-queue
Title: [232240] trunk








Revision 232240
Author commit-qu...@webkit.org
Date 2018-05-28 01:18:35 -0700 (Mon, 28 May 2018)


Log Message
[GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.
https://bugs.webkit.org/show_bug.cgi?id=185948

Patch by Thibault Saunier  on 2018-05-28
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

- The "stream-encryption-systems" field of the "drm-preferred-decryption-system-id" query was renamed to
  "avalaible-stream-encryption-systems"
- It can now be NULL, meaning there is no decryptor avalaible.

Tests: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-*

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::extractEventsAndSystemsFromMessage): Handle NULL value for "avalaible-stream-encryption-systems",
moved some code to make the order of the Arrays in the pair clearer.

Tools:

When the patch introducing gst_protection_filter_systems_by_available_decryptors was merged, we changed sensibly its behaviour
concerning the way empty results is represented (now returning NULL instead of an array of 1(NULL) element) and this change was not
properly taken into account in the qtdemux patch that uses it and got upstreamed. Those 3 new patches fixe that and change the
NEED_CONTEXT field names to clarify the meaning of "stream-encryption-systems".

* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch: Added. Merged upstream as 3e063703b3a51b8aaa7f75f36c4660c583a60e93
* gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch: Added. Merged upstream as 43a540b1cd9f162d3dae5d50e36703dfaf558a3e
* gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch: Added.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
trunk/Tools/ChangeLog
trunk/Tools/gstreamer/jhbuild.modules


Added Paths

trunk/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch
trunk/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch
trunk/Tools/gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch




Diff

Modified: trunk/Source/WebCore/ChangeLog (232239 => 232240)

--- trunk/Source/WebCore/ChangeLog	2018-05-28 05:31:57 UTC (rev 232239)
+++ trunk/Source/WebCore/ChangeLog	2018-05-28 08:18:35 UTC (rev 232240)
@@ -1,3 +1,20 @@
+2018-05-28  Thibault Saunier  
+
+[GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.
+https://bugs.webkit.org/show_bug.cgi?id=185948
+
+Reviewed by Xabier Rodriguez-Calvar.
+
+- The "stream-encryption-systems" field of the "drm-preferred-decryption-system-id" query was renamed to
+  "avalaible-stream-encryption-systems"
+- It can now be NULL, meaning there is no decryptor avalaible.
+
+Tests: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-*
+
+* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+(WebCore::extractEventsAndSystemsFromMessage): Handle NULL value for "avalaible-stream-encryption-systems",
+moved some code to make the order of the Arrays in the pair clearer.
+
 2018-05-27  Dan Bernstein  
 
 Reverted the changes made for https://webkit.org/b/186016


Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (232239 => 232240)

--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2018-05-28 05:31:57 UTC (rev 232239)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp	2018-05-28 08:18:35 UTC (rev 232240)
@@ -301,22 +301,23 @@
 {
 const GstStructure* structure = gst_message_get_structure(message);
 
-const GValue* streamEncryptionAllowedSystemsValue = gst_structure_get_value(structure, "stream-encryption-systems");
-ASSERT(streamEncryptionAllowedSystemsValue && G_VALUE_HOLDS(streamEncryptionAllowedSystemsValue, G_TYPE_STRV));
-const char** streamEncryptionAllowedSystems = reinterpret_cast(g_value_get_boxed(streamEncryptionAllowedSystemsValue));
-ASSERT(streamEncryptionAllowedSystems);
-Vector streamEncryptionAllowedSystemsVector;
-unsigned i;
-for (i = 0; streamEncryptionAllowedSystems[i]; ++i)
-streamEncryptionAllowedSystemsVector.append(streamEncryptionAllowedSystems[i]);
-
 const GValue* streamEncryptionEventsList = gst_structure_get_value(structure, "stream-encryption-events");
 ASSERT(streamEncryptionEventsList && GST_VALUE_HOLDS_LIST(streamEncryptionEventsList));
 unsigned streamEncryptionEventsListSize = gst_value_list_get_size(streamEncryptionEventsList);