Index: Source/core/html/HTMLBodyElement.cpp |
diff --git a/Source/core/html/HTMLBodyElement.cpp b/Source/core/html/HTMLBodyElement.cpp |
index 1cace815aae43da470af905982881d26c02aff0e..8c7b52c1a6e728f4af668f41aac51283bab893da 100644 |
--- a/Source/core/html/HTMLBodyElement.cpp |
+++ b/Source/core/html/HTMLBodyElement.cpp |
@@ -130,10 +130,8 @@ void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicStri |
document().setWindowAttributeEventListener(EventTypeNames::error, createAttributeEventListener(document().frame(), name, value)); |
else if (name == onfocusAttr) |
document().setWindowAttributeEventListener(EventTypeNames::focus, createAttributeEventListener(document().frame(), name, value)); |
-#if ENABLE(ORIENTATION_EVENTS) |
- else if (name == onorientationchangeAttr) |
+ else if (RuntimeEnabledFeatures::orientationEventEnabled() && name == onorientationchangeAttr) |
document().setWindowAttributeEventListener(EventTypeNames::orientationchange, createAttributeEventListener(document().frame(), name, value)); |
-#endif |
else if (name == onhashchangeAttr) |
document().setWindowAttributeEventListener(EventTypeNames::hashchange, createAttributeEventListener(document().frame(), name, value)); |
else if (name == onmessageAttr) |