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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 1912493004: Ship ImageBitmapOptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up code Created 4 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/core/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index 0c501b8cacfa01eb1f6a7154223e50636254d7ab..a3850f1a03eb158f919ec753d74d8103dddf9ef8 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -71,16 +71,10 @@ static inline ImageBitmapSource* toImageBitmapSourceInternal(const ImageBitmapSo
return nullptr;
}
-ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, const ImageBitmapSourceUnion& bitmapSource, ExceptionState& exceptionState)
+ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, const ImageBitmapSourceUnion& bitmapSource, const ImageBitmapOptions& options, ExceptionState& exceptionState)
{
UseCounter::Feature feature = UseCounter::CreateImageBitmap;
UseCounter::count(scriptState->getExecutionContext(), feature);
- ImageBitmapOptions options;
- return createImageBitmap(scriptState, eventTarget, bitmapSource, options, exceptionState);
-}
-
-ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, const ImageBitmapSourceUnion& bitmapSource, const ImageBitmapOptions& options, ExceptionState& exceptionState)
-{
ImageBitmapSource* bitmapSourceInternal = toImageBitmapSourceInternal(bitmapSource);
if (bitmapSourceInternal->isBlob()) {
Blob* blob = static_cast<Blob*>(bitmapSourceInternal);
@@ -94,16 +88,10 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState,
return createImageBitmap(scriptState, eventTarget, bitmapSourceInternal, 0, 0, srcSize.width(), srcSize.height(), options, exceptionState);
}
-ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, const ImageBitmapSourceUnion& bitmapSource, int sx, int sy, int sw, int sh, ExceptionState& exceptionState)
+ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, const ImageBitmapSourceUnion& bitmapSource, int sx, int sy, int sw, int sh, const ImageBitmapOptions& options, ExceptionState& exceptionState)
{
UseCounter::Feature feature = UseCounter::CreateImageBitmap;
UseCounter::count(scriptState->getExecutionContext(), feature);
- ImageBitmapOptions options;
- return createImageBitmap(scriptState, eventTarget, bitmapSource, sx, sy, sw, sh, options, exceptionState);
-}
-
-ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, const ImageBitmapSourceUnion& bitmapSource, int sx, int sy, int sw, int sh, const ImageBitmapOptions& options, ExceptionState& exceptionState)
-{
ImageBitmapSource* bitmapSourceInternal = toImageBitmapSourceInternal(bitmapSource);
return createImageBitmap(scriptState, eventTarget, bitmapSourceInternal, sx, sy, sw, sh, options, exceptionState);
}

Powered by Google App Engine
This is Rietveld 408576698