<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207396] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207396">207396</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2016-10-16 17:16:05 -0700 (Sun, 16 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move CSS classes from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163494
Reviewed by Sam Weinig.
Source/WebCore:
Removed the "get" prefix from the names of many CSSPrimitiveValue
functions to match WebKit coding style and to disambiguate them
from the public CSS DOM functions that raise exceptions.
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::propertyNamePrefix): Use enum class.
(WebCore::parseJavaScriptCSSPropertyName): Tweak style a bit.
(WebCore::stylePropertyGetter): Refactor to simplify structure.
(WebCore::stylePropertyGetterPixelOrPosPrefix): Ditto. Also use floatValue.
(WebCore::JSCSSStyleDeclaration::putDelegate): Use findIgnoringASCIICase,
and use propagateException to handle ExcpetionOr.
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Tweak style a bit.
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Use a lambda to
initialize a global here.
* bindings/js/JSDOMBinding.h: Added toJSString to support bindings for
functions returning ExceptionOr<String>.
* bindings/scripts/gobject-generate-headers.pl: Deleted.
* css/BasicShapeFunctions.cpp:
(WebCore::convertToLengthSize): Use pairValue.
(WebCore::convertToCenterCoordinate): Use valueID and pairValue.
(WebCore::cssValueToBasicShapeRadius): Ditto.
* css/CSSBasicShapes.cpp:
(WebCore::serializePositionOffset): Ditto.
(WebCore::buildSerializablePositionOffset): Ditto.
(WebCore::CSSBasicShapeCircle::cssText): Ditto.
(WebCore::CSSBasicShapeEllipse::cssText): Ditto.
(WebCore::updateCornerRadiusWidthAndHeight): Ditto.
* css/CSSBorderImageSliceValue.h: Use quadValue.
* css/CSSCalculationValue.cpp:
(WebCore::determineCategory): Use floatValue and doubleValue.
* css/CSSCharsetRule.h: Use ExceptionOr. Also made more things private.
* css/CSSCharsetRule.idl: Use non-legacy exceptions.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::setCssText): Use ExceptionOr.
(WebCore::ComputedStyleExtractor::propertyMatches): Use valueID.
(WebCore::CSSComputedStyleDeclaration::setProperty): Use ExceptionOr.
(WebCore::CSSComputedStyleDeclaration::removeProperty): Ditto.
(WebCore::CSSComputedStyleDeclaration::setPropertyInternal): Ditto.
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): Return
a Ref instead of a RefPtr.
* css/CSSComputedStyleDeclaration.h: Updated for above changes.
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::fixedSize): Use floatValue.
(WebCore::CSSCrossfadeValue::image): Ditto.
(WebCore::CSSCrossfadeValue::blend): Use doubleValue.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::calculateStyleMask): Use valueID.
(WebCore::CSSFontFace::calculateWeightMask): Ditto.
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::familyNameFromPrimitive): Ditto.
(WebCore::CSSFontFaceSet::matchingFaces): Use ExceptoinOr.
(WebCore::CSSFontFaceSet::check): Ditto.
* css/CSSFontFaceSet.h: Updated for above changes.
* css/CSSGradientValue.cpp:
(WebCore::compareStops): Use doubleValue.
(WebCore::CSSGradientValue::addStops): Use floatValue.
(WebCore::positionFromValue): Use floatValue and valudID.
(WebCore::CSSLinearGradientValue::customCSSText): Use doubleValue and valueID.
(WebCore::CSSLinearGradientValue::createGradient): Use floatValue and valueID.
(WebCore::CSSRadialGradientValue::customCSSText): Use doubleValue and valueID.
(WebCore::CSSRadialGradientValue::resolveRadius): Use floatValue.
(WebCore::CSSRadialGradientValue::createGradient): Use valueID.
* css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::insertRule): Use ExceptionOr.
(WebCore::CSSGroupingRule::deleteRule): Ditto.
* css/CSSGroupingRule.h: Updated for above changes.
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::subimageIsPending): Use valueID.
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet): Use floatValue.
* css/CSSMediaRule.idl: Use non-legacy exceptions.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeDegrees): Use doubleValue.
(WebCore::CSSPrimitiveValue::setFloatValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getFloatValue): Replaced getDoubleValue with this,
since getDoubleValue is unused, moving the call to clampTo into this function.
Also changed this to use ExceptionOr.
(WebCore::CSSPrimitiveValue::doubleValue): Renamed from getDoubleValue.
(WebCore::CSSPrimitiveValue::doubleValueInternal): Use Optional instead of a bool
and an out argument to return the value and check for type failure.
(WebCore::CSSPrimitiveValue::setStringValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getStringValue): Ditto.
(WebCore::CSSPrimitiveValue::stringValue): Renamed from getStringValue.
(WebCore::CSSPrimitiveValue::getCounterValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getRectValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getQuadValue): Deleted.
(WebCore::CSSPrimitiveValue::getLengthRepeatValue): Deleted.
(WebCore::CSSPrimitiveValue::getRGBColorValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getPairValue): Deleted.
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use new names for functions.
* css/CSSPrimitiveValue.h: Reorganized the class, moved large inline function bodies
out of the class definition. Updated for the above changes.
* css/CSSPrimitiveValue.idl: Use non-legacy exceptions.
* css/CSSPrimitiveValueMappings.h: Use value instead of getValue, etc.
* css/CSSRule.cpp:
(WebCore::CSSRule::setCssText): Use ExceptionOr.
* css/CSSRule.h: Updated for above change.
* css/CSSRule.idl: Use non-legacy exceptions.
* css/CSSStyleDeclaration.h: Use ExceptionOr.
* css/CSSStyleDeclaration.idl: Use non-legacy exceptions.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::deprecatedInsertRule): Use ExceptionOr.
(WebCore::CSSStyleSheet::insertRule): Ditto.
(WebCore::CSSStyleSheet::deleteRule): Ditto.
(WebCore::CSSStyleSheet::addRule): Ditto.
* css/CSSStyleSheet.h: Updated for the above changes.
* css/CSSStyleSheet.idl: Use non-legacy exceptions.
* css/CSSSupportsRule.idl: Use non-legacy exceptions.
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment): Use valueID instead of getValueID, etc.
(WebCore::convertToLengthSize): Ditto.
(WebCore::CSSToStyleMap::mapFillSize): Ditto.
(WebCore::CSSToStyleMap::mapFillXPosition): Ditto.
(WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
(WebCore::CSSToStyleMap::mapFillMaskSourceType): Ditto.
(WebCore::CSSToStyleMap::mapAnimationDirection): Ditto.
(WebCore::CSSToStyleMap::mapAnimationFillMode): Ditto.
(WebCore::CSSToStyleMap::mapAnimationIterationCount): Ditto.
(WebCore::CSSToStyleMap::mapAnimationName): Ditto.
(WebCore::CSSToStyleMap::mapAnimationPlayState): Ditto.
(WebCore::CSSToStyleMap::mapAnimationProperty): Ditto.
(WebCore::CSSToStyleMap::mapAnimationTimingFunction): Ditto.
(WebCore::CSSToStyleMap::mapAnimationTrigger): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImageSlice): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImageQuad): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat): Ditto.
* css/CSSValue.h: Use ExceptionOr.
* css/CSSValue.idl: Use non-legacy exceptions.
* css/Counter.h: Use stringValue instead of getStringValue, etc.
* css/FontFace.cpp:
(WebCore::FontFace::create): Use ExceptionOr.
(WebCore::FontFace::setFamily): Ditto.
(WebCore::FontFace::setStyle): Ditto.
(WebCore::FontFace::setWeight): Ditto.
(WebCore::FontFace::setStretch): Ditto.
(WebCore::FontFace::setUnicodeRange): Ditto.
(WebCore::FontFace::setVariant): Ditto.
(WebCore::FontFace::setFeatureSettings): Ditto.
* css/FontFace.h: Updated for above changes.
* css/FontFace.idl: Use non-legacy exceptions.
* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::load): Use ExceptionOr.
(WebCore::FontFaceSet::check): Ditto.
* css/FontFaceSet.h: Updated for above changes.
* css/FontFaceSet.idl: Use non-legacy exceptions.
* css/FontVariantBuilder.cpp:
(WebCore::extractFontVariantLigatures): Use valueID instead of getValueID, etc.
(WebCore::extractFontVariantNumeric): Ditto.
(WebCore::extractFontVariantEastAsian): Ditto.
* css/MediaList.cpp:
(WebCore::MediaList::setMediaText): Use ExceptionOr.
(WebCore::MediaList::deleteMedium): Ditto.
(WebCore::MediaList::appendMedium): Ditto.
* css/MediaList.h: Updated for above changes.
* css/MediaList.idl: Use non-legacy exceptions.
* css/MediaQueryEvaluator.cpp:
(WebCore::doubleValue): Use valueID instead of getValueID, etc.
(WebCore::colorGamutEvaluate): Ditto.
(WebCore::invertedColorsEvaluate): Ditto.
(WebCore::orientationEvaluate): Ditto.
(WebCore::evaluateResolution): Ditto.
(WebCore::computeLength): Ditto.
(WebCore::viewModeEvaluate): Ditto.
(WebCore::hoverEvaluate): Ditto.
(WebCore::pointerEvaluate): Ditto.
(WebCore::prefersReducedMotionEvaluate): Ditto.
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setCssText): Use ExceptionOr.
(WebCore::PropertySetCSSStyleDeclaration::setProperty): Ditto.
(WebCore::PropertySetCSSStyleDeclaration::removeProperty): Ditto.
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): Ditto.
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): Ditto.
* css/PropertySetCSSStyleDeclaration.h: Updated for above changes.
Also marked a couple additional functions private.
* css/StyleBuilderConverter.h: Use doubleValue instead of getDoubleValue, etc.
* css/StyleBuilderCustom.h: Ditto.
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue): Ditto.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties): Ditto.
(WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement): Ditto.
(WebCore::StyleResolver::colorFromPrimitiveValue): Ditto.
(WebCore::StyleResolver::createFilterOperations): Ditto.
* css/TransformFunctions.cpp:
(WebCore::transformsForValue): Ditto.
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue): Ditto.
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::WebKitCSSMatrix): Tweaked constructors a bit,
getting rid of the one that uses an ExceptionCode.
(WebCore::WebKitCSSMatrix::create): Moved in here, and use ExceptionOr.
(WebCore::WebKitCSSMatrix::setMatrixValue): Use ExceptionOr.
(WebCore::WebKitCSSMatrix::multiply): Tweak coding style a bit.
(WebCore::WebKitCSSMatrix::inverse): Use ExceptionOr.
(WebCore::WebKitCSSMatrix::translate): Return a Ref instead of RefPtr.
(WebCore::WebKitCSSMatrix::scale): Ditto.
(WebCore::WebKitCSSMatrix::rotate): Ditto.
(WebCore::WebKitCSSMatrix::rotateAxisAngle): Ditto.
(WebCore::WebKitCSSMatrix::skewX): Ditto.
(WebCore::WebKitCSSMatrix::skewY): Ditto.
(WebCore::WebKitCSSMatrix::toString): Tweaked formatting a bit.
* css/WebKitCSSMatrix.h: Updated for above changes.
* css/WebKitCSSMatrix.idl: Use non-legacy extensions.
* css/makeprop.pl:
(handleCurrentColorValue): Use valueID instead of getValueID.
(generateValueSetter): Ditto.
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parse4ValuesFillPosition): Use valueID instead of getValueID, etc.
(WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
(WebCore::CSSParser::parseFillPosition): Ditto.
(WebCore::CSSParser::parseFillRepeat): Ditto.
(WebCore::CSSParser::parseGridPosition): Ditto.
(WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Ditto.
(WebCore::isGridTrackFixedSized): Ditto.
(WebCore::CSSParser::parseRadialGradient): Ditto.
(WebCore::CSSParser::parseBuiltinFilterArguments): Ditto.
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue): Removed the unneeded call to
setPrimitiveType here. The createParserOperator returns an object that
already has the correct primitive type.
* css/parser/CSSPropertyParser.cpp: Updated most cases of calling the old
getXXXValue functions, but not sure if it's right since it is commented out
code that I did not compile.
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::clampRGBComponent): Use intValue instead of getIntValue, etc.
(WebCore::CSSPropertyParserHelpers::parseHSLParameters): Ditto.
(WebCore::CSSPropertyParserHelpers::isHorizontalPositionKeywordOnly): Ditto.
(WebCore::CSSPropertyParserHelpers::isVerticalPositionKeywordOnly): Ditto.
(WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto.
* dom/Range.cpp: Added now-needed include of ExceptionCode.h.
* dom/SelectorQuery.cpp: Ditto.
* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier): Use valueID instead of getValueID, etc.
(WebCore::ApplyStyleCommand::computedFontSize): Ditto.
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty): Ditto.
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle): Ditto.
(WebCore::EditingStyle::extractFontSizeDelta): Ditto.
(WebCore::EditingStyle::textDirection): Ditto.
(WebCore::EditingStyle::prepareToApplyAt): Ditto.
(WebCore::EditingStyle::textDirectionForSelection): Ditto.
(WebCore::fontWeightIsBold): Ditto.
(WebCore::legacyFontSizeFromCSSValue): Ditto.
(WebCore::isTransparentColorValue): Ditto.
(WebCore::hasTransparentBackgroundColor): Ditto.
(WebCore::backgroundColorInEffect): Ditto.
* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToElement): Removed IGNORE_EXCEPTION; that is
what we do by default for things returning ExceptionOr.
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::doApply): Ditto.
(WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Ditto.
* editing/cocoa/HTMLConverter.mm:
(floatValueFromPrimitiveValue): Use floatValue instead of getFloatValue, etc.
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone): Ditto.
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule): Updated to call ExceptionOr-returning functions.
(WebCore::InspectorStyleSheet::deleteRule): Ditto.
(WebCore::InspectorStyleSheet::setStyleText): Ditto.
* svg/SVGLength.cpp:
(WebCore::SVGLength::fromCSSPrimitiveValue): Use floatValue instead of getFloatValue.
Source/WebKit/mac:
* DOM/DOMCSSMediaRule.mm:
(-[DOMCSSMediaRule insertRule:index:]): Use raiseOnDOMError
the new way to handle ExceptionOr instead of ExceptionCode.
(-[DOMCSSMediaRule deleteRule:]): Ditto.
* DOM/DOMCSSPrimitiveValue.mm:
(-[DOMCSSPrimitiveValue setFloatValue:floatValue:]): Ditto.
(-[DOMCSSPrimitiveValue getFloatValue:]): Ditto.
(-[DOMCSSPrimitiveValue setStringValue:stringValue:]): Ditto.
(-[DOMCSSPrimitiveValue getStringValue]): Ditto.
(-[DOMCSSPrimitiveValue getCounterValue]): Ditto.
(-[DOMCSSPrimitiveValue getRectValue]): Ditto.
(-[DOMCSSPrimitiveValue getRGBColorValue]): Ditto.
* DOM/DOMCSSRule.mm:
(-[DOMCSSRule setCssText:]): Ditto.
* DOM/DOMCSSStyleDeclaration.mm:
(-[DOMCSSStyleDeclaration setCssText:]): Ditto.
(-[DOMCSSStyleDeclaration removeProperty:]): Ditto.
(-[DOMCSSStyleDeclaration setProperty:value:priority:]): Ditto.
* DOM/DOMCSSStyleSheet.mm:
(-[DOMCSSStyleSheet insertRule:index:]): Ditto.
(-[DOMCSSStyleSheet deleteRule:]): Ditto.
(-[DOMCSSStyleSheet addRule:style:index:]): Ditto.
(-[DOMCSSStyleSheet removeRule:]): Ditto.
* DOM/DOMCSSValue.mm:
(-[DOMCSSValue setCssText:]): Ditto.
* DOM/DOMMediaList.mm:
(-[DOMMediaList setMediaText:]): Ditto.
(-[DOMMediaList deleteMedium:]): Ditto.
(-[DOMMediaList appendMedium:]): Ditto.
* DOM/ExceptionHandlers.h: Added an overload of raiseDOMException
that works with a WebCore::Exception&& and overloads of
raiseOnDOMError that work with WebCore::ExceptionOr&&.
* DOM/ExceptionHandlers.mm:
(raiseDOMException): Implemented the new version.
Source/WebKit/win:
* DOMCSSClasses.cpp:
(DOMCSSStyleDeclaration::setCssText): Remove ExceptionCode handling.
(DOMCSSStyleDeclaration::setProperty): Ditto.
Source/WebKit2:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
(webkit_dom_css_rule_set_css_text): Updated for ExceptionOr.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
(webkit_dom_css_style_declaration_remove_property): Ditto.
(webkit_dom_css_style_declaration_set_property): Ditto.
(webkit_dom_css_style_declaration_set_css_text): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
(webkit_dom_css_style_sheet_insert_rule): Ditto.
(webkit_dom_css_style_sheet_delete_rule): Ditto.
(webkit_dom_css_style_sheet_add_rule): Ditto.
(webkit_dom_css_style_sheet_remove_rule): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
(webkit_dom_css_value_set_css_text): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
(webkit_dom_media_list_delete_medium): Ditto.
(webkit_dom_media_list_append_medium): Ditto.
(webkit_dom_media_list_set_media_text): Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCSSStyleDeclarationCustomcpp">trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorecssBasicShapeFunctionscpp">trunk/Source/WebCore/css/BasicShapeFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBasicShapescpp">trunk/Source/WebCore/css/CSSBasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBorderImageSliceValueh">trunk/Source/WebCore/css/CSSBorderImageSliceValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCalculationValuecpp">trunk/Source/WebCore/css/CSSCalculationValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCharsetRuleh">trunk/Source/WebCore/css/CSSCharsetRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCharsetRuleidl">trunk/Source/WebCore/css/CSSCharsetRule.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationh">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSCrossfadeValuecpp">trunk/Source/WebCore/css/CSSCrossfadeValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFacecpp">trunk/Source/WebCore/css/CSSFontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSetcpp">trunk/Source/WebCore/css/CSSFontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceSeth">trunk/Source/WebCore/css/CSSFontFaceSet.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValuecpp">trunk/Source/WebCore/css/CSSGradientValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGroupingRulecpp">trunk/Source/WebCore/css/CSSGroupingRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGroupingRuleh">trunk/Source/WebCore/css/CSSGroupingRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageGeneratorValuecpp">trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImageSetValuecpp">trunk/Source/WebCore/css/CSSImageSetValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSMediaRuleh">trunk/Source/WebCore/css/CSSMediaRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSMediaRuleidl">trunk/Source/WebCore/css/CSSMediaRule.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueh">trunk/Source/WebCore/css/CSSPrimitiveValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueidl">trunk/Source/WebCore/css/CSSPrimitiveValue.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSRulecpp">trunk/Source/WebCore/css/CSSRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSRuleh">trunk/Source/WebCore/css/CSSRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSRuleidl">trunk/Source/WebCore/css/CSSRule.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleDeclarationh">trunk/Source/WebCore/css/CSSStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleDeclarationidl">trunk/Source/WebCore/css/CSSStyleDeclaration.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheetcpp">trunk/Source/WebCore/css/CSSStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheeth">trunk/Source/WebCore/css/CSSStyleSheet.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheetidl">trunk/Source/WebCore/css/CSSStyleSheet.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSSupportsRuleidl">trunk/Source/WebCore/css/CSSSupportsRule.idl</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMapcpp">trunk/Source/WebCore/css/CSSToStyleMap.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueidl">trunk/Source/WebCore/css/CSSValue.idl</a></li>
<li><a href="#trunkSourceWebCorecssCounterh">trunk/Source/WebCore/css/Counter.h</a></li>
<li><a href="#trunkSourceWebCorecssFontFacecpp">trunk/Source/WebCore/css/FontFace.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontFaceh">trunk/Source/WebCore/css/FontFace.h</a></li>
<li><a href="#trunkSourceWebCorecssFontFaceidl">trunk/Source/WebCore/css/FontFace.idl</a></li>
<li><a href="#trunkSourceWebCorecssFontFaceSetcpp">trunk/Source/WebCore/css/FontFaceSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssFontFaceSeth">trunk/Source/WebCore/css/FontFaceSet.h</a></li>
<li><a href="#trunkSourceWebCorecssFontFaceSetidl">trunk/Source/WebCore/css/FontFaceSet.idl</a></li>
<li><a href="#trunkSourceWebCorecssFontVariantBuildercpp">trunk/Source/WebCore/css/FontVariantBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaListcpp">trunk/Source/WebCore/css/MediaList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaListh">trunk/Source/WebCore/css/MediaList.h</a></li>
<li><a href="#trunkSourceWebCorecssMediaListidl">trunk/Source/WebCore/css/MediaList.idl</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryEvaluatorcpp">trunk/Source/WebCore/css/MediaQueryEvaluator.cpp</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryExpcpp">trunk/Source/WebCore/css/MediaQueryExp.cpp</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationh">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertiescpp">trunk/Source/WebCore/css/StyleProperties.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssTransformFunctionscpp">trunk/Source/WebCore/css/TransformFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorecssViewportStyleResolvercpp">trunk/Source/WebCore/css/ViewportStyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSMatrixcpp">trunk/Source/WebCore/css/WebKitCSSMatrix.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSMatrixh">trunk/Source/WebCore/css/WebKitCSSMatrix.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSMatrixidl">trunk/Source/WebCore/css/WebKitCSSMatrix.idl</a></li>
<li><a href="#trunkSourceWebCorecssmakeproppl">trunk/Source/WebCore/css/makeprop.pl</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParsercpp">trunk/Source/WebCore/css/parser/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserValuescpp">trunk/Source/WebCore/css/parser/CSSParserValues.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParserHelperscpp">trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSelectorQuerycpp">trunk/Source/WebCore/dom/SelectorQuery.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingStylecpp">trunk/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingRemoveCSSPropertyCommandcpp">trunk/Source/WebCore/editing/RemoveCSSPropertyCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingReplaceSelectionCommandcpp">trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingmarkupcpp">trunk/Source/WebCore/editing/markup.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorStyleSheetcpp">trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLengthcpp">trunk/Source/WebCore/svg/SVGLength.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMCSSMediaRulemm">trunk/Source/WebKit/mac/DOM/DOMCSSMediaRule.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMCSSPrimitiveValuemm">trunk/Source/WebKit/mac/DOM/DOMCSSPrimitiveValue.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMCSSRulemm">trunk/Source/WebKit/mac/DOM/DOMCSSRule.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMCSSStyleDeclarationmm">trunk/Source/WebKit/mac/DOM/DOMCSSStyleDeclaration.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMCSSStyleSheetmm">trunk/Source/WebKit/mac/DOM/DOMCSSStyleSheet.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMCSSValuemm">trunk/Source/WebKit/mac/DOM/DOMCSSValue.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMDOMMediaListmm">trunk/Source/WebKit/mac/DOM/DOMMediaList.mm</a></li>
<li><a href="#trunkSourceWebKitmacDOMExceptionHandlersh">trunk/Source/WebKit/mac/DOM/ExceptionHandlers.h</a></li>
<li><a href="#trunkSourceWebKitmacDOMExceptionHandlersmm">trunk/Source/WebKit/mac/DOM/ExceptionHandlers.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinDOMCSSClassescpp">trunk/Source/WebKit/win/DOMCSSClasses.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSRulecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSStyleDeclarationcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSStyleSheetcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSValuecpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMMediaListcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsscriptsgobjectgenerateheaderspl">trunk/Source/WebCore/bindings/scripts/gobject-generate-headers.pl</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/ChangeLog        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,3 +1,317 @@
</span><ins>+2016-10-16 Darin Adler <darin@apple.com>
+
+ Move CSS classes from ExceptionCode to Exception
+ https://bugs.webkit.org/show_bug.cgi?id=163494
+
+ Reviewed by Sam Weinig.
+
+ Removed the "get" prefix from the names of many CSSPrimitiveValue
+ functions to match WebKit coding style and to disambiguate them
+ from the public CSS DOM functions that raise exceptions.
+
+ * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+ (WebCore::propertyNamePrefix): Use enum class.
+ (WebCore::parseJavaScriptCSSPropertyName): Tweak style a bit.
+ (WebCore::stylePropertyGetter): Refactor to simplify structure.
+ (WebCore::stylePropertyGetterPixelOrPosPrefix): Ditto. Also use floatValue.
+ (WebCore::JSCSSStyleDeclaration::putDelegate): Use findIgnoringASCIICase,
+ and use propagateException to handle ExcpetionOr.
+ (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Tweak style a bit.
+ (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Use a lambda to
+ initialize a global here.
+
+ * bindings/js/JSDOMBinding.h: Added toJSString to support bindings for
+ functions returning ExceptionOr<String>.
+
+ * bindings/scripts/gobject-generate-headers.pl: Deleted.
+
+ * css/BasicShapeFunctions.cpp:
+ (WebCore::convertToLengthSize): Use pairValue.
+ (WebCore::convertToCenterCoordinate): Use valueID and pairValue.
+ (WebCore::cssValueToBasicShapeRadius): Ditto.
+ * css/CSSBasicShapes.cpp:
+ (WebCore::serializePositionOffset): Ditto.
+ (WebCore::buildSerializablePositionOffset): Ditto.
+ (WebCore::CSSBasicShapeCircle::cssText): Ditto.
+ (WebCore::CSSBasicShapeEllipse::cssText): Ditto.
+ (WebCore::updateCornerRadiusWidthAndHeight): Ditto.
+ * css/CSSBorderImageSliceValue.h: Use quadValue.
+ * css/CSSCalculationValue.cpp:
+ (WebCore::determineCategory): Use floatValue and doubleValue.
+
+ * css/CSSCharsetRule.h: Use ExceptionOr. Also made more things private.
+ * css/CSSCharsetRule.idl: Use non-legacy exceptions.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::setCssText): Use ExceptionOr.
+ (WebCore::ComputedStyleExtractor::propertyMatches): Use valueID.
+ (WebCore::CSSComputedStyleDeclaration::setProperty): Use ExceptionOr.
+ (WebCore::CSSComputedStyleDeclaration::removeProperty): Ditto.
+ (WebCore::CSSComputedStyleDeclaration::setPropertyInternal): Ditto.
+ (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): Return
+ a Ref instead of a RefPtr.
+ * css/CSSComputedStyleDeclaration.h: Updated for above changes.
+
+ * css/CSSCrossfadeValue.cpp:
+ (WebCore::CSSCrossfadeValue::fixedSize): Use floatValue.
+ (WebCore::CSSCrossfadeValue::image): Ditto.
+ (WebCore::CSSCrossfadeValue::blend): Use doubleValue.
+
+ * css/CSSFontFace.cpp:
+ (WebCore::CSSFontFace::calculateStyleMask): Use valueID.
+ (WebCore::CSSFontFace::calculateWeightMask): Ditto.
+ * css/CSSFontFaceSet.cpp:
+ (WebCore::CSSFontFaceSet::familyNameFromPrimitive): Ditto.
+ (WebCore::CSSFontFaceSet::matchingFaces): Use ExceptoinOr.
+ (WebCore::CSSFontFaceSet::check): Ditto.
+ * css/CSSFontFaceSet.h: Updated for above changes.
+
+ * css/CSSGradientValue.cpp:
+ (WebCore::compareStops): Use doubleValue.
+ (WebCore::CSSGradientValue::addStops): Use floatValue.
+ (WebCore::positionFromValue): Use floatValue and valudID.
+ (WebCore::CSSLinearGradientValue::customCSSText): Use doubleValue and valueID.
+ (WebCore::CSSLinearGradientValue::createGradient): Use floatValue and valueID.
+ (WebCore::CSSRadialGradientValue::customCSSText): Use doubleValue and valueID.
+ (WebCore::CSSRadialGradientValue::resolveRadius): Use floatValue.
+ (WebCore::CSSRadialGradientValue::createGradient): Use valueID.
+
+ * css/CSSGroupingRule.cpp:
+ (WebCore::CSSGroupingRule::insertRule): Use ExceptionOr.
+ (WebCore::CSSGroupingRule::deleteRule): Ditto.
+ * css/CSSGroupingRule.h: Updated for above changes.
+
+ * css/CSSImageGeneratorValue.cpp:
+ (WebCore::CSSImageGeneratorValue::subimageIsPending): Use valueID.
+ (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
+
+ * css/CSSImageSetValue.cpp:
+ (WebCore::CSSImageSetValue::fillImageSet): Use floatValue.
+
+ * css/CSSMediaRule.idl: Use non-legacy exceptions.
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::CSSPrimitiveValue::computeDegrees): Use doubleValue.
+ (WebCore::CSSPrimitiveValue::setFloatValue): Use ExceptionOr.
+ (WebCore::CSSPrimitiveValue::getFloatValue): Replaced getDoubleValue with this,
+ since getDoubleValue is unused, moving the call to clampTo into this function.
+ Also changed this to use ExceptionOr.
+ (WebCore::CSSPrimitiveValue::doubleValue): Renamed from getDoubleValue.
+ (WebCore::CSSPrimitiveValue::doubleValueInternal): Use Optional instead of a bool
+ and an out argument to return the value and check for type failure.
+ (WebCore::CSSPrimitiveValue::setStringValue): Use ExceptionOr.
+ (WebCore::CSSPrimitiveValue::getStringValue): Ditto.
+ (WebCore::CSSPrimitiveValue::stringValue): Renamed from getStringValue.
+ (WebCore::CSSPrimitiveValue::getCounterValue): Use ExceptionOr.
+ (WebCore::CSSPrimitiveValue::getRectValue): Use ExceptionOr.
+ (WebCore::CSSPrimitiveValue::getQuadValue): Deleted.
+ (WebCore::CSSPrimitiveValue::getLengthRepeatValue): Deleted.
+ (WebCore::CSSPrimitiveValue::getRGBColorValue): Use ExceptionOr.
+ (WebCore::CSSPrimitiveValue::getPairValue): Deleted.
+ (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use new names for functions.
+ * css/CSSPrimitiveValue.h: Reorganized the class, moved large inline function bodies
+ out of the class definition. Updated for the above changes.
+ * css/CSSPrimitiveValue.idl: Use non-legacy exceptions.
+
+ * css/CSSPrimitiveValueMappings.h: Use value instead of getValue, etc.
+
+ * css/CSSRule.cpp:
+ (WebCore::CSSRule::setCssText): Use ExceptionOr.
+ * css/CSSRule.h: Updated for above change.
+ * css/CSSRule.idl: Use non-legacy exceptions.
+
+ * css/CSSStyleDeclaration.h: Use ExceptionOr.
+ * css/CSSStyleDeclaration.idl: Use non-legacy exceptions.
+
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::deprecatedInsertRule): Use ExceptionOr.
+ (WebCore::CSSStyleSheet::insertRule): Ditto.
+ (WebCore::CSSStyleSheet::deleteRule): Ditto.
+ (WebCore::CSSStyleSheet::addRule): Ditto.
+ * css/CSSStyleSheet.h: Updated for the above changes.
+ * css/CSSStyleSheet.idl: Use non-legacy exceptions.
+
+ * css/CSSSupportsRule.idl: Use non-legacy exceptions.
+
+ * css/CSSToStyleMap.cpp:
+ (WebCore::CSSToStyleMap::mapFillAttachment): Use valueID instead of getValueID, etc.
+ (WebCore::convertToLengthSize): Ditto.
+ (WebCore::CSSToStyleMap::mapFillSize): Ditto.
+ (WebCore::CSSToStyleMap::mapFillXPosition): Ditto.
+ (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
+ (WebCore::CSSToStyleMap::mapFillMaskSourceType): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationDirection): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationFillMode): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationIterationCount): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationName): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationPlayState): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationProperty): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationTimingFunction): Ditto.
+ (WebCore::CSSToStyleMap::mapAnimationTrigger): Ditto.
+ (WebCore::CSSToStyleMap::mapNinePieceImageSlice): Ditto.
+ (WebCore::CSSToStyleMap::mapNinePieceImageQuad): Ditto.
+ (WebCore::CSSToStyleMap::mapNinePieceImageRepeat): Ditto.
+
+ * css/CSSValue.h: Use ExceptionOr.
+ * css/CSSValue.idl: Use non-legacy exceptions.
+
+ * css/Counter.h: Use stringValue instead of getStringValue, etc.
+
+ * css/FontFace.cpp:
+ (WebCore::FontFace::create): Use ExceptionOr.
+ (WebCore::FontFace::setFamily): Ditto.
+ (WebCore::FontFace::setStyle): Ditto.
+ (WebCore::FontFace::setWeight): Ditto.
+ (WebCore::FontFace::setStretch): Ditto.
+ (WebCore::FontFace::setUnicodeRange): Ditto.
+ (WebCore::FontFace::setVariant): Ditto.
+ (WebCore::FontFace::setFeatureSettings): Ditto.
+ * css/FontFace.h: Updated for above changes.
+ * css/FontFace.idl: Use non-legacy exceptions.
+
+ * css/FontFaceSet.cpp:
+ (WebCore::FontFaceSet::load): Use ExceptionOr.
+ (WebCore::FontFaceSet::check): Ditto.
+ * css/FontFaceSet.h: Updated for above changes.
+ * css/FontFaceSet.idl: Use non-legacy exceptions.
+
+ * css/FontVariantBuilder.cpp:
+ (WebCore::extractFontVariantLigatures): Use valueID instead of getValueID, etc.
+ (WebCore::extractFontVariantNumeric): Ditto.
+ (WebCore::extractFontVariantEastAsian): Ditto.
+
+ * css/MediaList.cpp:
+ (WebCore::MediaList::setMediaText): Use ExceptionOr.
+ (WebCore::MediaList::deleteMedium): Ditto.
+ (WebCore::MediaList::appendMedium): Ditto.
+ * css/MediaList.h: Updated for above changes.
+ * css/MediaList.idl: Use non-legacy exceptions.
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::doubleValue): Use valueID instead of getValueID, etc.
+ (WebCore::colorGamutEvaluate): Ditto.
+ (WebCore::invertedColorsEvaluate): Ditto.
+ (WebCore::orientationEvaluate): Ditto.
+ (WebCore::evaluateResolution): Ditto.
+ (WebCore::computeLength): Ditto.
+ (WebCore::viewModeEvaluate): Ditto.
+ (WebCore::hoverEvaluate): Ditto.
+ (WebCore::pointerEvaluate): Ditto.
+ (WebCore::prefersReducedMotionEvaluate): Ditto.
+
+ * css/PropertySetCSSStyleDeclaration.cpp:
+ (WebCore::PropertySetCSSStyleDeclaration::setCssText): Use ExceptionOr.
+ (WebCore::PropertySetCSSStyleDeclaration::setProperty): Ditto.
+ (WebCore::PropertySetCSSStyleDeclaration::removeProperty): Ditto.
+ (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): Ditto.
+ (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): Ditto.
+ * css/PropertySetCSSStyleDeclaration.h: Updated for above changes.
+ Also marked a couple additional functions private.
+
+ * css/StyleBuilderConverter.h: Use doubleValue instead of getDoubleValue, etc.
+ * css/StyleBuilderCustom.h: Ditto.
+ * css/StyleProperties.cpp:
+ (WebCore::StyleProperties::getLayeredShorthandValue): Ditto.
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::MatchResult::addMatchedProperties): Ditto.
+ (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement): Ditto.
+ (WebCore::StyleResolver::colorFromPrimitiveValue): Ditto.
+ (WebCore::StyleResolver::createFilterOperations): Ditto.
+ * css/TransformFunctions.cpp:
+ (WebCore::transformsForValue): Ditto.
+ * css/ViewportStyleResolver.cpp:
+ (WebCore::ViewportStyleResolver::getViewportArgumentValue): Ditto.
+
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::WebKitCSSMatrix): Tweaked constructors a bit,
+ getting rid of the one that uses an ExceptionCode.
+ (WebCore::WebKitCSSMatrix::create): Moved in here, and use ExceptionOr.
+ (WebCore::WebKitCSSMatrix::setMatrixValue): Use ExceptionOr.
+ (WebCore::WebKitCSSMatrix::multiply): Tweak coding style a bit.
+ (WebCore::WebKitCSSMatrix::inverse): Use ExceptionOr.
+ (WebCore::WebKitCSSMatrix::translate): Return a Ref instead of RefPtr.
+ (WebCore::WebKitCSSMatrix::scale): Ditto.
+ (WebCore::WebKitCSSMatrix::rotate): Ditto.
+ (WebCore::WebKitCSSMatrix::rotateAxisAngle): Ditto.
+ (WebCore::WebKitCSSMatrix::skewX): Ditto.
+ (WebCore::WebKitCSSMatrix::skewY): Ditto.
+ (WebCore::WebKitCSSMatrix::toString): Tweaked formatting a bit.
+ * css/WebKitCSSMatrix.h: Updated for above changes.
+ * css/WebKitCSSMatrix.idl: Use non-legacy extensions.
+
+ * css/makeprop.pl:
+ (handleCurrentColorValue): Use valueID instead of getValueID.
+ (generateValueSetter): Ditto.
+
+ * css/parser/CSSParser.cpp:
+ (WebCore::CSSParser::parse4ValuesFillPosition): Use valueID instead of getValueID, etc.
+ (WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
+ (WebCore::CSSParser::parseFillPosition): Ditto.
+ (WebCore::CSSParser::parseFillRepeat): Ditto.
+ (WebCore::CSSParser::parseGridPosition): Ditto.
+ (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Ditto.
+ (WebCore::isGridTrackFixedSized): Ditto.
+ (WebCore::CSSParser::parseRadialGradient): Ditto.
+ (WebCore::CSSParser::parseBuiltinFilterArguments): Ditto.
+
+ * css/parser/CSSParserValues.cpp:
+ (WebCore::CSSParserValue::createCSSValue): Removed the unneeded call to
+ setPrimitiveType here. The createParserOperator returns an object that
+ already has the correct primitive type.
+
+ * css/parser/CSSPropertyParser.cpp: Updated most cases of calling the old
+ getXXXValue functions, but not sure if it's right since it is commented out
+ code that I did not compile.
+
+ * css/parser/CSSPropertyParserHelpers.cpp:
+ (WebCore::CSSPropertyParserHelpers::clampRGBComponent): Use intValue instead of getIntValue, etc.
+ (WebCore::CSSPropertyParserHelpers::parseHSLParameters): Ditto.
+ (WebCore::CSSPropertyParserHelpers::isHorizontalPositionKeywordOnly): Ditto.
+ (WebCore::CSSPropertyParserHelpers::isVerticalPositionKeywordOnly): Ditto.
+ (WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Ditto.
+ (WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto.
+
+ * dom/Range.cpp: Added now-needed include of ExceptionCode.h.
+ * dom/SelectorQuery.cpp: Ditto.
+
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::toIdentifier): Use valueID instead of getValueID, etc.
+ (WebCore::ApplyStyleCommand::computedFontSize): Ditto.
+ * editing/EditingStyle.cpp:
+ (WebCore::identifierForStyleProperty): Ditto.
+ (WebCore::HTMLElementEquivalent::valueIsPresentInStyle): Ditto.
+ (WebCore::EditingStyle::extractFontSizeDelta): Ditto.
+ (WebCore::EditingStyle::textDirection): Ditto.
+ (WebCore::EditingStyle::prepareToApplyAt): Ditto.
+ (WebCore::EditingStyle::textDirectionForSelection): Ditto.
+ (WebCore::fontWeightIsBold): Ditto.
+ (WebCore::legacyFontSizeFromCSSValue): Ditto.
+ (WebCore::isTransparentColorValue): Ditto.
+ (WebCore::hasTransparentBackgroundColor): Ditto.
+ (WebCore::backgroundColorInEffect): Ditto.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::applyEditingStyleToElement): Removed IGNORE_EXCEPTION; that is
+ what we do by default for things returning ExceptionOr.
+ * editing/RemoveCSSPropertyCommand.cpp:
+ (WebCore::RemoveCSSPropertyCommand::doApply): Ditto.
+ (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Ditto.
+
+ * editing/cocoa/HTMLConverter.mm:
+ (floatValueFromPrimitiveValue): Use floatValue instead of getFloatValue, etc.
+ * editing/markup.cpp:
+ (WebCore::propertyMissingOrEqualToNone): Ditto.
+
+ * inspector/InspectorStyleSheet.cpp:
+ (WebCore::InspectorStyleSheet::addRule): Updated to call ExceptionOr-returning functions.
+ (WebCore::InspectorStyleSheet::deleteRule): Ditto.
+ (WebCore::InspectorStyleSheet::setStyleText): Ditto.
+
+ * svg/SVGLength.cpp:
+ (WebCore::SVGLength::fromCSSPrimitiveValue): Use floatValue instead of getFloatValue.
+
</ins><span class="cx"> 2016-10-16 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] Styles for StartButton are missing
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCSSStyleDeclarationCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007-2009, 2013, 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007-2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx"> #include <wtf/ASCIICType.h>
</span><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx"> #include <wtf/text/StringConcatenate.h>
</span><del>-#include <wtf/text/WTFString.h>
</del><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="lines">@@ -55,6 +54,7 @@
</span><span class="cx">
</span><span class="cx"> void* root(CSSStyleDeclaration* style)
</span><span class="cx"> {
</span><ins>+ ASSERT(style);
</ins><span class="cx"> if (auto* parentRule = style->parentRule())
</span><span class="cx"> return root(parentRule);
</span><span class="cx"> if (auto* styleSheet = style->parentStyleSheet())
</span><span class="lines">@@ -69,25 +69,11 @@
</span><span class="cx"> visitor.addOpaqueRoot(root(&wrapped()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-class CSSPropertyInfo {
-public:
- CSSPropertyID propertyID;
- bool hadPixelOrPosPrefix;
-};
-
-enum PropertyNamePrefix {
- PropertyNamePrefixNone,
- PropertyNamePrefixCSS,
- PropertyNamePrefixPixel,
- PropertyNamePrefixPos,
</del><ins>+enum class PropertyNamePrefix {
+ None, Epub, CSS, Pixel, Pos, WebKit,
</ins><span class="cx"> #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
</span><del>- PropertyNamePrefixApple,
</del><ins>+ Apple, KHTML,
</ins><span class="cx"> #endif
</span><del>- PropertyNamePrefixEpub,
-#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
- PropertyNamePrefixKHTML,
-#endif
- PropertyNamePrefixWebKit
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<size_t prefixCStringLength>
</span><span class="lines">@@ -107,7 +93,7 @@
</span><span class="cx">
</span><span class="cx"> // The prefix within the property name must be followed by a capital letter.
</span><span class="cx"> // Other characters in the prefix within the property name must be lowercase.
</span><del>- if (propertyName.length() < (prefixLength + 1))
</del><ins>+ if (propertyName.length() < prefixLength + 1)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> for (size_t i = offset; i < prefixLength; ++i) {
</span><span class="lines">@@ -117,10 +103,11 @@
</span><span class="cx">
</span><span class="cx"> if (!isASCIIUpper(propertyName[prefixLength]))
</span><span class="cx"> return false;
</span><ins>+
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PropertyNamePrefix getCSSPropertyNamePrefix(const StringImpl& propertyName)
</del><ins>+static PropertyNamePrefix propertyNamePrefix(const StringImpl& propertyName)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(propertyName.length());
</span><span class="cx">
</span><span class="lines">@@ -130,37 +117,37 @@
</span><span class="cx"> #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
</span><span class="cx"> case 'a':
</span><span class="cx"> if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "apple"))
</span><del>- return PropertyNamePrefixApple;
</del><ins>+ return PropertyNamePrefix::Apple;
</ins><span class="cx"> break;
</span><span class="cx"> #endif
</span><span class="cx"> case 'c':
</span><span class="cx"> if (matchesCSSPropertyNamePrefix(propertyName, "css"))
</span><del>- return PropertyNamePrefixCSS;
</del><ins>+ return PropertyNamePrefix::CSS;
</ins><span class="cx"> break;
</span><span class="cx"> #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
</span><span class="cx"> case 'k':
</span><span class="cx"> if (RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled() && matchesCSSPropertyNamePrefix(propertyName, "khtml"))
</span><del>- return PropertyNamePrefixKHTML;
</del><ins>+ return PropertyNamePrefix::KHTML;
</ins><span class="cx"> break;
</span><span class="cx"> #endif
</span><span class="cx"> case 'e':
</span><span class="cx"> if (matchesCSSPropertyNamePrefix(propertyName, "epub"))
</span><del>- return PropertyNamePrefixEpub;
</del><ins>+ return PropertyNamePrefix::Epub;
</ins><span class="cx"> break;
</span><span class="cx"> case 'p':
</span><span class="cx"> if (matchesCSSPropertyNamePrefix(propertyName, "pos"))
</span><del>- return PropertyNamePrefixPos;
</del><ins>+ return PropertyNamePrefix::Pos;
</ins><span class="cx"> if (matchesCSSPropertyNamePrefix(propertyName, "pixel"))
</span><del>- return PropertyNamePrefixPixel;
</del><ins>+ return PropertyNamePrefix::Pixel;
</ins><span class="cx"> break;
</span><span class="cx"> case 'w':
</span><span class="cx"> if (matchesCSSPropertyNamePrefix(propertyName, "webkit"))
</span><del>- return PropertyNamePrefixWebKit;
</del><ins>+ return PropertyNamePrefix::WebKit;
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- return PropertyNamePrefixNone;
</del><ins>+ return PropertyNamePrefix::None;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline void writeWebKitPrefix(char*& buffer)
</span><span class="lines">@@ -185,7 +172,12 @@
</span><span class="cx"> *buffer++ = '-';
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CSSPropertyInfo cssPropertyIDForJSCSSPropertyName(PropertyName propertyName)
</del><ins>+struct CSSPropertyInfo {
+ CSSPropertyID propertyID;
+ bool hadPixelOrPosPrefix;
+};
+
+static CSSPropertyInfo parseJavaScriptCSSPropertyName(PropertyName propertyName)
</ins><span class="cx"> {
</span><span class="cx"> CSSPropertyInfo propertyInfo = {CSSPropertyInvalid, false};
</span><span class="cx"> bool hadPixelOrPosPrefix = false;
</span><span class="lines">@@ -198,7 +190,7 @@
</span><span class="cx"> return propertyInfo;
</span><span class="cx">
</span><span class="cx"> String stringForCache = String(propertyNameString);
</span><del>- typedef HashMap<String, CSSPropertyInfo> CSSPropertyInfoMap;
</del><ins>+ using CSSPropertyInfoMap = HashMap<String, CSSPropertyInfo>;
</ins><span class="cx"> static NeverDestroyed<CSSPropertyInfoMap> propertyInfoCache;
</span><span class="cx"> propertyInfo = propertyInfoCache.get().get(stringForCache);
</span><span class="cx"> if (propertyInfo.propertyID)
</span><span class="lines">@@ -213,35 +205,35 @@
</span><span class="cx"> // Prefixes CSS, Pixel, Pos are ignored.
</span><span class="cx"> // Prefixes Apple, KHTML and Webkit are transposed to "-webkit-".
</span><span class="cx"> // The prefix "Epub" becomes "-epub-".
</span><del>- switch (getCSSPropertyNamePrefix(*propertyNameString)) {
- case PropertyNamePrefixNone:
</del><ins>+ switch (propertyNamePrefix(*propertyNameString)) {
+ case PropertyNamePrefix::None:
</ins><span class="cx"> if (isASCIIUpper((*propertyNameString)[0]))
</span><span class="cx"> return propertyInfo;
</span><span class="cx"> break;
</span><del>- case PropertyNamePrefixCSS:
</del><ins>+ case PropertyNamePrefix::CSS:
</ins><span class="cx"> i += 3;
</span><span class="cx"> break;
</span><del>- case PropertyNamePrefixPixel:
</del><ins>+ case PropertyNamePrefix::Pixel:
</ins><span class="cx"> i += 5;
</span><span class="cx"> hadPixelOrPosPrefix = true;
</span><span class="cx"> break;
</span><del>- case PropertyNamePrefixPos:
</del><ins>+ case PropertyNamePrefix::Pos:
</ins><span class="cx"> i += 3;
</span><span class="cx"> hadPixelOrPosPrefix = true;
</span><span class="cx"> break;
</span><span class="cx"> #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
</span><del>- case PropertyNamePrefixApple:
- case PropertyNamePrefixKHTML:
</del><ins>+ case PropertyNamePrefix::Apple:
+ case PropertyNamePrefix::KHTML:
</ins><span class="cx"> ASSERT(RuntimeEnabledFeatures::sharedFeatures().legacyCSSVendorPrefixesEnabled());
</span><span class="cx"> writeWebKitPrefix(bufferPtr);
</span><span class="cx"> i += 5;
</span><span class="cx"> break;
</span><span class="cx"> #endif
</span><del>- case PropertyNamePrefixEpub:
</del><ins>+ case PropertyNamePrefix::Epub:
</ins><span class="cx"> writeEpubPrefix(bufferPtr);
</span><span class="cx"> i += 4;
</span><span class="cx"> break;
</span><del>- case PropertyNamePrefixWebKit:
</del><ins>+ case PropertyNamePrefix::WebKit:
</ins><span class="cx"> writeWebKitPrefix(bufferPtr);
</span><span class="cx"> i += 6;
</span><span class="cx"> break;
</span><span class="lines">@@ -258,7 +250,7 @@
</span><span class="cx">
</span><span class="cx"> for (; i < length; ++i) {
</span><span class="cx"> UChar c = (*propertyNameString)[i];
</span><del>- if (!c || c >= 0x7F)
</del><ins>+ if (!c || !isASCII(c))
</ins><span class="cx"> return propertyInfo; // illegal character
</span><span class="cx"> if (isASCIIUpper(c)) {
</span><span class="cx"> size_t bufferSizeLeft = stringEnd - bufferPtr;
</span><span class="lines">@@ -266,7 +258,7 @@
</span><span class="cx"> if (propertySizeLeft > bufferSizeLeft)
</span><span class="cx"> return propertyInfo;
</span><span class="cx"> *bufferPtr++ = '-';
</span><del>- *bufferPtr++ = toASCIILower(c);
</del><ins>+ *bufferPtr++ = toASCIILowerUnchecked(c);
</ins><span class="cx"> } else
</span><span class="cx"> *bufferPtr++ = c;
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(bufferPtr < bufferEnd);
</span><span class="lines">@@ -279,9 +271,8 @@
</span><span class="cx"> cssPropertyNameIOSAliasing(buffer, name, outputLength);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- const Property* hashTableEntry = findProperty(name, outputLength);
- int propertyID = hashTableEntry ? hashTableEntry->id : 0;
- if (propertyID) {
</del><ins>+ auto* hashTableEntry = findProperty(name, outputLength);
+ if (auto propertyID = hashTableEntry ? hashTableEntry->id : 0) {
</ins><span class="cx"> propertyInfo.hadPixelOrPosPrefix = hadPixelOrPosPrefix;
</span><span class="cx"> propertyInfo.propertyID = static_cast<CSSPropertyID>(propertyID);
</span><span class="cx"> propertyInfoCache.get().add(stringForCache, propertyInfo);
</span><span class="lines">@@ -289,76 +280,71 @@
</span><span class="cx"> return propertyInfo;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline JSValue getPropertyValueFallback(ExecState* exec, JSCSSStyleDeclaration* thisObj, unsigned index)
</del><ins>+static inline JSValue stylePropertyGetter(ExecState& state, JSCSSStyleDeclaration& thisObject, CSSPropertyID propertyID, const RefPtr<CSSValue>& value)
</ins><span class="cx"> {
</span><del>- // If the property is a shorthand property (such as "padding"),
- // it can only be accessed using getPropertyValue.
- return jsStringWithCache(exec, thisObj->wrapped().getPropertyValueInternal(static_cast<CSSPropertyID>(index)));
</del><ins>+ if (value)
+ return jsStringOrNull(&state, value->cssText());
+ // If the property is a shorthand property (such as "padding"), it can only be accessed using getPropertyValue.
+ return jsStringWithCache(&state, thisObject.wrapped().getPropertyValueInternal(propertyID));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static inline JSValue cssPropertyGetterPixelOrPosPrefix(ExecState* exec, JSCSSStyleDeclaration* thisObj, unsigned propertyID)
</del><ins>+static inline JSValue stylePropertyGetter(ExecState& state, JSCSSStyleDeclaration& thisObject, CSSPropertyID propertyID)
</ins><span class="cx"> {
</span><del>- // Set up pixelOrPos boolean to handle the fact that
- // pixelTop returns "CSS Top" as number value in unit pixels
- // posTop returns "CSS top" as number value in unit pixels _if_ its a
- // positioned element. if it is not a positioned element, return 0
- // from MSIE documentation FIXME: IMPLEMENT THAT (Dirk)
- RefPtr<CSSValue> v = thisObj->wrapped().getPropertyCSSValueInternal(static_cast<CSSPropertyID>(propertyID));
- if (v) {
- if (v->isPrimitiveValue())
- return jsNumber(static_pointer_cast<CSSPrimitiveValue>(v)->getFloatValue(CSSPrimitiveValue::CSS_PX));
- return jsStringOrNull(exec, v->cssText());
- }
</del><ins>+ return stylePropertyGetter(state, thisObject, propertyID, thisObject.wrapped().getPropertyCSSValueInternal(propertyID));
+}
</ins><span class="cx">
</span><del>- return getPropertyValueFallback(exec, thisObj, propertyID);
</del><ins>+static inline JSValue stylePropertyGetterPixelOrPosPrefix(ExecState& state, JSCSSStyleDeclaration& thisObject, CSSPropertyID propertyID)
+{
+ // Call this version of the getter so that, e.g., pixelTop returns top as a number
+ // in pixel units and posTop should does the same _if_ this is a positioned element.
+ // FIXME: If not a positioned element, MSIE documentation says posTop should return 0; this rule is not implemented.
+ auto value = thisObject.wrapped().getPropertyCSSValueInternal(propertyID);
+ if (is<CSSPrimitiveValue>(value.get()))
+ return jsNumber(downcast<CSSPrimitiveValue>(*value).floatValue(CSSPrimitiveValue::CSS_PX));
+ return stylePropertyGetter(state, thisObject, propertyID, value);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static inline JSValue cssPropertyGetter(ExecState* exec, JSCSSStyleDeclaration* thisObj, unsigned propertyID)
</del><ins>+static inline JSValue stylePropertyGetter(ExecState& state, JSCSSStyleDeclaration& thisObject, const CSSPropertyInfo& propertyInfo)
</ins><span class="cx"> {
</span><del>- RefPtr<CSSValue> v = thisObj->wrapped().getPropertyCSSValueInternal(static_cast<CSSPropertyID>(propertyID));
- if (v)
- return jsStringOrNull(exec, v->cssText());
-
- return getPropertyValueFallback(exec, thisObj, propertyID);
</del><ins>+ if (propertyInfo.hadPixelOrPosPrefix)
+ return stylePropertyGetterPixelOrPosPrefix(state, thisObject, propertyInfo.propertyID);
+ return stylePropertyGetter(state, thisObject, propertyInfo.propertyID);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool JSCSSStyleDeclaration::getOwnPropertySlotDelegate(ExecState* exec, PropertyName propertyIdentifier, PropertySlot& slot)
</del><ins>+bool JSCSSStyleDeclaration::getOwnPropertySlotDelegate(ExecState* state, PropertyName propertyName, PropertySlot& slot)
</ins><span class="cx"> {
</span><del>- CSSPropertyInfo propertyInfo = cssPropertyIDForJSCSSPropertyName(propertyIdentifier);
</del><ins>+ auto propertyInfo = parseJavaScriptCSSPropertyName(propertyName);
</ins><span class="cx"> if (!propertyInfo.propertyID)
</span><span class="cx"> return false;
</span><del>-
- if (propertyInfo.hadPixelOrPosPrefix)
- slot.setValue(this, DontDelete, cssPropertyGetterPixelOrPosPrefix(exec, this, propertyInfo.propertyID));
- else
- slot.setValue(this, DontDelete, cssPropertyGetter(exec, this, propertyInfo.propertyID));
</del><ins>+ slot.setValue(this, DontDelete, stylePropertyGetter(*state, *this, propertyInfo));
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool JSCSSStyleDeclaration::putDelegate(ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot&, bool& putResult)
</del><ins>+bool JSCSSStyleDeclaration::putDelegate(ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot&, bool& putResult)
</ins><span class="cx"> {
</span><del>- CSSPropertyInfo propertyInfo = cssPropertyIDForJSCSSPropertyName(propertyName);
</del><ins>+ auto propertyInfo = parseJavaScriptCSSPropertyName(propertyName);
</ins><span class="cx"> if (!propertyInfo.propertyID)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- String propValue = valueToStringTreatingNullAsEmptyString(exec, value);
</del><ins>+ auto propertyValue = valueToStringTreatingNullAsEmptyString(state, value);
</ins><span class="cx"> if (propertyInfo.hadPixelOrPosPrefix)
</span><del>- propValue.append("px");
</del><ins>+ propertyValue.append("px");
</ins><span class="cx">
</span><span class="cx"> bool important = false;
</span><span class="cx"> if (Settings::shouldRespectPriorityInCSSAttributeSetters()) {
</span><del>- size_t importantIndex = propValue.find("!important", 0, false);
- if (importantIndex != notFound) {
</del><ins>+ auto importantIndex = propertyValue.findIgnoringASCIICase("!important");
+ if (importantIndex && importantIndex != notFound) {
</ins><span class="cx"> important = true;
</span><del>- propValue = propValue.left(importantIndex - 1);
</del><ins>+ propertyValue = propertyValue.left(importantIndex - 1);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ExceptionCode ec = 0;
- CSSPropertyID propertyID = static_cast<CSSPropertyID>(propertyInfo.propertyID);
- putResult = wrapped().setPropertyInternal(propertyID, propValue, important, ec);
- setDOMException(exec, ec);
-
</del><ins>+ auto setPropertyInternalResult = wrapped().setPropertyInternal(propertyInfo.propertyID, propertyValue, important);
+ if (setPropertyInternalResult.hasException()) {
+ propagateException(*state, setPropertyInternalResult.releaseException());
+ return false;
+ }
+ putResult = setPropertyInternalResult.releaseReturnValue();
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -370,42 +356,37 @@
</span><span class="cx"> if (UNLIKELY(state.argumentCount() < 1))
</span><span class="cx"> return throwException(&state, scope, createNotEnoughArgumentsError(&state));
</span><span class="cx">
</span><del>- String propertyName = state.uncheckedArgument(0).toWTFString(&state);
</del><ins>+ auto propertyName = state.uncheckedArgument(0).toWTFString(&state);
</ins><span class="cx"> RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx">
</span><del>- RefPtr<CSSValue> cssValue = wrapped().getPropertyCSSValue(propertyName);
- if (!cssValue)
</del><ins>+ auto value = wrapped().getPropertyCSSValue(propertyName);
+ if (!value)
</ins><span class="cx"> return jsNull();
</span><span class="cx">
</span><del>- globalObject()->world().m_cssValueRoots.add(cssValue.get(), root(&wrapped())); // Balanced by JSCSSValueOwner::finalize().
- return toJS(&state, globalObject(), *cssValue);
</del><ins>+ globalObject()->world().m_cssValueRoots.add(value.get(), root(&wrapped())); // Balanced by JSCSSValueOwner::finalize().
+ return toJS(&state, globalObject(), *value);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void JSCSSStyleDeclaration::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
</del><ins>+void JSCSSStyleDeclaration::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
</ins><span class="cx"> {
</span><del>- JSCSSStyleDeclaration* thisObject = jsCast<JSCSSStyleDeclaration*>(object);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
</del><ins>+ static const Identifier* const cssPropertyNames = [state] {
+ String names[numCSSProperties];
+ for (int i = 0; i < numCSSProperties; ++i)
+ names[i] = getJSPropertyName(static_cast<CSSPropertyID>(firstCSSProperty + i));
+ std::sort(&names[0], &names[numCSSProperties], WTF::codePointCompareLessThan);
+ auto* identifiers = new Identifier[numCSSProperties];
+ for (int i = 0; i < numCSSProperties; ++i)
+ identifiers[i] = Identifier::fromString(state, names[i]);
+ return identifiers;
+ }();
</ins><span class="cx">
</span><del>- unsigned length = thisObject->wrapped().length();
</del><ins>+ unsigned length = jsCast<JSCSSStyleDeclaration*>(object)->wrapped().length();
</ins><span class="cx"> for (unsigned i = 0; i < length; ++i)
</span><del>- propertyNames.add(Identifier::from(exec, i));
-
- static Identifier* propertyIdentifiers = 0;
- if (!propertyIdentifiers) {
- Vector<String, numCSSProperties> jsPropertyNames;
- for (int id = firstCSSProperty; id < firstCSSProperty + numCSSProperties; ++id)
- jsPropertyNames.append(getJSPropertyName(static_cast<CSSPropertyID>(id)));
- std::sort(jsPropertyNames.begin(), jsPropertyNames.end(), WTF::codePointCompareLessThan);
-
- propertyIdentifiers = new Identifier[numCSSProperties];
- for (int i = 0; i < numCSSProperties; ++i)
- propertyIdentifiers[i] = Identifier::fromString(exec, jsPropertyNames[i]);
- }
-
</del><ins>+ propertyNames.add(Identifier::from(state, i));
</ins><span class="cx"> for (int i = 0; i < numCSSProperties; ++i)
</span><del>- propertyNames.add(propertyIdentifiers[i]);
</del><ins>+ propertyNames.add(cssPropertyNames[i]);
</ins><span class="cx">
</span><del>- Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
</del><ins>+ Base::getOwnPropertyNames(object, state, propertyNames, mode);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -965,4 +965,13 @@
</span><span class="cx"> return JSC::jsNumber(value.releaseReturnValue());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline JSC::JSValue toJSString(JSC::ExecState& state, JSC::ThrowScope& throwScope, ExceptionOr<String>&& value)
+{
+ if (UNLIKELY(value.hasException())) {
+ propagateException(state, throwScope, value.releaseException());
+ return { };
+ }
+ return JSC::jsStringWithCache(&state, value.releaseReturnValue());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsgobjectgenerateheaderspl"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/scripts/gobject-generate-headers.pl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/gobject-generate-headers.pl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/bindings/scripts/gobject-generate-headers.pl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,131 +0,0 @@
</span><del>-#!/usr/bin/perl -w
-#
-# Copyright (C) 2009 Adam Dingle <adam@yorba.org>
-# Copyright (C) 2015 Igalia S.L.
-#
-# This file is part of WebKit
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public License
-# aint with this library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
-#
-
-my $classlist = <STDIN>;
-chomp($classlist);
-my @classes = split / /, $classlist;
-@classes = sort @classes;
-
-print <<EOF;
-/* This file is part of the WebKit open source project.
- This file has been generated by gobject-generate-headers.pl. DO NOT MODIFY!
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-EOF
-
-my $outType = $ARGV[0];
-my $header;
-if ($outType eq "defines") {
- $header = "webkitdomdefines_h";
-} elsif ($outType eq "defines-unstable") {
- $header = "webkitdomdefines_unstable_h";
-} elsif ($outType eq "gdom") {
- $header = "webkitdom_h";
-} elsif ($outType eq "autocleanups") {
- $header = "webkitdomautocleanups_h";
-} else {
- die "unknown output type";
-}
-
-print "#ifndef ${header}\n";
-print "#define ${header}\n";
-print "\n";
-
-if ($outType eq "defines") {
- print "#include <glib.h>\n\n";
- print "#ifdef G_OS_WIN32\n";
- print " #ifdef BUILDING_WEBKIT\n";
- print " #define WEBKIT_API __declspec(dllexport)\n";
- print " #else\n";
- print " #define WEBKIT_API __declspec(dllimport)\n";
- print " #endif\n";
- print "#else\n";
- print " #define WEBKIT_API __attribute__((visibility(\"default\")))\n";
- print "#endif\n\n";
- print "#define WEBKIT_DEPRECATED WEBKIT_API G_DEPRECATED\n";
- print "#define WEBKIT_DEPRECATED_FOR(f) WEBKIT_API G_DEPRECATED_FOR(f)\n";
- print "\n";
- print "#ifndef WEBKIT_API\n";
- print " #define WEBKIT_API\n";
- print "#endif\n";
-
- foreach my $class (@classes) {
- if ($class eq "EventTarget" || $class eq "NodeFilter" || $class eq "XPathNSResolver") {
- print "typedef struct _WebKitDOM${class} WebKitDOM${class};\n";
- print "typedef struct _WebKitDOM${class}Iface WebKitDOM${class}Iface;\n";
- print "\n";
- } elsif ($class ne "Deprecated" && $class ne "Custom") {
- print "typedef struct _WebKitDOM${class} WebKitDOM${class};\n";
- print "typedef struct _WebKitDOM${class}Class WebKitDOM${class}Class;\n";
- print "\n";
- }
- }
- print "#include <webkitdom/webkitdomautocleanups.h>\n";
-} elsif ($outType eq "defines-unstable") {
- print "#include <webkitdom/webkitdomdefines.h>\n\n";
- print "#ifdef WEBKIT_DOM_USE_UNSTABLE_API\n\n";
-
- foreach my $class (@classes) {
- print "typedef struct _WebKitDOM${class} WebKitDOM${class};\n";
- print "typedef struct _WebKitDOM${class}Class WebKitDOM${class}Class;\n";
- print "\n";
- }
-
- print "#include <webkitdom/webkitdomautocleanups-unstable.h>\n\n";
- print "#endif /* WEBKIT_DOM_USE_UNSTABLE_API */\n\n";
-} elsif ($outType eq "gdom") {
- print "#define __WEBKITDOM_H_INSIDE__\n\n";
- foreach my $class (@classes) {
- print "#include <webkitdom/WebKitDOM${class}.h>\n";
- }
- print "\n#undef __WEBKITDOM_H_INSIDE__\n";
-} elsif ($outType eq "autocleanups") {
- print "#include <glib-object.h>\n\n";
- print "#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC\n";
- print "#ifndef __GI_SCANNER__\n\n";
- foreach my $class (@classes) {
- if ($class ne "Deprecated" && $class ne "Custom") {
- print "G_DEFINE_AUTOPTR_CLEANUP_FUNC (WebKitDOM${class}, g_object_unref)\n";
- }
- }
- print "\n#endif\n";
- print "#endif\n";
-}
-
-print "\n";
-print "#endif\n";
</del></span></pre></div>
<a id="trunkSourceWebCorecssBasicShapeFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/BasicShapeFunctions.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/BasicShapeFunctions.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return LengthSize(Length(0, Fixed), Length(0, Fixed));
</span><span class="cx">
</span><del>- Pair* pair = value->getPairValue();
</del><ins>+ Pair* pair = value->pairValue();
</ins><span class="cx"> return LengthSize(convertToLength(conversionData, pair->first()), convertToLength(conversionData, pair->second()));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -159,9 +159,9 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> keyword = CSSValueCenter;
</span><span class="cx"> else if (value->isValueID())
</span><del>- keyword = value->getValueID();
- else if (Pair* pair = value->getPairValue()) {
- keyword = pair->first()->getValueID();
</del><ins>+ keyword = value->valueID();
+ else if (Pair* pair = value->pairValue()) {
+ keyword = pair->first()->valueID();
</ins><span class="cx"> offset = convertToLength(conversionData, pair->second());
</span><span class="cx"> } else
</span><span class="cx"> offset = convertToLength(conversionData, value);
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> return BasicShapeRadius(BasicShapeRadius::ClosestSide);
</span><span class="cx">
</span><span class="cx"> if (radius->isValueID()) {
</span><del>- switch (radius->getValueID()) {
</del><ins>+ switch (radius->valueID()) {
</ins><span class="cx"> case CSSValueClosestSide:
</span><span class="cx"> return BasicShapeRadius(BasicShapeRadius::ClosestSide);
</span><span class="cx"> case CSSValueFarthestSide:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -45,8 +45,8 @@
</span><span class="cx">
</span><span class="cx"> static String serializePositionOffset(const Pair& offset, const Pair& other)
</span><span class="cx"> {
</span><del>- if ((offset.first()->getValueID() == CSSValueLeft && other.first()->getValueID() == CSSValueTop)
- || (offset.first()->getValueID() == CSSValueTop && other.first()->getValueID() == CSSValueLeft))
</del><ins>+ if ((offset.first()->valueID() == CSSValueLeft && other.first()->valueID() == CSSValueTop)
+ || (offset.first()->valueID() == CSSValueTop && other.first()->valueID() == CSSValueLeft))
</ins><span class="cx"> return offset.second()->cssText();
</span><span class="cx"> return offset.cssText();
</span><span class="cx"> }
</span><span class="lines">@@ -59,9 +59,9 @@
</span><span class="cx"> if (!offset)
</span><span class="cx"> side = CSSValueCenter;
</span><span class="cx"> else if (offset->isValueID())
</span><del>- side = offset->getValueID();
- else if (Pair* pair = offset->getPairValue()) {
- side = pair->first()->getValueID();
</del><ins>+ side = offset->valueID();
+ else if (Pair* pair = offset->pairValue()) {
+ side = pair->first()->valueID();
</ins><span class="cx"> amount = pair->second();
</span><span class="cx"> } else
</span><span class="cx"> amount = offset;
</span><span class="lines">@@ -73,8 +73,8 @@
</span><span class="cx"> } else if ((side == CSSValueRight || side == CSSValueBottom)
</span><span class="cx"> && amount->isPercentage()) {
</span><span class="cx"> side = defaultSide;
</span><del>- amount = cssValuePool.createValue(Length(100 - amount->getFloatValue(), Percent));
- } else if (amount->isLength() && !amount->getFloatValue()) {
</del><ins>+ amount = cssValuePool.createValue(Length(100 - amount->floatValue(), Percent));
+ } else if (amount->isLength() && !amount->floatValue()) {
</ins><span class="cx"> if (side == CSSValueRight || side == CSSValueBottom)
</span><span class="cx"> amount = cssValuePool.createValue(Length(100, Percent));
</span><span class="cx"> else
</span><span class="lines">@@ -114,12 +114,12 @@
</span><span class="cx"> Ref<CSSPrimitiveValue> normalizedCY = buildSerializablePositionOffset(m_centerY.get(), CSSValueTop);
</span><span class="cx">
</span><span class="cx"> String radius;
</span><del>- if (m_radius && m_radius->getValueID() != CSSValueClosestSide)
</del><ins>+ if (m_radius && m_radius->valueID() != CSSValueClosestSide)
</ins><span class="cx"> radius = m_radius->cssText();
</span><span class="cx">
</span><span class="cx"> return buildCircleString(radius,
</span><del>- serializePositionOffset(*normalizedCX->getPairValue(), *normalizedCY->getPairValue()),
- serializePositionOffset(*normalizedCY->getPairValue(), *normalizedCX->getPairValue()));
</del><ins>+ serializePositionOffset(*normalizedCX->pairValue(), *normalizedCY->pairValue()),
+ serializePositionOffset(*normalizedCY->pairValue(), *normalizedCX->pairValue()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSBasicShapeCircle::equals(const CSSBasicShape& shape) const
</span><span class="lines">@@ -173,11 +173,11 @@
</span><span class="cx"> String radiusX;
</span><span class="cx"> String radiusY;
</span><span class="cx"> if (m_radiusX) {
</span><del>- bool shouldSerializeRadiusXValue = m_radiusX->getValueID() != CSSValueClosestSide;
</del><ins>+ bool shouldSerializeRadiusXValue = m_radiusX->valueID() != CSSValueClosestSide;
</ins><span class="cx"> bool shouldSerializeRadiusYValue = false;
</span><span class="cx">
</span><span class="cx"> if (m_radiusY) {
</span><del>- shouldSerializeRadiusYValue = m_radiusY->getValueID() != CSSValueClosestSide;
</del><ins>+ shouldSerializeRadiusYValue = m_radiusY->valueID() != CSSValueClosestSide;
</ins><span class="cx"> if (shouldSerializeRadiusYValue)
</span><span class="cx"> radiusY = m_radiusY->cssText();
</span><span class="cx"> }
</span><span class="lines">@@ -185,8 +185,8 @@
</span><span class="cx"> radiusX = m_radiusX->cssText();
</span><span class="cx"> }
</span><span class="cx"> return buildEllipseString(radiusX, radiusY,
</span><del>- serializePositionOffset(*normalizedCX->getPairValue(), *normalizedCY->getPairValue()),
- serializePositionOffset(*normalizedCY->getPairValue(), *normalizedCX->getPairValue()));
</del><ins>+ serializePositionOffset(*normalizedCX->pairValue(), *normalizedCY->pairValue()),
+ serializePositionOffset(*normalizedCY->pairValue(), *normalizedCX->pairValue()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CSSBasicShapeEllipse::equals(const CSSBasicShape& shape) const
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> if (!corner)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Pair* radius = corner->getPairValue();
</del><ins>+ Pair* radius = corner->pairValue();
</ins><span class="cx"> width = radius->first() ? radius->first()->cssText() : String("0");
</span><span class="cx"> if (radius->second())
</span><span class="cx"> height = radius->second()->cssText();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBorderImageSliceValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBorderImageSliceValue.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBorderImageSliceValue.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSBorderImageSliceValue.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">
</span><span class="cx"> String customCSSText() const;
</span><span class="cx">
</span><del>- Quad* slices() const { return m_slices ? m_slices->getQuadValue() : nullptr; }
</del><ins>+ Quad* slices() const { return m_slices ? m_slices->quadValue() : nullptr; }
</ins><span class="cx">
</span><span class="cx"> bool equals(const CSSBorderImageSliceValue&) const;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCalculationValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCalculationValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCalculationValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSCalculationValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx"> private:
</span><span class="cx"> bool isZero() const final
</span><span class="cx"> {
</span><del>- return !m_value->getDoubleValue();
</del><ins>+ return !m_value->doubleValue();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String customCSSText() const final
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx"> {
</span><span class="cx"> switch (category()) {
</span><span class="cx"> case CalcNumber:
</span><del>- return std::make_unique<CalcExpressionNumber>(m_value->getFloatValue());
</del><ins>+ return std::make_unique<CalcExpressionNumber>(m_value->floatValue());
</ins><span class="cx"> case CalcLength:
</span><span class="cx"> return std::make_unique<CalcExpressionLength>(Length(m_value->computeLength<float>(conversionData), WebCore::Fixed));
</span><span class="cx"> case CalcPercent:
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> double doubleValue() const final
</span><span class="cx"> {
</span><span class="cx"> if (hasDoubleValue(primitiveType()))
</span><del>- return m_value->getDoubleValue();
</del><ins>+ return m_value->doubleValue();
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> return m_value->computeLength<double>(conversionData);
</span><span class="cx"> case CalcPercent:
</span><span class="cx"> case CalcNumber:
</span><del>- return m_value->getDoubleValue();
</del><ins>+ return m_value->doubleValue();
</ins><span class="cx"> case CalcPercentLength:
</span><span class="cx"> case CalcPercentNumber:
</span><span class="cx"> case CalcAngle:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCharsetRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCharsetRule.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCharsetRule.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSCharsetRule.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -19,8 +19,7 @@
</span><span class="cx"> * Boston, MA 02110-1301, USA.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef CSSCharsetRule_h
-#define CSSCharsetRule_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSRule.h"
</span><span class="cx">
</span><span class="lines">@@ -33,22 +32,17 @@
</span><span class="cx"> return adoptRef(*new CSSCharsetRule(parent, encoding));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual ~CSSCharsetRule() { }
-
- String cssText() const final;
- void reattach(StyleRuleBase&) final { }
-
</del><span class="cx"> const String& encoding() const { return m_encoding; }
</span><del>- void setEncoding(const String& encoding, ExceptionCode&) { m_encoding = encoding; }
</del><ins>+ ExceptionOr<void> setEncoding(const String& encoding) { m_encoding = encoding; return { }; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><ins>+ CSSCharsetRule(CSSStyleSheet* parent, const String& encoding);
+
</ins><span class="cx"> CSSRule::Type type() const final { return CHARSET_RULE; }
</span><ins>+ String cssText() const final;
+ void reattach(StyleRuleBase&) final { }
</ins><span class="cx">
</span><del>- CSSCharsetRule(CSSStyleSheet* parent, const String& encoding);
-
</del><span class="cx"> String m_encoding;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // CSSCharsetRule_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSCharsetRuleidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCharsetRule.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCharsetRule.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSCharsetRule.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -18,8 +18,6 @@
</span><span class="cx"> * Boston, MA 02110-1301, USA.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-// Introduced in DOM Level 2:
</del><span class="cx"> interface CSSCharsetRule : CSSRule {
</span><del>- [SetterMayThrowLegacyException] attribute DOMString? encoding;
</del><ins>+ [SetterMayThrowException] attribute DOMString? encoding;
</ins><span class="cx"> };
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1636,9 +1636,9 @@
</span><span class="cx"> return result.toString();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSComputedStyleDeclaration::setCssText(const String&, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> CSSComputedStyleDeclaration::setCssText(const String&)
</ins><span class="cx"> {
</span><del>- ec = NO_MODIFICATION_ALLOWED_ERR;
</del><ins>+ return Exception { NO_MODIFICATION_ALLOWED_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSPrimitiveValue> ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword() const
</span><span class="lines">@@ -4001,7 +4001,7 @@
</span><span class="cx"> if (auto* style = m_node->computedStyle(m_pseudoElementSpecifier)) {
</span><span class="cx"> if (CSSValueID sizeIdentifier = style->fontDescription().keywordSizeAsIdentifier()) {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</span><del>- if (primitiveValue.isValueID() && primitiveValue.getValueID() == sizeIdentifier)
</del><ins>+ if (primitiveValue.isValueID() && primitiveValue.valueID() == sizeIdentifier)
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -4119,15 +4119,14 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSComputedStyleDeclaration::setProperty(const String&, const String&, const String&, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> CSSComputedStyleDeclaration::setProperty(const String&, const String&, const String&)
</ins><span class="cx"> {
</span><del>- ec = NO_MODIFICATION_ALLOWED_ERR;
</del><ins>+ return Exception { NO_MODIFICATION_ALLOWED_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String CSSComputedStyleDeclaration::removeProperty(const String&, ExceptionCode& ec)
</del><ins>+ExceptionOr<String> CSSComputedStyleDeclaration::removeProperty(const String&)
</ins><span class="cx"> {
</span><del>- ec = NO_MODIFICATION_ALLOWED_ERR;
- return String();
</del><ins>+ return Exception { NO_MODIFICATION_ALLOWED_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID)
</span><span class="lines">@@ -4140,21 +4139,17 @@
</span><span class="cx"> return getPropertyValue(propertyID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSComputedStyleDeclaration::setPropertyInternal(CSSPropertyID, const String&, bool, ExceptionCode& ec)
</del><ins>+ExceptionOr<bool> CSSComputedStyleDeclaration::setPropertyInternal(CSSPropertyID, const String&, bool)
</ins><span class="cx"> {
</span><del>- ec = NO_MODIFICATION_ALLOWED_ERR;
- return false;
</del><ins>+ return Exception { NO_MODIFICATION_ALLOWED_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValueList> ComputedStyleExtractor::getBackgroundShorthandValue() const
</del><ins>+Ref<CSSValueList> ComputedStyleExtractor::getBackgroundShorthandValue() const
</ins><span class="cx"> {
</span><del>- static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage,
- CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment,
- CSSPropertyBackgroundPosition };
- static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyBackgroundSize, CSSPropertyBackgroundOrigin,
- CSSPropertyBackgroundClip };
</del><ins>+ static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition };
+ static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyBackgroundSize, CSSPropertyBackgroundOrigin, CSSPropertyBackgroundClip };
</ins><span class="cx">
</span><del>- RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
</del><ins>+ auto list = CSSValueList::createSlashSeparated();
</ins><span class="cx"> list->append(*getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyBackground, propertiesBeforeSlashSeperator)));
</span><span class="cx"> list->append(*getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyBackground, propertiesAfterSlashSeperator)));
</span><span class="cx"> return list;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -18,8 +18,7 @@
</span><span class="cx"> * 02110-1301 USA
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef CSSComputedStyleDeclaration_h
-#define CSSComputedStyleDeclaration_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSStyleDeclaration.h"
</span><span class="cx"> #include "RenderStyleConstants.h"
</span><span class="lines">@@ -78,7 +77,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand&) const;
</span><span class="cx"> RefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePropertyShorthand&) const;
</span><del>- RefPtr<CSSValueList> getBackgroundShorthandValue() const;
</del><ins>+ Ref<CSSValueList> getBackgroundShorthandValue() const;
</ins><span class="cx"> RefPtr<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePropertyShorthand&) const;
</span><span class="cx">
</span><span class="cx"> RefPtr<Node> m_node;
</span><span class="lines">@@ -111,13 +110,13 @@
</span><span class="cx"> String getPropertyPriority(const String& propertyName) final;
</span><span class="cx"> String getPropertyShorthand(const String& propertyName) final;
</span><span class="cx"> bool isPropertyImplicit(const String& propertyName) final;
</span><del>- void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&) final;
- String removeProperty(const String& propertyName, ExceptionCode&) final;
</del><ins>+ ExceptionOr<void> setProperty(const String& propertyName, const String& value, const String& priority) final;
+ ExceptionOr<String> removeProperty(const String& propertyName) final;
</ins><span class="cx"> String cssText() const final;
</span><del>- void setCssText(const String&, ExceptionCode&) final;
</del><ins>+ ExceptionOr<void> setCssText(const String&) final;
</ins><span class="cx"> RefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) final;
</span><span class="cx"> String getPropertyValueInternal(CSSPropertyID) final;
</span><del>- bool setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) final;
</del><ins>+ ExceptionOr<bool> setPropertyInternal(CSSPropertyID, const String& value, bool important) final;
</ins><span class="cx"> Ref<MutableStyleProperties> copyProperties() const final;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateLayout = UpdateLayout) const;
</span><span class="lines">@@ -129,5 +128,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // CSSComputedStyleDeclaration_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSCrossfadeValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCrossfadeValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCrossfadeValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSCrossfadeValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">
</span><span class="cx"> FloatSize CSSCrossfadeValue::fixedSize(const RenderElement* renderer)
</span><span class="cx"> {
</span><del>- float percentage = m_percentageValue->getFloatValue();
</del><ins>+ float percentage = m_percentageValue->floatValue();
</ins><span class="cx"> float inversePercentage = 1 - percentage;
</span><span class="cx">
</span><span class="cx"> // FIXME: Skip Content Security Policy check when cross fade is applied to an element in a user agent shadow tree.
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx"> if (!fromImage || !toImage)
</span><span class="cx"> return Image::nullImage();
</span><span class="cx">
</span><del>- m_generatedImage = CrossfadeGeneratedImage::create(*fromImage, *toImage, m_percentageValue->getFloatValue(), fixedSize(renderer), size);
</del><ins>+ m_generatedImage = CrossfadeGeneratedImage::create(*fromImage, *toImage, m_percentageValue->floatValue(), fixedSize(renderer), size);
</ins><span class="cx">
</span><span class="cx"> return m_generatedImage;
</span><span class="cx"> }
</span><span class="lines">@@ -202,10 +202,10 @@
</span><span class="cx"> auto fromImageValue = CSSImageValue::create(*m_cachedFromImage);
</span><span class="cx"> auto toImageValue = CSSImageValue::create(*m_cachedToImage);
</span><span class="cx">
</span><del>- double fromPercentage = from.m_percentageValue->getDoubleValue();
</del><ins>+ double fromPercentage = from.m_percentageValue->doubleValue();
</ins><span class="cx"> if (from.m_percentageValue->isPercentage())
</span><span class="cx"> fromPercentage /= 100.0;
</span><del>- double toPercentage = m_percentageValue->getDoubleValue();
</del><ins>+ double toPercentage = m_percentageValue->doubleValue();
</ins><span class="cx"> if (m_percentageValue->isPercentage())
</span><span class="cx"> toPercentage /= 100.0;
</span><span class="cx"> auto percentageValue = CSSPrimitiveValue::create(blendFunc(fromPercentage, toPercentage, progress), CSSPrimitiveValue::CSS_NUMBER);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFace.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFace.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSFontFace.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(style))
</span><span class="cx"> return Nullopt;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(style).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(style).valueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> return FontStyleNormalMask;
</span><span class="cx"> case CSSValueItalic:
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(weight))
</span><span class="cx"> return Nullopt;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(weight).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(weight).valueID()) {
</ins><span class="cx"> case CSSValueBold:
</span><span class="cx"> case CSSValueBolder:
</span><span class="cx"> case CSSValue700:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "CSSSegmentedFontFace.h"
</span><span class="cx"> #include "CSSValueList.h"
</span><span class="cx"> #include "CSSValuePool.h"
</span><ins>+#include "ExceptionCode.h"
</ins><span class="cx"> #include "FontCache.h"
</span><span class="cx"> #include "StyleProperties.h"
</span><span class="cx">
</span><span class="lines">@@ -128,7 +129,7 @@
</span><span class="cx">
</span><span class="cx"> // We need to use the raw text for all the generic family types, since @font-face is a way of actually
</span><span class="cx"> // defining what font to use for those types.
</span><del>- switch (value.getValueID()) {
</del><ins>+ switch (value.valueID()) {
</ins><span class="cx"> case CSSValueSerif:
</span><span class="cx"> return serifFamily;
</span><span class="cx"> case CSSValueSansSerif:
</span><span class="lines">@@ -247,7 +248,7 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSSFontFace* CSSFontFaceSet::lookupByCSSConnection(StyleRuleFontFace& target)
</del><ins>+CSSFontFace* CSSFontFaceSet::lookUpByCSSConnection(StyleRuleFontFace& target)
</ins><span class="cx"> {
</span><span class="cx"> return m_constituentCSSConnections.get(&target);
</span><span class="cx"> }
</span><span class="lines">@@ -324,35 +325,28 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Vector<std::reference_wrapper<CSSFontFace>> CSSFontFaceSet::matchingFaces(const String& font, const String& string, ExceptionCode& ec)
</del><ins>+ExceptionOr<Vector<std::reference_wrapper<CSSFontFace>>> CSSFontFaceSet::matchingFaces(const String& font, const String& string)
</ins><span class="cx"> {
</span><del>- Vector<std::reference_wrapper<CSSFontFace>> result;
</del><span class="cx"> auto style = MutableStyleProperties::create();
</span><span class="cx"> auto parseResult = CSSParser::parseValue(style, CSSPropertyFont, font, true, HTMLStandardMode, nullptr);
</span><del>- if (parseResult == CSSParser::ParseResult::Error) {
- ec = SYNTAX_ERR;
- return result;
- }
</del><ins>+ if (parseResult == CSSParser::ParseResult::Error)
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> FontTraitsMask fontTraitsMask;
</span><span class="cx"> if (auto maskOptional = computeFontTraitsMask(style.get()))
</span><span class="cx"> fontTraitsMask = maskOptional.value();
</span><del>- else {
- ec = SYNTAX_ERR;
- return result;
- }
</del><ins>+ else
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><del>- RefPtr<CSSValue> family = style->getPropertyCSSValue(CSSPropertyFontFamily);
- if (!is<CSSValueList>(family.get())) {
- ec = SYNTAX_ERR;
- return result;
- }
</del><ins>+ auto family = style->getPropertyCSSValue(CSSPropertyFontFamily);
+ if (!is<CSSValueList>(family.get()))
+ return Exception { SYNTAX_ERR };
</ins><span class="cx"> CSSValueList& familyList = downcast<CSSValueList>(*family);
</span><span class="cx">
</span><span class="cx"> HashSet<AtomicString> uniqueFamilies;
</span><span class="cx"> Vector<AtomicString> familyOrder;
</span><span class="cx"> for (auto& family : familyList) {
</span><del>- const CSSPrimitiveValue& primitive = downcast<CSSPrimitiveValue>(family.get());
</del><ins>+ auto& primitive = downcast<CSSPrimitiveValue>(family.get());
</ins><span class="cx"> if (!primitive.isFontFamily())
</span><span class="cx"> continue;
</span><span class="cx"> if (uniqueFamilies.add(primitive.fontFamily().familyName).isNewEntry)
</span><span class="lines">@@ -363,7 +357,7 @@
</span><span class="cx"> for (auto codePoint : codePointsFromString(string)) {
</span><span class="cx"> bool found = false;
</span><span class="cx"> for (auto& family : familyOrder) {
</span><del>- CSSSegmentedFontFace* faces = getFontFace(fontTraitsMask, family);
</del><ins>+ auto* faces = fontFace(fontTraitsMask, family);
</ins><span class="cx"> if (!faces)
</span><span class="cx"> continue;
</span><span class="cx"> for (auto& constituentFace : faces->constituentFaces()) {
</span><span class="lines">@@ -378,19 +372,20 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ Vector<std::reference_wrapper<CSSFontFace>> result;
+ result.reserveInitialCapacity(resultConstituents.size());
</ins><span class="cx"> for (auto* constituent : resultConstituents)
</span><del>- result.append(*constituent);
-
- return result;
</del><ins>+ result.uncheckedAppend(*constituent);
+ return WTFMove(result);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSFontFaceSet::check(const String& font, const String& text, ExceptionCode& ec)
</del><ins>+ExceptionOr<bool> CSSFontFaceSet::check(const String& font, const String& text)
</ins><span class="cx"> {
</span><del>- auto matchingFaces = this->matchingFaces(font, text, ec);
- if (ec)
- return false;
</del><ins>+ auto matchingFaces = this->matchingFaces(font, text);
+ if (matchingFaces.hasException())
+ return matchingFaces.releaseException();
</ins><span class="cx">
</span><del>- for (auto& face : matchingFaces) {
</del><ins>+ for (auto& face : matchingFaces.releaseReturnValue()) {
</ins><span class="cx"> if (face.get().status() == CSSFontFace::Status::Pending)
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -456,7 +451,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CSSSegmentedFontFace* CSSFontFaceSet::getFontFace(FontTraitsMask traitsMask, const AtomicString& family)
</del><ins>+CSSSegmentedFontFace* CSSFontFaceSet::fontFace(FontTraitsMask traitsMask, const AtomicString& family)
</ins><span class="cx"> {
</span><span class="cx"> auto iterator = m_facesLookupTable.find(family);
</span><span class="cx"> if (iterator == m_facesLookupTable.end())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceSet.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceSet.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSFontFaceSet.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef CSSFontFaceSet_h
-#define CSSFontFaceSet_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSFontFace.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="lines">@@ -64,23 +63,20 @@
</span><span class="cx"> void clear();
</span><span class="cx"> CSSFontFace& operator[](size_t i);
</span><span class="cx">
</span><del>- CSSFontFace* lookupByCSSConnection(StyleRuleFontFace&);
</del><ins>+ CSSFontFace* lookUpByCSSConnection(StyleRuleFontFace&);
</ins><span class="cx">
</span><del>- bool check(const String& font, const String& text, ExceptionCode&);
</del><ins>+ ExceptionOr<bool> check(const String& font, const String& text);
</ins><span class="cx">
</span><del>- CSSSegmentedFontFace* getFontFace(FontTraitsMask, const AtomicString& family);
</del><ins>+ CSSSegmentedFontFace* fontFace(FontTraitsMask, const AtomicString& family);
</ins><span class="cx">
</span><del>- enum class Status {
- Loading,
- Loaded
- };
</del><ins>+ enum class Status { Loading, Loaded };
</ins><span class="cx"> Status status() const { return m_status; }
</span><span class="cx">
</span><del>- Vector<std::reference_wrapper<CSSFontFace>> matchingFaces(const String& font, const String& text, ExceptionCode&);
</del><ins>+ ExceptionOr<Vector<std::reference_wrapper<CSSFontFace>>> matchingFaces(const String& font, const String& text);
</ins><span class="cx">
</span><span class="cx"> // CSSFontFace::Client needs to be able to be held in a RefPtr.
</span><del>- void ref() override { RefCounted<CSSFontFaceSet>::ref(); }
- void deref() override { RefCounted<CSSFontFaceSet>::deref(); }
</del><ins>+ void ref() final { RefCounted::ref(); }
+ void deref() final { RefCounted::deref(); }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> CSSFontFaceSet();
</span><span class="lines">@@ -91,8 +87,8 @@
</span><span class="cx"> void incrementActiveCount();
</span><span class="cx"> void decrementActiveCount();
</span><span class="cx">
</span><del>- void fontStateChanged(CSSFontFace&, CSSFontFace::Status oldState, CSSFontFace::Status newState) override;
- void fontPropertyChanged(CSSFontFace&, CSSValueList* oldFamilies = nullptr) override;
</del><ins>+ void fontStateChanged(CSSFontFace&, CSSFontFace::Status oldState, CSSFontFace::Status newState) final;
+ void fontPropertyChanged(CSSFontFace&, CSSValueList* oldFamilies = nullptr) final;
</ins><span class="cx">
</span><span class="cx"> void ensureLocalFontFacesForFamilyRegistered(const String&);
</span><span class="cx">
</span><span class="lines">@@ -111,5 +107,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx"> if (fontFace->allSourcesFailed())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (RefPtr<CSSFontFace> existingFace = m_cssFontFaceSet->lookupByCSSConnection(fontFaceRule)) {
</del><ins>+ if (RefPtr<CSSFontFace> existingFace = m_cssFontFaceSet->lookUpByCSSConnection(fontFaceRule)) {
</ins><span class="cx"> m_cssFontFaceSet->remove(*existingFace);
</span><span class="cx"> if (auto* existingWrapper = existingFace->existingWrapper())
</span><span class="cx"> existingWrapper->adopt(fontFace.get());
</span><span class="lines">@@ -286,7 +286,7 @@
</span><span class="cx"> bool resolveGenericFamilyFirst = familyName == standardFamily;
</span><span class="cx">
</span><span class="cx"> AtomicString familyForLookup = resolveGenericFamilyFirst ? resolveGenericFamily(m_document, fontDescription, familyName) : familyName;
</span><del>- CSSSegmentedFontFace* face = m_cssFontFaceSet->getFontFace(fontDescription.traitsMask(), familyForLookup);
</del><ins>+ auto* face = m_cssFontFaceSet->fontFace(fontDescription.traitsMask(), familyForLookup);
</ins><span class="cx"> if (!face) {
</span><span class="cx"> if (!resolveGenericFamilyFirst)
</span><span class="cx"> familyForLookup = resolveGenericFamily(m_document, fontDescription, familyName);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -75,8 +75,8 @@
</span><span class="cx"> // Should only ever be called for deprecated gradients.
</span><span class="cx"> static inline bool compareStops(const CSSGradientColorStop& a, const CSSGradientColorStop& b)
</span><span class="cx"> {
</span><del>- double aVal = a.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER);
- double bVal = b.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ double aVal = a.m_position->doubleValue(CSSPrimitiveValue::CSS_NUMBER);
+ double bVal = b.m_position->doubleValue(CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx">
</span><span class="cx"> return aVal < bVal;
</span><span class="cx"> }
</span><span class="lines">@@ -160,9 +160,9 @@
</span><span class="cx">
</span><span class="cx"> float offset;
</span><span class="cx"> if (stop.m_position->isPercentage())
</span><del>- offset = stop.m_position->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE) / 100;
</del><ins>+ offset = stop.m_position->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE) / 100;
</ins><span class="cx"> else
</span><del>- offset = stop.m_position->getFloatValue(CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ offset = stop.m_position->floatValue(CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx">
</span><span class="cx"> gradient.addColorStop(offset, stop.m_resolvedColor);
</span><span class="cx"> }
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx"> if (stop.m_position) {
</span><span class="cx"> const CSSPrimitiveValue& positionValue = *stop.m_position;
</span><span class="cx"> if (positionValue.isPercentage())
</span><del>- stops[i].offset = positionValue.getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE) / 100;
</del><ins>+ stops[i].offset = positionValue.floatValue(CSSPrimitiveValue::CSS_PERCENTAGE) / 100;
</ins><span class="cx"> else if (positionValue.isLength() || positionValue.isViewportPercentageLength() || positionValue.isCalculatedPercentageWithLength()) {
</span><span class="cx"> if (!computedGradientLength) {
</span><span class="cx"> FloatSize gradientSize(gradientStart - gradientEnd);
</span><span class="lines">@@ -497,11 +497,11 @@
</span><span class="cx"> static float positionFromValue(CSSPrimitiveValue& value, const CSSToLengthConversionData& conversionData, const FloatSize& size, bool isHorizontal)
</span><span class="cx"> {
</span><span class="cx"> if (value.isNumber())
</span><del>- return value.getFloatValue() * conversionData.zoom();
</del><ins>+ return value.floatValue() * conversionData.zoom();
</ins><span class="cx">
</span><span class="cx"> int edgeDistance = isHorizontal ? size.width() : size.height();
</span><span class="cx"> if (value.isPercentage())
</span><del>- return value.getFloatValue() / 100.f * edgeDistance;
</del><ins>+ return value.floatValue() / 100.f * edgeDistance;
</ins><span class="cx">
</span><span class="cx"> if (value.isCalculatedPercentageWithLength()) {
</span><span class="cx"> Ref<CalculationValue> calculationValue { value.cssCalcValue()->createCalculationValue(conversionData) };
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx"> return calculationValue->evaluate(edgeDistance);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (value.getValueID()) {
</del><ins>+ switch (value.valueID()) {
</ins><span class="cx"> case CSSValueTop:
</span><span class="cx"> ASSERT(!isHorizontal);
</span><span class="cx"> return 0;
</span><span class="lines">@@ -581,20 +581,20 @@
</span><span class="cx"> result.append(' ');
</span><span class="cx"> result.append(m_secondY->cssText());
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < m_stops.size(); i++) {
- const CSSGradientColorStop& stop = m_stops[i];
</del><ins>+ for (auto& stop : m_stops) {
</ins><span class="cx"> result.appendLiteral(", ");
</span><del>- if (stop.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER) == 0) {
</del><ins>+ auto position = stop.m_position->doubleValue(CSSPrimitiveValue::CSS_NUMBER);
+ if (!position) {
</ins><span class="cx"> result.appendLiteral("from(");
</span><span class="cx"> result.append(stop.m_color->cssText());
</span><span class="cx"> result.append(')');
</span><del>- } else if (stop.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER) == 1) {
</del><ins>+ } else if (position == 1) {
</ins><span class="cx"> result.appendLiteral("to(");
</span><span class="cx"> result.append(stop.m_color->cssText());
</span><span class="cx"> result.append(')');
</span><span class="cx"> } else {
</span><span class="cx"> result.appendLiteral("color-stop(");
</span><del>- result.appendNumber(stop.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER));
</del><ins>+ result.appendNumber(position);
</ins><span class="cx"> result.appendLiteral(", ");
</span><span class="cx"> result.append(stop.m_color->cssText());
</span><span class="cx"> result.append(')');
</span><span class="lines">@@ -642,7 +642,7 @@
</span><span class="cx"> if (m_angle && m_angle->computeDegrees() != 180) {
</span><span class="cx"> result.append(m_angle->cssText());
</span><span class="cx"> wroteSomething = true;
</span><del>- } else if ((m_firstX || m_firstY) && !(!m_firstX && m_firstY && m_firstY->getValueID() == CSSValueBottom)) {
</del><ins>+ } else if ((m_firstX || m_firstY) && !(!m_firstX && m_firstY && m_firstY->valueID() == CSSValueBottom)) {
</ins><span class="cx"> result.appendLiteral("to ");
</span><span class="cx"> if (m_firstX && m_firstY) {
</span><span class="cx"> result.append(m_firstX->cssText());
</span><span class="lines">@@ -754,7 +754,7 @@
</span><span class="cx"> FloatPoint firstPoint;
</span><span class="cx"> FloatPoint secondPoint;
</span><span class="cx"> if (m_angle) {
</span><del>- float angle = m_angle->getFloatValue(CSSPrimitiveValue::CSS_DEG);
</del><ins>+ float angle = m_angle->floatValue(CSSPrimitiveValue::CSS_DEG);
</ins><span class="cx"> endPointsFromAngle(angle, size, firstPoint, secondPoint, m_gradientType);
</span><span class="cx"> } else {
</span><span class="cx"> switch (m_gradientType) {
</span><span class="lines">@@ -781,9 +781,9 @@
</span><span class="cx"> // "Magic" corners, so the 50% line touches two corners.
</span><span class="cx"> float rise = size.width();
</span><span class="cx"> float run = size.height();
</span><del>- if (m_firstX && m_firstX->getValueID() == CSSValueLeft)
</del><ins>+ if (m_firstX && m_firstX->valueID() == CSSValueLeft)
</ins><span class="cx"> run *= -1;
</span><del>- if (m_firstY && m_firstY->getValueID() == CSSValueBottom)
</del><ins>+ if (m_firstY && m_firstY->valueID() == CSSValueBottom)
</ins><span class="cx"> rise *= -1;
</span><span class="cx"> // Compute angle, and flip it back to "bearing angle" degrees.
</span><span class="cx"> float angle = 90 - rad2deg(atan2(rise, run));
</span><span class="lines">@@ -862,20 +862,20 @@
</span><span class="cx"> result.append(m_secondRadius->cssText());
</span><span class="cx">
</span><span class="cx"> // FIXME: share?
</span><del>- for (unsigned i = 0; i < m_stops.size(); i++) {
- const CSSGradientColorStop& stop = m_stops[i];
</del><ins>+ for (auto& stop : m_stops) {
</ins><span class="cx"> result.appendLiteral(", ");
</span><del>- if (stop.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER) == 0) {
</del><ins>+ auto position = stop.m_position->doubleValue(CSSPrimitiveValue::CSS_NUMBER);
+ if (!position) {
</ins><span class="cx"> result.appendLiteral("from(");
</span><span class="cx"> result.append(stop.m_color->cssText());
</span><span class="cx"> result.append(')');
</span><del>- } else if (stop.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER) == 1) {
</del><ins>+ } else if (position == 1) {
</ins><span class="cx"> result.appendLiteral("to(");
</span><span class="cx"> result.append(stop.m_color->cssText());
</span><span class="cx"> result.append(')');
</span><span class="cx"> } else {
</span><span class="cx"> result.appendLiteral("color-stop(");
</span><del>- result.appendNumber(stop.m_position->getDoubleValue(CSSPrimitiveValue::CSS_NUMBER));
</del><ins>+ result.appendNumber(position);
</ins><span class="cx"> result.appendLiteral(", ");
</span><span class="cx"> result.append(stop.m_color->cssText());
</span><span class="cx"> result.append(')');
</span><span class="lines">@@ -937,12 +937,12 @@
</span><span class="cx">
</span><span class="cx"> // The only ambiguous case that needs an explicit shape to be provided
</span><span class="cx"> // is when a sizing keyword is used (or all sizing is omitted).
</span><del>- if (m_shape && m_shape->getValueID() != CSSValueEllipse && (m_sizingBehavior || (!m_sizingBehavior && !m_endHorizontalSize))) {
</del><ins>+ if (m_shape && m_shape->valueID() != CSSValueEllipse && (m_sizingBehavior || (!m_sizingBehavior && !m_endHorizontalSize))) {
</ins><span class="cx"> result.appendLiteral("circle");
</span><span class="cx"> wroteSomething = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (m_sizingBehavior && m_sizingBehavior->getValueID() != CSSValueFarthestCorner) {
</del><ins>+ if (m_sizingBehavior && m_sizingBehavior->valueID() != CSSValueFarthestCorner) {
</ins><span class="cx"> if (wroteSomething)
</span><span class="cx"> result.append(' ');
</span><span class="cx"> result.append(m_sizingBehavior->cssText());
</span><span class="lines">@@ -999,9 +999,9 @@
</span><span class="cx"> {
</span><span class="cx"> float result = 0;
</span><span class="cx"> if (radius.isNumber()) // Can the radius be a percentage?
</span><del>- result = radius.getFloatValue() * conversionData.zoom();
</del><ins>+ result = radius.floatValue() * conversionData.zoom();
</ins><span class="cx"> else if (widthOrHeight && radius.isPercentage())
</span><del>- result = *widthOrHeight * radius.getFloatValue() / 100;
</del><ins>+ result = *widthOrHeight * radius.floatValue() / 100;
</ins><span class="cx"> else
</span><span class="cx"> result = radius.computeLength<float>(conversionData);
</span><span class="cx">
</span><span class="lines">@@ -1122,7 +1122,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> enum GradientShape { Circle, Ellipse };
</span><span class="cx"> GradientShape shape = Ellipse;
</span><del>- if ((m_shape && m_shape->getValueID() == CSSValueCircle)
</del><ins>+ if ((m_shape && m_shape->valueID() == CSSValueCircle)
</ins><span class="cx"> || (!m_shape && !m_sizingBehavior && m_endHorizontalSize && !m_endVerticalSize))
</span><span class="cx"> shape = Circle;
</span><span class="cx">
</span><span class="lines">@@ -1129,7 +1129,7 @@
</span><span class="cx"> enum GradientFill { ClosestSide, ClosestCorner, FarthestSide, FarthestCorner };
</span><span class="cx"> GradientFill fill = FarthestCorner;
</span><span class="cx">
</span><del>- switch (m_sizingBehavior ? m_sizingBehavior->getValueID() : 0) {
</del><ins>+ switch (m_sizingBehavior ? m_sizingBehavior->valueID() : 0) {
</ins><span class="cx"> case CSSValueContain:
</span><span class="cx"> case CSSValueClosestSide:
</span><span class="cx"> fill = ClosestSide;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGroupingRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGroupingRule.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGroupingRule.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSGroupingRule.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -57,14 +57,13 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned CSSGroupingRule::insertRule(const String& ruleString, unsigned index, ExceptionCode& ec)
</del><ins>+ExceptionOr<unsigned> CSSGroupingRule::insertRule(const String& ruleString, unsigned index)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
</span><span class="cx">
</span><span class="cx"> if (index > m_groupRule->childRules().size()) {
</span><span class="cx"> // INDEX_SIZE_ERR: Raised if the specified index is not a valid insertion point.
</span><del>- ec = INDEX_SIZE_ERR;
- return 0;
</del><ins>+ return Exception { INDEX_SIZE_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CSSParser parser(parserContext());
</span><span class="lines">@@ -72,8 +71,7 @@
</span><span class="cx"> RefPtr<StyleRuleBase> newRule = parser.parseRule(styleSheet ? &styleSheet->contents() : nullptr, ruleString);
</span><span class="cx"> if (!newRule) {
</span><span class="cx"> // SYNTAX_ERR: Raised if the specified rule has a syntax error and is unparsable.
</span><del>- ec = SYNTAX_ERR;
- return 0;
</del><ins>+ return Exception { SYNTAX_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (newRule->isImportRule()) {
</span><span class="lines">@@ -84,8 +82,7 @@
</span><span class="cx"> // HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the specified
</span><span class="cx"> // index, e.g., if an @import rule is inserted after a standard rule set or other
</span><span class="cx"> // at-rule.
</span><del>- ec = HIERARCHY_REQUEST_ERR;
- return 0;
</del><ins>+ return Exception { HIERARCHY_REQUEST_ERR };
</ins><span class="cx"> }
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(this);
</span><span class="cx">
</span><span class="lines">@@ -95,7 +92,7 @@
</span><span class="cx"> return index;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSGroupingRule::deleteRule(unsigned index, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> CSSGroupingRule::deleteRule(unsigned index)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
</span><span class="cx">
</span><span class="lines">@@ -102,8 +99,7 @@
</span><span class="cx"> if (index >= m_groupRule->childRules().size()) {
</span><span class="cx"> // INDEX_SIZE_ERR: Raised if the specified index does not correspond to a
</span><span class="cx"> // rule in the media rule list.
</span><del>- ec = INDEX_SIZE_ERR;
- return;
</del><ins>+ return Exception { INDEX_SIZE_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(this);
</span><span class="lines">@@ -113,6 +109,8 @@
</span><span class="cx"> if (m_childRuleCSSOMWrappers[index])
</span><span class="cx"> m_childRuleCSSOMWrappers[index]->setParentRule(0);
</span><span class="cx"> m_childRuleCSSOMWrappers.remove(index);
</span><ins>+
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSGroupingRule::appendCssTextForItems(StringBuilder& result) const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGroupingRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGroupingRule.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGroupingRule.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSGroupingRule.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><span class="cx"> #include "CSSRule.h"
</span><del>-#include "StyleRule.h"
</del><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="lines">@@ -30,17 +29,16 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class CSSRuleList;
</span><ins>+class StyleRuleGroup;
</ins><span class="cx">
</span><span class="cx"> class CSSGroupingRule : public CSSRule {
</span><span class="cx"> public:
</span><span class="cx"> virtual ~CSSGroupingRule();
</span><span class="cx">
</span><del>- void reattach(StyleRuleBase&) override;
-
</del><span class="cx"> WEBCORE_EXPORT CSSRuleList& cssRules() const;
</span><span class="cx">
</span><del>- WEBCORE_EXPORT unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
- WEBCORE_EXPORT void deleteRule(unsigned index, ExceptionCode&);
</del><ins>+ WEBCORE_EXPORT ExceptionOr<unsigned> insertRule(const String& rule, unsigned index);
+ WEBCORE_EXPORT ExceptionOr<void> deleteRule(unsigned index);
</ins><span class="cx">
</span><span class="cx"> // For CSSRuleList
</span><span class="cx"> unsigned length() const;
</span><span class="lines">@@ -49,9 +47,13 @@
</span><span class="cx"> protected:
</span><span class="cx"> CSSGroupingRule(StyleRuleGroup& groupRule, CSSStyleSheet* parent);
</span><span class="cx">
</span><ins>+ void reattach(StyleRuleBase&) override;
+
</ins><span class="cx"> void appendCssTextForItems(StringBuilder&) const;
</span><span class="cx">
</span><span class="cx"> Ref<StyleRuleGroup> m_groupRule;
</span><ins>+
+private:
</ins><span class="cx"> mutable Vector<RefPtr<CSSRule>> m_childRuleCSSOMWrappers;
</span><span class="cx"> mutable std::unique_ptr<CSSRuleList> m_ruleListCSSOMWrapper;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageGeneratorValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSImageGeneratorValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx"> if (is<CSSImageGeneratorValue>(value))
</span><span class="cx"> return downcast<CSSImageGeneratorValue>(value).isPending();
</span><span class="cx">
</span><del>- if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone)
</del><ins>+ if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImageSetValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImageSetValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImageSetValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSImageSetValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> ++i;
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(i < length);
</span><span class="cx"> CSSValue* scaleFactorValue = item(i);
</span><del>- float scaleFactor = downcast<CSSPrimitiveValue>(*scaleFactorValue).getFloatValue();
</del><ins>+ float scaleFactor = downcast<CSSPrimitiveValue>(*scaleFactorValue).floatValue();
</ins><span class="cx">
</span><span class="cx"> ImageWithScale image;
</span><span class="cx"> image.imageURL = imageURL;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSMediaRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSMediaRule.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSMediaRule.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSMediaRule.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class MediaList;
</span><ins>+class MediaQuerySet;
</ins><span class="cx"> class StyleRuleMedia;
</span><span class="cx">
</span><span class="cx"> class CSSMediaRule final : public CSSGroupingRule {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSMediaRuleidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSMediaRule.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSMediaRule.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSMediaRule.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -22,6 +22,6 @@
</span><span class="cx"> readonly attribute MediaList media;
</span><span class="cx"> readonly attribute CSSRuleList cssRules;
</span><span class="cx">
</span><del>- [MayThrowLegacyException] unsigned long insertRule(optional DOMString rule = "undefined", optional unsigned long index = 0);
- [MayThrowLegacyException] void deleteRule(optional unsigned long index = 0);
</del><ins>+ [MayThrowException] unsigned long insertRule(optional DOMString rule = "undefined", optional unsigned long index = 0);
+ [MayThrowException] void deleteRule(optional unsigned long index = 0);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -629,13 +629,13 @@
</span><span class="cx"> {
</span><span class="cx"> switch (primitiveType()) {
</span><span class="cx"> case CSS_DEG:
</span><del>- return getDoubleValue();
</del><ins>+ return doubleValue();
</ins><span class="cx"> case CSS_RAD:
</span><del>- return rad2deg(getDoubleValue());
</del><ins>+ return rad2deg(doubleValue());
</ins><span class="cx"> case CSS_GRAD:
</span><del>- return grad2deg(getDoubleValue());
</del><ins>+ return grad2deg(doubleValue());
</ins><span class="cx"> case CSS_TURN:
</span><del>- return turn2deg(getDoubleValue());
</del><ins>+ return turn2deg(doubleValue());
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="lines">@@ -683,10 +683,10 @@
</span><span class="cx"> // The multiplier and factor is applied to each value in the calc expression individually
</span><span class="cx"> return m_value.calc->computeLengthPx(conversionData);
</span><span class="cx">
</span><del>- return computeNonCalcLengthDouble(conversionData, primitiveType(), m_value.num);
</del><ins>+ return computeNonCalcLengthDouble(conversionData, static_cast<UnitTypes>(primitiveType()), m_value.num);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-double CSSPrimitiveValue::computeNonCalcLengthDouble(const CSSToLengthConversionData& conversionData, unsigned short primitiveType, double value)
</del><ins>+double CSSPrimitiveValue::computeNonCalcLengthDouble(const CSSToLengthConversionData& conversionData, UnitTypes primitiveType, double value)
</ins><span class="cx"> {
</span><span class="cx"> double factor;
</span><span class="cx">
</span><span class="lines">@@ -766,15 +766,15 @@
</span><span class="cx"> return result * conversionData.zoom();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSPrimitiveValue::setFloatValue(unsigned short, double, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> CSSPrimitiveValue::setFloatValue(unsigned short, double)
</ins><span class="cx"> {
</span><span class="cx"> // Keeping values immutable makes optimizations easier and allows sharing of the primitive value objects.
</span><span class="cx"> // No other engine supports mutating style through this API. Computed style is always read-only anyway.
</span><span class="cx"> // Supporting setter would require making primitive value copy-on-write and taking care of style invalidation.
</span><del>- ec = NO_MODIFICATION_ALLOWED_ERR;
</del><ins>+ return Exception { NO_MODIFICATION_ALLOWED_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-double CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(unsigned short unitType)
</del><ins>+double CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(UnitTypes unitType)
</ins><span class="cx"> {
</span><span class="cx"> double factor = 1.0;
</span><span class="cx"> // FIXME: the switch can be replaced by an array of scale factors.
</span><span class="lines">@@ -826,27 +826,20 @@
</span><span class="cx"> return factor;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-double CSSPrimitiveValue::getDoubleValue(unsigned short unitType, ExceptionCode& ec) const
</del><ins>+ExceptionOr<float> CSSPrimitiveValue::getFloatValue(unsigned short unitType) const
</ins><span class="cx"> {
</span><del>- double result = 0;
- bool success = getDoubleValueInternal(static_cast<UnitTypes>(unitType), &result);
- if (!success) {
- ec = INVALID_ACCESS_ERR;
- return 0.0;
- }
-
- ec = 0;
- return result;
</del><ins>+ auto result = doubleValueInternal(static_cast<UnitTypes>(unitType));
+ if (!result)
+ return Exception { INVALID_ACCESS_ERR };
+ return clampTo<float>(result.value());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-double CSSPrimitiveValue::getDoubleValue(unsigned short unitType) const
</del><ins>+double CSSPrimitiveValue::doubleValue(UnitTypes unitType) const
</ins><span class="cx"> {
</span><del>- double result = 0;
- getDoubleValueInternal(static_cast<UnitTypes>(unitType), &result);
- return result;
</del><ins>+ return doubleValueInternal(unitType).valueOr(0);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-double CSSPrimitiveValue::getDoubleValue() const
</del><ins>+double CSSPrimitiveValue::doubleValue() const
</ins><span class="cx"> {
</span><span class="cx"> return m_primitiveUnitType != CSS_CALC ? m_value.num : m_value.calc->doubleValue();
</span><span class="cx"> }
</span><span class="lines">@@ -878,16 +871,14 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSPrimitiveValue::getDoubleValueInternal(UnitTypes requestedUnitType, double* result) const
</del><ins>+Optional<double> CSSPrimitiveValue::doubleValueInternal(UnitTypes requestedUnitType) const
</ins><span class="cx"> {
</span><span class="cx"> if (!isValidCSSUnitTypeForDoubleConversion(static_cast<UnitTypes>(m_primitiveUnitType)) || !isValidCSSUnitTypeForDoubleConversion(requestedUnitType))
</span><del>- return false;
</del><ins>+ return Nullopt;
</ins><span class="cx">
</span><span class="cx"> UnitTypes sourceUnitType = static_cast<UnitTypes>(primitiveType());
</span><del>- if (requestedUnitType == sourceUnitType || requestedUnitType == CSS_DIMENSION) {
- *result = getDoubleValue();
- return true;
- }
</del><ins>+ if (requestedUnitType == sourceUnitType || requestedUnitType == CSS_DIMENSION)
+ return doubleValue();
</ins><span class="cx">
</span><span class="cx"> UnitCategory sourceCategory = unitCategory(sourceUnitType);
</span><span class="cx"> ASSERT(sourceCategory != UOther);
</span><span class="lines">@@ -898,13 +889,13 @@
</span><span class="cx">
</span><span class="cx"> // Cannot convert between unrelated unit categories if one of them is not UNumber.
</span><span class="cx"> if (sourceCategory != targetCategory && sourceCategory != UNumber && targetCategory != UNumber)
</span><del>- return false;
</del><ins>+ return Nullopt;
</ins><span class="cx">
</span><span class="cx"> if (targetCategory == UNumber) {
</span><span class="cx"> // We interpret conversion to CSS_NUMBER as conversion to a canonical unit in this value's category.
</span><span class="cx"> targetUnitType = canonicalUnitTypeForCategory(sourceCategory);
</span><span class="cx"> if (targetUnitType == CSS_UNKNOWN)
</span><del>- return false;
</del><ins>+ return Nullopt;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (sourceUnitType == CSS_NUMBER) {
</span><span class="lines">@@ -911,10 +902,10 @@
</span><span class="cx"> // We interpret conversion from CSS_NUMBER in the same way as CSSParser::validUnit() while using non-strict mode.
</span><span class="cx"> sourceUnitType = canonicalUnitTypeForCategory(targetCategory);
</span><span class="cx"> if (sourceUnitType == CSS_UNKNOWN)
</span><del>- return false;
</del><ins>+ return Nullopt;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- double convertedValue = getDoubleValue();
</del><ins>+ double convertedValue = doubleValue();
</ins><span class="cx">
</span><span class="cx"> // First convert the value from m_primitiveUnitType to canonical type.
</span><span class="cx"> double factor = conversionToCanonicalUnitsScaleFactor(sourceUnitType);
</span><span class="lines">@@ -924,21 +915,19 @@
</span><span class="cx"> factor = conversionToCanonicalUnitsScaleFactor(targetUnitType);
</span><span class="cx"> convertedValue /= factor;
</span><span class="cx">
</span><del>- *result = convertedValue;
- return true;
</del><ins>+ return convertedValue;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSPrimitiveValue::setStringValue(unsigned short, const String&, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> CSSPrimitiveValue::setStringValue(unsigned short, const String&)
</ins><span class="cx"> {
</span><span class="cx"> // Keeping values immutable makes optimizations easier and allows sharing of the primitive value objects.
</span><span class="cx"> // No other engine supports mutating style through this API. Computed style is always read-only anyway.
</span><span class="cx"> // Supporting setter would require making primitive value copy-on-write and taking care of style invalidation.
</span><del>- ec = NO_MODIFICATION_ALLOWED_ERR;
</del><ins>+ return Exception { NO_MODIFICATION_ALLOWED_ERR };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String CSSPrimitiveValue::getStringValue(ExceptionCode& ec) const
</del><ins>+ExceptionOr<String> CSSPrimitiveValue::getStringValue() const
</ins><span class="cx"> {
</span><del>- ec = 0;
</del><span class="cx"> switch (m_primitiveUnitType) {
</span><span class="cx"> case CSS_STRING:
</span><span class="cx"> case CSS_ATTR:
</span><span class="lines">@@ -945,20 +934,17 @@
</span><span class="cx"> case CSS_URI:
</span><span class="cx"> return m_value.string;
</span><span class="cx"> case CSS_FONT_FAMILY:
</span><del>- return m_value.fontFamily->familyName;
</del><ins>+ return String { m_value.fontFamily->familyName };
</ins><span class="cx"> case CSS_VALUE_ID:
</span><del>- return valueName(m_value.valueID);
</del><ins>+ return String { valueName(m_value.valueID) };
</ins><span class="cx"> case CSS_PROPERTY_ID:
</span><del>- return propertyName(m_value.propertyID);
</del><ins>+ return String { propertyName(m_value.propertyID) };
</ins><span class="cx"> default:
</span><del>- ec = INVALID_ACCESS_ERR;
- break;
</del><ins>+ return Exception { INVALID_ACCESS_ERR };
</ins><span class="cx"> }
</span><del>-
- return String();
</del><span class="cx"> }
</span><span class="cx">
</span><del>-String CSSPrimitiveValue::getStringValue() const
</del><ins>+String CSSPrimitiveValue::stringValue() const
</ins><span class="cx"> {
</span><span class="cx"> switch (m_primitiveUnitType) {
</span><span class="cx"> case CSS_STRING:
</span><span class="lines">@@ -972,80 +958,33 @@
</span><span class="cx"> case CSS_PROPERTY_ID:
</span><span class="cx"> return propertyName(m_value.propertyID);
</span><span class="cx"> default:
</span><del>- break;
</del><ins>+ return String();
</ins><span class="cx"> }
</span><del>-
- return String();
</del><span class="cx"> }
</span><span class="cx">
</span><del>-Counter* CSSPrimitiveValue::getCounterValue(ExceptionCode& ec) const
</del><ins>+ExceptionOr<Counter*> CSSPrimitiveValue::getCounterValue() const
</ins><span class="cx"> {
</span><del>- ec = 0;
- if (m_primitiveUnitType != CSS_COUNTER) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
-
</del><ins>+ if (m_primitiveUnitType != CSS_COUNTER)
+ return Exception { INVALID_ACCESS_ERR };
</ins><span class="cx"> return m_value.counter;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Rect* CSSPrimitiveValue::getRectValue(ExceptionCode& ec) const
</del><ins>+ExceptionOr<Rect*> CSSPrimitiveValue::getRectValue() const
</ins><span class="cx"> {
</span><del>- ec = 0;
- if (m_primitiveUnitType != CSS_RECT) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
-
</del><ins>+ if (m_primitiveUnitType != CSS_RECT)
+ return Exception { INVALID_ACCESS_ERR };
</ins><span class="cx"> return m_value.rect;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Quad* CSSPrimitiveValue::getQuadValue(ExceptionCode& ec) const
</del><ins>+ExceptionOr<Ref<RGBColor>> CSSPrimitiveValue::getRGBColorValue() const
</ins><span class="cx"> {
</span><del>- ec = 0;
- if (m_primitiveUnitType != CSS_QUAD) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
</del><ins>+ if (m_primitiveUnitType != CSS_RGBCOLOR)
+ return Exception { INVALID_ACCESS_ERR };
</ins><span class="cx">
</span><del>- return m_value.quad;
-}
-
-#if ENABLE(CSS_SCROLL_SNAP)
-LengthRepeat* CSSPrimitiveValue::getLengthRepeatValue(ExceptionCode& ec) const
-{
- ec = 0;
- if (m_primitiveUnitType != CSS_LENGTH_REPEAT) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
-
- return m_value.lengthRepeat;
-}
-#endif
-
-RefPtr<RGBColor> CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const
-{
- if (m_primitiveUnitType != CSS_RGBCOLOR) {
- ec = INVALID_ACCESS_ERR;
- return nullptr;
- }
-
- // FIMXE: This should not return a new object for each invocation.
</del><ins>+ // FIXME: This should not return a new object for each invocation.
</ins><span class="cx"> return RGBColor::create(m_value.color->rgb());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Pair* CSSPrimitiveValue::getPairValue(ExceptionCode& ec) const
-{
- ec = 0;
- if (m_primitiveUnitType != CSS_PAIR) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
-
- return m_value.pair;
-}
-
</del><span class="cx"> NEVER_INLINE Ref<StringImpl> CSSPrimitiveValue::formatNumberValue(const char* suffix, unsigned suffixLength) const
</span><span class="cx"> {
</span><span class="cx"> DecimalNumber decimal(m_value.num);
</span><span class="lines">@@ -1172,12 +1111,12 @@
</span><span class="cx"> return result.toString();
</span><span class="cx"> }
</span><span class="cx"> case CSS_RECT:
</span><del>- return getRectValue()->cssText();
</del><ins>+ return rectValue()->cssText();
</ins><span class="cx"> case CSS_QUAD:
</span><del>- return getQuadValue()->cssText();
</del><ins>+ return quadValue()->cssText();
</ins><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> case CSS_LENGTH_REPEAT:
</span><del>- return getLengthRepeatValue()->cssText();
</del><ins>+ return lengthRepeatValue()->cssText();
</ins><span class="cx"> #endif
</span><span class="cx"> case CSS_PARSER_HEXCOLOR: {
</span><span class="cx"> RGBA32 rgb;
</span><span class="lines">@@ -1187,11 +1126,11 @@
</span><span class="cx"> case CSS_RGBCOLOR:
</span><span class="cx"> return color().cssText();
</span><span class="cx"> case CSS_PAIR:
</span><del>- return getPairValue()->cssText();
</del><ins>+ return pairValue()->cssText();
</ins><span class="cx"> #if ENABLE(DASHBOARD_SUPPORT)
</span><span class="cx"> case CSS_DASHBOARD_REGION: {
</span><span class="cx"> StringBuilder result;
</span><del>- for (DashboardRegion* region = getDashboardRegionValue(); region; region = region->m_next.get()) {
</del><ins>+ for (DashboardRegion* region = dashboardRegionValue(); region; region = region->m_next.get()) {
</ins><span class="cx"> if (!result.isEmpty())
</span><span class="cx"> result.append(' ');
</span><span class="cx"> result.appendLiteral("dashboard-region(");
</span><span class="lines">@@ -1202,13 +1141,13 @@
</span><span class="cx"> result.appendLiteral(" rectangle");
</span><span class="cx"> else
</span><span class="cx"> break;
</span><del>- if (region->top()->m_primitiveUnitType == CSS_VALUE_ID && region->top()->getValueID() == CSSValueInvalid) {
</del><ins>+ if (region->top()->m_primitiveUnitType == CSS_VALUE_ID && region->top()->valueID() == CSSValueInvalid) {
</ins><span class="cx"> ASSERT(region->right()->m_primitiveUnitType == CSS_VALUE_ID);
</span><span class="cx"> ASSERT(region->bottom()->m_primitiveUnitType == CSS_VALUE_ID);
</span><span class="cx"> ASSERT(region->left()->m_primitiveUnitType == CSS_VALUE_ID);
</span><del>- ASSERT(region->right()->getValueID() == CSSValueInvalid);
- ASSERT(region->bottom()->getValueID() == CSSValueInvalid);
- ASSERT(region->left()->getValueID() == CSSValueInvalid);
</del><ins>+ ASSERT(region->right()->valueID() == CSSValueInvalid);
+ ASSERT(region->bottom()->valueID() == CSSValueInvalid);
+ ASSERT(region->left()->valueID() == CSSValueInvalid);
</ins><span class="cx"> } else {
</span><span class="cx"> result.append(' ');
</span><span class="cx"> result.append(region->top()->cssText());
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -33,23 +33,20 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class CSSBasicShape;
</ins><span class="cx"> class CSSCalcValue;
</span><span class="cx"> class CSSToLengthConversionData;
</span><span class="cx"> class Counter;
</span><span class="cx"> class DashboardRegion;
</span><ins>+class LengthRepeat;
</ins><span class="cx"> class Pair;
</span><span class="cx"> class Quad;
</span><span class="cx"> class RGBColor;
</span><span class="cx"> class Rect;
</span><span class="cx"> class RenderStyle;
</span><del>-class CSSBasicShape;
-struct CSSParserValue;
</del><span class="cx">
</span><del>-#if ENABLE(CSS_SCROLL_SNAP)
-class LengthRepeat;
-#endif
-
</del><span class="cx"> struct CSSFontFamily;
</span><ins>+struct CSSParserValue;
</ins><span class="cx"> struct Length;
</span><span class="cx"> struct LengthSize;
</span><span class="cx">
</span><span class="lines">@@ -178,39 +175,22 @@
</span><span class="cx"> #endif
</span><span class="cx"> UOther
</span><span class="cx"> };
</span><del>- static UnitCategory unitCategory(CSSPrimitiveValue::UnitTypes);
</del><ins>+ static UnitCategory unitCategory(UnitTypes);
</ins><span class="cx">
</span><del>- bool isAngle() const
- {
- return m_primitiveUnitType == CSS_DEG
- || m_primitiveUnitType == CSS_RAD
- || m_primitiveUnitType == CSS_GRAD
- || m_primitiveUnitType == CSS_TURN;
- }
</del><ins>+ bool isAngle() const;
</ins><span class="cx"> bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; }
</span><span class="cx"> bool isCounter() const { return m_primitiveUnitType == CSS_COUNTER; }
</span><span class="cx"> bool isFontIndependentLength() const { return m_primitiveUnitType >= CSS_PX && m_primitiveUnitType <= CSS_PC; }
</span><del>- static bool isFontRelativeLength(unsigned primitiveUnitType)
- {
- return primitiveUnitType == CSS_EMS
- || primitiveUnitType == CSS_EXS
- || primitiveUnitType == CSS_REMS
- || primitiveUnitType == CSS_CHS
- || primitiveUnitType == CSS_QUIRKY_EMS;
- }
- bool isFontRelativeLength() const { return isFontRelativeLength(m_primitiveUnitType); }
</del><ins>+ static bool isFontRelativeLength(UnitTypes);
+ bool isFontRelativeLength() const { return isFontRelativeLength(static_cast<UnitTypes>(m_primitiveUnitType)); }
</ins><span class="cx">
</span><span class="cx"> bool isQuirkyEms() const { return primitiveType() == UnitTypes::CSS_QUIRKY_EMS; }
</span><span class="cx">
</span><del>- static bool isViewportPercentageLength(unsigned short type) { return type >= CSS_VW && type <= CSS_VMAX; }
- bool isViewportPercentageLength() const { return isViewportPercentageLength(m_primitiveUnitType); }
</del><ins>+ static bool isViewportPercentageLength(UnitTypes type) { return type >= CSS_VW && type <= CSS_VMAX; }
+ bool isViewportPercentageLength() const { return isViewportPercentageLength(static_cast<UnitTypes>(m_primitiveUnitType)); }
</ins><span class="cx">
</span><del>- static bool isLength(unsigned short type)
- {
- return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS || type == CSS_CHS || isViewportPercentageLength(type) || type == CSS_QUIRKY_EMS;
- }
-
- bool isLength() const { return isLength(primitiveType()); }
</del><ins>+ static bool isLength(UnitTypes);
+ bool isLength() const { return isLength(static_cast<UnitTypes>(primitiveType())); }
</ins><span class="cx"> bool isNumber() const { return primitiveType() == CSS_NUMBER; }
</span><span class="cx"> bool isPercentage() const { return primitiveType() == CSS_PERCENTAGE; }
</span><span class="cx"> bool isPx() const { return primitiveType() == CSS_PX; }
</span><span class="lines">@@ -233,12 +213,8 @@
</span><span class="cx"> bool isDotsPerPixel() const { return primitiveType() == CSS_DPPX; }
</span><span class="cx"> bool isDotsPerCentimeter() const { return primitiveType() == CSS_DPCM; }
</span><span class="cx">
</span><del>- static bool isResolution(unsigned short type)
- {
- return type >= CSS_DPPX && type <= CSS_DPCM;
- }
-
- bool isResolution() const { return isResolution(primitiveType()); }
</del><ins>+ static bool isResolution(UnitTypes);
+ bool isResolution() const { return isResolution(static_cast<UnitTypes>(primitiveType())); }
</ins><span class="cx"> bool isViewportPercentageWidth() const { return m_primitiveUnitType == CSS_VW; }
</span><span class="cx"> bool isViewportPercentageHeight() const { return m_primitiveUnitType == CSS_VH; }
</span><span class="cx"> bool isViewportPercentageMax() const { return m_primitiveUnitType == CSS_VMAX; }
</span><span class="lines">@@ -258,21 +234,13 @@
</span><span class="cx"> static Ref<CSSPrimitiveValue> create(const Length& value, const RenderStyle& style) { return adoptRef(*new CSSPrimitiveValue(value, style)); }
</span><span class="cx"> static Ref<CSSPrimitiveValue> create(const LengthSize& value, const RenderStyle& style) { return adoptRef(*new CSSPrimitiveValue(value, style)); }
</span><span class="cx">
</span><del>- template<typename T> static Ref<CSSPrimitiveValue> create(T&& value)
- {
- return adoptRef(*new CSSPrimitiveValue(std::forward<T>(value)));
- }
</del><ins>+ template<typename T> static Ref<CSSPrimitiveValue> create(T&&);
</ins><span class="cx">
</span><span class="cx"> // This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE.
</span><span class="cx"> // The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em.
</span><span class="cx"> // When the quirky value is used, if you're in quirks mode, the margin will collapse away
</span><span class="cx"> // inside a table cell.
</span><del>- static Ref<CSSPrimitiveValue> createAllowingMarginQuirk(double value, UnitTypes type)
- {
- CSSPrimitiveValue* quirkValue = new CSSPrimitiveValue(value, type);
- quirkValue->m_isQuirkValue = true;
- return adoptRef(*quirkValue);
- }
</del><ins>+ static Ref<CSSPrimitiveValue> createAllowingMarginQuirk(double value, UnitTypes);
</ins><span class="cx">
</span><span class="cx"> ~CSSPrimitiveValue();
</span><span class="cx">
</span><span class="lines">@@ -279,6 +247,13 @@
</span><span class="cx"> void cleanup();
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT unsigned short primitiveType() const;
</span><ins>+ WEBCORE_EXPORT ExceptionOr<void> setFloatValue(unsigned short unitType, double floatValue);
+ WEBCORE_EXPORT ExceptionOr<float> getFloatValue(unsigned short unitType) const;
+ WEBCORE_EXPORT ExceptionOr<void> setStringValue(unsigned short stringType, const String& stringValue);
+ WEBCORE_EXPORT ExceptionOr<String> getStringValue() const;
+ WEBCORE_EXPORT ExceptionOr<Counter*> getCounterValue() const;
+ WEBCORE_EXPORT ExceptionOr<Rect*> getRectValue() const;
+ WEBCORE_EXPORT ExceptionOr<Ref<RGBColor>> getRGBColorValue() const;
</ins><span class="cx">
</span><span class="cx"> double computeDegrees() const;
</span><span class="cx">
</span><span class="lines">@@ -285,94 +260,45 @@
</span><span class="cx"> bool buildParserValue(CSSParserValue*) const;
</span><span class="cx">
</span><span class="cx"> enum TimeUnit { Seconds, Milliseconds };
</span><del>- template <typename T, TimeUnit timeUnit> T computeTime() const
- {
- if (timeUnit == Seconds && primitiveType() == CSS_S)
- return getValue<T>();
- if (timeUnit == Seconds && primitiveType() == CSS_MS)
- return getValue<T>() / 1000;
- if (timeUnit == Milliseconds && primitiveType() == CSS_MS)
- return getValue<T>();
- if (timeUnit == Milliseconds && primitiveType() == CSS_S)
- return getValue<T>() * 1000;
- ASSERT_NOT_REACHED();
- return 0;
- }
</del><ins>+ template<typename T, TimeUnit timeUnit> T computeTime() const;
</ins><span class="cx">
</span><del>- /*
- * computes a length in pixels out of the given CSSValue. Need the RenderStyle to get
- * the fontinfo in case val is defined in em or ex.
- *
- * The metrics have to be a bit different for screen and printer output.
- * For screen output we assume 1 inch == 72 px, for printer we assume 300 dpi
- *
- * this is screen/printer dependent, so we probably need a config option for this,
- * and some tool to calibrate.
- */
</del><span class="cx"> template<typename T> T computeLength(const CSSToLengthConversionData&) const;
</span><del>-
- // Converts to a Length, mapping various unit types appropriately.
</del><span class="cx"> template<int> Length convertToLength(const CSSToLengthConversionData&) const;
</span><span class="cx">
</span><span class="cx"> bool convertingToLengthRequiresNonNullStyle(int lengthConversion) const;
</span><span class="cx">
</span><del>- // use with care!!!
- void setPrimitiveType(unsigned short type) { m_primitiveUnitType = type; }
</del><ins>+ double doubleValue(UnitTypes) const;
+ double doubleValue() const;
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT double getDoubleValue(unsigned short unitType, ExceptionCode&) const;
- double getDoubleValue(unsigned short unitType) const;
- double getDoubleValue() const;
</del><ins>+ template<typename T> inline T value(UnitTypes type) const { return clampTo<T>(doubleValue(type)); }
+ template<typename T> inline T value() const { return clampTo<T>(doubleValue()); }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setFloatValue(unsigned short unitType, double floatValue, ExceptionCode&);
- float getFloatValue(unsigned short unitType, ExceptionCode& ec) const { return getValue<float>(unitType, ec); }
- float getFloatValue(unsigned short unitType) const { return getValue<float>(unitType); }
- float getFloatValue() const { return getValue<float>(); }
</del><ins>+ float floatValue(UnitTypes type) const { return value<float>(type); }
+ float floatValue() const { return value<float>(); }
</ins><span class="cx">
</span><del>- int getIntValue(unsigned short unitType, ExceptionCode& ec) const { return getValue<int>(unitType, ec); }
- int getIntValue(unsigned short unitType) const { return getValue<int>(unitType); }
- int getIntValue() const { return getValue<int>(); }
</del><ins>+ int intValue(UnitTypes type) const { return value<int>(type); }
+ int intValue() const { return value<int>(); }
</ins><span class="cx">
</span><del>- template<typename T> inline T getValue(unsigned short unitType, ExceptionCode& ec) const { return clampTo<T>(getDoubleValue(unitType, ec)); }
- template<typename T> inline T getValue(unsigned short unitType) const { return clampTo<T>(getDoubleValue(unitType)); }
- template<typename T> inline T getValue() const { return clampTo<T>(getDoubleValue()); }
</del><ins>+ WEBCORE_EXPORT String stringValue() const;
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT void setStringValue(unsigned short stringType, const String& stringValue, ExceptionCode&);
- WEBCORE_EXPORT String getStringValue(ExceptionCode&) const;
- WEBCORE_EXPORT String getStringValue() const;
</del><ins>+ const Color& color() const { ASSERT(m_primitiveUnitType == CSS_RGBCOLOR); return *m_value.color; }
+ Counter* counterValue() const { return m_primitiveUnitType != CSS_COUNTER ? nullptr : m_value.counter; }
+ CSSCalcValue* cssCalcValue() const { return m_primitiveUnitType != CSS_CALC ? nullptr : m_value.calc; }
+ const CSSFontFamily& fontFamily() const { ASSERT(m_primitiveUnitType == CSS_FONT_FAMILY); return *m_value.fontFamily; }
+ Pair* pairValue() const { return m_primitiveUnitType != CSS_PAIR ? nullptr : m_value.pair; }
+ CSSPropertyID propertyID() const { return m_primitiveUnitType == CSS_PROPERTY_ID ? m_value.propertyID : CSSPropertyInvalid; }
+ Quad* quadValue() const { return m_primitiveUnitType != CSS_QUAD ? nullptr : m_value.quad; }
+ Rect* rectValue() const { return m_primitiveUnitType != CSS_RECT ? nullptr : m_value.rect; }
+ CSSBasicShape* shapeValue() const { return m_primitiveUnitType != CSS_SHAPE ? nullptr : m_value.shape; }
+ CSSValueID valueID() const { return m_primitiveUnitType == CSS_VALUE_ID ? m_value.valueID : CSSValueInvalid; }
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT Counter* getCounterValue(ExceptionCode&) const;
- Counter* getCounterValue() const { return m_primitiveUnitType != CSS_COUNTER ? nullptr : m_value.counter; }
-
- WEBCORE_EXPORT Rect* getRectValue(ExceptionCode&) const;
- Rect* getRectValue() const { return m_primitiveUnitType != CSS_RECT ? nullptr : m_value.rect; }
-
- Quad* getQuadValue(ExceptionCode&) const;
- Quad* getQuadValue() const { return m_primitiveUnitType != CSS_QUAD ? nullptr : m_value.quad; }
-
</del><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><del>- LengthRepeat* getLengthRepeatValue(ExceptionCode&) const;
- LengthRepeat* getLengthRepeatValue() const { return m_primitiveUnitType != CSS_LENGTH_REPEAT ? nullptr : m_value.lengthRepeat; }
</del><ins>+ LengthRepeat* lengthRepeatValue() const { return m_primitiveUnitType != CSS_LENGTH_REPEAT ? nullptr : m_value.lengthRepeat; }
</ins><span class="cx"> #endif
</span><del>-
- WEBCORE_EXPORT RefPtr<RGBColor> getRGBColorValue(ExceptionCode&) const;
- const Color& color() const { ASSERT(m_primitiveUnitType == CSS_RGBCOLOR); return *m_value.color; }
-
- Pair* getPairValue(ExceptionCode&) const;
- Pair* getPairValue() const { return m_primitiveUnitType != CSS_PAIR ? nullptr : m_value.pair; }
-
</del><span class="cx"> #if ENABLE(DASHBOARD_SUPPORT)
</span><del>- DashboardRegion* getDashboardRegionValue() const { return m_primitiveUnitType != CSS_DASHBOARD_REGION ? nullptr : m_value.region; }
</del><ins>+ DashboardRegion* dashboardRegionValue() const { return m_primitiveUnitType != CSS_DASHBOARD_REGION ? nullptr : m_value.region; }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- CSSBasicShape* getShapeValue() const { return m_primitiveUnitType != CSS_SHAPE ? nullptr : m_value.shape; }
-
- const CSSFontFamily& fontFamily() const { ASSERT(m_primitiveUnitType == CSS_FONT_FAMILY); return *m_value.fontFamily; }
-
- CSSCalcValue* cssCalcValue() const { return m_primitiveUnitType != CSS_CALC ? nullptr : m_value.calc; }
-
- CSSPropertyID getPropertyID() const { return m_primitiveUnitType == CSS_PROPERTY_ID ? m_value.propertyID : CSSPropertyInvalid; }
- CSSValueID getValueID() const { return m_primitiveUnitType == CSS_VALUE_ID ? m_value.valueID : CSSValueInvalid; }
-
</del><span class="cx"> template<typename T> inline operator T() const; // Defined in CSSPrimitiveValueMappings.h
</span><span class="cx">
</span><span class="cx"> String customCSSText() const;
</span><span class="lines">@@ -386,9 +312,9 @@
</span><span class="cx"> bool equals(const CSSPrimitiveValue&) const;
</span><span class="cx">
</span><span class="cx"> static UnitTypes canonicalUnitTypeForCategory(UnitCategory);
</span><del>- static double conversionToCanonicalUnitsScaleFactor(unsigned short unitType);
</del><ins>+ static double conversionToCanonicalUnitsScaleFactor(UnitTypes);
</ins><span class="cx">
</span><del>- static double computeNonCalcLengthDouble(const CSSToLengthConversionData&, unsigned short primitiveType, double value);
</del><ins>+ static double computeNonCalcLengthDouble(const CSSToLengthConversionData&, UnitTypes, double value);
</ins><span class="cx">
</span><span class="cx"> #if COMPILER(MSVC)
</span><span class="cx"> // FIXME: This should be private, but for some reason MSVC then fails to invoke it from LazyNeverDestroyed::construct.
</span><span class="lines">@@ -401,7 +327,6 @@
</span><span class="cx">
</span><span class="cx"> CSSPrimitiveValue(CSSValueID);
</span><span class="cx"> CSSPrimitiveValue(CSSPropertyID);
</span><del>- // FIXME: int vs. unsigned overloading is too subtle to distinguish the color and operator cases.
</del><span class="cx"> CSSPrimitiveValue(int parserOperator);
</span><span class="cx"> CSSPrimitiveValue(const Color&);
</span><span class="cx"> CSSPrimitiveValue(const Length&);
</span><span class="lines">@@ -411,19 +336,9 @@
</span><span class="cx"> CSSPrimitiveValue(double, UnitTypes);
</span><span class="cx">
</span><span class="cx"> template<typename T> CSSPrimitiveValue(T); // Defined in CSSPrimitiveValueMappings.h
</span><ins>+ template<typename T> CSSPrimitiveValue(RefPtr<T>&&);
+ template<typename T> CSSPrimitiveValue(Ref<T>&&);
</ins><span class="cx">
</span><del>- template<typename T> CSSPrimitiveValue(RefPtr<T>&& value)
- : CSSValue(PrimitiveClass)
- {
- init(WTFMove(value));
- }
-
- template<typename T> CSSPrimitiveValue(Ref<T>&& value)
- : CSSValue(PrimitiveClass)
- {
- init(WTFMove(value));
- }
-
</del><span class="cx"> static void create(int); // compile-time guard
</span><span class="cx"> static void create(unsigned); // compile-time guard
</span><span class="cx"> template<typename T> operator T*(); // compile-time guard
</span><span class="lines">@@ -430,10 +345,13 @@
</span><span class="cx">
</span><span class="cx"> void init(const Length&);
</span><span class="cx"> void init(const LengthSize&, const RenderStyle&);
</span><ins>+ void init(Ref<CSSBasicShape>&&);
+ void init(RefPtr<CSSCalcValue>&&);
</ins><span class="cx"> void init(Ref<Counter>&&);
</span><del>- void init(Ref<Rect>&&);
</del><span class="cx"> void init(Ref<Pair>&&);
</span><span class="cx"> void init(Ref<Quad>&&);
</span><ins>+ void init(Ref<Rect>&&);
+
</ins><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> void init(Ref<LengthRepeat>&&);
</span><span class="cx"> #endif
</span><span class="lines">@@ -440,15 +358,13 @@
</span><span class="cx"> #if ENABLE(DASHBOARD_SUPPORT)
</span><span class="cx"> void init(RefPtr<DashboardRegion>&&); // FIXME: Dashboard region should not be a primitive value.
</span><span class="cx"> #endif
</span><del>- void init(Ref<CSSBasicShape>&&);
- void init(RefPtr<CSSCalcValue>&&);
- bool getDoubleValueInternal(UnitTypes targetUnitType, double* result) const;
</del><span class="cx">
</span><ins>+ Optional<double> doubleValueInternal(UnitTypes targetUnitType) const;
+
</ins><span class="cx"> double computeLengthDouble(const CSSToLengthConversionData&) const;
</span><span class="cx">
</span><span class="cx"> ALWAYS_INLINE String formatNumberForCustomCSSText() const;
</span><del>- template <unsigned characterCount>
- ALWAYS_INLINE Ref<StringImpl> formatNumberValue(const char (&characters)[characterCount]) const;
</del><ins>+ template<unsigned characterCount> ALWAYS_INLINE Ref<StringImpl> formatNumberValue(const char (&characters)[characterCount]) const;
</ins><span class="cx"> NEVER_INLINE Ref<StringImpl> formatNumberValue(const char* suffix, unsigned suffixLength) const;
</span><span class="cx">
</span><span class="cx"> union {
</span><span class="lines">@@ -460,9 +376,6 @@
</span><span class="cx"> Counter* counter;
</span><span class="cx"> Rect* rect;
</span><span class="cx"> Quad* quad;
</span><del>-#if ENABLE(CSS_SCROLL_SNAP)
- LengthRepeat* lengthRepeat;
-#endif
</del><span class="cx"> const Color* color;
</span><span class="cx"> Pair* pair;
</span><span class="cx"> DashboardRegion* region;
</span><span class="lines">@@ -469,9 +382,81 @@
</span><span class="cx"> CSSBasicShape* shape;
</span><span class="cx"> CSSCalcValue* calc;
</span><span class="cx"> const CSSFontFamily* fontFamily;
</span><ins>+#if ENABLE(CSS_SCROLL_SNAP)
+ LengthRepeat* lengthRepeat;
+#endif
</ins><span class="cx"> } m_value;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+inline bool CSSPrimitiveValue::isAngle() const
+{
+ return m_primitiveUnitType == CSS_DEG
+ || m_primitiveUnitType == CSS_RAD
+ || m_primitiveUnitType == CSS_GRAD
+ || m_primitiveUnitType == CSS_TURN;
+}
+
+inline bool CSSPrimitiveValue::isFontRelativeLength(UnitTypes type)
+{
+ return type == CSS_EMS
+ || type == CSS_EXS
+ || type == CSS_REMS
+ || type == CSS_CHS
+ || type == CSS_QUIRKY_EMS;
+}
+
+inline bool CSSPrimitiveValue::isLength(UnitTypes type)
+{
+ return (type >= CSS_EMS && type <= CSS_PC)
+ || type == CSS_REMS
+ || type == CSS_CHS
+ || isViewportPercentageLength(type)
+ || type == CSS_QUIRKY_EMS;
+}
+
+inline bool CSSPrimitiveValue::isResolution(UnitTypes type)
+{
+ return type >= CSS_DPPX && type <= CSS_DPCM;
+}
+
+template<typename T> inline Ref<CSSPrimitiveValue> CSSPrimitiveValue::create(T&& value)
+{
+ return adoptRef(*new CSSPrimitiveValue(std::forward<T>(value)));
+}
+
+inline Ref<CSSPrimitiveValue> CSSPrimitiveValue::createAllowingMarginQuirk(double value, UnitTypes type)
+{
+ auto result = adoptRef(*new CSSPrimitiveValue(value, type));
+ result->m_isQuirkValue = true;
+ return result;
+}
+
+template<typename T, CSSPrimitiveValue::TimeUnit timeUnit> inline T CSSPrimitiveValue::computeTime() const
+{
+ if (timeUnit == Seconds && primitiveType() == CSS_S)
+ return value<T>();
+ if (timeUnit == Seconds && primitiveType() == CSS_MS)
+ return value<T>() / 1000;
+ if (timeUnit == Milliseconds && primitiveType() == CSS_MS)
+ return value<T>();
+ if (timeUnit == Milliseconds && primitiveType() == CSS_S)
+ return value<T>() * 1000;
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+template<typename T> inline CSSPrimitiveValue::CSSPrimitiveValue(RefPtr<T>&& value)
+ : CSSValue(PrimitiveClass)
+{
+ init(WTFMove(value));
+}
+
+template<typename T> inline CSSPrimitiveValue::CSSPrimitiveValue(Ref<T>&& value)
+ : CSSValue(PrimitiveClass)
+{
+ init(WTFMove(value));
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSPrimitiveValue, isPrimitiveValue())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -20,7 +20,6 @@
</span><span class="cx"> [
</span><span class="cx"> ImplementationLacksVTable,
</span><span class="cx"> ] interface CSSPrimitiveValue : CSSValue {
</span><del>-
</del><span class="cx"> // UnitTypes
</span><span class="cx"> const unsigned short CSS_UNKNOWN = 0;
</span><span class="cx"> const unsigned short CSS_NUMBER = 1;
</span><span class="lines">@@ -55,13 +54,13 @@
</span><span class="cx">
</span><span class="cx"> readonly attribute unsigned short primitiveType;
</span><span class="cx">
</span><del>- [MayThrowLegacyException] void setFloatValue(optional unsigned short unitType = 0, optional unrestricted float floatValue = NaN);
- [MayThrowLegacyException] unrestricted float getFloatValue(optional unsigned short unitType = 0);
</del><ins>+ [MayThrowException] void setFloatValue(optional unsigned short unitType = 0, optional unrestricted float floatValue = NaN);
+ [MayThrowException] unrestricted float getFloatValue(optional unsigned short unitType = 0);
</ins><span class="cx">
</span><del>- // FIXME: Using "undefined" as default parameter value is wrong.
- [MayThrowLegacyException] void setStringValue(optional unsigned short stringType = 0, optional DOMString stringValue = "undefined");
- [MayThrowLegacyException] DOMString getStringValue();
- [MayThrowLegacyException] Counter getCounterValue();
- [MayThrowLegacyException] Rect getRectValue();
- [MayThrowLegacyException] RGBColor getRGBColorValue();
</del><ins>+ [MayThrowException] void setStringValue(optional unsigned short stringType = 0, optional DOMString stringValue);
+ [MayThrowException] DOMString getStringValue();
+
+ [MayThrowException] Counter getCounterValue();
+ [MayThrowException] Rect getRectValue();
+ [MayThrowException] RGBColor getRGBColorValue();
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -27,8 +27,7 @@
</span><span class="cx"> * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef CSSPrimitiveValueMappings_h
-#define CSSPrimitiveValueMappings_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSCalculationValue.h"
</span><span class="cx"> #include "CSSFontFamily.h"
</span><span class="lines">@@ -82,7 +81,7 @@
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator unsigned short() const
</span><span class="cx"> {
</span><span class="cx"> if (primitiveType() == CSS_NUMBER)
</span><del>- return getValue<unsigned short>();
</del><ins>+ return value<unsigned short>();
</ins><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="lines">@@ -91,7 +90,7 @@
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator int() const
</span><span class="cx"> {
</span><span class="cx"> if (primitiveType() == CSS_NUMBER)
</span><del>- return getValue<int>();
</del><ins>+ return value<int>();
</ins><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="lines">@@ -100,7 +99,7 @@
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator unsigned() const
</span><span class="cx"> {
</span><span class="cx"> if (primitiveType() == CSS_NUMBER)
</span><del>- return getValue<unsigned>();
</del><ins>+ return value<unsigned>();
</ins><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="lines">@@ -117,7 +116,7 @@
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator float() const
</span><span class="cx"> {
</span><span class="cx"> if (primitiveType() == CSS_NUMBER)
</span><del>- return getValue<float>();
</del><ins>+ return value<float>();
</ins><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0.0f;
</span><span class="lines">@@ -133,10 +132,10 @@
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator LineClampValue() const
</span><span class="cx"> {
</span><span class="cx"> if (primitiveType() == CSS_NUMBER)
</span><del>- return LineClampValue(getValue<int>(), LineClampLineCount);
</del><ins>+ return LineClampValue(value<int>(), LineClampLineCount);
</ins><span class="cx">
</span><span class="cx"> if (primitiveType() == CSS_PERCENTAGE)
</span><del>- return LineClampValue(getValue<int>(), LineClampPercentage);
</del><ins>+ return LineClampValue(value<int>(), LineClampPercentage);
</ins><span class="cx">
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return LineClampValue();
</span><span class="lines">@@ -4614,8 +4613,8 @@
</span><span class="cx"> if ((supported & FixedFloatConversion) && isLength())
</span><span class="cx"> return Length(computeLength<double>(conversionData), Fixed);
</span><span class="cx"> if ((supported & PercentConversion) && isPercentage())
</span><del>- return Length(getDoubleValue(), Percent);
- if ((supported & AutoConversion) && getValueID() == CSSValueAuto)
</del><ins>+ return Length(doubleValue(), Percent);
+ if ((supported & AutoConversion) && valueID() == CSSValueAuto)
</ins><span class="cx"> return Length(Auto);
</span><span class="cx"> if ((supported & CalculatedConversion) && isCalculated())
</span><span class="cx"> return Length(cssCalcValue()->createCalculationValue(conversionData));
</span><span class="lines">@@ -5045,7 +5044,7 @@
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator ImageOrientationEnum() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isAngle());
</span><del>- double quarters = 4 * getDoubleValue(CSS_TURN);
</del><ins>+ double quarters = 4 * doubleValue(CSS_TURN);
</ins><span class="cx"> int orientation = 3 & static_cast<int>(quarters < 0 ? floor(quarters) : ceil(quarters));
</span><span class="cx"> switch (orientation) {
</span><span class="cx"> case 0:
</span><span class="lines">@@ -5099,7 +5098,7 @@
</span><span class="cx">
</span><span class="cx"> template<> inline CSSPrimitiveValue::operator CSSBoxType() const
</span><span class="cx"> {
</span><del>- switch (getValueID()) {
</del><ins>+ switch (valueID()) {
</ins><span class="cx"> case CSSValueMarginBox:
</span><span class="cx"> return MarginBox;
</span><span class="cx"> case CSSValueBorderBox:
</span><span class="lines">@@ -5686,6 +5685,5 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return FontVariantAlternates::Normal;
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> }
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSRule.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSRule.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSRule.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -45,9 +45,9 @@
</span><span class="cx"> COMPILE_ASSERT(StyleRuleBase::Viewport == static_cast<StyleRuleBase::Type>(CSSRule::WEBKIT_VIEWPORT_RULE), enums_should_match);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void CSSRule::setCssText(const String& /*cssText*/, ExceptionCode& /*ec*/)
</del><ins>+ExceptionOr<void> CSSRule::setCssText(const String&)
</ins><span class="cx"> {
</span><del>- notImplemented();
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const CSSParserContext& CSSRule::parserContext() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSRule.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSRule.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSRule.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -22,16 +22,15 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include <wtf/RefCounted.h>
</del><ins>+#include "ExceptionOr.h"
</ins><span class="cx"> #include <wtf/TypeCasts.h>
</span><del>-#include <wtf/text/WTFString.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class CSSStyleSheet;
</span><span class="cx"> class StyleRuleBase;
</span><ins>+
</ins><span class="cx"> struct CSSParserContext;
</span><del>-typedef int ExceptionCode;
</del><span class="cx">
</span><span class="cx"> class CSSRule : public RefCounted<CSSRule> {
</span><span class="cx"> public:
</span><span class="lines">@@ -89,7 +88,7 @@
</span><span class="cx">
</span><span class="cx"> CSSRule* parentRule() const { return m_parentIsRule ? m_parentRule : 0; }
</span><span class="cx">
</span><del>- WEBCORE_EXPORT void setCssText(const String&, ExceptionCode&);
</del><ins>+ WEBCORE_EXPORT ExceptionOr<void> setCssText(const String&);
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> CSSRule(CSSStyleSheet* parent)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSRuleidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSRule.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSRule.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSRule.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -36,19 +36,16 @@
</span><span class="cx"> const unsigned short KEYFRAMES_RULE = 7;
</span><span class="cx"> const unsigned short KEYFRAME_RULE = 8;
</span><span class="cx"> const unsigned short SUPPORTS_RULE = 12;
</span><del>-#if defined(ENABLE_CSS_DEVICE_ADAPTATION) && ENABLE_CSS_DEVICE_ADAPTATION
- const unsigned short WEBKIT_VIEWPORT_RULE = 15;
-#endif
-#if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
- const unsigned short WEBKIT_REGION_RULE = 16;
-#endif
</del><ins>+ [Conditional=CSS_DEVICE_ADAPTATION] const unsigned short WEBKIT_VIEWPORT_RULE = 15;
+ [Conditional=CSS_REGIONS] const unsigned short WEBKIT_REGION_RULE = 16;
</ins><span class="cx">
</span><del>- const unsigned short WEBKIT_KEYFRAMES_RULE = 7; // Avoid breaking existing content.
</del><ins>+ // Legacy synonyms for the above, kept to avoid breaking existing content.
+ const unsigned short WEBKIT_KEYFRAMES_RULE = 7;
</ins><span class="cx"> const unsigned short WEBKIT_KEYFRAME_RULE = 8;
</span><span class="cx">
</span><span class="cx"> readonly attribute unsigned short type;
</span><span class="cx">
</span><del>- [SetterMayThrowLegacyException] attribute DOMString? cssText;
</del><ins>+ [SetterMayThrowException] attribute DOMString? cssText;
</ins><span class="cx">
</span><span class="cx"> readonly attribute CSSStyleSheet? parentStyleSheet;
</span><span class="cx"> readonly attribute CSSRule? parentRule;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleDeclaration.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleDeclaration.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSStyleDeclaration.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -18,10 +18,10 @@
</span><span class="cx"> * Boston, MA 02110-1301, USA.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef CSSStyleDeclaration_h
-#define CSSStyleDeclaration_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSPropertyNames.h"
</span><ins>+#include "ExceptionOr.h"
</ins><span class="cx"> #include "ScriptWrappable.h"
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx">
</span><span class="lines">@@ -35,8 +35,6 @@
</span><span class="cx"> class StyleProperties;
</span><span class="cx"> class StyledElement;
</span><span class="cx">
</span><del>-typedef int ExceptionCode;
-
</del><span class="cx"> class CSSStyleDeclaration : public ScriptWrappable {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="lines">@@ -48,7 +46,7 @@
</span><span class="cx"> virtual StyledElement* parentElement() const { return nullptr; }
</span><span class="cx"> virtual CSSRule* parentRule() const = 0;
</span><span class="cx"> virtual String cssText() const = 0;
</span><del>- virtual void setCssText(const String&, ExceptionCode&) = 0;
</del><ins>+ virtual ExceptionOr<void> setCssText(const String&) = 0;
</ins><span class="cx"> virtual unsigned length() const = 0;
</span><span class="cx"> virtual String item(unsigned index) const = 0;
</span><span class="cx"> virtual RefPtr<CSSValue> getPropertyCSSValue(const String& propertyName) = 0;
</span><span class="lines">@@ -56,8 +54,8 @@
</span><span class="cx"> virtual String getPropertyPriority(const String& propertyName) = 0;
</span><span class="cx"> virtual String getPropertyShorthand(const String& propertyName) = 0;
</span><span class="cx"> virtual bool isPropertyImplicit(const String& propertyName) = 0;
</span><del>- virtual void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&) = 0;
- virtual String removeProperty(const String& propertyName, ExceptionCode&) = 0;
</del><ins>+ virtual ExceptionOr<void> setProperty(const String& propertyName, const String& value, const String& priority) = 0;
+ virtual ExceptionOr<String> removeProperty(const String& propertyName) = 0;
</ins><span class="cx">
</span><span class="cx"> // CSSPropertyID versions of the CSSOM functions to support bindings and editing.
</span><span class="cx"> // Use the non-virtual methods in the concrete subclasses when possible.
</span><span class="lines">@@ -64,11 +62,11 @@
</span><span class="cx"> // The CSSValue returned by this function should not be exposed to the web as it may be used by multiple documents at the same time.
</span><span class="cx"> virtual RefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0;
</span><span class="cx"> virtual String getPropertyValueInternal(CSSPropertyID) = 0;
</span><del>- virtual bool setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) = 0;
</del><ins>+ virtual ExceptionOr<bool> setPropertyInternal(CSSPropertyID, const String& value, bool important) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual Ref<MutableStyleProperties> copyProperties() const = 0;
</span><span class="cx">
</span><del>- virtual CSSStyleSheet* parentStyleSheet() const { return 0; }
</del><ins>+ virtual CSSStyleSheet* parentStyleSheet() const { return nullptr; }
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> CSSStyleDeclaration() { }
</span><span class="lines">@@ -75,5 +73,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // CSSStyleDeclaration_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleDeclarationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleDeclaration.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleDeclaration.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSStyleDeclaration.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -28,15 +28,15 @@
</span><span class="cx"> JSCustomMarkFunction,
</span><span class="cx"> SkipVTableValidation,
</span><span class="cx"> ] interface CSSStyleDeclaration {
</span><del>- [SetterMayThrowLegacyException] attribute DOMString cssText;
</del><ins>+ [SetterMayThrowException] attribute DOMString cssText;
</ins><span class="cx">
</span><span class="cx"> DOMString getPropertyValue(DOMString propertyName);
</span><span class="cx"> [Custom] CSSValue? getPropertyCSSValue(DOMString propertyName);
</span><span class="cx">
</span><del>- [MayThrowLegacyException] DOMString removeProperty(DOMString propertyName);
</del><ins>+ [MayThrowException] DOMString removeProperty(DOMString propertyName);
</ins><span class="cx"> DOMString? getPropertyPriority(DOMString propertyName);
</span><span class="cx">
</span><del>- [MayThrowLegacyException] void setProperty(DOMString propertyName, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
</del><ins>+ [MayThrowException] void setProperty(DOMString propertyName, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
</ins><span class="cx">
</span><span class="cx"> readonly attribute unsigned long length;
</span><span class="cx"> getter DOMString item(unsigned long index);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -284,38 +284,31 @@
</span><span class="cx"> return nonCharsetRules;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned CSSStyleSheet::deprecatedInsertRule(const String& ruleString, ExceptionCode& ec)
</del><ins>+ExceptionOr<unsigned> CSSStyleSheet::deprecatedInsertRule(const String& ruleString)
</ins><span class="cx"> {
</span><span class="cx"> if (auto* document = ownerDocument())
</span><span class="cx"> document->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Calling CSSStyleSheet.insertRule() with one argument is deprecated. Please pass the index argument as well: insertRule(x, 0)."));
</span><span class="cx">
</span><del>- return insertRule(ruleString, 0, ec);
</del><ins>+ return insertRule(ruleString, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned CSSStyleSheet::insertRule(const String& ruleString, unsigned index, ExceptionCode& ec)
</del><ins>+ExceptionOr<unsigned> CSSStyleSheet::insertRule(const String& ruleString, unsigned index)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_childRuleCSSOMWrappers.isEmpty() || m_childRuleCSSOMWrappers.size() == m_contents->ruleCount());
</span><span class="cx">
</span><del>- ec = 0;
- if (index > length()) {
- ec = INDEX_SIZE_ERR;
- return 0;
- }
</del><ins>+ if (index > length())
+ return Exception { INDEX_SIZE_ERR };
</ins><span class="cx"> CSSParser p(m_contents.get().parserContext());
</span><span class="cx"> RefPtr<StyleRuleBase> rule = p.parseRule(m_contents.ptr(), ruleString);
</span><span class="cx">
</span><del>- if (!rule) {
- ec = SYNTAX_ERR;
- return 0;
- }
</del><ins>+ if (!rule)
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> RuleMutationScope mutationScope(this, RuleInsertion, is<StyleRuleKeyframes>(*rule) ? downcast<StyleRuleKeyframes>(rule.get()) : nullptr);
</span><span class="cx">
</span><span class="cx"> bool success = m_contents.get().wrapperInsertRule(rule.releaseNonNull(), index);
</span><del>- if (!success) {
- ec = HIERARCHY_REQUEST_ERR;
- return 0;
- }
</del><ins>+ if (!success)
+ return Exception { HIERARCHY_REQUEST_ERR };
</ins><span class="cx"> if (!m_childRuleCSSOMWrappers.isEmpty())
</span><span class="cx"> m_childRuleCSSOMWrappers.insert(index, RefPtr<CSSRule>());
</span><span class="cx">
</span><span class="lines">@@ -322,15 +315,12 @@
</span><span class="cx"> return index;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CSSStyleSheet::deleteRule(unsigned index, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> CSSStyleSheet::deleteRule(unsigned index)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_childRuleCSSOMWrappers.isEmpty() || m_childRuleCSSOMWrappers.size() == m_contents->ruleCount());
</span><span class="cx">
</span><del>- ec = 0;
- if (index >= length()) {
- ec = INDEX_SIZE_ERR;
- return;
- }
</del><ins>+ if (index >= length())
+ return Exception { INDEX_SIZE_ERR };
</ins><span class="cx"> RuleMutationScope mutationScope(this);
</span><span class="cx">
</span><span class="cx"> m_contents->wrapperDeleteRule(index);
</span><span class="lines">@@ -340,9 +330,11 @@
</span><span class="cx"> m_childRuleCSSOMWrappers[index]->setParentStyleSheet(nullptr);
</span><span class="cx"> m_childRuleCSSOMWrappers.remove(index);
</span><span class="cx"> }
</span><ins>+
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-int CSSStyleSheet::addRule(const String& selector, const String& style, Optional<unsigned> index, ExceptionCode& ec)
</del><ins>+ExceptionOr<int> CSSStyleSheet::addRule(const String& selector, const String& style, Optional<unsigned> index)
</ins><span class="cx"> {
</span><span class="cx"> StringBuilder text;
</span><span class="cx"> text.append(selector);
</span><span class="lines">@@ -351,7 +343,9 @@
</span><span class="cx"> if (!style.isEmpty())
</span><span class="cx"> text.append(' ');
</span><span class="cx"> text.append('}');
</span><del>- insertRule(text.toString(), index.valueOr(length()), ec);
</del><ins>+ auto insertRuleResult = insertRule(text.toString(), index.valueOr(length()));
+ if (insertRuleResult.hasException())
+ return insertRuleResult.releaseException();
</ins><span class="cx">
</span><span class="cx"> // As per Microsoft documentation, always return -1.
</span><span class="cx"> return -1;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSStyleSheet.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><span class="cx"> #include "CSSParserMode.h"
</span><ins>+#include "ExceptionOr.h"
</ins><span class="cx"> #include "StyleSheet.h"
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="lines">@@ -49,8 +50,6 @@
</span><span class="cx"> class Scope;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-typedef int ExceptionCode;
-
</del><span class="cx"> class CSSStyleSheet final : public StyleSheet {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<CSSStyleSheet> create(Ref<StyleSheetContents>&&, CSSImportRule* ownerRule = 0);
</span><span class="lines">@@ -68,14 +67,13 @@
</span><span class="cx"> void setDisabled(bool) final;
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT RefPtr<CSSRuleList> cssRules();
</span><del>- WEBCORE_EXPORT unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
- unsigned deprecatedInsertRule(const String& rule, ExceptionCode&);
- WEBCORE_EXPORT void deleteRule(unsigned index, ExceptionCode&);
</del><ins>+ WEBCORE_EXPORT ExceptionOr<unsigned> insertRule(const String& rule, unsigned index);
+ ExceptionOr<unsigned> deprecatedInsertRule(const String& rule);
+ WEBCORE_EXPORT ExceptionOr<void> deleteRule(unsigned index);
</ins><span class="cx">
</span><del>- // IE Extensions
</del><span class="cx"> WEBCORE_EXPORT RefPtr<CSSRuleList> rules();
</span><del>- WEBCORE_EXPORT int addRule(const String& selector, const String& style, Optional<unsigned> index, ExceptionCode&);
- void removeRule(unsigned index, ExceptionCode& ec) { deleteRule(index, ec); }
</del><ins>+ WEBCORE_EXPORT ExceptionOr<int> addRule(const String& selector, const String& style, Optional<unsigned> index);
+ ExceptionOr<void> removeRule(unsigned index) { return deleteRule(index); }
</ins><span class="cx">
</span><span class="cx"> // For CSSRuleList.
</span><span class="cx"> unsigned length() const;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheetidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSStyleSheet.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -22,14 +22,14 @@
</span><span class="cx"> readonly attribute CSSRule ownerRule;
</span><span class="cx"> readonly attribute CSSRuleList cssRules;
</span><span class="cx">
</span><del>- [MayThrowLegacyException] unsigned long insertRule(DOMString rule, unsigned long index);
- [MayThrowLegacyException, ImplementedAs=deprecatedInsertRule] unsigned long insertRule(DOMString rule); // Deprecated.
</del><ins>+ [MayThrowException] unsigned long insertRule(DOMString rule, unsigned long index);
+ [MayThrowException, ImplementedAs=deprecatedInsertRule] unsigned long insertRule(DOMString rule); // Deprecated.
</ins><span class="cx">
</span><del>- [MayThrowLegacyException] void deleteRule(unsigned long index);
</del><ins>+ [MayThrowException] void deleteRule(unsigned long index);
</ins><span class="cx">
</span><span class="cx"> readonly attribute CSSRuleList rules;
</span><span class="cx">
</span><del>- // FIXME: Those operations are WebKit-specific.
- [MayThrowLegacyException] long addRule(optional DOMString selector = "undefined", optional DOMString style = "undefined", optional unsigned long index);
- [MayThrowLegacyException] void removeRule(optional unsigned long index = 0);
</del><ins>+ // The following two operations are WebKit-specific.
+ [MayThrowException] long addRule(optional DOMString selector = "undefined", optional DOMString style = "undefined", optional unsigned long index);
+ [MayThrowException] void removeRule(optional unsigned long index = 0);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSupportsRuleidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSupportsRule.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSupportsRule.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSSupportsRule.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> readonly attribute CSSRuleList cssRules;
</span><span class="cx"> readonly attribute DOMString conditionText;
</span><span class="cx">
</span><del>- [MayThrowLegacyException] unsigned long insertRule(DOMString rule, unsigned long index);
- [MayThrowLegacyException] void deleteRule(unsigned long index);
</del><ins>+ [MayThrowException] unsigned long insertRule(DOMString rule, unsigned long index);
+ [MayThrowException] void deleteRule(unsigned long index);
</ins><span class="cx"> };
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).valueID()) {
</ins><span class="cx"> case CSSValueFixed:
</span><span class="cx"> layer.setAttachment(FixedBackgroundAttachment);
</span><span class="cx"> break;
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool convertToLengthSize(const CSSPrimitiveValue& primitiveValue, CSSToLengthConversionData conversionData, LengthSize& size)
</span><span class="cx"> {
</span><del>- if (auto* pair = primitiveValue.getPairValue()) {
</del><ins>+ if (auto* pair = primitiveValue.pairValue()) {
</ins><span class="cx"> size.setWidth(pair->first()->convertToLength<AnyConversion>(conversionData));
</span><span class="cx"> size.setHeight(pair->second()->convertToLength<AnyConversion>(conversionData));
</span><span class="cx"> } else
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx">
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> FillSize fillSize;
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueContain:
</span><span class="cx"> fillSize.type = Contain;
</span><span class="cx"> break;
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto* primitiveValue = &downcast<CSSPrimitiveValue>(value);
</span><del>- Pair* pair = primitiveValue->getPairValue();
</del><ins>+ Pair* pair = primitiveValue->pairValue();
</ins><span class="cx"> if (pair) {
</span><span class="cx"> ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionX || propertyID == CSSPropertyWebkitMaskPositionX);
</span><span class="cx"> primitiveValue = pair->second();
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> if (primitiveValue->isLength())
</span><span class="cx"> length = primitiveValue->computeLength<Length>(m_resolver->state().cssToLengthConversionData());
</span><span class="cx"> else if (primitiveValue->isPercentage())
</span><del>- length = Length(primitiveValue->getDoubleValue(), Percent);
</del><ins>+ length = Length(primitiveValue->doubleValue(), Percent);
</ins><span class="cx"> else if (primitiveValue->isCalculatedPercentageWithLength())
</span><span class="cx"> length = Length(primitiveValue->cssCalcValue()->createCalculationValue(m_resolver->state().cssToLengthConversionData()));
</span><span class="cx"> else
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto* primitiveValue = &downcast<CSSPrimitiveValue>(value);
</span><del>- Pair* pair = primitiveValue->getPairValue();
</del><ins>+ Pair* pair = primitiveValue->pairValue();
</ins><span class="cx"> if (pair) {
</span><span class="cx"> ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionY || propertyID == CSSPropertyWebkitMaskPositionY);
</span><span class="cx"> primitiveValue = pair->second();
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx"> if (primitiveValue->isLength())
</span><span class="cx"> length = primitiveValue->computeLength<Length>(m_resolver->state().cssToLengthConversionData());
</span><span class="cx"> else if (primitiveValue->isPercentage())
</span><del>- length = Length(primitiveValue->getDoubleValue(), Percent);
</del><ins>+ length = Length(primitiveValue->doubleValue(), Percent);
</ins><span class="cx"> else if (primitiveValue->isCalculatedPercentageWithLength())
</span><span class="cx"> length = Length(primitiveValue->cssCalcValue()->createCalculationValue(m_resolver->state().cssToLengthConversionData()));
</span><span class="cx"> else
</span><span class="lines">@@ -298,7 +298,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).valueID()) {
</ins><span class="cx"> case CSSValueAlpha:
</span><span class="cx"> type = EMaskSourceType::MaskAlpha;
</span><span class="cx"> break;
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).valueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> layer.setDirection(Animation::AnimationDirectionNormal);
</span><span class="cx"> break;
</span><span class="lines">@@ -378,7 +378,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).valueID()) {
</ins><span class="cx"> case CSSValueNone:
</span><span class="cx"> layer.setFillMode(AnimationFillModeNone);
</span><span class="cx"> break;
</span><span class="lines">@@ -407,10 +407,10 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueInfinite)
</del><ins>+ if (primitiveValue.valueID() == CSSValueInfinite)
</ins><span class="cx"> animation.setIterationCount(Animation::IterationCountInfinite);
</span><span class="cx"> else
</span><del>- animation.setIterationCount(primitiveValue.getFloatValue());
</del><ins>+ animation.setIterationCount(primitiveValue.floatValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapAnimationName(Animation& layer, const CSSValue& value)
</span><span class="lines">@@ -424,10 +424,10 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNone)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNone)
</ins><span class="cx"> layer.setIsNoneAnimation(true);
</span><span class="cx"> else
</span><del>- layer.setName(primitiveValue.getStringValue());
</del><ins>+ layer.setName(primitiveValue.stringValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CSSToStyleMap::mapAnimationPlayState(Animation& layer, const CSSValue& value)
</span><span class="lines">@@ -440,7 +440,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- EAnimPlayState playState = (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</del><ins>+ EAnimPlayState playState = (downcast<CSSPrimitiveValue>(value).valueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
</ins><span class="cx"> layer.setPlayState(playState);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -456,15 +456,15 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAll) {
</del><ins>+ if (primitiveValue.valueID() == CSSValueAll) {
</ins><span class="cx"> animation.setAnimationMode(Animation::AnimateAll);
</span><span class="cx"> animation.setProperty(CSSPropertyInvalid);
</span><del>- } else if (primitiveValue.getValueID() == CSSValueNone) {
</del><ins>+ } else if (primitiveValue.valueID() == CSSValueNone) {
</ins><span class="cx"> animation.setAnimationMode(Animation::AnimateNone);
</span><span class="cx"> animation.setProperty(CSSPropertyInvalid);
</span><span class="cx"> } else {
</span><span class="cx"> animation.setAnimationMode(Animation::AnimateSingleProperty);
</span><del>- animation.setProperty(primitiveValue.getPropertyID());
</del><ins>+ animation.setProperty(primitiveValue.propertyID());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -476,7 +476,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).valueID()) {
</ins><span class="cx"> case CSSValueLinear:
</span><span class="cx"> animation.setTimingFunction(LinearTimingFunction::create());
</span><span class="cx"> break;
</span><span class="lines">@@ -526,7 +526,7 @@
</span><span class="cx">
</span><span class="cx"> if (value.isPrimitiveValue()) {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAuto)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAuto)
</ins><span class="cx"> animation.setTrigger(AutoAnimationTrigger::create());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -608,21 +608,21 @@
</span><span class="cx"> LengthBox box;
</span><span class="cx"> Quad* slices = borderImageSlice.slices();
</span><span class="cx"> if (slices->top()->isPercentage())
</span><del>- box.top() = Length(slices->top()->getDoubleValue(), Percent);
</del><ins>+ box.top() = Length(slices->top()->doubleValue(), Percent);
</ins><span class="cx"> else
</span><del>- box.top() = Length(slices->top()->getIntValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</del><ins>+ box.top() = Length(slices->top()->intValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</ins><span class="cx"> if (slices->bottom()->isPercentage())
</span><del>- box.bottom() = Length(slices->bottom()->getDoubleValue(), Percent);
</del><ins>+ box.bottom() = Length(slices->bottom()->doubleValue(), Percent);
</ins><span class="cx"> else
</span><del>- box.bottom() = Length((int)slices->bottom()->getFloatValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</del><ins>+ box.bottom() = Length((int)slices->bottom()->floatValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</ins><span class="cx"> if (slices->left()->isPercentage())
</span><del>- box.left() = Length(slices->left()->getDoubleValue(), Percent);
</del><ins>+ box.left() = Length(slices->left()->doubleValue(), Percent);
</ins><span class="cx"> else
</span><del>- box.left() = Length(slices->left()->getIntValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</del><ins>+ box.left() = Length(slices->left()->intValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</ins><span class="cx"> if (slices->right()->isPercentage())
</span><del>- box.right() = Length(slices->right()->getDoubleValue(), Percent);
</del><ins>+ box.right() = Length(slices->right()->doubleValue(), Percent);
</ins><span class="cx"> else
</span><del>- box.right() = Length(slices->right()->getIntValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</del><ins>+ box.right() = Length(slices->right()->intValue(CSSPrimitiveValue::CSS_NUMBER), Fixed);
</ins><span class="cx"> image.setImageSlices(box);
</span><span class="cx">
</span><span class="cx"> // Set our fill mode.
</span><span class="lines">@@ -642,33 +642,33 @@
</span><span class="cx">
</span><span class="cx"> // Set up a length box to represent our image slices.
</span><span class="cx"> LengthBox box; // Defaults to 'auto' so we don't have to handle that explicitly below.
</span><del>- Quad* slices = borderWidths.getQuadValue();
</del><ins>+ Quad* slices = borderWidths.quadValue();
</ins><span class="cx"> if (slices->top()->isNumber())
</span><del>- box.top() = Length(slices->top()->getIntValue(), Relative);
</del><ins>+ box.top() = Length(slices->top()->intValue(), Relative);
</ins><span class="cx"> else if (slices->top()->isPercentage())
</span><del>- box.top() = Length(slices->top()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
- else if (slices->top()->getValueID() != CSSValueAuto)
</del><ins>+ box.top() = Length(slices->top()->doubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
+ else if (slices->top()->valueID() != CSSValueAuto)
</ins><span class="cx"> box.top() = slices->top()->computeLength<Length>(conversionData);
</span><span class="cx">
</span><span class="cx"> if (slices->right()->isNumber())
</span><del>- box.right() = Length(slices->right()->getIntValue(), Relative);
</del><ins>+ box.right() = Length(slices->right()->intValue(), Relative);
</ins><span class="cx"> else if (slices->right()->isPercentage())
</span><del>- box.right() = Length(slices->right()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
- else if (slices->right()->getValueID() != CSSValueAuto)
</del><ins>+ box.right() = Length(slices->right()->doubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
+ else if (slices->right()->valueID() != CSSValueAuto)
</ins><span class="cx"> box.right() = slices->right()->computeLength<Length>(conversionData);
</span><span class="cx">
</span><span class="cx"> if (slices->bottom()->isNumber())
</span><del>- box.bottom() = Length(slices->bottom()->getIntValue(), Relative);
</del><ins>+ box.bottom() = Length(slices->bottom()->intValue(), Relative);
</ins><span class="cx"> else if (slices->bottom()->isPercentage())
</span><del>- box.bottom() = Length(slices->bottom()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
- else if (slices->bottom()->getValueID() != CSSValueAuto)
</del><ins>+ box.bottom() = Length(slices->bottom()->doubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
+ else if (slices->bottom()->valueID() != CSSValueAuto)
</ins><span class="cx"> box.bottom() = slices->bottom()->computeLength<Length>(conversionData);
</span><span class="cx">
</span><span class="cx"> if (slices->left()->isNumber())
</span><del>- box.left() = Length(slices->left()->getIntValue(), Relative);
</del><ins>+ box.left() = Length(slices->left()->intValue(), Relative);
</ins><span class="cx"> else if (slices->left()->isPercentage())
</span><del>- box.left() = Length(slices->left()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
- else if (slices->left()->getValueID() != CSSValueAuto)
</del><ins>+ box.left() = Length(slices->left()->doubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent);
+ else if (slices->left()->valueID() != CSSValueAuto)
</ins><span class="cx"> box.left() = slices->left()->computeLength<Length>(conversionData);
</span><span class="cx">
</span><span class="cx"> return box;
</span><span class="lines">@@ -680,12 +680,12 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- Pair* pair = primitiveValue.getPairValue();
</del><ins>+ Pair* pair = primitiveValue.pairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueID firstIdentifier = pair->first()->getValueID();
- CSSValueID secondIdentifier = pair->second()->getValueID();
</del><ins>+ CSSValueID firstIdentifier = pair->first()->valueID();
+ CSSValueID secondIdentifier = pair->second()->valueID();
</ins><span class="cx">
</span><span class="cx"> ENinePieceImageRule horizontalRule;
</span><span class="cx"> switch (firstIdentifier) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSValue.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-#include "ExceptionCode.h"
</del><ins>+#include "ExceptionOr.h"
</ins><span class="cx"> #include "URLHash.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/ListHashSet.h>
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT String cssText() const;
</span><span class="cx">
</span><del>- void setCssText(const String&, ExceptionCode&) { } // FIXME: Not implemented.
</del><ins>+ ExceptionOr<void> setCssText(const String&) { return { }; } // FIXME: Not implemented.
</ins><span class="cx">
</span><span class="cx"> bool isPrimitiveValue() const { return m_classType == PrimitiveClass; }
</span><span class="cx"> bool isValueList() const { return m_classType >= ValueListClass; }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/CSSValue.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -19,8 +19,8 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><ins>+ CustomIsReachable,
</ins><span class="cx"> CustomToJSObject,
</span><del>- CustomIsReachable,
</del><span class="cx"> ExportToWrappedFunction,
</span><span class="cx"> ImplementationLacksVTable,
</span><span class="cx"> JSCustomFinalize,
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> const unsigned short CSS_VALUE_LIST = 2;
</span><span class="cx"> const unsigned short CSS_CUSTOM = 3;
</span><span class="cx">
</span><del>- [SetterMayThrowLegacyException] attribute DOMString? cssText;
</del><ins>+ [SetterMayThrowException] attribute DOMString? cssText;
</ins><span class="cx">
</span><span class="cx"> readonly attribute unsigned short cssValueType;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssCounterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/Counter.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/Counter.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/Counter.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -32,11 +32,11 @@
</span><span class="cx"> return adoptRef(*new Counter(WTFMove(identifier), WTFMove(listStyle), WTFMove(separator)));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- String identifier() const { return m_identifier->getStringValue(); }
- String listStyle() const { return m_listStyle->getStringValue(); }
- String separator() const { return m_separator->getStringValue(); }
</del><ins>+ String identifier() const { return m_identifier->stringValue(); }
+ String listStyle() const { return m_listStyle->stringValue(); }
+ String separator() const { return m_separator->stringValue(); }
</ins><span class="cx">
</span><del>- CSSValueID listStyleIdent() const { return m_listStyle->getValueID(); }
</del><ins>+ CSSValueID listStyleIdent() const { return m_listStyle->valueID(); }
</ins><span class="cx">
</span><span class="cx"> void setIdentifier(Ref<CSSPrimitiveValue>&& identifier) { m_identifier = WTFMove(identifier); }
</span><span class="cx"> void setListStyle(Ref<CSSPrimitiveValue>&& listStyle) { m_listStyle = WTFMove(listStyle); }
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontFace.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -45,23 +45,20 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<FontFace> FontFace::create(JSC::ExecState& state, Document& document, const String& family, JSC::JSValue source, const Descriptors& descriptors, ExceptionCode& ec)
</del><ins>+ExceptionOr<Ref<FontFace>> FontFace::create(JSC::ExecState& state, Document& document, const String& family, JSC::JSValue source, const Descriptors& descriptors)
</ins><span class="cx"> {
</span><span class="cx"> auto result = adoptRef(*new FontFace(document.fontSelector()));
</span><span class="cx">
</span><span class="cx"> bool dataRequiresAsynchronousLoading = true;
</span><span class="cx">
</span><del>- ec = 0;
- result->setFamily(family, ec);
- if (ec)
- return nullptr;
</del><ins>+ auto setFamilyResult = result->setFamily(family);
+ if (setFamilyResult.hasException())
+ return setFamilyResult.releaseException();
</ins><span class="cx">
</span><span class="cx"> if (source.isString()) {
</span><span class="cx"> auto value = FontFace::parseString(source.getString(&state), CSSPropertySrc);
</span><del>- if (!is<CSSValueList>(value.get())) {
- ec = SYNTAX_ERR;
- return nullptr;
- }
</del><ins>+ if (!is<CSSValueList>(value.get()))
+ return Exception { SYNTAX_ERR };
</ins><span class="cx"> CSSFontFace::appendSources(result->backing(), downcast<CSSValueList>(*value), &document, false);
</span><span class="cx"> } else if (auto arrayBufferView = toArrayBufferView(source))
</span><span class="cx"> dataRequiresAsynchronousLoading = populateFontFaceWithArrayBuffer(result->backing(), arrayBufferView.releaseNonNull());
</span><span class="lines">@@ -71,24 +68,24 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // These ternaries match the default strings inside the FontFaceDescriptors dictionary inside FontFace.idl.
</span><del>- result->setStyle(descriptors.style.isEmpty() ? ASCIILiteral("normal") : descriptors.style, ec);
- if (ec)
- return nullptr;
- result->setWeight(descriptors.weight.isEmpty() ? ASCIILiteral("normal") : descriptors.weight, ec);
- if (ec)
- return nullptr;
- result->setStretch(descriptors.stretch.isEmpty() ? ASCIILiteral("normal") : descriptors.stretch, ec);
- if (ec)
- return nullptr;
- result->setUnicodeRange(descriptors.unicodeRange.isEmpty() ? ASCIILiteral("U+0-10FFFF") : descriptors.unicodeRange, ec);
- if (ec)
- return nullptr;
- result->setVariant(descriptors.variant.isEmpty() ? ASCIILiteral("normal") : descriptors.variant, ec);
- if (ec)
- return nullptr;
- result->setFeatureSettings(descriptors.featureSettings.isEmpty() ? ASCIILiteral("normal") : descriptors.featureSettings, ec);
- if (ec)
- return nullptr;
</del><ins>+ auto setStyleResult = result->setStyle(descriptors.style.isEmpty() ? ASCIILiteral("normal") : descriptors.style);
+ if (setStyleResult.hasException())
+ return setStyleResult.releaseException();
+ auto setWeightResult = result->setWeight(descriptors.weight.isEmpty() ? ASCIILiteral("normal") : descriptors.weight);
+ if (setWeightResult.hasException())
+ return setWeightResult.releaseException();
+ auto setStretchResult = result->setStretch(descriptors.stretch.isEmpty() ? ASCIILiteral("normal") : descriptors.stretch);
+ if (setStretchResult.hasException())
+ return setStretchResult.releaseException();
+ auto setUnicodeRangeResult = result->setUnicodeRange(descriptors.unicodeRange.isEmpty() ? ASCIILiteral("U+0-10FFFF") : descriptors.unicodeRange);
+ if (setUnicodeRangeResult.hasException())
+ return setUnicodeRangeResult.releaseException();
+ auto setVariantResult = result->setVariant(descriptors.variant.isEmpty() ? ASCIILiteral("normal") : descriptors.variant);
+ if (setVariantResult.hasException())
+ return setVariantResult.releaseException();
+ auto setFeatureSettingsResult = result->setFeatureSettings(descriptors.featureSettings.isEmpty() ? ASCIILiteral("normal") : descriptors.featureSettings);
+ if (setFeatureSettingsResult.hasException())
+ return setFeatureSettingsResult.releaseException();
</ins><span class="cx">
</span><span class="cx"> if (!dataRequiresAsynchronousLoading) {
</span><span class="cx"> result->backing().load();
</span><span class="lines">@@ -135,80 +132,73 @@
</span><span class="cx"> return style->getPropertyCSSValue(propertyID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setFamily(const String& family, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> FontFace::setFamily(const String& family)
</ins><span class="cx"> {
</span><del>- if (family.isEmpty()) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (family.isEmpty())
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> bool success = false;
</span><span class="cx"> if (auto value = parseString(family, CSSPropertyFontFamily))
</span><span class="cx"> success = m_backing->setFamilies(*value);
</span><span class="cx"> if (!success)
</span><del>- ec = SYNTAX_ERR;
</del><ins>+ return Exception { SYNTAX_ERR };
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setStyle(const String& style, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> FontFace::setStyle(const String& style)
</ins><span class="cx"> {
</span><del>- if (style.isEmpty()) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (style.isEmpty())
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> bool success = false;
</span><span class="cx"> if (auto value = parseString(style, CSSPropertyFontStyle))
</span><span class="cx"> success = m_backing->setStyle(*value);
</span><span class="cx"> if (!success)
</span><del>- ec = SYNTAX_ERR;
</del><ins>+ return Exception { SYNTAX_ERR };
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setWeight(const String& weight, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> FontFace::setWeight(const String& weight)
</ins><span class="cx"> {
</span><del>- if (weight.isEmpty()) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (weight.isEmpty())
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> bool success = false;
</span><span class="cx"> if (auto value = parseString(weight, CSSPropertyFontWeight))
</span><span class="cx"> success = m_backing->setWeight(*value);
</span><span class="cx"> if (!success)
</span><del>- ec = SYNTAX_ERR;
</del><ins>+ return Exception { SYNTAX_ERR };
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setStretch(const String&, ExceptionCode&)
</del><ins>+ExceptionOr<void> FontFace::setStretch(const String&)
</ins><span class="cx"> {
</span><span class="cx"> // We don't support font-stretch. Swallow the call.
</span><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setUnicodeRange(const String& unicodeRange, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> FontFace::setUnicodeRange(const String& unicodeRange)
</ins><span class="cx"> {
</span><del>- if (unicodeRange.isEmpty()) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (unicodeRange.isEmpty())
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> bool success = false;
</span><span class="cx"> if (auto value = parseString(unicodeRange, CSSPropertyUnicodeRange))
</span><span class="cx"> success = m_backing->setUnicodeRange(*value);
</span><span class="cx"> if (!success)
</span><del>- ec = SYNTAX_ERR;
</del><ins>+ return Exception { SYNTAX_ERR };
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setVariant(const String& variant, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> FontFace::setVariant(const String& variant)
</ins><span class="cx"> {
</span><del>- if (variant.isEmpty()) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (variant.isEmpty())
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> auto style = MutableStyleProperties::create();
</span><span class="cx"> auto result = CSSParser::parseValue(style, CSSPropertyFontVariant, variant, true, HTMLStandardMode, nullptr);
</span><del>- if (result == CSSParser::ParseResult::Error) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (result == CSSParser::ParseResult::Error)
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> // FIXME: Would be much better to stage the new settings and set them all at once
</span><span class="cx"> // instead of this dance where we make a backup and revert to it if something fails.
</span><span class="lines">@@ -249,23 +239,22 @@
</span><span class="cx">
</span><span class="cx"> if (!success) {
</span><span class="cx"> m_backing->setVariantSettings(backup);
</span><del>- ec = SYNTAX_ERR;
</del><ins>+ return Exception { SYNTAX_ERR };
</ins><span class="cx"> }
</span><ins>+
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void FontFace::setFeatureSettings(const String& featureSettings, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> FontFace::setFeatureSettings(const String& featureSettings)
</ins><span class="cx"> {
</span><del>- if (featureSettings.isEmpty()) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (featureSettings.isEmpty())
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><span class="cx"> auto value = parseString(featureSettings, CSSPropertyFontFeatureSettings);
</span><del>- if (!value) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (!value)
+ return Exception { SYNTAX_ERR };
</ins><span class="cx"> m_backing->setFeatureSettings(*value);
</span><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String FontFace::family() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontFace.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -42,17 +42,17 @@
</span><span class="cx"> String variant;
</span><span class="cx"> String featureSettings;
</span><span class="cx"> };
</span><del>- static RefPtr<FontFace> create(JSC::ExecState&, Document&, const String& family, JSC::JSValue source, const Descriptors&, ExceptionCode&);
</del><ins>+ static ExceptionOr<Ref<FontFace>> create(JSC::ExecState&, Document&, const String& family, JSC::JSValue source, const Descriptors&);
</ins><span class="cx"> static Ref<FontFace> create(CSSFontFace&);
</span><span class="cx"> virtual ~FontFace();
</span><span class="cx">
</span><del>- void setFamily(const String&, ExceptionCode&);
- void setStyle(const String&, ExceptionCode&);
- void setWeight(const String&, ExceptionCode&);
- void setStretch(const String&, ExceptionCode&);
- void setUnicodeRange(const String&, ExceptionCode&);
- void setVariant(const String&, ExceptionCode&);
- void setFeatureSettings(const String&, ExceptionCode&);
</del><ins>+ ExceptionOr<void> setFamily(const String&);
+ ExceptionOr<void> setStyle(const String&);
+ ExceptionOr<void> setWeight(const String&);
+ ExceptionOr<void> setStretch(const String&);
+ ExceptionOr<void> setUnicodeRange(const String&);
+ ExceptionOr<void> setVariant(const String&);
+ ExceptionOr<void> setFeatureSettings(const String&);
</ins><span class="cx">
</span><span class="cx"> String family() const;
</span><span class="cx"> String style() const;
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFaceidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFace.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFace.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontFace.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -41,16 +41,16 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> ConstructorCallWith=Document&ScriptState,
</span><del>- ConstructorMayThrowLegacyException,
</del><ins>+ ConstructorMayThrowException,
</ins><span class="cx"> Constructor(DOMString family, any source, optional FontFaceDescriptors descriptors)
</span><span class="cx"> ] interface FontFace {
</span><del>- [SetterMayThrowLegacyException] attribute DOMString family;
- [SetterMayThrowLegacyException] attribute DOMString style;
- [SetterMayThrowLegacyException] attribute DOMString weight;
- [SetterMayThrowLegacyException] attribute DOMString stretch;
- [SetterMayThrowLegacyException] attribute DOMString unicodeRange;
- [SetterMayThrowLegacyException] attribute DOMString variant;
- [SetterMayThrowLegacyException] attribute DOMString featureSettings;
</del><ins>+ [SetterMayThrowException] attribute DOMString family;
+ [SetterMayThrowException] attribute DOMString style;
+ [SetterMayThrowException] attribute DOMString weight;
+ [SetterMayThrowException] attribute DOMString stretch;
+ [SetterMayThrowException] attribute DOMString unicodeRange;
+ [SetterMayThrowException] attribute DOMString variant;
+ [SetterMayThrowException] attribute DOMString featureSettings;
</ins><span class="cx">
</span><span class="cx"> readonly attribute FontFaceLoadStatus status;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFaceSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFaceSet.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFaceSet.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontFaceSet.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -125,12 +125,12 @@
</span><span class="cx">
</span><span class="cx"> void FontFaceSet::load(const String& font, const String& text, LoadPromise&& promise)
</span><span class="cx"> {
</span><del>- ExceptionCode ec = 0;
- auto matchingFaces = m_backing->matchingFaces(font, text, ec);
- if (ec) {
- promise.reject(ec);
</del><ins>+ auto matchingFacesResult = m_backing->matchingFaces(font, text);
+ if (matchingFacesResult.hasException()) {
+ promise.reject(matchingFacesResult.releaseException());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><ins>+ auto matchingFaces = matchingFacesResult.releaseReturnValue();
</ins><span class="cx">
</span><span class="cx"> if (matchingFaces.isEmpty()) {
</span><span class="cx"> promise.resolve(Vector<RefPtr<FontFace>>());
</span><span class="lines">@@ -162,9 +162,9 @@
</span><span class="cx"> pendingPromise->promise.resolve(pendingPromise->faces);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool FontFaceSet::check(const String& family, const String& text, ExceptionCode& ec)
</del><ins>+ExceptionOr<bool> FontFaceSet::check(const String& family, const String& text)
</ins><span class="cx"> {
</span><del>- return m_backing->check(family, text, ec);
</del><ins>+ return m_backing->check(family, text);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FontFaceSet::registerReady(ReadyPromise&& promise)
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontFaceSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFaceSet.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFaceSet.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontFaceSet.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef FontFaceSet_h
-#define FontFaceSet_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "ActiveDOMObject.h"
</span><span class="cx"> #include "CSSFontFaceSet.h"
</span><span class="lines">@@ -49,7 +48,7 @@
</span><span class="cx">
</span><span class="cx"> typedef DOMPromise<Vector<RefPtr<FontFace>>> LoadPromise;
</span><span class="cx"> void load(const String& font, const String& text, LoadPromise&&);
</span><del>- bool check(const String& font, const String& text, ExceptionCode&);
</del><ins>+ ExceptionOr<bool> check(const String& font, const String& text);
</ins><span class="cx">
</span><span class="cx"> enum class LoadStatus { Loading, Loaded };
</span><span class="cx"> LoadStatus status() const;
</span><span class="lines">@@ -115,5 +114,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorecssFontFaceSetidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontFaceSet.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontFaceSet.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontFaceSet.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> attribute EventHandler onloadingerror;
</span><span class="cx">
</span><span class="cx"> Promise load(DOMString font, optional DOMString text = " ");
</span><del>- [MayThrowLegacyException] boolean check(DOMString font, optional DOMString text = " ");
</del><ins>+ [MayThrowException] boolean check(DOMString font, optional DOMString text = " ");
</ins><span class="cx">
</span><span class="cx"> [CustomGetter, CachedAttribute] readonly attribute Promise ready;
</span><span class="cx"> readonly attribute FontFaceSetLoadStatus status;
</span></span></pre></div>
<a id="trunkSourceWebCorecssFontVariantBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/FontVariantBuilder.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/FontVariantBuilder.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/FontVariantBuilder.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">
</span><span class="cx"> if (is<CSSValueList>(value)) {
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><del>- switch (downcast<CSSPrimitiveValue>(item.get()).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(item.get()).valueID()) {
</ins><span class="cx"> case CSSValueNoCommonLigatures:
</span><span class="cx"> common = FontVariantLigatures::No;
</span><span class="cx"> break;
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } else if (is<CSSPrimitiveValue>(value)) {
</span><del>- switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(value).valueID()) {
</ins><span class="cx"> case CSSValueNormal:
</span><span class="cx"> break;
</span><span class="cx"> case CSSValueNone:
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">
</span><span class="cx"> if (is<CSSValueList>(value)) {
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><del>- switch (downcast<CSSPrimitiveValue>(item.get()).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(item.get()).valueID()) {
</ins><span class="cx"> case CSSValueLiningNums:
</span><span class="cx"> figure = FontVariantNumericFigure::LiningNumbers;
</span><span class="cx"> break;
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } else if (is<CSSPrimitiveValue>(value))
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNormal);
</ins><span class="cx">
</span><span class="cx"> return FontVariantNumericValues(figure, spacing, fraction, ordinal, slashedZero);
</span><span class="cx"> }
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">
</span><span class="cx"> if (is<CSSValueList>(value)) {
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><del>- switch (downcast<CSSPrimitiveValue>(item.get()).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(item.get()).valueID()) {
</ins><span class="cx"> case CSSValueJis78:
</span><span class="cx"> variant = FontVariantEastAsianVariant::Jis78;
</span><span class="cx"> break;
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> } else if (is<CSSPrimitiveValue>(value))
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNormal);
</ins><span class="cx">
</span><span class="cx"> return FontVariantEastAsianValues(variant, width, ruby);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/MediaList.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -222,15 +222,14 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MediaList::setMediaText(const String& value, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> MediaList::setMediaText(const String& value)
</ins><span class="cx"> {
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule);
</span><del>- if (!m_mediaQueries->parse(value)) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ if (!m_mediaQueries->parse(value))
+ return Exception { SYNTAX_ERR };
</ins><span class="cx"> if (m_parentStyleSheet)
</span><span class="cx"> m_parentStyleSheet->didMutate();
</span><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String MediaList::item(unsigned index) const
</span><span class="lines">@@ -241,20 +240,19 @@
</span><span class="cx"> return String();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MediaList::deleteMedium(const String& medium, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> MediaList::deleteMedium(const String& medium)
</ins><span class="cx"> {
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule);
</span><span class="cx">
</span><span class="cx"> bool success = m_mediaQueries->remove(medium);
</span><del>- if (!success) {
- ec = NOT_FOUND_ERR;
- return;
- }
</del><ins>+ if (!success)
+ return Exception { NOT_FOUND_ERR };
</ins><span class="cx"> if (m_parentStyleSheet)
</span><span class="cx"> m_parentStyleSheet->didMutate();
</span><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void MediaList::appendMedium(const String& medium, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> MediaList::appendMedium(const String& medium)
</ins><span class="cx"> {
</span><span class="cx"> CSSStyleSheet::RuleMutationScope mutationScope(m_parentRule);
</span><span class="cx">
</span><span class="lines">@@ -261,11 +259,11 @@
</span><span class="cx"> bool success = m_mediaQueries->add(medium);
</span><span class="cx"> if (!success) {
</span><span class="cx"> // FIXME: Should this really be INVALID_CHARACTER_ERR?
</span><del>- ec = INVALID_CHARACTER_ERR;
- return;
</del><ins>+ return Exception { INVALID_CHARACTER_ERR };
</ins><span class="cx"> }
</span><span class="cx"> if (m_parentStyleSheet)
</span><span class="cx"> m_parentStyleSheet->didMutate();
</span><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MediaList::reattach(MediaQuerySet* mediaQueries)
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/MediaList.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -20,10 +20,10 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><ins>+#include "ExceptionOr.h"
</ins><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><del>-#include <wtf/text/WTFString.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -33,8 +33,6 @@
</span><span class="cx"> class Document;
</span><span class="cx"> class MediaQuery;
</span><span class="cx">
</span><del>-using ExceptionCode = int;
-
</del><span class="cx"> class MediaQuerySet final : public RefCounted<MediaQuerySet> {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<MediaQuerySet> create()
</span><span class="lines">@@ -96,11 +94,11 @@
</span><span class="cx">
</span><span class="cx"> unsigned length() const { return m_mediaQueries->queryVector().size(); }
</span><span class="cx"> WEBCORE_EXPORT String item(unsigned index) const;
</span><del>- WEBCORE_EXPORT void deleteMedium(const String& oldMedium, ExceptionCode&);
- WEBCORE_EXPORT void appendMedium(const String& newMedium, ExceptionCode&);
</del><ins>+ WEBCORE_EXPORT ExceptionOr<void> deleteMedium(const String& oldMedium);
+ WEBCORE_EXPORT ExceptionOr<void> appendMedium(const String& newMedium);
</ins><span class="cx">
</span><span class="cx"> String mediaText() const { return m_mediaQueries->mediaText(); }
</span><del>- WEBCORE_EXPORT void setMediaText(const String&, ExceptionCode&);
</del><ins>+ WEBCORE_EXPORT ExceptionOr<void> setMediaText(const String&);
</ins><span class="cx">
</span><span class="cx"> CSSRule* parentRule() const { return m_parentRule; }
</span><span class="cx"> CSSStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaListidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaList.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaList.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/MediaList.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -29,11 +29,11 @@
</span><span class="cx"> ImplementationLacksVTable,
</span><span class="cx"> JSCustomHeader,
</span><span class="cx"> ] interface MediaList {
</span><del>- [SetterMayThrowLegacyException, TreatNullAs=EmptyString] attribute DOMString mediaText;
</del><ins>+ [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString mediaText;
</ins><span class="cx"> readonly attribute unsigned long length;
</span><span class="cx">
</span><span class="cx"> getter DOMString? item(unsigned long index);
</span><span class="cx">
</span><del>- [MayThrowLegacyException] void deleteMedium(DOMString oldMedium);
- [MayThrowLegacyException] void appendMedium(DOMString newMedium);
</del><ins>+ [MayThrowException] void deleteMedium(DOMString oldMedium);
+ [MayThrowException] void appendMedium(DOMString newMedium);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryEvaluatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value) || !downcast<CSSPrimitiveValue>(*value).isNumber())
</span><span class="cx"> return Nullopt;
</span><del>- return downcast<CSSPrimitiveValue>(*value).getDoubleValue(CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).doubleValue(CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool zeroEvaluate(CSSValue* value, MediaFeaturePrefix op)
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- switch (downcast<CSSPrimitiveValue>(*value).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(*value).valueID()) {
</ins><span class="cx"> case CSSValueSrgb:
</span><span class="cx"> return true;
</span><span class="cx"> case CSSValueP3:
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx"> bool isInverted = screenHasInvertedColors();
</span><span class="cx"> if (!value)
</span><span class="cx"> return isInverted;
</span><del>- return downcast<CSSPrimitiveValue>(*value).getValueID() == (isInverted ? CSSValueInverted : CSSValueNone);
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).valueID() == (isInverted ? CSSValueInverted : CSSValueNone);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool orientationEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix)
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> return height >= 0 && width >= 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto keyword = downcast<CSSPrimitiveValue>(*value).getValueID();
</del><ins>+ auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
</ins><span class="cx"> if (width > height) // Square viewport is portrait.
</span><span class="cx"> return keyword == CSSValueLandscape;
</span><span class="cx"> return keyword == CSSValuePortrait;
</span><span class="lines">@@ -349,7 +349,7 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> auto& resolution = downcast<CSSPrimitiveValue>(*value);
</span><del>- return compareValue(deviceScaleFactor, resolution.isNumber() ? resolution.getFloatValue() : resolution.getFloatValue(CSSPrimitiveValue::CSS_DPPX), op);
</del><ins>+ return compareValue(deviceScaleFactor, resolution.isNumber() ? resolution.floatValue() : resolution.floatValue(CSSPrimitiveValue::CSS_DPPX), op);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool devicePixelRatioEvaluate(CSSValue* value, const CSSToLengthConversionData&, Frame& frame, MediaFeaturePrefix op)
</span><span class="lines">@@ -382,7 +382,7 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</span><span class="cx">
</span><span class="cx"> if (primitiveValue.isNumber()) {
</span><del>- result = primitiveValue.getIntValue();
</del><ins>+ result = primitiveValue.intValue();
</ins><span class="cx"> return !strict || !result;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -587,7 +587,7 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- auto keyword = downcast<CSSPrimitiveValue>(*value).getValueID();
</del><ins>+ auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
</ins><span class="cx">
</span><span class="cx"> switch (frame.page()->viewMode()) {
</span><span class="cx"> case Page::ViewModeWindowed:
</span><span class="lines">@@ -624,7 +624,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto keyword = downcast<CSSPrimitiveValue>(*value).getValueID();
</del><ins>+ auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> return keyword == CSSValueNone;
</span><span class="cx"> #else
</span><span class="lines">@@ -642,7 +642,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value))
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- auto keyword = downcast<CSSPrimitiveValue>(*value).getValueID();
</del><ins>+ auto keyword = downcast<CSSPrimitiveValue>(*value).valueID();
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> return keyword == CSSValueCoarse;
</span><span class="cx"> #else
</span><span class="lines">@@ -671,7 +671,7 @@
</span><span class="cx"> if (!value)
</span><span class="cx"> return userPrefersReducedMotion;
</span><span class="cx">
</span><del>- return downcast<CSSPrimitiveValue>(*value).getValueID() == (userPrefersReducedMotion ? CSSValueReduce : CSSValueDefault);
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).valueID() == (userPrefersReducedMotion ? CSSValueReduce : CSSValueDefault);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Use this function instead of calling add directly to avoid inlining.
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryExpcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryExp.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryExp.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/MediaQueryExp.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool isFeatureValidWithNonNegativeLengthOrNumber(const AtomicString& mediaFeature, const CSSParserValue& value)
</span><span class="cx"> {
</span><del>- if (!(CSSPrimitiveValue::isLength(value.unit) || value.unit == CSSPrimitiveValue::CSS_NUMBER) || value.fValue < 0)
</del><ins>+ if (!(CSSPrimitiveValue::isLength(static_cast<CSSPrimitiveValue::UnitTypes>(value.unit)) || value.unit == CSSPrimitiveValue::CSS_NUMBER) || value.fValue < 0)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return mediaFeature == MediaFeatureNames::height
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool isFeatureValidWithDensity(const AtomicString& mediaFeature, const CSSParserValue& value)
</span><span class="cx"> {
</span><del>- if (!CSSPrimitiveValue::isResolution(value.unit) || value.fValue <= 0)
</del><ins>+ if (!CSSPrimitiveValue::isResolution(static_cast<CSSPrimitiveValue::UnitTypes>(value.unit)) || value.fValue <= 0)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return mediaFeature == MediaFeatureNames::resolution
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -148,17 +148,18 @@
</span><span class="cx"> return m_propertySet->asText();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PropertySetCSSStyleDeclaration::setCssText(const String& text, ExceptionCode&)
</del><ins>+ExceptionOr<void> PropertySetCSSStyleDeclaration::setCssText(const String& text)
</ins><span class="cx"> {
</span><span class="cx"> StyleAttributeMutationScope mutationScope(this);
</span><span class="cx"> if (!willMutate())
</span><del>- return;
</del><ins>+ return { };
</ins><span class="cx">
</span><span class="cx"> bool changed = m_propertySet->parseDeclaration(text, cssParserContext(), contextStyleSheet());
</span><span class="cx">
</span><span class="cx"> didMutate(changed ? PropertyChanged : NoChanges);
</span><span class="cx">
</span><del>- mutationScope.enqueueMutationRecord();
</del><ins>+ mutationScope.enqueueMutationRecord();
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> PropertySetCSSStyleDeclaration::getPropertyCSSValue(const String& propertyName)
</span><span class="lines">@@ -214,7 +215,7 @@
</span><span class="cx"> return m_propertySet->isPropertyImplicit(propertyID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> PropertySetCSSStyleDeclaration::setProperty(const String& propertyName, const String& value, const String& priority)
</ins><span class="cx"> {
</span><span class="cx"> StyleAttributeMutationScope mutationScope(this);
</span><span class="cx">
</span><span class="lines">@@ -222,17 +223,15 @@
</span><span class="cx"> if (isCustomPropertyName(propertyName))
</span><span class="cx"> propertyID = CSSPropertyCustom;
</span><span class="cx"> if (!propertyID)
</span><del>- return;
</del><ins>+ return { };
</ins><span class="cx">
</span><span class="cx"> if (!willMutate())
</span><del>- return;
</del><ins>+ return { };
</ins><span class="cx">
</span><span class="cx"> bool important = equalIgnoringASCIICase(priority, "important");
</span><span class="cx"> if (!important && !priority.isEmpty())
</span><del>- return;
</del><ins>+ return { };
</ins><span class="cx">
</span><del>- ec = 0;
-
</del><span class="cx"> bool changed;
</span><span class="cx"> if (propertyID == CSSPropertyCustom)
</span><span class="cx"> changed = m_propertySet->setCustomProperty(propertyName, value, important, cssParserContext(), contextStyleSheet());
</span><span class="lines">@@ -246,9 +245,11 @@
</span><span class="cx"> // see <http://bugs.webkit.org/show_bug.cgi?id=7296>.
</span><span class="cx"> mutationScope.enqueueMutationRecord();
</span><span class="cx"> }
</span><ins>+
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String PropertySetCSSStyleDeclaration::removeProperty(const String& propertyName, ExceptionCode& ec)
</del><ins>+ExceptionOr<String> PropertySetCSSStyleDeclaration::removeProperty(const String& propertyName)
</ins><span class="cx"> {
</span><span class="cx"> StyleAttributeMutationScope mutationScope(this);
</span><span class="cx"> CSSPropertyID propertyID = cssPropertyID(propertyName);
</span><span class="lines">@@ -260,7 +261,6 @@
</span><span class="cx"> if (!willMutate())
</span><span class="cx"> return String();
</span><span class="cx">
</span><del>- ec = 0;
</del><span class="cx"> String result;
</span><span class="cx"> bool changed = propertyID != CSSPropertyCustom ? m_propertySet->removeProperty(propertyID, &result) : m_propertySet->removeCustomProperty(propertyName, &result);
</span><span class="cx">
</span><span class="lines">@@ -268,16 +268,12 @@
</span><span class="cx">
</span><span class="cx"> if (changed)
</span><span class="cx"> mutationScope.enqueueMutationRecord();
</span><del>- return result;
</del><ins>+ return WTFMove(result);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal(CSSPropertyID propertyID)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(propertyID);
- if (value)
- return value;
-
- return nullptr;
</del><ins>+ return m_propertySet->getPropertyCSSValue(propertyID);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String PropertySetCSSStyleDeclaration::getPropertyValueInternal(CSSPropertyID propertyID)
</span><span class="lines">@@ -289,13 +285,12 @@
</span><span class="cx"> return String();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool PropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyID, const String& value, bool important, ExceptionCode& ec)
</del><ins>+ExceptionOr<bool> PropertySetCSSStyleDeclaration::setPropertyInternal(CSSPropertyID propertyID, const String& value, bool important)
</ins><span class="cx"> {
</span><span class="cx"> StyleAttributeMutationScope mutationScope(this);
</span><span class="cx"> if (!willMutate())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- ec = 0;
</del><span class="cx"> bool changed = m_propertySet->setProperty(propertyID, value, important, cssParserContext(), contextStyleSheet());
</span><span class="cx">
</span><span class="cx"> didMutate(changed ? PropertyChanged : NoChanges);
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef PropertySetCSSStyleDeclaration_h
-#define PropertySetCSSStyleDeclaration_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSParserMode.h"
</span><span class="cx"> #include "CSSStyleDeclaration.h"
</span><span class="lines">@@ -44,14 +43,23 @@
</span><span class="cx"> class PropertySetCSSStyleDeclaration : public CSSStyleDeclaration {
</span><span class="cx"> public:
</span><span class="cx"> PropertySetCSSStyleDeclaration(MutableStyleProperties* propertySet) : m_propertySet(propertySet) { }
</span><del>-
</del><ins>+
</ins><span class="cx"> virtual void clearParentElement() { ASSERT_NOT_REACHED(); }
</span><ins>+
</ins><span class="cx"> StyleSheetContents* contextStyleSheet() const;
</span><del>-
</del><ins>+
+protected:
+ enum MutationType { NoChanges, PropertyChanged };
+
+ virtual CSSParserContext cssParserContext() const;
+
+ MutableStyleProperties* m_propertySet;
+ std::unique_ptr<HashMap<CSSValue*, RefPtr<CSSValue>>> m_cssomCSSValueClones;
+
+private:
</ins><span class="cx"> void ref() override;
</span><span class="cx"> void deref() override;
</span><span class="cx">
</span><del>-private:
</del><span class="cx"> CSSRule* parentRule() const override { return nullptr; }
</span><span class="cx"> unsigned length() const final;
</span><span class="cx"> String item(unsigned index) const final;
</span><span class="lines">@@ -60,30 +68,23 @@
</span><span class="cx"> String getPropertyPriority(const String& propertyName) final;
</span><span class="cx"> String getPropertyShorthand(const String& propertyName) final;
</span><span class="cx"> bool isPropertyImplicit(const String& propertyName) final;
</span><del>- void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionCode&) final;
- String removeProperty(const String& propertyName, ExceptionCode&) final;
</del><ins>+ ExceptionOr<void> setProperty(const String& propertyName, const String& value, const String& priority) final;
+ ExceptionOr<String> removeProperty(const String& propertyName) final;
</ins><span class="cx"> String cssText() const final;
</span><del>- void setCssText(const String&, ExceptionCode&) final;
</del><ins>+ ExceptionOr<void> setCssText(const String&) final;
</ins><span class="cx"> RefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) final;
</span><span class="cx"> String getPropertyValueInternal(CSSPropertyID) final;
</span><del>- bool setPropertyInternal(CSSPropertyID, const String& value, bool important, ExceptionCode&) final;
</del><ins>+ ExceptionOr<bool> setPropertyInternal(CSSPropertyID, const String& value, bool important) final;
</ins><span class="cx">
</span><span class="cx"> Ref<MutableStyleProperties> copyProperties() const final;
</span><span class="cx">
</span><span class="cx"> CSSValue* cloneAndCacheForCSSOM(CSSValue*);
</span><span class="cx">
</span><del>-protected:
- enum MutationType { NoChanges, PropertyChanged };
</del><span class="cx"> virtual bool willMutate() WARN_UNUSED_RETURN { return true; }
</span><span class="cx"> virtual void didMutate(MutationType) { }
</span><del>- virtual CSSParserContext cssParserContext() const;
-
- MutableStyleProperties* m_propertySet;
- std::unique_ptr<HashMap<CSSValue*, RefPtr<CSSValue>>> m_cssomCSSValueClones;
</del><span class="cx"> };
</span><span class="cx">
</span><del>-class StyleRuleCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration
-{
</del><ins>+class StyleRuleCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration {
</ins><span class="cx"> public:
</span><span class="cx"> static Ref<StyleRuleCSSStyleDeclaration> create(MutableStyleProperties& propertySet, CSSRule& parentRule)
</span><span class="cx"> {
</span><span class="lines">@@ -91,7 +92,7 @@
</span><span class="cx"> }
</span><span class="cx"> virtual ~StyleRuleCSSStyleDeclaration();
</span><span class="cx">
</span><del>- void clearParentRule() { m_parentRule = 0; }
</del><ins>+ void clearParentRule() { m_parentRule = nullptr; }
</ins><span class="cx">
</span><span class="cx"> void ref() final;
</span><span class="cx"> void deref() final;
</span><span class="lines">@@ -113,8 +114,7 @@
</span><span class="cx"> CSSRule* m_parentRule;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InlineCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration
-{
</del><ins>+class InlineCSSStyleDeclaration final : public PropertySetCSSStyleDeclaration {
</ins><span class="cx"> public:
</span><span class="cx"> InlineCSSStyleDeclaration(MutableStyleProperties* propertySet, StyledElement* parentElement)
</span><span class="cx"> : PropertySetCSSStyleDeclaration(propertySet)
</span><span class="lines">@@ -121,11 +121,11 @@
</span><span class="cx"> , m_parentElement(parentElement)
</span><span class="cx"> {
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> private:
</span><span class="cx"> CSSStyleSheet* parentStyleSheet() const final;
</span><span class="cx"> StyledElement* parentElement() const final { return m_parentElement; }
</span><del>- void clearParentElement() final { m_parentElement = 0; }
</del><ins>+ void clearParentElement() final { m_parentElement = nullptr; }
</ins><span class="cx">
</span><span class="cx"> void didMutate(MutationType) final;
</span><span class="cx"> CSSParserContext cssParserContext() const final;
</span><span class="lines">@@ -134,5 +134,3 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (primitiveValue.isPercentage())
</span><del>- return Length(primitiveValue.getDoubleValue(), Percent);
</del><ins>+ return Length(primitiveValue.doubleValue(), Percent);
</ins><span class="cx">
</span><span class="cx"> if (primitiveValue.isCalculatedPercentageWithLength())
</span><span class="cx"> return Length(primitiveValue.cssCalcValue()->createCalculationValue(conversionData));
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">
</span><span class="cx"> inline Length StyleBuilderConverter::convertLengthOrAuto(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto)
</ins><span class="cx"> return Length(Auto);
</span><span class="cx"> return convertLength(styleResolver, value);
</span><span class="cx"> }
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx"> inline Length StyleBuilderConverter::convertLengthSizing(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueInvalid:
</span><span class="cx"> return convertLength(styleResolver, value);
</span><span class="cx"> case CSSValueIntrinsic:
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx">
</span><span class="cx"> inline Length StyleBuilderConverter::convertLengthMaxSizing(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone)
</ins><span class="cx"> return Length(Undefined);
</span><span class="cx"> return convertLengthSizing(styleResolver, value);
</span><span class="cx"> }
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx"> inline T StyleBuilderConverter::convertLineWidth(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueThin:
</span><span class="cx"> return 1;
</span><span class="cx"> case CSSValueMedium:
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx"> inline float StyleBuilderConverter::convertSpacing(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNormal)
</ins><span class="cx"> return 0.f;
</span><span class="cx">
</span><span class="cx"> CSSToLengthConversionData conversionData = styleResolver.useSVGZoomRulesForLength() ?
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> inline Length StyleBuilderConverter::convertToRadiusLength(CSSToLengthConversionData& conversionData, CSSPrimitiveValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (value.isPercentage())
</span><del>- return Length(value.getDoubleValue(), Percent);
</del><ins>+ return Length(value.doubleValue(), Percent);
</ins><span class="cx"> if (value.isCalculatedPercentageWithLength())
</span><span class="cx"> return Length(value.cssCalcValue()->createCalculationValue(conversionData));
</span><span class="cx"> return value.computeLength<Length>(conversionData);
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx"> inline LengthSize StyleBuilderConverter::convertRadius(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- Pair* pair = primitiveValue.getPairValue();
</del><ins>+ Pair* pair = primitiveValue.pairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> return LengthSize(Length(0, Fixed), Length(0, Fixed));
</span><span class="cx">
</span><span class="lines">@@ -333,11 +333,11 @@
</span><span class="cx"> bool relativeToTrailingEdge = false;
</span><span class="cx">
</span><span class="cx"> if (value.isPair()) {
</span><del>- auto& first = *value.getPairValue()->first();
- if (first.getValueID() == CSSValueRight || first.getValueID() == CSSValueBottom)
</del><ins>+ auto& first = *value.pairValue()->first();
+ if (first.valueID() == CSSValueRight || first.valueID() == CSSValueBottom)
</ins><span class="cx"> relativeToTrailingEdge = true;
</span><span class="cx">
</span><del>- lengthValue = value.getPairValue()->second();
</del><ins>+ lengthValue = value.pairValue()->second();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> length = convertLength(styleResolver, *lengthValue);
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> inline LengthPoint StyleBuilderConverter::convertObjectPosition(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- Pair* pair = primitiveValue.getPairValue();
</del><ins>+ Pair* pair = primitiveValue.pairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> return RenderStyle::initialObjectPosition();
</span><span class="cx">
</span><span class="lines">@@ -374,13 +374,13 @@
</span><span class="cx"> template <typename T>
</span><span class="cx"> inline T StyleBuilderConverter::convertNumber(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><del>- return downcast<CSSPrimitiveValue>(value).getValue<T>(CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ return downcast<CSSPrimitiveValue>(value).value<T>(CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename T>
</span><span class="cx"> inline T StyleBuilderConverter::convertNumberOrAuto(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto)
</ins><span class="cx"> return -1;
</span><span class="cx"> return convertNumber<T>(styleResolver, value);
</span><span class="cx"> }
</span><span class="lines">@@ -388,9 +388,9 @@
</span><span class="cx"> inline short StyleBuilderConverter::convertWebkitHyphenateLimitLines(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNoLimit)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNoLimit)
</ins><span class="cx"> return -1;
</span><del>- return primitiveValue.getValue<short>(CSSPrimitiveValue::CSS_NUMBER);
</del><ins>+ return primitiveValue.value<short>(CSSPrimitiveValue::CSS_NUMBER);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <CSSPropertyID property>
</span><span class="lines">@@ -425,12 +425,12 @@
</span><span class="cx">
</span><span class="cx"> inline String StyleBuilderConverter::convertString(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><del>- return downcast<CSSPrimitiveValue>(value).getStringValue();
</del><ins>+ return downcast<CSSPrimitiveValue>(value).stringValue();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline String StyleBuilderConverter::convertStringOrAuto(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto)
</ins><span class="cx"> return nullAtom;
</span><span class="cx"> return convertString(styleResolver, value);
</span><span class="cx"> }
</span><span class="lines">@@ -437,7 +437,7 @@
</span><span class="cx">
</span><span class="cx"> inline String StyleBuilderConverter::convertStringOrNone(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone)
</ins><span class="cx"> return nullAtom;
</span><span class="cx"> return convertString(styleResolver, value);
</span><span class="cx"> }
</span><span class="lines">@@ -446,7 +446,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(primitiveValue.isValueID());
</span><span class="cx">
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueOver:
</span><span class="cx"> return TextEmphasisPositionOver;
</span><span class="cx"> case CSSValueUnder:
</span><span class="lines">@@ -479,7 +479,7 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> ASSERT(primitiveValue.isValueID());
</span><span class="cx">
</span><del>- if (primitiveValue.getValueID() != CSSValueWebkitMatchParent)
</del><ins>+ if (primitiveValue.valueID() != CSSValueWebkitMatchParent)
</ins><span class="cx"> return primitiveValue;
</span><span class="cx">
</span><span class="cx"> auto* parentStyle = styleResolver.parentStyle();
</span><span class="lines">@@ -495,12 +495,12 @@
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> if (primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_URI) {
</span><del>- String cssURLValue = primitiveValue.getStringValue();
</del><ins>+ String cssURLValue = primitiveValue.stringValue();
</ins><span class="cx"> URL url = styleResolver.document().completeURL(cssURLValue);
</span><span class="cx"> // FIXME: It doesn't work with external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=126133)
</span><span class="cx"> return ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier());
</span><span class="cx"> }
</span><del>- ASSERT(primitiveValue.getValueID() == CSSValueNone);
</del><ins>+ ASSERT(primitiveValue.valueID() == CSSValueNone);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -511,15 +511,15 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(currentValue.get());
</span><span class="cx"> if (primitiveValue.isShape()) {
</span><span class="cx"> ASSERT(!operation);
</span><del>- operation = ShapeClipPathOperation::create(basicShapeForValue(styleResolver.state().cssToLengthConversionData(), *primitiveValue.getShapeValue()));
</del><ins>+ operation = ShapeClipPathOperation::create(basicShapeForValue(styleResolver.state().cssToLengthConversionData(), *primitiveValue.shapeValue()));
</ins><span class="cx"> } else {
</span><del>- ASSERT(primitiveValue.getValueID() == CSSValueContentBox
- || primitiveValue.getValueID() == CSSValueBorderBox
- || primitiveValue.getValueID() == CSSValuePaddingBox
- || primitiveValue.getValueID() == CSSValueMarginBox
- || primitiveValue.getValueID() == CSSValueFill
- || primitiveValue.getValueID() == CSSValueStroke
- || primitiveValue.getValueID() == CSSValueViewBox);
</del><ins>+ ASSERT(primitiveValue.valueID() == CSSValueContentBox
+ || primitiveValue.valueID() == CSSValueBorderBox
+ || primitiveValue.valueID() == CSSValuePaddingBox
+ || primitiveValue.valueID() == CSSValueMarginBox
+ || primitiveValue.valueID() == CSSValueFill
+ || primitiveValue.valueID() == CSSValueStroke
+ || primitiveValue.valueID() == CSSValueViewBox);
</ins><span class="cx"> ASSERT(referenceBox == BoxMissing);
</span><span class="cx"> referenceBox = primitiveValue;
</span><span class="cx"> }
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><span class="cx"> EResize resize = RESIZE_NONE;
</span><del>- if (primitiveValue.getValueID() == CSSValueAuto) {
</del><ins>+ if (primitiveValue.valueID() == CSSValueAuto) {
</ins><span class="cx"> if (Settings* settings = styleResolver.document().settings())
</span><span class="cx"> resize = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
</span><span class="cx"> } else
</span><span class="lines">@@ -551,11 +551,11 @@
</span><span class="cx"> inline int StyleBuilderConverter::convertMarqueeRepetition(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueInfinite)
</del><ins>+ if (primitiveValue.valueID() == CSSValueInfinite)
</ins><span class="cx"> return -1; // -1 means repeat forever.
</span><span class="cx">
</span><span class="cx"> ASSERT(primitiveValue.isNumber());
</span><del>- return primitiveValue.getIntValue();
</del><ins>+ return primitiveValue.intValue();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline int StyleBuilderConverter::convertMarqueeSpeed(StyleResolver&, CSSValue& value)
</span><span class="lines">@@ -562,7 +562,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> int speed = 85;
</span><del>- if (CSSValueID ident = primitiveValue.getValueID()) {
</del><ins>+ if (CSSValueID ident = primitiveValue.valueID()) {
</ins><span class="cx"> switch (ident) {
</span><span class="cx"> case CSSValueSlow:
</span><span class="cx"> speed = 500; // 500 msec.
</span><span class="lines">@@ -582,7 +582,7 @@
</span><span class="cx"> else {
</span><span class="cx"> // For scrollamount support.
</span><span class="cx"> ASSERT(primitiveValue.isNumber());
</span><del>- speed = primitiveValue.getIntValue();
</del><ins>+ speed = primitiveValue.intValue();
</ins><span class="cx"> }
</span><span class="cx"> return speed;
</span><span class="cx"> }
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx"> inline PassRefPtr<QuotesData> StyleBuilderConverter::convertQuotes(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return QuotesData::create(Vector<std::pair<String, String>>());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -603,8 +603,8 @@
</span><span class="cx"> CSSValue* second = list.item(i + 1);
</span><span class="cx"> if (!second)
</span><span class="cx"> break;
</span><del>- String startQuote = downcast<CSSPrimitiveValue>(*first).getStringValue();
- String endQuote = downcast<CSSPrimitiveValue>(*second).getStringValue();
</del><ins>+ String startQuote = downcast<CSSPrimitiveValue>(*first).stringValue();
+ String endQuote = downcast<CSSPrimitiveValue>(*second).stringValue();
</ins><span class="cx"> quotes.append(std::make_pair(startQuote, endQuote));
</span><span class="cx"> }
</span><span class="cx"> return QuotesData::create(quotes);
</span><span class="lines">@@ -627,7 +627,7 @@
</span><span class="cx"> inline RefPtr<StyleReflection> StyleBuilderConverter::convertReflection(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -649,15 +649,15 @@
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><del>- if (primitiveValue.getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNormal)
</ins><span class="cx"> return IntSize();
</span><span class="cx">
</span><del>- Pair* pair = primitiveValue.getPairValue();
</del><ins>+ Pair* pair = primitiveValue.pairValue();
</ins><span class="cx"> ASSERT(pair);
</span><span class="cx"> ASSERT(pair->first());
</span><span class="cx"> ASSERT(pair->second());
</span><span class="cx">
</span><del>- return IntSize(pair->first()->getIntValue(), pair->second()->getIntValue());
</del><ins>+ return IntSize(pair->first()->intValue(), pair->second()->intValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline float StyleBuilderConverter::convertTextStrokeWidth(StyleResolver& styleResolver, CSSValue& value)
</span><span class="lines">@@ -665,14 +665,14 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><span class="cx"> float width = 0;
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueThin:
</span><span class="cx"> case CSSValueMedium:
</span><span class="cx"> case CSSValueThick: {
</span><span class="cx"> double result = 1.0 / 48;
</span><del>- if (primitiveValue.getValueID() == CSSValueMedium)
</del><ins>+ if (primitiveValue.valueID() == CSSValueMedium)
</ins><span class="cx"> result *= 3;
</span><del>- else if (primitiveValue.getValueID() == CSSValueThick)
</del><ins>+ else if (primitiveValue.valueID() == CSSValueThick)
</ins><span class="cx"> result *= 5;
</span><span class="cx"> Ref<CSSPrimitiveValue> emsValue(CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS));
</span><span class="cx"> width = convertComputedLength<float>(styleResolver, emsValue);
</span><span class="lines">@@ -693,7 +693,7 @@
</span><span class="cx"> inline LineBoxContain StyleBuilderConverter::convertLineBoxContain(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return LineBoxContainNone;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -704,7 +704,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(primitiveValue.isValueID());
</span><span class="cx">
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueAuto:
</span><span class="cx"> return TextDecorationSkipAuto;
</span><span class="cx"> case CSSValueNone:
</span><span class="lines">@@ -741,7 +741,7 @@
</span><span class="cx"> inline PassRefPtr<ShapeValue> StyleBuilderConverter::convertShapeValue(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -753,11 +753,11 @@
</span><span class="cx"> for (auto& currentValue : downcast<CSSValueList>(value)) {
</span><span class="cx"> CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(currentValue.get());
</span><span class="cx"> if (primitiveValue.isShape())
</span><del>- shape = basicShapeForValue(styleResolver.state().cssToLengthConversionData(), *primitiveValue.getShapeValue());
- else if (primitiveValue.getValueID() == CSSValueContentBox
- || primitiveValue.getValueID() == CSSValueBorderBox
- || primitiveValue.getValueID() == CSSValuePaddingBox
- || primitiveValue.getValueID() == CSSValueMarginBox)
</del><ins>+ shape = basicShapeForValue(styleResolver.state().cssToLengthConversionData(), *primitiveValue.shapeValue());
+ else if (primitiveValue.valueID() == CSSValueContentBox
+ || primitiveValue.valueID() == CSSValueBorderBox
+ || primitiveValue.valueID() == CSSValuePaddingBox
+ || primitiveValue.valueID() == CSSValueMarginBox)
</ins><span class="cx"> referenceBox = primitiveValue;
</span><span class="cx"> else {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -787,7 +787,7 @@
</span><span class="cx"> auto points = std::make_unique<ScrollSnapPoints>();
</span><span class="cx">
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueElements);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueElements);
</ins><span class="cx"> points->usesElements = true;
</span><span class="cx"> return points;
</span><span class="cx"> }
</span><span class="lines">@@ -794,7 +794,7 @@
</span><span class="cx">
</span><span class="cx"> for (auto& currentValue : downcast<CSSValueList>(value)) {
</span><span class="cx"> auto& itemValue = downcast<CSSPrimitiveValue>(currentValue.get());
</span><del>- if (auto* lengthRepeat = itemValue.getLengthRepeatValue()) {
</del><ins>+ if (auto* lengthRepeat = itemValue.lengthRepeatValue()) {
</ins><span class="cx"> if (auto* interval = lengthRepeat->interval()) {
</span><span class="cx"> points->repeatOffset = parseSnapCoordinate(styleResolver, *interval);
</span><span class="cx"> points->hasRepeat = true;
</span><span class="lines">@@ -829,15 +829,15 @@
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> inline GridLength StyleBuilderConverter::createGridTrackBreadth(CSSPrimitiveValue& primitiveValue, StyleResolver& styleResolver)
</span><span class="cx"> {
</span><del>- if (primitiveValue.getValueID() == CSSValueWebkitMinContent)
</del><ins>+ if (primitiveValue.valueID() == CSSValueWebkitMinContent)
</ins><span class="cx"> return Length(MinContent);
</span><span class="cx">
</span><del>- if (primitiveValue.getValueID() == CSSValueWebkitMaxContent)
</del><ins>+ if (primitiveValue.valueID() == CSSValueWebkitMaxContent)
</ins><span class="cx"> return Length(MaxContent);
</span><span class="cx">
</span><span class="cx"> // Fractional unit.
</span><span class="cx"> if (primitiveValue.isFlex())
</span><del>- return GridLength(primitiveValue.getDoubleValue());
</del><ins>+ return GridLength(primitiveValue.doubleValue());
</ins><span class="cx">
</span><span class="cx"> return primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion | AutoConversion>(styleResolver.state().cssToLengthConversionData());
</span><span class="cx"> }
</span><span class="lines">@@ -864,7 +864,7 @@
</span><span class="cx"> ASSERT(value.isGridLineNamesValue());
</span><span class="cx">
</span><span class="cx"> for (auto& namedGridLineValue : downcast<CSSGridLineNamesValue>(value)) {
</span><del>- String namedGridLine = downcast<CSSPrimitiveValue>(namedGridLineValue.get()).getStringValue();
</del><ins>+ String namedGridLine = downcast<CSSPrimitiveValue>(namedGridLineValue.get()).stringValue();
</ins><span class="cx"> auto result = namedGridLines.add(namedGridLine, Vector<unsigned>());
</span><span class="cx"> result.iterator->value.append(currentNamedGridLine);
</span><span class="cx"> auto orderedResult = orderedNamedGridLines.add(currentNamedGridLine, Vector<String>());
</span><span class="lines">@@ -891,7 +891,7 @@
</span><span class="cx"> {
</span><span class="cx"> // Handle 'none'.
</span><span class="cx"> if (is<CSSPrimitiveValue>(value))
</span><del>- return downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone;
</del><ins>+ return downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone;
</ins><span class="cx">
</span><span class="cx"> if (!is<CSSValueList>(value))
</span><span class="cx"> return false;
</span><span class="lines">@@ -939,11 +939,11 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> // We translate <ident> to <string> during parsing as it makes handling it simpler.
</span><span class="cx"> if (primitiveValue.isString()) {
</span><del>- position.setNamedGridArea(primitiveValue.getStringValue());
</del><ins>+ position.setNamedGridArea(primitiveValue.stringValue());
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ASSERT(primitiveValue.getValueID() == CSSValueAuto);
</del><ins>+ ASSERT(primitiveValue.valueID() == CSSValueAuto);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -953,7 +953,7 @@
</span><span class="cx"> auto it = values.begin();
</span><span class="cx"> CSSPrimitiveValue* currentValue = &downcast<CSSPrimitiveValue>(it->get());
</span><span class="cx"> bool isSpanPosition = false;
</span><del>- if (currentValue->getValueID() == CSSValueSpan) {
</del><ins>+ if (currentValue->valueID() == CSSValueSpan) {
</ins><span class="cx"> isSpanPosition = true;
</span><span class="cx"> ++it;
</span><span class="cx"> currentValue = it != values.end() ? &downcast<CSSPrimitiveValue>(it->get()) : nullptr;
</span><span class="lines">@@ -961,7 +961,7 @@
</span><span class="cx">
</span><span class="cx"> int gridLineNumber = 0;
</span><span class="cx"> if (currentValue && currentValue->isNumber()) {
</span><del>- gridLineNumber = currentValue->getIntValue();
</del><ins>+ gridLineNumber = currentValue->intValue();
</ins><span class="cx"> ++it;
</span><span class="cx"> currentValue = it != values.end() ? &downcast<CSSPrimitiveValue>(it->get()) : nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -968,7 +968,7 @@
</span><span class="cx">
</span><span class="cx"> String gridLineName;
</span><span class="cx"> if (currentValue && currentValue->isString()) {
</span><del>- gridLineName = currentValue->getStringValue();
</del><ins>+ gridLineName = currentValue->stringValue();
</ins><span class="cx"> ++it;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1035,15 +1035,15 @@
</span><span class="cx"> auto* second = downcast<CSSPrimitiveValue>(list.item(1));
</span><span class="cx">
</span><span class="cx"> GridAutoFlow autoFlow = RenderStyle::initialGridAutoFlow();
</span><del>- switch (first.getValueID()) {
</del><ins>+ switch (first.valueID()) {
</ins><span class="cx"> case CSSValueRow:
</span><del>- if (second && second->getValueID() == CSSValueDense)
</del><ins>+ if (second && second->valueID() == CSSValueDense)
</ins><span class="cx"> autoFlow = AutoFlowRowDense;
</span><span class="cx"> else
</span><span class="cx"> autoFlow = AutoFlowRow;
</span><span class="cx"> break;
</span><span class="cx"> case CSSValueColumn:
</span><del>- if (second && second->getValueID() == CSSValueDense)
</del><ins>+ if (second && second->valueID() == CSSValueDense)
</ins><span class="cx"> autoFlow = AutoFlowColumnDense;
</span><span class="cx"> else
</span><span class="cx"> autoFlow = AutoFlowColumn;
</span><span class="lines">@@ -1070,14 +1070,14 @@
</span><span class="cx"> {
</span><span class="cx"> Optional<Length> wordSpacing;
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNormal)
</ins><span class="cx"> wordSpacing = RenderStyle::initialWordSpacing();
</span><span class="cx"> else if (primitiveValue.isLength())
</span><span class="cx"> wordSpacing = primitiveValue.computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(styleResolver));
</span><span class="cx"> else if (primitiveValue.isPercentage())
</span><del>- wordSpacing = Length(clampTo<float>(primitiveValue.getDoubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
</del><ins>+ wordSpacing = Length(clampTo<float>(primitiveValue.doubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
</ins><span class="cx"> else if (primitiveValue.isNumber())
</span><del>- wordSpacing = Length(primitiveValue.getDoubleValue(), Fixed);
</del><ins>+ wordSpacing = Length(primitiveValue.doubleValue(), Fixed);
</ins><span class="cx">
</span><span class="cx"> return wordSpacing;
</span><span class="cx"> }
</span><span class="lines">@@ -1085,7 +1085,7 @@
</span><span class="cx"> inline Optional<float> StyleBuilderConverter::convertPerspective(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNone)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNone)
</ins><span class="cx"> return 0.f;
</span><span class="cx">
</span><span class="cx"> float perspective = -1;
</span><span class="lines">@@ -1092,7 +1092,7 @@
</span><span class="cx"> if (primitiveValue.isLength())
</span><span class="cx"> perspective = primitiveValue.computeLength<float>(styleResolver.state().cssToLengthConversionData());
</span><span class="cx"> else if (primitiveValue.isNumber())
</span><del>- perspective = primitiveValue.getDoubleValue() * styleResolver.state().cssToLengthConversionData().zoom();
</del><ins>+ perspective = primitiveValue.doubleValue() * styleResolver.state().cssToLengthConversionData().zoom();
</ins><span class="cx"> else
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx">
</span><span class="lines">@@ -1103,7 +1103,7 @@
</span><span class="cx"> {
</span><span class="cx"> Optional<Length> marqueeLength;
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueSmall:
</span><span class="cx"> marqueeLength = Length(1, Fixed); // 1px.
</span><span class="cx"> break;
</span><span class="lines">@@ -1136,7 +1136,7 @@
</span><span class="cx"> inline FontFeatureSettings StyleBuilderConverter::convertFontFeatureSettings(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNormal);
</ins><span class="cx"> return { };
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1152,7 +1152,7 @@
</span><span class="cx"> inline FontVariationSettings StyleBuilderConverter::convertFontVariationSettings(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNormal);
</ins><span class="cx"> return { };
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1168,7 +1168,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> inline bool StyleBuilderConverter::convertTouchCallout(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><del>- return !equalLettersIgnoringASCIICase(downcast<CSSPrimitiveValue>(value).getStringValue(), "none");
</del><ins>+ return !equalLettersIgnoringASCIICase(downcast<CSSPrimitiveValue>(value).stringValue(), "none");
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -1182,7 +1182,7 @@
</span><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class="cx"> inline bool StyleBuilderConverter::convertOverflowScrolling(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><del>- return downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueTouch;
</del><ins>+ return downcast<CSSPrimitiveValue>(value).valueID() == CSSValueTouch;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -1206,7 +1206,7 @@
</span><span class="cx"> inline Vector<SVGLength> StyleBuilderConverter::convertStrokeDashArray(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return SVGRenderStyle::initialStrokeDashArray();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1216,12 +1216,12 @@
</span><span class="cx"> inline PaintOrder StyleBuilderConverter::convertPaintOrder(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNormal);
</ins><span class="cx"> return PaintOrderNormal;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto& orderTypeList = downcast<CSSValueList>(value);
</span><del>- switch (downcast<CSSPrimitiveValue>(*orderTypeList.itemWithoutBoundsCheck(0)).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(*orderTypeList.itemWithoutBoundsCheck(0)).valueID()) {
</ins><span class="cx"> case CSSValueFill:
</span><span class="cx"> return orderTypeList.length() > 1 ? PaintOrderFillMarkers : PaintOrderFill;
</span><span class="cx"> case CSSValueStroke:
</span><span class="lines">@@ -1237,7 +1237,7 @@
</span><span class="cx"> inline float StyleBuilderConverter::convertOpacity(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- float opacity = primitiveValue.getFloatValue();
</del><ins>+ float opacity = primitiveValue.floatValue();
</ins><span class="cx"> if (primitiveValue.isPercentage())
</span><span class="cx"> opacity /= 100.0f;
</span><span class="cx"> return opacity;
</span><span class="lines">@@ -1248,7 +1248,7 @@
</span><span class="cx"> String s;
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> if (primitiveValue.isURI())
</span><del>- s = primitiveValue.getStringValue();
</del><ins>+ s = primitiveValue.stringValue();
</ins><span class="cx">
</span><span class="cx"> return SVGURIReference::fragmentIdentifierFromIRIString(s, styleResolver.document());
</span><span class="cx"> }
</span><span class="lines">@@ -1263,8 +1263,8 @@
</span><span class="cx"> {
</span><span class="cx"> StyleSelfAlignmentData alignmentData = RenderStyle::initialSelfAlignment();
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (Pair* pairValue = primitiveValue.getPairValue()) {
- if (pairValue->first()->getValueID() == CSSValueLegacy) {
</del><ins>+ if (Pair* pairValue = primitiveValue.pairValue()) {
+ if (pairValue->first()->valueID() == CSSValueLegacy) {
</ins><span class="cx"> alignmentData.setPositionType(LegacyPosition);
</span><span class="cx"> alignmentData.setPosition(*pairValue->second());
</span><span class="cx"> } else {
</span><span class="lines">@@ -1282,17 +1282,17 @@
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> if (RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled()) {
</span><span class="cx"> auto& contentValue = downcast<CSSContentDistributionValue>(value);
</span><del>- if (contentValue.distribution()->getValueID() != CSSValueInvalid)
</del><ins>+ if (contentValue.distribution()->valueID() != CSSValueInvalid)
</ins><span class="cx"> alignmentData.setDistribution(contentValue.distribution().get());
</span><del>- if (contentValue.position()->getValueID() != CSSValueInvalid)
</del><ins>+ if (contentValue.position()->valueID() != CSSValueInvalid)
</ins><span class="cx"> alignmentData.setPosition(contentValue.position().get());
</span><del>- if (contentValue.overflow()->getValueID() != CSSValueInvalid)
</del><ins>+ if (contentValue.overflow()->valueID() != CSSValueInvalid)
</ins><span class="cx"> alignmentData.setOverflow(contentValue.overflow().get());
</span><span class="cx"> return alignmentData;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueStretch:
</span><span class="cx"> case CSSValueSpaceBetween:
</span><span class="cx"> case CSSValueSpaceAround:
</span><span class="lines">@@ -1311,7 +1311,7 @@
</span><span class="cx">
</span><span class="cx"> inline EGlyphOrientation StyleBuilderConverter::convertGlyphOrientation(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><del>- float angle = fabsf(fmodf(downcast<CSSPrimitiveValue>(value).getFloatValue(), 360.0f));
</del><ins>+ float angle = fabsf(fmodf(downcast<CSSPrimitiveValue>(value).floatValue(), 360.0f));
</ins><span class="cx"> if (angle <= 45.0f || angle > 315.0f)
</span><span class="cx"> return GO_0DEG;
</span><span class="cx"> if (angle > 45.0f && angle <= 135.0f)
</span><span class="lines">@@ -1323,7 +1323,7 @@
</span><span class="cx">
</span><span class="cx"> inline EGlyphOrientation StyleBuilderConverter::convertGlyphOrientationOrAuto(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto)
</ins><span class="cx"> return GO_AUTO;
</span><span class="cx"> return convertGlyphOrientation(styleResolver, value);
</span><span class="cx"> }
</span><span class="lines">@@ -1331,7 +1331,7 @@
</span><span class="cx"> inline Optional<Length> StyleBuilderConverter::convertLineHeight(StyleResolver& styleResolver, CSSValue& value, float multiplier)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNormal)
</ins><span class="cx"> return RenderStyle::initialLineHeight();
</span><span class="cx">
</span><span class="cx"> if (primitiveValue.isLength()) {
</span><span class="lines">@@ -1342,11 +1342,11 @@
</span><span class="cx"> }
</span><span class="cx"> if (primitiveValue.isPercentage()) {
</span><span class="cx"> // FIXME: percentage should not be restricted to an integer here.
</span><del>- return Length((styleResolver.style()->computedFontSize() * primitiveValue.getIntValue()) / 100, Fixed);
</del><ins>+ return Length((styleResolver.style()->computedFontSize() * primitiveValue.intValue()) / 100, Fixed);
</ins><span class="cx"> }
</span><span class="cx"> if (primitiveValue.isNumber()) {
</span><span class="cx"> // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
</span><del>- return Length(primitiveValue.getDoubleValue() * multiplier * 100.0, Percent);
</del><ins>+ return Length(primitiveValue.doubleValue() * multiplier * 100.0, Percent);
</ins><span class="cx"> }
</span><span class="cx"> return Nullopt;
</span><span class="cx"> }
</span><span class="lines">@@ -1354,7 +1354,7 @@
</span><span class="cx"> FontSynthesis StyleBuilderConverter::convertFontSynthesis(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return FontSynthesisNone;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1361,7 +1361,7 @@
</span><span class="cx"> FontSynthesis result = FontSynthesisNone;
</span><span class="cx"> ASSERT(is<CSSValueList>(value));
</span><span class="cx"> for (CSSValue& v : downcast<CSSValueList>(value)) {
</span><del>- switch (downcast<CSSPrimitiveValue>(v).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(v).valueID()) {
</ins><span class="cx"> case CSSValueWeight:
</span><span class="cx"> result |= FontSynthesisWeight;
</span><span class="cx"> break;
</span><span class="lines">@@ -1380,9 +1380,9 @@
</span><span class="cx"> inline BreakBetween StyleBuilderConverter::convertPageBreakBetween(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAlways)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAlways)
</ins><span class="cx"> return PageBreakBetween;
</span><del>- if (primitiveValue.getValueID() == CSSValueAvoid)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAvoid)
</ins><span class="cx"> return AvoidPageBreakBetween;
</span><span class="cx"> return primitiveValue;
</span><span class="cx"> }
</span><span class="lines">@@ -1390,7 +1390,7 @@
</span><span class="cx"> inline BreakInside StyleBuilderConverter::convertPageBreakInside(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAvoid)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAvoid)
</ins><span class="cx"> return AvoidPageBreakInside;
</span><span class="cx"> return primitiveValue;
</span><span class="cx"> }
</span><span class="lines">@@ -1398,9 +1398,9 @@
</span><span class="cx"> inline BreakBetween StyleBuilderConverter::convertColumnBreakBetween(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAlways)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAlways)
</ins><span class="cx"> return ColumnBreakBetween;
</span><del>- if (primitiveValue.getValueID() == CSSValueAvoid)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAvoid)
</ins><span class="cx"> return AvoidColumnBreakBetween;
</span><span class="cx"> return primitiveValue;
</span><span class="cx"> }
</span><span class="lines">@@ -1408,7 +1408,7 @@
</span><span class="cx"> inline BreakInside StyleBuilderConverter::convertColumnBreakInside(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAvoid)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAvoid)
</ins><span class="cx"> return AvoidColumnBreakInside;
</span><span class="cx"> return primitiveValue;
</span><span class="cx"> }
</span><span class="lines">@@ -1417,9 +1417,9 @@
</span><span class="cx"> inline BreakBetween StyleBuilderConverter::convertRegionBreakBetween(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAlways)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAlways)
</ins><span class="cx"> return RegionBreakBetween;
</span><del>- if (primitiveValue.getValueID() == CSSValueAvoid)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAvoid)
</ins><span class="cx"> return AvoidRegionBreakBetween;
</span><span class="cx"> return primitiveValue;
</span><span class="cx"> }
</span><span class="lines">@@ -1427,7 +1427,7 @@
</span><span class="cx"> inline BreakInside StyleBuilderConverter::convertRegionBreakInside(StyleResolver&, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAvoid)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAvoid)
</ins><span class="cx"> return AvoidRegionBreakInside;
</span><span class="cx"> return primitiveValue;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -24,8 +24,7 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef StyleBuilderCustom_h
-#define StyleBuilderCustom_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #include "CSSAspectRatioValue.h"
</span><span class="cx"> #include "CSSCursorImageValue.h"
</span><span class="lines">@@ -194,23 +193,23 @@
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><del>- if (primitiveValue.getValueID() == CSSValueNormal) {
</del><ins>+ if (primitiveValue.valueID() == CSSValueNormal) {
</ins><span class="cx"> resetEffectiveZoom(styleResolver);
</span><span class="cx"> styleResolver.setZoom(RenderStyle::initialZoom());
</span><del>- } else if (primitiveValue.getValueID() == CSSValueReset) {
</del><ins>+ } else if (primitiveValue.valueID() == CSSValueReset) {
</ins><span class="cx"> styleResolver.setEffectiveZoom(RenderStyle::initialZoom());
</span><span class="cx"> styleResolver.setZoom(RenderStyle::initialZoom());
</span><del>- } else if (primitiveValue.getValueID() == CSSValueDocument) {
</del><ins>+ } else if (primitiveValue.valueID() == CSSValueDocument) {
</ins><span class="cx"> float docZoom = styleResolver.rootElementStyle() ? styleResolver.rootElementStyle()->zoom() : RenderStyle::initialZoom();
</span><span class="cx"> styleResolver.setEffectiveZoom(docZoom);
</span><span class="cx"> styleResolver.setZoom(docZoom);
</span><span class="cx"> } else if (primitiveValue.isPercentage()) {
</span><span class="cx"> resetEffectiveZoom(styleResolver);
</span><del>- if (float percent = primitiveValue.getFloatValue())
</del><ins>+ if (float percent = primitiveValue.floatValue())
</ins><span class="cx"> styleResolver.setZoom(percent / 100.0f);
</span><span class="cx"> } else if (primitiveValue.isNumber()) {
</span><span class="cx"> resetEffectiveZoom(styleResolver);
</span><del>- if (float number = primitiveValue.getFloatValue())
</del><ins>+ if (float number = primitiveValue.floatValue())
</ins><span class="cx"> styleResolver.setZoom(number);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -246,7 +245,7 @@
</span><span class="cx"> if (!pageSizeName)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- switch (pageSizeName->getValueID()) {
</del><ins>+ switch (pageSizeName->valueID()) {
</ins><span class="cx"> case CSSValueA5:
</span><span class="cx"> width = a5Width;
</span><span class="cx"> height = a5Height;
</span><span class="lines">@@ -284,7 +283,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (pageOrientation) {
</span><del>- switch (pageOrientation->getValueID()) {
</del><ins>+ switch (pageOrientation->valueID()) {
</ins><span class="cx"> case CSSValueLandscape:
</span><span class="cx"> std::swap(width, height);
</span><span class="cx"> break;
</span><span class="lines">@@ -301,7 +300,7 @@
</span><span class="cx"> inline void StyleBuilderCustom::applyValueVerticalAlign(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID())
</del><ins>+ if (primitiveValue.valueID())
</ins><span class="cx"> styleResolver.style()->setVerticalAlign(primitiveValue);
</span><span class="cx"> else
</span><span class="cx"> styleResolver.style()->setVerticalAlignLength(primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData()));
</span><span class="lines">@@ -316,12 +315,12 @@
</span><span class="cx"> inline void StyleBuilderCustom::applyValueWebkitDashboardRegion(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNone) {
</del><ins>+ if (primitiveValue.valueID() == CSSValueNone) {
</ins><span class="cx"> styleResolver.style()->setDashboardRegions(RenderStyle::noneDashboardRegions());
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- DashboardRegion* region = primitiveValue.getDashboardRegionValue();
</del><ins>+ auto* region = primitiveValue.dashboardRegionValue();
</ins><span class="cx"> if (!region)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -374,12 +373,12 @@
</span><span class="cx"> double resolution = RenderStyle::initialImageResolution();
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><span class="cx"> CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
</span><del>- if (primitiveValue.getValueID() == CSSValueFromImage)
</del><ins>+ if (primitiveValue.valueID() == CSSValueFromImage)
</ins><span class="cx"> source = ImageResolutionFromImage;
</span><del>- else if (primitiveValue.getValueID() == CSSValueSnap)
</del><ins>+ else if (primitiveValue.valueID() == CSSValueSnap)
</ins><span class="cx"> snap = ImageResolutionSnapPixels;
</span><span class="cx"> else
</span><del>- resolution = primitiveValue.getDoubleValue(CSSPrimitiveValue::CSS_DPPX);
</del><ins>+ resolution = primitiveValue.doubleValue(CSSPrimitiveValue::CSS_DPPX);
</ins><span class="cx"> }
</span><span class="cx"> styleResolver.style()->setImageResolutionSource(source);
</span><span class="cx"> styleResolver.style()->setImageResolutionSnap(snap);
</span><span class="lines">@@ -435,7 +434,7 @@
</span><span class="cx"> pageSizeType = PAGE_SIZE_RESOLVED;
</span><span class="cx"> width = height = primitiveValue.computeLength<Length>(styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
</span><span class="cx"> } else {
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case 0:
</span><span class="cx"> return;
</span><span class="cx"> case CSSValueAuto:
</span><span class="lines">@@ -490,12 +489,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
</span><del>- if (!primitiveValue.getValueID())
</del><ins>+ if (!primitiveValue.valueID())
</ins><span class="cx"> lengthOrPercentageValue = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData());
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><del>- else if (primitiveValue.getValueID() == CSSValueWebkitEachLine)
</del><ins>+ else if (primitiveValue.valueID() == CSSValueWebkitEachLine)
</ins><span class="cx"> textIndentLineValue = TextIndentEachLine;
</span><del>- else if (primitiveValue.getValueID() == CSSValueWebkitHanging)
</del><ins>+ else if (primitiveValue.valueID() == CSSValueWebkitHanging)
</ins><span class="cx"> textIndentTypeValue = TextIndentHanging;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -680,7 +679,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><del>- if (Rect* rect = primitiveValue.getRectValue()) {
</del><ins>+ if (Rect* rect = primitiveValue.rectValue()) {
</ins><span class="cx"> auto conversionData = styleResolver.state().cssToLengthConversionData();
</span><span class="cx"> Length top = rect->top()->convertToLength<FixedIntegerConversion | PercentConversion | AutoConversion>(conversionData);
</span><span class="cx"> Length right = rect->right()->convertToLength<FixedIntegerConversion | PercentConversion | AutoConversion>(conversionData);
</span><span class="lines">@@ -689,7 +688,7 @@
</span><span class="cx"> styleResolver.style()->setClip(top, right, bottom, left);
</span><span class="cx"> styleResolver.style()->setHasClip(true);
</span><span class="cx"> } else {
</span><del>- ASSERT(primitiveValue.getValueID() == CSSValueAuto);
</del><ins>+ ASSERT(primitiveValue.valueID() == CSSValueAuto);
</ins><span class="cx"> applyInitialClip(styleResolver);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -699,10 +698,10 @@
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><span class="cx"> FontCascadeDescription fontDescription = styleResolver.style()->fontDescription();
</span><del>- if (primitiveValue.getValueID() == CSSValueAuto)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAuto)
</ins><span class="cx"> fontDescription.setLocale(nullAtom);
</span><span class="cx"> else
</span><del>- fontDescription.setLocale(primitiveValue.getStringValue());
</del><ins>+ fontDescription.setLocale(primitiveValue.stringValue());
</ins><span class="cx"> styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -721,12 +720,12 @@
</span><span class="cx"> inline void StyleBuilderCustom::applyValueWebkitTextSizeAdjust(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueAuto)
</del><ins>+ if (primitiveValue.valueID() == CSSValueAuto)
</ins><span class="cx"> styleResolver.style()->setTextSizeAdjust(TextSizeAdjustment(AutoTextSizeAdjustment));
</span><del>- else if (primitiveValue.getValueID() == CSSValueNone)
</del><ins>+ else if (primitiveValue.valueID() == CSSValueNone)
</ins><span class="cx"> styleResolver.style()->setTextSizeAdjust(TextSizeAdjustment(NoTextSizeAdjustment));
</span><span class="cx"> else
</span><del>- styleResolver.style()->setTextSizeAdjust(TextSizeAdjustment(primitiveValue.getFloatValue()));
</del><ins>+ styleResolver.style()->setTextSizeAdjust(TextSizeAdjustment(primitiveValue.floatValue()));
</ins><span class="cx">
</span><span class="cx"> styleResolver.state().setFontDirty(true);
</span><span class="cx"> }
</span><span class="lines">@@ -735,9 +734,9 @@
</span><span class="cx"> inline void StyleBuilderCustom::applyValueWebkitTextZoom(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><del>- if (primitiveValue.getValueID() == CSSValueNormal)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNormal)
</ins><span class="cx"> styleResolver.style()->setTextZoom(TextZoomNormal);
</span><del>- else if (primitiveValue.getValueID() == CSSValueReset)
</del><ins>+ else if (primitiveValue.valueID() == CSSValueReset)
</ins><span class="cx"> styleResolver.style()->setTextZoom(TextZoomReset);
</span><span class="cx"> styleResolver.state().setFontDirty(true);
</span><span class="cx"> }
</span><span class="lines">@@ -746,7 +745,7 @@
</span><span class="cx"> inline void StyleBuilderCustom::applyTextOrBoxShadowValue(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> if (id == CSSPropertyTextShadow)
</span><span class="cx"> styleResolver.style()->setTextShadow(nullptr);
</span><span class="cx"> else
</span><span class="lines">@@ -762,7 +761,7 @@
</span><span class="cx"> int y = shadowValue.y->computeLength<int>(conversionData);
</span><span class="cx"> int blur = shadowValue.blur ? shadowValue.blur->computeLength<int>(conversionData) : 0;
</span><span class="cx"> int spread = shadowValue.spread ? shadowValue.spread->computeLength<int>(conversionData) : 0;
</span><del>- ShadowStyle shadowStyle = shadowValue.style && shadowValue.style->getValueID() == CSSValueInset ? Inset : Normal;
</del><ins>+ ShadowStyle shadowStyle = shadowValue.style && shadowValue.style->valueID() == CSSValueInset ? Inset : Normal;
</ins><span class="cx"> Color color;
</span><span class="cx"> if (shadowValue.color)
</span><span class="cx"> color = styleResolver.colorFromPrimitiveValue(*shadowValue.color);
</span><span class="lines">@@ -869,7 +868,7 @@
</span><span class="cx"> // If the family name was resolved by the CSS parser from a system font ID, then it is generic.
</span><span class="cx"> isGenericFamily = fontFamily.fromSystemFontID;
</span><span class="cx"> } else {
</span><del>- switch (contentValue.getValueID()) {
</del><ins>+ switch (contentValue.valueID()) {
</ins><span class="cx"> case CSSValueWebkitBody:
</span><span class="cx"> if (Settings* settings = styleResolver.document().settings())
</span><span class="cx"> family = settings->standardFontFamily();
</span><span class="lines">@@ -948,7 +947,7 @@
</span><span class="cx"> SVGRenderStyle& svgStyle = styleResolver.style()->accessSVGStyle();
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> if (primitiveValue.isValueID()) {
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueBaseline:
</span><span class="cx"> svgStyle.setBaselineShift(BS_BASELINE);
</span><span class="cx"> break;
</span><span class="lines">@@ -988,12 +987,12 @@
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx">
</span><del>- if (primitiveValue.getValueID() == CSSValueFromDimensions)
</del><ins>+ if (primitiveValue.valueID() == CSSValueFromDimensions)
</ins><span class="cx"> return styleResolver.style()->setAspectRatioType(AspectRatioFromDimensions);
</span><del>- if (primitiveValue.getValueID() == CSSValueFromIntrinsic)
</del><ins>+ if (primitiveValue.valueID() == CSSValueFromIntrinsic)
</ins><span class="cx"> return styleResolver.style()->setAspectRatioType(AspectRatioFromIntrinsic);
</span><span class="cx">
</span><del>- ASSERT(primitiveValue.getValueID() == CSSValueAuto);
</del><ins>+ ASSERT(primitiveValue.valueID() == CSSValueAuto);
</ins><span class="cx"> return styleResolver.style()->setAspectRatioType(AspectRatioAuto);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1025,7 +1024,7 @@
</span><span class="cx">
</span><span class="cx"> for (auto& item : list) {
</span><span class="cx"> CSSPrimitiveValue& value = downcast<CSSPrimitiveValue>(item.get());
</span><del>- if (value.getValueID() == CSSValueFilled || value.getValueID() == CSSValueOpen)
</del><ins>+ if (value.valueID() == CSSValueFilled || value.valueID() == CSSValueOpen)
</ins><span class="cx"> styleResolver.style()->setTextEmphasisFill(value);
</span><span class="cx"> else
</span><span class="cx"> styleResolver.style()->setTextEmphasisMark(value);
</span><span class="lines">@@ -1038,13 +1037,13 @@
</span><span class="cx"> if (primitiveValue.isString()) {
</span><span class="cx"> styleResolver.style()->setTextEmphasisFill(TextEmphasisFillFilled);
</span><span class="cx"> styleResolver.style()->setTextEmphasisMark(TextEmphasisMarkCustom);
</span><del>- styleResolver.style()->setTextEmphasisCustomMark(primitiveValue.getStringValue());
</del><ins>+ styleResolver.style()->setTextEmphasisCustomMark(primitiveValue.stringValue());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> styleResolver.style()->setTextEmphasisCustomMark(nullAtom);
</span><span class="cx">
</span><del>- if (primitiveValue.getValueID() == CSSValueFilled || primitiveValue.getValueID() == CSSValueOpen) {
</del><ins>+ if (primitiveValue.valueID() == CSSValueFilled || primitiveValue.valueID() == CSSValueOpen) {
</ins><span class="cx"> styleResolver.style()->setTextEmphasisFill(primitiveValue);
</span><span class="cx"> styleResolver.style()->setTextEmphasisMark(TextEmphasisMarkAuto);
</span><span class="cx"> } else {
</span><span class="lines">@@ -1069,7 +1068,7 @@
</span><span class="cx"> template <StyleBuilderCustom::CounterBehavior counterBehavior>
</span><span class="cx"> inline void StyleBuilderCustom::applyValueCounter(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- bool setCounterIncrementToNone = counterBehavior == Increment && is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone;
</del><ins>+ bool setCounterIncrementToNone = counterBehavior == Increment && is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone;
</ins><span class="cx">
</span><span class="cx"> if (!is<CSSValueList>(value) && !setCounterIncrementToNone)
</span><span class="cx"> return;
</span><span class="lines">@@ -1086,12 +1085,12 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><del>- Pair* pair = downcast<CSSPrimitiveValue>(item.get()).getPairValue();
</del><ins>+ Pair* pair = downcast<CSSPrimitiveValue>(item.get()).pairValue();
</ins><span class="cx"> if (!pair || !pair->first() || !pair->second())
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- AtomicString identifier = pair->first()->getStringValue();
- int value = pair->second()->getIntValue();
</del><ins>+ AtomicString identifier = pair->first()->stringValue();
+ int value = pair->second()->intValue();
</ins><span class="cx"> CounterDirectives& directives = map.add(identifier, CounterDirectives()).iterator->value;
</span><span class="cx"> if (counterBehavior == Reset)
</span><span class="cx"> directives.setResetValue(value);
</span><span class="lines">@@ -1219,7 +1218,7 @@
</span><span class="cx"> {
</span><span class="cx"> SVGRenderStyle& svgStyle = styleResolver.style()->accessSVGStyle();
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> svgStyle.setShadow(nullptr);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -1257,7 +1256,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> auto fontDescription = styleResolver.fontDescription();
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueInvalid:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> break;
</span><span class="lines">@@ -1290,7 +1289,7 @@
</span><span class="cx">
</span><span class="cx"> inline void StyleBuilderCustom::applyValueColumnGap(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><del>- if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNormal)
</del><ins>+ if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNormal)
</ins><span class="cx"> styleResolver.style()->setHasNormalColumnGap();
</span><span class="cx"> else
</span><span class="cx"> styleResolver.style()->setColumnGap(StyleBuilderConverter::convertComputedLength<float>(styleResolver, value));
</span><span class="lines">@@ -1333,7 +1332,7 @@
</span><span class="cx">
</span><span class="cx"> auto& contentValue = downcast<CSSPrimitiveValue>(item.get());
</span><span class="cx"> if (contentValue.isString()) {
</span><del>- styleResolver.style()->setContent(contentValue.getStringValue().impl(), didSet);
</del><ins>+ styleResolver.style()->setContent(contentValue.stringValue().impl(), didSet);
</ins><span class="cx"> didSet = true;
</span><span class="cx"> } else if (contentValue.isAttr()) {
</span><span class="cx"> // FIXME: Can a namespace be specified for an attr(foo)?
</span><span class="lines">@@ -1341,7 +1340,7 @@
</span><span class="cx"> styleResolver.style()->setHasAttrContent();
</span><span class="cx"> else
</span><span class="cx"> const_cast<RenderStyle*>(styleResolver.parentStyle())->setHasAttrContent();
</span><del>- QualifiedName attr(nullAtom, contentValue.getStringValue().impl(), nullAtom);
</del><ins>+ QualifiedName attr(nullAtom, contentValue.stringValue().impl(), nullAtom);
</ins><span class="cx"> const AtomicString& value = styleResolver.element()->getAttribute(attr);
</span><span class="cx"> styleResolver.style()->setContent(value.isNull() ? emptyAtom : value.impl(), didSet);
</span><span class="cx"> didSet = true;
</span><span class="lines">@@ -1349,7 +1348,7 @@
</span><span class="cx"> styleResolver.ruleSets().mutableFeatures().attributeCanonicalLocalNamesInRules.add(attr.localName().impl());
</span><span class="cx"> styleResolver.ruleSets().mutableFeatures().attributeLocalNamesInRules.add(attr.localName().impl());
</span><span class="cx"> } else if (contentValue.isCounter()) {
</span><del>- Counter* counterValue = contentValue.getCounterValue();
</del><ins>+ auto* counterValue = contentValue.counterValue();
</ins><span class="cx"> EListStyleType listStyleType = NoneListStyle;
</span><span class="cx"> CSSValueID listStyleIdent = counterValue->listStyleIdent();
</span><span class="cx"> if (listStyleIdent != CSSValueNone)
</span><span class="lines">@@ -1358,7 +1357,7 @@
</span><span class="cx"> styleResolver.style()->setContent(WTFMove(counter), didSet);
</span><span class="cx"> didSet = true;
</span><span class="cx"> } else {
</span><del>- switch (contentValue.getValueID()) {
</del><ins>+ switch (contentValue.valueID()) {
</ins><span class="cx"> case CSSValueOpenQuote:
</span><span class="cx"> styleResolver.style()->setContent(OPEN_QUOTE, didSet);
</span><span class="cx"> didSet = true;
</span><span class="lines">@@ -1553,7 +1552,7 @@
</span><span class="cx">
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> float size;
</span><del>- if (CSSValueID ident = primitiveValue.getValueID()) {
</del><ins>+ if (CSSValueID ident = primitiveValue.valueID()) {
</ins><span class="cx"> fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize && (ident == CSSValueLarger || ident == CSSValueSmaller || ident == CSSValueWebkitRubyText));
</span><span class="cx">
</span><span class="cx"> // Keywords are being used.
</span><span class="lines">@@ -1587,7 +1586,7 @@
</span><span class="cx"> size = primitiveValue.computeLength<float>(CSSToLengthConversionData(styleResolver.parentStyle(), styleResolver.rootElementStyle(), styleResolver.document().renderView(), 1.0f, true));
</span><span class="cx"> styleResolver.state().setFontSizeHasViewportUnits(primitiveValue.isViewportPercentageLength());
</span><span class="cx"> } else if (primitiveValue.isPercentage())
</span><del>- size = (primitiveValue.getFloatValue() * parentSize) / 100.0f;
</del><ins>+ size = (primitiveValue.floatValue() * parentSize) / 100.0f;
</ins><span class="cx"> else if (primitiveValue.isCalculatedPercentageWithLength())
</span><span class="cx"> size = primitiveValue.cssCalcValue()->createCalculationValue(styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f))->evaluate(parentSize);
</span><span class="cx"> else
</span><span class="lines">@@ -1619,7 +1618,7 @@
</span><span class="cx"> inline void StyleBuilderCustom::applyValueGridTemplateAreas(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueNone);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueNone);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1706,7 +1705,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
</span><span class="cx"> if (primitiveValue.isString())
</span><del>- styleResolver.style()->setContentAltText(primitiveValue.getStringValue());
</del><ins>+ styleResolver.style()->setContentAltText(primitiveValue.stringValue());
</ins><span class="cx"> else if (primitiveValue.isAttr()) {
</span><span class="cx"> // FIXME: Can a namespace be specified for an attr(foo)?
</span><span class="cx"> if (styleResolver.style()->styleType() == NOPSEUDO)
</span><span class="lines">@@ -1714,7 +1713,7 @@
</span><span class="cx"> else
</span><span class="cx"> const_cast<RenderStyle*>(styleResolver.parentStyle())->setUnique();
</span><span class="cx">
</span><del>- QualifiedName attr(nullAtom, primitiveValue.getStringValue(), nullAtom);
</del><ins>+ QualifiedName attr(nullAtom, primitiveValue.stringValue(), nullAtom);
</ins><span class="cx"> const AtomicString& value = styleResolver.element()->getAttribute(attr);
</span><span class="cx"> styleResolver.style()->setContentAltText(value.isNull() ? emptyAtom : value);
</span><span class="cx">
</span><span class="lines">@@ -1726,6 +1725,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><ins>+
</ins><span class="cx"> inline void StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX(StyleResolver& styleResolver)
</span><span class="cx"> {
</span><span class="cx"> styleResolver.style()->setScrollSnapPointsX(nullptr);
</span><span class="lines">@@ -1745,23 +1745,23 @@
</span><span class="cx"> {
</span><span class="cx"> styleResolver.style()->setScrollSnapPointsY(styleResolver.parentStyle()->scrollSnapPointsY() ? std::make_unique<ScrollSnapPoints>(*styleResolver.parentStyle()->scrollSnapPointsY()) : nullptr);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> inline void StyleBuilderCustom::applyValueWillChange(StyleResolver& styleResolver, CSSValue& value)
</span><span class="cx"> {
</span><span class="cx"> if (is<CSSPrimitiveValue>(value)) {
</span><del>- ASSERT(downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto);
</del><ins>+ ASSERT(downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto);
</ins><span class="cx"> styleResolver.style()->setWillChange(nullptr);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- Ref<WillChangeData> willChange = WillChangeData::create();
</del><ins>+ auto willChange = WillChangeData::create();
</ins><span class="cx"> for (auto& item : downcast<CSSValueList>(value)) {
</span><span class="cx"> if (!is<CSSPrimitiveValue>(item.get()))
</span><span class="cx"> continue;
</span><del>-
- const auto& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
- switch (primitiveValue.getValueID()) {
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueScrollPosition:
</span><span class="cx"> willChange->addFeature(WillChangeData::Feature::ScrollPosition);
</span><span class="cx"> break;
</span><span class="lines">@@ -1770,14 +1770,11 @@
</span><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> if (primitiveValue.isPropertyID())
</span><del>- willChange->addFeature(WillChangeData::Feature::Property, primitiveValue.getPropertyID());
</del><ins>+ willChange->addFeature(WillChangeData::Feature::Property, primitiveValue.propertyID());
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> styleResolver.style()->setWillChange(WTFMove(willChange));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // StyleBuilderCustom_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleProperties.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleProperties.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/StyleProperties.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -441,8 +441,8 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(*value) || !is<CSSPrimitiveValue>(*yValue))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID xId = downcast<CSSPrimitiveValue>(*value).getValueID();
- CSSValueID yId = downcast<CSSPrimitiveValue>(*yValue).getValueID();
</del><ins>+ CSSValueID xId = downcast<CSSPrimitiveValue>(*value).valueID();
+ CSSValueID yId = downcast<CSSPrimitiveValue>(*yValue).valueID();
</ins><span class="cx"> if (xId != yId) {
</span><span class="cx"> if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) {
</span><span class="cx"> useRepeatXShorthand = true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">
</span><span class="cx"> // The value currentColor has implicitely the same side effect. It depends on the value of color,
</span><span class="cx"> // which is an inherited value, making the non-inherited property implicitly inherited.
</span><del>- if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueCurrentcolor) {
</del><ins>+ if (is<CSSPrimitiveValue>(value) && downcast<CSSPrimitiveValue>(value).valueID() == CSSValueCurrentcolor) {
</ins><span class="cx"> isCacheable = false;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -1816,7 +1816,7 @@
</span><span class="cx">
</span><span class="cx"> bool StyleResolver::colorFromPrimitiveValueIsDerivedFromElement(const CSSPrimitiveValue& value)
</span><span class="cx"> {
</span><del>- int ident = value.getValueID();
</del><ins>+ int ident = value.valueID();
</ins><span class="cx"> switch (ident) {
</span><span class="cx"> case CSSValueWebkitText:
</span><span class="cx"> case CSSValueWebkitLink:
</span><span class="lines">@@ -1834,7 +1834,7 @@
</span><span class="cx"> return value.color();
</span><span class="cx">
</span><span class="cx"> const State& state = m_state;
</span><del>- CSSValueID ident = value.getValueID();
</del><ins>+ CSSValueID ident = value.valueID();
</ins><span class="cx"> switch (ident) {
</span><span class="cx"> case 0:
</span><span class="cx"> return Color();
</span><span class="lines">@@ -1905,7 +1905,7 @@
</span><span class="cx">
</span><span class="cx"> if (is<CSSPrimitiveValue>(inValue)) {
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(inValue);
</span><del>- if (primitiveValue.getValueID() == CSSValueNone)
</del><ins>+ if (primitiveValue.valueID() == CSSValueNone)
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1929,7 +1929,7 @@
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> auto& primitiveValue = downcast<CSSPrimitiveValue>(argument);
</span><del>- String cssUrl = primitiveValue.getStringValue();
</del><ins>+ String cssUrl = primitiveValue.stringValue();
</ins><span class="cx"> URL url = m_state.document().completeURL(cssUrl);
</span><span class="cx">
</span><span class="cx"> RefPtr<ReferenceFilterOperation> operation = ReferenceFilterOperation::create(cssUrl, url.fragmentIdentifier());
</span><span class="lines">@@ -1960,7 +1960,7 @@
</span><span class="cx"> case WebKitCSSFilterValue::SaturateFilterOperation: {
</span><span class="cx"> double amount = 1;
</span><span class="cx"> if (filterValue.length() == 1) {
</span><del>- amount = firstValue->getDoubleValue();
</del><ins>+ amount = firstValue->doubleValue();
</ins><span class="cx"> if (firstValue->isPercentage())
</span><span class="cx"> amount /= 100;
</span><span class="cx"> }
</span><span class="lines">@@ -1982,7 +1982,7 @@
</span><span class="cx"> case WebKitCSSFilterValue::OpacityFilterOperation: {
</span><span class="cx"> double amount = (filterValue.operationType() == WebKitCSSFilterValue::BrightnessFilterOperation) ? 0 : 1;
</span><span class="cx"> if (filterValue.length() == 1) {
</span><del>- amount = firstValue->getDoubleValue();
</del><ins>+ amount = firstValue->doubleValue();
</ins><span class="cx"> if (firstValue->isPercentage())
</span><span class="cx"> amount /= 100;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssTransformFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/TransformFunctions.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -115,13 +115,13 @@
</span><span class="cx"> double sx = 1.0;
</span><span class="cx"> double sy = 1.0;
</span><span class="cx"> if (transformValue.operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
</span><del>- sy = firstValue.getDoubleValue();
</del><ins>+ sy = firstValue.doubleValue();
</ins><span class="cx"> else {
</span><del>- sx = firstValue.getDoubleValue();
</del><ins>+ sx = firstValue.doubleValue();
</ins><span class="cx"> if (transformValue.operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
</span><span class="cx"> if (transformValue.length() > 1) {
</span><span class="cx"> auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
</span><del>- sy = secondValue.getDoubleValue();
</del><ins>+ sy = secondValue.doubleValue();
</ins><span class="cx"> } else
</span><span class="cx"> sy = sx;
</span><span class="cx"> }
</span><span class="lines">@@ -135,19 +135,19 @@
</span><span class="cx"> double sy = 1.0;
</span><span class="cx"> double sz = 1.0;
</span><span class="cx"> if (transformValue.operationType() == WebKitCSSTransformValue::ScaleZTransformOperation)
</span><del>- sz = firstValue.getDoubleValue();
</del><ins>+ sz = firstValue.doubleValue();
</ins><span class="cx"> else if (transformValue.operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
</span><del>- sy = firstValue.getDoubleValue();
</del><ins>+ sy = firstValue.doubleValue();
</ins><span class="cx"> else {
</span><del>- sx = firstValue.getDoubleValue();
</del><ins>+ sx = firstValue.doubleValue();
</ins><span class="cx"> if (transformValue.operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
</span><span class="cx"> if (transformValue.length() > 2) {
</span><span class="cx"> auto& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
</span><del>- sz = thirdValue.getDoubleValue();
</del><ins>+ sz = thirdValue.doubleValue();
</ins><span class="cx"> }
</span><span class="cx"> if (transformValue.length() > 1) {
</span><span class="cx"> auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
</span><del>- sy = secondValue.getDoubleValue();
</del><ins>+ sy = secondValue.doubleValue();
</ins><span class="cx"> } else
</span><span class="cx"> sy = sx;
</span><span class="cx"> }
</span><span class="lines">@@ -235,9 +235,9 @@
</span><span class="cx"> auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
</span><span class="cx"> auto& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
</span><span class="cx"> auto& fourthValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3));
</span><del>- double x = firstValue.getDoubleValue();
- double y = secondValue.getDoubleValue();
- double z = thirdValue.getDoubleValue();
</del><ins>+ double x = firstValue.doubleValue();
+ double y = secondValue.doubleValue();
+ double z = thirdValue.doubleValue();
</ins><span class="cx"> double angle = fourthValue.computeDegrees();
</span><span class="cx"> operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.operationType())));
</span><span class="cx"> break;
</span><span class="lines">@@ -265,12 +265,12 @@
</span><span class="cx"> case WebKitCSSTransformValue::MatrixTransformOperation: {
</span><span class="cx"> if (transformValue.length() < 6)
</span><span class="cx"> break;
</span><del>- double a = firstValue.getDoubleValue();
- double b = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1)).getDoubleValue();
- double c = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2)).getDoubleValue();
- double d = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3)).getDoubleValue();
- double e = conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(4)).getDoubleValue();
- double f = conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(5)).getDoubleValue();
</del><ins>+ double a = firstValue.doubleValue();
+ double b = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1)).doubleValue();
+ double c = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2)).doubleValue();
+ double d = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3)).doubleValue();
+ double e = conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(4)).doubleValue();
+ double f = conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(5)).doubleValue();
</ins><span class="cx"> operations.operations().append(MatrixTransformOperation::create(a, b, c, d, e, f));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -277,22 +277,22 @@
</span><span class="cx"> case WebKitCSSTransformValue::Matrix3DTransformOperation: {
</span><span class="cx"> if (transformValue.length() < 16)
</span><span class="cx"> break;
</span><del>- TransformationMatrix matrix(downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(0)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(4)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(5)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(6)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(7)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(8)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(9)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(10)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(11)).getDoubleValue(),
- conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(12)).getDoubleValue(),
- conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(13)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(14)).getDoubleValue(),
- downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(15)).getDoubleValue());
</del><ins>+ TransformationMatrix matrix(downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(0)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(3)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(4)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(5)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(6)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(7)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(8)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(9)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(10)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(11)).doubleValue(),
+ conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(12)).doubleValue(),
+ conversionData.zoom() * downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(13)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(14)).doubleValue(),
+ downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(15)).doubleValue());
</ins><span class="cx"> operations.operations().append(Matrix3DTransformOperation::create(matrix));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx"> p = convertToFloatLength(&firstValue, conversionData);
</span><span class="cx"> else {
</span><span class="cx"> // This is a quirk that should go away when 3d transforms are finalized.
</span><del>- double val = firstValue.getDoubleValue();
</del><ins>+ double val = firstValue.doubleValue();
</ins><span class="cx"> p = val >= 0 ? Length(clampToPositiveInteger(val), Fixed) : Length(Undefined);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssViewportStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/ViewportStyleResolver.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/ViewportStyleResolver.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/ViewportStyleResolver.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -114,13 +114,13 @@
</span><span class="cx"> CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
</span><span class="cx">
</span><span class="cx"> if (primitiveValue.isNumber() || primitiveValue.isPx())
</span><del>- return primitiveValue.getFloatValue();
</del><ins>+ return primitiveValue.floatValue();
</ins><span class="cx">
</span><span class="cx"> if (primitiveValue.isFontRelativeLength())
</span><del>- return primitiveValue.getFloatValue() * m_document->documentElement()->renderStyle()->fontDescription().computedSize();
</del><ins>+ return primitiveValue.floatValue() * m_document->documentElement()->renderStyle()->fontDescription().computedSize();
</ins><span class="cx">
</span><span class="cx"> if (primitiveValue.isPercentage()) {
</span><del>- float percentValue = primitiveValue.getFloatValue() / 100.0f;
</del><ins>+ float percentValue = primitiveValue.floatValue() / 100.0f;
</ins><span class="cx"> switch (id) {
</span><span class="cx"> case CSSPropertyMaxHeight:
</span><span class="cx"> case CSSPropertyMinHeight:
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (primitiveValue.getValueID()) {
</del><ins>+ switch (primitiveValue.valueID()) {
</ins><span class="cx"> case CSSValueAuto:
</span><span class="cx"> return defaultValue;
</span><span class="cx"> case CSSValueDeviceHeight:
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -37,55 +37,57 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-WebKitCSSMatrix::WebKitCSSMatrix(const TransformationMatrix& m)
- : m_matrix(m)
</del><ins>+inline WebKitCSSMatrix::WebKitCSSMatrix(const TransformationMatrix& matrix)
+ : m_matrix(matrix)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebKitCSSMatrix::WebKitCSSMatrix(const String& s, ExceptionCode& ec)
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::create(const TransformationMatrix& matrix)
</ins><span class="cx"> {
</span><del>- setMatrixValue(s, ec);
</del><ins>+ return adoptRef(*new WebKitCSSMatrix(matrix));
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ExceptionOr<Ref<WebKitCSSMatrix>> WebKitCSSMatrix::create(const String& string)
+{
+ auto result = adoptRef(*new WebKitCSSMatrix);
+ auto setMatrixValueResult = result->setMatrixValue(string);
+ if (setMatrixValueResult.hasException())
+ return setMatrixValueResult.releaseException();
+ return WTFMove(result);
+}
+
</ins><span class="cx"> WebKitCSSMatrix::~WebKitCSSMatrix()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebKitCSSMatrix::setMatrixValue(const String& string, ExceptionCode& ec)
</del><ins>+ExceptionOr<void> WebKitCSSMatrix::setMatrixValue(const String& string)
</ins><span class="cx"> {
</span><span class="cx"> if (string.isEmpty())
</span><del>- return;
</del><ins>+ return { };
</ins><span class="cx">
</span><span class="cx"> auto styleDeclaration = MutableStyleProperties::create();
</span><del>- if (CSSParser::parseValue(styleDeclaration, CSSPropertyTransform, string, true, HTMLStandardMode, nullptr) != CSSParser::ParseResult::Error) {
- // Convert to TransformOperations. This can fail if a property
- // requires style (i.e., param uses 'ems' or 'exs')
- RefPtr<CSSValue> value = styleDeclaration->getPropertyCSSValue(CSSPropertyTransform);
</del><ins>+ if (CSSParser::parseValue(styleDeclaration, CSSPropertyTransform, string, true, HTMLStandardMode, nullptr) == CSSParser::ParseResult::Error)
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><del>- // Check for a "none" or empty transform. In these cases we can use the default identity matrix.
- if (!value || (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone))
- return;
</del><ins>+ // Convert to TransformOperations. This can fail if a property requires style (i.e., param uses 'ems' or 'exs')
+ auto value = styleDeclaration->getPropertyCSSValue(CSSPropertyTransform);
</ins><span class="cx">
</span><del>- TransformOperations operations;
- if (!transformsForValue(*value, CSSToLengthConversionData(), operations)) {
- ec = SYNTAX_ERR;
- return;
- }
</del><ins>+ // Check for a "none" or empty transform. In these cases we can use the default identity matrix.
+ if (!value || (is<CSSPrimitiveValue>(*value) && downcast<CSSPrimitiveValue>(*value).valueID() == CSSValueNone))
+ return { };
</ins><span class="cx">
</span><del>- // Convert transform operations to a TransformationMatrix. This can fail
- // if a param has a percentage ('%')
- TransformationMatrix t;
- for (unsigned i = 0; i < operations.operations().size(); ++i) {
- if (operations.operations()[i].get()->apply(t, IntSize(0, 0))) {
- ec = SYNTAX_ERR;
- return;
- }
- }
</del><ins>+ TransformOperations operations;
+ if (!transformsForValue(*value, CSSToLengthConversionData(), operations))
+ return Exception { SYNTAX_ERR };
</ins><span class="cx">
</span><del>- // set the matrix
- m_matrix = t;
- } else // There is something there but parsing failed.
- ec = SYNTAX_ERR;
</del><ins>+ // Convert transform operations to a TransformationMatrix. This can fail if a parameter has a percentage ('%').
+ TransformationMatrix matrix;
+ for (auto& operation : operations.operations()) {
+ if (operation->apply(matrix, IntSize(0, 0)))
+ return Exception { SYNTAX_ERR };
+ }
+ m_matrix = matrix;
+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Perform a concatenation of the matrices (this * secondMatrix)
</span><span class="lines">@@ -94,21 +96,20 @@
</span><span class="cx"> if (!secondMatrix)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.multiply(secondMatrix->m_matrix);
</span><del>- return matrix;
</del><ins>+ return WTFMove(matrix);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::inverse(ExceptionCode& ec) const
</del><ins>+ExceptionOr<Ref<WebKitCSSMatrix>> WebKitCSSMatrix::inverse() const
</ins><span class="cx"> {
</span><del>- if (auto inverse = m_matrix.inverse())
- return WebKitCSSMatrix::create(inverse.value());
-
- ec = NOT_SUPPORTED_ERR;
- return nullptr;
</del><ins>+ auto inverse = m_matrix.inverse();
+ if (!inverse)
+ return Exception { NOT_SUPPORTED_ERR };
+ return create(inverse.value());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::translate(double x, double y, double z) const
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::translate(double x, double y, double z) const
</ins><span class="cx"> {
</span><span class="cx"> if (std::isnan(x))
</span><span class="cx"> x = 0;
</span><span class="lines">@@ -117,12 +118,12 @@
</span><span class="cx"> if (std::isnan(z))
</span><span class="cx"> z = 0;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.translate3d(x, y, z);
</span><span class="cx"> return matrix;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::scale(double scaleX, double scaleY, double scaleZ) const
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::scale(double scaleX, double scaleY, double scaleZ) const
</ins><span class="cx"> {
</span><span class="cx"> if (std::isnan(scaleX))
</span><span class="cx"> scaleX = 1;
</span><span class="lines">@@ -131,12 +132,12 @@
</span><span class="cx"> if (std::isnan(scaleZ))
</span><span class="cx"> scaleZ = 1;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.scale3d(scaleX, scaleY, scaleZ);
</span><span class="cx"> return matrix;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotate(double rotX, double rotY, double rotZ) const
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::rotate(double rotX, double rotY, double rotZ) const
</ins><span class="cx"> {
</span><span class="cx"> if (std::isnan(rotX))
</span><span class="cx"> rotX = 0;
</span><span class="lines">@@ -152,12 +153,12 @@
</span><span class="cx"> if (std::isnan(rotZ))
</span><span class="cx"> rotZ = 0;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.rotate3d(rotX, rotY, rotZ);
</span><span class="cx"> return matrix;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::rotateAxisAngle(double x, double y, double z, double angle) const
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::rotateAxisAngle(double x, double y, double z, double angle) const
</ins><span class="cx"> {
</span><span class="cx"> if (std::isnan(x))
</span><span class="cx"> x = 0;
</span><span class="lines">@@ -170,27 +171,27 @@
</span><span class="cx"> if (x == 0 && y == 0 && z == 0)
</span><span class="cx"> z = 1;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.rotate3d(x, y, z, angle);
</span><span class="cx"> return matrix;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::skewX(double angle) const
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::skewX(double angle) const
</ins><span class="cx"> {
</span><span class="cx"> if (std::isnan(angle))
</span><span class="cx"> angle = 0;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.skewX(angle);
</span><span class="cx"> return matrix;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<WebKitCSSMatrix> WebKitCSSMatrix::skewY(double angle) const
</del><ins>+Ref<WebKitCSSMatrix> WebKitCSSMatrix::skewY(double angle) const
</ins><span class="cx"> {
</span><span class="cx"> if (std::isnan(angle))
</span><span class="cx"> angle = 0;
</span><span class="cx">
</span><del>- RefPtr<WebKitCSSMatrix> matrix = WebKitCSSMatrix::create(m_matrix);
</del><ins>+ auto matrix = create(m_matrix);
</ins><span class="cx"> matrix->m_matrix.skewY(angle);
</span><span class="cx"> return matrix;
</span><span class="cx"> }
</span><span class="lines">@@ -199,13 +200,12 @@
</span><span class="cx"> {
</span><span class="cx"> // FIXME - Need to ensure valid CSS floating point values (https://bugs.webkit.org/show_bug.cgi?id=20674)
</span><span class="cx"> if (m_matrix.isAffine())
</span><del>- return String::format("matrix(%f, %f, %f, %f, %f, %f)",
- m_matrix.a(), m_matrix.b(), m_matrix.c(), m_matrix.d(), m_matrix.e(), m_matrix.f());
</del><ins>+ return String::format("matrix(%f, %f, %f, %f, %f, %f)", m_matrix.a(), m_matrix.b(), m_matrix.c(), m_matrix.d(), m_matrix.e(), m_matrix.f());
</ins><span class="cx"> return String::format("matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f)",
</span><del>- m_matrix.m11(), m_matrix.m12(), m_matrix.m13(), m_matrix.m14(),
- m_matrix.m21(), m_matrix.m22(), m_matrix.m23(), m_matrix.m24(),
- m_matrix.m31(), m_matrix.m32(), m_matrix.m33(), m_matrix.m34(),
- m_matrix.m41(), m_matrix.m42(), m_matrix.m43(), m_matrix.m44());
</del><ins>+ m_matrix.m11(), m_matrix.m12(), m_matrix.m13(), m_matrix.m14(),
+ m_matrix.m21(), m_matrix.m22(), m_matrix.m23(), m_matrix.m24(),
+ m_matrix.m31(), m_matrix.m32(), m_matrix.m33(), m_matrix.m34(),
+ m_matrix.m41(), m_matrix.m42(), m_matrix.m43(), m_matrix.m44());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -23,29 +23,18 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef WebKitCSSMatrix_h
-#define WebKitCSSMatrix_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><ins>+#include "ExceptionOr.h"
</ins><span class="cx"> #include "ScriptWrappable.h"
</span><span class="cx"> #include "TransformationMatrix.h"
</span><del>-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/WTFString.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-typedef int ExceptionCode;
-
</del><span class="cx"> class WebKitCSSMatrix final : public ScriptWrappable, public RefCounted<WebKitCSSMatrix> {
</span><span class="cx"> public:
</span><del>- static Ref<WebKitCSSMatrix> create(const TransformationMatrix& m)
- {
- return adoptRef(*new WebKitCSSMatrix(m));
- }
- static Ref<WebKitCSSMatrix> create(const String& s, ExceptionCode& ec)
- {
- return adoptRef(*new WebKitCSSMatrix(s, ec));
- }
</del><ins>+ static Ref<WebKitCSSMatrix> create(const TransformationMatrix&);
+ static ExceptionOr<Ref<WebKitCSSMatrix>> create(const String&);
</ins><span class="cx">
</span><span class="cx"> ~WebKitCSSMatrix();
</span><span class="cx">
</span><span class="lines">@@ -97,7 +86,7 @@
</span><span class="cx"> void setM43(double f) { m_matrix.setM43(f); }
</span><span class="cx"> void setM44(double f) { m_matrix.setM44(f); }
</span><span class="cx">
</span><del>- void setMatrixValue(const String&, ExceptionCode&);
</del><ins>+ ExceptionOr<void> setMatrixValue(const String&);
</ins><span class="cx">
</span><span class="cx"> // The following math function return a new matrix with the
</span><span class="cx"> // specified operation applied. The this value is not modified.
</span><span class="lines">@@ -106,13 +95,13 @@
</span><span class="cx"> RefPtr<WebKitCSSMatrix> multiply(WebKitCSSMatrix* secondMatrix) const;
</span><span class="cx">
</span><span class="cx"> // Return the inverse of this matrix. Throw an exception if the matrix is not invertible
</span><del>- RefPtr<WebKitCSSMatrix> inverse(ExceptionCode&) const;
</del><ins>+ ExceptionOr<Ref<WebKitCSSMatrix>> inverse() const;
</ins><span class="cx">
</span><span class="cx"> // Return this matrix translated by the passed values.
</span><span class="cx"> // Passing a NaN will use a value of 0. This allows the 3D form to used for 2D operations
</span><span class="cx"> // Operation is performed as though the this matrix is multiplied by a matrix with
</span><span class="cx"> // the translation values on the left (result = translation(x,y,z) * this)
</span><del>- RefPtr<WebKitCSSMatrix> translate(double x, double y, double z) const;
</del><ins>+ Ref<WebKitCSSMatrix> translate(double x, double y, double z) const;
</ins><span class="cx">
</span><span class="cx"> // Returns this matrix scaled by the passed values.
</span><span class="cx"> // Passing scaleX or scaleZ as NaN uses a value of 1, but passing scaleY of NaN
</span><span class="lines">@@ -119,7 +108,7 @@
</span><span class="cx"> // makes it the same as scaleX. This allows the 3D form to used for 2D operations
</span><span class="cx"> // Operation is performed as though the this matrix is multiplied by a matrix with
</span><span class="cx"> // the scale values on the left (result = scale(x,y,z) * this)
</span><del>- RefPtr<WebKitCSSMatrix> scale(double scaleX, double scaleY, double scaleZ) const;
</del><ins>+ Ref<WebKitCSSMatrix> scale(double scaleX, double scaleY, double scaleZ) const;
</ins><span class="cx">
</span><span class="cx"> // Returns this matrix rotated by the passed values.
</span><span class="cx"> // If rotY and rotZ are NaN, rotate about Z (rotX=0, rotateY=0, rotateZ=rotX).
</span><span class="lines">@@ -126,37 +115,35 @@
</span><span class="cx"> // Otherwise use a rotation value of 0 for any passed NaN.
</span><span class="cx"> // Operation is performed as though the this matrix is multiplied by a matrix with
</span><span class="cx"> // the rotation values on the left (result = rotation(x,y,z) * this)
</span><del>- RefPtr<WebKitCSSMatrix> rotate(double rotX, double rotY, double rotZ) const;
</del><ins>+ Ref<WebKitCSSMatrix> rotate(double rotX, double rotY, double rotZ) const;
</ins><span class="cx">
</span><span class="cx"> // Returns this matrix rotated about the passed axis by the passed angle.
</span><span class="cx"> // Passing a NaN will use a value of 0. If the axis is (0,0,0) use a value
</span><span class="cx"> // Operation is performed as though the this matrix is multiplied by a matrix with
</span><span class="cx"> // the rotation values on the left (result = rotation(x,y,z,angle) * this)
</span><del>- RefPtr<WebKitCSSMatrix> rotateAxisAngle(double x, double y, double z, double angle) const;
</del><ins>+ Ref<WebKitCSSMatrix> rotateAxisAngle(double x, double y, double z, double angle) const;
</ins><span class="cx">
</span><span class="cx"> // Return this matrix skewed along the X axis by the passed values.
</span><span class="cx"> // Passing a NaN will use a value of 0.
</span><span class="cx"> // Operation is performed as though the this matrix is multiplied by a matrix with
</span><span class="cx"> // the skew values on the left (result = skewX(angle) * this)
</span><del>- RefPtr<WebKitCSSMatrix> skewX(double angle) const;
</del><ins>+ Ref<WebKitCSSMatrix> skewX(double angle) const;
</ins><span class="cx">
</span><span class="cx"> // Return this matrix skewed along the Y axis by the passed values.
</span><span class="cx"> // Passing a NaN will use a value of 0.
</span><span class="cx"> // Operation is performed as though the this matrix is multiplied by a matrix with
</span><span class="cx"> // the skew values on the left (result = skewY(angle) * this)
</span><del>- RefPtr<WebKitCSSMatrix> skewY(double angle) const;
</del><ins>+ Ref<WebKitCSSMatrix> skewY(double angle) const;
</ins><span class="cx">
</span><span class="cx"> const TransformationMatrix& transform() const { return m_matrix; }
</span><span class="cx">
</span><span class="cx"> String toString() const;
</span><span class="cx">
</span><del>-protected:
</del><ins>+private:
+ WebKitCSSMatrix() = default;
</ins><span class="cx"> WebKitCSSMatrix(const TransformationMatrix&);
</span><del>- WebKitCSSMatrix(const String&, ExceptionCode&);
</del><span class="cx">
</span><span class="cx"> TransformationMatrix m_matrix;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // WebKitCSSMatrix_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSMatrixidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.idl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSMatrix.idl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.idl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -23,10 +23,9 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-// Introduced in DOM Level ?:
</del><span class="cx"> [
</span><span class="cx"> Constructor(optional DOMString cssValue),
</span><del>- ConstructorMayThrowLegacyException,
</del><ins>+ ConstructorMayThrowException,
</ins><span class="cx"> ImplementationLacksVTable,
</span><span class="cx"> ] interface WebKitCSSMatrix {
</span><span class="cx">
</span><span class="lines">@@ -57,13 +56,13 @@
</span><span class="cx"> attribute unrestricted double m44;
</span><span class="cx">
</span><span class="cx"> // FIXME: Using "undefined" as default parameter value is wrong.
</span><del>- [MayThrowLegacyException] void setMatrixValue(optional DOMString string = "undefined");
</del><ins>+ [MayThrowException] void setMatrixValue(optional DOMString string = "undefined");
</ins><span class="cx">
</span><span class="cx"> // Multiply this matrix by secondMatrix, on the right (result = this * secondMatrix)
</span><span class="cx"> [Immutable] WebKitCSSMatrix multiply(optional WebKitCSSMatrix? secondMatrix = null);
</span><span class="cx">
</span><span class="cx"> // Return the inverse of this matrix. Throw an exception if the matrix is not invertible
</span><del>- [Immutable, MayThrowLegacyException] WebKitCSSMatrix inverse();
</del><ins>+ [Immutable, MayThrowException] WebKitCSSMatrix inverse();
</ins><span class="cx">
</span><span class="cx"> // Return this matrix translated by the passed values.
</span><span class="cx"> // Passing a NaN will use a value of 0. This allows the 3D form to used for 2D operations
</span><span class="lines">@@ -103,4 +102,3 @@
</span><span class="cx">
</span><span class="cx"> [NotEnumerable] DOMString toString();
</span><span class="cx"> };
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCorecssmakeproppl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeprop.pl (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeprop.pl        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/makeprop.pl        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -518,7 +518,7 @@
</span><span class="cx"> my $primitiveValue = shift;
</span><span class="cx"> my $indent = shift;
</span><span class="cx">
</span><del>- my $code = $indent . "if (" . $primitiveValue . ".getValueID() == CSSValueCurrentcolor) {\n";
</del><ins>+ my $code = $indent . "if (" . $primitiveValue . ".valueID() == CSSValueCurrentcolor) {\n";
</ins><span class="cx"> $code .= $indent . " applyInherit" . $nameToId{$name} . "(styleResolver);\n";
</span><span class="cx"> $code .= $indent . " return;\n";
</span><span class="cx"> $code .= $indent . "}\n";
</span><span class="lines">@@ -794,7 +794,7 @@
</span><span class="cx"> my $style = "styleResolver.style()";
</span><span class="cx"> my $didCallSetValue = 0;
</span><span class="cx"> if (exists $propertiesWithStyleBuilderOptions{$name}{"AutoFunctions"}) {
</span><del>- $setterContent .= $indent . " if (downcast<CSSPrimitiveValue>(value).getValueID() == CSSValueAuto) {\n";
</del><ins>+ $setterContent .= $indent . " if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) {\n";
</ins><span class="cx"> $setterContent .= $indent . " ". getAutoSetter($name, $style) . ";\n";
</span><span class="cx"> $setterContent .= $indent . " return;\n";
</span><span class="cx"> $setterContent .= $indent . " }\n";
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -4245,7 +4245,7 @@
</span><span class="cx"> {
</span><span class="cx"> // [ left | right ] [ <percentage] | <length> ] && [ top | bottom ] [ <percentage> | <length> ]
</span><span class="cx"> // In the case of 4 values <position> requires the second value to be a length or a percentage.
</span><del>- if (isFillPositionKeyword(parsedValue2->getValueID()))
</del><ins>+ if (isFillPositionKeyword(parsedValue2->valueID()))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> unsigned cumulativeFlags = 0;
</span><span class="lines">@@ -4254,8 +4254,8 @@
</span><span class="cx"> if (!value3)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CSSValueID ident1 = parsedValue1->getValueID();
- CSSValueID ident3 = value3->getValueID();
</del><ins>+ CSSValueID ident1 = parsedValue1->valueID();
+ CSSValueID ident3 = value3->valueID();
</ins><span class="cx">
</span><span class="cx"> if (ident1 == CSSValueCenter)
</span><span class="cx"> return;
</span><span class="lines">@@ -4278,7 +4278,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // 4th value must be a length or a percentage.
</span><del>- if (isFillPositionKeyword(value4->getValueID()))
</del><ins>+ if (isFillPositionKeyword(value4->valueID()))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> value1 = createPrimitiveValuePair(WTFMove(parsedValue1), WTFMove(parsedValue2));
</span><span class="lines">@@ -4303,9 +4303,9 @@
</span><span class="cx"> valueList.next();
</span><span class="cx">
</span><span class="cx"> bool swapNeeded = false;
</span><del>- CSSValueID ident1 = parsedValue1->getValueID();
- CSSValueID ident2 = parsedValue2->getValueID();
- CSSValueID ident3 = value3->getValueID();
</del><ins>+ CSSValueID ident1 = parsedValue1->valueID();
+ CSSValueID ident2 = parsedValue2->valueID();
+ CSSValueID ident3 = value3->valueID();
</ins><span class="cx">
</span><span class="cx"> CSSValueID firstPositionKeyword;
</span><span class="cx"> CSSValueID secondPositionKeyword;
</span><span class="lines">@@ -4375,8 +4375,8 @@
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> CSSPrimitiveValue& first = *value1;
</span><span class="cx"> CSSPrimitiveValue& second = *value2;
</span><del>- ident1 = first.getPairValue()->first()->getValueID();
- ident2 = second.getPairValue()->first()->getValueID();
</del><ins>+ ident1 = first.pairValue()->first()->valueID();
+ ident2 = second.pairValue()->first()->valueID();
</ins><span class="cx"> ASSERT(ident1 == CSSValueLeft || ident1 == CSSValueRight);
</span><span class="cx"> ASSERT(ident2 == CSSValueBottom || ident2 == CSSValueTop);
</span><span class="cx"> #endif
</span><span class="lines">@@ -4441,7 +4441,7 @@
</span><span class="cx"> auto parsedValue2 = value2.releaseNonNull();
</span><span class="cx">
</span><span class="cx"> // Per CSS3 syntax, <position> can't have 'center' as its second keyword as we have more arguments to follow.
</span><del>- if (parsedValue2->getValueID() == CSSValueCenter)
</del><ins>+ if (parsedValue2->valueID() == CSSValueCenter)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (numberOfValues == 3)
</span><span class="lines">@@ -4532,7 +4532,7 @@
</span><span class="cx">
</span><span class="cx"> // If only one value was specified, value2 is the same as value1.
</span><span class="cx"> m_implicitShorthand = true;
</span><del>- value2 = CSSValuePool::singleton().createIdentifierValue(downcast<CSSPrimitiveValue>(*value1).getValueID());
</del><ins>+ value2 = CSSValuePool::singleton().createIdentifierValue(downcast<CSSPrimitiveValue>(*value1).valueID());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSPrimitiveValue> CSSParser::parseFillSize(CSSPropertyID propId, bool& allowComma)
</span><span class="lines">@@ -5274,12 +5274,12 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> // Negative numbers are not allowed for span (but are for <integer>).
</span><del>- if (hasSeenSpanKeyword && numericValue && numericValue->getIntValue() < 0)
</del><ins>+ if (hasSeenSpanKeyword && numericValue && numericValue->intValue() < 0)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> // For the <custom-ident> case.
</span><span class="cx"> if (gridLineName && !numericValue && !hasSeenSpanKeyword)
</span><del>- return CSSValuePool::singleton().createValue(gridLineName->getStringValue(), CSSPrimitiveValue::CSS_STRING);
</del><ins>+ return CSSValuePool::singleton().createValue(gridLineName->stringValue(), CSSPrimitiveValue::CSS_STRING);
</ins><span class="cx">
</span><span class="cx"> auto values = CSSValueList::createSpaceSeparated();
</span><span class="cx"> if (hasSeenSpanKeyword)
</span><span class="lines">@@ -5437,7 +5437,7 @@
</span><span class="cx"> if (!templateColumns)
</span><span class="cx"> return false;
</span><span class="cx"> // The template-columns <track-list> can't be 'none'.
</span><del>- if (templateColumns->isPrimitiveValue() && downcast<CSSPrimitiveValue>(*templateColumns).getValueID() == CSSValueNone)
</del><ins>+ if (templateColumns->isPrimitiveValue() && downcast<CSSPrimitiveValue>(*templateColumns).valueID() == CSSValueNone)
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5701,7 +5701,7 @@
</span><span class="cx">
</span><span class="cx"> static bool isGridTrackFixedSized(const CSSPrimitiveValue& value)
</span><span class="cx"> {
</span><del>- CSSValueID valueID = value.getValueID();
</del><ins>+ CSSValueID valueID = value.valueID();
</ins><span class="cx"> if (valueID == CSSValueWebkitMinContent || valueID == CSSValueWebkitMaxContent || valueID == CSSValueAuto || value.isFlex())
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -9178,10 +9178,10 @@
</span><span class="cx"> if (sizeValue && horizontalSize)
</span><span class="cx"> return false;
</span><span class="cx"> // Circles must have 0 or 1 lengths.
</span><del>- if (shapeValue && shapeValue->getValueID() == CSSValueCircle && verticalSize)
</del><ins>+ if (shapeValue && shapeValue->valueID() == CSSValueCircle && verticalSize)
</ins><span class="cx"> return false;
</span><span class="cx"> // Ellipses must have 0 or 2 length/percentages.
</span><del>- if (shapeValue && shapeValue->getValueID() == CSSValueEllipse && horizontalSize && !verticalSize)
</del><ins>+ if (shapeValue && shapeValue->valueID() == CSSValueEllipse && horizontalSize && !verticalSize)
</ins><span class="cx"> return false;
</span><span class="cx"> // If there's only one size, it must be a length.
</span><span class="cx"> if (!verticalSize && horizontalSize && horizontalSize->isPercentage())
</span><span class="lines">@@ -9957,7 +9957,7 @@
</span><span class="cx"> if (filterType != WebKitCSSFilterValue::SaturateFilterOperation
</span><span class="cx"> && filterType != WebKitCSSFilterValue::ContrastFilterOperation) {
</span><span class="cx"> double maxAllowed = primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE ? 100.0 : 1.0;
</span><del>- if (primitiveValue->getDoubleValue() > maxAllowed)
</del><ins>+ if (primitiveValue->doubleValue() > maxAllowed)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserValues.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserValues.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/parser/CSSParserValues.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -94,11 +94,8 @@
</span><span class="cx"> if (id)
</span><span class="cx"> return CSSPrimitiveValue::createIdentifier(id);
</span><span class="cx">
</span><del>- if (unit == CSSParserValue::Operator) {
- auto primitiveValue = CSSPrimitiveValue::createParserOperator(iValue);
- primitiveValue->setPrimitiveType(CSSPrimitiveValue::CSS_PARSER_OPERATOR);
- return WTFMove(primitiveValue);
- }
</del><ins>+ if (unit == CSSParserValue::Operator)
+ return CSSPrimitiveValue::createParserOperator(iValue);
</ins><span class="cx"> if (unit == CSSParserValue::Function)
</span><span class="cx"> return CSSFunctionValue::create(function);
</span><span class="cx"> if (unit == CSSParserValue::Variable)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -883,7 +883,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> int i = defaultValue;
</span><span class="cx"> if (CSSPrimitiveValue* counterValue = consumeInteger(range))
</span><del>- i = clampTo<int>(counterValue->getDoubleValue());
</del><ins>+ i = counterValue->intValue());
</ins><span class="cx"> list->append(*CSSValuePair::create(counterName,
</span><span class="cx"> CSSPrimitiveValue::create(i, CSSPrimitiveValue::UnitType::Integer),
</span><span class="cx"> CSSValuePair::DropIdenticalValues));
</span><span class="lines">@@ -936,7 +936,7 @@
</span><span class="cx"> list->append(*unit);
</span><span class="cx">
</span><span class="cx"> if (CSSPrimitiveValue* position = consumePositiveInteger(range)) {
</span><del>- if (position->getIntValue() > 100)
</del><ins>+ if (position->intValue() > 100)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> list->append(*position);
</span><span class="cx"> }
</span><span class="lines">@@ -1131,7 +1131,7 @@
</span><span class="cx"> // Always parse lengths in strict mode here, since it would be ambiguous otherwise when used in
</span><span class="cx"> // the 'columns' shorthand property.
</span><span class="cx"> CSSPrimitiveValue* columnWidth = consumeLength(range, HTMLStandardMode, ValueRangeNonNegative);
</span><del>- if (!columnWidth || (!columnWidth->isCalculated() && columnWidth->getDoubleValue() == 0))
</del><ins>+ if (!columnWidth || (!columnWidth->isCalculated() && columnWidth->doubleValue() == 0))
</ins><span class="cx"> return nullptr;
</span><span class="cx"> return columnWidth;
</span><span class="cx"> }
</span><span class="lines">@@ -1168,8 +1168,8 @@
</span><span class="cx"> }
</span><span class="cx"> if (zoom && context.useCounter()
</span><span class="cx"> && !(token.id() == CSSValueNormal
</span><del>- || (token.type() == NumberToken && zoom->getDoubleValue() == 1)
- || (token.type() == PercentageToken && zoom->getDoubleValue() == 100)))
</del><ins>+ || (token.type() == NumberToken && zoom->doubleValue() == 1)
+ || (token.type() == PercentageToken && zoom->doubleValue() == 100)))
</ins><span class="cx"> context.useCounter()->count(UseCounter::CSSZoomNotEqualToOne);
</span><span class="cx"> return zoom;
</span><span class="cx"> }
</span><span class="lines">@@ -1249,7 +1249,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> range = rangeCopy;
</span><del>- return CSSStepsTimingFunctionValue::create(steps->getIntValue(), position);
</del><ins>+ return CSSStepsTimingFunctionValue::create(steps->intValue(), position);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static CSSValue* consumeCubicBezier(CSSParserTokenRange& range)
</span><span class="lines">@@ -1328,7 +1328,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> for (auto& value : valueList) {
</span><span class="cx"> if (value->isPrimitiveValue() && toCSSPrimitiveValue(*value).isValueID()
</span><del>- && toCSSPrimitiveValue(*value).getValueID() == CSSValueNone)
</del><ins>+ && toCSSPrimitiveValue(*value).valueID() == CSSValueNone)
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="lines">@@ -1428,7 +1428,7 @@
</span><span class="cx"> CSSPrimitiveValue* spreadDistance = nullptr;
</span><span class="cx"> if (blurRadius) {
</span><span class="cx"> // Blur radius must be non-negative.
</span><del>- if (blurRadius->getDoubleValue() < 0)
</del><ins>+ if (blurRadius->doubleValue() < 0)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> if (allowSpread)
</span><span class="cx"> spreadDistance = consumeLength(range, cssParserMode, ValueRangeAll);
</span><span class="lines">@@ -1496,7 +1496,7 @@
</span><span class="cx"> if (parsedValue && filterType != CSSValueSaturate && filterType != CSSValueContrast) {
</span><span class="cx"> bool isPercentage = toCSSPrimitiveValue(parsedValue)->isPercentage();
</span><span class="cx"> double maxAllowed = isPercentage ? 100.0 : 1.0;
</span><del>- if (toCSSPrimitiveValue(parsedValue)->getDoubleValue() > maxAllowed) {
</del><ins>+ if (toCSSPrimitiveValue(parsedValue)->doubleValue() > maxAllowed) {
</ins><span class="cx"> parsedValue = CSSPrimitiveValue::create(
</span><span class="cx"> maxAllowed,
</span><span class="cx"> isPercentage ? CSSPrimitiveValue::UnitType::Percentage : CSSPrimitiveValue::UnitType::Number);
</span><span class="lines">@@ -2121,7 +2121,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> parsedValue = CSSPrimitiveValue::create(perspective, CSSPrimitiveValue::UnitType::Pixels);
</span><span class="cx"> }
</span><del>- if (parsedValue && (parsedValue->isCalculated() || parsedValue->getDoubleValue() > 0))
</del><ins>+ if (parsedValue && (parsedValue->isCalculated() || parsedValue->doubleValue() > 0))
</ins><span class="cx"> return parsedValue;
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -2152,7 +2152,7 @@
</span><span class="cx"> if (range.peek().functionId() == CSSValueRepeat) {
</span><span class="cx"> CSSParserTokenRange args = consumeFunction(range);
</span><span class="cx"> CSSPrimitiveValue* parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeNonNegative);
</span><del>- if (args.atEnd() && parsedValue && (parsedValue->isCalculated() || parsedValue->getDoubleValue() > 0)) {
</del><ins>+ if (args.atEnd() && parsedValue && (parsedValue->isCalculated() || parsedValue->doubleValue() > 0)) {
</ins><span class="cx"> CSSFunctionValue* result = CSSFunctionValue::create(CSSValueRepeat);
</span><span class="cx"> result->append(*parsedValue);
</span><span class="cx"> return result;
</span><span class="lines">@@ -2592,7 +2592,7 @@
</span><span class="cx"> return consumeIdent(range);
</span><span class="cx"> if (range.peek().type() != NumberToken) {
</span><span class="cx"> CSSPrimitiveValue* angle = consumeAngle(range);
</span><del>- if (angle && angle->getDoubleValue() == 0)
</del><ins>+ if (angle && angle->doubleValue() == 0)
</ins><span class="cx"> return angle;
</span><span class="cx"> }
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -2847,9 +2847,9 @@
</span><span class="cx">
</span><span class="cx"> if (spanValue && !numericValue && !gridLineName)
</span><span class="cx"> return nullptr; // "span" keyword alone is invalid.
</span><del>- if (spanValue && numericValue && numericValue->getIntValue() < 0)
</del><ins>+ if (spanValue && numericValue && numericValue->intValue() < 0)
</ins><span class="cx"> return nullptr; // Negative numbers are not allowed for span.
</span><del>- if (numericValue && numericValue->getIntValue() == 0)
</del><ins>+ if (numericValue && numericValue->intValue() == 0)
</ins><span class="cx"> return nullptr; // An <integer> value of zero makes the declaration invalid.
</span><span class="cx">
</span><span class="cx"> CSSValueList* values = CSSValueList::createSpaceSeparated();
</span><span class="lines">@@ -2865,7 +2865,7 @@
</span><span class="cx">
</span><span class="cx"> static bool isGridTrackFixedSized(const CSSPrimitiveValue& primitiveValue)
</span><span class="cx"> {
</span><del>- CSSValueID valueID = primitiveValue.getValueID();
</del><ins>+ CSSValueID valueID = primitiveValue.valueID();
</ins><span class="cx"> if (valueID == CSSValueMinContent || valueID == CSSValueMaxContent || valueID == CSSValueAuto || primitiveValue.isFlex())
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -3053,7 +3053,7 @@
</span><span class="cx"> CSSPrimitiveValue* repetition = consumePositiveInteger(args);
</span><span class="cx"> if (!repetition)
</span><span class="cx"> return false;
</span><del>- repetitions = clampTo<size_t>(repetition->getDoubleValue(), 0, kGridMaxTracks);
</del><ins>+ repetitions = clampTo<size_t>(repetition->doubleValue(), 0, kGridMaxTracks);
</ins><span class="cx"> repeatedValues = CSSValueList::createSpaceSeparated();
</span><span class="cx"> }
</span><span class="cx"> if (!consumeCommaIncludingWhitespace(args))
</span><span class="lines">@@ -4242,7 +4242,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!m_range.atEnd())
</span><span class="cx"> return false;
</span><del>- CSSValueID value = keyword->getValueID();
</del><ins>+ CSSValueID value = keyword->valueID();
</ins><span class="cx"> switch (property) {
</span><span class="cx"> case CSSPropertyPageBreakAfter:
</span><span class="cx"> case CSSPropertyPageBreakBefore:
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParserHelperscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx">
</span><span class="cx"> static int clampRGBComponent(const CSSPrimitiveValue& value)
</span><span class="cx"> {
</span><del>- double result = value.getDoubleValue();
</del><ins>+ double result = value.doubleValue();
</ins><span class="cx"> // FIXME: Multiply by 2.55 and round instead of floor.
</span><span class="cx"> if (value.isPercentage())
</span><span class="cx"> result *= 2.56;
</span><span class="lines">@@ -430,7 +430,7 @@
</span><span class="cx"> if (!hslValue)
</span><span class="cx"> return false;
</span><span class="cx"> double colorArray[3];
</span><del>- colorArray[0] = (((hslValue->getIntValue() % 360) + 360) % 360) / 360.0;
</del><ins>+ colorArray[0] = (((hslValue->intValue() % 360) + 360) % 360) / 360.0;
</ins><span class="cx"> for (int i = 1; i < 3; i++) {
</span><span class="cx"> if (!consumeCommaIncludingWhitespace(args))
</span><span class="cx"> return false;
</span><span class="lines">@@ -437,7 +437,7 @@
</span><span class="cx"> hslValue = consumePercent(args, ValueRangeAll);
</span><span class="cx"> if (!hslValue)
</span><span class="cx"> return false;
</span><del>- double doubleValue = hslValue->getDoubleValue();
</del><ins>+ double doubleValue = hslValue->doubleValue();
</ins><span class="cx"> colorArray[i] = clampTo<double>(doubleValue, 0.0, 100.0) / 100.0; // Needs to be value between 0 and 1.0.
</span><span class="cx"> }
</span><span class="cx"> double alpha = 1.0;
</span><span class="lines">@@ -521,12 +521,12 @@
</span><span class="cx">
</span><span class="cx"> static bool isHorizontalPositionKeywordOnly(const CSSPrimitiveValue& value)
</span><span class="cx"> {
</span><del>- return value.isValueID() && (value.getValueID() == CSSValueLeft || value.getValueID() == CSSValueRight);
</del><ins>+ return value.isValueID() && (value.valueID() == CSSValueLeft || value.valueID() == CSSValueRight);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool isVerticalPositionKeywordOnly(const CSSPrimitiveValue& value)
</span><span class="cx"> {
</span><del>- return value.isValueID() && (value.getValueID() == CSSValueTop || value.getValueID() == CSSValueBottom);
</del><ins>+ return value.isValueID() && (value.valueID() == CSSValueTop || value.valueID() == CSSValueBottom);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void positionFromOneValue(CSSPrimitiveValue& value, RefPtr<CSSPrimitiveValue>& resultX, RefPtr<CSSPrimitiveValue>& resultY)
</span><span class="lines">@@ -567,7 +567,7 @@
</span><span class="cx"> CSSPrimitiveValue* currentValue = values[i];
</span><span class="cx"> if (!currentValue->isValueID())
</span><span class="cx"> return false;
</span><del>- CSSValueID id = currentValue->getValueID();
</del><ins>+ CSSValueID id = currentValue->valueID();
</ins><span class="cx">
</span><span class="cx"> if (id == CSSValueCenter) {
</span><span class="cx"> if (center)
</span><span class="lines">@@ -889,10 +889,10 @@
</span><span class="cx"> if (sizeKeyword && horizontalSize)
</span><span class="cx"> return nullptr;
</span><span class="cx"> // Circles must have 0 or 1 lengths.
</span><del>- if (shape && shape->getValueID() == CSSValueCircle && verticalSize)
</del><ins>+ if (shape && shape->valueID() == CSSValueCircle && verticalSize)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> // Ellipses must have 0 or 2 length/percentages.
</span><del>- if (shape && shape->getValueID() == CSSValueEllipse && horizontalSize && !verticalSize)
</del><ins>+ if (shape && shape->valueID() == CSSValueEllipse && horizontalSize && !verticalSize)
</ins><span class="cx"> return nullptr;
</span><span class="cx"> // If there's only one size, it must be a length.
</span><span class="cx"> if (!verticalSize && horizontalSize && horizontalSize->isPercentage())
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/dom/Range.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "Comment.h"
</span><span class="cx"> #include "DocumentFragment.h"
</span><span class="cx"> #include "Event.h"
</span><ins>+#include "ExceptionCode.h"
</ins><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "HTMLBodyElement.h"
</span></span></pre></div>
<a id="trunkSourceWebCoredomSelectorQuerycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SelectorQuery.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SelectorQuery.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/dom/SelectorQuery.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "CSSParser.h"
</span><span class="cx"> #include "ElementDescendantIterator.h"
</span><ins>+#include "ExceptionCode.h"
</ins><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "SelectorChecker.h"
</span><span class="cx"> #include "StaticNodeList.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">
</span><span class="cx"> static int toIdentifier(PassRefPtr<CSSValue> value)
</span><span class="cx"> {
</span><del>- return (value && value->isPrimitiveValue()) ? static_pointer_cast<CSSPrimitiveValue>(value)->getValueID() : 0;
</del><ins>+ return (value && value->isPrimitiveValue()) ? static_pointer_cast<CSSPrimitiveValue>(value)->valueID() : 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static String& styleSpanClassString()
</span><span class="lines">@@ -1513,8 +1513,8 @@
</span><span class="cx"> if (!node)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- RefPtr<CSSValue> value = ComputedStyleExtractor(node).propertyValue(CSSPropertyFontSize);
- return downcast<CSSPrimitiveValue>(*value).getFloatValue(CSSPrimitiveValue::CSS_PX);
</del><ins>+ auto value = ComputedStyleExtractor(node).propertyValue(CSSPropertyFontSize);
+ return downcast<CSSPrimitiveValue>(*value).floatValue(CSSPrimitiveValue::CSS_PX);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ApplyStyleCommand::joinChildTextNodes(Node* node, const Position& start, const Position& end)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditingStyle.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -144,13 +144,12 @@
</span><span class="cx"> RefPtr<CSSValue> value = extractPropertyValue(style, propertyID);
</span><span class="cx"> if (!is<CSSPrimitiveValue>(value.get()))
</span><span class="cx"> return 0;
</span><del>- return downcast<CSSPrimitiveValue>(*value).getValueID();
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).valueID();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename T> PassRefPtr<MutableStyleProperties> getPropertiesNotIn(StyleProperties& styleWithRedundantProperties, T& baseStyle);
</span><span class="cx"> enum LegacyFontSizeMode { AlwaysUseLegacyFontSize, UseLegacyFontSizeOnlyIfPixelValuesMatch };
</span><span class="cx"> static int legacyFontSizeFromCSSValue(Document*, CSSPrimitiveValue*, bool shouldUseFixedFontDefaultSize, LegacyFontSizeMode);
</span><del>-static bool isTransparentColorValue(CSSValue*);
</del><span class="cx"> static bool hasTransparentBackgroundColor(StyleProperties*);
</span><span class="cx"> static RefPtr<CSSValue> backgroundColorInEffect(Node*);
</span><span class="cx">
</span><span class="lines">@@ -196,7 +195,7 @@
</span><span class="cx"> bool HTMLElementEquivalent::valueIsPresentInStyle(Element& element, const EditingStyle& style) const
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> value = style.m_mutableStyle->getPropertyCSSValue(m_propertyID);
</span><del>- return matches(element) && is<CSSPrimitiveValue>(value.get()) && downcast<CSSPrimitiveValue>(*value).getValueID() == m_primitiveValue->getValueID();
</del><ins>+ return matches(element) && is<CSSPrimitiveValue>(value.get()) && downcast<CSSPrimitiveValue>(*value).valueID() == m_primitiveValue->valueID();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void HTMLElementEquivalent::addToStyle(Element*, EditingStyle* style) const
</span><span class="lines">@@ -512,7 +511,7 @@
</span><span class="cx"> if (!primitiveValue.isPx())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_fontSizeDelta = primitiveValue.getFloatValue();
</del><ins>+ m_fontSizeDelta = primitiveValue.floatValue();
</ins><span class="cx"> m_mutableStyle->removeProperty(CSSPropertyWebkitFontSizeDelta);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -553,13 +552,13 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(unicodeBidi.get()))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID();
</del><ins>+ CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).valueID();
</ins><span class="cx"> if (unicodeBidiValue == CSSValueEmbed) {
</span><span class="cx"> RefPtr<CSSValue> direction = m_mutableStyle->getPropertyCSSValue(CSSPropertyDirection);
</span><span class="cx"> if (!is<CSSPrimitiveValue>(direction.get()))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- writingDirection = downcast<CSSPrimitiveValue>(*direction).getValueID() == CSSValueLtr ? LeftToRightWritingDirection : RightToLeftWritingDirection;
</del><ins>+ writingDirection = downcast<CSSPrimitiveValue>(*direction).valueID() == CSSValueLtr ? LeftToRightWritingDirection : RightToLeftWritingDirection;
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -1098,9 +1097,9 @@
</span><span class="cx"> m_mutableStyle->removeProperty(CSSPropertyBackgroundColor);
</span><span class="cx">
</span><span class="cx"> if (is<CSSPrimitiveValue>(unicodeBidi.get())) {
</span><del>- m_mutableStyle->setProperty(CSSPropertyUnicodeBidi, static_cast<CSSValueID>(downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID()));
</del><ins>+ m_mutableStyle->setProperty(CSSPropertyUnicodeBidi, static_cast<CSSValueID>(downcast<CSSPrimitiveValue>(*unicodeBidi).valueID()));
</ins><span class="cx"> if (is<CSSPrimitiveValue>(direction.get()))
</span><del>- m_mutableStyle->setProperty(CSSPropertyDirection, static_cast<CSSValueID>(downcast<CSSPrimitiveValue>(*direction).getValueID()));
</del><ins>+ m_mutableStyle->setProperty(CSSPropertyDirection, static_cast<CSSValueID>(downcast<CSSPrimitiveValue>(*direction).valueID()));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1483,7 +1482,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(unicodeBidi.get()))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID();
</del><ins>+ CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).valueID();
</ins><span class="cx"> if (unicodeBidiValue == CSSValueEmbed || unicodeBidiValue == CSSValueBidiOverride)
</span><span class="cx"> return NaturalWritingDirection;
</span><span class="cx"> }
</span><span class="lines">@@ -1512,7 +1511,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(unicodeBidi.get()))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).getValueID();
</del><ins>+ CSSValueID unicodeBidiValue = downcast<CSSPrimitiveValue>(*unicodeBidi).valueID();
</ins><span class="cx"> if (unicodeBidiValue == CSSValueNormal)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -1524,7 +1523,7 @@
</span><span class="cx"> if (!is<CSSPrimitiveValue>(direction.get()))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- CSSValueID directionValue = downcast<CSSPrimitiveValue>(*direction).getValueID();
</del><ins>+ CSSValueID directionValue = downcast<CSSPrimitiveValue>(*direction).valueID();
</ins><span class="cx"> if (directionValue != CSSValueLtr && directionValue != CSSValueRtl)
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -1741,7 +1740,7 @@
</span><span class="cx">
</span><span class="cx"> // Because b tag can only bold text, there are only two states in plain html: bold and not bold.
</span><span class="cx"> // Collapse all other values to either one of these two states for editing purposes.
</span><del>- switch (downcast<CSSPrimitiveValue>(fontWeight).getValueID()) {
</del><ins>+ switch (downcast<CSSPrimitiveValue>(fontWeight).valueID()) {
</ins><span class="cx"> case CSSValue100:
</span><span class="cx"> case CSSValue200:
</span><span class="cx"> case CSSValue300:
</span><span class="lines">@@ -1814,7 +1813,7 @@
</span><span class="cx"> ASSERT(document); // FIXME: This method should take a Document&
</span><span class="cx">
</span><span class="cx"> if (isCSSValueLength(value)) {
</span><del>- int pixelFontSize = value->getIntValue(CSSPrimitiveValue::CSS_PX);
</del><ins>+ int pixelFontSize = value->intValue(CSSPrimitiveValue::CSS_PX);
</ins><span class="cx"> int legacyFontSize = Style::legacyFontSizeForPixelSize(pixelFontSize, shouldUseFixedFontDefaultSize, *document);
</span><span class="cx"> // Use legacy font size only if pixel value matches exactly to that of legacy font size.
</span><span class="cx"> int cssPrimitiveEquivalent = legacyFontSize - 1 + CSSValueXSmall;
</span><span class="lines">@@ -1824,34 +1823,33 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (CSSValueXSmall <= value->getValueID() && value->getValueID() <= CSSValueWebkitXxxLarge)
- return value->getValueID() - CSSValueXSmall + 1;
</del><ins>+ if (CSSValueXSmall <= value->valueID() && value->valueID() <= CSSValueWebkitXxxLarge)
+ return value->valueID() - CSSValueXSmall + 1;
</ins><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool isTransparentColorValue(CSSValue* cssValue)
</del><ins>+static bool isTransparentColorValue(CSSValue* value)
</ins><span class="cx"> {
</span><del>- if (!cssValue)
</del><ins>+ if (!value)
</ins><span class="cx"> return true;
</span><del>- if (!is<CSSPrimitiveValue>(*cssValue))
</del><ins>+ if (!is<CSSPrimitiveValue>(*value))
</ins><span class="cx"> return false;
</span><del>- CSSPrimitiveValue& value = downcast<CSSPrimitiveValue>(*cssValue);
- if (value.isRGBColor())
- return value.color().alpha() == 0;
- return value.getValueID() == CSSValueTransparent;
</del><ins>+ auto& primitiveValue = downcast<CSSPrimitiveValue>(*value);
+ if (primitiveValue.isRGBColor())
+ return !primitiveValue.color().alpha();
+ return primitiveValue.valueID() == CSSValueTransparent;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool hasTransparentBackgroundColor(StyleProperties* style)
</span><span class="cx"> {
</span><del>- RefPtr<CSSValue> cssValue = style->getPropertyCSSValue(CSSPropertyBackgroundColor);
- return isTransparentColorValue(cssValue.get());
</del><ins>+ return isTransparentColorValue(style->getPropertyCSSValue(CSSPropertyBackgroundColor).get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> backgroundColorInEffect(Node* node)
</span><span class="cx"> {
</span><span class="cx"> for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
</span><del>- if (RefPtr<CSSValue> value = ComputedStyleExtractor(ancestor).propertyValue(CSSPropertyBackgroundColor)) {
</del><ins>+ if (auto value = ComputedStyleExtractor(ancestor).propertyValue(CSSPropertyBackgroundColor)) {
</ins><span class="cx"> if (!isTransparentColorValue(value.get()))
</span><span class="cx"> return value;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/Editor.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -3206,9 +3206,9 @@
</span><span class="cx">
</span><span class="cx"> // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
</span><span class="cx"> CSSStyleDeclaration* style = downcast<StyledElement>(*element).cssomStyle();
</span><del>- style->setPropertyInternal(CSSPropertyWordWrap, "break-word", false, IGNORE_EXCEPTION);
- style->setPropertyInternal(CSSPropertyWebkitNbspMode, "space", false, IGNORE_EXCEPTION);
- style->setPropertyInternal(CSSPropertyWebkitLineBreak, "after-white-space", false, IGNORE_EXCEPTION);
</del><ins>+ style->setPropertyInternal(CSSPropertyWordWrap, "break-word", false);
+ style->setPropertyInternal(CSSPropertyWebkitNbspMode, "space", false);
+ style->setPropertyInternal(CSSPropertyWebkitLineBreak, "after-white-space", false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool Editor::findString(const String& target, FindOptions options)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingRemoveCSSPropertyCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/RemoveCSSPropertyCommand.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/RemoveCSSPropertyCommand.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/RemoveCSSPropertyCommand.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include "RemoveCSSPropertyCommand.h"
</span><span class="cx">
</span><span class="cx"> #include "CSSStyleDeclaration.h"
</span><del>-#include "ExceptionCodePlaceholder.h"
</del><span class="cx"> #include "StyleProperties.h"
</span><span class="cx"> #include "StyledElement.h"
</span><span class="cx"> #include <wtf/Assertions.h>
</span><span class="lines">@@ -55,12 +54,12 @@
</span><span class="cx">
</span><span class="cx"> // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
</span><span class="cx"> // Setting to null string removes the property. We don't have internal version of removeProperty.
</span><del>- m_element->cssomStyle()->setPropertyInternal(m_property, String(), false, IGNORE_EXCEPTION);
</del><ins>+ m_element->cssomStyle()->setPropertyInternal(m_property, String(), false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RemoveCSSPropertyCommand::doUnapply()
</span><span class="cx"> {
</span><del>- m_element->cssomStyle()->setPropertyInternal(m_property, m_oldValue, m_important, IGNORE_EXCEPTION);
</del><ins>+ m_element->cssomStyle()->setPropertyInternal(m_property, m_oldValue, m_important);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingReplaceSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -562,9 +562,9 @@
</span><span class="cx">
</span><span class="cx"> // Mutate using the CSSOM wrapper so we get the same event behavior as a script.
</span><span class="cx"> if (isBlock(element))
</span><del>- element->cssomStyle()->setPropertyInternal(CSSPropertyDisplay, "inline", false, IGNORE_EXCEPTION);
</del><ins>+ element->cssomStyle()->setPropertyInternal(CSSPropertyDisplay, "inline", false);
</ins><span class="cx"> if (element->renderer() && element->renderer()->style().isFloating())
</span><del>- element->cssomStyle()->setPropertyInternal(CSSPropertyFloat, "none", false, IGNORE_EXCEPTION);
</del><ins>+ element->cssomStyle()->setPropertyInternal(CSSPropertyFloat, "none", false);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -787,22 +787,22 @@
</span><span class="cx"> // FIXME: Use CSSPrimitiveValue::computeValue.
</span><span class="cx"> switch (primitiveValue.primitiveType()) {
</span><span class="cx"> case CSSPrimitiveValue::CSS_PX:
</span><del>- result = primitiveValue.getFloatValue(CSSPrimitiveValue::CSS_PX);
</del><ins>+ result = primitiveValue.floatValue(CSSPrimitiveValue::CSS_PX);
</ins><span class="cx"> return true;
</span><span class="cx"> case CSSPrimitiveValue::CSS_PT:
</span><del>- result = 4 * primitiveValue.getFloatValue(CSSPrimitiveValue::CSS_PT) / 3;
</del><ins>+ result = 4 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_PT) / 3;
</ins><span class="cx"> return true;
</span><span class="cx"> case CSSPrimitiveValue::CSS_PC:
</span><del>- result = 16 * primitiveValue.getFloatValue(CSSPrimitiveValue::CSS_PC);
</del><ins>+ result = 16 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_PC);
</ins><span class="cx"> return true;
</span><span class="cx"> case CSSPrimitiveValue::CSS_CM:
</span><del>- result = 96 * primitiveValue.getFloatValue(CSSPrimitiveValue::CSS_PC) / 2.54;
</del><ins>+ result = 96 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_PC) / 2.54;
</ins><span class="cx"> return true;
</span><span class="cx"> case CSSPrimitiveValue::CSS_MM:
</span><del>- result = 96 * primitiveValue.getFloatValue(CSSPrimitiveValue::CSS_PC) / 25.4;
</del><ins>+ result = 96 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_PC) / 25.4;
</ins><span class="cx"> return true;
</span><span class="cx"> case CSSPrimitiveValue::CSS_IN:
</span><del>- result = 96 * primitiveValue.getFloatValue(CSSPrimitiveValue::CSS_IN);
</del><ins>+ result = 96 * primitiveValue.floatValue(CSSPrimitiveValue::CSS_IN);
</ins><span class="cx"> return true;
</span><span class="cx"> default:
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/markup.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/markup.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/editing/markup.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -499,7 +499,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> if (!is<CSSPrimitiveValue>(*value))
</span><span class="cx"> return false;
</span><del>- return downcast<CSSPrimitiveValue>(*value).getValueID() == CSSValueNone;
</del><ins>+ return downcast<CSSPrimitiveValue>(*value).valueID() == CSSValueNone;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool needInterchangeNewlineAfter(const VisiblePosition& v)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -708,9 +708,11 @@
</span><span class="cx"> StringBuilder styleSheetText;
</span><span class="cx"> styleSheetText.append(text);
</span><span class="cx">
</span><del>- m_pageStyleSheet->addRule(selector, emptyString(), Nullopt, ec);
- if (ec)
</del><ins>+ auto addRuleResult = m_pageStyleSheet->addRule(selector, emptyString(), Nullopt);
+ if (addRuleResult.hasException()) {
+ ec = addRuleResult.releaseException().code();
</ins><span class="cx"> return nullptr;
</span><ins>+ }
</ins><span class="cx"> ASSERT(m_pageStyleSheet->length());
</span><span class="cx"> unsigned lastRuleIndex = m_pageStyleSheet->length() - 1;
</span><span class="cx"> CSSRule* rule = m_pageStyleSheet->item(lastRuleIndex);
</span><span class="lines">@@ -720,7 +722,7 @@
</span><span class="cx"> if (!styleRule) {
</span><span class="cx"> // What we just added has to be a CSSStyleRule - we cannot handle other types of rules yet.
</span><span class="cx"> // If it is not a style rule, pretend we never touched the stylesheet.
</span><del>- m_pageStyleSheet->deleteRule(lastRuleIndex, ASSERT_NO_EXCEPTION);
</del><ins>+ m_pageStyleSheet->deleteRule(lastRuleIndex);
</ins><span class="cx"> ec = SYNTAX_ERR;
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -759,11 +761,13 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- styleSheet->deleteRule(id.ordinal(), ec);
</del><ins>+ auto deleteRuleResult = styleSheet->deleteRule(id.ordinal());
</ins><span class="cx"> // |rule| MAY NOT be addressed after this line!
</span><span class="cx">
</span><del>- if (ec)
</del><ins>+ if (deleteRuleResult.hasException()) {
+ ec = deleteRuleResult.releaseException().code();
</ins><span class="cx"> return false;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> String sheetText = m_parsedStyleSheet->text();
</span><span class="cx"> sheetText.remove(sourceData->ruleHeaderRange.start, sourceData->ruleBodyRange.end - sourceData->ruleHeaderRange.start + 1);
</span><span class="lines">@@ -1153,11 +1157,14 @@
</span><span class="cx"> if (id.isEmpty())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- style->setCssText(text, ec);
- if (!ec)
- m_parsedStyleSheet->setText(patchedStyleSheetText);
</del><ins>+ auto setCssTextResult = style->setCssText(text);
+ if (setCssTextResult.hasException()) {
+ ec = setCssTextResult.releaseException().code();
+ return false;
+ }
</ins><span class="cx">
</span><del>- return !ec;
</del><ins>+ m_parsedStyleSheet->setText(patchedStyleSheetText);
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool InspectorStyleSheet::styleSheetTextWithChangedStyle(CSSStyleDeclaration* style, const String& newStyleText, String* result)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLengthcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLength.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLength.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebCore/svg/SVGLength.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -327,7 +327,7 @@
</span><span class="cx">
</span><span class="cx"> ExceptionCode ec = 0;
</span><span class="cx"> SVGLength length;
</span><del>- length.newValueSpecifiedUnits(svgType, value.getFloatValue(), ec);
</del><ins>+ length.newValueSpecifiedUnits(svgType, value.floatValue(), ec);
</ins><span class="cx"> if (ec)
</span><span class="cx"> return SVGLength();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-10-16 Darin Adler <darin@apple.com>
+
+ Move CSS classes from ExceptionCode to Exception
+ https://bugs.webkit.org/show_bug.cgi?id=163494
+
+ Reviewed by Sam Weinig.
+
+ * DOM/DOMCSSMediaRule.mm:
+ (-[DOMCSSMediaRule insertRule:index:]): Use raiseOnDOMError
+ the new way to handle ExceptionOr instead of ExceptionCode.
+ (-[DOMCSSMediaRule deleteRule:]): Ditto.
+ * DOM/DOMCSSPrimitiveValue.mm:
+ (-[DOMCSSPrimitiveValue setFloatValue:floatValue:]): Ditto.
+ (-[DOMCSSPrimitiveValue getFloatValue:]): Ditto.
+ (-[DOMCSSPrimitiveValue setStringValue:stringValue:]): Ditto.
+ (-[DOMCSSPrimitiveValue getStringValue]): Ditto.
+ (-[DOMCSSPrimitiveValue getCounterValue]): Ditto.
+ (-[DOMCSSPrimitiveValue getRectValue]): Ditto.
+ (-[DOMCSSPrimitiveValue getRGBColorValue]): Ditto.
+ * DOM/DOMCSSRule.mm:
+ (-[DOMCSSRule setCssText:]): Ditto.
+ * DOM/DOMCSSStyleDeclaration.mm:
+ (-[DOMCSSStyleDeclaration setCssText:]): Ditto.
+ (-[DOMCSSStyleDeclaration removeProperty:]): Ditto.
+ (-[DOMCSSStyleDeclaration setProperty:value:priority:]): Ditto.
+ * DOM/DOMCSSStyleSheet.mm:
+ (-[DOMCSSStyleSheet insertRule:index:]): Ditto.
+ (-[DOMCSSStyleSheet deleteRule:]): Ditto.
+ (-[DOMCSSStyleSheet addRule:style:index:]): Ditto.
+ (-[DOMCSSStyleSheet removeRule:]): Ditto.
+ * DOM/DOMCSSValue.mm:
+ (-[DOMCSSValue setCssText:]): Ditto.
+ * DOM/DOMMediaList.mm:
+ (-[DOMMediaList setMediaText:]): Ditto.
+ (-[DOMMediaList deleteMedium:]): Ditto.
+ (-[DOMMediaList appendMedium:]): Ditto.
+
+ * DOM/ExceptionHandlers.h: Added an overload of raiseDOMException
+ that works with a WebCore::Exception&& and overloads of
+ raiseOnDOMError that work with WebCore::ExceptionOr&&.
+ * DOM/ExceptionHandlers.mm:
+ (raiseDOMException): Implemented the new version.
+
</ins><span class="cx"> 2016-10-15 Dan Bernstein <mitz@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r191699): Contextual menu in Mail compose view doesn’t include any of the standard submenus
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMCSSMediaRulemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMCSSMediaRule.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMCSSMediaRule.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSMediaRule.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -58,18 +58,13 @@
</span><span class="cx"> - (unsigned)insertRule:(NSString *)rule index:(unsigned)index
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- unsigned result = IMPL->insertRule(rule, index, ec);
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return raiseOnDOMError(IMPL->insertRule(rule, index));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)deleteRule:(unsigned)index
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->deleteRule(index, ec);
- raiseOnDOMError(ec);
</del><ins>+ return raiseOnDOMError(IMPL->deleteRule(index));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMCSSPrimitiveValuemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMCSSPrimitiveValue.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMCSSPrimitiveValue.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSPrimitiveValue.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -54,62 +54,43 @@
</span><span class="cx"> - (void)setFloatValue:(unsigned short)unitType floatValue:(float)floatValue
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setFloatValue(unitType, floatValue, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->setFloatValue(unitType, floatValue));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (float)getFloatValue:(unsigned short)unitType
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- float result = IMPL->getFloatValue(unitType, ec);
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return raiseOnDOMError(IMPL->getFloatValue(unitType));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setStringValue:(unsigned short)stringType stringValue:(NSString *)stringValue
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setStringValue(stringType, stringValue, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->setStringValue(stringType, stringValue));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSString *)getStringValue
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- NSString *result = IMPL->getStringValue(ec);
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return raiseOnDOMError(IMPL->getStringValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (DOMCounter *)getCounterValue
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- DOMCounter *result = kit(WTF::getPtr(IMPL->getCounterValue(ec)));
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return kit(raiseOnDOMError(IMPL->getCounterValue()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (DOMRect *)getRectValue
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- DOMRect *result = kit(WTF::getPtr(IMPL->getRectValue(ec)));
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return kit(raiseOnDOMError(IMPL->getRectValue()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (DOMRGBColor *)getRGBColorValue
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- DOMRGBColor *result = kit(WTF::getPtr(IMPL->getRGBColorValue(ec)));
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return kit(raiseOnDOMError(IMPL->getRGBColorValue()).ptr());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMCSSRulemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMCSSRule.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMCSSRule.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSRule.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -68,9 +68,7 @@
</span><span class="cx"> - (void)setCssText:(NSString *)newCssText
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setCssText(newCssText, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->setCssText(newCssText));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (DOMCSSStyleSheet *)parentStyleSheet
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMCSSStyleDeclarationmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMCSSStyleDeclaration.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMCSSStyleDeclaration.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSStyleDeclaration.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -64,9 +64,7 @@
</span><span class="cx"> - (void)setCssText:(NSString *)newCssText
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setCssText(newCssText, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->setCssText(newCssText));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (unsigned)length
</span><span class="lines">@@ -96,10 +94,7 @@
</span><span class="cx"> - (NSString *)removeProperty:(NSString *)propertyName
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- NSString *result = IMPL->removeProperty(propertyName, ec);
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return raiseOnDOMError(IMPL->removeProperty(propertyName));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSString *)getPropertyPriority:(NSString *)propertyName
</span><span class="lines">@@ -111,9 +106,7 @@
</span><span class="cx"> - (void)setProperty:(NSString *)propertyName value:(NSString *)value priority:(NSString *)priority
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setProperty(propertyName, value, priority, ec);
- raiseOnDOMError(ec);
</del><ins>+ return raiseOnDOMError(IMPL->setProperty(propertyName, value, priority));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSString *)item:(unsigned)index
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMCSSStyleSheetmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMCSSStyleSheet.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMCSSStyleSheet.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSStyleSheet.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -65,35 +65,25 @@
</span><span class="cx"> - (unsigned)insertRule:(NSString *)rule index:(unsigned)index
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- unsigned result = IMPL->insertRule(rule, index, ec);
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return raiseOnDOMError(IMPL->insertRule(rule, index));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)deleteRule:(unsigned)index
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->deleteRule(index, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->deleteRule(index));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (int)addRule:(NSString *)selector style:(NSString *)style index:(unsigned)index
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- int result = IMPL->addRule(selector, style, index, ec);
- raiseOnDOMError(ec);
- return result;
</del><ins>+ return raiseOnDOMError(IMPL->addRule(selector, style, index));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)removeRule:(unsigned)index
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->removeRule(index, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->removeRule(index));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMCSSValuemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMCSSValue.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMCSSValue.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMCSSValue.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -59,9 +59,7 @@
</span><span class="cx"> - (void)setCssText:(NSString *)newCssText
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setCssText(newCssText, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->setCssText(newCssText));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (unsigned short)cssValueType
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMDOMMediaListmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/DOMMediaList.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/DOMMediaList.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/DOMMediaList.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -61,9 +61,7 @@
</span><span class="cx"> - (void)setMediaText:(NSString *)newMediaText
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->setMediaText(newMediaText, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->setMediaText(newMediaText));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (unsigned)length
</span><span class="lines">@@ -81,17 +79,13 @@
</span><span class="cx"> - (void)deleteMedium:(NSString *)oldMedium
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->deleteMedium(oldMedium, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->deleteMedium(oldMedium));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)appendMedium:(NSString *)newMedium
</span><span class="cx"> {
</span><span class="cx"> WebCore::JSMainThreadNullState state;
</span><del>- WebCore::ExceptionCode ec = 0;
- IMPL->appendMedium(newMedium, ec);
- raiseOnDOMError(ec);
</del><ins>+ raiseOnDOMError(IMPL->appendMedium(newMedium));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKitmacDOMExceptionHandlersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/ExceptionHandlers.h (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/ExceptionHandlers.h        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/ExceptionHandlers.h        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -25,14 +25,15 @@
</span><span class="cx">
</span><span class="cx"> #pragma once
</span><span class="cx">
</span><del>-namespace WebCore {
-using ExceptionCode = int;
-}
</del><ins>+#include <WebCore/ExceptionOr.h>
</ins><span class="cx">
</span><span class="cx"> NO_RETURN void raiseDOMException(WebCore::ExceptionCode);
</span><ins>+NO_RETURN void raiseDOMException(WebCore::Exception&&);
</ins><span class="cx"> NO_RETURN void raiseTypeErrorException();
</span><span class="cx">
</span><span class="cx"> void raiseOnDOMError(WebCore::ExceptionCode);
</span><ins>+void raiseOnDOMError(WebCore::ExceptionOr<void>&&);
+template<typename T> T raiseOnDOMError(WebCore::ExceptionOr<T>&&);
</ins><span class="cx">
</span><span class="cx"> inline void raiseOnDOMError(WebCore::ExceptionCode code)
</span><span class="cx"> {
</span><span class="lines">@@ -39,3 +40,16 @@
</span><span class="cx"> if (code)
</span><span class="cx"> raiseDOMException(code);
</span><span class="cx"> }
</span><ins>+
+inline void raiseOnDOMError(WebCore::ExceptionOr<void>&& possibleException)
+{
+ if (possibleException.hasException())
+ raiseDOMException(possibleException.releaseException());
+}
+
+template<typename T> inline T raiseOnDOMError(WebCore::ExceptionOr<T>&& exceptionOrReturnValue)
+{
+ if (exceptionOrReturnValue.hasException())
+ raiseDOMException(exceptionOrReturnValue.releaseException());
+ return exceptionOrReturnValue.releaseReturnValue();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKitmacDOMExceptionHandlersmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/DOM/ExceptionHandlers.mm (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DOM/ExceptionHandlers.mm        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/mac/DOM/ExceptionHandlers.mm        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -76,3 +76,8 @@
</span><span class="cx"> {
</span><span class="cx"> raiseDOMException(WebCore::TypeError);
</span><span class="cx"> }
</span><ins>+
+void raiseDOMException(WebCore::Exception&& exception)
+{
+ raiseDOMException(exception.code());
+}
</ins></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/win/ChangeLog        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-10-16 Darin Adler <darin@apple.com>
+
+ Move CSS classes from ExceptionCode to Exception
+ https://bugs.webkit.org/show_bug.cgi?id=163494
+
+ Reviewed by Sam Weinig.
+
+ * DOMCSSClasses.cpp:
+ (DOMCSSStyleDeclaration::setCssText): Remove ExceptionCode handling.
+ (DOMCSSStyleDeclaration::setProperty): Ditto.
+
</ins><span class="cx"> 2016-10-12 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Copy BackForwardList from WebCore to WebKit/win
</span></span></pre></div>
<a id="trunkSourceWebKitwinDOMCSSClassescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/DOMCSSClasses.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/DOMCSSClasses.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit/win/DOMCSSClasses.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -92,9 +92,7 @@
</span><span class="cx"> HRESULT DOMCSSStyleDeclaration::setCssText(_In_ BSTR cssText)
</span><span class="cx"> {
</span><span class="cx"> WTF::String cssTextString(cssText);
</span><del>- // FIXME: <rdar://5148045> return DOM exception info
- WebCore::ExceptionCode ec;
- m_style->setCssText(cssTextString, ec);
</del><ins>+ m_style->setCssText(cssTextString);
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -144,9 +142,7 @@
</span><span class="cx"> WTF::String propertyNameString(propertyName);
</span><span class="cx"> WTF::String valueString(value);
</span><span class="cx"> WTF::String priorityString(priority);
</span><del>- // FIXME: <rdar://5148045> return DOM exception info
- WebCore::ExceptionCode code;
- m_style->setProperty(propertyNameString, valueString, priorityString, code);
</del><ins>+ m_style->setProperty(propertyNameString, valueString, priorityString);
</ins><span class="cx"> return S_OK;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit2/ChangeLog        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-10-16 Darin Adler <darin@apple.com>
+
+ Move CSS classes from ExceptionCode to Exception
+ https://bugs.webkit.org/show_bug.cgi?id=163494
+
+ Reviewed by Sam Weinig.
+
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
+ (webkit_dom_css_rule_set_css_text): Updated for ExceptionOr.
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
+ (webkit_dom_css_style_declaration_remove_property): Ditto.
+ (webkit_dom_css_style_declaration_set_property): Ditto.
+ (webkit_dom_css_style_declaration_set_css_text): Ditto.
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
+ (webkit_dom_css_style_sheet_insert_rule): Ditto.
+ (webkit_dom_css_style_sheet_delete_rule): Ditto.
+ (webkit_dom_css_style_sheet_add_rule): Ditto.
+ (webkit_dom_css_style_sheet_remove_rule): Ditto.
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
+ (webkit_dom_css_value_set_css_text): Ditto.
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
+ (webkit_dom_media_list_delete_medium): Ditto.
+ (webkit_dom_media_list_append_medium): Ditto.
+ (webkit_dom_media_list_set_media_text): Ditto.
+
</ins><span class="cx"> 2016-10-16 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Default WebKitWebsiteDataManager is always leaked in WebKitWebContext
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> /*
</span><span class="cx"> * This file is part of the WebKit open source project.
</span><del>- * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
</del><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -217,10 +216,9 @@
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::CSSRule* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedValue = WTF::String::fromUTF8(value);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->setCssText(convertedValue, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->setCssText(convertedValue);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> /*
</span><span class="cx"> * This file is part of the WebKit open source project.
</span><del>- * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
</del><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -196,9 +195,10 @@
</span><span class="cx"> g_return_val_if_fail(!error || !*error, 0);
</span><span class="cx"> WebCore::CSSStyleDeclaration* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedPropertyName = WTF::String::fromUTF8(propertyName);
</span><del>- WebCore::ExceptionCode ec = 0;
- gchar* result = convertToUTF8String(item->removeProperty(convertedPropertyName, ec));
- return result;
</del><ins>+ auto result = item->removeProperty(convertedPropertyName);
+ if (result.hasException())
+ return nullptr;
+ return convertToUTF8String(result.releaseReturnValue());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> gchar* webkit_dom_css_style_declaration_get_property_priority(WebKitDOMCSSStyleDeclaration* self, const gchar* propertyName)
</span><span class="lines">@@ -224,10 +224,9 @@
</span><span class="cx"> WTF::String convertedPropertyName = WTF::String::fromUTF8(propertyName);
</span><span class="cx"> WTF::String convertedValue = WTF::String::fromUTF8(value);
</span><span class="cx"> WTF::String convertedPriority = WTF::String::fromUTF8(priority);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->setProperty(convertedPropertyName, convertedValue, convertedPriority, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->setProperty(convertedPropertyName, convertedValue, convertedPriority);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -280,10 +279,9 @@
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::CSSStyleDeclaration* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedValue = WTF::String::fromUTF8(value);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->setCssText(convertedValue, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->setCssText(convertedValue);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> /*
</span><span class="cx"> * This file is part of the WebKit open source project.
</span><del>- * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
</del><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -135,13 +134,13 @@
</span><span class="cx"> g_return_val_if_fail(!error || !*error, 0);
</span><span class="cx"> WebCore::CSSStyleSheet* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedRule = WTF::String::fromUTF8(rule);
</span><del>- WebCore::ExceptionCode ec = 0;
- gulong result = item->insertRule(convertedRule, index, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->insertRule(convertedRule, index);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><ins>+ return 0;
</ins><span class="cx"> }
</span><del>- return result;
</del><ins>+ return result.releaseReturnValue();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void webkit_dom_css_style_sheet_delete_rule(WebKitDOMCSSStyleSheet* self, gulong index, GError** error)
</span><span class="lines">@@ -150,10 +149,9 @@
</span><span class="cx"> g_return_if_fail(WEBKIT_DOM_IS_CSS_STYLE_SHEET(self));
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::CSSStyleSheet* item = WebKit::core(self);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->deleteRule(index, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->deleteRule(index);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -168,13 +166,13 @@
</span><span class="cx"> WebCore::CSSStyleSheet* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedSelector = WTF::String::fromUTF8(selector);
</span><span class="cx"> WTF::String convertedStyle = WTF::String::fromUTF8(style);
</span><del>- WebCore::ExceptionCode ec = 0;
- glong result = item->addRule(convertedSelector, convertedStyle, index, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->addRule(convertedSelector, convertedStyle, index);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><ins>+ return -1;
</ins><span class="cx"> }
</span><del>- return result;
</del><ins>+ return result.releaseReturnValue();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void webkit_dom_css_style_sheet_remove_rule(WebKitDOMCSSStyleSheet* self, gulong index, GError** error)
</span><span class="lines">@@ -183,10 +181,9 @@
</span><span class="cx"> g_return_if_fail(WEBKIT_DOM_IS_CSS_STYLE_SHEET(self));
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::CSSStyleSheet* item = WebKit::core(self);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->removeRule(index, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->removeRule(index);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> /*
</span><span class="cx"> * This file is part of the WebKit open source project.
</span><del>- * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
</del><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -179,10 +178,9 @@
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::CSSValue* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedValue = WTF::String::fromUTF8(value);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->setCssText(convertedValue, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->setCssText(convertedValue);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIgtkDOMWebKitDOMMediaListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp (207395 => 207396)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp        2016-10-16 22:11:41 UTC (rev 207395)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp        2016-10-17 00:16:05 UTC (rev 207396)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> /*
</span><span class="cx"> * This file is part of the WebKit open source project.
</span><del>- * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
</del><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -179,10 +178,9 @@
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::MediaList* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedOldMedium = WTF::String::fromUTF8(oldMedium);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->deleteMedium(convertedOldMedium, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->deleteMedium(convertedOldMedium);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -195,10 +193,9 @@
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::MediaList* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedNewMedium = WTF::String::fromUTF8(newMedium);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->appendMedium(convertedNewMedium, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->appendMedium(convertedNewMedium);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -220,10 +217,9 @@
</span><span class="cx"> g_return_if_fail(!error || !*error);
</span><span class="cx"> WebCore::MediaList* item = WebKit::core(self);
</span><span class="cx"> WTF::String convertedValue = WTF::String::fromUTF8(value);
</span><del>- WebCore::ExceptionCode ec = 0;
- item->setMediaText(convertedValue, ec);
- if (ec) {
- WebCore::ExceptionCodeDescription ecdesc(ec);
</del><ins>+ auto result = item->setMediaText(convertedValue);
+ if (result.hasException()) {
+ WebCore::ExceptionCodeDescription ecdesc(result.releaseException().code());
</ins><span class="cx"> g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM"), ecdesc.code, ecdesc.name);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>