WebKit-https.git
7 years agoRemoving an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChi...
rniwa@webkit.org [Fri, 16 Jan 2015 03:45:01 +0000 (03:45 +0000)]
Removing an HTML element spends a lot of time in adjustDirectionalityIfNeededAfterChildrenChanged
https://bugs.webkit.org/show_bug.cgi?id=140523
<rdar://problem/19464329>

Reviewed by Chris Dumez.

The bug was caused by adjustDirectionalityIfNeededAfterChildrenChanged always traversing children to
unset selfOrAncestorHasDirAutoAttribute flag while removing a child element.

Fixed the bug by removing this code. This code was no-op prior to being refactored in r154957 since
we only entered a for loop with the invariant "counter < childCountDelta" when "childCountDelta < 0".

See http://trac.webkit.org/changeset/154957/trunk/Source/WebCore/html/HTMLElement.cpp.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178571 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[iOS] REGRESSION (r174642): DumpRenderTree.app test may dump result twice
dbates@webkit.org [Fri, 16 Jan 2015 03:29:13 +0000 (03:29 +0000)]
[iOS] REGRESSION (r174642): DumpRenderTree.app test may dump result twice
https://bugs.webkit.org/show_bug.cgi?id=139685
<rdar://problem/19281317>

Reviewed by Simon Fraser.

Fixes an issue where a test in DumpRenderTree.app may dump its result twice. In particular,
the test LayoutTests/fast/dom/gc-10.html may dump its result twice.

Following <http://trac.webkit.org/changeset/174642>, we dump the test result asynchronously
as opposed to synchronously. So, the WebThread or the main thread may perform other tasks
before DRT dumps the output of a test. In particular, the WebThread may start a new page
load (say, as a result of continued JavaScript execution), which will ultimately lead to
dumping the test result again. Instead we want DRT to dump the test result synchronously
such that we capture the state of the web page either when the page is loaded or when
window.testRunner.notifyDone() is called.

* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView): Moved logic to re-enable tile painting and update the
state of the display from here to updateDisplay(). Added call to -[CATransaction flush] to
flush CA transactions to the window.
* DumpRenderTree/mac/DumpRenderTree.mm:
(updateDisplay): Added iOS-specific code to update tiles and tell WebKit to flush
compositing changes to ensure that we have up-to-date tile content for a pixel/ref-test.
(dump): Renamed; formerly named dumpTestResults().
(displayWebView): Removed outdated FIXME comment. Added FIXME comment to investigate
enabling repaint support on iOS.
(-[DumpRenderTree _deferDumpToMainThread]): Deleted.
(-[DumpRenderTree _waitForWebThreadThenDump]): Deleted.
(dumpTestResults): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: Reopening the inspector can selects a sub-frame instead of the Main...
commit-queue@webkit.org [Fri, 16 Jan 2015 02:53:06 +0000 (02:53 +0000)]
Web Inspector: Reopening the inspector can selects a sub-frame instead of the Main Frame's DOM
https://bugs.webkit.org/show_bug.cgi?id=140513

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-15
Reviewed by Timothy Hatcher.

* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.saveIdentityToCookie):
Specifically identify the main frame, so that any sub-frames with the same
URL, don't get choosen over the main frame when restoring state from cookie.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178569 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRenderLayerCompositor: Strange comparison of opacity (float) to boolean.
bfulgham@apple.com [Fri, 16 Jan 2015 02:18:42 +0000 (02:18 +0000)]
RenderLayerCompositor: Strange comparison of opacity (float) to boolean.
https://bugs.webkit.org/show_bug.cgi?id=140477.

Reviewed by Simon Fraser.

* rendering/RenderLayerCompositor.cpp:
(WebCore::styleChangeRequiresLayerRebuild): Add a cast to make the meaning of this
code clearer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178568 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd a connection parameter to StorageManager willOpen/didClose functions
andersca@apple.com [Fri, 16 Jan 2015 02:07:08 +0000 (02:07 +0000)]
Add a connection parameter to StorageManager willOpen/didClose functions
https://bugs.webkit.org/show_bug.cgi?id=140527

Reviewed by Tim Horton.

Rename processWillCloseConnection to processDidCloseConnection and pass connections
to both functions since in the near future we won't be able to get the connection from
the web process proxy in these scenarios.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::processWillOpenConnection):
(WebKit::StorageManager::processDidCloseConnection):
(WebKit::StorageManager::processWillCloseConnection): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed Windows gardening.
bfulgham@apple.com [Fri, 16 Jan 2015 02:01:17 +0000 (02:01 +0000)]
[Win] Unreviewed Windows gardening.

Remove a bunch of out-of-date entries, and try to properly mark tests so we get
proper coverage.

* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed, rolling out r178531.
joepeck@webkit.org [Fri, 16 Jan 2015 01:59:07 +0000 (01:59 +0000)]
Unreviewed, rolling out r178531.

Caused LayoutTest ASSERTs/CRASHs on Debug Yosemite build-bot.

Reverted changeset:

"Layers need to be already updated before we call adjustViewSize."
https://bugs.webkit.org/show_bug.cgi?id=135514
http://trac.webkit.org/changeset/178531

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollTo):
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[WK2] Wire diagnostic logging messages through the UIProcess
cdumez@apple.com [Fri, 16 Jan 2015 01:07:32 +0000 (01:07 +0000)]
[WK2] Wire diagnostic logging messages through the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=140486

Reviewed by Sam Weinig.

Wire diagnostic logging messages through the UIProcess.
Eventually, the corresponding bundle API should go away.

Source/WebCore:

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Add page/DiagnosticLoggingResultType.h to Windows project.

* WebCore.xcodeproj/project.pbxproj:
Add page/DiagnosticLoggingResultType.h to XCode project.

* html/HTMLMediaElement.cpp:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
* page/DiagnosticLoggingClient.h:
* page/DiagnosticLoggingResultType.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
Use new DiagnosticLoggingResultType enum instead of old
DiagnosticLoggingClient::LogType one.

Source/WebKit2:

* CMakeLists.txt:
Add UIProcess/WebPageDiagnosticLoggingClient.cpp to CMake.

* Shared/API/c/WKDiagnosticLoggingResultType.h:
Extract WKDiagnosticLoggingResultType enumeration from
WKBundlePageDiagnosticLoggingClient.h into its own header so that
it can be shared with the new WKPageDiagnosticLoggingClient.h.

* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toDiagnosticLoggingResultType):
Add WebCore::DiagnosticLoggingResultType <-> WKDiagnosticLoggingResultType
casting functions.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageDiagnosticLoggingClient):
* UIProcess/API/C/WKPage.h:
Add WKPage API so that the application can set the DiagnosticLoggingClient.

* UIProcess/API/C/WKPageDiagnosticLoggingClient.h: Added.
New WK2 diagnostic logging client that will eventually replace the existing
WKBundlePageDiagnosticLoggingClient.h injected bundle client.

* UIProcess/WebPageDiagnosticLoggingClient.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp.
* UIProcess/WebPageDiagnosticLoggingClient.h: Copied from Source/WebCore/page/DiagnosticLoggingClient.h.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
Handle new IPC messages for logging diagnostic messages.

* UIProcess/WebPageProxy.messages.in:
Add 3 IPC messages for logging diagnostic messages.

* WebKit2.xcodeproj/project.pbxproj:
Add new files to XCode project.

* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
Remove WKDiagnosticLoggingResultType enum as it was moved to its own
header.

* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
Use WebCore::DiagnosticLoggingResultType enum type instead of
WKDiagnosticLoggingResultType and call toAPI() to convert to
WKDiagnosticLoggingResultType type.

* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
Send IPC to WebPageProxy in addition to calling the injected bundle client.

* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
Use new DiagnosticLoggingResultType enum instead of the old LogType one.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178545 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: selecting Paint timeline records from sidebar does not trigger preview...
joepeck@webkit.org [Fri, 16 Jan 2015 01:00:23 +0000 (01:00 +0000)]
Web Inspector: selecting Paint timeline records from sidebar does not trigger preview of paint quad
https://bugs.webkit.org/show_bug.cgi?id=139151

Reviewed by Brian Burg.

* UserInterface/Views/LayoutTimelineDataGrid.js:
(WebInspector.LayoutTimelineDataGrid):
(WebInspector.LayoutTimelineDataGrid.prototype.callFramePopoverAnchorElement):
(WebInspector.LayoutTimelineDataGrid.prototype.reset): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype.hidden): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype._layoutDataGridSelectedNodeChanged): Deleted.
(WebInspector.LayoutTimelineDataGrid.prototype._hideHighlightIfNeeded): Deleted.
Move the node highlight from the datagrid to the timeline view because
we want this to happen on both the Navigation sidebar and the datagrid.

* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.shown):
(WebInspector.LayoutTimelineView.prototype.hidden):
(WebInspector.LayoutTimelineView.prototype.filterDidChange):
(WebInspector.LayoutTimelineView.prototype.reset):
(WebInspector.LayoutTimelineView.prototype._treeElementDeselected):
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
Update the highlight for major view updates.

(WebInspector.LayoutTimelineView.prototype._updateHighlight):
(WebInspector.LayoutTimelineView.prototype._showHighlightForRecord):
(WebInspector.LayoutTimelineView.prototype._hideHighlightIfNeeded):
(WebInspector.LayoutTimelineView.prototype._hoveredOrSelectedRecord):
Show a highlight for what we are hovering, or what is selected.
Note the selected node may not be visible due to filtering.

(WebInspector.LayoutTimelineView.prototype._mouseOverDataGrid):
(WebInspector.LayoutTimelineView.prototype._mouseLeaveDataGrid):
(WebInspector.LayoutTimelineView.prototype._mouseOverTreeOutline):
(WebInspector.LayoutTimelineView.prototype._mouseLeaveTreeOutline):
Update hovered information mousing over the datagrid and tree outline.

* UserInterface/Views/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype.filterDidChange):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype.updateFilter):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.filterDidChange):
Include a "filterDidChange" TimelineView method that gets called after
updateFilter (things like the filter bar or timeline range changes).

* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.treeElementFromNode):
(TreeOutline.prototype.treeElementFromPoint):
Provide a helper to get a tree element from an event target.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178544 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoReduce LayoutRect::infiniteRect() usage.
zalan@apple.com [Fri, 16 Jan 2015 00:11:27 +0000 (00:11 +0000)]
Reduce LayoutRect::infiniteRect() usage.
https://bugs.webkit.org/show_bug.cgi?id=140511

Reviewed by Simon Fraser.

This is in preparation to get rid of LayoutRect/FloatRect::infiniteRect().

No change in functionality.

* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::isInfinite):
* rendering/ClipRect.h:
(WebCore::ClipRect::reset):
(WebCore::ClipRect::isEmpty):
(WebCore::ClipRect::isInfinite):
(WebCore::ClipRect::setRect): Deleted.
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::reset):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::clippedByAncestor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178541 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdded availability annotations to modern Cocoa SPI.
mitz@apple.com [Fri, 16 Jan 2015 00:06:22 +0000 (00:06 +0000)]
Added availability annotations to modern Cocoa SPI.

Rubber-stamped by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178540 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix assertions on the Mountain Lion bots.
andersca@apple.com [Fri, 16 Jan 2015 00:01:16 +0000 (00:01 +0000)]
Fix assertions on the Mountain Lion bots.

It is allowed to call addWorkQueueMessageReceiver even if the connection is open
so remove that assertion.

* Platform/IPC/Connection.cpp:
(IPC::Connection::addWorkQueueMessageReceiver):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178539 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed build fix after r178536.
joepeck@webkit.org [Thu, 15 Jan 2015 23:58:34 +0000 (23:58 +0000)]
Unreviewed build fix after r178536.

Initialize member variables in the proper order.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178538 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoIntermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input...
cdumez@apple.com [Thu, 15 Jan 2015 23:57:34 +0000 (23:57 +0000)]
Intermittent WebCore build failures - CSSPropertyNames.gperf: No keywords in input file! calling gperf failed: 256 at WebCore/css/makeprop.pl line 901
https://bugs.webkit.org/show_bug.cgi?id=140521

Reviewed by Alexey Proskuryakov.

Close the CSSPropertyNames.gperf file before calling gperf on it
to make sure the content we wrote was flushed. This was causing
intermittent build failures.

