Add implementation of the Mac WebThemeEngine that uses an NSScroller
to render top-level scrollbars. This makes them match the Mac port's
use of an NSScrollView, which means that we'll be able to share more
pixel baselines.

The new rendering code will not be activated until the
USE_WEB_THEME_ENGINE_TO_PAINT_THUMB #define is fliped in
ScrollbarThemeChromiumMac.

Split out pieces of RenderThemeGtk into RenderThemeGtk2 and RenderThemeGtk3
if they are going to differ between GTK+ 2.x and GTK+ 3.x. This is the preliminary
step to landing support for the new GTK+ 3.x theming API.

No new tests. This should not change functionality.

GNUmakefile.am: Add RenderThemeGtk2 and RenderThemeGtk3 to the sources list.

r74803 added chromium-win baselines for svg/dom/length-list-parser.html
but chromium-linux shouldn't use them (despite having them in its
fallback path). Copy the base expectations into chromium-linux.

bindings/js/JSDOMBinding.h: Removed the functions mentioned above. Added
activeDOMWindow and firstDOMWindow. Also added a FIXME for the extremely poorly
named allowsAccessFromFrame functions, which answer the question of whether
script is allowed access *to* a frame.

bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::setHref): Changed to pass the active and first windows through
to the Location::setHref function, with it doing the rest of the work. This moves
work out of the DOM binding that belongs in the DOM itself. Eventually such functions
could even be automatically generated by the bindings script.
(WebCore::JSLocation::setProtocol): Ditto.
(WebCore::JSLocation::setHost): Ditto.
(WebCore::JSLocation::setHostname): Ditto.
(WebCore::JSLocation::setPort): Ditto.
(WebCore::JSLocation::setPathname): Ditto.
(WebCore::JSLocation::setSearch): Ditto.
(WebCore::JSLocation::setHash): Ditto.
(WebCore::JSLocation::replace): Ditto.
(WebCore::JSLocation::reload): Ditto.
(WebCore::JSLocation::assign): Ditto.

page/DOMWindow.cpp:
(WebCore::DOMWindow::setLocation): Added a SetLocationLocking argument that allows us
to use this function for Location::replace, which is the same as setLocation except that
it locks both history and the back/forward list.

page/DOMWindow.h: Ditto.

page/Location.cpp:
(WebCore::Location::setHref): Added. Uses DOMWindow::setLocation so that the security
logic there does not have to be repeated or even refactored.
(WebCore::Location::setProtocol): Ditto.
(WebCore::Location::setHost): Ditto.
(WebCore::Location::setHostname): Ditto.
(WebCore::Location::setPort): Ditto.
(WebCore::Location::setPathname): Ditto.
(WebCore::Location::setSearch): Ditto.
(WebCore::Location::setHash): Ditto.
(WebCore::Location::assign): Ditto.
(WebCore::Location::replace): Ditto.
(WebCore::Location::reload): Added. Security logic was refactored from the code in
JSLocationCustom.cpp. Added a FIXME about the fact that this security logic seems
possibly unneeded.

The "paste" DOM event is handled for the CSS property name field to parse out the name and value parts
of a CSS property being pasted (by the first ':' found). The property is committed (if not a new one),
and the edit focus is transferred to the value field.

In RenderBlock removeChild function, when the inlineChildrenBlock(equal to prev or next)
is reparented to blockChildrenBlock, it is no longer a child of "this". This causes the
assertion failure when removeChildNode executes on the child(equal to prev or next).
Fix a typo in canMergeContiguousAnonymousBlocks.

Test: fast/multicol/span/double-merge-anonymous-block-crash.html

rendering/RenderBlock.cpp:
(WebCore::canMergeContiguousAnonymousBlocks): fix typo, change prev to next.
(WebCore::RenderBlock::removeChild): if prev or not is reparented, then set it to zero.

Fixes an issue where the date of the wrong change log entry may be modified.
Moreover, changes fixChangeLogPatch() to move entries inserted earlier
in a ChangeLog file to the top of the file.

Currently, fixChangeLogPatch() explicitly bails out and returns an unchanged
diff when it detects that the diff inserts a change log entry earlier in a
ChangeLog. It is unusual to land a patch that has such a deliberate ChangeLog
change. With the advent of the commit-queue this functionality of bailing out
and hence landing the patch as-is is harmful to the accuracy of the ChangeLog.
Instead, we should always move the change log entry to the top of the ChangeLog file.

A side-effect of this change is that setChangeLogDateAndReviewer() now updates
the date line of the correct change log entry in a ChangeLog diff.

Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl:
Updated the following unit tests now that we move entries inserted earlier to the top:

"fixChangeLogPatch: New entry inserted in middle."
(formerly named "fixChangeLogPatch: [no change] New entry inserted in middle.")

