summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/css/property_registration.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/property_registration.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/css/property_registration.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/property_registration.cc b/chromium/third_party/blink/renderer/core/css/property_registration.cc
index fe76bb0476c..4ac80062d6c 100644
--- a/chromium/third_party/blink/renderer/core/css/property_registration.cc
+++ b/chromium/third_party/blink/renderer/core/css/property_registration.cc
@@ -4,6 +4,7 @@
#include "third_party/blink/renderer/core/css/property_registration.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_property_definition.h"
#include "third_party/blink/renderer/core/animation/css_interpolation_types_map.h"
#include "third_party/blink/renderer/core/css/css_custom_property_declaration.h"
#include "third_party/blink/renderer/core/css/css_identifier_value.h"
@@ -16,7 +17,6 @@
#include "third_party/blink/renderer/core/css/parser/css_parser_context.h"
#include "third_party/blink/renderer/core/css/parser/css_tokenizer.h"
#include "third_party/blink/renderer/core/css/parser/css_variable_parser.h"
-#include "third_party/blink/renderer/core/css/property_definition.h"
#include "third_party/blink/renderer/core/css/property_registry.h"
#include "third_party/blink/renderer/core/css/resolver/style_builder_converter.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
@@ -24,16 +24,17 @@
#include "third_party/blink/renderer/core/css/style_rule.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/document.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
namespace blink {
const PropertyRegistration* PropertyRegistration::From(
const ExecutionContext* execution_context,
const AtomicString& property_name) {
- const auto* document = DynamicTo<Document>(execution_context);
- if (!document)
+ const auto* window = DynamicTo<LocalDOMWindow>(execution_context);
+ if (!window)
return nullptr;
- const PropertyRegistry* registry = document->GetPropertyRegistry();
+ const PropertyRegistry* registry = window->document()->GetPropertyRegistry();
return registry ? registry->Registration(property_name) : nullptr;
}
@@ -133,8 +134,8 @@ PropertyRegistration* PropertyRegistration::MaybeCreate(
const CSSParserContext* parser_context =
document.ElementSheet().Contents()->ParserContext();
const bool is_animation_tainted = false;
- initial = syntax->Parse(initial_variable_data->TokenRange(), parser_context,
- is_animation_tainted);
+ initial = syntax->Parse(initial_variable_data->TokenRange(),
+ *parser_context, is_animation_tainted);
if (!initial)
return nullptr;
if (!ComputationallyIndependent(*initial))
@@ -167,7 +168,7 @@ void PropertyRegistration::registerProperty(
return;
}
AtomicString atomic_name(name);
- Document* document = To<Document>(execution_context);
+ Document* document = To<LocalDOMWindow>(execution_context)->document();
PropertyRegistry& registry = *document->GetPropertyRegistry();
if (registry.Registration(atomic_name)) {
exception_state.ThrowDOMException(
@@ -195,7 +196,7 @@ void PropertyRegistration::registerProperty(
const auto tokens = tokenizer.TokenizeToEOF();
bool is_animation_tainted = false;
initial = syntax_definition->Parse(CSSParserTokenRange(tokens),
- parser_context, is_animation_tainted);
+ *parser_context, is_animation_tainted);
if (!initial) {
exception_state.ThrowDOMException(
DOMExceptionCode::kSyntaxError,