source: webkit/trunk/LayoutTests/fast/block/basic/001.html

Last change on this file was 34507, checked in by mitz@apple.com, 16 years ago

WebCore:

Reviewed by Dave Hyatt.

Tests: fast/parser/p-in-scope-strict.html

fast/parser/p-in-scope.html

  • html/HTMLParagraphElement.h: (WebCore::HTMLParagraphElement::endTagRequirement): Changed to require an end tag. The explicit closing of one P element by another is now done in error checking, and therefore takes scope into account, allowing for <p><button><p>, for example.
  • html/HTMLParser.cpp: (WebCore::HTMLParser::HTMLParser): Initialize m_hasPElementInScope. (WebCore::isScopingTag): Added. Returns whether the given tag represents a scoping element as defined in HTML 5 section 8.2.3.2. (WebCore::HTMLParser::formCreateErrorCheck): Added a call to pCloserCreateErrorCheck(). (WebCore::HTMLParser::ddCreateErrorCheck): Ditto. (WebCore::HTMLParser::dtCreateErrorCheck): Ditto. (WebCore::HTMLParser::nestedPCloserCreateErrorCheck): Added for use with <li>, which both closes P elements in scope and any previous LI. (WebCore::HTMLParser::pCloserCreateErrorCheck): Added. If there is a P element in scope, acts as if a </p> tag was seen. (WebCore::HTMLParser::pCloserStrictCreateErrorCheck): Ditto, but only in strict mode. Used for <table>. (WebCore::HTMLParser::getNode): Added entries for tags that close a P element in scope. (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Added code to reset m_hasPElementInScope. (WebCore::HTMLParser::pushBlock): Added code to update m_hasPElementInScope. (WebCore::HTMLParser::popOneBlockCommon): Ditto. (WebCore::HTMLParser::checkIfHasPElementInScope): Added. Updates m_hasPElementInScope.
  • html/HTMLParser.h: (WebCore::HTMLParser::hasPElementInScope): Added. Calls checkIfHasPElementInScope() if needed and returns whether there is a P element in scope.

LayoutTests:

Reviewed by Dave Hyatt.

  • fast/block/basic/001.html:
  • fast/block/positioning/absolute-in-inline-ltr-2.html:
  • fast/block/positioning/absolute-in-inline-ltr-3.html:
  • fast/block/positioning/absolute-in-inline-ltr.html:
  • fast/block/positioning/absolute-in-inline-rtl-2.html:
  • fast/block/positioning/absolute-in-inline-rtl-3.html:
  • fast/block/positioning/absolute-in-inline-rtl.html:
  • fast/block/positioning/absolute-in-inline-short-ltr.html:
  • fast/block/positioning/absolute-in-inline-short-rtl.html:
  • fast/block/positioning/auto/006.html:
  • fast/inline/continuation-outlines-with-layers.html:
  • fast/inline/continuation-outlines.html:
  • fast/parser/p-in-scope-expected.txt: Added.
  • fast/parser/p-in-scope-strict-expected.txt: Added.
  • fast/parser/p-in-scope-strict.html: Added.
  • fast/parser/p-in-scope.html: Added.
  • fast/parser/resources/p-in-scope.css: Added.
  • fast/parser/resources/p-in-scope.js: Added.
  • fast/repaint/subtree-root-clip-2.html:
  • platform/mac/fast/block/basic/001-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-ltr-2-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-ltr-3-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-ltr-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-rtl-2-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-rtl-3-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-rtl-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-short-ltr-expected.txt:
  • platform/mac/fast/block/positioning/absolute-in-inline-short-rtl-expected.txt:
  • platform/mac/fast/block/positioning/auto/006-expected.txt:
  • platform/mac/fast/inline/continuation-outlines-expected.txt:
  • platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt:
  • platform/mac/fast/repaint/subtree-root-clip-2-expected.txt:
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html
File size: 263 bytes
Line 
1<div style="border:2px solid red">
2<i>Start of a line. <font color=red>More red on this line:
3<h3>Suddenly a block appears!</h3>
4<h2>And another block!</h2>
5Now more text.<br>
6This is red</font> but now only italic on the same line</i><br>
7Plain line at the end.
Note: See TracBrowser for help on using the repository browser.