Problem was that a call to characters on an StringImpl associated
with a StringBuilder that is being appended to gets stale.
Added a new m_valid16BitShadowlen that keeps the length of
the 16 bit shadow that has been upconverted or will be up converted
with the first getCharacters(). When StringBuilder::characters or
::reifyString is called, further characters are upconverted if
we have a shadow16bit copy and the m_valid16BitShadowlen is updated.

Preserve the originally viewport-tag specified page scale limits, and
compute the final ones in a new private method
computePageScaleFactorLimits(). This is then called when contents
size change (which can affect the minimum).

Also clean up several minor bugs, namely clamping issues (reorder
clampNegativeToZero to avoid negative scroll offsets, and force max to
be greater than min), and incorrect behavior in the presence of
"solid" scrollbars.

Exposing boundsInScreenSpace through a new function,
boundsInViewportSpace, to assist in moving the Autofill UI out of
WebKit in Chromium. Renamed the exposed function to provide a better
meaning of what the function does in the Chromium code.
More information can be found at:​http://crbug.com/51644

When we print a page with an overflowed width, the right side of the page
can be truncated. This is due to a wrong rendering calculation.
Since 'maximumShrinkFactor' is a ratio based on 'pageSize',
'maximumShrinkFactor' should multiply (not 'originalPageSize') but 'pageSize'.
This bug happens if all the following conditions are met:

pageLogicalWidth < docLogicalWidth

originalPageSize.width * maximumShrinkFactor < docLogicalWidth

docLogicalWidth < pageLogicalWidth * maximumShrinkFactor

Test: printing/width-overflow.html

page/FrameView.cpp:

(WebCore::FrameView::forceLayoutForPagination):

LayoutTests:

width-overflow.html checks if the page is printed without its right side
being truncated.

printing/width-overflow.html: Added.

platform/chromium-linux/printing/width-overflow-expected.png: Added.

platform/chromium-linux/printing/width-overflow-expected.txt: Added.

platform/mac-snowleopard/printing/width-overflow-expected.png: Added.

platform/mac-snowleopard/printing/width-overflow-expected.txt: Added.

platform/efl/Skipped: Skips width-overflow.html, since layoutTestController.setPrinting() is not implemented.

r102201 introduced a change to the chromium build that splits
the executables out of WebKit.gyp into other gyp files, and adds
a new "All.gyp" that builds everything. However, I forgot to
update the build script to use All.gyp.

Defer ScriptExecutionContext::Task's in Document when page loading is deferred.
Schedule them with timer when page loading is resumed. The tasks will be performed
in the original order. This fixes the problem that database callbacks could be missed
when page loading was deferred.​https://bugs.webkit.org/show_bug.cgi?id=49401

Use StyleAttributeMutationScope to manage DOM breakpoints for style property changes.

Instead of calling InspectorInstrumentation::didInvalidateStyleAttr()
directly in setNeedsStyleRecalc, set a bool in the current
StyleAttributeMutationScope, and delay the call until the scope's
counter runs down to zero. This keeps the inspector JS from re-entering
CSSMutableStyleDeclaration until all StyleAttributeMutationScope work is done.

Also fix a small bug in StyleAttributeMutationScope, where
s_shouldDeliver wasn't getting reset properly to false.

This behavior was introduced in bug 8223 to match IE and Firefox. But it doesn't appear that we're matching
any browser today, and CSSOM spec agrees with them.

WebCore.exp.in: Don't export CSSStyleDeclaration::setProperty(), no one is using it.

bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::putDelegate): Use regular
setProperty(), not the incorrect version that's being removed. Properties set via IDL attributes are never
important.

bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
Made the same fix for v8. Why did v8 bindings authors copy/paste the code?!

css/CSSStyleDeclaration.cpp:

css/CSSStyleDeclaration.h:
Removed a version of setProperty() that attempted to parse the value and extract !important from it.

Removed the ENABLE(LARGE_HEAP) option from Platform.h, since it was only used in
Heap.cpp, and got in the way of having more granular, per-platform control over
what the heap size should be. Bumped the heap size to 8MB on iOS (was 512KB).

We already support (arrow key) moving cursor by character in visual order.
This patch implements (ctrl/alt-arrow) moving cursor by word in visual order (in Windows).
It matches Firefox's default behavior.

Without this patch, ctrl(alt for mac)-arrow key or
selection.modify("move", "left"/"right", "word") moves cursor by word in logical order.

IE implements moving cursor by logical order for both arrow key and ctrl-arrow key.
Firefox implements moving cursor by visual order for both operations.
From Chromium bug report, native speakers would like moving cursor by visual order since it
is more intuitive.

The patch is only enabled for Windows (by EditingBehavior) because current implementation
matches Windows' native behavior.
For exmaple, if the logical text is "abc def hij", the cursor positions are
"|abc |def |hij|" no matter pressing ctrl-left-arrow or ctrl-right-arrow.

Mac and Linux's native behavior is slightly different. In which, when pressing
ctrl-left-arrow, the cursor positions are "|abc |def |hij|". When pressing ctrl-right-arrow,
the cursor positions are "|abc| def| hij|". We will implement it next.

<rdar://problem/10542095> Focus rings are not drawn around push buttons, radio buttons and checkboxes

Reviewed by Darin Adler.

Instead of relying on -setShowsFirstResponder: to make -drawWithFrame:inView: draw the focus
ring, use -drawFocusRingMaskWithFrame:inView:.

platform/mac/ThemeMac.mm:

(-[NSCell _web_drawFocusRingWithFrame:inView:]): Added. Sets up the focus ring style and a
transparency layer, then uses -drawFocusRingMaskWithFrame:inView: to draw the focus ring.
(WebCore::updateStates): Eliminated calls to get and set showsFirstResponder.
(WebCore::paintCheckbox): Changed to use -_web_drawFocusRingWithFrame:inView:.
(WebCore::paintRadio): Ditto.
(WebCore::paintButton): Ditto.

The listing of the following files in PlatformBlackBerry.cmake are redundant. They should be removed.
platform/network/blackberry/MultipartResponseDelegate.cpp
platform/network/blackberry/NetworkManager.cpp
platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
platform/network/blackberry/ResourceErrorBlackBerry.cpp
platform/network/blackberry/ResourceRequestBlackBerry.cpp

Changed the zapping code to ignore blocks that are Marked or Zapped. Additionally,
the code asserts that:

If we zap a Marked or Zapped block then the free list is empty, because this
can only happen if the block was never free-listed.

Zapping can only happen for Marked, Zapped, or FreeListed blocks, since Allocated
blocks are those that cannot be referred to by SizeClass::currentBlock (since
SizeClass::currentBlock only refers to blocks that are candidates for allocation,
and Allocated blocks are those who have been exhausted by allocation and will not
be allocated from again), and New blocks cannot be referred to by anything except
during a brief window inside the allocation slow-path.

RenderLayer::paintLayer can easily be called a million time when scrolling on a big table with
td { overflow: hidden; }. We would spend a lot of time recomputing the rectangles that we never
unused for painting as our layer was not self-painting (clipping layer only) and we did not paint
some overlay scrollbars.

rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayer):
Simplified and moved the shouldPaint logic earlier in the function. Now the branches
are checking the same boolean which makes the logic more obvious. A consequence of
filling shouldPaint earlier is that we call |calculateRects| only if there is a chance
the rectangles will used. Also cached the result of isSelfPaintingLayer() in a local
variable (isSelfPaintingLayer() is fairly expensive due to several virtual calls).

rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintIntoLayer):
For coherency, applied the same optimizations here too: added an early return instead
of conditionaly call |calculateRects| as we don't have to restore any clip.

XCode (and hence GYP) can't handle circular dependencies between
files (and projects). Accordingly, although the binaries in
WebKit.gyp depend on webkit_support and webkit_support depends
on webkit, we don't mention the latter dependency in the file.
To fix this, this change moves the binaries like DRT into a new
GYP file, and modifies gyp_webkit to build from that file
instead of WebKit.gyp.

