Refactor Localizer-related classes.
https://bugs.webkit.org/show_bug.cgi?id=100482

Reviewed by Kentaro Hara.

- Localizer has unused code
 Localizer should have function implementations only if they are used in
 multiple subclasses.
- Some Localizer subclasses hide Localizer data members
- Should use String::isNull to check initialization-or-not

No new tests. This should not change any behavior.

* platform/text/Localizer.h:
(Localizer):
- timeFormat, shortTimeFormat, and timeAMPMLabels should be pure virtual.
- Remove m_localizedDateFormatText, m_localizedShortTimeFormatText, and
  m_timeAMPMLabels
* platform/text/Localizer.cpp:
Remove implementations of timeFormat, shortTimeFormat, and timeAMPMLabels.

* platform/text/LocaleICU.h:
(LocaleICU): Introduce m_timeFormatWithSeconds and m_timeFormatWithoutSeconds.
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::initializeDateTimeFormat):
Use new data members instead of Localizer data members.
(WebCore::LocaleICU::dateFormat): Use isNull.

* platform/text/LocaleNone.cpp:
(LocaleNone): Add timeFormat, shortTimeFormat, timeAMPMLabels
implementations, and m_timeAMPMLabels.
(WebCore::LocaleNone::timeFormat): Returns the HTML time format.
(WebCore::LocaleNone::shortTimeFormat): Returns the HTML time format.
(WebCore::LocaleNone::timeAMPMLabels): Returns "AM" and "PM".

* platform/text/LocaleWin.h:
(LocaleWin): Add m_timeFormatWithSeconds.
* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::dateFormat): Use isNull.
(WebCore::LocaleWin::timeFormat): Use m_timeFormatWithSeconds.

* platform/text/mac/LocaleMac.h:
(LocaleMac): Rename m_localized*TimeFormatText to m_timeFormatWith*Seconds.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::timeFormat): Follow the renaming.
(WebCore::LocaleMac::shortTimeFormat): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] ASSERT currentThreadIsHoldingLock() failed in MarkedAllocator::allocateSlowCase()
https://bugs.webkit.org/show_bug.cgi?id=100504

Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2012-10-26
Reviewed by Yong Li.

PR #232038 The similar PR # 200724.
Reviewed internally by Petter Wang.

This issue is same as bug 95492, and this patch is same as its patch.
Hold the JSLock for the current thread before we call toRef to avoid
the ASSERT failure.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
(BlackBerry::WebKit::WebPage::executeJavaScriptFunction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] should enable two postredirect tests
https://bugs.webkit.org/show_bug.cgi?id=100508

Unreviewed gardening.

The EFL results for these tests seem to have been wrong from the beginning.
Update expected results, enable tests for WK2 (based on comment in
TestExpectations these were skipped because efl failed).

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-10-26

* platform/efl/http/tests/navigation/postredirect-basic-expected.png:
* platform/efl/http/tests/navigation/postredirect-basic-expected.txt:
* platform/efl/http/tests/navigation/postredirect-goback1-expected.png:
* platform/efl/http/tests/navigation/postredirect-goback1-expected.txt:
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[v8] Memory instrumentation: don't count memory of WrapperTypeInfo
https://bugs.webkit.org/show_bug.cgi?id=100517

Reviewed by Alexander Pavlov.

* bindings/v8/V8PerIsolateData.cpp: when estimating bindings memory size skip
pointers to WrapperTypeInfo objects as they are static fields and belong to
the data segment.
(WTF):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Build fix for r132650.
https://bugs.webkit.org/show_bug.cgi?id=100482

* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::timeFormat):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Get rid of C'ism in text checker API
https://bugs.webkit.org/show_bug.cgi?id=100513

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-26
Reviewed by Kenneth Rohde Christiansen.

Make Ewk_Text_Checker a C++ class and move the
WebKitTextChecker code to this new class. This
gets rid of the C'ism in the text checker code
and make it consistent with other Ewk classes.

* PlatformEfl.cmake:
* UIProcess/API/efl/ewk_context.cpp:
(Ewk_Context::Ewk_Context):
* UIProcess/API/efl/ewk_settings.cpp:
(spellCheckingLanguagesSetUpdate):
(ewk_settings_continuous_spell_checking_enabled_set):
(ewk_settings_spell_checking_available_languages_get):
(ewk_settings_spell_checking_languages_get):
* UIProcess/API/efl/ewk_text_checker.cpp:
(ClientCallbacks):
(textCheckerEnchant):
(clientCallbacks):
(isContinuousSpellCheckingEnabled):
(setContinuousSpellCheckingEnabled):
(uniqueSpellDocumentTag):
(closeSpellDocumentWithTag):
(checkSpellingOfString):
(guessesForWord):
(learnWord):
(ignoreWord):
(Ewk_Text_Checker):
(Ewk_Text_Checker::availableSpellCheckingLanguages):
(Ewk_Text_Checker::updateSpellCheckingLanguages):
(Ewk_Text_Checker::loadedSpellCheckingLanguages):
(Ewk_Text_Checker::initialize):
* UIProcess/API/efl/ewk_text_checker_private.h:
(Ewk_Text_Checker):
* UIProcess/efl/WebKitTextChecker.cpp: Removed.
* UIProcess/efl/WebKitTextChecker.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: instrument chromium GlyphCache. It keeps ~2mb data on gmail.
https://bugs.webkit.org/show_bug.cgi?id=100515

Reviewed by Yury Semikhatsky.

I replaced old version with an abstract number with new one which precisely reports allocated SkGlyphCache objects and their sizes.

* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* platform/MemoryUsageSupport.cpp:
(WebCore::MemoryUsageSupport::reportMemoryUsage):
* platform/MemoryUsageSupport.h:
(MemoryUsageSupport):
* platform/PlatformMemoryInstrumentation.cpp:
(WebCore):
* platform/PlatformMemoryInstrumentation.h:
(PlatformMemoryTypes):
* platform/chromium/MemoryUsageSupportChromium.cpp:
(reportMemoryUsage):
(WebCore::reportGlyphCache):
(WebCore):
(WebCore::MemoryUsageSupport::reportMemoryUsage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Some context menu items are duplicated on Resources and Sources panels.
https://bugs.webkit.org/show_bug.cgi?id=100522

Reviewed by Pavel Feldman.

Method appendApplicableItems now receives event as a parameter.
HandlerRegistry now makes sure that it is not called more than once for certain context menu event.

* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._emptyElementContextMenu):
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
(WebInspector.XHRBreakpointsSidebarPane.prototype._emptyElementContextMenu):
(WebInspector.XHRBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
* inspector/front-end/ConsoleView.js:
* inspector/front-end/ContextMenu.js:
(WebInspector.ContextMenu):
(WebInspector.ContextMenu.prototype.show):
(WebInspector.ContextMenu.prototype.appendApplicableItems):
(WebInspector.ContextMenu.Provider.prototype.appendApplicableItems):
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView.prototype._contextMenu):
* inspector/front-end/DOMBreakpointsSidebarPane.js:
(WebInspector.DOMBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype._contextMenu):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
* inspector/front-end/ElementsPanelDescriptor.js:
(WebInspector.ElementsPanelDescriptor.prototype.appendApplicableItems):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
* inspector/front-end/HandlerRegistry.js:
(WebInspector.HandlerRegistry.prototype.appendApplicableItems):
* inspector/front-end/ImageView.js:
(WebInspector.ImageView.prototype._contextMenu):
* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorView.prototype.handleContextMenu):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._contextMenu):
* inspector/front-end/NetworkPanelDescriptor.js:
(WebInspector.NetworkPanelDescriptor.prototype.appendApplicableItems):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
(WebInspector.ObjectPropertyTreeElement.prototype._contextMenuFired):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
(WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
(WebInspector.IndexedDBTreeElement.prototype._handleContextMenuEvent):
(WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
(WebInspector.IDBDatabaseTreeElement.prototype._handleContextMenuEvent):
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.appendApplicableItems):
* inspector/front-end/ScriptsPanelDescriptor.js:
(WebInspector.ScriptsPanelDescriptor.prototype.appendApplicableItems):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPaneTab.prototype._tabContextMenu):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._contextMenu):
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype._emptyElementContextMenu):
(WebInspector.WatchExpressionTreeElement.prototype._contextMenu):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Remove empty buggy directories.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132658.
http://trac.webkit.org/changeset/132658
https://bugs.webkit.org/show_bug.cgi?id=100515

It broke the Qt build

* inspector/InspectorMemoryAgent.cpp:
(WebCore::addPlatformComponentsInfo):
(WebCore):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* platform/MemoryUsageSupport.cpp:
(WebCore::MemoryUsageSupport::memoryUsageByComponents):
* platform/MemoryUsageSupport.h:
(ComponentInfo):
(WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo):
(MemoryUsageSupport):
* platform/PlatformMemoryInstrumentation.cpp:
(WebCore):
* platform/PlatformMemoryInstrumentation.h:
(PlatformMemoryTypes):
* platform/chromium/MemoryUsageSupportChromium.cpp:
(WebCore::MemoryUsageSupport::memoryUsageByComponents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for Qt builders.

* platform/qt/MemoryUsageSupportQt.cpp:

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

It is not necessary any more. (Requested by loislo on
#webkit).

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

* platform/qt/MemoryUsageSupportQt.cpp:
(WebCore::MemoryUsageSupport::memoryUsageByComponents):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Lots of time spent under DNSResolveQueue::platformProxyIsEnabledInSystemPreferences
https://bugs.webkit.org/show_bug.cgi?id=100514

Reviewed by Anders Carlsson.

DNSResolveQueue::platformProxyIsEnabledInSystemPreferences gets called for every link in
the document. The function is relatively slow.
        
This patch caches the result of the last check for 5 seconds. Based on code comments
prefetching is disabled with proxies due to regressing performance with some configurations.
Proxy status changes rarely and a slight reaction delay shoudn't cause practical problems.

* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::DNSResolveQueue):
        
    Add constructor. Also fixes a bug, m_requestsInFlight was not initialized.
            
(WebCore):
(WebCore::DNSResolveQueue::isUsingProxy):
(WebCore::DNSResolveQueue::add):
(WebCore::DNSResolveQueue::fired):
* platform/network/DNSResolveQueue.h:
(DNSResolveQueue):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash on loading SVG filter resource on HTML element
https://bugs.webkit.org/show_bug.cgi?id=100491

Reviewed by Dirk Schulze.

Source/WebCore:

Skip non-filter elements referenced via -webkit-filter.

Test: svg/filters/filter-reference-crash.html

* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):

