WebKit-https.git
5 years ago[WinCairo] Crash when font data pointer is null.
commit-queue@webkit.org [Mon, 5 Jan 2015 15:05:46 +0000 (15:05 +0000)]
[WinCairo] Crash when font data pointer is null.
https://bugs.webkit.org/show_bug.cgi?id=139969

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-01-05
Reviewed by Darin Adler.

Source/WebCore:

Added null pointer check.

Test: fonts/unicode-character-font-crash.html

* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::advance):
(WebCore::UniscribeController::shape):

LayoutTests:

* fonts/unicode-character-font-crash-expected.txt: Added.
* fonts/unicode-character-font-crash.html: Added.

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

5 years ago[EFL][GTK] WKPreferencesDefaults test failed after r177506
commit-queue@webkit.org [Mon, 5 Jan 2015 13:07:59 +0000 (13:07 +0000)]
[EFL][GTK] WKPreferencesDefaults test failed after r177506
https://bugs.webkit.org/show_bug.cgi?id=140077

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

WebKit C SPI is available on EFL,GTK.
Changed the define order to pass the API test.

* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST):

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

5 years ago[GStreamer] Disable gst-plugin-scanner if seccomp filters are enabled
commit-queue@webkit.org [Mon, 5 Jan 2015 09:23:07 +0000 (09:23 +0000)]
[GStreamer] Disable gst-plugin-scanner if seccomp filters are enabled
https://bugs.webkit.org/show_bug.cgi?id=140069

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-01-05
Reviewed by Philippe Normand.

If seccomp filters are enabled, any child processes we create are doomed
if they try to use a trapped syscall: the child will receive SIGSYS and
dump core. There appears to be no way around this.

Fortunately, the gstreamer developers had mad prescience and provided
us with a way to move plugin scanning in-process, so we don't need the
helper binary at all.

No new tests because this is covered by existing tests when seccomp
filters are enabled.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::initializeGStreamer):

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

5 years ago* dom/DocumentFragment.cpp:
darin@apple.com [Mon, 5 Jan 2015 05:11:05 +0000 (05:11 +0000)]
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::parseXML):
Removed an incorrect assertion my last check-in added.

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

5 years agoModernize and tighten up HTMLDocumentParser
darin@apple.com [Mon, 5 Jan 2015 02:24:31 +0000 (02:24 +0000)]
Modernize and tighten up HTMLDocumentParser
https://bugs.webkit.org/show_bug.cgi?id=140041

Reviewed by Sam Weinig.

* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::parseHTML): Pass a reference instead of
a pointer for the context element.

* html/FTPDirectoryDocument.cpp: Removed unneeded includes, made more
things in FTPDirectoryDocumentParser private. Use Ref instead of RefPtr
in a could places. Initialize in class instead of in constructor.
(WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
Less initialization here.
(WebCore::FTPDirectoryDocumentParser::createTDForFilename): More Ref here.
(WebCore::createTemplateDocumentData): Removed unneeded initialization
of RefPtr, which is initialized without explicitly asking for it.
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): Reworded
comment slightly.

* html/parser/HTMLDocumentParser.cpp: Cut down on includes.
(WebCore::tokenizerStateForContextElement): Fixed URL. Changed argument
to be a reference rather than a pointer.
(WebCore::HTMLDocumentParser::inPumpSession):
(WebCore::HTMLDocumentParser::shouldDelayEnd):
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Marked constructors
inline. Updated for data members that are now objects instead of pointers.
Removed explicit initialization for scalars that are now initialized in
the class definition.
(WebCore::HTMLDocumentParser::create): Moved the private creation
functions in here, out of the header file.
(WebCore::HTMLDocumentParser::~HTMLDocumentParser): Removed unused
m_haveBackgroundParser.
(WebCore::HTMLDocumentParser::prepareToStopParsing): Updated URL and
removed m_haveBackgroundParser reference.
(WebCore::HTMLDocumentParser::processingData): Removed a check of
m_haveBackgroundParser.
(WebCore::HTMLDocumentParser::resumeParsingAfterYield): Tweak comment.
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Added
a null check of the result of takeScriptToProcess, since there really
is no guarantee it's non-null.
(WebCore::HTMLDocumentParser::canTakeNextToken): Removed assertion
that was for m_haveBackgroundParser cases only. Rewrapped comment.
(WebCore::HTMLDocumentParser::contextForParsingSession): Use nullptr.
(WebCore::HTMLDocumentParser::pumpTokenizer): Rework comments,
remove assertions that no longer make sense, use auto instead of
repeating a long type name, update to use m_token and m_tokenizer.
(WebCore::HTMLDocumentParser::hasInsertionPoint): Rewrapped comment.
(WebCore::HTMLDocumentParser::insert): Got rid of braces around a
single-line if body.
(WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
Removed comment about incorrect m_haveBackgroundParser assertion.
(WebCore::HTMLDocumentParser::isExecutingScript): Use && style instead
of early exit for a null check.
(WebCore::HTMLDocumentParser::textPosition): Tightened up code a little.
(WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): Added
a Ref to protect the parser, as is already done in every other function
that calls pumpTokenizerIfPossible.
(WebCore::HTMLDocumentParser::parseDocumentFragment): Take a reference
instead of a pointer. Also use auto so we get a Ref instead of a RefPtr.

* html/parser/HTMLDocumentParser.h: Removed unneeded includes.
Made private inheritance explicit instead of just omitting public.
Moved function bodies out of the class, and in some cases, out of the
header entirely. Return a reference from tokenizer(). Marked most
virtual functions final. Made DocumentFragment version of the
constructor private rather than protected. Made the functions
suspendScheduledTasks() and resumeScheduledTasks() private, since
they are always called through a base class. Removed the private
token function since it is better to get at m_token directly.
Removed m_haveBackgroundParser, since we don't have that any more
and it's always false. Also removed forcePlaintextForTextDocument
since the tokenizer is exposed and can be used directly to do that.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Made the parser non-const.
It could only be const before because HTMLDocumentParser::tokenizer
took a const parser and returned a non-const tokenizer, but that doesn't
really make sense.
(WebCore::HTMLTreeBuilder::constructTree): Removed null check for
tokenizer, which was never null. Updated since tokenizer is a reference.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto. Also fixed and removed
some assertions like the ones I did recently in the rest of this file.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.

* html/parser/HTMLTreeBuilder.h: Made HTMLDocumentParser& non-const.

* html/parser/TextDocumentParser.cpp: Removed unneeded include and
unneeded explicit destructor.
(WebCore::TextDocumentParser::TextDocumentParser): Updated since
treeBuilder() returns a reference now, and set the tokenizer state
directly since tokenizer() is exposed.

* html/parser/TextDocumentParser.h: Moved initialization of the
data member here instead of the constructor. Also removed unneeded
explicitly defined destructor.

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

5 years agofast/events/autoscroll-should-not-stop-on-keypress.html is flaky in debug builds
ap@apple.com [Mon, 5 Jan 2015 01:08:01 +0000 (01:08 +0000)]
fast/events/autoscroll-should-not-stop-on-keypress.html is flaky in debug builds
https://bugs.webkit.org/show_bug.cgi?id=140060

Reviewed by Darin Adler.

* fast/events/autoscroll-should-not-stop-on-keypress.html: Instead of waiting a
fixed amount of time, check if the test succeeded every 100ms. In addition to making
the test more reliable on slow builds, it makes the test faster in release mode.

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

5 years agoRemove GlyphPageTree
antti@apple.com [Mon, 5 Jan 2015 00:46:39 +0000 (00:46 +0000)]
Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015

Follow-up to follow-up, fonts/font-fallback-prefers-pictographs.html is now failing.

* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):

    Make the loop again go one past the last fallback index, the pictograph special case depends on it.

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

5 years agohttp/tests/security/cross-frame-access-put.html is racy
ap@apple.com [Mon, 5 Jan 2015 00:16:12 +0000 (00:16 +0000)]
http/tests/security/cross-frame-access-put.html is racy
https://bugs.webkit.org/show_bug.cgi?id=140059

Reviewed by Darin Adler.

This test used to run some code in a subframe on a zero delay timer, and some more
code in a main frame in onload. The order was undefined.

* http/tests/security/cross-frame-access-put-expected.txt:
* http/tests/security/cross-frame-access-put.html:
* http/tests/security/resources/cross-frame-iframe-for-put-test.html:

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

5 years agoREGRESSION: plugins/plugin-remove-readystatechange.html is failing on debug bots
ap@apple.com [Mon, 5 Jan 2015 00:04:40 +0000 (00:04 +0000)]
REGRESSION: plugins/plugin-remove-readystatechange.html is failing on debug bots
https://bugs.webkit.org/show_bug.cgi?id=126169

Reviewed by Antti Koivisto.

* plugins/plugin-remove-readystatechange.html: Move the embed so that it's not the
last rendered element in the test. It's only a workaround, not a real fix - if
anyone is interested in fixing the issue for real, please file a new bug.
Also, demystified the test by using readyState instead of counting readystatechange
events.

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

5 years agoRemove GlyphPageTree
antti@apple.com [Sun, 4 Jan 2015 23:38:36 +0000 (23:38 +0000)]
Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015

Follow-up to r177876 to fix mathml/opentype/munderover-layout-resize.html which is asserting in bots.

* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalVariant):

Always return system fallback if no glyph is found.

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

5 years agoiOS build fix.
mitz@apple.com [Sun, 4 Jan 2015 23:27:37 +0000 (23:27 +0000)]
iOS build fix.

* platform/graphics/SimpleFontData.cpp:
(WebCore::createAndFillGlyphPage):

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

5 years agoRemove GlyphPageTree
antti@apple.com [Sun, 4 Jan 2015 21:26:17 +0000 (21:26 +0000)]
Remove GlyphPageTree
https://bugs.webkit.org/show_bug.cgi?id=140015

Reviewed by Darin Adler.

GlyphPageTree is a global cache consisting of a tree of nodes that match SimpleFontData instances.
The tree levels correspond to font fallback lists so that higher levels fill holes (missing glyphs)
in the lower levels. This patch replaces it with a simpler and easier to understand caching scheme.
In particular the goal is to have clearer ownership relations and better control over mutability.

The new scheme looks like this:

SimpleFontData instances cache GlyphPages for themselves. These pages are immutable after construction
and may contain holes. This is a global cache (since SimpleFontDatas are cached globally) with the same
lifetime as the GlyphPageTree used to have.

FontGlyphs instances cache resolved GlyphPages for the normal font variant. These are build by traversing
the fallback list as necessary and collecting glyphs from SimpleFontDatas. As a common case case optimization
the page from the primary font is cached directly as long as it has the requested glyphs.
FontGlyphs are shared between sufficiently similar Font instances so this is a shared cache as well.

* CMakeLists.txt:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):

    nonCJKGlyphOrientation matters for glyph selection too and needs to be part of the FontDescription cache key.

