Skip to content
Snippets Groups Projects
  • Ting-Yu Lin's avatar
    cf926779
    Bug 1674302 Part 2 - Use StyleSizeOverrides to replace ComputeSizeFlag::UseAutoISize. r=dholbert · cf926779
    Ting-Yu Lin authored
    `UseAutoISize` flag is buggy when used on table flex items because it
    never propagates to inner table frame.
    
    Luckily, we can fix it by replacing the flag with StyleSizeOverrides
    emplacing an 'auto' mStyleISize, because when computing the size, the
    size overrides already propagates from table wrapper to inner table via
    the following path:
    
      `nsTableWrapperFrame::ComputeSize()` [1] ->
      `nsTableWrapperFrame::ComputeAutoSize()` ->
      `nsTableWrapperFrame::InnerTableShrinkWrapISize()` ->
      `nsTableFrame::ComputeSize()`.
    
    Part 3 is going to propagate the size overrides to inner table in
    `nsTableWrapperFrame::CreateReflowInputForInnerTable()` during reflow.
    
    This patch fixes the content size suggestion for table flex items.
    Combining this patch with Part 3, we can fix those reftests in Part 4.
    
    [1] In this patch, the table wrapper is still using nsContainerFrame's
    ComputeSize(), but Part 3 is going to override it.
    
    Differential Revision: https://phabricator.services.mozilla.com/D103438
    cf926779
    History
    Bug 1674302 Part 2 - Use StyleSizeOverrides to replace ComputeSizeFlag::UseAutoISize. r=dholbert
    Ting-Yu Lin authored
    `UseAutoISize` flag is buggy when used on table flex items because it
    never propagates to inner table frame.
    
    Luckily, we can fix it by replacing the flag with StyleSizeOverrides
    emplacing an 'auto' mStyleISize, because when computing the size, the
    size overrides already propagates from table wrapper to inner table via
    the following path:
    
      `nsTableWrapperFrame::ComputeSize()` [1] ->
      `nsTableWrapperFrame::ComputeAutoSize()` ->
      `nsTableWrapperFrame::InnerTableShrinkWrapISize()` ->
      `nsTableFrame::ComputeSize()`.
    
    Part 3 is going to propagate the size overrides to inner table in
    `nsTableWrapperFrame::CreateReflowInputForInnerTable()` during reflow.
    
    This patch fixes the content size suggestion for table flex items.
    Combining this patch with Part 3, we can fix those reftests in Part 4.
    
    [1] In this patch, the table wrapper is still using nsContainerFrame's
    ComputeSize(), but Part 3 is going to override it.
    
    Differential Revision: https://phabricator.services.mozilla.com/D103438
LayoutConstants.h 3.63 KiB