Added support for [Reflect] for long, unsigned long, and boolean
attributes.

Fixed code that set attributes like this: <video controls="controls">
to instead set them like this: <video controls>.

Added lots more uses of [Reflect].

Removed now-unneeded [ConvertFromString].

Made [Reflect] imply [ConvertNullToNullString] so we can get rid
of most uses of the latter.

Made [Reflect] automatically lowercase the name of the reflected
content attribute to minimize the need to specify a custom content
attribute name.

One thing this patch does *not* do is remove the unneeded functions
in the various DOM classes that are no longer used by the bindings.
We should do that in a followup.

bindings/scripts/CodeGenerator.pm: Added new functions so code
can be shared across bindings, GetterExpressionPrefix and
SetterExpressionPrefix. We can do a lot more refactoring like
this in the future.

bindings/scripts/CodeGeneratorCPP.pm: Removed unneeded
ConvertFromString handling, changed to use the new
GetterExpressionPrefix and SetterExpressionPrefix functions
to better handle reflected DOM attributes.

bindings/scripts/CodeGeneratorGObject.pm: Removed unneeded
ConvertFromString handling, changed to use the new
GetterExpressionPrefix and SetterExpressionPrefix functions
to better handle reflected DOM attributes. Fixed a few things
in the output so the .cpp file will have more WebKit style.
The .h file should be GTK style, but the .cpp file can be the
standard WebKit style eventually.

bindings/scripts/CodeGeneratorJS.pm: Changed to use the new
GetterExpressionPrefix and SetterExpressionPrefix functions
and removed a now-unneeded IsSVGAnimatedType special case since
the new functions take care of it. Made reflected attributes
automatically convert null to the null string without a
separate ConvertNullToNullString attribute.

bindings/scripts/CodeGeneratorObjC.pm: Changed to use the new
GetterExpressionPrefix and SetterExpressionPrefix functions
and removed a now-unneeded IsSVGAnimatedType special case since
the new functions take care of it. Redid the special cases for
ownerDocument and for operator to fit better with the new code
paths. Removed unneeded ConvertFromString handling.

bindings/scripts/CodeGeneratorV8.pm: Changed to use the new
GetterExpressionPrefix and SetterExpressionPrefix functions
and removed a now-unneeded IsSVGAnimatedType special case since
the new functions take care of it. Made reflected attributes
automatically convert null to the null string without a
separate ConvertNullToNullString attribute.

bindings/scripts/test/TestObj.idl: Added some test cases for
content attribute reflection and for exceptions in string-typed
attributes.

svg/SVGElement.idl:
Added more uses of [Reflect]. Got rid of uses of [ConvertNullToNullString] that
are now unneeded since [Reflect] now implies that. Changed formatting to be
simpler and consistent without all the lining up and multiple lines.

While running an event handler of WebSocket object, it may be suspended
and resumed in various reason. e.g. alert() will suspend/resume
ActiveDOM objects. In chromium, sending IPC message would also
suspend/resume ActiveDOM objects.
If resume process pending buffer in this case, another event might
be fired while running the initial event handler.
Thus, resume should not process pending buffer immediately.
Pending buffer would be processed after the current task has been
finished.

websockets/ThreadableWebSocketChannelClientWrapper.h:

websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::resume):
Just set one shot timer for resumeTimerFired() if not yet set.
(WebCore::WebSocketChannel::resumeTimerFired):
Process pending event after resume was called.

HTML5ScriptRunner was careful to only call CachedResource::addClient
for cases where the resource was not already loaded. This was to
avoid getting synchronous notifyFinished callbacks from inside
addClient. (The old HTMLDocumentParser also has hacks to work around
addClient's synchronous notifyFinished behavior for already-loaded
resources as well.)

It turns out that CachedResource will mark itself as purgeable if it
has no clients, thus it could have its data cleared (but itself not
deleted) in the case where we yield back to the runloop to wait for
CSS to load before executing the loaded script.

The fix is to act more like the old parser and always call addClient
on every CachedScript we load. But unlike the old parser, we're
careful not to re-enter from addClient -> notifyFinished
using guards in HTML5DocumentParser::watchForLoad.

I do not know how to make a CachedResource purge itself
from a LayoutTest, so this is not currently testable.
If anyone knows how I'm happy to make a test.

Now that watchForLoad is called with loaded scripts, notifyFinished
may be be called from addClient, thus we may be in the middle of
script execution when it's called. It's OK. We pass the call
along to HTML5ScriptRunner::executeScriptsWaitingForLoad
and it knows how to ignore the call in that case.

The ScriptDataState is handled separately from the rest of the lexer
state changes because it's more complicted in the tree builder. The
easiest thing is to just handle it separately in the preloader too.

Add a testing framework for the preload scanner. These test cover
basic preloader behavior. They have a small hack to work around a bug
in the preload scanner discovered while writing the tests. I'll fix
the bug and remove the hack in a followup patch.

WebCore 'cheats' by firing onLoad events before the frame's layout
has been performed. This can result in event listeners performing
operations that depend on the document's final layout, such as
scrolling operations.

When scrolling a frameview in eventhandler ensure the layout is complete.

WebCore 'cheats' by firing onLoad events before the frame's layout
has been performed. This can result in event listeners performing
operations that depend on the document's final layout, such as
scrolling operations.

When scrolling a frameview in eventhandler ensure the layout is complete.

This implements didReceiveViewportArguments in our ChromeClientQt
which is hooked up with QWebPage::viewportChangeRequested().
This signal does not affect the current default behavior.
The documentation of the signal explains how to make use of this new feature.

Api/qwebframe_p.h:

(QWebFramePrivate::QWebFramePrivate):
Store information about whether the page has been laid out or not.

Api/qwebpage.cpp:

(QWebPage::viewportChangeRequested):

Api/qwebpage_p.h:

Added class QtViewportHintsPrivate.

Api/qwebpage.h:

(QWebPage::setPreferredContentsSize):
Improved documentation and now only layout if the page had already
passed layout phase.
Added class QWebPage::ViewportHints.

WebCoreSupport/ChromeClientQt.cpp:

(WebCore::ChromeClientQt::windowRect):
Modified to work as intended by the DOM, for both QWebView
and QGraphicsWebView.
(WebCore::ChromeClientQt::didReceiveViewportArguments):
Emits the signal QWebPage::viewportChangeRequested.

WebCoreSupport/ChromeClientQt.h:

WebCoreSupport/FrameLoaderClientQt.cpp:

(WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
(WebCore::FrameLoaderClientQt::dispatchDidFirstLayout):
Update information about whether the page has been laid out or not.
If the page has been laid out we ignore any further viewport meta data.

The timer-based resize quality approach implemented in​http://trac.webkit.org/changeset/34210 is a good idea, but doesn't
scale to multiple images with animated resizes. This fix unifies all
outstanding resize timers into a single timer, and removes the "use
last quality" check (which doesn't work when images are overlapping).
It also refactors the copy of this code implemented in
RenderBoxModelObject in ​http://trac.webkit.org/changeset/53949.

rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::ImageQualityController):
Unify all timers into a single timer, rename RenderBoxModelScaleObserver
to ImageQualityController, and remove the resize quality "stickness",
since it doesn't work with multiple outstanding resizes.
(WebCore::ImageQualityController::objectDestroyed):
gImages global is now m_lastPaintTimeMap member.
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
Function made non-static; repaint all pending resizes (not just one).
(WebCore::ImageQualityController::restartTimer):
Added function to restart timer at 1.05x threshold.
(WebCore::imageQualityController):
Static function to return singleton.
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
Use m_lastPaintTimeMap, not gImages global. Implement new timer
algorithm. Remove resize "stickiness".
(WebCore::RenderBoxModelObject::shouldPaintAtLowQuality):
Implement shouldPaintAtLowQuality, which pulls out "this" and passes
the call to the ImageQualityController.
(WebCore::RenderBoxModelObject::~RenderBoxModelObject):
Call ImageQualityController singleton's objectDestroyed() instead of
old static function.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
Modify shouldPaintAtLowQuality() call to match new class name and
function signature.

rendering/RenderBoxModelObject.h:
Expose shouldPaintAtLowQuality as a member function.

rendering/RenderImage.cpp:
(WebCore::RenderImage::~RenderImage):
No need to call objectDestroyed() here anymore, since the
RenderBoxModelObject destructor will do this for us.
(WebCore::RenderImage::paintIntoRect):
Rip out RenderImageScaleObserver, and call
RenderBoxModelObject::shouldPaintAtLowQuality() instead.