* platform/graphics/FontData.h:
(WebCore::FontData::FontData):
(WebCore::FontData::setMaxGlyphPageTreeLevel): Deleted.
(WebCore::FontData::maxGlyphPageTreeLevel): Deleted.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::primaryFontHasGlyphForCharacter):
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::glyphDataForCJKCharacterWithoutSyntheticItalic):
(WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
(WebCore::FontGlyphs::glyphDataForSystemFallback):
(WebCore::FontGlyphs::glyphDataForVariant):
(WebCore::FontGlyphs::glyphDataForNormalCharacter):

    Traverse the fallback list by using simple index instead of indirectly via GlyphPageTreeNode traversal.

(WebCore::pageFromFontData):

    Fetch a page from the primary font and see if we can use it as-is.
    Vertical fonts have special glyph selection and can't use this path.

(WebCore::FontGlyphs::createFlattenedGlyphPage):

    Build a hole-free glyph page by pulling characters from the fallback list.

(WebCore::FontGlyphs::glyphDataForCharacter):
* platform/graphics/FontGlyphs.h:
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/GlyphPage.h:
(WebCore::GlyphPage::createForMixedFontData):
(WebCore::GlyphPage::createCopyForMixedFontData):

    Add copy version.

(WebCore::GlyphPage::createForSingleFontData):

    Remove owner node field.

(WebCore::GlyphPage::~GlyphPage):
(WebCore::GlyphPage::count):
(WebCore::GlyphPage::GlyphPage):
(WebCore::GlyphPage::createCopiedSystemFallbackPage): Deleted.
(WebCore::GlyphPage::owner): Deleted.
* platform/graphics/GlyphPageTreeNode.cpp: Removed.
* platform/graphics/GlyphPageTreeNode.h: Removed.
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::SegmentedFontData):
(WebCore::SegmentedFontData::~SegmentedFontData):
(WebCore::SegmentedFontData::simpleFontDataForCharacter):

    Return null when there is no usable range so the client can tell the difference.
    Rename for clarity.

(WebCore::SegmentedFontData::simpleFontDataForFirstRange):

    Add a way to get the fallback font separately. This is always available.

(WebCore::SegmentedFontData::isLoading):
(WebCore::SegmentedFontData::fontDataForCharacter): Deleted.
* platform/graphics/SegmentedFontData.h:
(WebCore::SegmentedFontData::SegmentedFontData): Deleted.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::initCharWidths):
(WebCore::SimpleFontData::platformGlyphInit):
(WebCore::SimpleFontData::~SimpleFontData):
(WebCore::SimpleFontData::simpleFontDataForCharacter):
(WebCore::fillGlyphPage):
(WebCore::createAndFillGlyphPage):

    Move code for initializing glyph pages here. The code is from GlyphPageTreeNode.

(WebCore::SimpleFontData::glyphPage):

    Cache glyphs for this font. These pages may have holes.

(WebCore::SimpleFontData::glyphForCharacter):
(WebCore::SimpleFontData::glyphDataForCharacter):
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):

    Since the cache is now owned by the SimpleFontData all the custom pruning can go away.
    The glyph page cache dies along with it owner.

(WebCore::SimpleFontData::fontDataForCharacter): Deleted.
* platform/graphics/SimpleFontData.h:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList objectAtIndex:]):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::fontDataForCombiningCharacterSequence):
* platform/graphics/mac/GlyphPageMac.cpp: Copied from Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp.

    This was already misnamed.

(WebCore::GlyphPage::fill):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Removed.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore::SimpleFontData::platformInit):
* platform/mac/DragImageMac.mm:

    Add missing FontCachePurgePreventer.

(WebCore::createDragImageForLink):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData):
* svg/SVGFontElement.cpp:

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

5 years agoClean up some of the IPC code
andersca@apple.com [Sun, 4 Jan 2015 20:14:45 +0000 (20:14 +0000)]
Clean up some of the IPC code
https://bugs.webkit.org/show_bug.cgi?id=140057

Reviewed by Antti Koivisto.

Use std::mutex instead of WTF::Mutex. Change a couple of pointers to references in the connection client.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didClose):
(WebKit::DatabaseProcess::didReceiveInvalidMessage):
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didClose):
(WebKit::DatabaseToWebProcessConnection::didReceiveInvalidMessage):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkProcess.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::sendMessage):
(IPC::Connection::waitForMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::sendOutgoingMessages):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::dispatchMessage):
(IPC::Connection::dispatchOneMessage):
* Platform/IPC/Connection.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::didClose):
(WebKit::PluginProcess::didReceiveInvalidMessage):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didClose):
(WebKit::WebProcessConnection::didReceiveInvalidMessage):
* PluginProcess/WebProcessConnection.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didClose):
(WebKit::DatabaseProcessProxy::didReceiveInvalidMessage):
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::didReceiveInvalidMessage):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didClose):
(WebKit::PluginProcessProxy::didReceiveInvalidMessage):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::didReceiveInvalidMessage):
* UIProcess/WebProcessProxy.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didClose):
(WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage):
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::didReceiveInvalidMessage):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didClose):
(WebKit::PluginProcessConnection::didReceiveInvalidMessage):
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::didReceiveInvalidMessage):
* WebProcess/WebProcess.h:

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

5 years agoRemove an unused function
andersca@apple.com [Sun, 4 Jan 2015 19:39:13 +0000 (19:39 +0000)]
Remove an unused function
https://bugs.webkit.org/show_bug.cgi?id=140055

Reviewed by Sam Weinig.

* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::setReadOnly): Deleted.
* Modules/webdatabase/DatabaseAuthorizer.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::setAuthorizerReadOnly): Deleted.
* Modules/webdatabase/DatabaseBackendBase.h:

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

5 years agoModernize parts of the database code
andersca@apple.com [Sun, 4 Jan 2015 18:57:44 +0000 (18:57 +0000)]
Modernize parts of the database code
https://bugs.webkit.org/show_bug.cgi?id=140054

Reviewed by Antti Koivisto.

* Modules/webdatabase/Database.cpp:
(WebCore::Database::runTransaction):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::create):
(WebCore::SQLTransaction::SQLTransaction):
(WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
(WebCore::SQLTransaction::executeSQL):
* Modules/webdatabase/SQLTransaction.h:
(WebCore::SQLTransaction::database):

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

5 years agoMove the CSS Grid properties to the new StyleBuilder
cdumez@apple.com [Sun, 4 Jan 2015 06:35:04 +0000 (06:35 +0000)]
Move the CSS Grid properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140051

Reviewed by Sam Weinig.

Move the CSS Grid properties from StyleResolver to the new
StyleBuilder.

This patch adds support for "ConditionalConverter" parameter in
CSSPropertyNames.in to support cases where we only want to call the
property setter conditionally. The converter function is then expected
to return a boolean to indicate if the setter should be called by the
StyleBuilder or not.

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

5 years agoCrash in operationNewFunction when scrolling on Google+
msaboff@apple.com [Sun, 4 Jan 2015 03:47:25 +0000 (03:47 +0000)]
Crash in operationNewFunction when scrolling on Google+
https://bugs.webkit.org/show_bug.cgi?id=140033

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

In DFG code, the scope register can be eliminated because all uses have been
dead code eliminated.  In the case where one of the uses was creating a function
that is never used, the baseline code will still create the function.  If we OSR
exit to a path where that function gets created, check the scope register value
and set the new, but dead, function to undefined instead of creating a new function.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_new_func_exp):

LayoutTests:

New regerssion test.

* js/regress-140033-expected.txt: Added.
* js/regress-140033.html: Added.
* js/script-tests/regress-140033.js: Added.
(.unused):
(defineADeadFunction):

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

5 years agoSimplify WebKitTestRunner timeout tracking
ap@apple.com [Fri, 2 Jan 2015 22:49:44 +0000 (22:49 +0000)]
Simplify WebKitTestRunner timeout tracking
https://bugs.webkit.org/show_bug.cgi?id=140036

Reviewed by Darin Adler.

The code for configuring timeouts was mostly dead, because run-webkit-tests never
passes the --timeout option to WebKitTestRunner.

* WebKitTestRunner/Options.h:
* WebKitTestRunner/Options.cpp:
(WTR::Options::Options):
(WTR::OptionsHandler::OptionsHandler):
(WTR::handleOptionTimeout): Deleted.
Removed support for --timeout. Timeouts are passed for each test individually,
and defaults are good enough for the rare cases where WebKitTestRunner is run
manually without run-webkit-tests.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::reattachPageToWebProcess):
(WTR::TestController::runUntil):
* WebKitTestRunner/TestController.h:
Simplified runUntil by passing the actual timeout, not an enum.
Increased short timeout for ASan enabled builds, as WebProcess launching takes
quite a while.

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke): Removed dead code that handled a timeout from NoTimeout.

* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::platformRunUntil):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformRunUntil):
Build fixes.

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

5 years agoKill the DeprecatedStyleBuilder
cdumez@apple.com [Fri, 2 Jan 2015 22:40:14 +0000 (22:40 +0000)]
Kill the DeprecatedStyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140034

Reviewed by Darin Adler.

Move FillLayer properties to the new StyleBuilder and get rid of the
DeprecatedStyleBuilder now that all its CSS properties have been ported
to the new StyleBuilder.

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

5 years agoRemove now unused storage tracker glue from DumpRenderTree
andersca@apple.com [Fri, 2 Jan 2015 20:07:40 +0000 (20:07 +0000)]
Remove now unused storage tracker glue from DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=140045

Reviewed by Darin Adler.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/StorageTrackerDelegate.h: Removed.
* DumpRenderTree/StorageTrackerDelegate.mm: Removed.
* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
(syncLocalStorageCallback): Deleted.
(observeStorageTrackerNotificationsCallback): Deleted.
(deleteAllLocalStorageCallback): Deleted.
(deleteLocalStorageForOriginCallback): Deleted.
(localStorageDiskUsageForOriginCallback): Deleted.
(originsWithLocalStorageCallback): Deleted.
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(allocateGlobalControllers):
(releaseGlobalControllers):
* DumpRenderTree/mac/DumpRenderTreeMac.h:
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::syncLocalStorage): Deleted.
(TestRunner::localStorageDiskUsageForOrigin): Deleted.
(TestRunner::observeStorageTrackerNotifications): Deleted.
(TestRunner::deleteAllLocalStorage): Deleted.
(TestRunner::originsWithLocalStorage): Deleted.
(TestRunner::deleteLocalStorageForOrigin): Deleted.
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::syncLocalStorage): Deleted.
(TestRunner::localStorageDiskUsageForOrigin): Deleted.
(TestRunner::observeStorageTrackerNotifications): Deleted.
(TestRunner::deleteAllLocalStorage): Deleted.
(TestRunner::originsWithLocalStorage): Deleted.
(TestRunner::deleteLocalStorageForOrigin): Deleted.

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

5 years agoGet rid of storage tracker layout tests
andersca@apple.com [Fri, 2 Jan 2015 19:57:00 +0000 (19:57 +0000)]
Get rid of storage tracker layout tests
https://bugs.webkit.org/show_bug.cgi?id=140044

Reviewed by Darin Adler.

These tests are very flaky since they expect to be run in order. Furthermore, they were testing a WebKit Mac SPI
that is pretty hard to test reliably, due to its "design". It's not worth trying to make these tests work
or to rewrite them in Objective-C (which would be the right thing to do), so just get rid of them.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:
* storage/domstorage/localstorage/storagetracker/storage-tracker-1-prepare-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-1-prepare.html: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-2-create-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-2-create.html: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-3-delete-all-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-3-delete-all.html: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-4-create-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-4-create.html: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-5-delete-one-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-5-delete-one.html: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-6-create-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-6-create.html: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-7-usage-expected.txt: Removed.
* storage/domstorage/localstorage/storagetracker/storage-tracker-7-usage.html: Removed.

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

5 years agoMove 'font-size' CSS property to the new StyleBuilder
cdumez@apple.com [Fri, 2 Jan 2015 19:53:38 +0000 (19:53 +0000)]
Move 'font-size' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140010

Reviewed by Darin Adler.

Move 'font-size' CSS property to the new StyleBuilder by using custom
code.

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

5 years agojs/dom/Promise.html is flaky
ap@apple.com [Fri, 2 Jan 2015 18:32:38 +0000 (18:32 +0000)]
js/dom/Promise.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=140043

* TestExpectations: Mark it as such.

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

5 years agoPass Document instead of ScriptExecutionContext to non-worker constructors
darin@apple.com [Fri, 2 Jan 2015 18:18:40 +0000 (18:18 +0000)]
Pass Document instead of ScriptExecutionContext to non-worker constructors
https://bugs.webkit.org/show_bug.cgi?id=140040

Reviewed by Sam Weinig.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
Generate code passing the document when ConstructorCallWith=Document is used.
Later, we could base this on whether the constructor is exposed to workers
or not, instead, but for now this seems a clean way to do it.

* bindings/scripts/IDLAttributes.txt: Allow ConstructorCallWith=Document.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
* Modules/notifications/Notification.h:
* Modules/notifications/Notification.idl:
* dom/Comment.cpp:
* dom/Comment.h:
* dom/Comment.idl:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::nodeName): Use ASCIILiteral (just something
I noticed in passing).
* dom/DocumentFragment.h:
* dom/DocumentFragment.idl:
* dom/Range.cpp:
* dom/Range.h:
* dom/Range.idl:
* dom/Text.cpp:
* dom/Text.h:
* dom/Text.idl:
Change from ScriptExecutionContext to Document, and remove unneeded
overloads that were just casting. It's better to have the bindings
layer, which knows these are not ScriptExecutionContext, do the cast
than to have create functions that cast that are not in any position
to know the cast is safe.

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

5 years agoRe-land the HTMLTreeBuilder change with the assertion fixed.
darin@apple.com [Fri, 2 Jan 2015 18:17:05 +0000 (18:17 +0000)]
Re-land the HTMLTreeBuilder change with the assertion fixed.
https://bugs.webkit.org/show_bug.cgi?id=140032

Reviewed by Andreas Kling.

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

5 years agoUnreviewed, rolling out r177859 and r177861.
commit-queue@webkit.org [Fri, 2 Jan 2015 18:07:48 +0000 (18:07 +0000)]
Unreviewed, rolling out r177859 and r177861.
https://bugs.webkit.org/show_bug.cgi?id=140042

Caused many assertion failures (Requested by ap on #webkit).

Reverted changesets:

"Modernize coding style of HTMLTreeBuilder"
https://bugs.webkit.org/show_bug.cgi?id=140032
http://trac.webkit.org/changeset/177859

"Tried to fix the iOS build."
http://trac.webkit.org/changeset/177861

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

5 years agoTried to fix the iOS build.
mitz@apple.com [Fri, 2 Jan 2015 17:45:45 +0000 (17:45 +0000)]
Tried to fix the iOS build.

* html/parser/HTMLTreeBuilder.cpp:

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

5 years agoRework code that hides characters in password fields to streamline a little
darin@apple.com [Fri, 2 Jan 2015 16:33:40 +0000 (16:33 +0000)]
Rework code that hides characters in password fields to streamline a little
https://bugs.webkit.org/show_bug.cgi?id=140035

Reviewed by Sam Weinig.

Source/WebCore:

* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::doApply): Pass the offset after the character
we want to reveal instead of the offset before. This is more future proof if we
ever want to handling surrogate pairs or combining marks, rather than hard
coding the likely incorrect rule of "go back by one code unit". Also got rid of
the isSecure check here, since RenderText can do that check inside the
momentarilyRevealLastTypedCharacter instead.

* rendering/RenderText.cpp: Tweaked the SecureTextTimer class: Marked it final
and made it derive from TimerBase privately. Made the constructor explicit and
made it take a reference rather than a pointer. Use initialization in the class
to set up the variable, and use 0 as the special value instead of -1 since we
now store the offset *after* the character to be revealed.
(WebCore::secureTextTimers): Use this function and NeverDestroyed rather than
a global variable gSecureTextTimers. Also use unique_ptr for the map so we
don't have to delete explicitly any more.
(WebCore::SecureTextTimer::SecureTextTimer): Moved out of the class definition
so the class ia a little easier to read.
(WebCore::SecureTextTimer::restart): Renamed since the function name doesn't
have to describe its argument; the function is only called in one place.
(WebCore::SecureTextTimer::takeOffsetAfterLastTypedCharacter): Changed name
and made this a one-shot that always zeroes the offset.
(WebCore::SecureTextTimer::fired): Moved out of line and tweaked as above.
(WebCore::RenderText::willBeDestroyed): Simplified now that the function
secureTextTimers() always returns a map and we can just remove since the
values in the map are unique_ptr, so take care of deletion.
(WebCore::RenderText::setRenderedText): Tweaked the code that calls secureText
to make the iOS case clearer.
(WebCore::RenderText::secureText): Rewrote the function. New version no
longer relies on a special String::fill function; it's kind of strange that
String had a built in concept of replacing a string with one that has the
same length but all with a masking character. This new approach is cleaner.
I had written a version that handles surrogate pairs and combining marks,
but then instead wrote a comment explaining why that's not needed/helpful.
(WebCore::RenderText::momentarilyRevealLastTypedCharacter): Added a check so
this does nothing if we are not securing the text. Also updated logic so that
this doesn't double hash any more and updated for other changes like using
a reference instead of a pointer.

* rendering/RenderText.h: Removed the unneeded isSecure function and updated
the argument name in momentarilyRevealLastTypedCharacter since it's now the
offset after the character, not before the character.

Source/WTF:

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::fill): Deleted.
* wtf/text/StringImpl.h: Deleted StringImpl::fill.
* wtf/text/WTFString.h:
(WTF::String::fill): Deleted.

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

5 years agoModernize coding style of HTMLTreeBuilder
darin@apple.com [Fri, 2 Jan 2015 16:31:49 +0000 (16:31 +0000)]
Modernize coding style of HTMLTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=140032

Reviewed by Andreas Kling.

Changes include:
- Use references rather than pointers.
- Mark data members const that are fully set up in the constructor.
- Remove many unneeded includes and forward declarations.
- Fix conditionals to be consistent and correct.
- Merge some multi-line constructs into a single line.
- Update whatwg.org URLs; not sure we should keep these, though.
- Cut down on use of WTF_MAKE_NONCOPYABLE since for many classes it's
  impossible to copy anyway due to references, or harmless to copy.
- Made more things private.
- Initialize scalars in the class definition rather than each constructor.
- Use Ref/RefPtr instead of PassRefPtr.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::HTMLDocumentParser): Pass reference rather than pointer to
the context element.
(WebCore::HTMLDocumentParser::detach): Removed call to HTMLTreeBuilder::detach. This work
is instead done when the tree builder is destroyed.
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Pass reference rather than pointer.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::uninitializedPositionValue1): Marked this inline because it's trivial. It was
probably getting inlined already.
(WebCore::isCaptionColOrColgroupTag): Format on a single line.
(WebCore::isTableBodyContextTag): Ditto.
(WebCore::isNonAnchorFormattingTag): Ditto.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
Take reference instead of pointer.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemaining): Use makeString helper.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeading): Tweak formatting.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): Both of the above.
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::makeString): Added.
(WebCore::HTMLTreeBuilder::isParsingTemplateContents): Moved the body of this function here,
since it's only used inside the class.
(WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents): Ditto.
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Get rid of dead code that handles a null context
element. The FIXME mentions a bug that is obsolete. Also reorder the data members to be a bit
more logical and set the new m_destructionProhibited to false at the end of the constructor,
to check if we accidentally destroy the tree builder while constructing it.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): Updated to take
a reference and to let m_fragment get initialized in the class definition.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::fragment): Moved this here since it's only
used inside the class.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): Ditto.
(WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElementStackItem): Ditto.
(WebCore::HTMLTreeBuilder::takeScriptToProcess): Changed return type to RefPtr instead of
PassRefPtr. Added code to handle m_scriptToProcess of null, since reading the code at the
single call site makes it clear that it's not guaranteed to be non-null! Added destruction-
related assertions since this is a public function.
(WebCore::HTMLTreeBuilder::constructTree): Updated for reference rather than pointer. Also
added destruction-related assertions since this is a public function.
(WebCore::HTMLTreeBuilder::processToken): Updated to take a reference.
(WebCore::HTMLTreeBuilder::processDoctypeToken): Ditto.
(WebCore::HTMLTreeBuilder::processFakeStartTag): Ditto. Also take an rvalue reference for
the vector of attributes that we will put into the token.
(WebCore::HTMLTreeBuilder::processFakeEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope): Ditto.
(WebCore::HTMLTreeBuilder::attributesForIsindexInput): Ditto.
(WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody): Ditto.
(WebCore::isLi): Ditto.
(WebCore::isDdOrDt): Ditto.
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): Changed loop to use reference
rather than pointer for never-null stackItem. Also use auto and a for loop to make the
loop easier to read.
(WebCore::createCaseMap): Tweaked formatting.
(WebCore::adjustAttributes): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Use reference instead of pointer.
Set insertion mode directly instead of using a setInsertionMode function.
(WebCore::HTMLTreeBuilder::processTemplateStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processTemplateEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents): Ditto.
(WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup): Ditto.
(WebCore::HTMLTreeBuilder::closeTheCell): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processStartTag): Ditto. Tweaked assertions, so that we
assert what state we are in before we fall through to each case, rather than asserting
inside each case. The per-case assertions were sort of excessive and repetitive and
even a bit hard to understand.
(WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processBodyEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Ditto.
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInTableBody): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInCell): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption): Ditto.
(WebCore::HTMLTreeBuilder::processTrEndTagForInRow): Ditto.
(WebCore::HTMLTreeBuilder::processTableEndTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTagForInTable): Ditto.
(WebCore::HTMLTreeBuilder::processEndTag): Ditto.
(WebCore::HTMLTreeBuilder::processComment): Ditto.
(WebCore::HTMLTreeBuilder::processCharacter): Ditto.
(WebCore::HTMLTreeBuilder::insertPhoneNumberLink): Ditto.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Ditto.
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody): Ditto.
(WebCore::HTMLTreeBuilder::processEndOfFile): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInitial): Ditto.
(WebCore::HTMLTreeBuilder::defaultForBeforeHTML): Ditto.
(WebCore::HTMLTreeBuilder::defaultForBeforeHead): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInHead): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInHeadNoscript): Ditto.
(WebCore::HTMLTreeBuilder::defaultForAfterHead): Ditto.
(WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInHead): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag): Ditto.
(WebCore::HTMLTreeBuilder::processScriptStartTag): Ditto.
(WebCore::HTMLTreeBuilder::adjustedCurrentStackItem): Made this return a reference.
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent): More of the same.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.
(WebCore::HTMLTreeBuilder::finished): Changed m_isAttached assertion to !m_destroyed.
Also updated the comment.
(WebCore::HTMLTreeBuilder::parseError): Marked this empty function inline.

* html/parser/HTMLTreeBuilder.h: Removed most includes and forward declarations.
Changed the phone number functions conditional to be correct. Removed a non-helpful
FIXME about assertions we really don't need. Removed unneeded use of the inline keyword,
changed types to references rather than pointer. Removed unneeded public insertionMode
and setInsertionMode functions. Both are things that are only done inside this class and
m_insertionMode can be accessed directly instead. Added a destructor that implements
the destruction assertions. Asserted !m_destroyed at the start of all the public functions.

* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement): Use reference rather than pointer.

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

5 years ago[CSS Grid Layout] Remove stack from grid-auto-flow syntax
rego@igalia.com [Fri, 2 Jan 2015 10:01:11 +0000 (10:01 +0000)]
[CSS Grid Layout] Remove stack from grid-auto-flow syntax
https://bugs.webkit.org/show_bug.cgi?id=134842

Reviewed by Sergio Villar Senin.

Source/WebCore:

"stack" mode for grid-auto-flow property has been removed from the grid
layout spec. New syntax is:
  [ row | column ] || dense

Modified parsing in order to adapt it to the new syntax.

Also the current behavior relying on "stack" has been updated following
the spec. Now it won't be possible to mimic the old "none" (or "stack")
unless you specify manually the grid-placement properties.

No new tests needed, updated current tests to adapt them to the new
behavior.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Adapt to new syntax.
* css/CSSParser.cpp:
(WebCore::isValidGridAutoFlowId): Remove "stack" from valid ids.
(WebCore::CSSParser::parseGridAutoFlow): Adapt to new syntax.
* css/CSSValueKeywords.in: Remove "stack".
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Adapt to new syntax.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeItemsOnGrid): Remove old "stack" code.
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::resolveGridPositionsFromStyle): If we
cannot resolve positions, we have to run the auto-placement algorithm.
* rendering/style/RenderStyle.h: Remove "stack".
* rendering/style/RenderStyleConstants.h: Ditto.

LayoutTests:

Update layout tests in order to adapt the results to the new behavior.

* fast/css-grid-layout/grid-auto-flow-get-set-expected.txt:
* fast/css-grid-layout/grid-auto-flow-get-set.html:
* fast/css-grid-layout/grid-auto-flow-update.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-z-index-change-repaint.html:
* fast/css-grid-layout/grid-item-z-index-stacking-context.html:
* fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
* fast/css-grid-layout/grid-shorthand-get-set.html:
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-dynamic-get-set.html:
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
* ietestcenter/css3/grid/grid-column-001.htm:
* ietestcenter/css3/grid/grid-column-002.htm:
* ietestcenter/css3/grid/grid-column-003.htm:

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

5 years agoRemove GroupSettings
commit-queue@webkit.org [Fri, 2 Jan 2015 05:26:52 +0000 (05:26 +0000)]
Remove GroupSettings
https://bugs.webkit.org/show_bug.cgi?id=140037

Patch by Sam Weinig <sam@webkit.org> on 2015-01-01
Reviewed by Dan Bernstein.

Source/WebCore:

Nothing sets the values in GroupSettings and nothing uses them.
- The indexedDBDatabasePath is accessed and sent to the IndexedDB backend,
  but the backend then proceeds to not use it.

* CMakeLists.txt:
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::getDatabaseNames):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBFactoryBackendInterface.cpp:
(WebCore::IDBFactoryBackendInterface::create):
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/PageGroupIndexedDatabase.cpp:
(WebCore::PageGroupIndexedDatabase::PageGroupIndexedDatabase):
(WebCore::PageGroupIndexedDatabase::from):
(WebCore::PageGroupIndexedDatabase::factoryBackend):
* Modules/indexeddb/PageGroupIndexedDatabase.h:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DocumentStyleSheetCollection.cpp:
* page/CaptionUserPreferences.cpp:
* page/Frame.cpp:
* page/GroupSettings.cpp: Removed.
* page/GroupSettings.h: Removed.
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings): Deleted.
* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend):
* platform/DatabaseStrategy.h:
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
(WebCore::SharedWorkerProxy::groupSettings): Deleted.
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::create):
(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
* workers/SharedWorkerGlobalScope.h:
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::SharedWorkerThread):
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerThread.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::groupSettings): Deleted.
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:

Source/WebKit2:

Remove unused databaseDirectoryIdentifier parameters.

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
(WebKit::WebIDBFactoryBackend::getDatabaseNames):
(WebKit::WebIDBFactoryBackend::deleteDatabase):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createIDBFactoryBackend):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

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

5 years agoSource/JavaScriptCore:
utatane.tea@gmail.com [Fri, 2 Jan 2015 04:41:46 +0000 (04:41 +0000)]
Source/JavaScriptCore:
String includes methods perform toString on searchString before toInt32 on a offset
https://bugs.webkit.org/show_bug.cgi?id=140031

Reviewed by Darin Adler.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):
(JSC::stringProtoFuncIncludes):

LayoutTests:
String includes methods perform toString on searchString before toInteger on a offset
https://bugs.webkit.org/show_bug.cgi?id=140031

Reviewed by Darin Adler.

As per the latest ES6 draft, String.prototype.{startsWith, endsWith, includes}
perform toString on searchString (argument 0) before performing toInteger on offset (argument 1).

* js/script-tests/string-includes.js:
(searchString.toString):
(startOffset.valueOf):
(endOffset.valueOf):
(matchString.toString): Deleted.
* js/string-includes-expected.txt:

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

5 years agoTried to fix the iOS build.
mitz@apple.com [Fri, 2 Jan 2015 02:05:18 +0000 (02:05 +0000)]
Tried to fix the iOS build.

* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):

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

5 years agoChange to return std::unique_ptr<> in fooCreate()
gyuyoung.kim@samsung.com [Fri, 2 Jan 2015 01:13:20 +0000 (01:13 +0000)]
Change to return std::unique_ptr<> in fooCreate()
https://bugs.webkit.org/show_bug.cgi?id=139983

Reviewed by Darin Adler.

To avoid unnecessary std::unique_ptr<> casting, fooCreate() returns std::unique_ptr<> directly.

* create_regex_tables:
* yarr/YarrPattern.h:
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::newlineCharacterClass):
(JSC::Yarr::YarrPattern::digitsCharacterClass):
(JSC::Yarr::YarrPattern::spacesCharacterClass):
(JSC::Yarr::YarrPattern::wordcharCharacterClass):
(JSC::Yarr::YarrPattern::nondigitsCharacterClass):
(JSC::Yarr::YarrPattern::nonspacesCharacterClass):
(JSC::Yarr::YarrPattern::nonwordcharCharacterClass):

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

5 years agoFix itearator typo
darin@apple.com [Fri, 2 Jan 2015 00:57:34 +0000 (00:57 +0000)]
Fix itearator typo
https://bugs.webkit.org/show_bug.cgi?id=140027

Reviewed by Csaba Osztrogonác.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::nextBreakablePosition): Spelling mistake.

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

5 years agoDon't dereference end() in SimpleLineLayout::RunResolver::rangeForRenderer
ap@apple.com [Fri, 2 Jan 2015 00:29:13 +0000 (00:29 +0000)]
Don't dereference end() in SimpleLineLayout::RunResolver::rangeForRenderer
https://bugs.webkit.org/show_bug.cgi?id=139951
rdar://problem/19339881

Reviewed by Darin Adler.

* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):

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

5 years agoASSERT that a null key is never used with FeatureCounter
cdumez@apple.com [Thu, 1 Jan 2015 23:53:20 +0000 (23:53 +0000)]
ASSERT that a null key is never used with FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=140030

Reviewed by Darin Adler.

* platform/FeatureCounter.cpp:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):
* platform/ios/FeatureCounter.mm:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):

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

5 years ago[iOS] Fix memory leak in FeatureCounter
cdumez@apple.com [Thu, 1 Jan 2015 22:35:56 +0000 (22:35 +0000)]
[iOS] Fix memory leak in FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=140029
<rdar://problem/19255690>

Reviewed by Darin Adler.

Fix memory leak in FeatureCounter. The NSString for the counter key
was allocated but never released. The patch switches to using a
RetainPtr instead of a raw pointer to avoid the issue.

* platform/ios/FeatureCounter.mm:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):

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

5 years agoUpdate user-visible copyright strings to include 2015
jeffm@apple.com [Thu, 1 Jan 2015 22:21:15 +0000 (22:21 +0000)]
Update user-visible copyright strings to include 2015
https://bugs.webkit.org/show_bug.cgi?id=139880

Reviewed by Darin Adler.

Source/JavaScriptCore:

* Info.plist:

Source/WebCore:

* Info.plist:

Source/WebKit/mac:

* Info.plist:

Source/WebKit2:

* DatabaseProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService.Development/Info.plist:
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist:
* Info.plist:
* NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-OSX.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info-iOS.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:
* PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
* WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
* mac/Info-WebKit2.plist:

WebKitLibraries:

* win/tools/scripts/COPYRIGHT-END-YEAR:

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

5 years agoMove scrolling code off of WTF::bind
weinig@apple.com [Thu, 1 Jan 2015 21:20:21 +0000 (21:20 +0000)]
Move scrolling code off of WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=140019

Reviewed by Darin Adler.

Source/WebCore:

* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::tryToHandleWheelEvent):
(WebCore::ThreadedScrollingTree::invalidate):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ThreadedScrollingTree::handleWheelEventPhase):
(WebCore::derefScrollingCoordinator): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::invalidate):
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
(WebCore::derefScrollingCoordinator): Deleted.
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::pageDestroyed):
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):

Source/WebKit2:

* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
(WebKit::EventDispatcher::touchEvent):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

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

5 years agoRemove FontData::containsCharacters
antti@apple.com [Thu, 1 Jan 2015 20:49:32 +0000 (20:49 +0000)]
Remove FontData::containsCharacters
https://bugs.webkit.org/show_bug.cgi?id=140026

Reviewed by Dan Bernstein.

This virtual function has no clients.

* platform/graphics/FontData.h:
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::containsCharacter): Deleted.
(WebCore::SegmentedFontData::containsCharacters): Deleted.
* platform/graphics/SegmentedFontData.h:
* platform/graphics/SimpleFontData.h:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::containsCharacters): Deleted.
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::SimpleFontData::containsCharacters): Deleted.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::containsCharacters): Deleted.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::containsCharacters): Deleted.

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

5 years agoWe often misspell identifier as "identifer"
darin@apple.com [Thu, 1 Jan 2015 19:56:15 +0000 (19:56 +0000)]
We often misspell identifier as "identifer"
https://bugs.webkit.org/show_bug.cgi?id=140025

Reviewed by Michael Saboff.

Source/JavaScriptCore:

* runtime/ArrayConventions.h: Fix it.

Source/WebCore:

* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseNPTFragment):
* html/parser/AtomicHTMLToken.h:
* html/parser/HTMLToken.h:
* html/shadow/SliderThumbElement.h:
* platform/graphics/ISOVTTCue.cpp:
(WebCore::ISOWebVTTCue::ISOWebVTTCue):
* platform/graphics/ISOVTTCue.h:
(WebCore::ISOWebVTTCue::id):
Fix mispellings.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WebInspector._updateNavigationSidebarForCurrentContentView):
(WebInspector._contentBrowserCurrentContentViewDidChange):
Fix misspellings.

Source/WebKit2:

* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::pageGroupData):
(WebKit::WebPageGroup::WebPageGroup):
* UIProcess/WebPageGroup.h:
(WebKit::WebPageGroup::identifier):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
* WebProcess/WebPage/WebPageGroupProxy.h:
(WebKit::WebPageGroupProxy::identifier):
Fix misspellings.

Tools:

* LayoutTestRelay/LayoutTestRelay/LTRelayController.m:
* Scripts/webkitdirs.pm:
(appIdentifierFromBundle):
(installAndLaunchIOSWebKitAppInSimulator):
Fix misspellings

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

5 years agoSaturated arithmetics: Incorrect float/double clamping.
zalan@apple.com [Thu, 1 Jan 2015 08:32:27 +0000 (08:32 +0000)]
Saturated arithmetics: Incorrect float/double clamping.
https://bugs.webkit.org/show_bug.cgi?id=139888
rdar://problem/19330885

Reviewed by Simon Fraser.

Clamp float and double values correctly when applying saturated arithmetics.

Source/WebCore:

Test: LayoutUnit test for float overflow.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit):

Tools:

* TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
(TestWebKitAPI::TEST):

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

5 years agohttp/tests/xmlhttprequest/send-on-abort.html is flaky in debug builds
ap@apple.com [Thu, 1 Jan 2015 08:06:54 +0000 (08:06 +0000)]
http/tests/xmlhttprequest/send-on-abort.html is flaky in debug builds
https://bugs.webkit.org/show_bug.cgi?id=140020

Reviewed by Darin Adler.

1. XHR loads are aborted when a page load starts, not when it's committed (which
is a known bug in WebKit). This gave the failure timer an opportunity to fire between
these events. Fixed by extending the delay.

2. Starting the test while parsing had a potential for a race with loading - we
could run it before all data was loaded. While this probably didn't happen in
practice here, it's better to run navigation tests under 100% reproducible conditions,
like during onload.

* http/tests/xmlhttprequest/send-on-abort.html:

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

5 years agohttp/tests/notifications/legacy/show.html is flaky
ap@apple.com [Thu, 1 Jan 2015 08:05:04 +0000 (08:05 +0000)]
http/tests/notifications/legacy/show.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=140023

http/tests/notifications/window-show-on-click.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112499

Reviewed by Darin Adler.

Remove 100 ms timeouts from notification tests. If they become broken, it will
be detected as timeout.

* http/tests/notifications/events-in-dictionary.html:
* http/tests/notifications/events.html:
* http/tests/notifications/legacy/double-show.html:
* http/tests/notifications/legacy/events.html:
* http/tests/notifications/legacy/request-no-callback.html:
* http/tests/notifications/legacy/request.html:
* http/tests/notifications/legacy/show.html:
* http/tests/notifications/legacy/window-show-on-click.html:
* http/tests/notifications/request.html:
* http/tests/notifications/window-show-on-click.html:

* platform/mac/TestExpectations: window-show-on-click.html should pass now.

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

5 years agofast/ruby/ruby-svg-crash.html is flaky
ap@apple.com [Thu, 1 Jan 2015 08:04:07 +0000 (08:04 +0000)]
fast/ruby/ruby-svg-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=135610

Reviewed by Darin Adler.

* fast/ruby/ruby-svg-crash.html: Streamline the test to avoid timer races. I
verified that it still crashes without the original fix (it gets an
ASSERT_WITH_SECURITY_IMPILICATIONS).
* platform/mac/TestExpectations: Removed the expectation.

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

5 years agoFixed the iOS build.
mitz@apple.com [Thu, 1 Jan 2015 01:25:50 +0000 (01:25 +0000)]
Fixed the iOS build.

* page/scrolling/ios/ScrollingCoordinatorIOS.mm:
(WebCore::ScrollingCoordinatorIOS::commitTreeState):

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

5 years agoURTBF after r177835.
ossy@webkit.org [Thu, 1 Jan 2015 01:03:25 +0000 (01:03 +0000)]
URTBF after r177835.

* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:

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

5 years agoUnreviewed, rolling out r176476.
commit-queue@webkit.org [Wed, 31 Dec 2014 23:30:18 +0000 (23:30 +0000)]
Unreviewed, rolling out r176476.
https://bugs.webkit.org/show_bug.cgi?id=140021

Sadly, this didn't reduce media test crashiness (Requested by
ap on #webkit).

Reverted changeset:

"[Mac] Random crashes inside media libraries when creating
then destroying media quickly."
https://bugs.webkit.org/show_bug.cgi?id=138980
http://trac.webkit.org/changeset/176476

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

5 years ago[GTK] Suppress unused parameter warnings in ui clients
utatane.tea@gmail.com [Wed, 31 Dec 2014 21:34:17 +0000 (21:34 +0000)]
[GTK] Suppress unused parameter warnings in ui clients
https://bugs.webkit.org/show_bug.cgi?id=140012

Drop the parameter name of WebKitUIClient::isPlayingAudioDidChange
to suppress warnings.

Reviewed by Benjamin Poulain.

* UIProcess/API/gtk/WebKitUIClient.cpp:

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

5 years agoexecDeleteCommand() does not update spellchecker sometimes
ap@apple.com [Wed, 31 Dec 2014 21:21:48 +0000 (21:21 +0000)]
execDeleteCommand() does not update spellchecker sometimes
https://bugs.webkit.org/show_bug.cgi?id=139862

Updated test expectation for a test that always crashes on WK1 (it was already
skipped on mac-wk2, efl and gtk).

* TestExpectations:
* platform/mac-wk1/TestExpectations:

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

5 years agoTest expectation gardening.
ap@apple.com [Wed, 31 Dec 2014 21:16:43 +0000 (21:16 +0000)]
Test expectation gardening.

Add expectations for test that became flaky after enabling kerning and ligatures,
plus a few more that were mis-characterized.

* platform/efl/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoRemove the remaining uses of OwnPtr from WebKit2
weinig@apple.com [Wed, 31 Dec 2014 20:01:02 +0000 (20:01 +0000)]
Remove the remaining uses of OwnPtr from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=140017

Reviewed by Dan Bernstein.

Source/WebCore:

* WebCore.exp.in:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::commit):
(WebCore::ScrollingStateTree::create): Deleted.
* page/scrolling/ScrollingStateTree.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::commitNewTreeState):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::commitNewTreeState):
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):

Source/WebKit2:

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
(WebKit::RemoteScrollingCoordinatorTransaction::setStateTreeToEncode):
(WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree):
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(-[WKPrintingView _askPageToComputePageRects]):
(-[WKPrintingView _drawPreview:]):
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:

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

5 years agoDon’t use AccessibilityAllInOne when building with Xcode
mitz@apple.com [Wed, 31 Dec 2014 19:03:18 +0000 (19:03 +0000)]
Don’t use AccessibilityAllInOne when building with Xcode
https://bugs.webkit.org/show_bug.cgi?id=139974

Reviewed by Darin Adler.

* WebCore.xcodeproj/project.pbxproj: Added all files included by AccessibilityAllInOne.cpp
to the WebCore target, and removed AccessibilityAllInOne.cpp from the project.

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

5 years agoFix build warnings after r177792.
commit-queue@webkit.org [Wed, 31 Dec 2014 17:16:57 +0000 (17:16 +0000)]
Fix build warnings after r177792.
https://bugs.webkit.org/show_bug.cgi?id=140005.

Patch by Bartlomiej Gajda <b.gajda@samsung.com> on 2014-12-31
Reviewed by Anders Carlsson.

Add UNUSED_PARAM(connection) for async messages.

* Scripts/webkit/messages.py:
(generate_message_handler):

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

5 years agoUnreviewed build fix for the GTK port.
zandobersek@gmail.com [Wed, 31 Dec 2014 11:33:05 +0000 (11:33 +0000)]
Unreviewed build fix for the GTK port.

Move the ArgumentCodersGtk.h inclusion from WebPageProxy.cpp to
WebPageProxy.h. This makes GTK-specific IPC coders available to
WebPageProxyMessageReceiver, fixing a build error due to missing
ArgumentCoder template specializations for WebCore::DragData type
that is used in the GTK-specific StartDrag message.

* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:

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

5 years agoUnreviewed, rolling out r177824 and r177826.
commit-queue@webkit.org [Wed, 31 Dec 2014 08:44:41 +0000 (08:44 +0000)]
Unreviewed, rolling out r177824 and r177826.
https://bugs.webkit.org/show_bug.cgi?id=140011

The new test crashes (Requested by ap on #webkit).

Reverted changesets:

"Too large plugins are crashing."
https://bugs.webkit.org/show_bug.cgi?id=139856
http://trac.webkit.org/changeset/177824

"Fix bug number typo in the previous commit."
http://trac.webkit.org/changeset/177826

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

5 years agoUpdate storage tracker test expectations after r177814.
ap@apple.com [Wed, 31 Dec 2014 08:36:01 +0000 (08:36 +0000)]
Update storage tracker test expectations after r177814.

* platform/mac/TestExpectations:

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

5 years ago[Win] Unreviewed gardening, mark more timeouting tests.
ossy@webkit.org [Wed, 31 Dec 2014 08:26:32 +0000 (08:26 +0000)]
[Win] Unreviewed gardening, mark more timeouting tests.

* platform/win/TestExpectations:

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

5 years agoMove font-related CSS properties to the new StyleBuilder
cdumez@apple.com [Wed, 31 Dec 2014 00:53:04 +0000 (00:53 +0000)]
Move font-related CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140008

Reviewed by Darin Adler.

Move font-related CSS properties to the new StyleBuilder
by teaching makeprop.pl how to generate them.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFont::applyInheritValue): Deleted.
(WebCore::ApplyPropertyFont::applyInitialValue): Deleted.
(WebCore::ApplyPropertyFont::applyValue): Deleted.
(WebCore::ApplyPropertyFont::createHandler): Deleted.
* css/makeprop.pl:
(generateInitialValueSetter):
(generateInheritValueSetter):
(generateValueSetter):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::initialItalic):
(WebCore::FontDescription::initialSmallCaps):
(WebCore::FontDescription::initialKerning):
(WebCore::FontDescription::initialFontSmoothing):
(WebCore::FontDescription::initialTextRenderingMode):

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

5 years agoMove '-webkit-font-variant-ligature' CSS property to the new StyleBuilder
cdumez@apple.com [Tue, 30 Dec 2014 22:25:32 +0000 (22:25 +0000)]
Move '-webkit-font-variant-ligature' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=140007

Reviewed by Darin Adler.

Move '-webkit-font-variant-ligature' CSS property to the new StyleBuilder
by using custom code.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): Deleted.
(WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): Deleted.
(WebCore::ApplyPropertyFontVariantLigatures::applyValue): Deleted.
(WebCore::ApplyPropertyFontVariantLigatures::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyInheritWebkitFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyValueWebkitFontVariantLigatures):

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

5 years agoSource/WebKit2:
rgabor@webkit.org [Tue, 30 Dec 2014 22:09:58 +0000 (22:09 +0000)]
Source/WebKit2:
Too large plugins are crashing.
https://bugs.webkit.org/show_bug.cgi?id=139868

Reviewed by Darin Adler.

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::updateBackingStore): Return false if backingStore cannot be allocated.

LayoutTests:
Fix bug number typo in the previous commit.

* plugins/large-plugin-crash-expected.txt:
* plugins/large-plugin-crash.html:

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

5 years ago[Cocoa] Enable the compiler to check format strings specified with UI_STRING and...
mitz@apple.com [Tue, 30 Dec 2014 20:43:00 +0000 (20:43 +0000)]
[Cocoa] Enable the compiler to check format strings specified with UI_STRING and UI_STRING_KEY
https://bugs.webkit.org/show_bug.cgi?id=140003

Reviewed by Darin Adler.

* Misc/WebLocalizableStrings.h: Made UI_STRING and UI_STRING_KEY call a new helper function
that takes their "string" parameter as a "value" "parameter and has an attribute telling
the compiler that if the "value" parameter is a format string then the function returns a
modified version of it. The result is that if UI_STRING is used as a format string parameter
to some function or method, the compiler will check the format specifiers in the string
against the other parameters.

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

5 years agoToo large plugins are crashing.
rgabor@webkit.org [Tue, 30 Dec 2014 18:40:20 +0000 (18:40 +0000)]
Too large plugins are crashing.
https://bugs.webkit.org/show_bug.cgi?id=139856

Reviewed by Darin Adler.

Source/WebKit2:

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::updateBackingStore): Return false if backingStore cannot be allocated.

LayoutTests:

Add layout test to cover this crash.

* plugins/large-plugin-crash-expected.txt: Added.
* plugins/large-plugin-crash.html: Added.

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

5 years agoTransient local storage namespaces need to ref their storage areas
andersca@apple.com [Tue, 30 Dec 2014 17:41:13 +0000 (17:41 +0000)]
Transient local storage namespaces need to ref their storage areas
https://bugs.webkit.org/show_bug.cgi?id=140006
<rdar://problem/19225389>

Reviewed by Sam Weinig.

We need to keep transient storage areas around even if they have no active connections,
so use a RefPtr instead of a raw pointer. This matches what we do for session storage namespaces.

* UIProcess/Storage/StorageManager.cpp:

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

5 years ago[EFL] Bump version of ATK used by jhbuild to 2.15.2
k.czech@samsung.com [Tue, 30 Dec 2014 12:29:16 +0000 (12:29 +0000)]
[EFL] Bump version of ATK used by jhbuild to 2.15.2
https://bugs.webkit.org/show_bug.cgi?id=139816

Reviewed by Gyuyoung Kim.

Bump version of ATK used by jhbuild to 2.15.2

* efl/jhbuild.modules:

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

5 years agoMove animation / transition CSS properties to the new StyleBuilder
cdumez@apple.com [Tue, 30 Dec 2014 04:39:59 +0000 (04:39 +0000)]
Move animation / transition CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139999

Reviewed by Darin Adler.

Move animation / transition CSS properties to the new StyleBuilder by
teaching makeprop.pl how to generate them.

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

5 years agoMove JavaScriptCore/yarr to std::unique_ptr
gyuyoung.kim@samsung.com [Tue, 30 Dec 2014 02:59:25 +0000 (02:59 +0000)]
Move JavaScriptCore/yarr to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=139621

Reviewed by Anders Carlsson.

Final clean up OwnPtr|PassOwnPtr in JavaScriptCore/yarr.

* yarr/YarrInterpreter.cpp:
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
* yarr/YarrInterpreter.h:
(JSC::Yarr::BytecodePattern::BytecodePattern):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
(JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
(JSC::Yarr::YarrGenerator::opCompileBody):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::charClass):
(JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
(JSC::Yarr::YarrPatternConstructor::reset):
(JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
(JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
(JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):
(JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
(JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions):
* yarr/YarrPattern.h:
(JSC::Yarr::PatternDisjunction::addNewAlternative):
(JSC::Yarr::YarrPattern::newlineCharacterClass):
(JSC::Yarr::YarrPattern::digitsCharacterClass):
(JSC::Yarr::YarrPattern::spacesCharacterClass):
(JSC::Yarr::YarrPattern::wordcharCharacterClass):
(JSC::Yarr::YarrPattern::nondigitsCharacterClass):
(JSC::Yarr::YarrPattern::nonspacesCharacterClass):
(JSC::Yarr::YarrPattern::nonwordcharCharacterClass):

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

5 years agoAnother attempt at fixing the build.
andersca@apple.com [Mon, 29 Dec 2014 21:54:34 +0000 (21:54 +0000)]
Another attempt at fixing the build.

* WebKitDLL.cpp:
(shutDownWebKit):

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

5 years agoTry to fix the Windows build.
andersca@apple.com [Mon, 29 Dec 2014 21:50:19 +0000 (21:50 +0000)]
Try to fix the Windows build.

* WebKitDLL.cpp:
(shutDownWebKit):

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

5 years agoFixed the iOS build.
mitz@apple.com [Mon, 29 Dec 2014 21:48:00 +0000 (21:48 +0000)]
Fixed the iOS build.

* Configurations/WebKitLegacy.xcconfig:

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

5 years agoRemove more dead code
andersca@apple.com [Mon, 29 Dec 2014 21:43:21 +0000 (21:43 +0000)]
Remove more dead code
https://bugs.webkit.org/show_bug.cgi?id=139998

Reviewed by Oliver Hunt.

* page/PageGroup.cpp:
(WebCore::PageGroup::localStorage): Deleted.
(WebCore::PageGroup::transientLocalStorage): Deleted.
* page/PageGroup.h:
(WebCore::PageGroup::hasLocalStorage): Deleted.

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

5 years agoRemove unneeded StorageNamespace functions
andersca@apple.com [Mon, 29 Dec 2014 21:32:38 +0000 (21:32 +0000)]
Remove unneeded StorageNamespace functions
https://bugs.webkit.org/show_bug.cgi?id=139997

Reviewed by Sam Weinig.

Source/WebCore:

* loader/EmptyClients.cpp:
* storage/StorageNamespace.h:
(WebCore::StorageNamespace::closeIdleLocalStorageDatabases): Deleted.

Source/WebKit:

We can just cast to StorageNamespaceImpl directly, no need for virtual dispatch.

* Storage/StorageNamespaceImpl.h:
* Storage/WebStorageNamespaceProvider.cpp:
(WebStorageNamespaceProvider::closeLocalStorage):
(WebStorageNamespaceProvider::clearLocalStorageForAllOrigins):
(WebStorageNamespaceProvider::clearLocalStorageForOrigin):
(WebStorageNamespaceProvider::closeIdleLocalStorageDatabases):
(WebStorageNamespaceProvider::syncLocalStorage):

Source/WebKit2:

* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::close): Deleted.
(WebKit::StorageNamespaceImpl::clearOriginForDeletion): Deleted.
(WebKit::StorageNamespaceImpl::clearAllOriginsForDeletion): Deleted.
(WebKit::StorageNamespaceImpl::sync): Deleted.
(WebKit::StorageNamespaceImpl::closeIdleLocalStorageDatabases): Deleted.
* WebProcess/Storage/StorageNamespaceImpl.h:

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

5 years agoGet rid of some PageGroup storage functions
andersca@apple.com [Mon, 29 Dec 2014 21:26:14 +0000 (21:26 +0000)]
Get rid of some PageGroup storage functions
https://bugs.webkit.org/show_bug.cgi?id=139996

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
* page/PageGroup.cpp:
(WebCore::PageGroup::closeLocalStorage): Deleted.
(WebCore::PageGroup::clearLocalStorageForAllOrigins): Deleted.
(WebCore::PageGroup::clearLocalStorageForOrigin): Deleted.
(WebCore::PageGroup::closeIdleLocalStorageDatabases): Deleted.
(WebCore::PageGroup::syncLocalStorage): Deleted.
* page/PageGroup.h:

Source/WebKit:

Call WebStorageNamespaceProvider directly instead.

* Storage/StorageTracker.cpp:
(WebCore::StorageTracker::deleteAllOrigins):
(WebCore::StorageTracker::deleteOrigin):

Source/WebKit/mac:

Call WebStorageNamespaceProvider directly instead.

* Storage/WebStorageManager.mm:
(-[WebStorageManager syncLocalStorage]):
(+[WebStorageManager closeIdleLocalStorageDatabases]):
* WebView/WebView.mm:
(+[WebView _applicationWillTerminate]):

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

5 years agoMove storage code from WebCore to WebKit
andersca@apple.com [Mon, 29 Dec 2014 21:12:28 +0000 (21:12 +0000)]
Move storage code from WebCore to WebKit
https://bugs.webkit.org/show_bug.cgi?id=139558

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/MemoryPressureHandler.cpp:

Source/WebKit:

* Storage/StorageAreaImpl.cpp: Renamed from Source/WebCore/storage/StorageAreaImpl.cpp.
(WebCore::StorageAreaImpl::~StorageAreaImpl):
(WebCore::StorageAreaImpl::StorageAreaImpl):
(WebCore::StorageAreaImpl::create):
(WebCore::StorageAreaImpl::copy):
(WebCore::StorageAreaImpl::canAccessStorage):
(WebCore::StorageAreaImpl::storageType):
(WebCore::StorageAreaImpl::length):
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::item):
(WebCore::StorageAreaImpl::setItem):
(WebCore::StorageAreaImpl::removeItem):
(WebCore::StorageAreaImpl::clear):
(WebCore::StorageAreaImpl::contains):
(WebCore::StorageAreaImpl::importItems):
(WebCore::StorageAreaImpl::close):
(WebCore::StorageAreaImpl::clearForOriginDeletion):
(WebCore::StorageAreaImpl::sync):
(WebCore::StorageAreaImpl::blockUntilImportComplete):
(WebCore::StorageAreaImpl::memoryBytesUsedByCache):
(WebCore::StorageAreaImpl::incrementAccessCount):
(WebCore::StorageAreaImpl::decrementAccessCount):
(WebCore::StorageAreaImpl::closeDatabaseTimerFired):
(WebCore::StorageAreaImpl::closeDatabaseIfIdle):
(WebCore::StorageAreaImpl::dispatchStorageEvent):
* Storage/StorageAreaImpl.h: Renamed from Source/WebCore/storage/StorageAreaImpl.h.
* Storage/StorageAreaSync.cpp: Renamed from Source/WebCore/storage/StorageAreaSync.cpp.
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::create):
(WebCore::StorageAreaSync::~StorageAreaSync):
(WebCore::StorageAreaSync::scheduleFinalSync):
(WebCore::StorageAreaSync::scheduleItemForSync):
(WebCore::StorageAreaSync::scheduleClear):
(WebCore::StorageAreaSync::scheduleCloseDatabase):
(WebCore::StorageAreaSync::syncTimerFired):
(WebCore::StorageAreaSync::openDatabase):
(WebCore::StorageAreaSync::migrateItemTableIfNeeded):
(WebCore::StorageAreaSync::performImport):
(WebCore::StorageAreaSync::markImported):
(WebCore::StorageAreaSync::blockUntilImportComplete):
(WebCore::StorageAreaSync::sync):
(WebCore::StorageAreaSync::performSync):
(WebCore::StorageAreaSync::deleteEmptyDatabase):
(WebCore::StorageAreaSync::scheduleSync):
* Storage/StorageAreaSync.h: Renamed from Source/WebCore/storage/StorageAreaSync.h.
* Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebCore/storage/StorageNamespaceImpl.cpp.
(WebCore::localStorageNamespaceMap):
(WebCore::StorageNamespaceImpl::createSessionStorageNamespace):
(WebCore::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
(WebCore::StorageNamespaceImpl::StorageNamespaceImpl):
(WebCore::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebCore::StorageNamespaceImpl::copy):
(WebCore::StorageNamespaceImpl::storageArea):
(WebCore::StorageNamespaceImpl::close):
(WebCore::StorageNamespaceImpl::clearOriginForDeletion):
(WebCore::StorageNamespaceImpl::clearAllOriginsForDeletion):
(WebCore::StorageNamespaceImpl::sync):
(WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases):
* Storage/StorageNamespaceImpl.h: Renamed from Source/WebCore/storage/StorageNamespaceImpl.h.
* Storage/StorageSyncManager.cpp: Renamed from Source/WebCore/storage/StorageSyncManager.cpp.
(WebCore::StorageSyncManager::create):
(WebCore::StorageSyncManager::StorageSyncManager):
(WebCore::StorageSyncManager::~StorageSyncManager):
(WebCore::StorageSyncManager::fullDatabaseFilename):
(WebCore::StorageSyncManager::dispatch):
(WebCore::StorageSyncManager::close):
* Storage/StorageSyncManager.h: Renamed from Source/WebCore/storage/StorageSyncManager.h.
* Storage/StorageThread.cpp: Renamed from Source/WebCore/storage/StorageThread.cpp.
(WebCore::activeStorageThreads):
(WebCore::StorageThread::StorageThread):
(WebCore::StorageThread::~StorageThread):
(WebCore::StorageThread::start):
(WebCore::StorageThread::threadEntryPointCallback):
(WebCore::StorageThread::threadEntryPoint):
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
(WebCore::StorageThread::performTerminate):
(WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
* Storage/StorageThread.h: Renamed from Source/WebCore/storage/StorageThread.h.
* Storage/StorageTracker.cpp: Renamed from Source/WebCore/storage/StorageTracker.cpp.
(WebCore::StorageTracker::initializeTracker):
(WebCore::StorageTracker::internalInitialize):
(WebCore::StorageTracker::tracker):
(WebCore::StorageTracker::StorageTracker):
(WebCore::StorageTracker::setDatabaseDirectoryPath):
(WebCore::StorageTracker::databaseDirectoryPath):
(WebCore::StorageTracker::trackerDatabasePath):
(WebCore::ensureDatabaseFileExists):
(WebCore::StorageTracker::openTrackerDatabase):
(WebCore::StorageTracker::importOriginIdentifiers):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::syncSetOriginDetails):
(WebCore::StorageTracker::origins):
(WebCore::StorageTracker::deleteAllOrigins):
(WebCore::truncateDatabaseFile):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::deleteOriginWithIdentifier):
(WebCore::StorageTracker::deleteOrigin):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::willDeleteAllOrigins):
(WebCore::StorageTracker::willDeleteOrigin):
(WebCore::StorageTracker::canDeleteOrigin):
(WebCore::StorageTracker::cancelDeletingOrigin):
(WebCore::StorageTracker::isActive):
(WebCore::StorageTracker::setIsActive):
(WebCore::StorageTracker::databasePathForOrigin):
(WebCore::StorageTracker::diskUsageForOrigin):
* Storage/StorageTracker.h: Renamed from Source/WebCore/storage/StorageTracker.h.
(WebCore::StorageTracker::storageDatabaseIdleInterval):
(WebCore::StorageTracker::setStorageDatabaseIdleInterval):
* Storage/StorageTrackerClient.h: Renamed from Source/WebCore/storage/StorageTrackerClient.h.
(WebCore::StorageTrackerClient::~StorageTrackerClient):
* Storage/WebStorageNamespaceProvider.cpp:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Storage/WebStorageManager.mm:
* Storage/WebStorageTrackerClient.h:
* WebView/WebView.mm:

Source/WebKit2:

* WebProcess/WebProcess.cpp:

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

5 years agoFixed the iOS build.
mitz@apple.com [Mon, 29 Dec 2014 20:16:11 +0000 (20:16 +0000)]
Fixed the iOS build.

* WebProcess/WebPage/ios/WebPageIOS.mm:

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

5 years agoAnother iOS build fix.
andersca@apple.com [Mon, 29 Dec 2014 20:07:06 +0000 (20:07 +0000)]
Another iOS build fix.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):

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

5 years agoTurn on transient local storage support again
andersca@apple.com [Mon, 29 Dec 2014 19:54:34 +0000 (19:54 +0000)]
Turn on transient local storage support again
https://bugs.webkit.org/show_bug.cgi?id=139995

Reviewed by Sam Weinig.

Using transient local storage caused weird crashes in the UI process so that change had to
be backed out - let's turn it on and see if it still happens.

* WebProcess/Storage/WebStorageNamespaceProvider.cpp:
(WebKit::WebStorageNamespaceProvider::createTransientLocalStorageNamespace):

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

5 years agoRemove more old coder code gunk.
andersca@apple.com [Mon, 29 Dec 2014 19:46:12 +0000 (19:46 +0000)]
Remove more old coder code gunk.

Rubber-stamped by Sam Weinig.

* Scripts/webkit/messages.py:
(argument_coder_headers_for_type):
(handler_function): Deleted.

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

5 years agoTry to fix the iOS build.
andersca@apple.com [Mon, 29 Dec 2014 19:44:22 +0000 (19:44 +0000)]
Try to fix the iOS build.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):

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

5 years agoURTBF after r177805.
ossy@webkit.org [Mon, 29 Dec 2014 19:42:31 +0000 (19:42 +0000)]
URTBF after r177805.

* CMakeLists.txt:

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

5 years agoRemove the old user message coder code
andersca@apple.com [Mon, 29 Dec 2014 19:38:19 +0000 (19:38 +0000)]
Remove the old user message coder code
https://bugs.webkit.org/show_bug.cgi?id=139994

Reviewed by Sam Weinig.

* Platform/IPC/HandleMessage.h:
(IPC::callMemberFunctionImpl): Deleted.
(IPC::callMemberFunction): Deleted.
(IPC::handleMessageVariadic): Deleted.
* Scripts/webkit/messages.py:
(decode_type):
(async_message_statement):
(sync_message_statement):
* Shared/UserMessageCoders.h: Removed.
* Shared/mac/ObjCObjectGraphCoders.h: Removed.
* Shared/mac/ObjCObjectGraphCoders.mm: Removed.
* UIProcess/WebConnectionToWebProcess.cpp:
* UIProcess/WebContextUserMessageCoders.h: Removed.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Removed.
* WebProcess/WebConnectionToUIProcess.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebPage/WebContextMenu.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/WebProcess.cpp:

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

5 years agoMove WebPasteboardProxy from Shared to UIProcess, where it should have been all along
weinig@apple.com [Mon, 29 Dec 2014 19:35:48 +0000 (19:35 +0000)]
Move WebPasteboardProxy from Shared to UIProcess, where it should have been all along
Rubber-stamped by Anders Carlsson.

* Shared/WebPasteboardProxy.cpp: Removed.
* Shared/WebPasteboardProxy.h: Removed.
* Shared/WebPasteboardProxy.messages.in: Removed.
* UIProcess/WebPasteboardProxy.cpp: Copied from Shared/WebPasteboardProxy.cpp.
* UIProcess/WebPasteboardProxy.h: Copied from Shared/WebPasteboardProxy.h.
* UIProcess/WebPasteboardProxy.messages.in: Copied from Shared/WebPasteboardProxy.messages.in.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoTry to fix the iOS build.
weinig@apple.com [Mon, 29 Dec 2014 19:29:26 +0000 (19:29 +0000)]
Try to fix the iOS build.

* Shared/WebPasteboardProxy.h:

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

5 years agoConvert injected bundle message posting to UserData
andersca@apple.com [Mon, 29 Dec 2014 19:27:32 +0000 (19:27 +0000)]
Convert injected bundle message posting to UserData
https://bugs.webkit.org/show_bug.cgi?id=139993

Reviewed by Sam Weinig.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::postMessageToInjectedBundle):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::handleInjectedBundleMessage):
(WebKit::WebProcess::postInjectedBundleMessage): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

5 years agoTry to fix the iOS build.
weinig@apple.com [Mon, 29 Dec 2014 19:25:45 +0000 (19:25 +0000)]
Try to fix the iOS build.

* Shared/WebPasteboardProxy.h:

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

5 years agoOne more speculative buildfix after r177794.
ossy@webkit.org [Mon, 29 Dec 2014 19:21:23 +0000 (19:21 +0000)]
One more speculative buildfix after r177794.

* CMakeLists.txt:

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

5 years agoTry to fix the iOS build.
weinig@apple.com [Mon, 29 Dec 2014 19:20:25 +0000 (19:20 +0000)]
Try to fix the iOS build.

* Shared/WebPasteboardProxy.h:

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

5 years agoSpeculative buildfix after r177793.
ossy@webkit.org [Mon, 29 Dec 2014 19:15:29 +0000 (19:15 +0000)]
Speculative buildfix after r177793.

* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):

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

5 years agoSpeculative buildfix after r177794.
ossy@webkit.org [Mon, 29 Dec 2014 19:14:59 +0000 (19:14 +0000)]
Speculative buildfix after r177794.

* CMakeLists.txt:

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

5 years agoRemoves some unnecessary use of LegacyReceiver
weinig@apple.com [Mon, 29 Dec 2014 19:08:18 +0000 (19:08 +0000)]
Removes some unnecessary use of LegacyReceiver
https://bugs.webkit.org/show_bug.cgi?id=139992

Reviewed by Anders Carlsson.

* Shared/WebConnection.cpp:
(WebKit::WebConnection::didReceiveMessage): Deleted.
* Shared/WebConnection.h:
* Shared/WebConnection.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveMessage): Deleted.
(WebKit::WebProcessPool::didReceiveSyncMessage): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
Remove unnecessary use of LegacyReceiver.

* UIProcess/WebPageProxy.h:
Remove declarations for functions that don't exist.

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

5 years agoConvert all variadic web process messages to UserData
andersca@apple.com [Mon, 29 Dec 2014 19:02:08 +0000 (19:02 +0000)]
Convert all variadic web process messages to UserData
https://bugs.webkit.org/show_bug.cgi?id=139991

Reviewed by Sam Weinig.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::postMessageToInjectedBundle):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadString):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadHTMLString):
(WebKit::WebPage::loadAlternateHTMLString):
(WebKit::WebPage::loadPlainTextString):
(WebKit::WebPage::loadWebArchiveData):
(WebKit::WebPage::postInjectedBundleMessage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoConvert all variadic WebProcessProxy message over to UserData
andersca@apple.com [Mon, 29 Dec 2014 18:38:07 +0000 (18:38 +0000)]
Convert all variadic WebProcessProxy message over to UserData
https://bugs.webkit.org/show_bug.cgi?id=139990

Reviewed by Sam Weinig.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::mouseDidMoveOverElement):
(WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress):
(WebKit::WebPageProxy::didRecognizeLongMousePress):
(WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress):
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showSelectionServiceMenu):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
(WebKit::WebChromeClient::didRecognizeLongMousePress):
(WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

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

5 years agoMove Pasteboard code out of WebProcessPool and into its own singleton class
weinig@apple.com [Mon, 29 Dec 2014 18:23:44 +0000 (18:23 +0000)]
Move Pasteboard code out of WebProcessPool and into its own singleton class
https://bugs.webkit.org/show_bug.cgi?id=139987

Reviewed by Anders Carlsson.

* DerivedSources.make:
* Shared/WebPasteboardProxy.cpp: Added.
(WebKit::WebPasteboardProxy::shared):
(WebKit::WebPasteboardProxy::WebPasteboardProxy):
(WebKit::WebPasteboardProxy::addWebProcessProxy):
* Shared/WebPasteboardProxy.h: Added.
* Shared/WebPasteboardProxy.messages.in: Added.
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: Added.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveSyncMessage):
(WebKit::WebProcessPool::dummy): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

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

