Summary: | [GTK] REGRESSION(r207396 and r207521) Build broken with Clang 3.6 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Carlos Alberto Lopez Perez <clopez> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bugs-noreply, darin |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 163494 |
Description
Carlos Alberto Lopez Perez
2016-10-18 09:44:13 PDT
This should work: return String { valueName(m_value.valueID).string() }; Not sure why it’s not needed on older compilers. Tested. The patch below fixes the build: --- a/Source/WebCore/css/CSSPrimitiveValue.cpp +++ b/Source/WebCore/css/CSSPrimitiveValue.cpp @@ -936,9 +936,9 @@ ExceptionOr<String> CSSPrimitiveValue::getStringValue() const case CSS_FONT_FAMILY: return String { m_value.fontFamily->familyName }; case CSS_VALUE_ID: - return String { valueName(m_value.valueID) }; + return String { valueName(m_value.valueID).string() }; case CSS_PROPERTY_ID: - return String { propertyName(m_value.propertyID) }; + return String { propertyName(m_value.propertyID).string() }; default: return Exception { INVALID_ACCESS_ERR }; } Will you land it, or do you prefer me to do it? Thanks I would like you to do it. Thanks! Committed r207533: <http://trac.webkit.org/changeset/207533> More info about this issue: It turns out that after fixing this, r207521 caused again a build failure related to the issue. It seem this is caused because Clang 3.6 doesn't implement http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1591 See: https://llvm.org/bugs/show_bug.cgi?id=23904 and https://llvm.org/bugs/show_bug.cgi?id=24694 The code could be patched as follows to make it build: --- a/Source/WebCore/testing/Internals.cpp +++ b/Source/WebCore/testing/Internals.cpp @@ -1156,7 +1156,7 @@ ExceptionOr<String> Internals::configurationForViewport(float devicePixelRatio, restrictMinimumScaleFactorToViewportSize(attributes, IntSize(availableWidth, availableHeight), devicePixelRatio); restrictScaleFactorToInitialScaleIfNotUserScalable(attributes); - return String { "viewport size " + String::number(attributes.layoutSize.width()) + "x" + String::number(attributes.layoutSize.height()) + " scale " + String::number(attributes.initialScale) + " with limits [" + String::number(attributes.minimumScale) + ", " + String::number(attributes.maximumScale) + "] and userScalable " + (attributes.userScalable ? "true" : "false") }; + return String("viewport size " + String::number(attributes.layoutSize.width()) + "x" + String::number(attributes.layoutSize.height()) + " scale " + String::number(attributes.initialScale) + " with limits [" + String::number(attributes.minimumScale) + ", " + String::number(attributes.maximumScale) + "] and userScalable " + (attributes.userScalable ? "true" : "false")); } ExceptionOr<bool> Internals::wasLastChangeUserEdit(Element& textField) @@ -1218,7 +1218,7 @@ ExceptionOr<String> Internals::autofillFieldName(Element& element) if (!is<HTMLFormControlElement>(element)) return Exception { INVALID_NODE_TYPE_ERR }; - return String { downcast<HTMLFormControlElement>(element).autofillData().fieldName }; + return String { downcast<HTMLFormControlElement>(element).autofillData().fieldName.string() }; } ExceptionOr<void> Internals::paintControlTints() But reached this point, I don't think is worth. On the GTK port we only need to support GCC, and this build just fine with GCC 4.9 which is the minimum version of GCC that we support. Using clang is a personal choice, and I have just upgraded to Clang 3.8 that build this just fine. I advice to anyone also having problems to upgrade the version of Clang. Just a heads up. |