Drop unnecessary overlapMap null checks in computeCompositingRequirements()
https://bugs.webkit.org/show_bug.cgi?id=137668

Reviewed by Andreas Kling.

Drop unnecessary overlapMap null checks in computeCompositingRequirements().
The function is never called with a null overlapMap so we can make the
argument a reference and drop all the null checks.

No new tests, no behavior change.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
* rendering/RenderLayerCompositor.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r174555.

* public/include/manifest.php:
(ManifestGenerator::generate): Assign an empty array to $repositories_with_commit when there are no commits.
* tests/admin-regenerate-manifest.js: Fixed the test case.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add StringCapture helper for thread-safe lambda capture
https://bugs.webkit.org/show_bug.cgi?id=137664

Reviewed by Anders Carlsson.

There is currently no clean way to capture a String in a thread-safe manner. This will now work:

StringCapture stringCapture(string);
auto lambdaThatRunsInAnotherThread = [stringCapture] { String string = stringCapture.string(); ... }

This type won't be necessary with C++14 initialized lambda capture: [string = string.isolatedCopy()].

* wtf/text/WTFString.h:
(WTF::StringCapture::StringCapture): Create isolated copy in copy-constructor.
(WTF::StringCapture::string):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use modern loops in RenderLayerCompositor
https://bugs.webkit.org/show_bug.cgi?id=137670

Reviewed by Simon Fraser.

Use modern range for-loops in RenderLayerCompositor.

No new tests, no behavior change.

* rendering/RenderLayerCompositor.cpp:
(WebCore::OverlapMapContainer::overlapsLayers):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
(WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
(WebCore::resetTrackedRepaintRectsRecursive):
(WebCore::RenderLayerCompositor::layerHas3DContent):
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::registerAllScrollingLayers):
(WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve the test image diffs page
https://bugs.webkit.org/show_bug.cgi?id=137674

Reviewed by Alexey Proskuryakov.

Tools:

Don't treat the input file as a format string, otherwise we have to escape special
characters. Just do a couple of replaces.

* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_image_diff_files):

LayoutTests:

New version of the image diff page that has the diff images in-place, and allows
for control of the image toggling.

* fast/harness/image-diff-template-expected.txt:
* fast/harness/image-diff-template.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS JIT: Implement :visited pseudo class
https://bugs.webkit.org/show_bug.cgi?id=135293

Reviewed by Benjamin Poulain.

Source/WebCore:

This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
Following the design discussed at the other bug[1], implemented :visited JIT
without tracking VisitedMatchEnabled state.

In this patch, we change the semantics of :visited / :link
inside functional pseudo classes for further CSS Selector Level 4 extensions.

Edge cases are tested by the existing tests.
:not(:link)
    fast/history/link-inside-not.html
:not(:visited)
    fast/history/visited-inside-not.html
:-webkit-any(:link)
    fast/history/link-inside-any.html
:-webkit-any(:visited)
    fast/history/visited-inside-any.html

[1]: https://bugs.webkit.org/show_bug.cgi?id=135639

Test: fast/history/link-inside-not-inside-any.html
    To cover the :-webkit-any(:not(:link)), added new tests.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):

LayoutTests:

To cover the :-webkit-any(:not(:link)), added new tests.

* TestExpectations:
* fast/history/link-inside-not-expected.txt:
* fast/history/link-inside-not-inside-any-expected.txt: Added.
* fast/history/link-inside-not-inside-any.html: Added.
* fast/history/link-inside-not.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174663 268f45cc-cd09-0410-ab3c-d52691b4dbfc