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

Timeline



Jan 16, 2017:

10:20 PM Changeset in webkit [210797] by commit-queue@webkit.org
  • 46 edits in trunk

Remove the REQUEST_ANIMATION_FRAME flag
https://bugs.webkit.org/show_bug.cgi?id=156980
<rdar://problem/25906849>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-01-16
Reviewed by Simon Fraser.

.:

  • Source/cmake/OptionsEfl.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp:
  • dom/Document.h:
  • dom/RequestAnimationFrameCallback.idl:
  • dom/ScriptedAnimationController.cpp:
  • dom/ScriptedAnimationController.h:
  • loader/EmptyClients.h:
  • page/Chrome.cpp:
  • page/Chrome.h:
  • page/ChromeClient.h:
  • page/DOMWindow.cpp:
  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • page/FrameView.cpp:
  • page/FrameView.h:
  • page/animation/AnimationController.cpp:
  • page/animation/AnimationController.h:
  • page/animation/AnimationControllerPrivate.h:
  • platform/HostWindow.h:
  • platform/ScrollAnimationSmooth.h:
  • testing/Internals.cpp:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::syncDisplayState):
(WebKit::CompositingCoordinator::nextAnimationServiceTime):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::scheduleAnimation):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/LayerTreeHost.h:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
7:53 PM Changeset in webkit [210796] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

[QuickLook] QLPreviewConverter should be owned by its delegate
https://bugs.webkit.org/show_bug.cgi?id=167104

Reviewed by Andreas Kling.

Instead of having QuickLookHandle own both the QLPreviewConverter and its delegate, have it
just own the delegate and have the delegate own the QLPreviewConverter.

No change in behavior. Covered by existing tests.

  • loader/ios/QuickLook.h:

(WebCore::QuickLookHandle::converter): Moved out-of-line.

  • loader/ios/QuickLook.mm: Renamed WebPreviewConverterDelegate to WebPreviewConverter, and

gave it ownership of the QLPreviewConverter, QuickLookHandleClient, and preview response.
(-[WebPreviewConverter initWithResourceLoader:resourceResponse:quickLookHandle:]):
Added a ResourceResponse parameter.
(-[WebPreviewConverter setClient:]): Moved from QuickLookHandle::setClient().
(-[WebPreviewConverter appendDataArray:]): Moved from QuickLookHandle::didReceiveDataArray().
(-[WebPreviewConverter finishedAppending]): Moved from QuickLookHandle::didFinishLoading().
(-[WebPreviewConverter failed]): Moved from QuickLookHandle::didFail().
(-[WebPreviewConverter platformConverter]): Added to return the QLPreviewConverter.
(-[WebPreviewConverter _sendDidReceiveResponseIfNecessary]): Used _previewResponse directly.
(WebCore::QuickLookHandle::~QuickLookHandle): Removed unneeded logging.
(WebCore::QuickLookHandle::didReceiveData): Called -[WebPreviewConverter appendDataArray:].
(WebCore::QuickLookHandle::didReceiveBuffer): Ditto.
(WebCore::QuickLookHandle::didFinishLoading): Called -[WebPreviewConverter finishedAppending].
(WebCore::QuickLookHandle::didFail): Called -[WebPreviewConverter failed].
(WebCore::QuickLookHandle::setClient): Called -[WebPreviewConverter setClient:].
(WebCore::QuickLookHandle::previewFileName): Retrieved the QLPreviewConverter via
-[WebPreviewConverter platformConverter].
(WebCore::QuickLookHandle::previewUTI): Ditto.
(WebCore::QuickLookHandle::previewRequestURL): Ditto.
(WebCore::QuickLookHandle::converter): Ditto.
(WebCore::QuickLookHandle::didReceiveDataArray): Deleted.
(WebCore::QuickLookHandle::previewResponse): Deleted.

7:47 PM Changeset in webkit [210795] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

CrashTracer: com.apple.WebKit.WebContent at JavaScriptCore: WTF::StringImpl::containsOnlyWhitespace
https://bugs.webkit.org/show_bug.cgi?id=167106
<rdar://problem/24457632>

Reviewed by Tim Horton.

Speculative fix.

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):

Test before casting to Text.

7:42 PM Changeset in webkit [210794] by clopez@igalia.com
  • 2 edits
    2 adds in trunk/LayoutTests

