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

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

Issue 103763002: Do not make a subclass of Text only to disable selection. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove #include RenderTextFragment.h Created 7 years 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/BaseButtonInputType.cpp
diff --git a/Source/core/html/forms/BaseButtonInputType.cpp b/Source/core/html/forms/BaseButtonInputType.cpp
index 5f2af456653b34312b0a16c5302693bf3aaadf43..55505510e813848a55ab8e9e9df9a85c3bb4b392 100644
--- a/Source/core/html/forms/BaseButtonInputType.cpp
+++ b/Source/core/html/forms/BaseButtonInputType.cpp
@@ -37,37 +37,15 @@
#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 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.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698