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

Timeline



Nov 8, 2014:

10:32 PM Changeset in webkit [175789] by ap@apple.com
  • 2 edits in trunk/LayoutTests

http/tests/xmlhttprequest/cross-origin-cookie-storage.html fails with PPT.

This test used to pass because some previous test leaked a cookie. Now that we
clear cookies between tests, it fails, and will fail until we implement testRunner.setAlwaysAcceptCookies.

  • platform/mac-wk2/TestExpectations:
9:59 PM Changeset in webkit [175788] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Call faster HTMLElement::hasTagName() in HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=138529

Reviewed by Darin Adler.

Call faster HTMLElement::hasTagName() in HTMLCollection instead of
slower Node::hasTagName() by restructuring the code a bit to
distinguish collection that deal only with HTMLElements from others.

No new tests, no behavior change.

  • html/HTMLCollection.cpp:

(WebCore::isMatchingHTMLElement):
(WebCore::isMatchingElement):

9:46 PM Changeset in webkit [175787] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=138538

Reviewed by Darin Adler.

Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
as this only makes sense for text field input types.

No new tests, no behavior change.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isEmptyValue):

  • html/InputType.cpp:

(WebCore::InputType::isEmptyValue):

  • html/InputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isEmptyValue):

  • html/TextFieldInputType.h:
7:21 PM Changeset in webkit [175786] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

Fix Ember.js warnings the new perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=138531

Reviewed by Darin Adler.

Fixed various warnings.

  • public/v2/app.js:

(App.InteractiveChartComponent._relayoutDataAndAxes): We can't use "rem". Use this._rem as done for x.

  • public/v2/data.js:

(PrivilegedAPI._post): Removed the superfluous console.log.
(CommitLogs.fetchForTimeRange): Ditto.

  • public/v2/index.html: Added tbody as required by the HTML specification.
7:18 PM Changeset in webkit [175785] by ap@apple.com
  • 2 edits in trunk/LayoutTests

http/tests/navigation/redirect-on-back-updates-history-item.html leaks a cookie
https://bugs.webkit.org/show_bug.cgi?id=138507

Reviewed by Pratik Solanki.

  • http/tests/navigation/resources/redirect-updates-history-item-done.html:
7:17 PM Changeset in webkit [175784] by commit-queue@webkit.org
  • 17 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: decouple child element folderization logic from FrameTreeElement
https://bugs.webkit.org/show_bug.cgi?id=138364

Patch by Matt Baker <Matt Baker> on 2014-11-08
Reviewed by Timothy Hatcher.

Created FolderizedTreeElement base class, which FrameTreeElement now inherits via SourceCodeTreeElement.
FolderizedTreeElement uses settings provided by derived classes for labeling subfolders and to determine
folder membership for child items.

  • UserInterface/Base/Main.js:

(WebInspector.canArchiveMainFrame):

  • UserInterface/Main.html:
  • UserInterface/Models/LayoutTimelineRecord.js:

(WebInspector.LayoutTimelineRecord.displayNameForEventType):
(WebInspector.LayoutTimelineRecord.EventType.displayName): Deleted.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource):
(WebInspector.Resource.typeFromMIMEType):
(WebInspector.Resource.displayNameForType):
(WebInspector.Resource.prototype.get syntheticMIMEType):
(WebInspector.Resource.prototype.updateForResponse):
(WebInspector.Resource.Type.fromMIMEType): Deleted.
(WebInspector.Resource.Type.displayName): Deleted.

  • UserInterface/Models/SourceMapResource.js:

(WebInspector.SourceMapResource):

  • UserInterface/Views/FolderizedTreeElement.js: Added.

(WebInspector.FolderizedTreeElement):
(WebInspector.FolderizedTreeElement.prototype.get groupedIntoFolders):
(WebInspector.FolderizedTreeElement.prototype.set folderSettingsKey):
(WebInspector.FolderizedTreeElement.prototype.registerFolderizeSettings):
(WebInspector.FolderizedTreeElement.prototype.set removeChildren):
(WebInspector.FolderizedTreeElement.prototype.addChildForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype.addRepresentedObjectToNewChildQueue):
(WebInspector.FolderizedTreeElement.prototype.removeChildForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype.compareChildTreeElements):
(WebInspector.FolderizedTreeElement.prototype.updateParentStatus):
(WebInspector.FolderizedTreeElement.prototype._clearNewChildQueue):
(WebInspector.FolderizedTreeElement.prototype._populateFromNewChildQueue):
(WebInspector.FolderizedTreeElement.prototype._removeRepresentedObjectFromNewChildQueue):
(WebInspector.FolderizedTreeElement.prototype._addTreeElement):
(WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
(WebInspector.FolderizedTreeElement.prototype._insertFolderTreeElement):
(WebInspector.FolderizedTreeElement.prototype._insertChildTreeElement):
(WebInspector.FolderizedTreeElement.prototype._removeTreeElement):
(WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange):
(WebInspector.FolderizedTreeElement.prototype._settingsForRepresentedObject):
(WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders.pushCategory):
(WebInspector.FolderizedTreeElement.prototype._shouldGroupIntoFolders):

  • UserInterface/Views/FrameTreeElement.js:

(.this):
(WebInspector.FrameTreeElement.prototype.updateSourceMapResources):
(WebInspector.FrameTreeElement.prototype.onattach):
(WebInspector.FrameTreeElement.prototype.ondetach):
(WebInspector.FrameTreeElement.prototype.compareChildTreeElements):
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange):
(WebInspector.FrameTreeElement.prototype._resourceWasAdded):
(WebInspector.FrameTreeElement.prototype._resourceWasRemoved):
(WebInspector.FrameTreeElement.prototype._childFrameWasAdded):
(WebInspector.FrameTreeElement.prototype._childFrameWasRemoved):
(WebInspector.FrameTreeElement.prototype._childContentFlowWasAdded):
(WebInspector.FrameTreeElement.prototype._childContentFlowWasRemoved):
(WebInspector.FrameTreeElement.prototype._rootDOMNodeInvalidated):
(WebInspector.FrameTreeElement): Deleted.
(WebInspector.FrameTreeElement.prototype.removeChildren): Deleted.
(WebInspector.FrameTreeElement.prototype._updateParentStatus): Deleted.
(WebInspector.FrameTreeElement.prototype._addRepresentedObjectToNewChildQueue): Deleted.
(WebInspector.FrameTreeElement.prototype._removeRepresentedObjectFromNewChildQueue): Deleted.
(WebInspector.FrameTreeElement.prototype._populateFromNewChildQueue): Deleted.
(WebInspector.FrameTreeElement.prototype._clearNewChildQueue): Deleted.
(WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject): Deleted.
(WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject): Deleted.
(WebInspector.FrameTreeElement.prototype._addTreeElementForRepresentedObject): Deleted.
(WebInspector.FrameTreeElement.prototype._addTreeElement): Deleted.
(WebInspector.FrameTreeElement.prototype._compareTreeElementsByMainTitle): Deleted.
(WebInspector.FrameTreeElement.prototype._insertFolderTreeElement): Deleted.
(WebInspector.FrameTreeElement.prototype._compareResourceTreeElements): Deleted.
(WebInspector.FrameTreeElement.prototype._insertResourceTreeElement): Deleted.
(WebInspector.FrameTreeElement.prototype._removeTreeElement): Deleted.
(WebInspector.FrameTreeElement.prototype._folderNameForResourceType): Deleted.
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject.createFolderTreeElement): Deleted.
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject): Deleted.
(WebInspector.FrameTreeElement.prototype._folderTreeElementExpandedStateChange): Deleted.
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders.pushResourceType): Deleted.
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders.pushCategory): Deleted.
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders): Deleted.

  • UserInterface/Views/LayoutTimelineDataGridNode.js:

