⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Nov 11, 2018:

6:00 PM Changeset in webkit [238081] by Fujii Hironori
  • 2 edits in trunk/Tools

run-bindings-tests is timing out in some WinCairo bots
https://bugs.webkit.org/show_bug.cgi?id=191348

Reviewed by Alex Christensen.

BuildBot kills run-bindings-tests if it outputs nothing for 20
minutes. run-bindings-tests runs very slowly in WinCairo Docker,
and it takes more than 30 minutes to finish. And, Windows Python
buffers the progress output.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.detect_changes): Call sys.stdout.flush() after the
test case result is output.

5:39 PM Changeset in webkit [238080] by Wenson Hsieh
  • 18 edits
    5 adds in trunk

Implement a new edit command to change the enclosing list type
https://bugs.webkit.org/show_bug.cgi?id=191487
<rdar://problem/45955922>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add support for a new edit command that changes the type of the enclosing list element around the selection from
unordered to ordered list and vice versa. This new edit command is exposed only to internal WebKit2 clients, via
SPI on WKWebView (-_changeListType:).

This is currently intended for use in Mail compose, but may also be adopted by legacy Notes in the future. As
such, the behavior of this editing command mostly matches shipping behavior in Mail compose (which is currently
implemented entirely by Mail). See below for more details.

Test: editing/execCommand/change-list-type.html

WKWebViewEditActions.ChangeListType

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/ChangeListTypeCommand.cpp: Added.

(WebCore::listConversionTypeForSelection):
(WebCore::ChangeListTypeCommand::listConversionType):

Helper that returns a potential list conversion command that may be executed at the given document's selection,
if any exists. We also use existing logic from Mail here to determine which list to change, by walking up the
DOM from the lowest common ancestor container of the current selection until we hit the first list element.

(WebCore::ChangeListTypeCommand::createNewList):

Helper method to create a new list element to replace the given list, and then clone element data from the given
list to the new list. This addresses an existing bug in Mail, wherein changing list type for an enclosing list
which contains inline style properties drops the inline styles, because existing logic in Mail that implements
this editing command only copies the class attribute of the old list to the new list.

(WebCore::ChangeListTypeCommand::doApply):

Apply the edit command by running the following steps:

  • Find the enclosing list element, if any (see above).
  • Create a new list element of the opposite type as the enclosing list, and clone over element data from the

list element being replaced.

  • Insert the new list next to the original list.
  • Move all children of the original list to the new list.
  • Remove the original list.
  • Set the selection to the end of the new list.
  • editing/ChangeListTypeCommand.h: Added.
  • editing/EditAction.h:

Add a pair of new edit actions for conversion from unordered list to ordered list and vice versa.

  • editing/Editor.cpp:

(WebCore::Editor::changeSelectionListType):

Implement this by creating and applying a new ChangeListTypeCommand.

(WebCore::Editor::canChangeSelectionListType): Deleted.

Remove this for now, since there's no need for it until full support for edit command validation is implemented.

  • editing/Editor.h:
  • testing/Internals.cpp:

(WebCore::Internals::changeSelectionListType):

  • testing/Internals.h:
  • testing/Internals.idl:

Add internal hooks to change list type from layout tests.

Source/WebKit:

  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::nameForEditAction):

Add undo/redo edit action strings for ConvertToOrderedList and ConvertToUnorderedList.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::increaseListLevel):
(WebKit::WebPage::decreaseListLevel):
(WebKit::WebPage::changeListType):

Remove preflight checks for these list editing commands. These are not necessary because these commands fall
back to being noops if these checks return false. This avoids an extraneous ancestor walk to determine the
enclosing list element when changing list type.

Source/WebKitLegacy/mac:

Add undo/redo edit action strings for ConvertToOrderedList and ConvertToUnorderedList.

  • WebCoreSupport/WebEditorClient.mm:

(undoNameForEditAction):

Tools:

Add a new API test to verify that -[WKWebView _changeListType:] is hooked up to the corresponding editing
command in WebCore. See the new layout test for a test that exercises more nuanced corner cases.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEditActions.mm:

(-[TestWKWebView setPosition:offset:]):
(-[TestWKWebView setBase:baseOffset:extent:extentOffset:]):
(TestWebKitAPI::webViewForEditActionTestingWithPageNamed):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/editable-nested-lists.html: Added.

LayoutTests:

Add a new layout test to verify that the list change type editing command can be used to swap between enclosing
ordered and unordered lists. Also exercises undo, redo, changing list types under pre and table elements,
and handling selection within nested list elements.

  • editing/execCommand/change-list-type-expected.txt: Added.
  • editing/execCommand/change-list-type.html: Added.
2:22 PM Changeset in webkit [238079] by jfernandez@igalia.com
  • 29 edits
    73 adds
    3 deletes in trunk/LayoutTests