"fixChangeLogPatch: New entry inserted earlier in the file, but after an entry with the same author and date."
(formerly named "fixChangeLogPatch: [no change] New entry inserted earlier in the file, but after an entry with the same author and date.")

Remove failing expectations for three Mac tests that no longer fail.
Remove failing expectations for two canvas tests that no longer crash
(r74561, which caused the failing assert, was rolled out with r74587).

Remove the JSC_HOST_CALL from methods that are called from C++. JSC_HOST_CALL gives
methods the fastcall calling convention, which leads to runtime errors when they are
called from C++. Also remove a bit of unnecessary code duplication.

No new tests. This is covered by fast/canvas/webgl/data-view-test.html.

(WebCore::HTMLCanvasElement::attach): Added. Like recalcStyle(), calls
CanvasRenderingContext2D::updateFont() if necessary. This covers the case of a detach/
attach-type style recalc.

html/HTMLCanvasElement.h:

html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawTextInternal): Removed the early return added inr74716. A font that is loading custom fonts is okay to use, as long as it is valid.
(WebCore::CanvasRenderingContext2D::accessFont): Added a call to
Document::updateStyleIfNeeded(). This ensures that any pending style recalc will take place
and update the font if it is invalid.

Typically when a script element is removed from the document, the cached script
client is removed. However, during the before load event, the cached script client
hasn't been created yet so it can't be removed.

This patch handles that case by explicitly checking if the script element was
removed during the beforeload event. Also, it avoids caching the Document references
over the arbitrary script execution in the before load event.

Fix editing/input/ime-composition-clearpreedit.html test in chromium
by removing the line "editor->confirmComposition(text);" from
WebFrameImpl::setMarkedText() method, because that line will insert the
text into the focused node, which is apparently wrong.

Don't emit the close-web-view signal immediately during execution of closeWindowSoon.
The signal handler may choose to destroy the web view while handling that signal,
which may remove the last reference to the web view. FrameLoaderClient depends on the
view still existing though. Instead, let the caller finish executing and emit the signal
after a 0 length timeout. This matches the behavior on the Windows and Mac ports.

WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::ChromeClient): Initialize the timer id.
(WebKit::emitCloseWebViewSignalLater): Callback for the timer.
(WebKit::ChromeClient::closeWindowSoon): Do the actual signal invocation after
the caller finishes its tasks.

WebCoreSupport/ChromeClientGtk.h: Add a new member for the timer id. We
can use this to prevent emitting the close-web-view signal twice.

This was used when HTMLScriptRunner::runScript created a PendingScript
for inline scripts. But now it just calls executeScript() directly.
External scripts always have the minimum starting line number.

page/FocusController.cpp:
(WebCore::updatFocusCandidateIfNeeded): Assert renderer() and
isElementNode() now that we are bailing out earlier in both the
FocusCandidate constructor and FocusController::findFocusCandidateInContainer().

page/SpatialNavigation.h: Swapped the parameters order in canScrollInDirection
and virtualRectForAreaElementAndDirection functions.
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionallyInContainer): Adjusted call sites
of canScrollInDirection(), and added an early return if !isElementNode().
(WebCore::FocusController::advanceFocusDirectionally): Adjusted call site of
virtualRectForAreaElementAndDirection().

After the GPU process recovers, the layer size is set to IntSize(),
but IntRect::unite() has a special case for empty rects. This
behavior was causing the layer size to be too small, causing an
out-of-bounds array access elsewhere.

As pointed out by Dan Bernstein, it should read: "Rename HTMLFrameElementBase::getMarginWidth()
and HTMLFrameElementBase::getMarginHeight() to HTMLFrameElementBase::marginWidth() and
HTMLFrameElementBase::marginHeight(), respectively."

Rename HTMLFrameElementBase::getMarginWidth() and HTMLFrameElementBase::getMarginHeight()
to HTMLFrameElementBase::marginHeight() and HTMLFrameElementBase::marginHeight(), respectively.
This will make the names of these getters consistent with the naming convention we use for
getters.

rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::viewCleared): Also renamed variables marginw and marginh
to marginWidth and marginHeight, respectively. This makes the names of these variables
consistent with the names of similar variables in SubframeLoader::loadSubframe() and FrameView::init().

Prevent adding "null string" editor commands by first checking whether or not
the command string is null in generateEditorCommands before appending it to the
list of pending editor command strings.

WebCoreSupport/EditorClientGtk.cpp:
(WebKit::EditorClient::generateEditorCommands): Check for the null string (no
command for this key combination) before appending a command string to the list of
pending editor commands.
(WebKit::EditorClient::executePendingEditorCommands): Add an ASSERT which detects
null command strings.

wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
Platform.h HAVE macro, and included the Visual Studio 2010 compiler
as one of the ones that has nullptr.

wtf/NullPtr.cpp: Updated condition to match.

wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
overload if we are compiling in loose mode and the compiler has
nullptr, because assignment of 0 will otherwise encounter
ambiguitity with this overload and the overload for loose mode
that takes a raw pointer. The conditional can be removed when we
get rid of loose mode.

wtf/PassOwnPtr.h: Ditto.

wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
if the compiler has nullptr, because assignment of 0 would be
ambiguous with the overload that takes a raw pointer. The conditional
can be removed if we ever decide we no longer need to support
assigning 0, but might need a way to catch that usage on older compilers.

wtf/RefPtr.h: Ditto.

wtf/RetainPtr.h: Ditto

JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
accidentally omitted when the file was first added.

Adds WKDatabaseManagerGetDatabasesByOrigin, which asynchronously returns
an array of dictionaries containing details about each origin using
databases and details about each database. Keys were added for accessing
the data in the dictionaries.

Adds WKDatabaseManagerDeleteDatabasesWithNameForOrigin to delete a database
with a specific identifier.

Adds WKDatabaseManagerSetQuotaForOrigin to set the quota for an origin.

from the new check and whitespace/parens because the syntax is unusual and
produced a fair number of positives for these checks.

Scripts/webkitpy/style/checkers/cpp.py:

(_convert_to_lower_with_underscores): Used as a canonical form for type names
and parameter names when determining if the parameter name is useless.
(_create_acronym): Used to check for redundant variable names in cases like "ExceptionCode ec"
(Parameter.lower_with_underscores_name): Gives back the parameter name in a lower_with_underscore
format.
(_check_parameter_name_against_text): Checks to see if the parameter name is in the
text or an acronym of it.
(check_function_definition): Checks function definitions for meaningless variable names.
(process_line): Added call to check_function_definition.

Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppFunctionsTest.test_convert_to_lower_with_underscores): Test for _convert_to_lower_with_underscores.
(CppFunctionsTest.test_create_acronym): Test for _create_acronym.
(CppFunctionsTest.test_check_parameter_against_text): Test for _check_parameter_against_text.
(CppStyleTestBase.perform_single_line_lint): Removed the parameter name check
because when only checking a snippet, there are a lot of bogus functions.
(CppStyleTestBase.perform_multi_line_lint): Ditto and removed a bogus filter
that I put there previously and just noticed.
(WebKitStyleTest.test_parameter_names): Tests for the functionality -- both
check_function_definition and process_line.

The base clipper of the clipped smart object, which is the parent
class of the ewk_frame class is a static clipper. It's normally only
used for showing/hiding the object, but in the case of the ewk_frame,
it needs to clip the object to its dimension, in order to clip
scrollbars of inner frames.

Setting it to non-static makes the clipper to be automatically moved
by the parent class, thus staying on the correct position when the
frame is moved.

This change needed to be done after the adoption of the static clipper
on the clipped smart base class.

On paintBoxShadow(), the spread value accidentally accumulated accidentally
during the loop, which should be applied individually for radius of each shadow.
This change makes the radii for rects computed for each shadow.

Scripts/webkitpy/style/checkers/cpp.py:
(Position.init): Holds simple position information (row, column).
(Parameter.init): Holds information about a parameter.
(SingleLineView.init): Converts multiple lines into a single line for simpler searches.
(SingleLineView.convert_column_to_row): Returns the original row given a column.
(create_skeleton_parameters): Simplifies a parameter list for easier searching.
(find_parameter_name_index): Finds where the parameter name is.
(parameter_list): Generates the list of parameters for a function.
(_FunctionState.begin): Added information to allow determining the parameters
on demand.
(_FunctionState.get_parameter_list): Returns a tuple of function parameters.
(detect_functions): Improve function detection for operator functions and
determine where the parameters end and pass that to _FunctionState.begin.

Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppFunctionsTest.test_parameter): Verifies Parameter functionality.
(CppFunctionsTest.test_single_line_view): Verifies SingleLineView functionality.
(CppFunctionsTest.test_create_skeleton_parameters): Verifies create_skeleton_parameters.
(CppFunctionsTest.test_find_parameter_name_index): Verifies find_parameter_name_index.
(CppFunctionsTest.test_parameter_list): Does some minimal verification for parameter list.
Much more thorough verification is done as part of FunctionDetectionTest.test_parameter_list.
(FunctionDetectionTest.perform_function_detection): Added support for verifying
the parameters found.
(FunctionDetectionTest.test_function_declaration_detection): Added more function
detection test to verify that we catch the operator functions.
(FunctionDetectionTest.test_ignore_macros): Verify that function detection ignores macros.
(FunctionDetectionTest.test_parameter_list): Added tests to verify the parameter parsing.
(CheckForFunctionLengthsTest.test_function_length_check_definition_severity1_for_bad_test_doesnt_break): Removed
because the error. The test is about the bad function name. Fixing the name makes the test exactly like
test_function_length_check_definition_severity1_for_test.