Changeset 84199 in webkit


Ignore:
Timestamp:
Apr 18, 2011 3:58:38 PM (13 years ago)
Author:
evan@chromium.org
Message:

2011-04-18 Evan Martin <evan@chromium.org>

Reviewed by Eric Seidel.

[chromium] expose title direction to webkit client
https://bugs.webkit.org/show_bug.cgi?id=58823

  • Tools/DumpRenderTree/chromium/LayoutTestController.cpp:
  • Tools/DumpRenderTree/chromium/LayoutTestController.h: Adapt to new API. Expose title direction to JS so it can be tested.
  • Tools/DumpRenderTree/chromium/WebViewHost.cpp:
  • Tools/DumpRenderTree/chromium/WebViewHost.h: Provide new API.

2011-04-18 Evan Martin <evan@chromium.org>

Reviewed by Eric Seidel.

[chromium] expose title direction to webkit client
https://bugs.webkit.org/show_bug.cgi?id=58823

New test that checks the directionality of the title for some
simple pages.

  • fast/dom/title-directionality-expected.txt: Added.
  • fast/dom/title-directionality.html: Added.

2011-04-18 Evan Martin <evan@chromium.org>

Reviewed by Eric Seidel.

[chromium] expose title direction to webkit client
https://bugs.webkit.org/show_bug.cgi?id=58823

  • public/WebFrameClient.h: (WebKit::WebFrameClient::didReceiveTitle): Add new param to API.
  • src/FrameLoaderClientImpl.cpp: (WebKit::FrameLoaderClientImpl::dispatchDidReceiveTitle): Pass new param in API.

2011-04-18 Evan Martin <evan@chromium.org>

Reviewed by Eric Seidel.

[chromium] expose title direction to webkit client
https://bugs.webkit.org/show_bug.cgi?id=58823

  • DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): (LayoutTestController::reset):
  • DumpRenderTree/chromium/LayoutTestController.h: (LayoutTestController::setTitleTextDirection): Add member and setter to let us stash the title direction at load time.
  • DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::didReceiveTitle):
  • DumpRenderTree/chromium/WebViewHost.h: Adapt to new API; push the title into layoutTestController when we receive it.
