Unreviewed, rolling out r122178.
http://trac.webkit.org/changeset/122178
https://bugs.webkit.org/show_bug.cgi?id=90857

browser tests, PrerenderBrowserTest.PrerenderFavicon and other
tests, started to fail (Requested by hayato on #webkit).

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

.:

* Source/autotools/symbols.filter:

Source/WebCore:

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::iconURLs):
(WebCore::Document::addIconURL):
(WebCore::Document::setUseSecureKeyboardEntryWhenActive):
* dom/Document.h:
(Document):
* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
(HTMLLinkElement):
* testing/Internals.cpp:
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit2:

* win/WebKit2.def:

LayoutTests:

* fast/dom/icon-url-change-expected.txt: Removed.
* fast/dom/icon-url-change.html: Removed.
* fast/dom/icon-url-list-expected.txt: Removed.
* fast/dom/icon-url-list.html: Removed.
* fast/dom/icon-url-property-expected.txt:
* fast/dom/icon-url-property.html:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG recompilation heuristics should be based on count, not rate
https://bugs.webkit.org/show_bug.cgi?id=90146

Reviewed by Oliver Hunt.
        
Rolling r121511 back in after fixing the DFG's interpretation of op_div
profiling, with Gavin's rubber stamp.

This removes a bunch of code that was previously trying to prevent spurious
reoptimizations if a large enough majority of executions of a code block did
not result in OSR exit. It turns out that this code was purely harmful. This
patch removes all of that logic and replaces it with a dead-simple
heuristic: if you exit more than N times (where N is an exponential function
of the number of times the code block has already been recompiled) then we
will recompile.
        
This appears to be a broad ~1% win on many benchmarks large and small.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::couldTakeSpecialFastCase):
(CodeBlock):
(JSC::CodeBlock::osrExitCounter):
(JSC::CodeBlock::countOSRExit):
(JSC::CodeBlock::addressOfOSRExitCounter):
(JSC::CodeBlock::offsetOfOSRExitCounter):
(JSC::CodeBlock::adjustedExitCountThreshold):
(JSC::CodeBlock::exitCountThresholdForReoptimization):
(JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop):
(JSC::CodeBlock::shouldReoptimizeNow):
(JSC::CodeBlock::shouldReoptimizeFromLoopNow):
* bytecode/ExecutionCounter.cpp:
(JSC::ExecutionCounter::setThreshold):
* bytecode/ExecutionCounter.h:
(ExecutionCounter):
(JSC::ExecutionCounter::clippedThreshold):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeDivSafe):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileBody):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::considerAddingAsFrequentExitSiteSlow):
* dfg/DFGOSRExitCompiler.cpp:
(JSC::DFG::OSRExitCompiler::handleExitCounts):
* dfg/DFGOperations.cpp:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Options.h:
(JSC):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r122166): It made 170 tests crash on 32 bit platforms
https://bugs.webkit.org/show_bug.cgi?id=90852

Patch by Filip Pizlo <fpizlo@apple.com> on 2012-07-10
Reviewed by Zoltan Herczeg.

If we can't use the range filter, we should still make sure that the
address is remotely sane, otherwise the hashtables will assert.

* jit/JITStubRoutine.h:
(JSC::JITStubRoutine::passesFilter):

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

* platform/chromium-linux/http/tests/media/video-buffered-range-contains-currentTime-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening after r122204.

* fast/viewport/viewport-legacy-xhtmlmp-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Re-enable __declspec(dl{import,export}) for MinGW when using EXPORT_MACROS
https://bugs.webkit.org/show_bug.cgi?id=90612

Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com> on 2012-07-10
Reviewed by Csaba Osztrogonác.

MinGW was switched to use auto import/export of symbols on r44184.
From my understanding of the documentation, MinGW will not auto-export symbols
unless there are no explicit __declspec(dlexport) in the DLL already.

The issues that originally made us rely on the auto-import feature of MinGW
should now be resolved with the EXPORT_MACROS work. This patch re-enables them.

It also removes the GCC check for internal symbols hiding as the visibility should
already be hidden by default for both MSVC and GCC on Windows anyway.

* wtf/ExportMacros.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RTL calendar picker for <input type=date> is too narrow and clipped
https://bugs.webkit.org/show_bug.cgi?id=90864

Reviewed by Kentaro Hara.

.:

* ManualTests/forms/calendar-picker.html:
- Add isRTL:true for the arabic setting
- Reset the iframe size when the setting is changed.

Source/WebCore:

Tests: ManualTests/forms/calendar-picker.html

* Resources/calendarPicker.js:
(fixWindowSize):
Checks the left edge of elemenets in RTL.
(layout): Add dir=ltr for the manual test, which re-uses the document.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] WebKit DRT and WTR fail to build due to undefined reference to WTF::MD5::*
https://bugs.webkit.org/show_bug.cgi?id=90868

Unreviewed EFL build fix.

Correct CMake configuration to have EFL's DRT and WebKitTestRunner link
WTF library. This is needed to resolve undefined reference to WTF::MD5::*.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-10

* DumpRenderTree/efl/CMakeLists.txt:
* WebKitTestRunner/PlatformEfl.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Skip a flakey test after r122168.
https://bugs.webkit.org/show_bug.cgi?id=90845.

Patch by Ádám Kallai <kadam@inf.u-szeged.hu> on 2012-07-10

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't destroy the decoded data of an image if WebKit is about to render the image.
https://bugs.webkit.org/show_bug.cgi?id=90721

Patch by Huang Dongsung <luxtella@company100.net> on 2012-07-10
Reviewed by Antti Koivisto.

When the cache capacity of the MemoryCache is exceeded, the decoded data of all
the CachedImages are destroyed. Even the images inside the viewport are
destroyed.  However, if the images need to be rendered again due to scoll events
or animation, they must be decoded again. As an extreme case, if there is an
animation with an image when MemoryCache is almost full, the image must be
decoded every frame. This slows down animation and needlessly consumes CPU
cycles.

Therefore, it is better to not destory the decoded data of an image if the image
is inside the viewport because there is high chance that the image needs to be
rendered again soon. This patch reduces the unnecessary repetition of image decoding
on low memory, and also relieves the memory fragmentation because it avoids reallocation
of image frames.

In addition, there is another positive side effect. Currently,
CachedImageClient::willRenderImage() is used only to determine if GIF animation needs
to be paused or not in CachedImage::shouldPauseAnimation(). This patch makes
GIF animation outside the viewort be paused.

This is also a prerequisite for parallel image decoders. Because parallel image
decoders decode an image asynchronously, clients cannot render the image at the time
when the request is made. Clients can draw the image later after receiving image
decoding complete notification. However, there is a problem because MemoryCache can
destroy the decoded data before clients actually render the image. So parallel image decoders
must prevent the decoded data from being destroyed if the image will be rendered
soon.

This patch may consume a little more memory, but furtunately the peak memory usage
is almost the same.

No new tests - no new testable functionality.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::likelyToBeUsedSoon):
(WebCore):
(WebCore::CachedImage::shouldPauseAnimation):
* loader/cache/CachedImage.h:
(CachedImage):
* loader/cache/CachedResource.h:
(CachedResource):
(WebCore::CachedResource::likelyToBeUsedSoon):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willRenderImage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Extensions API] simplify panel size check in extensions-panel.html
https://bugs.webkit.org/show_bug.cgi?id=90799

Reviewed by Vsevolod Vlasov.

- use window argument in Panel.onShown() to check panel window size;

* http/tests/inspector/resources/extension-panel.html:
* inspector/extensions/extensions-panel-expected.txt:
* inspector/extensions/extensions-panel.html:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/wincairo/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][NRWT] Enable cascaded TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=89108

Patch by János Badics <jbadics@inf.u-szeged.hu> on 2012-07-10
Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort.expectations_files):
* Scripts/webkitpy/layout_tests/port/qt_unittest.py:
(QtPortTest._assert_expectations_files):
(QtPortTest.test_expectations_files):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][ARM] Unreviewed gardening, skip failing/crashing tests to try to make the bot green.

* platform/qt-arm/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r122175): It broke the Windows build
https://bugs.webkit.org/show_bug.cgi?id=90850

Reviewed by Noam Rosenthal.

* qmake/mkspecs/features/features.prf: Disable USE(3D_GRAPHICS) on Windows temporarily until proper fix.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r122207.
http://trac.webkit.org/changeset/122207
https://bugs.webkit.org/show_bug.cgi?id=90874

Broke the cr-windows bot (Requested by beverloo on #webkit).

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, remove unnecessary expectations.

* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling-expected.txt: Removed.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling2-expected.txt: Removed.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling3-expected.txt: Removed.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling4-expected.txt: Removed.
* platform/qt-mac/plugins/mouse-click-plugin-clears-selection-expected.txt: Removed.
* platform/qt-mac/transforms/svg-vs-css-expected.txt: Removed.
* platform/qt-win/Skipped:
* platform/qt-win/fast/events/panScroll-click-hyperlink-expected.txt: Removed.
* platform/qt/fast/css/first-line-text-decoration-expected.png: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-expected.png.
* platform/qt/fast/css/first-line-text-decoration-expected.txt: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-expected.txt.
* platform/qt/fast/css/first-line-text-decoration-inherited-from-parent-expected.png: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-inherited-from-parent-expected.png.
* platform/qt/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt: Renamed from LayoutTests/platform/qt-linux/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, adding a text expectation for the
fast/js/global-constructors.html test. The test is failing because
of the in-progress removal of vendor prefix from DOM MutationObservers.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add API to clear the cache to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=90856

Reviewed by Martin Robinson.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache): Call
WKResourceCacheManagerClearCacheForAllOrigins() to clear all
resources currently cached.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Input type=range issue with events not being raised when value set in js
https://bugs.webkit.org/show_bug.cgi?id=84674

Source/WebCore:

Fix dispatching of change and click events for the input slider.
Prior to the fix, change events were not fired if the new value
matched the value at last change notification based on expected
behavior for text fields.  Clicks were not fired if the thumb
element was repositioned under the cursor on mouse down.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-07-10
Reviewed by Kent Tamura.

Tests: fast/events/click-range-slider.html
       fast/events/onchange-range-slider.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):

LayoutTests:

Ensure that click and change events are properly triggered for range
sliders.  Prior to the fix, change events were not fired if the new
value matched the value at last change notification based on expected
behavior for text fields.  Clicks were not fired if the thumb element
was positioned under the cursor on mouse down.

Patch by Kevin Ellis <kevers@chromium.org> on 2012-07-10
Reviewed by Kent Tamura.

* fast/events/click-range-slider-expected.txt: Added.
* fast/events/click-range-slider.html: Added.
* fast/events/onchange-range-slider-expected.txt: Added.
* fast/events/onchange-range-slider.html: Added.

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