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

Timeline



Feb 18, 2018:

11:46 PM Changeset in webkit [228608] by Philippe Normand
  • 4 edits in trunk

patch

6:46 PM Changeset in webkit [228607] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix build error after r228417 without ACCESSIBILITY
https://bugs.webkit.org/show_bug.cgi?id=182914

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2018-02-18
Reviewed by Chris Fleizach.

An inline empty version of AXObjectCache::deferFocusdUIElementChangeIfNeeded()
needs to be defined if not HAVE(ACCESSIBILITY).

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded):

10:44 AM Changeset in webkit [228606] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] REGRESSION(r228238) Detach renderer before destroying its subtree.
https://bugs.webkit.org/show_bug.cgi?id=182908
<rdar://problem/37619394>

Reviewed by Antti Koivisto.

Source/WebCore:

Prior to r228238 we first detached the to-be-destroyed renderer and then
started nuking its descendants. r228238 changed the order and now the descendants are
destroyed while they are still attached to the tree. Apparently some of the takeChild()
normalization logic gets triggered now that the renderers still have access to their previous/next
siblings. This is unexpected and it shouldn't matter whether the subtree is still attached.
Let's revert it to the original order for now (see webkit.org/b/182909).

Test: fast/block/crash-when-subtree-is-still-attached.html

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::removeAndDestroyChild):

LayoutTests:

  • fast/block/crash-when-subtree-is-still-attached-expected.txt: Added.
  • fast/block/crash-when-subtree-is-still-attached.html: Added.
9:51 AM Changeset in webkit [228605] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Set the appropriate AutoFill context for suggested passwords.
https://bugs.webkit.org/show_bug.cgi?id=182718
<rdar://problem/36326863>

Patch by Reza Abbasian <rabbasian@apple.com> on 2018-02-18
Reviewed by Wenson Hsieh and Tim Horton.

Before starting the input session, call the new delegate to query if AutoFill password suggestion assistance
is required for the focused element.

  • UIProcess/API/Cocoa/_WKFormInputSession.h:
  • UIProcess/API/Cocoa/_WKInputDelegate.h:

Introduce a new delegate to be called before starting an input session to query if AutoFill password suggestion
assistance is required for the focused element.

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

(-[WKFormInputSession initWithContentView:focusedElementInfo:requiresStrongPasswordAssistance:]):
(-[WKFormInputSession requiresStrongPasswordAssistance]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Call the delegate to find out if AutoFill suggested password assistance is required.
(-[WKContentView _stopAssistingNode]):
(-[WKContentView _autofillContext]): If the first responder is a password element and requires
assistance for AutoFill suggested password, set the appropriate AutoFill context.
(-[WKFormInputSession initWithContentView:focusedElementInfo:]): Deleted.

9:12 AM Changeset in webkit [228604] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Offlineasm/MIPS: immediates need to be within 16-bit signed values
https://bugs.webkit.org/show_bug.cgi?id=182890

Patch by Dominik Inführ <dominik.infuehr@gmail.com> on 2018-02-18
Reviewed by Michael Catanzaro.

In Sequence.getModifiedListMIPS(), we allow immediate values within
the range -0xffff..0xffff for immediates (addresses and other
immediates), but then in Immediate.mipsOperand() and
Address.mipsOperand() we raise if immediate values are not within
-0x7fff..0x7fff. This is inconsistent, and broke compilation on mips
since r228552 made the VM structure bigger meaning we address values
with bigger offsets in llint. This change restricts the allowed range,
so that a separate load of the value is done for values outside of
that range.

  • offlineasm/mips.rb:
2:02 AM Changeset in webkit [228603] by cturner@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Push smaller buffers from HTTP source
https://bugs.webkit.org/show_bug.cgi?id=182829

Reviewed by Philippe Normand.

Split the received buffer into smaller buffers of a size consistent
with the basesrc (4KiB). It is important not to push large buffers
into the appsrc (where large is relative to the appsrc's configured
byte size). If large buffers are pushed, then when they are internally
dequeued by the appsrc, the buffering percentage can dramatically
plummet due to a large amount of bytes being removed after a push. This
can in turn trick the media player into thinking it needs to buffer,
and then issuing a spurious set of playing->paused then
paused->playing transitions, which by the time the buffering logic
completes, data are already available.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::dataReceived):