LayoutTests:

* svg/filters/filter-reference-crash-expected.txt: Added.
* svg/filters/filter-reference-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clear m_orientation in FrameData::clear() for skia
https://bugs.webkit.org/show_bug.cgi?id=100456

Reviewed by Stephen White.

clear() is only called by the FrameData destructor and for multi-image
images in BitmapImage::destroyDecodedData(). Multi-frame images don't
have exif data, so this patch should have no effect in practice. It
makes the skia code match the CG code in BitmapImageCG.cpp though.

* platform/graphics/skia/ImageSkia.cpp:
(WebCore::FrameData::clear):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replaceable attributes should also have readonly
https://bugs.webkit.org/show_bug.cgi?id=91768

Reviewed by Adam Barth.

This updates the code generators for JSC and V8 to handle this case correctly.

* Modules/intents/DOMWindowIntents.idl:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/V8/V8TestObj.cpp:
* page/DOMWindow.idl:
* workers/WorkerContext.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix log-type icon alignment.
https://bugs.webkit.org/show_bug.cgi?id=100520

Reviewed by Yury Semikhatsky.

The icons are just a pixel or two off, and it's driving me nuts.

* inspector/front-end/inspector.css:
(.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title::before):
(.console-warning-level::before):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
Generic ThreadUnsafe Singleton
https://bugs.webkit.org/show_bug.cgi?id=100529

Patch by Parth Patel <parpatel@rim.com> on 2012-10-26
Reviewed by Yong Li.

No new tests added as there was no behavioural change.

* platform/network/blackberry/NetworkManager.cpp:
(WebCore):
* platform/network/blackberry/NetworkManager.h:
(NetworkManager):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn PageLoad tests into simple performancetests, commit #5 
https://bugs.webkit.org/show_bug.cgi?id=99899

Reviewed by Ryosuke Niwa.

We cannot provide an elegant way to measure the memory consumption of the PageLoad tests, but we can turn them into simple
performance tests and measure their memory footprint and performance that way. This change moves and renames the related files
to their new location and adds html/js wrappers for them.

This is the #5 commit of the whole patch.

* PageLoad/svg/files/Harvey_Rayner.svg: Removed.
* PageLoad/svg/files/Sierpinski_carpet_6.svg: Removed.
* PageLoad/svg/files/mtsthelens.svg: Removed.
* PageLoad/svg/files/mtsthelens0.jpg: Removed.
* SVG/HarveyRayner.html: Added.
* SVG/MtSaintHelens.html: Added.
* SVG/SierpinskiCarpet.html: Added.
* SVG/resources/HarveyRayner.svg: Copied from PerformanceTests/PageLoad/svg/files/Harvey_Rayner.svg.
* SVG/resources/MtSaintHelens.svg: Copied from PerformanceTests/PageLoad/svg/files/mtsthelens.svg.
* SVG/resources/SierpinskiCarpet.svg: Copied from PerformanceTests/PageLoad/svg/files/Sierpinski_carpet_6.svg.
* SVG/resources/mtsthelens0.jpg: Copied from PerformanceTests/PageLoad/svg/files/mtsthelens0.jpg.
* Skipped: Rename the files on the skipped list also.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] MiniBrowser segfaults on exit after using WebGL.
https://bugs.webkit.org/show_bug.cgi?id=100523

The display connection must not be closed before
destroying the offscreen window.
Therefore opening the connection is moved to the
getXWindow() function. And closing the connection
is being moved to the destructor of the offscreen window.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::OffScreenRootWindow::OffScreenRootWindow):
(WebCore::OffScreenRootWindow::getXWindow):
(OffScreenRootWindow):
(WebCore::OffScreenRootWindow::display):
(WebCore::OffScreenRootWindow::~OffScreenRootWindow):
(WebCore):
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createSurface):

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