blob: 974adea520331bf198f249efbf178b46e2f38c4b [file] [log] [blame]
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +00001/*
2 * Copyright (C) 2015 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "config.h"
27#include "RenderStyleConstants.h"
28
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +000029#include "TabSize.h"
don.olmstead@sony.comd57eb472017-08-10 01:15:14 +000030#include <wtf/text/TextStream.h>
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +000031
32namespace WebCore {
33
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +000034TextStream& operator<<(TextStream& ts, AnimationFillMode fillMode)
35{
36 switch (fillMode) {
37 case AnimationFillMode::None: ts << "none"; break;
38 case AnimationFillMode::Forwards: ts << "forwards"; break;
39 case AnimationFillMode::Backwards: ts << "backwards"; break;
40 case AnimationFillMode::Both: ts << "both"; break;
41 }
42 return ts;
43}
44
45TextStream& operator<<(TextStream& ts, AnimationPlayState playState)
46{
47 switch (playState) {
48 case AnimationPlayState::Playing: ts << "playing"; break;
49 case AnimationPlayState::Paused: ts << "paused"; break;
50 }
51 return ts;
52}
53
54#if ENABLE(APPLE_PAY)
55TextStream& operator<<(TextStream& ts, ApplePayButtonStyle buttonStyle)
56{
57 switch (buttonStyle) {
58 case ApplePayButtonStyle::White: ts << "white"; break;
59 case ApplePayButtonStyle::WhiteOutline: ts << "white-outline"; break;
60 case ApplePayButtonStyle::Black: ts << "black"; break;
61 }
62 return ts;
63}
64
65TextStream& operator<<(TextStream& ts, ApplePayButtonType playState)
66{
67 switch (playState) {
68 case ApplePayButtonType::Plain: ts << "plain"; break;
69 case ApplePayButtonType::Buy: ts << "buy"; break;
70 case ApplePayButtonType::SetUp: ts << "setup"; break;
71 case ApplePayButtonType::Donate: ts << "donate"; break;
72#if ENABLE(APPLE_PAY_SESSION_V4)
73 case ApplePayButtonType::CheckOut: ts << "checkout"; break;
74 case ApplePayButtonType::Book: ts << "book"; break;
75 case ApplePayButtonType::Subscribe: ts << "subscribe"; break;
76#endif
77
78 }
79 return ts;
80}
81#endif
82
83TextStream& operator<<(TextStream& ts, AspectRatioType aspectRatioType)
84{
85 switch (aspectRatioType) {
86 case AspectRatioType::Auto: ts << "auto"; break;
87 case AspectRatioType::FromIntrinsic: ts << "from-intrinsic"; break;
88 case AspectRatioType::FromDimensions: ts << "from-dimensions"; break;
89 case AspectRatioType::Specified: ts << "specified"; break;
90 }
91 return ts;
92}
93
94TextStream& operator<<(TextStream& ts, AutoRepeatType repeatType)
95{
96 switch (repeatType) {
97 case AutoRepeatType::None: ts << "none"; break;
98 case AutoRepeatType::Fill: ts << "fill"; break;
99 case AutoRepeatType::Fit: ts << "fit"; break;
100 }
101 return ts;
102}
103
104TextStream& operator<<(TextStream& ts, BackfaceVisibility visibility)
commit-queue@webkit.orgeea2d6a2018-05-25 01:42:36 +0000105{
106 switch (visibility) {
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000107 case BackfaceVisibility::Visible: ts << "visible"; break;
108 case BackfaceVisibility::Hidden: ts << "hidden"; break;
commit-queue@webkit.orgeea2d6a2018-05-25 01:42:36 +0000109 }
commit-queue@webkit.orgeea2d6a2018-05-25 01:42:36 +0000110 return ts;
111}
112
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000113TextStream& operator<<(TextStream& ts, BorderCollapse collapse)
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000114{
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000115 switch (collapse) {
116 case BorderCollapse::Separate: ts << "separate"; break;
117 case BorderCollapse::Collapse: ts << "collapse"; break;
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000118 }
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000119 return ts;
120}
121
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000122TextStream& operator<<(TextStream& ts, BorderFit borderFit)
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000123{
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000124 switch (borderFit) {
125 case BorderFit::Border: ts << "border"; break;
126 case BorderFit::Lines: ts << "lines"; break;
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000127 }
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000128 return ts;
129}
130
131TextStream& operator<<(TextStream& ts, BorderStyle borderStyle)
132{
133 switch (borderStyle) {
134 case BorderStyle::None: ts << "none"; break;
135 case BorderStyle::Hidden: ts << "hidden"; break;
136 case BorderStyle::Inset: ts << "inset"; break;
137 case BorderStyle::Groove: ts << "groove"; break;
138 case BorderStyle::Outset: ts << "outset"; break;
139 case BorderStyle::Ridge: ts << "ridge"; break;
140 case BorderStyle::Dotted: ts << "dotted"; break;
141 case BorderStyle::Dashed: ts << "dashed"; break;
142 case BorderStyle::Solid: ts << "solid"; break;
143 case BorderStyle::Double: ts << "double"; break;
144 }
145 return ts;
146}
147
148TextStream& operator<<(TextStream& ts, BoxAlignment boxAlignment)
149{
150 switch (boxAlignment) {
151 case BoxAlignment::Stretch: ts << "stretch"; break;
152 case BoxAlignment::Start: ts << "start"; break;
153 case BoxAlignment::Center: ts << "center"; break;
154 case BoxAlignment::End: ts << "end"; break;
155 case BoxAlignment::Baseline: ts << "baseline"; break;
156 }
157 return ts;
158}
159
160TextStream& operator<<(TextStream& ts, BoxDecorationBreak decorationBreak)
161{
162 switch (decorationBreak) {
163 case BoxDecorationBreak::Slice: ts << "slice"; break;
164 case BoxDecorationBreak::Clone: ts << "clone"; break;
165 }
166 return ts;
167}
168
169TextStream& operator<<(TextStream& ts, BoxDirection boxDirection)
170{
171 switch (boxDirection) {
172 case BoxDirection::Normal: ts << "normal"; break;
173 case BoxDirection::Reverse: ts << "reverse"; break;
174 }
175 return ts;
176}
177
178TextStream& operator<<(TextStream& ts, BoxLines boxLines)
179{
180 switch (boxLines) {
181 case BoxLines::Single: ts << "single"; break;
182 case BoxLines::Multiple: ts << "multiple"; break;
183 }
184 return ts;
185}
186
187TextStream& operator<<(TextStream& ts, BoxOrient boxOrient)
188{
189 switch (boxOrient) {
190 case BoxOrient::Horizontal: ts << "horizontal"; break;
191 case BoxOrient::Vertical: ts << "vertical"; break;
192 }
193 return ts;
194}
195
196TextStream& operator<<(TextStream& ts, BoxPack boxPack)
197{
198 switch (boxPack) {
199 case BoxPack::Start: ts << "start"; break;
200 case BoxPack::Center: ts << "center"; break;
201 case BoxPack::End: ts << "end"; break;
202 case BoxPack::Justify: ts << "justify"; break;
203 }
204 return ts;
205}
206
207TextStream& operator<<(TextStream& ts, BoxSizing boxSizing)
208{
209 switch (boxSizing) {
210 case BoxSizing::ContentBox: ts << "content-box"; break;
211 case BoxSizing::BorderBox: ts << "border-box"; break;
212 }
213 return ts;
214}
215
216TextStream& operator<<(TextStream& ts, BreakBetween breakBetween)
217{
218 switch (breakBetween) {
219 case BreakBetween::Auto: ts << "auto"; break;
220 case BreakBetween::Avoid: ts << "avoid"; break;
221 case BreakBetween::AvoidColumn: ts << "avoid-column"; break;
222 case BreakBetween::AvoidPage: ts << "avoid-page"; break;
223 case BreakBetween::Column: ts << "column"; break;
224 case BreakBetween::Page: ts << "page"; break;
225 case BreakBetween::LeftPage: ts << "left-page"; break;
226 case BreakBetween::RightPage: ts << "right-page"; break;
227 case BreakBetween::RectoPage: ts << "recto-page"; break;
228 case BreakBetween::VersoPage: ts << "verso-page"; break;
229 }
230 return ts;
231}
232
233TextStream& operator<<(TextStream& ts, BreakInside breakInside)
234{
235 switch (breakInside) {
236 case BreakInside::Auto: ts << "auto"; break;
237 case BreakInside::Avoid: ts << "avoid"; break;
238 case BreakInside::AvoidColumn: ts << "avoidColumn"; break;
239 case BreakInside::AvoidPage: ts << "avoidPage"; break;
240 }
241 return ts;
242}
243
244TextStream& operator<<(TextStream& ts, CSSBoxType boxType)
245{
246 switch (boxType) {
247 case CSSBoxType::BoxMissing: ts << "missing"; break;
248 case CSSBoxType::MarginBox: ts << "margin-box"; break;
249 case CSSBoxType::BorderBox: ts << "border-box"; break;
250 case CSSBoxType::PaddingBox: ts << "padding-box"; break;
251 case CSSBoxType::ContentBox: ts << "content-box"; break;
252 case CSSBoxType::FillBox: ts << "fill-box"; break;
253 case CSSBoxType::StrokeBox: ts << "stroke-box"; break;
254 case CSSBoxType::ViewBox: ts << "view-box"; break;
255 }
256 return ts;
257}
258
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000259TextStream& operator<<(TextStream& ts, CaptionSide side)
260{
261 switch (side) {
262 case CaptionSide::Top: ts << "top"; break;
263 case CaptionSide::Bottom: ts << "bottom"; break;
264 case CaptionSide::Left: ts << "left"; break;
265 case CaptionSide::Right: ts << "right"; break;
266 }
267 return ts;
268}
269
270TextStream& operator<<(TextStream& ts, Clear clear)
271{
272 switch (clear) {
273 case Clear::None: ts << "none"; break;
274 case Clear::Left: ts << "left"; break;
275 case Clear::Right: ts << "right"; break;
276 case Clear::Both: ts << "both"; break;
277 }
278 return ts;
279}
280
281#if ENABLE(DARK_MODE_CSS)
282TextStream& operator<<(TextStream& ts, ColorScheme colorScheme)
283{
284 switch (colorScheme) {
285 case ColorScheme::Light: ts << "light"; break;
286 case ColorScheme::Dark: ts << "dark"; break;
287 }
288 return ts;
289}
290#endif
291
292TextStream& operator<<(TextStream& ts, ColumnAxis axis)
293{
294 switch (axis) {
295 case ColumnAxis::Horizontal: ts << "horizontal"; break;
296 case ColumnAxis::Vertical: ts << "vertical"; break;
297 case ColumnAxis::Auto: ts << "auto"; break;
298 }
299 return ts;
300}
301
302TextStream& operator<<(TextStream& ts, ColumnFill fill)
303{
304 switch (fill) {
305 case ColumnFill::Auto: ts << "auto"; break;
306 case ColumnFill::Balance: ts << "balance"; break;
307 }
308 return ts;
309}
310
311TextStream& operator<<(TextStream& ts, ColumnProgression progression)
312{
313 switch (progression) {
314 case ColumnProgression::Normal: ts << "normal"; break;
315 case ColumnProgression::Reverse: ts << "reverse"; break;
316 }
317 return ts;
318}
319
320TextStream& operator<<(TextStream& ts, ColumnSpan span)
321{
322 switch (span) {
323 case ColumnSpan::None: ts << "none"; break;
324 case ColumnSpan::All: ts << "all"; break;
325 }
326 return ts;
327}
328
329TextStream& operator<<(TextStream& ts, ContentDistribution distribution)
330{
331 switch (distribution) {
332 case ContentDistribution::Default: ts << "default"; break;
333 case ContentDistribution::SpaceBetween: ts << "space-between"; break;
334 case ContentDistribution::SpaceAround: ts << "space-around"; break;
335 case ContentDistribution::SpaceEvenly: ts << "space-evenly"; break;
336 case ContentDistribution::Stretch: ts << "stretch"; break;
337 }
338 return ts;
339}
340
341TextStream& operator<<(TextStream& ts, ContentPosition position)
342{
343 switch (position) {
344 case ContentPosition::Normal: ts << "normal"; break;
345 case ContentPosition::Baseline: ts << "baseline"; break;
346 case ContentPosition::LastBaseline: ts << "last-baseline"; break;
347 case ContentPosition::Center: ts << "center"; break;
348 case ContentPosition::Start: ts << "start"; break;
349 case ContentPosition::End: ts << "end"; break;
350 case ContentPosition::FlexStart: ts << "flex-start"; break;
351 case ContentPosition::FlexEnd: ts << "flex-end"; break;
352 case ContentPosition::Left: ts << "left"; break;
353 case ContentPosition::Right: ts << "right"; break;
354
355 }
356 return ts;
357}
358
359TextStream& operator<<(TextStream& ts, CursorType cursor)
360{
361 switch (cursor) {
362 case CursorType::Auto: ts << "auto"; break;
363 case CursorType::Default: ts << "default"; break;
364 case CursorType::ContextMenu: ts << "contextmenu"; break;
365 case CursorType::Help: ts << "help"; break;
366 case CursorType::Pointer: ts << "pointer"; break;
367 case CursorType::Progress: ts << "progress"; break;
368 case CursorType::Wait: ts << "wait"; break;
369 case CursorType::Cell: ts << "cell"; break;
370 case CursorType::Crosshair: ts << "crosshair"; break;
371 case CursorType::Text: ts << "text"; break;
372 case CursorType::VerticalText: ts << "vertical-text"; break;
373 case CursorType::Alias: ts << "alias"; break;
374 case CursorType::Move: ts << "move"; break;
375 case CursorType::NoDrop: ts << "nodrop"; break;
376 case CursorType::NotAllowed: ts << "not-allowed"; break;
377 case CursorType::Grab: ts << "grab"; break;
378 case CursorType::Grabbing: ts << "grabbing"; break;
379 case CursorType::EResize: ts << "e-resize"; break;
380 case CursorType::NResize: ts << "n-resize"; break;
381 case CursorType::NEResize: ts << "ne-resize"; break;
382 case CursorType::NWResize: ts << "nw-resize"; break;
383 case CursorType::SResize: ts << "sr-esize"; break;
384 case CursorType::SEResize: ts << "se-resize"; break;
385 case CursorType::SWResize: ts << "sw-resize"; break;
386 case CursorType::WResize: ts << "w-resize"; break;
387 case CursorType::EWResize: ts << "ew-resize"; break;
388 case CursorType::NSResize: ts << "ns-resize"; break;
389 case CursorType::NESWResize: ts << "nesw-resize"; break;
390 case CursorType::NWSEResize: ts << "nwse-resize"; break;
391 case CursorType::ColumnResize: ts << "column-resize"; break;
392 case CursorType::RowResize: ts << "row-resize"; break;
393 case CursorType::AllScroll: ts << "all-scroll"; break;
394 case CursorType::ZoomIn: ts << "zoom-in"; break;
395 case CursorType::ZoomOut: ts << "zoom-out"; break;
396 case CursorType::Copy: ts << "copy"; break;
397 case CursorType::None: ts << "none"; break;
398 }
399 return ts;
400}
401
402#if ENABLE(CURSOR_VISIBILITY)
403TextStream& operator<<(TextStream& ts, CursorVisibility visibility)
404{
405 switch (visibility) {
406 case CursorVisibility::Auto: ts << "auto"; break;
407 case CursorVisibility::AutoHide: ts << "autohide"; break;
408 }
409 return ts;
410}
411#endif
412
413TextStream& operator<<(TextStream& ts, DisplayType display)
414{
415 switch (display) {
416 case DisplayType::Inline: ts << "inline"; break;
417 case DisplayType::Block: ts << "block"; break;
418 case DisplayType::ListItem: ts << "list-item"; break;
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000419 case DisplayType::InlineBlock: ts << "inline-block"; break;
420 case DisplayType::Table: ts << "table"; break;
421 case DisplayType::InlineTable: ts << "inline-table"; break;
422 case DisplayType::TableRowGroup: ts << "table-row-group"; break;
423 case DisplayType::TableHeaderGroup: ts << "table-header-group"; break;
424 case DisplayType::TableFooterGroup: ts << "table-footer-group"; break;
425 case DisplayType::TableRow: ts << "table-row"; break;
426 case DisplayType::TableColumnGroup: ts << "table-column-group"; break;
427 case DisplayType::TableColumn: ts << "table-column"; break;
428 case DisplayType::TableCell: ts << "table-cell"; break;
429 case DisplayType::TableCaption: ts << "table-caption"; break;
430 case DisplayType::Box: ts << "box"; break;
431 case DisplayType::InlineBox: ts << "inline-box"; break;
432 case DisplayType::Flex: ts << "flex"; break;
433 case DisplayType::WebKitFlex: ts << "web-kit-flex"; break;
434 case DisplayType::InlineFlex: ts << "inline-flex"; break;
435 case DisplayType::WebKitInlineFlex: ts << "web-kit-inline-flex"; break;
436 case DisplayType::Contents: ts << "contents"; break;
437 case DisplayType::Grid: ts << "grid"; break;
438 case DisplayType::InlineGrid: ts << "inline-grid"; break;
439 case DisplayType::FlowRoot: ts << "flow-root"; break;
440 case DisplayType::None: ts << "none"; break;
441 }
442 return ts;
443}
444
445TextStream& operator<<(TextStream& ts, Edge edge)
446{
447 switch (edge) {
448 case Edge::Top: ts << "top"; break;
449 case Edge::Right: ts << "right"; break;
450 case Edge::Bottom: ts << "bottom"; break;
451 case Edge::Left: ts << "left"; break;
452 }
453 return ts;
454}
455
456TextStream& operator<<(TextStream& ts, EmptyCell emptyCell)
457{
458 switch (emptyCell) {
459 case EmptyCell::Show: ts << "show"; break;
460 case EmptyCell::Hide: ts << "hide"; break;
461 }
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000462 return ts;
463}
464
465TextStream& operator<<(TextStream& ts, FillAttachment attachment)
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000466{
467 switch (attachment) {
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000468 case FillAttachment::ScrollBackground: ts << "scroll"; break;
469 case FillAttachment::LocalBackground: ts << "local"; break;
470 case FillAttachment::FixedBackground: ts << "fixed"; break;
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000471 }
472 return ts;
473}
474
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000475TextStream& operator<<(TextStream& ts, FillBox fill)
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000476{
477 switch (fill) {
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000478 case FillBox::Border: ts << "border"; break;
479 case FillBox::Padding: ts << "padding"; break;
480 case FillBox::Content: ts << "content"; break;
481 case FillBox::Text: ts << "text"; break;
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000482 }
483 return ts;
484}
485
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000486TextStream& operator<<(TextStream& ts, FillRepeat repeat)
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000487{
488 switch (repeat) {
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000489 case FillRepeat::Repeat: ts << "repeat"; break;
490 case FillRepeat::NoRepeat: ts << "no-repeat"; break;
491 case FillRepeat::Round: ts << "round"; break;
492 case FillRepeat::Space: ts << "space"; break;
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000493 }
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000494 return ts;
495}
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000496
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000497TextStream& operator<<(TextStream& ts, FillSizeType sizeType)
498{
499 switch (sizeType) {
500 case FillSizeType::Contain: ts << "contain"; break;
501 case FillSizeType::Cover: ts << "cover"; break;
502 case FillSizeType::Size: ts << "size-length"; break;
503 case FillSizeType::None: ts << "size-none"; break;
504 }
505
506 return ts;
507}
508
509TextStream& operator<<(TextStream& ts, FlexDirection flexDirection)
510{
511 switch (flexDirection) {
512 case FlexDirection::Row: ts << "row"; break;
513 case FlexDirection::RowReverse: ts << "row-reverse"; break;
514 case FlexDirection::Column: ts << "column"; break;
515 case FlexDirection::ColumnReverse: ts << "column-reverse"; break;
516 }
517 return ts;
518}
519
520TextStream& operator<<(TextStream& ts, FlexWrap flexWrap)
521{
522 switch (flexWrap) {
523 case FlexWrap::NoWrap: ts << "no-wrap"; break;
524 case FlexWrap::Wrap: ts << "wrap"; break;
525 case FlexWrap::Reverse: ts << "reverse"; break;
526 }
527 return ts;
528}
529
530TextStream& operator<<(TextStream& ts, Float floating)
531{
532 switch (floating) {
533 case Float::No: ts << "none"; break;
534 case Float::Left: ts << "left"; break;
535 case Float::Right: ts << "right"; break;
536 }
537 return ts;
538}
539
540TextStream& operator<<(TextStream& ts, GridAutoFlow gridAutoFlow)
541{
542 switch (gridAutoFlow) {
543 case AutoFlowRow: ts << "row"; break;
544 case AutoFlowColumn: ts << "column"; break;
545 case AutoFlowRowDense: ts << "row-dense"; break;
546 case AutoFlowColumnDense: ts << "column-dense"; break;
547 }
548 return ts;
549}
550
551TextStream& operator<<(TextStream& ts, HangingPunctuation punctuation)
552{
553 switch (punctuation) {
554 case HangingPunctuation::None: ts << "none"; break;
555 case HangingPunctuation::First: ts << "first"; break;
556 case HangingPunctuation::Last: ts << "last"; break;
557 case HangingPunctuation::AllowEnd: ts << "allow-end"; break;
558 case HangingPunctuation::ForceEnd: ts << "force-end"; break;
559 }
560 return ts;
561}
562
563TextStream& operator<<(TextStream& ts, Hyphens hyphens)
564{
565 switch (hyphens) {
566 case Hyphens::None: ts << "none"; break;
567 case Hyphens::Manual: ts << "manual"; break;
568 case Hyphens::Auto: ts << "auto"; break;
569 }
570 return ts;
571}
572
573TextStream& operator<<(TextStream& ts, ImageRendering imageRendering)
574{
575 switch (imageRendering) {
576 case ImageRendering::Auto: ts << "auto"; break;
577 case ImageRendering::OptimizeSpeed: ts << "optimizeSpeed"; break;
578 case ImageRendering::OptimizeQuality: ts << "optimizeQuality"; break;
579 case ImageRendering::CrispEdges: ts << "crispEdges"; break;
580 case ImageRendering::Pixelated: ts << "pixelated"; break;
581 }
582 return ts;
583}
584
585TextStream& operator<<(TextStream& ts, InsideLink inside)
586{
587 switch (inside) {
588 case InsideLink::NotInside: ts << "not-inside"; break;
589 case InsideLink::InsideUnvisited: ts << "inside-unvisited"; break;
590 case InsideLink::InsideVisited: ts << "inside-visited"; break;
591 }
592 return ts;
593}
594
595TextStream& operator<<(TextStream& ts, Isolation isolation)
596{
597 switch (isolation) {
598 case Isolation::Auto: ts << "auto"; break;
599 case Isolation::Isolate: ts << "isolate"; break;
600 }
601 return ts;
602}
603
604TextStream& operator<<(TextStream& ts, ItemPosition position)
605{
606 switch (position) {
607 case ItemPosition::Legacy: ts << "legacy"; break;
608 case ItemPosition::Auto: ts << "auto"; break;
609 case ItemPosition::Normal: ts << "normal"; break;
610 case ItemPosition::Stretch: ts << "stretch"; break;
611 case ItemPosition::Baseline: ts << "baseline"; break;
612 case ItemPosition::LastBaseline: ts << "last-baseline"; break;
613 case ItemPosition::Center: ts << "center"; break;
614 case ItemPosition::Start: ts << "start"; break;
615 case ItemPosition::End: ts << "end"; break;
616 case ItemPosition::SelfStart: ts << "self-start"; break;
617 case ItemPosition::SelfEnd: ts << "self-end"; break;
618 case ItemPosition::FlexStart: ts << "flex-start"; break;
619 case ItemPosition::FlexEnd: ts << "flex-end"; break;
620 case ItemPosition::Left: ts << "left"; break;
621 case ItemPosition::Right: ts << "right"; break;
622 }
623 return ts;
624}
625
626TextStream& operator<<(TextStream& ts, ItemPositionType positionType)
627{
628 switch (positionType) {
629 case ItemPositionType::NonLegacy: ts << "non-legacy"; break;
630 case ItemPositionType::Legacy: ts << "legacy"; break;
631 }
632 return ts;
633}
634
635TextStream& operator<<(TextStream& ts, LineAlign align)
636{
637 switch (align) {
638 case LineAlign::None: ts << "none"; break;
639 case LineAlign::Edges: ts << "edges"; break;
640 }
641 return ts;
642}
643
644TextStream& operator<<(TextStream& ts, LineBreak lineBreak)
645{
646 switch (lineBreak) {
647 case LineBreak::Auto: ts << "auto"; break;
648 case LineBreak::Loose: ts << "loose"; break;
649 case LineBreak::Normal: ts << "normal"; break;
650 case LineBreak::Strict: ts << "strict"; break;
651 case LineBreak::AfterWhiteSpace: ts << "after-whiteSpace"; break;
652 case LineBreak::Anywhere: ts << "anywhere"; break;
653 }
654 return ts;
655}
656
657TextStream& operator<<(TextStream& ts, LineSnap lineSnap)
658{
659 switch (lineSnap) {
660 case LineSnap::None: ts << "none"; break;
661 case LineSnap::Baseline: ts << "baseline"; break;
662 case LineSnap::Contain: ts << "contain"; break;
663 }
664 return ts;
665}
666
667TextStream& operator<<(TextStream& ts, ListStylePosition position)
668{
669 switch (position) {
670 case ListStylePosition::Outside: ts << "outside"; break;
671 case ListStylePosition::Inside: ts << "inside"; break;
672 }
673 return ts;
674}
675
676TextStream& operator<<(TextStream& ts, ListStyleType styleType)
677{
678 switch (styleType) {
679 case ListStyleType::Disc: ts << "disc"; break;
680 case ListStyleType::Circle: ts << "circle"; break;
681 case ListStyleType::Square: ts << "square"; break;
682 case ListStyleType::Decimal: ts << "decimal"; break;
683 case ListStyleType::DecimalLeadingZero: ts << "decimal-leading-zero"; break;
684 case ListStyleType::ArabicIndic: ts << "arabic-indic"; break;
685 case ListStyleType::Binary: ts << "binary"; break;
686 case ListStyleType::Bengali: ts << "bengali"; break;
687 case ListStyleType::Cambodian: ts << "cambodian"; break;
688 case ListStyleType::Khmer: ts << "khmer"; break;
689 case ListStyleType::Devanagari: ts << "devanagari"; break;
690 case ListStyleType::Gujarati: ts << "gujarati"; break;
691 case ListStyleType::Gurmukhi: ts << "gurmukhi"; break;
692 case ListStyleType::Kannada: ts << "kannada"; break;
693 case ListStyleType::LowerHexadecimal: ts << "lower-hexadecimal"; break;
694 case ListStyleType::Lao: ts << "lao"; break;
695 case ListStyleType::Malayalam: ts << "malayalam"; break;
696 case ListStyleType::Mongolian: ts << "mongolian"; break;
697 case ListStyleType::Myanmar: ts << "myanmar"; break;
698 case ListStyleType::Octal: ts << "octal"; break;
699 case ListStyleType::Oriya: ts << "oriya"; break;
700 case ListStyleType::Persian: ts << "persian"; break;
701 case ListStyleType::Urdu: ts << "urdu"; break;
702 case ListStyleType::Telugu: ts << "telugu"; break;
703 case ListStyleType::Tibetan: ts << "tibetan"; break;
704 case ListStyleType::Thai: ts << "thai"; break;
705 case ListStyleType::UpperHexadecimal: ts << "upper-hexadecimal"; break;
706 case ListStyleType::LowerRoman: ts << "lower-roman"; break;
707 case ListStyleType::UpperRoman: ts << "upper-roman"; break;
708 case ListStyleType::LowerGreek: ts << "lower-greek"; break;
709 case ListStyleType::LowerAlpha: ts << "lower-alpha"; break;
710 case ListStyleType::LowerLatin: ts << "lower-latin"; break;
711 case ListStyleType::UpperAlpha: ts << "upper-alpha"; break;
712 case ListStyleType::UpperLatin: ts << "upper-latin"; break;
713 case ListStyleType::Afar: ts << "afar"; break;
714 case ListStyleType::EthiopicHalehameAaEt: ts << "ethiopic-halehame-aa-et"; break;
715 case ListStyleType::EthiopicHalehameAaEr: ts << "ethiopic-halehame-aa-er"; break;
716 case ListStyleType::Amharic: ts << "amharic"; break;
717 case ListStyleType::EthiopicHalehameAmEt: ts << "ethiopic-halehame-am-et"; break;
718 case ListStyleType::AmharicAbegede: ts << "amharic-abegede"; break;
719 case ListStyleType::EthiopicAbegedeAmEt: ts << "ethiopic-abegede-am-et"; break;
720 case ListStyleType::CjkEarthlyBranch: ts << "cjk-earthly-branch"; break;
721 case ListStyleType::CjkHeavenlyStem: ts << "cjk-heavenly-stem"; break;
722 case ListStyleType::Ethiopic: ts << "ethiopic"; break;
723 case ListStyleType::EthiopicHalehameGez: ts << "ethiopic-halehame-gez"; break;
724 case ListStyleType::EthiopicAbegede: ts << "ethiopic-abegede"; break;
725 case ListStyleType::EthiopicAbegedeGez: ts << "ethiopic-abegede-gez"; break;
726 case ListStyleType::HangulConsonant: ts << "hangul-consonant"; break;
727 case ListStyleType::Hangul: ts << "hangul"; break;
728 case ListStyleType::LowerNorwegian: ts << "lower-norwegian"; break;
729 case ListStyleType::Oromo: ts << "oromo"; break;
730 case ListStyleType::EthiopicHalehameOmEt: ts << "ethiopic-halehame-om-et"; break;
731 case ListStyleType::Sidama: ts << "sidama"; break;
732 case ListStyleType::EthiopicHalehameSidEt: ts << "ethiopic-halehame-sid-et"; break;
733 case ListStyleType::Somali: ts << "somali"; break;
734 case ListStyleType::EthiopicHalehameSoEt: ts << "ethiopic-halehame-so-et"; break;
735 case ListStyleType::Tigre: ts << "tigre"; break;
736 case ListStyleType::EthiopicHalehameTig: ts << "ethiopic-halehame-tig"; break;
737 case ListStyleType::TigrinyaEr: ts << "tigrinya-er"; break;
738 case ListStyleType::EthiopicHalehameTiEr: ts << "ethiopic-halehame-ti-er"; break;
739 case ListStyleType::TigrinyaErAbegede: ts << "tigrinya-er-abegede"; break;
740 case ListStyleType::EthiopicAbegedeTiEr: ts << "ethiopic-abegede-ti-er"; break;
741 case ListStyleType::TigrinyaEt: ts << "tigrinya-et"; break;
742 case ListStyleType::EthiopicHalehameTiEt: ts << "ethiopic-halehame-ti-et"; break;
743 case ListStyleType::TigrinyaEtAbegede: ts << "tigrinya-et-abegede"; break;
744 case ListStyleType::EthiopicAbegedeTiEt: ts << "ethiopic-abegede-ti-et"; break;
745 case ListStyleType::UpperGreek: ts << "upper-greek"; break;
746 case ListStyleType::UpperNorwegian: ts << "upper-norwegian"; break;
747 case ListStyleType::Asterisks: ts << "asterisks"; break;
748 case ListStyleType::Footnotes: ts << "footnotes"; break;
749 case ListStyleType::Hebrew: ts << "hebrew"; break;
750 case ListStyleType::Armenian: ts << "armenian"; break;
751 case ListStyleType::LowerArmenian: ts << "lower-armenian"; break;
752 case ListStyleType::UpperArmenian: ts << "upper-armenian"; break;
753 case ListStyleType::Georgian: ts << "georgian"; break;
754 case ListStyleType::CJKIdeographic: ts << "cjk-ideographic"; break;
755 case ListStyleType::Hiragana: ts << "hiragana"; break;
756 case ListStyleType::Katakana: ts << "katakana"; break;
757 case ListStyleType::HiraganaIroha: ts << "hiragana-iroha"; break;
758 case ListStyleType::KatakanaIroha: ts << "katakana-iroha"; break;
759 case ListStyleType::None: ts << "none"; break;
760 }
761 return ts;
762}
763
764TextStream& operator<<(TextStream& ts, MarginCollapse collapse)
765{
766 switch (collapse) {
767 case MarginCollapse::Collapse: ts << "collapse"; break;
768 case MarginCollapse::Separate: ts << "separate"; break;
769 case MarginCollapse::Discard: ts << "discard"; break;
770 }
771 return ts;
772}
773
774TextStream& operator<<(TextStream& ts, MarqueeBehavior marqueeBehavior)
775{
776 switch (marqueeBehavior) {
777 case MarqueeBehavior::None: ts << "none"; break;
778 case MarqueeBehavior::Scroll: ts << "scroll"; break;
779 case MarqueeBehavior::Slide: ts << "slide"; break;
780 case MarqueeBehavior::Alternate: ts << "alternate"; break;
781 }
782 return ts;
783}
784
785TextStream& operator<<(TextStream& ts, MarqueeDirection marqueeDirection)
786{
787 switch (marqueeDirection) {
788 case MarqueeDirection::Auto: ts << "auto"; break;
789 case MarqueeDirection::Left: ts << "left"; break;
790 case MarqueeDirection::Right: ts << "right"; break;
791 case MarqueeDirection::Up: ts << "up"; break;
792 case MarqueeDirection::Down: ts << "down"; break;
793 case MarqueeDirection::Forward: ts << "forward"; break;
794 case MarqueeDirection::Backward: ts << "backward"; break;
795 }
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000796 return ts;
797}
798
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000799TextStream& operator<<(TextStream& ts, MaskSourceType maskSource)
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000800{
801 switch (maskSource) {
commit-queue@webkit.org1a4e6672018-05-21 16:55:45 +0000802 case MaskSourceType::Alpha: ts << "alpha"; break;
803 case MaskSourceType::Luminance: ts << "luminance"; break;
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000804 }
805
806 return ts;
807}
808
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000809TextStream& operator<<(TextStream& ts, NBSPMode mode)
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +0000810{
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000811 switch (mode) {
812 case NBSPMode::Normal: ts << "normal"; break;
813 case NBSPMode::Space: ts << "space"; break;
814 }
815 return ts;
816}
817
818TextStream& operator<<(TextStream& ts, ObjectFit objectFit)
819{
820 switch (objectFit) {
821 case ObjectFit::Fill: ts << "fill"; break;
822 case ObjectFit::Contain: ts << "contain"; break;
823 case ObjectFit::Cover: ts << "cover"; break;
824 case ObjectFit::None: ts << "none"; break;
825 case ObjectFit::ScaleDown: ts << "scale-down"; break;
826 }
827 return ts;
828}
829
830TextStream& operator<<(TextStream& ts, Order order)
831{
832 switch (order) {
833 case Order::Logical: ts << "logical"; break;
834 case Order::Visual: ts << "visual"; break;
835 }
836 return ts;
837}
838
839TextStream& operator<<(TextStream& ts, Overflow overflow)
840{
841 switch (overflow) {
842 case Overflow::Visible: ts << "visible"; break;
843 case Overflow::Hidden: ts << "hidden"; break;
844 case Overflow::Scroll: ts << "scroll"; break;
845 case Overflow::Auto: ts << "auto"; break;
846 case Overflow::PagedX: ts << "paged-x"; break;
847 case Overflow::PagedY: ts << "paged-y"; break;
848 }
849 return ts;
850}
851
852TextStream& operator<<(TextStream& ts, OverflowAlignment alignment)
853{
854 switch (alignment) {
855 case OverflowAlignment::Default: ts << "default"; break;
856 case OverflowAlignment::Unsafe: ts << "unsafe"; break;
857 case OverflowAlignment::Safe: ts << "safe"; break;
858 }
859 return ts;
860}
861
862TextStream& operator<<(TextStream& ts, OverflowWrap overflowWrap)
863{
864 switch (overflowWrap) {
865 case OverflowWrap::Normal: ts << "normal"; break;
866 case OverflowWrap::Break: ts << "break"; break;
867 }
868 return ts;
869}
870
871TextStream& operator<<(TextStream& ts, PaintOrder paintOrder)
872{
873 switch (paintOrder) {
874 case PaintOrder::Normal: ts << "normal"; break;
875 case PaintOrder::Fill: ts << "fill"; break;
876 case PaintOrder::FillMarkers: ts << "fill markers"; break;
877 case PaintOrder::Stroke: ts << "stroke"; break;
878 case PaintOrder::StrokeMarkers: ts << "stroke markers"; break;
879 case PaintOrder::Markers: ts << "markers"; break;
880 case PaintOrder::MarkersStroke: ts << "markers stroke"; break;
881 }
882 return ts;
883}
884
885TextStream& operator<<(TextStream& ts, PointerEvents pointerEvents)
886{
887 switch (pointerEvents) {
888 case PointerEvents::None: ts << "none"; break;
889 case PointerEvents::Auto: ts << "auto"; break;
890 case PointerEvents::Stroke: ts << "stroke"; break;
891 case PointerEvents::Fill: ts << "fill"; break;
892 case PointerEvents::Painted: ts << "painted"; break;
893 case PointerEvents::Visible: ts << "visible"; break;
krit@webkit.orgdae263392019-10-22 19:57:29 +0000894 case PointerEvents::BoundingBox: ts << "bounding-box"; break;
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000895 case PointerEvents::VisibleStroke: ts << "visible-stroke"; break;
896 case PointerEvents::VisibleFill: ts << "visible-fill"; break;
897 case PointerEvents::VisiblePainted: ts << "visible-painted"; break;
898 case PointerEvents::All: ts << "all"; break;
899 }
900 return ts;
901}
902
903TextStream& operator<<(TextStream& ts, PositionType position)
904{
905 switch (position) {
906 case PositionType::Static: ts << "static"; break;
907 case PositionType::Relative: ts << "relative"; break;
908 case PositionType::Absolute: ts << "absolute"; break;
909 case PositionType::Sticky: ts << "sticky"; break;
910 case PositionType::Fixed: ts << "fixed"; break;
911 }
912 return ts;
913}
914
915TextStream& operator<<(TextStream& ts, PrintColorAdjust colorAdjust)
916{
917 switch (colorAdjust) {
918 case PrintColorAdjust::Economy: ts << "economy"; break;
919 case PrintColorAdjust::Exact: ts << "exact"; break;
920 }
921 return ts;
922}
923
924TextStream& operator<<(TextStream& ts, PseudoId pseudoId)
925{
926 switch (pseudoId) {
927 case PseudoId::None: ts << "none"; break;
928 case PseudoId::FirstLine: ts << "first-line"; break;
929 case PseudoId::FirstLetter: ts << "first-letter"; break;
930 case PseudoId::Marker: ts << "marker"; break;
931 case PseudoId::Before: ts << "before"; break;
932 case PseudoId::After: ts << "after"; break;
933 case PseudoId::Selection: ts << "selection"; break;
934 case PseudoId::Scrollbar: ts << "scrollbar"; break;
935 case PseudoId::ScrollbarThumb: ts << "scrollbar-thumb"; break;
936 case PseudoId::ScrollbarButton: ts << "scrollbar-button"; break;
937 case PseudoId::ScrollbarTrack: ts << "scrollbar-track"; break;
938 case PseudoId::ScrollbarTrackPiece: ts << "scrollbar-trackpiece"; break;
939 case PseudoId::ScrollbarCorner: ts << "scrollbar-corner"; break;
940 case PseudoId::Resizer: ts << "resizer"; break;
941 default:
942 ts << "other";
943 break;
944 }
945 return ts;
946}
947
948TextStream& operator<<(TextStream& ts, QuoteType quoteType)
949{
950 switch (quoteType) {
951 case QuoteType::OpenQuote: ts << "open"; break;
952 case QuoteType::CloseQuote: ts << "close"; break;
953 case QuoteType::NoOpenQuote: ts << "no-open"; break;
954 case QuoteType::NoCloseQuote: ts << "no-close"; break;
955 }
956 return ts;
957}
958
simon.fraser@apple.comd8479b82019-10-13 01:39:58 +0000959TextStream& operator<<(TextStream& ts, ReflectionDirection direction)
960{
961 switch (direction) {
962 case ReflectionDirection::Below: ts << "below"; break;
963 case ReflectionDirection::Above: ts << "above"; break;
964 case ReflectionDirection::Left: ts << "left"; break;
965 case ReflectionDirection::Right: ts << "right"; break;
966 }
967 return ts;
968}
969
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +0000970TextStream& operator<<(TextStream& ts, Resize resize)
971{
972 switch (resize) {
973 case Resize::None: ts << "none"; break;
974 case Resize::Both: ts << "both"; break;
975 case Resize::Horizontal: ts << "horizontal"; break;
976 case Resize::Vertical: ts << "vertical"; break;
977 }
978 return ts;
979}
980
981TextStream& operator<<(TextStream& ts, RubyPosition position)
982{
983 switch (position) {
984 case RubyPosition::Before: ts << "before"; break;
985 case RubyPosition::After: ts << "after"; break;
986 case RubyPosition::InterCharacter: ts << "inter-character"; break;
987 }
988 return ts;
989}
990
991#if ENABLE(CSS_SCROLL_SNAP)
992TextStream& operator<<(TextStream& ts, ScrollSnapAxis axis)
993{
994 switch (axis) {
995 case ScrollSnapAxis::XAxis: ts << "x-axis"; break;
996 case ScrollSnapAxis::YAxis: ts << "y-Axis"; break;
997 case ScrollSnapAxis::Block: ts << "block"; break;
998 case ScrollSnapAxis::Inline: ts << "inline"; break;
999 case ScrollSnapAxis::Both: ts << "both"; break;
1000 }
1001 return ts;
1002}
1003
1004TextStream& operator<<(TextStream& ts, ScrollSnapAxisAlignType alignType)
1005{
1006 switch (alignType) {
1007 case ScrollSnapAxisAlignType::None: ts << "none"; break;
1008 case ScrollSnapAxisAlignType::Start: ts << "start"; break;
1009 case ScrollSnapAxisAlignType::Center: ts << "center"; break;
1010 case ScrollSnapAxisAlignType::End: ts << "end"; break;
1011 }
1012 return ts;
1013}
1014
1015TextStream& operator<<(TextStream& ts, ScrollSnapStrictness strictness)
1016{
1017 switch (strictness) {
1018 case ScrollSnapStrictness::None: ts << "none"; break;
1019 case ScrollSnapStrictness::Proximity: ts << "proximity"; break;
1020 case ScrollSnapStrictness::Mandatory: ts << "mandatory"; break;
1021 }
1022 return ts;
1023}
1024#endif
1025
1026TextStream& operator<<(TextStream& ts, SpeakAs speakAs)
1027{
1028 switch (speakAs) {
1029 case SpeakAs::Normal: ts << "normal"; break;
1030 case SpeakAs::SpellOut: ts << "spell-out"; break;
1031 case SpeakAs::Digits: ts << "digits"; break;
1032 case SpeakAs::LiteralPunctuation: ts << "literal-punctuation"; break;
1033 case SpeakAs::NoPunctuation: ts << "no-punctuation"; break;
1034 }
1035 return ts;
1036}
1037
1038TextStream& operator<<(TextStream& ts, StyleDifference diff)
1039{
1040 switch (diff) {
1041 case StyleDifference::Equal: ts << "equal"; break;
1042 case StyleDifference::RecompositeLayer: ts << "recomposite layer"; break;
1043 case StyleDifference::Repaint: ts << "repaint"; break;
1044 case StyleDifference::RepaintIfTextOrBorderOrOutline: ts << "repaint if text or border or outline"; break;
1045 case StyleDifference::RepaintLayer: ts << "repaint layer"; break;
1046 case StyleDifference::LayoutPositionedMovementOnly: ts << "layout positioned movement only"; break;
1047 case StyleDifference::SimplifiedLayout: ts << "simplified layout"; break;
1048 case StyleDifference::SimplifiedLayoutAndPositionedMovement: ts << "simplified layout and positioned movement"; break;
1049 case StyleDifference::Layout: ts << "layout"; break;
1050 case StyleDifference::NewStyle: ts << "new style"; break;
1051 }
1052 return ts;
1053}
1054
1055TextStream& operator<<(TextStream& ts, TableLayoutType layoutType)
1056{
1057 switch (layoutType) {
1058 case TableLayoutType::Auto: ts << "Auto"; break;
1059 case TableLayoutType::Fixed: ts << "Fixed"; break;
1060 }
1061 return ts;
1062}
1063
1064TextStream& operator<<(TextStream& ts, TextAlignMode alignMode)
1065{
1066 switch (alignMode) {
1067 case TextAlignMode::Left: ts << "left"; break;
1068 case TextAlignMode::Right: ts << "right"; break;
1069 case TextAlignMode::Center: ts << "center"; break;
1070 case TextAlignMode::Justify: ts << "justify"; break;
1071 case TextAlignMode::WebKitLeft: ts << "webkit-left"; break;
1072 case TextAlignMode::WebKitRight: ts << "webkit-right"; break;
1073 case TextAlignMode::WebKitCenter: ts << "webkit-center"; break;
1074 case TextAlignMode::Start: ts << "start"; break;
1075 case TextAlignMode::End: ts << "end"; break;
1076 }
1077 return ts;
1078}
1079
1080TextStream& operator<<(TextStream& ts, TextCombine textCombine)
1081{
1082 switch (textCombine) {
1083 case TextCombine::None: ts << "none"; break;
1084 case TextCombine::Horizontal: ts << "horizontal"; break;
1085 }
1086 return ts;
1087}
1088
1089TextStream& operator<<(TextStream& ts, TextDecoration textDecoration)
1090{
1091 switch (textDecoration) {
1092 case TextDecoration::None: ts << "none"; break;
1093 case TextDecoration::Underline: ts << "underline"; break;
1094 case TextDecoration::Overline: ts << "overline"; break;
1095 case TextDecoration::LineThrough: ts << "line-through"; break;
1096 case TextDecoration::Blink: ts << "blink"; break;
1097#if ENABLE(LETTERPRESS)
1098 case TextDecoration::Letterpress: ts << "letterpress"; break;
1099#endif
1100 }
1101 return ts;
1102}
1103
1104TextStream& operator<<(TextStream& ts, TextDecorationSkip skip)
1105{
1106 switch (skip) {
1107 case TextDecorationSkip::None: ts << "none"; break;
1108 case TextDecorationSkip::Ink: ts << "ink"; break;
1109 case TextDecorationSkip::Objects: ts << "objects"; break;
1110 case TextDecorationSkip::Auto: ts << "auto"; break;
1111 }
1112 return ts;
1113}
1114
1115TextStream& operator<<(TextStream& ts, TextDecorationStyle decorationStyle)
1116{
1117 switch (decorationStyle) {
1118 case TextDecorationStyle::Solid: ts << "solid"; break;
1119 case TextDecorationStyle::Double: ts << "double"; break;
1120 case TextDecorationStyle::Dotted: ts << "dotted"; break;
1121 case TextDecorationStyle::Dashed: ts << "dashed"; break;
1122 case TextDecorationStyle::Wavy: ts << "wavy"; break;
1123 }
1124 return ts;
1125}
1126
1127TextStream& operator<<(TextStream& ts, TextEmphasisFill fill)
1128{
1129 switch (fill) {
1130 case TextEmphasisFill::Filled: ts << "filled"; break;
1131 case TextEmphasisFill::Open: ts << "open"; break;
1132 }
1133 return ts;
1134}
1135
1136TextStream& operator<<(TextStream& ts, TextEmphasisMark mark)
1137{
1138 switch (mark) {
1139 case TextEmphasisMark::None: ts << "none"; break;
1140 case TextEmphasisMark::Auto: ts << "auto"; break;
1141 case TextEmphasisMark::Dot: ts << "dot"; break;
1142 case TextEmphasisMark::Circle: ts << "circle"; break;
1143 case TextEmphasisMark::DoubleCircle: ts << "double-circle"; break;
1144 case TextEmphasisMark::Triangle: ts << "triangle"; break;
1145 case TextEmphasisMark::Sesame: ts << "sesame"; break;
1146 case TextEmphasisMark::Custom: ts << "custom"; break;
1147 }
1148 return ts;
1149}
1150
1151TextStream& operator<<(TextStream& ts, TextEmphasisPosition position)
1152{
1153 switch (position) {
1154 case TextEmphasisPosition::Over: ts << "Over"; break;
1155 case TextEmphasisPosition::Under: ts << "Under"; break;
1156 case TextEmphasisPosition::Left: ts << "Left"; break;
1157 case TextEmphasisPosition::Right: ts << "Right"; break;
1158 }
1159 return ts;
1160}
1161
1162TextStream& operator<<(TextStream& ts, TextOrientation orientation)
1163{
1164 switch (orientation) {
1165 case TextOrientation::Mixed: ts << "mixed"; break;
1166 case TextOrientation::Upright: ts << "upright"; break;
1167 case TextOrientation::Sideways: ts << "sideways"; break;
1168 }
1169 return ts;
1170}
1171TextStream& operator<<(TextStream& ts, TextOverflow overflow)
1172{
1173 switch (overflow) {
1174 case TextOverflow::Clip: ts << "clip"; break;
1175 case TextOverflow::Ellipsis: ts << "ellipsis"; break;
1176 }
1177 return ts;
1178}
1179
1180TextStream& operator<<(TextStream& ts, TextSecurity textSecurity)
1181{
1182 switch (textSecurity) {
1183 case TextSecurity::None: ts << "none"; break;
1184 case TextSecurity::Disc: ts << "disc"; break;
1185 case TextSecurity::Circle: ts << "circle"; break;
1186 case TextSecurity::Square: ts << "square"; break;
1187 }
1188 return ts;
1189}
1190
1191TextStream& operator<<(TextStream& ts, TextTransform textTransform)
1192{
1193 switch (textTransform) {
1194 case TextTransform::Capitalize: ts << "capitalize"; break;
1195 case TextTransform::Uppercase: ts << "uppercase"; break;
1196 case TextTransform::Lowercase: ts << "lowercase"; break;
1197 case TextTransform::None: ts << "none"; break;
1198 }
1199 return ts;
1200}
1201
1202TextStream& operator<<(TextStream& ts, TextUnderlinePosition underlinePosition)
1203{
1204 switch (underlinePosition) {
1205 case TextUnderlinePosition::Auto: ts << "Auto"; break;
1206 case TextUnderlinePosition::Under: ts << "Under"; break;
1207 case TextUnderlinePosition::FromFont: ts << "FromFont"; break;
1208 }
1209 return ts;
1210}
1211
1212TextStream& operator<<(TextStream& ts, TextZoom zoom)
1213{
1214 switch (zoom) {
1215 case TextZoom::Normal: ts << "normal"; break;
1216 case TextZoom::Reset: ts << "reset"; break;
1217 }
1218 return ts;
1219}
1220
1221TextStream& operator<<(TextStream& ts, TransformBox box)
1222{
1223 switch (box) {
1224 case TransformBox::BorderBox: ts << "border-box"; break;
1225 case TransformBox::FillBox: ts << "fill-box"; break;
1226 case TransformBox::ViewBox: ts << "view-box"; break;
commit-queue@webkit.org228632c2019-10-17 19:21:39 +00001227 case TransformBox::StrokeBox: ts << "stroke-box"; break;
1228 case TransformBox::ContentBox: ts << "content-box"; break;
simon.fraser@apple.comf6013b22019-10-12 22:05:04 +00001229 }
1230 return ts;
1231}
1232
1233TextStream& operator<<(TextStream& ts, TransformStyle3D transformStyle)
1234{
1235 switch (transformStyle) {
1236 case TransformStyle3D::Flat: ts << "flat"; break;
1237 case TransformStyle3D::Preserve3D: ts << "preserve-3d"; break;
1238 }
1239 return ts;
1240}
1241
1242TextStream& operator<<(TextStream& ts, UserDrag userDrag)
1243{
1244 switch (userDrag) {
1245 case UserDrag::Auto: ts << "auto"; break;
1246 case UserDrag::None: ts << "none"; break;
1247 case UserDrag::Element: ts << "element"; break;
1248 }
1249 return ts;
1250}
1251
1252TextStream& operator<<(TextStream& ts, UserModify userModify)
1253{
1254 switch (userModify) {
1255 case UserModify::ReadOnly: ts << "read-only"; break;
1256 case UserModify::ReadWrite: ts << "read-write"; break;
1257 case UserModify::ReadWritePlaintextOnly: ts << "read-write plaintext only"; break;
1258 }
1259 return ts;
1260}
1261
1262TextStream& operator<<(TextStream& ts, UserSelect userSelect)
1263{
1264 switch (userSelect) {
1265 case UserSelect::None: ts << "none"; break;
1266 case UserSelect::Text: ts << "text"; break;
1267 case UserSelect::All: ts << "all"; break;
1268 }
1269 return ts;
1270}
1271
1272TextStream& operator<<(TextStream& ts, VerticalAlign verticalAlign)
1273{
1274 switch (verticalAlign) {
1275 case VerticalAlign::Baseline: ts << "baseline"; break;
1276 case VerticalAlign::Middle: ts << "middle"; break;
1277 case VerticalAlign::Sub: ts << "sub"; break;
1278 case VerticalAlign::Super: ts << "super"; break;
1279 case VerticalAlign::TextTop: ts << "text-top"; break;
1280 case VerticalAlign::TextBottom: ts << "text-bottom"; break;
1281 case VerticalAlign::Top: ts << "top"; break;
1282 case VerticalAlign::Bottom: ts << "bottom"; break;
1283 case VerticalAlign::BaselineMiddle: ts << "baseline-middle"; break;
1284 case VerticalAlign::Length: ts << "length"; break;
1285 }
1286 return ts;
1287}
1288
1289TextStream& operator<<(TextStream& ts, Visibility visibility)
1290{
1291 switch (visibility) {
1292 case Visibility::Visible: ts << "visible"; break;
1293 case Visibility::Hidden: ts << "hidden"; break;
1294 case Visibility::Collapse: ts << "collapse"; break;
1295 }
1296
1297 return ts;
1298}
1299
1300TextStream& operator<<(TextStream& ts, WhiteSpace whiteSpace)
1301{
1302 switch (whiteSpace) {
1303 case WhiteSpace::Normal: ts << "normal"; break;
1304 case WhiteSpace::Pre: ts << "pre"; break;
1305 case WhiteSpace::PreWrap: ts << "pre-wrap"; break;
1306 case WhiteSpace::PreLine: ts << "pre-line"; break;
1307 case WhiteSpace::NoWrap: ts << "nowrap"; break;
1308 case WhiteSpace::KHTMLNoWrap: ts << "khtml-nowrap"; break;
1309 case WhiteSpace::BreakSpaces: ts << "break-spaces"; break;
1310 }
1311 return ts;
1312}
1313
1314TextStream& operator<<(TextStream& ts, WordBreak wordBreak)
1315{
1316 switch (wordBreak) {
1317 case WordBreak::Normal: ts << "normal"; break;
1318 case WordBreak::BreakAll: ts << "break-all"; break;
1319 case WordBreak::KeepAll: ts << "keep-all"; break;
1320 case WordBreak::BreakWord: ts << "break-word"; break;
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +00001321 }
1322 return ts;
1323}
1324
hyatt@apple.com441ab1d2016-01-30 15:28:48 +00001325bool alwaysPageBreak(BreakBetween between)
1326{
commit-queue@webkit.orgeea2d6a2018-05-25 01:42:36 +00001327 return between >= BreakBetween::Page;
hyatt@apple.com441ab1d2016-01-30 15:28:48 +00001328}
1329
pvollan@apple.com60e84802017-04-03 13:17:11 +00001330const float defaultMiterLimit = 4;
1331
simon.fraser@apple.com40a759c2015-10-19 20:07:37 +00001332} // namespace WebCore