Changeset 116470 in webkit
- Timestamp:
- May 8, 2012 5:42:52 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/efl/ChangeLog
r116413 r116470 1 2012-04-23 Raphael Kubo da Costa <rakuco@webkit.org> 2 3 [EFL] Pass a WTF::String directly from DRT to ewebkit when possible 4 https://bugs.webkit.org/show_bug.cgi?id=84634 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Drop unnecessary const char* -> WTF::String conversions by 9 creating String objects directly in LayoutTestController out of 10 JSStringRef's and passing them to DumpRenderTreeSupportEfl. 11 12 * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: 13 (DumpRenderTreeSupportEfl::setValueForUser): 14 (DumpRenderTreeSupportEfl::addUserStyleSheet): 15 (DumpRenderTreeSupportEfl::findString): 16 * WebCoreSupport/DumpRenderTreeSupportEfl.h: 17 1 18 2012-05-08 Krzysztof Czech <k.czech@samsung.com> 2 19 -
trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
r116285 r116470 48 48 #include <history/HistoryItem.h> 49 49 #include <workers/WorkerThread.h> 50 #include <wtf/OwnArrayPtr.h>51 #include <wtf/text/AtomicString.h>52 50 53 51 unsigned DumpRenderTreeSupportEfl::activeAnimationsCount(const Evas_Object* ewkFrame) … … 337 335 } 338 336 339 void DumpRenderTreeSupportEfl::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRefvalue)337 void DumpRenderTreeSupportEfl::setValueForUser(JSContextRef context, JSValueRef nodeObject, const String& value) 340 338 { 341 339 JSC::ExecState* exec = toJS(context); … … 347 345 return; 348 346 349 size_t bufferSize = JSStringGetMaximumUTF8CStringSize(value); 350 OwnArrayPtr<char> valueBuffer = adoptArrayPtr(new char[bufferSize]); 351 JSStringGetUTF8CString(value, valueBuffer.get(), bufferSize); 352 inputElement->setValueForUser(String::fromUTF8(valueBuffer.get())); 347 inputElement->setValueForUser(value); 353 348 } 354 349 … … 385 380 } 386 381 387 void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, const char*sourceCode, bool allFrames)382 void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, const String& sourceCode, bool allFrames) 388 383 { 389 384 WebCore::Page* page = EWKPrivate::corePage(ewkView); … … 403 398 } 404 399 405 bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const char*text, WebCore::FindOptions options)406 { 407 WebCore::Page* page = EWKPrivate::corePage(ewkView); 408 409 if (!page) 410 return false; 411 412 return page->findString( String::fromUTF8(text), options);400 bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const String& text, WebCore::FindOptions options) 401 { 402 WebCore::Page* page = EWKPrivate::corePage(ewkView); 403 404 if (!page) 405 return false; 406 407 return page->findString(text, options); 413 408 } 414 409 -
trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
r116285 r116470 67 67 static String suitableDRTFrameName(const Evas_Object* ewkFrame); 68 68 static void suspendAnimations(Evas_Object* ewkFrame); 69 static void setValueForUser(JSContextRef, JSValueRef nodeObject, JSStringRefvalue);69 static void setValueForUser(JSContextRef, JSValueRef nodeObject, const String& value); 70 70 static void setAutofilled(JSContextRef, JSValueRef nodeObject, bool autofilled); 71 71 static void setDefersLoading(Evas_Object* ewkView, bool defers); 72 72 static void setLoadsSiteIconsIgnoringImageLoadingSetting(Evas_Object* ewkView, bool loadsSiteIconsIgnoringImageLoadingPreferences); 73 73 74 static void addUserStyleSheet(const Evas_Object* ewkView, const char*sourceCode, bool allFrames);74 static void addUserStyleSheet(const Evas_Object* ewkView, const String& sourceCode, bool allFrames); 75 75 static void executeCoreCommandByName(const Evas_Object* ewkView, const char* name, const char* value); 76 static bool findString(const Evas_Object* ewkView, const char*text, WebCore::FindOptions);76 static bool findString(const Evas_Object* ewkView, const String& text, WebCore::FindOptions); 77 77 static bool isCommandEnabled(const Evas_Object* ewkView, const char* name); 78 78 static void setJavaScriptProfilingEnabled(const Evas_Object* ewkView, bool enabled); -
trunk/Tools/ChangeLog
r116464 r116470 1 2012-04-23 Raphael Kubo da Costa <rakuco@webkit.org> 2 3 [EFL] Pass a WTF::String directly from DRT to ewebkit when possible 4 https://bugs.webkit.org/show_bug.cgi?id=84634 5 6 Reviewed by Gustavo Noronha Silva. 7 8 Drop unnecessary const char* -> WTF::String conversions by 9 creating String objects directly in LayoutTestController out of 10 JSStringRef's and passing them to DumpRenderTreeSupportEfl. 11 12 * DumpRenderTree/efl/LayoutTestControllerEfl.cpp: 13 (LayoutTestController::queueLoad): 14 (LayoutTestController::setValueForUser): 15 (LayoutTestController::findString): 16 (LayoutTestController::addUserStyleSheet): 17 1 18 2012-05-08 Alexander Shalamov <alexander.shalamov@intel.com> 2 19 -
trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
r116416 r116470 185 185 { 186 186 WebCore::KURL baseURL(WebCore::KURL(), String::fromUTF8(ewk_frame_uri_get(browser->mainFrame()))); 187 WebCore::KURL absoluteURL(baseURL, WTF::String(url-> characters(), url->length()));187 WebCore::KURL absoluteURL(baseURL, WTF::String(url->ustring().impl())); 188 188 189 189 JSRetainPtr<JSStringRef> jsAbsoluteURL( … … 271 271 void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRef value) 272 272 { 273 DumpRenderTreeSupportEfl::setValueForUser(context, nodeObject, value);273 DumpRenderTreeSupportEfl::setValueForUser(context, nodeObject, WTF::String(value->ustring().impl())); 274 274 } 275 275 … … 516 516 } 517 517 518 return DumpRenderTreeSupportEfl::findString(browser->mainView(), target->ustring().utf8().data(), options);518 return DumpRenderTreeSupportEfl::findString(browser->mainView(), WTF::String(target->ustring().impl()), options); 519 519 } 520 520 … … 702 702 void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames) 703 703 { 704 DumpRenderTreeSupportEfl::addUserStyleSheet(browser->mainView(), source->ustring().utf8().data(), allFrames);704 DumpRenderTreeSupportEfl::addUserStyleSheet(browser->mainView(), WTF::String(source->ustring().impl()), allFrames); 705 705 } 706 706
Note: See TracChangeset
for help on using the changeset viewer.