layerX/layerY warning should be removed
https://bugs.webkit.org/show_bug.cgi?id=86264

Reviewed by James Robinson.

Source/WebCore:

Covered by: fast/dom/Window/window-xy-properties.html
            fast/events/init-events.html
            fast/events/mouse-relative-position.html
            fast/events/mouseclick-target-and-positioning.html
            fast/events/simulated-click-coords.html
            jquery/event.html

This change just removes the warning pending proper investigation.

Longer explanation: The layerX/layerY warning was added prematurely
as we didn't assess the web-compatibility potential breakage vs the
maintenance cost. There is also not readily available replacement.

* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::layerX):
(WebCore::MouseRelatedEvent::layerY):
* dom/UIEvent.cpp:
(WebCore::UIEvent::layerX):
(WebCore::UIEvent::layerY):
* dom/UIEvent.h:
Removed warnDeprecatedLayerXYUsage and all the associated calls.

LayoutTests:

Removed console message about layerX/layerY deprecation.

* fast/dom/Window/window-xy-properties-expected.txt:
* fast/events/init-events-expected.txt:
* fast/events/mouse-relative-position-expected.txt:
* fast/events/mouseclick-target-and-positioning-expected.txt:
* fast/events/simulated-click-coords-expected.txt:
* jquery/event-expected.txt:
* platform/qt/fast/events/mouse-relative-position-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ImageLoader can still dispatch beforeload events for ImageDocuments
https://bugs.webkit.org/show_bug.cgi?id=86658
<rdar://problem/11465863>

Reviewed by Brady Eidson.

Prevent flags regarding sending beforeload events from being set on ImageDocuments.

No new tests; testing framework doesn't allow for testing ImageDocuments with injected JavaScript.

* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Support layoutTestController.dumpProgressFinishedCallback() in WKTR
https://bugs.webkit.org/show_bug.cgi?id=81613

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-05-16
Reviewed by Brady Eidson.

Unskip the related test from mac-kw2 and gtk-wk2 as support has been added.

* platform/gtk-wk2/Skipped:
* platform/mac-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Rename valid/finished methods to isValid/isFinished to match coding standard
https://bugs.webkit.org/show_bug.cgi?id=86655

Reviewed by Tony Chang.

No new tests - no functional changes.

* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::isValid): valid() => isValid()
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::transactionFinished):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteFunction):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::isFinished): finished() => isFinished()
* Modules/indexeddb/IDBTransaction.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS 2.1 failure: inline-table-001 fails
https://bugs.webkit.org/show_bug.cgi?id=84167

Reviewed by Julien Chaffraix.

Source/WebCore:

Override lastLineBoxBaseline() in RenderTable so that it picks up the baseline
of the text in the first row of the table. This allows inline tables to find the
correct baseline to align to.

Tests:
        css2.1/20110323/inline-table-001.htm
        css2.1/20110323/inline-table-002a.htm
        css2.1/20110323/inline-table-003.htm
        fast/css/empty-cell-baseline.html

* rendering/RenderTable.cpp:
(WebCore::getLineBoxBaseline):
(WebCore):
(WebCore::RenderTable::lastLineBoxBaseline):
(WebCore::RenderTable::firstLineBoxBaseline):
* rendering/RenderTable.h:
(RenderTable):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::firstLineBoxBaseline): if a cell is empty it cannot provide a
  baseline. Tested by fast/css/empty-cell-baseline.html

LayoutTests:

* css2.1/20110323/inline-table-001.htm: Added.
* css2.1/20110323/inline-table-002a.htm: Added.
* css2.1/20110323/inline-table-003.htm: Added.
  From the CSS 2.1 test suite.

* fast/css/empty-cell-baseline-expected.html: Added.
* fast/css/empty-cell-baseline.html: Added.
  This ensures we don't take a baseline from an empty cell.

* fast/inline-block/001.html: Modified to make expected results clearer.

* platform/chromium-linux-x86/css2.1/20110323/inline-table-001-expected.png: Added.
* platform/chromium-linux-x86/css2.1/20110323/inline-table-001-expected.txt: Added.
* platform/chromium-linux-x86/css2.1/20110323/inline-table-002a-expected.png: Added.
* platform/chromium-linux-x86/css2.1/20110323/inline-table-002a-expected.txt: Added.
* platform/chromium-linux-x86/css2.1/20110323/inline-table-003-expected.png: Added.
* platform/chromium-linux-x86/css2.1/20110323/inline-table-003-expected.txt: Added.

* platform/chromium-linux/editing/pasteboard/innerText-inline-table-expected.png:
    Progression, the baseline of the text in each cell has moved up to where it should be.
* platform/chromium-linux/editing/selection/iframe-expected.png:
    Progression, 'Inline Table' and 'The End' line up with the first row of the inline table.
* platform/chromium-linux/editing/selection/inline-table-expected.png:
    Progression, 'Inline Table' and 'The End' line up with the first row of the inline table.
* platform/chromium-linux/editing/selection/table-caret-3-expected.png:
    Progression, 'foo' and 'baz' line up with the first row of the inline table.
* platform/chromium-linux/fast/css-generated-content/inline-display-types-expected.png:
    Progression, 'Test' and 'content' now line up.
* platform/chromium-linux/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.png:
    Progression, the two boxes now line up.
* platform/chromium-linux/fast/inline-block/001-expected.png:
    Progression, the boxes now line up in the same way as FF and Opera.
* platform/chromium-linux/tables/mozilla/bugs/bug2479-2-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug2479-2-expected.txt:
    Progression, the baseline of the text in each cell has moved up to where it should be.

* platform/chromium-win/editing/pasteboard/innerText-inline-table-expected.txt:
* platform/chromium-win/editing/selection/iframe-expected.txt:
* platform/chromium-win/editing/selection/inline-table-expected.txt:
* platform/chromium-win/editing/selection/table-caret-3-expected.txt:
* platform/chromium-win/fast/css-generated-content/inline-display-types-expected.txt:
* platform/chromium-win/fast/inline-block/001-expected.txt:
* platform/chromium-win/fast/repaint/float-overflow-expected.txt:
* platform/chromium-win/fast/repaint/float-overflow-right-expected.txt:
* platform/chromium/test_expectations.txt:
* platform/efl/test_expectations.txt:
* platform/gtk/test_expectations.txt:
* platform/mac/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt:
* platform/mac/test_expectations.txt:
* platform/qt/test_expectations.txt:
* platform/win/Skipped:
    Text rebaselines.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GC is not thread-safe when moving values between C stacks
https://bugs.webkit.org/show_bug.cgi?id=86672

Reviewed by Phil Pizlo.

GC pauses thread A while marking thread A, and then B while marking B,
which isn't safe against A and B moving values between each others'
stacks.

This is a theoretical bug -- I haven't been able to reproduce it
in the wild.

* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::gatherFromOtherThread):
(JSC::MachineThreads::gatherConservativeRoots): Pause all C stacks for the
duration of stack marking, to avoid missing values that might be moving
between C stacks.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] IndexedDB: WebKit API for IDBObjectStore.autoIncrement property
https://bugs.webkit.org/show_bug.cgi?id=86661

Reviewed by Dimitri Glazkov.

* public/WebIDBObjectStore.h:
(WebKit::WebIDBObjectStore::autoIncrement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix bad expectation added in r117249.
https://bugs.webkit.org/show_bug.cgi?id=82698

Unreviewed, test expectation fix.

* editing/shadow/selection-of-orphan-shadowroot-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GC in the middle of JSObject::allocatePropertyStorage can cause badness
https://bugs.webkit.org/show_bug.cgi?id=83839

Reviewed by Geoff Garen.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* jit/JITStubs.cpp: Making changes to use the new return value of growPropertyStorage.
(JSC::DEFINE_STUB_FUNCTION):
* runtime/JSObject.cpp:
(JSC::JSObject::growPropertyStorage): Renamed to more accurately reflect that we're 
growing our already-existing PropertyStorage.
* runtime/JSObject.h:
(JSObject):
(JSC::JSObject::setPropertyStorage): "Atomically" sets the new property storage 
and the new structure so that we can be sure a GC never occurs when our Structure
info is out of sync with our PropertyStorage.
(JSC):
(JSC::JSObject::putDirectInternal): Moved the check to see if we should 
allocate more backing store before the actual property insertion into 
the structure.
(JSC::JSObject::putDirectWithoutTransition): Ditto.
(JSC::JSObject::transitionTo): Ditto.
* runtime/Structure.cpp:
(JSC::Structure::suggestedNewPropertyStorageSize): Added to keep the resize policy 
for property backing stores contained within the Structure class.
(JSC):
* runtime/Structure.h:
(JSC::Structure::shouldGrowPropertyStorage): Lets clients know if another insertion 
into the Structure would require resizing the property backing store so that they can 
preallocate the required storage.
(Structure):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium rebaseline for change in r117310.

* platform/chromium-mac/fast/block/float/overhanging-tall-block-expected.png:
* platform/chromium-mac/fast/block/float/overhanging-tall-block-expected.txt: Removed.
* platform/chromium-win/fast/block/float/overhanging-tall-block-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Mark test as flakily timing out.
https://bugs.webkit.org/show_bug.cgi?id=82698

Unreviewed, expectations update.

* platform/chromium/test_expectations.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make window-property-shadowing-name.html fail faster
https://bugs.webkit.org/show_bug.cgi?id=86664

Reviewed by Ojan Vafai.

This makes test sync instead of async by checking the return value of window.open.

* fast/dom/Window/window-property-shadowing-name.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r117332.
http://trac.webkit.org/changeset/117332
https://bugs.webkit.org/show_bug.cgi?id=86679

It makes the Qt Linux bot very unhappy (Requested by darktears
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-05-16

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] The FCC shows up on an empty input field
https://bugs.webkit.org/show_bug.cgi?id=86657

Patch by Yongxin Dai <yodai@rim.com> on 2012-05-16
Reviewed by Antonio Gomes.

Turn off the caret by sending a caret changed notification with empty caret.
PR #120620

Reviewed Internally by Mike Fenton.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::caretPositionChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix perf regression from r116487
https://bugs.webkit.org/show_bug.cgi?id=86680

Reviewed by Ryosuke Niwa.

http://trac.webkit.org/changeset/116487 caused a 6% regression on
Dromaeo's dom-attr test. The issue is that we invalidated NodeList
caches whenever an id/checked/type attribute changed.

First, we don't need to invalidate on checked/type since that only
affects the values return by NodeList items, not the list of items.
Second, we only need to invalidate NodeList caches when an id attribute
changes on a FormControlElement.

Incidentally, we also don't need to invalidate caches for changes
to attributes that don't have an ownerElement.

No new tests. This is strictly a performance improvement.

* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* dom/Node.cpp:
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
* dom/Node.h:
(Node):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify AudioNode ref-counting by removing RefTypeDisabled
https://bugs.webkit.org/show_bug.cgi?id=85681

Patch by Raymond Toy <rtoy@google.com> on 2012-05-16
Reviewed by Chris Rogers.

Existing tests should cover these changes.

* Modules/webaudio/AudioNode.cpp: Remove RefTypeDiabled and m_disabledRefCount.
(WebCore::AudioNode::AudioNode):
(WebCore::AudioNode::~AudioNode):
(WebCore::AudioNode::enableOutputsIfNecessary): New
(WebCore::AudioNode::ref):
(WebCore::AudioNode::disableOutputsIfNecessary): New
(WebCore::AudioNode::finishDeref):
* Modules/webaudio/AudioNode.h: Remove RefTypeDisabled and m_disabledRefCount.
* Modules/webaudio/AudioNodeInput.cpp: Removed uses of RefTypeDisbled.
(WebCore::AudioNodeInput::disconnect):
(WebCore::AudioNodeInput::disable):
(WebCore::AudioNodeInput::enable):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove ImageDecoderCG.cpp from platform/image-decoders
https://bugs.webkit.org/show_bug.cgi?id=86346

Reviewed by Adam Barth.

ImageDecoderCG.cpp was added for use in the Chromium port in r70846. Remove the
implementation now that Chromium uses Skia on Mac OSX by default.

No new tests. No change in behavior.

* WebCore.gypi: Remove ImageDecoderCG.cpp from the gyp project.
* platform/graphics/ImageSource.h: Revert the r70846 changes.
* platform/image-decoders/ImageDecoder.cpp: Remove copyReferenceToBitmapData().
(WebCore::ImageFrame::operator=): Return to using copyBitmapData() (as it was)
given the removal of copyReferenceToBitmapData() above.
* platform/image-decoders/ImageDecoder.h:
(ImageFrame): Remove copyReferenceToBitmapData() declaration.
* platform/image-decoders/cg/ImageDecoderCG.cpp: Removed, and it was the only
decoder with a port-specific implementation of copyReferenceToBitmapData().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK gardening.

* platform/gtk/test_expectations.txt: Unflag tests needing
rebaseline. I'll pull them from the bot ASAP.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge nextRootInlineBox with nextLinePosition
https://bugs.webkit.org/show_bug.cgi?id=81593

Reviewed by Enrica Casucci.

Call previousRootInlineBox and nextRootInlineBox in previousLinePosition and nextLinePosition respectively
to share the code. Moved out the nullity check of startBox and extracted the renderer's node from the former
two, and added editableType to their argument lists to match the interface in both use cases.

Also moved out the code to extract root inline box using RenderedPosition from those two functions and
expanded in call sites since previousLinePosition and nextLinePosition need to return the candidate position
even when the root inline box doesn't exist. To this end, renamed previousRootInlineBox and nextRootInlineBox
to previousRootInlineBoxCandidatePosition and nextRootInlineBoxCandidatePosition respectively.

In addition, got rid of one version of nextLeafWithSameEditability that adjusted node with respect to offset
This variant did:

Node* child = node->childNode(offset);
node = child ? child->nextLeafNode() : node->lastDescendant()->nextLeafNode();

instead of:

node = node->nextLeafNode();

at the beginning of the function. Observe that the former code is logically equivalent to:

Node* child = node->childNode(offset);
node = child ? child : node->lastDescendant();
node = node->nextLeafNode();

Thus, the first two lines of this logically equivalent code is added in nextLinePosition wherein we used to
call the removed variant.

This refactoring with no behavioral change would help us resolving the bug 81490.

* editing/visible_units.cpp:
(WebCore::previousRootInlineBoxCandidatePosition): Renamed from previousRootInlineBox.
(WebCore::nextRootInlineBoxCandidatePosition): Renamed from nextRootInlineBox.
(WebCore::logicallyPreviousBox): Checks the nullity of startBox's renderer and node. Also extracts the root
inline box out of the position per the interface change.
(WebCore::logicallyNextBox): Ditto.
(WebCore::previousLinePosition): Calls previousRootInlineBoxCandidatePosition.
(WebCore::nextLinePosition): Calls nextRootInlineBoxCandidatePosition.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Mark a test as failing.
https://bugs.webkit.org/show_bug.cgi?id=86683

Unreviewed, expectations update.

* platform/chromium/test_expectations.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117360 268f45cc-cd09-0410-ab3c-d52691b4dbfc