Commit 315b30a5 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Revise inline item and block-level replaced element handling Element#innerText

This patch changes inline item and block-level replaced handling in
Element#innerText for improving interrop with adding test cases to WPT test
file.

Examples:
 * abc <img> def => "abc  def"; not collapse spaces around <img>
 * <canvas></canvas> abc => " abc"; not collapse space after <canvas>
 * abc <img style="display:block"> def => "abc\ndef"; recognize block with style

This patch also updates of layout test expectations since existing expectations
were produced by Element#innerText with bug fixed by this patch.

Bug: 894701
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I72d7eec3436d0cfa0226b5efa3adbc4c990f06c5
Reviewed-on: https://chromium-review.googlesource.com/c/1277802
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600671}
parent c447aa55
...@@ -6,3 +6,4 @@ PASS successfullyParsed is true ...@@ -6,3 +6,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -71,7 +71,7 @@ X ...@@ -71,7 +71,7 @@ X
Actual image: Actual image:
This test PASSES in DumpRenderTree. The role is AXRole: AXImage This test PASSES in DumpRenderTree. The role is AXRole: AXImage
......
Button with image of Button with image of
This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents.. This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..
......
...@@ -3,6 +3,7 @@ Link Button ...@@ -3,6 +3,7 @@ Link Button
2 2
ARIA button ARIA link ARIA button ARIA link
This test makes sure that AccessibilityNodeObjects are created for elements in a canvas subtree. This test makes sure that AccessibilityNodeObjects are created for elements in a canvas subtree.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -13,6 +13,7 @@ ARIA required button ...@@ -13,6 +13,7 @@ ARIA required button
ARIA toggle button ARIA toggle button
ARIA link ARIA link
This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content. This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -5,6 +5,7 @@ Focusable ...@@ -5,6 +5,7 @@ Focusable
ARIA button ARIA button
ARIA link ARIA link
This test makes sure that focusable elements in canvas fallback content are accessible. This test makes sure that focusable elements in canvas fallback content are accessible.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -7,3 +7,4 @@ PASS successfullyParsed is true ...@@ -7,3 +7,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
Text Text
...@@ -39,8 +39,10 @@ This is an open dialog window ...@@ -39,8 +39,10 @@ This is an open dialog window
Caption Caption
Cell1 Cell2 Cell1 Cell2
Fig1. - Blue Box Fig1. - Blue Box
This is a footer. This is a footer.
End of test End of test
......
...@@ -2,6 +2,7 @@ Image link in the presence of inline continuations ...@@ -2,6 +2,7 @@ Image link in the presence of inline continuations
This test checks that the right accessibility tree is generated for a link inside an image This test checks that the right accessibility tree is generated for a link inside an image
Delicious cake Delicious cake
AXRole: AXLink AXRole: AXLink
......
...@@ -2,6 +2,7 @@ Image link in the presence of inline continuations ...@@ -2,6 +2,7 @@ Image link in the presence of inline continuations
This test checks that a block inside a link does not unduly disturb the render tree via inline continuations. In particular, it checks that adding <div role=presentation> between a link and its contained image does not alter the accessibility tree at all, other than with respect to size. This test checks that a block inside a link does not unduly disturb the render tree via inline continuations. In particular, it checks that adding <div role=presentation> between a link and its contained image does not alter the accessibility tree at all, other than with respect to size.
PASS: accessibility trees were identical other than size. PASS: accessibility trees were identical other than size.
1 1
Requesting the title of an AccessibilityImageMapLink can cause a crash when the map's area element has been removed. Requesting the title of an AccessibilityImageMapLink can cause a crash when the map's area element has been removed.
......
...@@ -25,6 +25,7 @@ Some text. ...@@ -25,6 +25,7 @@ Some text.
Some text. Some text.
Some text. Some text.
......
Test Test
This test ensures the accessibility bounds of embedded SVG objects are correct. This test ensures the accessibility bounds of embedded SVG objects are correct.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
This tests that SVG images are accessible elements and they have the same attributes as real images. This tests that SVG images are accessible elements and they have the same attributes as real images.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
CONSOLE WARNING: line 24: Invalid keyframe value for property outlineColor: invert CONSOLE WARNING: line 24: Invalid keyframe value for property outlineColor: invert
This test passes if it does not crash. This test passes if it does not crash.
Test passes if it does not crash on ASan builds. Test passes if it does not crash on ASan builds.
The video controller should not be visible below The video controller should not be visible below
This testcase should not fire an assertion related to the clip rects root. This testcase should not fire an assertion related to the clip rects root.
This testcase should not fire an assertion related to clip rects. This testcase should not fire an assertion related to clip rects.
...@@ -9,3 +9,4 @@ TEST COMPLETE ...@@ -9,3 +9,4 @@ TEST COMPLETE
PASS internals.nonFastScrollableRects(document).length is 1 PASS internals.nonFastScrollableRects(document).length is 1
PASS internals.nonFastScrollableRects(document).length is 0 PASS internals.nonFastScrollableRects(document).length is 0
PASS internals.nonFastScrollableRects(document).length is 1 PASS internals.nonFastScrollableRects(document).length is 1
Main frame scrolls on impl Main frame scrolls on impl
The iFrame scrolls on main thread, reasons: Has background-attachment:fixed The iFrame scrolls on main thread, reasons: Has background-attachment:fixed
This test should not assert in debug builds. This test should not assert in debug builds.
PASS if test does not crash or cause an ASSERT failure. PASS if test does not crash or cause an ASSERT failure.
...@@ -6,3 +6,4 @@ PASS successfullyParsed is true ...@@ -6,3 +6,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -2,6 +2,7 @@ Test ...@@ -2,6 +2,7 @@ Test
Test Test
Test Test
This test checks getBoundingClientRect() on zoomed HTML and SVG elements This test checks getBoundingClientRect() on zoomed HTML and SVG elements
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -8,3 +8,4 @@ PASS successfullyParsed is true ...@@ -8,3 +8,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -9,3 +9,4 @@ PASS successfullyParsed is true ...@@ -9,3 +9,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -14,3 +14,4 @@ PASS successfullyParsed is true ...@@ -14,3 +14,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -18,3 +18,4 @@ PASS successfullyParsed is true ...@@ -18,3 +18,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -14,3 +14,4 @@ PASS successfullyParsed is true ...@@ -14,3 +14,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
This tests that XMLSerializer emits a correct namespace declaration for the element. The first line is serialized as part of a DocumentFragment. The second line is serialized as part of the Document. This tests that XMLSerializer emits a correct namespace declaration for the element. The first line is serialized as part of a DocumentFragment. The second line is serialized as part of the Document.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -6,10 +6,14 @@ Tragically we cannot have any actual Java Applets referenced here because when D ...@@ -6,10 +6,14 @@ Tragically we cannot have any actual Java Applets referenced here because when D
Applets length is currently 0 Applets length is currently 0
Applets length is currently 0 Applets length is currently 0
Nothing here! Nothing here!
Applets length is currently 0 Applets length is currently 0
Applets length is currently 0 Applets length is currently 0
...@@ -25,3 +25,4 @@ PASS successfullyParsed is true ...@@ -25,3 +25,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -18,3 +18,4 @@ PASS successfullyParsed is true ...@@ -18,3 +18,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
Page up/down (option+page up/down on Mac) should move the move cursor and scroll the content in contenteditable elements. This sample covers cursor position move test of a) iframe element containing contenteditable body, and b) content editable div element. Page up/down (option+page up/down on Mac) should move the move cursor and scroll the content in contenteditable elements. This sample covers cursor position move test of a) iframe element containing contenteditable body, and b) content editable div element.
line 0 line 0
line 1 line 1
......
Page up/down (option+page up/down on Mac) should move the move cursor and scroll the content in contenteditable elements. This sample covers scroll position test of a) iframe element containing contenteditable body and b) content editable div element. Even though the cursor will move exactly to the same location on all platforms (covered by test option-page-up-down.html), please note that Mac will scroll the visible area by placing the cursor position in the middle. All other platforms will scroll by keeping the cursor aligned with the top edge of the visible area. Page up/down (option+page up/down on Mac) should move the move cursor and scroll the content in contenteditable elements. This sample covers scroll position test of a) iframe element containing contenteditable body and b) content editable div element. Even though the cursor will move exactly to the same location on all platforms (covered by test option-page-up-down.html), please note that Mac will scroll the visible area by placing the cursor position in the middle. All other platforms will scroll by keeping the cursor aligned with the top edge of the visible area.
line 0 line 0
line 1 line 1
......
ALERT: PASS ALERT: PASS
This is an automatic test of copying an image document to ensure that the fragment portion of the URL is properly escaped and hence preserved by the paste operation. This is an automatic test of copying an image document to ensure that the fragment portion of the URL is properly escaped and hence preserved by the paste operation.
This test verifies that starting a drag on an image inside a -webkit-user-drag: element container succeeds. To run this test manually, try dragging the image to the box below. You should see the word "PASS" appear if it succeeds. This test verifies that starting a drag on an image inside a -webkit-user-drag: element container succeeds. To run this test manually, try dragging the image to the box below. You should see the word "PASS" appear if it succeeds.
PASS PASS
...@@ -2,7 +2,7 @@ Simple test that the dragstart event contains the default data in the event. ...@@ -2,7 +2,7 @@ Simple test that the dragstart event contains the default data in the event.
Select some text in this box and drag it. Select some text in this box and drag it.
Drag the image. Drag the image.
Drag the link. Link Drag the link. Link
......
A crash reproducing test using DRT. The test passes if it doesn't crash. A crash reproducing test using DRT. The test passes if it doesn't crash.
This test copies all the elements containing event handlers and javascript urls, pastes them in an editable area and verifies that no script, handlers or javascript urls are copied. This test copies all the elements containing event handlers and javascript urls, pastes them in an editable area and verifies that no script, handlers or javascript urls are copied.
Hello Hello
CNN Hello CNN Hello
This is a form This is a form
Submit. Submit.
Hello  Hello 
......
...@@ -2,3 +2,4 @@ This test copies the content of an iframe and pastes it in an editable area and ...@@ -2,3 +2,4 @@ This test copies the content of an iframe and pastes it in an editable area and
Hello Hello
world world
<div id="div1">Hello</div><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="5cm" height="3cm" viewBox="0 0 5 3" version="1.1"><a><ellipse cx="2.5" cy="1.5" rx="2" ry="1" fill="red"></ellipse></a></svg><div id="div2">world</div> <div id="div1">Hello</div><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="5cm" height="3cm" viewBox="0 0 5 3" version="1.1"><a><ellipse cx="2.5" cy="1.5" rx="2" ry="1" fill="red"></ellipse></a></svg><div id="div2">world</div>
This test passes if middle mouse clicking in the rectangle below does not crash. This test passes if middle mouse clicking in the rectangle below does not crash.
To run this test manually, click to the left and verify that the caret is placed to the left of the image, then click to the right of the image and verify that the caret is on the right. To run this test manually, click to the left and verify that the caret is placed to the left of the image, then click to the right of the image and verify that the caret is on the right.
helloworld hello
world
Anchor ([object HTMLDivElement], 1) is correct. Anchor ([object HTMLDivElement], 1) is correct.
Anchor ([object HTMLDivElement], 2) is correct. Anchor ([object HTMLDivElement], 2) is correct.
...@@ -4,7 +4,7 @@ Test 1: select this line and drag me. ...@@ -4,7 +4,7 @@ Test 1: select this line and drag me.
Test 2: Test 2:
Test 3: select this line and drag me from the image. Test 3: select this line and drag me from the image.
Test 1: FAIL: target element was [object HTMLDivElement] Test 1: FAIL: target element was [object HTMLDivElement]
Test 2: PASS Test 2: PASS
Test 3: PASS Test 3: PASS
...@@ -7,3 +7,4 @@ PASS successfullyParsed is true ...@@ -7,3 +7,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
This is a testharness.js-based test. This is a testharness.js-based test.
Found 220 tests; 217 PASS, 3 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 229 tests; 226 PASS, 3 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Simplest possible test ("<div>abc") PASS Simplest possible test ("<div>abc")
PASS Leading whitespace removed ("<div> abc") PASS Leading whitespace removed ("<div> abc")
PASS Trailing whitespace removed ("<div>abc ") PASS Trailing whitespace removed ("<div>abc ")
...@@ -42,6 +42,15 @@ PASS Whitespace around inline-block should not be collapsed ("<div>abc <span sty ...@@ -42,6 +42,15 @@ PASS Whitespace around inline-block should not be collapsed ("<div>abc <span sty
PASS Trailing space at end of inline-block should be collapsed ("<div>abc <span style='display:inline-block'> def </span> ghi") PASS Trailing space at end of inline-block should be collapsed ("<div>abc <span style='display:inline-block'> def </span> ghi")
PASS Whitespace between <input> and block should be collapsed ("<div><input> <div>abc</div>") PASS Whitespace between <input> and block should be collapsed ("<div><input> <div>abc</div>")
PASS Whitespace between inline-block and block should be collapsed ("<div><span style='inline-block'></span> <div>abc</div>") PASS Whitespace between inline-block and block should be collapsed ("<div><span style='inline-block'></span> <div>abc</div>")
PASS Whitespace around <img> should not be collapsed ("<div>abc <img> def")
PASS Whitespace around <img> should not be collapsed ("<div>abc <img width=1 height=1> def")
PASS Leading whitesapce should not be collapsed ("<div><img> abc")
PASS Trailing whitesapce should not be collapsed ("<div>abc <img>")
PASS Whitespace around empty span should be collapsed ("<div>abc <b></b> def")
PASS Whitespace around empty spans should be collapsed ("<div>abc <b><i></i></b> def")
PASS <canvas> should not collapse following space ("<div><canvas></canvas> abc")
PASS Replaced element <img> with display:block should be treated as block-level ("<div>abc <img style='display:block'> def")
PASS Replaced element <canvas> with display:block should be treated as block-level ("<div>abc <canvas style='display:block'></canvas> def")
PASS Soft line breaks ignored ("<div style='width:0'>abc def") PASS Soft line breaks ignored ("<div style='width:0'>abc def")
PASS Whitespace text node preserved ("<div style='width:0'><span>abc</span> <span>def</span>") PASS Whitespace text node preserved ("<div style='width:0'><span>abc</span> <span>def</span>")
FAIL ::first-line styles applied ("<div class='first-line-uppercase' style='width:0'>abc def") assert_equals: expected "ABC def" but got "abc def" FAIL ::first-line styles applied ("<div class='first-line-uppercase' style='width:0'>abc def") assert_equals: expected "ABC def" but got "abc def"
......
...@@ -58,6 +58,15 @@ testText("<div>abc <span style='display:inline-block'></span> def", "abc def", ...@@ -58,6 +58,15 @@ testText("<div>abc <span style='display:inline-block'></span> def", "abc def",
testText("<div>abc <span style='display:inline-block'> def </span> ghi", "abc def ghi", "Trailing space at end of inline-block should be collapsed"); testText("<div>abc <span style='display:inline-block'> def </span> ghi", "abc def ghi", "Trailing space at end of inline-block should be collapsed");
testText("<div><input> <div>abc</div>", "abc", "Whitespace between <input> and block should be collapsed"); testText("<div><input> <div>abc</div>", "abc", "Whitespace between <input> and block should be collapsed");
testText("<div><span style='inline-block'></span> <div>abc</div>", "abc", "Whitespace between inline-block and block should be collapsed"); testText("<div><span style='inline-block'></span> <div>abc</div>", "abc", "Whitespace between inline-block and block should be collapsed");
testText("<div>abc <img> def", "abc def", "Whitespace around <img> should not be collapsed");
testText("<div>abc <img width=1 height=1> def", "abc def", "Whitespace around <img> should not be collapsed");
testText("<div><img> abc", " abc", "Leading whitesapce should not be collapsed");
testText("<div>abc <img>", "abc ", "Trailing whitesapce should not be collapsed");
testText("<div>abc <b></b> def", "abc def", "Whitespace around empty span should be collapsed");
testText("<div>abc <b><i></i></b> def", "abc def", "Whitespace around empty spans should be collapsed");
testText("<div><canvas></canvas> abc", " abc", "<canvas> should not collapse following space");
testText("<div>abc <img style='display:block'> def", "abc\ndef", "Replaced element <img> with display:block should be treated as block-level");
testText("<div>abc <canvas style='display:block'></canvas> def", "abc\ndef", "Replaced element <canvas> with display:block should be treated as block-level");
/**** Soft line breaks ****/ /**** Soft line breaks ****/
......
...@@ -11,3 +11,4 @@ PASS successfullyParsed is true ...@@ -11,3 +11,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -12,3 +12,4 @@ PASS successfullyParsed is true ...@@ -12,3 +12,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
crbug.com/459533: Don't crash when changing an element to one that interacts with other floats to one that can't. crbug.com/459533: Don't crash when changing an element to one that interacts with other floats to one that can't.
CONSOLE ERROR: line 11: Uncaught TypeError: oElement.insertAdjacentText is not a function CONSOLE ERROR: line 11: Uncaught TypeError: oElement.insertAdjacentText is not a function
crbug.com/658584: Clear floats when a ruby run's children are made inline. This test passes if it does not crash. crbug.com/658584: Clear floats when a ruby run's children are made inline. This test passes if it does not crash.
AAA AAA
crbug.com/468521: When a positioned container changes height and has percent height descedants ensure its children get a layout. crbug.com/468521: When a positioned container changes height and has percent height descedants ensure its children get a layout.
PASS PASS
This sometimes causes a crash - PASS This sometimes causes a crash - PASS
This test passes if it does not crash. This test passes if it does not crash.
...@@ -104,3 +104,4 @@ PASS successfullyParsed is true ...@@ -104,3 +104,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
The Actual Canvas The Actual Canvas
Given MIMEType: image/png Given MIMEType: image/png
Used MIMEType: image/png Used MIMEType: image/png
......
...@@ -7,3 +7,4 @@ PASS createImageData(ImageData) creates blank image correctly ...@@ -7,3 +7,4 @@ PASS createImageData(ImageData) creates blank image correctly
PASS getImageData(sx, sy, sw, sh) is successful. PASS getImageData(sx, sy, sw, sh) is successful.
PASS putImageData(ImageData, dx, dy) is successful. PASS putImageData(ImageData, dx, dy) is successful.
PASS putImageData(ImageData, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) is successful. PASS putImageData(ImageData, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) is successful.
...@@ -23,3 +23,4 @@ PASS successfullyParsed is true ...@@ -23,3 +23,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -38,3 +38,4 @@ PASS successfullyParsed is true ...@@ -38,3 +38,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -22,3 +22,4 @@ PASS successfullyParsed is true ...@@ -22,3 +22,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -10,3 +10,4 @@ PASS successfullyParsed is true ...@@ -10,3 +10,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
...@@ -20,3 +20,4 @@ PASS successfullyParsed is true ...@@ -20,3 +20,4 @@ PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
GIF image test: PASS GIF image test: PASS
APNG image test: PASS APNG image test: PASS
......
The DOM part of this test succeeded. The canvas element had at least one child, indicating that we are hiding text by not rendering it, but we are creating DOM elements as expected. The DOM part of this test succeeded. The canvas element had at least one child, indicating that we are hiding text by not rendering it, but we are creating DOM elements as expected.
There should be no text below this, because the text is inside a canvas element and JavaScript is enabled. There should be no text below this, because the text is inside a canvas element and JavaScript is enabled.
On success, two same text string with equal width will be rendered. On success, two same text string with equal width will be rendered.
TEST PASSED TEST PASSED
On success, the red text "Hello World" should be tightly contained inside the two thin red lines. On success, the red text "Hello World" should be tightly contained inside the two thin red lines.
The letters in the right image should be crisp and non-blurry like the letters in the left image. The letters in the right image should be crisp and non-blurry like the letters in the left image.
Each square canvas should contain a colored gradient bordered by a narrow white margin and a black line. The column on the left contains linear gradients, the column on the right radial gradients. Each square canvas should contain a colored gradient bordered by a narrow white margin and a black line. The column on the left contains linear gradients, the column on the right radial gradients.
Green to white Green to white
Green to white to red Green to white to red
Larger green to white to larger red Larger green to white to larger red
Solid red Solid red
Solid red Solid red
Solid red Solid red
Blue to white in the top (inner) half, red to yellow in the bottom (outer) half Blue to white in the top (inner) half, red to yellow in the bottom (outer) half
Blue to white, red to yellow (same as previous) Blue to white, red to yellow (same as previous)
Blue to white, red to yellow (same as previous) Blue to white, red to yellow (same as previous)
This text was set by a script inside a canvas element. Such scripts run even though the content is not displayed. This text was set by a script inside a canvas element. Such scripts run even though the content is not displayed.
...@@ -3,3 +3,5 @@ BUG ID: Bugzilla bug 43341 Setting canvas width after canvas already rendered re ...@@ -3,3 +3,5 @@ BUG ID: Bugzilla bug 43341 Setting canvas width after canvas already rendered re
TEST PASS: The canvas should go blank due to setting on the canvas width. TEST PASS: The canvas should go blank due to setting on the canvas width.
Actual output: (blank canvas) Actual output: (blank canvas)
There should be no red pixels below. There should be no red pixels below.
The test passes if both boxes below have the same color. The test passes if both boxes below have the same color.
...@@ -32,4 +32,4 @@ PASS imgdata[2] is 0 ...@@ -32,4 +32,4 @@ PASS imgdata[2] is 0
PASS imgdata[0] is 255 PASS imgdata[0] is 255
PASS imgdata[1] is 0 PASS imgdata[1] is 0
PASS imgdata[2] is 0 PASS imgdata[2] is 0
Everything is same to draw-webgl-to-canvas-2d.html except for calling redundant toDataURL(). Canvas spec allows to call toDataURL() without a context. Some bad things can happen if we call toDataURL() without a context and then create a context and then call toDataURL() again. Everything is same to draw-webgl-to-canvas-2d.html except for calling redundant toDataURL(). Canvas spec allows to call toDataURL() without a context. Some bad things can happen if we call toDataURL() without a context and then create a context and then call toDataURL() again.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment