When a Text node is created by the parser we check if the string is all whitespace
and if so we put it in the AtomicString table so that all future identical whitespace
strings can share the StringImpl.

If we do not know whether the string is all whitespace this now checks the string
If the string is all whitespace we create an AtomicString for it.

html/parser/HTMLConstructionSite.h:

html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not.
(WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.

(WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge
to mainAxisOffset. Rename logicalTop to crossAxisOffset. Get rid of
logicalLeft local variable since it's confusing. Move shouldFlipMainAxis
out of the for loop to avoid computing it each iteration.

WebKit2 has a mechanism to prevent the composited layer tree of the outgoing page
from being torn down or updated until the incoming page has layout. However, for simple
pages, when the frame is loaded the page is not rendered in the screen.

This patch fixes this bug calling LayerTreeHostQt::scheduleLayerFlush when m_layerFlushSchedulingEnabled
is true.

(WebCore::ContainerNode::suspendPostAttachCallbacks): Added a FIXME comment about the
peculiar behavior of this function. Somehow the post-attach suspend state is both
global and specific to a certain Page object. That can't be right. If it was truly
global then this would be a static member function. If it was truly per-page, then
the related functions could not be static.

dom/ContainerNode.h: Removed some unneeded argument names. Moved the hasChildNodes

function up with the other basic getters. Put the other getters, childNodeCount and
childNode, right after the basic getters. Used ASSERT_NO_EXCEPTION in all the basic
mutation functions so they can be used in a cleaner fashion in C++ code where we have
some reason to know an exception won't occur. Grouped all the overrides of functions
from Node into a single paragraph and used the OVERRIDE macro on all of them. Made the
queuePostAttachCallback and postAttachCallbacksAreSuspended functions protected.

dom/Element.h: Moved the include of ExceptionCodePlaceholder.h into ContainerNode.h.

dom/Node.cpp:

(WebCore::Node::lazyAttach): Use hasChildNodes instead of firstChild for clarity.
(WebCore::Node::isDescendantOf): Ditto.

(WebCore::CSSFontSelector::~CSSFontSelector): Removed calls to deleteAllValues.
(WebCore::CSSFontSelector::addFontFaceRule): Updated to use OwnPtr instead of raw
pointer for the entry in m_fontFaces and m_locallyInstalledFontFaces.
(WebCore::CSSFontSelector::getFontData): Updated to use OwnPtr instead of raw
pointer for the entry in m_fonts. Also removed an unneeded std:: prefix.

css/CSSFontSelector.h: Made m_fontFaces, m_locallyInstalledFontFaces, and m_fonts

(JSC::JSCallbackObject::getOwnPropertyNames): Use get() on the hash map
entries because the hash map now has an OwnPtr instead of a raw pointer.

API/JSClassRef.cpp:

(OpaqueJSClass::OpaqueJSClass): No need to initialize m_staticValues and
m_staticFunctions since they are now OwnPtr. Use adoptPtr when allocating.
Removed the code that gets and deletes existing entries, and just use set,
which now handles deletion automatically due to it being OwnPtr.
(OpaqueJSClass::~OpaqueJSClass): Replaced code to do all the deletion
with assertion-only NDEBUG-only code.
(OpaqueJSClassContextData::OpaqueJSClassContextData): Use adoptPtr when
allocating. Use OwnPtr when adding. Removed unneeded code to set
staticValues and staticFunctions to 0. Removed unneeded destructor.
(OpaqueJSClass::staticValues): Added get call. Also removed unneeded local.
(OpaqueJSClass::staticFunctions): Ditto.
(OpaqueJSClass::prototype): Added use of adoptPtr.

API/JSClassRef.h: Made the static values and static functions tables

use OwnPtr for the entries. Also used OwnPtr for the pointers to the
tables themselves. Also removed ~OpaqueJSClassContextData(), letting
the compiler generate it.

Implement the needed infrastructure to allow notifying
accessibility, in a cross-platform way, when a event related to
the load of a document happens. Added a generic method, which will
be called from the FrameLoader, and platform specific versions of
it so every port has a chance to decide what to do with those
notifications.

This patch doesn't include a new test because the one testing this
functionality is the GTK-specific unit test added along with patch
for bug 73746: testWebkitAtkDocumentLoadingEvents.

accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::frameLoadingEventNotification): New, called
from the FrameLoader to notify accessibility when an event happens.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): New,
platform specific function to let ports decide what to do.

accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::frameLoadingEventNotification): New.

accessibility/chromium/AXObjectCacheChromium.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for chromium.

accessibility/gtk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):

accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for the Mac.

accessibility/win/AXObjectCacheWin.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for Windows.

The failure was caused by span that contains the text inside bdi in the reference file
was using display: inline-block. Because the width of an inline-block is always rounded up
like any other inline element, it causes the text in the reference file to be one pixel
longer than the one in the test file in certain cases.

Fixed the bug by using unicode-bidi: override instead of display: inline-block in
the reference file.

When the extensions are available, compositor textures are allocated via
glTexStorage2DEXT instead of glTexImage2D to eliminate creation of unnecessary
mip levels on the service side. In addition, the GL_FRAMEBUFFER_ATTACHMENT_ANGLE
is specified for all textures used by RenderSurfaces to eliminate the need for
a system memory bitmap allocation.