Added V8Proxy::throwTypeError() and throwSyntaxError for parity
with JSC::throwTypeError() and throwSyntaxError. Changed
CodeGeneratorV8.pm to use throwTypeError for overload resolution
failures. Revised CodeGeneratorJS.pm to use throwVMTypeError
instead of manual call to JSValue::encode. Deleted now-unnecessary
Chromium expectations for fast/canvas/webgl/texImageTest.html.

Added V8Proxy::throwTypeError() and throwSyntaxError for parity
with JSC::throwTypeError() and throwSyntaxError. Changed
CodeGeneratorV8.pm to use throwTypeError for overload resolution
failures. Revised CodeGeneratorJS.pm to use throwVMTypeError
instead of manual call to JSValue::encode. Deleted now-unnecessary
Chromium expectations for fast/canvas/webgl/texImageTest.html.

Clean EFL header files in order to diminish the compilation time with
EFL from subversion. We remove the EFL includes from header files and use
forward declarations, including the headers in correspondent source
files when needed. This causes only the needed source files to be
recompiled in case a new version of EFL is installed instead of
triggering a recompilation of almost all WebCore/WebKit.​https://bugs.webkit.org/show_bug.cgi?id=40575

Clean EFL header files in order to diminish the compilation time with
EFL from subversion. We remove the EFL includes from header files and use
forward declarations, including the headers in correspondent source
files when needed. This causes only the needed source files to be
recompiled in case a new version of EFL is installed instead of
triggering a recompilation of almost all WebCore/WebKit.​https://bugs.webkit.org/show_bug.cgi?id=40575

mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
(WebCore::RenderMathMLRoot::layout): Fixed a crash where every child
was assumed to be a RenderMathMLBlock instance when that isn't the
case. Also, layout() needed to mark the index for layout before
calling layout() on the index.

Plugins/Hosted/NetscapePluginInstanceProxy.h: Made create no longer
be an inline function.

Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
Moved the call to addPluginInstance out of here.
(WebKit::NetscapePluginInstanceProxy::create): Move it in here.
This makes sure we call adoptRef on the new proxy before any caller
calls ref on it.

css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::createUncachedIdentifier): Added.
(WebCore::CSSPrimitiveValue::createUncachedColor): Added.
(WebCore::CSSPrimitiveValue::createUncached): Added.
(WebCore::CSSPrimitiveValue::createIdentifier): Use createUncachedIdentifier
instead of using new directly.
(WebCore::CSSPrimitiveValue::createColor): Use createUncachedColor instead
of using new directly.
(WebCore::CSSPrimitiveValue::create): Use createdUncached instead of using
new directly.

loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader): Move the call to
addSubresourceLoader out of here.
(WebCore::SubresourceLoader::create): Move it in here. This makes it so
we don't ref the loader before finishing its creation and calling adoptRef.

page/Frame.cpp:
(WebCore::Frame::Frame): Move the call to setMainFrame out of here.
Also refactor the code so an assertion is easier to read.
(WebCore::Frame::create): Move the call to setMainFrame in here.
This makes it so we don't ref the frame before finishing its creation
and calling adoptRef.

storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::StorageAreaImpl): Move the code that calls
StorageAreaSync::create out of here.
(WebCore::StorageAreaImpl::create): Move it in here. This makes it so we
don't ref the storage area before finishing its creation and calling adoptRef.

DumpRenderTree/gtk/DumpRenderTree.cpp:
(runTest): Use RefPtr and create instead of OwnPtr and new.

DumpRenderTree/mac/DumpRenderTree.mm:
(runTest): Use RefPtr and create instead of OwnPtr and new.

DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::DumpRenderTree): Use create and releaseRef
instead of new.

DumpRenderTree/win/DumpRenderTree.cpp:
(runTest): Use RefPtr and create instead of OwnPtr and new.

DumpRenderTree/wx/DumpRenderTreeWx.cpp:
(runTest): Use RefPtr and create instead of OwnPtr and new.
(MyApp::OnInit): Removed unneeded code to delete the layout
test controller. This is done during each test.

The HTML5 specification and other browsers are all consistent:
When setting a boolean IDL attribute to true, the attribute value
gets set to the empty string. The guidelines for authors allow either
the empty string or the name of the attribute, but for implementers
of the DOM, the reflected attribute gets empty string.

dom/Element.cpp:
(WebCore::Element::setBooleanAttribute): Use emptyAtom to set the
attribute to the empty string.

html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::setAutofocus): Use the empty string,
not "autofocus".
(WebCore::HTMLFormControlElement::setRequired): Use the empty string,
not "required".

The scope "win32-g++" comes from the name of the makespec. However, it
is frequently used to check for MinGW. This works fine as long as
win32-g++ is the only makespec for MinGW. Now we need the wildcard
to cover "win32-g++-cross" as well.

Web Inspector: move get/setOuterHTML, addInspectedNode and
clearConsole to native InspectorDOMAgent. This is done to allow
inspected nodes array to store nodes from different domains,
also moves outerhtml manipulation closer to the rest of the DOM
operations. In addition to that, we are slowly getting rid of
InjectedScriptAccess in favor of IDL-defined InspectorBackend
interface for clearer remote debugging API.

Undo the build fix with the correct patch: Chromium NotificationPresenter
is now informed of the destruction before it actually happens, so this
use of the Notification object is correct.​https://bugs.webkit.org/show_bug.cgi?id=40097

scrollInDirection now receives as parameter the node that the Spatial Navigation
found as the more appropriated to move focus to. If it is in a scrollable container
(e.g. <div> with clipped overflow content), it scrolls recursively starting from
the container, not the current focused node.

html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::HTMLProgressElement):
Removed code to explicitly pass CreateHTMLElement construction type since that's
now the type used for all HTML elements.

mathml/MathMLElement.h: Made isMathMLElement function private and
removed unneeded override of createRenderer, because it did the
same thing as the base class's createRenderer function.

mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::create): Use adoptRef.
(WebCore::MathMLInlineContainerElement::createRenderer):
Removed unnecessarily initialization of local variable and removed the
case for mathTag, since that uses a different derived class.

mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::MathMLMathElement): Marked inline since
it is called in only one place.
(WebCore::MathMLMathElement::create): Use adoptRef.
(WebCore::MathMLMathElement::createRenderer): Added. Creates a
RenderMathMLMath object.

mathml/MathMLMathElement.h: Made constructor private and added a
private override of createRenderer.

mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::MathMLTextElement): Marked inline since
it is called in only one place.
(WebCore::MathMLTextElement::create): Use adoptRef.
(WebCore::MathMLTextElement::createRenderer): Changed to call through
to the base class instead of calling RenderObject::createObject directly.

mathml/MathMLTextElement.h: Made the constructor and createRenderer
function private.

Delete tables/mozilla/images/adforce_imgis_com.html and its associated results

This file is a GIF that somehow obtained a .html extension. It isn't
referenced by any other test. (It was failing on Windows because the
HTML5 parser turns null bytes into U+FFFD, whose rendering is
font-dependent.)

webkit/webkitwebview.cpp:
(getEventTime): Added.
(webkit_web_view_button_press_event): If the event time is zero, use the current time.
(webkit_web_view_finalize): Clean up click counting member.
(webkit_web_view_init): Initialize click counting member.

According to the HTML5 spec, we're supposed to open() a new document if
we receive a document.write() after we've received EOF for the network.
The old parser just dumped those bytes onto the end of the network
stream. After this patch, our behavior matches Minefield.

The HTML5 parser is probably off on all webkit ports.
We should either flip the meaning of the default so that
"false" means HTML5 on all ports, or we'll have to write
more code like this for all the other ports.

There's nothing in this test that requires a render tree dump. We have
other tests that test rendering of U+FFFD characters (which was what
was causing the test to fail, since Windows uses a different font for
that character than Mac does).

Instead of writing URL labels to the text portion of the clipboard or
drag-and-drop data, write the URL itself. Also escape the label text
of URLs. Abstracts logic into DataObjectGtk, so ClipboardGtk and
PasteboardGtk can share it.

Tests for this issue will be activated when dropping support has been
added to the GTK+ EventSender.

Consult the 'clip' style, as well as overflow, when creating clipping
compositing layers.

Tests: compositing/geometry/clip.html

compositing/overflow/clip-descendents.html

rendering/RenderLayerBacking.cpp:
(WebCore::clipBox): Utility function that returns the union of the clip and overflow
boxes.
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Use clipBox() to
get the correct clipping rectangle.

rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer): Look for
clip as well as overflow.
(WebCore::RenderLayerCompositor::clipsCompositingDescendants): Ditto.

User scripts that are injected on start are run from FrameLoader::dispatchDocumentElementAvailable,
but this is never called from ImageDocument, so call it when we create a document element for
our image document.

The current expected results expect a fullscreen button to be included
in the controls. But the fullscreen button is only included when
accelerated compositing is enabled, and the bots build without
accelerated compositing enabled.

This is the first chunk of the SVG Text rewrite patches.
offsetForPosition() / selectionRectForText() should accept float/FloatPoint arguments instead
of int/IntPoint. offsetForPosition() already worked with floats internally in Qt and Mac.
selectionRectForText() was already returning a FloatRect, but the passed in origin was an integer.
Fixing these problems in order to support sub-pixel positioning in the upcoming SVG Text rewrite patch.

Add a glyphScale parameter to TextRun, that will be used to support text selection
in lengthAdjust/textLength scenarios in SVG text, soon.

Doesn't affect any testcases so far. HTML is not affected in any way,
as it only ever passes integers to these functions.

[v8] Introduce single element caches for WebCore::String to v8::String conversions​https://bugs.webkit.org/show_bug.cgi?id=40435
Measurements show that for some web apps (GMail, Wave) and some scenarios
(intensive reading and/or keeping a tab open for a long time),
hit rate lies in 30--50% interval.
Inlining fast case gives another minor performance win.

As pointed out by Darin Adler in ​https://bugs.webkit.org/show_bug.cgi?id=18662#c20,
"It's not correct to use the offsetLeft and offsetTop of the frame owner element's renderer because
that's just the distance from the offsetParent, not the absolute position".

Patch fixes that behavior by now considering the offsetTop and offsetLeft the offsetParent recursively,
starting from the HtmlFrameOwnerElement. Previously, only calling offsetTop and offsetLeft works
because all tests were done in html samples where the {i}frame element was a directly a child of the body,
e.g. <html>...<body><iframe src=xxx>....<body></html>.

Add two XSS Auditor tests to the Skipped list. These tests actually
pass in the sense that the attack is blocked. However, the U+FFFD in
the console output is getting mangled. We could check in Qt-specific
expected results, but that doesn't quite seem right. There's something
wrong with the Qt UT8 decoder, which I suspect is related to (or the
same as) ​https://bugs.webkit.org/show_bug.cgi?id=35263

Add platform-specific results for Snow Leopard. Maciej thinks there is
something going on here related to BIDI and additional FFFD
replacements. This test is already on our list of things to
investigate more closely.

The result of platformBoundsForGlyph() is in flipped coordinates, whereas the result of
-[NSFont boundingRectForGlyph:] was not. r60247 failed to account for this.

platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::SimpleFontData::platformInit): Measure the height of the x glyph above the baseline
correctly.
(WebCore::SimpleFontData::platformBoundsForGlyph): Return a rect in flipped coordinates on Tiger
as well.

This a real regression. We need to update the XSSAuditor to use
the HTML5 parser's HTML entity decoder. I'll do that in a
followup patch because there doesn't appear to be an easy way to
key the choice off of the WebCore::Setting.

http/tests/security/xssAuditor/malformed-HTML-expected.txt:

Slightly different handling of malformed HTML. The exploit is still blocked.

<rdar://problem/8091103> URLs not added to history when initial load happens via back/forward navigation

Reviewed by Brady Eidson.

Back/forward navigation currently does not create or update items in the global history. This is usually
desirable, except for in the event where the back/forward list was created programmatically and attached
to the WebView and the initial load in that WebView is being performed as a result of a back/forward
navigation. In that situation it is preferable to ensure that global history item is created or updated.

No test case is added because DumpRenderTree is not able to test the scenario where the initial
load in a WebView occurs via a back/forward navigation.

loader/FrameLoader.cpp:

(WebCore::FrameLoader::transitionToCommitted): If we're committing the first load in this frame as a
back/forward navigation then we should update the history as if it were a standard load, with the
exception of updating the back/forward list.

loader/HistoryController.cpp:

(WebCore::HistoryController::updateForStandardLoad): Add a parameter to allow callers to skip updating
the back/forward list.

loader/FrameLoader.cpp:
(WebCore::FrameLoader::didOpenURL): Call setStatus and setDefaultStatus
on DOMWindow rather than going through Frame.
(WebCore::FrameLoader::open): Ditto.
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Call
shouldClose on this object instead of going through Frame.

page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): Call
shouldClose on FrameLoader instead of going through Frame.
(WebCore::DOMWindow::focus): Moved the code from Frame::focusWindow
in here.
(WebCore::DOMWindow::blur): Moved the code from Frame::unfocusWindow
in here.
(WebCore::DOMWindow::close): Moved the code from Frame::scheduleClose
in here.
(WebCore::DOMWindow::setStatus): Moved the code from
Frame::setJSStatusBarText in here.
(WebCore::DOMWindow::setDefaultStatus): Moved the code from
Frame::setJSDefaultStatusBarText in here.

page/DOMWindow.h: Added m_status and m_defaultStatus members to
store the status messages being set by the DOM.

page/Frame.cpp: Removed all the functions that were marked
"to be moved into Chrome".

Add a check that the root renderer (the document element's renderer) covers
the entire viewport before deciding that we don't need the RenderView
to paint its background. Fixes lack of painting with positioned, floated, and
display: table html elements.

Introduce HistoryItem::itemSequenceNumber and use it to identify
HistoryItems that are clones of one another.

Changes HistoryController::recursiveGoToItem to use itemSequenceNumber
equality instead of isTargetItem as the pre-requisite for not calling
FrameLoader::loadItem.

Changes FrameLoader::loadItem to require equivalent
documentSequenceNumber before initiating a same document navigation.
This alone would appear to fix the bug, but it does not go far enough
since without the itemSequenceNumber equality check, we'd re-load more
often than we should.

Moves documentSequenceNumber assignment into createItemTree as cleanup
and to ensure that it gets called properly whenever we create a cloned
HistoryItem. (createItemTree's mission is to create clones up until
or including the target frame depending on the value of the doClip
parameter.)

The run loop observer used to commit compositing layer changes does not do
updates if [window viewsNeedDisplay] is true, because this indicates that a delayed window
update is pending (added in r58623).

However, Carbon apps don't use the NSWindow updating mechanism, so [window viewsNeedDisplay] always returns YES.
This caused us to never sync compositing layers.

So detect if the current window is wrapping a carbon window, and in that case consult the root
HIView to detect if display is pending.

(to_windows_path): Passes the passed-in path through cygpath to
generate a Windows-style path.
(main): Sets the WebKitOutputDir and WebKitLibrariesDir environment
variables to their defaults, if they aren't already set.

(runSafari): When debugging, set up the environment to run Safari
using the built WebKit.dll, then use "devenv /debugexe Safari.exe" to
actually launch the debugger. When not debugging, just run WebKit.exe
and it will do the rest for us.

r50796 changed the initial background color from invalid to transparent. As a result,
NSAttributedStrings returned from +_web_attributedStringFromRange started including the
NSBackgroundColor attribute, with a transparent color as the value. This caused problems for
components in the system that ignore the alpha component, turning the color into opaque black.

Misc/WebNSAttributedStringExtras.mm:

(+[NSAttributedString _web_attributedStringFromRange:]): Change to not include the background
and foreground color attributes if the color are transparent.

Allow MIMETypeRegistry to have more than one MIME type for a
media file extension, and have the QTKit media engine register
all MIME types it can find for each file type QTKit supports.

Test: media/media-can-play-mp3.html

platform/MIMETypeRegistry.cpp:
(WebCore::mediaMIMETypeMap): Update for new HashMap format.
(WebCore::TypeExtensionPair::): Store String+Vector<String>
(WebCore::MIMETypeRegistry::getMediaMIMETypeForExtension): Only consult
mediaMIMETypeMap(), it has the canonical answer.
(WebCore::MIMETypeRegistry::getMediaMIMETypesForExtension): New, return
a Vector of all MIME types for an extension.

platform/MIMETypeRegistry.h:

platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::addFileTypesToCache): Add all MIME types returned in the
getMediaMIMETypesForExtension Vector.

Implement this poorly understood accessor to match
the old parser's behavior. It's unclear what this does
and it does not affect any layout tests to my knowledge
but likely affects the WebKit API in some way.

platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
Use virtual key code to force correct character code for clarity. Also, reworded comment,
since saying that "backspace needs to always be 8" misleadingly implied that it could
"sometimes" be such without this code.

WebKitTools:

DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController keyDown:withModifiers:withLocation:]): We were sending a broken
event for "delete" - it had virtual key code from forward delete, and text from backspace.
Fixed "delete" to mean forward delete.

This patch addresses the problem with Spatial Navigation. It currently does not
properly traverse scrollable contents, including scrollable div's. For this to work,
a new class member called scrollableEnclosingBox was introduced to FocusCandidate class which
keeps track of the current scrollable box Node wrapping a FocusCandidate.

To make use of enclosingScrollableBox of FocusCandidate, the DOM traversal routine
(FocusController::findNextFocusableInDirection) was changed as follows: when it
encounters a scrollable Node, each focusable node which is 'inner' keeps track of
the container reference. By the time a sibling of the scrollable Node is encountered,
there is no need to track this reference any more and the traversal algorithm continues
normally.

The common case is obviously that there is no scrollable container wrapping it.

updateFocusCandiditeIfCloser logic was also adapted to fit the need of the
newly introduced enclosingScrollableBox class member, getting simpler and more
easily maintainable.

Change the type of ShadowSize from IntSize to FloatSize in GraphicsContext.
Using IntSize loses precision and fails the test.
Note: This code change fixes Qt port but Mac is still failing due to
platform issue.

(WebCore::WidthIterator::WidthIterator): Initialize m_padPerSpace to the quotient of the total
padding and the number of spaces rather than truncating it.
(WebCore::WidthIterator::advance): Subtract m_padPerSpace from m_padding and add the difference
between its old and new values, when rounded, to the advance.

Suspend Document::m_executeScriptSoonTimer objects when the page is deferred.
There's no reason why we suspend all active DOM timers on the page but not suspend
this one. Document::m_executeScriptSoonTimer can run JS and schedule more DOM Timers.

To avoid race condition when GC is run during shutdown,
disconnect the Notification from the NotificationPresenter
when the presenter deletes itself.
This cannot be tested by a layout test, the race condition happens only
when GC is run during shutdown. It can be tested manually by loading
manually any notification test and closing the browser.

notifications/Notification.cpp:

(WebCore::Notification::~Notification):

notifications/Notification.h:

(WebCore::Notification::detachPresenter):

WebKit/qt:

Add an interface to the platform plugin to display notifications.
Implemented the notification in the example platform plugin.
This interface is enabled by default, but could be turned off with
a build flag. The platform plugin should control its own lifecycle,
so now the close timer applies only when using the QSystemTrayIcon.
That's because QSystemTrayIcon does not inform its caller when it
is closed.

Changed the way NotificationPresenterClientQt is deleted because it
is being accessed when GC is deleting the Notification objects.
NotificationPresenterClientQt is now detaching itself from the
Notifications before it is deleted.

WebInspector: On the way to Remote Debugging we want to transfer dom/timeline/etc
data from inspected page to WebInspector as JSON string via http. The native
serialization to JSON string is supported by InspectorValue's classes. This patch
has the implementation of sendMessageToFrontend function. WebKit version of it still
uses ScriptFunctionCall and will be switched to another transport a little bit later.​https://bugs.webkit.org/show_bug.cgi?id=40134

On the 26th, Beth commented out the description attribute in
IDBDatabaseRequest because it was causing problems with the
objective c bindings. Turns out that this is the same bug as
in ​http://trac.webkit.org/changeset/19486. (Thanks for the
pointer, Mark!)

The solution is to change the objective C bindings generator
to change the name in the generated code. id and hash both
just appended "Name" to them in the past. I couldn't think
of anything else particularly better to append, so I just
went with name as well.

Outside of Xcode (make or WebKitTools/Scripts), there doesn't seem to
be a way of overwriting the Xcode system path. Making
$WEBKITOUTPUTDIR take precedence over the system default would make
this possible.

Removed the include of "HTMLNames.h" from "Element.h". This prevents
near-world-rebuilds every time you change HTMLTagNames.in.

Renamed the getIDAttribute function in the Element class to
idForStyleResolution, since it returns a value of the id attribute
that has been lowercased as appropriate for style matching, not the
actual value of the attribute. With the old name it was easy to
misuse it in non-style contexts.

Got rid of the idAttributeName function on Element, since it is
easy to use it wrong. Replace it with isIdAttributeName, getIdAttribute,
and setIdAttribute functions, which are a good fit for the needs of
most call sites that were dealing with the id attribute.

Added an idAttributeName function to Document. This is for a future
where a document can have a custom id attribute name specified in its
doctype. It's possible this will be insufficient because the same
document might have XHTML or SVG elements in it, and it's possible
that on those elements we will want the attribute named "id" with
no namespace to still work. We can deal with that when we implement
the actual feature, though. For now, it seems OK to fetch the name
of the id attribute from the document.

(WebCore::SMILTimeContainer::updateAnimations):
Use the new idForStyleResolution function, which is the new name of
the getIDAttribute function. There's a good chance these call sites are
incorrect, which is something we should investigate later, so there's
a FIXME at each call site.

dom/Document.cpp:

(WebCore::Document::Document): Initialize m_idAttributeName to the
standard id attribute from HTML.
(WebCore::Document::getElementById): Use Element::getIdAttribute.

(WebCore::HTMLFrameElementBase::parseMappedAttribute): Use isIdAttributeName.
(WebCore::HTMLFrameElementBase::setName): Use getIdAttribute.

html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::parseMappedAttribute): Use isIdAttributeName.

html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::parseMappedAttribute): Use isIdAttributeName.
Also restructured the function a bit to make its structure clearer and added
a comment pointing out that it can't be quite right.

html/HTMLNameCollection.cpp:

(WebCore::HTMLNameCollection::itemAfter): Use getIdAttribute.

html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::parseMappedAttribute): Use isIdAttributeName.

html/HTMLParamElement.cpp:

(WebCore::HTMLParamElement::parseMappedAttribute): Use isIdAttributeName.

Removed the include of "HTMLNames.h" from "Element.h". This prevents
near-world-rebuilds every time you change HTMLTagNames.in.

Renamed the getIDAttribute function in the Element class to
idForStyleResolution, since it returns a value of the id attribute
that has been lowercased as appropriate for style matching, not the
actual value of the attribute. With the old name it was easy to
misuse it in non-style contexts.

Got rid of the idAttributeName function on Element, since it is
easy to use it wrong. Replace it with isIdAttributeName, getIdAttribute,
and setIdAttribute functions, which are a good fit for the needs of
most call sites that were dealing with the id attribute.

Added an idAttributeName function to Document. This is for a future
where a document can have a custom id attribute name specified in its
doctype. It's possible this will be insufficient because the same
document might have XHTML or SVG elements in it, and it's possible
that on those elements we will want the attribute named "id" with
no namespace to still work. We can deal with that when we implement
the actual feature, though. For now, it seems OK to fetch the name
of the id attribute from the document.

svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateAnimations):
Use the new idForStyleResolution function, which is the new name of
the getIDAttribute function. There's a good chance these call sites are
incorrect, which is something we should investigate later, so there's
a FIXME at each call site.

dom/NamedNodeMap.h: Renamed id, setID, and m_id to idForStyleResolution,
setIdForStyleResolution, and m_idForStyleResolution since this is not the
value of the id attribute because it gets lowercased for compatibility-mode
documents.

rendering/RenderIFrame.cpp:

rendering/RenderLayerCompositor.cpp:

rendering/RenderProgress.cpp:
Added include of HTMLNames.h now that Element.h no longer includes it.

html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseMappedAttribute): Use isIdAttributeName.
Also restructured the function a bit to make its structure clearer and added
a comment pointing out that it can't be quite right.

Centralize the gperf code generation commands into make-hash-tools.pl
to avoid redundancy across multiple build systems.
Do this in preparation of refactoring the usage of these generated
sources to fix the debug linking error on Linux with gcc >= 4.4.0.

The problem was that JSC::Instance::createRuntimeObject was never called.
This is fixed by overloading newRuntimeObject and calling Instance::createRuntimeObject
in between, instead of creating the runtime object directly inside the static function
QtPixmapInstance::createRuntimeObject, which had to be renamed as to not overshadow the virtual function.