[GTK][MSE] Update list of media-source tests that fail.

Unskip imported/w3c/web-platform-tests/media-source tests for WebKitGTK+
Report the list of those tests that fail.
Rebase imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer.html.

Unreviewed gardening.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt: Added. Rebased.
4:04 PM Changeset in webkit [210793] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: add "Persist Logs on Navigation" to settings screen
https://bugs.webkit.org/show_bug.cgi?id=166992

Patch by Devin Rousso <Devin Rousso> on 2017-01-16
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:
  • UserInterface/Controllers/LogManager.js:

(WebInspector.LogManager):
(WebInspector.LogManager.prototype._delayedMessagesCleared):

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
Move setting and UI toggle for "Keep Log on Navigation" to the global settings dictionary
and content view.

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView):
Add checkbox for new setting and spacer between text settings and log settings.

3:15 PM Changeset in webkit [210792] by jfernandez@igalia.com
  • 6 edits
    6 adds in trunk

[css-grid] Implementing baseline positioning for grid containers
https://bugs.webkit.org/show_bug.cgi?id=165063

Reviewed by Darin Adler and Sergio Villar Senin.

Source/WebCore:

Implementation of the 'first-line' baseline for Grid containers,
according to the CSS Grid Layout spec.
https://drafts.csswg.org/css-grid/#grid-baselines

The self-baseline and content-baseline alignment logic is still
not implemented, hence some cases will be implemented in
future patches.

Tests: fast/css-grid-layout/grid-baseline-margins.html

fast/css-grid-layout/grid-baseline-must-respect-grid-order.html
fast/css-grid-layout/grid-baseline.html

  • rendering/RenderGrid.cpp:

(WebCore::synthesizedBaselineFromBorderBox):
(WebCore::RenderGrid::isInlineBaselineAlignedChild):
(WebCore::RenderGrid::baselinePosition):
(WebCore::RenderGrid::firstLineBaseline):
(WebCore::RenderGrid::inlineBlockBaseline):

  • rendering/RenderGrid.h:

LayoutTests:

Tests to verify the baseline positioning of grid and inline-grid blocks.
Note that two of these new tests are expected to fail because of a Flexbox
bug, since we use Flexbox as reference test.

  • TestExpectations:
  • fast/css-grid-layout/grid-baseline-expected.html: Added.
  • fast/css-grid-layout/grid-baseline-margins-expected.html: Added.
  • fast/css-grid-layout/grid-baseline-margins.html: Added.
  • fast/css-grid-layout/grid-baseline-must-respect-grid-order-expected.txt: Added.
  • fast/css-grid-layout/grid-baseline-must-respect-grid-order.html: Added.
  • fast/css-grid-layout/grid-baseline.html: Added.
  • fast/css-grid-layout/resources/grid-alignment.css:

(.alignSelfBaseline):
(.selfBaseline):

3:04 PM Changeset in webkit [210791] by aestes@apple.com
  • 1 edit in trunk/Source/WebCore/ChangeLog

Fix a ChangeLog typo.

2:23 PM Changeset in webkit [210790] by weinig@apple.com
  • 8 edits
    2 adds in trunk

Add the ability to use numbers in makeString()
https://bugs.webkit.org/show_bug.cgi?id=167087

Reviewed by Darin Adler.

Source/WTF:

Allow numbers to be easily used in makeString() and tryMakeString().

For instance, you can now write:

int amount = 7;
auto foo = makeString("There are ", amount, " apples in the cart");

  • WTF.xcodeproj/project.pbxproj:

Add new file.

  • wtf/text/IntegerToStringConversion.h:

(WTF::writeNumberToBufferImpl):
(WTF::writeNumberToBufferSigned):
(WTF::writeNumberToBufferUnsigned):
(WTF::lengthOfNumberAsStringImpl):
(WTF::lengthOfNumberAsStringSigned):
(WTF::lengthOfNumberAsStringUnsigned):
Add variants of integer writing code that compute the length of the string
that would be produced and writes the string to an existing buffer.

(WTF::IntegerToStringConversionTrait<AtomicString>::flush): Deleted.
(WTF::IntegerToStringConversionTrait<String>::flush): Deleted.
(WTF::IntegerToStringConversionTrait<StringBuilder>::flush): Deleted.
Move these traits to their respective classes.

  • wtf/text/AtomicString.h:

(WTF::IntegerToStringConversionTrait<AtomicString>::flush):

  • wtf/text/StringBuilder.h:

(WTF::IntegerToStringConversionTrait<StringBuilder>::flush):

  • wtf/text/WTFString.h:

(WTF::IntegerToStringConversionTrait<String>::flush):
Traits moved here from IntegerToStringConversion.h

  • wtf/text/StringConcatenateNumbers.h: Added.

(WTF::StringTypeAdapter<int>::StringTypeAdapter<int>):
(WTF::StringTypeAdapter<int>::length):
(WTF::StringTypeAdapter<int>::is8Bit):
(WTF::StringTypeAdapter<int>::writeTo):
(WTF::StringTypeAdapter<int>::toString):
(WTF::StringTypeAdapter<unsigned>::StringTypeAdapter<unsigned>):
(WTF::StringTypeAdapter<unsigned>::length):
(WTF::StringTypeAdapter<unsigned>::is8Bit):
(WTF::StringTypeAdapter<unsigned>::writeTo):
(WTF::StringTypeAdapter<unsigned>::toString):
(WTF::StringTypeAdapter<float>::StringTypeAdapter<float>):
(WTF::StringTypeAdapter<float>::length):
(WTF::StringTypeAdapter<float>::is8Bit):
(WTF::StringTypeAdapter<float>::writeTo):
(WTF::StringTypeAdapter<float>::toString):
(WTF::StringTypeAdapter<double>::StringTypeAdapter<double>):
(WTF::StringTypeAdapter<double>::length):
(WTF::StringTypeAdapter<double>::is8Bit):
(WTF::StringTypeAdapter<double>::writeTo):
(WTF::StringTypeAdapter<double>::toString):
Add basic adaptors for int, unsigned, float, and double.

(WTF::FormattedNumber::fixedPrecision):
(WTF::FormattedNumber::fixedWidth):
(WTF::FormattedNumber::length):
(WTF::FormattedNumber::buffer):
(WTF::FormattedNumber::stringView):
(WTF::StringTypeAdapter<FormattedNumber>::StringTypeAdapter<FormattedNumber>):
(WTF::StringTypeAdapter<FormattedNumber>::length):
(WTF::StringTypeAdapter<FormattedNumber>::is8Bit):
(WTF::StringTypeAdapter<FormattedNumber>::writeTo):
(WTF::StringTypeAdapter<FormattedNumber>::toString):
Add a special class, FormattedNumber, and an adaptor for it, allowing for
fixedPrecision and fixedWidth representation of doubles.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: Added.

Add tests for StringConcatenate, focusing on new numeric additions.

2:14 PM Changeset in webkit [210789] by aestes@apple.com
  • 5 edits in trunk/Source

[QuickLook] Do some cleanup in QuickLookHandle
https://bugs.webkit.org/show_bug.cgi?id=166864

Reviewed by Darin Adler.

Source/WebCore:

  • loader/ios/QuickLook.h: Stopped including QuickLookHandleClient.h and forward-declared

instead; changed setClient() to take a Ref<QuickLookHandleClient>&&; renamed nsResponse() to
previewResponse(); changed QuickLookHandle() to take a ResourceLoader& and const
ResourceResponse&; gave m_delegate a stronger type; removed unused m_quicklookFileHandle;
initialized m_finishedLoadingDataIntoConverter to false.
(WebCore::QuickLookHandle::firstRequestURL): Stopped exporting.
(WebCore::QuickLookHandle::setClient): Moved definition out-of-line.

  • loader/ios/QuickLook.mm: Renamed WebResourceLoaderQuickLookDelegate to