Location:
trunk
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r84149 r84199  
     12011-04-18  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [chromium] expose title direction to webkit client
     6        https://bugs.webkit.org/show_bug.cgi?id=58823
     7
     8        *  Tools/DumpRenderTree/chromium/LayoutTestController.cpp:
     9        *  Tools/DumpRenderTree/chromium/LayoutTestController.h:
     10        Adapt to new API.  Expose title direction to JS so it can be tested.
     11
     12        *  Tools/DumpRenderTree/chromium/WebViewHost.cpp:
     13        *  Tools/DumpRenderTree/chromium/WebViewHost.h:
     14        Provide new API.
     15
    1162011-04-18  Hans Wennborg  <hans@chromium.org>
    217
  • trunk/LayoutTests/ChangeLog

    r84183 r84199  
     12011-04-18  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [chromium] expose title direction to webkit client
     6        https://bugs.webkit.org/show_bug.cgi?id=58823
     7
     8        New test that checks the directionality of the title for some
     9        simple pages.
     10
     11        * fast/dom/title-directionality-expected.txt: Added.
     12        * fast/dom/title-directionality.html: Added.
     13
    1142011-04-18  Chang Shu  <cshu@webkit.org>
    215
  • trunk/LayoutTests/platform/gtk/Skipped

    r84175 r84199  
    13871387# Quota API is not supported.
    13881388storage/storageinfo-query-usage.html
     1389
     1390# Expose title direction in WebKit API
     1391# https://bugs.webkit.org/show_bug.cgi?id=58845
     1392fast/dom/title-directionality.html
  • trunk/LayoutTests/platform/mac/Skipped

    r84110 r84199  
    327327# Quota API is not supported.
    328328storage/storageinfo-query-usage.html
     329
     330# Expose title direction in WebKit API
     331# https://bugs.webkit.org/show_bug.cgi?id=58845
     332fast/dom/title-directionality.html
  • trunk/LayoutTests/platform/qt/Skipped

    r84168 r84199  
    34963496# Quota API is not yet supported.
    34973497storage/storageinfo-query-usage.html
     3498
     3499# Expose title direction in WebKit API
     3500# https://bugs.webkit.org/show_bug.cgi?id=58845
     3501fast/dom/title-directionality.html
  • trunk/LayoutTests/platform/win/Skipped

    r84142 r84199  
    12411241# Quota API is not supported.
    12421242storage/storageinfo-query-usage.html
     1243
     1244# Expose title direction in WebKit API
     1245# https://bugs.webkit.org/show_bug.cgi?id=58845
     1246fast/dom/title-directionality.html
  • trunk/Source/WebKit/chromium/ChangeLog

    r84101 r84199  
     12011-04-18  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [chromium] expose title direction to webkit client
     6        https://bugs.webkit.org/show_bug.cgi?id=58823
     7
     8        * public/WebFrameClient.h:
     9        (WebKit::WebFrameClient::didReceiveTitle):
     10        Add new param to API.
     11
     12        * src/FrameLoaderClientImpl.cpp:
     13        (WebKit::FrameLoaderClientImpl::dispatchDidReceiveTitle):
     14        Pass new param in API.
     15
    1162011-04-17  Patrick Gansterer  <paroga@webkit.org>
    217
  • trunk/Source/WebKit/chromium/public/WebFrameClient.h

    r83258 r84199  
    3737#include "WebNavigationType.h"
    3838#include "WebStorageQuotaType.h"
     39#include "WebTextDirection.h"
    3940#include "WebURLError.h"
    4041
     
    207208
    208209    // The page title is available.
    209     virtual void didReceiveTitle(WebFrame*, const WebString& title) { }
     210    // FIXME: remove default arg once Chrome is updated.
     211    virtual void didReceiveTitle(WebFrame*, const WebString& title, WebTextDirection direction = WebTextDirectionDefault) { }
    210212
    211213    // The icons for the page have changed.
  • trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp

    r84055 r84199  
    745745void FrameLoaderClientImpl::dispatchDidReceiveTitle(const StringWithDirection& title)
    746746{
    747     // FIXME: use direction of title.
    748     if (m_webFrame->client())
    749         m_webFrame->client()->didReceiveTitle(m_webFrame, title.string());
     747    if (m_webFrame->client())
     748        m_webFrame->client()->didReceiveTitle(m_webFrame, title.string(), title.direction() == LTR ? WebTextDirectionLeftToRight : WebTextDirectionRightToLeft);
    750749}
    751750
  • trunk/Tools/ChangeLog

    r84197 r84199  
     12011-04-18  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [chromium] expose title direction to webkit client
     6        https://bugs.webkit.org/show_bug.cgi?id=58823
     7
     8        * DumpRenderTree/chromium/LayoutTestController.cpp:
     9        (LayoutTestController::LayoutTestController):
     10        (LayoutTestController::reset):
     11        * DumpRenderTree/chromium/LayoutTestController.h:
     12        (LayoutTestController::setTitleTextDirection):
     13        Add member and setter to let us stash the title direction at load time.
     14
     15        * DumpRenderTree/chromium/WebViewHost.cpp:
     16        (WebViewHost::didReceiveTitle):
     17        * DumpRenderTree/chromium/WebViewHost.h:
     18        Adapt to new API; push the title into layoutTestController when we
     19        receive it.
     20
    1212011-04-18  Dirk Pranke  <dpranke@chromium.org>
    222
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp

    r82469 r84199  
    215215    // webHistoryItemCount is used by tests in LayoutTests\http\tests\history
    216216    bindProperty("webHistoryItemCount", &m_webHistoryItemCount);
     217    bindProperty("titleTextDirection", &m_titleTextDirection);
    217218}
    218219
     
    574575    m_globalFlag.set(false);
    575576    m_webHistoryItemCount.set(0);
     577    m_titleTextDirection.set("ltr");
    576578    m_userStyleSheetLocation = WebURL();
    577579
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h

    r82469 r84199  
    4545#include "Task.h"
    4646#include "WebString.h"
     47#include "WebTextDirection.h"
    4748#include "WebURL.h"
    4849#include <wtf/Deque.h>
     
    392393    bool deferMainResourceDataLoad() { return m_deferMainResourceDataLoad; }
    393394    void setShowDebugLayerTree(bool value) { m_showDebugLayerTree = value; }
     395    void setTitleTextDirection(WebKit::WebTextDirection dir)
     396    {
     397        m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr" : "rtl");
     398    }
    394399
    395400    bool testRepaint() const { return m_testRepaint; }
     
    575580    CppVariant m_webHistoryItemCount;
    576581
     582    // Bound variable tracking the directionality of the <title> tag.
     583    CppVariant m_titleTextDirection;
     584
    577585    WebKit::WebURL m_userStyleSheetLocation;
    578586
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r84101 r84199  
    933933}
    934934
    935 void WebViewHost::didReceiveTitle(WebFrame* frame, const WebString& title)
     935void WebViewHost::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction)
    936936{
    937937    WebCString title8 = title.utf8();
     
    946946
    947947    setPageTitle(title);
     948    layoutTestController()->setTitleTextDirection(direction);
    948949}
    949950
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.h

    r83941 r84199  
    193193    virtual void didCommitProvisionalLoad(WebKit::WebFrame*, bool isNewNavigation);
    194194    virtual void didClearWindowObject(WebKit::WebFrame*);
    195     virtual void didReceiveTitle(WebKit::WebFrame*, const WebKit::WebString&);
     195    virtual void didReceiveTitle(WebKit::WebFrame*, const WebKit::WebString&, WebKit::WebTextDirection);
    196196    virtual void didFinishDocumentLoad(WebKit::WebFrame*);
    197197    virtual void didHandleOnloadEvents(WebKit::WebFrame*);
Note: See TracChangeset for help on using the changeset viewer.