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

Unified Diff: Source/core/html/HTMLTitleElement.cpp

Issue 23190034: Remove code related to title directionality, we never used it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 | « Source/core/html/HTMLTitleElement.h ('k') | Source/core/loader/DocumentLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTitleElement.cpp
diff --git a/Source/core/html/HTMLTitleElement.cpp b/Source/core/html/HTMLTitleElement.cpp
index f5179d2e10c52e5982772edb2f0bce5742e20c35..64fd80e255bf28d6be6e3fbe01bfe17c4cd10e8f 100644
--- a/Source/core/html/HTMLTitleElement.cpp
+++ b/Source/core/html/HTMLTitleElement.cpp
@@ -52,7 +52,7 @@ Node::InsertionNotificationRequest HTMLTitleElement::insertedInto(ContainerNode*
{
HTMLElement::insertedInto(insertionPoint);
if (inDocument() && !isInShadowTree())
- document()->setTitleElement(textWithDirection(), this);
+ document()->setTitleElement(text(), this);
return InsertionDone;
}
@@ -67,49 +67,7 @@ void HTMLTitleElement::childrenChanged(bool changedByParser, Node* beforeChange,
{
HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
if (inDocument() && !isInShadowTree())
- document()->setTitleElement(textWithDirection(), this);
-}
-
-void HTMLTitleElement::attach(const AttachContext& context)
-{
- HTMLElement::attach(context);
- // If after attaching nothing called styleForRenderer() on this node we
- // manually cache the value. This happens if our parent doesn't have a
- // renderer like <optgroup> or if it doesn't allow children like <select>.
- if (!m_style)
- updateNonRenderStyle();
-}
-
-void HTMLTitleElement::detach(const AttachContext& context)
-{
- m_style.clear();
- HTMLElement::detach(context);
-}
-
-void HTMLTitleElement::updateNonRenderStyle()
-{
- m_style = document()->styleForElementIgnoringPendingStylesheets(this);
-}
-
-RenderStyle* HTMLTitleElement::nonRendererStyle() const
-{
- return m_style.get();
-}
-
-PassRefPtr<RenderStyle> HTMLTitleElement::customStyleForRenderer()
-{
- // styleForRenderer is called whenever a new style should be associated
- // with an Element so now is a good time to update our cached style.
- updateNonRenderStyle();
- return m_style;
-}
-
-void HTMLTitleElement::didRecalcStyle(StyleChange)
-{
- if (isInShadowTree())
- return;
-
- document()->setTitleElement(textWithDirection(), this);
+ document()->setTitleElement(text(), this);
}
String HTMLTitleElement::text() const
@@ -124,14 +82,6 @@ String HTMLTitleElement::text() const
return result.toString();
}
-StringWithDirection HTMLTitleElement::textWithDirection()
-{
- TextDirection direction = LTR;
- if (m_style)
- direction = m_style->direction();
- return StringWithDirection(text(), direction);
-}
-
void HTMLTitleElement::setText(const String &value)
{
RefPtr<Node> protectFromMutationEvents(this);
« no previous file with comments | « Source/core/html/HTMLTitleElement.h ('k') | Source/core/loader/DocumentLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698