Index: third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp b/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
index b0ca3aaea220adc1d37963604f08dfeed2533c95..8c815b1a8ebdd6516ec19d907e4d3d93e017751b 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableBoxComponent.cpp |
@@ -4,6 +4,7 @@ |
#include "core/layout/LayoutTableBoxComponent.h" |
+#include "core/layout/LayoutTable.h" |
#include "core/style/ComputedStyle.h" |
namespace blink { |
@@ -25,4 +26,13 @@ void LayoutTableBoxComponent::imageChanged(WrappedImagePtr, const IntRect*) |
m_backgroundChangedSinceLastPaintInvalidation = true; |
} |
+bool LayoutTableBoxComponent::doCellsHaveDirtyWidth(const LayoutObject& tablePart, const LayoutTable& table, const StyleDifference& diff, const ComputedStyle& oldStyle) |
+{ |
+ // ComputedStyle::diffNeedsFullLayoutAndPaintInvalidation sets needsFullLayout when border sizes |
+ // change: checking diff.needsFullLayout() is an optimization, not required for correctness. |
+ // TODO(dgrogan): Remove tablePart.needsLayout()? Perhaps it was an old optimization but now it |
+ // seems that diff.needsFullLayout() implies tablePart.needsLayout(). |
+ return diff.needsFullLayout() && tablePart.needsLayout() && table.collapseBorders() && !oldStyle.border().sizeEquals(tablePart.style()->border()); |
+} |
+ |
} // namespace blink |