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

Unified Diff: content/renderer/render_view.cc

Issue 6880073: Plumb direction of document title through IPC layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 58d417d12d126731754029de4698515bb79f312e..816fcdbe0f15e9a9b1f404797d928ce0cd70989f 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -1126,14 +1126,16 @@ 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) {
+void RenderView::UpdateTitle(WebFrame* frame, const string16& title,
+ WebTextDirection title_direction) {
// Ignore all but top level navigations...
if (!frame->parent()) {
Send(new ViewHostMsg_UpdateTitle(
routing_id_,
page_id_,
- UTF16ToWideHack(title.length() > content::kMaxTitleChars ?
- title.substr(0, content::kMaxTitleChars) : title)));
+ title.length() > content::kMaxTitleChars ?
+ title.substr(0, content::kMaxTitleChars) : title,
+ title_direction));
}
}
@@ -2475,9 +2477,7 @@ void RenderView::didCreateDocumentElement(WebFrame* frame) {
void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title,
WebTextDirection direction) {
- // TODO: pass direction through various APIs.
- // http://code.google.com/p/chromium/issues/detail?id=79903
- UpdateTitle(frame, title);
+ UpdateTitle(frame, title, direction);
// Also check whether we have new encoding name.
UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
@@ -2541,7 +2541,10 @@ void RenderView::didNavigateWithinPage(
didCommitProvisionalLoad(frame, is_new_navigation);
- UpdateTitle(frame, frame->view()->mainFrame()->dataSource()->pageTitle());
+ // TODO(evan): update this to use ->pageTitleDirection() once we pull in new
+ // WebKit.
+ UpdateTitle(frame, frame->view()->mainFrame()->dataSource()->pageTitle(),
+ WebKit::WebTextDirectionLeftToRight);
}
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