mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-18 23:12:02 +00:00
LibWeb+LibGfx: Apply editorial punctuation/whitespace/markup fixes
Corresponds tod426109ea1
andfd08f81d06
This commit is contained in:
parent
a35d14eab3
commit
423cdd447d
Notes:
github-actions[bot]
2025-06-24 15:13:34 +00:00
Author: https://github.com/AtkinsSJ
Commit: 423cdd447d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5194
Reviewed-by: https://github.com/shannonbooth ✅
35 changed files with 108 additions and 103 deletions
|
@ -331,7 +331,7 @@ String HTMLCanvasElement::to_data_url(StringView type, JS::Value quality)
|
|||
|
||||
// FIXME: 1. If this canvas element's bitmap's origin-clean flag is set to false, then throw a "SecurityError" DOMException.
|
||||
|
||||
// 2. If this canvas element's bitmap has no pixels (i.e. either its horizontal dimension or its vertical dimension is zero)
|
||||
// 2. If this canvas element's bitmap has no pixels (i.e. either its horizontal dimension or its vertical dimension is zero),
|
||||
// then return the string "data:,". (This is the shortest data: URL; it represents the empty string in a text/plain resource.)
|
||||
if (!surface)
|
||||
return "data:,"_string;
|
||||
|
@ -342,7 +342,7 @@ String HTMLCanvasElement::to_data_url(StringView type, JS::Value quality)
|
|||
surface->read_into_bitmap(*bitmap);
|
||||
auto file = serialize_bitmap(bitmap, type, move(quality));
|
||||
|
||||
// 4. If file is null then return "data:,".
|
||||
// 4. If file is null, then return "data:,".
|
||||
if (file.is_error()) {
|
||||
dbgln("HTMLCanvasElement: Failed to encode canvas bitmap to {}: {}", type, file.error());
|
||||
return "data:,"_string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue