Commit 0f3545f6 authored by inferno@chromium.org's avatar inferno@chromium.org

:before content rendering issues with list markers and run-ins.

https://bugs.webkit.org/show_bug.cgi?id=67735

Source/WebCore: 

1) Remove the isAnonymous checks for run-in detection since the
run-in can belong to a node.
2) When the parent has block children, then the list marker will
be enclosed in an anonymous block. In that case, for going to the
next list marker, we need to traverse one level up. We don't need
this check when searching for generated run-in (loop 2), since we
know parent will have inline children, so the list marker wont be
enclosed in an anonymous block.

Reviewed by Dave Hyatt.

Tests: fast/lists/list-marker-before-content-table.html
       fast/runin/runin-generated-before-content.html

* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::beforePseudoElementRenderer):

LayoutTests: 

Reviewed by Dave Hyatt.

* fast/lists/list-marker-before-content-table-expected.png: Added.
* fast/lists/list-marker-before-content-table-expected.txt: Added.
* fast/lists/list-marker-before-content-table.html: Added.
* fast/runin/runin-generated-before-content-expected.png: Added.
* fast/runin/runin-generated-before-content-expected.txt: Added.
* fast/runin/runin-generated-before-content.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ea07a355
2011-09-08 Abhishek Arya <inferno@chromium.org>
:before content rendering issues with list markers and run-ins.
https://bugs.webkit.org/show_bug.cgi?id=67735
Reviewed by Dave Hyatt.
* fast/lists/list-marker-before-content-table-expected.png: Added.
* fast/lists/list-marker-before-content-table-expected.txt: Added.
* fast/lists/list-marker-before-content-table.html: Added.
* fast/runin/runin-generated-before-content-expected.png: Added.
* fast/runin/runin-generated-before-content-expected.txt: Added.
* fast/runin/runin-generated-before-content.html: Added.
2011-09-09 Nate Chapin <japhet@chromium.org>
Chromium leopard css3 baselines, and new mac gpu baselines.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x160
RenderBlock {HTML} at (0,0) size 800x160
RenderBody {BODY} at (8,32) size 784x96
RenderBlock {UL} at (0,0) size 784x96
RenderListItem {LI} at (40,0) size 744x96 [color=#008000]
RenderBlock (anonymous) at (0,0) size 744x32
RenderListMarker at (-25,0) size 11x32: bullet
RenderTable at (0,32) size 128x32
RenderTableSection (anonymous) at (0,0) size 128x32
RenderTableRow (anonymous) at (0,0) size 128x32 [color=#0000FF]
RenderTableCell (anonymous) at (0,0) size 128x32 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 128x32
text run at (0,0) width 128: "ABCD"
RenderBlock (anonymous) at (0,64) size 744x32
RenderText {#text} at (0,0) size 128x32
text run at (0,0) width 128: "EFGH"
<!DOCTYPE html>
<!-- You should only one blue textbox between the green list maker and green textbox -->
<html>
<body style="font: 1em/1 Ahem, sans-serif;">
<style>
li:before {
display: table-row;
content: "ABCD";
color: blue;
}
</style>
<ul>
<li style="color: green">EFGH</li>
</ul>
<script>
document.body.offsetTop;
document.body.style.fontSize = "200%";
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x48
RenderBlock {HTML} at (0,0) size 800x48
RenderBody {BODY} at (8,8) size 784x32
RenderBlock {DIV} at (0,0) size 784x32 [color=#008000]
RenderInline (run-in) {DIV} at (0,0) size 128x32 [color=#FFA500]
RenderText {#text} at (0,0) size 128x32
text run at (0,0) width 128: "ABCD"
RenderInline (generated) at (0,0) size 128x32 [color=#0000FF]
RenderText at (128,0) size 128x32
text run at (128,0) width 128: "EFGH"
RenderText {#text} at (256,0) size 128x32
text run at (256,0) width 128: "IJKL"
<!DOCTYPE html>
<!-- You should see only one blue textbox between the orange and green textbox. -->
<html>
<body style="font: 1em/1 Ahem, sans-serif;">
<style>
#test::before {
content: "EFGH";
color: blue;
}
</style>
<div style="display: run-in; color: orange">ABCD</div><div id="test" style="color: green">IJKL</div>
<script>
document.body.offsetTop;
document.body.style.fontSize = "200%";
</script>
</body>
</html>
2011-09-08 Abhishek Arya <inferno@chromium.org>
:before content rendering issues with list markers and run-ins.
https://bugs.webkit.org/show_bug.cgi?id=67735
1) Remove the isAnonymous checks for run-in detection since the
run-in can belong to a node.
2) When the parent has block children, then the list marker will
be enclosed in an anonymous block. In that case, for going to the
next list marker, we need to traverse one level up. We don't need
this check when searching for generated run-in (loop 2), since we
know parent will have inline children, so the list marker wont be
enclosed in an anonymous block.
Reviewed by Dave Hyatt.
Tests: fast/lists/list-marker-before-content-table.html
fast/runin/runin-generated-before-content.html
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::beforePseudoElementRenderer):
2011-09-09 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: introduce JavaScriptSourceFrame class.
......@@ -299,7 +299,12 @@ RenderObject* RenderObjectChildList::beforePseudoElementRenderer(const RenderObj
do {
// Skip list markers and generated run-ins
first = first->firstChild();
while (first && (first->isListMarker() || (first->isRenderInline() && first->isRunIn() && first->isAnonymous())))
while (first && first->isListMarker()) {
if (first->parent() != owner && first->parent()->isAnonymousBlock())
first = first->parent();
first = first->nextSibling();
}
while (first && first->isRenderInline() && first->isRunIn())
first = first->nextSibling();
} while (first && first->isAnonymous() && first->style()->styleType() == NOPSEUDO);
......@@ -321,7 +326,7 @@ RenderObject* RenderObjectChildList::beforePseudoElementRenderer(const RenderObj
// We still need to skip any list markers that could exist before the run-in.
while (first && first->isListMarker())
first = first->nextSibling();
if (first && first->style()->styleType() == BEFORE && first->isRenderInline() && first->isRunIn() && first->isAnonymous())
if (first && first->style()->styleType() == BEFORE && first->isRenderInline() && first->isRunIn())
return first;
}
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment