fixed: missing dom protection

This commit is contained in:
daboe01 committed 2026-02-08 14:26:58 +01:00
1 parent 7f281d0442
commit 383fb9d704
1 file changed
+10 -2
+10 -2
View File
@@ -227,6 +227,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
- (void)updateState
{
#if PLATFORM(DOM)
var backgroundColor = nil;
if (_selected && [_tableView selectionHighlightStyle] != CPTableViewSelectionHighlightStyleNone)
@@ -253,6 +254,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
[self setBackgroundColor:backgroundColor];
[self _updateGridLine];
#endif
}
- (void)_updateGridLine
@@ -1569,16 +1571,21 @@ NOT YET IMPLEMENTED
if (_selectionHighlightStyle !== CPTableViewSelectionHighlightStyleNone)
[self _enumerateViewsInRows:newRows columns:_exposedColumns usingBlock:_BlockSelectView];
// Update Row Views (DOM Backgrounds)
var focused = [self _isFocused];
[oldRows enumerateIndexesUsingBlock:function(idx, stop) {
var rowView = _visibleRowViews[idx];
if (rowView) [rowView setSelected:NO focused:focused];
if (rowView)
[rowView setSelected:NO focused:focused];
}];
[newRows enumerateIndexesUsingBlock:function(idx, stop) {
var rowView = _visibleRowViews[idx];
if (rowView) [rowView setSelected:YES focused:focused];
if (rowView)
[rowView setSelected:YES focused:focused];
}];
}
@@ -3671,6 +3678,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
// Recycle Row Views
[rowIndexes enumerateIndexesUsingBlock:function(rowIndex, stop) {
var rowView = _visibleRowViews[rowIndex];
if (rowView)
{
[rowView removeFromSuperview];