Skip to content

Temporary implementation of Canvas.MeasureText - #24261

Merged
bors-servo merged 1 commit into
servo:masterfrom
paulrouget:fakeMeasureTExt
Sep 25, 2019
Merged

bors-servo merged 1 commit into
servo:masterfrom
paulrouget:fakeMeasureTExt

Conversation

@paulrouget

@paulrouget paulrouget commented Sep 21, 2019 •

Copy link
Copy Markdown
Contributor

@jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos.


This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/canvasrenderingcontext2d.rs, components/script/dom/webidls/TextMetrics.webidl, components/script/dom/mod.rs, components/script/dom/offscreencanvasrenderingcontext2d.rs, components/script/dom/webidls/CanvasRenderingContext2D.webidl and 1 more
  • @KiChjang: components/script/dom/canvasrenderingcontext2d.rs, components/script/dom/webidls/TextMetrics.webidl, components/script/dom/mod.rs, components/script/dom/offscreencanvasrenderingcontext2d.rs, components/script/dom/webidls/CanvasRenderingContext2D.webidl and 1 more

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 21, 2019
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@paulrouget

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit c06332e with merge 92ff08b...

bors-servo pushed a commit that referenced this pull request Sep 21, 2019
[WIP] Temporary implementation of Canvas.MeasureText

@jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24261)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-css

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Sep 21, 2019
@paulrouget

Copy link
Copy Markdown
Contributor Author

The failure is very explicit :)

Gonna disable TextMetrics, not just measureText if the pref is off.

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Sep 24, 2019
@paulrouget

Copy link
Copy Markdown
Contributor Author

@jdm would you be ok with something like this?

@paulrouget paulrouget changed the title [WIP] Temporary implementation of Canvas.MeasureText Temporary implementation of Canvas.MeasureText Sep 24, 2019
@jdm

jdm commented Sep 24, 2019

Copy link
Copy Markdown
Member

Yes, bit let's hook it up to the existing pref that controls the fake fillText implementation.

@paulrouget

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit ede24e3 with merge 4a25343...

bors-servo pushed a commit that referenced this pull request Sep 24, 2019
Temporary implementation of Canvas.MeasureText

@jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24261)
<!-- Reviewable:end -->
@jdm

jdm commented Sep 24, 2019

Copy link
Copy Markdown
Member

The PR taskcluster check reports:

�[36m 0:05.21�(B�[m �[33mWARNING�(B�[m Manifest /repo/tests/wpt/mozilla/meta/MANIFEST.json contains correct tests but file hashes changed.
�[36m 0:05.21�(B�[m �[31mERROR�(B�[m Manifest /repo/tests/wpt/mozilla/meta/MANIFEST.json is outdated, use |./mach update-manifest| to fix.

@paulrouget

Copy link
Copy Markdown
Contributor Author

@jdm r?

Comment thread tests/wpt/mozilla/meta/MANIFEST.json Outdated
},
"stub": {
"css/blockify_inline_element.html": []
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is ./mach update-manifest updating that test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fixing previously-incorrect updates.

@jdm

jdm commented Sep 24, 2019

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit dcf9c40 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 24, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit dcf9c40 with merge e8e5112...

bors-servo pushed a commit that referenced this pull request Sep 25, 2019
Temporary implementation of Canvas.MeasureText

@jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24261)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 25, 2019
@jdm

jdm commented Sep 25, 2019

Copy link
Copy Markdown
Member
Details
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface object", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194160, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface object length", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194161, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface object name", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194162, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface prototype object", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194163, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface prototype object's \"constructor\" property", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194164, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface prototype object's @@unscopables property", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194165, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute width", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194166, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxLeft", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194167, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxRight", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194168, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute fontBoundingBoxAscent", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194169, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute fontBoundingBoxDescent", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194170, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxAscent", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194171, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxDescent", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194172, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute emHeightAscent", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194173, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute emHeightDescent", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194174, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute hangingBaseline", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194175, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute alphabeticBaseline", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194176, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute ideographicBaseline", 
    "test": "/html/dom/idlharness.worker.html", 
    "line": 194177, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "CanvasRenderingContext2D interface: operation measureText(DOMString)", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272472, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "CanvasRenderingContext2D interface: document.createElement(\"canvas\").getContext(\"2d\") must inherit property \"measureText(DOMString)\" with the proper type", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272576, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "CanvasRenderingContext2D interface: calling measureText(DOMString) on document.createElement(\"canvas\").getContext(\"2d\") with too few arguments must throw TypeError", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272577, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface object", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272637, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface object length", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272638, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface object name", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272639, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface prototype object", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272640, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface prototype object's \"constructor\" property", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272641, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: existence and properties of interface prototype object's @@unscopables property", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272642, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute width", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272643, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxLeft", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272644, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxRight", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272645, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute fontBoundingBoxAscent", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272646, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute fontBoundingBoxDescent", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272647, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxAscent", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272648, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute actualBoundingBoxDescent", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272649, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute emHeightAscent", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272650, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute emHeightDescent", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272651, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute hangingBaseline", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272652, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute alphabeticBaseline", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272653, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "TextMetrics interface: attribute ideographicBaseline", 
    "test": "/html/dom/idlharness.https.html?exclude=(Document|Window|HTML.*)", 
    "line": 272654, 
    "action": "test_result", 
    "expected": "FAIL"
}
{
    "status": "PASS", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": "The TextMetrics interface object should be exposed.", 
    "test": "/workers/semantics/interface-objects/001.worker.html", 
    "line": 331266, 
    "action": "test_result", 
    "expected": "FAIL"
}

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 25, 2019
@paulrouget

Copy link
Copy Markdown
Contributor Author

@bors-servo try=wpt

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 3695fb1 with merge cad8bf4...

bors-servo pushed a commit that referenced this pull request Sep 25, 2019
Temporary implementation of Canvas.MeasureText

@jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24261)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
State: approved= try=True

@paulrouget

Copy link
Copy Markdown
Contributor Author

@bors-servo r=jdm

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 3695fb1 has been approved by jdm

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 25, 2019
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 3695fb1 with merge cf725fc...

bors-servo pushed a commit that referenced this pull request Sep 25, 2019
Temporary implementation of Canvas.MeasureText

@jdm: that will help with the babylonjs demos. Another approach is to implement that in JS and add it to the demos.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24261)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: jdm
Pushing cf725fc to master...

@bors-servo
bors-servo merged commit 3695fb1 into servo:master Sep 25, 2019
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 25, 2019
@bors-servo bors-servo mentioned this pull request Sep 25, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants