loader/ResourceLoader.h:
Don't maintain m_wasLoadedFromApplicationCache, which was never used.

loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::addResource):
Assert that only implicit and dynamic resources can be added after the cache has been fully
loaded and stored to disk database.

loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
A cache group that has never been saved should not be remembered in m_cacheHostSet. Changed
the check to no longer rely on savedNewestCachePointer.

<rdar://problem/6444148> Styling a selection that ends in a line break can sometimes style what's after the break

If the range to style ended at [node, 0] or inside node (and if for some reason the node didn't get split),
applyInlineStyle would style node.

editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle): Rename pastLast to pastEndNode, since it doesn't come from
Range::pastLastNode() anymore. pastEndNode is the node after the last one that is fully selected, since
the work done in the loop that follows should only be performed on fully selected nodes.

editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply): Explicitly handle insertion into containers and after non-text nodes.
Those were handled accidently before.

editing/htmlediting.cpp:
(WebCore::caretMaxOffset): In various places we call this with a container and expect to be given the number
of children in that container, so I changed it to match that. RenderBR and RenderObject::caretMaxOffset() should
also be eliminated since maxDeepOffset handles non-text nodes.

Eliminate an extra virtual function call that occurs for every single RenderText by moving the SVG-specific
code that was placed into RenderText::styleDidChange into RenderSVGInlineText::styleDidChange.

Character position for open and closing brace was incorrectly referencing m_position to
record their position in a source document, however this is unsafe as BOMs may lead to
m_position being an arbitrary position from the real position of the current character.

WebCore.xcodeproj/project.pbxproj: Check to see if
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/inspector"
exists before trying to change directories into it and then
deleting, modifying and adding files to it.

platform/mac/http/tests/misc/willCacheResponse-delegate-callback-expected.txt:
Copied from http/tests/misc/willCacheResponse-delegate-callback-expected.txt.
Updated with non-Tiger results. The order of delegate calls has changed.

EvalCodeBlock's do not reference the functions that are declared inside the eval
code, this means that simply marking the EvalCodeBlock through the global object
is insufficient to mark the declared functions. This patch corrects this by
explicitly marking the CodeBlocks of all the functions declared in the cached
EvalNode.

​https://bugs.webkit.org/show_bug.cgi?id=23312
Implement MessageQueue::waitForMessageTimed()
Also fixed ThreadCondition::timedWait() to take absolute time, as discussed on webkit-dev.
Win32 version of timedWait still has to be implemented.

wtf/MessageQueue.h:
(WTF::MessageQueueWaitResult: new enum for the result of MessageQueue::waitForMessageTimed.
(WTF::MessageQueue::waitForMessage):
(WTF::MessageQueue::waitForMessageTimed): New method.

wtf/Threading.h:

wtf/ThreadingGtk.cpp:
(WTF::ThreadCondition::timedWait): changed to use absolute time instead of interval.

wtf/ThreadingNone.cpp:
(WTF::ThreadCondition::timedWait): ditto.

wtf/ThreadingPthreads.cpp:
(WTF::ThreadCondition::timedWait): ditto.

wtf/ThreadingQt.cpp:
(WTF::ThreadCondition::timedWait): ditto.

wtf/ThreadingWin.cpp:
(WTF::ThreadCondition::timedWait): ditto. The actual Win32 code is still to be implemented.

loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::openDatabase): Create a trigger that deletes resources when
a cache is deleted. Note that this change doesn't require bumping schema version. We should
consider switching to foreign keys and cascade delete instead of triggers in the future.
(WebCore::ApplicationCacheStorage::remove): Added a comment explaining why it's sufficient
to only remove the cache itself.
(WebCore::ApplicationCacheStorage::empty): Don't delete from CacheResources, now that this
is done automatically when a cache is deleted.

Fix failing assertion when pressing an extra mouse button on a
QWebView.

Mice with more than three buttons - for example with a dedicated
"back" button - can generate Qt::XButton1 or Button2.
WebCore::MouseButton contains only Left, Middle and Right, so in
Qt's PlatformMouseEvent we map to NoButton, resulting in a mouse
press or release even with no button set. That triggers an assertion
in EventTargetNode::dispatchMouseEvent requiring that either a button
is set or it is just a mouse move event, which is correct.

In QWebPage decide not to dispatch such mouse events where we cannot
map the mouse button to a WebCore::MouseButton.

loader/DocumentLoader.cpp: (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
Removed a misplaced check for foreign resources that prevented them from being loaded altogether.

loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache):
If a document that was loaded from appcache should be associated with a different cache,
mark the resource as foreign in the original cache and start over.

loader/appcache/ApplicationCacheResource.cpp: (WebCore::ApplicationCacheResource::addType):
This function can now be called after a cache is stored, so it no longer asserts the opposite.

Configurations/Base.xcconfig: Removed -Wno-unused-parameter from
WARNING_CFLAGS_BASE, so the unused parameter warning will fire.

bindings/js/JSDOMWindowBase.cpp:
(jsDOMWindowBaseMessageChannel): Separate the version for use when
CHANNEL_MESSAGING is turned off, so we can omit the argument names.
It would be better to not even have this property in that case,
rather than having the function return undefined, but I don't know
how to do that with the bindings script.

bindings/scripts/CodeGeneratorJS.pm: Leave out argument names in
functions where they're not used (the SVG context, and the property
name in the index getter). Use UNUSED_PARAM where arguments are
sometimes not used.

bridge/runtime_object.cpp:
(JSC::RuntimeObjectImp::put): Use UNUSED_PARAM for non-QT.

In ChromeClientQt::repaint, view should be updated with the
intersected rect, not the whole windowRect;

This generally is not a problem for normal viewport setup where
viewport size is the same as the qwebview widget size. However, if we
set the viewport size smaller than qwebkit widget, we will see
unwanted painting outside the viewport.

​https://bugs.webkit.org/show_bug.cgi?id=23281
Fix the Chromium Win build.
Need to use PLATFORM(WIN_OS) instead of PLATFORM(WIN).
Moved GTK and WX up in #if sequence because they could come with WIN_OS too,
while they have their own implementation even on Windows.

WebView/WebResource.mm:
(-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
_webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.

WebView/WebView.mm:
(-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
(needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
(-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
to call _initWithArguments: passing the frame, frameName and groupName.
(-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.

There's already a regression test for this, since bug 16421 was the same problem, but on
Mac. The regression test is fast/events/space-scroll-event.html, so I won't write a new one.

This bug doesn't affect Mac because the canEdit check in -[WebHTMLView insertText:] prevents
a text input event from being generated at all. That difference may in itself be a bug, but
the only symptom is that you get text input events in more cases on platforms other than Mac.

page/EventHandler.cpp:
(WebCore::EventHandler::handleTextInputEvent): Return whether the event's default was
handled, not the result of the dispatchEvent function, which indicates only whether the
default behavior was prevented, not if the default behavior did some insertion. This fix
makes it so the keyboard event handler can detect that no space was inserted and know that
the space bar keypress event can be treated as a scrolling command.
(WebCore::EventHandler::defaultKeyboardEventHandler): Handle the keypress event, not the
keydown event. Without the change above, making this change would have restored the old
behavior, reintroducing bug 22913 where the space bar doesn't scroll at all on Windows.

Sometimes it is not possible to cancel a pending GIO operation and the
callback might be invoked with a pointer to an already destructed
ResourceHandle. To avoid this issue we will attach the ResourceHandle
to the GObject* and in the callback attempt to get the ResourceHandle
from the GObject*. If no ResourceHandle is attached we silently fail
as the cleanup has been already done.

The JIT is allowed full access to JSImmediate, since it needs to be able to directly
manipulate JSValuePtrs. The Interpreter is provided access to perform operations directly
on JSValuePtrs through the new JSFastMath interface.

In RenderBox::repaintLayerRectsForImage(), the repaint rect does not have
to be computed in absolute coordintes. Instead, we compute a repaintRect
relative to the RenderObject, which can repaint itself.

Optimize Element::attributeChanged to just check if accessibility is enabled up front before looking at the
two accessibility-related attributes. This avoids the rest of the code for all attributes on the PLT.
Tiny speedup.

Fix 0.6% regression in PLT. Make sure not to waste time updating NSScrollView's can blit on scroll state
in the ScrollView constructor, since this is always going to be properly updated by FrameView anyway.

[Qt] Ensure that we're always notified of navigation actions for local anchors

FrameLoader::checkNavigationPolicy() does not notify us if the request has
been checked before (which happens for local anchors), but in the case of
our clients not accepting the navigation request we do want to be notified
again later on, so we clear the lastCheckedRequest flag.

Only set WA_OpaquePaintEvent if we have a page set that will actually
paint the entire contents, otherwise the optimization does not apply
as we do not have a paintEvent() implementation and Qt has to fill the
view with its default background instead.

Also fix problems where partially parsed paths will still have an effect
rather than failing parsing and being ignored.

Renamed the path-parser.html test to fuzz-path-parser.html, since it's a fuzz test,
to make room for a non-fuzz test of the path parser.

platform/mac/svg/custom/path-bad-data-expected.txt: Updated results, since the old
ones were based on incorrect path parsing behavior.

svg/dom/fuzz-path-parser-expected.txt: Copied from svg/dom/path-parser-expected.txt.
Also updated because the parser no longer tolerates extra characters at the end of the
string, which it was doing by accident.

svg/dom/resources/path-parser.js: Added. Mostly, this test shows that we are
processing the path while parsing it, which is a bug. This test would be much more
useful if that was fixed. But it also shows that we were incorrectly tolerating
extra characters after the path, which is now fixed.

page/DragController.cpp:
(WebCore::DragController::dragIsMove): Removed unused DragData argument.
(WebCore::DragController::performDrag): Call concludeEditDrag rather than
concludeDrag.
(WebCore::DragController::tryDocumentDrag): Don't pass dragData to dragIsMove.
(WebCore::DragController::concludeEditDrag): Renamed to make it clear this
should only be called for edit drags. Removed the action mask argument. Also
changed dragIsMove call sites to not pass dragData.

page/Frame.cpp:
(WebCore::createRegExpForLabels): Pass TextCaseSensitive and TextCaseInsensitive
when creating regular expressions for clarity. Call match instead of search,
since both do the same thing except for with negative start offsets, and none
used here are negative.
(WebCore::Frame::matchLabelsAgainstElement): Ditto.

page/Page.h: Moved TextCaseSensitivity from here to StringImpl.h in platform.

page/mac/FrameMac.mm:
(WebCore::regExpForLabels): Pass TextCaseSensitive and TextCaseInsensitive
when creating regular expressions for clarity. Call match instead of search,
since both do the same thing except for with negative start offsets, and none
used here are negative.
(WebCore::Frame::matchLabelsAgainstElement): Ditto.

platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::containsCharacter): Added.
(WebCore::SegmentedFontData::containsCharacters): Updated to check all characters
instead of just the first one, using containsCharacter.

platform/graphics/SegmentedFontData.h: Made more members private.
Added containsCharacter function member.

platform/mac/DragImageMac.mm:
(WebCore::dragImageSize): Changed to use RetainPtr<NSImage> directly instead of
DragImageRef for clarity, since this is platform-specific code.
(WebCore::deleteDragImage): Ditto. Also remove argument name to get rid of unused
variable warning.
(WebCore::scaleDragImage): Ditto.
(WebCore::dissolveDragImageToFraction): Ditto.
(WebCore::createDragImageFromImage): Ditto.
(WebCore::createDragImageIconForCachedImage): Ditto.

platform/posix/FileSystemPOSIX.cpp: Removed the implementation of listDirectory
because we'd rather get a link error rather than a runtime error if we use it
for anything, and right now it's not used.

platform/text/RegularExpression.cpp: Removed unused private data,
including pattern, lastMatchString, lastMatchOffsets, lastMatchCount,
and lastMatchPos. Made the RegularExpression::Private::regex be private
and use an accessor function to get at it.
(WebCore::RegularExpression::RegularExpression): Removed the const char* version
of the constructor because it's not any more efficient. Changed the boolean
constructor argument to use TextCaseSensitivity instead to make it less likely
we'll use it wrong.
(WebCore::RegularExpression::operator=): Since the only member is a single RefPtr,
just use plain old assignment on it. The only reason we do this instead of using
the compiler generated assignment operator is that we want the Private structure
to be internal to the .cpp file.
(WebCore::RegularExpression::match): Added a null check so we won't crash if
we fail to compile the regular expression. Removed the code to handle multiple
match strings, since that was unused.

platform/text/RegularExpression.h: Changed the case sensitivity argument to use
TextCaseSensitivity and not have a default value. Removed the default constructor,
and the pattern, match, and pos functions.

platform/text/StringImpl.h: Moved the TextCaseSensitivity enum here from
Page.h, because we should eventually use it in all the places where we have
an argument to control case sensitivity, starting with the functions in this
class.

platform/text/mac/ShapeArabic.c:
(shapeUnicode): Removed the unused options and pErrorCode arguments. Even though
this is code borrowed from ICU, this seems like a simple safe change to make.
(shapeArabic): Don't pass options or pErrorCode in to shapeUnicode.

rendering/RenderPath.cpp:
(WebCore::RenderPath::RenderPath): Removed the unused style argument.
Also removed the type check. The argument already has the correct type,
so it's not helpful to upcast it and then check its type again, unless
we have some reason to believe the type is not reliable. And we don't.

rendering/RenderPath.h: Removed the RenderStyle* argument to the
constructor. Also removed the explicit declaration of the destructor.
It's not helpful or needed.

rendering/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::localCaretRect): Updated the comment here to
make it clear that just returning an empty rect is not a good implementation.
Removed the argument names to get rid of the warning.

Separate out BaseString information from UString::Rep and make all baseString access go through
a member function, so that it may be used for something else (in the future) in the BaseString
case.

runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::rep):
(JSC::SmallStringsStorage::SmallStringsStorage):
(JSC::SmallStrings::SmallStrings):
(JSC::SmallStrings::mark):
Adjust to account for the changes in UString and put the UString in place in
SmallStringsStorage to aid in locality of reference among the UChar[] and UString::Rep's.

runtime/UString.h:
(JSC::UString::Rep::baseIsSelf):
(JSC::UString::Rep::setBaseString):
(JSC::UString::Rep::baseString):
(JSC::UString::Rep::):
(JSC::UString::Rep::null):
(JSC::UString::Rep::empty):
(JSC::UString::Rep::data):
(JSC::UString::cost):
Separate out the items out used by base strings from those used in Rep's that only
point to base strings. (This potentially saves 24 bytes per Rep.)

fast/frames/frame-deep-nested-resize-expected.txt: Updated newlines to
match what DumpRenderTree generates on Mac. I believe Adam generated his
results under Qt DumpRenderTree. If so, then the Qt version will need to
change to match the Mac version, since all the expected results were
generated on Mac.

platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::didCancelAuthenticationChallenge): Use the
argument since it's probably a tiny bit more efficient and gets rid
of the unused argument warning.

rendering/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::createInlineBox): Use UNUSED_PARAM.
I couldn't use ASSERT_UNUSED because it's a single assertion, but it's
the only use for two different arguments.

runtime/DatePrototype.cpp: Moved LocaleDateTimeFormat enum outside #if
so we can use this on all platforms. Changed valueOf to share the same
function with getTime, since the contents of the two are identical. Removed
a FIXME since the idea isn't really specific enough or helpful enough to
need to sit here in the source code.
(JSC::formatLocaleDate): Changed the Mac version of this function to take
the same arguments as the non-Mac version so the caller doesn't have to
special-case the two platforms. Also made the formatString array be const;
before the characters were, but the array was a modifiable global variable.
(JSC::dateProtoFuncToLocaleString): Changed to call the new unified
version of formatLocaleDate and remove the ifdef.
(JSC::dateProtoFuncToLocaleDateString): Ditto.
(JSC::dateProtoFuncToLocaleTimeString): Ditto.

runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::toObject): Use the new ASSERT_UNUSED instead of the
old UNUSED_PARAM.

runtime/RegExp.cpp:
(JSC::RegExp::RegExp): Changed to only use UNUSED_PARAM when the parameter
is actually unused.

wtf/TCSystemAlloc.cpp:
(TCMalloc_SystemRelease): Changed to only use UNUSED_PARAM when the parameter
is actually unused.
(TCMalloc_SystemCommit): Changed to omit the argument names instead of using
UNUSED_PARAM.

Fix CanvasRenderingContext2D::transform to do a pre-multiply,
rather than a post-multiply into m_transform. This bug did not affect
drawing, but did cause m_transform to be incorrect, which impacted
willDraw(), and isPointInPath.