2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Introduce a new StringWithDirection object that carries a String along
with the TextDirection associated with the String. Use this object for
document titles used within WebCore, because in HTML the direction of
a title can be set with the 'dir' attribute.
Put FIXMEs at the WebKit level to expose the new direction information
to clients.
No behavioral change intended, so no new tests. A follow-up will expose
the title direction and hopefully can be accompanied by tests that
verify it is correct.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::updateTitle):
(WebCore::Document::setTitle):
(WebCore::Document::removeTitle):
* dom/Document.h:
(WebCore::Document::title):
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::HTMLTitleElement):
(WebCore::HTMLTitleElement::childrenChanged):
(WebCore::HTMLTitleElement::text):
(WebCore::HTMLTitleElement::textWithDirection):
* html/HTMLTitleElement.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::setTitle):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::title):
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::dispatchDidReceiveTitle):
(WebCore::EmptyFrameLoaderClient::setTitle):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::setTitle):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForBackForwardNavigation):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::setCurrentItemTitle):
(WebCore::HistoryController::initializeItem):
* loader/HistoryController.h:
* platform/text/StringWithDirection.h: Added.
(WebCore::StringWithDirection::StringWithDirection):
(WebCore::StringWithDirection::operator==):
(WebCore::StringWithDirection::operator!=):
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedIntoDocument):
(WebCore::SVGTitleElement::childrenChanged):
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchDidReceiveTitle):
(WebKit::FrameLoaderClientImpl::setTitle):
* src/FrameLoaderClientImpl.h:
* src/WebDataSourceImpl.cpp:
(WebKit::WebDataSourceImpl::pageTitle):
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::dispatchDidReceiveTitle):
(WebCore::FrameLoaderClientEfl::setTitle):
* WebCoreSupport/FrameLoaderClientEfl.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::FrameLoaderClient::setTitle):
* WebCoreSupport/FrameLoaderClientGtk.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/FrameLoaderClientHaiku.cpp:
(WebCore::FrameLoaderClientHaiku::dispatchDidReceiveTitle):
* WebCoreSupport/FrameLoaderClientHaiku.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebFrameLoaderClient::setTitle):
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchDidReceiveTitle):
(WebCore::FrameLoaderClientQt::setTitle):
* WebCoreSupport/FrameLoaderClientQt.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidReceiveTitle):
* WebCoreSupport/WebFrameLoaderClient.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebCoreSupport/FrameLoaderClientWinCE.cpp:
(WebKit::FrameLoaderClientWinCE::dispatchDidReceiveTitle):
(WebKit::FrameLoaderClientWinCE::setTitle):
* WebCoreSupport/FrameLoaderClientWinCE.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebKitSupport/FrameLoaderClientWx.cpp:
(WebCore::FrameLoaderClientWx::dispatchDidReceiveTitle):
(WebCore::FrameLoaderClientWx::setTitle):
* WebKitSupport/FrameLoaderClientWx.h:
2011-03-31 Evan Martin <evan@chromium.org>
Reviewed by Eric Seidel.
<title> should support dir attribute
https://bugs.webkit.org/show_bug.cgi?id=50961
Update to new FrameLoaderClient interface.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::setTitle):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index 347a41e..f1020e1 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -610,7 +610,7 @@
dispatchDidClearWindowObjectsInAllWorlds();
if (m_documentLoader) {
- String ptitle = m_documentLoader->title();
+ StringWithDirection ptitle = m_documentLoader->title();
// If we have a title let the WebView know about it.
if (!ptitle.isNull())
m_client->dispatchDidReceiveTitle(ptitle);
@@ -1924,9 +1924,9 @@
dispatchDidCommitLoad();
// If we have a title let the WebView know about it.
- String title = m_documentLoader->title();
- if (!title.isNull())
- m_client->dispatchDidReceiveTitle(title);
+ StringWithDirection title = m_documentLoader->title();
+ if (!title.isNull())
+ m_client->dispatchDidReceiveTitle(title);
checkCompleted();
} else {
@@ -3375,7 +3375,7 @@
}
#endif
-void FrameLoader::setTitle(const String& title)
+void FrameLoader::setTitle(const StringWithDirection& title)
{
documentLoader()->setTitle(title);
}