Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3ba7bd34e048ca3ffb510c681462bc407f4c70f
      
https://github.com/WebKit/WebKit/commit/d3ba7bd34e048ca3ffb510c681462bc407f4c70f
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderTable.cpp
    M Source/WebCore/rendering/RenderTable.h

  Log Message:
  -----------
  Use default member initializers for RenderTable data members
https://bugs.webkit.org/show_bug.cgi?id=316504
rdar://178957380

Reviewed by Alan Baradlay.

RenderTable has two constructors (Element& and Document&) that duplicated a
large member init list. The Document& one had drifted out of sync and omitted
m_columnOffsetTop/m_columnOffsetHeight, leaving them at LayoutUnit's default of
0 instead of the -1 "not yet computed" sentinel used by the >= 0 cache guard in
offsetTopForColumn()/offsetHeightForColumn().

Move the data members to default member initializers in the header so every
constructor stays in sync:

- m_columnOffsetTop/m_columnOffsetHeight default to -1.
- m_currentBorder and the bit-field bools, which are not safely
  default-initialized, get explicit initializers.
- m_borderStart/m_borderEnd are LayoutUnit, which already zero-initializes, so
  the redundant (0) inits are dropped (matching m_hSpacing/m_vSpacing).

Both constructor init lists now collapse to the base RenderBlock call plus
m_columnPos, which needs a non-default Vector construction. No change in
behavior.

* Source/WebCore/rendering/RenderTable.cpp:
(WebCore::m_columnPos):
(WebCore::m_columnOffsetHeight): Deleted.
(WebCore::m_borderEnd): Deleted.
* Source/WebCore/rendering/RenderTable.h:

Canonical link: https://commits.webkit.org/314742@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to