Title: [239289] trunk/Source/WebCore
- Revision
- 239289
- Author
- dba...@webkit.org
- Date
- 2018-12-17 13:47:53 -0800 (Mon, 17 Dec 2018)
Log Message
Make DocumentMarker::allMarkers() constexpr
https://bugs.webkit.org/show_bug.cgi?id=192634
Reviewed by Simon Fraser.
The result of DocumentMarker::allMarkers() can be computed at compile time. We should annotate
it constexpr to do just that.
* dom/DocumentMarker.h:
(WebCore::DocumentMarker::allMarkers):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (239288 => 239289)
--- trunk/Source/WebCore/ChangeLog 2018-12-17 21:34:18 UTC (rev 239288)
+++ trunk/Source/WebCore/ChangeLog 2018-12-17 21:47:53 UTC (rev 239289)
@@ -1,3 +1,16 @@
+2018-12-17 Daniel Bates <daba...@apple.com>
+
+ Make DocumentMarker::allMarkers() constexpr
+ https://bugs.webkit.org/show_bug.cgi?id=192634
+
+ Reviewed by Simon Fraser.
+
+ The result of DocumentMarker::allMarkers() can be computed at compile time. We should annotate
+ it constexpr to do just that.
+
+ * dom/DocumentMarker.h:
+ (WebCore::DocumentMarker::allMarkers):
+
2018-12-17 Justin Fan <justin_...@apple.com>
[WebGPU] Implement WebGPUBindGroupLayoutDescriptor and its supporting dictionaries
Modified: trunk/Source/WebCore/dom/DocumentMarker.h (239288 => 239289)
--- trunk/Source/WebCore/dom/DocumentMarker.h 2018-12-17 21:34:18 UTC (rev 239288)
+++ trunk/Source/WebCore/dom/DocumentMarker.h 2018-12-17 21:47:53 UTC (rev 239289)
@@ -82,7 +82,7 @@
DraggedContent = 1 << 14
};
- static OptionSet<MarkerType> allMarkers();
+ static constexpr OptionSet<MarkerType> allMarkers();
using IsActiveMatchData = bool;
using DescriptionData = String;
@@ -141,9 +141,9 @@
Data m_data;
};
-inline auto DocumentMarker::allMarkers() -> OptionSet<MarkerType>
+constexpr auto DocumentMarker::allMarkers() -> OptionSet<MarkerType>
{
- OptionSet<MarkerType> markers {
+ return {
AcceptedCandidate,
Autocorrected,
CorrectionIndicator,
@@ -164,7 +164,6 @@
DictationResult,
#endif
};
- return markers;
}
inline DocumentMarker::DocumentMarker(unsigned startOffset, unsigned endOffset, bool isActiveMatch)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes