If the browsing context's session history contains only one Document,
and that was the about:blank Document created when the browsing context
was created, then the navigation must be done with replacement enabled.

This patch adds bare-bones integrtion with Rietveld for code reviews.
The behavior is hidden behind the --fancy-review command line flag.
Currently, there's no support for uploading more than one patch per
issue (which is a nice feature of Rietveld). The plan is to play with
this for a bit and see if it's useful.

Modified from Adam's original patch to autoinstall the rietveld upload script.

(WebCore::SecurityOrigin::addOriginAccessWhitelistEntry): Use the add method to prevent a
second hash lookup.
(WebCore::SecurityOrigin::removeOriginAccessWhitelistEntry): Added. Find a matching
OriginAccessEntry and remove it.

We were failing to read reviewers out of ChangeLogs
when the reviewer has unicode characters in his/her name.
I fixed this by explicitly decoding from utf8 every time we
read in a ChangeLog file (they are always UTF8).

In the Haiku port, there is no mapping between native widgets
and WebCore Widget instances. There is only a top-level BView
which renders a web page into a bitmap. For certain WebCore widget
functionality, we need to access this BView, like for setting the
current cursor or forcing focus. On the other hand, setting a
platform widget pointer on Widget results into completely different
behavior, like ScrollView tries to forward everything instead of
handling stuff itself. To make this work, the pointer to a "top-level"
BView is stored in every Widget for the Haiku port.

Adds support for text elements as clipPath, heterogenous clip rules, as well
as clipping of clipPath.
A fast code path let platforms clip simple shapes directly. All other variants
are drawn to a seperate ImageBuffer, which is used as a mask. This happens the same
way we like we do it on SVG Masking. This needs temporary changes to the RenderStyle
of clipPath childs. Values like stroke, resources, opacity have to be ignored.

RenderPath caches repaint rectangles (fill/stroke bbox etc.) though this caching
was effectively useless because every layout() call caused them to be reset to empty rects.
Furthermore RenderPath::layout() queried the SVG DOM upon every invocation to retrieve
the Path object, instead of only doing it when necessary. Even the TransformationMatrix
was polled everytime from the SVG DOM.

Move the knownledge wheter we need to update path/transform into the render tree and
only update when necessary. This should result in a huge performance increase, with
the drawback of adding slightly more memory, because we need to add booleans indicating
the status of path/transform (is dirty?).

I rushed the first version of this test because I wanted to get the
framework in the tree for other folks to work on the other tests. The
expected.txt file matches KURL but the PASS/FAIL indiciations match
GURL.

Only the mac needs java support files, so I pushed _build_java
down into the Mac port using a new hook "_check_port_build".
In the process I noticed a bunch of code which could be shared
between all ports and thus got rid of _tests_for_disabled_features
and version() copy/paste between all webkit ports.
I also made check_build only bother to check for ImageDiff if we're
using pixel tests.

WebKit should have more robust last-chance font fallback on Windows​https://bugs.webkit.org/show_bug.cgi?id=37473
<rdar://problem/7789438> Crash in FontFallbackList::determinePitch
<rdar://problem/7233762> Crash in FontFallbackList::fontDataAt

Look harder for a suitable last-resort font. Previously, we checked for
"Times New Roman" followed by DEFAULT_GUI_FONT.

Modify run_webkit_tests.py to not call sys.exit() at the end of test
run; doing so makes it more difficult to embed the routine for,
among other things, unit tests. We push the exit calling up into
new-run-webkit-tests.

This patch separates the begin/write/end cycle of decoding network
bytes and putting them into a document from the rest of the loading
machinery. The code and state required to write bytes into a document
doesn't interact very much with the rest of the loading machinery.

This patch is an intermediate step towards making the StyleChecker
class a generalized file processor that can do arbitary operations
on the files corresponding to a list of paths. This patch
also simplifies the unit-testing of patch-checking code.

Scripts/check-webkit-style:

Updated to use the new PatchChecker class.

Scripts/webkitpy/style/checker.py:

Refactored the StyleChecker.check_patch() method into the
check() method of a new PatchChecker class.

Scripts/webkitpy/style/checker_unittest.py:

Refactored the unit tests as necessary, changing the
StyleCheckerCheckPatchTest class to a PatchCheckerTest class.

new-run-webkit-tests currently has one huge function for
dealing with all options-parsing.
This patch is a first attempt at trying to split that large
function down into smaller (hopefully more readable?) chunks
dealing with the different areas of options.
For example, it would make sense to move configuration
options off into some module which deals with the vagries of
WebKit's configuration system. It would also make sense to move
Chromium options off onto the Chromium port object (where they are used).
It may make sense to move results.json options over to the results.json code.
This change is a first iteration, and we will certainly need more
refinement to this code over time. Hopefully I didn't make things
harder to read here.

We shouldn't replicate the kill_process logic in every port. Instead,
we should move the process interaction to Executive.

Dirk mentioned that he wanted this abstraction to make it easier to
mock things out for testing. It turns out this function is only used
in one place where it can't be used as a mock point for testing because
the corresponding create process actually creates a real process. In
the long term, we should indirect both these calls through a non-static
Executive as a mock point. However, we should wait on that until we
actually want to write the test.

Implement support for changing the executable bit of a file.
The executable bit is among the most changed file properties.
Future support can include other property changes.

Currently, if a patch changes the executable bit of a file
it is not respected by svn-apply or svn-unapply. Since the
commit-queue bot uses these tools as part of its workflow,
such patches cannot be committed by it. That is, such patches
need to be committed by hand. Instead, we should add support
for the executable bit so that such patches can be committed
by the commit-queue bot.

Scripts/VCSUtils.pm: Also change reference to Apple Computer, Inc.
in copyright to Apple, Inc.

The Git-based bots don't have this trouble because
Git.clean_working_directory fully removes files that were
marked as "add". SVN.clean_working_directory previously just
called "svn revert" which would leave added files in the
working directory untracked. This patch makes
SVN.clean_working_directory function more like
Git.clean_working_directory by removing added files after revert.

Moving files associated with the GPU compositor from platform/graphics/skia to platform/graphics/chromium. Class
rename was done in a previous CL, this CL does the file move and rename.​https://bugs.webkit.org/show_bug.cgi?id=37231

We need to always update the status server so we don't get stuck in a
spam loop. I tried writing a test for this change, but it kind of
got out of control. We need a better way to do failure injection.

Dirk Pranke pointed out that my last patch was wrong because I
introduced platform-specific logic into run_webkit_tests.py, limiting
the parallelism in Chromium to work around a bug in the main Mac port.

mac.py and chromium_mac.py had some copy/paste code. This code doesn't
actually have anything to do with WebKit ports. It's really just
something in the multiprocessing package. The lame bit is that package
isn't available in older versions of Python, so we need to implement a
fallback. However, we already have the fallback in common. We don't
need to reinvent it specificly for layout_tests.

Bring the WebKit2 Xcode configuration in to sync with recent changes to the WebKit Xcode configuration files.

Reviewed by Sam Weinig.

In particular, this updates the FEATURE_DEFINES to match those used in the other projects, and brings in
the changes to support building WebKit for older Mac OS X versions from the current Mac OS X version.

A dynamically loaded style sheet kicks off its own styleRecalc cycle. This was not
bracketed with a beginAnimationUpdate/endAnimationUpdate which wasn't resetting the
animation time. In some time-dependent cases this was causing a negative elapsedTime
to be sent to the keyframe animator. This is an invalid case which destroys the
animation prematurely. I not only added the brackets, but I also added an assert
and protection for when the elapsedTime comes up negative.

Common target settings are pulled out in to BaseTarget.xcconfig. The majority of setting overrides are
removed from the Xcode project itself. Info.plist files are updated to match those used in other frameworks.

(WebCore::DOMWrapperWorld::DOMWrapperWorld): Made DOMWrapperWorld wholly
responsible for managing its presence in WebCoreJSClientData's world set.
This is simpler and more encapsulated than making its clients sometimes
responsible for managing that set and sometimes not.

bindings/js/DOMWrapperWorld.h:

(WebCore::DOMWrapperWorld::create): Made isNormal default to false,
removing one of the reasons for the IsolatedWorld class to exist, so I
could remove that class.

bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::commonJSGlobalData): Used the work-around below.

bindings/js/ScriptController.cpp:

(WebCore::ScriptController::createWorld): Nixed IsolatedWorld, which is
now superfluous.

bindings/js/WebCoreJSClientData.h:

(WebCore::initNormalWorldClientData): Added a work-around for the fact
that WebCoreJSClientData must be set as globalData->clientData before
the DOMWrapperWorld constructor runs. This removed the other reason
for the IsolatedWorld class to exist, so I could remove that class.

platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit):
Moved code for parsing status line to HTTPHeaders, as it's used for both Mac and CF now.

platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit):
Use the actual reason phrase when available, and "OK" otherwise. Synthesizing a reson when
there isn't one is misleading, so we'll stick to our old broken behavior on Tiger, rather than
introduce a new broken one.

The problem here is that SVN was violating SCM's implicit
contract of always returning paths relative to the repository root.
That can easily be fixed by telling SVN that the CWD is the repository root.

When fixing this I realized there are a large number of places in SCM.py where
we want to consider explicitly passing self.checkout_root as the CWD.
That would allow scm methods to be executed even when the CWD is not inside
the scm tree at all, and would also make sure (in the case of SVN) that paths
returned are relative to the root. Git (almost always) returns paths relative
to the repository root.

Add a ton of FIXMEs about the need to go back and decide which methods require cwd=self.checkout_root
and which do not. We'll probably add a helper function to scm (likely SCM._run) which
always passes cwd=self.checkout_root to Executive.run_command

Scripts/webkitpy/common/checkout/scm_unittest.py:

Add a test for this change.

Scripts/webkitpy/tool/commands/upload.py:

Removed the explicit os.chdir to the repository root, since scm.py methods
should be robust against the cwd not being equal to the root.

Move the ExceptionCode paramter to the last position in
IndexedDatabaseRequest::open and friends. It should definitely
go after the callbacks to keep the parameters that come directly
from javascript together. And having output parameters appear
last is done often in the code base, so it makes sense to push
it past the Frame* param as well.

Move the ExceptionCode paramter to the last position in
IndexedDatabaseRequest::open and friends. It should definitely
go after the callbacks to keep the parameters that come directly
from javascript together. And having output parameters appear
last is done often in the code base, so it makes sense to push
it past the Frame* param as well.

(WebCore::WorkerScriptController::):
Added option parameter to forbidExecution (both JCS and V8 versions) that specifies whether currently running
script should be immediately terminated or left executed until the end.

bindings/js/WorkerScriptController.h:

(WebCore::WorkerScriptController::workerContextWrapper):
This method now can return 0 instead of context if the further execution of JS is forbidden. Since any JS execution requires
fetching JS global object first, returning 0 here is a good way to prevent re-entry into JS once worker started termination.
V8 version does similar thing already in WorkerScriptController::proxy().

(WebCore::CloseWorkerContextTask::create):
(WebCore::CloseWorkerContextTask::performTask):
(WebCore::CloseWorkerContextTask::isCleanupTask):
(WebCore::WorkerContext::close):
Use new forbidExecution(LetRunningScriptFinish) to avoid termination of script until it executes and exits.
Post a task to actually terminate the worker once the currently executing JS fragment exits.

workers/WorkerThread.cpp:

(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThread::stop):
Use new forbidExecution(TerminateRunningScript) to immediately terminate the JS.

LayoutTests:

fast/workers/resources/worker-close.js:

fast/workers/worker-close-expected.txt:

Updated tests to expect the script fragment that includes close() to run to completion.

fast/workers/worker-close-more-expected.txt: Added.

fast/workers/worker-close-more.html: Added.

fast/workers/worker-close.html:

Added test to check terminate() after close() and close() in the case of multiple MessagePort messages dispatching.

HTMLFormElement::validateInteractively() called from prepareSubmit()
prevents the submission if neither noValidate nor formNoValidate is
specified, and focuses on the first invalid control of which "invalid"
event is not canceled.

[ Re-landing of r57329 with the requisite memset added in -initWithFrame: so that the tests keep working. ]

Reviewed by John Sullivan.

In r56008 new instance variables were added to WebDynamicScrollBarsView, increasing its size.
This causes problems for 32-bit applications that derive from WebDynamicScrollBarsView, as the
size and layout of their subclasses is baked in at compile time. This results in instances
being allocated that are smaller than the new code expects, and may result in the new instance
variables sharing the same memory space as any instance variables that the subclass defines.

We can avoid this problem by having the class contain only a single member that acts as a pointer
to a heap-allocated structure that acts as storage for the real instance variables. This makes
us free to add instance variables in the future without risk of changing the size of the class.
To ensure that 32-bit applications that are built against this new WebDynamicScrollBarsView header
are able to run against older versions of WebKit we pad the class out to its previous size. This
results in any subclasses of WebDynamicScrollBarsView being created with a layout that is compatible
with both versions of the code.

This change could potentially break a subclass of WebDynamicScrollBarsView that directly accesses
instance variables of its superclass. However, this is a private header and no known subclasses
of WebDynamicScrollBarsView access superclass instance variables in this fashion.

In r56008 new instance variables were added to WebDynamicScrollBarsView, increasing its size.
This causes problems for 32-bit applications that derive from WebDynamicScrollBarsView, as the
size and layout of their subclasses is baked in at compile time. This results in instances
being allocated that are smaller than the new code expects, and may result in the new instance
variables sharing the same memory space as any instance variables that the subclass defines.

We can avoid this problem by having the class contain only a single member that acts as a pointer
to a heap-allocated structure that acts as storage for the real instance variables. This makes
us free to add instance variables in the future without risk of changing the size of the class.
To ensure that 32-bit applications that are built against this new WebDynamicScrollBarsView header
are able to run against older versions of WebKit we pad the class out to its previous size. This
results in any subclasses of WebDynamicScrollBarsView being created with a layout that is compatible
with both versions of the code.

This change could potentially break a subclass of WebDynamicScrollBarsView that directly accesses
instance variables of its superclass. However, this is a private header and no known subclasses
of WebDynamicScrollBarsView access superclass instance variables in this fashion.

WebCore.xcodeproj/project.pbxproj: Wire up the script. Remove the three inappropriate

files from the Copy Bundle Resources build phase.

WebKitTools:

Add a script to detect the presence of inappropriate files in the frameworks. At present
it only looks for .css, .idl and .in files in the top level of WebCore.framework/Resources,
as these are the only cases we've encountered recently. It can be extended to check the
other frameworks or for other inappropriate files in the future.

Add NDEBUG to the defines for package build in JavaScriptCore.pri,
so that it's consistently used for JavaScriptCore, WebCore, jsc and all
other tools using wtf, etc. data structures directly. Mixing NDEBUG with
non-NDEBUG builds causes crashes due to differences in data structures when
assertions/checks are enabled.

Do not use moc to preprocess user agent style sheets because it removes at-symbols
and hexadecimal colours from declarations.
Remove unneeded preprocessor usage from make-css-file-arrays.pl since the script
processes default css files using regular expressions therefore preprocessing is redundant.

WebCore.pri: remove --preprocessor usage

css/make-css-file-arrays.pl: remove gcc dependency

LayoutTests:

Update expected files after removal of moc preprocessing of default css sheets.
These test results now only differ in metrics from Mac ones.