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

Timeline



Aug 8, 2016:

8:26 PM Changeset in webkit [204276] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebCore

Ensure StringView lifetime is correct inside InlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=160584

Reviewed by Darin Adler.

A TextRun contains a StringView. Previously, we had a helper function which
could possibly create a new string, and then create a TextRun whose StringView
pointed inside this new string. Then, the string would be destroyed because it
was on the stack.

Luckily, this is benign because this new string would always share a
StringImpl with the string passed into the function (and the StringView
would point into this StringImpl). However, relying on this is dangerous
and we are trying to enforce StringView lifetime checks in
https://bugs.webkit.org/show_bug.cgi?id=160384.

The solution is to make a helper function which returns this built string
so that the caller can own this built string, thereby extending its lifetime.
Unfortunately, this built string can't be a StringView because the same
mechanism must be used for text-combine, which returns originalText(), which
may return a built string if it is a RenderCounter. Perhaps it would be
valuable to migrate RenderCounter::originalText() to something else, or to
divorce text-combine from originalText(), but that is out of scope for this
patch. Similarly, hyphenation uses this same mechanism, but because the
hyphenated string needs to be created, we must own the string storage (so
StringView is incorrect here).

Another reason is for performance: StringView::substring() is faster to use
than String::substringSharingImpl(), since it does not allocate and destroy a
StringImpl on the heap. This patch migrates away from
String::substringSharingImpl() and onto StringView::substring().

No new tests because there is no behavior change.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::hyphenatedStringForTextRun):
(WebCore::InlineTextBox::constructTextRun):

  • rendering/InlineTextBox.h:
  • rendering/RenderCombineText.cpp:

(WebCore::RenderCombineText::maybeGetCombinedStringForRendering):
(WebCore::RenderCombineText::getStringToRender): Deleted.

  • rendering/RenderCombineText.h:
6:17 PM Changeset in webkit [204275] by aakash_jain@apple.com
  • 6 edits in trunk/Tools

Some EWS console logs doesn't go to log file
https://bugs.webkit.org/show_bug.cgi?id=160585
rdar://problem/24464570

Reviewed by Daniel Bates.

  • Scripts/webkitpy/common/system/logutils.py:

(FileSystemHandler._open): Ensure that we open logfile in append mode in order to avoid
any possible overwriting.

  • Scripts/webkitpy/common/system/filesystem.py:

(FileSystem.open_text_file_for_writing): Add should_append parameter to append to file.

  • Scripts/webkitpy/common/system/filesystem_mock.py:

(MockFileSystem.open_text_file_for_writing): Same.

  • Scripts/webkitpy/common/system/filesystem_unittest.py:

(RealFileSystemTest.test_read_and_write_text_file): Removed unused variable 'hex_equivalent'.
(RealFileSystemTest.test_append_to_text_file): Added new unit test for testing append functionality.

  • Scripts/webkitpy/tool/commands/queues.py:

(AbstractQueue.begin_work_queue): Configure the logger for overall webkitpy to log to file.
This will ensure that all the sub-modules inside webkitpy will log to file.

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

Clear fullscreen mode state after exiting fullscreen mode to keep state in sync.
https://bugs.webkit.org/show_bug.cgi?id=160668

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-08-08
Reviewed by Jon Lee.

When exiting fullscreen while in auto picture in picture mode, fullscreen mode gets
out of sync, causing exit fullscreen to fail. This change updates the state
to keep it correct.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::exitFullscreen):

5:52 PM Changeset in webkit [204273] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web IDL] We should resolve typedefs for dictionary members
https://bugs.webkit.org/show_bug.cgi?id=160675

Reviewed by Sam Weinig.

Resolve typedefs for dictionary member types.

Added bindings test coverage.

  • bindings/scripts/IDLParser.pm:

(applyTypedefs):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convert<TestObj::Dictionary>):

  • bindings/scripts/test/TestObj.idl:
5:48 PM Changeset in webkit [204272] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update test expectations for rdar://problem/27711048.

  • platform/mac/TestExpectations:
5:22 PM Changeset in webkit [204271] by Simon Fraser
  • 6 edits in trunk/Tools

Have the iOS platform interit from the Apple platform in webkitpy
https://bugs.webkit.org/show_bug.cgi?id=160672

Reviewed by Dan Bates.

The IOSSimulatorPort used to inherit from Port, rather than ApplePort.
Fix this, and move duplicated code from IOSSimulatorPort and MacPort into
ApplePort.

Since WinPort also inherits from ApplePort, it needs to stub out some things
that are unavailable on Windows (leaks, sampling).

Some SnowLeopard-related code and the associated test were removed.

  • Scripts/webkitpy/port/apple.py:

(ApplePort.init):
(ApplePort):
(ApplePort._make_leak_detector):
(ApplePort.default_timeout_ms):
(ApplePort.supports_per_test_timeout):
(ApplePort.should_retry_crashes):
(ApplePort._generate_all_test_configurations):
(ApplePort.check_for_leaks):
(ApplePort.print_leaks_summary):
(ApplePort._path_to_webcore_library):
(ApplePort.show_results_html_file):
(ApplePort._merge_crash_logs):
(ApplePort._look_for_all_crash_logs_in_log_dir):
(ApplePort._get_crash_log):
(ApplePort.look_for_new_crash_logs):
(ApplePort.sample_process):
(ApplePort.sample_file_path):
(ApplePort.look_for_new_samples):
(ApplePort._path_to_helper):
(ApplePort.determine_full_port_name): Deleted.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort):
(IOSSimulatorPort.init):
(IOSSimulatorPort.default_timeout_ms): Deleted.
(IOSSimulatorPort.supports_per_test_timeout): Deleted.
(IOSSimulatorPort.should_retry_crashes): Deleted.
(IOSSimulatorPort.check_for_leaks): Deleted.
(IOSSimulatorPort.print_leaks_summary): Deleted.
(IOSSimulatorPort._path_to_webcore_library): Deleted.
(IOSSimulatorPort.show_results_html_file): Deleted.
(IOSSimulatorPort.sample_file_path): Deleted.
(IOSSimulatorPort._merge_crash_logs): Deleted.
(IOSSimulatorPort._look_for_all_crash_logs_in_log_dir): Deleted.
(IOSSimulatorPort.look_for_new_crash_logs): Deleted.
(IOSSimulatorPort.look_for_new_samples): Deleted.
(IOSSimulatorPort.sample_process): Deleted.
(IOSSimulatorPort._path_to_helper): Deleted.
(IOSSimulatorPort.make_command): Deleted.

  • Scripts/webkitpy/port/mac.py:

(MacPort.init):
(MacPort.make_command):
(MacPort._build_java_test_support):
(MacPort): Deleted.
(MacPort.default_timeout_ms): Deleted.
(MacPort.supports_per_test_timeout): Deleted.
(MacPort.should_retry_crashes): Deleted.
(MacPort.default_child_processes): Deleted.
(MacPort.check_for_leaks): Deleted.
(MacPort.print_leaks_summary): Deleted.
(MacPort._path_to_webcore_library): Deleted.
(MacPort.show_results_html_file): Deleted.
(MacPort.sample_file_path): Deleted.
(MacPort._merge_crash_logs): Deleted.
(MacPort._look_for_all_crash_logs_in_log_dir): Deleted.
(MacPort.look_for_new_crash_logs): Deleted.
(MacPort.look_for_new_samples): Deleted.
(MacPort.sample_process): Deleted.
(MacPort._path_to_helper): Deleted.

  • Scripts/webkitpy/port/mac_unittest.py:

(MacTest.test_default_child_processes): Deleted.

  • Scripts/webkitpy/port/win.py:

(WinPort.look_for_new_samples):
(WinPort):
(WinPort.sample_process):
(WinPort._make_leak_detector):
(WinPort.check_for_leaks):
(WinPort.print_leaks_summary):
(WinPort._path_to_webcore_library):

5:08 PM Changeset in webkit [204270] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the Windows build.

  • plugins/PluginInfoProvider.h:
5:01 PM Changeset in webkit [204269] by Ryan Haddad
  • 2 edits in branches/safari-602-branch/LayoutTests

Merge r204201. rdar://problem/27710755

4:43 PM Changeset in webkit [204268] by andersca@apple.com
  • 23 edits
    8 adds in trunk/Source

Add a new PluginInfoProvider class, to replace PluginStrategy
https://bugs.webkit.org/show_bug.cgi?id=160670

Reviewed by Sam Weinig.

Source/WebCore:

Add a per page PluginInfoProvider class that's going to ultimately replace the plug-in strategy.

  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:

(WebCore::fillWithEmptyClients):

  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::refreshPlugins):
(WebCore::Page::pluginData):
(WebCore::Page::pluginInfoProvider):

  • page/Page.h:
  • page/PageConfiguration.cpp:
  • page/PageConfiguration.h:
  • plugins/DOMPluginArray.cpp:

(WebCore::DOMPluginArray::refresh):

  • plugins/DOMPluginArray.h:
  • plugins/PluginData.cpp:

(WebCore::PluginData::PluginData):
(WebCore::PluginData::webVisiblePlugins):
(WebCore::PluginData::publiclyVisiblePlugins):
(WebCore::PluginData::initPlugins):
(WebCore::PluginData::refresh): Deleted.

  • plugins/PluginData.h:

(WebCore::PluginData::create):
(WebCore::PluginData::PluginData): Deleted.

  • plugins/PluginInfoProvider.cpp: Added.

(WebCore::PluginInfoProvider::~PluginInfoProvider):
(WebCore::PluginInfoProvider::addPage):
(WebCore::PluginInfoProvider::removePage):

  • plugins/PluginInfoProvider.h: Added.
  • replay/SerializationMethods.cpp:

(JSC::EncodingTraits<PluginData>::decodeValue):
(JSC::DeserializedPluginData::DeserializedPluginData): Deleted.

Source/WebKit:

Add new files.

  • PlatformWin.cmake:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Add a new WebPluginInfoProvider - it just calls through to the plug-in strategy for now.

  • WebCoreSupport/WebPluginInfoProvider.h: Added.
  • WebCoreSupport/WebPluginInfoProvider.mm: Added.

(WebPluginInfoProvider::singleton):
(WebPluginInfoProvider::WebPluginInfoProvider):
(WebPluginInfoProvider::~WebPluginInfoProvider):
(WebPluginInfoProvider::refreshPlugins):
(WebPluginInfoProvider::getPluginInfo):
(WebPluginInfoProvider::getWebVisiblePluginInfo):
(WebPluginInfoProvider::setPluginLoadClientPolicy):
(WebPluginInfoProvider::clearPluginClientPolicies):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Add a new WebPluginInfoProvider - it just calls through to the plug-in strategy for now.

  • WebCoreSupport/WebPluginInfoProvider.cpp: Added.

(WebPluginInfoProvider::singleton):
(WebPluginInfoProvider::WebPluginInfoProvider):
(WebPluginInfoProvider::~WebPluginInfoProvider):
(WebPluginInfoProvider::refreshPlugins):
(WebPluginInfoProvider::getPluginInfo):
(WebPluginInfoProvider::getWebVisiblePluginInfo):

  • WebCoreSupport/WebPluginInfoProvider.h: Added.

Source/WebKit2:

Add a new WebPluginInfoProvider - it just calls through to the plug-in strategy for now.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/Plugins/WebPluginInfoProvider.cpp: Added.

(WebKit::WebPluginInfoProvider::singleton):
(WebKit::WebPluginInfoProvider::WebPluginInfoProvider):
(WebKit::WebPluginInfoProvider::~WebPluginInfoProvider):
(WebKit::WebPluginInfoProvider::refreshPlugins):
(WebKit::WebPluginInfoProvider::getPluginInfo):
(WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
(WebKit::WebPluginInfoProvider::setPluginLoadClientPolicy):
(WebKit::WebPluginInfoProvider::clearPluginClientPolicies):

  • WebProcess/Plugins/WebPluginInfoProvider.h: Added.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userInterfaceLayoutDirection):

3:57 PM Changeset in webkit [204267] by Ryan Haddad
  • 2 edits
    1 delete in branches/safari-602-branch/LayoutTests

Test gardening for rdar://problem/27595142.

2:43 PM Changeset in webkit [204266] by wilander@apple.com
  • 3 edits
    4 adds in trunk

Popups opened from a sandboxed iframe should themselves be sandboxed
https://bugs.webkit.org/show_bug.cgi?id=134850
<rdar://problem/27375388>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

Now copies the opener's frame loader effective sandbox flags to the
new frame loader.

LayoutTests:

  • http/tests/security/resources/anchor-tag-with-blank-target.html: Added.
  • http/tests/security/resources/page-executing-javascript.html: Added.
  • http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt: Added.
  • http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html: Added.
2:41 PM Changeset in webkit [204265] by Matt Baker
  • 2 edits in trunk/Tools

Unreviewed: moved myself to the reviewers list.

  • Scripts/webkitpy/common/config/contributors.json:
1:56 PM Changeset in webkit [204264] by Joseph Pecoraro
  • 10 edits in trunk/Source/WebInspectorUI

Web Inspector: Popover for Color Picker should update position when window resizes
https://bugs.webkit.org/show_bug.cgi?id=160321

Reviewed by Brian Burg.

  • UserInterface/Views/Popover.js:

(WebInspector.Popover):
(WebInspector.Popover.prototype.set windowResizeHandler):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype.handleEvent):
(WebInspector.Popover.prototype._addListenersIfNeeded):
The popover already has a set of window listeners, add "resize" to
the list. If there is a resize, invoke a resize handler. The resize
handler will only be called while the popover is visible.

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WebInspector.HeapSnapshotDataGridTree):
(WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
(WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popoverTargetElement):
(WebInspector.HeapSnapshotDataGridTree.prototype.set popoverTargetElement):
(WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
(WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

Update heap snapshot popovers to reposition on window resize.
Set a target to reposition around, since the popover is shared.

  • UserInterface/Views/ProbeSetDetailsSection.js:

(WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
Update probe expression popover to respect window resizes.

  • UserInterface/Views/VisualStylePropertyEditor.js:

(WebInspector.VisualStylePropertyEditor.prototype._showPropertyInfoPopover):
Though not yet visible, update this to respect window resizes.

  • UserInterface/Views/InlineSwatch.js:

(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Add a window resize handler to reposition over the swatch element.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WebInspector.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
(WebInspector.LayerTreeDetailsSidebarPanel): Deleted.
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._windowResized): Deleted.

  • UserInterface/Views/TimelineDataGrid.js:

(WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
(WebInspector.TimelineDataGrid): Deleted.
(WebInspector.TimelineDataGrid.prototype.closed): Deleted.
(WebInspector.TimelineDataGrid.prototype.handleEvent): Deleted.
(WebInspector.TimelineDataGrid.prototype._windowResized): Deleted.

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
Replace custom popover repositioning with standard Popover handling.

1:30 PM Changeset in webkit [204263] by Chris Dumez
  • 34 edits
    2 adds in trunk

Align Selection API with the specification
https://bugs.webkit.org/show_bug.cgi?id=160663

Reviewed by Ryosuke Niwa.

Source/WebCore:

Align Selection API with the specification:

In particular, the following changes were made:

  • Mark parameters as non-nullable when they should be.
  • Mark parameters as mandatory when they should be.
  • Use "unsigned long" type for offsets instead of "long".

This aligns our behavior with Firefox and Chrome.

Note that the Node parameters to setBaseAndExtent() operation were kept
nullable, which does not match the specification. This is intentional
as I worry about compatibility risk, especially considering they are
still nullable in Chrome. Only Firefox marks them as non-nullable.

Test: editing/selection/bad-input.html

  • dom/Position.h:

(WebCore::Position::LegacyEditingOffset::value):
(WebCore::Position::LegacyEditingOffset::LegacyEditingOffset):
(WebCore::createLegacyEditingPosition):

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::anchorOffset):
(WebCore::DOMSelection::focusOffset):
(WebCore::DOMSelection::baseOffset):
(WebCore::DOMSelection::extentOffset):
(WebCore::DOMSelection::rangeCount):
(WebCore::DOMSelection::collapse):
(WebCore::DOMSelection::setBaseAndExtent):
(WebCore::DOMSelection::setPosition):
(WebCore::DOMSelection::extend):
(WebCore::DOMSelection::getRangeAt):
(WebCore::DOMSelection::addRange):
(WebCore::DOMSelection::deleteFromDocument):
(WebCore::DOMSelection::containsNode):
(WebCore::DOMSelection::selectAllChildren):
(WebCore::DOMSelection::shadowAdjustedOffset):
(WebCore::DOMSelection::modify): Deleted.
(WebCore::DOMSelection::shadowAdjustedNode): Deleted.
(WebCore::DOMSelection::isValidForPosition): Deleted.

  • page/DOMSelection.h:
  • page/DOMSelection.idl:

LayoutTests:

  • editing/selection/bad-input-expected.txt: Added.
  • editing/selection/bad-input.html: Added.

Add new layout test to cover passing bad input to the Selection API.
This new test is passing completely in Firefox and Chrome.

  • editing/execCommand/apply-style-text-decoration-crash.html:
  • editing/execCommand/applyblockelement-visiblepositionforindex-crash.html:
  • editing/execCommand/ident-crashes-topnode-is-text.html:
  • editing/execCommand/indent-pre-expected.txt:
  • editing/execCommand/indent-pre.html:
  • editing/execCommand/overtype.html:
  • editing/selection/containsNode-expected.txt:
  • editing/selection/containsNode.html:
  • editing/selection/move-by-line-003.html:
  • editing/selection/script-tests/DOMSelection-DocumentType.js:
  • editing/selection/script-tests/DOMSelection-crossing-document.js:

(clear):

  • editing/selection/selection-invalid-offset-expected.txt:
  • fast/block/float/float-list-changed-before-layout-crash.html:
  • fast/dom/non-numeric-values-numeric-parameters-expected.txt:
  • fast/dom/script-tests/non-numeric-values-numeric-parameters.js:
  • fast/events/selectstart-by-arrow-keys.html:
  • fast/html/nav-element.html:
  • fast/html/script-tests/article-element.js:
  • fast/html/script-tests/aside-element.js:
  • fast/html/script-tests/footer-element.js:
  • fast/html/script-tests/header-element.js:
  • fast/html/script-tests/hgroup-element.js:
  • fast/html/script-tests/main-element.js:
  • fast/html/script-tests/section-element.js:
  • imported/blink/accessibility/event-on-deleted-iframe-causes-crash.html:
  • imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html:
  • svg/custom/unicode-in-tspan-multi-svg-crash.html:

Update existing tests to use the Selection API properly.

12:39 PM Changeset in webkit [204262] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Regression(r204239): Caused flaky crashes under ~Database()
https://bugs.webkit.org/show_bug.cgi?id=160665
<rdar://problem/27748065>

Reviewed by Brady Eidson.

Make sure the scriptExecution context only gets ref'd / deref'd
on the context thread. Document / WorkerGlobalScope are not
ThreadSafeRefCounted.

No new tests, already covered by:
storage/websql/open-database-creation-callback.html

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::~Database):

11:56 AM Changeset in webkit [204261] by mark.lam@apple.com
  • 4 edits in trunk

ASSERTION FAILED: hasInlineStorage() in JSFinalObject::visitChildren().
https://bugs.webkit.org/show_bug.cgi?id=160666

Reviewed by Keith Miller.

JSTests:

  • stress/object-constructor-should-be-new-target-aware.js:

Source/JavaScriptCore:

This assertion is benign. JSFinalObject::visitChildren() calls
JSObject::inlineStorage() to get a pointer to the object's inline storage, and
later passes it to visitor.appendValuesHidden() with a previously computed
storageSize. When storageSize is 0, appendValuesHidden() ends up doing nothing.
However, before we get there, JSObject::inlineStorage() will be asserting
hasInlineStorage() and this assertion will fail when storageSize is 0.

We can fix this assertion failure by simply adding a storageSize check before
calling hasInlineStorage() and visitor.appendValuesHidden().

  • runtime/JSObject.cpp:

(JSC::JSFinalObject::visitChildren):

11:38 AM Changeset in webkit [204260] by wilander@apple.com
  • 13 edits
    2 adds in trunk

Don't set document.domain to an IP address fragment
https://bugs.webkit.org/show_bug.cgi?id=126045
<rdar://problem/27331794>

Reviewed by Daniel Bates.

Source/WebCore:

This patch matches the following Blink one:
https://chromium.googlesource.com/chromium/blink//b19a57fdb323d5a80d3a1cb0a6b343558c4237b0

IP address octets should not be treated as subdomains when setting
document.domain. The specs say:
'The domain attribute's setter must run these steps: ...

  1. If host is not equal to effectiveDomain, then run these substeps:
    1. If host or effectiveDomain is not a domain, then throw a "SecurityError" DOMException.'

https://html.spec.whatwg.org/multipage/browsers.html#relaxing-the-same-origin-restriction
Last Updated 5 August 2016

'A host is a domain, an IPv4 address, or an IPv6 address.'
https://url.spec.whatwg.org/#concept-domain
Last Updated 28 July 2016

Test: http/tests/security/set-domain-remove-subdomain-for-ip-address.html

  • dom/Document.cpp:

(WebCore::Document::setDomain):

Now checks whether the security origin is allowed to remove
subdomains. If not, it throws a security error.

  • page/OriginAccessEntry.cpp:

(WebCore::OriginAccessEntry::OriginAccessEntry):

Constructor now expects an IP address setting.

(WebCore::OriginAccessEntry::matchesOrigin):

Now also checks whether the host in an IP address and returns
false if IP addresses aren't configured to be treated as domains.

  • page/OriginAccessEntry.h:

Introduced new enum for IP address setting.
Constructor now expects an IP address setting.

(WebCore::OriginAccessEntry::ipAddressSettings):

New getter.

(WebCore::operator==):

Now also requires IP address settings to match.

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):

Changes to match OriginAccessEntry's new constructor.

(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):

Changes to match OriginAccessEntry's new constructor.

  • page/Settings.in:

Added a setting to allow IP address octets to be treated as
subdomains. This way our existing tests setting document.domain
still work.

LayoutTests:

IP address octets should not be treated as subdomains when setting document.domain.

  • http/tests/security/aboutBlank/security-context-alias.html:

Now enables the new setting treatIPAddressesAsDomains.

  • http/tests/security/aboutBlank/security-context-grandchildren-alias.html:

Now enables the new setting treatIPAddressesAsDomains.

  • http/tests/security/postMessage/origin-unaffected-by-document-domain.html:

Now enables the new setting treatIPAddressesAsDomains.

  • http/tests/security/set-domain-remove-subdomain-for-ip-address-expected.txt: Added.
  • http/tests/security/set-domain-remove-subdomain-for-ip-address.html: Added.
  • http/tests/security/setDomainRelaxationForbiddenForURLScheme.html:

Now enables the new setting treatIPAddressesAsDomains.

  • http/tests/workers/worker-document-domain-security.html:

Now enables the new setting treatIPAddressesAsDomains.

  • http/tests/xmlhttprequest/document-domain-set.html:

Now enables the new setting treatIPAddressesAsDomains.

10:54 AM Changeset in webkit [204259] by andersca@apple.com
  • 57 edits
    5 deletes in trunk/Source/WebCore

Remove more unused bindings code
https://bugs.webkit.org/show_bug.cgi?id=160568

Reviewed by Sam Weinig.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/objc/DOMDocument.mm:

(-[DOMDocument execCommand:userInterface:]):
(-[DOMDocument execCommand:]):
(-[DOMDocument getMatchedCSSRules:pseudoElement:]):

  • bindings/objc/DOMHTMLBaseFontElement.mm:
  • bindings/objc/DOMHTMLCollection.mm:

(-[DOMHTMLCollection tags:]):

  • bindings/objc/DOMWheelEvent.mm:

(-[DOMWheelEvent isHorizontal]):

  • css/RGBColor.idl:
  • dom/Attr.idl:
  • dom/DOMImplementation.idl:
  • dom/Document.h:
  • dom/Document.idl:
  • dom/Element.idl:
  • dom/EventException.h: Removed.

(WebCore::EventException::EventException): Deleted.

  • dom/EventException.idl: Removed.
  • dom/KeyboardEvent.idl:
  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::messagePort): Deleted.
(WebCore::MessageEvent::initMessageEvent): Deleted.

  • dom/MessageEvent.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::postMessage): Deleted.

  • dom/MessagePort.h:
  • dom/Node.idl:
  • dom/NodeFilter.idl:
  • dom/OverflowEvent.idl:
  • dom/WheelEvent.h:
  • dom/WheelEvent.idl:
  • html/HTMLAllCollection.cpp:

(WebCore::HTMLAllCollection::tags):

  • html/HTMLAllCollection.h:
  • html/HTMLAnchorElement.idl:
  • html/HTMLAreaElement.idl:
  • html/HTMLBaseFontElement.cpp: Removed.

(WebCore::HTMLBaseFontElement::HTMLBaseFontElement): Deleted.

  • html/HTMLBaseFontElement.h: Removed.
  • html/HTMLBaseFontElement.idl: Removed.
  • html/HTMLButtonElement.idl:
  • html/HTMLCanvasElement.idl:
  • html/HTMLCollection.cpp:

(WebCore::HTMLCollection::tags): Deleted.

  • html/HTMLCollection.h:
  • html/HTMLCollection.idl:
  • html/HTMLElement.idl:
  • html/HTMLFieldSetElement.idl:
  • html/HTMLFormElement.idl:
  • html/HTMLHyperlinkElementUtils.idl:
  • html/HTMLIFrameElement.idl:
  • html/HTMLImageElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLLabelElement.idl:
  • html/HTMLLegendElement.idl:
  • html/HTMLLinkElement.idl:
  • html/HTMLMediaElement.idl:
  • html/HTMLObjectElement.idl:
  • html/HTMLOptionsCollection.idl:
  • html/HTMLSelectElement.idl:
  • html/HTMLTableCellElement.idl:
  • html/HTMLTextAreaElement.idl:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage): Deleted.

  • page/DOMWindow.h:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::postMessage): Deleted.

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/Worker.cpp:

(WebCore::Worker::postMessage): Deleted.

  • workers/Worker.h:
10:26 AM Changeset in webkit [204258] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Land test expectations for rdar://problem/27711048.

  • platform/mac/TestExpectations:
10:25 AM Changeset in webkit [204257] by beidson@apple.com
  • 15 edits in trunk/Source

Addressing late review feedback in bug 160605
https://bugs.webkit.org/show_bug.cgi?id=160605

Reviewed by Darin's suggestions.

Source/WebCore:

  • Modules/gamepad/GamepadManager.cpp:

(WebCore::GamepadManager::maybeStartMonitoringGamepads):
(WebCore::GamepadManager::maybeStopMonitoringGamepads):

  • platform/gamepad/EmptyGamepadProvider.cpp:

(WebCore::EmptyGamepadProvider::startMonitoringGamepads):
(WebCore::EmptyGamepadProvider::stopMonitoringGamepads):

  • platform/gamepad/EmptyGamepadProvider.h:
  • platform/gamepad/GamepadProvider.h:
  • platform/gamepad/mac/HIDGamepadProvider.cpp:

(WebCore::HIDGamepadProvider::startMonitoringGamepads):
(WebCore::HIDGamepadProvider::stopMonitoringGamepads):

  • platform/gamepad/mac/HIDGamepadProvider.h:

(WebCore::HIDGamepadProvider::platformGamepads): Deleted.

Source/WebKit2:

  • UIProcess/Gamepad/UIGamepadProvider.cpp:

(WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
(WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):

  • UIProcess/Gamepad/UIGamepadProvider.h:
  • UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp:

(WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
(WebKit::UIGamepadProvider::platformStopMonitoringGamepads):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::startedUsingGamepads):
(WebKit::WebProcessPool::stoppedUsingGamepads):
(WebKit::WebProcessPool::processStoppedUsingGamepads):

  • UIProcess/WebProcessPool.h:
  • WebProcess/Gamepad/WebGamepadProvider.cpp:

(WebKit::WebGamepadProvider::startMonitoringGamepads):
(WebKit::WebGamepadProvider::stopMonitoringGamepads):

  • WebProcess/Gamepad/WebGamepadProvider.h:
10:24 AM Changeset in webkit [204256] by Chris Dumez
  • 2 edits in trunk/Tools

Update API tests in mac/SetDocumentURI.mm after r204247
https://bugs.webkit.org/show_bug.cgi?id=160660

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/mac/SetDocumentURI.mm:

(TestWebKitAPI::TEST):

9:43 AM Changeset in webkit [204255] by BJ Burg
  • 18 edits in trunk/Source/JavaScriptCore

Web Inspector: clean up prefixing of Automation protocol generated files
https://bugs.webkit.org/show_bug.cgi?id=160635
<rdar://problem/27735327>

Reviewed by Timothy Hatcher.

Introduce different settings for the 'protocol group' name for C++ vs. Objective-C.

Use 'WD' as the prefix for generated Objective-C frontend dispatchers and helpers.
Continue using 'Automation' as the prefix for generated C++ backend dispatchers.

  • inspector/scripts/codegen/cpp_generator.py:

(CppGenerator.protocol_name):

  • inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py:

(ObjCProtocolTypeConversionsImplementationGenerator.generate_output):
(ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_category_interface):
(ObjCProtocolTypeConversionsImplementationGenerator._generate_type_factory_category_implementation):
Adjust the class name. Generate one category per protocol domain to keep it easy to read.

  • inspector/scripts/codegen/models.py:
  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator.protocol_name):

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/expected/enum-values.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

Rebaseline test results.

9:35 AM Changeset in webkit [204254] by Chris Dumez
  • 5 edits
    2 adds in trunk

It should be possible to re-initialize an Event after it's been dispatched
https://bugs.webkit.org/show_bug.cgi?id=160651

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/dom/events/Event-propagation-expected.txt:

Source/WebCore:

Allow re-initialization of an Event that's already been dispatched, as
per the latest DOM specification:

Firefox already follows the specification here.

No new tests, rebaselined existing test.

Test: fast/events/initEvent-after-dispatch.html

  • dom/Event.cpp:

(WebCore::Event::initEvent):

LayoutTests:

Add layout test coverage.

  • fast/events/initEvent-after-dispatch-expected.txt: Added.
  • fast/events/initEvent-after-dispatch.html: Added.
9:18 AM Changeset in webkit [204253] by commit-queue@webkit.org
  • 8 edits in trunk/Tools

run-webkit-tests should trigger a spindump when WebContent process is unresponsive
https://bugs.webkit.org/show_bug.cgi?id=159827

Patch by Jonathan Bedard <Jonathan Bedard> on 2016-08-08
Reviewed by Daniel Bates.

This change was spurred by a process hang which occurred between tests and did
not produce a meaningful crashlog.

  • Scripts/webkitpy/port/driver.py:

(Driver._check_for_driver_crash_or_unresponsiveness): Notify test controller when finished through stdin.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort):
(IOSSimulatorPort.sample_process): Attempt spindump, but use sample if spindump fails.

  • Scripts/webkitpy/port/mac.py:

(MacPort):
(MacPort.sample_process): Attempt spindump, but use sample if spindump fails.

  • Scripts/webkitpy/port/mac_unittest.py: Changed expected values to match spindump calls, added specific spindump test.
  • Scripts/webkitpy/port/driver_unittest.py: Added dummy write function.
  • WebKitTestRunner/TestController.h:

(WTR::TestController::usingServerMode): Added accessor for m_usingServerMode.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::dumpWebProcessUnresponsiveness): Wait for stdin before continuing when in server mode.

Aug 7, 2016:

11:05 PM Changeset in webkit [204252] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

Unreviewed. Fix GObject DOM bindings API break after r204236.

Text.replaceWholeText was removed from DOM API.

  • bindings/gobject/WebKitDOMDeprecated.cpp:

(webkit_dom_text_replace_whole_text):

  • bindings/gobject/WebKitDOMDeprecated.h:
  • bindings/gobject/WebKitDOMDeprecated.symbols:
10:54 PM Changeset in webkit [204251] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

Unreviewed. Fix GObject DOM bindings API break after r204113.

Document.defaultCharset was removed from DOM API.

  • bindings/gobject/WebKitDOMDeprecated.cpp:

(webkit_dom_document_get_default_charset):

  • bindings/gobject/WebKitDOMDeprecated.h:
  • bindings/gobject/WebKitDOMDeprecated.symbols:
10:40 PM Changeset in webkit [204250] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] Bad performance in accelerated compositing mode with the modesetting intel driver and DRI3 enabled
https://bugs.webkit.org/show_bug.cgi?id=160491

Reviewed by Michael Catanzaro.

This is becoming the default in several linux distributions and it makes WebKitGTK+ unusable in accelerated
compositing mode, which is now always enabled because since we switched to use the threaded compositor. The
problem seems to be an optimization of the intel driver for windows that are offscreen, and our redirected
window is always positioned at ScreenWidth + 1, 0. Using negative coordinates to position the redirected window
offscreen fixes the problem.
See also https://bugs.freedesktop.org/show_bug.cgi?id=85064.

  • WebProcess/WebPage/gtk/RedirectedXCompositeWindow.cpp:

(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Position the parent window at -1, -1.

10:38 PM Changeset in webkit [204249] by Carlos Garcia Campos
  • 9 edits
    2 moves in trunk/Source/WebKit2

Duplicated code in DrawingAreaProxyImpl and CoordinatedDrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=160506

Reviewed by Michael Catanzaro.

Same logic as in r202855 but in the UI process. CoordinatedDrawingAreaProxy is just a copy paste of
DrawingAreaProxyImpl with non-accelerated code path removed. There's actually nothing (or very little) specific
to coordinated graphics in the CoordinatedDrawingAreaProxy implementation. This patch renames
CoordinatedDrawingAreaProxy as AcceleratedDrawingAreaProxy and makes DrawingAreaProxyImpl inherit from it, so
that in case of accelerated compositing the parent class is used, and DrawingAreaProxyImpl only adds the non
accelerated code path.
To simplify the common API of AcceleratedDrawingAreaProxy, I have changed CoordinatedLayerTreeHostProxy to
receive a WebPageProxy in the constructor instead of a drawing area, since the drawing area was used just to get
the page proxy.

  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • UIProcess/AcceleratedDrawingAreaProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp.

(WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
(WebKit::AcceleratedDrawingAreaProxy::~AcceleratedDrawingAreaProxy):
(WebKit::AcceleratedDrawingAreaProxy::alwaysUseCompositing):
(WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
(WebKit::AcceleratedDrawingAreaProxy::sizeDidChange):
(WebKit::AcceleratedDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::AcceleratedDrawingAreaProxy::visibilityDidChange):
(WebKit::AcceleratedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint):
(WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::backingStoreStateDidChange):
(WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
(WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):

  • UIProcess/AcceleratedDrawingAreaProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h.

(WebKit::AcceleratedDrawingAreaProxy::isInAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy):

  • UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:

(WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::updateViewport):
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
(WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
(WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):

  • UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
  • UIProcess/CoordinatedGraphics/PageViewportController.cpp:

(WebKit::PageViewportController::syncVisibleContents):

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::paint):
(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): Deleted.
(WebKit::DrawingAreaProxyImpl::update): Deleted.
(WebKit::DrawingAreaProxyImpl::incorporateUpdate): Deleted.
(WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Deleted.
(WebKit::DrawingAreaProxyImpl::discardBackingStore): Deleted.

  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/efl/WebView.cpp:

(WebKit::WebView::setVisible):
(WebKit::WebView::coordinatedGraphicsScene):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::createDrawingAreaProxy):

7:48 PM Changeset in webkit [204248] by Yusuke Suzuki
  • 11 edits
    8 adds in trunk

[ES6] Module namespace object should not allow unset IC
https://bugs.webkit.org/show_bug.cgi?id=160553

Reviewed by Saam Barati.

JSTests:

  • modules/namespace-object-get-property.js: Added.

(import.as.ns.from.string_appeared_here.shouldThrow):

  • modules/namespace-object-has-property.js: Added.
  • modules/namespace-object-inline-caching.js: Added.

(import.as.A.from.string_appeared_here.import.as.B.from.string_appeared_here.lookup):
(shouldBe.lookup.lookup):
(shouldBe.lookup):

  • modules/namespace-object-inline-caching/a.js: Added.
  • modules/namespace-object-inline-caching/b.js: Added.
  • modules/namespace-object-try-get.js: Added.

(import.as.ns.from.string_appeared_here.tryGetByIdText):
(tryGetByIdTextStrict):

  • modules/namespace-object-typed-array-fast-path.js: Added.
  • test262.yaml:

Source/JavaScriptCore:

Previously, module namespace object accidentally allow "unset IC". But this "unsetness" does not rely on
the structure. We should disable inline caching onto the namespace object. Once it is needed, we should
create the special caching for namespace object like the following: it should be similar to monomorphic IC,
but it caches the object itself instead of the structure. It checks the object itself (And in DFG, it should be
CheckCell) and loads the value from the target module environment directly[1].

And this patch also set setIsTaintedByProxy for the module namespace object to notify to the caller that
this object has impure ::getOwnPropertySlot. Then this function is now renamed to setIsTaintedByOpaqueObject.

We drop the hack in JSModuleNamespaceObject::getOwnPropertySlot since we already introduced InternalMethodType
for ProxyObject. Previously we cannot distinguish ::HasProperty and ::GetOwnProperty. So not to throw any
errors for ::HasProperty case, we used slot.setCustom to delay the observable operation.
But, this hack lacks the support for hasOwnProperty: hasOwnProperty uses GetOwnProperty, so it should throw an error.
However the previous implementation does not throw an error since the delayed observable part (custom function part) is
skipped in hasOwnProperty implementation. We now remove this custom property hack and fix the corresponding failure
in test262.

[1]: https://bugs.webkit.org/show_bug.cgi?id=160590

  • jit/JITOperations.cpp:
  • runtime/ArrayPrototype.cpp:

(JSC::getProperty):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::getOwnPropertySlot):
(JSC::callbackGetter): Deleted.

  • runtime/JSModuleNamespaceObject.h:
  • runtime/PropertySlot.cpp:

(JSC::PropertySlot::getPureResult):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::PropertySlot):
(JSC::PropertySlot::setIsTaintedByOpaqueObject):
(JSC::PropertySlot::isTaintedByOpaqueObject):
(JSC::PropertySlot::setIsTaintedByProxy): Deleted.
(JSC::PropertySlot::isTaintedByProxy): Deleted.

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::getOwnPropertySlotCommon):

7:47 PM Changeset in webkit [204247] by Chris Dumez
  • 10 edits
    3 deletes in trunk

Node.baseURI should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=160649

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/interfaces-expected.txt:

Rebaseline now that one more check is passing.

  • web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:

Rebaseline now that the baseURI is "about:blank" instead of null. The check
is still failing. We are falling back to using the document's URL, as expected.
However, the document's URL should not be "about:blank" in this case, which is
why we are failing the previous check.

Source/WebCore:

Node.baseURI should not be nullable as per the latest DOM specification:

It is not nullable in Firefox. It is supposed to fallback to using the
document's URL. The document's URL is "about:blank" by default so
baseURI() now returns "about:blank" in the internal URL is null,
similarly to what we do for Document.URL (c.g. urlForBindings()).

No new tests, rebaselined existing test.

  • dom/Node.cpp:

(WebCore::Node::baseURI):

  • dom/Node.h:
  • dom/Node.idl:

LayoutTests:

Drop outdated DOM test.

  • dom/xhtml/level3/core/nodegetbaseuri02-expected.txt: Removed.
  • dom/xhtml/level3/core/nodegetbaseuri02.js: Removed.
  • dom/xhtml/level3/core/nodegetbaseuri02.xhtml: Removed.
6:33 PM Changeset in webkit [204246] by Chris Dumez
  • 22 edits in trunk

Drop SVGDocument as per the SVG2 specification
https://bugs.webkit.org/show_bug.cgi?id=160361

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:

Source/WebCore:

Drop SVGDocument as per the SVG2 specification:

SVGDocument has been merged into Document.

Chrome and Edge have dropped SVGDocument already, Firefox has not.

No new tests, rebaselined existing test.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::remoteSVGRootElement):

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::createNewDocumentWrapper): Deleted.

  • bindings/js/JSXMLDocumentCustom.cpp:

(WebCore::toJSNewlyCreated):
(WebCore::toJS): Deleted.

  • page/DOMWindow.idl:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollToAnchor):

  • svg/SVGDocument.cpp:

(WebCore::SVGDocument::rootElement):
(WebCore::SVGDocument::zoomAndPanEnabled):
(WebCore::SVGDocument::startPan):
(WebCore::SVGDocument::updatePan):

  • svg/SVGDocument.h:
  • svg/SVGDocument.idl:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::rootElement):

LayoutTests:

Update / rebaseline existing tests to reflect behavior change.

  • platform/mac/svg/custom/dynamic-svg-document-creation-expected.txt:
  • svg/custom/clone-node-expected.txt:
  • svg/custom/clone-node.html:
  • svg/custom/frame-getSVGDocument.html:
  • svg/custom/global-constructors-expected.txt:
  • svg/custom/manually-parsed-svg-allowed-in-dashboard-expected.txt:
  • svg/custom/script-tests/global-constructors.js:
1:50 PM Changeset in webkit [204245] by mitz@apple.com
  • 10 edits in trunk

[Cocoa] Reply block leaks if the remote object doesn’t call it
https://bugs.webkit.org/show_bug.cgi?id=160642

Reviewed by Sam Weinig.

Source/WebKit2:

  • Shared/API/Cocoa/RemoteObjectRegistry.h: Declared new member functions.
  • Shared/API/Cocoa/RemoteObjectRegistry.messages.in: Added ReleaseUnusedReplyBlock message.
  • Shared/API/Cocoa/RemoteObjectRegistry.mm:

(WebKit::RemoteObjectRegistry::sendUnusedReply): Send the ReleaseUnusedReplyBlock message.
(WebKit::RemoteObjectRegistry::releaseUnusedReplyBlock): Message receiver that call through

to -_releaseReplyWithID:.

  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:

(-[_WKRemoteObjectRegistry _invokeMethod:]): Define a ReplyBlockCallChecker object and

capture an instance of it in the reply block we pass to the exported object. Have that
block set a flag on the checker when it’s called. If the checker gets destroyed without
the block having been called, which means that the block got destroyed without being
called, call sendUnusedReply to let the other side know that the block will not be invoked.

(-[_WKRemoteObjectRegistry _releaseReplyWithID:]): Added. Removed the pending reply from the

map, which release the block.

  • Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.h: Declared a new method.
  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:

(TEST): Added a test case that checks that the reply block is released even when it’s not

called.

  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:

(-[RemoteObjectRegistryPlugIn doNotCallCompletionHandler:]): Implement new method by not

calling the completion handler.

12:40 PM Changeset in webkit [204244] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error
https://bugs.webkit.org/show_bug.cgi?id=160604
<rdar://problem/27723416>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/StyleDetailsPanel.js:

(WebInspector.StyleDetailsPanel.prototype.shown):
Only perform a layout if needed. Subclasses access node style
data during layout, which may not exist yet.

12:08 PM Changeset in webkit [204243] by Chris Dumez
  • 5 edits in trunk

Write API test to cover crash fix in r204135
https://bugs.webkit.org/show_bug.cgi?id=160587

Reviewed by Darin Adler.

Source/WebKit2:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::terminateProcess):
Stop calling resetStateAfterProcessExited() after calling
requestTermination() because requestTermination() now calls
didClose() which calls processDidCrash() which already calls
resetStateAfterProcessExited(). Because the processDidCrash()
delegates may start new loads, we really do not want to
reset the state again after calling the delegates.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::requestTermination):

  • Call didClose() in WebProcessProxy::requestTermination() so that the processDidCrash() delegates get called in API tests whenever a WebContent process is terminated to simulate a crash.
  • Stop calling shutDown() and webConnection()->didClose() because didClose() already does this for us.

Tools:

Add API test to cover crash fix in r204135. This reproduces the crash
by destroying a related WKWebView in the webViewWebContentProcessDidTerminate
callback.

  • TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:

(-[NavigationDelegate webViewWebContentProcessDidTerminate:]):
(TEST):

10:14 AM Changeset in webkit [204242] by Chris Dumez
  • 17 edits in trunk

Un-expose DOMSettableTokenList
https://bugs.webkit.org/show_bug.cgi?id=160643

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/dom/historical-expected.txt:

Source/WebCore:

Un-expose DOMSettableTokenList. We merged DOMSettableTokenList into
DOMTokenList a while back, as per the specification. At the time, we
kept DOMSettableTokenList on Window, as an alias to DOMTokenList.
However, Firefox and Chrome dropped DOMSettableTokenList completely.
We now do the same as other browsers.

No new tests, rebaselined existing test.

  • page/DOMWindow.idl:

LayoutTests:

Update / rebaseline existing tests.

  • fast/dom/HTMLLinkElement/sizes-setter-expected.txt:
  • fast/dom/HTMLLinkElement/sizes-setter.html:
  • fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
  • fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:
  • fast/frames/sandbox-attribute-expected.txt:
  • fast/frames/sandbox-attribute.html:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
10:05 AM Changeset in webkit [204241] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

DocumentRuleSets::collectFeatures() should shrink-to-fit.
<https://webkit.org/b/160646>

Reviewed by Darin Adler.

We forgot to shrink-wrap the RuleFeatureSet in DocumentRuleSets
after collecting the document-wide features.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::collectFeatures):

12:40 AM Changeset in webkit [204240] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest http/tests/fetch/fetch-in-worker-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=160510

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2016-08-07

Note: See TracTimeline for information about the timeline view.