• Yoshifumi Inoue's avatar
    Create NGPhysicalFragment for every SPAN element for LayoutNGPaintFragments runtime feature enabled · 813190a7
    Yoshifumi Inoue authored
    This patch changes |ShouldCreateBoxFragment()| to return |true| for producing
    box fragments for plain SPAN when |LayoutNGPaintFragments| runtime feature
    enabled, to locate |NGPhysicalFragment| associated to |LayoutInlinline| for
    computing bounding box and other kinds rects.
    
    Without this patch, we need to traverse fragment tree rooted by
    |LayoutBlockFlow| containing |LayoutInline|.
    
    In legacy layout tree, we don't generate |InlineBox| for |LayoutInline| for
    performance optimization and called "Culled InlineBox". To compute rects in
    legacy layout tree, we traverse layout tree and line boxes in |LayoutInline|.
    This code makes |LayoutInline| implementation complicated. Note: There is a
    flag disabling "Culled InlineBox" as |AlwaysCreateLineBoxesForLayoutInline|.
    
    Once LayoutNG is stable enough to have profiling, we investigate whether
    generating fragment for every SPAN causes performance regression or not.
    
    
    [1] http://crrev.com/c/763188: ONE [LayoutNG] Utilize DCHECK(CanUseInlineBox())
    in core/layout/
    
    Bug: 789390
    Change-Id: Ife87fc9ee487397891ae4515d1bcaea1afcf9c04
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
    Reviewed-on: https://chromium-review.googlesource.com/790177
    Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
    Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#520865}
    813190a7
TestExpectations 357 KB