- Revision
- 120428
- Author
- [email protected]
- Date
- 2012-06-15 02:24:04 -0700 (Fri, 15 Jun 2012)
Log Message
[EFL] EFL's LayoutTestController does not support titleTextDirection
https://bugs.webkit.org/show_bug.cgi?id=86475
Patch by Christophe Dumez <[email protected]> on 2012-06-15
Reviewed by Hajime Morita.
Source/WebKit/efl:
Emit the "title,changed" signal even if the title direction has
changed but not its text.
* ewk/ewk_frame.cpp:
(ewk_frame_title_set):
Tools:
Add titleTextDirection getter and setter to LayoutTestController and
expose its value to _javascript_.
Update the titleTextDirection value from EFL's "title,changed"
callback in DumpRenderTree.
* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(getTitleTextDirectionCallback):
(LayoutTestController::staticValues):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController::titleTextDirection):
(LayoutTestController::setTitleTextDirection):
(LayoutTestController):
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::onFrameTitleChanged):
LayoutTests:
Unskip title-directionality tests now that EFL's LayoutTestController
supports titleTextDirection.
* platform/efl/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (120427 => 120428)
--- trunk/LayoutTests/ChangeLog 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/LayoutTests/ChangeLog 2012-06-15 09:24:04 UTC (rev 120428)
@@ -1,3 +1,15 @@
+2012-06-15 Christophe Dumez <[email protected]>
+
+ [EFL] EFL's LayoutTestController does not support titleTextDirection
+ https://bugs.webkit.org/show_bug.cgi?id=86475
+
+ Reviewed by Hajime Morita.
+
+ Unskip title-directionality tests now that EFL's LayoutTestController
+ supports titleTextDirection.
+
+ * platform/efl/TestExpectations:
+
2012-06-15 Emil A Eklund <[email protected]>
Unreviewed chromium windows rebaseline.
Modified: trunk/LayoutTests/platform/efl/TestExpectations (120427 => 120428)
--- trunk/LayoutTests/platform/efl/TestExpectations 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/LayoutTests/platform/efl/TestExpectations 2012-06-15 09:24:04 UTC (rev 120428)
@@ -462,10 +462,6 @@
BUGWK84777 : ietestcenter/css3/multicolumn/column-width-applies-to-015.htm = IMAGE
BUGWK84778 : ietestcenter/css3/multicolumn/column-width-negative-001.htm = IMAGE
-// Expose title direction in WebKit API
-BUGWK58845 : fast/dom/title-directionality.html = TEXT
-BUGWK58845 : fast/dom/title-directionality-removeChild.html = TEXT
-
// Tests that sometimes fail on the bot (for GTK and Chromium ports as well)
BUGWK77631 : fast/multicol/span/span-as-immediate-child-property-removal.html = TEXT PASS
BUGWK77631 : fast/multicol/span/span-as-immediate-columns-child-removal.html = TEXT PASS
Modified: trunk/Source/WebKit/efl/ChangeLog (120427 => 120428)
--- trunk/Source/WebKit/efl/ChangeLog 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-06-15 09:24:04 UTC (rev 120428)
@@ -1,3 +1,16 @@
+2012-06-15 Christophe Dumez <[email protected]>
+
+ [EFL] EFL's LayoutTestController does not support titleTextDirection
+ https://bugs.webkit.org/show_bug.cgi?id=86475
+
+ Reviewed by Hajime Morita.
+
+ Emit the "title,changed" signal even if the title direction has
+ changed but not its text.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_title_set):
+
2012-06-14 Ryuan Choi <[email protected]>
[EFL] Move cursor related code from WidgetEfl to ewk_view and EflScreenUtilities.
Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (120427 => 120428)
--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp 2012-06-15 09:24:04 UTC (rev 120428)
@@ -1616,9 +1616,9 @@
*/
void ewk_frame_title_set(Evas_Object* ewkFrame, const Ewk_Text_With_Direction* title)
{
- DBG("ewkFrame=%p, title=%s", ewkFrame, title->string ? title->string : "(null)");
+ DBG("ewkFrame=%p, title=%s, direction=%s", ewkFrame, title->string ? title->string : "(null)", title->direction == EWK_TEXT_DIRECTION_LEFT_TO_RIGHT ? "ltr" : "rtl");
EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, smartData);
- if (!eina_stringshare_replace(&smartData->title.string, title->string))
+ if (!eina_stringshare_replace(&smartData->title.string, title->string) && (smartData->title.direction == title->direction))
return;
smartData->title.direction = title->direction;
evas_object_smart_callback_call(ewkFrame, "title,changed", (void*)title);
Modified: trunk/Tools/ChangeLog (120427 => 120428)
--- trunk/Tools/ChangeLog 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/Tools/ChangeLog 2012-06-15 09:24:04 UTC (rev 120428)
@@ -1,5 +1,28 @@
2012-06-15 Christophe Dumez <[email protected]>
+ [EFL] EFL's LayoutTestController does not support titleTextDirection
+ https://bugs.webkit.org/show_bug.cgi?id=86475
+
+ Reviewed by Hajime Morita.
+
+ Add titleTextDirection getter and setter to LayoutTestController and
+ expose its value to _javascript_.
+ Update the titleTextDirection value from EFL's "title,changed"
+ callback in DumpRenderTree.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (getTitleTextDirectionCallback):
+ (LayoutTestController::staticValues):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::titleTextDirection):
+ (LayoutTestController::setTitleTextDirection):
+ (LayoutTestController):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::onFrameTitleChanged):
+
+2012-06-15 Christophe Dumez <[email protected]>
+
[EFL][WK2] Implement reload / stop in Ewk_View
https://bugs.webkit.org/show_bug.cgi?id=89168
Modified: trunk/Tools/DumpRenderTree/LayoutTestController.cpp (120427 => 120428)
--- trunk/Tools/DumpRenderTree/LayoutTestController.cpp 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.cpp 2012-06-15 09:24:04 UTC (rev 120428)
@@ -96,6 +96,7 @@
, m_customFullScreenBehavior(false)
, m_testPathOrURL(testPathOrURL)
, m_expectedPixelHash(expectedPixelHash)
+ , m_titleTextDirection("ltr")
{
}
@@ -2158,6 +2159,13 @@
}
#endif
+static JSValueRef getTitleTextDirectionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ JSRetainPtr<JSStringRef> titleDirection(Adopt, JSStringCreateWithUTF8CString(controller->titleTextDirection().c_str()));
+ return JSValueMakeString(context, titleDirection.get());
+}
+
static bool setGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
{
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
@@ -2261,6 +2269,7 @@
#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
{ "platformName", getPlatformNameCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
#endif
+ { "titleTextDirection", getTitleTextDirectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0, 0 }
};
return staticValues;
Modified: trunk/Tools/DumpRenderTree/LayoutTestController.h (120427 => 120428)
--- trunk/Tools/DumpRenderTree/LayoutTestController.h 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.h 2012-06-15 09:24:04 UTC (rev 120428)
@@ -359,6 +359,8 @@
void setMinimumTimerInterval(double);
void setTextDirection(JSStringRef);
+ const std::string& titleTextDirection() const { return m_titleTextDirection; }
+ void setTitleTextDirection(const std::string& direction) { m_titleTextDirection = direction; }
// Custom full screen behavior.
void setHasCustomFullScreenBehavior(bool value) { m_customFullScreenBehavior = value; }
@@ -423,6 +425,7 @@
std::string m_authenticationPassword;
std::string m_testPathOrURL;
std::string m_expectedPixelHash; // empty string if no hash
+ std::string m_titleTextDirection;
std::set<std::string> m_willSendRequestClearHeaders;
Modified: trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp (120427 => 120428)
--- trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-06-15 09:20:26 UTC (rev 120427)
+++ trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp 2012-06-15 09:24:04 UTC (rev 120428)
@@ -469,6 +469,8 @@
if (!done && gLayoutTestController->dumpHistoryDelegateCallbacks())
printf("WebView updated the title for history URL \"%s\" to \"%s\".\n", ewk_frame_uri_get(frame)
, (titleText && titleText->string) ? titleText->string : "");
+
+ gLayoutTestController->setTitleTextDirection(titleText->direction == EWK_TEXT_DIRECTION_LEFT_TO_RIGHT ? "ltr" : "rtl");
}
void DumpRenderTreeChrome::onDocumentLoadFinished(void*, Evas_Object*, void* eventInfo)