(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
In the case where all our columns have percent lengths, split the colspan
logical width using the percentages from the lengths. This should be properly
handled by the massive 'else' case but it is not and I did not feel like refactor
that due to massive compatibility issues that would arise.

LayoutTests:

fast/table/colspan-with-all-percent-cells-expected.png: Added.

fast/table/colspan-with-all-percent-cells-expected.txt: Added.

fast/table/colspan-with-all-percent-cells.html: Added.

platform/chromium-cg-mac/tables/mozilla/bugs/bug14929-expected.png:

platform/chromium-linux/fast/table/027-expected.png:

platform/chromium-linux/fast/table/027-vertical-expected.png:

platform/chromium-mac/fast/table/027-vertical-expected.png:

platform/chromium-mac/tables/mozilla/bugs/bug14929-expected.png:

platform/chromium-mac/tables/mozilla/bugs/bug2947-expected.png:

platform/chromium-win/fast/table/027-expected.txt:

platform/chromium-win/fast/table/027-vertical-expected.txt:

platform/mac/fast/table/027-expected.png:

platform/mac/fast/table/027-expected.txt:

platform/mac/fast/table/027-vertical-expected.png:

platform/mac/fast/table/027-vertical-expected.txt:

platform/mac/tables/mozilla/bugs/bug14929-expected.txt:

platform/mac/tables/mozilla/bugs/bug2947-expected.png:

platform/mac/tables/mozilla/bugs/bug2947-expected.txt:

Those changes are just rebaselines which now matches Firefox Nighly
more closely (thus progressions).

platform/chromium/test_expectations.txt: Skipped Windows that needs a new baseline.

platform/efl/Skipped:

platform/gtk/Skipped:

platform/qt/Skipped:

Skipped the previous tests as they need a rebaseline on those platforms.

Add IconChromiumAndroid.cpp which nullifies the rendering of icons in
file upload boxes, which is not something we want to support now. Also
include ClipboardChromiumLinux.cpp and FileSystemChromiumLinux.cpp
as their functionality can be re-used for Android.

Factored out the processing of the UString argument from
Stringifier::appendQuotedString() to a static templated function
based on character size.

This change eliminates 5% of the 7% slowdown to json-stringify-tinderbox.
This change introduces a 4.8% slowdown to json-parse-financial.
This slowdown will be addressed in a subsequent patch to StringImpl::equal.

Calling characters() explicitly causes a non-terminated string buffer to get passed back
to the String() constructor that expects a terminated buffer. The characters() call isn't
necessary at all, since we have a String and the method we're calling expects a String.

To allow for API objects representing the connection going to/from the UIProcess/WebProcess,
this patch separates out the connections into WebConnection subclasses. It does not yet
expose a way to access these connections, and is therefore not yet testable.

(WebCore::TextTrackLoader::corsPolicyPreventedLoad): New, log the error and set m_state.
(WebCore::TextTrackLoader::notifyFinished): Check for CORS failure.
(WebCore::TextTrackLoader::load): Take media element cross-origin attribute as a param so we

The backing store of a decoded image is a Vector<PixelData> on the affected
ports. And Vector<> provides a resize capacity member that returns false if
memory allocation fails.

setSize() should be called once only during an image decode - add an ASSERT
for that. Resize the backing store capacity to the requested image size and
return false if memory allocation fails.

ImageDecoder::isOverSize(width, height) is called to check that the decoded
width and height won't overflow 'width x height x sizeof(PixelData)' before
calls to setSize(). Refer to ​http://webkit.org/b/48634

When asked to remove a shorthand property, we should toss out both the
sub-properties of that shorthand as well as the shorthand itself, should the
declaration contain it. The latter part was missing in our implementation.

It turned out that 50-70% of nodes inserted by DOM APIs such as insertBefore and appendChild
don't have any descendent nodes. Optimize isDescendantOf which is used by checkAcceptChild for this case.
On a test case attached on the bug, we see a 40% improvement.

Also optimize for cases where either new child or new parent but not both are in document as suggested
by Erik Arvidsson. This appears to happen about 40-70% of the time, and the symmetric difference between
the two cases is about 50% so it's worth implementing both optimizations.

Unfortunately no tests because we still have a O(n) algorithm somewhere.

There is currently a known issue happening in debug builds when
reloading the webview if it was loaded before through the function
webkit_web_view_load_string, resulting in a ASSERT failing (see
bug 50331) so we can't check for the reload event here, since it
makes the test to fail. Fortunately, checking for load-complete
event is a good enough test, so this small patch is about that.

Rubber-stamped by Philippe Normand.

tests/testatk.c:

(testWebkitAtkDocumentLoadingEvents): Don't load and then reload
to check events, just load once and check whether the
'load-complete' event has happened.

Add missing simulateDesktopNotificationClick method used by
fast/notifications. Provide a default implementation for
areDesktopNotificationPermissionRequestsIgnored and
ignoreDesktopNotificationPermissionRequests.

The issue has been described that Korean character is broken on pasting copied text.
In my analysis, this is from lack of format change between C style UTF-8 character pointer and C++ style String reference.
Therefore, this patch will convert types to resolve the problem.

New unit test to check events when reloading a document. This
replaces the former document-reload-events.html layout test.

tests/testatk.c:

(updateLoadingEventsResult): New, updates a global variable to
allow checking later on that the right signals were emmitted.
(documentLoadingEventCallback): New, global listener for load-complete
and reload signals over the document object (the web area).
(testWebkitAtkDocumentLoadingEvents): New unit test, globally
connects to document-related signals and check they are properly
emitted when reloading the web view.
(main): Added new test.

Convert bdi-element-expected.html, unicode-bidi-isolate-aharon.html, and unicode-bidi-plaintext.html to reftests.
In addition, isolate the failing test case in unicode-bidi-plaintext.html as unicode-bidi-isolate-aharon-failing.html.

and PeekType from the traits of the mapped value instead of hard-coding them here.
Changed inlineAdd to take a reference to the PassInType instead of the PassInType itself,
to accomodate a PassInType that can't be copied. Use the store, peek, and passOut
functions from the traits as well.

wtf/HashTraits.h: Updated GenericHashTraits and HashTraits for OwnPtr to include

PassInType, PassOutType, PeekType, store, passOut, and peek. Before this, the file had
an earlier version that was just PassType, PeekType, pass, and peek. Also commented
the HashTraits for RefPtr to foreshadow some work we can do there.

(-[WebView _removeObjectForIdentifier:]): Changed the CFRelease(self) into
a WebCFAutorelease(self). This prevents re-entry into this method due to
the WebView closing and canceling all subresource loads, including the
one we have just removed.

Tools: Added a test for <rdar://problem/10523721> Crash at WebCore::SubresourceLoader::releaseResources

Fake the load process when the new HTML5 History APIs are
used. Otherwise the UA does not have a chance of updating the URL
entry, back/forward buttons, etc.

WebCoreSupport/FrameLoaderClientGtk.cpp:

(WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): fake a
load process.
(WebKit::FrameLoaderClient::dispatchDidPushStateWithinPage): call
dispatchDidNavigateWithinPage.
(WebKit::FrameLoaderClient::dispatchDidReplaceStateWithinPage):
ditto.
(WebKit::FrameLoaderClient::dispatchDidPopStateWithinPage): do
nothing, because push was already called, but note this in a
comment.

Implement LayoutTestController::pathToLocalResource for GTK+. Instead of passing
WEBKIT_TEST_FONTS to the GTK+ test harnesses, pass a more generic WEBKIT_TOP_LEVEL,
which points to the more generic top-level path of the WebKit checkout. This code is
duplicated between WK1 and WK2 harnesses because we do not currently have a way to
share code here.

If WEBKIT_TOP_LEVEL is not provided, we search for the top level based on the binary
location. This will cause the fallback to fail if you build into a non-typical location
or even fake it with a symlink. In this case it's important to use the environment variable.

DumpRenderTree/gtk/DumpRenderTree.cpp:

(getTopLevelPath): Added.
(initializeFonts): Use the new helper to get the font path.

DumpRenderTree/gtk/DumpRenderTreeGtk.h: Expose the new helper.

DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:

(LayoutTestController::pathToLocalResource):Use the new helper to normalize
test paths.

Scripts/webkitpy/layout_tests/port/gtk.py:

(GtkPort.setup_environ_for_server):Pass the top-level path of the
checkout instead of passing the font path.

WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:

(WTR::getTopLevelPath): Added this helper.
(WTR::inititializeFontConfigSetting): Use the helper to find the font path.

(WebCore::finishedCallback): remove this, and m_finished, which
we no longer need to explicitly track
(WebCore::statusWillBeHandledBySoup):
(WebCore::soupErrorShouldCauseLoadFailure): No longer needed;
SoupRequestHTTP's logic is now aligned with WebKit's.
(WebCore::gotChunkCallback): remove gotChunkCallback, which
is no longer needed
(WebCore::startHTTPRequest):
(WebCore::sendRequestCallback):
(WebCore::gotHeadersCallback):
(WebCore::contentSniffedCallback): merge the code from
gotHeadersCallback and contentSniffedCallback into
sendRequestCallback

Fixes a crash in release builds on Windows. Windows was optimizing the out-of-line virtual destructor in
JSFunction away, which left it with no virtual functions. Its vtable ptr was then identical to that of
a different class, therefore the optimization in the visitChildren helper function in MarkedStack.cpp was calling an
incorrect version of visitChildren on the object, which left its children unmarked, causing them to be
collected when they were still reachable.

Mostly covered by damage tracker tests. Currently this relies on
manually running layout tests, because this patch requires partial
swaps that are not supported by DumpRenderTree. The feature
automatically disables if partial swap is not supported.

Don't call FocusController:setActive() in
WebViewImpl::setFocus(), since being active and
being focused are different concepts and chromium
now properly sends setActive IPCs on all platforms.​https://bugs.webkit.org/show_bug.cgi?id=73687

Work around a bug in CoreGraphics, that caused incorrect bounds for paths
consisting only of move-to elements. This causes problems in SVG, when the enormous
bounds prevented the drawing of things behind.

Tests: svg/custom/path-moveto-only-rendering.svg

svg/custom/subpaths-moveto-only-rendering.svg

platform/graphics/cg/PathCG.cpp:

(WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
test for isEmpty accoridng ot the same rules as other platforms.
(WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
(WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
(WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
path contains only move-to elements, and hence should have null bounds.
(WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
(WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
(WebCore::Path::boundingRect): Modified to check for move-to only paths
(WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
(WebCore::Path::isEmpty): Now uses the method that matches other platforms.
(WebCore::Path::hasCurrentPoint): Now uses CGPathIsEmpty directly
(WebCore::Path::transform) : Now uses CGPathIsEmpty directly

LayoutTests:

Work around a bug in CoreGraphics, that caused incorrect bounds for paths
consisting only of move-to elements. This causes problems in SVG, when the enormous
bounds prevented the drawing of things behind.

We can't just change the direction of the FlexOrderIterator because we want the overflow to be
on the top. We can't just position them in the reverse location since we don't know where the
bottom edge is until we've layed out the flex items. So we do an extra pass, but it should be
fast since we're not laying out, just moving.

rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::flowAwareBorderEnd):
(WebCore::RenderFlexibleBox::flowAwarePaddingEnd):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse): Do an extra pass to reposition flexitems in the reverse order.

rendering/RenderFlexibleBox.h:

LayoutTests:

Enable testing of column-reverse.

css3/flexbox/flex-flow-expected.txt:

css3/flexbox/flex-flow.html: Added test cases to make sure start and end still apply to the text flow direction.

css3/flexbox/flex-flow-border-expected.txt:

css3/flexbox/flex-flow-border.html: Single flexitem, so reverse does nothing.

(WebCore::WorkerContext::webkitIndexedDB): Stores
IDBFactoryBackendInterface, implemented by IDBFactoryBackendProxy in
chromium, in the WorkerContext. For the Document case it is stored in
the PageGroup. Storing it in the WorkerContext causes more memory
churn, but that should be trivial. I don't know of any better
alternatives.

workers/WorkerContext.h:

workers/WorkerContext.idl:

Source/WebKit/chromium:

src/IDBFactoryBackendProxy.cpp:

(WebKit::IDBFactoryBackendProxy::allowIDBFromWorkerThread): Return
true while behind a runtime flag, and while we figure out how to check
permission in a thread-safe manner.
(WebKit::IDBFactoryBackendProxy::openFromWorker): Using the webFrame
from the worker seems to satisfy the weak condition in chromium that
neither it nor it's associated RenderView is NULL.

Source/WebCore: Fix mixed content handling for video in Chromium by having
CachedResourceLoader & SubresourceLoader use the
ResourceRequest::TargetType when determining if a RawResource can
be requested.​https://bugs.webkit.org/show_bug.cgi?id=72178

Try to fix the GTK+ debug bot. As discussed with other GTK+
hackers recently. It makes sense to just remove G_DISABLE_DEPRECATIONS
now in WebKit. The flag itself is now deprecated in GLib in favor of
the gcc attribute.

The problem was that after CSSFontFaceSource::getFontData() had scheduled a 0-delay timer to
begin loading the font, but before that timer fired, the subresource loader appeared to have
had no resources waiting to be loaded, and therefore didFinishLoad could be called. This change
reworks the fix for <​http://webkit.org/b/65123> so that while the load is still started on a
0-dealy timer, the subresource loader’s request count is incremented immediately, preventing
it from hitting 0 while the font load is scheduled to begin. The delayed load mechanism is
moved from CSSFontFaceSource into CSSFontSelector in order to safely handle the possibility of
the latter being decommissioned while waiting for font loading to begin.

css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::CSSFontFaceSource): Removed initializer for m_loadStartTimer.
(WebCore::CSSFontFaceSource::~CSSFontFaceSource): Removed stopping of m_loadStartTimer.
(WebCore::CSSFontFaceSource::getFontData): Replaced code to schedule loading on a timer with
a call to CSSFontSelector::beginLoadingFontSoon.

(WebCore::CSSFontSelector::CSSFontSelector): Added initialized for m_beginLoadingTimer.
(WebCore::CSSFontSelector::~CSSFontSelector): Added call to clearDocument(), to deal with
anything remaining in m_fontsToBeginLoading at this time.
(WebCore::CSSFontSelector::clearDocument): Now stops m_beginLoadingTimer and balances
incrementRequestCount() calls for anything remaining in m_fontsToBeginLoading.
(WebCore::CSSFontSelector::beginLoadingFontSoon): Added. Schedules the actual call to
CachedFont::beginLoadingIfNeeded on a 0-delay timer, and meanwhile increments the request count
on the CachedResourceLoader, which ensures that didFinishLoad will not be called while waiting
for the timer to fire.
(WebCore::CSSFontSelector::beginLoadTimerFired): Added. Actually calls
CachedFont::beginLoadIfNeeded and balances the incrementRequestCount() made when the timer was
scheduled.

css/CSSFontSelector.h:

LayoutTests:

Reverted test chnages from r91738. These tests were made to wait for the fonts to finish loading
using a DOM. Now again they do not need to.

Currently texture request is capped by the high limit while we reclaim the
textures in each commit. This triggers new tiles always allocated when scrolling.
The proposal is to recycle the texture during request if the total used memory
is about to exceed the reclaim limit.

Placeholder visibility was checked by HTMLInputElement::value
emptiness. It should be innerTextValue emptiness because it is
possible that a number field has empty HTMLInputElement::value and
non-empty innerTextValue.

Because a reftest succeeds when it matches at least one of expected matches and fails when it matches
at least one of expected mismatches, we compare expected mismatches first in order to minimize
the number of reference files to open on DRT.

Scripts/webkitpy/layout_tests/controllers/manager.py:

(interpret_test_failures): Remove checks no longer applicable.

Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:

(ResultSummaryTest.test_interpret_test_failures): Ditto.

Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner.init): Remove a bunch of code and just call port.reference_files.
(SingleTestRunner._driver_input):
(SingleTestRunner.run):
(SingleTestRunner._run_reftest): Compare the output of the test to each reference file.

Scripts/webkitpy/layout_tests/models/test_input.py:

(TestInput.init): Remove ref_file and is_mismatch_reftest because they are no longer used.

Scripts/webkitpy/layout_tests/port/base.py:

(Port.reference_files): Renamed from _reference_file_for. Returns a list of expectation, filename pairs.
(_parse_reftest_list): Now supports parsing multiple entries for a single test.

(WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Do not
un-freeze the layer tree state if incremental rendering is suppressed.

WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::layerTreeStateIsFrozen): Add a getter for
m_layerTreeStateIsFrozen.

WebProcess/WebPage/DrawingAreaImpl.h:

(WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Ditto.

WebProcess/WebPage/ca/LayerTreeHostCA.cpp:

(WebKit::LayerTreeHostCA::initialize): WebFrameLoaderClient might have
tried to freeze the state of the layer tree before the layer tree host
was created. When creating the layer tree host, only schedule a layer
flush if the layer tree state isn't frozen.

​https://bugs.webkit.org/show_bug.cgi?id=73497
This is a followup to the patch submitted for the bug above.
Tha patch was landed in r101575 and I missed to make one of the changes
suggested by the reviewer that had pointed out that the code was still
making use of the deprecatedNode method.

(RunUnitTests.countFailures): Removed the flags parameter to re.split, which was only added
in Python 2.7, and used whitespace instead of start-of-string/end-of-string markers when
searching for "Tests that timed out:" etc. This makes our check less strict, but it
shouldn't matter given the kinds of content we parse.

We now display something like "5 unit tests failed or timed out". Eventually we might want
to split out how many failure vs. timeouts there were.

Reviewed by Darin Adler.

BuildSlaveSupport/build.webkit.org-config/master.cfg:

(TestWithFailureCount): Moved this class up to the top of the file so it is before any other
classes that may want to subclass it.
(RunUnitTests): Changed to inherit from TestWithFailureCount.
(RunUnitTests.countFailures): Added. Counts the number of tests following the "Tests that
timed out:" and "Tests that failed:" lines, if present.

(webKitSettingsSetProperty): Add new set function.
(webKitSettingsGetProperty): Add new get function.
(webkit_settings_class_init): Register new property.
(webkit_settings_get_enable_dns_prefetching): API to get 'enable-dns-prefetching' property.
(webkit_settings_set_enable_dns_prefetching): API to set 'enable-dns-prefetching' property.

Shows up as a crash during existing layout test runs so no new tests are required.

platform/network/mac/FormDataStreamMac.mm:

(WebCore::streamFieldsMap): Replaced getStreamFormDataMap with this.
Use an NSMapTable instead of a HashMap because we need to remove items from this
on a non-main thread.
(WebCore::associateStreamWithResourceHandle): Use NSMapGet instead of
HashMap::contains here.
(WebCore::formCreate): FormStreamFields now stores a RefPtr to the form data.
Added the code to fill that in. Did it in a more modern way to avoid the leakRef
and adoptRef that were used before. Replaced the code that set up the stream
form data map entry with code that sets an entry in the streamFieldsMap.
(WebCore::formFinishFinalizationOnMainThread): Added. Contains the work of
finalization that must be done on the main thread, specifically, destroying the
fields structure that contains objects with RefPtr in them. We can't touch these
reference counts on non-main threads.
(WebCore::formFinalize): Changed this to use NSMapRemove on the streamFieldsMap.
Added a callOnMainThread to finish the finalization.
(WebCore::setHTTPBody): Removed the leakRef, no longer needed, that used to be
balanced by an adoptRef in formCreate.
(WebCore::httpBodyFromStream): Changed to use NSMapGet.

Add support for individual media controls to control the MediaController of their associated
HTMLMediaElement, if present.

The video spec requires that UA provided media controls be implemented in terms of their
HTMLMediaElement's MediaController, if present. So for each of the media controls, modify
their constructor to take a Document* instead of an HTMLMediaElement, and add an setter
taking a MediaControllerInterface.

Now that MediaControls have an abstract interface instead of an HTMLMediaElement, use toParentMediaElement
to find the controllingVideoElement.

This patch adds private typedefs inside the HashMap class,
and uses them as appropriate. A future patch will actually
tie those typedefs to hash traits, which will allow us to
make HashMap work with OwnPtr mapped values and to optimize
how HashMap works with RefPtr mapped values.

Also changed the hash translator and adapter struct templates
to use template functions to simplify them and make them more
flexible.

Also removed some unused template arguments.

This goes out of its way to not change behavior. Future patches
will change the peek type to be a reference type, which will
reduce reference count churn a bit for hash tables with RefPtr
mapped values, and then do further optimizations for RefPtr
and OwnPtr by getting types from the hash traits.

wtf/HashMap.h: Added MappedPassInType, MappedPassOutType,

and MappedPeekType typedefs, and used them for the arguments
and return types of the get, set, add, take, and inlineAdd
functions.
(WTF::HashMapTranslator): Changed this struct template to take
fewer arguments, and changed its member functions to be
function templates instead. This allows the compiler to
determine types more flexibly and also simplifies use of it.
(WTF::HashMapTranslatorAdapter): Ditto.
(WTF::HashMap::find): Updated to use new HashMapTranslatorAdapter.
Also reduced the arguments passed to the HashTable function template.
(WTF::HashMap::contains): Ditto.
(WTF::HashMap::inlineAdd): Ditto. Also take MappedPassInType.
(WTF::HashMap::set): Ditto.
(WTF::HashMap::add): Ditto.
(WTF::HashMap::inlineGet): Ditto, but return MappedPeekType.
(WTF::HashMap::get): Ditto.
(WTF::HashMap::take): Ditto, but return MappedPassOutType and use
that type in the implementation.
(WTF::deleteAllValues): Removed unneeded template arguments from
call to deleteAllPairSeconds.
(WTF::deleteAllKeys): Removed unneeded template arguments from
call to deleteAllPairFirsts.

wtf/HashSet.h:

(WTF::IdentityExtractor): Changed this to be a struct rather than
a struct template, and replaced the extract function with a function
template. This allows the compiler to deduce the type.
(WTF::HashSetTranslatorAdapter): Changed this struct template to take
fewer arguments, and changed its member functions to be
function templates instead. This allows the compiler to
determine types more flexibly and also simplifies use of it.
(WTF::HashSet::find): Updated to use new HashSetTranslatorAdapter.
Also reduced the arguments passed to the HashTable function template.
(WTF::HashSet::contains): Ditto.
(WTF::HashSet::add): Ditto.

wtf/HashTable.h:

(WTF::IdentityHashTranslator): Changed this struct template to take
fewer arguments, and changed its member functions to be
function templates instead. This allows the compiler to
determine types more flexibly and also simplifies use of it.
(WTF::HashTable::add): Reduced arguments passed to the function template.
(WTF::HashTable::find): Ditto, also reversed the template arguments so the
translator comes first so the compiler can deduce the other type.
(WTF::HashTable::contains): Ditto.
(WTF::HashTable::lookup): Ditto.
(WTF::HashTable::lookupForWriting): Ditto.
(WTF::HashTable::checkKey): Ditto.
(WTF::HashTable::fullLookupForWriting): Ditto.
(WTF::HashTable::add): Ditto.
(WTF::HashTable::addPassingHashCode): Ditto.
(WTF::HashTable::find): Ditto.
(WTF::HashTable::contains): Ditto.

wtf/ListHashSet.h:

(WTF::ListHashSetNodeHashFunctions): Changed this struct template to take
fewer arguments, and changed its member functions to be function templates
instead. This allows the compiler to determine types more flexibly and
also simplifies use of it.
(WTF::ListHashSet::find): Reduced the arguments passed to the HashTable
functon template.
(WTF::ListHashSetTranslatorAdapter): Changed this struct template in the
same way we changed ListHashSetNodeHashFunctions above.
(WTF::ListHashSetTranslatorAdapter::equal):
(WTF::::contains):
(WTF::::add):
(WTF::::insertBefore):

wtf/RefPtrHashMap.h: Updated comments. Removed the

RefPtrHashMapRawKeyTranslator struct template; we can use the
HashMapTranslator struct template from HashMap.h instead now that
it is more flexible. Added MappedPassInType, MappedPassOutType,
and MappedPeekType typedefs, and used them for the arguments
and return types of the get, inlineGet, set, add, take, and inlineAdd
functions. Changed the name of the RawKeyTranslator type to
Translator since it's now a class that can handle both raw keys
and conventional keys.
(WTF::HashMap::find): Changed to use Translator instead of RawKeyTranslator.
Reduced the arguments passed to the HashTable function template.
(WTF::HashMap::contains): Ditto.
(WTF::HashMap::inlineAdd): Ditto. Also take MappedPassInType.
(WTF::HashMap::set): Ditto.
(WTF::HashMap::add): Ditto.
(WTF::HashMap::inlineGet): Ditto, but return MappedPeekType.
(WTF::HashMap::get): Ditto.
(WTF::HashMap::take): Ditto, but return MappedPassOutType and use
that type in the implementation.
(WTF::deleteAllValues): Removed unneeded template arguments from
call to deleteAllPairSeconds.
(WTF::deleteAllKeys): Removed unneeded template arguments from
call to deleteAllPairFirsts.

Work around a bug in CoreGraphics, that caused incorrect bounds for paths
consisting only of move-to elements. This causes problems in SVG, when the enormous
bounds prevented the drawing of things behind.

Tests: svg/custom/path-moveto-only-rendering.svg

svg/custom/subpaths-moveto-only-rendering.svg

platform/graphics/cg/PathCG.cpp:

(WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
test for isEmpty accoridng ot the same rules as other platforms.
(WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
(WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
(WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
path contains only move-to elements, and hence should have null bounds.
(WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
(WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
(WebCore::Path::boundingRect): Modified to check for move-to only paths
(WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
(WebCore::Path::isEmpty): Now uses the method that matches other platforms.

LayoutTests:

Work around a bug in CoreGraphics, that caused incorrect bounds for paths
consisting only of move-to elements. This causes problems in SVG, when the enormous
bounds prevented the drawing of things behind.

I previously landed this patch as r101711, but the new tests failed on Snow Leopard. This
patch is identical to that one except for two change: assertIn(a, b) (which is new to Python
2.7) has been replaced with assertTrue(a in b), and the test_missing_closing_brace test has
been removed, since its output differs by platform.

Reviewed by Darin Adler.

Scripts/webkitpy/style/checker.py:

(_all_categories): Added JSONChecker's categories to the set of all categories.
(FileType): Added a JSON type. Incremented other types.
(CheckerDispatcher._file_type): Use the JSON file type for .json files.
(CheckerDispatcher._create_checker): Use a JSONChecker for JSON files.

Scripts/webkitpy/style/checker_unittest.py:

(CheckerDispatcherDispatchTest.assert_checker_json): Added this helper method.
(CheckerDispatcherDispatchTest.test_json_paths): Added. Based on test_python_paths.

Scripts/webkitpy/style/checkers/jsonchecker.py: Added. (I didn't name this just "json",

which would have matched our other checkers, because I couldn't figure out how to call
"json.loads" without hitting namespace conflicts.)
(JSONChecker.init): Turn of line filtering so that we always check the whole file, not
just the modified lines from a patch.
(JSONChecker.check): Try to parse the lines as JSON. Mark an error if there was an
exception.
(JSONChecker.line_number_from_json_exception): Parse the json modules exception message to
try to extract a line number.

Split QtPageClient out of QtWebPageProxy.
This client will live in QQuickWebViewPrivate and communicate directly
with QtWebPageProxy and QtWebPageEventHandler. The functions that need
anything else than these entities will need to call the proper implementation
through QtWebPageProxy itself.
With this we have a clear separation between PageClient and PageProxy, having
two well defined and separated entities for hooking our clients with our API layer (QtWebPageProxy)
and for hooking the WebPageProxy with our client implementations (QtPageClient).
As a positive side-effect we have a cleaner QtWebPageProxy.

According to ​http://www.w3.org/TR/CSS21/visudet.html, the "width" and "height" properties
do not apply for inline non-replaced elements and should have their initial value of "auto"
as their computed values.

This change makes the scrolling part of CCInputHandler stateful by
replacing scrollRootLayer() with scrollBegin(), scrollBy() and
scrollEnd(). This is done in preparation for scrollable sublayers.
Specifically, scrollBegin() will allow CCLayerTreeHostImpl to perform
input event hit testing to find the layer to be scrolled.

This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL

will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:

In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.

This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:

DerivedSources.make

DerivedSources.pri

GNUmakefile.am

PlatformBlackBerry.cmake

UseJSC.cmake

UseV8.cmake

WebCore.vcproj/MigrateScripts

WebCore.vcproj/WebCore.vcproj

bindings/gobject/GNUmakefile.am

WebCore.gyp/WebCore.gyp

Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:

DOMWindowWebAudio.idl:

interface [

Supplemental=DOMWindow

] DOMWindowWebAudio {

attribute attr1;
attribute attr2;

};

DOMWindow.idl:

interface [
] DOMWindow {

attribute [Supplemented] attr1; This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;

};

Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:

If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.

Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).

Tests: webaudio/*

WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.

WebCore.gyp/scripts/action_derivedsourcesallinone.py:

(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.

WebCore.gypi: Added DOMWindowWebAudio.idl.

bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.

page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.

webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.

(WebKit::WebFrameImpl::createFrameView): Set the auto-resize
state on the new view.

src/WebViewImpl.cpp:

(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::resize): Extracted sendResizeEventAndRepaint, so
that it can be used by layoutUpdated.
(WebKit::WebViewImpl::queueBothResizeEventAndPaint): Ditto.
(WebKit::WebViewImpl::hasHorizontalScrollbar): Added for testing purposes.
(WebKit::WebViewImpl::hasVerticalScrollbar): Ditto.
(WebKit::WebViewImpl::enableAutoResizeMode): Set-up auto-resize.
(WebKit::WebViewImpl::layoutUpdated): Handle the auto-resize case by
sending events and invalidation.

rebaseline.py and chromium_gpu.py use Port.find_test_files() the same way as it is used in Port.tests()
I'd like to replace all calls to find_test_files with tests and eliminate find_tests_files.
Also I'll move _is_test_file() and related functions close to Port.tests().

ImageLoader were updating renderer even if the renderer's image is
style generated content. This was wrong because if an image element
with src attribute and style="content: url(...)" attribute the
src image might override content image. The correct behavior should
be showing content image.

This patch is differentiating style generated RenderImage from the
normal RenderImage and keeps the RenderImageSource untouched if the
renderer is generated content.

(WebCore::Notification::show): For the Mac platform, we just forward the show() call to the
notification client and update the state, because we cannot get synchronous acknowledgment that the
notification got delivered.
(WebCore::Notification::dispatchShowEvent): Create simple events and dispatch to the notification.
(WebCore::Notification::dispatchClickEvent): Ditto.
(WebCore::Notification::dispatchCloseEvent): Ditto.
(WebCore::Notification::dispatchErrorEvent): Ditto.

UIProcess/WebNotification.h: Add and expose internal ID of each notification sent to the platform.

(WebKit::WebNotification::create):
(WebKit::WebNotification::notificationID):
(WebKit::isNotificationIDValid): Checks that the ID is not a value that might trip up the HashMaps used
for mapping IDs to notifications.

EWebKit.h is a list of public header files for application to use WebKit/Efl.
This patch removes EWebKit.h in internal files to reduce unnecessary includes.
In addition, reorders optional includes to fix style.

This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL

will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:

In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.

This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:

DerivedSources.make

DerivedSources.pri

GNUmakefile.am

PlatformBlackBerry.cmake

UseJSC.cmake

UseV8.cmake

WebCore.vcproj/MigrateScripts

WebCore.vcproj/WebCore.vcproj

bindings/gobject/GNUmakefile.am

WebCore.gyp/WebCore.gyp

Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:

DOMWindowWebAudio.idl:

interface [

Supplemental=DOMWindow

] DOMWindowWebAudio {

attribute attr1;
attribute attr2;

};

DOMWindow.idl:

interface [
] DOMWindow {

attribute [Supplemented] attr1; This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;

};

Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:

If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.

Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).

Tests: webaudio/*

WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.

WebCore.gyp/scripts/action_derivedsourcesallinone.py:

(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.

WebCore.gypi: Added DOMWindowWebAudio.idl.

bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.

page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.

webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.

No new tests because we don't have a reliable reproduction for this failure.
However, the failure is caught by the existing fast/block/child-not-removed-from-parent-lineboxes-crash.html
intermittently with about 30% probability.

Old implementation had a problem at CLOSING state. Buffered frame size
was added to m_bufferedAmountAfterClose at close(). But the function
returns the sum of m_bufferedAmountAfterClose and internally buffered
frame size, or m_channel->bufferedAmount(). So, buffered frames was
double counted.

In new implementation, m_bufferedAmount always represents buffered
frame size and m_bufferedAmountAfterClose does disposed frame size.
As a result, bufferedAmount() implementation become just to return the
sum of m_bufferedAmount and m_bufferedAmountAfterClose.

Add a layout test to check the WebSocket bufferedAmount property.
This test close the socket channel when it is busy and buffer some
message frames, then check the property's value in CLOSING and CLOSED
state.

Add support for all the integral typed arrays in the DFG JIT.
Currently this loads the contents of Uint32 arrays as doubles,
which is clearly not as efficient as it could be, but this is
still in the order of 10-20x faster than the existing behaviour.

This needed us to add support for writing 16bit values to the
macroassembler, and also to support double<->unsigned conversion.

This functionality has been broken since r99364, which stopped setting
the "webkit-resource" property needed by
ewk_protocol_handler_soup.cpp.

After giving it some thought, it looks clear that this code should not
be in ewk at all: it is very backend-specific (even in the function
signatures it expects), and it only allows callers to register schemes
once and provide a single handler to all of them, which does not make
much sense.

Client code using WebKit-EFL with the soup backend should be
responsible for creating their own request handlers (ie. subclass
SoupRequest) instead.

For that to be possible, a function which returns the default
SoupSession used by WebKit has been added.

Previously, invalid URLs could have a string emanating from a
partial parsing of the input. The creation of the string was done
through the Latin1 codec regardless of the encoding of the char* url.

This caused two types of issues, URLs were evaluated as half-parsed,
and the coding and decoding of the string was not consistent.

This patch changes KURL::parse() to fallback on the original string
whenever the parsing of the URL fails.

Test: fast/url/invalid-urls-utf8.html

platform/KURL.cpp:

(WebCore::KURL::KURL):
(WebCore::KURL::init):
(WebCore::KURL::parse):
Previously, originalString was only used as an optimization to avoid
the allocation of a string. Since this optimization depends on the
comparison of the incoming string and the encoded buffer.
This patches generalizes originalString to always be the original string
being parsed by KURL. The optimization is kept by comparing that string
and the final parsed result.

platform/KURL.h:

(WebCore::KURL::parse):

platform/cf/KURLCFNet.cpp:

(WebCore::KURL::KURL):

platform/mac/KURLMac.mm:

(WebCore::KURL::KURL):

LayoutTests:

fast/url/invalid-urls-utf8-expected.txt: Added.

fast/url/invalid-urls-utf8.html: Added.

New test for invalid URL where the Unicode characters were mangled
by the parsing.

fast/url/file-expected.txt:

fast/url/file-http-base-expected.txt:

Two urls where expended by their base URL before found invalid. The partial
parsed result was saved as the new URL.

fast/url/host-expected.txt:

The host of two urls were invalid, and partially modified by the parsing.

(_all_categories): Added JSONChecker's categories to the set of all categories.
(FileType): Added a JSON type. Incremented other types.
(CheckerDispatcher._file_type): Use the JSON file type for .json files.
(CheckerDispatcher._create_checker): Use a JSONChecker for JSON files.

Scripts/webkitpy/style/checker_unittest.py:

(CheckerDispatcherDispatchTest.assert_checker_json): Added this helper method.
(CheckerDispatcherDispatchTest.test_json_paths): Added. Based on test_python_paths.

Scripts/webkitpy/style/checkers/jsonchecker.py: Added. (I didn't name this just "json",

which would have matched our other checkers, because I couldn't figure out how to call
"json.loads" without hitting namespace conflicts.)
(JSONChecker.init): Turn of line filtering so that we always check the whole file, not
just the modified lines from a patch.
(JSONChecker.check): Try to parse the lines as JSON. Mark an error if there was an
exception.
(JSONChecker.line_number_from_json_exception): Parse the json modules exception message to
try to extract a line number.

We can't just change the direction of the FlexOrderIterator because we want the overflow to be
on the left side. Instead, we apply similar logic as when we're laying out RTL content. Putting
the check in isLeftToRightFlow() lets us flip the flexbox's border and padding and the flexitems'
margins. We then layout from right to left in layoutAndPlaceChildren.

Non-drawing child trees should not be added to the parent render surface's layer list
and should neither extend the parent layer's drawable content rect.

This also fixes assertions from the content texture residency logic, which doesn't like it
if we try to use a render surface through a parent, while that surface itself was never 'used'
in the same frame.

A new class, CommitterAuth, handles authentication of WebKit committers. CommitterAuth uses
three files to do its job: a config file that contains a list of WebKit committer usernames,
an htdigest file that contains Trac credentials, and JSON file that gives the paths for
those two files.

Reviewed by Darin Adler.

BuildSlaveSupport/build.webkit.org-config/committer_auth.py: Added.

(Error): Basic wrapper around Exception that we use for cases where we couldn't even check
whether credentials were valid or not.
(CommitterAuth.init): Just store the path to auth.json.
(CommitterAuth.auth_json): Load, parse, and return auth.json.
(CommitterAuth.auth_json_filename): Return the path to auth.json.
(CommitterAuth.authenticate): Return true if the user is a WebKit committer and their
credentials are valid Trac credentials. Return false otherwise or if an error occurred while
checking those conditions.
(CommitterAuth.is_webkit_committer): Return true if the user is a WebKit committer. Return
false otherwise or if an exception was thrown.
(CommitterAuth.is_webkit_trac_user): Return true if the username/password are present in the
Trac credentials htdigest file. Return false otherwise or if an exception was thrown.

(CommitterAuth.open_auth_json_file):
(CommitterAuth.open_trac_credentials_file):
(CommitterAuth.open_webkit_committers_file):
Open the specified file. These are mostly useful for testing purposes.

(CommitterAuth.trac_credentials_filename):
(CommitterAuth.webkit_committers_filename):
Return the path to the specified file by retrieving it from auth.json.

(CommitterAuth.webkit_committers): Load and parse the committers file and extract the list
of WebKit committers from it.

(CommitterAuthTest.setUp): Set up a somewhat-mocked CommitterAuth that is used by most
tests.
(CommitterAuthTest.fake_open_function): Returns a function that can be used in place of
"open" to test that the expected path was opened.
(CommitterAuthTest.test_authentication_success): Test that committers can authenticate
successfully.
(CommitterAuthTest.test_committer_without_trac_credentials_fails): Test that committers who
somehow have no Trac account can't authenticate.

(CommitterAuthTest.test_fail_to_open_auth_json_file):
(CommitterAuthTest.test_fail_to_open_trac_credentials_file):
(CommitterAuthTest.test_fail_to_open_webkit_committers_file):
Test what happens when we can't open the three files we depend upon.

(CommitterAuthTest.test_implements_IAuth): Test that we fulfill buildbot's expectations for
an authentication class.

(CommitterAuthTest.test_invalid_auth_json_file):
(CommitterAuthTest.test_invalid_committers_file):
(CommitterAuthTest.test_invalid_trac_credentials_file):
(CommitterAuthTest.test_missing_auth_json_keys):
Test what happens when the three files we depend upon are invalid in some way.

(CommitterAuthTest.test_open_auth_json_file):
(CommitterAuthTest.test_open_trac_credentials_file):
(CommitterAuthTest.test_open_webkit_committers_file):
Test that we open the expected paths.

(CommitterAuthTest.test_trac_credentials_filename):
(CommitterAuthTest.test_webkit_committers_filename):
Test that we extract filenames out of auth.json correctly.

This class can be used to parse Apache's htdigest files and check whether a given
username/realm/password tuple is present in the file. Eventually this will be used for
authenticating users on build.webkit.org (<​http://webkit.org/b/73353>).

Reviewed by Eric Seidel.

Scripts/webkitpy/common/net/htdigestparser.py: Added.

(HTDigestParser.init): Stores the parsed representation of the file.
(HTDigestParser.authenticate): Hashes the username/realm/password tuple to generate a hashed
password and returns whether the resulting tuple is present in the file.
(HTDigestParser.entries): Just returns the parsed representation of the file.
(HTDigestParser.parse_file): Splits each line on colons and checks that each line has the
expected syntax ('username:realm:hashed_password'). If any line is invalid, we treat the
whole file as invalid and all authentication attempts will fail.

Scripts/webkitpy/common/net/htdigestparser_unittest.py: Added.

(HTDigestParserTest.assertEntriesEqual): Helper method to assert that fake_htdigest_file,
optionally appended with some extra data, generates the expected entries.
(HTDigestParserTest.test_authenticate): Tests that tuples present in the file can
authenticate, and tuples not present cannot.
(HTDigestParserTest.test_entries): Tests that we get the expected entries from
fake_htdigest_file.

Previously, invalid URLs could have a string emanating from a
partial parsing of the input. The creation of the string was done
through the Latin1 codec regardless of the encoding of the char* url.

This caused two types of issues, URLs were evaluated as half-parsed,
and the coding and decoding of the string was not consistent.

This patch changes KURL::parse() to fallback on the original string
whenever the parsing of the URL fails.

Test: fast/url/invalid-urls-utf8.html

platform/KURL.cpp:

(WebCore::KURL::KURL):
(WebCore::KURL::init):
(WebCore::KURL::parse):
Previously, originalString was only used as an optimization to avoid
the allocation of a string. Since this optimization depends on the
comparison of the incoming string and the encoded buffer.
This patches generalizes originalString to always be the original string
being parsed by KURL. The optimization is kept by comparing that string
and the final parsed result.

platform/KURL.h:

(WebCore::KURL::parse):

platform/cf/KURLCFNet.cpp:

(WebCore::KURL::KURL):

platform/mac/KURLMac.mm:

(WebCore::KURL::KURL):

LayoutTests:

fast/url/invalid-urls-utf8-expected.txt: Added.

fast/url/invalid-urls-utf8.html: Added.

New test for invalid URL where the Unicode characters were mangled
by the parsing.

fast/url/file-expected.txt:

fast/url/file-http-base-expected.txt:

Two urls where expended by their base URL before found invalid. The partial
parsed result was saved as the new URL.

fast/url/host-expected.txt:

The host of two urls were invalid, and partially modified by the parsing.

Preprocessor defines used in WebCore/dom/make_names.pl are set via WEBKIT_FEATURE
for every port in the correspondig platform file. Pass an explicit list of defines
to the CMake macro, so we need to maintain the list only once.

Move painting of QQuickWebPage content from canvas afterrendering() to
QSGGeometryNode/QSGMaterial based paint node. Implementation uses QSGMaterialShader
updateState() method to draw TextureMapper graphics layers.
This is considered to be temporary until QSGNode::UserNodeType will be available.

This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL

will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:

In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.

This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:

DerivedSources.make

DerivedSources.pri

GNUmakefile.am

PlatformBlackBerry.cmake

UseJSC.cmake

UseV8.cmake

WebCore.vcproj/MigrateScripts

WebCore.vcproj/WebCore.vcproj

bindings/gobject/GNUmakefile.am

WebCore.gyp/WebCore.gyp

Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:

DOMWindowWebAudio.idl:

interface [

Supplemental=DOMWindow

] DOMWindowWebAudio {

attribute attr1;
attribute attr2;

};

DOMWindow.idl:

interface [
] DOMWindow {

attribute [Supplemented] attr1; This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;

};

Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:

If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.

Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).

Tests: webaudio/*

WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.

WebCore.gyp/scripts/action_derivedsourcesallinone.py:

(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.

WebCore.gypi: Added DOMWindowWebAudio.idl.

bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.

page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.

webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.

Added the basic structure of class CredentialBackingStore
to persist the credential data, and generated
platform/network/blackberry/CredentialStorageBlackBerry.cpp,
to implement CredentialStorage::getFromPersistentStorage
for BlackBerry porting.
Contributed by Torch Team.

Even if we did push(@{$supplementals{$targetIdlFile}}, $idlFile),
the $supplementals{$targetIdlFile} can be re-initialized by
$supplementals{$idlFile} = [] in subsequent loops.
This patch fixes the bug.

Buildbot's built-in file transfer capabilities are transferring files much more slowly than
curl does. This seems to be due to a combination of buildbot being single-threaded (and thus
often busy servicing web requests, etc.) and using an IPC mechanism with fairly high
overhead (courtesy of the Twisted framework).

Eventually we'd like to make Buildbot's built-in transferring more efficient. In the
meantime we'll try using curl for downloads and keep thinking about a solution for uploads.
This should make the test slaves quite a bit faster, and should ease the CPU load on
build.webkit.org a bit.

to Test slaves. It's run just before DownloadBuiltProduct.
(DownloadBuiltProduct): Changed to be a normal ShellCommand that invokes curl to perform the
download.
(CreateWebKitBuildDirectory): Added. Creates the WebKitBuild directory on a slave.
FileDownload used to do this for us automatically.

Unreviewed. Update chromium test expectations.
Yet another inspector test crash appeared. I really hope they could appear at once.
If I encounter another crash test, it might be better to mark all inspector tests SKIP for chromium for a while.

Switch back to using the high bit as the inline marker, to make
all of the bit indexing operations simpler. Computing the size in
words and in bytes of a bitvector, using the number of bits as
input is error-prone enough; and with the current approach to
solving the X86 bug we end up getting it wrong. Making it right
seems hard.

So instead, to solve the original problem (the high bit may be
meaningful on 32-bit systems), the out-of-line storage pointer is
right-shifted by 1. Compared to the original BitVector code, this
is a much smaller change (just three lines).

This solves a bug where the DFG was corrupting its call frame
because BitVector lost track of some bits.

This is a regression caused by a patch of bug 73307.
If we replaced a custom constructor of window.XXXX (e.g. XXXX is Audio or Option)
with the [NamedConstructor] IDL, fast/js/global-constructors.html,
fast/dom/Window/window-properties.html and fast/dom/call-a-constructor-as-a-function.html
start to fail in JSC.