summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLHRElement.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/HTMLHRElement.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/HTMLHRElement.cpp')
-rw-r--r--Source/WebCore/html/HTMLHRElement.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/WebCore/html/HTMLHRElement.cpp b/Source/WebCore/html/HTMLHRElement.cpp
index 99636ba27..29485e518 100644
--- a/Source/WebCore/html/HTMLHRElement.cpp
+++ b/Source/WebCore/html/HTMLHRElement.cpp
@@ -23,7 +23,6 @@
#include "config.h"
#include "HTMLHRElement.h"
-#include "Attribute.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "CSSValuePool.h"
@@ -40,14 +39,14 @@ HTMLHRElement::HTMLHRElement(const QualifiedName& tagName, Document& document)
ASSERT(hasTagName(hrTag));
}
-PassRefPtr<HTMLHRElement> HTMLHRElement::create(Document& document)
+Ref<HTMLHRElement> HTMLHRElement::create(Document& document)
{
- return adoptRef(new HTMLHRElement(hrTag, document));
+ return adoptRef(*new HTMLHRElement(hrTag, document));
}
-PassRefPtr<HTMLHRElement> HTMLHRElement::create(const QualifiedName& tagName, Document& document)
+Ref<HTMLHRElement> HTMLHRElement::create(const QualifiedName& tagName, Document& document)
{
- return adoptRef(new HTMLHRElement(tagName, document));
+ return adoptRef(*new HTMLHRElement(tagName, document));
}
bool HTMLHRElement::isPresentationAttribute(const QualifiedName& name) const
@@ -60,10 +59,10 @@ bool HTMLHRElement::isPresentationAttribute(const QualifiedName& name) const
void HTMLHRElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStyleProperties& style)
{
if (name == alignAttr) {
- if (equalIgnoringCase(value, "left")) {
+ if (equalLettersIgnoringASCIICase(value, "left")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyMarginLeft, 0, CSSPrimitiveValue::CSS_PX);
addPropertyToPresentationAttributeStyle(style, CSSPropertyMarginRight, CSSValueAuto);
- } else if (equalIgnoringCase(value, "right")) {
+ } else if (equalLettersIgnoringASCIICase(value, "right")) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyMarginLeft, CSSValueAuto);
addPropertyToPresentationAttributeStyle(style, CSSPropertyMarginRight, 0, CSSPrimitiveValue::CSS_PX);
} else {
@@ -82,10 +81,10 @@ void HTMLHRElement::collectStyleForPresentationAttribute(const QualifiedName& na
addHTMLColorToStyle(style, CSSPropertyBorderColor, value);
addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
} else if (name == noshadeAttr) {
- if (!hasAttribute(colorAttr)) {
+ if (!hasAttributeWithoutSynchronization(colorAttr)) {
addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid);
- RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray);
+ RefPtr<CSSPrimitiveValue> darkGrayValue = CSSValuePool::singleton().createColorValue(Color::darkGray);
style.setProperty(CSSPropertyBorderColor, darkGrayValue);
style.setProperty(CSSPropertyBackgroundColor, darkGrayValue);
}
@@ -100,4 +99,9 @@ void HTMLHRElement::collectStyleForPresentationAttribute(const QualifiedName& na
HTMLElement::collectStyleForPresentationAttribute(name, value, style);
}
+bool HTMLHRElement::canContainRangeEndPoint() const
+{
+ return hasChildNodes() && HTMLElement::canContainRangeEndPoint();
+}
+
}