[webkit-changes] [211357] trunk/Source

2017-01-29 Thread carlosgc
Title: [211357] trunk/Source








Revision 211357
Author carlo...@webkit.org
Date 2017-01-29 21:55:34 -0800 (Sun, 29 Jan 2017)


Log Message
[Threaded Compositor] Crash on WebCore::GLContext::version()
https://bugs.webkit.org/show_bug.cgi?id=167559

Reviewed by Michael Catanzaro.

Source/WebCore:

Fixes crashes in several media tests.

* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::invalidate): Clear m_compositorThreadUpdateTimer and call the update function.

Source/WebKit2:

This is happening because TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired() is fired after the
threaded compositor is deleted. CoordinatedGraphicsScene::purgeGLResources() should invalidate the proxies
before clearing the map.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::purgeGLResources):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (211356 => 211357)

--- trunk/Source/WebCore/ChangeLog	2017-01-30 05:03:11 UTC (rev 211356)
+++ trunk/Source/WebCore/ChangeLog	2017-01-30 05:55:34 UTC (rev 211357)
@@ -1,3 +1,15 @@
+2017-01-29  Carlos Garcia Campos  
+
+[Threaded Compositor] Crash on WebCore::GLContext::version()
+https://bugs.webkit.org/show_bug.cgi?id=167559
+
+Reviewed by Michael Catanzaro.
+
+Fixes crashes in several media tests.
+
+* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
+(WebCore::TextureMapperPlatformLayerProxy::invalidate): Clear m_compositorThreadUpdateTimer and call the update function.
+
 2017-01-29  Nan Wang  
 
 AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work


Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp (211356 => 211357)

--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp	2017-01-30 05:03:11 UTC (rev 211356)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp	2017-01-30 05:55:34 UTC (rev 211357)
@@ -72,9 +72,20 @@
 void TextureMapperPlatformLayerProxy::invalidate()
 {
 ASSERT(m_compositorThreadID == WTF::currentThread());
-LockHolder locker(m_lock);
-m_compositor = nullptr;
-m_targetLayer = nullptr;
+Function updateFunction;
+{
+LockHolder locker(m_lock);
+m_compositor = nullptr;
+m_targetLayer = nullptr;
+
+// Clear the timer and dispatch the update function manually now.
+m_compositorThreadUpdateTimer = nullptr;
+if (!m_compositorThreadUpdateFunction)
+return;
+updateFunction = WTFMove(m_compositorThreadUpdateFunction);
+}
+
+updateFunction();
 }
 
 bool TextureMapperPlatformLayerProxy::isActive()


Modified: trunk/Source/WebKit2/ChangeLog (211356 => 211357)

--- trunk/Source/WebKit2/ChangeLog	2017-01-30 05:03:11 UTC (rev 211356)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-30 05:55:34 UTC (rev 211357)
@@ -1,3 +1,17 @@
+2017-01-29  Carlos Garcia Campos  
+
+[Threaded Compositor] Crash on WebCore::GLContext::version()
+https://bugs.webkit.org/show_bug.cgi?id=167559
+
+Reviewed by Michael Catanzaro.
+
+This is happening because TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired() is fired after the
+threaded compositor is deleted. CoordinatedGraphicsScene::purgeGLResources() should invalidate the proxies
+before clearing the map.
+
+* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+(WebKit::CoordinatedGraphicsScene::purgeGLResources):
+
 2017-01-29  Nan Wang  
 
 AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work


Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (211356 => 211357)

--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp	2017-01-30 05:03:11 UTC (rev 211356)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp	2017-01-30 05:55:34 UTC (rev 211357)
@@ -676,6 +676,8 @@
 m_surfaceBackingStores.clear();
 #endif
 #if USE(COORDINATED_GRAPHICS_THREADED)
+for (auto& proxy : m_platformLayerProxies.values())
+proxy->invalidate();
 m_platformLayerProxies.clear();
 #endif
 m_surfaces.clear();






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


[webkit-changes] [211356] trunk

2017-01-29 Thread n_wang
Title: [211356] trunk








Revision 211356
Author n_w...@apple.com
Date 2017-01-29 21:03:11 -0800 (Sun, 29 Jan 2017)


Log Message
AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work
https://bugs.webkit.org/show_bug.cgi?id=166955

Reviewed by Ryosuke Niwa.

Source/WebCore:

Created a new version of Range::collectSelectionRect() that returns rects for each
line, so that Speak Selection doesn't need to handle searching for soft line breaks.
Also added a variant of findPlainText to search for the closest matched range to the given position.

Test: editing/text-iterator/range-of-string-closest-to-position.html

* dom/Range.cpp:
(WebCore::Range::collectSelectionRectsWithoutUnionInteriorLines):
(WebCore::Range::collectSelectionRects):
* dom/Range.h:
* editing/TextIterator.cpp:
(WebCore::findPlainTextMatches):
(WebCore::updateSearchBuffer):
(WebCore::findIteratorOptions):
(WebCore::rangeMatches):
(WebCore::findClosestPlainText):
(WebCore::findPlainText):
(WebCore::findPlainTextOffset): Deleted.
* editing/TextIterator.h:
* editing/htmlediting.h:
* testing/Internals.cpp:
(WebCore::Internals::rangeOfStringNearLocation):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

Implemented methods that Speak Selection can use to retrieve the word/sentence highlighting rects.

* Scripts/webkit/messages.py:
(headers_for_type):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView webSelectionRects]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectionRectsCallback):
(WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
(WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::visiblePositionForPositionWithOffset):
(WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
(WebKit::rangeNearPositionMatchesText):
(WebKit::WebPage::getRectsAtSelectionOffsetWithText):

LayoutTests:

* editing/text-iterator/range-of-string-closest-to-position-expected.txt: Added.
* editing/text-iterator/range-of-string-closest-to-position.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Range.cpp
trunk/Source/WebCore/dom/Range.h
trunk/Source/WebCore/editing/TextIterator.cpp
trunk/Source/WebCore/editing/TextIterator.h
trunk/Source/WebCore/editing/htmlediting.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Scripts/webkit/messages.py
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm


Added Paths

trunk/LayoutTests/editing/text-iterator/range-of-string-closest-to-position-expected.txt
trunk/LayoutTests/editing/text-iterator/range-of-string-closest-to-position.html




Diff

Modified: trunk/LayoutTests/ChangeLog (211355 => 211356)

--- trunk/LayoutTests/ChangeLog	2017-01-30 01:40:29 UTC (rev 211355)
+++ trunk/LayoutTests/ChangeLog	2017-01-30 05:03:11 UTC (rev 211356)
@@ -1,3 +1,13 @@
+2017-01-29  Nan Wang  
+
+AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work
+https://bugs.webkit.org/show_bug.cgi?id=166955
+
+Reviewed by Ryosuke Niwa.
+
+* editing/text-iterator/range-of-string-closest-to-position-expected.txt: Added.
+* editing/text-iterator/range-of-string-closest-to-position.html: Added.
+
 2017-01-29  Yoav Weiss  
 
 Add invalid value tests to Link header handling.


Added: trunk/LayoutTests/editing/text-iterator/range-of-string-closest-to-position-expected.txt (0 => 211356)

--- trunk/LayoutTests/editing/text-iterator/range-of-string-closest-to-position-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/text-iterator/range-of-string-closest-to-position-expected.txt	2017-01-30 05:03:11 UTC (rev 211356)
@@ -0,0 +1,11 @@
+PASS internals.rangeOfStringNearLocation(rangeOfNodeContent(p1), 'the', 11).toArray() is secondThe
+PASS internals.rangeOfStringNearLocation(rangeOfNodeContent(p1), 'the', 9).toArray() is secondThe
+PASS 

[webkit-changes] [211355] trunk

2017-01-29 Thread aestes
Title: [211355] trunk








Revision 211355
Author aes...@apple.com
Date 2017-01-29 17:40:29 -0800 (Sun, 29 Jan 2017)


Log Message
[QuickLook] Add a WebPreference to enable saving QuickLook documents in WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=167563


Reviewed by Andreas Kling.

Source/WebCore:

* loader/ios/QuickLook.h: Removed unused declarations.
(WebCore::QuickLookHandle::firstRequestURL): Deleted.
* loader/ios/QuickLook.mm:
(WebCore::removeQLPreviewConverterForURL): Stopped deleting the temporary file here; that's
now done in QuickLookDocumentWriter.
(addQLPreviewConverterWithFileForURL): Changed from an exported function to a static
function since it's now only called inside QuickLook.mm.
(WebCore::QuickLookHandle::QuickLookHandle): Stopped initializing m_firstRequestURL.
(WebCore::addQLPreviewConverterWithFileForURL): Deleted.
(WebCore::qlPreviewConverterFileNameForURL): Deleted.
(WebCore::qlPreviewConverterUTIForURL): Deleted.
(WebCore::QuickLookHandle::previewRequestURL): Deleted.
(WebCore::QuickLookHandle::converter): Deleted.

Source/WebKit/mac:

Instead of only saving QuickLook documents to a temporary file when the client is
MobileSafari, base this decision on a WebPreference that clients can choose to enable.

This also changes the SPI for accessing the temporary file path and UTI. Instead of
-[WebView quickLookContentForURL:], which requires the client to pass the response URL of
the frame that saved the QuickLook document, the content dictionary is now stored as a
property of WebDataSource.

This also removes the manual lifetime management of the QLPreviewConverter from
QuickLookDocumentWriter. The QLPreviewConverter is kept alive by DocumentLoader these days,
which ensures it lives long enough to respond to subresource requests.

New API test: QuickLook.LegacyQuickLookContent

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::didCreateQuickLookHandle): Moved the logic of deciding whether to
write a temporary file to here from the QuickLookDocumentWriter constructor.
* WebView/WebDataSource.mm: Declared _quickLookContent.
(-[WebDataSource _quickLookContent]):
(-[WebDataSource _setQuickLookContent:]):
* WebView/WebDataSourceInternal.h: Overrode _quickLookContent as a read/write property.
* WebView/WebDataSourcePrivate.h: Declared _quickLookContent as a readonly property.
* WebView/WebPreferenceKeysPrivate.h: Defined WebKitQuickLookDocumentSavingPreferenceKey.
* WebView/WebPreferences.mm:
(-[WebPreferences quickLookDocumentSavingEnabled]):
(-[WebPreferences setQuickLookDocumentSavingEnabled:]):
* WebView/WebPreferencesPrivate.h: Declared property quickLookDocumentSavingEnabled.
* WebView/WebView.mm:
(-[WebView quickLookContentForURL:]): Changed to always return nil.
* WebView/WebViewPrivate.h: Added a comment stating that clients should use
-[WebDataSource _quickLookContent] instead.

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm:
(-[QuickLookNavigationDelegate _webView:didStartLoadForQuickLookDocumentInMainFrameWithFileName:uti:]):
(-[QuickLookNavigationDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]):
(runTest):
(-[QuickLookFrameLoadDelegate webView:didFinishLoadForFrame:]):
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ios/QuickLook.h
trunk/Source/WebCore/loader/ios/QuickLook.mm
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
trunk/Source/WebKit/mac/WebView/WebDataSource.mm
trunk/Source/WebKit/mac/WebView/WebDataSourceInternal.h
trunk/Source/WebKit/mac/WebView/WebDataSourcePrivate.h
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
trunk/Source/WebKit/mac/WebView/WebView.mm
trunk/Source/WebKit/mac/WebView/WebViewPrivate.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (211354 => 211355)

--- trunk/Source/WebCore/ChangeLog	2017-01-30 00:26:36 UTC (rev 211354)
+++ trunk/Source/WebCore/ChangeLog	2017-01-30 01:40:29 UTC (rev 211355)
@@ -1,3 +1,25 @@
+2017-01-29  Andy Estes  
+
+[QuickLook] Add a WebPreference to enable saving QuickLook documents in WebKitLegacy
+https://bugs.webkit.org/show_bug.cgi?id=167563
+
+
+Reviewed by Andreas Kling.
+
+* loader/ios/QuickLook.h: Removed unused declarations.
+(WebCore::QuickLookHandle::firstRequestURL): Deleted.
+* loader/ios/QuickLook.mm:
+(WebCore::removeQLPreviewConverterForURL): Stopped deleting the temporary file here; that's
+now done in QuickLookDocumentWriter.
+(addQLPreviewConverterWithFileForURL): Changed from an exported function to a static
+function since it's now only called inside QuickLook.mm.
+(WebCore::QuickLookHandle::QuickLookHandle): Stopped initializing m_firstRequestURL.
+

[webkit-changes] [211354] trunk

2017-01-29 Thread mitz
Title: [211354] trunk








Revision 211354
Author m...@apple.com
Date 2017-01-29 16:26:36 -0800 (Sun, 29 Jan 2017)


Log Message
[iOS] Expose WebCore::DataDetection::detectContentInRange WKWebProcessPlugInRangeHandle
https://bugs.webkit.org/show_bug.cgi?id=167565

Reviewed by Sam Weinig.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm

* Shared/API/Cocoa/WKDataDetectorTypes.h: Added. Moved the enum definition from
  WKWebViewConfiguration.h to here.
* Shared/API/Cocoa/WKDataDetectorTypesInternal.h: Added.
(fromWKDataDetectorTypes): Moved from WKWebView.mm.

* UIProcess/API/Cocoa/WKWebView.mm:
(fromWKDataDetectorTypes): Moved to WKDataDetectorTypesInternal.h.

* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Moved WKDataDetectorTypes definition out
  to WKDataDetectorTypes.h.

* WebKit2.xcodeproj/project.pbxproj: Added references to new files.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
(-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]): Added. Calls
  DataDetection::detectContentInRange.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm: Added.
