Change ascents and descent back to ints for now
https://bugs.webkit.org/show_bug.cgi?id=86518

Reviewed by Eric Seidel.

Change ascents and descent calculation back to integers for now as it
looks like we'll need to support both the 1/60 and 1/1 implementations of
FractionalLayoutUnit for the immediate future to ensure that text is
rendered at the same offset and with the height regardless of the
ENABLE_SUBPIXEL_LAYOUT flag.

This ensures that most websites will look the same at 100% zoom
regardless of the flag and also allows us to the same test expectations
for the vast majority of layout tests.

Eventually we want to move those back to FractionalLayoutUnits as that
will result in more correct rendering.

Source/WebCore: 

No new tests, no change in functionality.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
* rendering/RootInlineBox.cpp:
(WebCore::setAscentAndDescent):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/RootInlineBox.h:
(RootInlineBox):

LayoutTests: 

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make things build with DUMP_HASHTABLE_STATS=1
https://bugs.webkit.org/show_bug.cgi?id=86571

Reviewed by Geoffrey Garen.

DUMP_HASHTABLE_STATS bitrotted after the WTF separation. This patch
makes it build.

Added WTF_EXPORTDATA to the global data, and WTF_EXPORT_PRIVATE to
the static HashTableStats methods. Added a dumpStats() method
that is not yet called anywhere; we can no longer rely on destroying
a global object to dump the stats because global destructors are
disallowed.

* wtf/HashTable.cpp:
(WTF):
(WTF::HashTableStats::recordCollisionAtCount):
(WTF::HashTableStats::dumpStats):
* wtf/HashTable.h:
(HashTableStats):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Use ThrottledTextureUploader with threaded compositing.
https://bugs.webkit.org/show_bug.cgi?id=85848

Patch by David Reveman <reveman@chromium.org> on 2012-05-16
Reviewed by Adrienne Walker.

Switch to ThrottledUploader in CCThreadProxy.

* platform/graphics/chromium/cc/CCThreadProxy.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FrameView::scrollContentsFastPath should use painted area to determine whether to drop out of the fast path
https://bugs.webkit.org/show_bug.cgi?id=86651
<rdar://problem/11459243>

Reviewed by Simon Fraser.

Previously, we decided to fall out of the fast scrolling path by the number of fixed-position elements
on the page. This was less than ideal if a single fixed position element took up a significant portion
of the page, or if there were many small, cheap-to-paint fixed elements.

Instead, we should use the fast path if less than 50% of the page will be repainted by fixed-position
elements, and otherwise fall back to the slow path.

I've tested a few different thresholds with an internal test; 50% seems to work relatively well,
but the ideal value is hard to determine and likely depends on hardware.

No new tests, performance improvement with few large fixed-position objects or many small ones.

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Scrollbar layers should respect accelerated drawing setting
https://bugs.webkit.org/show_bug.cgi?id=86644
<rdar://problem/11462038>

Reviewed by Simon Fraser.

When creating scrollbar layers, pass through the accelerated drawing setting.

No new tests.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Unreviewed build change after r115385.  Several Cairo
image routines were modified to use new wrapper classes, but the
relevant WinCairo sources were not updated to match.

* WebCore.vcproj/WebCore.vcproj:
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::create):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/win/DragImageCairoWin.cpp:
(WebCore::createDragImageFromImage):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid reparsing the style attribute when cloning elements.
<http://webkit.org/b/86574>

Reviewed by Antti Koivisto.

Refactor cloning of attributes a bit to dodge the styleAttr reparse previously
caused by ElementAttributeData::setAttributes().

Introduced Element::cloneDataFromElement() which takes care of cloning the
ElementAttributeData as well as "non-attribute properties" (which is currently
specific to HTMLInputElement.)

Also includes some additional dodging of attribute vector traversal to find
old/new 'id' and 'name' attributes.

I'm seeing a ~10% improvement on PerformanceTests/DOM/CloneNodes locally.

* dom/Document.cpp:
(WebCore::Document::importNode):
* dom/Element.cpp:
(WebCore::Element::cloneElementWithoutChildren):
(WebCore::Element::cloneAttributesFromElement):
(WebCore::Element::cloneDataFromElement):
* dom/Element.h:
(WebCore::Element::copyNonAttributePropertiesFromElement):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::cloneDataFrom):
* dom/ElementAttributeData.h:
(ElementAttributeData):
* dom/Node.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::parseAttribute):
* dom/StyledElement.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren):
* html/HTMLElement.cpp:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::copyNonAttributePropertiesFromElement):
* html/HTMLInputElement.h:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::innerPatchNode):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
(WebCore::SVGUseElement::transferUseAttributesToReplacedElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Unreviewed build change after exported symbol
updates (r114790) and expansion of CG routines in WebPage
PDF output (r114476).

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::drawRectToPDF): Exclude CG use on WinCairo.
(WebKit::WebPage::drawPagesToPDF): Exclude CG use on WinCairo.
* win/WebKit2CFLite.def: Don't claim to export symbols we don't
provide (e.g., full screen API calls).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Mac]REGRESSION?(r89397) It made fast/css/custom-font-xheight.html crash
https://bugs.webkit.org/show_bug.cgi?id=63132

Removed test from skipped list, since it now passes on mac.

Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-05-16
Reviewed by Alexis Menard.

* platform/qt-mac/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<video> elements with no video tracks report false for webkitSupportsFullscreen.
https://bugs.webkit.org/show_bug.cgi?id=86650

Reviewed by Eric Carlson.

Source/WebCore:

No new tests; updated media/media-fullscreen-inline.html.

With the new Full Screen API, the restriction that only video elements with
video tracks can enter full screen seems arbitrary. Some media types will
occasionally determine they have video tracks long after loadedmetadata, which
breaks websites who check for webkitSupportsFullscreen(). Relax the restriction
on webkitSupportsFullscreen() for ports where the Full Screen API is enabled and
supported so as to no longer require hasVideo().

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen):

LayoutTests:

Fix media-fullscreen.js to support the new FULLSCREEN_API events, if present.
Fix the media-fullscreen-inline.html test and unskip on Lion.

* media/media-fullscreen-inline-expected.txt:
* media/media-fullscreen-inline.html:
* media/media-fullscreen.js:
(fullscreenchange):
(loadedmetadata):
(addEventListeners):
* platform/mac-lion/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] No modifier flags (shift/ctrl/alt) in drag&drop events on chromium linux
https://bugs.webkit.org/show_bug.cgi?id=86236

Patch by Varun Jain <varunjain@google.com> on 2012-05-16
Reviewed by Tony Chang.

.:

* ManualTests/chromium/modifiers-during-drag-and-drop.html: Added.

Source/WebCore:

ManualTests: ManualTests/chromium/modifiers-during-drag-and-drop.html

* page/DragController.cpp:
(WebCore::createMouseEvent):
* platform/DragData.cpp:
(WebCore):
(WebCore::DragData::modifierKeyState):
* platform/DragData.h:
(DragData):
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::ChromiumDataObject):
* platform/chromium/ChromiumDataObject.h:
(WebCore::ChromiumDataObject::modifierKeyState):
(WebCore::ChromiumDataObject::setModifierKeyState):
(ChromiumDataObject):
* platform/chromium/DragDataChromium.cpp:
(WebCore::DragData::modifierKeyState):
(WebCore):

Source/WebKit/chromium:

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
(WebKit::webInputEventKeyStateToPlatformEventKeyState):
(WebKit):
(WebKit::WebViewImpl::dragTargetDragEnter):
(WebKit::WebViewImpl::dragTargetDragOver):
(WebKit::WebViewImpl::dragTargetDrop):
(WebKit::WebViewImpl::dragTargetDragEnterOrOver):
* src/WebViewImpl.h:
(WebViewImpl):

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

* platform/gtk/fast/block/float/overhanging-tall-block-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add WebKit API to access inner text value of input element
https://bugs.webkit.org/show_bug.cgi?id=85353

Patch by Keishi Hattori <keishi@webkit.org> on 2012-05-16
Reviewed by Kent Tamura.

* Source/autotools/symbols.filter: Added HTMLInputElement::setEditingValue

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Don't reset the default font families in WebSettings
https://bugs.webkit.org/show_bug.cgi?id=86660

Reviewed by Rob Buis.

PR 152467
The default families are also set definitively in WebCore/page/blackberry/SettingsBlackBerry.cpp

* Api/WebSettings.cpp:
(BlackBerry::WebKit::WebSettings::standardSettings):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION?(62951): media tests fail
https://bugs.webkit.org/show_bug.cgi?id=42094

Reviewed by Noam Rosenthal.

Enable some media layout tests so that our coverage is more than inexistant.

* platform/qt/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Malformed GIF can cause decoder to read off end of heap buffer
https://bugs.webkit.org/show_bug.cgi?id=86531

Reviewed by Adam Barth.

Source/WebCore: 

Test: fast/images/read-past-end-of-buffer.html
This test is only expected to catch problems if run under Address
Sanitizer or a similar memory-checking utility.

* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::read):

LayoutTests: 

The test here is only expected to catch problems if run under Address
Sanitizer or a similar memory-checking utility.

* fast/images/read-past-end-of-buffer-expected.txt: Added.
* fast/images/read-past-end-of-buffer.html: Added.
* fast/images/resources/wrong-block-length.gif: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Use accessors for backing store / database id in store/index backends
https://bugs.webkit.org/show_bug.cgi?id=86652

Reviewed by Tony Chang.

Hide the private members m_backingStore and m_databaseId of IDBObjectStoreBackendImpl
and IDBIndexBackendImpl behind accessors. This is preparation for removing these
members and only holding references to the IDBDatabaseBackendImpl: webkit.org/b/83074

No new tests - no functional changes.

* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::openCursorInternal):
(WebCore::IDBIndexBackendImpl::countInternal):
(WebCore::IDBIndexBackendImpl::getInternal):
(WebCore::IDBIndexBackendImpl::getByRangeInternal):
(WebCore::IDBIndexBackendImpl::getKeyInternal):
(WebCore::IDBIndexBackendImpl::getKeyByRangeInternal):
(WebCore::IDBIndexBackendImpl::addingKeyAllowed):
* Modules/indexeddb/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::backingStore): Added.
(WebCore::IDBIndexBackendImpl::databaseId): Added.
(IDBIndexBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::getByRangeInternal):
(WebCore::IDBObjectStoreBackendImpl::getInternal):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):
(WebCore::IDBObjectStoreBackendImpl::clearInternal):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
(WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
(WebCore::IDBObjectStoreBackendImpl::countInternal):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
(WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(WebCore::IDBObjectStoreBackendImpl::backingStore): Added.
(WebCore::IDBObjectStoreBackendImpl::databaseId): Added.
(IDBObjectStoreBackendImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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