2011-01-12  Kenichi Ishibashi  <bashi@google.com>

        Reviewed by Kent Tamura.

        M_formElementsWithFormAttribute not cleared when Node is moved to another document.
        https://bugs.webkit.org/show_bug.cgi?id=51418

        Calls unregisterFormElementWithFormAttribute() when form associated elements
        are moved to another document.

        Test: fast/forms/change-form-element-document-crash.html

        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::willMoveToNewOwnerDocument): Added.
        * html/FormAssociatedElement.h: Added willMoveToNewOwnerDocument().
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::willMoveToNewOwnerDocument): Added.
        * html/HTMLFormControlElement.h: Added willMoveToNewOwnerDocument().
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::willMoveToNewOwnerDocument): Added.
        * html/HTMLObjectElement.h: Added willMoveToNewOwnerDocument().
        * html/HTMLPlugInImageElement.h: Moves willMoveToNewOwnerDocument() to protected.

2011-01-12  Kenichi Ishibashi  <bashi@google.com>

        Reviewed by Kent Tamura.

        M_formElementsWithFormAttribute not cleared when Node is moved to another document.
        https://bugs.webkit.org/show_bug.cgi?id=51418

        Added test for crash when moving form elements from one document to another.

        * fast/forms/change-form-element-document-crash-expected.txt: Added.
        * fast/forms/change-form-element-document-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Kenichi Ishibashi  <bashi@google.com>

        Reviewed by Kent Tamura.

        M_formElementsWithFormAttribute not cleared when FormAssociatedElement is inserted with a null m_form and then removed.
        https://bugs.webkit.org/show_bug.cgi?id=51905

        Calls unregisterFormElementWithFormAttribute() when 'form' attribute
        is removed.

        Tests: fast/forms/form-associated-element-crash.html
               fast/forms/form-associated-element-crash2.html

        * html/FormAssociatedElement.cpp:
        (WebCore::FormAssociatedElement::formAttributeChanged):

2011-01-12  Kenichi Ishibashi  <bashi@google.com>

        Reviewed by Kent Tamura.

        M_formElementsWithFormAttribute not cleared when FormAssociatedElement is inserted with a null m_form and then removed.
        https://bugs.webkit.org/show_bug.cgi?id=51905

        Add test for crash when modifying the form attribute of a form
        associated element before removing it.

        * fast/forms/form-associated-element-crash-expected.txt: Added.
        * fast/forms/form-associated-element-crash.html: Added.
        * fast/forms/form-associated-element-crash2-expected.txt: Added.
        * fast/forms/form-associated-element-crash2.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION(r69831): focus() in onkeypress discards input (affects chaseonline.chase.com)
        https://bugs.webkit.org/show_bug.cgi?id=52241

        The bug was caused by RenderTextControl::selection's creating a Range with m_insertText
        which is a shadow DOM div as both start and end containers. Fixed the bug by traversing
        through the descendents of m_innerText and using the right start and end containers to
        create a Range.

        Test: fast/forms/focus-change-on-keypress.html

        * rendering/RenderTextControl.cpp:
        (WebCore::setContainerAndOffsetForRange): Added; a helper function.
        (WebCore::RenderTextControl::selection): See above.
2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION(r69831): focus() in onkeypress discards input (affects chaseonline.chase.com)
        https://bugs.webkit.org/show_bug.cgi?id=52241

        Added a test to ensure WebKit inserts the character typed by a user when focus's node
        is changed by a presskey event handler.

        * fast/forms/focus-change-on-keypress-expected.txt: Added.
        * fast/forms/focus-change-on-keypress.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Hayato Ito  <hayato@chromium.org>

        Unreviewed chromium-gpu test expectations fix.

        Disable canvas-large-dimensions.html after r75639.

        * platform/chromium-gpu/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Hayato Ito  <hayato@chromium.org>

        Unreviewed test expectations files fix.

        Fix a culprit revision number.

        * platform/chromium-gpu/test_expectations.txt:
        * platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by David Levin.

        Add beforeunload support to WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=52353

        * platform/mac-wk2/Skipped: Unskip a test that was failing solely due to missing
        beforeunload support.