(-[BundleRangeHandleRemoteObject textFromBodyRange:]):
(-[BundleRangeHandleRemoteObject bodyInnerHTMLAfterDetectingData:]):
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandlePlugIn.mm: Added.
(-[BundleRangeHandlePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleRangeHandlePlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]):
* TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandleProtocol.h: Added.

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebKit2/Shared/API/Cocoa/WKDataDetectorTypes.h
trunk/Source/WebKit2/Shared/API/Cocoa/WKDataDetectorTypesInternal.h
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandlePlugIn.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandleProtocol.h




Diff

Modified: trunk/Source/WebKit2/ChangeLog (211353 => 211354)

--- trunk/Source/WebKit2/ChangeLog	2017-01-29 20:21:08 UTC (rev 211353)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-30 00:26:36 UTC (rev 211354)
@@ -1,3 +1,30 @@
+2017-01-29  Dan Bernstein  
+
+[iOS] Expose WebCore::DataDetection::detectContentInRange WKWebProcessPlugInRangeHandle
+https://bugs.webkit.org/show_bug.cgi?id=167565
+
+Reviewed by Sam Weinig.
+
+Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleRangeHandle.mm
+
+* Shared/API/Cocoa/WKDataDetectorTypes.h: Added. Moved the enum definition from
+  WKWebViewConfiguration.h to here.
+* Shared/API/Cocoa/WKDataDetectorTypesInternal.h: Added.
+(fromWKDataDetectorTypes): Moved from WKWebView.mm.
+
+* UIProcess/API/Cocoa/WKWebView.mm:
+(fromWKDataDetectorTypes): Moved to WKDataDetectorTypesInternal.h.
+
+* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Moved WKDataDetectorTypes definition out
+  to WKDataDetectorTypes.h.
+
+* WebKit2.xcodeproj/project.pbxproj: Added references to new files.
+
+* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h:
+* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
+(-[WKWebProcessPlugInRangeHandle detectDataWithTypes:context:]): Added. Calls
+  DataDetection::detectContentInRange.
+
 2017-01-29  Carlos Garcia Campos  
 
 [Coordinated Graphics] WebPage shouldn't use the layerTreeHost directly


