Title: [93489] branches/chromium/835
- Revision
- 93489
- Author
- [email protected]
- Date
- 2011-08-20 23:26:24 -0700 (Sat, 20 Aug 2011)
Log Message
Merge 93382 - REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner
https://bugs.webkit.org/show_bug.cgi?id=66453
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/forms/placeholder-crash-with-scrollbar-corner.html
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode): Add a NULL check for owner's layer.
LayoutTests:
* fast/forms/placeholder-crash-with-scrollbar-corner-expected.txt: Added.
* fast/forms/placeholder-crash-with-scrollbar-corner.html: Added.
[email protected]
Review URL: http://codereview.chromium.org/7703003
Modified Paths
Added Paths
Diff
Copied: branches/chromium/835/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner-expected.txt (from rev 93382, trunk/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner-expected.txt) (0 => 93489)
--- branches/chromium/835/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner-expected.txt (rev 0)
+++ branches/chromium/835/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner-expected.txt 2011-08-21 06:26:24 UTC (rev 93489)
@@ -0,0 +1,3 @@
+Focus on the input and hit Escape and see if the browser crashes.
+
+PASS (not crashed)
Copied: branches/chromium/835/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner.html (from rev 93382, trunk/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner.html) (0 => 93489)
--- branches/chromium/835/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner.html (rev 0)
+++ branches/chromium/835/LayoutTests/fast/forms/placeholder-crash-with-scrollbar-corner.html 2011-08-21 06:26:24 UTC (rev 93489)
@@ -0,0 +1,26 @@
+<style>
+::-webkit-scrollbar-corner {
+ color: Red;
+}
+</style>
+<p>Focus on the input and hit Escape and see if the browser crashes.</p>
+<input placeholder="foo" id=i>
+<div id=console></div>
+<script>
+document.getElementById('i').addEventListener("keydown", function() {
+ this.style.display = "none";
+ document.getElementById('console').innerText = 'PASS (not crashed)';
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+});
+
+if (window.layoutTestController && window.eventSender) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ setTimeout(function() {
+ document.getElementById('i').focus();
+ eventSender.keyDown('a');
+ }, 0);
+}
+
+</script>
Modified: branches/chromium/835/Source/WebCore/rendering/RenderObjectChildList.cpp (93488 => 93489)
--- branches/chromium/835/Source/WebCore/rendering/RenderObjectChildList.cpp 2011-08-21 05:27:41 UTC (rev 93488)
+++ branches/chromium/835/Source/WebCore/rendering/RenderObjectChildList.cpp 2011-08-21 06:26:24 UTC (rev 93489)
@@ -84,8 +84,8 @@
// if we remove visible child from an invisible parent, we don't know the layer visibility any more
RenderLayer* layer = 0;
if (owner->style()->visibility() != VISIBLE && oldChild->style()->visibility() == VISIBLE && !oldChild->hasLayer()) {
- layer = owner->enclosingLayer();
- layer->dirtyVisibleContentStatus();
+ if ((layer = owner->enclosingLayer()))
+ layer->dirtyVisibleContentStatus();
}
// Keep our layer hierarchy updated.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes