summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/build
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-24 11:30:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-30 12:56:19 +0000
commit6036726eb981b6c4b42047513b9d3f4ac865daac (patch)
tree673593e70678e7789766d1f732eb51f613a2703b /chromium/third_party/blink/renderer/build
parent466052c4e7c052268fd931888cd58961da94c586 (diff)
downloadqtwebengine-chromium-6036726eb981b6c4b42047513b9d3f4ac865daac.tar.gz
BASELINE: Update Chromium to 70.0.3538.78
Change-Id: Ie634710bf039e26c1957f4ae45e101bd4c434ae7 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/build')
-rw-r--r--chromium/third_party/blink/renderer/build/scripts/core/css/templates/cssom_types.cc.tmpl40
-rw-r--r--chromium/third_party/blink/renderer/build/scripts/core/css/templates/style_property_shorthand.cc.tmpl3
-rw-r--r--chromium/third_party/blink/renderer/build/scripts/templates/InstrumentingProbesInl.h.tmpl1
3 files changed, 28 insertions, 16 deletions
diff --git a/chromium/third_party/blink/renderer/build/scripts/core/css/templates/cssom_types.cc.tmpl b/chromium/third_party/blink/renderer/build/scripts/core/css/templates/cssom_types.cc.tmpl
index 425b9d20148..79fea233825 100644
--- a/chromium/third_party/blink/renderer/build/scripts/core/css/templates/cssom_types.cc.tmpl
+++ b/chromium/third_party/blink/renderer/build/scripts/core/css/templates/cssom_types.cc.tmpl
@@ -7,73 +7,77 @@
#include "third_party/blink/renderer/core/css/cssom/cssom_types.h"
-#include "third_party/blink/renderer/core/css/cssom/cssom_keywords.h"
#include "third_party/blink/renderer/core/css/cssom/css_keyword_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_numeric_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_style_value.h"
#include "third_party/blink/renderer/core/css/cssom/css_unsupported_style_value.h"
+#include "third_party/blink/renderer/core/css/cssom/cssom_keywords.h"
#include "third_party/blink/renderer/core/css/properties/css_property.h"
+#include "third_party/blink/renderer/core/css/property_registration.h"
namespace blink {
-namespace {
-
-bool IsCSSStyleValueLength(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueLength(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesBaseType(CSSNumericValueType::BaseType::kLength);
}
-bool IsCSSStyleValueNumber(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueNumber(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesNumber();
}
-bool IsCSSStyleValueTime(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueTime(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesBaseType(CSSNumericValueType::BaseType::kTime);
}
-bool IsCSSStyleValueAngle(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueAngle(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesBaseType(CSSNumericValueType::BaseType::kAngle);
}
-bool IsCSSStyleValuePercentage(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValuePercentage(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesPercentage();
}
-bool IsCSSStyleValueFlex(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueResolution(const CSSStyleValue& value) {
+ if (!value.IsNumericValue())
+ return false;
+ return static_cast<const CSSNumericValue&>(value).Type().
+ MatchesBaseType(CSSNumericValueType::BaseType::kResolution);
+}
+
+bool CSSOMTypes::IsCSSStyleValueFlex(const CSSStyleValue& value) {
if (!value.IsNumericValue())
return false;
return static_cast<const CSSNumericValue&>(value).Type().
MatchesBaseType(CSSNumericValueType::BaseType::kFlex);
}
-bool IsCSSStyleValueImage(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueImage(const CSSStyleValue& value) {
return value.GetType() == CSSStyleValue::kURLImageType;
}
-bool IsCSSStyleValueTransform(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValueTransform(const CSSStyleValue& value) {
return value.GetType() == CSSStyleValue::kTransformType;
}
-bool IsCSSStyleValuePosition(const CSSStyleValue& value) {
+bool CSSOMTypes::IsCSSStyleValuePosition(const CSSStyleValue& value) {
return value.GetType() == CSSStyleValue::kPositionType;
}
-}
-
bool CSSOMTypes::IsPropertySupported(CSSPropertyID id) {
switch (id) {
case CSSPropertyVariable:
@@ -87,7 +91,13 @@ bool CSSOMTypes::IsPropertySupported(CSSPropertyID id) {
}
bool CSSOMTypes::PropertyCanTake(CSSPropertyID id,
+ const PropertyRegistration* registration,
const CSSStyleValue& value) {
+
+ if (id == CSSPropertyVariable && registration) {
+ return registration->Syntax().CanTake(value);
+ }
+
if (value.GetType() == CSSStyleValue::kKeywordType) {
return CSSOMKeywords::ValidKeywordForProperty(
id, ToCSSKeywordValue(value));
@@ -107,7 +117,7 @@ bool CSSOMTypes::PropertyCanTake(CSSPropertyID id,
case {{property.property_id}}:
return (
{% for type in property.typedom_types if type != 'Keyword' %}
- {{ "|| " if not loop.first }}IsCSSStyleValue{{type}}(value)
+ {{ "|| " if not loop.first }}CSSOMTypes::IsCSSStyleValue{{type}}(value)
{% endfor %}
);
{% endif %}
diff --git a/chromium/third_party/blink/renderer/build/scripts/core/css/templates/style_property_shorthand.cc.tmpl b/chromium/third_party/blink/renderer/build/scripts/core/css/templates/style_property_shorthand.cc.tmpl
index aef5305626d..f17e0f58f03 100644
--- a/chromium/third_party/blink/renderer/build/scripts/core/css/templates/style_property_shorthand.cc.tmpl
+++ b/chromium/third_party/blink/renderer/build/scripts/core/css/templates/style_property_shorthand.cc.tmpl
@@ -83,7 +83,8 @@ void getMatchingShorthandsForLonghand(
{% for longhand_id, shorthands in longhands_dictionary.items() %}
case {{longhand_id}}: {
{% for shorthand in shorthands %}
- result->UncheckedAppend({{shorthand.name.to_lower_camel_case()}}Shorthand());
+ if (CSSProperty::Get({{shorthand.property_id}}).IsEnabled())
+ result->UncheckedAppend({{shorthand.name.to_lower_camel_case()}}Shorthand());
{% endfor %}
break;
}
diff --git a/chromium/third_party/blink/renderer/build/scripts/templates/InstrumentingProbesInl.h.tmpl b/chromium/third_party/blink/renderer/build/scripts/templates/InstrumentingProbesInl.h.tmpl
index 1fa858b634c..d465ddbcf4d 100644
--- a/chromium/third_party/blink/renderer/build/scripts/templates/InstrumentingProbesInl.h.tmpl
+++ b/chromium/third_party/blink/renderer/build/scripts/templates/InstrumentingProbesInl.h.tmpl
@@ -9,6 +9,7 @@
#define {{file.header_name}}_h
#include "third_party/blink/renderer/platform/heap/heap_allocator.h"
+#include "third_party/blink/renderer/bindings/core/v8/script_source_code.h"
{% for include in config["settings"]["includes"] %}
#include "{{include}}"
{% endfor %}