[LayoutNG] Reduce excessive marking of line box dirtiness
This patch fixes two excessive marking of line box dirtiness in NGInlineNode::MarkLineBoxesDirty(). 1. LayoutObject::InsertedIntoTree() marks dirty, even if it will be dirtied again later in NGInlineNode:: MarkLineBoxesDirty(). Fixed LayoutNGMixin<Base>:: DirtyLinesFromChangedChild() to do only if it was in NG inline formatting context. 2. It may dirty the first line box because it clears LayoutObject::FirstInlineFragment as it traverses in pre- order, but NGPaintFragment::DirtyLinesFromChangedChild() needs FirstInlineFragment of its previous siblings. Changed to keep previous fragment in this loop. blink_perf.layout does not show observable improvements, but loading.desktop shows ~3% improvements. Bug: 636993 Change-Id: Ia0706bb2407427b3e4ed093290646eb21bc5c0f3 Reviewed-on: https://chromium-review.googlesource.com/c/1309388 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#604835}
Showing
Please register or sign in to comment