Title: [154001] trunk/Tools
Revision
154001
Author
[email protected]
Date
2013-08-13 07:44:37 -0700 (Tue, 13 Aug 2013)

Log Message

[EFL][DRT] Simplify call to reverseFind()
https://bugs.webkit.org/show_bug.cgi?id=119746

Reviewed by Christophe Dumez.

Follow-up to r153977.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(pathSuitableForTestResult): Instead of defining a static variable
that's only used in a single place, pass '/' to reverseFind() directly.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (154000 => 154001)


--- trunk/Tools/ChangeLog	2013-08-13 13:14:39 UTC (rev 154000)
+++ trunk/Tools/ChangeLog	2013-08-13 14:44:37 UTC (rev 154001)
@@ -1,3 +1,16 @@
+2013-08-13  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL][DRT] Simplify call to reverseFind()
+        https://bugs.webkit.org/show_bug.cgi?id=119746
+
+        Reviewed by Christophe Dumez.
+
+        Follow-up to r153977.
+
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        (pathSuitableForTestResult): Instead of defining a static variable
+        that's only used in a single place, pass '/' to reverseFind() directly.
+
 2013-08-13  Alberto Garcia  <[email protected]>
 
         [GTK] Closing inspector window crashes wk

Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (154000 => 154001)


--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2013-08-13 13:14:39 UTC (rev 154000)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp	2013-08-13 14:44:37 UTC (rev 154001)
@@ -336,8 +336,6 @@
     policyDelegatePermissive = false;
 }
 
-static const char divider = '/';
-
 static String pathSuitableForTestResult(const char* uriString)
 {
     KURL uri = KURL(ParsedURLString, uriString);
@@ -353,7 +351,7 @@
 
     String mainFrameUrlPathString = mainFrameURL.path();
     String pathString = uri.path();
-    String basePath = mainFrameUrlPathString.substring(0, mainFrameUrlPathString.reverseFind(divider) + 1);
+    String basePath = mainFrameUrlPathString.substring(0, mainFrameUrlPathString.reverseFind('/') + 1);
 
     if (!basePath.isEmpty() && pathString.startsWith(basePath))
         return pathString.substring(basePath.length());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to