Added: trunk/Source/WebKit2/Shared/API/Cocoa/WKDataDetectorTypes.h (0 => 211354)

--- trunk/Source/WebKit2/Shared/API/Cocoa/WKDataDetectorTypes.h	(rev 0)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKDataDetectorTypes.h	2017-01-30 00:26:36 UTC (rev 211354)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other 

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

2017-01-29 Thread zalan
Title: [211353] trunk/Source/WebCore








Revision 211353
Author za...@apple.com
Date 2017-01-29 12:21:08 -0800 (Sun, 29 Jan 2017)


Log Message
Simple line layout: PerformanceTests/Layout/simple-line-layout-innertext.html regressed at r211108
https://bugs.webkit.org/show_bug.cgi?id=167562

Reviewed by Antti Koivisto.

Apparently RunResolver::Run::constructStringForHyphenIfNeeded() is in a superhot codepath.
The Run should not have any additional members anyway, so let's construct the hyphenated
string on demand.
Progression on simple-line-layout-innertext.html is from ~34runs/sec back to ~50runs/sec.

Covered by existing text.

* rendering/RenderTreeAsText.cpp:
(WebCore::writeSimpleLine):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::Run):
(WebCore::SimpleLineLayout::RunResolver::Run::textWithHyphen):
(WebCore::SimpleLineLayout::RunResolver::Run::text):
(WebCore::SimpleLineLayout::RunResolver::Run::constructStringForHyphenIfNeeded): Deleted.
* rendering/SimpleLineLayoutResolver.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTreeAsText.cpp
trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp
trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.cpp
trunk/Source/WebCore/rendering/SimpleLineLayoutResolver.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (211352 => 211353)

--- trunk/Source/WebCore/ChangeLog	2017-01-29 15:13:44 UTC (rev 211352)
+++ trunk/Source/WebCore/ChangeLog	2017-01-29 20:21:08 UTC (rev 211353)
@@ -1,3 +1,28 @@
+2017-01-29  Zalan Bujtas  
+
+Simple line layout: PerformanceTests/Layout/simple-line-layout-innertext.html regressed at r211108
+https://bugs.webkit.org/show_bug.cgi?id=167562
+
+Reviewed by Antti Koivisto.
+
+Apparently RunResolver::Run::constructStringForHyphenIfNeeded() is in a superhot codepath.
+The Run should not have any additional members anyway, so let's construct the hyphenated
+string on demand.
+Progression on simple-line-layout-innertext.html is from ~34runs/sec back to ~50runs/sec.
+
+Covered by existing text.
+
+* rendering/RenderTreeAsText.cpp:
+(WebCore::writeSimpleLine):
+* rendering/SimpleLineLayoutFunctions.cpp:
+(WebCore::SimpleLineLayout::paintFlow):
+* rendering/SimpleLineLayoutResolver.cpp:
+(WebCore::SimpleLineLayout::RunResolver::Run::Run):
+(WebCore::SimpleLineLayout::RunResolver::Run::textWithHyphen):
+(WebCore::SimpleLineLayout::RunResolver::Run::text):
+(WebCore::SimpleLineLayout::RunResolver::Run::constructStringForHyphenIfNeeded): Deleted.
+* rendering/SimpleLineLayoutResolver.h:
+
 2017-01-28  Tim Horton  
 
 Don't flash a tap highlight for the entirety of an editable WKWebView


Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (211352 => 211353)

--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2017-01-29 15:13:44 UTC (rev 211352)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2017-01-29 20:21:08 UTC (rev 211353)
@@ -504,12 +504,9 @@
 y -= floorToInt(downcast(*renderText.containingBlock()).intrinsicPaddingBefore());
 
 ts << "text run at (" << x << "," << y << ") width " << logicalWidth;
-if (run.hasHyphen()) {
-ts << ": " << quoteAndEscapeNonPrintables(run.text().substring(0, run.text().length() - 1));
+ts << ": " << quoteAndEscapeNonPrintables(run.text());
+if (run.hasHyphen())
 ts << " + hyphen string " << quoteAndEscapeNonPrintables(renderText.style().hyphenString().string());
-} else
-ts << ": " << quoteAndEscapeNonPrintables(run.text());
-
 ts << "\n";
 }
 


Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (211352 => 211353)

--- trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2017-01-29 15:13:44 UTC (rev 211352)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp	2017-01-29 20:21:08 UTC (rev 211353)
@@ -118,8 +118,11 @@
 if (paintRect.y() > visualOverflowRect.maxY() || paintRect.maxY() < visualOverflowRect.y())
 continue;
 
+String textWithHyphen;
+if (run.hasHyphen())
+textWithHyphen = run.textWithHyphen();
 // x position indicates the line offset from the rootbox. It's always 0 in case of simple line layout.
-TextRun textRun(run.text(), 0, run.expansion(), run.expansionBehavior());
+TextRun textRun(run.hasHyphen() ? textWithHyphen : run.text(), 0, run.expansion(), run.expansionBehavior());
 textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize());
 FloatPoint textOrigin = FloatPoint(rect.x() + paintOffset.x(), roundToDevicePixel(run.baselinePosition() + paintOffset.y(), deviceScaleFactor));
 textPainter.paintText(textRun, 

[webkit-changes] [211352] trunk/LayoutTests

2017-01-29 Thread yoav
Title: [211352] trunk/LayoutTests








Revision 211352
Author y...@yoav.ws
Date 2017-01-29 07:13:44 -0800 (Sun, 29 Jan 2017)


Log Message
Add invalid value tests to Link header handling.
https://bugs.webkit.org/show_bug.cgi?id=167366

Reviewed by Alex Christensen.

* http/tests/preload/download_resources_from_invalid_headers-expected.txt:
* http/tests/preload/resources/download_resources_from_header.php:
* http/tests/preload/resources/invalid_resources_from_header.php:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt
trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php
trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php




Diff

Modified: trunk/LayoutTests/ChangeLog (211351 => 211352)

--- trunk/LayoutTests/ChangeLog	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/ChangeLog	2017-01-29 15:13:44 UTC (rev 211352)
@@ -1,3 +1,14 @@
+2017-01-29  Yoav Weiss  
+
+Add invalid value tests to Link header handling.
+https://bugs.webkit.org/show_bug.cgi?id=167366
+
+Reviewed by Alex Christensen.
+
+* http/tests/preload/download_resources_from_invalid_headers-expected.txt:
+* http/tests/preload/resources/download_resources_from_header.php:
+* http/tests/preload/resources/invalid_resources_from_header.php:
+
 2017-01-29  Gyuyoung Kim  
 
 [EFL] Gardening on 29th Jan.


Modified: trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt (211351 => 211352)

--- trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt	2017-01-29 15:13:44 UTC (rev 211352)
@@ -1,4 +1,5 @@
 CONSOLE MESSAGE: Refused to load http://localhost:8000/preload/resources/square.png because it does not appear in the img-src directive of the Content Security Policy.
+CONSOLE MESSAGE:  must have a valid `as` value
 
 
 
@@ -19,6 +20,7 @@
 PASS internals.isPreloaded('http://localhost:53/preload/resources/dummy.js'); is true
 PASS internals.isPreloaded('#foobar'); is false
 PASS internals.isPreloaded('../resources/Ahem.ttf'); is false
+PASS internals.isPreloaded('../resources/dummy.js?invalid'); is false
 PASS successfullyParsed is true
 
 TEST COMPLETE


Modified: trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php (211351 => 211352)

--- trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php	2017-01-29 15:13:44 UTC (rev 211352)
@@ -1,6 +1,6 @@
  header("Link: <../resources/dummy.js>; rel=preload; as=script", false);
-header("Link:<../resources/dummy.css>; rel=preload; as=style", false);
+header("LiNk:<../resources/dummy.css>; rel=preload; as=style", false);
 header("Link: <../resources/square.png>;rel=preload;as=image", false);
 header("Link: <../resources/Ahem.ttf>; rel=preload; as=font; crossorigin", false);
 header("Link: <../resources/test.mp4>; rel=preload; as=media", false);


Modified: trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php (211351 => 211352)

--- trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php	2017-01-29 15:13:44 UTC (rev 211352)
@@ -18,6 +18,9 @@
 header("Link: ; rel=preload; as=style", false);
 header("Link <../resources/Ahem.ttf>; rel=preload; as=font; crossorigin", false);
 header("Link: <   ../resources/dummy.js?foobar >; rel=preload; as='", false);
+header("Link: <<../resources/dummy.js?invalid>>; rel=preload; as=script", false);
+header("Link: <../resources/dummy.js?invalid>>; rel=preload; as=script", false);
+header("Link: <<../resources/dummy.js?invalid>; rel=preload; as=script", false);
 ?>
 
 @@ -39,4 +42,5 @@
 shouldBeTrue("internals.isPreloaded('http://localhost:53/preload/resources/dummy.js');");
 shouldBeFalse("internals.isPreloaded('#foobar');");
 shouldBeFalse("internals.isPreloaded('../resources/Ahem.ttf');");
+shouldBeFalse("internals.isPreloaded('../resources/dummy.js?invalid');");
 






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


[webkit-changes] [211351] trunk/LayoutTests

2017-01-29 Thread gyuyoung . kim
Title: [211351] trunk/LayoutTests








Revision 211351
Author gyuyoung@webkit.org
Date 2017-01-29 06:30:46 -0800 (Sun, 29 Jan 2017)


Log Message
[EFL] Gardening on 29th Jan.

Unreviewed EFL gardening. Update flaky tests and crash tests.

* platform/efl/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/efl/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (211350 => 211351)

--- trunk/LayoutTests/ChangeLog	2017-01-29 10:06:30 UTC (rev 211350)
+++ trunk/LayoutTests/ChangeLog	2017-01-29 14:30:46 UTC (rev 211351)
@@ -1,3 +1,11 @@
+2017-01-29  Gyuyoung Kim  
+
+[EFL] Gardening on 29th Jan.
+
+Unreviewed EFL gardening. Update flaky tests and crash tests.
+
+* platform/efl/TestExpectations:
+
 2017-01-28  David Kilzer  
 
 Migrate 97 *-disabled tests to use TestExpectations


Modified: trunk/LayoutTests/platform/efl/TestExpectations (211350 => 211351)

--- trunk/LayoutTests/platform/efl/TestExpectations	2017-01-29 10:06:30 UTC (rev 211350)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2017-01-29 14:30:46 UTC (rev 211351)
@@ -946,6 +946,20 @@
 webkit.org/b/167357 media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html [ Skip ]
 webkit.org/b/167357 media/modern-media-controls/volume-support/volume-support-drag.html [ Skip ]
 
+animations/animation-callback-timestamp.html [ Skip ]
+fast/forms/multiple-form-submission-protection-mouse.html [ Skip ]
+fast/forms/validation-message-detached-iframe.html [ Skip ]
+fast/forms/validation-message-detached-iframe2.html [ Skip ]
+inspector/debugger/call-frame-function-name.html [ Skip ]
+inspector/debugger/stepping/stepping-misc.html [ Skip ]
+inspector/dom/customElementState.html [ Skip ]
+js/shared-array-buffer-webgl.html [ Skip ]
+media/media-source/media-source-error-crash.html [ Skip ]
+media/modern-media-controls/layout-node/subclassing.html [ Skip ]
+media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-resize-with-hidden-controls-bar.html [ Skip ]
+media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html [ Skip ]
+media/modern-media-controls/tracks-panel/tracks-panel-hide.html [ Skip ]
+
 # There are too many timeout and crashes.
 imported/w3c/web-platform-tests [ Skip ]
 
@@ -1010,8 +1024,6 @@
 storage/indexeddb/modern/index-3-private.html [ Crash ]
 storage/indexeddb/modern/opendatabase-success-after-versionchange.html [ Crash ]
 
-
-
 fast/forms/submit-to-url-fragment.html [ Crash ]
 fast/frames/frame-dead-region.html [ Crash ]
 fast/history/history-traversal-is-asynchronous.html [ Crash ]
@@ -1087,6 +1099,49 @@
 Bug(EFL) svg/W3C-SVG-1.1/text-text-05-t.svg [ Crash ]
 Bug(EFL) svg/W3C-SVG-1.1/text-text-06-t.svg [ Crash ]
 
+Bug(EFL) fast/history/multiple-classes-visited.html [ Crash ]
+Bug(EFL) fast/history/page-cache-back-navigation-crash.html [ Crash ]
+Bug(EFL) http/tests/cache/history-only-cached-subresource-loads.html [ Crash ]
+Bug(EFL) http/tests/media/video-cross-site.html [ Crash ]
+Bug(EFL) http/tests/performance/performance-resource-timing-cached-entries.html [ Crash ]
+Bug(EFL) inspector/debugger/call-frame-this-nonstrict.html [ Crash ]
+Bug(EFL) inspector/debugger/continueUntilNextRunLoop.html [ Crash ]
+Bug(EFL) inspector/debugger/setBreakpoint-options-exception.html [ Crash ]
+Bug(EFL) inspector/debugger/setBreakpoint.html [ Crash ]
+Bug(EFL) media/crash-closing-page-with-media-as-plugin-fallback.html [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1-SE/interact-pointer-03-t.svg [ Crash ]
+
+
+Bug(EFL) fast/dom/message-port-deleted-by-accessor.html [ Crash ]
+Bug(EFL) fast/dom/window-inner-size-scaling.html [ Crash ]
+Bug(EFL) fast/events/page-visibility-iframe-propagation-test.html [ Crash ]
+Bug(EFL) fast/selectors/querySelector-in-range-crash.html [ Crash ]
+Bug(EFL) http/tests/security/xss-DENIED-xsl-document.xml [ Crash ]
+Bug(EFL) inspector/debugger/setBreakpoint-options-exception.html [ Crash ]
+Bug(EFL) inspector/sampling-profiler/eval-source-url.html [ Crash ]
+Bug(EFL) storage/indexeddb/modern/blob-simple-workers.html [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1-SE/painting-marker-05-f.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1-SE/painting-marker-06-f.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-12-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-13-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-14-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-15-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-16-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-17-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-18-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-19-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-20-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-21-t.svg [ Crash ]
+Bug(EFL) svg/W3C-SVG-1.1/animate-elem-22-b.svg [ 

[webkit-changes] [211350] trunk/Source/WebKit2

2017-01-29 Thread carlosgc
Title: [211350] trunk/Source/WebKit2








Revision 211350
Author carlo...@webkit.org
Date 2017-01-29 02:06:30 -0800 (Sun, 29 Jan 2017)


Log Message
[Coordinated Graphics] WebPage shouldn't use the layerTreeHost directly
https://bugs.webkit.org/show_bug.cgi?id=167494

Reviewed by Michael Catanzaro.

In Coordinated Graphics we have a couple of methods that the WebPage uses directly from the layer tree host,
instead of using the drawing area interface. This patch adds DrawingArea::didChangeViewportAttributes and
DrawingArea::deviceOrPageScaleFactorChanged and renames LayerTreeHost::didChangeViewportProperties as
LayerTreeHost::didChangeViewportAttributes for consistency.

* Shared/CoordinatedGraphics/SimpleViewportController.cpp:
(WebKit::SimpleViewportController::didChangeViewportAttributes): Receive an rvalue reference to avoid copies.
* Shared/CoordinatedGraphics/SimpleViewportController.h:
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::didChangeViewportAttributes): Forward it to the layer tree host if any.
(WebKit::AcceleratedDrawingArea::deviceOrPageScaleFactorChanged): Ditto.
* WebProcess/WebPage/AcceleratedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportAttributes): Renamed and updated to pass an rvalue reference.
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::didChangeViewportAttributes): Renamed and updated to pass an rvalue reference.
(WebKit::LayerTreeHost::didChangeViewportProperties): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged): Use the drawing area.
(WebKit::WebPage::scalePage): Ditto
(WebKit::WebPage::setDeviceScaleFactor): Ditto.
(WebKit::WebPage::viewportPropertiesDidChange): Ditto.

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/CoordinatedGraphics/SimpleViewportController.cpp
trunk/Source/WebKit2/Shared/CoordinatedGraphics/SimpleViewportController.h
trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp
trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.h
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h
trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h
trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (211349 => 211350)

