-
bdakin authored
Reviewed by Hyatt. Fix for <rdar://problem/5399614> anchor tag is not rendered without text content, works in Firefox with CSS background-image (13237) This patch allows empty inlines that have box decorations or width from border/padding/margin to have line boxes. * rendering/bidi.cpp: (WebCore::inlineFlowAllowsLineBox): Convenience function that defines when we allow an inline flow to have a line box. (WebCore::requiresLineBox): Call inlineFlowAllowsLineBox. (WebCore::shouldSkipWhitespaceAfterStartObject): New function to merge some shared code between list markers and empty inline flows that fall at the beginning of a line. (WebCore::RenderBlock::findNextLineBreak): Make flows more like list markers. One interesting side effect of this bug appeared in our xhtml/svg tests that generate parser error tags. The tag we generate was actually an empty inline with box decorations. This patch causes those inlines to draw now, and the parser errors looked strange. So I changed it so that the parsererror tag is display:block. This matches Firefox, and I think was the original intent of the tag since that causes its red background and border to show up. * dom/XMLTokenizer.cpp: (WebCore::createXHTMLParserErrorHeader): LayoutTests: Reviewed by Hyatt. New tests and new results for old tests for <rdar://problem/ 5399614> anchor tag is not rendered without text content, works in Firefox with CSS background-image (13237) New tests: * fast/inline/drawStyledEmptyInlines.html: Added. * fast/inline/drawStyledEmptyInlinesWithWS.html: Added. * fast/inline/emptyInlinesWithinLists.html: Added. * fast/inline/styledEmptyInlinesWithBRs.html: Added. * platform/mac/fast/inline/drawStyledEmptyInlines-expected.checksum: Added. * platform/mac/fast/inline/drawStyledEmptyInlines-expected.png: Added. * platform/mac/fast/inline/drawStyledEmptyInlines-expected.txt: Added. * platform/mac/fast/inline/drawStyledEmptyInlinesWithWS-expected.checksum: Added. * platform/mac/fast/inline/drawStyledEmptyInlinesWithWS-expected.png: Added. * platform/mac/fast/inline/drawStyledEmptyInlinesWithWS-expected.txt: Added. * platform/mac/fast/inline/emptyInlinesWithinLists-expected.checksum: Added. * platform/mac/fast/inline/emptyInlinesWithinLists-expected.png: Added. * platform/mac/fast/inline/emptyInlinesWithinLists-expected.txt: Added. * platform/mac/fast/inline/styledEmptyInlinesWithBRs-expected.checksum: Added. * platform/mac/fast/inline/styledEmptyInlinesWithBRs-expected.png: Added. * platform/mac/fast/inline/styledEmptyInlinesWithBRs-expected.txt: Added. New results for tests with <paserererrors> since <parsererror> is now block. * platform/mac/fast/invalid/junk-data-expected.checksum: Replaced. * platform/mac/fast/invalid/junk-data-expected.png: Replaced. * platform/mac/fast/invalid/junk-data-expected.txt: * platform/mac/fast/invalid/missing-end-tag-expected.checksum: Replaced. * platform/mac/fast/invalid/missing-end-tag-expected.png: Replaced. * platform/mac/fast/invalid/missing-end-tag-expected.txt: * platform/mac/fast/parser/xhtml-alternate-entities-expected.checksum: Replaced. * platform/mac/fast/parser/xhtml-alternate-entities-expected.png: Replaced. * platform/mac/fast/parser/xhtml-alternate-entities-expected.txt: * platform/mac/fast/xsl/xslt-extra-content-at-end-expected.checksum: Replaced. * platform/mac/fast/xsl/xslt-extra-content-at-end-expected.png: Replaced. * platform/mac/fast/xsl/xslt-extra-content-at-end-expected.txt: Removed. * platform/mac/svg/custom/junk-data-expected.checksum: Replaced. * platform/mac/svg/custom/junk-data-expected.png: Replaced. * platform/mac/svg/custom/junk-data-expected.txt: * platform/mac/svg/custom/missing-xlink-expected.checksum: Replaced. * platform/mac/svg/custom/missing-xlink-expected.png: Replaced. * platform/mac/svg/custom/missing-xlink-expected.txt: * platform/mac/svg/hixie/error/012-expected.checksum: Replaced. * platform/mac/svg/hixie/error/012-expected.png: Replaced. * platform/mac/svg/hixie/error/012-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
f876beeb