* css/makeprop.pl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178537 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[WK2] Add support for fully editable WKWebView.
enrica@apple.com [Thu, 15 Jan 2015 23:42:11 +0000 (23:42 +0000)]
[WK2] Add support for fully editable WKWebView.
https://bugs.webkit.org/show_bug.cgi?id=140515

Reviewed by Anders Carlsson.

WKWebView has now a new property (_editable) to control
the editability of the entire content.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isEditable]):
(-[WKWebView _setEditable:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setEditable):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isEditable):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setEditable):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUpdate Mountain Lion results for fast/canvas/webgl/angle-instanced-arrays.html
ap@apple.com [Thu, 15 Jan 2015 23:16:18 +0000 (23:16 +0000)]
Update Mountain Lion results for fast/canvas/webgl/angle-instanced-arrays.html
after r178527.

* platform/mac-mountainlion/fast/canvas/webgl/angle-instanced-arrays-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoLayerFragment should be able to intersect with ClipRect.
zalan@apple.com [Thu, 15 Jan 2015 23:15:35 +0000 (23:15 +0000)]
LayerFragment should be able to intersect with ClipRect.
https://bugs.webkit.org/show_bug.cgi?id=140498

Reviewed by Simon Fraser.

No change in functionality.

* rendering/LayerFragment.h:
(WebCore::LayerFragment::intersect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectFragments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMove ClipRects and ClipRectsCache classes to RenderLayer.cpp.
zalan@apple.com [Thu, 15 Jan 2015 23:13:38 +0000 (23:13 +0000)]
Move ClipRects and ClipRectsCache classes to RenderLayer.cpp.
https://bugs.webkit.org/show_bug.cgi?id=140461

Reviewed by Simon Fraser.

Move classes only used by RenderLayer to RenderLayer.cpp.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::ClipRects::create):
(WebCore::ClipRects::reset):
(WebCore::ClipRects::overflowClipRect):
(WebCore::ClipRects::setOverflowClipRect):
(WebCore::ClipRects::fixedClipRect):
(WebCore::ClipRects::setFixedClipRect):
(WebCore::ClipRects::posClipRect):
(WebCore::ClipRects::setPosClipRect):
(WebCore::ClipRects::fixed):
(WebCore::ClipRects::setFixed):
(WebCore::ClipRects::ref):
(WebCore::ClipRects::deref):
(WebCore::ClipRects::operator==):
(WebCore::ClipRects::operator=):
(WebCore::ClipRects::ClipRects):
(WebCore::ClipRectsCache::ClipRectsCache):
(WebCore::ClipRectsCache::getClipRects):
(WebCore::ClipRectsCache::setClipRects):
(WebCore::ClipRectsCache::getIndex):
(WebCore::RenderLayer::clipRects):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::create): Deleted.
(WebCore::ClipRects::ClipRects): Deleted.
(WebCore::ClipRects::reset): Deleted.
(WebCore::ClipRects::overflowClipRect): Deleted.
(WebCore::ClipRects::setOverflowClipRect): Deleted.
(WebCore::ClipRects::fixedClipRect): Deleted.
(WebCore::ClipRects::setFixedClipRect): Deleted.
(WebCore::ClipRects::posClipRect): Deleted.
(WebCore::ClipRects::setPosClipRect): Deleted.
(WebCore::ClipRects::fixed): Deleted.
(WebCore::ClipRects::setFixed): Deleted.
(WebCore::ClipRects::ref): Deleted.
(WebCore::ClipRects::deref): Deleted.
(WebCore::ClipRects::operator==): Deleted.
(WebCore::ClipRects::operator=): Deleted.
(WebCore::ClipRectsCache::ClipRectsCache): Deleted.
(WebCore::ClipRectsCache::getClipRects): Deleted.
(WebCore::ClipRectsCache::setClipRects): Deleted.
(WebCore::ClipRectsCache::getIndex): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178533 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoCanonicalization of :lang() should preserve the :lang()'s arguments representations
commit-queue@webkit.org [Thu, 15 Jan 2015 22:52:30 +0000 (22:52 +0000)]
Canonicalization of :lang() should preserve the :lang()'s arguments representations
https://bugs.webkit.org/show_bug.cgi?id=139928

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2015-01-15
Reviewed by Benjamin Poulain.

Source/WebCore:

Preserve the representation of IDENT and STRING when serializing the
:lang(). For example, :lang(foo,"bar"   ,baz) should be serialized as
:lang(foo, "bar", baz) instead of :lang(foo, bar, baz).

Rename CSSParserSelector::setArgumentList, CSSSelector::setArgumentList
and CSSSelector::argumentList to CSSParserSelector::setLangArgumentList,
CSSSelector::setLangArgumentList and CSSSelector::langArgumentList
respectively, since those methods are being exclusively used in respect
with :lang().

Update the test of serializing :lang() with IDENT and STRING arguments.

* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
(WebCore::CSSParserSelector::setArgumentList): Deleted.
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
(WebCore::CSSParserString::isParsedFromString):
(WebCore::CSSParserString::setParsedFromString):
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::appendArgumentList): Deleted.
(WebCore::CSSSelector::setArgumentList): Deleted.
* css/CSSSelector.h:
(WebCore::CSSSelector::langArgumentList):
(WebCore::CSSSelector::langArgumentParsedFromStringFlagList):
(WebCore::CSSSelector::argumentList): Deleted.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):

LayoutTests:

* fast/css/css-lang-selector-with-string-arguments-text-expected.txt: Updated.
* fast/css/css-lang-selector-with-string-arguments-text.html: Updated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178532 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoLayers need to be already updated before we call adjustViewSize
bfulgham@apple.com [Thu, 15 Jan 2015 22:51:12 +0000 (22:51 +0000)]
Layers need to be already updated before we call adjustViewSize
https://bugs.webkit.org/show_bug.cgi?id=135514

Reviewed by Simon Fraser.

Tested by 'fast/dynamic/layer-no-longer-paginated.html'

Defer updating scrollbars until we have finished layout. This
has a couple of benefits:
(1) We do not attempt to modify render layers during layout.
(2) In WK1 we do not attempt to paint during layout.

Add a new virtual predicate to ScrollView indicating when we are in
layout so that calls to setContentsSize do not attempt
to adjust scrollbars.

Modify FrameView to set its ScrollView state to block drawing
scrollbar updates during layout. Also add a post-layout
handler to complete the scrollbar updates after layout is
finished.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added.
(WebCore::ScrollView::scrollTo): If we should defer painting, cache the
the scroll delta and apply it after the layout is complete.
* platform/ScrollView.h:
(WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178531 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Miscellaneous DRT fixes
bfulgham@apple.com [Thu, 15 Jan 2015 22:49:26 +0000 (22:49 +0000)]
[Win] Miscellaneous DRT fixes
https://bugs.webkit.org/show_bug.cgi?id=116562

Reviewed by Tim Horton.

While investigating the cause of several Windows crashes, I found:
(1) Messy conversions to and from BSTR types
(2) Weird mixes of wide-string and narrow string conversions
(3) Passing nullptr to some CoreFoundation routines that do not
    permit null arguments.
(4) Commands to link the executable to the VS2005 runtime.

This patch cleans up these issues to improve DRT reliability on
Windows.

* DumpRenderTree/cg/ImageDiffCG.cpp:
(main): Get rid of VS2005 runtime linking.
* DumpRenderTree/win/DumpRenderTree.cpp:
(urlSuitableForTestResult): Protect against being asked
to process an empty URL.
(dumpHistoryItem): Do BSTR string building using _bstr_t, rather
than converting to/from wchar_t buffers.
(runTest): Simplify string and BSTR handling.
(createWebViewAndOffscreenWindow): Ditto.
(main): Get rid of VS2005 runtime linking.
* DumpRenderTree/win/TestRunnerWin.cpp:
(jsStringRefToWString): Simplify code.
(TestRunner::pathToLocalResource):
(TestRunner::setUserStyleSheetLocation):
* TestWebKitAPI/win/main.cpp: Get rid of
VS2005 runtime linking.
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWhen building the NFA of the global disjunction, share the prefix subgraph of existin...
benjamin@webkit.org [Thu, 15 Jan 2015 22:19:40 +0000 (22:19 +0000)]
When building the NFA of the global disjunction, share the prefix subgraph of existing subpatterns
https://bugs.webkit.org/show_bug.cgi?id=140465

Reviewed by Andreas Kling.

This patch updates the parser to produce smaller graphs when multiple patterns
of the rule list share a common prefix.

Previously, GraphBuilder would generate subgraph in place of each parsed
atom. We now only create subgraph if an atom does not appear in the prefix tree.

We accumulate the parsing information into small uint16_t named TrivialAtom.
When generating the subgraph for an new atom, we first check if the prefix tree already
has a corresponding subgraph for that atom. If it does, we do not generate anything and we extend the existing
graph. If there is no existing prefix, we create the subgraph and extend the prefix tree.

Sharing prefix subtrees slows down the subtree generation a bit but the resulting graph is much
simpler for many kind of inputs.

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
The URLFilterParser now maintains states (the prefix tree) between patterns.

* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::debugPrintDot):
* contentextensions/DFANode.h:
Fix a typo :)

* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::createNode):
(WebCore::ContentExtensions::NFA::setFinal):
(WebCore::ContentExtensions::NFA::restoreToGraphSize):
(WebCore::ContentExtensions::NFA::addRuleId):
(WebCore::ContentExtensions::NFA::debugPrintDot):
* contentextensions/NFA.h:
(WebCore::ContentExtensions::NFA::addRuleId):
* contentextensions/NFANode.cpp: Removed.
* contentextensions/NFANode.h:
NFA nodes from two patterns are now "merged" by construction, thus we need
to keep track of multiple rules per node.

* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::trivialAtomFromAsciiCharacter):
(WebCore::ContentExtensions::quantifyTrivialAtom):
(WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin):
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::m_LastPrefixTreeEntry):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::fail):
(WebCore::ContentExtensions::GraphBuilder::generateTransition):
(WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
(WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
(WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::GraphBuilder::m_lastAtom): Deleted.
(WebCore::ContentExtensions::URLFilterParser::parse): Deleted.
* contentextensions/URLFilterParser.h:
(WebCore::ContentExtensions::URLFilterParser::hasError): Deleted.
(WebCore::ContentExtensions::URLFilterParser::errorMessage): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178529 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoStop hardcoding mac-mountainlion in commit queue
ap@apple.com [Thu, 15 Jan 2015 22:14:50 +0000 (22:14 +0000)]
Stop hardcoding mac-mountainlion in commit queue
https://bugs.webkit.org/show_bug.cgi?id=140492

Reviewed by Anders Carlsson.

Use "mac", not "mac-<platform>". This matches how EWS queues are initialized, and
there should be no change in behavior, because:
1. PatchProcessingQueue converts the name with _new_port_name_from_old() before
using it to create a port object.
2. Although it doesn't convert the name before using DeprecatedPort.port(), it
is actually correct to use "mac" for the name there. We only used to get the expected
behavior with "mac-mountainlion" accidentally, because of a fallback to "mac"
for unknown deprecated port names.

* Scripts/webkitpy/tool/commands/queues.py: (CommitQueue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178528 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector and regular console use different source code locations for messages
ap@apple.com [Thu, 15 Jan 2015 21:52:11 +0000 (21:52 +0000)]
Web Inspector and regular console use different source code locations for messages
https://bugs.webkit.org/show_bug.cgi?id=140478

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/ConsoleMessage.h: Expose computed source location.

* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::addMessageToConsole):
(Inspector::InspectorConsoleAgent::stopTiming):
(Inspector::InspectorConsoleAgent::count):
* inspector/agents/InspectorConsoleAgent.h:
addMessageToConsole() now takes a pre-made ConsoleMessage object.

* inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::messageWithTypeAndLevel):
(Inspector::JSGlobalObjectConsoleClient::warnUnimplemented):
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
* inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
(Inspector::JSGlobalObjectDebuggerAgent::breakpointActionLog):
Updated for the above changes.

Source/WebCore:

We now create a ConsoleMessage object in a place where we can look at it and use
the source location it computed in a client call.

* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
* inspector/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::didFinishXHRLoading):
(WebCore::WebConsoleAgent::didReceiveResponse):
(WebCore::WebConsoleAgent::didFailLoading):
* page/PageConsoleClient.cpp:
(WebCore::PageConsoleClient::addMessage):
(WebCore::PageConsoleClient::messageWithTypeAndLevel):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):

