Bug 446534 - [10.10] Table/tree with column headers visible has issues
on OS X 10.10 Yosemite
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index 21931e7..e40a289 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
@@ -1779,7 +1779,7 @@
 	 * Note: On OSX 10.10, in setBounds(), we reset the origin of NSTableView so that it is
 	 * positioned below the header view. Take this into account before calling rowAtPoint().
 	 */
-	if ((tableView != null) && (OS.VERSION_MMB >= OS.VERSION_MMB(10, 10, 0))) {
+	if ((tableView.headerView() != null) && (OS.VERSION_MMB >= OS.VERSION_MMB(10, 10, 0))) {
 		NSRect headerRect = headerView.frame();
 		point.y += headerRect.y + headerRect.height;
 	}
@@ -2976,6 +2976,14 @@
 	NSPoint pt = new NSPoint();
 	pt.x = scrollView.contentView().bounds().x;
 	pt.y = widget.frameOfCellAtColumn(0, row).y;
+	/*
+	 * Note: On OSX 10.10, in setBounds(), we reset the origin of NSTableView so that it is
+	 * positioned below the header view. Take this into account before calling scrollPoint().
+	 */
+	if ((widget.headerView() != null) && (OS.VERSION_MMB >= OS.VERSION_MMB(10, 10, 0))) {
+		NSRect headerRect = headerView.frame();
+		pt.y -= headerRect.y + headerRect.height;
+	}
 	view.scrollPoint(pt);
 }
 
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index c788803..05bec32 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -3179,6 +3179,14 @@
 	NSPoint pt = new NSPoint();
 	pt.x = scrollView.contentView().bounds().x;
 	pt.y = widget.frameOfCellAtColumn(0, row).y;
+	/*
+	 * Note: On OSX 10.10, in setBounds(), we reset the origin of NSOutlineView so that it is
+	 * positioned below the header view. Take this into account before calling scrollPoint().
+	 */
+	if ((widget.headerView() != null) && (OS.VERSION_MMB >= OS.VERSION_MMB(10, 10, 0))) {
+		NSRect headerRect = headerView.frame();
+		pt.y -= headerRect.y + headerRect.height;
+	}
 	view.scrollPoint(pt);
 }