Bug 238102 - [cssom] border-image not serialized at specified-value time
Summary: [cssom] border-image not serialized at specified-value time
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
URL:
Keywords: InRadar
: 183993 (view as bug list)
Depends on:
Blocks: 237487
  Show dependency treegraph
 
Reported: 2022-03-18 15:59 PDT by Oriol Brufau
Modified: 2022-08-16 18:31 PDT (History)
12 users (show)

See Also:


Attachments
Patch (18.48 KB, patch)
2022-03-18 16:21 PDT, Oriol Brufau
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (18.44 KB, patch)
2022-03-18 16:38 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff
Patch (18.42 KB, patch)
2022-03-19 18:39 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oriol Brufau 2022-03-18 15:59:42 PDT
Run this:

    document.body.style.borderImage = 'url("") 10 / 20 / 30 round';
    
    document.body.style.borderImage;
    // Expected: 'url("") 10 / 20 / 30 round'
    // Actual: ''
    
    document.body.style.cssText;
    // Expected: 'border-image: url("") 10 / 20 / 30 round'
    // Actual: 'border-image-source: url(""); border-image-slice: 10; border-image-width: 20; border-image-outset: 30; border-image-repeat: round;'
Comment 1 Oriol Brufau 2022-03-18 16:21:39 PDT
Created attachment 455147 [details]
Patch
Comment 2 EWS Watchlist 2022-03-18 16:23:33 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 Oriol Brufau 2022-03-18 16:38:24 PDT
Created attachment 455150 [details]
Patch
Comment 4 Oriol Brufau 2022-03-19 15:11:27 PDT
PTAL
Comment 5 Darin Adler 2022-03-19 17:58:06 PDT
Comment on attachment 455150 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455150&action=review

> Source/WebCore/css/StyleProperties.cpp:952
> +            result.append(" / ");

It’s more efficient to append multiple strings in a single append call, less string buffer growing computation. So the separator could go into a local variable, and then:

    result.append(separator, valueText);

Just make sure to set separator to “” when one is not needed. In fact if we use a variable outside the loop, we can also avoid the result.isEmpty check.

    auto separator = “”;
    for … {
        …
        result.append(separator, valueText);
        separator = “ “;
    }
Comment 6 Oriol Brufau 2022-03-19 18:39:53 PDT
Created attachment 455184 [details]
Patch
Comment 7 EWS 2022-03-19 20:19:17 PDT
Committed r291537 (248643@main): <https://commits.webkit.org/248643@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455184 [details].
Comment 8 Radar WebKit Bug Importer 2022-03-19 20:20:21 PDT
<rdar://problem/90531782>
Comment 9 Alexey Proskuryakov 2022-08-16 18:31:31 PDT
*** Bug 183993 has been marked as a duplicate of this bug. ***