Currently, we pass various parameters through to XSSAuditor::findInRequest
that are used to determine how to decode the HTTP input parameters so that
we can perform a match against the script source. Instead, we have defined
a structure XSSAuditor::FindTask that can hold all of these parameters.

Also fixes the issue on both Mac OS X and Windows where the highlight
would extend only partway into the ellipsis based on the size of the
characters being truncated.

Test: editing/selection/select-text-overflow-ellipsis.html

WebCore:

rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
When the ellipsis have been selected, paints them with the color for
selected text.
(WebCore::EllipsisBox::selectionRect):
Returns the selection rect for the ellipsis text.
(WebCore::EllipsisBox::paintSelection):
Paints the selection highlight around the ellipsis text.

rendering/EllipsisBox.h:
(WebCore::EllipsisBox::EllipsisBox):
Default the selection state of the EllipsisBox to SelectionNone.
(WebCore::EllipsisBox::setSelectionState):
Allow the selection state to be explicitly set by the InlineTextBox
that it is associated with, since the selection state depends on the
position of the selection within the truncated text.
(WebCore::EllipsisBox::selectionState):
Return the cached selection state.

rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionState):
If the text is truncated and the selection extends into the truncation
where there are ellipsis, set the selection state on the EllipsisBox.
(WebCore::paintTextWithShadows):
Allow for an upper bound to be specified on the maximum length of the
text to be painted.
(WebCore::InlineTextBox::paint):
Make sure the text that is drawn gets appropriately truncated. This was
not an issue before on Mac OS X because it wasn't necessary to draw the
selected text separately (the selected text had the same color as the
non-selected text).
(WebCore::InlineTextBox::paintSelection):
If the text is being truncated, let whatever is being painted in the
space after the truncated text paint its own highlight.

rendering/RenderText.cpp:
(WebCore::RenderText::selectionRectForRepaint):
Make sure that any ellipsis box that falls within the selection also
gets repainted.

Places the expected results under the mac and win platforms separately
because they are pixel test results and also the size of the
RenderBlocks are showing up as slightly different between mac and win.

editing/Editor.cpp: (WebCore::Editor::confirmComposition): If this function wasn't allowed
to change selection, it needs to close the current typing command - otherwise, its idea of
selection would be used for future typing.

Make 'GenerateConstructor' the default setting for all classes, defined in IDL files. The flag is now obsolete and
can be removed from all IDL files in a follow-up patch. Add new 'OmitConstructor' flag, that allows to restore the
old default behaviour: do not generate JSFoobarConstructor class.

No change in functionality, despite the fact that we're generating a lot more constructors now, as they have to
be exposed through DOMWindow.idl -- this can be done per affected class in follow-up patches. Especially the SVG
classes have to be exposed, most of them are missing JS constructors so far.

As side effect HTMLOptionsCollection is now correctly exposing its constructor, thus fixing a test in fast/dom/wrapper-classes.html

Don't block direct injections into the object src attribute unless
there's an illegal character (like < or ") in the URL. This change
lets some very unusual vulnerabilities through the filter but removes a
false positive that we've seen several times.

The latter two both have logic to replace newlines and tabs, as well
as a few other control characters that are considered spaces, with
spaces, before actually drawing the text. Previously the SVG font
path did not have this kind of logic.

This change introduces two helper functions in Font to do this space
replacement, which are then used for the simple path, the SVG path,
and the Qt implementation of the complex path.

Test: svg/custom/svg-fonts-in-html-linebreaks.html

WebCore:

platform/graphics/Font.cpp:

(WebCore::Font::normalizeSpaces): Helper function

platform/graphics/Font.h:

platform/graphics/FontFastPath.cpp:

(WebCore::Font::glyphDataForCharacter): Use helper

platform/graphics/qt/FontQt.cpp:

(WebCore::fromRawDataWithoutRef): Rename from "qstring"
(WebCore::Font::drawComplexText): Use helper
(WebCore::Font::floatWidthForComplexText): Use helper
(WebCore::Font::offsetForPositionForComplexText): Use helper
(WebCore::Font::selectionRectForComplexText): Use helper

html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::valueAsDate):
Implement it with ISODateTime::millisecondsSinceEpoch().
(WebCore::HTMLInputElement::formStringToISODateTime):
Early exit for a null String. This avoids assertion failures in ISODateTime::parse*().

12/22/09:

Fixes an issue in builtDylibPathForName so that it returns the correct
path to the built QtWebKit library on the Qt Windows port. Currently,
it returns the path to the file named QtWebKit.dll but this file does
not exist on the Qt Windows build. Instead, the file is named
QtWebKit4.dll.

There are no new tests because only pixel tests may be affected by
this change and those changes can only be done on the build bot.

platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintSearchField):
Since currently we paint the Search control as a QLineEdit, I have
deferred painting to WebCore, as in the case of the text input so
that the painting is consistent.

The dlclose'ing of libGL.so.1 and dlopen'ing of it each time a
GraphicsContext3D was created was occasionally causing it to be
re-mapped at a different base address. Since GLEW is not
re-initialized every time, primarily for performance reasons, its
cached function pointers were pointing to garbage. Stopped closing
and re-opening libGL.so.1 each time; now it is loaded lazily, when
the first 3D context is created. Also reused the X display
connection since the GLX routines' correctness might hinge upon it
not resulting in a change of GL implementation.

Add a m_leaksPtr to reduce false positives from leaks in debug builds
(this isn't perfect because we'd like a solution for release builds,
but this is now at least as good as a PtrAndFlags would be).

Switch SmallStringsto use a regular string for the base, rather than
a static one. UntypedPtrAndBitfield assumes all strings are at least
8 byte aligned; this migt not be true of static strings. Shared buffers
are heap allocated, as are all UStringImpls other than static strings.
Static strings cannot end up being the owner string of substrings,
since the only static strings are length 0.

Move the selection display update process done in the
selectionLayoutChanged function into the layout timer
instead of doing it immediately when selection changes occur.

editing/SelectionController.cpp:

(WebCore::SelectionController::SelectionController):
Initialize m_needsDisplayUpdate to false.
(WebCore::SelectionController::setSelection): Call
the new setNeedsDisplayUpdate function instead of the old
badly named Frame::selectionLayoutChanged function.
(WebCore::SelectionController::setNeedsDisplayUpdate):
Set m_needsDisplayUpdate. If it is just becoming true, then
call FrameView::scheduleRelayout.

editing/SelectionController.h: Added setNeedsDisplayUpdate,

needsDisplayUpdate, and m_needsDisplayUpdate.

page/Frame.cpp:

(WebCore::Frame::setCaretVisible): Call setNeedsDisplayUpdate.
(WebCore::Frame::selectionLayoutChanged): Call
setNeedsDisplayUpdate to set it to false, since this is the
function that performs "selection display update". Later I want
to rename this function.

page/FrameView.cpp:

(WebCore::FrameView::needsLayout): Add a new clause, since
we need a call to layout if needsDisplayUpdate is true.

LayoutTests:

fast/forms/selection-layout-reentry-strange-case-expected.txt: Added.

fast/forms/selection-layout-reentry-strange-case.html: Added.

platform/mac/accessibility/frame-with-title-expected.txt: Updated since

RemoteFontStream is allocated on the stack, so its memory is freed
immediately when FontCustomPlatformData::createFontCustomPlatformData
returns.

SkTypeface::CreateFromStream increments the reference count, but it keeps
the pointer to the memory allocated on the stack which is not valid
anymore.

RemoteFontStream is a descendant of SkRefCount and SkRefCount::unref
invokes SkDELETE(this) internally once the reference count reaches zero.
This means that SkRefCount-ed instances must be allocated on the heap.

websocket/tests/script-tests/url-parsing.js: add invalid url tests.
Also changed url from ws://127.0.0.1/ to ws://127.0.0.1:8880/websocket/tests/simple to make it sure no errors on console message for these tests by not receiving unexpected response from 127.0.0.1:80

rendering/RenderCounter.cpp:
(WebCore::planCounter):
(WebCore::findPlaceForCounter):
(WebCore::makeCounterNode):
(WebCore::RenderCounter::originalText):
Changed to use identifier instead of counterName and actsAsReset or hasResetType, as appropriate instead of isReset.

This patch makes SVG Masking faster. The luminance calculaton of the ImageBuffer,
that is created by pixel manipulation, got optimized. The ImageBuffer and it's
luminance is created once now, not on every call of applyMask.
The size of the intermediate ImageBuffer depends on the visible area now and is
clipped by the mask rect.

The patch doesn't change functionality so no new tests needed.
The new ImageBuffer handling in Mask causes two updates of test results. The pixel
tests and LayoutTests pass, but the checksum doesn't match.

Update pixel test results for two SVG masking operations. They don't fail
and there is no noticable difference between the old and new results. But
Masking uses smaller ImageBuffers now and that changed the checksum.

(WebCore::Loader::cancelRequests): Remove ending ASSERT since it will now be hard to predict how

many requests might possibly outlive a cancel in every case.

(WebCore::Loader::Host::servePendingRequests): Use the correct frame in the case of a request outliving its page.
(WebCore::Loader::Host::cancelPendingRequests): Ensure we don't cancel request that should outlive their page.
(WebCore::Loader::Host::cancelRequests): Ensure we don't cancel request that should outlive their page.

(WebPreferences::initializeDefaultSettings): Make accelerated
compositing be on by default.
(WebPreferences::setAcceleratedCompositingEnabled): Store the new
value.
(WebPreferences::acceleratedCompositingEnabled): If accelerated
compositing isn't available, return false. Otherwise, return the value
stored in preferences.

WebPreferences.h: Added [set]AcceleratedCompositingAvailable.

WebView.cpp:

(WebView::notifyPreferencesChanged): Just pass the value from
WebPreferences on down.