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

2016-10-06 Thread commit-queue
Title: [206900] trunk/Source/WebCore








Revision 206900
Author commit-qu...@webkit.org
Date 2016-10-06 23:00:10 -0700 (Thu, 06 Oct 2016)


Log Message
CachedResourceRequest should not need to store defer and preload options
https://bugs.webkit.org/show_bug.cgi?id=163004

Patch by Youenn Fablet  on 2016-10-06
Reviewed by Alex Christensen.

No change of behavior.

Removing CachedResourceRequest defer and preload fields.
These fields are computed inside CachedResourceLoader instead.

Updated setting of priority from CachedResourceRequest to CachedResource.
Priority is set for any new resource (this covers all cases where no cached resource can be reused from the memory cache).
Priority is set for a cached resource if the request is not a preload request.

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::requestPreload):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::priority):
(WebCore::CachedResourceRequest::forPreload): Deleted.
(WebCore::CachedResourceRequest::setForPreload): Deleted.
(WebCore::CachedResourceRequest::defer): Deleted.
(WebCore::CachedResourceRequest::setDefer): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp
trunk/Source/WebCore/loader/cache/CachedResourceRequest.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (206899 => 206900)

--- trunk/Source/WebCore/ChangeLog	2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/ChangeLog	2016-10-07 06:00:10 UTC (rev 206900)
@@ -1,3 +1,39 @@
+2016-10-06  Youenn Fablet  
+
+CachedResourceRequest should not need to store defer and preload options
+https://bugs.webkit.org/show_bug.cgi?id=163004
+
+Reviewed by Alex Christensen.
+
+No change of behavior.
+
+Removing CachedResourceRequest defer and preload fields.
+These fields are computed inside CachedResourceLoader instead.
+
+Updated setting of priority from CachedResourceRequest to CachedResource.
+Priority is set for any new resource (this covers all cases where no cached resource can be reused from the memory cache).
+Priority is set for a cached resource if the request is not a preload request.
+
+* loader/LinkLoader.cpp:
+(WebCore::LinkLoader::preloadIfNeeded):
+* loader/cache/CachedResource.cpp:
+(WebCore::CachedResource::CachedResource):
+* loader/cache/CachedResourceLoader.cpp:
+(WebCore::CachedResourceLoader::requestImage):
+(WebCore::CachedResourceLoader::canRequest):
+(WebCore::CachedResourceLoader::requestResource):
+(WebCore::CachedResourceLoader::determineRevalidationPolicy):
+(WebCore::CachedResourceLoader::requestPreload):
+* loader/cache/CachedResourceLoader.h:
+* loader/cache/CachedResourceRequest.cpp:
+(WebCore::CachedResourceRequest::CachedResourceRequest):
+* loader/cache/CachedResourceRequest.h:
+(WebCore::CachedResourceRequest::priority):
+(WebCore::CachedResourceRequest::forPreload): Deleted.
+(WebCore::CachedResourceRequest::setForPreload): Deleted.
+(WebCore::CachedResourceRequest::defer): Deleted.
+(WebCore::CachedResourceRequest::setDefer): Deleted.
+
 2016-10-06  Myles C. Maxfield  
 
 Variation fonts don't affect glyph advances


Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (206899 => 206900)

--- trunk/Source/WebCore/loader/LinkLoader.cpp	2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp	2016-10-07 06:00:10 UTC (rev 206900)
@@ -162,7 +162,6 @@
 linkRequest.setInitiator("link");
 
 linkRequest.setAsPotentiallyCrossOrigin(crossOriginMode, document);
-linkRequest.setForPreload(true);
 CachedResourceHandle cachedLinkResource = document.cachedResourceLoader().preload(type.value(), WTFMove(linkRequest), CachedResourceLoader::ExplicitPreload);
 
 if (cachedLinkResource)


Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (206899 => 206900)

--- trunk/Source/WebCore/loader/cache/CachedResource.cpp	2016-10-07 05:07:13 UTC (rev 206899)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp	2016-10-07 

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

2016-10-06 Thread utatane . tea
Title: [206899] trunk/Source/_javascript_Core








Revision 206899
Author utatane@gmail.com
Date 2016-10-06 22:07:13 -0700 (Thu, 06 Oct 2016)


Log Message
[DOMJIT] Support slow path call
https://bugs.webkit.org/show_bug.cgi?id=162978

Reviewed by Saam Barati.

One of the most important features required in DOMJIT::Patchpoint is slow path calls.
DOM operation typically returns DOMWrapper object. At that time, if wrapper cache hits, we can go
to the fast path. However, if we cannot use the cache, we need to go to the slow path to call toJS function.
At that time, slow path call functionality is necessary.

This patch expose DOMJIT::PatchpointParams::addSlowPathCall. We can request slow path call code generation
through this interface. DOMJIT::PatchpointParams automatically leverages appropriate slow path call systems
in each tier. In DFG, we use slow path call system. In FTL, we implement slow path call by using addLatePath
to construct slow path call. But these details are completely hidden by DOMJIT::PatchpointParams. Users can
just use addSlowPathCall.

Since DFG and FTL slow path call systems are implemented in variadic templates, directly using this means
that we need to expose core part of DFG and FTL. For example, DFG::SpeculativeJIT need to be exposed in
such a design. That is too bad. Instead, we use magical macro in DOMJITSlowPathCalls.h. We can list up the
call signatures in DOMJIT_SLOW_PATH_CALLS. DOMJIT uses these signatures to generate an interface to request
slow path calls inside DFG and FTL instead of exposing everything.

* CMakeLists.txt:
* _javascript_Core.xcodeproj/project.pbxproj:
* dfg/DFGCommon.h:
* dfg/DFGDOMJITPatchpointParams.cpp: Copied from Source/_javascript_Core/domjit/DOMJITPatchpointParams.h.
(JSC::DFG::dispatch):
* dfg/DFGDOMJITPatchpointParams.h: Copied from Source/_javascript_Core/domjit/DOMJITPatchpointParams.h.
(JSC::DFG::DOMJITPatchpointParams::DOMJITPatchpointParams):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOM):
(JSC::DFG::SpeculativeJIT::compileCheckDOM):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::extractResult): Deleted.
* domjit/DOMJITPatchpointParams.h:
(JSC::DOMJIT::PatchpointParams::addSlowPathCall):
* domjit/DOMJITSlowPathCalls.h: Copied from Source/_javascript_Core/domjit/DOMJITPatchpointParams.h.
* ftl/FTLDOMJITPatchpointParams.cpp: Added.
(JSC::FTL::dispatch):
* ftl/FTLDOMJITPatchpointParams.h: Copied from Source/_javascript_Core/domjit/DOMJITPatchpointParams.h.
(JSC::FTL::DOMJITPatchpointParams::DOMJITPatchpointParams):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCheckDOM):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
* jit/GPRInfo.h:
(JSC::extractResult):
* jsc.cpp:

Modified Paths

trunk/Source/_javascript_Core/CMakeLists.txt
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj
trunk/Source/_javascript_Core/dfg/DFGCommon.h
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp
trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h
trunk/Source/_javascript_Core/domjit/DOMJITPatchpointParams.h
trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp
trunk/Source/_javascript_Core/jit/GPRInfo.h
trunk/Source/_javascript_Core/jsc.cpp


Added Paths

trunk/Source/_javascript_Core/dfg/DFGDOMJITPatchpointParams.cpp
trunk/Source/_javascript_Core/dfg/DFGDOMJITPatchpointParams.h
trunk/Source/_javascript_Core/domjit/DOMJITSlowPathCalls.h
trunk/Source/_javascript_Core/ftl/FTLDOMJITPatchpointParams.cpp
trunk/Source/_javascript_Core/ftl/FTLDOMJITPatchpointParams.h




Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (206898 => 206899)

--- trunk/Source/_javascript_Core/CMakeLists.txt	2016-10-07 03:26:29 UTC (rev 206898)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2016-10-07 05:07:13 UTC (rev 206899)
@@ -286,6 +286,7 @@
 dfg/DFGConstantHoistingPhase.cpp
 dfg/DFGCriticalEdgeBreakingPhase.cpp
 dfg/DFGDCEPhase.cpp
+dfg/DFGDOMJITPatchpointParams.cpp
 dfg/DFGDesiredIdentifiers.cpp
 dfg/DFGDesiredTransitions.cpp
 dfg/DFGDesiredWatchpoints.cpp
@@ -415,6 +416,7 @@
 ftl/FTLCapabilities.cpp
 ftl/FTLCommonValues.cpp
 ftl/FTLCompile.cpp
+ftl/FTLDOMJITPatchpointParams.cpp
 ftl/FTLExceptionTarget.cpp
 ftl/FTLExitArgument.cpp
 ftl/FTLExitArgumentForOperand.cpp


Modified: trunk/Source/_javascript_Core/ChangeLog (206898 => 206899)

--- trunk/Source/_javascript_Core/ChangeLog	2016-10-07 03:26:29 UTC (rev 206898)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-07 05:07:13 UTC (rev 206899)
@@ -1,3 +1,53 @@
+2016-10-06  Yusuke Suzuki  
+
+[DOMJIT] Support slow path call
+https://bugs.webkit.org/show_bug.cgi?id=162978
+
+Reviewed by Saam Barati.
+
+One of the most important features required in DOMJIT::Patchpoint is slow path calls.
+DOM operation typically returns DOMWrapper object. At that time, if wrapper cache hits, we can go
+to the 

[webkit-changes] [206898] trunk/Tools

2016-10-06 Thread commit-queue
Title: [206898] trunk/Tools








Revision 206898
Author commit-qu...@webkit.org
Date 2016-10-06 20:26:29 -0700 (Thu, 06 Oct 2016)


Log Message
check-webkit-style: Enable the legal/copyright rule for cpp/h files
https://bugs.webkit.org/show_bug.cgi?id=162707

Patch by Joseph Pecoraro  on 2016-10-06
Reviewed by Darin Adler.

* Scripts/webkitpy/style/checker.py:
Enable this rule by default.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/style/checker.py




Diff

Modified: trunk/Tools/ChangeLog (206897 => 206898)

--- trunk/Tools/ChangeLog	2016-10-07 03:26:03 UTC (rev 206897)
+++ trunk/Tools/ChangeLog	2016-10-07 03:26:29 UTC (rev 206898)
@@ -1,5 +1,15 @@
 2016-10-06  Joseph Pecoraro  
 
+check-webkit-style: Enable the legal/copyright rule for cpp/h files
+https://bugs.webkit.org/show_bug.cgi?id=162707
+
+Reviewed by Darin Adler.
+
+* Scripts/webkitpy/style/checker.py:
+Enable this rule by default.
+
+2016-10-06  Joseph Pecoraro  
+
 Header guard style should be updated to be "#pragma once"
 https://bugs.webkit.org/show_bug.cgi?id=159785
 


Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (206897 => 206898)

--- trunk/Tools/Scripts/webkitpy/style/checker.py	2016-10-07 03:26:03 UTC (rev 206897)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2016-10-07 03:26:29 UTC (rev 206898)
@@ -87,7 +87,6 @@
 '-build/endif_comment',
 '-build/include_what_you_use',  #  for std::string
 '-build/storage_class',  # const static
-'-legal/copyright',
 '-readability/multiline_comment',
 '-readability/braces',  # int foo() {};
 '-readability/fn_size',






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


[webkit-changes] [206897] trunk/Tools

2016-10-06 Thread commit-queue
Title: [206897] trunk/Tools








Revision 206897
Author commit-qu...@webkit.org
Date 2016-10-06 20:26:03 -0700 (Thu, 06 Oct 2016)


Log Message
Header guard style should be updated to be "#pragma once"
https://bugs.webkit.org/show_bug.cgi?id=159785

Patch by Joseph Pecoraro  on 2016-10-06
Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_for_header_guard):
(_process_lines):
Simplify header_guard check to warn for a missing #pragma once
in header files. For legacy files that contain an #ifndef only
warn if the #ifndef line itself is changing.

* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTestBase.perform_header_guard_check):
(CppStyleTestBase.assert_header_guard):
Helpers for enabling just this warning.

(CppStyleTest.test_build_header_guard):
Test different header guard cases.

* Scripts/webkitpy/style/error_handlers.py:
(DefaultStyleErrorHandler.should_line_be_checked):
Always allow warnings that output for "line 0" which won't be in
the list of modified lines that are 1-based.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
trunk/Tools/Scripts/webkitpy/style/error_handlers.py




Diff

Modified: trunk/Tools/ChangeLog (206896 => 206897)

--- trunk/Tools/ChangeLog	2016-10-07 03:21:27 UTC (rev 206896)
+++ trunk/Tools/ChangeLog	2016-10-07 03:26:03 UTC (rev 206897)
@@ -1,3 +1,30 @@
+2016-10-06  Joseph Pecoraro  
+
+Header guard style should be updated to be "#pragma once"
+https://bugs.webkit.org/show_bug.cgi?id=159785
+
+Reviewed by Darin Adler.
+
+* Scripts/webkitpy/style/checkers/cpp.py:
+(check_for_header_guard):
+(_process_lines):
+Simplify header_guard check to warn for a missing #pragma once
+in header files. For legacy files that contain an #ifndef only
+warn if the #ifndef line itself is changing.
+
+* Scripts/webkitpy/style/checkers/cpp_unittest.py:
+(CppStyleTestBase.perform_header_guard_check):
+(CppStyleTestBase.assert_header_guard):
+Helpers for enabling just this warning.
+
+(CppStyleTest.test_build_header_guard):
+Test different header guard cases.
+
+* Scripts/webkitpy/style/error_handlers.py:
+(DefaultStyleErrorHandler.should_line_be_checked):
+Always allow warnings that output for "line 0" which won't be in
+the list of modified lines that are 1-based.
+
 2016-10-06  Commit Queue  
 
 Unreviewed, rolling out r206713.


Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (206896 => 206897)

--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2016-10-07 03:21:27 UTC (rev 206896)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2016-10-07 03:26:03 UTC (rev 206897)
@@ -896,74 +896,35 @@
   'You should have a line: "Copyright [year] "')
 
 
