diff options
author | danakj <danakj@chromium.org> | 2016-03-01 16:12:17 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-02 00:13:36 +0000 |
commit | c5117b4cc2638739551a9eeedf5b10e177e2368b (patch) | |
tree | 40ebe07d396c93a6acb2aabbe18bd153136b4fa4 | |
parent | 12ac33c211887abb76d8b8eb9c7c10c630357db6 (diff) | |
download | chromium_src-c5117b4cc2638739551a9eeedf5b10e177e2368b.zip chromium_src-c5117b4cc2638739551a9eeedf5b10e177e2368b.tar.gz chromium_src-c5117b4cc2638739551a9eeedf5b10e177e2368b.tar.bz2 |
Rename enums/functions that collide in chromium style in platform/
R=esprehn@chromium.org, pdr
BUG=582312
Review URL: https://codereview.chromium.org/1746283002
Cr-Commit-Position: refs/heads/master@{#378619}
118 files changed, 363 insertions, 364 deletions
diff --git a/third_party/WebKit/Source/build/scripts/make_style_builder.py b/third_party/WebKit/Source/build/scripts/make_style_builder.py index 4015dda..1e81ac2 100755 --- a/third_party/WebKit/Source/build/scripts/make_style_builder.py +++ b/third_party/WebKit/Source/build/scripts/make_style_builder.py @@ -55,8 +55,9 @@ class StyleBuilderWriter(css_properties.CSSProperties): upper_camel = property['upper_camel_name'] set_if_none(property, 'name_for_methods', upper_camel.replace('Webkit', '')) name = property['name_for_methods'] + simple_type_name = str(property['type_name']).split('::')[-1] set_if_none(property, 'type_name', 'E' + name) - set_if_none(property, 'getter', lower_first(name) if property['type_name'] != name else 'get' + name) + set_if_none(property, 'getter', lower_first(name) if simple_type_name != name else 'get' + name) set_if_none(property, 'setter', 'set' + name) set_if_none(property, 'initial', 'initial' + name) if property['custom_all']: diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp index 58d3c65..e53c190 100644 --- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp +++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp @@ -71,7 +71,7 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertLength(const Length& if (!length.isSpecified()) return nullptr; - PixelsAndPercent pixelsAndPercent = length.pixelsAndPercent(); + PixelsAndPercent pixelsAndPercent = length.getPixelsAndPercent(); OwnPtr<InterpolableList> values = createNeutralInterpolableValue(); values->set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(pixelsAndPercent.pixels / zoom)); values->set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(pixelsAndPercent.percent)); diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp index da39c59..48a9d87 100644 --- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp +++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp @@ -519,7 +519,7 @@ void getStepsTimingFunctionParameters(const TimingFunction& timingFunction, int& const StepsTimingFunction& steps = toStepsTimingFunction(timingFunction); outSteps = steps.numberOfSteps(); - switch (steps.stepAtPosition()) { + switch (steps.getStepAtPosition()) { case StepsTimingFunction::Start: outStepsStartOffset = 1; break; diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableLength.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableLength.cpp index ecc4e5a..80319af 100644 --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableLength.cpp +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableLength.cpp @@ -50,7 +50,7 @@ double clampNumber(double value, ValueRange range) AnimatableLength::AnimatableLength(const Length& length, float zoom) { ASSERT(zoom); - PixelsAndPercent pixelsAndPercent = length.pixelsAndPercent(); + PixelsAndPercent pixelsAndPercent = length.getPixelsAndPercent(); m_pixels = pixelsAndPercent.pixels / zoom; m_percent = pixelsAndPercent.percent; m_hasPixels = length.type() != Percent; diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp index a6d251b..324a9f0 100644 --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp @@ -90,7 +90,7 @@ void PrintTo(const AnimatableStrokeDasharrayList& animValue, ::std::ostream* os) size_t length = list->size(); for (size_t i = 0; i < length; ++i) { const Length& dashLength = list->at(i); - PixelsAndPercent pixelsAndPercent = dashLength.pixelsAndPercent(); + PixelsAndPercent pixelsAndPercent = dashLength.getPixelsAndPercent(); *os << pixelsAndPercent.pixels << '+'; *os << pixelsAndPercent.percent << '%'; diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp index 3c6eaf0..325d1d4 100644 --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp @@ -258,11 +258,11 @@ CSSPrimitiveValue::CSSPrimitiveValue(const Length& length, float zoom) m_value.num = length.value() / zoom; break; case Calculated: { - const CalculationValue& calc = length.calculationValue(); + const CalculationValue& calc = length.getCalculationValue(); if (calc.pixels() && calc.percent()) { init(CSSCalcValue::create( CSSCalcValue::createExpressionNode(calc.pixels() / zoom, calc.percent()), - calc.valueRange())); + calc.getValueRange())); break; } if (calc.percent()) { diff --git a/third_party/WebKit/Source/core/css/CSSProperties.in b/third_party/WebKit/Source/core/css/CSSProperties.in index bb11bdb..f2a0ebe 100644 --- a/third_party/WebKit/Source/core/css/CSSProperties.in +++ b/third_party/WebKit/Source/core/css/CSSProperties.in @@ -85,7 +85,7 @@ color interpolable, inherited, custom_all direction inherited, custom_value font-family inherited, font, type_name=FontDescription::FamilyDescription, name_for_methods=FamilyDescription, converter=convertFontFamily font-kerning inherited, font, type_name=FontDescription::Kerning, name_for_methods=Kerning -font-size interpolable, inherited, font, name_for_methods=Size, converter=convertFontSize +font-size interpolable, inherited, font, name_for_methods=Size, getter=getSize, converter=convertFontSize font-size-adjust runtime_flag=CSSFontSizeAdjust, interpolable, inherited, font, name_for_methods=SizeAdjust, converter=convertFontSizeAdjust font-stretch inherited, font, type_name=FontStretch, name_for_methods=Stretch font-style inherited, font, type_name=FontStyle, name_for_methods=Style diff --git a/third_party/WebKit/Source/core/css/CSSTimingFunctionValue.h b/third_party/WebKit/Source/core/css/CSSTimingFunctionValue.h index 19be370..bad1f87 100644 --- a/third_party/WebKit/Source/core/css/CSSTimingFunctionValue.h +++ b/third_party/WebKit/Source/core/css/CSSTimingFunctionValue.h @@ -76,7 +76,7 @@ public: } int numberOfSteps() const { return m_steps; } - StepsTimingFunction::StepAtPosition stepAtPosition() const { return m_stepAtPosition; } + StepsTimingFunction::StepAtPosition getStepAtPosition() const { return m_stepAtPosition; } String customCSSText() const; diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp index be7f235..3ed6c1d 100644 --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp @@ -827,7 +827,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> createTimingFunctionValue(const TimingFu case TimingFunction::StepsFunction: { const StepsTimingFunction* stepsTimingFunction = toStepsTimingFunction(timingFunction); - StepsTimingFunction::StepAtPosition position = stepsTimingFunction->stepAtPosition(); + StepsTimingFunction::StepAtPosition position = stepsTimingFunction->getStepAtPosition(); int steps = stepsTimingFunction->numberOfSteps(); ASSERT(position == StepsTimingFunction::Start || position == StepsTimingFunction::End); @@ -1255,7 +1255,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFilter(co DropShadowFilterOperation* dropShadowOperation = toDropShadowFilterOperation(filterOperation); filterValue = CSSFunctionValue::create(CSSValueDropShadow); // We want our computed style to look like that of a text shadow (has neither spread nor inset style). - ShadowData shadow(dropShadowOperation->location(), dropShadowOperation->stdDeviation(), 0, Normal, StyleColor(dropShadowOperation->color())); + ShadowData shadow(dropShadowOperation->location(), dropShadowOperation->stdDeviation(), 0, Normal, StyleColor(dropShadowOperation->getColor())); filterValue->append(valueForShadowData(shadow, style, false)); break; } @@ -2087,7 +2087,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID case CSSPropertyResize: return cssValuePool().createValue(style.resize()); case CSSPropertyFontKerning: - return cssValuePool().createValue(style.fontDescription().kerning()); + return cssValuePool().createValue(style.fontDescription().getKerning()); case CSSPropertyWebkitFontSmoothing: return cssValuePool().createValue(style.fontDescription().fontSmoothing()); case CSSPropertyFontVariantLigatures: { diff --git a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp index d270652..39e134c 100644 --- a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp +++ b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp @@ -418,9 +418,9 @@ PassRefPtr<TimingFunction> CSSToStyleMap::mapAnimationTimingFunction(const CSSVa return CSSTimingData::initialTimingFunction(); const CSSStepsTimingFunctionValue& stepsTimingFunction = toCSSStepsTimingFunctionValue(value); - if (stepsTimingFunction.stepAtPosition() == StepsTimingFunction::Middle && !allowStepMiddle) + if (stepsTimingFunction.getStepAtPosition() == StepsTimingFunction::Middle && !allowStepMiddle) return CSSTimingData::initialTimingFunction(); - return StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(), stepsTimingFunction.stepAtPosition()); + return StepsTimingFunction::create(stepsTimingFunction.numberOfSteps(), stepsTimingFunction.getStepAtPosition()); } void CSSToStyleMap::mapNinePieceImage(StyleResolverState& state, CSSPropertyID property, const CSSValue& value, NinePieceImage& image) diff --git a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp index 5823a3b..c16a80c 100644 --- a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp +++ b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp @@ -369,7 +369,7 @@ void FontBuilder::createFont(PassRefPtrWillBeRawPtr<FontSelector> fontSelector, if (isSet(PropertySetFlag::TextRendering)) description.setTextRendering(m_fontDescription.textRendering()); if (isSet(PropertySetFlag::Kerning)) - description.setKerning(m_fontDescription.kerning()); + description.setKerning(m_fontDescription.getKerning()); if (isSet(PropertySetFlag::FontSmoothing)) description.setFontSmoothing(m_fontDescription.fontSmoothing()); if (isSet(PropertySetFlag::TextOrientation) || isSet(PropertySetFlag::WritingMode)) diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp index 5da06f1..554b932 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp @@ -224,7 +224,7 @@ FontDescription::Size StyleBuilderConverter::convertFontSize(StyleResolverState& // FIXME: Find out when parentStyle could be 0? if (state.parentStyle()) - parentSize = state.parentFontDescription().size(); + parentSize = state.parentFontDescription().getSize(); if (CSSValueID valueID = primitiveValue.getValueID()) { switch (valueID) { diff --git a/third_party/WebKit/Source/core/events/GestureEvent.cpp b/third_party/WebKit/Source/core/events/GestureEvent.cpp index 89f1d2d..e79fc0c 100644 --- a/third_party/WebKit/Source/core/events/GestureEvent.cpp +++ b/third_party/WebKit/Source/core/events/GestureEvent.cpp @@ -87,7 +87,7 @@ PassRefPtrWillBeRawPtr<GestureEvent> GestureEvent::create(PassRefPtrWillBeRawPtr default: return nullptr; } - return adoptRefWillBeNoop(new GestureEvent(eventType, view, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), event.modifiers(), deltaX, deltaY, velocityX, velocityY, inertial, event.timestamp(), event.resendingPluginId(), source)); + return adoptRefWillBeNoop(new GestureEvent(eventType, view, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), event.getModifiers(), deltaX, deltaY, velocityX, velocityY, inertial, event.timestamp(), event.resendingPluginId(), source)); } const AtomicString& GestureEvent::interfaceName() const diff --git a/third_party/WebKit/Source/core/events/KeyboardEvent.cpp b/third_party/WebKit/Source/core/events/KeyboardEvent.cpp index 8232bd6..32a49f9 100644 --- a/third_party/WebKit/Source/core/events/KeyboardEvent.cpp +++ b/third_party/WebKit/Source/core/events/KeyboardEvent.cpp @@ -29,7 +29,7 @@ namespace blink { -static inline const AtomicString& eventTypeForKeyboardEventType(PlatformEvent::Type type) +static inline const AtomicString& eventTypeForKeyboardEventType(PlatformEvent::EventType type) { switch (type) { case PlatformEvent::KeyUp: @@ -52,9 +52,9 @@ static inline KeyboardEvent::KeyLocationCode keyLocationCode(const PlatformKeybo { if (key.isKeypad()) return KeyboardEvent::DOM_KEY_LOCATION_NUMPAD; - if (key.modifiers() & PlatformEvent::IsLeft) + if (key.getModifiers() & PlatformEvent::IsLeft) return KeyboardEvent::DOM_KEY_LOCATION_LEFT; - if (key.modifiers() & PlatformEvent::IsRight) + if (key.getModifiers() & PlatformEvent::IsRight) return KeyboardEvent::DOM_KEY_LOCATION_RIGHT; return KeyboardEvent::DOM_KEY_LOCATION_STANDARD; } @@ -72,7 +72,7 @@ KeyboardEvent::KeyboardEvent() } KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* view) - : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.modifiers(), key.timestamp(), InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()) + : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.getModifiers(), key.timestamp(), InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()) , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) , m_keyIdentifier(key.keyIdentifier()) , m_code(key.code()) diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp index 9f86063..7e969dc 100644 --- a/third_party/WebKit/Source/core/events/MouseEvent.cpp +++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp @@ -49,9 +49,9 @@ PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& eventT eventType, isBubbling, isCancelable, view, detail, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), event.movementDelta().x(), event.movementDelta().y(), - event.modifiers(), event.button(), - platformModifiersToButtons(event.modifiers()), - relatedTarget, event.timestamp(), event.syntheticEventType()); + event.getModifiers(), event.button(), + platformModifiersToButtons(event.getModifiers()), + relatedTarget, event.timestamp(), event.getSyntheticEventType()); } PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView> view, diff --git a/third_party/WebKit/Source/core/events/MouseEvent.h b/third_party/WebKit/Source/core/events/MouseEvent.h index 052c754..52c12ae 100644 --- a/third_party/WebKit/Source/core/events/MouseEvent.h +++ b/third_party/WebKit/Source/core/events/MouseEvent.h @@ -74,7 +74,7 @@ public: bool buttonDown() const { return m_button != -1; } EventTarget* relatedTarget() const { return m_relatedTarget.get(); } void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m_relatedTarget = relatedTarget; } - PlatformMouseEvent::SyntheticEventType syntheticEventType() const { return m_syntheticEventType; } + PlatformMouseEvent::SyntheticEventType getSyntheticEventType() const { return m_syntheticEventType; } Node* toElement() const; Node* fromElement() const; diff --git a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp index a771638..5c51a07 100644 --- a/third_party/WebKit/Source/core/events/PointerEventFactory.cpp +++ b/third_party/WebKit/Source/core/events/PointerEventFactory.cpp @@ -81,7 +81,7 @@ PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create( PassRefPtrWillBeRawPtr<AbstractView> view) { AtomicString pointerEventName = pointerEventNameForMouseEventName(mouseEventName); - unsigned buttons = MouseEvent::platformModifiersToButtons(mouseEvent.modifiers()); + unsigned buttons = MouseEvent::platformModifiersToButtons(mouseEvent.getModifiers()); PointerEventInit pointerEventInit; setIdTypeButtons(pointerEventInit, mouseEvent.pointerProperties(), buttons); @@ -101,7 +101,7 @@ PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create( pointerEventInit.setPressure(getPointerEventPressure( mouseEvent.pointerProperties().force, pointerEventInit.buttons())); - UIEventWithKeyState::setFromPlatformModifiers(pointerEventInit, mouseEvent.modifiers()); + UIEventWithKeyState::setFromPlatformModifiers(pointerEventInit, mouseEvent.getModifiers()); // Make sure chorded buttons fire pointermove instead of pointerup/down. if ((pointerEventName == EventTypeNames::pointerdown @@ -129,7 +129,7 @@ PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactory::create(const AtomicStr const double width, const double height, const double clientX, const double clientY) { - const PlatformTouchPoint::State pointState = touchPoint.state(); + const PlatformTouchPoint::TouchState pointState = touchPoint.state(); bool pointerReleasedOrCancelled = pointState == PlatformTouchPoint::TouchReleased diff --git a/third_party/WebKit/Source/core/events/PointerEventFactoryTest.cpp b/third_party/WebKit/Source/core/events/PointerEventFactoryTest.cpp index 2a1bf4d..a94e34d 100644 --- a/third_party/WebKit/Source/core/events/PointerEventFactoryTest.cpp +++ b/third_party/WebKit/Source/core/events/PointerEventFactoryTest.cpp @@ -18,11 +18,11 @@ protected: PassRefPtrWillBeRawPtr<PointerEvent> createAndCheckTouchCancel( WebPointerProperties::PointerType, int rawId, int uniqueId, bool isPrimary, - PlatformTouchPoint::State = PlatformTouchPoint::TouchReleased); + PlatformTouchPoint::TouchState = PlatformTouchPoint::TouchReleased); PassRefPtrWillBeRawPtr<PointerEvent> createAndCheckTouchEvent( WebPointerProperties::PointerType, int rawId, int uniqueId, bool isPrimary, - PlatformTouchPoint::State = PlatformTouchPoint::TouchPressed); + PlatformTouchPoint::TouchState = PlatformTouchPoint::TouchPressed); PassRefPtrWillBeRawPtr<PointerEvent> createAndCheckMouseEvent( WebPointerProperties::PointerType, int rawId, int uniqueId, bool isPrimary, @@ -38,7 +38,7 @@ protected: class PlatformTouchPointBuilder : public PlatformTouchPoint { public: PlatformTouchPointBuilder(WebPointerProperties::PointerType, int, - PlatformTouchPoint::State); + PlatformTouchPoint::TouchState); }; class PlatformMouseEventBuilder : public PlatformMouseEvent { @@ -56,7 +56,7 @@ void PointerEventFactoryTest::SetUp() PointerEventFactoryTest::PlatformTouchPointBuilder::PlatformTouchPointBuilder( WebPointerProperties::PointerType pointerType, int id, - PlatformTouchPoint::State state) + PlatformTouchPoint::TouchState state) { m_pointerProperties.id = id; m_pointerProperties.pointerType = pointerType; @@ -76,7 +76,7 @@ PointerEventFactoryTest::PlatformMouseEventBuilder::PlatformMouseEventBuilder( PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactoryTest::createAndCheckTouchCancel( WebPointerProperties::PointerType pointerType, int rawId, int uniqueId, bool isPrimary, - PlatformTouchPoint::State state) + PlatformTouchPoint::TouchState state) { RefPtrWillBeRawPtr<PointerEvent> pointerEvent = m_pointerEventFactory.createPointerCancel( PointerEventFactoryTest::PlatformTouchPointBuilder(pointerType, rawId, state)); @@ -101,7 +101,7 @@ void PointerEventFactoryTest::cloneAndCheckPointerEvent( PassRefPtrWillBeRawPtr<PointerEvent> PointerEventFactoryTest::createAndCheckTouchEvent( WebPointerProperties::PointerType pointerType, int rawId, int uniqueId, bool isPrimary, - PlatformTouchPoint::State state) + PlatformTouchPoint::TouchState state) { RefPtrWillBeRawPtr<PointerEvent> pointerEvent = m_pointerEventFactory.create( EventTypeNames::pointerdown, PointerEventFactoryTest::PlatformTouchPointBuilder(pointerType, rawId, state), PlatformEvent::NoModifiers, 0, 0, 0, 0); diff --git a/third_party/WebKit/Source/core/events/WheelEvent.cpp b/third_party/WebKit/Source/core/events/WheelEvent.cpp index 64a466e..c27be32 100644 --- a/third_party/WebKit/Source/core/events/WheelEvent.cpp +++ b/third_party/WebKit/Source/core/events/WheelEvent.cpp @@ -38,8 +38,8 @@ PassRefPtrWillBeRawPtr<WheelEvent> WheelEvent::create(const PlatformWheelEvent& { return adoptRefWillBeNoop(new WheelEvent(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()), convertDeltaMode(event), view, event.globalPosition(), event.position(), - event.modifiers(), - MouseEvent::platformModifiersToButtons(event.modifiers()), event.timestamp(), + event.getModifiers(), + MouseEvent::platformModifiersToButtons(event.getModifiers()), event.timestamp(), event.canScroll(), event.resendingPluginId(), event.hasPreciseScrollingDeltas(), static_cast<Event::RailsMode>(event.getRailsMode()))); } diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp index 59844e3..52a8305 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.cpp +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp @@ -363,7 +363,7 @@ void FrameView::invalidateAllCustomScrollbarsOnActiveChanged() void FrameView::recalculateScrollbarOverlayStyle() { - ScrollbarOverlayStyle oldOverlayStyle = scrollbarOverlayStyle(); + ScrollbarOverlayStyle oldOverlayStyle = getScrollbarOverlayStyle(); ScrollbarOverlayStyle overlayStyle = ScrollbarOverlayStyleDefault; Color backgroundColor = documentBackgroundColor(); diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp index aab6e96..fcd2d4a 100644 --- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp +++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp @@ -94,7 +94,7 @@ PassRefPtr<SkImage> ImageBitmap::getSkImageFromDecoder(PassOwnPtr<ImageDecoder> if (!decoder->frameCount()) return nullptr; ImageFrame* frame = decoder->frameBufferAtIndex(0); - if (!frame || frame->status() != ImageFrame::FrameComplete) + if (!frame || frame->getStatus() != ImageFrame::FrameComplete) return nullptr; SkBitmap bitmap = frame->bitmap(); if (!frameIsValid(bitmap)) diff --git a/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp b/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp index e2d1293..4bd7b63 100644 --- a/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp +++ b/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp @@ -92,9 +92,9 @@ DateTimeEditBuilder::DateTimeEditBuilder(DateTimeEditElement& element, const Dat , m_secondRange(0, 59) , m_millisecondRange(0, 999) { - if (m_dateValue.type() == DateComponents::Date || m_dateValue.type() == DateComponents::DateTimeLocal) { - if (m_parameters.minimum.type() != DateComponents::Invalid - && m_parameters.maximum.type() != DateComponents::Invalid + if (m_dateValue.getType() == DateComponents::Date || m_dateValue.getType() == DateComponents::DateTimeLocal) { + if (m_parameters.minimum.getType() != DateComponents::Invalid + && m_parameters.maximum.getType() != DateComponents::Invalid && m_parameters.minimum.fullYear() == m_parameters.maximum.fullYear() && m_parameters.minimum.month() == m_parameters.maximum.month() && m_parameters.minimum.monthDay() <= m_parameters.maximum.monthDay()) { @@ -103,9 +103,9 @@ DateTimeEditBuilder::DateTimeEditBuilder(DateTimeEditElement& element, const Dat } } - if (m_dateValue.type() == DateComponents::Time || m_dayRange.isSingleton()) { - if (m_parameters.minimum.type() != DateComponents::Invalid - && m_parameters.maximum.type() != DateComponents::Invalid + if (m_dateValue.getType() == DateComponents::Time || m_dayRange.isSingleton()) { + if (m_parameters.minimum.getType() != DateComponents::Invalid + && m_parameters.maximum.getType() != DateComponents::Invalid && m_parameters.minimum.hour() <= m_parameters.maximum.hour()) { m_hour23Range.minimum = m_parameters.minimum.hour(); m_hour23Range.maximum = m_parameters.maximum.hour(); @@ -215,8 +215,8 @@ void DateTimeEditBuilder::visitField(DateTimeFormat::FieldType fieldType, int co case DateTimeFormat::FieldTypeMonth: // Fallthrough. case DateTimeFormat::FieldTypeMonthStandAlone: { int minMonth = 0, maxMonth = 11; - if (m_parameters.minimum.type() != DateComponents::Invalid - && m_parameters.maximum.type() != DateComponents::Invalid + if (m_parameters.minimum.getType() != DateComponents::Invalid + && m_parameters.maximum.getType() != DateComponents::Invalid && m_parameters.minimum.fullYear() == m_parameters.maximum.fullYear() && m_parameters.minimum.month() <= m_parameters.maximum.month()) { minMonth = m_parameters.minimum.month(); @@ -236,7 +236,7 @@ void DateTimeEditBuilder::visitField(DateTimeFormat::FieldType fieldType, int co break; } editElement().addField(field); - if (minMonth == maxMonth && minMonth == m_dateValue.month() && m_dateValue.type() != DateComponents::Month) { + if (minMonth == maxMonth && minMonth == m_dateValue.month() && m_dateValue.getType() != DateComponents::Month) { field->setValueAsDate(m_dateValue); field->setDisabled(); } @@ -282,8 +282,8 @@ void DateTimeEditBuilder::visitField(DateTimeFormat::FieldType fieldType, int co case DateTimeFormat::FieldTypeWeekOfYear: { DateTimeNumericFieldElement::Range range(DateComponents::minimumWeekNumber, DateComponents::maximumWeekNumber); - if (m_parameters.minimum.type() != DateComponents::Invalid - && m_parameters.maximum.type() != DateComponents::Invalid + if (m_parameters.minimum.getType() != DateComponents::Invalid + && m_parameters.maximum.getType() != DateComponents::Invalid && m_parameters.minimum.fullYear() == m_parameters.maximum.fullYear() && m_parameters.minimum.week() <= m_parameters.maximum.week()) { range.minimum = m_parameters.minimum.week(); @@ -295,14 +295,14 @@ void DateTimeEditBuilder::visitField(DateTimeFormat::FieldType fieldType, int co case DateTimeFormat::FieldTypeYear: { DateTimeYearFieldElement::Parameters yearParams; - if (m_parameters.minimum.type() == DateComponents::Invalid) { + if (m_parameters.minimum.getType() == DateComponents::Invalid) { yearParams.minimumYear = DateComponents::minimumYear(); yearParams.minIsSpecified = false; } else { yearParams.minimumYear = m_parameters.minimum.fullYear(); yearParams.minIsSpecified = true; } - if (m_parameters.maximum.type() == DateComponents::Invalid) { + if (m_parameters.maximum.getType() == DateComponents::Invalid) { yearParams.maximumYear = DateComponents::maximumYear(); yearParams.maxIsSpecified = false; } else { @@ -337,7 +337,7 @@ bool DateTimeEditBuilder::shouldAMPMFieldDisabled() const bool DateTimeEditBuilder::shouldDayOfMonthFieldDisabled() const { - return m_dayRange.isSingleton() && m_dayRange.minimum == m_dateValue.monthDay() && m_dateValue.type() != DateComponents::Date; + return m_dayRange.isSingleton() && m_dayRange.minimum == m_dateValue.monthDay() && m_dateValue.getType() != DateComponents::Date; } bool DateTimeEditBuilder::shouldHourFieldDisabled() const @@ -346,9 +346,9 @@ bool DateTimeEditBuilder::shouldHourFieldDisabled() const && !(shouldMinuteFieldDisabled() && shouldSecondFieldDisabled() && shouldMillisecondFieldDisabled())) return true; - if (m_dateValue.type() == DateComponents::Time) + if (m_dateValue.getType() == DateComponents::Time) return false; - ASSERT(m_dateValue.type() == DateComponents::DateTimeLocal); + ASSERT(m_dateValue.getType() == DateComponents::DateTimeLocal); if (shouldDayOfMonthFieldDisabled()) { ASSERT(m_parameters.minimum.fullYear() == m_parameters.maximum.fullYear()); @@ -392,8 +392,8 @@ bool DateTimeEditBuilder::shouldSecondFieldDisabled() const bool DateTimeEditBuilder::shouldYearFieldDisabled() const { - return m_parameters.minimum.type() != DateComponents::Invalid - && m_parameters.maximum.type() != DateComponents::Invalid + return m_parameters.minimum.getType() != DateComponents::Invalid + && m_parameters.maximum.getType() != DateComponents::Invalid && m_parameters.minimum.fullYear() == m_parameters.maximum.fullYear() && m_parameters.minimum.fullYear() == m_dateValue.fullYear(); } @@ -771,7 +771,7 @@ bool DateTimeEditElement::hasFocusedField() void DateTimeEditElement::setOnlyYearMonthDay(const DateComponents& date) { - ASSERT(date.type() == DateComponents::Date); + ASSERT(date.getType() == DateComponents::Date); if (!m_editControlOwner) return; diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp index c0a63ba..e2317e5 100644 --- a/third_party/WebKit/Source/core/input/EventHandler.cpp +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp @@ -110,7 +110,7 @@ bool hasTouchHandlers(const EventHandlerRegistry& registry) || registry.hasEventHandlers(EventHandlerRegistry::TouchEventPassive); } -const AtomicString& touchEventNameForTouchPointState(PlatformTouchPoint::State state) +const AtomicString& touchEventNameForTouchPointState(PlatformTouchPoint::TouchState state) { switch (state) { case PlatformTouchPoint::TouchReleased: @@ -1045,7 +1045,7 @@ WebInputEventResult EventHandler::handleMousePressEvent(const PlatformMouseEvent // the same behavior and it's more compatible with other browsers. selectionController().initializeSelectionState(); HitTestResult hitTestResult = hitTestResultInFrame(m_frame, documentPoint, HitTestRequest::ReadOnly); - InputDeviceCapabilities* sourceCapabilities = mouseEvent.syntheticEventType() == PlatformMouseEvent::FromTouch ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities() : + InputDeviceCapabilities* sourceCapabilities = mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities() : InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities(); if (eventResult == WebInputEventResult::NotHandled) eventResult = handleMouseFocus(MouseEventWithHitTestResults(mouseEvent, hitTestResult), sourceCapabilities); @@ -1117,7 +1117,7 @@ WebInputEventResult EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& TRACE_EVENT0("blink", "EventHandler::handleMouseMoveEvent"); m_pointerEventManager.conditionallyEnableMouseEventForPointerTypeMouse( - event.modifiers()); + event.getModifiers()); RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); @@ -1147,7 +1147,7 @@ void EventHandler::handleMouseLeaveEvent(const PlatformMouseEvent& event) TRACE_EVENT0("blink", "EventHandler::handleMouseLeaveEvent"); m_pointerEventManager.conditionallyEnableMouseEventForPointerTypeMouse( - event.modifiers()); + event.getModifiers()); RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); handleMouseMoveOrLeaveEvent(event, 0, false, true); @@ -1332,12 +1332,12 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const PlatformMouseEve // TODO(crbug/545647): This state should reset with pointercancel too. m_pointerEventManager.conditionallyEnableMouseEventForPointerTypeMouse( - mouseEvent.modifiers()); + mouseEvent.getModifiers()); bool contextMenuEvent = mouseEvent.button() == RightButton; #if OS(MACOSX) // FIXME: The Mac port achieves the same behavior by checking whether the context menu is currently open in WebPage::mouseEvent(). Consider merging the implementations. - if (mouseEvent.button() == LeftButton && mouseEvent.modifiers() & PlatformEvent::CtrlKey) + if (mouseEvent.button() == LeftButton && mouseEvent.getModifiers() & PlatformEvent::CtrlKey) contextMenuEvent = true; #endif @@ -1386,8 +1386,8 @@ WebInputEventResult EventHandler::dispatchDragEvent(const AtomicString& eventTyp true, true, m_frame->document()->domWindow(), 0, event.globalPosition().x(), event.globalPosition().y(), event.position().x(), event.position().y(), event.movementDelta().x(), event.movementDelta().y(), - event.modifiers(), - 0, MouseEvent::platformModifiersToButtons(event.modifiers()), nullptr, event.timestamp(), dataTransfer, event.syntheticEventType()); + event.getModifiers(), + 0, MouseEvent::platformModifiersToButtons(event.getModifiers()), nullptr, event.timestamp(), dataTransfer, event.getSyntheticEventType()); return toWebInputEventResult(dragTarget->dispatchEvent(me.get())); } @@ -2064,7 +2064,7 @@ WebInputEventResult EventHandler::handleGestureTap(const GestureEventWithHitTest // co-ordinates outside the target's bounds. IntPoint adjustedPoint = frameView->rootFrameToContents(gestureEvent.position()); - unsigned modifiers = gestureEvent.modifiers(); + unsigned modifiers = gestureEvent.getModifiers(); PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(), NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0, static_cast<PlatformEvent::Modifiers>(modifiers), @@ -2160,7 +2160,7 @@ WebInputEventResult EventHandler::handleGestureLongPress(const GestureEventWithH const PlatformGestureEvent& gestureEvent = targetedEvent.event(); IntPoint adjustedPoint = gestureEvent.position(); - unsigned modifiers = gestureEvent.modifiers(); + unsigned modifiers = gestureEvent.getModifiers(); // FIXME: Ideally we should try to remove the extra mouse-specific hit-tests here (re-using the // supplied HitTestResult), but that will require some overhaul of the touch drag-and-drop code @@ -2630,7 +2630,7 @@ void EventHandler::updateGestureTargetNodeForMouseEvent(const GestureEventWithHi } const PlatformGestureEvent& gestureEvent = targetedEvent.event(); - unsigned modifiers = gestureEvent.modifiers(); + unsigned modifiers = gestureEvent.getModifiers(); PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(), NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0, static_cast<PlatformEvent::Modifiers>(modifiers), @@ -2727,7 +2727,7 @@ GestureEventWithHitTestResults EventHandler::hitTestResultForGestureEvent(const return GestureEventWithHitTestResults(adjustedEvent, hitTestResult); } -HitTestRequest::HitTestRequestType EventHandler::getHitTypeForGestureType(PlatformEvent::Type type) +HitTestRequest::HitTestRequestType EventHandler::getHitTypeForGestureType(PlatformEvent::EventType type) { HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent; switch (type) { @@ -2861,7 +2861,7 @@ WebInputEventResult EventHandler::sendContextMenuEventForKey(Element* overrideTa // The contextmenu event is a mouse event even when invoked using the keyboard. // This is required for web compatibility. - PlatformEvent::Type eventType = PlatformEvent::MousePressed; + PlatformEvent::EventType eventType = PlatformEvent::MousePressed; if (m_frame->settings() && m_frame->settings()->showContextMenuOnMouseUp()) eventType = PlatformEvent::MouseReleased; @@ -2876,7 +2876,7 @@ WebInputEventResult EventHandler::sendContextMenuEventForKey(Element* overrideTa WebInputEventResult EventHandler::sendContextMenuEventForGesture(const GestureEventWithHitTestResults& targetedEvent) { const PlatformGestureEvent& gestureEvent = targetedEvent.event(); - unsigned modifiers = gestureEvent.modifiers(); + unsigned modifiers = gestureEvent.getModifiers(); // Send MouseMoved event prior to handling (https://crbug.com/485290). PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(), @@ -2885,7 +2885,7 @@ WebInputEventResult EventHandler::sendContextMenuEventForGesture(const GestureEv PlatformMouseEvent::FromTouch, gestureEvent.timestamp(), WebPointerProperties::PointerType::Mouse); dispatchMouseEvent(EventTypeNames::mousemove, targetedEvent.hitTestResult().innerNode(), 0, fakeMouseMove); - PlatformEvent::Type eventType = PlatformEvent::MousePressed; + PlatformEvent::EventType eventType = PlatformEvent::MousePressed; if (m_frame->settings() && m_frame->settings()->showContextMenuOnMouseUp()) eventType = PlatformEvent::MouseReleased; @@ -3053,7 +3053,7 @@ bool EventHandler::handleAccessKey(const PlatformKeyboardEvent& evt) // lower case variants are present in a document, the correct element is matched based on Shift key state. // Firefox only matches an access key if Shift is not pressed, and does that case-insensitively. ASSERT(!(accessKeyModifiers() & PlatformEvent::ShiftKey)); - if ((evt.modifiers() & (PlatformEvent::KeyModifiers & ~PlatformEvent::ShiftKey)) != accessKeyModifiers()) + if ((evt.getModifiers() & (PlatformEvent::KeyModifiers & ~PlatformEvent::ShiftKey)) != accessKeyModifiers()) return false; String key = evt.unmodifiedText(); Element* elem = m_frame->document()->getElementByAccessKey(key.lower()); @@ -3573,7 +3573,7 @@ void EventHandler::dispatchPointerEvents(const PlatformTouchEvent& event, WebInputEventResult result = m_pointerEventManager.sendTouchPointerEvent( - touchInfo.touchTarget, touchPoint, event.modifiers(), + touchInfo.touchTarget, touchPoint, event.getModifiers(), touchInfo.adjustedRadius.width(), touchInfo.adjustedRadius.height(), touchInfo.adjustedPagePoint.x(), touchInfo.adjustedPagePoint.y()); touchInfo.consumed = result != WebInputEventResult::NotHandled; @@ -3588,7 +3588,7 @@ void EventHandler::sendPointerCancels(WillBeHeapVector<TouchInfo>& touchInfos) for (unsigned i = 0; i < touchInfos.size(); ++i) { TouchInfo& touchInfo = touchInfos[i]; const PlatformTouchPoint& point = touchInfo.point; - const PlatformTouchPoint::State pointState = point.state(); + const PlatformTouchPoint::TouchState pointState = point.state(); if (pointState == PlatformTouchPoint::TouchReleased || pointState == PlatformTouchPoint::TouchCancelled) @@ -3645,7 +3645,7 @@ WebInputEventResult EventHandler::dispatchTouchEvents(const PlatformTouchEvent& for (unsigned i = 0; i < touchInfos.size(); ++i) { const TouchInfo& touchInfo = touchInfos[i]; const PlatformTouchPoint& point = touchInfo.point; - PlatformTouchPoint::State pointState = point.state(); + PlatformTouchPoint::TouchState pointState = point.state(); if (touchInfo.consumed) continue; @@ -3703,13 +3703,13 @@ WebInputEventResult EventHandler::dispatchTouchEvents(const PlatformTouchEvent& if (!changedTouches[state].m_touches) continue; - const AtomicString& eventName(touchEventNameForTouchPointState(static_cast<PlatformTouchPoint::State>(state))); + const AtomicString& eventName(touchEventNameForTouchPointState(static_cast<PlatformTouchPoint::TouchState>(state))); for (const auto& eventTarget : changedTouches[state].m_targets) { EventTarget* touchEventTarget = eventTarget.get(); RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create( touches.get(), touchesByTarget.get(touchEventTarget), changedTouches[state].m_touches.get(), eventName, touchEventTarget->toNode()->document().domWindow(), - event.modifiers(), event.cancelable(), event.causesScrollingIfUncanceled(), event.timestamp()); + event.getModifiers(), event.cancelable(), event.causesScrollingIfUncanceled(), event.timestamp()); eventResult = mergeEventResult(eventResult, toWebInputEventResult(touchEventTarget->dispatchEvent(touchEvent.get()))); } @@ -3828,7 +3828,7 @@ WebInputEventResult EventHandler::handleTouchEvent(const PlatformTouchEvent& eve for (unsigned i = 0; i < points.size(); ++i) { const PlatformTouchPoint& point = points[i]; - PlatformTouchPoint::State pointState = point.state(); + PlatformTouchPoint::TouchState pointState = point.state(); RefPtrWillBeRawPtr<EventTarget> touchTarget = nullptr; if (pointState == PlatformTouchPoint::TouchReleased || pointState == PlatformTouchPoint::TouchCancelled) { diff --git a/third_party/WebKit/Source/core/input/EventHandler.h b/third_party/WebKit/Source/core/input/EventHandler.h index f161bc0..c93fb13 100644 --- a/third_party/WebKit/Source/core/input/EventHandler.h +++ b/third_party/WebKit/Source/core/input/EventHandler.h @@ -238,7 +238,7 @@ private: WebInputEventResult handleMouseDraggedEvent(const MouseEventWithHitTestResults&); WebInputEventResult handleMouseReleaseEvent(const MouseEventWithHitTestResults&); - HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::Type); + HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::EventType); void applyTouchAdjustment(PlatformGestureEvent*, HitTestResult*); WebInputEventResult handleGestureTap(const GestureEventWithHitTestResults&); WebInputEventResult handleGestureLongPress(const GestureEventWithHitTestResults&); diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp index a61ca1d..459f2f4 100644 --- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp +++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp @@ -12,7 +12,7 @@ namespace blink { namespace { -const AtomicString& pointerEventNameForTouchPointState(PlatformTouchPoint::State state) +const AtomicString& pointerEventNameForTouchPointState(PlatformTouchPoint::TouchState state) { switch (state) { case PlatformTouchPoint::TouchReleased: diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp index e474f02..1d2b45e 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp @@ -71,7 +71,7 @@ unsigned GetEventModifiers(int modifiers) class SyntheticInspectorTouchPoint : public blink::PlatformTouchPoint { public: - SyntheticInspectorTouchPoint(int id, State state, const blink::IntPoint& screenPos, const blink::IntPoint& pos, int radiusX, int radiusY, double rotationAngle, double force) + SyntheticInspectorTouchPoint(int id, TouchState state, const blink::IntPoint& screenPos, const blink::IntPoint& pos, int radiusX, int radiusY, double rotationAngle, double force) { m_pointerProperties.id = id; m_screenPos = screenPos; @@ -85,7 +85,7 @@ public: class SyntheticInspectorTouchEvent : public blink::PlatformTouchEvent { public: - SyntheticInspectorTouchEvent(const blink::PlatformEvent::Type type, unsigned modifiers, double timestamp) + SyntheticInspectorTouchEvent(const blink::PlatformEvent::EventType type, unsigned modifiers, double timestamp) { m_type = type; m_modifiers = modifiers; @@ -120,7 +120,7 @@ InspectorInputAgent::~InspectorInputAgent() void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const protocol::Maybe<int>& modifiers, const protocol::Maybe<double>& timestamp) { - PlatformEvent::Type convertedType; + PlatformEvent::EventType convertedType; if (type == "touchStart") { convertedType = PlatformEvent::TouchStart; } else if (type == "touchEnd") { @@ -158,7 +158,7 @@ void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& t return; } - PlatformTouchPoint::State convertedState; + PlatformTouchPoint::TouchState convertedState; String state = point->getState(); if (state == "touchPressed") { convertedState = PlatformTouchPoint::TouchPressed; diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp index e1d6058..575cc87 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp @@ -309,7 +309,7 @@ static PassOwnPtr<protocol::Network::Response> buildObjectForResourceResponse(co int64_t encodedDataLength = response.resourceLoadInfo() ? response.resourceLoadInfo()->encodedDataLength : -1; String securityState = protocol::Security::SecurityStateEnum::Unknown; - switch (response.securityStyle()) { + switch (response.getSecurityStyle()) { case ResourceResponse::SecurityStyleUnknown: securityState = protocol::Security::SecurityStateEnum::Unknown; break; @@ -386,8 +386,8 @@ static PassOwnPtr<protocol::Network::Response> buildObjectForResourceResponse(co } responseObject->setProtocol(protocol); - if (response.securityStyle() != ResourceResponse::SecurityStyleUnknown - && response.securityStyle() != ResourceResponse::SecurityStyleUnauthenticated) { + if (response.getSecurityStyle() != ResourceResponse::SecurityStyleUnknown + && response.getSecurityStyle() != ResourceResponse::SecurityStyleUnauthenticated) { const ResourceResponse::SecurityDetails* responseSecurityDetails = response.securityDetails(); diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp index 5ea16dd..cceb340 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp @@ -440,7 +440,7 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru float measuredWidth = 0; FloatRect glyphBounds; - bool kerningIsEnabled = font.fontDescription().typesettingFeatures() & Kerning; + bool kerningIsEnabled = font.fontDescription().getTypesettingFeatures() & Kerning; #if OS(MACOSX) // FIXME: Having any font feature settings enabled can lead to selection gaps on diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp index bdb9ade..bd601f5 100644 --- a/third_party/WebKit/Source/core/layout/LayoutText.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp @@ -1006,7 +1006,7 @@ void LayoutText::computePreferredLogicalWidths(float leadWidth, HashSet<const Si // Non-zero only when kerning is enabled, in which case we measure words with their trailing // space, then subtract its width. float wordTrailingSpaceWidth = 0; - if (isSpace && (f.fontDescription().typesettingFeatures() & Kerning)) { + if (isSpace && (f.fontDescription().getTypesettingFeatures() & Kerning)) { ASSERT(textDirection >=0 && textDirection <= 1); if (!cachedWordTrailingSpaceWidth[textDirection]) cachedWordTrailingSpaceWidth[textDirection] = f.width(constructTextRun(f, &spaceCharacter, 1, styleToUse, textDirection)) + wordSpacing; diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp index 19a9d30..da338ac 100644 --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp @@ -227,7 +227,7 @@ PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin void CompositedLayerMapping::createPrimaryGraphicsLayer() { - m_graphicsLayer = createGraphicsLayer(m_owningLayer.getCompositingReasons(), m_owningLayer.squashingDisallowedReasons()); + m_graphicsLayer = createGraphicsLayer(m_owningLayer.getCompositingReasons(), m_owningLayer.getSquashingDisallowedReasons()); updateOpacity(layoutObject()->styleRef()); updateTransform(layoutObject()->styleRef()); @@ -347,7 +347,7 @@ void CompositedLayerMapping::updateCompositingReasons() // All other layers owned by this mapping will have the same compositing reason // for their lifetime, so they are initialized only when created. m_graphicsLayer->setCompositingReasons(m_owningLayer.getCompositingReasons()); - m_graphicsLayer->setSquashingDisallowedReasons(m_owningLayer.squashingDisallowedReasons()); + m_graphicsLayer->setSquashingDisallowedReasons(m_owningLayer.getSquashingDisallowedReasons()); } bool CompositedLayerMapping::owningLayerClippedByLayerNotAboveCompositedAncestor(const PaintLayer* scrollParent) diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h index 0287260..3f37833 100644 --- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h +++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h @@ -602,7 +602,7 @@ inline bool BreakingContext::handleText(WordMeasurements& wordMeasurements, bool // Non-zero only when kerning is enabled, in which case we measure // words with their trailing space, then subtract its width. - float wordTrailingSpaceWidth = (font.fontDescription().typesettingFeatures() & Kerning) ? + float wordTrailingSpaceWidth = (font.fontDescription().getTypesettingFeatures() & Kerning) ? font.width(constructTextRun(font, &spaceCharacter, 1, style, style.direction())) + wordSpacing : 0; diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp index 12f4825..4bd3c40 100644 --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp @@ -105,7 +105,7 @@ void FrameFetchContext::addAdditionalRequestHeaders(ResourceRequest& request, Fe outgoingOrigin = m_document->securityOrigin(); request.setHTTPReferrer(SecurityPolicy::generateReferrer(m_document->getReferrerPolicy(), request.url(), m_document->outgoingReferrer())); } else { - RELEASE_ASSERT(SecurityPolicy::generateReferrer(request.referrerPolicy(), request.url(), request.httpReferrer()).referrer == request.httpReferrer()); + RELEASE_ASSERT(SecurityPolicy::generateReferrer(request.getReferrerPolicy(), request.url(), request.httpReferrer()).referrer == request.httpReferrer()); outgoingOrigin = SecurityOrigin::createFromString(request.httpReferrer()); } diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp index 12a6e1a..6b0a1d0 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp @@ -369,7 +369,7 @@ void FrameLoader::setHistoryItemStateForCommit(HistoryCommitType historyCommitTy m_currentItem->setURL(m_documentLoader->urlForHistory()); m_currentItem->setDocumentState(m_frame->document()->formElementsState()); m_currentItem->setTarget(m_frame->tree().uniqueName()); - m_currentItem->setReferrer(SecurityPolicy::generateReferrer(m_documentLoader->request().referrerPolicy(), m_currentItem->url(), m_documentLoader->request().httpReferrer())); + m_currentItem->setReferrer(SecurityPolicy::generateReferrer(m_documentLoader->request().getReferrerPolicy(), m_currentItem->url(), m_documentLoader->request().httpReferrer())); m_currentItem->setFormInfoFromRequest(m_documentLoader->request()); // Don't propagate state from the old item to the new item if there isn't an old item (obviously), diff --git a/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp b/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp index f183593..5240e44 100644 --- a/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp +++ b/third_party/WebKit/Source/core/paint/FilterEffectBuilder.cpp @@ -225,7 +225,7 @@ bool FilterEffectBuilder::build(Element* element, const FilterOperations& operat float stdDeviation = dropShadowOperation->stdDeviation(); float x = dropShadowOperation->x(); float y = dropShadowOperation->y(); - effect = FEDropShadow::create(parentFilter.get(), stdDeviation, stdDeviation, x, y, dropShadowOperation->color(), 1); + effect = FEDropShadow::create(parentFilter.get(), stdDeviation, stdDeviation, x, y, dropShadowOperation->getColor(), 1); break; } default: diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.h b/third_party/WebKit/Source/core/paint/PaintLayer.h index 8c45370..23adb3e 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayer.h +++ b/third_party/WebKit/Source/core/paint/PaintLayer.h @@ -596,7 +596,7 @@ public: CompositingReasons getCompositingReasons() const { ASSERT(isAllowedToQueryCompositingState()); return m_rareData ? m_rareData->compositingReasons : CompositingReasonNone; } void setCompositingReasons(CompositingReasons, CompositingReasons mask = CompositingReasonAll); - SquashingDisallowedReasons squashingDisallowedReasons() const { ASSERT(isAllowedToQueryCompositingState()); return m_rareData ? m_rareData->squashingDisallowedReasons : SquashingDisallowedReasonsNone; } + SquashingDisallowedReasons getSquashingDisallowedReasons() const { ASSERT(isAllowedToQueryCompositingState()); return m_rareData ? m_rareData->squashingDisallowedReasons : SquashingDisallowedReasonsNone; } void setSquashingDisallowedReasons(SquashingDisallowedReasons); bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingState()); return m_hasCompositingDescendant; } diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp index 7c4b0a7..9d61e7c 100644 --- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp +++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp @@ -176,7 +176,7 @@ void MediaStreamTrack::sourceChangedState() if (ended()) return; - m_readyState = m_component->source()->readyState(); + m_readyState = m_component->source()->getReadyState(); switch (m_readyState) { case MediaStreamSource::ReadyStateLive: m_component->setMuted(false); diff --git a/third_party/WebKit/Source/platform/CalculationValue.h b/third_party/WebKit/Source/platform/CalculationValue.h index f678662..9ec1c61 100644 --- a/third_party/WebKit/Source/platform/CalculationValue.h +++ b/third_party/WebKit/Source/platform/CalculationValue.h @@ -53,10 +53,10 @@ public: } bool operator==(const CalculationValue& o) const { return pixels() == o.pixels() && percent() == o.percent(); } bool isNonNegative() const { return m_isNonNegative; } - ValueRange valueRange() const { return m_isNonNegative ? ValueRangeNonNegative : ValueRangeAll; } + ValueRange getValueRange() const { return m_isNonNegative ? ValueRangeNonNegative : ValueRangeAll; } float pixels() const { return m_value.pixels; } float percent() const { return m_value.percent; } - PixelsAndPercent pixelsAndPercent() const { return m_value; } + PixelsAndPercent getPixelsAndPercent() const { return m_value; } private: CalculationValue(PixelsAndPercent value, ValueRange range) diff --git a/third_party/WebKit/Source/platform/DateComponents.h b/third_party/WebKit/Source/platform/DateComponents.h index 99523ba..980ca0f 100644 --- a/third_party/WebKit/Source/platform/DateComponents.h +++ b/third_party/WebKit/Source/platform/DateComponents.h @@ -80,7 +80,7 @@ public: int month() const { return m_month; } int fullYear() const { return m_year; } int week() const { return m_week; } - Type type() const { return m_type; } + Type getType() const { return m_type; } enum SecondFormat { None, // Suppress the second part and the millisecond part if they are 0. diff --git a/third_party/WebKit/Source/platform/Decimal.cpp b/third_party/WebKit/Source/platform/Decimal.cpp index c816ab7..9bd5c20 100644 --- a/third_party/WebKit/Source/platform/Decimal.cpp +++ b/third_party/WebKit/Source/platform/Decimal.cpp @@ -87,8 +87,8 @@ SpecialValueHandler::HandleResult SpecialValueHandler::handle() if (m_lhs.isFinite() && m_rhs.isFinite()) return BothFinite; - const Decimal::EncodedData::FormatClass lhsClass = m_lhs.value().formatClass(); - const Decimal::EncodedData::FormatClass rhsClass = m_rhs.value().formatClass(); + const Decimal::EncodedData::FormatClass lhsClass = m_lhs.value().getFormatClass(); + const Decimal::EncodedData::FormatClass rhsClass = m_rhs.value().getFormatClass(); if (lhsClass == Decimal::EncodedData::ClassNaN) { m_result = ResultIsLHS; return EitherNaN; @@ -332,15 +332,15 @@ Decimal Decimal::operator-() const return *this; Decimal result(*this); - result.m_data.setSign(invertSign(m_data.sign())); + result.m_data.setSign(invertSign(m_data.getSign())); return result; } Decimal Decimal::operator+(const Decimal& rhs) const { const Decimal& lhs = *this; - const Sign lhsSign = lhs.sign(); - const Sign rhsSign = rhs.sign(); + const Sign lhsSign = lhs.getSign(); + const Sign rhsSign = rhs.getSign(); SpecialValueHandler handler(lhs, rhs); switch (handler.handle()) { @@ -377,8 +377,8 @@ Decimal Decimal::operator+(const Decimal& rhs) const Decimal Decimal::operator-(const Decimal& rhs) const { const Decimal& lhs = *this; - const Sign lhsSign = lhs.sign(); - const Sign rhsSign = rhs.sign(); + const Sign lhsSign = lhs.getSign(); + const Sign rhsSign = rhs.getSign(); SpecialValueHandler handler(lhs, rhs); switch (handler.handle()) { @@ -415,8 +415,8 @@ Decimal Decimal::operator-(const Decimal& rhs) const Decimal Decimal::operator*(const Decimal& rhs) const { const Decimal& lhs = *this; - const Sign lhsSign = lhs.sign(); - const Sign rhsSign = rhs.sign(); + const Sign lhsSign = lhs.getSign(); + const Sign rhsSign = rhs.getSign(); const Sign resultSign = lhsSign == rhsSign ? Positive : Negative; SpecialValueHandler handler(lhs, rhs); @@ -453,8 +453,8 @@ Decimal Decimal::operator*(const Decimal& rhs) const Decimal Decimal::operator/(const Decimal& rhs) const { const Decimal& lhs = *this; - const Sign lhsSign = lhs.sign(); - const Sign rhsSign = rhs.sign(); + const Sign lhsSign = lhs.getSign(); + const Sign rhsSign = rhs.getSign(); const Sign resultSign = lhsSign == rhsSign ? Positive : Negative; SpecialValueHandler handler(lhs, rhs); @@ -640,13 +640,13 @@ Decimal Decimal::ceil() const result = scaleDown(result, numberOfDropDigits); if (isPositive() && !isMultiplePowersOfTen(m_data.coefficient(), numberOfDropDigits)) ++result; - return Decimal(sign(), 0, result); + return Decimal(getSign(), 0, result); } Decimal Decimal::compareTo(const Decimal& rhs) const { const Decimal result(*this - rhs); - switch (result.m_data.formatClass()) { + switch (result.m_data.getFormatClass()) { case EncodedData::ClassInfinity: return result.isNegative() ? Decimal(-1) : Decimal(1); @@ -681,7 +681,7 @@ Decimal Decimal::floor() const result = scaleDown(result, numberOfDropDigits); if (isNegative() && !isMultiplePowersOfTen(m_data.coefficient(), numberOfDropDigits)) ++result; - return Decimal(sign(), 0, result); + return Decimal(getSign(), 0, result); } Decimal Decimal::fromDouble(double doubleValue) @@ -921,7 +921,7 @@ Decimal Decimal::round() const if (result % 10 >= 5) result += 10; result /= 10; - return Decimal(sign(), 0, result); + return Decimal(getSign(), 0, result); } double Decimal::toDouble() const @@ -940,9 +940,9 @@ double Decimal::toDouble() const String Decimal::toString() const { - switch (m_data.formatClass()) { + switch (m_data.getFormatClass()) { case EncodedData::ClassInfinity: - return sign() ? "-Infinity" : "Infinity"; + return getSign() ? "-Infinity" : "Infinity"; case EncodedData::ClassNaN: return "NaN"; @@ -957,7 +957,7 @@ String Decimal::toString() const } StringBuilder builder; - if (sign()) + if (getSign()) builder.append('-'); int originalExponent = exponent(); diff --git a/third_party/WebKit/Source/platform/Decimal.h b/third_party/WebKit/Source/platform/Decimal.h index be09f90..19851af 100644 --- a/third_party/WebKit/Source/platform/Decimal.h +++ b/third_party/WebKit/Source/platform/Decimal.h @@ -76,7 +76,7 @@ public: bool isNaN() const { return m_formatClass == ClassNaN; } bool isSpecial() const { return m_formatClass == ClassInfinity || m_formatClass == ClassNaN; } bool isZero() const { return m_formatClass == ClassZero; } - Sign sign() const { return m_sign; } + Sign getSign() const { return m_sign; } void setSign(Sign sign) { m_sign = sign; } private: @@ -88,7 +88,7 @@ public: }; EncodedData(Sign, FormatClass); - FormatClass formatClass() const { return m_formatClass; } + FormatClass getFormatClass() const { return m_formatClass; } uint64_t m_coefficient; int16_t m_exponent; @@ -129,8 +129,8 @@ public: bool isFinite() const { return m_data.isFinite(); } bool isInfinity() const { return m_data.isInfinity(); } bool isNaN() const { return m_data.isNaN(); } - bool isNegative() const { return sign() == Negative; } - bool isPositive() const { return sign() == Positive; } + bool isNegative() const { return getSign() == Negative; } + bool isPositive() const { return getSign() == Positive; } bool isSpecial() const { return m_data.isSpecial(); } bool isZero() const { return m_data.isZero(); } @@ -174,7 +174,7 @@ private: static AlignedOperands alignOperands(const Decimal& lhs, const Decimal& rhs); static inline Sign invertSign(Sign sign) { return sign == Negative ? Positive : Negative; } - Sign sign() const { return m_data.sign(); } + Sign getSign() const { return m_data.getSign(); } EncodedData m_data; }; diff --git a/third_party/WebKit/Source/platform/DecimalTest.cpp b/third_party/WebKit/Source/platform/DecimalTest.cpp index 122137a..886ecc6 100644 --- a/third_party/WebKit/Source/platform/DecimalTest.cpp +++ b/third_party/WebKit/Source/platform/DecimalTest.cpp @@ -43,7 +43,7 @@ std::ostream& operator<<(std::ostream& os, const Decimal& decimal) return os << "encode(" << String::number(data.coefficient()).ascii().data() << ", " << String::number(data.exponent()).ascii().data() - << ", " << (data.sign() == Decimal::Negative ? "Negative" : "Positive") + << ", " << (data.getSign() == Decimal::Negative ? "Negative" : "Positive") << ")=" << decimal.toString().ascii().data(); } @@ -112,7 +112,7 @@ protected: #define EXPECT_DECIMAL_ENCODED_DATA_EQ(expectedCoefficient, expectedExponent, expectedSign, decimal) \ EXPECT_EQ((expectedCoefficient), (decimal).value().coefficient()); \ EXPECT_EQ((expectedExponent), (decimal).value().exponent()); \ - EXPECT_EQ(Decimal::expectedSign, (decimal).value().sign()); + EXPECT_EQ(Decimal::expectedSign, (decimal).value().getSign()); #define EXPECT_DECIMAL_STREQ(expected, decimal) EXPECT_STREQ((expected), (decimal).toString().ascii().data()) diff --git a/third_party/WebKit/Source/platform/JSONValues.cpp b/third_party/WebKit/Source/platform/JSONValues.cpp index 3b1ef7b..a929064 100644 --- a/third_party/WebKit/Source/platform/JSONValues.cpp +++ b/third_party/WebKit/Source/platform/JSONValues.cpp @@ -169,7 +169,7 @@ void JSONValue::prettyWriteJSONInternal(StringBuilder* output, int depth) const bool JSONBasicValue::asBoolean(bool* output) const { - if (type() != TypeBoolean) + if (getType() != TypeBoolean) return false; *output = m_boolValue; return true; @@ -177,7 +177,7 @@ bool JSONBasicValue::asBoolean(bool* output) const bool JSONBasicValue::asNumber(double* output) const { - if (type() != TypeNumber) + if (getType() != TypeNumber) return false; *output = m_doubleValue; return true; @@ -185,7 +185,7 @@ bool JSONBasicValue::asNumber(double* output) const bool JSONBasicValue::asNumber(long* output) const { - if (type() != TypeNumber) + if (getType() != TypeNumber) return false; *output = static_cast<long>(m_doubleValue); return true; @@ -193,7 +193,7 @@ bool JSONBasicValue::asNumber(long* output) const bool JSONBasicValue::asNumber(int* output) const { - if (type() != TypeNumber) + if (getType() != TypeNumber) return false; *output = static_cast<int>(m_doubleValue); return true; @@ -201,7 +201,7 @@ bool JSONBasicValue::asNumber(int* output) const bool JSONBasicValue::asNumber(unsigned long* output) const { - if (type() != TypeNumber) + if (getType() != TypeNumber) return false; *output = static_cast<unsigned long>(m_doubleValue); return true; @@ -209,7 +209,7 @@ bool JSONBasicValue::asNumber(unsigned long* output) const bool JSONBasicValue::asNumber(unsigned* output) const { - if (type() != TypeNumber) + if (getType() != TypeNumber) return false; *output = static_cast<unsigned>(m_doubleValue); return true; @@ -217,13 +217,13 @@ bool JSONBasicValue::asNumber(unsigned* output) const void JSONBasicValue::writeJSON(StringBuilder* output) const { - ASSERT(type() == TypeBoolean || type() == TypeNumber); - if (type() == TypeBoolean) { + ASSERT(getType() == TypeBoolean || getType() == TypeNumber); + if (getType() == TypeBoolean) { if (m_boolValue) output->append(trueString, 4); else output->append(falseString, 5); - } else if (type() == TypeNumber) { + } else if (getType() == TypeNumber) { if (!std::isfinite(m_doubleValue)) { output->append(nullString, 4); return; @@ -240,7 +240,7 @@ bool JSONString::asString(String* output) const void JSONString::writeJSON(StringBuilder* output) const { - ASSERT(type() == TypeString); + ASSERT(getType() == TypeString); doubleQuoteStringForJSON(m_stringValue, output); } @@ -406,7 +406,7 @@ void JSONArray::prettyWriteJSONInternal(StringBuilder* output, int depth) const output->append('['); bool lastInsertedNewLine = false; for (Vector<RefPtr<JSONValue>>::const_iterator it = m_data.begin(); it != m_data.end(); ++it) { - bool insertNewLine = (*it)->type() == JSONValue::TypeObject || (*it)->type() == JSONValue::TypeArray || (*it)->type() == JSONValue::TypeString; + bool insertNewLine = (*it)->getType() == JSONValue::TypeObject || (*it)->getType() == JSONValue::TypeArray || (*it)->getType() == JSONValue::TypeString; if (it == m_data.begin()) { if (insertNewLine) { output->append('\n'); diff --git a/third_party/WebKit/Source/platform/JSONValues.h b/third_party/WebKit/Source/platform/JSONValues.h index a6cf1dd..1789d422 100644 --- a/third_party/WebKit/Source/platform/JSONValues.h +++ b/third_party/WebKit/Source/platform/JSONValues.h @@ -72,7 +72,7 @@ public: TypeArray } Type; - Type type() const { return m_type; } + Type getType() const { return m_type; } bool isNull() const { return m_type == TypeNull; } @@ -179,7 +179,7 @@ public: static PassRefPtr<JSONObject> cast(PassRefPtr<JSONValue> value) { - if (!value || value->type() != TypeObject) + if (!value || value->getType() != TypeObject) return nullptr; return adoptRef(static_cast<JSONObject*>(value.leakRef())); } @@ -242,7 +242,7 @@ public: static PassRefPtr<JSONArray> cast(PassRefPtr<JSONValue> value) { - if (!value || value->type() != TypeArray) + if (!value || value->getType() != TypeArray) return nullptr; return adoptRef(static_cast<JSONArray*>(value.leakRef())); } diff --git a/third_party/WebKit/Source/platform/Length.cpp b/third_party/WebKit/Source/platform/Length.cpp index 05efe30..1abe41bd 100644 --- a/third_party/WebKit/Source/platform/Length.cpp +++ b/third_party/WebKit/Source/platform/Length.cpp @@ -102,14 +102,14 @@ Length Length::blendMixedTypes(const Length& from, double progress, ValueRange r { ASSERT(from.isSpecified()); ASSERT(isSpecified()); - PixelsAndPercent fromPixelsAndPercent = from.pixelsAndPercent(); - PixelsAndPercent toPixelsAndPercent = pixelsAndPercent(); + PixelsAndPercent fromPixelsAndPercent = from.getPixelsAndPercent(); + PixelsAndPercent toPixelsAndPercent = getPixelsAndPercent(); const float pixels = blink::blend(fromPixelsAndPercent.pixels, toPixelsAndPercent.pixels, progress); const float percent = blink::blend(fromPixelsAndPercent.percent, toPixelsAndPercent.percent, progress); return Length(CalculationValue::create(PixelsAndPercent(pixels, percent), range)); } -PixelsAndPercent Length::pixelsAndPercent() const +PixelsAndPercent Length::getPixelsAndPercent() const { switch (type()) { case Fixed: @@ -117,7 +117,7 @@ PixelsAndPercent Length::pixelsAndPercent() const case Percent: return PixelsAndPercent(0, value()); case Calculated: - return calculationValue().pixelsAndPercent(); + return getCalculationValue().getPixelsAndPercent(); default: ASSERT_NOT_REACHED(); return PixelsAndPercent(0, 0); @@ -126,7 +126,7 @@ PixelsAndPercent Length::pixelsAndPercent() const Length Length::subtractFromOneHundredPercent() const { - PixelsAndPercent result = pixelsAndPercent(); + PixelsAndPercent result = getPixelsAndPercent(); result.pixels = -result.pixels; result.percent = 100 - result.percent; if (result.pixels && result.percent) @@ -142,16 +142,16 @@ Length Length::zoom(double factor) const case Fixed: return Length(getFloatValue() * factor, Fixed); case Calculated: { - PixelsAndPercent result = pixelsAndPercent(); + PixelsAndPercent result = getPixelsAndPercent(); result.pixels *= factor; - return Length(CalculationValue::create(result, calculationValue().valueRange())); + return Length(CalculationValue::create(result, getCalculationValue().getValueRange())); } default: return *this; } } -CalculationValue& Length::calculationValue() const +CalculationValue& Length::getCalculationValue() const { ASSERT(isCalculated()); return calcHandles().get(calculationHandle()); @@ -160,7 +160,7 @@ CalculationValue& Length::calculationValue() const void Length::incrementCalculatedRef() const { ASSERT(isCalculated()); - calculationValue().ref(); + getCalculationValue().ref(); } void Length::decrementCalculatedRef() const @@ -172,7 +172,7 @@ void Length::decrementCalculatedRef() const float Length::nonNanCalculatedValue(LayoutUnit maxValue) const { ASSERT(isCalculated()); - float result = calculationValue().evaluate(maxValue.toFloat()); + float result = getCalculationValue().evaluate(maxValue.toFloat()); if (std::isnan(result)) return 0; return result; @@ -180,7 +180,7 @@ float Length::nonNanCalculatedValue(LayoutUnit maxValue) const bool Length::isCalculatedEqual(const Length& o) const { - return isCalculated() && (&calculationValue() == &o.calculationValue() || calculationValue() == o.calculationValue()); + return isCalculated() && (&getCalculationValue() == &o.getCalculationValue() || getCalculationValue() == o.getCalculationValue()); } struct SameSizeAsLength { diff --git a/third_party/WebKit/Source/platform/Length.h b/third_party/WebKit/Source/platform/Length.h index fe085d9..6e267fe 100644 --- a/third_party/WebKit/Source/platform/Length.h +++ b/third_party/WebKit/Source/platform/Length.h @@ -172,9 +172,9 @@ public: return getFloatValue(); } - PixelsAndPercent pixelsAndPercent() const; + PixelsAndPercent getPixelsAndPercent() const; - CalculationValue& calculationValue() const; + CalculationValue& getCalculationValue() const; LengthType type() const { return static_cast<LengthType>(m_type); } bool quirk() const { return m_quirk; } diff --git a/third_party/WebKit/Source/platform/PODRedBlackTree.h b/third_party/WebKit/Source/platform/PODRedBlackTree.h index e791558..c17b08b 100644 --- a/third_party/WebKit/Source/platform/PODRedBlackTree.h +++ b/third_party/WebKit/Source/platform/PODRedBlackTree.h @@ -245,7 +245,7 @@ public: } #endif - enum Color { + enum NodeColor { Red = 1, Black }; @@ -269,8 +269,8 @@ public: virtual ~Node() { } - Color color() const { return m_color; } - void setColor(Color color) { m_color = color; } + NodeColor color() const { return m_color; } + void setColor(NodeColor color) { m_color = color; } // Fetches the user data. T& data() { return m_data; } @@ -296,7 +296,7 @@ public: Node* m_left; Node* m_right; Node* m_parent; - Color m_color; + NodeColor m_color; T m_data; }; diff --git a/third_party/WebKit/Source/platform/PlatformEvent.h b/third_party/WebKit/Source/platform/PlatformEvent.h index 065e959..62b6cd2 100644 --- a/third_party/WebKit/Source/platform/PlatformEvent.h +++ b/third_party/WebKit/Source/platform/PlatformEvent.h @@ -34,7 +34,7 @@ namespace blink { class PlatformEvent { DISALLOW_NEW(); public: - enum Type { + enum EventType { NoType = 0, // PlatformKeyboardEvent @@ -121,14 +121,14 @@ public: RailsModeVertical = 2, }; - Type type() const { return static_cast<Type>(m_type); } + EventType type() const { return static_cast<EventType>(m_type); } bool shiftKey() const { return m_modifiers & ShiftKey; } bool ctrlKey() const { return m_modifiers & CtrlKey; } bool altKey() const { return m_modifiers & AltKey; } bool metaKey() const { return m_modifiers & MetaKey; } - Modifiers modifiers() const { return static_cast<Modifiers>(m_modifiers); } + Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers); } double timestamp() const { return m_timestamp; } @@ -140,14 +140,14 @@ protected: { } - explicit PlatformEvent(Type type) + explicit PlatformEvent(EventType type) : m_type(type) , m_modifiers(0) , m_timestamp(0) { } - PlatformEvent(Type type, Modifiers modifiers, double timestamp) + PlatformEvent(EventType type, Modifiers modifiers, double timestamp) : m_type(type) , m_modifiers(modifiers) , m_timestamp(timestamp) diff --git a/third_party/WebKit/Source/platform/PlatformGestureEvent.h b/third_party/WebKit/Source/platform/PlatformGestureEvent.h index a9a1072..350fe9e 100644 --- a/third_party/WebKit/Source/platform/PlatformGestureEvent.h +++ b/third_party/WebKit/Source/platform/PlatformGestureEvent.h @@ -51,7 +51,7 @@ public: memset(&m_data, 0, sizeof(m_data)); } - PlatformGestureEvent(Type type, const IntPoint& position, + PlatformGestureEvent(EventType type, const IntPoint& position, const IntPoint& globalPosition, const IntSize& area, double timestamp, PlatformEvent::Modifiers modifiers, PlatformGestureSource source) : PlatformEvent(type, modifiers, timestamp) diff --git a/third_party/WebKit/Source/platform/PlatformKeyboardEvent.cpp b/third_party/WebKit/Source/platform/PlatformKeyboardEvent.cpp index a895fb7..191cba1 100644 --- a/third_party/WebKit/Source/platform/PlatformKeyboardEvent.cpp +++ b/third_party/WebKit/Source/platform/PlatformKeyboardEvent.cpp @@ -43,7 +43,7 @@ static const unsigned short HIGHBITMASKSHORT = 0x8000; PlatformKeyboardEvent::OverrideCapsLockState PlatformKeyboardEvent::s_overrideCapsLockState = PlatformKeyboardEvent::OverrideCapsLockState::Default; -void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type) +void PlatformKeyboardEvent::disambiguateKeyDownEvent(EventType type) { #if OS(WIN) // No KeyDown events on Windows to disambiguate. diff --git a/third_party/WebKit/Source/platform/PlatformKeyboardEvent.h b/third_party/WebKit/Source/platform/PlatformKeyboardEvent.h index a5f2dda..0047caf 100644 --- a/third_party/WebKit/Source/platform/PlatformKeyboardEvent.h +++ b/third_party/WebKit/Source/platform/PlatformKeyboardEvent.h @@ -44,7 +44,7 @@ public: { } - PlatformKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& keyIdentifier, const String& code, const String& key, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isSystemKey, Modifiers modifiers, double timestamp) + PlatformKeyboardEvent(EventType type, const String& text, const String& unmodifiedText, const String& keyIdentifier, const String& code, const String& key, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isSystemKey, Modifiers modifiers, double timestamp) : PlatformEvent(type, modifiers, timestamp) , m_text(text) , m_unmodifiedText(unmodifiedText) @@ -57,7 +57,7 @@ public: { } - PLATFORM_EXPORT void disambiguateKeyDownEvent(Type); + PLATFORM_EXPORT void disambiguateKeyDownEvent(EventType); // Text as as generated by processing a virtual key code with a keyboard layout // (in most cases, just a character code, but the layout can emit several @@ -83,8 +83,8 @@ public: int nativeVirtualKeyCode() const { return m_nativeVirtualKeyCode; } - bool isAutoRepeat() const { return modifiers() & IsAutoRepeat; } - bool isKeypad() const { return modifiers() & IsKeyPad; } + bool isAutoRepeat() const { return getModifiers() & IsAutoRepeat; } + bool isKeypad() const { return getModifiers() & IsKeyPad; } bool isSystemKey() const { return m_isSystemKey; } PLATFORM_EXPORT static bool currentCapsLockState(); diff --git a/third_party/WebKit/Source/platform/PlatformMouseEvent.h b/third_party/WebKit/Source/platform/PlatformMouseEvent.h index 7051f90..b8809b9 100644 --- a/third_party/WebKit/Source/platform/PlatformMouseEvent.h +++ b/third_party/WebKit/Source/platform/PlatformMouseEvent.h @@ -56,7 +56,7 @@ public: { } - PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, int clickCount, Modifiers modifiers, double timestamp) + PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, EventType type, int clickCount, Modifiers modifiers, double timestamp) : PlatformEvent(type, modifiers, timestamp) , m_position(position) , m_globalPosition(globalPosition) @@ -66,7 +66,7 @@ public: { } - PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, int clickCount, Modifiers modifiers, SyntheticEventType synthesized, double timestamp, WebPointerProperties::PointerType pointerType = WebPointerProperties::PointerType::Unknown) + PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, EventType type, int clickCount, Modifiers modifiers, SyntheticEventType synthesized, double timestamp, WebPointerProperties::PointerType pointerType = WebPointerProperties::PointerType::Unknown) : PlatformEvent(type, modifiers, timestamp) , m_position(position) , m_globalPosition(globalPosition) @@ -85,7 +85,7 @@ public: MouseButton button() const { return m_button; } int clickCount() const { return m_clickCount; } bool fromTouch() const { return m_synthesized == FromTouch; } - SyntheticEventType syntheticEventType() const { return m_synthesized; } + SyntheticEventType getSyntheticEventType() const { return m_synthesized; } protected: WebPointerProperties m_pointerProperties; diff --git a/third_party/WebKit/Source/platform/PlatformTouchPoint.h b/third_party/WebKit/Source/platform/PlatformTouchPoint.h index b9071f1..d9d37f4 100644 --- a/third_party/WebKit/Source/platform/PlatformTouchPoint.h +++ b/third_party/WebKit/Source/platform/PlatformTouchPoint.h @@ -27,7 +27,7 @@ namespace blink { class PlatformTouchPoint { public: - enum State { + enum TouchState { TouchReleased, TouchPressed, TouchMoved, @@ -44,7 +44,7 @@ public: const WebPointerProperties& pointerProperties() const { return m_pointerProperties; } int id() const { return pointerProperties().id; } - State state() const { return m_state; } + TouchState state() const { return m_state; } FloatPoint screenPos() const { return m_screenPos; } FloatPoint pos() const { return m_pos; } FloatSize radius() const { return m_radius; } @@ -54,7 +54,7 @@ public: protected: WebPointerProperties m_pointerProperties; - State m_state; + TouchState m_state; FloatPoint m_screenPos; FloatPoint m_pos; FloatSize m_radius; diff --git a/third_party/WebKit/Source/platform/animation/TimingFunction.cpp b/third_party/WebKit/Source/platform/animation/TimingFunction.cpp index 470569e..1b504f0 100644 --- a/third_party/WebKit/Source/platform/animation/TimingFunction.cpp +++ b/third_party/WebKit/Source/platform/animation/TimingFunction.cpp @@ -253,7 +253,7 @@ void CubicBezierTimingFunction::partition(Vector<PartitionRegion>& regions) cons String StepsTimingFunction::toString() const { const char* positionString = nullptr; - switch (stepAtPosition()) { + switch (getStepAtPosition()) { case Start: positionString = "start"; break; @@ -368,7 +368,7 @@ bool operator==(const StepsTimingFunction& lhs, const TimingFunction& rhs) return false; const StepsTimingFunction& stf = toStepsTimingFunction(rhs); - return (lhs.numberOfSteps() == stf.numberOfSteps()) && (lhs.stepAtPosition() == stf.stepAtPosition()); + return (lhs.numberOfSteps() == stf.numberOfSteps()) && (lhs.getStepAtPosition() == stf.getStepAtPosition()); } // The generic operator== *must* come after the diff --git a/third_party/WebKit/Source/platform/animation/TimingFunction.h b/third_party/WebKit/Source/platform/animation/TimingFunction.h index 05a25a3..efea0dc 100644 --- a/third_party/WebKit/Source/platform/animation/TimingFunction.h +++ b/third_party/WebKit/Source/platform/animation/TimingFunction.h @@ -42,13 +42,13 @@ namespace blink { class PLATFORM_EXPORT TimingFunction : public RefCounted<TimingFunction> { public: - enum Type { + enum FunctionType { LinearFunction, CubicBezierFunction, StepsFunction }; virtual ~TimingFunction() { } - Type type() const { return m_type; } + FunctionType type() const { return m_type; } virtual String toString() const = 0; @@ -84,13 +84,13 @@ public: virtual void partition(Vector<PartitionRegion>& regions) const = 0; protected: - TimingFunction(Type type) + TimingFunction(FunctionType type) : m_type(type) { } private: - Type m_type; + FunctionType m_type; }; class PLATFORM_EXPORT LinearTimingFunction final : public TimingFunction { @@ -117,7 +117,7 @@ private: class PLATFORM_EXPORT CubicBezierTimingFunction final : public TimingFunction { public: - enum SubType { + enum FunctionSubType { Ease, EaseIn, EaseOut, @@ -130,7 +130,7 @@ public: return adoptRef(new CubicBezierTimingFunction(Custom, x1, y1, x2, y2)); } - static CubicBezierTimingFunction* preset(SubType subType) + static CubicBezierTimingFunction* preset(FunctionSubType subType) { switch (subType) { case Ease: @@ -172,10 +172,10 @@ public: double x2() const { return m_x2; } double y2() const { return m_y2; } - SubType subType() const { return m_subType; } + FunctionSubType subType() const { return m_subType; } private: - explicit CubicBezierTimingFunction(SubType subType, double x1, double y1, double x2, double y2) + explicit CubicBezierTimingFunction(FunctionSubType subType, double x1, double y1, double x2, double y2) : TimingFunction(CubicBezierFunction) , m_x1(x1) , m_y1(y1) @@ -194,7 +194,7 @@ private: double m_y1; double m_x2; double m_y2; - SubType m_subType; + FunctionSubType m_subType; mutable OwnPtr<UnitBezier> m_bezier; }; @@ -239,7 +239,7 @@ public: void partition(Vector<PartitionRegion>& regions) const override; int numberOfSteps() const { return m_steps; } - StepAtPosition stepAtPosition() const { return m_stepAtPosition; } + StepAtPosition getStepAtPosition() const { return m_stepAtPosition; } private: StepsTimingFunction(int steps, StepAtPosition stepAtPosition) diff --git a/third_party/WebKit/Source/platform/audio/Panner.h b/third_party/WebKit/Source/platform/audio/Panner.h index 84662f0..192ee6a 100644 --- a/third_party/WebKit/Source/platform/audio/Panner.h +++ b/third_party/WebKit/Source/platform/audio/Panner.h @@ -57,8 +57,6 @@ public: virtual ~Panner() { }; - PanningModel panningModel() const { return m_panningModel; } - virtual void pan(double azimuth, double elevation, const AudioBus* inputBus, AudioBus* outputBus, size_t framesToProcess) = 0; virtual void reset() = 0; diff --git a/third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp b/third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp index d3a0421..35c9e22 100644 --- a/third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp +++ b/third_party/WebKit/Source/platform/exported/WebMediaStreamSource.cpp @@ -95,12 +95,12 @@ WebMediaStreamSource::operator MediaStreamSource*() const void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebString& name) { - m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Type>(type), name, false, true); + m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::StreamType>(type), name, false, true); } void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebString& name, bool remote, bool readonly) { - m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Type>(type), name, remote, readonly); + m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::StreamType>(type), name, remote, readonly); } WebString WebMediaStreamSource::id() const @@ -136,7 +136,7 @@ void WebMediaStreamSource::setReadyState(ReadyState state) WebMediaStreamSource::ReadyState WebMediaStreamSource::readyState() const { ASSERT(!m_private.isNull()); - return static_cast<ReadyState>(m_private->readyState()); + return static_cast<ReadyState>(m_private->getReadyState()); } WebMediaStreamSource::ExtraData* WebMediaStreamSource::extraData() const diff --git a/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.cpp b/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.cpp index e100702..3d27900 100644 --- a/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.cpp +++ b/third_party/WebKit/Source/platform/exported/WebScrollbarImpl.cpp @@ -103,7 +103,7 @@ WebScrollbar::ScrollbarPart WebScrollbarImpl::hoveredPart() const WebScrollbar::ScrollbarOverlayStyle WebScrollbarImpl::scrollbarOverlayStyle() const { - return static_cast<WebScrollbar::ScrollbarOverlayStyle>(m_scrollbar->scrollbarOverlayStyle()); + return static_cast<WebScrollbar::ScrollbarOverlayStyle>(m_scrollbar->getScrollbarOverlayStyle()); } WebScrollbar::Orientation WebScrollbarImpl::orientation() const diff --git a/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp b/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp index 55e4ac2..33baebd 100644 --- a/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp +++ b/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.cpp @@ -107,7 +107,7 @@ void WebScrollbarThemeClientImpl::invalidateRect(const IntRect&) ASSERT_NOT_REACHED(); } -ScrollbarOverlayStyle WebScrollbarThemeClientImpl::scrollbarOverlayStyle() const +ScrollbarOverlayStyle WebScrollbarThemeClientImpl::getScrollbarOverlayStyle() const { return static_cast<ScrollbarOverlayStyle>(m_scrollbar.scrollbarOverlayStyle()); } diff --git a/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.h b/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.h index 1cee8c5..f2e7a23 100644 --- a/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.h +++ b/third_party/WebKit/Source/platform/exported/WebScrollbarThemeClientImpl.h @@ -57,7 +57,7 @@ public: IntRect frameRect() const override; void invalidate() override; void invalidateRect(const IntRect&) override; - ScrollbarOverlayStyle scrollbarOverlayStyle() const override; + ScrollbarOverlayStyle getScrollbarOverlayStyle() const override; void getTickmarks(Vector<IntRect>&) const override; bool isScrollableAreaActive() const override; IntPoint convertFromRootFrame(const IntPoint&) const override; diff --git a/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp b/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp index 7f40a7d..400ff5d 100644 --- a/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp +++ b/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp @@ -244,7 +244,7 @@ WebURLRequest::FrameType WebURLRequest::frameType() const WebReferrerPolicy WebURLRequest::referrerPolicy() const { - return static_cast<WebReferrerPolicy>(m_private->m_resourceRequest->referrerPolicy()); + return static_cast<WebReferrerPolicy>(m_private->m_resourceRequest->getReferrerPolicy()); } void WebURLRequest::addHTTPOriginIfNeeded(const WebString& origin) diff --git a/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp b/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp index 4117fc3..bd3472a 100644 --- a/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp +++ b/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp @@ -313,7 +313,7 @@ void WebURLResponse::setHasMajorCertificateErrors(bool value) WebURLResponse::SecurityStyle WebURLResponse::securityStyle() const { - return static_cast<SecurityStyle>(m_private->m_resourceResponse->securityStyle()); + return static_cast<SecurityStyle>(m_private->m_resourceResponse->getSecurityStyle()); } void WebURLResponse::setSecurityStyle(SecurityStyle securityStyle) diff --git a/third_party/WebKit/Source/platform/fonts/Font.cpp b/third_party/WebKit/Source/platform/fonts/Font.cpp index 4028270..1a9fab0 100644 --- a/third_party/WebKit/Source/platform/fonts/Font.cpp +++ b/third_party/WebKit/Source/platform/fonts/Font.cpp @@ -401,7 +401,7 @@ int Font::offsetForPosition(const TextRun& run, float x, bool includePartialGlyp { FontCachePurgePreventer purgePreventer; - if (codePath(TextRunPaintInfo(run)) != ComplexPath && !fontDescription().typesettingFeatures()) + if (codePath(TextRunPaintInfo(run)) != ComplexPath && !fontDescription().getTypesettingFeatures()) return offsetForPositionForSimpleText(run, x, includePartialGlyphs); return offsetForPositionForComplexText(run, x, includePartialGlyphs); @@ -420,7 +420,7 @@ CodePath Font::codePath(const TextRunPaintInfo& runInfo) const const TextRun& run = runInfo.run; - if (fontDescription().typesettingFeatures() && (runInfo.from || runInfo.to != run.length())) + if (fontDescription().getTypesettingFeatures() && (runInfo.from || runInfo.to != run.length())) return ComplexPath; if (m_fontDescription.featureSettings() && m_fontDescription.featureSettings()->size() > 0) @@ -432,7 +432,7 @@ CodePath Font::codePath(const TextRunPaintInfo& runInfo) const if (m_fontDescription.widthVariant() != RegularWidth) return ComplexPath; - if (run.length() > 1 && fontDescription().typesettingFeatures()) + if (run.length() > 1 && fontDescription().getTypesettingFeatures()) return ComplexPath; // FIXME: This really shouldn't be needed but for some reason the @@ -459,11 +459,11 @@ bool Font::canShapeWordByWord() const bool Font::computeCanShapeWordByWord() const { - if (!fontDescription().typesettingFeatures()) + if (!fontDescription().getTypesettingFeatures()) return true; const FontPlatformData& platformData = primaryFont()->platformData(); - TypesettingFeatures features = fontDescription().typesettingFeatures(); + TypesettingFeatures features = fontDescription().getTypesettingFeatures(); return !platformData.hasSpaceInLigaturesOrKerning(features); }; diff --git a/third_party/WebKit/Source/platform/fonts/FontDescription.cpp b/third_party/WebKit/Source/platform/fonts/FontDescription.cpp index 2008681..b5ed816 100644 --- a/third_party/WebKit/Source/platform/fonts/FontDescription.cpp +++ b/third_party/WebKit/Source/platform/fonts/FontDescription.cpp @@ -203,7 +203,7 @@ void FontDescription::updateTypesettingFeatures() break; } - switch (kerning()) { + switch (getKerning()) { case FontDescription::NoneKerning: m_fields.m_typesettingFeatures &= ~blink::Kerning; break; diff --git a/third_party/WebKit/Source/platform/fonts/FontDescription.h b/third_party/WebKit/Source/platform/fonts/FontDescription.h index 2fb85ef..38c5155 100644 --- a/third_party/WebKit/Source/platform/fonts/FontDescription.h +++ b/third_party/WebKit/Source/platform/fonts/FontDescription.h @@ -135,9 +135,9 @@ public: }; const FontFamily& family() const { return m_familyList; } - FamilyDescription familyDescription() const { return FamilyDescription(genericFamily(), family()); } + FamilyDescription getFamilyDescription() const { return FamilyDescription(genericFamily(), family()); } FontFamily& firstFamily() { return m_familyList; } - Size size() const { return Size(keywordSize(), specifiedSize(), isAbsoluteSize()); } + Size getSize() const { return Size(keywordSize(), specifiedSize(), isAbsoluteSize()); } float specifiedSize() const { return m_specifiedSize; } float computedSize() const { return m_computedSize; } float adjustedSize() const { return m_adjustedSize; } @@ -160,7 +160,7 @@ public: { return genericFamily() == MonospaceFamily && !family().next() && family().family() == FontFamilyNames::webkit_monospace; } - Kerning kerning() const { return static_cast<Kerning>(m_fields.m_kerning); } + Kerning getKerning() const { return static_cast<Kerning>(m_fields.m_kerning); } VariantLigatures variantLigatures() const; LigaturesState commonLigaturesState() const { return static_cast<LigaturesState>(m_fields.m_commonLigaturesState); } LigaturesState discretionaryLigaturesState() const { return static_cast<LigaturesState>(m_fields.m_discretionaryLigaturesState); } @@ -219,7 +219,7 @@ public: void setWordSpacing(float s) { m_wordSpacing = s; } void setLetterSpacing(float s) { m_letterSpacing = s; updateTypesettingFeatures(); } - TypesettingFeatures typesettingFeatures() const { return static_cast<TypesettingFeatures>(m_fields.m_typesettingFeatures); } + TypesettingFeatures getTypesettingFeatures() const { return static_cast<TypesettingFeatures>(m_fields.m_typesettingFeatures); } static void setSubpixelPositioning(bool b) { s_useSubpixelTextPositioning = b; } static bool subpixelPositioning() { return s_useSubpixelTextPositioning; } diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp index 8acf049..1f61044 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp +++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp @@ -178,7 +178,7 @@ void HarfBuzzShaper::setFontFeatures() static hb_feature_t noKern = createFeature('k', 'e', 'r', 'n'); static hb_feature_t noVkrn = createFeature('v', 'k', 'r', 'n'); - switch (description.kerning()) { + switch (description.getKerning()) { case FontDescription::NormalKerning: // kern/vkrn are enabled by default break; diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp index 1411c49..03ca9b2 100644 --- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp @@ -102,7 +102,7 @@ PassRefPtr<SkImage> DeferredImageDecoder::createFrameAtIndex(size_t index) return nullptr; ImageFrame* frame = m_actualDecoder->frameBufferAtIndex(index); - if (!frame || frame->status() == ImageFrame::FrameEmpty) + if (!frame || frame->getStatus() == ImageFrame::FrameEmpty) return nullptr; return adoptRef(SkImage::NewFromBitmap(frame->bitmap())); diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp index 6728acc..e6e5b91 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp @@ -786,7 +786,7 @@ PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, Rend RefPtr<JSONArray> squashingDisallowedReasonsJSON = JSONArray::create(); for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) { - if (m_debugInfo.squashingDisallowedReasons() & kSquashingDisallowedReasonStringMap[i].reason) + if (m_debugInfo.getSquashingDisallowedReasons() & kSquashingDisallowedReasonStringMap[i].reason) squashingDisallowedReasonsJSON->pushString(debug ? kSquashingDisallowedReasonStringMap[i].description : kSquashingDisallowedReasonStringMap[i].shortName); } json->setArray("squashingDisallowedReasons", squashingDisallowedReasonsJSON); diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h index c683d96..50beb17 100644 --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h @@ -60,7 +60,7 @@ public: CompositingReasons getCompositingReasons() const { return m_compositingReasons; } void setCompositingReasons(CompositingReasons reasons) { m_compositingReasons = reasons; } - SquashingDisallowedReasons squashingDisallowedReasons() const { return m_squashingDisallowedReasons; } + SquashingDisallowedReasons getSquashingDisallowedReasons() const { return m_squashingDisallowedReasons; } void setSquashingDisallowedReasons(SquashingDisallowedReasons reasons) { m_squashingDisallowedReasons = reasons; } void setOwnerNodeId(int id) { m_ownerNodeId = id; } diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp index 806350a..edb8bf4 100644 --- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp +++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp @@ -363,13 +363,13 @@ bool ImageFrameGenerator::decode(size_t index, ImageDecoder** decoder, SkBitmap* (*decoder)->clearCacheExceptFrame(index); (*decoder)->setMemoryAllocator(0); - if (!frame || frame->status() == ImageFrame::FrameEmpty) + if (!frame || frame->getStatus() == ImageFrame::FrameEmpty) return false; // A cache object is considered complete if we can decode a complete frame. // Or we have received all data. The image might not be fully decoded in // the latter case. - const bool isDecodeComplete = frame->status() == ImageFrame::FrameComplete || allDataReceived; + const bool isDecodeComplete = frame->getStatus() == ImageFrame::FrameComplete || allDataReceived; SkBitmap fullSizeBitmap = frame->getSkBitmap(); if (!fullSizeBitmap.isNull()) { diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.cpp b/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.cpp index de02f03..65ef29f 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.cpp +++ b/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.cpp @@ -143,7 +143,7 @@ PassRefPtrWillBeRawPtr<FilterOperation> DropShadowFilterOperation::blend(const F return DropShadowFilterOperation::create( blink::blend(fromOp->location(), m_location, progress), blink::blend(fromOp->stdDeviation(), m_stdDeviation, progress), - blink::blend(fromOp->color(), m_color, progress)); + blink::blend(fromOp->getColor(), m_color, progress)); } } // namespace blink diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h b/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h index c0d885d..79a83d1 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h +++ b/third_party/WebKit/Source/platform/graphics/filters/FilterOperation.h @@ -283,7 +283,7 @@ public: int y() const { return m_location.y(); } IntPoint location() const { return m_location; } int stdDeviation() const { return m_stdDeviation; } - Color color() const { return m_color; } + Color getColor() const { return m_color; } bool affectsOpacity() const override { return true; } bool movesPixels() const override { return true; } diff --git a/third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp b/third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp index 28d49be..55cddf7 100644 --- a/third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp +++ b/third_party/WebKit/Source/platform/graphics/filters/SkiaImageFilterBuilder.cpp @@ -157,7 +157,7 @@ void SkiaImageFilterBuilder::buildFilterOperations(const FilterOperations& opera } case FilterOperation::DROP_SHADOW: { const DropShadowFilterOperation& drop = toDropShadowFilterOperation(op); - filters->appendDropShadowFilter(drop.location(), drop.stdDeviation(), drop.color()); + filters->appendDropShadowFilter(drop.location(), drop.stdDeviation(), drop.getColor()); break; } case FilterOperation::NONE: diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp index 085ce22..96a3c83c 100644 --- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp +++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp @@ -2149,7 +2149,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b if (!decoder->frameCount()) return; ImageFrame* frame = decoder->frameBufferAtIndex(0); - if (!frame || frame->status() != ImageFrame::FrameComplete) + if (!frame || frame->getStatus() != ImageFrame::FrameComplete) return; hasAlpha = frame->hasAlpha(); SkBitmap bitmap = frame->bitmap(); diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp index 36a6325..d5d06ef 100644 --- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp +++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp @@ -384,7 +384,7 @@ bool NormalPageHeap::isConsistentForGC() // contain a freelist block or the current allocation point. for (size_t i = 0; i < blinkPageSizeLog2; ++i) { for (FreeListEntry* freeListEntry = m_freeList.m_freeLists[i]; freeListEntry; freeListEntry = freeListEntry->next()) { - if (pagesToBeSweptContains(freeListEntry->address())) + if (pagesToBeSweptContains(freeListEntry->getAddress())) return false; } } @@ -767,7 +767,7 @@ Address NormalPageHeap::allocateFromFreeList(size_t allocationSize, size_t gcInf } if (entry) { entry->unlink(&m_freeList.m_freeLists[index]); - setAllocationPoint(entry->address(), entry->size()); + setAllocationPoint(entry->getAddress(), entry->size()); ASSERT(hasCurrentAllocationArea()); ASSERT(remainingAllocationSize() >= allocationSize); m_freeList.m_biggestFreeListIndex = index; @@ -832,7 +832,7 @@ Address LargeObjectHeap::doAllocateLargeObjectPage(size_t allocationSize, size_t // Poison the object header and allocationGranularity bytes after the object ASAN_POISON_MEMORY_REGION(header, sizeof(*header)); - ASAN_POISON_MEMORY_REGION(largeObject->address() + largeObject->size(), allocationGranularity); + ASAN_POISON_MEMORY_REGION(largeObject->getAddress() + largeObject->size(), allocationGranularity); largeObject->link(&m_firstPage); @@ -850,7 +850,7 @@ void LargeObjectHeap::freeLargeObjectPage(LargeObjectPage* object) // Unpoison the object header and allocationGranularity bytes after the // object before freeing. ASAN_UNPOISON_MEMORY_REGION(object->heapObjectHeader(), sizeof(HeapObjectHeader)); - ASAN_UNPOISON_MEMORY_REGION(object->address() + object->size(), allocationGranularity); + ASAN_UNPOISON_MEMORY_REGION(object->getAddress() + object->size(), allocationGranularity); if (object->terminating()) { ASSERT(ThreadState::current()->isTerminating()); @@ -1427,8 +1427,8 @@ void NormalPage::takeSnapshot(WebMemoryAllocatorDump* pageDump, ThreadState::GCS #if ENABLE(ASSERT) bool NormalPage::contains(Address addr) { - Address blinkPageStart = roundToBlinkPageStart(address()); - ASSERT(blinkPageStart == address() - blinkGuardPageSize); // Page is at aligned address plus guard page size. + Address blinkPageStart = roundToBlinkPageStart(getAddress()); + ASSERT(blinkPageStart == getAddress() - blinkGuardPageSize); // Page is at aligned address plus guard page size. return blinkPageStart <= addr && addr < blinkPageStart + blinkPageSize; } #endif @@ -1546,7 +1546,7 @@ void LargeObjectPage::takeSnapshot(WebMemoryAllocatorDump* pageDump, ThreadState #if ENABLE(ASSERT) bool LargeObjectPage::contains(Address object) { - return roundToBlinkPageStart(address()) <= object && object < roundToBlinkPageEnd(address() + size()); + return roundToBlinkPageStart(getAddress()) <= object && object < roundToBlinkPageEnd(getAddress() + size()); } #endif diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.h b/third_party/WebKit/Source/platform/heap/HeapPage.h index 683c3da..d004c83 100644 --- a/third_party/WebKit/Source/platform/heap/HeapPage.h +++ b/third_party/WebKit/Source/platform/heap/HeapPage.h @@ -267,7 +267,7 @@ public: #endif } - Address address() { return reinterpret_cast<Address>(this); } + Address getAddress() { return reinterpret_cast<Address>(this); } NO_SANITIZE_ADDRESS void unlink(FreeListEntry** prevNext) @@ -406,7 +406,7 @@ public: virtual size_t size() = 0; virtual bool isLargeObjectPage() { return false; } - Address address() { return reinterpret_cast<Address>(this); } + Address getAddress() { return reinterpret_cast<Address>(this); } PageMemory* storage() const { return m_storage; } BaseHeap* heap() const { return m_heap; } bool orphaned() { return !m_heap; } @@ -450,7 +450,7 @@ public: Address payload() { - return address() + pageHeaderSize(); + return getAddress() + pageHeaderSize(); } size_t payloadSize() { @@ -554,7 +554,7 @@ public: HeapObjectHeader* heapObjectHeader() { - Address headerAddress = address() + pageHeaderSize(); + Address headerAddress = getAddress() + pageHeaderSize(); return reinterpret_cast<HeapObjectHeader*>(headerAddress); } diff --git a/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h b/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h index c0556a8..c13405a4 100644 --- a/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h +++ b/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h @@ -19,7 +19,7 @@ public: explicit InlinedGlobalMarkingVisitor(Visitor* visitor) : m_visitor(visitor) { - ASSERT(visitor->markingMode() == Visitor::GlobalMarking); + ASSERT(visitor->getMarkingMode() == Visitor::GlobalMarking); } // Hack to unify interface to visitor->trace(). @@ -58,9 +58,9 @@ protected: return true; } - inline Visitor::MarkingMode markingMode() const + inline Visitor::MarkingMode getMarkingMode() const { - return m_visitor->markingMode(); + return m_visitor->getMarkingMode(); } private: diff --git a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h index a732376..ef6341c 100644 --- a/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h +++ b/third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h @@ -41,7 +41,7 @@ protected: return; ASSERT(ThreadState::current()->isInGC()); - ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing); + ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); header->mark(); @@ -59,22 +59,22 @@ protected: inline void registerDelayedMarkNoTracing(const void* objectPointer) { - ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing); + ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); Heap::pushPostMarkingCallback(const_cast<void*>(objectPointer), &markNoTracingCallback); } inline void registerWeakMembers(const void* closure, const void* objectPointer, WeakCallback callback) { - ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing); + ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); // We don't want to run weak processings when taking a snapshot. - if (toDerived()->markingMode() == Visitor::SnapshotMarking) + if (toDerived()->getMarkingMode() == Visitor::SnapshotMarking) return; Heap::pushThreadLocalWeakCallback(const_cast<void*>(closure), const_cast<void*>(objectPointer), callback); } inline void registerWeakTable(const void* closure, EphemeronCallback iterationCallback, EphemeronCallback iterationDoneCallback) { - ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing); + ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); Heap::registerWeakTable(const_cast<void*>(closure), iterationCallback, iterationDoneCallback); } @@ -115,9 +115,9 @@ protected: protected: inline void registerWeakCellWithCallback(void** cell, WeakCallback callback) { - ASSERT(toDerived()->markingMode() != Visitor::WeakProcessing); + ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); // We don't want to run weak processings when taking a snapshot. - if (toDerived()->markingMode() == Visitor::SnapshotMarking) + if (toDerived()->getMarkingMode() == Visitor::SnapshotMarking) return; Heap::pushGlobalWeakCallback(cell, callback); } diff --git a/third_party/WebKit/Source/platform/heap/TraceTraits.h b/third_party/WebKit/Source/platform/heap/TraceTraits.h index 5618355..43b923d 100644 --- a/third_party/WebKit/Source/platform/heap/TraceTraits.h +++ b/third_party/WebKit/Source/platform/heap/TraceTraits.h @@ -170,7 +170,7 @@ template<typename T> void TraceTrait<T>::trace(Visitor* visitor, void* self) { static_assert(WTF::NeedsTracing<T>::value || WTF::IsWeak<T>::value, "T should be traced"); - if (visitor->markingMode() == Visitor::GlobalMarking) { + if (visitor->getMarkingMode() == Visitor::GlobalMarking) { // Switch to inlined global marking dispatch. static_cast<T*>(self)->trace(InlinedGlobalMarkingVisitor(visitor)); } else { diff --git a/third_party/WebKit/Source/platform/heap/Visitor.h b/third_party/WebKit/Source/platform/heap/Visitor.h index 443db172..d054cd1 100644 --- a/third_party/WebKit/Source/platform/heap/Visitor.h +++ b/third_party/WebKit/Source/platform/heap/Visitor.h @@ -371,7 +371,7 @@ public: virtual bool ensureMarked(const void*) = 0; - inline MarkingMode markingMode() const { return m_markingMode; } + inline MarkingMode getMarkingMode() const { return m_markingMode; } protected: explicit Visitor(MarkingMode markingMode) diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp index b1cac4d..75d70ed 100644 --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp @@ -134,7 +134,7 @@ ImageFrame* ImageDecoder::frameBufferAtIndex(size_t index) return 0; ImageFrame* frame = &m_frameBufferCache[index]; - if (frame->status() != ImageFrame::FrameComplete) { + if (frame->getStatus() != ImageFrame::FrameComplete) { PlatformInstrumentation::willDecodeImage(filenameExtension()); decode(index); PlatformInstrumentation::didDecodeImage(); @@ -152,12 +152,12 @@ bool ImageDecoder::frameHasAlphaAtIndex(size_t index) const bool ImageDecoder::frameIsCompleteAtIndex(size_t index) const { return (index < m_frameBufferCache.size()) && - (m_frameBufferCache[index].status() == ImageFrame::FrameComplete); + (m_frameBufferCache[index].getStatus() == ImageFrame::FrameComplete); } size_t ImageDecoder::frameBytesAtIndex(size_t index) const { - if (index >= m_frameBufferCache.size() || m_frameBufferCache[index].status() == ImageFrame::FrameEmpty) + if (index >= m_frameBufferCache.size() || m_frameBufferCache[index].getStatus() == ImageFrame::FrameEmpty) return 0; struct ImageSize { @@ -208,7 +208,7 @@ size_t ImageDecoder::findRequiredPreviousFrame(size_t frameIndex, bool frameRect } const ImageFrame* currBuffer = &m_frameBufferCache[frameIndex]; - if ((frameRectIsOpaque || currBuffer->alphaBlendSource() == ImageFrame::BlendAtopBgcolor) + if ((frameRectIsOpaque || currBuffer->getAlphaBlendSource() == ImageFrame::BlendAtopBgcolor) && currBuffer->originalFrameRect().contains(IntRect(IntPoint(), size()))) return kNotFound; @@ -217,7 +217,7 @@ size_t ImageDecoder::findRequiredPreviousFrame(size_t frameIndex, bool frameRect size_t prevFrame = frameIndex - 1; const ImageFrame* prevBuffer = &m_frameBufferCache[prevFrame]; - switch (prevBuffer->disposalMethod()) { + switch (prevBuffer->getDisposalMethod()) { case ImageFrame::DisposeNotSpecified: case ImageFrame::DisposeKeep: // prevFrame will be used as the starting state for this frame. diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTest.cpp index dc5ee50..c21e161 100644 --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTest.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTest.cpp @@ -225,7 +225,7 @@ TEST(ImageDecoderTest, clearCacheExceptFrameAll) for (size_t i = 0; i < numFrames; ++i) { SCOPED_TRACE(testing::Message() << i); - EXPECT_EQ(ImageFrame::FrameEmpty, frameBuffers[i].status()); + EXPECT_EQ(ImageFrame::FrameEmpty, frameBuffers[i].getStatus()); } } @@ -243,9 +243,9 @@ TEST(ImageDecoderTest, clearCacheExceptFramePreverveClearExceptFrame) for (size_t i = 0; i < numFrames; ++i) { SCOPED_TRACE(testing::Message() << i); if (i == 5) - EXPECT_EQ(ImageFrame::FrameComplete, frameBuffers[i].status()); + EXPECT_EQ(ImageFrame::FrameComplete, frameBuffers[i].getStatus()); else - EXPECT_EQ(ImageFrame::FrameEmpty, frameBuffers[i].status()); + EXPECT_EQ(ImageFrame::FrameEmpty, frameBuffers[i].getStatus()); } } diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp index 543f754..c6e3e43 100644 --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp @@ -87,7 +87,7 @@ void testByteByByteDecode(DecoderCreator createDecoder, const char* file, size_t continue; ImageFrame* frame = decoder->frameBufferAtIndex(frameCount - 1); - if (frame && frame->status() == ImageFrame::FrameComplete && framesDecoded < frameCount) + if (frame && frame->getStatus() == ImageFrame::FrameComplete && framesDecoded < frameCount) ++framesDecoded; } @@ -134,7 +134,7 @@ void testMergeBuffer(DecoderCreator createDecoder, const char* file) ImageFrame* frame = decoder->frameBufferAtIndex(0); ASSERT_FALSE(decoder->failed()); - EXPECT_EQ(frame->status(), ImageFrame::FrameComplete); + EXPECT_EQ(frame->getStatus(), ImageFrame::FrameComplete); EXPECT_EQ(hashBitmap(frame->bitmap()), hash); } diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp index 8e47908..d7e5a06 100644 --- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp @@ -55,10 +55,10 @@ ImageFrame& ImageFrame::operator=(const ImageFrame& other) m_pixelsChanged = other.m_pixelsChanged; setMemoryAllocator(other.allocator()); setOriginalFrameRect(other.originalFrameRect()); - setStatus(other.status()); + setStatus(other.getStatus()); setDuration(other.duration()); - setDisposalMethod(other.disposalMethod()); - setAlphaBlendSource(other.alphaBlendSource()); + setDisposalMethod(other.getDisposalMethod()); + setAlphaBlendSource(other.getAlphaBlendSource()); setPremultiplyAlpha(other.premultiplyAlpha()); // Be sure that this is called after we've called setStatus(), since we // look at our status to know what to do with the alpha value. diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h index b5d1490..655c9ef 100644 --- a/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h +++ b/third_party/WebKit/Source/platform/image-decoders/ImageFrame.h @@ -120,10 +120,10 @@ public: bool hasAlpha() const; const IntRect& originalFrameRect() const { return m_originalFrameRect; } - Status status() const { return m_status; } + Status getStatus() const { return m_status; } unsigned duration() const { return m_duration; } - DisposalMethod disposalMethod() const { return m_disposalMethod; } - AlphaBlendSource alphaBlendSource() const { return m_alphaBlendSource; } + DisposalMethod getDisposalMethod() const { return m_disposalMethod; } + AlphaBlendSource getAlphaBlendSource() const { return m_alphaBlendSource; } bool premultiplyAlpha() const { return m_premultiplyAlpha; } SkBitmap::Allocator* allocator() const { return m_allocator; } const SkBitmap& getSkBitmap() const { return m_bitmap; } diff --git a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp index 1768bf3..998faac 100644 --- a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp @@ -69,7 +69,7 @@ void BMPImageDecoder::decode(bool onlySize) setFailed(); // If we're done decoding the image, we don't need the BMPImageReader // anymore. (If we failed, |m_reader| has already been cleared.) - else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache.first().status() == ImageFrame::FrameComplete)) + else if (!m_frameBufferCache.isEmpty() && (m_frameBufferCache.first().getStatus() == ImageFrame::FrameComplete)) m_reader.clear(); } diff --git a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoderTest.cpp index 4e03954..8b86f0e 100644 --- a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoderTest.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoderTest.cpp @@ -43,7 +43,7 @@ TEST(BMPImageDecoderTest, parseAndDecode) ImageFrame* frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(256, frame->getSkBitmap().width()); EXPECT_EQ(256, frame->getSkBitmap().height()); EXPECT_FALSE(decoder->failed()); @@ -61,7 +61,7 @@ TEST(BMPImageDecoderTest, emptyImage) ImageFrame* frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FrameEmpty, frame->status()); + EXPECT_EQ(ImageFrame::FrameEmpty, frame->getStatus()); EXPECT_TRUE(decoder->failed()); } diff --git a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp index cacc6bd..7e10d1d 100644 --- a/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp @@ -115,7 +115,7 @@ bool BMPImageReader::decodeBMP(bool onlySize) // Initialize the framebuffer if needed. ASSERT(m_buffer); // Parent should set this before asking us to decode! - if (m_buffer->status() == ImageFrame::FrameEmpty) { + if (m_buffer->getStatus() == ImageFrame::FrameEmpty) { if (!m_buffer->setSize(m_parent->size().width(), m_parent->size().height())) return m_parent->setFailed(); // Unable to allocate. m_buffer->setStatus(ImageFrame::FramePartial); diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp index bf46ddc..c346fff 100644 --- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp @@ -126,7 +126,7 @@ bool GIFImageDecoder::haveDecodedRow(size_t frameIndex, GIFRow::const_iterator r // Initialize the frame if necessary. ImageFrame& buffer = m_frameBufferCache[frameIndex]; - if ((buffer.status() == ImageFrame::FrameEmpty) && !initFrameBuffer(frameIndex)) + if ((buffer.getStatus() == ImageFrame::FrameEmpty) && !initFrameBuffer(frameIndex)) return false; const size_t transparentPixel = frameContext->transparentPixel(); @@ -183,7 +183,7 @@ bool GIFImageDecoder::frameComplete(size_t frameIndex) // Initialize the frame if necessary. Some GIFs insert do-nothing frames, // in which case we never reach haveDecodedRow() before getting here. ImageFrame& buffer = m_frameBufferCache[frameIndex]; - if ((buffer.status() == ImageFrame::FrameEmpty) && !initFrameBuffer(frameIndex)) + if ((buffer.getStatus() == ImageFrame::FrameEmpty) && !initFrameBuffer(frameIndex)) return false; // initFrameBuffer() has already called setFailed(). buffer.setStatus(ImageFrame::FrameComplete); @@ -200,7 +200,7 @@ bool GIFImageDecoder::frameComplete(size_t frameIndex) // true, we check the start state of the frame -- if it doesn't have // alpha, we're safe. const ImageFrame* prevBuffer = &m_frameBufferCache[buffer.requiredPreviousFrameIndex()]; - ASSERT(prevBuffer->disposalMethod() != ImageFrame::DisposeOverwritePrevious); + ASSERT(prevBuffer->getDisposalMethod() != ImageFrame::DisposeOverwritePrevious); // Now, if we're at a DisposeNotSpecified or DisposeKeep frame, then // we can say we have no alpha if that frame had no alpha. But @@ -210,7 +210,7 @@ bool GIFImageDecoder::frameComplete(size_t frameIndex) // The only remaining case is a DisposeOverwriteBgcolor frame. If // it had no alpha, and its rect is contained in the current frame's // rect, we know the current frame has no alpha. - if ((prevBuffer->disposalMethod() == ImageFrame::DisposeOverwriteBgcolor) && !prevBuffer->hasAlpha() && buffer.originalFrameRect().contains(prevBuffer->originalFrameRect())) + if ((prevBuffer->getDisposalMethod() == ImageFrame::DisposeOverwriteBgcolor) && !prevBuffer->hasAlpha() && buffer.originalFrameRect().contains(prevBuffer->originalFrameRect())) buffer.setHasAlpha(false); } } @@ -234,7 +234,7 @@ size_t GIFImageDecoder::clearCacheExceptFrame(size_t clearExceptFrame) size_t clearExceptFrame2 = kNotFound; if (clearExceptFrame < m_frameBufferCache.size()) { const ImageFrame& frame = m_frameBufferCache[clearExceptFrame]; - if ((frame.status() != ImageFrame::FrameEmpty) && (frame.disposalMethod() == ImageFrame::DisposeOverwritePrevious)) { + if ((frame.getStatus() != ImageFrame::FrameEmpty) && (frame.getDisposalMethod() == ImageFrame::DisposeOverwritePrevious)) { clearExceptFrame2 = clearExceptFrame; clearExceptFrame = frame.requiredPreviousFrameIndex(); } @@ -246,7 +246,7 @@ size_t GIFImageDecoder::clearCacheExceptFrame(size_t clearExceptFrame) // the required previous frames until we find the nearest non-empty // ancestor. Preserving that will minimize the amount of future decoding // needed. - while ((clearExceptFrame < m_frameBufferCache.size()) && (m_frameBufferCache[clearExceptFrame].status() == ImageFrame::FrameEmpty)) + while ((clearExceptFrame < m_frameBufferCache.size()) && (m_frameBufferCache[clearExceptFrame].getStatus() == ImageFrame::FrameEmpty)) clearExceptFrame = m_frameBufferCache[clearExceptFrame].requiredPreviousFrameIndex(); return clearCacheExceptTwoFrames(clearExceptFrame, clearExceptFrame2); } @@ -256,7 +256,7 @@ size_t GIFImageDecoder::clearCacheExceptTwoFrames(size_t clearExceptFrame1, size { size_t frameBytesCleared = 0; for (size_t i = 0; i < m_frameBufferCache.size(); ++i) { - if (m_frameBufferCache[i].status() != ImageFrame::FrameEmpty && i != clearExceptFrame1 && i != clearExceptFrame2) { + if (m_frameBufferCache[i].getStatus() != ImageFrame::FrameEmpty && i != clearExceptFrame1 && i != clearExceptFrame2) { frameBytesCleared += frameBytesAtIndex(i); clearFrameBuffer(i); } @@ -266,7 +266,7 @@ size_t GIFImageDecoder::clearCacheExceptTwoFrames(size_t clearExceptFrame1, size void GIFImageDecoder::clearFrameBuffer(size_t frameIndex) { - if (m_reader && m_frameBufferCache[frameIndex].status() == ImageFrame::FramePartial) { + if (m_reader && m_frameBufferCache[frameIndex].getStatus() == ImageFrame::FramePartial) { // Reset the state of the partial frame in the reader so that the frame // can be decoded again when requested. m_reader->clearDecodeState(frameIndex); @@ -290,7 +290,7 @@ void GIFImageDecoder::initializeNewFrame(size_t index) const GIFFrameContext* frameContext = m_reader->frameContext(index); buffer->setOriginalFrameRect(intersection(frameContext->frameRect(), IntRect(IntPoint(), size()))); buffer->setDuration(frameContext->delayTime()); - buffer->setDisposalMethod(frameContext->disposalMethod()); + buffer->setDisposalMethod(frameContext->getDisposalMethod()); buffer->setRequiredPreviousFrameIndex(findRequiredPreviousFrame(index, false)); } @@ -306,7 +306,7 @@ void GIFImageDecoder::decode(size_t index) do { framesToDecode.append(frameToDecode); frameToDecode = m_frameBufferCache[frameToDecode].requiredPreviousFrameIndex(); - } while (frameToDecode != kNotFound && m_frameBufferCache[frameToDecode].status() != ImageFrame::FrameComplete); + } while (frameToDecode != kNotFound && m_frameBufferCache[frameToDecode].getStatus() != ImageFrame::FrameComplete); for (auto i = framesToDecode.rbegin(); i != framesToDecode.rend(); ++i) { if (!m_reader->decode(*i)) { @@ -315,7 +315,7 @@ void GIFImageDecoder::decode(size_t index) } // We need more data to continue decoding. - if (m_frameBufferCache[*i].status() != ImageFrame::FrameComplete) + if (m_frameBufferCache[*i].getStatus() != ImageFrame::FrameComplete) break; } @@ -351,13 +351,13 @@ bool GIFImageDecoder::initFrameBuffer(size_t frameIndex) return setFailed(); } else { const ImageFrame* prevBuffer = &m_frameBufferCache[requiredPreviousFrameIndex]; - ASSERT(prevBuffer->status() == ImageFrame::FrameComplete); + ASSERT(prevBuffer->getStatus() == ImageFrame::FrameComplete); // Preserve the last frame as the starting state for this frame. if (!buffer->copyBitmapData(*prevBuffer)) return setFailed(); - if (prevBuffer->disposalMethod() == ImageFrame::DisposeOverwriteBgcolor) { + if (prevBuffer->getDisposalMethod() == ImageFrame::DisposeOverwriteBgcolor) { // We want to clear the previous frame to transparent, without // affecting pixels in the image outside of the frame. const IntRect& prevRect = prevBuffer->originalFrameRect(); diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp index a252a41..88164b1 100644 --- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp @@ -122,13 +122,13 @@ TEST(GIFImageDecoderTest, decodeTwoFrames) ImageFrame* frame = decoder->frameBufferAtIndex(0); uint32_t generationID0 = frame->getSkBitmap().getGenerationID(); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(16, frame->getSkBitmap().width()); EXPECT_EQ(16, frame->getSkBitmap().height()); frame = decoder->frameBufferAtIndex(1); uint32_t generationID1 = frame->getSkBitmap().getGenerationID(); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(16, frame->getSkBitmap().width()); EXPECT_EQ(16, frame->getSkBitmap().height()); EXPECT_TRUE(generationID0 != generationID1); @@ -150,12 +150,12 @@ TEST(GIFImageDecoderTest, parseAndDecode) EXPECT_EQ(2u, decoder->frameCount()); ImageFrame* frame = decoder->frameBufferAtIndex(0); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(16, frame->getSkBitmap().width()); EXPECT_EQ(16, frame->getSkBitmap().height()); frame = decoder->frameBufferAtIndex(1); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(16, frame->getSkBitmap().width()); EXPECT_EQ(16, frame->getSkBitmap().height()); EXPECT_EQ(cAnimationLoopInfinite, decoder->repetitionCount()); @@ -205,7 +205,7 @@ TEST(GIFImageDecoderTest, parseAndDecodeByteByByte) frameCount = decoder->frameCount(); ImageFrame* frame = decoder->frameBufferAtIndex(frameCount - 1); - if (frame && frame->status() == ImageFrame::FrameComplete && framesDecoded < frameCount) + if (frame && frame->getStatus() == ImageFrame::FrameComplete && framesDecoded < frameCount) ++framesDecoded; } @@ -372,7 +372,7 @@ TEST(GIFImageDecoderTest, updateRequiredPreviousFrameAfterFirstDecode) RefPtr<SharedBuffer> data = SharedBuffer::create(fullData->data(), partialSize); decoder->setData(data.get(), false); ++partialSize; - } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->status() == ImageFrame::FrameEmpty); + } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->getStatus() == ImageFrame::FrameEmpty); EXPECT_EQ(kNotFound, decoder->frameBufferAtIndex(0)->requiredPreviousFrameIndex()); unsigned frameCount = decoder->frameCount(); @@ -418,7 +418,7 @@ TEST(GIFImageDecoderTest, resumePartialDecodeAfterClearFrameBufferCache) RefPtr<SharedBuffer> data = SharedBuffer::create(fullData->data(), partialSize); decoder->setData(data.get(), false); ++partialSize; - } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->status() == ImageFrame::FrameEmpty); + } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->getStatus() == ImageFrame::FrameEmpty); // Skip to the last frame and clear. decoder->setData(fullData.get(), true); @@ -429,7 +429,7 @@ TEST(GIFImageDecoderTest, resumePartialDecodeAfterClearFrameBufferCache) // Resume decoding of the first frame. ImageFrame* firstFrame = decoder->frameBufferAtIndex(0); - EXPECT_EQ(ImageFrame::FrameComplete, firstFrame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, firstFrame->getStatus()); EXPECT_EQ(baselineHashes[0], hashBitmap(firstFrame->getSkBitmap())); } @@ -471,9 +471,9 @@ TEST(GIFImageDecoderTest, invalidDisposalMethod) EXPECT_EQ(2u, decoder->frameCount()); // Disposal method 4 is converted to ImageFrame::DisposeOverwritePrevious. - EXPECT_EQ(ImageFrame::DisposeOverwritePrevious, decoder->frameBufferAtIndex(0)->disposalMethod()); + EXPECT_EQ(ImageFrame::DisposeOverwritePrevious, decoder->frameBufferAtIndex(0)->getDisposalMethod()); // Disposal method 5 is ignored. - EXPECT_EQ(ImageFrame::DisposeNotSpecified, decoder->frameBufferAtIndex(1)->disposalMethod()); + EXPECT_EQ(ImageFrame::DisposeNotSpecified, decoder->frameBufferAtIndex(1)->getDisposalMethod()); } TEST(GIFImageDecoderTest, firstFrameHasGreaterSizeThanScreenSize) diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h index 18170f5..42234e7 100644 --- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h +++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h @@ -229,7 +229,7 @@ public: unsigned height() const { return m_height; } size_t transparentPixel() const { return m_transparentPixel; } void setTransparentPixel(size_t pixel) { m_transparentPixel = pixel; } - blink::ImageFrame::DisposalMethod disposalMethod() const { return m_disposalMethod; } + blink::ImageFrame::DisposalMethod getDisposalMethod() const { return m_disposalMethod; } void setDisposalMethod(blink::ImageFrame::DisposalMethod disposalMethod) { m_disposalMethod = disposalMethod; } unsigned delayTime() const { return m_delayTime; } void setDelayTime(unsigned delay) { m_delayTime = delay; } diff --git a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp index b9b1761..592eb96 100644 --- a/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp @@ -142,12 +142,12 @@ void ICOImageDecoder::decode(size_t index, bool onlySize) // If we couldn't decode the image but we've received all the data, decoding // has failed. - if ((!decodeDirectory() || (!onlySize && !decodeAtIndex(index))) && isAllDataReceived()) + if ((!decodeDirectory() || (!onlySize && !decodeAtIndex(index))) && isAllDataReceived()) { setFailed(); // If we're done decoding this frame, we don't need the BMPImageReader or // PNGImageDecoder anymore. (If we failed, these have already been // cleared.) - else if ((m_frameBufferCache.size() > index) && (m_frameBufferCache[index].status() == ImageFrame::FrameComplete)) { + } else if ((m_frameBufferCache.size() > index) && (m_frameBufferCache[index].getStatus() == ImageFrame::FrameComplete)) { m_bmpReaders[index].clear(); m_pngDecoders[index].clear(); } diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp index b940a89..a423aab 100644 --- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp @@ -995,7 +995,7 @@ bool JPEGImageDecoder::outputScanlines() // Initialize the framebuffer if needed. ImageFrame& buffer = m_frameBufferCache[0]; - if (buffer.status() == ImageFrame::FrameEmpty) { + if (buffer.getStatus() == ImageFrame::FrameEmpty) { ASSERT(info->output_width == static_cast<JDIMENSION>(m_decodedSize.width())); ASSERT(info->output_height == static_cast<JDIMENSION>(m_decodedSize.height())); diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp index c8afd78..54c2bbc 100644 --- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp @@ -359,7 +359,7 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, // Initialize the framebuffer if needed. ImageFrame& buffer = m_frameBufferCache[0]; - if (buffer.status() == ImageFrame::FrameEmpty) { + if (buffer.getStatus() == ImageFrame::FrameEmpty) { png_structp png = m_reader->pngPtr(); if (!buffer.setSize(size().width(), size().height())) { longjmp(JMPBUF(png), 1); diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp index ce5a2f5..898332b 100644 --- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp @@ -250,7 +250,7 @@ bool WEBPImageDecoder::updateDemuxer() bool WEBPImageDecoder::initFrameBuffer(size_t frameIndex) { ImageFrame& buffer = m_frameBufferCache[frameIndex]; - if (buffer.status() != ImageFrame::FrameEmpty) // Already initialized. + if (buffer.getStatus() != ImageFrame::FrameEmpty) // Already initialized. return true; const size_t requiredPreviousFrameIndex = buffer.requiredPreviousFrameIndex(); @@ -261,13 +261,13 @@ bool WEBPImageDecoder::initFrameBuffer(size_t frameIndex) m_frameBackgroundHasAlpha = !buffer.originalFrameRect().contains(IntRect(IntPoint(), size())); } else { const ImageFrame& prevBuffer = m_frameBufferCache[requiredPreviousFrameIndex]; - ASSERT(prevBuffer.status() == ImageFrame::FrameComplete); + ASSERT(prevBuffer.getStatus() == ImageFrame::FrameComplete); // Preserve the last frame as the starting state for this frame. if (!buffer.copyBitmapData(prevBuffer)) return setFailed(); - if (prevBuffer.disposalMethod() == ImageFrame::DisposeOverwriteBgcolor) { + if (prevBuffer.getDisposalMethod() == ImageFrame::DisposeOverwriteBgcolor) { // We want to clear the previous frame to transparent, without // affecting pixels in the image outside of the frame. const IntRect& prevRect = prevBuffer.originalFrameRect(); @@ -275,7 +275,7 @@ bool WEBPImageDecoder::initFrameBuffer(size_t frameIndex) buffer.zeroFillFrameRect(prevRect); } - m_frameBackgroundHasAlpha = prevBuffer.hasAlpha() || (prevBuffer.disposalMethod() == ImageFrame::DisposeOverwriteBgcolor); + m_frameBackgroundHasAlpha = prevBuffer.hasAlpha() || (prevBuffer.getDisposalMethod() == ImageFrame::DisposeOverwriteBgcolor); } buffer.setStatus(ImageFrame::FramePartial); @@ -291,7 +291,7 @@ size_t WEBPImageDecoder::clearCacheExceptFrame(size_t clearExceptFrame) // Otherwise, we preserve a previous frame with status FrameComplete whose data is required // to decode |clearExceptFrame|, either in initFrameBuffer() or ApplyPostProcessing(). // All other frames can be cleared. - while ((clearExceptFrame < m_frameBufferCache.size()) && (m_frameBufferCache[clearExceptFrame].status() != ImageFrame::FrameComplete)) + while ((clearExceptFrame < m_frameBufferCache.size()) && (m_frameBufferCache[clearExceptFrame].getStatus() != ImageFrame::FrameComplete)) clearExceptFrame = m_frameBufferCache[clearExceptFrame].requiredPreviousFrameIndex(); return ImageDecoder::clearCacheExceptFrame(clearExceptFrame); @@ -299,7 +299,7 @@ size_t WEBPImageDecoder::clearCacheExceptFrame(size_t clearExceptFrame) void WEBPImageDecoder::clearFrameBuffer(size_t frameIndex) { - if (m_demux && m_demuxState >= WEBP_DEMUX_PARSED_HEADER && m_frameBufferCache[frameIndex].status() == ImageFrame::FramePartial) { + if (m_demux && m_demuxState >= WEBP_DEMUX_PARSED_HEADER && m_frameBufferCache[frameIndex].getStatus() == ImageFrame::FramePartial) { // Clear the decoder state so that this partial frame can be decoded again when requested. clearDecoder(); } @@ -408,10 +408,10 @@ void WEBPImageDecoder::applyPostProcessing(size_t frameIndex) // pixels based on disposal method of the previous frame and the previous frame buffer. // FIXME: This could be avoided if libwebp decoder had an API that used the previous required frame // to do the alpha-blending by itself. - if ((m_formatFlags & ANIMATION_FLAG) && frameIndex && buffer.alphaBlendSource() == ImageFrame::BlendAtopPreviousFrame && buffer.requiredPreviousFrameIndex() != kNotFound) { + if ((m_formatFlags & ANIMATION_FLAG) && frameIndex && buffer.getAlphaBlendSource() == ImageFrame::BlendAtopPreviousFrame && buffer.requiredPreviousFrameIndex() != kNotFound) { ImageFrame& prevBuffer = m_frameBufferCache[frameIndex - 1]; - ASSERT(prevBuffer.status() == ImageFrame::FrameComplete); - ImageFrame::DisposalMethod prevDisposalMethod = prevBuffer.disposalMethod(); + ASSERT(prevBuffer.getStatus() == ImageFrame::FrameComplete); + ImageFrame::DisposalMethod prevDisposalMethod = prevBuffer.getDisposalMethod(); if (prevDisposalMethod == ImageFrame::DisposeKeep) { // Blend transparent pixels with pixels in previous canvas. for (int y = m_decodedHeight; y < decodedHeight; ++y) { m_blendFunction(buffer, prevBuffer, top + y, left, width); @@ -474,7 +474,7 @@ void WEBPImageDecoder::decode(size_t index) do { framesToDecode.append(frameToDecode); frameToDecode = m_frameBufferCache[frameToDecode].requiredPreviousFrameIndex(); - } while (frameToDecode != kNotFound && m_frameBufferCache[frameToDecode].status() != ImageFrame::FrameComplete); + } while (frameToDecode != kNotFound && m_frameBufferCache[frameToDecode].getStatus() != ImageFrame::FrameComplete); ASSERT(m_demux); for (auto i = framesToDecode.rbegin(); i != framesToDecode.rend(); ++i) { @@ -491,7 +491,7 @@ void WEBPImageDecoder::decode(size_t index) return; // We need more data to continue decoding. - if (m_frameBufferCache[*i].status() != ImageFrame::FrameComplete) + if (m_frameBufferCache[*i].getStatus() != ImageFrame::FrameComplete) break; } @@ -510,9 +510,9 @@ bool WEBPImageDecoder::decodeSingleFrame(const uint8_t* dataBytes, size_t dataSi ASSERT(m_frameBufferCache.size() > frameIndex); ImageFrame& buffer = m_frameBufferCache[frameIndex]; - ASSERT(buffer.status() != ImageFrame::FrameComplete); + ASSERT(buffer.getStatus() != ImageFrame::FrameComplete); - if (buffer.status() == ImageFrame::FrameEmpty) { + if (buffer.getStatus() == ImageFrame::FrameEmpty) { if (!buffer.setSize(size().width(), size().height())) return setFailed(); buffer.setStatus(ImageFrame::FramePartial); diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp index 4caecf6..7b06a28 100644 --- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp +++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp @@ -130,7 +130,7 @@ void testDecodeAfterReallocatingData(const char* webpFile) for (size_t i = 0; i < frameCount; ++i) { const ImageFrame* const frame = decoder->frameBufferAtIndex(i); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); } } @@ -194,7 +194,7 @@ void testInvalidImage(const char* webpFile, bool parseErrorExpected) EXPECT_GT(decoder->frameCount(), 0u); ImageFrame* frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FramePartial, frame->status()); + EXPECT_EQ(ImageFrame::FramePartial, frame->getStatus()); } EXPECT_EQ(cAnimationLoopOnce, decoder->repetitionCount()); EXPECT_TRUE(decoder->failed()); @@ -298,15 +298,15 @@ TEST(AnimatedWebPTests, verifyAnimationParametersTransparentImage) for (size_t i = 0; i < WTF_ARRAY_LENGTH(frameParameters); ++i) { const ImageFrame* const frame = decoder->frameBufferAtIndex(i); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(canvasWidth, frame->getSkBitmap().width()); EXPECT_EQ(canvasHeight, frame->getSkBitmap().height()); EXPECT_EQ(frameParameters[i].xOffset, frame->originalFrameRect().x()); EXPECT_EQ(frameParameters[i].yOffset, frame->originalFrameRect().y()); EXPECT_EQ(frameParameters[i].width, frame->originalFrameRect().width()); EXPECT_EQ(frameParameters[i].height, frame->originalFrameRect().height()); - EXPECT_EQ(frameParameters[i].disposalMethod, frame->disposalMethod()); - EXPECT_EQ(frameParameters[i].alphaBlendSource, frame->alphaBlendSource()); + EXPECT_EQ(frameParameters[i].disposalMethod, frame->getDisposalMethod()); + EXPECT_EQ(frameParameters[i].alphaBlendSource, frame->getAlphaBlendSource()); EXPECT_EQ(frameParameters[i].duration, frame->duration()); EXPECT_EQ(frameParameters[i].hasAlpha, frame->hasAlpha()); } @@ -341,15 +341,15 @@ TEST(AnimatedWebPTests, verifyAnimationParametersOpaqueFramesTransparentBackgrou for (size_t i = 0; i < WTF_ARRAY_LENGTH(frameParameters); ++i) { const ImageFrame* const frame = decoder->frameBufferAtIndex(i); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(canvasWidth, frame->getSkBitmap().width()); EXPECT_EQ(canvasHeight, frame->getSkBitmap().height()); EXPECT_EQ(frameParameters[i].xOffset, frame->originalFrameRect().x()); EXPECT_EQ(frameParameters[i].yOffset, frame->originalFrameRect().y()); EXPECT_EQ(frameParameters[i].width, frame->originalFrameRect().width()); EXPECT_EQ(frameParameters[i].height, frame->originalFrameRect().height()); - EXPECT_EQ(frameParameters[i].disposalMethod, frame->disposalMethod()); - EXPECT_EQ(frameParameters[i].alphaBlendSource, frame->alphaBlendSource()); + EXPECT_EQ(frameParameters[i].disposalMethod, frame->getDisposalMethod()); + EXPECT_EQ(frameParameters[i].alphaBlendSource, frame->getAlphaBlendSource()); EXPECT_EQ(frameParameters[i].duration, frame->duration()); EXPECT_EQ(frameParameters[i].hasAlpha, frame->hasAlpha()); } @@ -384,15 +384,15 @@ TEST(AnimatedWebPTests, verifyAnimationParametersBlendOverwrite) for (size_t i = 0; i < WTF_ARRAY_LENGTH(frameParameters); ++i) { const ImageFrame* const frame = decoder->frameBufferAtIndex(i); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_EQ(canvasWidth, frame->getSkBitmap().width()); EXPECT_EQ(canvasHeight, frame->getSkBitmap().height()); EXPECT_EQ(frameParameters[i].xOffset, frame->originalFrameRect().x()); EXPECT_EQ(frameParameters[i].yOffset, frame->originalFrameRect().y()); EXPECT_EQ(frameParameters[i].width, frame->originalFrameRect().width()); EXPECT_EQ(frameParameters[i].height, frame->originalFrameRect().height()); - EXPECT_EQ(frameParameters[i].disposalMethod, frame->disposalMethod()); - EXPECT_EQ(frameParameters[i].alphaBlendSource, frame->alphaBlendSource()); + EXPECT_EQ(frameParameters[i].disposalMethod, frame->getDisposalMethod()); + EXPECT_EQ(frameParameters[i].alphaBlendSource, frame->getAlphaBlendSource()); EXPECT_EQ(frameParameters[i].duration, frame->duration()); EXPECT_EQ(frameParameters[i].hasAlpha, frame->hasAlpha()); } @@ -427,15 +427,15 @@ TEST(AnimatedWebPTests, truncatedLastFrame) EXPECT_EQ(frameCount, decoder->frameCount()); ImageFrame* frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); EXPECT_FALSE(decoder->failed()); frame = decoder->frameBufferAtIndex(frameCount - 1); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FramePartial, frame->status()); + EXPECT_EQ(ImageFrame::FramePartial, frame->getStatus()); EXPECT_TRUE(decoder->failed()); frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); } TEST(AnimatedWebPTests, truncatedInBetweenFrame) @@ -449,10 +449,10 @@ TEST(AnimatedWebPTests, truncatedInBetweenFrame) ImageFrame* frame = decoder->frameBufferAtIndex(1); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FrameComplete, frame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus()); frame = decoder->frameBufferAtIndex(2); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FramePartial, frame->status()); + EXPECT_EQ(ImageFrame::FramePartial, frame->getStatus()); EXPECT_TRUE(decoder->failed()); } @@ -472,7 +472,7 @@ TEST(AnimatedWebPTests, reproCrash) EXPECT_EQ(1u, decoder->frameCount()); ImageFrame* frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FramePartial, frame->status()); + EXPECT_EQ(ImageFrame::FramePartial, frame->getStatus()); EXPECT_FALSE(decoder->failed()); // Parse full data now. The error in bitstream should now be detected. @@ -480,7 +480,7 @@ TEST(AnimatedWebPTests, reproCrash) EXPECT_EQ(1u, decoder->frameCount()); frame = decoder->frameBufferAtIndex(0); ASSERT_TRUE(frame); - EXPECT_EQ(ImageFrame::FramePartial, frame->status()); + EXPECT_EQ(ImageFrame::FramePartial, frame->getStatus()); EXPECT_EQ(cAnimationLoopOnce, decoder->repetitionCount()); EXPECT_TRUE(decoder->failed()); } @@ -576,7 +576,7 @@ TEST(AnimatedWebPTests, updateRequiredPreviousFrameAfterFirstDecode) RefPtr<SharedBuffer> data = SharedBuffer::create(fullData->data(), partialSize); decoder->setData(data.get(), false); ++partialSize; - } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->status() == ImageFrame::FrameEmpty); + } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->getStatus() == ImageFrame::FrameEmpty); EXPECT_EQ(kNotFound, decoder->frameBufferAtIndex(0)->requiredPreviousFrameIndex()); size_t frameCount = decoder->frameCount(); @@ -620,7 +620,7 @@ TEST(AnimatedWebPTests, DISABLED_resumePartialDecodeAfterClearFrameBufferCache) RefPtr<SharedBuffer> data = SharedBuffer::create(fullData->data(), partialSize); decoder->setData(data.get(), false); ++partialSize; - } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->status() == ImageFrame::FrameEmpty); + } while (!decoder->frameCount() || decoder->frameBufferAtIndex(0)->getStatus() == ImageFrame::FrameEmpty); // Skip to the last frame and clear. decoder->setData(fullData.get(), true); @@ -631,7 +631,7 @@ TEST(AnimatedWebPTests, DISABLED_resumePartialDecodeAfterClearFrameBufferCache) // Resume decoding of the first frame. ImageFrame* firstFrame = decoder->frameBufferAtIndex(0); - EXPECT_EQ(ImageFrame::FrameComplete, firstFrame->status()); + EXPECT_EQ(ImageFrame::FrameComplete, firstFrame->getStatus()); EXPECT_EQ(baselineHashes[0], hashBitmap(firstFrame->getSkBitmap())); } diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Values.h b/third_party/WebKit/Source/platform/inspector_protocol/Values.h index fe75c6e..6d99677 100644 --- a/third_party/WebKit/Source/platform/inspector_protocol/Values.h +++ b/third_party/WebKit/Source/platform/inspector_protocol/Values.h @@ -34,16 +34,16 @@ public: return adoptPtr(new Value()); } - typedef enum { + enum ValueType { TypeNull = 0, TypeBoolean, TypeNumber, TypeString, TypeObject, TypeArray - } Type; + }; - Type type() const { return m_type; } + ValueType type() const { return m_type; } bool isNull() const { return m_type == TypeNull; } @@ -58,13 +58,13 @@ public: protected: Value() : m_type(TypeNull) { } - explicit Value(Type type) : m_type(type) { } + explicit Value(ValueType type) : m_type(type) { } private: friend class DictionaryValue; friend class ListValue; - Type m_type; + ValueType m_type; }; class PLATFORM_EXPORT FundamentalValue : public Value { diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp index 0ee3437..5819964 100644 --- a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp +++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp @@ -33,12 +33,12 @@ namespace blink { -MediaStreamSource* MediaStreamSource::create(const String& id, Type type, const String& name, bool remote, bool readonly, ReadyState readyState, bool requiresConsumer) +MediaStreamSource* MediaStreamSource::create(const String& id, StreamType type, const String& name, bool remote, bool readonly, ReadyState readyState, bool requiresConsumer) { return new MediaStreamSource(id, type, name, remote, readonly, readyState, requiresConsumer); } -MediaStreamSource::MediaStreamSource(const String& id, Type type, const String& name, bool remote, bool readonly, ReadyState readyState, bool requiresConsumer) +MediaStreamSource::MediaStreamSource(const String& id, StreamType type, const String& name, bool remote, bool readonly, ReadyState readyState, bool requiresConsumer) : m_id(id) , m_type(type) , m_name(name) diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h index b3e9d34..8802ae5 100644 --- a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h +++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.h @@ -59,7 +59,7 @@ public: virtual ~ExtraData() { } }; - enum Type { + enum StreamType { TypeAudio, TypeVideo }; @@ -70,16 +70,16 @@ public: ReadyStateEnded = 2 }; - static MediaStreamSource* create(const String& id, Type, const String& name, bool remote, bool readonly, ReadyState = ReadyStateLive, bool requiresConsumer = false); + static MediaStreamSource* create(const String& id, StreamType, const String& name, bool remote, bool readonly, ReadyState = ReadyStateLive, bool requiresConsumer = false); const String& id() const { return m_id; } - Type type() const { return m_type; } + StreamType type() const { return m_type; } const String& name() const { return m_name; } bool remote() const { return m_remote; } bool readonly() const { return m_readonly; } void setReadyState(ReadyState); - ReadyState readyState() const { return m_readyState; } + ReadyState getReadyState() const { return m_readyState; } void addObserver(Observer*); @@ -103,10 +103,10 @@ public: DECLARE_TRACE(); private: - MediaStreamSource(const String& id, Type, const String& name, bool remote, bool readonly, ReadyState, bool requiresConsumer); + MediaStreamSource(const String& id, StreamType, const String& name, bool remote, bool readonly, ReadyState, bool requiresConsumer); String m_id; - Type m_type; + StreamType m_type; String m_name; bool m_remote; bool m_readonly; diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp b/third_party/WebKit/Source/platform/network/ResourceRequest.cpp index f54b7d5..94f716c 100644 --- a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp +++ b/third_party/WebKit/Source/platform/network/ResourceRequest.cpp @@ -343,7 +343,7 @@ bool equalIgnoringHeaderFields(const ResourceRequest& a, const ResourceRequest& if (a.priority() != b.priority()) return false; - if (a.referrerPolicy() != b.referrerPolicy()) + if (a.getReferrerPolicy() != b.getReferrerPolicy()) return false; EncodedFormData* formDataA = a.httpBody(); diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.h b/third_party/WebKit/Source/platform/network/ResourceRequest.h index ffab6da..18bd19f 100644 --- a/third_party/WebKit/Source/platform/network/ResourceRequest.h +++ b/third_party/WebKit/Source/platform/network/ResourceRequest.h @@ -129,7 +129,7 @@ public: bool didSetHTTPReferrer() const { return m_didSetHTTPReferrer; } const AtomicString& httpReferrer() const { return httpHeaderField(HTTPNames::Referer); } - ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } + ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; } void setHTTPReferrer(const Referrer&); void clearHTTPReferrer(); diff --git a/third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp b/third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp index c5282a0..d3d89f5 100644 --- a/third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp +++ b/third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp @@ -72,7 +72,7 @@ TEST(ResourceRequestTest, CrossThreadResourceRequestData) EXPECT_EQ(WebURLRequest::RequestContextAudio, original.requestContext()); EXPECT_EQ(WebURLRequest::FrameTypeNested, original.frameType()); EXPECT_STREQ("http://www.example.com/referrer.htm", original.httpReferrer().utf8().data()); - EXPECT_EQ(ReferrerPolicyDefault, original.referrerPolicy()); + EXPECT_EQ(ReferrerPolicyDefault, original.getReferrerPolicy()); OwnPtr<CrossThreadResourceRequestData> data1(original.copyData()); ResourceRequest copy1(data1.get()); @@ -99,7 +99,7 @@ TEST(ResourceRequestTest, CrossThreadResourceRequestData) EXPECT_EQ(WebURLRequest::RequestContextAudio, copy1.requestContext()); EXPECT_EQ(WebURLRequest::FrameTypeNested, copy1.frameType()); EXPECT_STREQ("http://www.example.com/referrer.htm", copy1.httpReferrer().utf8().data()); - EXPECT_EQ(ReferrerPolicyDefault, copy1.referrerPolicy()); + EXPECT_EQ(ReferrerPolicyDefault, copy1.getReferrerPolicy()); copy1.setAllowStoredCredentials(true); copy1.setReportUploadProgress(true); diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.h b/third_party/WebKit/Source/platform/network/ResourceResponse.h index bb4e092..5977377 100644 --- a/third_party/WebKit/Source/platform/network/ResourceResponse.h +++ b/third_party/WebKit/Source/platform/network/ResourceResponse.h @@ -172,7 +172,7 @@ public: bool hasMajorCertificateErrors() const { return m_hasMajorCertificateErrors; } void setHasMajorCertificateErrors(bool hasMajorCertificateErrors) { m_hasMajorCertificateErrors = hasMajorCertificateErrors; } - SecurityStyle securityStyle() const { return m_securityStyle; } + SecurityStyle getSecurityStyle() const { return m_securityStyle; } void setSecurityStyle(SecurityStyle securityStyle) { m_securityStyle = securityStyle; } const SecurityDetails* securityDetails() const { return &m_securityDetails; } diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp index 250f367..813316fa 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp @@ -370,7 +370,7 @@ void ScrollableArea::didAddScrollbar(Scrollbar& scrollbar, ScrollbarOrientation scrollAnimator().didAddHorizontalScrollbar(scrollbar); // <rdar://problem/9797253> AppKit resets the scrollbar's style when you attach a scrollbar - setScrollbarOverlayStyle(scrollbarOverlayStyle()); + setScrollbarOverlayStyle(getScrollbarOverlayStyle()); } void ScrollableArea::willRemoveScrollbar(Scrollbar& scrollbar, ScrollbarOrientation orientation) diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h index 4a41ba7..4182ec8 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h @@ -122,7 +122,7 @@ public: bool hasOverlayScrollbars() const; void setScrollbarOverlayStyle(ScrollbarOverlayStyle); - ScrollbarOverlayStyle scrollbarOverlayStyle() const { return static_cast<ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); } + ScrollbarOverlayStyle getScrollbarOverlayStyle() const { return static_cast<ScrollbarOverlayStyle>(m_scrollbarOverlayStyle); } // This getter will create a ScrollAnimatorBase if it doesn't already exist. ScrollAnimatorBase& scrollAnimator() const; diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp index e48362a..f9c0eb2 100644 --- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp +++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp @@ -109,9 +109,9 @@ void Scrollbar::setFrameRect(const IntRect& frameRect) setNeedsPaintInvalidation(AllParts); } -ScrollbarOverlayStyle Scrollbar::scrollbarOverlayStyle() const +ScrollbarOverlayStyle Scrollbar::getScrollbarOverlayStyle() const { - return m_scrollableArea ? m_scrollableArea->scrollbarOverlayStyle() : ScrollbarOverlayStyleDefault; + return m_scrollableArea ? m_scrollableArea->getScrollbarOverlayStyle() : ScrollbarOverlayStyleDefault; } void Scrollbar::getTickmarks(Vector<IntRect>& tickmarks) const diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.h b/third_party/WebKit/Source/platform/scroll/Scrollbar.h index 1396433..6390c67 100644 --- a/third_party/WebKit/Source/platform/scroll/Scrollbar.h +++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.h @@ -69,7 +69,7 @@ public: void setFrameRect(const IntRect&) override; IntRect frameRect() const override { return Widget::frameRect(); } - ScrollbarOverlayStyle scrollbarOverlayStyle() const override; + ScrollbarOverlayStyle getScrollbarOverlayStyle() const override; void getTickmarks(Vector<IntRect>&) const override; bool isScrollableAreaActive() const override; diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeClient.h b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeClient.h index 764b4db..a29db05 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeClient.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeClient.h @@ -57,7 +57,7 @@ public: virtual void invalidate() = 0; virtual void invalidateRect(const IntRect&) = 0; - virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const = 0; + virtual ScrollbarOverlayStyle getScrollbarOverlayStyle() const = 0; virtual void getTickmarks(Vector<IntRect>&) const = 0; virtual bool isScrollableAreaActive() const = 0; diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm index ef1d328..12b81f4 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm +++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm @@ -220,7 +220,7 @@ bool ScrollbarThemeMacOverlayAPI::usesOverlayScrollbars() const void ScrollbarThemeMacOverlayAPI::updateScrollbarOverlayStyle(const ScrollbarThemeClient& scrollbar) { ScrollbarPainter painter = painterForScrollbar(scrollbar); - switch (scrollbar.scrollbarOverlayStyle()) { + switch (scrollbar.getScrollbarOverlayStyle()) { case ScrollbarOverlayStyleDefault: [painter setKnobStyle:NSScrollerKnobStyleDefault]; break; diff --git a/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp b/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp index 1a3f8e2..56937ba 100644 --- a/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp +++ b/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp @@ -167,7 +167,7 @@ protected: TokenHandler handler; if (!DateTimeFormat::parse(formatString, handler)) return Tokens(Token("*failed*")); - return handler.tokens(); + return handler.getTokens(); } FieldType single(const char ch) @@ -191,7 +191,7 @@ private: return index >=0 && index < static_cast<int>(m_tokens.size()) ? m_tokens[index].fieldType : DateTimeFormat::FieldTypeInvalid; } - Tokens tokens() const { return Tokens(m_tokens); } + Tokens getTokens() const { return Tokens(m_tokens); } private: void visitField(FieldType fieldType, int count) override diff --git a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp index 7c984cf..6ba7a17 100644 --- a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp +++ b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp @@ -424,11 +424,11 @@ String Locale::localizedDecimalSeparator() String Locale::formatDateTime(const DateComponents& date, FormatType formatType) { - if (date.type() == DateComponents::Invalid) + if (date.getType() == DateComponents::Invalid) return String(); DateTimeStringBuilder builder(*this, date); - switch (date.type()) { + switch (date.getType()) { case DateComponents::Time: builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFormat()); break; diff --git a/third_party/WebKit/Source/platform/text/TextBreakIterator.h b/third_party/WebKit/Source/platform/text/TextBreakIterator.h index 940a3a5..584d685 100644 --- a/third_party/WebKit/Source/platform/text/TextBreakIterator.h +++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.h @@ -84,7 +84,7 @@ public: releaseLineBreakIterator(m_iterator); } - String string() const { return m_string; } + String getString() const { return m_string; } UChar lastCharacter() const { diff --git a/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp b/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp index d4adfb3..2f98679 100644 --- a/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp +++ b/third_party/WebKit/Source/web/DateTimeChooserImpl.cpp @@ -100,7 +100,7 @@ static String valueToDateTimeString(double value, AtomicString type) components.setMillisecondsSinceEpochForWeek(value); else ASSERT_NOT_REACHED(); - return components.type() == DateComponents::Invalid ? String() : components.toString(); + return components.getType() == DateComponents::Invalid ? String() : components.toString(); } void DateTimeChooserImpl::writeDocument(SharedBuffer* data) diff --git a/third_party/WebKit/Source/web/WebImageDecoder.cpp b/third_party/WebKit/Source/web/WebImageDecoder.cpp index 2961bd8..b95cd85 100644 --- a/third_party/WebKit/Source/web/WebImageDecoder.cpp +++ b/third_party/WebKit/Source/web/WebImageDecoder.cpp @@ -98,7 +98,7 @@ bool WebImageDecoder::isFrameCompleteAtIndex(int index) const ImageFrame* const frameBuffer = m_private->frameBufferAtIndex(index); if (!frameBuffer) return false; - return frameBuffer->status() == ImageFrame::FrameComplete; + return frameBuffer->getStatus() == ImageFrame::FrameComplete; } WebImage WebImageDecoder::getFrameAtIndex(int index = 0) const diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp index ebcf399..d84c91f 100644 --- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp +++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp @@ -288,7 +288,7 @@ PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W // MakePlatformKeyboardEvent -------------------------------------------------- -inline PlatformEvent::Type toPlatformKeyboardEventType(WebInputEvent::Type type) +inline PlatformEvent::EventType toPlatformKeyboardEventType(WebInputEvent::Type type) { switch (type) { case WebInputEvent::KeyUp: @@ -322,7 +322,7 @@ PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder(const WebKeyboardEven m_windowsVirtualKeyCode = e.windowsKeyCode; } -void PlatformKeyboardEventBuilder::setKeyType(Type type) +void PlatformKeyboardEventBuilder::setKeyType(EventType type) { // According to the behavior of Webkit in Windows platform, // we need to convert KeyDown to RawKeydown and Char events @@ -353,7 +353,7 @@ bool PlatformKeyboardEventBuilder::isCharacterKey() const return true; } -inline PlatformEvent::Type toPlatformTouchEventType(const WebInputEvent::Type type) +inline PlatformEvent::EventType toPlatformTouchEventType(const WebInputEvent::Type type) { switch (type) { case WebInputEvent::TouchStart: @@ -370,7 +370,7 @@ inline PlatformEvent::Type toPlatformTouchEventType(const WebInputEvent::Type ty return PlatformEvent::TouchStart; } -inline PlatformTouchPoint::State toPlatformTouchPointState(const WebTouchPoint::State state) +inline PlatformTouchPoint::TouchState toPlatformTouchPointState(const WebTouchPoint::State state) { switch (state) { case WebTouchPoint::StateReleased: @@ -607,7 +607,7 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event) memcpy(keyIdentifier, event.keyIdentifier().ascii().data(), event.keyIdentifier().length()); } -WebInputEvent::Type toWebKeyboardEventType(PlatformEvent::Type type) +WebInputEvent::Type toWebKeyboardEventType(PlatformEvent::EventType type) { switch (type) { case PlatformEvent::KeyUp: diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.h b/third_party/WebKit/Source/web/WebInputEventConversion.h index e564f8c..1a157c8 100644 --- a/third_party/WebKit/Source/web/WebInputEventConversion.h +++ b/third_party/WebKit/Source/web/WebInputEventConversion.h @@ -74,7 +74,7 @@ public: class PlatformKeyboardEventBuilder : public PlatformKeyboardEvent { public: PlatformKeyboardEventBuilder(const WebKeyboardEvent&); - void setKeyType(Type); + void setKeyType(EventType); bool isCharacterKey() const; }; diff --git a/third_party/WebKit/Source/web/tests/KeyboardTest.cpp b/third_party/WebKit/Source/web/tests/KeyboardTest.cpp index 4e50f2a..f67ea06 100644 --- a/third_party/WebKit/Source/web/tests/KeyboardTest.cpp +++ b/third_party/WebKit/Source/web/tests/KeyboardTest.cpp @@ -48,7 +48,7 @@ public: // E.g., sending in the enter key gives back "InsertNewline". const char* interpretKeyEvent( const WebKeyboardEvent& webKeyboardEvent, - PlatformEvent::Type keyType) + PlatformEvent::EventType keyType) { PlatformKeyboardEventBuilder evt(webKeyboardEvent); evt.setKeyType(keyType); diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index 20c47ea..65c0074 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp @@ -1562,7 +1562,7 @@ TEST_F(WebFrameTest, SetForceZeroLayoutHeightWorksWithRelayoutsWhenHeightChanged ASSERT_NE(nullptr, element); EXPECT_EQ(String("oldValue"), element->innerText()); - PlatformGestureEvent gestureEvent(PlatformEvent::Type::GestureTap, hitPoint, hitPoint, IntSize(0, 0), 0, PlatformEvent::NoModifiers, PlatformGestureSourceTouchscreen); + PlatformGestureEvent gestureEvent(PlatformEvent::EventType::GestureTap, hitPoint, hitPoint, IntSize(0, 0), 0, PlatformEvent::NoModifiers, PlatformGestureSourceTouchscreen); webViewHelper.webViewImpl()->mainFrameImpl()->frame()->eventHandler().handleGestureEvent(gestureEvent); // when pressed, the button changes its own text to "updatedValue" EXPECT_EQ(String("updatedValue"), element->innerText()); diff --git a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp index 611297d..2ea1b77 100644 --- a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp @@ -940,7 +940,7 @@ TEST(WebInputEventConversionTest, PlatformWheelEventBuilder) EXPECT_EQ(5, platformWheelBuilder.position().y()); EXPECT_EQ(10, platformWheelBuilder.deltaX()); EXPECT_EQ(15, platformWheelBuilder.deltaY()); - EXPECT_EQ(PlatformEvent::CtrlKey, platformWheelBuilder.modifiers()); + EXPECT_EQ(PlatformEvent::CtrlKey, platformWheelBuilder.getModifiers()); EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); EXPECT_TRUE(platformWheelBuilder.canScroll()); EXPECT_EQ(platformWheelBuilder.getRailsMode(), PlatformEvent::RailsModeHorizontal); @@ -963,7 +963,7 @@ TEST(WebInputEventConversionTest, PlatformWheelEventBuilder) EXPECT_EQ(0, platformWheelBuilder.position().y()); EXPECT_EQ(15, platformWheelBuilder.deltaX()); EXPECT_EQ(10, platformWheelBuilder.deltaY()); - EXPECT_EQ(PlatformEvent::ShiftKey, platformWheelBuilder.modifiers()); + EXPECT_EQ(PlatformEvent::ShiftKey, platformWheelBuilder.getModifiers()); EXPECT_FALSE(platformWheelBuilder.hasPreciseScrollingDeltas()); EXPECT_FALSE(platformWheelBuilder.canScroll()); EXPECT_EQ(platformWheelBuilder.getRailsMode(), PlatformEvent::RailsModeFree); @@ -986,7 +986,7 @@ TEST(WebInputEventConversionTest, PlatformWheelEventBuilder) EXPECT_EQ(0, platformWheelBuilder.position().y()); EXPECT_EQ(15, platformWheelBuilder.deltaX()); EXPECT_EQ(10, platformWheelBuilder.deltaY()); - EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.modifiers()); + EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.getModifiers()); EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); EXPECT_FALSE(platformWheelBuilder.canScroll()); EXPECT_EQ(platformWheelBuilder.getRailsMode(), PlatformEvent::RailsModeVertical); |