[css-grid] Import additional grid layout test from the WPT suite
https://bugs.webkit.org/show_bug.cgi?id=191369

Reviewed by Manuel Rego Casasnovas.

New Grid Layout tests from the WPT suite.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/META.yml: Added.
  • web-platform-tests/css/css-grid/OWNERS: Removed.
  • web-platform-tests/css/css-grid/abspos/support/grid.css:

(.thirdRowThirdColumn):

  • web-platform-tests/css/css-grid/abspos/support/w3c-import.log:
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-001.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-002.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-003.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-004-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-004.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-005-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-005.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-006-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-006.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-007-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-007.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-008-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-alignment-style-changes-008.html: Added.
  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html:
  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-002.html:
  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-003-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-003.html: Added.
  • web-platform-tests/css/css-grid/alignment/self-baseline/w3c-import.log:
  • web-platform-tests/css/css-grid/alignment/support/style-change.js:

(evaluateStyleChangeMultiple):

  • web-platform-tests/css/css-grid/alignment/support/w3c-import.log:
  • web-platform-tests/css/css-grid/alignment/test-expected.txt: Added.
  • web-platform-tests/css/css-grid/alignment/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-definition/support/grid.css:

(.thirdRowThirdColumn):

  • web-platform-tests/css/css-grid/grid-definition/support/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-001-expected.txt: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-001.html: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002-expected.txt: Added.
  • web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html: Added.
  • web-platform-tests/css/css-grid/grid-items/item-with-table-with-infinite-max-intrinsic-width-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/item-with-table-with-infinite-max-intrinsic-width.html: Added.
  • web-platform-tests/css/css-grid/grid-items/support/grid.css:

(.thirdRowThirdColumn):

  • web-platform-tests/css/css-grid/grid-items/support/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-items/table-with-infinite-max-intrinsic-width-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/table-with-infinite-max-intrinsic-width.html: Added.
  • web-platform-tests/css/css-grid/grid-items/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-002-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-model/grid-container-ignores-first-letter-002.html: Added.
  • web-platform-tests/css/css-grid/grid-model/support/grid.css:

(.thirdRowThirdColumn):

  • web-platform-tests/css/css-grid/grid-model/support/w3c-import.log:
  • web-platform-tests/css/css-grid/grid-model/w3c-import.log:
  • web-platform-tests/css/css-grid/implicit-grids/w3c-import.log:
  • web-platform-tests/css/css-grid/inheritance-expected.txt: Added.
  • web-platform-tests/css/css-grid/inheritance.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-cols-filled-shrinkwrap-001-expected.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-cols-filled-shrinkwrap-001.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-cols-spanned-shrinkwrap-001-expected.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-cols-spanned-shrinkwrap-001.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-rows-filled-shrinkwrap-001-expected.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-rows-filled-shrinkwrap-001.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-rows-spanned-shrinkwrap-001-expected.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/grid-percent-rows-spanned-shrinkwrap-001.html: Added.
  • web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:
  • web-platform-tests/css/css-grid/parsing/grid-area-invalid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-area-invalid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-area-valid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-area-valid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-columns-invalid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-columns-invalid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-columns-valid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-columns-valid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-flow-invalid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-flow-invalid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-flow-valid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-rows-invalid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-rows-invalid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-rows-valid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-auto-rows-valid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-invalid.html: Added.
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-valid-expected.txt: Added.
  • web-platform-tests/css/css-grid/parsing/grid-template-areas-valid.html: Added.
  • web-platform-tests/css/css-grid/parsing/w3c-import.log: Added.
  • web-platform-tests/css/css-grid/placement/w3c-import.log:
  • web-platform-tests/css/css-grid/test-plan/w3c-import.log:
  • web-platform-tests/css/css-grid/w3c-import.log:
  • web-platform-tests/css/support/META.yml: Added.
  • web-platform-tests/css/support/OWNERS: Removed.
  • web-platform-tests/css/support/computed-testcommon.js: Added.

(test_computed_value):

  • web-platform-tests/css/support/grid.css:

(.thirdRowThirdColumn):

  • web-platform-tests/css/support/inheritance-testcommon.js: Added.

(assert_initial):

  • web-platform-tests/css/support/parsing-testcommon.js: Added.

(test_valid_value):

  • web-platform-tests/css/support/support/w3c-import.log:
  • web-platform-tests/css/support/w3c-import.log:

LayoutTests:

  • TestExpectations: Added bugs and ImageOnlyFailure for 3 tests that are failing.
1:32 PM Changeset in webkit [238078] by dbates@webkit.org
  • 38 edits in trunk

[iOS] Draw caps lock indicator in password fields
https://bugs.webkit.org/show_bug.cgi?id=190565
<rdar://problem/45262343>

Source/WebCore:

Reviewed by Dean Jackson.

Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
fields on iOS more closely match the behavior of password fields on Mac.

The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
web views listen for keyboard availability changes so as to update the the caps lock state when
a hardware keyboard is detached or attached.

  • WebCore.xcodeproj/project.pbxproj:
  • page/EventHandler.cpp:

(WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
(WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().

  • page/EventHandler.h:
  • platform/cocoa/KeyEventCocoa.mm:

(WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
(WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.

  • platform/ios/KeyEventIOS.mm:

(WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
(WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
(WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.

  • platform/ios/WebEvent.h:
  • platform/ios/WebEvent.mm:

(+[WebEvent modifierFlags]): Added.

  • platform/mac/KeyEventMac.mm:

(WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
by both Mac and iOS.
(WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
by both Mac and iOS.

  • rendering/RenderThemeCocoa.h:
  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
shared by both Mac and iOS.

Source/WebCore/PAL:

Reviewed by Dean Jackson.

Forward declare some more SPI.

  • pal/spi/ios/GraphicsServicesSPI.h:
  • pal/spi/ios/UIKitSPI.h:

Source/WebKit:

Reviewed by Dean Jackson.

Notify the WebContent process with the current modifer state on window activation changes. Notify
the WebContent process when hardware keyboard availability changes (e.g. a keyboard is attached).

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Register for hardware keyboard availability changed notifications.
(-[WKWebView dealloc]): Unregister from hardware availability changed notifications.
(hardwareKeyboardAvailabilityChangedCallback): Added.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateCurrentModifierState): Compile this code when building for iOS.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _handleKeyUIEvent:]): Update the current modifier state if this event is a hardware
keyboard flags changed event.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::hardwareKeyboardAvailabilityChanged): Added.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::hardwareKeyboardAvailabilityChanged):
Added new message HardwareKeyboardAvailabilityChanged. Notify the focused HTML input element (if we have
one) that the caps lock state may have changed when we receive message HardwareKeyboardAvailabilityChanged
so that we toggle visibility of the caps lock indicator.

Source/WebKitLegacy/mac:

Reviewed by Dean Jackson.

Update the caps lock state when a hardware keyboard is attached or detached.

  • WebView/WebHTMLView.mm:

(hardwareKeyboardAvailabilityChangedCallback): Added.
(-[WebHTMLView initWithFrame:]): Register for hardware keyboard availability changed notifications.
(-[WebHTMLView dealloc]): Unregister from hardware keyboard availability changed notifications.

WebKitLibraries:

Reviewed by Dean Jackson.

Expose some more symbols.

  • WebKitPrivateFrameworkStubs/iOS/12/GraphicsServices.framework/GraphicsServices.tbd:

LayoutTests:

Unreviewed.

Update expected results now that iOS supports showing the caps lock indictor.

  • platform/ios/fast/css/text-overflow-input-expected.txt:
  • platform/ios/fast/forms/basic-inputs-expected.txt:
  • platform/ios/fast/forms/input-appearance-height-expected.txt:
  • platform/ios/fast/forms/input-value-expected.txt:
  • platform/ios/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/ios/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt:
1:29 PM Changeset in webkit [238077] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[LFC][BFC] In-flow positioned logic is really formatting context dependent.
https://bugs.webkit.org/show_bug.cgi?id=191512

Reviewed by Simon Fraser.

Move block formatting context specific code from FormattingContext to BlockFormattingContext.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const): Deleted.

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const):
(WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const): Deleted.

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition): Deleted.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const): Deleted.

  • layout/inlineformatting/InlineFormattingContext.h:
12:00 PM Changeset in webkit [238076] by mitz@apple.com
  • 4 edits
    1 add in trunk

ProcessPoolConfiguration::copy() doesn’t copy m_customWebContentServiceBundleIdentifier
https://bugs.webkit.org/show_bug.cgi?id=191514

Reviewed by Geoffrey Garen.

Source/WebKit:

Test: WebKitCocoa/WKProcessPoolConfiguration.mm

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy): Copy m_customWebContentServiceBundleIdentifier.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WKProcessPoolConfiguration.mm: Added.

(TEST):

9:13 AM Changeset in webkit [238075] by mmaxfield@apple.com
  • 6 edits in trunk

Address post-review comments after r237955
https://bugs.webkit.org/show_bug.cgi?id=191496

Reviewed by Darin Adler.

Source/WebCore:

  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintTextDecoration):

  • style/InlineTextBoxStyle.cpp:

(WebCore::computeUnderlineOffset):

  • style/InlineTextBoxStyle.h:

LayoutTests:

  • fast/css3-text/css3-text-decoration/text-underline-negative-expected.html:
12:27 AM Changeset in webkit [238074] by benjamin@webkit.org
  • 34 edits
    1 move in trunk

Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
https://bugs.webkit.org/show_bug.cgi?id=191492

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Rename file.

  • API/JSValue.mm:

Source/WebCore:

