WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-235665-20220126135543.patch (text/plain), 2.43 KB, created by
Jon Lee
on 2022-01-26 13:55:44 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jon Lee
Created:
2022-01-26 13:55:44 PST
Size:
2.43 KB
patch
obsolete
>Subversion Revision: 288585 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 786eed7b3ef7fb46224cc4387d45f7bb188637e4..ebee494fcc4408a5822dd4c803da0bb5d64133b9 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,12 @@ >+2022-01-26 Jon Lee <jonlee@apple.com> >+ >+ Add copy-to-clipboard button for fuzzy matching meta tag >+ https://bugs.webkit.org/show_bug.cgi?id=235665 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/harness/image-diff-template.html: Add button, copy text and insert into meta tag string prior to copying to clipboard. >+ > 2022-01-25 Myles C. Maxfield <mmaxfield@apple.com> > > Add another test for locale-specific shaping >diff --git a/LayoutTests/fast/harness/image-diff-template.html b/LayoutTests/fast/harness/image-diff-template.html >index 2ec6cd9024c260b2b3b6411433564e5346f06bb3..44147b91a20296b03f93aaee6536b76414ce28ad 100644 >--- a/LayoutTests/fast/harness/image-diff-template.html >+++ b/LayoutTests/fast/harness/image-diff-template.html >@@ -65,7 +65,8 @@ > </tr> > <tr class="pixel-diff __HIDE_FUZZY_CLASS__"> > <td>Fuzzy match:</td> >- <td>__FUZZY_DATA__</td> >+ <td><span>Click to toggle between ranges and values</span><br/><input type="button" id="fuzzy-match-data" onclick="toggleFuzzyMatchString()"</td> >+ <td id="fuzzy-match-form" colspan=2><input type="button" value="Copy to clipboard as <meta> tag" onclick="copyToClipboardFuzzyMetaTag()" /></td> > </tr> > <tr> > <td></td> >@@ -199,6 +200,30 @@ function cycleImages() > > showImage(data[order[currIndex]]); > } >+ >+function copyToClipboardFuzzyMetaTag() { >+ var metaTag = `<meta name="fuzzy" content="${document.getElementById("fuzzy-match-data").value}">`; >+ navigator.clipboard.writeText(metaTag); >+ >+ document.getElementById("fuzzy-match-form").append("Copied! "); >+} >+ >+__FUZZY_DATA__; >+bitMaskForWhetherToUseRanges = -1; >+function toggleFuzzyMatchString() { >+ bitMaskForWhetherToUseRanges = (bitMaskForWhetherToUseRanges + 1) % 4; >+ var fuzzyMatchString = "maxDifference="; >+ if (bitMaskForWhetherToUseRanges & 0x2) >+ fuzzyMatchString += "0-"; >+ fuzzyMatchString += `${maxDifference};totalPixels=`; >+ if (bitMaskForWhetherToUseRanges & 0x1) >+ fuzzyMatchString += "0-"; >+ fuzzyMatchString += totalPixels; >+ >+ document.getElementById("fuzzy-match-data").value = fuzzyMatchString; >+} >+toggleFuzzyMatchString(); >+ > </script> > </body> > </html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 235665
:
450058
|
450066
|
450082
|
450098
|
450099
|
450105