-def get_header_guard_cpp_variable(filename):
-"""Returns the CPP variable that should be used as a header guard.
-
-Args:
-  filename: The name of a C++ header file.
-
-Returns:
-  The CPP variable that should be used as a header guard in the
-  named file.
-
-"""
-
-# Restores original filename in case that style checker is invoked from Emacs's
-# flymake.
-filename = re.sub(r'_flymake\.h$', '.h', filename)
-
-standard_name = sub(r'[-.\s]', '_', os.path.basename(filename))
-
-# Files under WTF typically have header guards that start with WTF_.
-if '/wtf/' in filename:
-special_name = "WTF_" + standard_name
-else:
-special_name = standard_name
-return (special_name, standard_name)
-
-
-def check_for_header_guard(filename, lines, error):
+def check_for_header_guard(lines, error):
 """Checks that the file contains a header guard.
 
-Logs an error if no #ifndef header guard is present.  For other
-headers, checks that the full pathname is used.
+Logs an error if no #pragma once header guard is present
+of if there was an #ifndef guard that was modified.
 
 Args:
-  filename: The name of the C++ header file.
   lines: An array of strings, each representing a line of the file.
   error: The function to call with any errors found.
 """
 
-cppvar = get_header_guard_cpp_variable(filename)
+for line_number, line in enumerate(lines):
+if line.startswith('#pragma once'):
+return
 
-ifndef = None
+# If there is no #pragma once, but there is an #ifndef, warn only if it was modified.
 ifndef_line_number = 0
-define = None
 for line_number, line in enumerate(lines):
 line_split = line.split()
 if len(line_split) >= 2:
-# find the first occurrence of #ifndef and #define, save arg
-if not ifndef and line_split[0] == '#ifndef':
-# set ifndef to the header guard 

[webkit-changes] [206896] trunk

2016-10-06 Thread mmaxfield
Title: [206896] trunk








Revision 206896
Author mmaxfi...@apple.com
Date 2016-10-06 20:21:27 -0700 (Thu, 06 Oct 2016)


Log Message
Variation fonts don't affect glyph advances
https://bugs.webkit.org/show_bug.cgi?id=163093

Reviewed by Darin Adler.

Source/WebCore:

Work around known bug . For variation fonts,
CTFontGetAdvancesForGlyphs() gives correct answers but
CTFontGetUnsummedAdvancesForGlyphsAndStyle() doesn't.

Test: fast/text/variations/advances.html

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hasVariations):
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformWidthForGlyph):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):

LayoutTests:

* platform/ios-simulator/TestExpectations: Mark the test
as failing on iOS because that OS doesn't have Skia.
* fast/text/variations/advances-expected.txt: Added.
* fast/text/variations/advances.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/FontPlatformData.h
trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm


Added Paths

trunk/LayoutTests/fast/text/variations/advances-expected.txt
trunk/LayoutTests/fast/text/variations/advances.html




Diff

Modified: trunk/LayoutTests/ChangeLog (206895 => 206896)

--- trunk/LayoutTests/ChangeLog	2016-10-07 03:03:57 UTC (rev 206895)
+++ trunk/LayoutTests/ChangeLog	2016-10-07 03:21:27 UTC (rev 206896)
@@ -1,3 +1,15 @@
+2016-10-06  Myles C. Maxfield  
+
+Variation fonts don't affect glyph advances
+https://bugs.webkit.org/show_bug.cgi?id=163093
+
+Reviewed by Darin Adler.
+
+* platform/ios-simulator/TestExpectations: Mark the test
+as failing on iOS because that OS doesn't have Skia.
+* fast/text/variations/advances-expected.txt: Added.
+* fast/text/variations/advances.html: Added.
+
 2016-10-06  Gyuyoung Kim  
 
 [EFL] Skip to test imported/w3c/web-platform-tests/


Added: trunk/LayoutTests/fast/text/variations/advances-expected.txt (0 => 206896)

--- trunk/LayoutTests/fast/text/variations/advances-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/text/variations/advances-expected.txt	2016-10-07 03:21:27 UTC (rev 206896)
@@ -0,0 +1,11 @@
+PASS regular.offsetWidth is not wide.offsetWidth
+PASS regular.offsetWidth is not narrow.offsetWidth
+PASS narrow.offsetWidth is not wide.offsetWidth
+PASS regular.offsetWidth is specifiedregular.offsetWidth
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ham
+ham
+ham
+ham


Added: trunk/LayoutTests/fast/text/variations/advances.html (0 => 206896)

--- trunk/LayoutTests/fast/text/variations/advances.html	(rev 0)
+++ trunk/LayoutTests/fast/text/variations/advances.html	2016-10-07 03:21:27 UTC (rev 206896)
@@ -0,0 +1,24 @@
+
+
+
+
+
+
ham
+
ham
+
ham
+
ham
+