Skip to content

Commit

Permalink
misc small fixes from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
mnutt committed Dec 14, 2024
1 parent 9c2ce34 commit 70f6ec3
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Source/WebCore/accessibility/qt/AXObjectCacheQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "HTMLSelectElement.h"
#include "LocalFrame.h"
#include "Page.h"
#include "NotImplemented.h"

namespace WebCore {

Expand Down Expand Up @@ -63,7 +64,7 @@ void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject*,
void AXObjectCache::handleScrolledToAnchor(const Node& scrolledToNode)
{
if (RefPtr object = AccessibilityObject::firstAccessibleObjectFromNode(&scrolledToNode))
postPlatformNotification(*object, AXScrolledToAnchor);
postPlatformNotification(*object, AXNotification::ScrolledToAnchor);
}

void AXObjectCache::platformHandleFocusedUIElementChanged(Element*, Element* newFocusedNode)
Expand All @@ -76,7 +77,7 @@ void AXObjectCache::platformHandleFocusedUIElementChanged(Element*, Element* new
return;

if (RefPtr focusedObject = focusedObjectForPage(page))
postPlatformNotification(*focusedObject, AXFocusedUIElementChanged);
postPlatformNotification(*focusedObject, AXNotification::FocusedUIElementChanged);
}

void AXObjectCache::platformPerformDeferredCacheUpdate()
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/page/qt/EventHandlerQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& event, Widge
if (!widget.isLocalFrameView())
return false;

return downcast<LocalFrameView>(widget).frame().eventHandler().handleWheelEvent(event, { }).wasHandled();
auto [result, _] = downcast<LocalFrameView>(widget).frame().eventHandler().handleWheelEvent(event, { });
return result.wasHandled();
}

HandleUserInputEventResult EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, LocalFrame& subframe)
Expand Down
9 changes: 9 additions & 0 deletions Source/WebCore/platform/graphics/FontPlatformData.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ struct FontPlatformSerializedData {
LOGFONT logFont;
#endif
};
#elif PLATFORM(QT)
struct FontPlatformSerializedCreationData {
Vector<uint8_t> fontFaceData;
String itemInCollection;
};

struct FontPlatformSerializedData {
QRawFont rawFont;
};
#endif

#if PLATFORM(QT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void BitmapTexture::updateContents(GraphicsLayer* sourceLayer, const IntRect& ta
{
// Making an unconditionally unaccelerated buffer here is OK because this code
// isn't used by any platforms that respect the accelerated bit.
auto imageBuffer = ImageBuffer::create(targetRect.size(), RenderingPurpose::Unspecified, 1, DestinationColorSpace::SRGB(), ImageBufferPixelFormat::BGRA8);
auto imageBuffer = ImageBuffer::create(targetRect.size(), RenderingMode::Unaccelerated, RenderingPurpose::Unspecified, 1, DestinationColorSpace::SRGB(), ImageBufferPixelFormat::BGRA8);
if (!imageBuffer)
return;

Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/platform/network/qt/SharedCookieJarQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <QNetworkCookie>
#include <wtf/text/StringHash.h>
#include <wtf/text/MakeString.h>
#include <wtf/WallTime.h>

namespace WebCore {

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/text/PlatformLocale.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Locale {
RightToLeft
};

#if PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(COCOA)
#if PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(COCOA) || PLATFORM(QT)
// Returns the default writing direction for the specified locale.
virtual WritingDirection defaultWritingDirection() const = 0;
#endif
Expand Down
1 change: 1 addition & 0 deletions Source/WebKitLegacy/qt/WebCoreSupport/ChromeClientQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <WebCore/ColorChooser.h>
#include <WebCore/ColorChooserClient.h>
#include <WebCore/CookieConsentDecisionResult.h>
#include <WebCore/Cursor.h>
#include <WebCore/DatabaseTracker.h>
#include <WebCore/Document.h>
#include <WebCore/FileChooser.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <WebCore/DocumentLoader.h>
#include <WebCore/Editor.h>
#include <WebCore/FocusController.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/GraphicsContextQt.h>
#include <WebCore/GCController.h>
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKitLegacy/qt/WebCoreSupport/QWebFrameAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
#include <WebCore/Editing.h>
#include <WebCore/EventHandler.h>
#include <WebCore/FocusController.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/GraphicsContextQt.h>
#include <WebCore/HTMLCollection.h>
#include <WebCore/HTMLFormElement.h>
#include <WebCore/HTMLFrameOwnerElement.h>
#include <WebCore/HTMLMetaElement.h>
#include <WebCore/HTTPParsers.h>
#include <WebCore/HitTestResult.h>
Expand Down
6 changes: 4 additions & 2 deletions Source/WebKitLegacy/qt/WebCoreSupport/QWebPageAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@
#include <WebCore/PageIdentifier.h>
#include <WebCore/PlatformKeyboardEvent.h>
#include <WebCore/PlatformMouseEvent.h>
#include <WebCore/PlatformWheelEvent.h>
#include <WebCore/ProcessSyncClient.h>
#include <WebCore/ProgressTracker.h>
#include <WebCore/QWebPageClient.h>
#include <WebCore/RemoteFrameClient.h>
#include <WebCore/RenderTextControl.h>
#include <WebCore/ScrollbarTheme.h>
#include <WebCore/ScrollingCoordinatorTypes.h>
#include <WebCore/Settings.h>
#include <WebCore/TextIterator.h>
#include <WebCore/UserAgentQt.h>
Expand Down Expand Up @@ -704,8 +706,8 @@ void QWebPageAdapter::wheelEvent(QWheelEvent *ev, int wheelScrollLines)
return;

PlatformWheelEvent pev = convertWheelEvent(ev, wheelScrollLines);
bool accepted = frame->eventHandler().handleWheelEvent(pev, { WheelEventProcessingSteps::SynchronousScrolling, WheelEventProcessingSteps::BlockingDOMEventDispatch }).wasHandled();
ev->setAccepted(accepted);
auto [result, _] = frame->eventHandler().handleWheelEvent(pev, { WheelEventProcessingSteps::SynchronousScrolling, WheelEventProcessingSteps::BlockingDOMEventDispatch });
ev->setAccepted(result.wasHandled());
}
#endif // QT_NO_WHEELEVENT

Expand Down

0 comments on commit 70f6ec3

Please sign in to comment.