Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Unified Diff: third_party/WebKit/Source/modules/webaudio/PannerNode.cpp

Issue 2760353002: Define default values for options dictionaries for WebAudio (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
index fb400a2a0b5b1d14a38e99bfa6c12f4997ceb598..ada9506c9831901a6ec19eb1586abfccc81e3311 100644
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
@@ -679,37 +679,23 @@ PannerNode* PannerNode::Create(BaseAudioContext* context,
node->HandleChannelOptions(options, exception_state);
- if (options.hasPanningModel())
- node->setPanningModel(options.panningModel());
- if (options.hasDistanceModel())
- node->setDistanceModel(options.distanceModel());
-
- if (options.hasPositionX())
- node->positionX()->setValue(options.positionX());
- if (options.hasPositionY())
- node->positionY()->setValue(options.positionY());
- if (options.hasPositionZ())
- node->positionZ()->setValue(options.positionZ());
-
- if (options.hasOrientationX())
- node->orientationX()->setValue(options.orientationX());
- if (options.hasOrientationY())
- node->orientationY()->setValue(options.orientationY());
- if (options.hasOrientationZ())
- node->orientationZ()->setValue(options.orientationZ());
-
- if (options.hasRefDistance())
- node->setRefDistance(options.refDistance(), exception_state);
- if (options.hasMaxDistance())
- node->setMaxDistance(options.maxDistance(), exception_state);
- if (options.hasRolloffFactor())
- node->setRolloffFactor(options.rolloffFactor());
- if (options.hasConeInnerAngle())
- node->setConeInnerAngle(options.coneInnerAngle());
- if (options.hasConeOuterAngle())
- node->setConeOuterAngle(options.coneOuterAngle());
- if (options.hasConeOuterGain())
- node->setConeOuterGain(options.coneOuterGain());
+ node->setPanningModel(options.panningModel());
+ node->setDistanceModel(options.distanceModel());
+
+ node->positionX()->setValue(options.positionX());
+ node->positionY()->setValue(options.positionY());
+ node->positionZ()->setValue(options.positionZ());
+
+ node->orientationX()->setValue(options.orientationX());
+ node->orientationY()->setValue(options.orientationY());
+ node->orientationZ()->setValue(options.orientationZ());
+
+ node->setRefDistance(options.refDistance(), exception_state);
+ node->setMaxDistance(options.maxDistance(), exception_state);
+ node->setRolloffFactor(options.rolloffFactor());
+ node->setConeInnerAngle(options.coneInnerAngle());
+ node->setConeOuterAngle(options.coneOuterAngle());
+ node->setConeOuterGain(options.coneOuterGain());
return node;
}

Powered by Google App Engine
This is Rietveld 408576698