--- trunk/Source/WebKit2/ChangeLog	2017-01-29 07:30:39 UTC (rev 211349)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-29 10:06:30 UTC (rev 211350)
@@ -1,3 +1,36 @@
+2017-01-29  Carlos Garcia Campos  
+
+[Coordinated Graphics] WebPage shouldn't use the layerTreeHost directly
+https://bugs.webkit.org/show_bug.cgi?id=167494
+
+Reviewed by Michael Catanzaro.
+
+In Coordinated Graphics we have a couple of methods that the WebPage uses directly from the layer tree host,
+instead of using the drawing area interface. This patch adds DrawingArea::didChangeViewportAttributes and
+DrawingArea::deviceOrPageScaleFactorChanged and renames LayerTreeHost::didChangeViewportProperties as
+LayerTreeHost::didChangeViewportAttributes for consistency.
+
+* Shared/CoordinatedGraphics/SimpleViewportController.cpp:
+(WebKit::SimpleViewportController::didChangeViewportAttributes): Receive an rvalue reference to avoid copies.
+* Shared/CoordinatedGraphics/SimpleViewportController.h:
+* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
+(WebKit::AcceleratedDrawingArea::didChangeViewportAttributes): Forward it to the layer tree host if any.
+(WebKit::AcceleratedDrawingArea::deviceOrPageScaleFactorChanged): Ditto.
+* WebProcess/WebPage/AcceleratedDrawingArea.h:
+* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
+(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportAttributes): Renamed and updated to pass an rvalue reference.
+(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Deleted.
+* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
+* WebProcess/WebPage/DrawingArea.h:
+* WebProcess/WebPage/LayerTreeHost.h:
+(WebKit::LayerTreeHost::didChangeViewportAttributes): Renamed and updated to pass an rvalue reference.
+(WebKit::LayerTreeHost::didChangeViewportProperties): Deleted.
+* WebProcess/WebPage/WebPage.cpp:
+(WebKit::WebPage::sendViewportAttributesChanged): Use the drawing area.
+(WebKit::WebPage::scalePage):