LayoutTests:

A lot of tests now get line numbers in console messages. These lines are calculated
by Inspector::ConsoleMessage based on JavaScript call stack.

One note of interest is that DumpRenderTree only dumps the line, which can be
confusing if it is a line in a subresource. We can change the format in a separate
patch one day.

* http/tests/security/drag-drop-local-file-expected.txt:
* platform/wk2/http/tests/security/drag-drop-local-file-expected.txt:
With WebKit1, a console message is logged when EventSender releases the mouse button,
and with WebKit2, it is logged on hover. This is not quite expected, but probably
not too harmful. In any case, it's not a new problem introduced by this patch.

* http/tests/security/xss-DENIED-iframe-src-alias.html:
* http/tests/security/xss-DENIED-iframe-src-alias-expected.txt:
Run the subtests sequentially to ensure consistent order of results.

* animations/change-keyframes-expected.txt:
* crypto/subtle/unwrapKey-check-usage-expected.txt:
* crypto/subtle/wrapKey-check-usage-expected.txt:
* fast/canvas/webgl/angle-instanced-arrays-expected.txt:
* fast/canvas/webgl/angle-instanced-arrays-out-of-bounds-expected.txt:
* fast/canvas/webgl/oes-texture-float-linear-expected.txt:
* fast/canvas/webgl/oes-texture-half-float-expected.txt:
* fast/canvas/webgl/oes-texture-half-float-linear-expected.txt:
* fast/dom/Window/open-invalid-url-expected.txt:
* fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent-expected.txt:
* fast/forms/interactive-validation-prevented-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-01-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-02-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-03-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-04-expected.txt:
* fast/frames/sandboxed-iframe-attribute-parsing-05-expected.txt:
* fast/frames/sandboxed-iframe-close-top-noclose-expected.txt:
* fast/frames/sandboxed-iframe-forms-dynamic-expected.txt:
* fast/frames/sandboxed-iframe-forms-expected.txt:
* fast/frames/sandboxed-iframe-history-denied-expected.txt:
* fast/frames/sandboxed-iframe-navigation-targetlink-expected.txt:
* fast/frames/sandboxed-iframe-navigation-top-by-name-denied-expected.txt:
* fast/frames/sandboxed-iframe-navigation-windowopen-expected.txt:
* fast/frames/sandboxed-iframe-parsing-space-characters-expected.txt:
* fast/loader/page-dismissal-modal-dialogs-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-sync-disabled-expected.txt:
* fast/xpath/nsresolver-bad-object-expected.txt:
* html5lib/generated/run-tests11-write-expected.txt:
* http/tests/appcache/abort-cache-onchecking-expected.txt:
* http/tests/appcache/abort-cache-onchecking-manifest-404-expected.txt:
* http/tests/appcache/abort-cache-onchecking-resource-404-expected.txt:
* http/tests/appcache/abort-cache-ondownloading-expected.txt:
* http/tests/appcache/abort-cache-ondownloading-resource-404-expected.txt:
* http/tests/appcache/abort-cache-onprogress-expected.txt:
* http/tests/appcache/local-content-expected.txt:
* http/tests/canvas/philip/tests/security.drawImage.canvas-expected.txt:
* http/tests/canvas/philip/tests/security.drawImage.image-expected.txt:
* http/tests/canvas/philip/tests/security.pattern.canvas.fillStyle-expected.txt:
* http/tests/canvas/philip/tests/security.pattern.canvas.strokeStyle-expected.txt:
* http/tests/canvas/philip/tests/security.pattern.cross-expected.txt:
* http/tests/canvas/philip/tests/security.pattern.image.fillStyle-expected.txt:
* http/tests/canvas/philip/tests/security.pattern.image.strokeStyle-expected.txt:
* http/tests/history/cross-origin-replace-history-object-child-expected.txt:
* http/tests/history/cross-origin-replace-history-object-expected.txt:
* http/tests/inspector-protocol/access-inspected-object-expected.txt:
* http/tests/misc/image-blocked-src-no-change-expected.txt:
* http/tests/misc/unloadable-script-expected.txt:
* http/tests/plugins/cross-frame-object-access-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny-expected.txt:
* http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url-expected.txt:
* http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
* http/tests/security/canvas-remote-read-redirect-to-remote-image-expected.txt:
* http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin-expected.txt:
* http/tests/security/canvas-remote-read-remote-image-blocked-then-allowed-expected.txt:
* http/tests/security/canvas-remote-read-remote-image-expected.txt:
* http/tests/security/canvas-remote-read-remote-image-redirect-expected.txt:
* http/tests/security/contentSecurityPolicy/eval-scripts-setInterval-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/eval-scripts-setTimeout-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header-expected.txt:
* http/tests/security/contentSecurityPolicy/sandbox-in-http-header-expected.txt:
* http/tests/security/cross-frame-access-call-expected.txt:
* http/tests/security/cross-frame-access-callback-explicit-domain-DENY-expected.txt:
* http/tests/security/cross-frame-access-child-explicit-domain-expected.txt:
* http/tests/security/cross-frame-access-custom-expected.txt:
* http/tests/security/cross-frame-access-delete-expected.txt:
* http/tests/security/cross-frame-access-enumeration-expected.txt:
* http/tests/security/cross-frame-access-first-time-expected.txt:
* http/tests/security/cross-frame-access-frameelement-expected.txt:
* http/tests/security/cross-frame-access-get-custom-property-cached-expected.txt:
* http/tests/security/cross-frame-access-get-expected.txt:
* http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt:
* http/tests/security/cross-frame-access-history-get-expected.txt:
* http/tests/security/cross-frame-access-history-put-expected.txt:
* http/tests/security/cross-frame-access-location-get-expected.txt:
* http/tests/security/cross-frame-access-location-put-expected.txt:
* http/tests/security/cross-frame-access-name-getter-expected.txt:
* http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt:
* http/tests/security/cross-frame-access-object-prototype-expected.txt:
* http/tests/security/cross-frame-access-parent-explicit-domain-expected.txt:
* http/tests/security/cross-frame-access-port-expected.txt:
* http/tests/security/cross-frame-access-protocol-expected.txt:
* http/tests/security/cross-frame-access-protocol-explicit-domain-expected.txt:
* http/tests/security/cross-frame-access-put-expected.txt:
* http/tests/security/cross-frame-access-selection-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-to-data-url-sub-frame-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-to-data-url-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-from-data-url-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-window-open-expected.txt:
* http/tests/security/document-all-expected.txt:
* http/tests/security/frameNavigation/not-opener-expected.txt:
* http/tests/security/frameNavigation/xss-DENIED-targeted-link-navigation-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode-expected.txt:
* http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS-expected.txt:
* http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/javascriptURL/xss-DENIED-from-javascript-url-in-foreign-domain-window-open-expected.txt:
* http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/javascriptURL/xss-DENIED-to-javascript-url-in-foreign-domain-window-open-expected.txt:
* http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
* http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
* http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
* http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
* http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
* http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
* http/tests/security/local-CSS-from-remote-expected.txt:
* http/tests/security/local-JavaScript-from-remote-expected.txt:
* http/tests/security/local-iFrame-from-remote-expected.txt:
* http/tests/security/local-image-from-remote-expected.txt:
* http/tests/security/local-video-poster-from-remote-expected.txt:
* http/tests/security/mixedContent/insecure-plugin-in-iframe-expected.txt:
* http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
* http/tests/security/no-popup-from-sandbox-expected.txt:
* http/tests/security/no-popup-from-sandbox-top-expected.txt:
* http/tests/security/popup-allowed-by-sandbox-is-sandboxed-expected.txt:
* http/tests/security/referrer-policy-invalid-expected.txt:
* http/tests/security/sandbox-inherit-to-initial-document-2-expected.txt:
* http/tests/security/sandboxed-iframe-blocks-access-from-parent-expected.txt:
* http/tests/security/sandboxed-iframe-form-top-expected.txt:
* http/tests/security/sandboxed-iframe-modify-self-expected.txt:
* http/tests/security/sandboxed-iframe-origin-add-expected.txt:
* http/tests/security/sandboxed-iframe-origin-remove-expected.txt:
* http/tests/security/srcdoc-in-sandbox-cannot-access-parent-expected.txt:
* http/tests/security/window-named-proto-expected.txt:
* http/tests/security/window-named-valueOf-expected.txt:
* http/tests/security/xss-DENIED-assign-location-hash-expected.txt:
* http/tests/security/xss-DENIED-assign-location-host-expected.txt:
* http/tests/security/xss-DENIED-assign-location-hostname-expected.txt:
* http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt:
* http/tests/security/xss-DENIED-assign-location-nonstandardProperty-expected.txt:
* http/tests/security/xss-DENIED-assign-location-pathname-expected.txt:
* http/tests/security/xss-DENIED-assign-location-protocol-expected.txt:
* http/tests/security/xss-DENIED-assign-location-reload-expected.txt:
* http/tests/security/xss-DENIED-assign-location-search-expected.txt:
* http/tests/security/xss-DENIED-defineProperty-expected.txt:
* http/tests/security/xss-DENIED-frame-name-expected.txt:
* http/tests/security/xss-DENIED-getSVGDocument-iframe-expected.txt:
* http/tests/security/xss-DENIED-getSVGDocument-object-expected.txt:
* http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-invalid-domain-change-expected.txt:
* http/tests/security/xss-DENIED-javascript-with-spaces-expected.txt:
* http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-sandboxed-iframe-expected.txt:
* http/tests/security/xss-DENIED-synchronous-form-expected.txt:
* http/tests/security/xss-DENIED-synchronous-frame-load-in-javascript-url-expected.txt:
* http/tests/security/xss-DENIED-window-name-navigator-expected.txt:
* http/tests/security/xss-DENIED-window-open-javascript-url-expected.txt:
* http/tests/security/xss-DENIED-window-open-javascript-url-with-spaces-expected.txt:
* http/tests/security/xss-DENIED-window-open-parent-expected.txt:
* http/tests/security/xss-DENIED-xsl-document-securityOrigin-expected.txt:
* http/tests/security/xss-eval-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location2-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-referrer-expected.txt:
* http/tests/security/xssAuditor/dom-write-URL-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-inline-event-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-javascript-URL-expected.txt:
* http/tests/security/xssAuditor/full-block-base-href-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/full-block-javascript-link-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
* http/tests/websocket/tests/hybi/bad-sub-protocol-control-chars-expected.txt:
* http/tests/websocket/tests/hybi/bad-sub-protocol-empty-expected.txt:
* http/tests/websocket/tests/hybi/bad-sub-protocol-non-ascii-expected.txt:
* http/tests/websocket/tests/hybi/binary-type-expected.txt:
* http/tests/websocket/tests/hybi/close-before-open-expected.txt:
* http/tests/websocket/tests/hybi/close-code-and-reason-expected.txt:
* http/tests/websocket/tests/hybi/close-expected.txt:
* http/tests/websocket/tests/hybi/close-reason-too-long-expected.txt:
* http/tests/websocket/tests/hybi/invalid-subprotocol-characters-expected.txt:
* http/tests/websocket/tests/hybi/invalid-subprotocols-expected.txt:
* http/tests/websocket/tests/hybi/url-parsing-expected.txt:
* http/tests/websocket/tests/hybi/websocket-event-target-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-whitelist-response-headers-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-sync-header-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-sync-method-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-sync-not-supported-expected.txt:
* http/tests/xmlhttprequest/access-control-response-with-expose-headers-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt:
* http/tests/xmlhttprequest/cross-origin-no-authorization-expected.txt:
* http/tests/xmlhttprequest/cross-site-denied-response-sync-2-expected.txt:
* http/tests/xmlhttprequest/cross-site-denied-response-sync-expected.txt:
* http/tests/xmlhttprequest/get-dangerous-headers-expected.txt:
* http/tests/xmlhttprequest/getResponseHeader-expected.txt:
* http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-https-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-removal-expected.txt:
* http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt:
* http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:
* http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync-expected.txt:
* http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync-expected.txt:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt:
* js/dom/dom-as-prototype-assignment-exception-expected.txt:
* js/dom/dom-attributes-on-mismatch-type-expected.txt:
* js/dom/shadow-navigator-geolocation-in-strict-mode-does-not-throw-expected.txt:
* plugins/get-user-agent-with-null-npp-from-npp-new-expected.txt:
* plugins/netscape-plugin-map-data-to-src-expected.txt:
* plugins/no-mime-with-valid-extension-expected.txt:
* storage/websql/open-database-creation-callback-expected.txt:
* storage/websql/open-database-set-empty-version-expected.txt:
* svg/as-image/svg-canvas-xhtml-tainted-expected.txt:
* svg/css/parse-calc-length-expected.txt:
* svg/css/parse-height-expected.txt:
* svg/css/parse-length-expected.txt:
* svg/custom/invalid-length-units-expected.txt:
* svg/custom/poly-parsing-error-expected.txt:
* svg/custom/polyline-setattribute-points-null-expected.txt:
* svg/dom/fuzz-path-parser-expected.txt:
* svg/dom/path-parser-expected.txt:
* svg/dom/points-parser-expected.txt:
* webaudio/audionode-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoClearing the website data store should clear local storage
andersca@apple.com [Thu, 15 Jan 2015 21:26:53 +0000 (21:26 +0000)]
Clearing the website data store should clear local storage
https://bugs.webkit.org/show_bug.cgi?id=140507

Reviewed by Andreas Kling.

* Shared/WebsiteData/WebsiteDataTypes.h:
Add WebsiteDataTypeLocalStorage.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
Add WKWebsiteDataTypeLocalStorage

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
Handle WKWebsiteDataTypeLocalStorage.

* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileModificationTime):
Use an early return.

(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
Change this to take an std::chrono::system_clock::time_point and don't
try to modifiy m_origins while iterating it.

* UIProcess/Storage/LocalStorageDatabaseTracker.h:
Update declarations.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
Change this to take an std::chrono::system_clock::time_point.

* UIProcess/Storage/StorageManager.h:
Update declarations.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
Remove data from the storage manager as well.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed build fix after r178510
bfulgham@apple.com [Thu, 15 Jan 2015 20:28:10 +0000 (20:28 +0000)]
[Win] Unreviewed build fix after r178510

Correct #include and declarations from Font->FontCascade

* DOMCoreClasses.cpp:
(DOMElement::font):
* FullscreenVideoController.cpp:
(FullscreenVideoController::draw):
* WebKitGraphics.cpp:
* WebPreferences.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoGive WebsiteDataStore a StorageManager
andersca@apple.com [Thu, 15 Jan 2015 20:24:41 +0000 (20:24 +0000)]
Give WebsiteDataStore a StorageManager
https://bugs.webkit.org/show_bug.cgi?id=140505

Reviewed by Andreas Kling.

The process pool storage manager is still around but is only used for clearing data. It will be removed
completely in an upcoming commit.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Set up the local storage directory.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(websiteDataDirectoryURL):
Export this so it can be called from APIWebsiteDataStoreCocoa.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
Call WebsiteDataStore::cloneSessionData instead.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::websiteDataStore):
Add getter.

* UIProcess/WebProcessPool.cpp:
(WebKit::websiteDataStoreConfiguration):
Update this to take a WebProcessPoolConfiguration object and assign the local storage directory.

(WebKit::WebProcessPool::WebProcessPool):
Pass the configuration to websiteDataStoreConfiguration.

(WebKit::WebProcessPool::processWillOpenConnection):
(WebKit::WebProcessPool::processWillCloseConnection):
Remove storage manager calls.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
When creating a persistent data store, also create a storage manager.

(WebKit::WebsiteDataStore::cloneSessionData):
Clone the session storage namespace.

(WebKit::WebsiteDataStore::webPageWasAdded):
Create a session storage namespace for this page.

(WebKit::WebsiteDataStore::webPageWasRemoved):
Destroy the session storage namespace.

(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
Tell the storage manager about the new process connection.

(WebKit::WebsiteDataStore::webPageWillOpenConnection):
Set the allowed connection.

(WebKit::WebsiteDataStore::webPageDidCloseConnection):
Clear the allowed connection.

(WebKit::WebsiteDataStore::webProcessDidCloseConnection):
Tell the storage manager that the process connection has been closed.

* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new members.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed Windows build fix.
bfulgham@apple.com [Thu, 15 Jan 2015 20:16:38 +0000 (20:16 +0000)]
[Win] Unreviewed Windows build fix.

More missing Font->FontCascade changes.

* platform/win/WebCoreTextRenderer.cpp:
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION(r178133): Membuster regressed ~4%
antti@apple.com [Thu, 15 Jan 2015 20:07:47 +0000 (20:07 +0000)]
REGRESSION(r178133): Membuster regressed ~4%
https://bugs.webkit.org/show_bug.cgi?id=140495

Reviewed by Andreas Kling.

* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):

    Fonts may ref other fonts. Keep clearing until there are no changes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Thu, 15 Jan 2015 19:54:42 +0000 (19:54 +0000)]
[Win] Unreviewed build fix.

* platform/graphics/win/FontCacheWin.cpp:
* platform/win/DragImageWin.cpp:
* platform/win/WebCoreTextRenderer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoTry to fix windows build.
antti@apple.com [Thu, 15 Jan 2015 19:41:40 +0000 (19:41 +0000)]
Try to fix windows build.

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
(WebCore::createDragImageForLink):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreDrawDoubledTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::setFontFromControlSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed, rolling out r178518.
antti@apple.com [Thu, 15 Jan 2015 19:34:51 +0000 (19:34 +0000)]
Unreviewed, rolling out r178518.

Didn't mean to commit some of this

Reverted changeset:

"Try to fix windows build."
http://trac.webkit.org/changeset/178518

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178519 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoTry to fix windows build.
antti@apple.com [Thu, 15 Jan 2015 19:29:05 +0000 (19:29 +0000)]
Try to fix windows build.

* platform/graphics/Font.cpp: Copied from Source/WebCore/platform/graphics/SimpleFontData.cpp.
* platform/graphics/Font.h: Copied from Source/WebCore/platform/graphics/SimpleFontData.h.
* platform/graphics/FontCascadeFastPath.cpp: Copied from Source/WebCore/platform/graphics/FontFastPath.cpp.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/graphics/ios/FontIOS.mm: Copied from Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm.
* platform/graphics/mac/FontCascadeComplexTextMac.cpp: Copied from Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp.
* platform/graphics/mac/FontCascadeMac.mm: Copied from Source/WebCore/platform/graphics/mac/FontMac.mm.
* platform/graphics/mac/FontCoreText.cpp: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp.
* platform/graphics/mac/FontMac.mm: Replaced with Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
(WebCore::createDragImageForLink):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
* platform/win/WebCoreTextRenderer.cpp:
(WebCore::doDrawTextAtPoint):
(WebCore::WebCoreDrawDoubledTextAtPoint):
(WebCore::WebCoreTextFloatWidth):
(WebCore::WebCoreSetAlwaysUsesComplexTextCodePath):
(WebCore::WebCoreAlwaysUsesComplexTextCodePath):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::setFontFromControlSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Part 2] Argument object created by "Function dot arguments" should use a clone of...
mark.lam@apple.com [Thu, 15 Jan 2015 19:20:03 +0000 (19:20 +0000)]
[Part 2] Argument object created by "Function dot arguments" should use a clone of argument values.
<https://webkit.org/b/140093>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::createArguments):
- We should not fetching the lexicalEnvironment here.  The reason we've
  introduced the ClonedArgumentsCreationMode is because the lexicalEnvironment
  may not be available to us at this point.  Instead, we'll just pass a nullptr.

* runtime/Arguments.cpp:
(JSC::Arguments::tearOffForCloning):
* runtime/Arguments.h:
(JSC::Arguments::finishCreation):
- Use the new tearOffForCloning() to tear off arguments right out of the values
  passed on the stack.  tearOff() is not appropriate for this purpose because
  it takes slowArgumentsData into account.

LayoutTests:

* js/function-dot-arguments-expected.txt:
* js/script-tests/function-dot-arguments.js:
(arrayify):
(indirectCall):
(.inner):
(tearOffTest3):
(tearOffTest3b):
(tearOffTest3c):
(tearOffTest4External):
(tearOffTest4):
(tearOffTest4aExternal):
(tearOffTest4bExternal):
(tearOffTest4b):
(tearOffTest4cExternal):
(tearOffTest4c):
(tearOffTest5):
(tearOffTest5b):
(tearOffTest5c):
(tearOffTest6External):
(tearOffTest6):
(tearOffTest6aExternal):
(tearOffTest6bExternal):
(tearOffTest6b):
(tearOffTest6cExternal):
(tearOffTest6c):
(tearOffTest7):
(tearOffTest7b):
(tearOffTest7c):
(tearOffTest8External):
(tearOffTest8):
(tearOffTest8aExternal):
(tearOffTest8bExternal):
(tearOffTest8b):
(tearOffTest8cExternal):
(tearOffTest8c):
(tearOffTest9b):
(tearOffTest9c):
(tearOffTest10External):
(tearOffTest10):
(tearOffTest10aExternal):
(tearOffTest10bExternal):
(tearOffTest10b):
(tearOffTest10cExternal):
(tearOffTest10c):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Thu, 15 Jan 2015 19:09:23 +0000 (19:09 +0000)]
[Win] Unreviewed gardening.

Mark some debug crashes as being caused by Bug 135514.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178516 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Thu, 15 Jan 2015 18:41:42 +0000 (18:41 +0000)]
[Win] Unreviewed gardening.

Mark fast/dynamic/layer-no-longer-paginated.html as crashing on Windows
now that https://bugs.webkit.org/show_bug.cgi?id=140455 has been filed.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178515 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMore work on the lifetime observer
andersca@apple.com [Thu, 15 Jan 2015 18:39:47 +0000 (18:39 +0000)]
More work on the lifetime observer
https://bugs.webkit.org/show_bug.cgi?id=140500

Reviewed by Andreas Kling.

Add webPageWasAdded/webPageWasRemoved functions; these will be called first and last during the
lifetime of the web page. Also remove removeObserver since nobody is calling it.

* UIProcess/WebProcessLifetimeObserver.h:
(WebKit::WebProcessLifetimeObserver::webPageWasAdded):
(WebKit::WebProcessLifetimeObserver::webPageWasRemoved):
* UIProcess/WebProcessLifetimeTracker.cpp:
(WebKit::WebProcessLifetimeTracker::addObserver):
(WebKit::WebProcessLifetimeTracker::pageWasInvalidated):
(WebKit::WebProcessLifetimeTracker::removeObserver): Deleted.
* UIProcess/WebProcessLifetimeTracker.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agohttp/tests/misc/acid3.html is flakey on Mavericks
mmaxfield@apple.com [Thu, 15 Jan 2015 17:22:18 +0000 (17:22 +0000)]
http/tests/misc/acid3.html is flakey on Mavericks
https://bugs.webkit.org/show_bug.cgi?id=140253

Reviewed by Alexey Proskuryakov.

Source/WebCore:

CoreText has a bug <rdar://problem/19433490> in which kerning is not applied for a font
if a CTTypesetter is created using that font before a call to CTFontTransformGlyphs. We
often create typesetters in the complex code path, so it's not obvious when this bug
might present itself. This patch simply makes a dummy invocation of
CTFontTransformGlyphs() when creating a SimpleFontData.

No new tests because this is covered by http/tests/misc/acid3.html.

* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):

LayoutTests:

Remove flakey mark.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoGet rid of custom StyleBuilder code for 'line-height' CSS property
cdumez@apple.com [Thu, 15 Jan 2015 17:20:44 +0000 (17:20 +0000)]
Get rid of custom StyleBuilder code for 'line-height' CSS property
https://bugs.webkit.org/show_bug.cgi?id=140462

Reviewed by Antti Koivisto.

Get rid of custom StyleBuilder code for 'line-height' CSS property by
using a conditional converter.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLineHeight):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueLineHeight):
(WebCore::StyleBuilderCustom::convertLineHeight): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178512 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoDon't pass an allowed connection when creating a session storage namespace
andersca@apple.com [Thu, 15 Jan 2015 16:45:12 +0000 (16:45 +0000)]
Don't pass an allowed connection when creating a session storage namespace
https://bugs.webkit.org/show_bug.cgi?id=140482

Reviewed by Sam Weinig.

Instead, always call setAllowedSessionStorageNamespaceConnection. This will make it easier to
move the storage manager into WebsiteDataStore and make it use the process lifetime observer machinery.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::SessionStorageNamespace::create):
(WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
(WebKit::StorageManager::createSessionStorageNamespace):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRename Font to FontCascade
antti@apple.com [Thu, 15 Jan 2015 14:19:56 +0000 (14:19 +0000)]
Rename Font to FontCascade
https://bugs.webkit.org/show_bug.cgi?id=140442

Reviewed by Darin Adler.

We can then rename SimpleFontData to Font. This will match the usual definition of a "font".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178510 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION(r177075): [GTK] Creating a second web view disables accelerated compositin...
carlosgc@webkit.org [Thu, 15 Jan 2015 13:07:42 +0000 (13:07 +0000)]
REGRESSION(r177075): [GTK] Creating a second web view disables accelerated compositing in existing web view
https://bugs.webkit.org/show_bug.cgi?id=140494

Reviewed by Gustavo Noronha Silva.

The problem is that r177075 moved the creation of the redirected
XComposite window to realize method, but leaving the call to
webkitWebViewBaseUpdatePreferences() in both places Realize() and
CreateWebPage(). webkitWebViewBaseUpdatePreferences() only updates
the accelerating compositing setting nowadays, depending on
whether the redirected XComposited window could be created or not
(something that depends on whether XRender, XComposite and XDamage
extensions are available in the current display). So, when the
first web view is created, webkitWebViewBaseUpdatePreferences() is
called first from CreateWebPage(), and always disabling
accelerated compositing because the redirected window hasn't been
created yet, and then from Realize() right after the redirected
window is created so that accelerated compositing is enabled. When
the second web view is created the same happens, but since
settings are shared among web views, the first call to
webkitWebViewBaseUpdatePreferences() from CreateWebPage() disables
accelerated compositing and the web page exists accelerated
compositing mode and never enters it again unless the page is
reloaded. I guess the web page should enter accelerated
compositing mode again when the setting is enabled again from
Realize(), but since the setting is global and doesn't depend on
every web view, we should never disable it once it has been
enabled in any case.
Since we want to enable accelerated compositing mode when the
redirected XComposite window has been successfully created, we can
use the SetNativeSurfaceHandleForCompositing message to enable the
setting and remove webkitWebViewBaseUpdatePreferences().

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewUpdateSettings):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseCreateWebPage):
(webkitWebViewBaseUpdatePreferences): Deleted.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAX: [ATK] Mark accessibility/render-counter-text.html as a suitable test for EFL...
commit-queue@webkit.org [Thu, 15 Jan 2015 12:20:45 +0000 (12:20 +0000)]
AX: [ATK] Mark accessibility/render-counter-text.html as a suitable test for EFL and GTK.
https://bugs.webkit.org/show_bug.cgi?id=140438

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2015-01-15
Reviewed by Chris Fleizach.

The test shows the text contents of the <li> element with the counter inside <ol> using three childAtIndex().stringValue methods.
In the case of ATK childAtIndex(0) returns a non-empty object, but it is not the ATK_OBJECT,
so the stringValue produces an empty string.
To avoid this, the text content is obtained by direct reading of stringValue of <li> AccessibilityUIElement which is ATK_TEXT.

* accessibility/render-counter-text.html:
   This test is also suitable for EFL and GTK port.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178508 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when...
mihnea@adobe.com [Thu, 15 Jan 2015 09:04:38 +0000 (09:04 +0000)]
[CSSRegions] Assert failure in RenderBlock::locateFlowThreadContainingBlock when showing the render tree debug info
https://bugs.webkit.org/show_bug.cgi?id=140441

Reviewed by Andrei Bucur.

When showing the render tree debug information for an element inside a flow thread,
we will display the region range information for all the render boxes. To avoid
computation of flow thread containing block in these situations, we will use
only the cached flow thread containing block information.

No new tests as this code path is only touched when using showRenderTree* methods.

* rendering/RenderObject.cpp:
(WebCore::flowThreadContainingBlockFromRenderer):
(WebCore::RenderObject::showRegionsInformation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed. Fix GTK+ build after r178464.
carlosgc@webkit.org [Thu, 15 Jan 2015 08:00:33 +0000 (08:00 +0000)]
Unreviewed. Fix GTK+ build after r178464.

* UIProcess/API/gtk/WebKitUserContent.cpp:
(_WebKitUserScript::_WebKitUserScript):
(webkitUserScriptGetUserScript):
* UIProcess/API/gtk/WebKitUserContentPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoGraphics corruption after Find on some pages
simon.fraser@apple.com [Thu, 15 Jan 2015 07:59:09 +0000 (07:59 +0000)]
Graphics corruption after Find on some pages
https://bugs.webkit.org/show_bug.cgi?id=140489

Reviewed by Zalan Bujtas.

Source/WebCore:

After doing a Find on http://shop.outlier.cc/shop/retail/chino.html,
garbage could appear on some parts of the page. This is caused by creating
a compositing layer which is marked as opaque, yet failing to paint the entire
layer contents.

This was caused by a bug in RenderBox::computeBackgroundIsKnownToBeObscured()
logic. On the page in question, doing a Find could cause overflow:hidden sections
to get scrolled (since Find can reveal the selection by scrolling overflow).
However, the render tree walking under RenderBox::foregroundIsKnownToBeOpaqueInRect()
fails to take overflow scrolling into account, so gives the wrong answer
in some content configurations. As a result, we'd think that the background
is obscured, and never paint it.

Conservative fix is to have isCandidateForOpaquenessTest() return false
when the content has any non-zero scroll offset.

Tests: compositing/contents-opaque/opaque-with-scrolled.html
       fast/backgrounds/opaque-scrolled-paint-background.html

* rendering/RenderBox.cpp:
(WebCore::isCandidateForOpaquenessTest):

LayoutTests:

Two new tests. The first one just reports that we have an opaque compositing
layer. The second one tests the the user-visible symptom of the missing
background.

* compositing/contents-opaque/opaque-with-scrolled-expected.txt: Added.
* compositing/contents-opaque/opaque-with-scrolled.html: Added.
* fast/backgrounds/opaque-scrolled-paint-background-expected.html: Added.
* fast/backgrounds/opaque-scrolled-paint-background.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178490 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago<rdar://problem/17748495> Multiple compositing tests fail to repaint on WK1
ap@apple.com [Thu, 15 Jan 2015 06:50:56 +0000 (06:50 +0000)]
<rdar://problem/17748495> Multiple compositing tests fail to repaint on WK1

* platform/mac/TestExpectations: These tests pass now, unmarking.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178488 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUpdate expectations for what we see on upgraded EWS machines.
ap@apple.com [Thu, 15 Jan 2015 06:05:32 +0000 (06:05 +0000)]
Update expectations for what we see on upgraded EWS machines.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Mac][MSE] Stalled YouTube playback does not allow display to sleep.
jer.noble@apple.com [Thu, 15 Jan 2015 06:00:43 +0000 (06:00 +0000)]
[Mac][MSE] Stalled YouTube playback does not allow display to sleep.
https://bugs.webkit.org/show_bug.cgi?id=140468
rdar://problem/19171162

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-stalled-holds-sleep-assertion.html

The unstated convention of MediaPlayerPrivate::paused() is that implementations should
return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC
was returning 'false' if it was supposed to be playing, regardless of the actual rate.
This caused a check in HTMLMediaElement of whether to release the sleep assertion token
to fail, thinking the media engine was still playing.

Add some testing infrastructure to allow us to test whether the media element is disabling
display sleep from within layout tests.

* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::isDisablingSleep):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
* testing/Internals.cpp:
(WebCore::Internals::elementIsBlockingDisplaySleep):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* media/media-source/content/test-fragmented-manifest.json: Added.
* media/media-source/content/test-fragmented.mp4: Added.
* media/media-source/media-source-loader.js: Added.
(MediaSourceLoader):
(MediaSourceLoader.prototype.loadManifest):
(MediaSourceLoader.prototype.loadManifestSucceeded):
(MediaSourceLoader.prototype.loadManifestFailed):
(MediaSourceLoader.prototype.loadMediaData):
(MediaSourceLoader.prototype.loadMediaDataSucceeded):
(MediaSourceLoader.prototype.loadMediaDataFailed):
(MediaSourceLoader.prototype.type):
(MediaSourceLoader.prototype.duration):
(MediaSourceLoader.prototype.initSegment):
(MediaSourceLoader.prototype.mediaSegmentsLength):
(MediaSourceLoader.prototype.mediaSegment):
* media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt: Added.
* media/media-source/media-source-stalled-holds-sleep-assertion.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178486 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMove LayoutFragment and ClipRect to their own files.
zalan@apple.com [Thu, 15 Jan 2015 03:04:40 +0000 (03:04 +0000)]
Move LayoutFragment and ClipRect to their own files.
https://bugs.webkit.org/show_bug.cgi?id=140457

Reviewed by Simon Fraser.

Move these classes to their own files to to make RenderLayer.h less heavy.

No change in functionality.

* WebCore.xcodeproj/project.pbxproj:
* rendering/ClipRect.cpp: Added.
(WebCore::ClipRect::intersects):
* rendering/ClipRect.h: Added.
(WebCore::ClipRect::ClipRect):
(WebCore::ClipRect::rect):
(WebCore::ClipRect::setRect):
(WebCore::ClipRect::affectedByRadius):
(WebCore::ClipRect::setAffectedByRadius):
(WebCore::ClipRect::operator==):
(WebCore::ClipRect::operator!=):
(WebCore::ClipRect::intersect):
(WebCore::ClipRect::move):
(WebCore::ClipRect::moveBy):
(WebCore::ClipRect::isEmpty):
(WebCore::ClipRect::intersects):
(WebCore::ClipRect::inflateX):
(WebCore::ClipRect::inflateY):
(WebCore::ClipRect::inflate):
(WebCore::intersection):
* rendering/LayerFragment.h: Added.
(WebCore::LayerFragment::setRects):
(WebCore::LayerFragment::moveBy):
(WebCore::LayerFragment::intersect):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::ClipRect::intersects): Deleted.
* rendering/RenderLayer.h:
(WebCore::ClipRect::ClipRect): Deleted.
(WebCore::ClipRect::rect): Deleted.
(WebCore::ClipRect::setRect): Deleted.
(WebCore::ClipRect::affectedByRadius): Deleted.
(WebCore::ClipRect::setAffectedByRadius): Deleted.
(WebCore::ClipRect::operator==): Deleted.
(WebCore::ClipRect::operator!=): Deleted.
(WebCore::ClipRect::intersect): Deleted.
(WebCore::ClipRect::move): Deleted.
(WebCore::ClipRect::moveBy): Deleted.
(WebCore::ClipRect::isEmpty): Deleted.
(WebCore::ClipRect::intersects): Deleted.
(WebCore::ClipRect::inflateX): Deleted.
(WebCore::ClipRect::inflateY): Deleted.
(WebCore::ClipRect::inflate): Deleted.
(WebCore::intersection): Deleted.
(WebCore::LayerFragment::LayerFragment): Deleted.
(WebCore::LayerFragment::setRects): Deleted.
(WebCore::LayerFragment::moveBy): Deleted.
(WebCore::LayerFragment::intersect): Deleted.
* rendering/RenderMultiColumnSet.h:
* rendering/RenderRegion.h:
* rendering/RenderTreeAsText.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[EFL] Change expectations for two layout tests.
commit-queue@webkit.org [Thu, 15 Jan 2015 02:16:06 +0000 (02:16 +0000)]
[EFL] Change expectations for two layout tests.
https://bugs.webkit.org/show_bug.cgi?id=140391

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2015-01-14
Reviewed by Chris Fleizach.

Currently, two layout tests produce positive results for EFL:
- accessibility/fieldset-element-expected.html
- accessibility/negative-tabindex-does-not-expose-label.html.

* accessibility/fieldset-element-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/fieldset-element-expected.txt.
* accessibility/negative-tabindex-does-not-expose-label-expected.txt: Renamed from LayoutTests/platform/gtk/accessibility/negative-tabindex-does-not-expose-label-expected.txt.
* platform/efl/TestExpectations:
   Missing markings removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed build fix after r178459 and r178462.
bfulgham@apple.com [Thu, 15 Jan 2015 02:10:14 +0000 (02:10 +0000)]
[Win] Unreviewed build fix after r178459 and r178462.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add some
missing exports needed by the test infrastructure.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed, rolling out r178438.
commit-queue@webkit.org [Thu, 15 Jan 2015 01:16:42 +0000 (01:16 +0000)]
Unreviewed, rolling out r178438.
https://bugs.webkit.org/show_bug.cgi?id=140484

Broke a few MediaSource tests (Requested by JoePeck on
#webkit).

Reverted changeset:

"[MSE] Implement per TrackBuffer buffered."
https://bugs.webkit.org/show_bug.cgi?id=139813
http://trac.webkit.org/changeset/178438

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178468 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoCreate iOS-EWS server queue
commit-queue@webkit.org [Thu, 15 Jan 2015 00:49:57 +0000 (00:49 +0000)]
Create iOS-EWS server queue
https://bugs.webkit.org/show_bug.cgi?id=140473

Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2015-01-14
Reviewed by Benjamin Poulain.

* QueueStatusServer/app.yaml: Updates the SVN version number.
* QueueStatusServer/config/queues.py: Add ios-ews queue.
* QueueStatusServer/model/queues.py:
(Queue.display_name): Makes sure the display name is pretty!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178465 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoConvert WKUserScript to be an API::Object bridged object
weinig@apple.com [Thu, 15 Jan 2015 00:35:09 +0000 (00:35 +0000)]
Convert WKUserScript to be an API::Object bridged object
https://bugs.webkit.org/show_bug.cgi?id=140471

Reviewed by Dan Bernstein.

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Add Type::UserScript.

* UIProcess/API/APIUserScript.h: Added.
Add API object for UserScripts.

* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController init]):
(-[WKUserContentController userScripts]):
(-[WKUserContentController addUserScript:]):
(-[WKUserContentController removeAllUserScripts]):
(toWebCoreUserScriptInjectionTime): Deleted.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
(WebKit::WebUserContentControllerProxy::userScripts):
Store the WKUserScripts in the WebUserContentControllerProxy instead of the
Objective-C layer WKUserContentController, to allow creation of the object
from either the Objective-C or C++ sides.

* UIProcess/API/Cocoa/WKUserScript.mm:
(generateIdentifier):
(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
(-[WKUserScript source]):
(-[WKUserScript injectionTime]):
(-[WKUserScript isForMainFrameOnly]):
(-[WKUserScript _apiObject]):
* UIProcess/API/Cocoa/WKUserScriptInternal.h:
(API::wrapper):
(API::toWebCoreUserScriptInjectionTime):
(API::toWKUserScriptInjectionTime):
Convert to get properties from the API::UserScript.

* WebKit2.xcodeproj/project.pbxproj:
Add the new file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178464 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd per page connection callbacks to the lifetime observer
andersca@apple.com [Thu, 15 Jan 2015 00:21:31 +0000 (00:21 +0000)]
Add per page connection callbacks to the lifetime observer
https://bugs.webkit.org/show_bug.cgi?id=140475

Reviewed by Andreas Kling.

* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::addWebPage):
(WebKit::WebProcessLifetimeObserver::removeWebPage):
* UIProcess/WebProcessLifetimeObserver.h:
(WebKit::WebProcessLifetimeObserver::webPageWillOpenConnection):
(WebKit::WebProcessLifetimeObserver::webPageDidCloseConnection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178463 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area...
enrica@apple.com [Thu, 15 Jan 2015 00:18:39 +0000 (00:18 +0000)]
REGRESSION (r165385): Crash when applying autocorrection exceeds maximum text area length.
https://bugs.webkit.org/show_bug.cgi?id=137902
rdar://problem/18568864

Reviewed by Darin Adler.

Source/WebCore:

Test: editing/text-iterator/invalid-subrange.html

characterSubrange should check the iterator position after each advance.
This changed adds a new method to the Internals object to be able to test this.

* editing/TextIterator.cpp:
(WebCore::characterSubrange):
(WebCore::TextIterator::subrange):
(WebCore::findPlainText):
* testing/Internals.cpp:
(WebCore::Internals::subrange):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* editing/text-iterator/invalid-subrange-expected.txt: Added.
* editing/text-iterator/invalid-subrange.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMake WebsiteDataStore a WebProcessLifetimeObserver
andersca@apple.com [Thu, 15 Jan 2015 00:01:05 +0000 (00:01 +0000)]
Make WebsiteDataStore a WebProcessLifetimeObserver
https://bugs.webkit.org/show_bug.cgi?id=140472

Reviewed by Andreas Kling.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::addWebPage): Deleted.
(WebKit::WebsiteDataStore::removeWebPage): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178461 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
commit-queue@webkit.org [Wed, 14 Jan 2015 23:50:57 +0000 (23:50 +0000)]
REGRESSION (r154769): Wrong <title> taken as a tooltip for SVG element.
https://bugs.webkit.org/show_bug.cgi?id=139690.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-01-14
Reviewed by Daniel Bates.

Source/WebCore:

Before r154769, we were calling Traversal<SVGTitleElement>::firstWithin(), which returns
the first immediate SVGTitleElement child. In r154769, Traversal<SVGTitleElement>::firstWithin()
was replaced by descendantsOfType<SVGTitleElement> which returns all descendants SVGTitleElements.
Then we were returning the first element of these descendants, which may not be an immediate
child of the element, as the title of the SVGElement. This was the reason of this bug. The
fix is to use childrenOfType<SVGTitleElement>() instead, which returns the immediate SVGTitleElement
children of an SVGElement.

Also we were not following exactly the specs for the rootmost SVG element's title value.
According to the W3C specs, for stand-alone SVG documents only, the rootmost SVG element
should not return a title. But we were not returning a title for the rootmost SVG element
always. The fix is to return a empty title for the rootmost SVG element only if topDocument()
of the element isSVGDocument().

NOTE: The main SVG specs http://www.w3.org/TR/SVG/interact.html#hit-testing (W3C Recommendation
16 August 2011) and http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements (W3C
Recommendation 16 August 2011) do not say how the tooltip of an SVG element is calculated. But
the SVG tiny specs http://www.w3.org/TR/SVGTiny12/struct.html#uiTitleDescBehavior (W3C
Recommendation 22 December 2008) however explains well the tooltip calculation for the embedded
and the stand-alone SVG cases. And it seems this what we should rely on.

Test: svg/hittest/svg-standalone-tooltip.svg
      svg/hittest/svg-embedded-tooltip.html

* WebCore.exp.in:
* rendering/HitTestResult.h:
Make HitTestResult::setInnerNode be WEBCORE_EXPORT

* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
Replace descendantsOfType<SVGTitleElement>() by childrenOfType<SVGTitleElement>().
Fix the title value of the rootmost SVG element.

* testing/Internals.cpp:
(WebCore::Internals::toolTipFromElement):
* testing/Internals.h:
* testing/Internals.idl:
Add a new internal function toolTipFromElement() which returns the tooltip text for a
given element.

LayoutTests:

* svg/hittest/resources: Added.
* svg/hittest/resources/svg-tooltip.svg: Added.
Shared resources to be used by the tests.

* svg/hittest/resources/svg-tooltip.js: Added.
This code mimics the C++ tooltip calculation and compares its result with what the C++
code returns.

* svg/hittest/svg-embedded-tooltip-expected.txt: Added.
* svg/hittest/svg-embedded-tooltip.html: Added.
This test ensures that the tooltip text for SVG elements is calculated correctly when
the SVG is embedded in an HTML either through inline <svg> tag or through an <embed>
tag. In both cases, the rootmost SVG element should return the SVG document title.

* svg/hittest/svg-standalone-tooltip-expected.txt: Added.
* svg/hittest/svg-standalone-tooltip.svg: Added.
This test ensures that for stand-alone SVG documents, the tooltip text for SVG elements
is calculated correctly. In this case, the rootmost SVG element should not return a
title since the SVG document title will be displayed in the browser chrome.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[WK2][iOS] Add private API to toggle diagnostic logging setting
cdumez@apple.com [Wed, 14 Jan 2015 23:29:09 +0000 (23:29 +0000)]
[WK2][iOS] Add private API to toggle diagnostic logging setting
https://bugs.webkit.org/show_bug.cgi?id=140464

Reviewed by Dan Bernstein.

Add private API to toggle diagnostic logging setting for iOS.
Previously, there was only a WK2 private C API for this.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _diagnosticLoggingEnabled]):
(-[WKPreferences _setDiagnosticLoggingEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178455 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoBuildfix after r178434
ossy@webkit.org [Wed, 14 Jan 2015 23:28:57 +0000 (23:28 +0000)]
Buildfix after r178434
https://bugs.webkit.org/show_bug.cgi?id=140467

Reviewed by Chris Dumez.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertPerspective):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178454 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoSwitch VisitedLinkProvider over to WebProcessLifetimeObserver
andersca@apple.com [Wed, 14 Jan 2015 23:17:53 +0000 (23:17 +0000)]
Switch VisitedLinkProvider over to WebProcessLifetimeObserver
https://bugs.webkit.org/show_bug.cgi?id=140469

Reviewed by Andreas Kling.

* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
(WebKit::VisitedLinkProvider::removeAll):
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkProvider::resizeTable):
(WebKit::VisitedLinkProvider::addProcess): Deleted.
(WebKit::VisitedLinkProvider::removeProcess): Deleted.
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::processDidFinishLaunching):
* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::processes):
* UIProcess/WebProcessLifetimeObserver.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::addVisitedLinkProvider): Deleted.
(WebKit::WebProcessProxy::didDestroyVisitedLinkProvider): Deleted.
* UIProcess/WebProcessProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoBuild fix for NFAToDFA on ARM
benjamin@webkit.org [Wed, 14 Jan 2015 22:53:46 +0000 (22:53 +0000)]
Build fix for NFAToDFA on ARM

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-01-14

* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
(WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178449 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[iOS] run-webkit-tests --ios hangs trying to launch iOS Simulator with unavailable...
dbates@webkit.org [Wed, 14 Jan 2015 22:12:59 +0000 (22:12 +0000)]
[iOS] run-webkit-tests --ios hangs trying to launch iOS Simulator with unavailable runtime
https://bugs.webkit.org/show_bug.cgi?id=140301
<rdar://problem/19389266>

Reviewed by Jon Honeycutt.

Fixes an issue where run-webkit-tests --ios will hang when trying to launch iOS Simulator
with an unavailable runtime.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options): Modified to access property Simulator.latest_available_runtime,
which was formerly called Simulator.latest_runtime. Additionally, raise an exception if the
specified runtime cannot be used because it is unavailable.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.testing_device): Modified to call Simulator.lookup_or_create_device(),
which was formerly named testing_device.
* Scripts/webkitpy/xcode/simulator.py:
(Device.create): Modified to lookup created device by the UDID returned by simctl, which is
more robust than looking up the simulator device by name and runtime. This approach also
avoids returning the wrong device due to <rdar://problem/19444383> (simctl list shows
unavailable runtimes under the same iOS heading it would use to show it as available).
(Simulator.find_device_by_udid): Added.
(Simulator.device): Added optional parameter should_ignore_unavailable_devices (defaults
to False) to ignore devices that are unavailable (say, because their runtime is unavailable).
(Simulator.available_runtimes): Added.
(Simulator.latest_available_runtime): Renamed; formerly named latest_runtime. Take advantage
of the reverse=True argument to sorted() to sort the list of available runtimes such that the
first element of the sorted list is the runtime with the highest version number.
(Simulator.lookup_or_create_device): Renamed; formerly named testing_device.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178444 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemoved accidental commit of "invalid_array.js"
mmirman@apple.com [Wed, 14 Jan 2015 21:03:56 +0000 (21:03 +0000)]
Removed accidental commit of "invalid_array.js"
http://trac.webkit.org/changeset/178439

* tests/stress/invalid_array.js: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178442 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFixes operationPutByIdOptimizes such that they check that the put didn't
mmirman@apple.com [Wed, 14 Jan 2015 21:00:52 +0000 (21:00 +0000)]
Fixes operationPutByIdOptimizes such that they check that the put didn't
change the structure of the object who's property access is being
cached.  Also removes uses of the new base value from the cache generation code.
https://bugs.webkit.org/show_bug.cgi?id=139500

Reviewed by Filip Pizlo.

* jit/JITOperations.cpp:
(JSC::operationPutByIdStrictOptimize): saved the structure before the put.
(JSC::operationPutByIdNonStrictOptimize): ditto.
(JSC::operationPutByIdDirectStrictOptimize): ditto.
(JSC::operationPutByIdDirectNonStrictOptimize): ditto.
* jit/Repatch.cpp:
(JSC::generateByIdStub):
(JSC::tryCacheGetByID):
(JSC::tryBuildGetByIDList):
(JSC::emitPutReplaceStub):
(JSC::emitPutTransitionStubAndGetOldStructure): Added.
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryBuildPutByIdList):
(JSC::tryRepatchIn):
(JSC::emitPutTransitionStub): Deleted.
* jit/Repatch.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/JSPropertyNameEnumerator.h:
(JSC::genericPropertyNameEnumerator):
* runtime/Operations.h:
(JSC::normalizePrototypeChainForChainAccess): restructured to not use the base value.
(JSC::normalizePrototypeChain): restructured to not use the base value.
* tests/mozilla/mozilla-tests.yaml:
* tests/stress/proto-setter.js: Added.
* tests/stress/put-by-id-build-list-order-recurse.js: Added.
Added test that fails without this patch.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178441 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoadded invalid_array test
mmirman@apple.com [Wed, 14 Jan 2015 20:57:51 +0000 (20:57 +0000)]
added invalid_array test

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178439 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[MSE] Implement per TrackBuffer buffered.
commit-queue@webkit.org [Wed, 14 Jan 2015 20:36:25 +0000 (20:36 +0000)]
[MSE] Implement per TrackBuffer buffered.
https://bugs.webkit.org/show_bug.cgi?id=139813.

Patch by Bartlomiej Gajda <b.gajda@samsung.com> on 2015-01-14
Reviewed by Jer Noble.

Source/WebCore:

Added implementation of SourceBuffer buffered() algorithm as per specification,
and caching mechanism called when samples are added, removed, or MediaSource
readyState is changed.

Tests: media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html
       media/media-source/media-source-multiple-trackBuffers-buffered.html

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setReadyState):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::buffered):
(WebCore::SourceBuffer::invalidateBuffered):
(WebCore::SourceBuffer::recalculateBuffered):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::evictCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
(WebCore::SourceBuffer::hasCurrentTime):
* Modules/mediasource/SourceBuffer.h:

LayoutTests:

Added tests which checks how buffered behaves for two trackBuffers in single SourceBuffer
after appends, and with MediaSource readyState switching to ended and back to open.

* media/media-source/media-source-multiple-trackBuffers-buffered-expected.txt: Added.
* media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state-expected.txt: Added.
* media/media-source/media-source-multiple-trackBuffers-buffered-in-ended-state.html: Added.
* media/media-source/media-source-multiple-trackBuffers-buffered.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178438 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoDo not create new set for every sub-operation when converting a NFA to DFA
benjamin@webkit.org [Wed, 14 Jan 2015 20:32:39 +0000 (20:32 +0000)]
Do not create new set for every sub-operation when converting a NFA to DFA
https://bugs.webkit.org/show_bug.cgi?id=140380

Reviewed by Andreas Kling.

This is the first step toward making the NFA-to-DFA conversion more scalable: instead
of creating new sets for each step of the algorithm, we use two kinds of sets
and never do any copy.

The first new tool to do that is UniqueNodeIdSetImpl. It represents a set of NFA state corresponding to a DFA
state. It is unique per DFA state.

HashableNodeIdSet is a helper tool storing a UniqueNodeIdSetImpl.

The creation of new sets now goes like this:
1) Get a NodeIdSet for each possible transition.
2) For each transition:
   2a) Extend the NodeIdSet in place with its epsilon closure.
   2b) Get the UniqueNodeIdSetImpl corresponding to the new set we discovered.
   2c) If the UniqueNodeIdSetImpl is new, queue it for processing.

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsDebugging.h: Copied from Source/WebCore/contentextensions/DFANode.h.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadExtension):
Added some logging to inspect more easily what the clients are sending.

* contentextensions/DFA.cpp:
* contentextensions/DFA.h:
* contentextensions/DFANode.h:
* contentextensions/NFA.cpp:
* contentextensions/NFA.h:
* contentextensions/NFAToDFA.cpp:

(WebCore::ContentExtensions::epsilonClosure):
Instead of returning a new HashSet, extend the input HashSet.

(WebCore::ContentExtensions::UniqueNodeIdSetImpl::buffer):
(WebCore::ContentExtensions::UniqueNodeIdSet::UniqueNodeIdSet):
(WebCore::ContentExtensions::UniqueNodeIdSet::operator=):
(WebCore::ContentExtensions::UniqueNodeIdSet::~UniqueNodeIdSet):
(WebCore::ContentExtensions::UniqueNodeIdSet::operator==):
(WebCore::ContentExtensions::UniqueNodeIdSet::impl):
(WebCore::ContentExtensions::UniqueNodeIdSet::hash):
(WebCore::ContentExtensions::UniqueNodeIdSet::isEmptyValue):
(WebCore::ContentExtensions::UniqueNodeIdSet::isDeletedValue):
(WebCore::ContentExtensions::UniqueNodeIdSetHash::hash):
(WebCore::ContentExtensions::UniqueNodeIdSetHash::equal):
UniqueNodeIdSetImpl is a compact representation of a NodeIdSet corresponding to a DFA node.

It is never built directly, it is only built on demand through NodeIdSetToUniqueNodeIdSetTranslator
from a NodeIdSet.

(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::hash):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::equal):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::operator[]):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::size):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::begin):
(WebCore::ContentExtensions::SetTransitionsExcludingEpsilon::end):
(WebCore::ContentExtensions::populateTransitionsExcludingEpsilon):
(WebCore::ContentExtensions::NFAToDFA::convert):
(WebCore::ContentExtensions::setTransitionsExcludingEpsilon): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::HashableNodeIdSet): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::operator=): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::isEmptyValue): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::isDeletedValue): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSet::nodeIdSet): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSetHash::hash): Deleted.
(WebCore::ContentExtensions::HashableNodeIdSetHash::equal): Deleted.
(WebCore::ContentExtensions::addDFAState): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178436 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed, rolling out r178432.
commit-queue@webkit.org [Wed, 14 Jan 2015 20:16:23 +0000 (20:16 +0000)]
Unreviewed, rolling out r178432.
https://bugs.webkit.org/show_bug.cgi?id=140460

Caused 20 JSC Test Failures (Requested by JoePeck on #webkit).

Reverted changeset:

"REGRESSION (r174226): Header on huffingtonpost.com is too
large"
https://bugs.webkit.org/show_bug.cgi?id=140306
http://trac.webkit.org/changeset/178432

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178435 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoMake 'TypeName' parameter unnecessary in CSSPropertyNames.in
cdumez@apple.com [Wed, 14 Jan 2015 20:11:44 +0000 (20:11 +0000)]
Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140347

Reviewed by Darin Adler.

Source/WebCore:

Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
- Removing the static_cast to the destination type in the generated
  StyleBuilder code and let compiler implicitly convert the
  CSSPrimitiveValue to the setter's argument type.
- Updating conditional converters to return a WTF::Optional<>
  instead of returning a boolean and having an output argument
  passed by reference. This way, we can use "auto" in the generated
  StyleBuilder code to deduce the return type.

* css/CSSPropertyNames.in:
Drop TypeName parameter from all properties as it is no longer needed.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridTrackSize):
(WebCore::StyleBuilderConverter::convertGridPosition):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
(WebCore::StyleBuilderConverter::convertFilterOperations):
(WebCore::StyleBuilderConverter::convertMaskImageOperations):
Update conditional converters to return an Optional<>.

* css/makeprop.pl:
(generateValueSetter):
Drop support for TypeName, stop using static_cast to destination
type and update the generated code now that the conditional
converters return an Optional.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::setIsItalic):
(WebCore::FontDescription::setIsSmallCaps):
(WebCore::FontDescription::setItalic): Deleted.
(WebCore::FontDescription::setSmallCaps): Deleted.
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeWin.cpp:
(WebCore::fillFontDescription):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::updateStyle):
Now that we call the RenderStyle setters with a CSSPrimitiveValue
and let it be implicitly converted to the right type, instead of
doing an explicit static_cast, two setters on FontDescription
were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
taking a boolean in argument to setIsItalic() / setIsSmallCaps()
to resolve the ambiguity.

Source/WebKit/mac:

Call FontDescription::setIsItalic() instead of setItalic() as the
call site passes a boolean.

* WebView/WebHTMLView.mm:
(fontNameForDescription):

Source/WebKit/win:

Call FontDescription::setIsItalic() instead of setItalic() as the
call site passes a boolean.

* WebKitGraphics.cpp:
(makeFont):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: Stopwatch ASSERT when continuing inspector
burg@cs.washington.edu [Wed, 14 Jan 2015 19:42:00 +0000 (19:42 +0000)]
Web Inspector: Stopwatch ASSERT when continuing inspector
https://bugs.webkit.org/show_bug.cgi?id=138360

Reviewed by Timothy Hatcher.

We were unconditionally resuming the stopwatch even if we never
paused it in the first place. Maintain a flag for whether the
stopwatch was paused when the debugger last paused.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::didContinue):
* inspector/agents/InspectorDebuggerAgent.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178433 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION (r174226): Header on huffingtonpost.com is too large
msaboff@apple.com [Wed, 14 Jan 2015 19:38:21 +0000 (19:38 +0000)]
REGRESSION (r174226): Header on huffingtonpost.com is too large
https://bugs.webkit.org/show_bug.cgi?id=140306

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

BytecodeGenerator::willResolveToArguments() is used to check to see if we can use the
arguments register or whether we need to resolve "arguments".  If the arguments have
been captured, then they are stored in the lexical environment and the arguments
register is not used.
Changed BytecodeGenerator::willResolveToArguments() to also check to see if the arguments
register is captured.  Renamed the function to willResolveToArgumentsRegister() to
better indicate what we are checking.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::willResolveToArgumentsRegister):
(JSC::BytecodeGenerator::uncheckedLocalArgumentsRegister):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::willResolveToArguments): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::getArgumentByVal):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::ArrayPatternNode::emitDirectBinding):

LayoutTests:

Updated js/arguments-iterator to test changing argument to array values.
Removed tests that changed arguments to a string and an object as they were
bogus and didn't test what the appeared to test.
for .. of works on iterable objects only.

Added new regression test, js/regress-140306.

* js/arguments-iterator-expected.txt:
* js/regress-140306-expected.txt: Added.
* js/regress-140306.html: Added.
* js/script-tests/arguments-iterator.js:
(testEmptyArrayArguments):
(testArrayArguments):
(testOverwrittenArguments): Deleted.
(testNullArguments): Deleted.
(testNonArrayLikeArguments): Deleted.
* js/script-tests/regress-140306.js: Added.
(checkArgs):
(applyToArgs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178432 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed build fix for DebugSuffix target.
bfulgham@apple.com [Wed, 14 Jan 2015 19:08:29 +0000 (19:08 +0000)]
[Win] Unreviewed build fix for DebugSuffix target.

* WebKit.vcxproj/WebKit/WebKit.vcxproj: Correct build flags for DebugSuffix
target to match Release and Debug builds.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178431 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Build fix after r178255.
bfulgham@apple.com [Wed, 14 Jan 2015 19:03:28 +0000 (19:03 +0000)]
[Win] Build fix after r178255.

Correct path to PaintHooks.asm. This causes a build failure if you perform a
clean build from a new subversion checkout.

* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178430 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoVersioning.
bshafiei@apple.com [Wed, 14 Jan 2015 18:53:58 +0000 (18:53 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178428 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoJavaScript identifier incorrectly parsed if the prefix before an escape sequence...
msaboff@apple.com [Wed, 14 Jan 2015 18:48:58 +0000 (18:48 +0000)]
JavaScript identifier incorrectly parsed if the prefix before an escape sequence is a keyword
https://bugs.webkit.org/show_bug.cgi?id=140420

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Added new function isIdentPartIncludingEscape() that performs the original
isIdentPart() followed by a check for a valid unicode escape.  If there is a
unicode escape, its resolved value is checked with isIdentPart().

* KeywordLookupGenerator.py:
(Trie.printSubTreeAsC):
(Trie.printAsC):
* parser/Lexer.cpp:
(JSC::isUnicodeEscapeIdentPart):
(JSC::isIdentPartIncludingEscape):

LayoutTests:

New regression test.

* js/regress-140420-expected.txt: Added.
* js/regress-140420.html: Added.
* js/script-tests/regress-140420.js: Added.
(with):
(this):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178427 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoNull-deref crash when seeking immediately before looping.
jer.noble@apple.com [Wed, 14 Jan 2015 18:43:05 +0000 (18:43 +0000)]
Null-deref crash when seeking immediately before looping.
https://bugs.webkit.org/show_bug.cgi?id=140394

Reviewed by Eric Carlson.

Source/WebCore:

It is possible for finishSeek() to be called when a seek() has caused a pending seek task
to be scheduled, but before that pending seek task is run. In this case, if a seek request
is issued, the existing pending seek task will not be cancelled, which will cause a crash
when the pending seek task is run.

When checking whether an existing seek task needs to be cancelled, check the actual timer,
rather than the m_seeking boolean, so that this case is covered.

Test: media/video-ended-seek-crash.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::seekWithTolerance):

LayoutTests:

* media/video-ended-seek-crash-expected.txt: Added.
* media/video-ended-seek-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178426 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdd willOpen and didClose member functions to WebProcessLifetimeObserver
andersca@apple.com [Wed, 14 Jan 2015 18:39:03 +0000 (18:39 +0000)]
Add willOpen and didClose member functions to WebProcessLifetimeObserver
https://bugs.webkit.org/show_bug.cgi?id=140449

Reviewed by Andreas Kling.

* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::addVisitedLinkHash):
(WebKit::VisitedLinkProvider::webProcessWillOpenConnection):
(WebKit::VisitedLinkProvider::webProcessDidCloseConnection):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
* UIProcess/WebProcessLifetimeObserver.cpp:
(WebKit::WebProcessLifetimeObserver::addWebPage):
(WebKit::WebProcessLifetimeObserver::removeWebPage):
* UIProcess/WebProcessLifetimeObserver.h:
(WebKit::WebProcessLifetimeObserver::webProcessWillOpenConnection):
(WebKit::WebProcessLifetimeObserver::webProcessDidCloseConnection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178425 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
bfulgham@apple.com [Wed, 14 Jan 2015 18:25:44 +0000 (18:25 +0000)]
[Win] Layout Test fast/css/crash-on-custom-cursor-when-loading.html is failing
https://bugs.webkit.org/show_bug.cgi?id=140425

Reviewed by Anders Carlsson.

* platform/win/CursorWin.cpp:
(WebCore::createSharedCursor): Return nullptr when operating system
cannot support the requested icon specification.
(WebCore::Cursor::ensurePlatformCursor): Check for 'createSharedCursor'
returning nullptr, and fall back to the default icon construction.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178424 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoAdded availability annotations to some modern Cocoa SPI.
mitz@apple.com [Wed, 14 Jan 2015 18:01:45 +0000 (18:01 +0000)]
Added availability annotations to some modern Cocoa SPI.

Rubber-stamped by Anders Carlsson.

* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178423 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Wed, 14 Jan 2015 17:58:04 +0000 (17:58 +0000)]
[Win] Unreviewed gardening.

* platform/win/TestExpectations: Add a Crash expectation now that
https://bugs.webkit.org/show_bug.cgi?id=140444 has been filed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178422 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoRemove WK2 Windows cruft
ossy@webkit.org [Wed, 14 Jan 2015 16:13:09 +0000 (16:13 +0000)]
Remove WK2 Windows cruft
https://bugs.webkit.org/show_bug.cgi?id=140440

Reviewed by Anders Carlsson.

* WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp: Removed.
* WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp: Removed.
* WebKitTestRunner/InjectedBundle/win/TestRunnerWin.cpp: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178421 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed fix after r163330.
ossy@webkit.org [Wed, 14 Jan 2015 16:10:00 +0000 (16:10 +0000)]
Unreviewed fix after r163330.

* wtf/Platform.h: Use C style comment.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178420 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoC++ style comment was preventing compile if CPU(ARM_NEON)
ossy@webkit.org [Wed, 14 Jan 2015 16:09:41 +0000 (16:09 +0000)]
C++ style comment was preventing compile if CPU(ARM_NEON)
https://bugs.webkit.org/show_bug.cgi?id=133827

Patch by Marc Juul <juul@sudomesh.org> on 2015-01-14
Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178419 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION(r178367): [GStreamer] Several media tests time out after r178367
carlosgc@webkit.org [Wed, 14 Jan 2015 11:54:50 +0000 (11:54 +0000)]
REGRESSION(r178367): [GStreamer] Several media tests time out after r178367
https://bugs.webkit.org/show_bug.cgi?id=140437

Reviewed by Philippe Normand.

Add implementation for MediaPlayerPrivate::rate() to GStreamer
media backend.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::rate):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178418 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[GTK] Fix build after r178385
carlosgc@webkit.org [Wed, 14 Jan 2015 10:21:58 +0000 (10:21 +0000)]
[GTK] Fix build after r178385
https://bugs.webkit.org/show_bug.cgi?id=140429

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-01-14
Reviewed by Csaba Osztrogonác.

* UIProcess/API/gtk/WebKitUserContentManager.cpp:
(_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178417 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed, rolling out r178412.
commit-queue@webkit.org [Wed, 14 Jan 2015 10:18:36 +0000 (10:18 +0000)]
Unreviewed, rolling out r178412.
https://bugs.webkit.org/show_bug.cgi?id=140433

Wrong fix (Requested by KaL on #webkit).

Reverted changeset:

"Unreviewed GTK build fix after r178385."
http://trac.webkit.org/changeset/178412

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178416 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[GTK] Do not schedule a redraw for the redirected XComposite window when not in accel...
carlosgc@webkit.org [Wed, 14 Jan 2015 09:03:36 +0000 (09:03 +0000)]
[GTK] Do not schedule a redraw for the redirected XComposite window when not in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140354

Reviewed by Martin Robinson.

The RedirectedXCompositeWindow uses XDamage to be notified when
the XWindow has been modified. Since the redirected window is
created unconditionally we always receive a XDamage notify when
the window is mapped, and we schedule a redraw in the web view
even when the web view is not in accelerated compositing mode.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Only call gtk_widget_queue_draw() when
in accelerated compositing mode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178415 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[GTK] Do not resize the redirected XComposite window when not in accelerated composit...
carlosgc@webkit.org [Wed, 14 Jan 2015 09:00:14 +0000 (09:00 +0000)]
[GTK] Do not resize the redirected XComposite window when not in accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140353

Reviewed by Martin Robinson.

We create the redirected XComposite window unconditionally, but
with a size of 1x1 to save memory. However, we are always resizing
it, so in the end we always end up with a XWindow allocated for
the same size of the web view, even for web views that never enter
in accelerated compositing mode.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewRenderAcceleratedCompositingResults): Resize the
RedirectedXCompositeWindow to the current web view size to ensure
the sizes match before drawing.
(resizeWebKitWebViewBaseFromAllocation): Only resize the
RedirectedXCompositeWindow when in accelerated compositing mode.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::RedirectedXCompositeWindow::resize): Return early if the
given size is the current size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178414 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoREGRESSION(r177075): Flickering when the WebView is realized
carlosgc@webkit.org [Wed, 14 Jan 2015 08:55:51 +0000 (08:55 +0000)]
REGRESSION(r177075): Flickering when the WebView is realized
https://bugs.webkit.org/show_bug.cgi?id=140352

Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize): Pass the parent GdkWindow to the
RedirectedXCompositeWindow constructor.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp:
(WebKit::supportsXDamageAndXComposite): Get the display from the
given GdkWindow.
(WebKit::RedirectedXCompositeWindow::create): Receive a GdkWindow
instead of the Display and sise that is always 1x1.
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
Use the passed in GdkWindow to get the Display, Visual and Depth
instead of using the window as parent and reparent afterwards.
* UIProcess/gtk/RedirectedXCompositeWindow.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178413 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed GTK build fix after r178385.
yoon@igalia.com [Wed, 14 Jan 2015 08:34:21 +0000 (08:34 +0000)]
Unreviewed GTK build fix after r178385.

WebUserContentControllerProxy is not RefCounted anymore.

* UIProcess/API/gtk/WebKitUserContentManager.cpp:
(_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178412 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed, rolling out r178390, r178392, r178398, r178400,
commit-queue@webkit.org [Wed, 14 Jan 2015 08:10:05 +0000 (08:10 +0000)]
Unreviewed, rolling out r178390, r178392, r178398, r178400,
r178402, and r178410.
https://bugs.webkit.org/show_bug.cgi?id=140431

Way too many failures to skip (Requested by ap_ on #webkit).

Reverted changesets:

"WebGL2: Support webgl2 context creation."
https://bugs.webkit.org/show_bug.cgi?id=126408
http://trac.webkit.org/changeset/178390

"Unreviewed iOS build fix after r178390."
http://trac.webkit.org/changeset/178392

"[Unreviewed] Windows build fix after r178390."
http://trac.webkit.org/changeset/178398

"[Unreviewed] Speculative test fix after r178390."
http://trac.webkit.org/changeset/178400

"[Unreviewed] Skip webgl tests for temporarily."
https://bugs.webkit.org/show_bug.cgi?id=140423
http://trac.webkit.org/changeset/178402

"[EFL] Fix build after r178390"
https://bugs.webkit.org/show_bug.cgi?id=140424
http://trac.webkit.org/changeset/178410

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178411 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[EFL] Fix build after r178390
ossy@webkit.org [Wed, 14 Jan 2015 07:29:48 +0000 (07:29 +0000)]
[EFL] Fix build after r178390
https://bugs.webkit.org/show_bug.cgi?id=140424

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-01-13
Reviewed by Csaba Osztrogonác.

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed GTK build fix after r178375.
cdumez@apple.com [Wed, 14 Jan 2015 06:58:38 +0000 (06:58 +0000)]
Unreviewed GTK build fix after r178375.

uint64_t navigationID -> API::Navigation*.

* UIProcess/API/gtk/WebKitLoaderClient.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178409 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoUnreviewed GTK build fix after r178375.
cdumez@apple.com [Wed, 14 Jan 2015 06:08:49 +0000 (06:08 +0000)]
Unreviewed GTK build fix after r178375.

WebFrameProxy is now a reference instead of a pointer.

* UIProcess/API/gtk/WebKitLoaderClient.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178408 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoSimple line layout: Refactor TextFragment class.
zalan@apple.com [Wed, 14 Jan 2015 05:04:04 +0000 (05:04 +0000)]
Simple line layout: Refactor TextFragment class.
https://bugs.webkit.org/show_bug.cgi?id=140417

Reviewed by Andreas Kling.

Introduce text fragment type and use class member initializers.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178407 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoFix TestWTF failed in TestWebKitAPI
commit-queue@webkit.org [Wed, 14 Jan 2015 05:01:18 +0000 (05:01 +0000)]
Fix TestWTF failed in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=140333

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-01-13
Reviewed by Sam Weinig.

Clear the std::ostringstream before starting test.

* TestWebKitAPI/Tests/WTF/RefLogger.h:
(TestWebKitAPI::DerivedRefLogger::DerivedRefLogger):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178406 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years ago[Win] Unreviewed test gardening.
bfulgham@apple.com [Wed, 14 Jan 2015 04:38:21 +0000 (04:38 +0000)]
[Win] Unreviewed test gardening.

* platform/win/TestExpectations: Add Debug Crash documentation now that Bug 140425 has been filed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178405 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoWeb Inspector: TextEditor doesn't update when resizing console, white space instead...
commit-queue@webkit.org [Wed, 14 Jan 2015 03:39:10 +0000 (03:39 +0000)]
Web Inspector: TextEditor doesn't update when resizing console, white space instead of content
https://bugs.webkit.org/show_bug.cgi?id=140240

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-13
Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WebInspector._consoleResizerMouseDown.dockedResizerDrag):
Dispatch the event that signals the console has changed size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178404 268f45cc-cd09-0410-ab3c-d52691b4dbfc