Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13bd3d0bfff1b515cfc56ab9a9f9f249891f5831
      
https://github.com/WebKit/WebKit/commit/13bd3d0bfff1b515cfc56ab9a9f9f249891f5831
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/platform/graphics/controls/ButtonPart.h
    M Source/WebCore/platform/graphics/controls/ControlFactory.h
    A Source/WebCore/platform/graphics/mac/controls/ButtonMac.h
    A Source/WebCore/platform/graphics/mac/controls/ButtonMac.mm
    M Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.h
    M Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.mm
    M Source/WebCore/platform/graphics/mac/controls/ProgressBarMac.h
    M Source/WebCore/platform/graphics/mac/controls/ProgressBarMac.mm
    M Source/WebCore/platform/mac/ThemeMac.mm
    M Source/WebCore/rendering/RenderTheme.cpp
    M Source/WebCore/rendering/RenderThemeMac.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.cpp

  Log Message:
  -----------
  [GPU Process] [FormControls] Add a ControlPart for Button
https://bugs.webkit.org/show_bug.cgi?id=249878
rdar://103692353

Reviewed by Aditya Keerthi.

ButtonPart will handle drawing the button form control. This covers the parts'
types: Button, PushButton, DefaultButton and SquareButton. The following HTML
markup shows different buttons in the page:

<button>
<input type="button">
<input type="submit">
<input type="reset">
<input type="file">

On macOS, AppKit will be used to draw the platform controls through ButtonMac.

* Source/WebCore/Headers.cmake:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/controls/ButtonPart.h: Copied from 
Source/WebCore/platform/graphics/mac/controls/TextFieldMac.h.
* Source/WebCore/platform/graphics/controls/ControlFactory.h:
* Source/WebCore/platform/graphics/controls/PlatformControl.h:
(WebCore::PlatformControl::rectForBounds const):
* Source/WebCore/platform/graphics/mac/controls/ButtonMac.h: Copied from 
Source/WebCore/platform/graphics/mac/controls/TextFieldMac.h.
* Source/WebCore/platform/graphics/mac/controls/ButtonMac.mm: Added.
(WebCore::ButtonMac::ButtonMac):
(WebCore::ButtonMac::cellSize const):
(WebCore::ButtonMac::cellOutsets const):
(WebCore::ButtonMac::bezelStyle const):
(WebCore::ButtonMac::updateCellStates):
(WebCore::ButtonMac::rectForBounds const):
(WebCore::ButtonMac::draw):
* Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.h:
* Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.mm:
(WebCore::createButtonCell):
(WebCore::ControlFactoryMac::buttonCell const):
(WebCore::ControlFactoryMac::defaultButtonCell const):
(WebCore::ControlFactoryMac::createPlatformButton):
* Source/WebCore/platform/graphics/mac/controls/ControlMac.h:
* Source/WebCore/platform/graphics/mac/controls/ControlMac.mm:
(WebCore::ControlMac::setFocusRingClipRect):
(WebCore::ControlMac::inflatedRect):
* Source/WebCore/platform/graphics/mac/controls/TextFieldMac.h:
* Source/WebCore/platform/mac/ThemeMac.mm:
(WebCore::button):
(WebCore::ThemeMac::paint):
(WebCore::paintButton): Deleted.
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::RenderTheme::createControlPart const):
* Source/WebCore/rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::canPaint const):
(WebCore::RenderThemeMac::canCreateControlPartForRenderer const):
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ControlPart>::decode):

Canonical link: https://commits.webkit.org/258492@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to