Title: [125512] trunk/Source/WebKit2
Revision
125512
Author
[email protected]
Date
2012-08-14 00:17:54 -0700 (Tue, 14 Aug 2012)

Log Message

[WK2] Add getter for capture attribute of input element
https://bugs.webkit.org/show_bug.cgi?id=93710

Patch by Kihong Kwon <[email protected]> on 2012-08-14
Reviewed by Antonio Gomes.

Add getter for capture attribute to WKOpenPanelParameters to support HTML Media Capture.

* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebOpenPanelParameters.cpp:
(WebKit):
(WebKit::WebOpenPanelParameters::capture):
* Shared/WebOpenPanelParameters.h:
(WebOpenPanelParameters):
* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersCopyCapture):
* UIProcess/API/C/WKOpenPanelParameters.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (125511 => 125512)


--- trunk/Source/WebKit2/ChangeLog	2012-08-14 07:14:45 UTC (rev 125511)
+++ trunk/Source/WebKit2/ChangeLog	2012-08-14 07:17:54 UTC (rev 125512)
@@ -1,3 +1,24 @@
+2012-08-14  Kihong Kwon  <[email protected]>
+
+        [WK2] Add getter for capture attribute of input element
+        https://bugs.webkit.org/show_bug.cgi?id=93710
+
+        Reviewed by Antonio Gomes.
+
+        Add getter for capture attribute to WKOpenPanelParameters to support HTML Media Capture.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (CoreIPC::::encode):
+        (CoreIPC::::decode):
+        * Shared/WebOpenPanelParameters.cpp:
+        (WebKit):
+        (WebKit::WebOpenPanelParameters::capture):
+        * Shared/WebOpenPanelParameters.h:
+        (WebOpenPanelParameters):
+        * UIProcess/API/C/WKOpenPanelParameters.cpp:
+        (WKOpenPanelParametersCopyCapture):
+        * UIProcess/API/C/WKOpenPanelParameters.h:
+
 2012-08-13  Tom Sepez  <[email protected]>
 
         [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (125511 => 125512)


--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2012-08-14 07:14:45 UTC (rev 125511)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2012-08-14 07:17:54 UTC (rev 125512)
@@ -555,6 +555,9 @@
 #endif
     encoder->encode(settings.acceptMIMETypes);
     encoder->encode(settings.selectedFiles);
+#if ENABLE(MEDIA_CAPTURE)
+    encoder->encode(settings.capture);
+#endif
 }
 
 bool ArgumentCoder<FileChooserSettings>::decode(ArgumentDecoder* decoder, FileChooserSettings& settings)
@@ -569,6 +572,10 @@
         return false;
     if (!decoder->decode(settings.selectedFiles))
         return false;
+#if ENABLE(MEDIA_CAPTURE)
+    if (!decoder->decode(settings.capture))
+        return false;
+#endif
 
     return true;
 }

Modified: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp (125511 => 125512)


--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp	2012-08-14 07:14:45 UTC (rev 125511)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp	2012-08-14 07:17:54 UTC (rev 125512)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -60,4 +61,12 @@
     return ImmutableArray::adopt(vector);
 }
 
+#if ENABLE(MEDIA_CAPTURE)
+String WebOpenPanelParameters::capture() const
+{
+    return m_settings.capture;
+}
+#endif
+
+
 } // namespace WebCore

Modified: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h (125511 => 125512)


--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h	2012-08-14 07:14:45 UTC (rev 125511)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h	2012-08-14 07:17:54 UTC (rev 125512)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,6 +46,9 @@
     bool allowMultipleFiles() const { return m_settings.allowsMultipleFiles; } 
     PassRefPtr<ImmutableArray> acceptMIMETypes() const;
     Vector<String> selectedFileNames() const { return m_settings.selectedFiles; }
+#if ENABLE(MEDIA_CAPTURE)
+    String capture() const;
+#endif
 
 private:
     explicit WebOpenPanelParameters(const WebCore::FileChooserSettings&);

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp (125511 => 125512)


--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp	2012-08-14 07:14:45 UTC (rev 125511)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp	2012-08-14 07:17:54 UTC (rev 125512)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -46,3 +47,12 @@
 {
     return toAPI(toImpl(parametersRef)->acceptMIMETypes().leakRef());
 }
+
+WKStringRef WKOpenPanelParametersCopyCapture(WKOpenPanelParametersRef parametersRef)
+{
+#if ENABLE(MEDIA_CAPTURE)
+    return toCopiedAPI(toImpl(parametersRef)->capture());
+#else
+    return 0;
+#endif
+}

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h (125511 => 125512)


--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h	2012-08-14 07:14:45 UTC (rev 125511)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h	2012-08-14 07:17:54 UTC (rev 125512)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,6 +43,8 @@
 
 WK_EXPORT WKArrayRef WKOpenPanelParametersCopyAcceptedMIMETypes(WKOpenPanelParametersRef parameters);
 
+WK_EXPORT WKStringRef WKOpenPanelParametersCopyCapture(WKOpenPanelParametersRef parameters);
+
 #ifdef __cplusplus
 }
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to