WebPreviewConverterDelegate and stopped conforming to NSURLConnectionDelegate and
WebCoreResourceLoaderDelegate; removed @property quickLookHandle and initialized
_quickLookHandle in the initializer instead.
(-[WebPreviewConverter initWithResourceLoader:quickLookHandle:]): Changed to take references
to resourceLoader and quickLookHandle.
(-[WebPreviewConverter _sendDidReceiveResponseIfNecessary]): Stoped checking for a nil
_quickLookHandle, since it is never nil.
(-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Deleted.
QLPreviewConverter never calls this method.
(-[WebPreviewConverter connection:didReceiveData:lengthReceived:]): Stopped checking for a
nil _resourceLoader, since it is never nil.
(-[WebPreviewConverter connectionDidFinishLoading:]): Ditto.
(-[WebPreviewConverter connection:didFailWithError:]): Ditto.
(WebCore::emptyClient): Changed to return a reference.
(WebCore::QuickLookHandle::QuickLookHandle): Moved creation of the delegate,
firstRequestURL, and response to here from QuickLookHandle::create(). Called
ResourceLoader::didCreateQuickLookHandle() here instead of in QuickLookHandle::create().
(WebCore::QuickLookHandle::create): Used std::make_unique to create the QuickLookHandle.
(WebCore::QuickLookHandle::didFinishLoading): Set m_finishedLoadingDataIntoConverter to true
instead of YES.
(WebCore::QuickLookHandle::setClient): Moved the client rvalue reference into m_client.
(WebCore::QuickLookHandle::~QuickLookHandle): Stopped clearing m_converter and calling
-detachHandle.
(WebCore::QuickLookHandle::previewRequestURL): Used dot syntax.
(WebCore::QuickLookHandle::previewResponse): Renamed from nsResponse().

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::didCreateQuickLookHandle): Changed to pass a
Ref<QuickLookHandleClient>&& to QuickLookHandle::setClient().

1:11 PM Changeset in webkit [210788] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: add UI Zoom level to Settings screen
https://bugs.webkit.org/show_bug.cgi?id=166991

Patch by Devin Rousso <Devin Rousso> on 2017-01-16
Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Main.js:

(WebInspector.loaded):
(WebInspector._dockedResizerMouseDown):
(WebInspector._increaseZoom):
(WebInspector._decreaseZoom):
(WebInspector._resetZoom):
(WebInspector.getZoomFactor): Renamed from _zoomFactor.
(WebInspector.setZoomFactor): Renamed from _setZoomFactor.

  • UserInterface/Base/Setting.js:

(WebInspector.settings):
Moved zoomFactor setting to global dictionary.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):

  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
Add UI input for changing zoomFactor.

9:45 AM Changeset in webkit [210787] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Remove CSSPropertyNames.in from the project. It's not used any more,
now that we generate files from CSSProperties.json.

  • WebCore.xcodeproj/project.pbxproj:
3:49 AM Changeset in webkit [210786] by Carlos Garcia Campos
  • 12 edits in trunk/Source

[SOUP] Accept-language could be set twice in a row for the default context
https://bugs.webkit.org/show_bug.cgi?id=167089

Reviewed by Žan Doberšek.

Source/WebCore:

If NetworkStorageSession doesn't have a SoupNetworkSession yet, we are creating it only to set the
languages. Since we already set the global value, the languages will be set when the SoupNetworkSession is
created later. This is not a big deal for the language property, but it will be for proxies after bug #128674.
Since NetworkStorageSession::soupNetworkSession() it's actually getting or creating the SoupNetworkSession, this
patch renames it as NetworkStorageSession::getOrCreateSoupNetworkSession() and now
NetworkStorageSession::soupNetworkSession() returns a pointer without creating the SoupNetworkSession, so it can
be nullptr. This can now be used to only use the default SoupNetworkSession when it has already been created.

  • platform/network/NetworkStorageSession.h:

(WebCore::NetworkStorageSession::soupNetworkSession): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

  • platform/network/soup/DNSSoup.cpp:

(WebCore::DNSResolveQueue::updateIsUsingProxy): Ditto.
(WebCore::DNSResolveQueue::platformResolve): Ditto.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession): This is the old soupNetworkSession(), now renamed.
(WebCore::NetworkStorageSession::soupNetworkSession): Return a pointer with the current value of m_session that
now can be nullptr.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::sessionFromContext): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

Source/WebKit2:

  • NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:

(WebKit::CustomProtocolManager::registerScheme): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

  • NetworkProcess/efl/NetworkProcessMainEfl.cpp:
  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::userPreferredLanguagesChanged): Only set the languages if NetworkStorageSession has a
SoupNetworkSession.

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::soupSession): Use NetworkStorageSession::getOrCreateSoupNetworkSession().

  • WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:

(WebKit::WebCookieManager::setCookiePersistentStorage): Ditto.

  • WebProcess/efl/WebProcessMainEfl.cpp:
3:24 AM Changeset in webkit [210785] by Carlos Garcia Campos
  • 6 edits in trunk/Source

[SOUP] Fix handling of accept language property
https://bugs.webkit.org/show_bug.cgi?id=166969

Reviewed by Michael Catanzaro.

Source/WebCore:

Add SoupNetworkSession::setInitialAcceptLanguages() static method and update setAcceptLanguages to receive the
string already built from the languages vector. Now the SoupNetworkSession saves that value globally that
is always used when creating new sessions.

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::switchToNewTestingSession): Remove workaround.

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession): If initial accept languages were set, apply them to the newly created context.
(WebCore::SoupNetworkSession::setInitialAcceptLanguages): Just save the given value globally.
(WebCore::SoupNetworkSession::setAcceptLanguages): It receives now the string, so just set it to the session.

  • platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::buildAcceptLanguages): Moved from WebCore.
(WebKit::NetworkProcess::userPreferredLanguagesChanged): Build the accept language string from the vector and
pass set it to SoupNetworkSession to be used for new sessions, and also to all other existing sessions.

Jan 15, 2017:

4:14 PM Changeset in webkit [210784] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Add the build fix for browsers that don't yet support custom elements SPI.
It was supposedly to be a part of the previous commit.

  • public/v3/components/base.js:

(ComponentBase.defineElement):

4:12 PM Changeset in webkit [210783] by rniwa@webkit.org
  • 8 edits
    3 adds in trunk/Websites/perf.webkit.org

Adopt custom elements API in perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=167045

Reviewed by Darin Adler.

Adopt custom elements API in ComponentBase, and create the shadow tree lazily in content() and render()
instead of eagerly creating it inside the constructor.

For now, create a separate element class for each component in ComponentBase.defineElement instead of
making ComponentBase inherit from HTMLElement to preserve the semantics we have as well as to test
the boundaries of what custom elements API allows for framework authors.

In order to ensure one-to-one correspondence between elements and their components, we use a static map,
ComponentBase._currentlyConstructedByInterface, to remember which element or component is being created
and use that in custom element's constructor to update element.component() and this._element.

Also dropped the support for not having attachShadow as we've shipped this feature in Safari 10.

Finally, added tests to be ran inside a browser to test the front end code in browser-tests.

  • browser-tests/component-base-tests.js: Added. Basic tests for ComponentBase.
  • browser-tests/index.html: Added.
  • public/v3/components/base.js:

(ComponentBase): Don't create the shadow tree. Use the currently constructed element as this._element if
there is one (the custom element's constructor is getting called). Otherwise create a new element but
store this component in the map to avoid creating a new component in the custom element's constructor.
(ComponentBase.prototype.content): Lazily create the shadow tree now.
(ComponentBase.prototype.render): Ditto.
(ComponentBase.prototype._ensureShadowTree): Renamed from _constructShadowTree. Dropped the support for
not having shadow DOM API. This is now required. Also use importNode instead of cloneNode in cloning
the template content since the latter would not get upgraded.
(ComponentBase.prototype._recursivelyReplaceUnknownElementsByComponents): Modernized the code. Don't
re-create a component if its element had already been upgraded by its custom element constructor.
(ComponentBase.defineElement): Add this component to the static maps. _componentByName is used by
_recursivelyReplaceUnknownElementsByComponents to instantiate new components in the browsers that don't
support custom elements API and _componentByClass is used by ComponentBase's constructor to lookup the
element name. The latter should go away once all components fully adopt ComponentBase.defineElement.
(ComponentBase.defineElement.elementClass): A class to define a custom element for the component.
We need to reconfigure the property since class's name is not writable but configurable.

  • public/v3/components/button-base.js:

(ButtonBase.htmlTemplate): Added. Extracted the common code from CloseButton and WarningIcon.
(ButtonBase.buttonContent): Added. An abstract method overridden by CloseButton and WarningIcon.
(ButtonBase.sizeFactor): Added. Overridden by WarningIcon.
(ButtonBase.cssTemplate): Updated to use :host.

  • public/v3/components/close-button.js:

(CloseButton.buttonContent): Renamed from htmlTemplate.

  • public/v3/components/spinner-icon.js:

(SpinnerIcon.cssTemplate): Removed webkit prefixed properties, and updated it to animate stroke instead
of opacity to reduce the power usage.
(SpinnerIcon.htmlTemplate): Factored stroke, stroke-width, and stroke-linecap into cssTemplate.

  • public/v3/components/warning-icon.js:

(WarningIcon.cssTemplate): Deleted.
(WarningIcon.sizeFactor): Added.
(WarningIcon.buttonContent): Renamed from htmlTemplate.

  • public/v3/pages/summary-page.js:

(SummaryPage._constructRatioGraph): Fixed a bug that we were not never calling spinner.updateRendering().
(SummaryPage.prototype._renderCell):

3:02 PM WebInspectorCodingStyleGuide edited by BJ Burg
(diff)
2:42 PM Changeset in webkit [210782] by Michael Catanzaro
  • 2 edits in trunk/Tools

Unreviewed, remove stale comment.

This test was fixed by r163173.

  • TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
1:01 PM Changeset in webkit [210781] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[SOUP] SoupNetworkSession constructor should be explicit
https://bugs.webkit.org/show_bug.cgi?id=167069

Reviewed by Darin Adler.

  • platform/network/soup/SoupNetworkSession.h:
12:05 PM Changeset in webkit [210780] by commit-queue@webkit.org
  • 23 edits
    3 deletes in trunk

[WebIDL] Remove custom bindings for HTMLInputElement, HTMLFrameElement, HTMLMediaElement and HTMLOptionsCollection
https://bugs.webkit.org/show_bug.cgi?id=167039

Patch by Sam Weinig <sam@webkit.org> on 2017-01-15
Reviewed by Darin Adler.

Source/WebCore:

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSHTMLFrameElementCustom.cpp: Removed.
  • bindings/js/JSHTMLInputElementCustom.cpp: Removed.
  • bindings/js/JSHTMLMediaElementCustom.cpp: Removed.

Remove files.

  • html/HTMLOptionsCollection.idl:
  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:

(WebCore::JSHTMLOptionsCollection::setLength): Deleted.
Remove custom setLength. The bindings generator can handle this now.

  • html/HTMLFrameElement.idl:

Resort to match spec. Replace custom annotation for location with SetterCallWith=ScriptState.

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::setLocation):

  • html/HTMLFrameElementBase.h:

Add implementation of setLocation.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::selectionStartForBindings):
(WebCore::HTMLInputElement::setSelectionStartForBindings):
(WebCore::HTMLInputElement::selectionEndForBindings):
(WebCore::HTMLInputElement::setSelectionEndForBindings):
(WebCore::HTMLInputElement::selectionDirectionForBindings):
(WebCore::HTMLInputElement::setSelectionDirectionForBindings):
(WebCore::HTMLInputElement::setSelectionRangeForBindings):

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.idl:

Add variants of the selection properties that throw using the 'forBindings' suffix to differentiate.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setControllerForBindings):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::controllerForBindings):

  • html/HTMLMediaElement.idl:

Add a variant of the controller property that unsets the media group, using the 'forBindings' suffix to differentiate.

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::setLength):
Match other implementations by ignoring attempts to set large lengths (> 10000) rather than clamping.

LayoutTests:

  • fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
  • fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
  • fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html:
  • fast/dom/HTMLSelectElement/select-selectedIndex.html:

Update tests / results now that negative lengths don't throw, but do log due to be converted
to a large number.

  • fast/forms/select-max-length-expected.txt:

Update result now that a large length is not clamped, but rather, ignored.

11:39 AM Changeset in webkit [210779] by timothy_horton@apple.com
  • 8 edits in trunk/Source

De-duplicate more (nearly) identical code in Editor(Mac|IOS).mm
https://bugs.webkit.org/show_bug.cgi?id=167063

Reviewed by Dan Bernstein.

Source/WebCore:

No new tests, just refactoring.

  • editing/Editor.h:

Adjust to fontAttributesForSelectionStart returning a RetainPtr.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle):
Make use of more Obj-C literals (for NSNumber).

(WebCore::Editor::fontAttributesForSelectionStart):
Merge this from EditorMac and EditorIOS. There are a number of attributes
that are currently only extracted on Mac, and it's not clear why (and
probably should be shared).

(WebCore::Editor::stringSelectionForPasteboard):
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
Merge these functions from EditorMac and EditorIOS. The iOS implementation
was missing a reasonable bug fix from r161925.

