Element#innerText for not being rendered element should not have newline for BR element to follow the specs[1][2].
This is caused by Element::innerText() calls Node::textContent() with
emitting newline for BR option.
String Node::textContent(bool convert_brs_to_newlines = false) const
String Element::innerText() {
...
if (!GetLayoutObject() && !HasDisplayContentsStyle())
return textContent(true);
...
}
[1] https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute
[2] https://dom.spec.whatwg.org/#dom-node-textcontent
Add UI>Browser>ReaderMode to components since the dom-distiller issue[1] is a
block of fixing this issue.
[1] https://github.com/chromium/dom-distiller/issues/10 WebTextTest.testGenerateOutputBRElements should have spec complaint test expectaion
Comment 1 by yosin@chromium.org
, Jul 2Labels: -Pri-3 M-70 Pri-1