XCode (and hence GYP) can't handle circular dependencies between
files (and projects). Accordingly, although the binaries in
WebKit.gyp depend on webkit_support and webkit_support depends
on webkit, we don't mention the latter dependency in the file.
To fix this, this change moves the binaries like DRT into a new
GYP file, and modifies gyp_webkit to build from that file
instead of WebKit.gyp.

RenderObject::view() is super hot and is taking ~4-5% of the time in some
benchmarks as it is called several hundred thousands times. For some reason,
the compiler did not inline it even though it is very simple in release builds.

WebCore.exp.in: Removed RenderObject::view() as it is inlined now.

rendering/RenderObject.cpp: Moved the implementation from here ...

rendering/RenderView.h:

(WebCore::RenderObject::view): ... to here to avoid a cyclic
dependency between RenderObject and RenderView. Also marked the
function as ALWAYS_INLINE.

rendering/RenderObject.h:

rendering/svg/RenderSVGResourceContainer.cpp:

Added #include "RenderView.h" as the code checks for view() during repaint.

(WebKit::LayerTreeHostCA::initialize): m_webPage->drawingArea() will be
null here if we are initializing the layer tree host in DrawingArea's
ctor (as is the case when accelerated drawing is enabled), before
WebPage has set its m_drawingArea pointer. Since the layer tree cannot
have been frozen at this point, it's safe to enable layer flush
scheduling if drawingArea() is null.

(JSC::globalFuncUnescape): Restructured to handle
the %uHHHH case to output the resulting character
and continue so that a failure in finding 4 hex
digits will fall through and output the '%'.
Due to style check, changed the temporary
character variable to a more descriptive name.

This moves scroll and pageScale "sent" deltas to be applied to
the layer at the end of the commit, instead of the beginning.

This has several advantages, especially for page scale:

When pageScale changes, no longer any need to change the scroll's

coordinate space at beginning of commit, which is complex and prone to
bugs (this fixes a problem where we were forgetting to modify the
scrollPosition before).

No need for non-commit-related code to consider the "sent" values.

m_pageScale is now always the content scale factor, and
m_pageScaleDelta is the scale to be on the impl-side matrix.

This will make it easy to send arbitrary fake or future delta

values for example while pinch zooming out.

The scroll logic is similarly altered for consistency's sake. Note that
I also moved the tree synchronize to the beginning of finishCommit
in order to avoid having to change the pageScale coordinate space of
sentScrollDelta in adjustScrollsForPageScaleChange().

Move the instrinsic enum out of the DFG, into runtime. Add entires for all host functions
that have an intrinsic in the form of a generated thunk. Remove the thunk pointer from the
hashtable, and make Intrinsic field no longer ifdef on JIT/DFG. In getHostFunction select
a thunk genertaor to use based on the Intrinsic.

When a PID is passed, only crash logs corresponding to a crashed process with that PID are
considered.

Fixes <​http://webkit.org/b/73942> webkitpy provides no way to specify the PID of the crashed
process whose crash log you want to find

Reviewed by Dirk Pranke.

Scripts/webkitpy/common/system/crashlogs.py:

(CrashLogs.find_newest_log): Added an optional pid parameter.
(CrashLogs._find_newest_log_darwin): Added a pid parameter. When specified, we look at each
candidate log's app_description extended attribute to see if that log corresponds to a
crashed process with the specified PID.

Scripts/webkitpy/common/system/crashlogs_unittest.py:

(CrashLogsTest.test_find_newest_log_darwin): Added a few more mock crash logs with various
contents and PIDs. Added tests that show that the pid parameter to find_newest_log is
respected. Also fixed an erroneous use of assertTrue instead of assertEqual.

Scripts/webkitpy/common/system/filesystem.py:

(FileSystem.getxattr): Added. On Darwin, calls through to the xattr module. On other
systems, raises a KeyError, mimicking the behavior on Darwin when the given attribute isn't
present.

Scripts/webkitpy/common/system/filesystem_mock.py:

(MockFileSystem.init): Added an optional xattrs parameter. Documented other parameters.
(MockFileSystem.getxattr): Added. Just pulls the given attribute out of the xattrs
dictionary.

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

(CrashLog): Added help text. Added an optional PID parameter.
(CrashLog.execute): Pass the PID, if any, through to find_newest_log.

Wait for Crash Reporter to finish even when it lets the crashed process die quickly

NRWT was only waiting for Crash Reporter in cases where it was keeping the crashed process
alive beyond the normal timeout limit. In cases where the crashed process was able to die
faster, NRWT would assume that Crash Reporter had finished even though it often was still
running, which would lead to an incorrect crash log being picked up.

(ServerProcess._reset):
(ServerProcess.write):
(ServerProcess._check_for_crash): Changed to use new set_crashed function instead of setting
.crashed directly. Added wait_for_crash_reporter parameter, which we pass along to
set_crashed.

(ServerProcess._handle_timeout): Fixed a logic error that would cause .crashed and
.timed_out both to be set to True in cases where Crash Reporter took a long time to run. Now
we bail out of handling the failure as a timeout if we find out that the process in fact
crashed. We tell _check_for_crash not to wait for Crash Reporter because we've already done
so.
(ServerProcess.set_crashed): Added. When the process crashes, we wait for Crash Reporter to
finish running (unless directed otherwise) so we can be sure the crash log has been saved to
disk.

Scripts/webkitpy/layout_tests/port/server_process_unittest.py:

(TrivialMockPort.is_crash_reporter): Added.

Scripts/webkitpy/layout_tests/port/webkit.py:

(WebKitDriver._check_for_driver_crash): Changed to use set_crashed. (This also fixed a typo
that would have partially broken crash detection on Windows, if NRWT worked on Windows.)

Hopefully this patch will make NRWT work on future versions on Mac OS X.
Most of the infrastructure was already in place, but there were some
asserts that failed. I've tested this patch by haxoring the version
detection logic to simulate an unknown version. We might need to
iterate based on feedback from folks with a real future version.

Scripts/webkitpy/layout_tests/port/apple.py:

(ApplePort.init):

mac-future is an allowed port_name that's used internally by
webkitpy to represent future versions of Mac OS X.

Scripts/webkitpy/layout_tests/port/mac_unittest.py:

(test_versions):

Test that we don't throw exceptions when dealing with future
versions of Mac OS X.

Scripts/webkitpy/layout_tests/port/webkit.py:

(WebKitPort._expectations_from_skipped_files):

Demote this logging message to "debug". It's expected that
mac-future doesn't have a Skipped file.

Scripts/webkitpy/layout_tests/port/mac.py:

(MacPort.init):

Scripts/webkitpy/layout_tests/port/win.py:

(WinPort.init):

Re-order some code in these constructors so that
self._operating_system is available to the ApplePort constructor.

Have CSSImportRule construct its MediaList by passing the parent
style sheet, which is exactly what the old constructor accomplished.
Also assert that we're always created with a non-null parent sheet.

margin-* getComputedStyle values should return the "used" absolute value when there is a renderer
and the specified value is relative (percentage, auto, etc.).
When there is no renderer, the specified value should be returned.
See ​http://dev.w3.org/csswg/cssom/#resolved-values.

Reviewed by Darin Adler.

Test: fast/css/getComputedStyle/getComputedStyle-resolved-values.html

css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

LayoutTests:

Modified baseline tests for getComputedStyle margin values where a "used" value is returned.

(WebCore::nameShouldBeVisibleInDocumentAll): Added, to factor out common code in
two functions below.
(WebCore::HTMLCollection::checkForNameMatch): Changed to call nameShouldBeVisibleInDocumentAll.
(WebCore::HTMLCollection::updateNameCache): Ditto. Also updated cache code to use the append
function, so it will work with OwnPtr. Also eliminated an unneeded get call before
each hash table add; we do both at once in the new append function.

(WTF::ParallelEnvironment::ParallelEnvironment):
(WTF::ParallelEnvironment::execute):
Deinline these to avoid exporting a lot of symbols.
These are non-trivial and called only once on a given object
so it doesn't seems to be worthwile to inline them.
Additionally fix a signed-unsigned comparison in the constructor.

wtf/ParallelJobsGeneric.h:

wtf/Platform.h:

Source/WebCore:

Covered by existing tests.

According to measurements on Mac and Linux it is a
considerable speedup for SVG on multicore.

Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
by qualifying ParallelJobs with the WTF namespace (otherwise
MSVC believes it belongs to WebCore which is likely a compiler bug).

GraphicsContext3D only draws the content of the WebGL canvas, not the additional
CSS such as the borders. TextureMapper should render the content of a
media/webgl layer before drawing the actual canvas.
This makes LayoutTests/compositing/webgl/webgl-reflection.html work.

Changed the value type of EventListenerMap::m_hashMap to OwnPtr<EventListenerVector>.
This means we no longer need to manually delete the vectors when taking them out of
the map, which makes the code a little prettier.

A few tweaks were necessary; release() instead of leakPtr() when switching modes
and adoptPtr()/get() sprinkled as needed.

This patch replaces subprocess.Popen() with Executive, similar to other
Python scripts in webkitpy/. I manually confirmed that run-bindings-tests
works well for cases where no exception is raised, no exception is raised
but diff is found, and ScriptError is raised.

When a Text node is created by the parser we check if the string is all whitespace
and if so we put it in the AtomicString table so that all future identical whitespace
strings can share the StringImpl.

If we do not know whether the string is all whitespace this now checks the string
If the string is all whitespace we create an AtomicString for it.

html/parser/HTMLConstructionSite.h:

html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not.
(WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.

(WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge
to mainAxisOffset. Rename logicalTop to crossAxisOffset. Get rid of
logicalLeft local variable since it's confusing. Move shouldFlipMainAxis
out of the for loop to avoid computing it each iteration.

WebKit2 has a mechanism to prevent the composited layer tree of the outgoing page
from being torn down or updated until the incoming page has layout. However, for simple
pages, when the frame is loaded the page is not rendered in the screen.

This patch fixes this bug calling LayerTreeHostQt::scheduleLayerFlush when m_layerFlushSchedulingEnabled
is true.

(WebCore::ContainerNode::suspendPostAttachCallbacks): Added a FIXME comment about the
peculiar behavior of this function. Somehow the post-attach suspend state is both
global and specific to a certain Page object. That can't be right. If it was truly
global then this would be a static member function. If it was truly per-page, then
the related functions could not be static.

dom/ContainerNode.h: Removed some unneeded argument names. Moved the hasChildNodes

function up with the other basic getters. Put the other getters, childNodeCount and
childNode, right after the basic getters. Used ASSERT_NO_EXCEPTION in all the basic
mutation functions so they can be used in a cleaner fashion in C++ code where we have
some reason to know an exception won't occur. Grouped all the overrides of functions
from Node into a single paragraph and used the OVERRIDE macro on all of them. Made the
queuePostAttachCallback and postAttachCallbacksAreSuspended functions protected.

dom/Element.h: Moved the include of ExceptionCodePlaceholder.h into ContainerNode.h.

dom/Node.cpp:

(WebCore::Node::lazyAttach): Use hasChildNodes instead of firstChild for clarity.
(WebCore::Node::isDescendantOf): Ditto.

(WebCore::CSSFontSelector::~CSSFontSelector): Removed calls to deleteAllValues.
(WebCore::CSSFontSelector::addFontFaceRule): Updated to use OwnPtr instead of raw
pointer for the entry in m_fontFaces and m_locallyInstalledFontFaces.
(WebCore::CSSFontSelector::getFontData): Updated to use OwnPtr instead of raw
pointer for the entry in m_fonts. Also removed an unneeded std:: prefix.

css/CSSFontSelector.h: Made m_fontFaces, m_locallyInstalledFontFaces, and m_fonts

(JSC::JSCallbackObject::getOwnPropertyNames): Use get() on the hash map
entries because the hash map now has an OwnPtr instead of a raw pointer.

API/JSClassRef.cpp:

(OpaqueJSClass::OpaqueJSClass): No need to initialize m_staticValues and
m_staticFunctions since they are now OwnPtr. Use adoptPtr when allocating.
Removed the code that gets and deletes existing entries, and just use set,
which now handles deletion automatically due to it being OwnPtr.
(OpaqueJSClass::~OpaqueJSClass): Replaced code to do all the deletion
with assertion-only NDEBUG-only code.
(OpaqueJSClassContextData::OpaqueJSClassContextData): Use adoptPtr when
allocating. Use OwnPtr when adding. Removed unneeded code to set
staticValues and staticFunctions to 0. Removed unneeded destructor.
(OpaqueJSClass::staticValues): Added get call. Also removed unneeded local.
(OpaqueJSClass::staticFunctions): Ditto.
(OpaqueJSClass::prototype): Added use of adoptPtr.

API/JSClassRef.h: Made the static values and static functions tables

use OwnPtr for the entries. Also used OwnPtr for the pointers to the
tables themselves. Also removed ~OpaqueJSClassContextData(), letting
the compiler generate it.

Implement the needed infrastructure to allow notifying
accessibility, in a cross-platform way, when a event related to
the load of a document happens. Added a generic method, which will
be called from the FrameLoader, and platform specific versions of
it so every port has a chance to decide what to do with those
notifications.

This patch doesn't include a new test because the one testing this
functionality is the GTK-specific unit test added along with patch
for bug 73746: testWebkitAtkDocumentLoadingEvents.

accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::frameLoadingEventNotification): New, called
from the FrameLoader to notify accessibility when an event happens.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): New,
platform specific function to let ports decide what to do.

accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::frameLoadingEventNotification): New.

accessibility/chromium/AXObjectCacheChromium.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for chromium.

accessibility/gtk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):

accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for the Mac.

accessibility/win/AXObjectCacheWin.cpp:

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for Windows.

The failure was caused by span that contains the text inside bdi in the reference file
was using display: inline-block. Because the width of an inline-block is always rounded up
like any other inline element, it causes the text in the reference file to be one pixel
longer than the one in the test file in certain cases.

Fixed the bug by using unicode-bidi: override instead of display: inline-block in
the reference file.

When the extensions are available, compositor textures are allocated via
glTexStorage2DEXT instead of glTexImage2D to eliminate creation of unnecessary
mip levels on the service side. In addition, the GL_FRAMEBUFFER_ATTACHMENT_ANGLE
is specified for all textures used by RenderSurfaces to eliminate the need for
a system memory bitmap allocation.

(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
In the case where all our columns have percent lengths, split the colspan
logical width using the percentages from the lengths. This should be properly
handled by the massive 'else' case but it is not and I did not feel like refactor
that due to massive compatibility issues that would arise.

LayoutTests:

fast/table/colspan-with-all-percent-cells-expected.png: Added.

fast/table/colspan-with-all-percent-cells-expected.txt: Added.

fast/table/colspan-with-all-percent-cells.html: Added.

platform/chromium-cg-mac/tables/mozilla/bugs/bug14929-expected.png:

platform/chromium-linux/fast/table/027-expected.png:

platform/chromium-linux/fast/table/027-vertical-expected.png:

platform/chromium-mac/fast/table/027-vertical-expected.png:

platform/chromium-mac/tables/mozilla/bugs/bug14929-expected.png:

platform/chromium-mac/tables/mozilla/bugs/bug2947-expected.png:

platform/chromium-win/fast/table/027-expected.txt:

platform/chromium-win/fast/table/027-vertical-expected.txt:

platform/mac/fast/table/027-expected.png:

platform/mac/fast/table/027-expected.txt:

platform/mac/fast/table/027-vertical-expected.png:

platform/mac/fast/table/027-vertical-expected.txt:

platform/mac/tables/mozilla/bugs/bug14929-expected.txt:

platform/mac/tables/mozilla/bugs/bug2947-expected.png:

platform/mac/tables/mozilla/bugs/bug2947-expected.txt:

Those changes are just rebaselines which now matches Firefox Nighly
more closely (thus progressions).

platform/chromium/test_expectations.txt: Skipped Windows that needs a new baseline.

platform/efl/Skipped:

platform/gtk/Skipped:

platform/qt/Skipped:

Skipped the previous tests as they need a rebaseline on those platforms.

Add IconChromiumAndroid.cpp which nullifies the rendering of icons in
file upload boxes, which is not something we want to support now. Also
include ClipboardChromiumLinux.cpp and FileSystemChromiumLinux.cpp
as their functionality can be re-used for Android.

Factored out the processing of the UString argument from
Stringifier::appendQuotedString() to a static templated function
based on character size.

This change eliminates 5% of the 7% slowdown to json-stringify-tinderbox.
This change introduces a 4.8% slowdown to json-parse-financial.
This slowdown will be addressed in a subsequent patch to StringImpl::equal.

Calling characters() explicitly causes a non-terminated string buffer to get passed back
to the String() constructor that expects a terminated buffer. The characters() call isn't
necessary at all, since we have a String and the method we're calling expects a String.

To allow for API objects representing the connection going to/from the UIProcess/WebProcess,
this patch separates out the connections into WebConnection subclasses. It does not yet
expose a way to access these connections, and is therefore not yet testable.

(WebCore::TextTrackLoader::corsPolicyPreventedLoad): New, log the error and set m_state.
(WebCore::TextTrackLoader::notifyFinished): Check for CORS failure.
(WebCore::TextTrackLoader::load): Take media element cross-origin attribute as a param so we

The backing store of a decoded image is a Vector<PixelData> on the affected
ports. And Vector<> provides a resize capacity member that returns false if
memory allocation fails.

setSize() should be called once only during an image decode - add an ASSERT
for that. Resize the backing store capacity to the requested image size and
return false if memory allocation fails.

ImageDecoder::isOverSize(width, height) is called to check that the decoded
width and height won't overflow 'width x height x sizeof(PixelData)' before
calls to setSize(). Refer to ​http://webkit.org/b/48634

When asked to remove a shorthand property, we should toss out both the
sub-properties of that shorthand as well as the shorthand itself, should the
declaration contain it. The latter part was missing in our implementation.

It turned out that 50-70% of nodes inserted by DOM APIs such as insertBefore and appendChild
don't have any descendent nodes. Optimize isDescendantOf which is used by checkAcceptChild for this case.
On a test case attached on the bug, we see a 40% improvement.

Also optimize for cases where either new child or new parent but not both are in document as suggested
by Erik Arvidsson. This appears to happen about 40-70% of the time, and the symmetric difference between
the two cases is about 50% so it's worth implementing both optimizations.

Unfortunately no tests because we still have a O(n) algorithm somewhere.

There is currently a known issue happening in debug builds when
reloading the webview if it was loaded before through the function
webkit_web_view_load_string, resulting in a ASSERT failing (see
bug 50331) so we can't check for the reload event here, since it
makes the test to fail. Fortunately, checking for load-complete
event is a good enough test, so this small patch is about that.

Rubber-stamped by Philippe Normand.

tests/testatk.c:

(testWebkitAtkDocumentLoadingEvents): Don't load and then reload
to check events, just load once and check whether the
'load-complete' event has happened.

Add missing simulateDesktopNotificationClick method used by
fast/notifications. Provide a default implementation for
areDesktopNotificationPermissionRequestsIgnored and
ignoreDesktopNotificationPermissionRequests.

The issue has been described that Korean character is broken on pasting copied text.
In my analysis, this is from lack of format change between C style UTF-8 character pointer and C++ style String reference.
Therefore, this patch will convert types to resolve the problem.

New unit test to check events when reloading a document. This
replaces the former document-reload-events.html layout test.

tests/testatk.c:

(updateLoadingEventsResult): New, updates a global variable to
allow checking later on that the right signals were emmitted.
(documentLoadingEventCallback): New, global listener for load-complete
and reload signals over the document object (the web area).
(testWebkitAtkDocumentLoadingEvents): New unit test, globally
connects to document-related signals and check they are properly
emitted when reloading the web view.
(main): Added new test.

Convert bdi-element-expected.html, unicode-bidi-isolate-aharon.html, and unicode-bidi-plaintext.html to reftests.
In addition, isolate the failing test case in unicode-bidi-plaintext.html as unicode-bidi-isolate-aharon-failing.html.

and PeekType from the traits of the mapped value instead of hard-coding them here.
Changed inlineAdd to take a reference to the PassInType instead of the PassInType itself,
to accomodate a PassInType that can't be copied. Use the store, peek, and passOut
functions from the traits as well.

wtf/HashTraits.h: Updated GenericHashTraits and HashTraits for OwnPtr to include

PassInType, PassOutType, PeekType, store, passOut, and peek. Before this, the file had
an earlier version that was just PassType, PeekType, pass, and peek. Also commented
the HashTraits for RefPtr to foreshadow some work we can do there.

(-[WebView _removeObjectForIdentifier:]): Changed the CFRelease(self) into
a WebCFAutorelease(self). This prevents re-entry into this method due to
the WebView closing and canceling all subresource loads, including the
one we have just removed.

Tools: Added a test for <rdar://problem/10523721> Crash at WebCore::SubresourceLoader::releaseResources

Fake the load process when the new HTML5 History APIs are
used. Otherwise the UA does not have a chance of updating the URL
entry, back/forward buttons, etc.

WebCoreSupport/FrameLoaderClientGtk.cpp:

(WebKit::FrameLoaderClient::dispatchDidNavigateWithinPage): fake a
load process.
(WebKit::FrameLoaderClient::dispatchDidPushStateWithinPage): call
dispatchDidNavigateWithinPage.
(WebKit::FrameLoaderClient::dispatchDidReplaceStateWithinPage):
ditto.
(WebKit::FrameLoaderClient::dispatchDidPopStateWithinPage): do
nothing, because push was already called, but note this in a
comment.

Implement LayoutTestController::pathToLocalResource for GTK+. Instead of passing
WEBKIT_TEST_FONTS to the GTK+ test harnesses, pass a more generic WEBKIT_TOP_LEVEL,
which points to the more generic top-level path of the WebKit checkout. This code is
duplicated between WK1 and WK2 harnesses because we do not currently have a way to
share code here.

If WEBKIT_TOP_LEVEL is not provided, we search for the top level based on the binary
location. This will cause the fallback to fail if you build into a non-typical location
or even fake it with a symlink. In this case it's important to use the environment variable.

DumpRenderTree/gtk/DumpRenderTree.cpp:

(getTopLevelPath): Added.
(initializeFonts): Use the new helper to get the font path.

DumpRenderTree/gtk/DumpRenderTreeGtk.h: Expose the new helper.

DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:

(LayoutTestController::pathToLocalResource):Use the new helper to normalize
test paths.

Scripts/webkitpy/layout_tests/port/gtk.py:

(GtkPort.setup_environ_for_server):Pass the top-level path of the
checkout instead of passing the font path.

WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:

(WTR::getTopLevelPath): Added this helper.
(WTR::inititializeFontConfigSetting): Use the helper to find the font path.

(WebCore::finishedCallback): remove this, and m_finished, which
we no longer need to explicitly track
(WebCore::statusWillBeHandledBySoup):
(WebCore::soupErrorShouldCauseLoadFailure): No longer needed;
SoupRequestHTTP's logic is now aligned with WebKit's.
(WebCore::gotChunkCallback): remove gotChunkCallback, which
is no longer needed
(WebCore::startHTTPRequest):
(WebCore::sendRequestCallback):
(WebCore::gotHeadersCallback):
(WebCore::contentSniffedCallback): merge the code from
gotHeadersCallback and contentSniffedCallback into
sendRequestCallback