Title: [253762] trunk/Source/WebCore
Revision
253762
Author
[email protected]
Date
2019-12-19 10:04:03 -0800 (Thu, 19 Dec 2019)

Log Message

pal/FileSizeFormatter.h declares fileSizeDescription in the top-level namespace
https://bugs.webkit.org/show_bug.cgi?id=205453

Reviewed by Tim Horton.

Source/WebCore:

Change fileSizeDescription to PAL::fileSizeDescription. No change in behavior.

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFile):
(WebCore::HTMLAttachmentElement::updateAttributes):

Source/WebCore/PAL:

Move fileSizeDescription to the PAL namespace.

* pal/FileSizeFormatter.cpp:
(fileSizeDescription): Deleted.
* pal/FileSizeFormatter.h:
* pal/cocoa/FileSizeFormatterCocoa.mm:
(fileSizeDescription): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253761 => 253762)


--- trunk/Source/WebCore/ChangeLog	2019-12-19 17:59:25 UTC (rev 253761)
+++ trunk/Source/WebCore/ChangeLog	2019-12-19 18:04:03 UTC (rev 253762)
@@ -1,3 +1,16 @@
+2019-12-19  Wenson Hsieh  <[email protected]>
+
+        pal/FileSizeFormatter.h declares fileSizeDescription in the top-level namespace
+        https://bugs.webkit.org/show_bug.cgi?id=205453
+
+        Reviewed by Tim Horton.
+
+        Change fileSizeDescription to PAL::fileSizeDescription. No change in behavior.
+
+        * html/HTMLAttachmentElement.cpp:
+        (WebCore::HTMLAttachmentElement::setFile):
+        (WebCore::HTMLAttachmentElement::updateAttributes):
+
 2019-12-19  Chris Dumez  <[email protected]>
 
         imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-installed.https.html is flaky

Modified: trunk/Source/WebCore/PAL/ChangeLog (253761 => 253762)


--- trunk/Source/WebCore/PAL/ChangeLog	2019-12-19 17:59:25 UTC (rev 253761)
+++ trunk/Source/WebCore/PAL/ChangeLog	2019-12-19 18:04:03 UTC (rev 253762)
@@ -1,3 +1,18 @@
+2019-12-19  Wenson Hsieh  <[email protected]>
+
+        pal/FileSizeFormatter.h declares fileSizeDescription in the top-level namespace
+        https://bugs.webkit.org/show_bug.cgi?id=205453
+
+        Reviewed by Tim Horton.
+
+        Move fileSizeDescription to the PAL namespace.
+
+        * pal/FileSizeFormatter.cpp:
+        (fileSizeDescription): Deleted.
+        * pal/FileSizeFormatter.h:
+        * pal/cocoa/FileSizeFormatterCocoa.mm:
+        (fileSizeDescription): Deleted.
+
 2019-12-18  Ben Nham  <[email protected]>
 
         Add network loading signposts

Modified: trunk/Source/WebCore/PAL/pal/FileSizeFormatter.cpp (253761 => 253762)


--- trunk/Source/WebCore/PAL/pal/FileSizeFormatter.cpp	2019-12-19 17:59:25 UTC (rev 253761)
+++ trunk/Source/WebCore/PAL/pal/FileSizeFormatter.cpp	2019-12-19 18:04:03 UTC (rev 253762)
@@ -28,6 +28,8 @@
 
 #include <wtf/text/StringConcatenateNumbers.h>
 
+namespace PAL {
+
 #if !PLATFORM(COCOA)
 
 String fileSizeDescription(uint64_t size)
@@ -44,3 +46,5 @@
 }
 
 #endif
+
+} // namespace PAL

Modified: trunk/Source/WebCore/PAL/pal/FileSizeFormatter.h (253761 => 253762)


--- trunk/Source/WebCore/PAL/pal/FileSizeFormatter.h	2019-12-19 17:59:25 UTC (rev 253761)
+++ trunk/Source/WebCore/PAL/pal/FileSizeFormatter.h	2019-12-19 18:04:03 UTC (rev 253762)
@@ -27,4 +27,8 @@
 
 #include <wtf/text/WTFString.h>
 
+namespace PAL {
+
 PAL_EXPORT String fileSizeDescription(uint64_t);
+
+} // namespace PAL

Modified: trunk/Source/WebCore/PAL/pal/cocoa/FileSizeFormatterCocoa.mm (253761 => 253762)


--- trunk/Source/WebCore/PAL/pal/cocoa/FileSizeFormatterCocoa.mm	2019-12-19 17:59:25 UTC (rev 253761)
+++ trunk/Source/WebCore/PAL/pal/cocoa/FileSizeFormatterCocoa.mm	2019-12-19 18:04:03 UTC (rev 253762)
@@ -28,7 +28,11 @@
 
 #import "NSFileSizeFormatterSPI.h"
 
+namespace PAL {
+
 String fileSizeDescription(uint64_t size)
 {
     return NSLocalizedFileSizeDescription(size, 0, 0);
 }
+
+} // namespace PAL

Modified: trunk/Source/WebCore/html/HTMLAttachmentElement.cpp (253761 => 253762)


--- trunk/Source/WebCore/html/HTMLAttachmentElement.cpp	2019-12-19 17:59:25 UTC (rev 253761)
+++ trunk/Source/WebCore/html/HTMLAttachmentElement.cpp	2019-12-19 18:04:03 UTC (rev 253762)
@@ -116,7 +116,7 @@
     if (updateAttributes == UpdateDisplayAttributes::Yes) {
         if (m_file) {
             setAttributeWithoutSynchronization(HTMLNames::titleAttr, m_file->name());
-            setAttributeWithoutSynchronization(HTMLNames::subtitleAttr, fileSizeDescription(m_file->size()));
+            setAttributeWithoutSynchronization(HTMLNames::subtitleAttr, PAL::fileSizeDescription(m_file->size()));
             setAttributeWithoutSynchronization(HTMLNames::typeAttr, m_file->type());
         } else {
             removeAttribute(HTMLNames::titleAttr);
@@ -218,7 +218,7 @@
         removeAttribute(HTMLNames::typeAttr);
 
     if (newFileSize)
-        setAttributeWithoutSynchronization(HTMLNames::subtitleAttr, fileSizeDescription(*newFileSize));
+        setAttributeWithoutSynchronization(HTMLNames::subtitleAttr, PAL::fileSizeDescription(*newFileSize));
     else
         removeAttribute(HTMLNames::subtitleAttr);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to