5 years agoUse UserData for bundle initialization data
andersca@apple.com [Mon, 29 Dec 2014 18:11:49 +0000 (18:11 +0000)]
Use UserData for bundle initialization data
https://bugs.webkit.org/show_bug.cgi?id=139989

Reviewed by Sam Weinig.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::~WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

5 years agoUse UserData when sending messages to the process pool
andersca@apple.com [Mon, 29 Dec 2014 17:46:02 +0000 (17:46 +0000)]
Use UserData when sending messages to the process pool
https://bugs.webkit.org/show_bug.cgi?id=139978

Reviewed by Sam Weinig.

* Scripts/webkit/messages.py:
(generate_message_handler):
Include the connection parameter for legacy receivers as well.

* Shared/CoreIPCSupport/WebContextMessageKinds.h:
Remove this, it's no longer needed.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveMessage):
No need to special case the postMessage message.

(WebKit::WebProcessPool::didReceiveSyncMessage):
No need to special case the postSynchronousMessageMessage message.

(WebKit::WebProcessPool::handleMessage):
Convert handles to objects and call didReceiveMessageFromInjectedBundle.

(WebKit::WebProcessPool::handleSynchronousMessage):
Convert handles to objects, call didReceiveSynchronousMessageFromInjectedBundle, and then
convert objects back to handles in the reply.

(WebKit::WebProcessPool::didReceiveMessageFromInjectedBundle): Deleted.
(WebKit::WebProcessPool::didReceiveSynchronousMessageFromInjectedBundle): Deleted.
(WebKit::WebProcessPool::dummy): Deleted.
* UIProcess/WebProcessPool.h:
Add handleMessage and handleSynchronousMessage message handlers.

* UIProcess/WebProcessPool.messages.in:
Add new messages.

* WebKit2.xcodeproj/project.pbxproj:
Remove a now unused file.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
Convert objects to handles in the message body and then send the HandleMessage to the UI process.

(WebKit::InjectedBundle::postSynchronousMessage):
Convert objects to handles in the message body, send the HandleSynchronousMessage message to the UI process,
and then convert handles back to objects in the reply.

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

5 years agoWeb Inspector: SourceCode.requestContent should return a promise
jonowells@apple.com [Mon, 29 Dec 2014 15:31:16 +0000 (15:31 +0000)]
Web Inspector: SourceCode.requestContent should return a promise
https://bugs.webkit.org/show_bug.cgi?id=135777

Reviewed by Brian Burg.

Change SourceCode.js to request content from the backend using Promises. Change Resource.js to use this new
approach when determining whether a resource load has finished. Change all calls to the older
SourceCode#requestContentFromBackendIfNeeded to simply use requestContent and use a catch function
if a content request error needs to be handled. Fix a bug where the appropriate error message for an
invalid resource wasn't showing in the resource content view.

* UserInterface/Controllers/AnalyzerManager.js:
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype._updateResourceContent.fetchedStyleSheetContent):
(WebInspector.CSSStyleManager.prototype._updateResourceContent.styleSheetReady):
* UserInterface/Models/CSSStyleSheet.js:
(WebInspector.CSSStyleSheet.prototype.requestContentFromBackend):
(WebInspector.CSSStyleSheet.prototype.canRequestContentFromBackend): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeStyleText):
* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.canRequestContent):
(WebInspector.Resource.prototype.requestContentFromBackend):
(WebInspector.Resource.prototype.markAsFinished):
(WebInspector.Resource.prototype.markAsFailed):
(WebInspector.Resource.prototype.getImageSize):
(WebInspector.Resource.prototype.canRequestContentFromBackend): Deleted.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.requestContentFromBackend):
(WebInspector.Script.prototype.requestScriptSyntaxTree.catch):
(WebInspector.Script.prototype.canRequestContentFromBackend): Deleted.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode):
(WebInspector.SourceCode.prototype.requestContent):
(WebInspector.SourceCode.prototype.requestContentFromBackend):
(WebInspector.SourceCode.prototype._processContent):
(WebInspector.SourceCode.prototype.canRequestContentFromBackend): Deleted.
(WebInspector.SourceCode.prototype.requestContentFromBackendIfNeeded): Deleted.
(WebInspector.SourceCode.prototype.servicePendingContentRequests): Deleted.
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource):
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoadError):
(WebInspector.SourceMapResource.prototype.requestContentFromBackend):
(WebInspector.SourceMapResource.prototype.canRequestContentFromBackend): Deleted.
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoaded): Deleted.
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView):
(WebInspector.ResourceContentView.prototype._contentAvailable):
(WebInspector.ResourceContentView.prototype._contentError):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
(WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
(WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):

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

5 years agoSource/WebCore:
commit-queue@webkit.org [Mon, 29 Dec 2014 14:46:39 +0000 (14:46 +0000)]
Source/WebCore:
[GStreamer] Rewrite MediaSource implementation
https://bugs.webkit.org/show_bug.cgi?id=139441

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-29
Reviewed by Philippe Normand.

This now is a clean reimplementation around appsrc that works good
enough for YouTube (except for seeking), but it still does not
implement the complete API correctly. Further work is required on
top of this and the Bugzilla ticket linked above contains some
further work in the right direction.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::doSeek):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress):
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
(WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::totalVideoFrames):
(WebCore::MediaPlayerPrivateGStreamer::droppedVideoFrames):
(WebCore::MediaPlayerPrivateGStreamer::corruptedVideoFrames):
(WebCore::MediaPlayerPrivateGStreamer::totalFrameDelay):
(WebCore::MediaPlayerPrivateGStreamer::isMediaSource):
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
(WebCore::MediaSourceGStreamer::addSourceBuffer):
(WebCore::MediaSourceGStreamer::durationChanged):
(WebCore::MediaSourceGStreamer::markEndOfStream):
(WebCore::MediaSourceGStreamer::unmarkEndOfStream):
(WebCore::MediaSourceGStreamer::readyState):
(WebCore::MediaSourceGStreamer::setReadyState):
(WebCore::MediaSourceGStreamer::waitForSeekCompleted):
(WebCore::MediaSourceGStreamer::seekCompleted):
* platform/graphics/gstreamer/MediaSourceGStreamer.h:
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::~SourceBufferPrivateGStreamer):
(WebCore::SourceBufferPrivateGStreamer::setClient):
(WebCore::SourceBufferPrivateGStreamer::append):
(WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
(WebCore::SourceBufferPrivateGStreamer::readyState):
(WebCore::SourceBufferPrivateGStreamer::setReadyState):
(WebCore::SourceBufferPrivateGStreamer::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateGStreamer::enqueueSample):
(WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateGStreamer::setActive):
(WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples):
(WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webkit_media_src_class_init):
(webkit_media_src_init):
(webKitMediaSrcFinalize):
(webKitMediaSrcSetProperty):
(webKitMediaSrcGetProperty):
(webKitMediaSrcDoAsyncStart):
(webKitMediaSrcDoAsyncDone):
(webKitMediaSrcChangeState):
(webKitMediaSrcQueryWithParent):
(webKitMediaSrcGetUri):
(webKitMediaSrcSetUri):
(WebCore::MediaSourceClientGStreamer::MediaSourceClientGStreamer):
(WebCore::MediaSourceClientGStreamer::~MediaSourceClientGStreamer):
(WebCore::MediaSourceClientGStreamer::addSourceBuffer):
(WebCore::MediaSourceClientGStreamer::durationChanged):
(WebCore::MediaSourceClientGStreamer::append):
(WebCore::MediaSourceClientGStreamer::markEndOfStream):
(WebCore::MediaSourceClientGStreamer::removedFromMediaSource):
(WTF::adoptGRef):
(WTF::refGPtr<WebKitMediaSrc>):
(WTF::derefGPtr<WebKitMediaSrc>):
(webKitMediaSrcAddSrc): Deleted.
(webKitMediaVideoSrcStop): Deleted.
(webKitMediaAudioSrcStop): Deleted.
(webKitMediaVideoSrcStart): Deleted.
(webKitMediaAudioSrcStart): Deleted.
(webKitMediaVideoSrcNeedDataMainCb): Deleted.
(webKitMediaAudioSrcNeedDataMainCb): Deleted.
(webKitMediaVideoSrcNeedDataCb): Deleted.
(webKitMediaAudioSrcNeedDataCb): Deleted.
(webKitMediaVideoSrcEnoughDataMainCb): Deleted.
(webKitMediaAudioSrcEnoughDataMainCb): Deleted.
(webKitMediaVideoSrcEnoughDataCb): Deleted.
(webKitMediaAudioSrcEnoughDataCb): Deleted.
(webKitMediaVideoSrcSeekMainCb): Deleted.
(webKitMediaAudioSrcSeekMainCb): Deleted.
(webKitMediaVideoSrcSeekDataCb): Deleted.
(webKitMediaAudioSrcSeekDataCb): Deleted.
(webKitMediaSrcSetMediaPlayer): Deleted.
(webKitMediaSrcSetPlayBin): Deleted.
(MediaSourceClientGstreamer::MediaSourceClientGstreamer): Deleted.
(MediaSourceClientGstreamer::~MediaSourceClientGstreamer): Deleted.
(MediaSourceClientGstreamer::didReceiveDuration): Deleted.
(MediaSourceClientGstreamer::didReceiveData): Deleted.
(MediaSourceClientGstreamer::didFinishLoading): Deleted.
(MediaSourceClientGstreamer::didFail): Deleted.
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h:
Rewrite MediaSource implementation for GStreamer. The old code was
overly complicated and did not work at all for anything I've tested
it with.

LayoutTests:
Enable MediaSource tests for the GTK port
https://bugs.webkit.org/show_bug.cgi?id=139441

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-29
Reviewed by Philippe Normand.

* platform/gtk/TestExpectations:
Enable MediaSource tests that are actually succeeding for
the GTK port.

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

5 years ago[jhBuild] cairo build error (-flto)
commit-queue@webkit.org [Mon, 29 Dec 2014 12:53:19 +0000 (12:53 +0000)]
[jhBuild] cairo build error (-flto)
https://bugs.webkit.org/show_bug.cgi?id=139056

Patch by Fabien Vallée <fvallee@connected-labs.com> on 2014-12-29
Reviewed by Philippe Normand.

cairo fails to link  with gcc 4.9 due to lto
related issue. This problem has been partially
addressed by cairo:
http://cgit.freedesktop.org/cairo/commit/?id=c3645d97ebd24c6f7ad850785d585aebc706a11c
use the cairo --disable-lto option and remove jhbuild
makeargs fixes the issue.

* gtk/jhbuild.modules:
* gtk/patches/cairo-1.12.8-add_disable-lto.patch: Added.

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

5 years agoUnreviewed, additional build fix on win port since r177786.
gyuyoung.kim@samsung.com [Mon, 29 Dec 2014 07:00:08 +0000 (07:00 +0000)]
Unreviewed, additional build fix on win port since r177786.

* platform/graphics/opengl/Extensions3DOpenGLES.h: Change a constructor from *protected* to *public*.

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