<AWT Dev> [9] Review Request: JDK-8031964 [macosx] Dragging images from the browser does not work
Petr Pchelko
petr.pchelko at oracle.com
Mon Jan 27 06:23:48 PST 2014
Hello, Sergey.
> Typo in the test description
> 3) When the image is dropped you should se the list of available DataFlavors",
Thank you. Updated: http://cr.openjdk.java.net/~pchelko/9/8031964/webrev.03/
> I assume we always use different long id as a key, otherwise a cached Long objects will brake our map.
> formatMap.put((long) i, predefinedClipboardNames[i]);
Yes. Handling this map is separated between Java and native, so it's hard to track. But it looks like we add new keys to the map
only when we register a new pasteboard type. And for it's long key we use the map size + 1. (The size of the native map which is the
same as the Java map).
With best regards. Petr.
On 27.01.2014, at 18:05, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> Hi, Petr.
> Typo in the test description
> 3) When the image is dropped you should se the list of available DataFlavors",
>
> I assume we always use different long id as a key, otherwise a cached Long objects will brake our map.
> formatMap.put((long) i, predefinedClipboardNames[i]);
>
> On 27.01.2014 17:01, Petr Pchelko wrote:
>> Hello, Sergey.
>>
>> After more investigation I've decided to take a more aggressive approach to this fix. The new version is available here:
>> http://cr.openjdk.java.net/~pchelko/9/8031964/webrev.01/
>>
>> The HTMLSupport class and HTMLDecodingInputStream class were copy-pasted from WDataTransferer in the early stages of the macosx port.
>> But they are already not used for ages, so I've decided o remove them. On windows they are needed to parse the header of the CF_HTML pasteboard
>> type (see http://msdn.microsoft.com/en-us/library/aa767917(v=vs.85).aspx). This header contains some information about the HTML selection.
>>
>> However, on Mac OS X we use the NSHTMLPboardType for HTML transfer, and it does not contain any of these headers. So this code is certainly not needed.
>>
>> Also I've deleted the unused methods and fields. I've verified these are not called from native.
>>
>> With best regards. Petr.
>>
>> On 18.01.2014, at 2:01, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
>>
>>> Hi, Petr.
>>> The fix looks good.
>>> BTW:This code was added on windows as a fix for:
>>> https://bugs.openjdk.java.net/browse/JDK-4399204
>>> https://bugs.openjdk.java.net/browse/JDK-4393453 <-- the code change is attached
>>>
>>> On 16.01.2014 18:12, Petr Pchelko wrote:
>>>> Hello, AWT Team.
>>>>
>>>> Please review the fix for the issue:
>>>> https://bugs.openjdk.java.net/browse/JDK-8031964
>>>> The fix is available at:
>>>> http://cr.openjdk.java.net/~pchelko/9/8031964/webrev.00/
>>>>
>>>> The fix resolves the problem we've had with the URL pasteboard type and the problem with overriding the method of the superclass.
>>>>
>>>> Additional comments are needed about the removed code about HTML: I've run all tests I know about HTML transfer and I could
>>>> not find what fails because of this code. So I've removed it as it was never called any way. However, we have a bug JDK-8027366
>>>> which is about the problem with an overriding method. After I push this changes I'll cross-reference that bug with this, so that we
>>>> could restore the deleted code when we find out why was it needed before the Denis's data transfer fix.
>>>>
>>>> With best regards. Petr.
>>>
>>>
>>> --
>>> Best regards, Sergey.
>>
>
>
> --
> Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20140127/a855808b/attachment.html
More information about the awt-dev
mailing list