Source/WebCore/ChangeLog

 12022-02-10 Alan Bujtas <zalan@apple.com>
 2
 3 [IFC][Integration] Enable writing-mode: vertical-lr
 4 https://bugs.webkit.org/show_bug.cgi?id=236481
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * layout/integration/LayoutIntegrationCoverage.cpp:
 9 (WebCore::LayoutIntegration::printReason):
 10 (WebCore::LayoutIntegration::canUseForStyle):
 11 (WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
 12 * layout/integration/LayoutIntegrationCoverage.h:
 13
1142022-02-09 Alan Bujtas <zalan@apple.com>
215
316 [LFC][IFC] Non-content runs (e.g. inline box start/end) do not need "within the line" flip

Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp

@@static void printReason(AvoidanceReason reason, TextStream& stream)
8686 case AvoidanceReason::FlowIsInsideANonMultiColumnThread:
8787 stream << "flow is inside a non-multicolumn container";
8888 break;
89  case AvoidanceReason::FlowHasHorizonalWritingMode:
90  stream << "horizontal writing mode";
91  break;
9289 case AvoidanceReason::ContentIsRuby:
9390 stream << "ruby";
9491 break;

@@static void printReason(AvoidanceReason reason, TextStream& stream)
116113 case AvoidanceReason::FlowHasLineBoxContainProperty:
117114 stream << "line-box-contain value indicates variable line height";
118115 break;
119  case AvoidanceReason::FlowIsNotTopToBottom:
120  stream << "non top-to-bottom flow";
 116 case AvoidanceReason::FlowHasUnsupportedWritingMode:
 117 stream << "unsupported writing mode (vertical-rl/horizontal-bt";
121118 break;
122119 case AvoidanceReason::FlowHasLineAlignEdges:
123120 stream << "-webkit-line-align edges";

@@static OptionSet<AvoidanceReason> canUseForStyle(const RenderElement& renderer,
412409 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasOverflowNotVisible, reasons, includeReasons);
413410 if (style.textOverflow() == TextOverflow::Ellipsis)
414411 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextOverflow, reasons, includeReasons);
415  if (style.writingMode() != WritingMode::TopToBottom)
416  SET_REASON_AND_RETURN_IF_NEEDED(FlowIsNotTopToBottom, reasons, includeReasons);
 412 if (style.writingMode() == WritingMode::RightToLeft || style.writingMode() == WritingMode::BottomToTop)
 413 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedWritingMode, reasons, includeReasons);
417414 if (style.textEmphasisFill() != TextEmphasisFill::Filled || style.textEmphasisMark() != TextEmphasisMark::None)
418415 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextEmphasisFillOrMark, reasons, includeReasons);
419416 if (style.hasPseudoStyle(PseudoId::FirstLetter))

@@OptionSet<AvoidanceReason> canUseForLineLayoutWithReason(const RenderBlockFlow&
581578 if (style.isFloating())
582579 SET_REASON_AND_RETURN_IF_NEEDED(MultiColumnFlowIsFloating, reasons, includeReasons);
583580 }
584  if (!flow.isHorizontalWritingMode())
585  SET_REASON_AND_RETURN_IF_NEEDED(FlowHasHorizonalWritingMode, reasons, includeReasons);
586581 if (flow.isRubyText() || flow.isRubyBase())
587582 SET_REASON_AND_RETURN_IF_NEEDED(ContentIsRuby, reasons, includeReasons);
588583 if (!flow.style().hangingPunctuation().isEmpty())

Source/WebCore/layout/integration/LayoutIntegrationCoverage.h

@@namespace LayoutIntegration {
3939
4040enum class AvoidanceReason : uint64_t {
4141 FlowIsInsideANonMultiColumnThread = 1LLU << 0,
42  FlowHasHorizonalWritingMode = 1LLU << 1,
 42 // Unused = 1LLU << 1,
4343 // Unused = 1LLU << 2,
4444 ContentIsRuby = 1LLU << 3,
4545 FlowIsPaginated = 1LLU << 4,

@@enum class AvoidanceReason : uint64_t {
5555 // Unused = 1LLU << 14,
5656 // Unused = 1LLU << 15,
5757 FlowHasLineBoxContainProperty = 1LLU << 16,
58  FlowIsNotTopToBottom = 1LLU << 17,
 58 FlowHasUnsupportedWritingMode = 1LLU << 17,
5959 // Unused = 1LLU << 18,
6060 // Unused = 1LLU << 19,
6161 FlowHasLineAlignEdges = 1LLU << 20,