Title: [122026] releases/WebKitGTK/webkit-1.8
- Revision
- 122026
- Author
- [email protected]
- Date
- 2012-07-06 13:20:16 -0700 (Fri, 06 Jul 2012)
Log Message
Merge 108372 - Crash in RenderTableSection::nodeAtPoint.
https://bugs.webkit.org/show_bug.cgi?id=78922
Patch by Abhishek Arya <[email protected]> on 2012-02-21
Reviewed by Julien Chaffraix.
Source/WebCore:
Test: fast/table/table-section-node-at-point-crash.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint): recalc cells if the
m_needsCellRecalc is set. Otherwise, we will end up accessing
removed table cells.
LayoutTests:
* fast/table/table-section-node-at-point-crash-expected.txt: Added.
* fast/table/table-section-node-at-point-crash.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (122025 => 122026)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-07-06 20:20:08 UTC (rev 122025)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-07-06 20:20:16 UTC (rev 122026)
@@ -1,3 +1,13 @@
+2012-02-21 Abhishek Arya <[email protected]>
+
+ Crash in RenderTableSection::nodeAtPoint.
+ https://bugs.webkit.org/show_bug.cgi?id=78922
+
+ Reviewed by Julien Chaffraix.
+
+ * fast/table/table-section-node-at-point-crash-expected.txt: Added.
+ * fast/table/table-section-node-at-point-crash.html: Added.
+
2012-02-22 Abhishek Arya <[email protected]>
Cloning and linebox issues in multi-column layout.
Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash-expected.txt (0 => 122026)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash-expected.txt 2012-07-06 20:20:16 UTC (rev 122026)
@@ -0,0 +1,2 @@
+Test passes if it does not crash.
+
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash.html (0 => 122026)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash.html (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash.html 2012-07-06 20:20:16 UTC (rev 122026)
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<body>
+Test passes if it does not crash.
+<style>
+#test1 {
+ display: table-cell;
+ content: counter(c);
+ counter-reset: c;
+ width: 1000px;
+ height: 1000px;
+}
+#test1::after {
+ content: counter(c);
+ counter-reset: c;
+}
+#test2 {
+ -webkit-flow-into: a;
+}
+#test2::before {
+ content: counter(c);
+ counter-reset: c;
+}
+</style>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+
+function crash() {
+ test1 = document.createElement('div');
+ test1.setAttribute('id', 'test1');
+ document.body.appendChild(test1);
+ test2 = document.createElement('div');
+ test2.setAttribute('id', 'test2');
+ test1.appendChild(test2);
+ document.body.offsetTop;
+ document.body.style.zoom = 2;
+ if (window.layoutTestController) {
+ GCController.collect();
+ eventSender.mouseMoveTo(500, 500);
+ layoutTestController.notifyDone();
+ }
+}
+window._onload_ = crash;
+</script>
+</body>
+</html>
\ No newline at end of file
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/table/table-section-node-at-point-crash.html
___________________________________________________________________
Added: svn:executable
Added: svn:eol-style
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (122025 => 122026)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-07-06 20:20:08 UTC (rev 122025)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-07-06 20:20:16 UTC (rev 122026)
@@ -1,3 +1,17 @@
+2012-02-21 Abhishek Arya <[email protected]>
+
+ Crash in RenderTableSection::nodeAtPoint.
+ https://bugs.webkit.org/show_bug.cgi?id=78922
+
+ Reviewed by Julien Chaffraix.
+
+ Test: fast/table/table-section-node-at-point-crash.html
+
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::nodeAtPoint): recalc cells if the
+ m_needsCellRecalc is set. Otherwise, we will end up accessing
+ removed table cells.
+
2012-02-22 Abhishek Arya <[email protected]>
Cloning and linebox issues in multi-column layout.
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableSection.cpp (122025 => 122026)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableSection.cpp 2012-07-06 20:20:08 UTC (rev 122025)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderTableSection.cpp 2012-07-06 20:20:16 UTC (rev 122026)
@@ -1301,6 +1301,9 @@
}
LayoutUnit offsetInColumnDirection = style()->isHorizontalWritingMode() ? location.y() : location.x();
+
+ recalcCellsIfNeeded();
+
// Find the first row that starts after offsetInColumnDirection.
unsigned nextRow = std::upper_bound(m_rowPos.begin(), m_rowPos.end(), offsetInColumnDirection) - m_rowPos.begin();
if (nextRow == m_rowPos.size())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes