On Fri, 6 Dec 2024 16:38:14 GMT, Lukasz Kostyra <lkost...@openjdk.org> wrote:

> This PR removes obsolete permission checks from javafx.graphics _minus_ Font 
> classes (handled by a separate PR).
> 
> The only part I did not remove from methods/fields listed in the issue is 
> `WindowStage.fullScreenFromUserEvent`. This flag seems quite extensively used 
> and did not seem to have anything to do with permission checks.

code review only, I did not test it.

modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/WindowStage.java
 line 597:

> 595:                 // event handler.
> 596:                 // If not notify the stageListener to reset fullscreen 
> to false.
> 597:                 if (!fullScreenFromUserEvent) {

is this correct?

do I understand that the effective value for isTrusted is true, which makes the 
condition that the if tests false, so the (new) lines 598-599 would never 
execute.

modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 3080:

> 3078:                 try {
> 3079:                     tm = dndGesture.processTargetDrop(dragEvent);
> 3080:                 } finally {

try-finally is not necessary anymore

modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 3222:

> 3220:                             fireEvent(target, detectedEvent);
> 3221:                         } finally {
> 3222:                             // Putting data to dragboard finished, 
> restrict access to them

try-finally can be removed

modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 3258:

> 3256:                 fireEvent(target != null ? target : Scene.this, me);
> 3257:             } finally {
> 3258:                 // Putting data to dragboard finished, restrict access 
> to them

try-finally

modules/javafx.graphics/src/main/java/javafx/scene/Scene.java line 3530:

> 3528:                     dndGesture.processDropEnd(dragEvent);
> 3529:                 } finally {
> 3530:                     
> DragboardHelper.setDataAccessRestriction(dndGesture.dragboard, true);

try-finally

-------------

PR Review: https://git.openjdk.org/jfx/pull/1658#pullrequestreview-2485530417
PR Review Comment: https://git.openjdk.org/jfx/pull/1658#discussion_r1873777834
PR Review Comment: https://git.openjdk.org/jfx/pull/1658#discussion_r1873778903
PR Review Comment: https://git.openjdk.org/jfx/pull/1658#discussion_r1873779478
PR Review Comment: https://git.openjdk.org/jfx/pull/1658#discussion_r1873779684
PR Review Comment: https://git.openjdk.org/jfx/pull/1658#discussion_r1873780001

Reply via email to