Feb 17, 2018:

9:50 PM Changeset in webkit [228602] by Wenson Hsieh
  • 11 edits in trunk/Source/WebKit

[Extra zoom mode] Form control values are stale after dismissing and representing input view controllers
https://bugs.webkit.org/show_bug.cgi?id=182877
<rdar://problem/37604395>

Reviewed by Tim Horton.

Currently, when presenting an input view controller for a focused element, we populate the initial form control
value using the WKContentView's assisted node information when it was last focused. However, if the user edits
the value of a form control, dismisses to the form control view controller (while the element is still focused)
and then begins editing the field again, the initial text will be the previous value of the input, since the
AssistedNodeInformation isn't up to date.

To fix this, we introduce a mechanism to update WKContentView's AssistedNodeInformation for the current assisted
node. This overwrites _assistedNodeInformation with new information computed from the web process, as long as
the assisted node before and after the request is made in the UI process has not changed. We accomplish this by
adding an identifier to AssistedNodeInformation, which is monotonically incremented when an element is focused
in the web process. The UI process may then use this identifier to determine whether AssistedNodeInformations
are describing the same focused element.

One interesting consideration here is that a normal AssistedNodeInformation update (propagated when focusing an
element) may be deferred in the UI process until the next layer tree commit. In the absence of the assisted node
identifier check, one could imagine a scenario in which the assisted node information in the UI process gets
"updated" from a new value to an old value:

  1. The web process focuses an element and sends AssistedNodeInformation A.
  2. WKContentView calls -updateCurrentAssistedNodeInformation.
  3. The web process sends AssistedNodeInformation B.
  4. A is received in the UI process, but deferred.
  5. The UI process receives B and sets _assistedNodeInformation to B.
  6. The UI process calls -_startAssistingNode: and sets _assistedNodeInformation to A.

This would mean that the _assistedNodeInformation is set to an earlier value, A, after being set to a later
value, B. However, because the AssistedNodeInformation identifier in step (2) refers to the assisted node
prior to step (1), the assisted node identifier in (5) would not match this identifier, and we would simply bail
instead of overwriting assisted node information.

We use this AssistedNodeInformation update mechanism after inserting text via input view controllers, and also
after reentering edit mode from the focused form control view controller. This fixes two issues where changing
the size of the focused element after editing it results in the focused form overlay highlighting a stale frame,
and also when setting the initial text when reentering edit mode for a form control that is already focused.

  • Shared/AssistedNodeInformation.cpp:

(WebKit::AssistedNodeInformation::encode const):
(WebKit::AssistedNodeInformation::decode):

  • Shared/AssistedNodeInformation.h:

Add a new monotonically increasing identifier (per WebPage) which associates a AssistedNodeInformation with a
focused element. In the event that the web process crashes and relaunches (thus resetting this identifier),
AssistedNodeInformation state in the UI process is now also reset (see -cleanupInteraction), so we won't end up
confusing AssistedNodeInformations computed by different WebPages between a web process crash.

  • UIProcess/WebPageProxy.h:

A bit of related refactoring here to remove an unnecessary bool flag that indicates whether we have a deferred
assisted node information. Instead, just use the presence of m_deferredNodeAssistanceArguments.

  • UIProcess/WebPageProxy.messages.in:

Add a AssistedNodeInformationCallback IPC message.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]):

Clear out the previous AssistedNodeInformation. See above for details.

(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):

Tries to update AssistedNodeInformation for the current assisted node, invoking the completion callback when
finished. This may result in the assisted node information not being updated due to the current assisted node
changing in the time between the start of the request and the information being received in the UI process.

(-[WKContentView presentViewControllerForCurrentAssistedNode]):

Refactored from -presentViewControllerForAssistedNode:, such that it no longer takes an AssistedNodeInformation
as an argument, but rather just uses WKContentView's current _assistedNodeInformation. This was just being
called with _assistedNodeInformation from all call sites anyways.

(-[WKContentView textInputController:didCommitText:]):

Request an AssistedNodeInformation update after setting the value of a form control; if the assisted node hasn't
changed, update the focused form control overlay. This is needed to handle cases where the focused element's
frame may have changed after inserting text (e.g. due to line wrapping), and the focused form control overlay
needs to be updated to reflect this change.

(-[WKContentView focusedFormControlControllerDidBeginEditing:]):

Request an AssistedNodeInformation update before reentering edit mode; if the assisted node hasn't changed since
the start of the request, present the appropriate input view controller.

(-[WKContentView presentViewControllerForAssistedNode:]): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::assistedNodeInformationCallback):
(WebKit::WebPageProxy::requestAssistedNodeInformation):
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::startAssistingNode):
(WebKit::WebPageProxy::stopAssistingNode):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidFocus):

Increment the assisted node identifier.

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

(WebKit::WebPage::requestAssistedNodeInformation):

Compute and return an AssistedNodeInformation.

(WebKit::WebPage::getAssistedNodeInformation):

8:43 PM Changeset in webkit [228601] by dbates@webkit.org
  • 2 edits in trunk

Fix up ChangeLog entry for r228594 (https://bugs.webkit.org/show_bug.cgi?id=182900). Update bug title
and description to explain that this change was removing the code to parse the UTF-32{BE, LE} BOM and
encoding/decoding logic that is no longer needed following the removal of UTF-32{BE, LE} from the text
codec registry in r224747 (https://bugs.webkit.org/show_bug.cgi?id=179435).

11:10 AM Changeset in webkit [228600] by Darin Adler
  • 53 edits in trunk/Source

Web Inspector: get rid of remaining uses of OptOutput<T>
https://bugs.webkit.org/show_bug.cgi?id=180607

Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/AsyncStackTrace.cpp: Removed explicit Inspector prefix from code that

is inside the Inspector namespace already. Also use auto a bit.

  • inspector/AsyncStackTrace.h: Ditto.
  • inspector/ConsoleMessage.cpp: Ditto.
  • inspector/ContentSearchUtilities.cpp: More Inspector namespace removal and ...

(Inspector::ContentSearchUtilities::getRegularExpressionMatchesByLines): Use a
Vector instead of a unique_ptr<Vector>.
(Inspector::ContentSearchUtilities::lineEndings): Ditto.
(Inspector::ContentSearchUtilities::stylesheetCommentPattern): Deleted.
(Inspector::ContentSearchUtilities::findMagicComment): Use std::array instead of
a Vector for a fixed size array; also got rid of reinterpret_cast.
(Inspector::ContentSearchUtilities::findStylesheetSourceMapURL): Moved the regular
expression here since it's the only place it was used.

  • inspector/ContentSearchUtilities.h: Cut down on unneeded includes.
  • inspector/InjectedScript.cpp: Removed explicit Inspector prefix from code that

is inside the Inspector namespace already. Also use auto a bit.

  • inspector/InspectorProtocolTypes.h: Removed OptOutput. Simplified assertions.

Removed base template for BindingTraits; we only need the specializations.

  • inspector/ScriptCallFrame.cpp: Removed explicit Inspector prefix from code that

is inside the Inspector namespace already. Also use auto a bit.

  • inspector/ScriptCallFrame.h: Ditto.
  • inspector/ScriptCallStack.cpp: Ditto.
  • inspector/ScriptCallStack.h: Ditto.
  • inspector/agents/InspectorConsoleAgent.cpp: Ditto.
  • inspector/agents/InspectorConsoleAgent.h: Ditto.
  • inspector/agents/InspectorDebuggerAgent.cpp: More Inspector namespace removal and ...

(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame): Use std::optional& intead of
OptOutput* for out arguments.

  • inspector/agents/InspectorDebuggerAgent.h: Ditto.
  • inspector/agents/InspectorHeapAgent.cpp: More Inspector namespace removal and ...

(Inspector::InspectorHeapAgent::getPreview): Use std::optional& intead of OptOutput*
for out arguments.

  • inspector/agents/InspectorHeapAgent.h: Ditto.
  • inspector/agents/InspectorRuntimeAgent.cpp: More Inspector namespace removal and ...

(Inspector::InspectorRuntimeAgent::parse): Use std::optional& intead of OptOutput*
for out arguments.
(Inspector::InspectorRuntimeAgent::evaluate): Ditto.
(Inspector::InspectorRuntimeAgent::callFunctionOn): Ditto.
(Inspector::InspectorRuntimeAgent::saveResult): Ditto.

  • inspector/agents/InspectorRuntimeAgent.h: Ditto.
  • inspector/agents/InspectorScriptProfilerAgent.cpp: More Inspector namespace removal

and removed some bogus const.

  • inspector/agents/InspectorScriptProfilerAgent.h: Ditto.
  • inspector/scripts/codegen/cpp_generator.py:

(CppGenerator.cpp_type_for_unchecked_formal_in_parameter): Removed some bogus const.
(CppGenerator.cpp_type_for_type_with_name): Ditto.
(CppGenerator.cpp_type_for_formal_out_parameter): Use std::optional& instead of
Inspector::Protocol::OptOutput*.
(CppGenerator.cpp_type_for_formal_async_parameter): Ditto.
(CppGenerator.cpp_type_for_stack_in_parameter): Ditto.
(CppGenerator.cpp_type_for_stack_out_parameter): Ditto.

  • inspector/scripts/codegen/cpp_generator_templates.py: Removed ASSERT_DISABLED

conditional around assertion code which will now compile to nothing if ASSERT is disabled.
Build strings more simply in a few cases.

  • inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:

(CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
Use has_value instead of isAssigned and * operator instead of getValue() since std::optional
replace OptOutput here.
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
Pass by reference instead of pointer now.

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

Removed ASSERT_DISABLED conditional around assertion code which will now compile to nothing
if ASSERT is disabled.

  • inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:

(CppProtocolTypesImplementationGenerator._generate_assertion_for_object_declaration): Generate
the assertion function unconditionally, but leave out the assertions if ASSERT_DISABLED is true.
(CppProtocolTypesImplementationGenerator): Use auto instead of writing out JSON::Object::iterator.

  • inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:

(ObjCBackendDispatcherImplementationGenerator._generate_conversions_for_command): Build strings
more simply.

  • inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:

Rebaselined.

Source/WebCore:

  • inspector/InspectorStyleSheet.cpp:

(WebCore::buildSourceRangeObject): Take a const Vector& instead of a Vector*.
(WebCore::InspectorStyle::buildObjectForStyle const): Pass lineEndings() instead
of lineEndings().get().
(WebCore::InspectorStyle::styleWithProperties const): Ditto.
(WebCore::InspectorStyleSheet::buildObjectForSelectorList): Ditto.
(WebCore::InspectorStyleSheet::lineEndings const): Return a Vector instead of
a std::unique_ptr<Vector>.
(WebCore::InspectorStyleSheetForInlineStyle::lineEndings const): Ditto.

  • inspector/InspectorStyleSheet.h: Updated for the above.
  • inspector/agents/InspectorCSSAgent.h: Removed some bogus const.
  • inspector/agents/InspectorCanvasAgent.cpp: Ditto.
  • inspector/agents/InspectorCanvasAgent.h: Ditto.
  • inspector/agents/InspectorDOMDebuggerAgent.cpp: Improved type of global strings

so we don't waste space with a pointer to the string.
(WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint): Removed
explicit creation of String, which was wasteful and unnecessary.
(WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Removed bogus const.

  • inspector/agents/InspectorDOMDebuggerAgent.h: Removed bogus const and use

final instead of override.

  • inspector/agents/InspectorPageAgent.cpp: Ditto.
  • inspector/agents/InspectorPageAgent.h: Ditto.
10:35 AM Changeset in webkit [228599] by jmarcell@apple.com
  • 3 edits
    4 adds in branches/safari-605-branch

Cherry-pick r228551. rdar://problem/37615430

10:35 AM Changeset in webkit [228598] by jmarcell@apple.com
  • 4 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r228545. rdar://problem/37615437

10:35 AM Changeset in webkit [228597] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r228519. rdar://problem/37615441

10:35 AM Changeset in webkit [228596] by jmarcell@apple.com
  • 3 edits
    1 add in branches/safari-605-branch

Cherry-pick r228454. rdar://problem/37615380

Note: See TracTimeline for information about the timeline view.