(WebCore::Editor::createFragmentAndAddResources):
Merge this from EditorMac and EditorIOS. The Mac implementation was missing
a reasonable bug fix from r203482.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::fontAttributesForSelectionStart): Deleted.
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Deleted.
(WebCore::Editor::createFragmentAndAddResources): Deleted.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::fontAttributesForSelectionStart): Deleted.
(WebCore::Editor::stringSelectionForPasteboard): Deleted.
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Deleted.
(WebCore::Editor::createFragmentAndAddResources): Deleted.

Source/WebKit/mac:

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _selectionStartFontAttributesAsRTF]):
(-[WebHTMLView _updateFontPanel]):

  • WebView/WebView.mm:

(-[WebView typingAttributes]):
Adjust to fontAttributesForSelectionStart returning a RetainPtr.

9:47 AM Changeset in webkit [210778] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

[Cocoa] Unify FontPlatformData's hashing and equality operators
https://bugs.webkit.org/show_bug.cgi?id=167061

Reviewed by Darin Adler.

On iOS, we were using CFEqual() and CFHash(), while on macOS
we were using pointer hashing and pointer equality. Instead,
we should be consistent about these operators.

Right now, FontPlatformData holds two internal CTFontRefs, and
switching to these higher-level CFEqual() and CFHash()
functions is required for eliminating one of these two
internal font objects.

No new tests because there is no behavior change.

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::hash): Deleted.

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::platformIsEqual):
(WebCore::cascadeToLastResortAttributesDictionary):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::hash):

  • platform/graphics/win/FontPlatformDataCGWin.cpp:

(WebCore::FontPlatformData::hash):

  • platform/graphics/win/FontPlatformDataCairoWin.cpp:

(WebCore::FontPlatformData::hash):

  • platform/graphics/win/FontPlatformDataDirect2D.cpp:

(WebCore::FontPlatformData::hash):

2:48 AM Changeset in webkit [210777] by akling@apple.com
  • 7 edits in trunk/Source/WebCore

FrameView shouldn't keep dangling pointers into dead render trees.
<https://webkit.org/b/167011>

Reviewed by Antti Koivisto.

Added some pretty paranoid assertions to FrameView that verify all of its raw pointers
into the render tree are gone after the render tree has been destroyed.
They immediately caught two bugs, also fixed in this patch.

  • page/FrameView.h:
  • page/FrameView.cpp:

(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree): Added these two callbacks for before/after
Document tears down its render tree. The former clears the layout root, and detaches
custom scrollbars. The latter contains a bunch of sanity assertions that pointers into
the now-destroyed render tree are gone.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree): Notify FrameView before/after teardown.

  • page/animation/AnimationController.h:
  • page/animation/AnimationController.cpp:

(WebCore::AnimationController::hasAnimations): Added a helper to check if there are
any composite animations around, as these contain raw pointers to renderers.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::RenderElement::willBeDestroyed): Moved slow repaint object unregistration
from willBeRemovedFromTree() to willBeDestroyed(). The willBeRemovedFromTree() callback
is skipped as an optimization during full tree teardown, but willBeDestroyed() always
gets called. This fixes a bug where we'd fail to remove dangling pointers.

12:23 AM Changeset in webkit [210776] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebCore

[Cocoa] Unify font fallback between macOS and iOS for when the font-family list is exhausted
https://bugs.webkit.org/show_bug.cgi?id=167056

Reviewed by Darin Adler.

When performing font fallback, each item in the font-family list is examined.
If no appropriate fonts are found, WebKit asks the system for an appropriate
font. As of a few years ago, both macOS and iOS used platform calls to
produce a font; however, each platform used a different platform call. This
patch migrates both platforms to use a shared function which uses only
one of the platform calls (which means the other platform call is never used).

There are still some behavior differences between macOS and iOS (which are now
hidden behind a PLATFORM() guard), but I'd like to minimize and eliminate these
in the future. Using a shared function is a step toward this goal.

No new tests because there is no behavior change.

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::lookupFallbackFont):
(WebCore::FontCache::systemFallbackForCharacters):

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::getSystemFontFallbackForCharacters): Deleted.
(WebCore::platformLookupFallbackFont): Deleted.

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformLookupFallbackFont): Deleted.

Note: See TracTimeline for information about the timeline view.