summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html
diff options
context:
space:
mode:
authorap <ap@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2006-04-04 05:21:08 +0000
committerap <ap@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2006-04-04 05:21:08 +0000
commitff2032e0630a73bb37010293a58c7a8ea1e1bf27 (patch)
treeb0210c07ca9059a95ad920f5b1bb9f4b03c96487 /third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html
parent8c28e079bc473649850147b00577418384b32bba (diff)
downloadchromium_src-ff2032e0630a73bb37010293a58c7a8ea1e1bf27.zip
chromium_src-ff2032e0630a73bb37010293a58c7a8ea1e1bf27.tar.gz
chromium_src-ff2032e0630a73bb37010293a58c7a8ea1e1bf27.tar.bz2
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7118 Property values with extra items do not get treated as invalid (they should) Tests: fast/css/invalidation-errors.html fast/css/invalidation-errors-2.html fast/css/invalidation-errors-3.html * css/CSSGrammar.y: Rollback the properties added by parseValue() when it returns false. * css/cssparser.h: Moved shorthand counting to ShorthandScope, a new class in cssparser.cpp. * css/cssparser.cpp: (WebCore::CSSParser::rollbackLastProperties): Added. (WebCore::CSSParser::parseValue): Return false if there are too many properties in the list. (WebCore::CSSParser::parseBackgroundShorthand): Use ShorthandScope. (WebCore::CSSParser::parseShorthand): Ditto. (WebCore::CSSParser::parse4Values): Ditto. git-svn-id: svn://svn.chromium.org/blink/trunk@13673 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html')
-rw-r--r--third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html109
1 files changed, 109 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html b/third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html
new file mode 100644
index 0000000..eb79206
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation-errors.html
@@ -0,0 +1,109 @@
+<head>
+ <style type="text/css">
+ #testblock {
+ width: 200px;
+ height: 200px;
+ /* invalid width and height */
+ width: 500px garbage;
+ height: 500px 200px;
+
+ /* Font-size */
+ font-size: 14px;
+ /* Invalid font-sizes */
+ font-size: 36px garbage;
+
+ float: left;
+ float: right garbage;
+ /* Trying colors */
+ /* The !important is here so you don't break this while fixing this bug */
+ color: white !important;
+ color: black;
+ background: darkgreen;
+ /* the color and background-color below should be invalidated,
+ so the text should be green */
+ color: black garbage !important;
+ background-color: darkred garbage;
+ background-repeat: no-repeat;
+
+ /* These ones actually get invalidated correctly */
+ background: url('http://webkit.opendarwin.org/images/welcomeopen.gif') garbage;
+ background-repeat: garbage repeat-x;
+
+ /* Trying text and font properties */
+ font-family: sans-serif;
+ font-weight: 900;
+ text-decoration: none;
+ word-spacing: normal;
+ letter-spacing: normal;
+ text-align: left;
+ direction: ltr;
+ text-transform: lowercase;
+ font-variant: normal;
+ white-space: normal;
+
+ /* Invalid text and font properties */
+ /* This one actually DOES get invalidated */
+ font: "Comic Sans MS" woopdidoo;
+ font-weight: 500 500;
+ /* This one actually DOES get invalidated */
+ text-decoration: line-through garbage;
+ word-spacing: 10px garbage;
+ letter-spacing: 5px garbage;
+ text-align: right left;
+ direction: rtl garbage;
+ text-transform: capitalize garbage;
+ font-variant: small-caps garbage;
+ white-space: pre garbage;
+
+ outline: none;
+ outline: red 3px dotted garbage;
+ outline: red solid garbage;
+
+ overflow: hidden;
+ overflow: visible scroll;
+ }
+ #Content {
+ display: inline;
+ /* invalid */
+ display: block garbage;
+
+ /* All margins, paddings and borders until the next comment are incorrect and
+ should be invalidated, resulting in padding and margin 0 */
+ margin-left: 50px garbage;
+ margin-right: 50px garbage;
+ margin-top: 50px garbage;
+ margin-bottom: 50px garbage;
+ padding-left: 50px garbage;
+ padding-right: 50px garbage;
+ padding-top: 50px garbage;
+ padding-bottom: 50px garbage;
+ border: 1px solid garbage;
+ border-top: yellow garbage;
+ border-right: blue garbage;
+ border-bottom: yellow garbage;
+ border-left: blue garbage;
+ /* The values below get invalidated correctly but are in here
+ for completeness. */
+ margin: 100px 100px 100px 100px garbage;
+ padding: 100px 100px 100px 100px garbage;
+ }
+ </style>
+</head>
+
+<body>
+<p><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7118">bug 7118</a>: Wrong property values do not get invalidated correctly.</p>
+<div id="Content">
+ <div id="testblock">
+This text should be
+left-aligned, all lower-case,
+normal font, white, 14px,
+bold, normally spaced
+and wrapped, in a
+darkgreen 200x200px div
+in the top left corner
+with no borders or
+outlines.
+</div>
+</div>
+
+</body>