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

Timeline



Jul 16, 2017:

11:58 PM Changeset in webkit [219553] by Michael Catanzaro
  • 3 edits in trunk/Source/WebCore

-Wreorder warning caused by GraphicsContext3D cleanup
https://bugs.webkit.org/show_bug.cgi?id=174511

Reviewed by Carlos Garcia Campos.

  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

10:29 PM Changeset in webkit [219552] by commit-queue@webkit.org
  • 6 edits
    4 adds in trunk

Dismissing the captions panel using the mouse is too eager to remove the captions panel and media controls
https://bugs.webkit.org/show_bug.cgi?id=174571
<rdar://problem/33294968>

Patch by Antoine Quint <Antoine Quint> on 2017-07-16
Reviewed by Eric Carlson.

Source/WebCore:

We did several things wrong when dismissing the tracks panel:

  • we did not check whether we were hosted in a shadow root when figuring if a click was on the tracks panel
  • we did not check whether we clicked over the media when dismissing the tracks panel
  • we did not check whether auto-hide was on before fading the media controls out when we clicked outside the media controls bounds

We now correctly account for all of those cases and implement the following behavior when clickng as the tracks
panel is presented:

  • dismiss the panel if the click is outside of the panel
  • dismiss the panel and the media controls if the click is outside the video and the media controls have auto-hide on (ie. media is playing)
  • dismiss the panel and the media controls after the track selection animation is finished if a track is selected

Tests: media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html

media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.hideTracksPanel): Only hide the media controls if we clicked outside of the media
controls bounds and if we have auto-hide on when idle (ie. the media is playing).
(MediaControls.prototype.isPointInControls): Add an option to specify whether the container should be
considered when checking if a point is contained within the media controls bounds.

  • Modules/modern-media-controls/controls/tracks-panel.js:

(TracksPanel.prototype._handleMousedown):
(TracksPanel.prototype._isPointInTracksPanel): Correctly check whether the element that we started pressing
on is contained within the tracks panel, accounting for the case where we are presented within a shadow root
(ie. always when runing inside a Web page).

LayoutTests:

Adding a method to show the tracks panel for a given shadow root and adding new tests to check the correct
behavior when dismissing the tracks panel when clicking over the media element or outside the media element
when it's paused.

  • media/modern-media-controls/resources/media-controls-utils.js:

(pressOnElement):
(pressAtPoint):
(showTracksPanel):
(finishMediaControlsTest): Deleted.

  • media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused-expected.txt: Added.
  • media/modern-media-controls/tracks-panel/tracks-panel-up-click-outside-media-does-not-dimiss-media-controls-when-media-is-paused.html: Added.
  • media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing-expected.txt: Added.
  • media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html: Added.
  • platform/mac/TestExpectations:
7:10 PM Changeset in webkit [219551] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

DisallowUserAgentShadowContent moves out of non-UA shadow roots
https://bugs.webkit.org/show_bug.cgi?id=165647

Patch by Ali Juma <ajuma@chromium.org> on 2017-07-16
Reviewed by Ryosuke Niwa.

Source/WebCore:

Make rect-based hit-testing include nodes in non-UA shadow trees when the
HitTestRequest has type DisallowUserAgentShadowContent.

Test: fast/dom/nodesFromRect/nodesFromRect-shadow.html

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::addNodeToRectBasedTestResult):

  • testing/Internals.cpp:

(WebCore::Internals::nodesFromRect):

  • testing/Internals.h:

LayoutTests:

  • fast/dom/nodesFromRect/nodesFromRect-shadow-expected.txt: Added.
  • fast/dom/nodesFromRect/nodesFromRect-shadow.html: Added.
  • fast/dom/nodesFromRect/resources/nodesFromRect.js:

(check):
(checkShadowContent):
(nodesFromRectAsString):

6:43 PM Changeset in webkit [219550] by beidson@apple.com
  • 5 edits in trunk

Crash when a WKHTTPCookieStore outlives its owning WKWebsiteDataStore.
<rdar://problem/33341730> and https://bugs.webkit.org/show_bug.cgi?id=174574

Reviewed by Tim Horton.

Source/WebKit:

Instead of holding a weak reference to its owning API::WebsiteDataStore,
API::HTTPCookieStore can hold a strong reference to the owner's implementation
WebKit::WebsiteDataStore.

  • UIProcess/API/APIHTTPCookieStore.cpp:

(API::HTTPCookieStore::HTTPCookieStore):
(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookie):
(API::HTTPCookieStore::deleteCookie):
(API::HTTPCookieStore::registerObserver):
(API::HTTPCookieStore::unregisterObserver):
(API::HTTPCookieStore::cookieManagerDestroyed):
(API::HTTPCookieStore::registerForNewProcessPoolNotifications):

  • UIProcess/API/APIHTTPCookieStore.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(-[CookieNavigationDelegate webView:didFinishNavigation:]):
(TEST):

3:23 PM Changeset in webkit [219549] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Clicking edges of media control buttons changes visual state of button (pressed) but doesn't execute action
https://bugs.webkit.org/show_bug.cgi?id=174565
<rdar://problem/33294833>

Patch by Antoine Quint <Antoine Quint> on 2017-07-16
Reviewed by Dean Jackson.

Source/WebCore:

WebCore doesn't dispatch a "click" event to a parent element when a child that was the original target when
the "mousedown" occured is no longer hit-testing at the location where the mouse pointer is at when the "mouseup"
occurs (see webkit.org/b/174564). Since button icons, which are a <picture> element that is a child of the
<button> element for media controls buttons, shrink to 89% of their size when the ":active" pseudo-class matches,
clicking on the edges of the media controls buttons would not trigger the expected action.

Test: media/modern-media-controls/button/button-click-on-edges.html

  • Modules/modern-media-controls/controls/button.css:

(button > picture):

LayoutTests:

Add a new test where we click on the edge of a button and check that we trigger the Button's
UI delegate. This test fails prior to this patch.

  • media/modern-media-controls/button/button-click-on-edges-expected.txt: Added.
  • media/modern-media-controls/button/button-click-on-edges.html: Added.
  • platform/ios-simulator/TestExpectations:
2:36 PM Changeset in webkit [219548] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

Make the decision for asynchronously decoding an image be in one place
https://bugs.webkit.org/show_bug.cgi?id=174479

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-16
Reviewed by Tim Horton.

Move all the logic of whether a large image should be asynchronously decoded
or not be in one place: RenderBoxModelObject::decodingModeForImageDraw().

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::addPendingImageDrawingClient): Fixing unrelated
spelling error.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isIBooks):
(WebCore::IOSApplication::isIBooksStorytime):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::updateFromSettings): Remove reading the setting
largeImageAsyncDecodingEnabled from this function because it will be read
by RenderBoxModelObject::decodingModeForImageDraw().
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::shouldAnimate):
(WebCore::BitmapImage::canAnimate):
(WebCore::BitmapImage::canUseAsyncDecodingForLargeImages):
(WebCore::BitmapImage::shouldUseAsyncDecodingForAnimatedImages):
(WebCore::BitmapImage::canDestroyDecodedData):
(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages): Deleted.

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::canUseAsyncDecoding): It is okay to keep the
decoded frame if canUseAsyncDecodingForLargeImages() is true by the setting
largeImageAsyncDecodingEnabled is false.
(WebCore::ImageSource::shouldUseAsyncDecoding): Deleted.

  • platform/graphics/ImageSource.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::decodingModeForImageDraw): The plan is to
add a new Internal settings to force asynchronous image decoding regardless
of the image size and the settings.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):

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

(WebCore::RenderImage::paintIntoRect):

7:28 AM Changeset in webkit [219547] by Michael Catanzaro
  • 7 edits in trunk

[CMake] Raise minimum CMake requirement
https://bugs.webkit.org/show_bug.cgi?id=174545

Reviewed by Konstantin Tokarev.

.:

  • CMakeLists.txt:
  • Source/cmake/OptionsCommon.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsJSCOnly.cmake:

Source/WebCore:

  • WebCoreMacros.cmake:
5:51 AM Changeset in webkit [219546] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] Sort inspector GResource manifest to ensure reproducible builds
https://bugs.webkit.org/show_bug.cgi?id=174540

Patch by Bernhard M. Wiedemann <bwiedemann@suse.de> on 2017-07-16
Reviewed by Michael Catanzaro.

  • gtk/generate-inspector-gresource-manifest.py:

(get_filenames): sort list of input files

Jul 15, 2017:

11:57 PM Changeset in webkit [219545] by beidson@apple.com
  • 11 edits
    2 adds in trunk

Make sure all CFHTTPCookieStorageRefs we create are scheduled.
<rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513

Reviewed by Tim Horton.

Source/WebCore:

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled.
We need to schedule it on the appropriate RunLoop.

This patch also cleans up the creation of the identifying data itself.

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/cf/CookieStorageUtilsCF.h: Added.
  • Shared/cf/CookieStorageUtilsCF.mm: Added.

(WebKit::cookieStorageFromIdentifyingData):
(WebKit::identifyingDataFromCookieStorage):

  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::setSharedHTTPCookieStorage):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:

(TEST): Make this test more reliable by clearing everything beforehand.

11:08 PM Changeset in webkit [219544] by mmaxfield@apple.com
  • 18 edits in trunk/Source/WebCore

Rename RenderStyle::fontSize() to RenderStyle::computedFontPixelSize()
https://bugs.webkit.org/show_bug.cgi?id=174509

Reviewed by Simon Fraser.

We have three font size functions:

  • computedFontSize(): returns a float
  • specifiedFontSize(): also returns a float
  • fontSize(): returns the rounded computedFontSize()

FontDescription uses the convention of labelling rounded values as "pixel",
so a better name font fontSize() is computedFontPixelSize().

Also, because font sizes can never be negative, switch the type from an int
to an unsigned.

No new tests because there is no behavior change.

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(getAttributeSetForAccessibilityObject):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::computedPixelSize):
(WebCore::FontDescription::fontSelectionRequest):

  • rendering/RenderBlock.cpp:

(WebCore::styleForFirstLetter):

  • rendering/RenderRubyRun.cpp:

(WebCore::shouldOverhang):
(WebCore::RenderRubyRun::getOverhang):

  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::adjustInlineDirectionLineBounds):

  • rendering/RenderThemeGtk.cpp:

(WebCore::adjustSearchFieldIconStyle):
(WebCore::paintSearchFieldIcon):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustCheckboxStyle):
(WebCore::RenderThemeIOS::adjustRadioStyle):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
(WebCore::RenderThemeMac::popupInternalPaddingBox):
(WebCore::RenderThemeMac::adjustMenuListButtonStyle):

  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):

  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintTextDecoration):

  • rendering/mathml/RenderMathMLRow.cpp:

(WebCore::RenderMathMLRow::computeLineVerticalStretch):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::computedFontPixelSize):
(WebCore::RenderStyle::computedLineHeight):
(WebCore::RenderStyle::fontSize): Deleted.

  • rendering/style/RenderStyle.h:
  • style/InlineTextBoxStyle.cpp:

(WebCore::visualOverflowForDecorations):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):
(WebCore::SVGLengthContext::convertValueFromEMSToUserUnits):

10:52 PM Changeset in webkit [219543] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk

line-height: <number> gets visually applied twice when text autosizing is in effect
https://bugs.webkit.org/show_bug.cgi?id=174536
<rdar://problem/33338259>

Reviewed by Simon Fraser.

Source/WebCore:

StyleBuilderConverter::convertLineHeight() converts line-height: <number> into a
"percentage" length. Then, when layout needs to know what the computed value of
line-height is, RenderStyle::computedLineHeight() multiplies this percentage by
the computed font size.

With autosizing, the computed font size already incorporates the autosizing
multiplier, so we shouldn't also incorporate this multiplier into the percentage
value itself. getComputedStyle()'s lineHeightFromStyle() was compensating for
this double application by multiplying the percentage by the font-size's specified
value instead of its computed value, which is incorrect.

Test: fast/text-autosizing/line-height-number.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::lineHeightFromStyle):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertLineHeight):

LayoutTests:

  • fast/text-autosizing/line-height-number-expected.html: Added.
  • fast/text-autosizing/line-height-number.html: Added.
9:47 PM Changeset in webkit [219542] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

Make it possible to extend check-webkit-style with Apple-internal checkers
<https://webkit.org/b/174464>
<rdar://problem/25564402>

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checker.py: Import apple_additions.

(_all_categories): Add categories from apple_additions() if it
exists.
(CheckerDispatcher._create_checker): Create python checker
from apple_additions() if it exists.

9:01 PM Changeset in webkit [219541] by Wenson Hsieh
  • 9 edits
    2 adds in trunk

[iOS WK2] Presenting an action sheet on an image map prevents selection UI from updating
https://bugs.webkit.org/show_bug.cgi?id=174539
<rdar://problem/33307395>

Reviewed by Darin Adler.

Source/WebCore:

Currently, if TextIndicator fails to take a snapshot in TextIndicator::createWithRange, we will enter an
inconsistent state in the web process where Editor will continue to ignore selection changes until the next time
Editor::setIgnoreSelectionChanges(false) is called. This causes us to indefinitely defer EditorState updates to
the UI process, which leads to selection UI appearing unresponsive.

To fix this, we introduce a new TemporarySelectionChange object to simplify selection changes and/or
EditorState-update-ignoring behaviors within the scope of a single function. The constructor applies these
temporary changes, and the destructor reverts them as needed to their prior values.

This patch only adopts TemporarySelectionChange in order to fix this bug, but future patches will replace the
remaining places where we temporarily change selection and/or ignore selection with this helper.

Test: ActionSheetTests.ImageMapDoesNotDestroySelection.

  • editing/Editor.cpp:

(WebCore::TemporarySelectionChange::TemporarySelectionChange):
(WebCore::TemporarySelectionChange::~TemporarySelectionChange):

  • editing/Editor.h:
  • editing/FrameSelection.h:

(WebCore::FrameSelection::isUpdateAppearanceEnabled):

  • page/TextIndicator.cpp:

(WebCore::TextIndicator::createWithRange):

Source/WebKit:

Small tweak to avoid presenting at the element rect or text rect if the interaction information failed to
capture valid bounds for the element. We instead fall back to presenting at the touch location. This addresses
problems when presenting the action sheet popover on image maps on iPad, where GetPositionInformation fails to
capture correct data about for the <area>.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(presentationStyleForView):

Tools:

Adds a new unit test suite to cover action sheet popover presentation.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/image-map.html: Added.
  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm: Added.

(-[ActionSheetObserver waitForActionSheetAfterBlock:]):

Runs the given block and waits until the UI process has indicated that it will present an action sheet.

(-[ActionSheetObserver _webView:actionsForElement:defaultActions:]):
(TestWebKitAPI::IPadUserInterfaceSwizzler::IPadUserInterfaceSwizzler):

Helper class to alter the behavior of [[UIDevice currentDevice] userInterfaceIdiom] for testing.

(TestWebKitAPI::IPadUserInterfaceSwizzler::padUserInterfaceIdiom):
(TestWebKitAPI::TEST):

8:45 PM Changeset in webkit [219540] by weinig@apple.com
  • 2 edits in trunk/Tools

[Scripts] Make svn-create-patch work better when called in sub directories
https://bugs.webkit.org/show_bug.cgi?id=174551

Reviewed by Darin Adler.

  • Fixes manufacturePatchForAdditionWithHistory to use the correct path by ensuring that the prefix is applied as is done in generateDiff.
  • Silence output of explanatory lines from svn stat (" > move to ...") that show up in STDERR when running svn-create-patch.
  • Add verbose logging that I found useful while debugging this issue.
  • Scripts/svn-create-patch:

(findBaseUrl):
(findMimeType):
(findSourceFileAndRevision):
(generateDiff):
(generateFileList):
(manufacturePatchForAdditionWithHistory):

3:03 PM Changeset in webkit [219539] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebCore

Clean up line-height and minimumFontSize functions
https://bugs.webkit.org/show_bug.cgi?id=174535

Reviewed by Simon Fraser.

No behavior change.

No new tests because there is no behavior change.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertLineHeight):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::cascadedPropertiesForRollback):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::checkForZoomChange):
(WebCore::StyleResolver::createFilterOperations):
(WebCore::StyleResolver::CascadedProperties::set):
(WebCore::StyleResolver::applyCascadedProperties):

  • style/StyleFontSizeFunctions.cpp:

(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
(): Deleted.

2:47 PM Changeset in webkit [219538] by Jonathan Bedard
  • 2 edits in trunk/Tools

Unreviewed build fix after r219537.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
Note: See TracTimeline for information about the timeline view.