Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2534)

Unified Diff: content/renderer/render_view.cc

Issue 6901003: Revert my recent changes regarding title directionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyrights Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view.cc
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index d3c32f014f295a5b9d8416510f87fc54193dde90..256669d228ed48a75f82416116752a9f660d1be5 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -1101,16 +1101,14 @@ void RenderView::UpdateURL(WebFrame* frame) {
}
// Tell the embedding application that the title of the active page has changed
-void RenderView::UpdateTitle(WebFrame* frame, const string16& title,
- WebTextDirection title_direction) {
+void RenderView::UpdateTitle(WebFrame* frame, const string16& title) {
// Ignore all but top level navigations...
if (!frame->parent()) {
Send(new ViewHostMsg_UpdateTitle(
routing_id_,
page_id_,
- title.length() > content::kMaxTitleChars ?
- title.substr(0, content::kMaxTitleChars) : title,
- title_direction));
+ UTF16ToWideHack(title.length() > content::kMaxTitleChars ?
+ title.substr(0, content::kMaxTitleChars) : title)));
}
}
@@ -2454,7 +2452,9 @@ void RenderView::didCreateDocumentElement(WebFrame* frame) {
void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title,
WebTextDirection direction) {
- UpdateTitle(frame, title, direction);
+ // TODO: pass direction through various APIs.
+ // http://code.google.com/p/chromium/issues/detail?id=79903
+ UpdateTitle(frame, title);
// Also check whether we have new encoding name.
UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
@@ -2518,10 +2518,7 @@ void RenderView::didNavigateWithinPage(
didCommitProvisionalLoad(frame, is_new_navigation);
- // TODO(evan): update this to use ->pageTitleDirection() once we pull in new
- // WebKit.
- UpdateTitle(frame, frame->view()->mainFrame()->dataSource()->pageTitle(),
- WebKit::WebTextDirectionLeftToRight);
+ UpdateTitle(frame, frame->view()->mainFrame()->dataSource()->pageTitle());
}
void RenderView::didUpdateCurrentHistoryItem(WebFrame* frame) {
« no previous file with comments | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698