Skip to content
Permalink
Browse files
2011-04-20 MORITA Hajime <morrita@google.com>
        Reviewed by Dimitri Glazkov.

        Content of <summary> should be forwarded through the shadow DOM
        https://bugs.webkit.org/show_bug.cgi?id=58914

        - Added test cases for dynamic DOM change.
        - Updated expectations details-open2.html because generated RenderTree slightly changed.

        * fast/html/details-add-summary-child-1.html: Added.
        * fast/html/details-add-summary-child-2.html: Added.
        * fast/html/details-remove-summary-child-1.html: Added.
        * fast/html/details-remove-summary-child-2.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/mac/fast/html/details-add-summary-child-1-expected.checksum: Added.
        * platform/mac/fast/html/details-add-summary-child-1-expected.png: Added.
        * platform/mac/fast/html/details-add-summary-child-1-expected.txt: Added.
        * platform/mac/fast/html/details-add-summary-child-2-expected.checksum: Added.
        * platform/mac/fast/html/details-add-summary-child-2-expected.png: Added.
        * platform/mac/fast/html/details-add-summary-child-2-expected.txt: Added.
        * platform/mac/fast/html/details-open2-expected.txt:
        * platform/mac/fast/html/details-remove-summary-child-1-expected.checksum: Added.
        * platform/mac/fast/html/details-remove-summary-child-1-expected.png: Added.
        * platform/mac/fast/html/details-remove-summary-child-1-expected.txt: Added.
        * platform/mac/fast/html/details-remove-summary-child-2-expected.checksum: Added.
        * platform/mac/fast/html/details-remove-summary-child-2-expected.png: Added.
        * platform/mac/fast/html/details-remove-summary-child-2-expected.txt: Added.
2011-04-20  Matthew Delaney  <mdelaney@apple.com>

        Reviewed by Maciej Stachowiak.

        arc() should add a circle to the path when start and end angles are far enough apart
        https://bugs.webkit.org/show_bug.cgi?id=58934

        Test: fast/canvas/canvas_arc_largeangles.html

        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::arc):


Canonical link: https://commits.webkit.org/74251@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Matt Delaney committed Apr 21, 2011
1 parent 335b32b commit 7eab7889afe1165648bc6ffbc3af001c0378fba7
@@ -27,6 +27,16 @@
* platform/mac/fast/html/details-remove-summary-child-2-expected.png: Added.
* platform/mac/fast/html/details-remove-summary-child-2-expected.txt: Added.

2011-04-20 Matthew Delaney <mdelaney@apple.com>

Reviewed by Maciej Stachowiak.

arc() should add a circle to the path when start and end angles are far enough apart
https://bugs.webkit.org/show_bug.cgi?id=58934

* fast/canvas/canvas_arc_largeangles-expected.txt: Added.
* fast/canvas/canvas_arc_largeangles.html: Added.

2011-04-20 Matthew Delaney <mdelaney@apple.com>

Reviewed by Adam Roben.
@@ -0,0 +1 @@
PASSED
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<body>
<a id="result"></a>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();

canvas = document.createElement("canvas");
document.body.appendChild(canvas);
canvas.width = 100;
canvas.height = 100;
ctx = canvas.getContext("2d");
ctx.moveTo(25,25);
ctx.arc(25, 25, 25, Math.PI, 500*Math.PI, false);
ctx.closePath();

ctx.moveTo(75, 75);
ctx.arc(75, 75, 25, 500*Math.PI, Math.PI, true);
ctx.fillStyle = '#0f0';
ctx.fill();

var result = document.getElementById("result");
var passed = true;

checkPixel(25, 25, 0, 255, 0, 255);
checkPixel(75, 75, 0, 255, 0, 255);
if (passed) result.innerHTML = "PASSED";

function checkPixel(x, y, r, g, b, a) {
var data = ctx.getImageData(x,y,1,1).data;
var red = data[0];
var green = data[1];
var blue = data[2];
var alpha = data[3];

if (red != r) {
result.innerHTML += "Red should be "+r+", but was "+red+". ";
passed = false;
}
if (green != g) {
result.innerHTML += "green should be "+g+", but was "+green+". ";
passed = false;
}
if (blue != b) {
result.innerHTML += "blue should be "+b+", but was "+blue+". ";
passed = false;
}
if (alpha != a) {
result.innerHTML += "alpha should be "+a+", but was "+alpha+". ";
passed = false;
}
}

</script>
</body>
</html>

@@ -1,3 +1,15 @@
2011-04-20 Matthew Delaney <mdelaney@apple.com>

Reviewed by Maciej Stachowiak.

arc() should add a circle to the path when start and end angles are far enough apart
https://bugs.webkit.org/show_bug.cgi?id=58934

Test: fast/canvas/canvas_arc_largeangles.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::arc):

2011-04-20 MORITA Hajime <morrita@google.com>

Reviewed by Dimitri Glazkov.
@@ -851,6 +851,17 @@ void CanvasRenderingContext2D::arc(float x, float y, float r, float sa, float ea

if (!state().m_invertibleCTM)
return;

// If 'sa' and 'ea' differ by more than 2Pi, just add a circle starting/ending at 'sa'
if (anticlockwise && sa - ea >= 2 * piFloat) {
m_path.addArc(FloatPoint(x, y), r, sa, sa - 2 * piFloat, anticlockwise);
return;
}
if (!anticlockwise && ea - sa >= 2 * piFloat) {
m_path.addArc(FloatPoint(x, y), r, sa, sa + 2 * piFloat, anticlockwise);
return;
}

m_path.addArc(FloatPoint(x, y), r, sa, ea, anticlockwise);
}

0 comments on commit 7eab788

Please sign in to comment.