(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):

  • UserInterface/Views/LayoutTimelineView.js:

(WebInspector.LayoutTimelineView): Deleted.

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView): Deleted.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshResourceType):

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):

  • UserInterface/Views/SourceCodeTreeElement.js:

(WebInspector.SourceCodeTreeElement):

  • UserInterface/Views/TimelineDataGrid.js:

(WebInspector.TimelineDataGrid.createColumnScopeBar):

  • UserInterface/Views/TimelineRecordTreeElement.js:

(WebInspector.TimelineRecordTreeElement):

  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
7:17 PM Changeset in webkit [175783] by ap@apple.com
  • 7 edits in trunk

Delete cookies between tests
https://bugs.webkit.org/show_bug.cgi?id=138528

Reviewed by Sam Weinig.

Source/WebKit/mac:

  • WebView/WebPreferences.mm: (+[WebPreferences _clearNetworkLoaderSession]):
  • WebView/WebPreferencesPrivate.h:

Added an SPI for DumpRenderTree.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
Do it.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):
Added a FIXME.

5:01 PM Changeset in webkit [175782] by Darin Adler
  • 21 edits
    2 deletes in trunk/Source

Replace FileThread class with a single function
https://bugs.webkit.org/show_bug.cgi?id=138282

Reviewed by Alexey Proskuryakov.

Source/WebCore:

  • CMakeLists.txt: Removed FileThread.cpp.
  • WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h.
  • WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes.
  • dom/ActiveDOMObject.cpp: Ditto.
  • fileapi/AsyncFileStream.cpp:

(WebCore::callOnFileThread): Added. Implements the file thread.
(WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client.
Make m_internals. Use the destroyed flag instead of trickier techniques to
handle stopping. Once the stream is destroyed, there will be no further callbacks.
(WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the
stop behavior here. This class no longer requires an explicit stop function.
(WebCore::AsyncFileStream::perform): Added. Helper used for all the operations
below. Takes a function that performs an operation and then returns a client
callback function. Respects the m_stopped boolean on the file thread (so we
don't do extra operations) and on the client thread (so we are guaranteed not
to get any client callbacks even if the file thread was partway through an
operation).
(WebCore::AsyncFileStream::getSize): Changed to use the perform function.
(WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count
thread safety issue by capturing a StringCapture rather than a String.
(WebCore::AsyncFileStream::openForWrite): Ditto.
(WebCore::AsyncFileStream::close): Changed to use callOnFileThread.
(WebCore::AsyncFileStream::read): Changed to use the perform function.
(WebCore::AsyncFileStream::write): Ditto. Also fixed reference count
thread safety issue by capturing a StringCapture rather than a URL.
(WebCore::AsyncFileStream::truncate): Ditto.

  • fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need

single ownership. Removed the stop function, since we can now stop when
the stream is destroyed since we have single ownership. Made a new Internals
object to handle destruction while operations are still going on the file thread.

  • fileapi/FileThread.cpp: Removed.
  • fileapi/FileThread.h: Removed.
  • loader/ResourceLoader.cpp: Removed unneeded include.
  • platform/FileStream.cpp:

(WebCore::FileStream::~FileStream): Merged the stop function in here.

  • platform/FileStream.h: Removed use of RefCounted since we only need

single ownership. Removed the empty start function. Removed the stop function,
since we can now stop when the stream is destroyed since we have single ownership.

  • platform/FileStreamClient.h: Removed unneeded didStart and didStop.
  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the
stream objects instead of custom create functions.
(WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code
to call stop functions. Destroying the objects now takes care of the this, and
that's done by the unique_ptrs.
(WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the
m_asyncStream, keeping only the code that sets it to null. That now stops the
stream by destroying it.

  • platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than

RefPtr for the file stream objects.

  • storage/StorageThread.h: Tweaked formatting of std::function<void()> to

match the format used elsewhere in WebKit.

Source/WebKit:

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Removed exports of obsolete threading functions.

Source/WTF:

  • wtf/MessageQueue.h: Made queue work on any type and not require wrapping

everything in a unique_ptr.

  • wtf/Threading.cpp:

(WTF::threadEntryPoint): Changed to use a std::function instead of a function pointer.
(WTF::createThread): Add a version that takes a std::function. Reimplemented the
old version using lambdas. Removed the obsolete versions that were there just to support
binary compatibility with very old versions of Safari.

  • wtf/Threading.h: Removed an incorrect license header that covers code that was long ago

moved to a different file. Changed createThread to take a std::function instead of a function
pointer and data pointer. Moved internal functions after public functions.

3:50 PM Changeset in webkit [175781] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush
https://bugs.webkit.org/show_bug.cgi?id=138532

Reviewed by Dan Bernstein.

When changing masks on replica layers with certain layer configurations,
it was possible to hit an assertion that a flush was being scheduled when already
flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush
flag along.

Not testable with current GraphicsLayer configurations.

  • platform/graphics/ca/GraphicsLayerCA.cpp:
  • platform/graphics/ca/GraphicsLayerCA.h:
12:27 PM Changeset in webkit [175780] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

WKActionMenuController methods should be more careful to use the best
WebHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=138536
-and corresponding-
rdar://problem/18919195

Reviewed by Tim Horton.

This patch re-names _hitTestResultForStage to _webHitTestResult. The method no
longer takes a stage since that value is really not necessary to determine the
correct WebHitTestResult. This patch also makes all spots in this file that access
a WebHitTestResult go through _webHitTestResult to ensure that they get the most
up-to-date option.

  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _copyVideoURL:]):
(-[WKActionMenuController _saveVideoToDownloads:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(-[WKActionMenuController _defaultMenuItems]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]):
(imageForResource:name::switch): Deleted.
(-[WKActionMenuController _defaultMenuItems:]): Deleted.

11:07 AM Changeset in webkit [175779] by Beth Dakin
  • 11 edits in trunk/Source

Implement action menu support for videos
https://bugs.webkit.org/show_bug.cgi?id=138534
-and corresponding-
rdar://problem/18742164

Reviewed by Tim Horton.

Source/WebCore:

Export needed symbols and added not-yet-implemented
HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as
expected once it is implemented.

  • WebCore.exp.in:
  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::isMediaThatCanBeDownloaded):

  • rendering/HitTestResult.h:

Source/WebKit2:

New menu type and items types.

  • Shared/API/c/WKActionMenuItemTypes.h:
  • Shared/API/c/WKActionMenuTypes.h:

Plumb isMediaThatCanBeDownloaded() up to WebHitTestResult.

  • Shared/WebHitTestResult.cpp:

(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):

  • Shared/WebHitTestResult.h:

(WebKit::WebHitTestResult::isMediaThatCanBeDownloaded):

Re-name _canAddImageToPhotos to _canAddMediaToPhotos, which is more accurate. We
might use this method for videos some day, so now it has an accurate name.

  • UIProcess/mac/WKActionMenuController.mm:

Default items and their actions.
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _copyVideoURL:]):
(-[WKActionMenuController _saveVideoToDownloads:]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _canAddMediaToPhotos]):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _defaultMenuItems:]):
(-[WKActionMenuController _canAddImageToPhotos]): Deleted.

We hit test including shadow content to get the desired result for editable text
regions. But for media, we want to re-set to the shadow root.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performActionMenuHitTestAtLocation):

10:07 AM Changeset in webkit [175778] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Speed up HTMLInputElement::isEmptyValue()
https://bugs.webkit.org/show_bug.cgi?id=138515

Reviewed by Geoffrey Garen.

HTMLInputElement::isEmptyValue() was calling
HTMLTextFormControlElement::innerTextValue() which causes a full
subtree traversal to construct a string representation of that subtree
using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(),
we don't have to do all this: We don't need to construct a String
and we can return false as soon as we find a non-empty descendant.

No new tests, no behavior change.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isEmptyValue):

  • html/HTMLInputElement.h:
9:17 AM Changeset in webkit [175777] by eric.carlson@apple.com
  • 9 edits in trunk/Source/WebCore

[iOS] video is sometimes allowed to play from the background
https://bugs.webkit.org/show_bug.cgi?id=138522

Reviewed by Jer Noble.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::displayType): New.

  • html/HTMLMediaElement.h:
  • platform/audio/MediaSession.cpp:

(WebCore::MediaSession::isHidden): New, client passthrough.
(WebCore::MediaSession::displayType): Ditto.

  • platform/audio/MediaSession.h:

(WebCore::MediaSessionClient::displayType):

  • platform/audio/MediaSessionManager.cpp:

(WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns

true if client is visible or playing.

  • platform/audio/MediaSessionManager.h:
  • platform/audio/ios/MediaSessionManagerIOS.h:
  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering

when displaying optimized fullscreen.

2:53 AM Changeset in webkit [175776] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] Run layout tests using the network process
https://bugs.webkit.org/show_bug.cgi?id=138428

Reviewed by Martin Robinson.

Shared secondary process is the default in the GTK+ port, but we
should run the tests using the network process to ensure
everything works with the network process. In the future, the
shared secondary process model might be a special case of multiple
processes with 1 as maximum number of processes, but always using
the network process.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):

2:50 AM Changeset in webkit [175775] by Carlos Garcia Campos
  • 6 edits in trunk

[GTK] Allow to create a view with a related page in WTR
https://bugs.webkit.org/show_bug.cgi?id=138501

Reviewed by Martin Robinson.

Source/WebKit2:

This is needed when running tests in multi web process mode.

  • UIProcess/API/C/gtk/WKView.cpp:

(WKViewCreate):

  • UIProcess/API/C/gtk/WKView.h:

Tools:

  • TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:

(TestWebKitAPI::PlatformWebView::PlatformWebView): Pass nullptr as
related page to WKViewCreate.

  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:

(WTR::PlatformWebView::PlatformWebView): Pass the given related
page to WKViewCreate.

2:47 AM Changeset in webkit [175774] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

WTR crashes after running a test when NetworkProcess enabled
https://bugs.webkit.org/show_bug.cgi?id=138500

Reviewed by Alexey Proskuryakov.

WebNotificationProvider destructor is calling
WKNotificationManagerSetProvider, but m_notificationManager is
null because removeNotificationManager was already called.

  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::~WebNotificationProvider): Check
m_notificationManager is not null before calling WKNotificationManagerSetProvider.

Nov 7, 2014:

8:25 PM Changeset in webkit [175773] by benjamin@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix the build after r175772

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-07

  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):

6:05 PM Changeset in webkit [175772] by benjamin@webkit.org
  • 14 edits in trunk/Source/WebCore

Make the Selector's specificity part of Selector matching
https://bugs.webkit.org/show_bug.cgi?id=138486

Reviewed by Andreas Kling.

In CSS Selectors Level 4, the specificity of selectors is computed dynamically
based on which element is being matched.

For example, a selector:

:matches(#foo, .bar, baz)

has a specificity of

(1, 0, 0) on <baz id=foo class=bar>
(0, 1, 0) on <baz class=bar>
(0, 0, 1) on <baz>

Previously, the specificity of each selector was computed statically when populating
RuleSet. With more recent CSS, this gives us the wrong specificity because we do not know
how the selectors applies to the target.

This patch moves one tiny step in the direction of dynamic specificity. The specificity
is removed from RuleSet and is moved inside Selector Matching.

There is one bit worth keeping static: matching based on rule hash. This path is important
to avoid spending time compiling trivial selectors.
In order to keep rule hash matching working, the RuleData store which specificity class
the rule has in addition to the information about matching/not-matching. When going through
the fast path in ElementCollector, we compute the right specificity based on the type
of rule-hash matching.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::specificityForOneSelector):

  • css/CSSSelector.h:
  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::compareRules):

  • css/ElementRuleCollector.h:
  • css/RuleSet.cpp:

(WebCore::computeMatchBasedOnRuleHash):
(WebCore::RuleData::RuleData):
(WebCore::isSelectorMatchingHTMLBasedOnRuleHash): Deleted.

  • css/RuleSet.h:

(WebCore::RuleData::matchBasedOnRuleHash):
(WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash): Deleted.
(WebCore::RuleData::specificity): Deleted.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::match):

  • css/SelectorChecker.h:
  • css/StyleResolver.h:

(WebCore::checkRegionSelector):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

  • cssjit/SelectorCompiler.h:

(WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::simpleSelectorCheckerFunction): Deleted.
(WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext): Deleted.

  • dom/SelectorQuery.cpp:

(WebCore::SelectorDataList::selectorMatches):
(WebCore::SelectorDataList::selectorClosest):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
(WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):

  • dom/SelectorQuery.h:
4:40 PM Changeset in webkit [175771] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

CSP is enforced for eval in report-only mode on first page load
https://bugs.webkit.org/show_bug.cgi?id=138492
rdar://problem/15782525

Reviewed by Daniel Bates.

This is covered by existing tests when running as one test per process invocation.

  • page/ContentSecurityPolicy.cpp:

(WebCore::CSPDirectiveList::allowEval): Allow when in report only mode. The allowEval
function itself needs to return false, because it's used in checkEvalAndReportViolation().
(WebCore::CSPDirectiveList::allowJavaScriptURLs): Apply the same fix, although it's
not changing the behavior - this function is never called with ContentSecurityPolicy::SuppressReport.
(WebCore::CSPDirectiveList::allowInlineEventHandlers): Ditto.
(WebCore::CSPDirectiveList::allowInlineScript): Ditto.
(WebCore::CSPDirectiveList::allowInlineStyle): Ditto.
(WebCore::CSPDirectiveList::allowPluginType): Ditto.
(WebCore::CSPDirectiveList::allowScriptFromSource): Ditto.
(WebCore::CSPDirectiveList::allowObjectFromSource): Ditto.
(WebCore::CSPDirectiveList::allowChildFrameFromSource): Ditto.
(WebCore::CSPDirectiveList::allowImageFromSource): Ditto.
(WebCore::CSPDirectiveList::allowStyleFromSource): Ditto.
(WebCore::CSPDirectiveList::allowFontFromSource): Ditto.
(WebCore::CSPDirectiveList::allowMediaFromSource): Ditto.
(WebCore::CSPDirectiveList::allowConnectToSource): Ditto.
(WebCore::CSPDirectiveList::allowFormAction): Ditto.
(WebCore::CSPDirectiveList::allowBaseURI): Ditto.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Remove isReportOnly() check,
which is now inside allowEval().

4:06 PM Changeset in webkit [175770] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

"Lookup" action menu should read "Look up"
https://bugs.webkit.org/show_bug.cgi?id=138509

Patch by Conrad Shultz <Conrad Shultz> on 2014-11-07
Reviewed by Tim Horton.

  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController _createActionMenuItemForTag:]):

3:51 PM Changeset in webkit [175769] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Fix typos in r175768.

  • public/v2/app.js:

(App.AnalysisTaskViewModel.roots):

3:47 PM Changeset in webkit [175768] by rniwa@webkit.org
  • 11 edits
    4 adds in trunk/Websites/perf.webkit.org

Introduce the concept of analysis task to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=138517

Reviewed by Andreas Kling.

Introduced the concept of an analysis task, which is created for a range of measurements for a given metric on
a single platform and used to bisect regressions in the range.

Added a new page to see the list of active analysis tasks and a page to view the contents of an analysis task.

  • init-database.sql: Added a bunch of tables to store information about analysis tasks.

analysis_tasks - Represents each analysis task. Associated with a platform and a metric and possibly with two
test runs. Analysis tasks not associated with test runs are used for try new patches.
analysis_test_groups - A test group in an analysis task represents a bunch of related A/B testing results.
root_sets - A root set represents a set of roots (or packages) installed in each A/B testing.
build_requests - A build request represents a single pending build for A/B testing.

  • public/api/analysis-tasks.php: Added. Returns the specified analysis task or all analysis tasks in an array.

(main):
(format_task):

  • public/api/test-groups.php: Added. Returns analysis task groups for the specified analysis task or returns

the specified analysis task group as well as build requests associated with them.
(main):
(fetch_test_groups_for_task):
(fetch_build_requests_for_task):
(fetch_build_requests_for_group):
(format_test_group):
(format_build_request):

  • public/include/json-header.php:

(remote_user_name): Extracted from compute_token so that we can use it in create-analysis-task.php.
(compute_token):

  • public/privileged-api/associate-bug.php:

(main): Fixed a typo.

  • public/privileged-api/create-analysis-task.php: Added. Creates a new analysis task for a given test run range.

(main):
(ensure_row_by_id):
(ensure_config_from_runs):

  • public/privileged-api/generate-csrf-token.php: Use remote_user_name.
  • public/v2/analysis.js: Added. Various Ember data store models to represent analysis tasks and related objects.

(App.AnalysisTask):
(App.AnalysisTask.create):
(App.TestGroup):
(App.TestGroupAdapter):
(App.AnalysisTaskSerializer):
(App.TestGroupSerializer):
(App.BuildRequest):

  • public/v2/app.css: Added style rules for the analysis page.
  • public/v2/app.js:

(App.Pane._fetch): Use fetchRunsWithPlatformAndMetric, which has been refactored into App.Manifest.

(App.PaneController.actions.toggleBugsPane): Show bugs pane even when there are no bug trackers or there is not
exactly one selected point as we can still create an analysis task.
(App.PaneController.actions.associateBug): Renamed singlySelectedPoint to selectedSinglePoint to be more
grammatical and also alert'ed the error message when there is one.
(App.PaneController.actions.createAnalysisTask): Added. Creates a new analysis task and opens it in a new tab.
Since window.open only works during the click, we open the new "window" preemptively and navigates or closes it
once XHR request has completed.
(App.PaneController._detailsChanged): Changes due to singlySelectedPoint to selectedSinglePoint rename.
(App.PaneController._updateBugs): Fixed a bug that we were showing bugs in the previous point when a single point
is selected in the details pane.

(App.AnalysisRoute): Added.
(App.AnalysisTaskRoute): Added.
(App.AnalysisTaskViewModel): Added.
(App.AnalysisTaskViewModel._taskUpdated): Fetch runs for the associated platform and metric.
(App.AnalysisTaskViewModel._fetchedRuns): Setup the chart data to show.
(App.AnalysisTaskViewModel.testSets): The computed property used to update roots for all repositories/projects.
(App.AnalysisTaskViewModel._rootChangedForTestSet): Updates root selections for all repositories/projects when
the user selects an option for all roots in A or B configuration.
(App.AnalysisTaskViewModel.roots): The computed property used to show root choices for each repository/project.

  • public/v2/chart-pane.css: Added style rules for details view in the analysis task page.
  • public/v2/data.js:

(Measurement.prototype._formatRevisionRange): Don't prefix a revision number with "At " when there is no previous
point so that we can use it in App.AnalysisTaskViewModel.roots.
(TimeSeries.prototype.findPointByMeasurementId): Added.
(TimeSeries.prototype.seriesBetweenPoints): Added.

  • public/v2/index.html: Use Metric.fullName since the same value is needed in the analysis task page. Also added

a button to create an analysis task, and made bugs pane button always enabled since we can an analysis task even
when multiple points are selected. Finally, added a new template for the analysis task page.

  • public/v2/manifest.js:

(App.Metric.fullName): Added to share code between the charts page and the analysis task page.
(App.Manifest.fetchRunsWithPlatformAndMetric): Extracted from App.Pane._fetch to be reused in
App.AnalysisTaskViewModel._taskUpdated.

3:37 PM Changeset in webkit [175767] by Joseph Pecoraro
  • 16 edits
    3 moves in trunk/Source/WebInspectorUI

Web Inspector: Layer summary should be bottom sticky
https://bugs.webkit.org/show_bug.cgi?id=138518

Reviewed by Timothy Hatcher.

Previously only NavigationSidebars had a content view. Now, give all
Sidebars a contentElement section for content.

Update all Details Sidebars to append content to the contentElement
instead of directly to the element. Only two Details sidebars append
to the element:

  • CSSStyleDetailsSidebarPanel for the navigation bar at the top
  • LayerTreeDetailsSidebarPanel for the summary view at the bottom

Take this opportunity to fix up some naming and styles as well.

  • UserInterface/Views/SidebarPanel.js:

(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.get contentElement):
Give every SidebarPanel a content element.

  • UserInterface/Views/DetailsSidebarPanel.css: Removed.

(.sidebar > .panel > .content):

  • UserInterface/Views/SidebarPanel.css: Added.

(.sidebar > .panel > .content):
And give that content element a default style.

  • UserInterface/Views/NavigationSidebarPanel.css:

(.sidebar > .panel.navigation > .content):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype.get contentElement): Deleted.
Navigation sidebar panels now use the parent's contentElement.
Also, carry over their default styles, overriding the base.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js: Renamed from Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.js.

(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildBottomBar):
Rename LayerTreeSidebarPanel to make it clear this is a DetailsSidebarPanel.
Add the "bottom bar" to the root element, and sections to the contentElement.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/LayerTreeSidebarPanel.css.

(.sidebar > .layer-tree.panel > .content):
(body.mac-platform.legacy .sidebar > .layer-tree.panel > .content):
Style the bottom bar to pin it to the bottom of the sidebar panel.

(WebInspector.CSSStyleDetailsSidebarPanel):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
(WebInspector.CSSStyleDetailsSidebarPanel.prototype._navigationItemSelected):
Add the navigation bar to the root element, and sections to the contentElement.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):

  • UserInterface/Main.html:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

Update for new names.

  • UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:

(WebInspector.ApplicationCacheDetailsSidebarPanel):

  • UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
  • UserInterface/Views/DOMDetailsSidebarPanel.js:

(WebInspector.DOMDetailsSidebarPanel):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel):

  • UserInterface/Views/DetailsSidebarPanel.js:

(WebInspector.DetailsSidebarPanel):

  • UserInterface/Views/ProbeDetailsSidebarPanel.js:
  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.delayedWork):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
All details sidebar panels now use the contentElement instead of element for content.

3:36 PM Changeset in webkit [175766] by Dániel Bátyai
  • 3 edits in trunk/Source/JavaScriptCore

Fix an alignment issue with operationPushCatchScope on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=138510

Reviewed by Csaba Osztrogonác.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/JITInlines.h:

(JSC::JIT::callOperation):

3:10 PM Changeset in webkit [175765] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

[Mac] Avoid repainting scrollbar track when the scrollbar track is transparent.
<https://webkit.org/b/138521>
<rdar://problem/18892090>

Reviewed by Simon Fraser.

Don't bother invalidating the entire WebCore scrollbar when we've opted into
AppKit's special mode to use individual layers for scrollbar components.
NSScrollerImp will invalidate what's necessary below e.g setKnobAlpha.

  • platform/mac/ScrollAnimatorMac.mm:

(-[WebScrollbarPartAnimation setCurrentProgress:]):

2:14 PM Changeset in webkit [175764] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Rename HTMLInputElement::imageLoader() to ensureImageLoader()
https://bugs.webkit.org/show_bug.cgi?id=138508

Reviewed by Andreas Kling.

Rename HTMLInputElement::imageLoader() to ensureImageLoader() and have
it return a reference to make it clear that it constructs an
ImageLoader if missing.
Also introduce a lightweight imageLoader() getter which just returns
the imageLoader or null if missing.

No new tests, no behavior change.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::ensureImageLoader):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::imageLoader): Deleted.

  • html/HTMLInputElement.h:

(WebCore::HTMLInputElement::imageLoader):
(WebCore::HTMLInputElement::hasImageLoader): Deleted.

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::srcAttributeChanged):
(WebCore::ImageInputType::attach):
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):

2:01 PM Changeset in webkit [175763] by timothy@apple.com
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Cursor and scroll view jumps around when modifying styles
https://bugs.webkit.org/show_bug.cgi?id=137467

This merges commit e2962a5b0df56c8ee5a4482899d308decf3d7677 from CodeMirror.

Reviewed by Joseph Pecoraro.

  • UserInterface/External/CodeMirror/codemirror.js:

(maybeScrollWindow): Signal the scrollCursorIntoView event.
(signalDOMEvent): Support string events by transforming them to event objects.

  • UserInterface/Views/CodeMirrorAdditions.js:

(scrollCursorIntoView): Added. Default event listener that provides our own
implementation using WebKit's scrollIntoViewIfNeeded.

  • UserInterface/Views/RulesStyleDetailsPanel.js:

(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Stop doing an
extra scrollIntoViewIfNeeded call, CodeMirror does this.

1:58 PM Changeset in webkit [175762] by msaboff@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

Update scope related slow path code to use scope register added to opcodes
https://bugs.webkit.org/show_bug.cgi?id=138254

Reviewed by Mark Lam.

Updated slow paths for op_pop_scope, op_push_name_scope and op_push_with_scope.
Added scope register index parameter to the front of the relevant argument lists of the
slow functions. In the case of op_push_name_scope for x86 (32 bit), there aren't enough
registers to accomodate all the parameters. Therefore, added two new JSVALUE32_64 slow
paths called operationPushCatchScope() and operationPushFunctionNameScope() to eliminate
the last "type" argument.

  • assembler/MacroAssemblerCodeRef.h:

(JSC::FunctionPtr::FunctionPtr): Added a new template to take 6 arguments.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::setupArgumentsWithExecState):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::callOperation):
New variants of setupArgumentsWithExecState() and callOperation() to handle the new
combinations of argument types and counts.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
Use the new slow paths.

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

Updates to set the scope result using the scope register index. Added operationPushCatchScope()
and operationPushFunctionNameScope().

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Updated the scope slow paths to use the scope register index in the instruction to read and
write the register instead of using CallFrame::scope() and CallFrame::setScope().

1:29 PM Changeset in webkit [175761] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Null deref performing Lookup on Apple Trailers full screen button
https://bugs.webkit.org/show_bug.cgi?id=138513
-and corresponding-
rdar://problem/18909699

Reviewed by Tim Horton.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performDictionaryLookupForSelection):

1:21 PM Changeset in webkit [175760] by Chris Dumez
  • 5 edits
    2 adds in trunk

Move 'webkit-clip-path' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138452

Reviewed by Andreas Kling.

Source/WebCore:

Move 'webkit-clip-path' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder so that it is now generated from CSSPropertyNames.in.

A ClipPath converter was added to support this. Custom code was avoided
by replacing if checks by assertions, relying on the CSSParser to make
sure the input is valid.

Test: fast/masking/clip-path-bad-value.html

  • css/CSSPropertyNames.in:
  • css/DeprecatedStyleBuilder.cpp:

(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClipPath::setValue): Deleted.
(WebCore::ApplyPropertyClipPath::applyValue): Deleted.
(WebCore::ApplyPropertyClipPath::createHandler): Deleted.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertClipPath):

LayoutTests:

Add layout test to make sure we don't crash in the StyleBuilder when
setting unexpected values to webkit-clip-path property.

  • fast/masking/clip-path-bad-value-expected.txt: Added.
  • fast/masking/clip-path-bad-value.html: Added.
12:35 PM Changeset in webkit [175759] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

Make it possible to associate snapshots with back/forward list items other than the current item.
https://bugs.webkit.org/show_bug.cgi?id=138490

Patch by Anshu Chimala <anshu@apple.com> on 2014-11-07
Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKViewPrivate.h:

Declare -saveBackForwardSnapshotForItem:, an alternative to -saveBackForwardSnapshotForCurrentItem that accepts a
back/forward list item as an argument.

  • UIProcess/API/mac/WKView.mm:

(-[WKView saveBackForwardSnapshotForItem:]):
Pass the provided back/forward list item along to WebPageProxy::recordNavigationSnapshot().

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::recordNavigationSnapshot):
Overloaded to optionally take a back/forward list item as an argument. If one isn't provided, default to the current item
as before; otherwise, associate the snapshot with whichever item was provided.

  • UIProcess/WebPageProxy.h:

Declare the new recordNavigationSnapshot() overload.

  • UIProcess/mac/ViewSnapshotStore.h:

Make recordSnapshot() take a back/forward list item as an argument.

  • UIProcess/mac/ViewSnapshotStore.mm:

(WebKit::ViewSnapshotStore::recordSnapshot):
Store the snapshot in the provided back/forward list item instead of in the current item.

12:29 PM Changeset in webkit [175758] by Joseph Pecoraro
  • 5 edits
    2 adds in trunk

Web Inspector: Pseudo element matchedCSSRules do not include matching selector info
https://bugs.webkit.org/show_bug.cgi?id=138438

Reviewed by Benjamin Poulain.

Source/WebCore:

Test: inspector/css/psuedo-element-matches.html

Element::matches is not the correct API to use to check selectors with pseudo-elements.
Instead we should use the CSS Selector checking machinary which understands them.

  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForRegions):
(WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
Some RefPtr release improvements.

(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
Use a SelectorChecker to check each Selector against the element.
This matches the SelectorChecker used when we collected the rules
for this element.

Source/WebInspectorUI:

  • UserInterface/Base/Test.js:

(WebInspector.loaded):
Include a global setting for shadow dom used by DOM model classes.
Give it a "test" specific name to not override non-test setting values.

LayoutTests:

  • inspector/css/pseudo-element-matches-expected.txt: Added.
  • inspector/css/pseudo-element-matches.html: Added.

Add a test to ensure we get correct selector matches for a pseudo element
inside of an <audio> element. The test is heavily coupled to our UserAgent
stylesheet and Shadow DOM layout, so check for possible failures if
WebCore changes things.

12:25 PM Changeset in webkit [175757] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Popovers do not dismiss when navigating back and forth using gestures
https://bugs.webkit.org/show_bug.cgi?id=138512
<rdar://problem/18900200>

Reviewed by Beth Dakin.

  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::navigationGestureDidBegin):
Dismiss action menu related popovers when navigation gestures begin.

12:06 PM Changeset in webkit [175756] by Beth Dakin
  • 9 edits in trunk/Source/WebKit2

Action menu preview popover should dismiss on scroll
https://bugs.webkit.org/show_bug.cgi?id=138511
-and corresponding-
rdar://problem/18901445

Reviewed by Tim Horton.

This patch re-names dismissActionMenuDataDetectorPopovers() to
dismissActionMenuPopovers() and also calls _clearPreviewPopover from that method
as well.

  • UIProcess/API/mac/WKView.mm:

(-[WKView viewDidMoveToWindow]):
(-[WKView _dismissActionMenuPopovers]):
(-[WKView _dismissActionMenuDataDetectorPopovers]): Deleted.

  • UIProcess/API/mac/WKViewInternal.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::dismissActionMenuPopovers):
(WebKit::PageClientImpl::dismissActionMenuDataDetectorPopovers): Deleted.

  • UIProcess/mac/WKActionMenuController.h:
  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController dismissActionMenuPopovers]):
(-[WKActionMenuController dismissActionMenuDataDetectorPopovers]): Deleted.

12:02 PM Changeset in webkit [175755] by Bem Jones-Bey
  • 8 edits
    4 adds
    4 deletes in trunk/LayoutTests

[CSS Shapes] the sandbag JS utility code isn't producing the correct expected result in the shape-image gradient tests
https://bugs.webkit.org/show_bug.cgi?id=135923

Reviewed by Dirk Schulze.

Import tests from upstream. They have been modified so that they use
testharness to validate success or failure instead of being reftests,
allowing for fuzziness in matching to get around small variances
between implementations.

  • TestExpectations:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html:
  • css3/shapes/shape-outside/shape-image/gradients/w3c-import.log:
  • css3/shapes/shape-outside/supported-shapes/support/test-utils.js:

(verifyTextPoints):

10:58 AM Changeset in webkit [175754] by Beth Dakin
  • 3 edits in trunk/Source/WebKit2

Support action menus for whitespace in editable areas
https://bugs.webkit.org/show_bug.cgi?id=138488
-and corresponding-
rdar://problem/18877717

Reviewed by Tim Horton.

Very simple menu for whitespace in editable areas.

  • Shared/API/c/WKActionMenuTypes.h:
  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
(-[WKActionMenuController _defaultMenuItems:]):

10:54 AM Changeset in webkit [175753] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Invoking an action menu should dismiss existing selection
https://bugs.webkit.org/show_bug.cgi?id=138496
-and corresponding-
rdar://problem/18892787

Reviewed by Tim Horton.

  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController willOpenMenu:withEvent:]):

10:28 AM Changeset in webkit [175752] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Drop useless HTMLElement::isURLAttribute() override
https://bugs.webkit.org/show_bug.cgi?id=138479

Reviewed by Mark Lam.

Drop useless HTMLElement::isURLAttribute() override as it is doing
nothing but calling the parent class' isURLAttribute().

No new tests, no behavior change.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::isURLAttribute): Deleted.

  • html/HTMLElement.h:
10:12 AM Changeset in webkit [175751] by ggaren@apple.com
  • 8 edits in trunk/Source/bmalloc

bmalloc uses 8X more virtual memory than necessary
https://bugs.webkit.org/show_bug.cgi?id=138495

Reviewed by Mark Lam.

iOS has a per-process virtual memory cap around 1GB, so there's some
value to not going totally ham with virtual memory.

We currently use about 8X the necessary amount:

  • 2X to align our VM allocation
  • 4X to reserve small / medium / (2) large chunk VM ranges per superchunk

We can cut that down:

  • Return the unaligned portion of our VM allocation (-2X)
  • Use all the chunks in a superchunk, instead of allocating one chunk per superchunk (-4X)
  • bmalloc/Algorithm.h:

(bmalloc::roundUpToMultipleOf): Added a non-constant version of this
function so we can call it with getpagesize() at runtime.

  • bmalloc/Chunk.h:
  • bmalloc/LargeChunk.h:

(bmalloc::LargeChunk::create): Deleted. Instead of each chunk allocating
its own VM, VMHeap allocates the superchunk and all the chunks in it at a time.

  • bmalloc/VMAllocate.h:

(bmalloc::vmValidate):
(bmalloc::vmAllocate): ASSERT that mmap succeeds to make crashes clearer
if it does not succeed. Allocate precisely, and give back the extra.

  • bmalloc/VMHeap.cpp:

(bmalloc::VMHeap::allocateSuperChunk):
(bmalloc::VMHeap::allocateSmallChunk): Deleted.
(bmalloc::VMHeap::allocateMediumChunk): Deleted.
(bmalloc::VMHeap::allocateLargeChunk): Deleted. Use all the chunks
in a superchunk, instead of just one.

  • bmalloc/VMHeap.h:

(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::allocateMediumPage):
(bmalloc::VMHeap::allocateLargeRange):

  • bmalloc/XLargeChunk.h:

(bmalloc::XLargeChunk::create): Updated to match changes above.

10:10 AM Changeset in webkit [175750] by eric.carlson@apple.com
  • 14 edits in trunk/Source

[iOS] Update optimized fullscreen media controls
https://bugs.webkit.org/show_bug.cgi?id=138493

Reviewed by Brent Fulgham.

Source/WebCore:

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::fullscreenMode): New.
(WebCore::MediaControlsHost::mediaUIImageData): New.

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/mediacontrols/mediaControlsiOS.css:

Renamed -webkit-media-controls-wireless-playback-status to -webkit-media-controls-inline-playback-placeholder

because it is now used for other inline playback status display. Add z-index:0 so the placeholder
renders above captions. Remove the background-image, it is now set from script.

(audio::-webkit-media-controls-inline-playback-placeholder):
(audio::-webkit-media-controls-inline-playback-placeholder.hidden):
(video::-webkit-media-controls-optimized-fullscreen-button):
(audio::-webkit-media-controls-wireless-playback-status): Deleted.
(audio::-webkit-media-controls-wireless-playback-status.hidden): Deleted.
(video::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.

  • Modules/mediacontrols/mediaControlsiOS.js:

(ControllerIOS): Set doingSetup to true around setup so we don't draw the inline controls

briefly when an element is created as a result of a user gesture.

(ControllerIOS.prototype.shouldHaveStartPlaybackButton): Don't allow inline controls during

initial setup to prevent inline controls from begin drawn briefly when a media element
is created and inserted by a script called from a user gesture.

(ControllerIOS.prototype.updateWirelessPlaybackStatus): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
(ControllerIOS.prototype.createControls): Ditto. Add style rules for optimized fullscreen button.
(ControllerIOS.prototype.configureInlineControls): Add the inlinePlaybackPlaceholder as a peer of

the inline controls compositing child instead of as a child so it renders correctly.

(ControllerIOS.prototype.addControls):
(ControllerIOS.prototype.updateControls): wirelessPlaybackStatus -> inlinePlaybackPlaceholder.
(ControllerIOS.prototype.handleWrapperTouchStart):
(ControllerIOS.prototype.get pageScaleFactor): Cleanup.
(ControllerIOS.prototype.set pageScaleFactor): Ditto.
(ControllerIOS.prototype.handleFullscreenChange): Show the placeholder.

  • WebCore.exp.in: Export _wkGetMediaUIImageData.
  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::fullscreenMode): Expose fullscreen mode.

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

Source/WebKit/mac:

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface): Initialize GetMediaUIImageData.

Source/WebKit2:

  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface): Initialize GetMediaUIImageData.

3:43 AM Changeset in webkit [175749] by Carlos Garcia Campos
  • 10 edits in releases/WebKitGTK/webkit-2.6

Merge r173857 - Move nodeFromPoint() back to Document where it belongs
https://bugs.webkit.org/show_bug.cgi?id=137012

Reviewed by Zalan Bujtas.
Source/WebCore:

nodeFromPoint() was moved into TreeScope for ShadowDOM work, but now we can move
it back to its logical place.

