Skip to content

Instantly share code, notes, and snippets.

@arajkumar
Last active May 21, 2019 17:17
Show Gist options
  • Save arajkumar/159c555dd4ccb3444f548193cf04d6dd to your computer and use it in GitHub Desktop.
Save arajkumar/159c555dd4ccb3444f548193cf04d6dd to your computer and use it in GitHub Desktop.
diff --git a/modules/javafx.web/src/main/native/Source/WebCore/platform/graphics/java/GraphicsContextJava.cpp b/modules/javafx.web/src/main/native/Source/WebCore/platform/graphics/java/GraphicsContextJava.cpp
index ed160b1f76a..177675e6881 100644
--- a/modules/javafx.web/src/main/native/Source/WebCore/platform/graphics/java/GraphicsContextJava.cpp
+++ b/modules/javafx.web/src/main/native/Source/WebCore/platform/graphics/java/GraphicsContextJava.cpp
@@ -258,12 +258,7 @@ void GraphicsContext::clipToImageBuffer(ImageBuffer&, const FloatRect&)
IntRect GraphicsContext::clipBounds() const
{
- // Transformation has inverse effect on clip bounds.
- return enclosingIntRect(m_state
- .transform
- .inverse()
- .value_or(AffineTransform())
- .mapRect(m_state.clipBounds));
+ return {};
}
void GraphicsContext::drawFocusRing(const Path&, float, float, const Color&)
diff --git a/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.cpp b/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.cpp
index 730408d843a..1fe16de4856 100644
--- a/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.cpp
+++ b/modules/javafx.web/src/main/native/Source/WebCore/platform/java/ScrollbarThemeJava.cpp
@@ -62,26 +62,16 @@ jclass getJScrollBarThemeClass()
JLObject getJScrollBarTheme(Scrollbar& sb)
{
- FrameView* fv = sb.enabled() ? sb.root() : nullptr;
+ FrameView* fv = sb.root();
if (!fv) {
// the scrollbar has been detached
return 0;
}
-
Page* page = fv->frame().page();
- if (!page) {
- return 0;
- }
-
- auto& chromeClient = page->chrome().client();
- if (!chromeClient.isJavaChromeClient()) {
- // Non Java ChromeClient, might be a utility Page(svg?), refer Page::isUtilityPage
- return 0;
- }
-
- JLObject jWebPage = static_cast<ChromeClientJava&>(chromeClient).platformPage();
+ JLObject jWebPage = ((ChromeClientJava*)&page->chrome().client())->platformPage();
JNIEnv* env = WebCore_GetJavaEnv();
+
static jmethodID mid = env->GetMethodID(
PG_GetWebPageClass(env),
"getScrollBarTheme",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment