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

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

Issue 21182003: Remove NonSelectableText subclass of Text (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use createTextRenderer and RenderTextFragment Created 7 years, 5 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/dom/Text.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/BaseButtonInputType.cpp
diff --git a/Source/core/html/BaseButtonInputType.cpp b/Source/core/html/BaseButtonInputType.cpp
index 868e235d250fb6ef8d9f5c12789d1435e7bfa0a5..93d03683f35801507a91ba0d6b87d4fac4becae2 100644
--- a/Source/core/html/BaseButtonInputType.cpp
+++ b/Source/core/html/BaseButtonInputType.cpp
@@ -37,37 +37,17 @@
#include "core/dom/shadow/ShadowRoot.h"
#include "core/html/HTMLInputElement.h"
#include "core/rendering/RenderButton.h"
-#include "core/rendering/RenderTextFragment.h"
namespace WebCore {
using namespace HTMLNames;
-class NonSelectableText : public Text {
- inline NonSelectableText(Document* document, const String& data)
- : Text(document, data, CreateText)
- {
- }
-
- virtual RenderText* createTextRenderer(RenderStyle*) OVERRIDE
- {
- return new (document()->renderArena()) RenderTextFragment(this, dataImpl());
- }
-
-public:
- static inline PassRefPtr<NonSelectableText> create(Document* document, const String& data)
- {
- return adoptRef(new NonSelectableText(document, data));
- }
-};
-
// ----------------------------
void BaseButtonInputType::createShadowSubtree()
{
ASSERT(element()->userAgentShadowRoot());
- RefPtr<Text> text = NonSelectableText::create(element()->document(), element()->valueWithDefault());
- element()->userAgentShadowRoot()->appendChild(text);
+ element()->userAgentShadowRoot()->appendChild(Text::create(element()->document(), element()->valueWithDefault()));
}
void BaseButtonInputType::valueAttributeChanged()
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698