Make versions of elementFromPoint and caretRangeFromPoint that take LayoutPoints,
and change the current scale/offset code to be in layout units (which results
in a small behavior change).

elementFromPoint(int, int) and caretRangeFromPoint(int, int) are still required
for bindings code.

  • dom/Document.cpp:

(WebCore::Document::nodeFromPoint):
(WebCore::Document::elementFromPoint):
(WebCore::Document::caretRangeFromPoint):

  • dom/Document.h:

(WebCore::Document::elementFromPoint): Move logic from TreeScope::elementFromPoint()
here.

  • dom/TreeScope.cpp:

(WebCore::nodeFromPoint): Deleted.
(WebCore::TreeScope::elementFromPoint): Deleted.

  • dom/TreeScope.h:

LayoutTests:

All platforms use subpixel layout now, so remove the conditional behavior in this test.
Fix the test to account for scaling now being done in layout units.

  • fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
  • fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html:
  • platform/mac/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
3:29 AM Changeset in webkit [175748] by Antti Koivisto
  • 2 edits
    8 adds in trunk/Source/WebKit2

Add cache coders
https://bugs.webkit.org/show_bug.cgi?id=138413

Reviewed by Anders Carlsson.

Add encoding and decoding support for cache types.

This is largely a copy of the IPC coder classes with some unnecessary features removed.
The coders compute a type-sensitive checksum that can be used to verify the data integrity.

The code is behind ENABLE(NETWORK_CACHE) and not yet used.

  • NetworkProcess/cache: Added.
  • NetworkProcess/cache/NetworkCacheCoder.h: Added.
  • NetworkProcess/cache/NetworkCacheCoders.cpp: Added.
  • NetworkProcess/cache/NetworkCacheCoders.h: Added.
  • NetworkProcess/cache/NetworkCacheDecoder.cpp: Added.
  • NetworkProcess/cache/NetworkCacheDecoder.h: Added.
  • NetworkProcess/cache/NetworkCacheEncoder.cpp: Added.
  • NetworkProcess/cache/NetworkCacheEncoder.h: Added.
  • WebKit2.xcodeproj/project.pbxproj:
3:28 AM Changeset in webkit [175747] by Carlos Garcia Campos
  • 20 edits in releases/WebKitGTK/webkit-2.6/Source

Merge r173765 - Allow DOM methods to return references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=136931

Source/WebCore:

Reviewed by Sam Weinig.

It is common practice in WebKit to have methods return a reference
instead of a pointer if the pointer can never be null. However, this
unfortunately did not work for DOM methods (functions called by JS
bindings). This prevented further refactoring.

This patch brings support for having DOM methods to return references
instead of pointers when the pointer cannot be null. The generated
bindings were calling WTF::getPtr() on the pointer type returned by
the implementation already (in case it was a smart pointer type).
This patch leverages this by having WTF::getPtr() convert reference
arguments into raw pointers.

This patch also updates a few DOM methods on Document and Element
classes to return a reference instead of a pointer, to test the change.
There are likely more DOM methods that can be updated though.

No new tests, no behavior change.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::classList):

  • bindings/js/JSDOMBinding.h:

(WTF::getPtr): Deleted.

  • dom/Document.cpp:

(WebCore::Document::implementation):
(WebCore::Document::webkitGetNamedFlows):
(WebCore::Document::namedFlows):
(WebCore::Document::setXMLVersion):
(WebCore::Document::setXMLStandalone):
(WebCore::Document::securityPolicy):
(WebCore::Document::styleSheets):

  • dom/Document.h:

(WebCore::Document::timing):

  • dom/Element.cpp:

(WebCore::Element::classList):
(WebCore::Element::dataset):

  • dom/Element.h:
  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::displayLastTextTrackCueBox):
(WebCore::VTTRegion::willRemoveTextTrackCueBox):

  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):

  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::documentTiming):

  • rendering/FlowThreadController.cpp:

(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):

Source/WTF:

Add support for having WTF::getPtr() transform reference arguments
into raw pointers so that DOM methods can now return references when
appropriate and so that the generated bindings code can handle this
via WTF::getPtr().

This patch had to alter the way getPtr() was overloaded for smart
pointer types so that we don't call &p on smart pointers but p.get().
This was needed because the new WTF::getPtr(T&) was being called for
RefPtr<T> arguments instead of the getPtr(const RefPtr<T>&) overload.
This was addressed using traits and template specialization to
distinguish WTF smart pointers from other types.

Reviewed by Sam Weinig.

  • wtf/GetPtr.h:

(WTF::getPtr):

  • wtf/OwnPtr.h:

(WTF::getPtr): Deleted.

  • wtf/PassOwnPtr.h:

(WTF::getPtr): Deleted.

  • wtf/PassRefPtr.h:

(WTF::getPtr): Deleted.

  • wtf/Ref.h:
  • wtf/RefPtr.h:

(WTF::getPtr): Deleted.

  • wtf/gobject/GRefPtr.h:

(WTF::getPtr): Deleted.

2:07 AM Changeset in webkit [175746] by evab.u-szeged@partner.samsung.com
  • 2 edits in trunk

[EFL] Require at least EFL 1.9 if ENABLE(ACCESSIBILITY) after r175098
https://bugs.webkit.org/show_bug.cgi?id=138465

Reviewed by Gyuyoung Kim.

  • Source/cmake/OptionsEfl.cmake:
1:21 AM Changeset in webkit [175745] by gyuyoung.kim@samsung.com
  • 6 edits in trunk/Source/JavaScriptCore

Apply std::unique_ptr to slowPathCall()
https://bugs.webkit.org/show_bug.cgi?id=138489

Reviewed by Mark Lam.

As a step to use std::unique_ptr<>, this patch makes slowPathCall() use std::unique_ptr<>,
std::make_unique<>, and WTF::move().

  • dfg/DFGSlowPathGenerator.h:

(JSC::DFG::slowPathCall):
(JSC::DFG::slowPathMove):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateJSArray):
(JSC::DFG::SpeculativeJIT::addSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::arrayify):
(JSC::DFG::SpeculativeJIT::compileIn):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::compile):

12:24 AM Changeset in webkit [175744] by mark.lam@apple.com
  • 2 edits in trunk/LayoutTests

Gardening: get-by-pname.js is failing when run with JSC_useLLINT=false and other special JIT configurations.
<https://webkit.org/b/138497>

Unreviewed.

  • js/script-tests/get-by-pname.js:
  • temporarily skipping this from the JSC tests to green the bots until the issue is fixed.
Note: See TracTimeline for information about the timeline view.