Title: [117281] releases/WebKitGTK/webkit-1.8
- Revision
- 117281
- Author
- [email protected]
- Date
- 2012-05-16 06:56:48 -0700 (Wed, 16 May 2012)
Log Message
Merge 112973 - <select> shouldn't intrude as a run-in.
https://bugs.webkit.org/show_bug.cgi?id=82829
Reviewed by Tony Chang.
Source/WebCore:
Matches Opera's behavior which also does not allow <select>
to intrude as a run-in into the neighbouring block.
IE and Firefox doesn't support run-ins, so can't compare behavior
with them.
Test: fast/runin/select-runin.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::handleRunInChild):
LayoutTests:
* fast/runin/select-runin-expected.txt: Added.
* fast/runin/select-runin.html: Added.
Conflicts:
Source/WebCore/rendering/RenderBlock.cpp
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (117280 => 117281)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-05-16 13:56:29 UTC (rev 117280)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog 2012-05-16 13:56:48 UTC (rev 117281)
@@ -1,3 +1,13 @@
+2012-04-02 Abhishek Arya <[email protected]>
+
+ <select> shouldn't intrude as a run-in.
+ https://bugs.webkit.org/show_bug.cgi?id=82829
+
+ Reviewed by Tony Chang.
+
+ * fast/runin/select-runin-expected.txt: Added.
+ * fast/runin/select-runin.html: Added.
+
2012-04-10 Abhishek Arya <[email protected]>
Crash due to intruding float not removed from next siblings.
Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin-expected.txt (0 => 117281)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin-expected.txt 2012-05-16 13:56:48 UTC (rev 117281)
@@ -0,0 +1,2 @@
+Test passes if it does not crash.
+
Added: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin.html (0 => 117281)
--- releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin.html (rev 0)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin.html 2012-05-16 13:56:48 UTC (rev 117281)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+Test passes if it does not crash.
+<select multiple="multiple" id="select" style="-webkit-appearance: none; display: run-in;">
+<option></option>
+</select>
+<div></div>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+document.body.offsetTop;
+document.execCommand("SelectAll");
+var select = document.getElementById("select");
+select.removeChild(select.firstChild);
+</script>
+</html>
Property changes on: releases/WebKitGTK/webkit-1.8/LayoutTests/fast/runin/select-runin.html
___________________________________________________________________
Added: svn:executable
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog (117280 => 117281)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-05-16 13:56:29 UTC (rev 117280)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/ChangeLog 2012-05-16 13:56:48 UTC (rev 117281)
@@ -1,3 +1,20 @@
+2012-04-02 Abhishek Arya <[email protected]>
+
+ <select> shouldn't intrude as a run-in.
+ https://bugs.webkit.org/show_bug.cgi?id=82829
+
+ Reviewed by Tony Chang.
+
+ Matches Opera's behavior which also does not allow <select>
+ to intrude as a run-in into the neighbouring block.
+ IE and Firefox doesn't support run-ins, so can't compare behavior
+ with them.
+
+ Test: fast/runin/select-runin.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::handleRunInChild):
+
2012-04-10 Abhishek Arya <[email protected]>
Crash due to intruding float not removed from next siblings.
Modified: releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderBlock.cpp (117280 => 117281)
--- releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderBlock.cpp 2012-05-16 13:56:29 UTC (rev 117280)
+++ releases/WebKitGTK/webkit-1.8/Source/WebCore/rendering/RenderBlock.cpp 2012-05-16 13:56:48 UTC (rev 117281)
@@ -1731,10 +1731,22 @@
// block.
if (!child->isRunIn() || !child->childrenInline())
return false;
+
// FIXME: We don't handle non-block elements with run-in for now.
if (!child->isRenderBlock())
return false;
+ // Run-in child shouldn't intrude into the sibling block if it is part of a
+ // continuation chain. In that case, treat it as a normal block.
+ if (child->isElementContinuation() || child->virtualContinuation())
+ return false;
+
+ // Check if this node is allowed to run-in. E.g. <select> expects its renderer to
+ // be a RenderListBox or RenderMenuList, and hence cannot be a RenderInline run-in.
+ Node* runInNode = child->node();
+ if (runInNode && runInNode->hasTagName(selectTag))
+ return false;
+
RenderBlock* blockRunIn = toRenderBlock(child);
RenderObject* curr = blockRunIn->nextSibling();
if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRunIn() || curr->isAnonymous() || curr->isFloatingOrPositioned())
@@ -1756,7 +1768,6 @@
children()->removeChildNode(this, blockRunIn);
// Create an inline.
- Node* runInNode = blockRunIn->node();
RenderInline* inlineRunIn = new (renderArena()) RenderInline(runInNode ? runInNode : document());
inlineRunIn->setStyle(blockRunIn->style());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes