/** * Phoebe DOM Implementation. * * This is a C++ approximation of the W3C DOM model, which follows * fairly closely the specifications in the various .idl files, copies of * which are provided for reference. Most important is this one: * * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html * * Authors: * Bob Jamison * * Copyright (C) 2005 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include struct CssProp_def { const char *name; const char *values; const char *defaultValue; const char *appliesTo; bool inherited; const char *percentages; const char *mediaGroups; }; typedef struct CssProp_def CssProp; static CssProp cssProps[] = { { "azimuth", " | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards | inherit", "center", "", true, "", "aural" }, { "background-attachment", "scroll | fixed | inherit", "scroll", "", false, "", "visual" }, { "background-color", " | transparent | inherit", "transparent", "", false, "", "visual" }, { "background-image", " | none | inherit", "none", "", false, "", "visual" }, { "background-position", "[ [ | | left | center | right ] [ | | top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit", "0% 0%", "", false, "refer to the size of the box itself", "visual" }, { "background-repeat", "repeat | repeat-x | repeat-y | no-repeat | inherit", "repeat", "", false, "", "visual" }, { "background", "['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position'] | inherit", "see individual properties", "", false, "allowed on 'background-position", "visual" }, { "border-collapse", "collapse | separate | inherit", "separate", "table' and 'inline-table' elements", true, "", "visual" }, { "border-color", "[ | transparent ]{1,4} | inherit", "see individual properties", "", false, "", "visual" }, { "border-spacing", " ? | inherit", "0", "table' and 'inline-table' elements", true, "", "visual" }, { "border-style", "{1,4} | inherit", "see individual properties", "", false, "", "visual" }, { "border-top' 'border-right' 'border-bottom' 'border-left", "[ || || 'border-top-color' ] | inherit", "see individual properties", "", false, "", "visual" }, { "border-top-color' 'border-right-color' 'border-bottom-color' 'border-left-color", " | transparent | inherit", "the value of the 'color' property", "", false, "", "visual" }, { "border-top-style' 'border-right-style' 'border-bottom-style' 'border-left-style", " | inherit", "none", "", false, "", "visual" }, { "border-top-width' 'border-right-width' 'border-bottom-width' 'border-left-width", " | inherit", "medium", "", false, "", "visual" }, { "border-width", "{1,4} | inherit", "see individual properties", "", false, "", "visual" }, { "border", "[ || || 'border-top-color' ] | inherit", "see individual properties", "", false, "", "visual" }, { "bottom", " | | auto | inherit", "auto", "positioned elements", false, "refer to height of containing block", "visual" }, { "caption-side", "top | bottom | inherit", "top", "table-caption' elements", true, "", "visual" }, { "clear", "none | left | right | both | inherit", "none", "block-level elements", false, "", "visual" }, { "clip", " | auto | inherit", "auto", "absolutely positioned elements", false, "", "visual" }, { "color", " | inherit", "depends on user agent", "", true, "", "visual" }, { "content", "normal | [ | | | attr() | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit", "normal", ":before and :after pseudo-elements", false, "", "all " }, { "counter-increment", "[ ? ]+ | none | inherit", "none", "", false, "", "all " }, { "counter-reset", "[ ? ]+ | none | inherit", "none", "", false, "", "all " }, { "cue-after", " | none | inherit", "none", "", false, "", "aural" }, { "cue-before", " | none | inherit", "none", "", false, "", "aural" }, { "cue", "[ 'cue-before' || 'cue-after' ] | inherit", "see individual properties", "", false, "", "aural" }, { "cursor", "[ [ ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit", "auto", "", true, "", "visual, interactive " }, { "direction", "ltr | rtl | inherit", "ltr", "all elements, but see prose", true, "", "visual" }, { "display", "inline | block | list-item | run-in | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit", "inline", "", false, "", "all " }, { "elevation", " | below | level | above | higher | lower | inherit", "level", "", true, "", "aural" }, { "empty-cells", "show | hide | inherit", "show", "table-cell' elements", true, "", "visual" }, { "float", "left | right | none | inherit", "none", "all, but see 9.7", false, "", "visual" }, { "font-family", "[[ | ] [, | ]* ] | inherit", "depends on user agent", "", true, "", "visual" }, { "font-size", " | | | | inherit", "medium", "", true, "refer to parent element's font size", "visual" }, { "font-style", "normal | italic | oblique | inherit", "normal", "", true, "", "visual" }, { "font-variant", "normal | small-caps | inherit", "normal", "", true, "", "visual" }, { "font-weight", "normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit", "normal", "", true, "", "visual" }, { "font", "[ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit", "see individual properties", "", true, "see individual properties", "visual" }, { "height", " | | auto | inherit", "auto", "all elements but non-replaced inline elements, table columns, and column groups", false, "see prose", "visual" }, { "left", " | | auto | inherit", "auto", "positioned elements", false, "refer to width of containing block", "visual" }, { "letter-spacing", "normal | | inherit", "normal", "", true, "", "visual" }, { "line-height", "normal | | | | inherit", "normal", "", true, "refer to the font size of the element itself", "visual" }, { "list-style-image", " | none | inherit", "none", "elements with 'display: list-item", true, "", "visual" }, { "list-style-position", "inside | outside | inherit", "outside", "elements with 'display: list-item", true, "", "visual" }, { "list-style-type", "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | none | inherit", "disc", "elements with 'display: list-item", true, "", "visual" }, { "list-style", "[ 'list-style-type' || 'list-style-position' || 'list-style-image' ] | inherit", "see individual properties", "elements with 'display: list-item", true, "", "visual" }, { "margin-right' 'margin-left", " | inherit", "0", "all elements except elements with table display types other than table and inline-table", false, "refer to width of containing block", "visual" }, { "margin-top' 'margin-bottom", " | inherit", "0", "all elements except elements with table display types other than table and inline-table", false, "refer to width of containing block", "visual" }, { "margin", "{1,4} | inherit", "see individual properties", "all elements except elements with table display types other than table and inline-table", false, "refer to width of containing block", "visual" }, { "max-height", " | | none | inherit", "none", "all elements except non-replaced inline elements and table elements", false, "see prose", "visual" }, { "max-width", " | | none | inherit", "none", "all elements except non-replaced inline elements and table elements", false, "refer to width of containing block", "visual" }, { "min-height", " | | inherit", "0", "all elements except non-replaced inline elements and table elements", false, "see prose", "visual" }, { "min-width", " | | inherit", "0", "all elements except non-replaced inline elements and table elements", false, "refer to width of containing block", "visual" }, { "orphans", " | inherit", "2", "block-level elements", true, "", "visual, paged " }, { "outline-color", " | invert | inherit", "invert", "", false, "", "visual, interactive " }, { "outline-style", " | inherit", "none", "", false, "", "visual, interactive " }, { "outline-width", " | inherit", "medium", "", false, "", "visual, interactive " }, { "outline", "[ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit", "see individual properties", "", false, "", "visual, interactive " }, { "overflow", "visible | hidden | scroll | auto | inherit", "visible", "block-level and replaced elements, table cells, inline blocks", false, "", "visual" }, { "padding-top' 'padding-right' 'padding-bottom' 'padding-left", " | inherit", "0", "all elements except elements with table display types other than table, inline-table, and table-cell", false, "refer to width of containing block", "visual" }, { "padding", "{1,4} | inherit", "see individual properties", "all elements except elements with table display types other than table, inline-table, and table-cell", false, "refer to width of containing block", "visual" }, { "page-break-after", "auto | always | avoid | left | right | inherit", "auto", "block-level elements", false, "", "visual, paged " }, { "page-break-before", "auto | always | avoid | left | right | inherit", "auto", "block-level elements", false, "", "visual, paged " }, { "page-break-inside", "avoid | auto | inherit", "auto", "block-level elements", true, "", "visual, paged " }, { "pause-after", "