Rename file.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
  • page/mac/EventHandlerMac.mm:
  • platform/mac/URLMac.mm:
  • platform/mac/WebCoreNSURLExtras.mm:
  • platform/mac/WebCoreObjCExtras.mm:
  • rendering/RenderThemeMac.mm:

Source/WebKit:

  • Platform/mac/StringUtilities.mm:
  • UIProcess/ApplicationStateTracker.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

Source/WebKitLegacy/mac:

  • Carbon/HIWebView.mm:
  • Misc/WebNSFileManagerExtras.mm:
  • Misc/WebNSURLExtras.mm:
  • Plugins/Hosted/WebHostedNetscapePluginView.mm:
  • Plugins/WebBasePluginPackage.mm:
  • Plugins/WebPluginContainerCheck.mm:
  • WebCoreSupport/WebCachedFramePlatformData.h:
  • WebCoreSupport/WebDeviceOrientationClient.mm:
  • WebView/WebDelegateImplementationCaching.mm:
  • WebView/WebHTMLView.mm:
  • WebView/WebPDFRepresentation.mm:
  • WebView/WebPolicyDelegate.mm:
  • WebView/WebView.mm:

Tools:

Update file name.

  • DumpRenderTree/mac/DumpRenderTree.mm:
  • WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
  • WebKitTestRunner/mac/TestControllerMac.mm:

Nov 10, 2018:

10:16 PM Changeset in webkit [238073] by benjamin@webkit.org
  • 35 edits
    1 move in trunk

Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
https://bugs.webkit.org/show_bug.cgi?id=191492

Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • API/JSValue.mm:

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
  • page/mac/EventHandlerMac.mm:
  • platform/mac/URLMac.mm:
  • platform/mac/WebCoreNSURLExtras.mm:
  • platform/mac/WebCoreObjCExtras.mm:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::systemColor const):

Source/WebKit:

  • Platform/mac/StringUtilities.mm:
  • UIProcess/ApplicationStateTracker.mm:

(WebKit::ApplicationStateTracker::applicationDidEnterBackground):
(WebKit::ApplicationStateTracker::applicationDidFinishSnapshottingAfterEnteringBackground):
(WebKit::ApplicationStateTracker::applicationWillEnterForeground):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

Source/WebKitLegacy/mac:

  • Carbon/HIWebView.mm:

(UpdateCommandStatus):

  • Misc/WebNSFileManagerExtras.mm:
  • Misc/WebNSURLExtras.mm:
  • Plugins/Hosted/WebHostedNetscapePluginView.mm:
  • Plugins/WebBasePluginPackage.mm:
  • Plugins/WebPluginContainerCheck.mm:

(-[WebPluginContainerCheck _continueWithPolicy:]):

  • WebCoreSupport/WebCachedFramePlatformData.h:

(WebCachedFramePlatformData::clear):

  • WebCoreSupport/WebDeviceOrientationClient.mm:

(WebDeviceOrientationClient::getProvider const):

  • WebView/WebDelegateImplementationCaching.mm:

(CallDelegate):
(CallDelegateReturningBoolean):
(CallResourceLoadDelegateReturningBoolean):
(CallFormDelegate):
(CallFormDelegateReturningBoolean):

  • WebView/WebHTMLView.mm:
  • WebView/WebPDFRepresentation.mm:
  • WebView/WebPolicyDelegate.mm:

(-[WebPolicyDecisionListener _usePolicy:]):

  • WebView/WebView.mm:

Source/WTF:

Because renaming ObjcRuntimeExtras.h to ObjCRuntimeExtras.h only changes
the cases, some systems have issues with applying this patch.

To work around the problem, the change is made is two patches, first rename to
WTFObjCRuntimeExtras.h, then back to ObjCRuntimeExtras.h.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/WTFObjCRuntimeExtras.h: Renamed from Source/WTF/wtf/ObjcRuntimeExtras.h.

(wtfObjCMsgSend):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:
  • WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
  • WebKitTestRunner/mac/TestControllerMac.mm:
10:13 PM Changeset in webkit [238072] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Fix build for 32bit Mac
https://bugs.webkit.org/show_bug.cgi?id=191511

Unreviewed Build Fix.

Build fix, not tests needed.

Make the apporiate delecrations for 32-bit mac support.

  • editing/mac/DictionaryLookup.mm:
4:26 PM Changeset in webkit [238071] by Simon Fraser
  • 36 edits
    128 deletes in trunk

Remove support for -webkit-svg-shadow
https://bugs.webkit.org/show_bug.cgi?id=187429
Source/WebCore:

<rdar://problem/41920735>

Reviewed by Dean Jackson.

-webkit-svg-shadow was a non-standard hack for online iWork, and they no longer use it,
so remove it. No other browser supports it, and chromestatus say it's used on less than
0.000001% of pages.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSProperties.json:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow): Deleted.
(WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow): Deleted.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::didAttachChild):

  • rendering/svg/RenderSVGImage.cpp:

(WebCore::RenderSVGImage::layout):

  • rendering/svg/RenderSVGImage.h:
  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::RenderSVGModelObject):

  • rendering/svg/RenderSVGModelObject.h:

(WebCore::RenderSVGModelObject::repaintRectInLocalCoordinatesExcludingSVGShadow const): Deleted.
(WebCore::RenderSVGModelObject::hasSVGShadow const): Deleted.
(WebCore::RenderSVGModelObject::setHasSVGShadow): Deleted.

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::updateCachedBoundaries):

  • rendering/svg/RenderSVGRoot.h:
  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::updateRepaintBoundingBox):

  • rendering/svg/RenderSVGShape.h:
  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
(WebCore::SVGRenderSupport::layoutChildren):
(WebCore::SVGRenderSupport::styleChanged):
(WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow): Deleted.
(WebCore::SVGRenderSupport::rendererHasSVGShadow): Deleted.
(WebCore::SVGRenderSupport::setRendererHasSVGShadow): Deleted.
(WebCore::SVGRenderSupport::intersectRepaintRectWithShadows): Deleted.
(WebCore::SVGRenderSupport::childAdded): Deleted.

  • rendering/svg/SVGRenderSupport.h:

LayoutTests:

Reviewed by Dean Jackson.

-webkit-svg-shadow was a non-standard hack for online iWork, and they no longer use it,
so remove it. No other browser supports it, and chromestatus say it's used on less than
0.000001% of pages.

  • css3/blending/svg-blend-layer-shadow.html: Removed.
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/repaint/moving-shadow-on-container-expected.png: Removed.
  • fast/repaint/moving-shadow-on-container.html: Removed.
  • fast/repaint/moving-shadow-on-path-expected.txt: Removed.
  • fast/repaint/moving-shadow-on-path.html: Removed.
  • legacy-animation-engine/fast/css/getComputedStyle/resources/property-names.js:
  • platform/gtk/TestExpectations:
  • platform/gtk/css3/blending/svg-blend-layer-shadow-expected.png: Removed.
  • platform/gtk/css3/blending/svg-blend-layer-shadow-expected.txt: Removed.
  • platform/gtk/fast/repaint/moving-shadow-on-container-expected.txt: Removed.
  • platform/gtk/fast/repaint/moving-shadow-on-path-expected.png: Removed.
  • platform/gtk/svg/css/arrow-with-shadow-expected.png: Removed.
  • platform/gtk/svg/css/composite-shadow-example-expected.png: Removed.
  • platform/gtk/svg/css/composite-shadow-example-expected.txt: Removed.
  • platform/gtk/svg/css/composite-shadow-text-expected.png: Removed.
  • platform/gtk/svg/css/composite-shadow-text-expected.txt: Removed.
  • platform/gtk/svg/css/composite-shadow-with-opacity-expected.png: Removed.
  • platform/gtk/svg/css/composite-shadow-with-opacity-expected.txt: Removed.
  • platform/gtk/svg/css/group-with-shadow-expected.png: Removed.
  • platform/gtk/svg/css/shadow-changes-expected.png: Removed.
  • platform/gtk/svg/css/shadow-changes-expected.txt: Removed.
  • platform/gtk/svg/css/stars-with-shadow-expected.png: Removed.
  • platform/gtk/svg/custom/simple-text-double-shadow-expected.txt: Removed.
  • platform/gtk/svg/custom/transform-with-shadow-and-gradient-expected.png: Removed.
  • platform/gtk/svg/custom/transform-with-shadow-and-gradient-expected.txt: Removed.
  • platform/gtk/svg/filters/shadow-on-filter-expected.png: Removed.
  • platform/gtk/svg/filters/shadow-on-rect-with-filter-expected.png: Removed.
  • platform/gtk/svg/repaint/repaint-webkit-svg-shadow-expected.png: Removed.
  • platform/ios/TestExpectations:
  • platform/ios/css3/blending/svg-blend-layer-shadow-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/ios/svg/css/composite-shadow-example-expected.txt: Removed.
  • platform/ios/svg/css/composite-shadow-text-expected.txt: Removed.
  • platform/ios/svg/css/composite-shadow-with-opacity-expected.txt: Removed.
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt:
  • platform/ios/svg/css/group-with-shadow-expected.txt: Removed.
  • platform/ios/svg/css/shadow-changes-expected.txt: Removed.
  • platform/ios/svg/css/stars-with-shadow-expected.txt: Removed.
  • platform/ios/svg/custom/transform-with-shadow-and-gradient-expected.txt: Removed.
  • platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/TestExpectations:
  • platform/mac/css3/blending/svg-blend-layer-shadow-expected.png: Removed.
  • platform/mac/css3/blending/svg-blend-layer-shadow-expected.txt: Removed.
  • platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/mac/fast/repaint/moving-shadow-on-container-expected.txt: Removed.
  • platform/mac/fast/repaint/moving-shadow-on-path-expected.png: Removed.
  • platform/mac/fast/repaint/moving-shadow-on-path-expected.txt: Removed.
  • platform/mac/svg/css/arrow-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/circle-in-mask-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/clippath-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/composite-shadow-example-expected.png: Removed.
  • platform/mac/svg/css/composite-shadow-text-expected.txt: Removed.
  • platform/mac/svg/css/composite-shadow-with-opacity-expected.png: Removed.
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt:
  • platform/mac/svg/css/group-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/group-with-shadow-expected.txt: Removed.
  • platform/mac/svg/css/mask-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/path-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/shadow-and-opacity-expected.png: Removed.
  • platform/mac/svg/css/shadow-changes-expected.png: Removed.
  • platform/mac/svg/css/shadow-changes-expected.txt: Removed.
  • platform/mac/svg/css/shadow-with-large-radius-expected.png: Removed.
  • platform/mac/svg/css/shadow-with-negative-offset-expected.png: Removed.
  • platform/mac/svg/css/stars-with-shadow-expected.png: Removed.
  • platform/mac/svg/css/stars-with-shadow-expected.txt: Removed.
  • platform/mac/svg/custom/simple-text-double-shadow-expected.png: Removed.
  • platform/mac/svg/custom/simple-text-double-shadow-expected.txt: Removed.
  • platform/mac/svg/custom/transform-with-shadow-and-gradient-expected.png: Removed.
  • platform/mac/svg/custom/transform-with-shadow-and-gradient-expected.txt: Removed.
  • platform/mac/svg/filters/shadow-on-filter-expected.png: Removed.
  • platform/mac/svg/filters/shadow-on-rect-with-filter-expected.png: Removed.
  • platform/mac/svg/repaint/repaint-webkit-svg-shadow-expected.png: Removed.
  • platform/win/TestExpectations:
  • platform/win/css3/blending/svg-blend-layer-shadow-expected.txt: Removed.
  • platform/win/fast/repaint/moving-shadow-on-container-expected.txt: Removed.
  • platform/win/fast/repaint/moving-shadow-on-path-expected.txt: Removed.
  • platform/win/svg/css/composite-shadow-text-expected.txt: Removed.
  • platform/win/svg/css/group-with-shadow-expected.txt: Removed.
  • platform/win/svg/css/shadow-changes-expected.txt: Removed.
  • platform/win/svg/custom/simple-text-double-shadow-expected.txt: Removed.
  • platform/wincairo/fast/repaint/moving-shadow-on-container-expected.txt: Removed.
  • platform/wincairo/fast/repaint/moving-shadow-on-path-expected.png: Removed.
  • platform/wincairo/svg/css/composite-shadow-text-expected.txt: Removed.
  • platform/wincairo/svg/css/shadow-changes-expected.txt: Removed.
  • platform/wincairo/svg/custom/transform-with-shadow-and-gradient-expected.txt: Removed.
  • platform/wpe/svg/css/composite-shadow-text-expected.txt: Removed.
  • platform/wpe/svg/css/shadow-changes-expected.txt: Removed.
  • platform/wpe/svg/css/stars-with-shadow-expected.txt: Removed.
  • platform/wpe/svg/custom/simple-text-double-shadow-expected.txt: Removed.
  • platform/wpe/svg/custom/transform-with-shadow-and-gradient-expected.txt: Removed.
  • svg/css/arrow-with-shadow-expected.txt: Removed.
  • svg/css/arrow-with-shadow.svg: Removed.
  • svg/css/circle-in-mask-with-shadow-expected.png: Removed.
  • svg/css/circle-in-mask-with-shadow-expected.txt: Removed.
  • svg/css/circle-in-mask-with-shadow.svg: Removed.
  • svg/css/clippath-with-shadow-expected.png: Removed.
  • svg/css/clippath-with-shadow-expected.txt: Removed.
  • svg/css/clippath-with-shadow.svg: Removed.
  • svg/css/composite-shadow-example-expected.txt: Removed.
  • svg/css/composite-shadow-example.html: Removed.
  • svg/css/composite-shadow-text-expected.png: Removed.
  • svg/css/composite-shadow-text.svg: Removed.
  • svg/css/composite-shadow-with-opacity-expected.txt: Removed.
  • svg/css/composite-shadow-with-opacity.html: Removed.
  • svg/css/getComputedStyle-basic-expected.txt:
  • svg/css/group-with-shadow-expected.txt: Removed.
  • svg/css/group-with-shadow.svg: Removed.
  • svg/css/mask-with-shadow-expected.txt: Removed.
  • svg/css/mask-with-shadow.svg: Removed.
  • svg/css/parent-shadow-offscreen-expected.svg: Removed.
  • svg/css/parent-shadow-offscreen.svg: Removed.
  • svg/css/path-with-shadow-expected.png: Removed.
  • svg/css/path-with-shadow-expected.txt: Removed.
  • svg/css/path-with-shadow.svg: Removed.
  • svg/css/root-shadow-offscreen-expected.svg: Removed.
  • svg/css/root-shadow-offscreen.svg: Removed.
  • svg/css/shadow-and-opacity-expected.txt: Removed.
  • svg/css/shadow-and-opacity.svg: Removed.
  • svg/css/shadow-changes.svg: Removed.
  • svg/css/shadow-with-large-radius-expected.png: Removed.
  • svg/css/shadow-with-large-radius-expected.txt: Removed.
  • svg/css/shadow-with-large-radius.svg: Removed.
  • svg/css/shadow-with-negative-offset-expected.png: Removed.
  • svg/css/shadow-with-negative-offset-expected.txt: Removed.
  • svg/css/shadow-with-negative-offset.svg: Removed.
  • svg/css/stars-with-shadow-expected.txt: Removed.
  • svg/css/stars-with-shadow.html: Removed.
  • svg/custom/simple-text-double-shadow-expected.png: Removed.
  • svg/custom/simple-text-double-shadow-expected.txt: Removed.
  • svg/custom/simple-text-double-shadow.svg: Removed.
  • svg/custom/transform-with-shadow-and-gradient.svg: Removed.
  • svg/filters/shadow-on-filter-expected.txt: Removed.
  • svg/filters/shadow-on-filter.svg: Removed.
  • svg/filters/shadow-on-rect-with-filter-expected.txt: Removed.
  • svg/filters/shadow-on-rect-with-filter.svg: Removed.
  • svg/repaint/repaint-webkit-svg-shadow-container-expected.txt: Removed.
  • svg/repaint/repaint-webkit-svg-shadow-container.html: Removed.
  • svg/repaint/repaint-webkit-svg-shadow-expected.txt: Removed.
  • svg/repaint/repaint-webkit-svg-shadow.svg: Removed.
1:01 PM Changeset in webkit [238070] by Ryan Haddad
  • 50 edits
    7 deletes in trunk

Unreviewed, rolling out r238065.

Breaks internal builds.

Reverted changeset:

"Make it possible to edit images inline"
https://bugs.webkit.org/show_bug.cgi?id=191352
https://trac.webkit.org/changeset/238065

12:12 PM Changeset in webkit [238069] by Michael Catanzaro
  • 2 edits in trunk/Tools

[WPE][GTK] API test /webkit/WebKitSettings/webkit-settings is failing
https://bugs.webkit.org/show_bug.cgi?id=191221

Unreviewed, fix a typo from the previous patch. After disabling the setting, we should test
that it is disabled, but we're testing that it is enabled, because I failed to update this
line.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings):

11:52 AM Changeset in webkit [238068] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, fix typo in r238066.

  • accessibility/ios-simulator/form-control-validation-message.html:
11:27 AM Changeset in webkit [238067] by Michael Catanzaro
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, silence -Wunused-variable warning

  • bytecode/Opcode.h:

(JSC::padOpcodeName):

9:43 AM Changeset in webkit [238066] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed attempt to deflake accessibility/ios-simulator/form-control-validation-message.html

  • accessibility/ios-simulator/form-control-validation-message.html:
1:58 AM Changeset in webkit [238065] by timothy_horton@apple.com
  • 50 edits
    11 adds in trunk

Make it possible to edit images inline
https://bugs.webkit.org/show_bug.cgi?id=191352
<rdar://problem/30107985>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: editing/images/basic-editable-image.html

editing/images/reparent-editable-image-maintains-strokes.html

Add the beginnings of a mechanism to replace images with a special attribute
with a native drawing view in the UI process.

  • page/Settings.yaml:

Add a setting to control whether images become natively editable when they
have the x-apple-editable-image attribute.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::editableImageViewID const):
Lazily generate an EmbeddedViewID and persist it on the <img> element.

  • html/HTMLImageElement.h:

Rearrange the service controls methods to sit before the members.
Add m_editableImageViewID and editableImageViewID().

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::nextEmbeddedViewID):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setContentsToEmbeddedView):
Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
on Cocoa platforms and when using RemoteLayerTree.
Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
and an EmbeddedViewID to uniquely identify and communicate about the
embedded view (which may move between layers, since it is tied to an element).

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
(WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
When setting GraphicsLayer's contents to an embedded view, we use
a special PlatformCALayer factory that takes the EmbeddedViewID and type.
GraphicsLayerCARemote will override this and make a correctly-initialized
PlatformCALayerRemote that keeps track of the EmbeddedViewID.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::operator<<):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::embeddedViewID const):
Add stubs and logging for EmbeddedViewID on PlatformCALayer.
These will be overridden by PlatformCALayerRemote to do more interesting things.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::isEditableImage const):
Add a getter that return true if the setting is enabled and
x-apple-editable-image is empty or true.

(WebCore::RenderImage::requiresLayer const):
RenderImage requires a layer either if RenderReplaced does, or we are an
editable image.

  • rendering/RenderImage.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::shouldBeNormalFlowOnly const):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
Push the EmbeddedViewID and type down to GraphicsLayer for editable images.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingLayer const):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
(WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):

  • rendering/RenderLayerCompositor.h:

Make editable images require compositing implicitly.

Source/WebKit:

  • Platform/spi/ios/PencilKitSPI.h: Added.
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::drawInContext):

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):

  • WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp:

(WebKit::GraphicsLayerCARemote::createPlatformCALayerForEmbeddedView):

  • WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::createForEmbeddedView):
(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
(WebKit::PlatformCALayerRemote::embeddedViewID const):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::layerWasCreated):
Propagate EmbeddedViewID through the PlatformCALayer constructor and
through the layer creation parameters to the UI process.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setEditableImagesEnabled:]):
(-[WKWebViewConfiguration _editableImagesEnabled]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Add a preference to enable editable images.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::layerWillBeRemoved):
(WebKit::RemoteLayerTreeHost::clearLayers):
(WebKit::RemoteLayerTreeHost::createLayer):
Keep track of "embedded views" in two maps: embeddedViewID->UIView,
and layerID->embeddedViewID. Clean them up when layers go away.
If a embedded view is reparented, currently it must be added to a new
layer in the same commit as it is removed from the previous layer
in order to persist the view's state (otherwise the view will be
destroyed and recreated). This will be less of a problem after future
patches introduce serialization of image data and whatnot.

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::createLayer):
(WebKit::RemoteLayerTreeHost::createEmbeddedView):
Move the various remote layer tree UIView subclasses out into a separate file.

Add createEmbeddedView, which is used for LayerTypeEditableImageLayer,
and creates a WKDrawingView and sticks it in the maps.

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h: Added.
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: Added.

(-[UIView _web_recursiveFindDescendantInteractibleViewAtPoint:withEvent:]):
(-[UIView _web_findDescendantViewAtPoint:withEvent:]):
(-[WKCompositingView hitTest:withEvent:]):
(-[WKCompositingView description]):
(+[WKTransformView layerClass]):
(+[WKSimpleBackdropView layerClass]):
(+[WKShapeView layerClass]):
(-[WKRemoteView initWithFrame:contextID:]):
(+[WKRemoteView layerClass]):
(-[WKBackdropView hitTest:withEvent:]):
(-[WKBackdropView description]):
(-[WKChildScrollView initWithFrame:]):
Move various remote layer tree UIView subclasses here, to their own file.
Make our UIView hit testing override test for views that conform to the
protocol "WKNativelyInteractible", which switches to normal UIView hit
testing. WKDrawingView will be the one such view.

Add WKChildScrollView and pull the one thing we customize out into it,
to make RemoteLayerTreeHost::createLayer less logic-ful.

  • UIProcess/ios/WKDrawingView.h: Added.
  • UIProcess/ios/WKDrawingView.mm: Added.

(-[WKDrawingView init]):
(-[WKDrawingView layoutSubviews]):
Add a very simple WKDrawingView, which uses PKCanvasView to edit the image.

  • WebKit.xcodeproj/project.pbxproj:
  • SourcesCocoa.txt:

Add the new files.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView):
Add a test option to enable editable images.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::drawSquareInEditableImage):
(WTR::UIScriptController::numberOfStrokesInEditableImage):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::drawSquareInEditableImage):
(WTR::UIScriptController::numberOfStrokesInEditableImage):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • TestRunnerShared/spi/PencilKitTestSPI.h: Added.
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::findEditableImageCanvas):
(WTR::UIScriptController::drawSquareInEditableImage):
(WTR::UIScriptController::numberOfStrokesInEditableImage):
Add the ability to draw on a PKCanvasView that is a subview of the WKWebView,
and also to retrieve the number of strokes currently on the PKCanvasView.
Currently this just takes the first canvas; we might need to make it
take an identifier or something in the future if we need tests with multiple
canvases. The indirect testing mechanism is required because PKCanvasView
can currently not actually paint its strokes in the Simulator.

LayoutTests:

  • TestExpectations:
  • editing/images/basic-editable-image-expected.txt: Added.
  • editing/images/basic-editable-image.html: Added.
  • editing/images/reparent-editable-image-maintains-strokes-expected.txt: Added.
  • editing/images/reparent-editable-image-maintains-strokes.html: Added.
  • platform/ios-wk2/TestExpectations:
  • resources/ui-helper.js:

(window.UIHelper.drawSquareInEditableImage):
(window.UIHelper.numberOfStrokesInEditableImage):
(window.UIHelper):
Add tests that we can find and draw in editable images, and that if
the element is moved around in the DOM, it persists its strokes.

Note: See TracTimeline for information about the timeline view.