New issue
Advanced search Search tips

Issue 857316 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CSS text-transform in ::first-line should apply to line in legacy

Project Member Reported by yosin@chromium.org, Jun 28 2018

Issue description

Example: https://jsfiddle.net/5pzotyfc/4/

Expected "Abcxyz"
Actual: "AbcXyz"
Note: "abc" and "xyz" are in different Text nodes.


In legacy, text-transform in ::first-line is done by
InlineTextBoxPainter::Paint() and it does text transform by 
ComputedStyle::ApplyTextTransform() with

// string from LayoutText which is applied text-transform.
  const String& layout_item_string =
      inline_text_box_.GetLineLayoutItem().GetText();

  String first_line_string;
  if (inline_text_box_.IsFirstLineStyle()) {
    first_line_string = layout_item_string;
    const ComputedStyle& style = inline_text_box_.GetLineLayoutItem().StyleRef(
        inline_text_box_.IsFirstLineStyle());

// Apply text transform
    style.ApplyTextTransform(
        &first_line_string,
        inline_text_box_.GetLineLayoutItem().PreviousCharacter());

In LayoutNG, NGInlineNode::ShapeTextForFirstLineIfNeeded() checks TextTransform() 
and calls ComputedStyle::ApplyTextTransform().


 

Comment 1 by yosin@chromium.org, Jun 28 2018

Status: WontFix (was: Available)
Oops, it work as expected.

Sign in to add a comment