haikuwebkit/LayoutTests/printing/break-after-avoid-page-expe...

21 lines
536 B
Plaintext
Raw Permalink Normal View History

Merge split script tests, part 2 https://bugs.webkit.org/show_bug.cgi?id=172423 Reviewed by Tim Horton. Fix the few remaining special cases of split tests. * editing/pasteboard/drop-text-events-sideeffect-crash.html: * editing/pasteboard/script-tests/drop-text-events-sideeffect.js: Removed. This JS file used to be shared between this test and editing/pasteboard/drop-text-events-sideeffect.html. Now it's inlined in both. * fast/canvas/canvas-ellipse-connecting-line-expected.html: * fast/canvas/script-tests/js-ellipse-implementation.js: Removed. This was really a resource, not a scrip test, and it was only only used in one test. * fast/dom/HTMLElement/class-list-quirks.html: * fast/dom/HTMLElement/script-tests/class-list.js: Removed. Another JS that used to be shared (with fast/dom/HTMLElement/class-list.html). * fast/dom/Window/resources/postmessage-test.js: Copied from LayoutTests/fast/dom/Window/script-tests/postmessage-test.js. * fast/dom/Window/script-tests/postmessage-test.js: Removed. Moved a shared resource to its proper location. * fast/dom/Window/script-tests/postmessage-clone-deep-array.js: Removed. * fast/dom/Window/script-tests/postmessage-clone-really-deep-array.js: Removed. * fast/dom/Window/script-tests/postmessage-clone.js: Removed. * fast/dom/Window/window-postmessage-clone-deep-array.html: * fast/dom/Window/window-postmessage-clone-really-deep-array.html: * fast/dom/Window/window-postmessage-clone.html: Straightforward js-tests with file names that didn't match. * fast/table/resources/min-width-helpers.js: Copied from LayoutTests/fast/table/script-tests/min-width-helpers.js. * fast/table/script-tests/min-width-helpers.js: Removed. Moved a shared resource to its proper location. * fast/table/min-width-css-block-table.html: * fast/table/min-width-css-inline-table.html: * fast/table/min-width-html-block-table.html: * fast/table/min-width-html-inline-table.html: * fast/table/script-tests/min-width-css-block-table.js: Removed. * fast/table/script-tests/min-width-css-inline-table.js: Removed. * fast/table/script-tests/min-width-html-block-table.js: Removed. * fast/table/script-tests/min-width-html-inline-table.js: Removed. Straightforward JS tests, weren't moved previously because my script was confused by min-width-helpers.js. * printing/break-after-avoid-expected.txt: * printing/break-after-avoid-page-expected.txt: * printing/break-after-avoid-page.html: * printing/break-after-avoid.html: * printing/script-tests/break-after-avoid-page.js: Removed. * printing/script-tests/break-after-avoid.js: Removed. * printing/script-tests/page-break-after-avoid.js: Removed. * printing/script-tests/page-break-always-for-overflow.js: Removed. These had a number of copy/paste mistakes, so the tests werent's actually testing what they said they did. * svg/dom/SVGAnimatedEnumeration-SVGMaskElement-expected.txt: * svg/dom/SVGAnimatedEnumeration-SVGMaskElement.html: * svg/dom/SVGAnimatedEnumeration-SVGPatternElement-expected.txt: * svg/dom/SVGAnimatedEnumeration-SVGPatternElement.html: * svg/dom/script-tests/SVGAnimatedEnumeration-SVGMaskElement.js: Removed. * svg/dom/script-tests/SVGAnimatedEnumeration-SVGPatternElement.js: Removed. These tests were mixed up - pattern was being tested instead of mask, and vice versa. * svg/dom/script-tests/SVGColor.js: Removed. * svg/dom/script-tests/SVGPaint.js: Removed. Removed unused files. * svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html: * svg/dynamic-updates/SVGFEGaussianBlurElement-dom-stdDeviation-call.html: * svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr.html: * svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop.html: * svg/dynamic-updates/script-tests/SVGFEFloodElement-inherit-flood-color-css-prop.js: Removed. * svg/dynamic-updates/script-tests/SVGFEGaussianBlurElement-svgdom-stdDeviation-call.js: Removed. * svg/dynamic-updates/script-tests/SVGFESpecularLightingElement-dom-surfaceScale-attr.js: Removed. * svg/dynamic-updates/script-tests/SVGFESpecularLightingElement-svgdom-surfaceScale-prop.js: Removed. Straightforward js-tests with mismatching names. Canonical link: https://commits.webkit.org/189526@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-26 02:10:33 +00:00
Test for break-after:avoid-page
Support break-after, break-before and break-inside. https://bugs.webkit.org/show_bug.cgi?id=148814 Reviewed by Dean Jackson. Source/WebCore: New tests added in printing/, fast/multicol/, and fast/regions. * css/CSSComputedStyleDeclaration.cpp: (WebCore::convertToPageBreak): (WebCore::convertToColumnBreak): (WebCore::convertToRegionBreak): For backwards compatibility, keep support for all the old properties in computed style. This means we have to convert the break-* property values into keywords that make sense for the legacy properties. This mainly involves mapping "page", "column", "region" to "always" (similar rule for the avoid-* versions as well). (WebCore::ComputedStyleExtractor::propertyValue): Add support for the three new break-* properties. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): Add support for the new break properties. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::operator BreakBetween): (WebCore::CSSPrimitiveValue::operator BreakInside): Add converters for the new BreakBetween and BreakInside enums. Remove the EPageBreak enum, since it is no longer used. * css/CSSPropertyNames.in: * css/CSSValueKeywords.in: Add the new properties and the new values supported by the properties to the keywords lists. * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::convertFontSynthesis): (WebCore::StyleBuilderConverter::convertPageBreakBetween): (WebCore::StyleBuilderConverter::convertPageBreakInside): (WebCore::StyleBuilderConverter::convertColumnBreakBetween): (WebCore::StyleBuilderConverter::convertColumnBreakInside): (WebCore::StyleBuilderConverter::convertRegionBreakBetween): (WebCore::StyleBuilderConverter::convertRegionBreakInside): In order to map the legacy properties into the new break-* values we have custom converter functions. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChild): (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation): (WebCore::RenderBlock::computeRegionRangeForBoxChild): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::applyBeforeBreak): (WebCore::RenderBlockFlow::applyAfterBreak): Patch the block code to check the correct new break-* constants. For avoidance, this means checking both the general avoid value and the specific value (e.g., avoid-page). In place of "always", we check the specific value (e.g., column) and then for page specifically, we also treat "left", "right", "recto" and "verso" as "always break" for now. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayout): Make sure changes to the break properties trigger relayout. * rendering/style/RenderStyle.h: Add getters and setters for the break-* properties and remove all occurrences of the legacy page, column and region values from the RenderStyle. * rendering/style/RenderStyleConstants.cpp: (WebCore::alwaysPageBreak): We have a helper function here for mapping several constant values to "page". * rendering/style/RenderStyleConstants.h: Definitions of the new BreakBetween and BreakInside enums. * rendering/style/StyleMultiColData.cpp: (WebCore::StyleMultiColData::StyleMultiColData): (WebCore::StyleMultiColData::operator==): * rendering/style/StyleMultiColData.h: Remove the column-specific break data. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: Remove the region-specific break data and replace it with generic break data that is now used by all three pagination models. LayoutTests: * TestExpectations: * fast/multicol/standardized-break-properties-expected.txt: Added. * fast/multicol/standardized-break-properties.html: Added. * fast/multicol/vertical-lr/standardized-break-properties-expected.txt: Added. * fast/multicol/vertical-lr/standardized-break-properties.html: Added. * fast/multicol/vertical-rl/standardized-break-properties-expected.txt: Added. * fast/multicol/vertical-rl/standardized-break-properties.html: Added. * fast/regions/text-break-properties-expected.txt: Added. * fast/regions/text-break-properties.html: Added. * printing/allowed-breaks-expected.txt: Added. * printing/allowed-breaks.html: Added. * printing/break-after-avoid-expected.txt: Added. * printing/break-after-avoid-page-expected.txt: Added. * printing/break-after-avoid-page.html: Added. * printing/break-after-avoid.html: Added. * printing/break-always-expected.txt: Added. * printing/break-always.html: Added. * printing/break-avoid-expected.txt: Added. * printing/break-avoid-page-expected.txt: Added. * printing/break-avoid-page.html: Added. * printing/break-avoid.html: Added. * printing/break-display-none-expected.txt: Added. * printing/break-display-none.html: Added. * printing/break-inside-avoid-expected.txt: Added. * printing/break-inside-avoid-page-expected.txt: Added. * printing/break-inside-avoid-page.html: Added. * printing/break-inside-avoid.html: Added. * printing/script-tests/allowed-breaks.js: Added. (test): * printing/script-tests/break-after-avoid-page.js: Added. (test): * printing/script-tests/break-after-avoid.js: Added. (test): * printing/script-tests/break-always.js: Added. (test): * printing/script-tests/break-avoid-page.js: Added. (test): * printing/script-tests/break-avoid.js: Added. (test): * printing/script-tests/break-display-none.js: Added. (test): * printing/script-tests/break-inside-avoid-page.js: Added. (test): * printing/script-tests/break-inside-avoid.js: Added. (test): Canonical link: https://commits.webkit.org/171770@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-30 15:28:48 +00:00
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS: page number of "page1" is 1
FAIL: expected page number of "page2-1" is 2. Was 1
FAIL: expected page number of "page2-2" is 2. Was 1
PASS: page number of "page3-1" is 3
PASS: page number of "page3-2" is 3
PASS: page number of "page3-3" is 3
PASS: page number of "page5" is 5
FAIL: expected page number of "page6-1" is 6. Was 5
PASS: page number of "page6-7" is 6
PASS successfullyParsed is true
TEST COMPLETE