2011-01-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by David Levin.

        Add beforeunload support to WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=52353
        
        This makes a number of currently failing tests pass.

        * WebKitTestRunner/TestController.cpp:
        (WTR::runBeforeUnloadConfirmPanel):
        (WTR::createOtherPage):
        (WTR::TestController::initialize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Adam Barth  <abarth@webkit.org>

        Removing this test from the Skipped list caused the next test
        alphabetically to fail instead.

        * platform/mac/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Trivial fix after r75682.

Rubber-stamped by David Levin.

* loader/FrameLoader.cpp: Remove accidentally committed debug code.
(WebCore::FrameLoader::shouldClose):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r74881.
        http://trac.webkit.org/changeset/74881
        https://bugs.webkit.org/show_bug.cgi?id=52357

        The EFL builder has been red for days (Requested by abarth on
        #webkit).

        * Scripts/webkitpy/common/net/buildbot/buildbot.py:
        * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Hayato Ito  <hayato@chromium.org>

        Unreviewed, chromium test expectations.

        Flaky expectations for html5lib/webkit-resumer.html.

        * platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/8858548> Disable inheritance of text emphasis marks to ruby text
https://bugs.webkit.org/show_bug.cgi?id=52359

Reviewed by Dave Hyatt.

Source/WebCore: 

Test: fast/ruby/text-emphasis.html

* css/html.css:
(rt):

LayoutTests: 

* fast/ruby/text-emphasis-expected.txt: Added.
* fast/ruby/text-emphasis.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Extend the Platform Plugin to support full screen video handler
        https://bugs.webkit.org/show_bug.cgi?id=51249

        Make MediaPlayerPrivateQt support a fullscreen player.

        No new tests because LayoutTests/media/media-fullscreen-inline.html already exists.
        However, this test failed for Qt (QtMediaPlayer) due to durationchange event getting fired twice.
        So, still skip it for Qt.

        * WebCore.pro:
        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
        (WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
        (WebCore::MediaPlayerPrivateQt::removeVideoItem):
        (WebCore::MediaPlayerPrivateQt::restoreVideoItem):
        * platform/graphics/qt/MediaPlayerPrivateQt.h:
        (WebCore::MediaPlayerPrivateQt::supportsFullscreen):
        (WebCore::MediaPlayerPrivateQt::mediaPlayer):
2011-01-13  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Extend the Platform Plugin to support full screen video handler
        https://bugs.webkit.org/show_bug.cgi?id=51249

        Add a new webkit platform plugin interface to support full screen video handler.

        * Api/qwebkitplatformplugin.h:
        (QWebFullScreenVideoHandler::QWebFullScreenVideoHandler):
        (QWebFullScreenVideoHandler::~QWebFullScreenVideoHandler):
        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::ChromeClientQt):
        (WebCore::ChromeClientQt::~ChromeClientQt):
        (WebCore::ChromeClientQt::fullScreenVideo):
        (WebCore::ChromeClientQt::supportsFullscreenForNode):
        (WebCore::ChromeClientQt::requiresFullscreenForVideoPlayback):
        (WebCore::ChromeClientQt::enterFullscreenForNode):
        (WebCore::ChromeClientQt::exitFullscreenForNode):
        * WebCoreSupport/ChromeClientQt.h:
        * WebCoreSupport/FullScreenVideoQt.cpp: Added.
        (WebCore::FullScreenVideoQt::FullScreenVideoQt):
        (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
        (WebCore::FullScreenVideoQt::enterFullScreenForNode):
        (WebCore::FullScreenVideoQt::exitFullScreenForNode):
        (WebCore::FullScreenVideoQt::aboutToClose):
        (WebCore::FullScreenVideoQt::mediaPlayer):
        (WebCore::FullScreenVideoQt::mediaPlayerForNode):
        (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
        * WebCoreSupport/FullScreenVideoQt.h: Added.
        (WebCore::FullScreenVideoQt::isValid):
        * WebCoreSupport/QtPlatformPlugin.cpp:
        (WebCore::QtPlatformPlugin::createFullScreenVideoHandler):
        * WebCoreSupport/QtPlatformPlugin.h:
        * examples/platformplugin/WebPlugin.cpp:
        (FullScreenVideoWidget::FullScreenVideoWidget):
        (FullScreenVideoWidget::event):
        (FullScreenVideoWidget::keyPressEvent):
        (FullScreenVideoHandler::FullScreenVideoHandler):
        (FullScreenVideoHandler::~FullScreenVideoHandler):
        (FullScreenVideoHandler::requiresFullScreenForVideoPlayback):
        (FullScreenVideoHandler::enterFullScreen):
        (FullScreenVideoHandler::exitFullScreen):
        (WebPlugin::supportsExtension):
        (WebPlugin::createExtension):
        * examples/platformplugin/WebPlugin.h:
        (FullScreenVideoWidget::~FullScreenVideoWidget):
        * examples/platformplugin/platformplugin.pro:
        * examples/platformplugin/qwebkitplatformplugin.h:
        (QWebFullScreenVideoHandler::QWebFullScreenVideoHandler):
        (QWebFullScreenVideoHandler::~QWebFullScreenVideoHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gavin Barraclough.

        JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
        https://bugs.webkit.org/show_bug.cgi?id=42756

        The FixedVMPool Allocator does not work well on systems where
        allocating very large amounts of memory upfront is not reasonable,
        like Linux without overcommit enabled. As a workaround, on Linux,
        default to the values used in embedded environments (in the MB
        range), and only jump to the GB range if we detect at runtime that
        overcommit is enabled. Should fix crashes on Linux/x86_64 with
        less than 3 or 4GB of RAM.

        * jit/ExecutableAllocatorFixedVMPool.cpp:
        (JSC::FixedVMPoolAllocator::free): use new variables for VM pool
        size and coalesce limit.
        (JSC::ExecutableAllocator::isValid): swap the variables from
        embedded to generic values at runtime, on linux, if overcommit is
        enabled.
        (JSC::ExecutableAllocator::underMemoryPressure): use new variables
        for VM pool size and coalesce limit.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Carlos Garcia Campos  <cgarcia@igalia.com>

        Reviewed by Xan Lopez.

        [GTK] Paint toggle buttons inconsistent when the object state is indeterminate
        https://bugs.webkit.org/show_bug.cgi?id=52361

        Check whether the object state is indeterminate to set the flag
        GTK_STATE_FLAG_INCONSISTENT before rendering check and radio
        buttons.

        * platform/gtk/RenderThemeGtk3.cpp:
        (WebCore::paintToggle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Eric Seidel.

        [Qt] Use a big central media play control button for video element
        https://bugs.webkit.org/show_bug.cgi?id=52315

        When ChromeClient::requiresFullscreenForVideoPlayback() returns true,
        all other control buttons for the video element are hidden, except
        a big centralized play button.

        No new tests because no client implements requiresFullscreenForVideoPlayback yet.

        * WebCore.pri:
        * css/mediaControlsQtFullscreen.css: Added.
        (audio):
        (audio::-webkit-media-controls-panel):
        (video::-webkit-media-controls-panel):
        (video:-webkit-full-page-media::-webkit-media-controls-panel):
        (audio::-webkit-media-controls-mute-button):
        (video::-webkit-media-controls-mute-button):
        (audio::-webkit-media-controls-play-button):
        (video::-webkit-media-controls-play-button):
        (audio::-webkit-media-controls-timeline-container):
        (video::-webkit-media-controls-timeline-container):
        (audio::-webkit-media-controls-current-time-display):
        (video::-webkit-media-controls-current-time-display):
        (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
        (audio::-webkit-media-controls-timeline):
        (video::-webkit-media-controls-timeline):
        (audio::-webkit-media-controls-volume-slider-container):
        (video::-webkit-media-controls-volume-slider-container):
        (audio::-webkit-media-controls-volume-slider):
        (video::-webkit-media-controls-volume-slider):
        (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
        (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
        (audio::-webkit-media-controls-fullscreen-button):
        (video::-webkit-media-controls-fullscreen-button):
        (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
        (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
        (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::extraMediaControlsStyleSheet):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Eric Seidel.

        [Qt] Use a black background color for the video element on Qt Mobile
        https://bugs.webkit.org/show_bug.cgi?id=52252

        Use black as the background color for the video element on Qt Mobile.

        * css/themeQtMobile.css:
        (video):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Need a way to inform the application when a Netscape plugin is created.
        https://bugs.webkit.org/show_bug.cgi?id=30179

        Added "c" style static method for the application to hook up for
        receiving notifications when a plugin is created.

        * plugins/symbian/PluginViewSymbian.cpp:
        (qtwebkit_setPluginCreatedCallback):
        (WebCore::PluginView::platformStart):
2011-01-13  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Need a way to inform the application when a Netscape plugin is created.
        https://bugs.webkit.org/show_bug.cgi?id=30179

        Added "c" style static method for the application to hook up for
        receiving notifications when a plugin is created.

        * symbian/bwins/QtWebKitu.def:
        * symbian/eabi/QtWebKitu.def:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Timothy Hatcher.

        Web Inspector: Cleanup after r75613 -- make all UI-facing strings
        to be passed directly to WebInspector.UIString

        https://bugs.webkit.org/show_bug.cgi?id=52365

        * English.lproj/localizedStrings.js:
        * inspector/front-end/ApplicationCacheItemsView.js:
        (WebInspector.ApplicationCacheItemsView.prototype._updateCallback):
        (WebInspector.ApplicationCacheItemsView.prototype._populateDataGrid):
        * inspector/front-end/AuditRules.js:
        (WebInspector.AuditRules.GzipRule.prototype.doRun):
        (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies):
        (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
        * inspector/front-end/BreakpointsSidebarPane.js:
        (WebInspector.EventListenerBreakpointsSidebarPane):
        (WebInspector.EventListenerBreakpointsSidebarPane.prototype._createCategory):
        * inspector/front-end/CookieItemsView.js:
        (WebInspector.CookieItemsView.prototype._updateWithCookies):
        * inspector/front-end/ImageView.js:
        (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
        (WebInspector.ImageView.prototype._createContentIfNeeded):
        * inspector/front-end/NetworkPanel.js:
        (WebInspector.NetworkTimeCalculator.prototype.formatValue):
        (WebInspector.NetworkTransferTimeCalculator.prototype.formatValue):
        (WebInspector.NetworkTransferDurationCalculator.prototype.formatValue):
        * inspector/front-end/ProfileDataGridTree.js:
        (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
        (WebInspector.ProfileDataGridNode.prototype.get data):
        * inspector/front-end/Resource.js:
        (WebInspector.Resource.Type.toUIString):
        (WebInspector.Resource.Type.toString):
        * inspector/front-end/TimelineOverviewPane.js:
        (WebInspector.TimelineOverviewCalculator.prototype.formatValue):
        * inspector/front-end/TimelinePanel.js:
        (WebInspector.TimelinePanel):
        (WebInspector.TimelineCalculator.prototype.formatValue):
        (WebInspector.TimelinePanel.FormattedRecord.prototype._generateAggregatedInfo):
        (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
        (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
        * inspector/front-end/utilities.js:
        ():
        * Scripts/check-inspector-strings:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-12  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: embed injected script into the backend.
        https://bugs.webkit.org/show_bug.cgi?id=52312

        InjectedScript belongs to the backend of the system and
        should be exposed by means of protocol, not InjectedScriptAccess.
        This patch makes injected script a part of the backend.
        It introduces single manual generation step (xxd -i) that should be
        automated by the build scripts for all the platforms.

        * CMakeLists.txt:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gyp/WebCore.gyp:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSInjectedScriptHostCustom.cpp:
        (WebCore::InjectedScriptHost::injectedScriptFor):
        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
        (WebCore::InjectedScriptHost::injectedScriptFor):
        * inspector/InjectedScriptHost.cpp:
        (WebCore::InjectedScriptHost::injectedScriptSource):
        * inspector/InjectedScriptHost.h:
        * inspector/Inspector.idl:
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::restoreInspectorStateFromCookie):
        * inspector/InspectorState.cpp:
        (WebCore::InspectorState::InspectorState):
        * inspector/InspectorState.h:
        * inspector/front-end/InjectedScript.js: Removed.
        * inspector/front-end/WebKit.qrc:
        * inspector/front-end/inspector.html:
        * inspector/front-end/inspector.js:
        (WebInspector.doLoadedDone.propertyNamesCallback):
        (WebInspector.doLoadedDone):
        * inspector/xxd.pl: Added.

2011-01-12  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: embed injected script into the backend.
        https://bugs.webkit.org/show_bug.cgi?id=52312

        * WebKit.grd:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Pavel Feldman  <pfeldman@chromium.org>

        Not reviewed: Qt build fix.

        * WebCore.pri:


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