Meaning of OptionSet::contains is unclear when used with OptionSet argument
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2018 19:16:10 +0000 (19:16 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2018 19:16:10 +0000 (19:16 +0000)
commit36aba51bc743edc110ca8c990258310316d8238f
tree077d140e1e00b40a1b4aa3992d458612149ebef5
parentced33e007b7fad853451d12cc9c04dbf034a473b
Meaning of OptionSet::contains is unclear when used with OptionSet argument
https://bugs.webkit.org/show_bug.cgi?id=188501

Reviewed by Anders Carlsson.

Source/WebCore:

* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::possiblyHasMarkers):
* dom/DocumentMarkerController.h:
(WebCore::DocumentMarkerController::hasMarkers const):
* platform/FileSystem.h:
(WebCore::FileSystem::openAndLockFile):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::selectionColor const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintForegroundForFragments):

Source/WTF:

The existing behavior is "contains any" but it is not very clear from the name.

* wtf/OptionSet.h:
(WTF::OptionSet::contains const):

This is now for testing a single option only.

(WTF::OptionSet::containsAny const):
(WTF::OptionSet::containsAll const):

Add separate functions for OptionSet argument.

Tools:

* TestWebKitAPI/Tests/WTF/OptionSet.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/OptionSet.h
Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentMarkerController.cpp
Source/WebCore/dom/DocumentMarkerController.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebKit/WebProcess/Plugins/PluginView.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/OptionSet.cpp