[Webkit-unassigned] [Bug 218098] New: Duplicate checks in overridingContainingBlockContentXXX()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 22 13:44:47 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=218098

            Bug ID: 218098
           Summary: Duplicate checks in
                    overridingContainingBlockContentXXX()
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: svillar at igalia.com

RenderBoxModelObject.h defines overridingContainingBlockContentWidth() and overridingContainingBlockContentHeight(). Both of them return an Optional<LayoutUnit> apparently to deal with the case of not having an overriding size in the containing block. However the very same file also defines hasOverridingContainingBlockContentWidth() and hasOverridingContainingBlockContentHeight(). This means that there are multiple occurrences of:

if (hasOverridingContainingBlockContentWidth())
    if (auto width = overridingContainingBlockContentWidth())
       return width.value();

duplicating the checks. We should figure out why that was done like this and remove the extra check if needed.

Note that RenderBox.h replicates the same pattern with hasOverridingContainingBlockContentLogical{Height|Width}()

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201022/71423c9f/attachment-0001.htm>


More information about the webkit-unassigned mailing list