webkit:qtwebkit.git
6 years ago2011-06-10 Darin Adler <darin@apple.com>
Darin Adler [Fri, 10 Jun 2011 17:05:31 +0000 (17:05 +0000)]
2011-06-10  Darin Adler  <darin@apple.com>

        Reviewed by Eric Carlson.

        REGRESSION: Fullscreen video controller can't be dragged
        https://bugs.webkit.org/show_bug.cgi?id=62462

        No regression test because we don't have machinery for testing the fullscreen
        mode. We may find a way to add this in the future.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlPanelElement::MediaControlPanelElement): Initialize new
        booleans related to dragging.
        (WebCore::MediaControlPanelElement::startDrag): Added. Starts drag if dragging
        is allowed and a drag isn't already in progress.
        (WebCore::MediaControlPanelElement::continueDrag): Added. Moves the window if
        dragging is already in progress.
        (WebCore::MediaControlPanelElement::endDrag): Added. Ends the capture that is
        done during the dragging process.
        (WebCore::MediaControlPanelElement::setPosition): Added. Positions the panel
        using explicit top/left.
        (WebCore::MediaControlPanelElement::resetPosition): Added. Removes the positioning
        done by setPosition.
        (WebCore::MediaControlPanelElement::defaultEventHandler): Added. Calls startDrag,
        continueDrag, and endDrag in response to mouse events.
        (WebCore::MediaControlPanelElement::setCanBeDragged): Added.
        * html/shadow/MediaControlElements.h: Added new function and data members
        as mentioned above.

        * html/shadow/MediaControlRootElement.cpp:
        (WebCore::MediaControlRootElement::enteredFullscreen): Call setCanBeDragged(true)
        so you can drag the panel while in fullscreen.
        (WebCore::MediaControlRootElement::exitedFullscreen): Call setCanBeDragged(false)
        so you can't drag the panel while not in fullscreen. Also call resetPosition so
        position changes from dragging don't affect the panel in other contexts.

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

6 years ago2011-06-24 Dimitri Glazkov <dglazkov@chromium.org>
Dimitri Glazkov [Sat, 25 Jun 2011 17:04:40 +0000 (17:04 +0000)]
2011-06-24  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        REGRESSION (r77740): Shadow DOM pseudo elements aren't matching when combined with descendant selectors
        https://bugs.webkit.org/show_bug.cgi?id=63373

        * fast/css/unknown-pseudo-element-matching-expected.txt: Updated results.
        * fast/css/unknown-pseudo-element-matching.html: Added more tests.
2011-06-24  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        REGRESSION (r77740): Shadow DOM pseudo elements aren't matching when combined with descendant selectors
        https://bugs.webkit.org/show_bug.cgi?id=63373

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::pushParentStackFrame): Changed to use parentOrHostElement.
        (WebCore::CSSStyleSelector::pushParent): Ditto.
        * dom/Node.cpp:
        (WebCore::Node::parentOrHostElement): Added.
        * dom/Node.h:

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

6 years ago Rubber-stamped by Maciej Stachowiak.
Alexey Proskuryakov [Sat, 25 Jun 2011 00:03:25 +0000 (00:03 +0000)]
    Rubber-stamped by Maciej Stachowiak.

        REGRESSION (r88984): Infinite recursion in DocumentLoader::detachFromFrame/stopLoading

        No new tests, as there is no known way to reproduce this (but we'll keep investigating, as
        the rollout will re-introduce the older less frequent crash).

        * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): Rollout the fix
        for bug 62764.

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

6 years ago2011-06-24 Alexis Menard <alexis.menard@openbossa.org>
Alexis Menard [Fri, 24 Jun 2011 20:54:58 +0000 (20:54 +0000)]
2011-06-24  Alexis Menard  <alexis.menard@openbossa.org>

        Unreviewed build fix.

        Build fix on Linux when using the GStreamer backend.

        No new tests, just a build fix.

        * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
        (FullScreenVideoWindow::keyPressEvent):

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

6 years ago2011-06-23 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Thu, 23 Jun 2011 18:30:55 +0000 (18:30 +0000)]
2011-06-23  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Adam Barth.

        Tests that we do not crash when doing a media query match.
        https://bugs.webkit.org/show_bug.cgi?id=63264

        * fast/css/media-query-evaluator-crash-expected.txt: Added.
        * fast/css/media-query-evaluator-crash.html: Added.
2011-06-23  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Adam Barth.

        RefPtr m_style in MediaQueryEvaluator in case of callers like
        MediaQueryMatcher::prepareEvaluator that do not retain its reference.
        https://bugs.webkit.org/show_bug.cgi?id=63264

        Test: fast/css/media-query-evaluator-crash.html

        * css/MediaQueryEvaluator.cpp:
        (WebCore::MediaQueryEvaluator::eval):
        * css/MediaQueryEvaluator.h:

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

6 years ago[Qt] Fix tst_QWebFrame::setHtmlWithResource() API test
Csaba Osztrogonác [Thu, 23 Jun 2011 12:48:37 +0000 (12:48 +0000)]
[Qt] Fix tst_QWebFrame::setHtmlWithResource() API test
https://bugs.webkit.org/show_bug.cgi?id=63235

Rubber-stamped by Andreas Kling.

[Qt] Fix tst_QWebFrame::renderGeometry() API test
https://bugs.webkit.org/show_bug.cgi?id=63236

[Qt] Fix tst_QWebFrame::setUrlWithPendingLoads() API test
https://bugs.webkit.org/show_bug.cgi?id=63237

* tests/qwebframe/tst_qwebframe.cpp: Mark failing test cases as expected fails until real fix.
(tst_QWebFrame::setHtmlWithResource):
(tst_QWebFrame::renderGeometry):

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

6 years ago[Qt] Fix tst_QWebPage::showModalDialog() API test
Csaba Osztrogonác [Thu, 23 Jun 2011 12:45:34 +0000 (12:45 +0000)]
[Qt] Fix tst_QWebPage::showModalDialog() API test
https://bugs.webkit.org/show_bug.cgi?id=63244

Rubber-stamped by Andreas Kling.

[Qt] Fix tst_QWebPage::testStopScheduledPageRefresh() API test
https://bugs.webkit.org/show_bug.cgi?id=63245

* tests/qwebpage/tst_qwebpage.cpp: Mark failing test cases as expected fails.
(tst_QWebPage::showModalDialog):
(tst_QWebPage::testStopScheduledPageRefresh):

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

6 years ago2011-06-22 Annie Sullivan <sullivan@chromium.org>
commit-queue [Wed, 22 Jun 2011 23:18:57 +0000 (23:18 +0000)]
2011-06-22  Annie Sullivan  <sullivan@chromium.org>

        Reviewed by Ryosuke Niwa.

        REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span
        https://bugs.webkit.org/show_bug.cgi?id=61594

        Adds two layout tests to verify that hitting enter in the middle of the span splits the span correctly
        and places the cursor in the correct position.

        * editing/inserting/return-key-before-br-in-span-expected.txt: Added.
        * editing/inserting/return-key-before-br-in-span.html: Added.
        * editing/inserting/return-key-middle-of-span-expected.txt: Added.
        * editing/inserting/return-key-middle-of-span.html: Added.
2011-06-22  Annie Sullivan  <sullivan@chromium.org>

        Reviewed by Ryosuke Niwa.

        REGRESSION: Hitting enter in the middle of this span causes the cursor to go to the end of the span
        https://bugs.webkit.org/show_bug.cgi?id=61594

        When the tree is split at the cursor in InsertParagraphSeparatorCommand, it is possible for the position
        split at to be at the end of a text node. The code assumes the position is at the start of the node, so
        pass the correct node into splitTreeToNode() in that case.

        Tests: editing/inserting/return-key-before-br-in-span.html
               editing/inserting/return-key-middle-of-span.html

        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):

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

6 years ago2011-05-24 Matthew Delaney <mdelaney@apple.com>
Matt Delaney [Tue, 24 May 2011 18:04:36 +0000 (18:04 +0000)]
2011-05-24  Matthew Delaney  <mdelaney@apple.com>

        Reviewed by Simon Fraser.

        Clamp coordinates to integers for canvas create/getImageData routines
        https://bugs.webkit.org/show_bug.cgi?id=61135

        * fast/canvas/canvas-getImageData-largeNonintegralDimensions-expected.txt: Added.
        * fast/canvas/canvas-getImageData-largeNonintegralDimensions.html: Added.
2011-05-24  Matthew Delaney  <mdelaney@apple.com>

        Reviewed by Simon Fraser.

        Clamp coordinates to integers for canvas create/getImageData routines
        https://bugs.webkit.org/show_bug.cgi?id=61135

        Test: fast/canvas/canvas-getImageData-largeNonintegralDimensions.html

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::convertLogicalToDevice): clamp to ints
        * html/canvas/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::createImageData):
        (WebCore::CanvasRenderingContext2D::getImageData):
        * platform/graphics/cg/ImageBufferDataCG.cpp:
        (WebCore::ImageBufferData::getData):

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

6 years ago2011-06-09 Adam Barth <abarth@webkit.org>
Adam Barth [Thu, 9 Jun 2011 08:41:56 +0000 (08:41 +0000)]
2011-06-09  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Running script from attach can remove elements from the stack of open elements
        https://bugs.webkit.org/show_bug.cgi?id=62160

        * fast/parser/document-write-onload-clear-expected.txt: Added.
        * fast/parser/document-write-onload-clear.html: Added.
2011-06-09  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Running script from attach can remove elements from the stack of open elements
        https://bugs.webkit.org/show_bug.cgi?id=62160

        When the tree build runs script synchronously, that script can remove
        arbitrary elements from the stack of open elements.  We need to hold a
        reference to |parent| in attach instead of rely upon the reference in
        the stack of open elements.

        Test: fast/parser/document-write-onload-clear.html

        * html/parser/HTMLConstructionSite.cpp:
        (WebCore::HTMLConstructionSite::attach):

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

6 years ago2011-06-09 Mike Lawther <mikelawther@chromium.org>
Mike Lawther [Thu, 9 Jun 2011 14:12:56 +0000 (14:12 +0000)]
2011-06-09  Mike Lawther  <mikelawther@chromium.org>

        Reviewed by Kent Tamura.

        Parsing issue with -webkit-calc
        https://bugs.webkit.org/show_bug.cgi?id=62276

        Set the CSSParserString for the calc functions.

        * css3/calc/regression-62276-expected.txt: Added.
        * css3/calc/regression-62276.html: Added.
2011-06-09  Mike Lawther  <mikelawther@chromium.org>

        Reviewed by Kent Tamura.

        Parsing issue with -webkit-calc
        https://bugs.webkit.org/show_bug.cgi?id=62276

        Set the CSSParserString for the calc functions.

        Test: css3/calc/regression-62276.html

        * css/CSSParser.cpp:
        (WebCore::CSSParser::lex):

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

6 years ago2011-06-23 Joe Wild <joseph.wild@nokia.com>
commit-queue [Thu, 23 Jun 2011 15:44:58 +0000 (15:44 +0000)]
2011-06-23  Joe Wild  <joseph.wild@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] Export files under Symbian Qt WebKit build
        https://bugs.webkit.org/show_bug.cgi?id=61207

        Export files for the Symbian platform as this is needed by the
        production build system.

        Janne Koskinen provided the suggestion to use target_predeps,
        which is an improvement over the originally suggested patch.

        * QtWebKit.pro:

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

6 years ago2011-06-23 Joe Wild <joseph.wild@nokia.com>
commit-queue [Thu, 23 Jun 2011 22:02:45 +0000 (22:02 +0000)]
2011-06-23  Joe Wild  <joseph.wild@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] The Qt WebKit Symbian .def file needs to be updated so Symbian will build
        https://bugs.webkit.org/show_bug.cgi?id=61200

        Revert r87060 as it broke compatibility with QtWebKit 2.1 release
        and add some newly introduce symbols.

        * symbian/eabi/QtWebKitu.def:

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

6 years ago2011-06-22 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
Ademar de Souza Reis Junior [Wed, 22 Jun 2011 18:57:04 +0000 (18:57 +0000)]
2011-06-22  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>

        Reviewed by Holger Freyther.

        [Qt] Fix Qt namespace on QDeclarativeWebView autotest
        https://bugs.webkit.org/show_bug.cgi?id=63147

        Applications (such as the test runner) are not supposed to be wrapped
        by {QT_BEGIN,QT_END}_NAMESPACE macros, otherwise building Qt (or
        QtWebKit) with a specific namespace won't work (will result in main
        being undefined).

        This was the only test wrapped by these macros, all others are fine.

        * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp: remove
        namespace macros.

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

6 years agoUnreviewed expectations update.
Csaba Osztrogonác [Fri, 6 May 2011 07:39:11 +0000 (07:39 +0000)]
Unreviewed expectations update.

* platform/mac-wk2/Skipped:
 - Add http/tests/navigation/response204.html because of missing layoutTestController.queueLoad()
* platform/qt-arm/Skipped:
 - Add fast/css/hover-update.html, because it fails intermittently.
 - Add failing http/tests/websocket/tests/frame-lengths.html and http/tests/websocket/tests/simple-stress.html.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling-expected.txt: Added.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling2-expected.txt: Added.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling3-expected.txt: Added.
* platform/qt-mac/fast/block/float/float-not-removed-from-next-sibling4-expected.txt: Added.
* platform/qt-wk2/Skipped:
 - Add new but failing test: editing/pasteboard/paste-placeholder-input.html

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

6 years ago2011-06-21 Yael Aharon <yael.aharon@nokia.com>
Yael Aharon [Tue, 21 Jun 2011 19:18:11 +0000 (19:18 +0000)]
2011-06-21  Yael Aharon  <yael.aharon@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] Regression(60942) wrong default action for drag-and-drop.
        https://bugs.webkit.org/show_bug.cgi?id=63004

        Added special handling for the case that dragOperation is not initialized.
        Save the last dropOperation and pass it to the dropEvent, so that it can
        be accepted by QDrag.
        Call event->accepted() and not event->acceptProposedAction(), because the
        later ignores the dropAction specified in JavaScript.

        Tested with the test page attached to https://bugs.webkit.org/show_bug.cgi?id=40401
        and did not see any issue.
        Also manually tested all combinations of LayoutTests/fast/events/drag-and-drop.html
        and they all pass.

        * Api/qwebpage.cpp:
        (dropActionToDragOp):
        (QWebPagePrivate::dragMoveEvent):
        (QWebPagePrivate::dropEvent):

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

6 years ago2011-06-20 Oliver Hunt <oliver@apple.com>
Oliver Hunt [Mon, 20 Jun 2011 19:46:23 +0000 (19:46 +0000)]
2011-06-20  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin Adler.

        REGRESSION (r79060): Searching for a flight at united.com fails
        https://bugs.webkit.org/show_bug.cgi?id=63003

        Roll out tests that were added by the patch we're rolling out, and add
        a test for the united.com Date.

        * fast/js/date-parse-test-expected.txt:
        * fast/js/script-tests/date-parse-test.js:
2011-06-20  Oliver Hunt  <oliver@apple.com>

        Reviewed by Darin Adler.

        REGRESSION (r79060): Searching for a flight at united.com fails
        https://bugs.webkit.org/show_bug.cgi?id=63003

        This original change also broke Twitter, and we attempted to refine the fix to
        address that problem (http://trac.webkit.org/changeset/80542), but since it still breaks United,
        we need to revert the change until we understand the problem better.

        * wtf/DateMath.cpp:
        (WTF::parseDateFromNullTerminatedCharacters):

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

6 years ago2011-06-20 Adam Barth <abarth@webkit.org>
Adam Barth [Mon, 20 Jun 2011 17:51:40 +0000 (17:51 +0000)]
2011-06-20  Adam Barth  <abarth@webkit.org>

        Reviewed by Alexey Proskuryakov.

        ASSERT in WebCore::HTMLToken::appendToAttributeName when visiting www.nba.com
        https://bugs.webkit.org/show_bug.cgi?id=61774

        * fast/parser/attributes-on-close-script-expected.txt: Added.
        * fast/parser/attributes-on-close-script.html: Added.
2011-06-20  Adam Barth  <abarth@webkit.org>

        Reviewed by Alexey Proskuryakov.

        ASSERT in WebCore::HTMLToken::appendToAttributeName when visiting www.nba.com
        https://bugs.webkit.org/show_bug.cgi?id=61774

        This ASSERT triggers for the same underlying issue that causes
        Bug 62971: When we tokenize a </script> tag, we don't realize that
        we've already consumed the "</script>" from the input stream when we
        extracted the previous token.  That causes the source tracker to be
        out-of-sync, triggering the incorrect view-source highlighting and this
        ASSERT.

        For now, let's just silence the assert while we work on Bug 62971.

        Test: fast/parser/attributes-on-close-script.html

        * html/parser/HTMLToken.h:
        (WebCore::HTMLToken::appendToAttributeName):
        (WebCore::AtomicHTMLToken::initializeAttributes):

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

6 years ago2011-06-16 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Thu, 16 Jun 2011 21:27:30 +0000 (21:27 +0000)]
2011-06-16  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Adam Barth.

        RefPtr frame since it can get removed in
        FrameLoader::finishedParsing.
        https://bugs.webkit.org/show_bug.cgi?id=62812

        Tests: already tested by fast/parser/document-write-into-initial-document.html.

        * dom/Document.cpp:
        (WebCore::Document::finishedParsing):

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

6 years ago2011-06-07 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Tue, 7 Jun 2011 22:45:14 +0000 (22:45 +0000)]
2011-06-07  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dan Bernstein.

        Replicate WidthIterator.cpp fix from r88139.
        https://bugs.webkit.org/show_bug.cgi?id=62238

        No new tests. Covered by existing layout tests on XP debug bots.

        * platform/graphics/win/UniscribeController.cpp:
        (WebCore::UniscribeController::advance):

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

6 years ago2011-06-01 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Thu, 2 Jun 2011 02:49:37 +0000 (02:49 +0000)]
2011-06-01  Abhishek Arya  <inferno@chromium.org>

        Unreviewed.

        Coding style nit. Move ec=0 initialization, change
        recommended by Alexey in bug.
        https://bugs.webkit.org/show_bug.cgi?id=60831

        * dom/Document.cpp:
        (WebCore::Document::setBody):

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

6 years ago2011-06-01 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Wed, 1 Jun 2011 23:13:53 +0000 (23:13 +0000)]
2011-06-01  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Fix setting of document.body
        https://bugs.webkit.org/show_bug.cgi?id=60831

        1. Only allowing setting to an element if it has a body tag.
        2. If element is from another document, import it.

        Test: fast/dom/document-set-body.html

        * dom/Document.cpp:
        (WebCore::Document::setBody):
2011-06-01  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Tests setting document.body to non body elements, elements in other
        documents.
        https://bugs.webkit.org/show_bug.cgi?id=60831

        * fast/dom/document-set-body-expected.txt: Added.
        * fast/dom/document-set-body.html: Added.

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

6 years ago2011-06-01 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Wed, 1 Jun 2011 18:12:53 +0000 (18:12 +0000)]
2011-06-01  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Antti Koivisto.

        Do not use the pushed style selector if it is not equal to the
        parent document's style selector. It usually means that it is
        in a bad state, e.g. already cleared.
        https://bugs.webkit.org/show_bug.cgi?id=61737

        * dom/Element.cpp:
        (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):

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

6 years ago2011-05-08 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Mon, 9 May 2011 16:32:26 +0000 (16:32 +0000)]
2011-05-08  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dave Hyatt.

        Add a crash test for r85964.
        https://bugs.webkit.org/show_bug.cgi?id=59473

        * fast/block/positioning/removing-inside-relpositioned-inline-crash-expected.txt: Added.
        * fast/block/positioning/removing-inside-relpositioned-inline-crash.html: Added.

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

6 years ago2011-05-05 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Thu, 5 May 2011 21:42:59 +0000 (21:42 +0000)]
2011-05-05  Abhishek Arya  <inferno@chromium.org>

        Unreviewed.

        Minor rebaselines for qt after my r85876.

        * platform/qt/fast/block/float/float-not-removed-from-next-sibling-expected.txt: Added.
        * platform/qt/fast/block/float/float-not-removed-from-next-sibling2-expected.txt: Added.
        * platform/qt/fast/block/float/float-not-removed-from-next-sibling3-expected.txt: Added.
        * platform/qt/fast/block/float/float-not-removed-from-next-sibling4-expected.txt: Added.

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

6 years ago2011-06-17 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Fri, 17 Jun 2011 20:19:10 +0000 (20:19 +0000)]
2011-06-17  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dave Hyatt.

        Tests that we do not crash when unable to remove floats from
        parent's next siblings blocks.
        https://bugs.webkit.org/show_bug.cgi?id=62875

        * fast/block/float/float-not-removed-from-next-sibling5-expected.txt: Added.
        * fast/block/float/float-not-removed-from-next-sibling5.html: Added.
2011-06-17  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dave Hyatt.

        When we lose ability to propagate floats, need to find topmost
        parent with that overhanging float, and then iterate over its
        sibling blocks to remove the float.
        https://bugs.webkit.org/show_bug.cgi?id=62875

        Test: fast/block/float/float-not-removed-from-next-sibling5.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::styleDidChange):
        (WebCore::RenderBlock::hasOverhangingFloat):
        * rendering/RenderBlock.h:

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

6 years ago2011-05-10 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Tue, 10 May 2011 16:40:35 +0000 (16:40 +0000)]
2011-05-10  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Add containsFloats call to hasOverhangingFloats.
        https://bugs.webkit.org/show_bug.cgi?id=60537

        Test: fast/block/float/no-overhanging-float-crash.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::repaintOverhangingFloats):
        * rendering/RenderBlock.h:
        (WebCore::RenderBlock::hasOverhangingFloats):
2011-05-10  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Tests that we do not crash due to wrong result from
        hasOverhangingFloats.
        https://bugs.webkit.org/show_bug.cgi?id=60537

        * fast/block/float/no-overhanging-float-crash-expected.txt: Added.
        * fast/block/float/no-overhanging-float-crash.html: Added.

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

6 years ago2011-05-05 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Thu, 5 May 2011 21:07:52 +0000 (21:07 +0000)]
2011-05-05  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dave Hyatt.

        When style changes for a RenderBlock and we lose our ability to intrude into
        floats in the next siblings block (e.g a position change), make sure to mark
        our childs with floats for layout and iterate through our next sibling block
        chain to see which ones contain the float that also exists in our floating
        objects list and clear those using markAllDescendantsWithFloatsForLayout.
        https://bugs.webkit.org/show_bug.cgi?id=56299

        Tests: fast/block/float/float-not-removed-from-next-sibling-crash.html
               fast/block/float/float-not-removed-from-next-sibling.html
               fast/block/float/float-not-removed-from-next-sibling2.html
               fast/block/float/float-not-removed-from-next-sibling3.html
               fast/block/float/float-not-removed-from-next-sibling4.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::styleWillChange):
        (WebCore::RenderBlock::styleDidChange):
        (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
        * rendering/RenderBlock.h:
2011-05-04  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dave Hyatt.

        Tests that we do not crash when trying to add overflow from a float not in the
        descendant list and whose renderer is already removed.
        https://bugs.webkit.org/show_bug.cgi?id=56299

        * fast/block/float/float-not-removed-from-next-sibling-crash-expected.txt: Added.
        * fast/block/float/float-not-removed-from-next-sibling-crash.html: Added.
        * fast/block/float/float-not-removed-from-next-sibling.html: Added. Black
        text boxes should be inside the silver float. Failing test will have float
        added to the text div block which will push the text downward.
        * fast/block/float/float-not-removed-from-next-sibling-expected.png: Added.
        * fast/block/float/float-not-removed-from-next-sibling-expected.txt: Added.
        * fast/block/float/float-not-removed-from-next-sibling2.html: Added. Black
        text boxes should be inside the silver float. Failing test will have float
        added to the text div block which will push the text downward.
        * fast/block/float/float-not-removed-from-next-sibling2-expected.png: Added.
        * fast/block/float/float-not-removed-from-next-sibling2-expected.txt: Added.
        * fast/block/float/float-not-removed-from-next-sibling3.html: Added. Distance
        between the silver float and black text boxes should be less than height of
        silver float. Failing test will have float overflow added to the text div
        block which will cause large space between silver float and and black text boxes.
        * fast/block/float/float-not-removed-from-next-sibling3-expected.png: Added.
        * fast/block/float/float-not-removed-from-next-sibling3-expected.txt: Added.
        * fast/block/float/float-not-removed-from-next-sibling4.html: Added. Distance
        between the silver float and black text boxes should be less than height of
        silver float. Failing test will have float overflow added to the text div
        block which will cause large space between silver float and and black text boxes.
        * fast/block/float/float-not-removed-from-next-sibling4-expected.png: Added.
        * fast/block/float/float-not-removed-from-next-sibling4-expected.txt: Added.

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

6 years agonew test introduced in r89118, but fail on Qt
Ademar de Souza Reis Jr [Tue, 21 Jun 2011 17:13:07 +0000 (14:13 -0300)]
new test introduced in r89118, but fail on Qt
https://bugs.webkit.org/show_bug.cgi?id=62847

* platform/qt/Skipped: Skip fast/parser/xhtml-innerhtml-null-byte.xhtml.

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

Conflicts:

LayoutTests/platform/qt/Skipped

6 years ago2011-06-16 Gabor Loki <loki@webkit.org>
Gabor Loki [Fri, 17 Jun 2011 06:56:00 +0000 (06:56 +0000)]
2011-06-16 Gabor Loki <loki@webkit.org>

        [Qt] Unreviewed, build fix after r89118.

        * dom/XMLDocumentParserQt.cpp:
        (WebCore::XMLDocumentParser::initializeParserContext):

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

6 years ago2011-06-16 Jeffrey Pfau <jpfau@apple.com>
commit-queue [Fri, 17 Jun 2011 05:54:14 +0000 (05:54 +0000)]
2011-06-16  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by Alexey Proskuryakov.

        Using null bytes when setting innerHTML in XTHML results in assertion and a crash due to null-pointer dereference
        https://bugs.webkit.org/show_bug.cgi?id=61053

        Added test cases covering two cases of using innerHTML with null bytes in XHTML.

        * fast/parser/xhtml-innerhtml-null-byte-expected.txt: Added.
        * fast/parser/xhtml-innerhtml-null-byte-first-expected.txt: Added.
        * fast/parser/xhtml-innerhtml-null-byte-first.xhtml: Added.
        * fast/parser/xhtml-innerhtml-null-byte.xhtml: Added.
2011-06-16  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by Alexey Proskuryakov.

        Using null bytes when setting innerHTML in XTHML results in assertion and a crash due to null-pointer dereference
        https://bugs.webkit.org/show_bug.cgi?id=61053

        XML parsing in-memory XML chunks now passes around a string object instead of a C string, ensuring null characters are properly handled.

        Tests: fast/parser/xhtml-innerhtml-null-byte-first.xhtml
               fast/parser/xhtml-innerhtml-null-byte.xhtml

        * dom/XMLDocumentParser.h:
        * dom/XMLDocumentParserLibxml2.cpp:
        (WebCore::XMLParserContext::createMemoryParser):
        (WebCore::XMLDocumentParser::initializeParserContext):
        (WebCore::XMLDocumentParser::appendFragmentSource):

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

6 years ago2011-06-15 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Thu, 16 Jun 2011 01:09:05 +0000 (01:09 +0000)]
2011-06-15  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Antti Koivisto.

        Tests that accessing the parent stylesheet in nodes (not in document)
        do not result in crash when document is cleared.
        https://bugs.webkit.org/show_bug.cgi?id=62586

        * fast/dom/body-clone-link-decl-parent-crash-expected.txt: Added.
        * fast/dom/body-clone-link-decl-parent-crash.html: Added.
        * fast/dom/styled-clone-inline-style-decl-parent-crash-expected.txt: Added.
        * fast/dom/styled-clone-inline-style-decl-parent-crash.html: Added.
        * fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash-expected.txt: Added.
        * fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html: Added.
2011-06-15  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Antti Koivisto.

        Revert speculative fix in r84151. It caused some issues with
        stylesheet lifetimes.
        https://bugs.webkit.org/show_bug.cgi?id=62586

        Tests: fast/dom/body-clone-link-decl-parent-crash.html
               fast/dom/styled-clone-inline-style-decl-parent-crash.html
               fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html

        * dom/Document.cpp:
        (WebCore::Document::removedLastRef):

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

6 years ago2011-06-15 Sam Weinig <sam@webkit.org>
Sam Weinig [Thu, 16 Jun 2011 00:12:12 +0000 (00:12 +0000)]
2011-06-15  Sam Weinig  <sam@webkit.org>

        Reviewed by Alexey Proskuryakov.

        Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
        https://bugs.webkit.org/show_bug.cgi?id=62764

        This is an non-reproducible high volume crash, so no test :(.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::detachFromFrame):
        Be conservative and stop loading when we detach a document loader from a frame.

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

6 years ago2011-06-14 Jeffrey Pfau <jpfau@apple.com>
Ademar de Souza Reis Jr [Tue, 21 Jun 2011 16:55:41 +0000 (13:55 -0300)]
2011-06-14  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by David Hyatt.

        Null dereference in WebCore::RenderBlock::splitFlow regarding use of multicol, inline-block, and spanning elements
        https://bugs.webkit.org/show_bug.cgi?id=60028

        Added test for spanning elements within an inline-block child of a multicol element.

        * fast/multicol/span/span-as-nested-inline-block-child.html: Added.
        * platform/chromium/test_expectations.txt:
        * platform/mac/fast/multicol/span/span-as-nested-inline-block-child-expected.png: Added.
        * platform/mac/fast/multicol/span/span-as-nested-inline-block-child-expected.txt: Added.
2011-06-14  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by David Hyatt.

        Null dereference in WebCore::RenderBlock::splitFlow regarding use of multicol, inline-block, and spanning elements
        https://bugs.webkit.org/show_bug.cgi?id=60028

        Ensure that the parent block of a spanning element, if it is not itself
        a multicol element, is not inline.

        Test: fast/multicol/span/span-as-nested-inline-block-child.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::columnsBlockForSpanningElement):

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

Conflicts:

LayoutTests/platform/chromium/test_expectations.txt

6 years ago2011-06-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
Ademar de Souza Reis Jr [Tue, 21 Jun 2011 16:22:37 +0000 (13:22 -0300)]
2011-06-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] [Symbian] GraphicsLayer: support plugins on symbian
        https://bugs.webkit.org/show_bug.cgi?id=57418

        Implement graphics layer for plugins on Symbian.

        * plugins/PluginView.h:
        * plugins/qt/PluginViewQt.cpp:
        (WebCore::PluginView::shouldUseAcceleratedCompositing):
        (WebCore::PluginView::platformStart):
        * plugins/symbian/PluginViewSymbian.cpp:
        (WebCore::PluginGraphicsLayerQt::PluginGraphicsLayerQt):
        (WebCore::PluginGraphicsLayerQt::~PluginGraphicsLayerQt):
        (WebCore::PluginGraphicsLayerQt::paint):
        (WebCore::PluginView::shouldUseAcceleratedCompositing):
        (WebCore::PluginView::paint):
        (WebCore::PluginView::invalidateRect):
        (WebCore::PluginView::platformStart):
        (WebCore::PluginView::platformLayer):

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

Conflicts:

Source/WebCore/plugins/qt/PluginViewQt.cpp

6 years ago2011-06-16 Sheriff Bot <webkit.review.bot@gmail.com> qtwebkit-2.2-week24
commit-queue [Thu, 16 Jun 2011 08:50:21 +0000 (08:50 +0000)]
2011-06-16  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r88796.
        http://trac.webkit.org/changeset/88796
        https://bugs.webkit.org/show_bug.cgi?id=62790

        It made fast/dom/nodesFromRect-basic.html time out on Qt,
        64-bit, debug mode (Requested by Ossy on #webkit).

        * bridge/qt/qt_runtime.cpp:
        (JSC::Bindings::convertValueToQVariant):
2011-06-16  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r88796.
        http://trac.webkit.org/changeset/88796
        https://bugs.webkit.org/show_bug.cgi?id=62790

        It made fast/dom/nodesFromRect-basic.html time out on Qt,
        64-bit, debug mode (Requested by Ossy on #webkit).

        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
        (DumpRenderTreeSupportQt::plainText):
        (DumpRenderTreeSupportQt::nodesFromRect):
        * WebCoreSupport/DumpRenderTreeSupportQt.h:
        * tests/qwebframe/tst_qwebframe.cpp:
        (tst_QWebFrame::overloadedSlots):
        (tst_QWebFrame::domCycles):
2011-06-16  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r88796.
        http://trac.webkit.org/changeset/88796
        https://bugs.webkit.org/show_bug.cgi?id=62790

        It made fast/dom/nodesFromRect-basic.html time out on Qt,
        64-bit, debug mode (Requested by Ossy on #webkit).

        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        (LayoutTestController::nodesFromRect):
        * DumpRenderTree/qt/LayoutTestControllerQt.h:
        * DumpRenderTree/qt/PlainTextControllerQt.cpp:
        (PlainTextController::plainText):
        * DumpRenderTree/qt/PlainTextControllerQt.h:

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

6 years ago2011-06-17 Alexis Menard <alexis.menard@openbossa.org>
Alexis Menard [Fri, 17 Jun 2011 15:08:09 +0000 (15:08 +0000)]
2011-06-17  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] Fix wrong framework generation on MacOS when inside Qt 4.8.
        https://bugs.webkit.org/show_bug.cgi?id=62815

        Partially revert r85870 which assumed that QtWebKit will never be build inside Qt
        anymore. Everything inside !QTDIR_build condition is not needed in the Qt tree because
        qbase.pri is doing the job for us, i.e. using includes generated by syncqt to
        setup the mac framework. It also use a correct QMAKE_LFLAGS_SONAME making possible
        to actually run an application linked against QtWebKit.

        * QtWebKit.pro:

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

6 years ago2011-06-15 Diego Gonzalez <diegohcg@webkit.org>
Diego Gonzalez [Wed, 15 Jun 2011 15:08:23 +0000 (15:08 +0000)]
2011-06-15  Diego Gonzalez  <diegohcg@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Inconsistent behavior on a form submit request...
        https://bugs.webkit.org/show_bug.cgi?id=45523

        The inconsistency occurs when a form submission requests a new window.
        Two windows are opened (instead of only one) and the first window is opened
        as a blank page.

        By default each page is put into their own unique page group, which affects popup windows
        and visited links. Page groups (per process only) is a feature making it possible to use
        separate settings for each group, so that for instance an integrated browser/email reader
        can use different settings for displaying HTML pages and HTML email. To make QtWebKit work
        as expected out of the box, we use a default group similar to what other ports are doing.

        * Api/qwebpage.cpp:

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

6 years ago2011-06-14 Andreas Kling <kling@webkit.org>
Andreas Kling [Tue, 14 Jun 2011 13:42:40 +0000 (13:42 +0000)]
2011-06-14  Andreas Kling  <kling@webkit.org>

        Reviewed by Benjamin Poulain.

        [Qt] Don't include convenience "QWebFoo" headers in WebKit code.
        https://bugs.webkit.org/show_bug.cgi?id=62632

        * WebCoreSupport/FrameNetworkingContextQt.cpp:

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

6 years ago2011-06-13 Jeffrey Pfau <jpfau@apple.com>
commit-queue [Mon, 13 Jun 2011 23:20:47 +0000 (23:20 +0000)]
2011-06-13  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by Darin Adler.

        Crash in WebCore::RenderMathMLUnderOver::layout()
        https://bugs.webkit.org/show_bug.cgi?id=57900

        Added a test that tries to remove the children of munder, mover and munderover elements.

        * mathml/munderover-remove-children-expected.txt: Added.
        * mathml/munderover-remove-children.html: Added.
2011-06-13  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by Darin Adler.

        Crash in WebCore::RenderMathMLUnderOver::layout()
        https://bugs.webkit.org/show_bug.cgi?id=57900

        Add more null checks so that removing children in MathML elements does not cause crashes.
        Note that this only half fixes the third repro in the Bugzilla bug, as another bug will
        still crash that repro.

        Test: mathml/munderover-remove-children.html

        * rendering/mathml/RenderMathMLSubSup.cpp:
        (WebCore::RenderMathMLSubSup::stretchToHeight):
        * rendering/mathml/RenderMathMLUnderOver.cpp:
        (WebCore::RenderMathMLUnderOver::layout):
        (WebCore::RenderMathMLUnderOver::nonOperatorHeight):

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

6 years ago2011-06-13 Ryosuke Niwa <rniwa@webkit.org>
Ryosuke Niwa [Mon, 13 Jun 2011 20:46:24 +0000 (20:46 +0000)]
2011-06-13  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Dan Bernstein.

        REGRESSION (r81518): Crash in makeRange() when invoking the dictionary panel over a file input
        https://bugs.webkit.org/show_bug.cgi?id=62544

        Fixed the crash by adding null pointer checks.

        No new tests since there's no way to open dictionary panel.

        * dom/Position.cpp:
        (WebCore::Position::parentAnchoredEquivalent):
        * editing/VisiblePosition.cpp:
        (WebCore::makeRange):
        * page/Frame.cpp:
        (WebCore::Frame::rangeForPoint):

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

6 years ago2011-06-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Ademar de Souza Reis Jr [Tue, 14 Jun 2011 14:32:55 +0000 (11:32 -0300)]
2011-06-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] tst_QWebFrame::overloadedSlots() fails
        https://bugs.webkit.org/show_bug.cgi?id=37319

        Increase the likeness that JSElements are converted to QWebElements. When hinted
        with QWebElement metatype, we qualify the conversion from JSElement as a "perfect
        match".

        The test was failing because the wrong slot was called, since the QWebElement
        match was taken as equal to the others and not chosen when the metacall happened.

        We also remove the implicit conversion between JSDocument (which is not an
        element) to QWebElement. The conversion only worked for calling slots, while
        without hint it returned a QVariantMap (as can be seen in domCycles test). It was
        added for supporting DRT, but since this change we can use it as QVariantMap and
        get the value for "documentElement".

        This patch is based on Noam Rosenthal original patch in the same bug.

        * bridge/qt/qt_runtime.cpp:
        (JSC::Bindings::hintForRealType):
        Extracted function to choose the metatype hint based on the JSValue type.  Add
        QWebElement metatype as a hint for JSElement objects, this way if no hint is
        provided, JSElement objects will always be converted to QWebElements.

        (JSC::Bindings::convertValueToQVariant):
        Use previous function. Identify the conversion between JSElement to QWebElement
        as a "perfect match" (dist = 0). And remove the implicit conversion when the hint
        is QWebElement metatype and we have a JSDocument.  Changed from JSHTMLElement to
        JSElement to cover the 'documentElement'.
2011-06-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] tst_QWebFrame::overloadedSlots() fails
        https://bugs.webkit.org/show_bug.cgi?id=37319

        Since the implicit conversion was removed, change support functions of DRT to
        expect a QVariantMap instead of a QWebElement. This matches the exposed function
        in the controller, which takes 'document' and not 'document.documentElement'.

        And now that Element -> QWebElement is a perfect match, we must use QWebElement
        instead of QVariantMap, like in plainText().

        * WebCoreSupport/DumpRenderTreeSupportQt.h:
        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
        (DumpRenderTreeSupportQt::plainText): Fix to use QWebElement instead of
        QVariantMap when getting the startContainer. Also use QVariantMap directly,
        bridge will do conversion for us now.

        (getCoreDocumentFromVariantMap): Extracts the WebCore::Document* from the
        QVariantMap that Qt bridge gives us when 'document' is passed from JS.

        (DumpRenderTreeSupportQt::nodesFromRect): Use helper function.

        * tests/qwebframe/tst_qwebframe.cpp: Splitted the test domCycles() into two
        different tests. In practice, the original test just checked whether we could
        create a QVariantMap representing 'document' without infinite looping due to
        cycles in the DOM. This was more evident before since we haven't a conversion
        from JSElement to QWebElement, but from JSElement to QVariantMap.

        (tst_QWebFrame::documentHasDocumentElement): Evaluates 'document' and extracts
        'documentElement' from it. Compares to QWebFrame::documentElement().

        (tst_QWebFrame::documentAllHasDocumentElement): Look inside 'document.all' for
        the documentElement.

        (tst_QWebFrame::overloadedSlots): Remove expected failure and fix wrong comment.
2011-06-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] tst_QWebFrame::overloadedSlots() fails
        https://bugs.webkit.org/show_bug.cgi?id=37319

        Since we don't implictly convert 'document' object to QWebElement
        in metacalls anymore, change the controller to expect QVariantMap instead.

        The method plainText() was updated to use QVariantMap as well to let the bridge
        do the conversion directly for us.

        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        (LayoutTestController::nodesFromRect):
        * DumpRenderTree/qt/LayoutTestControllerQt.h:
        * DumpRenderTree/qt/PlainTextControllerQt.cpp:
        (PlainTextController::plainText):
        * DumpRenderTree/qt/PlainTextControllerQt.h:

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

Conflicts:

Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

6 years ago<rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to displ... qtwebkit-2.2-week23
Dan Bernstein [Sun, 12 Jun 2011 18:27:00 +0000 (18:27 +0000)]
<rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to display:none transition has complexity N^2 where N is the number of child Text nodes
https://bugs.webkit.org/show_bug.cgi?id=61557

Reviewed by Darin Adler.

Replaced the fix for bug 58500 with a refined version.

* rendering/RenderText.cpp:
(WebCore::RenderText::clippedOverflowRectForRepaint): Use the containing block unless it is
across a layer boundary.

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

6 years ago2011-06-10 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Sat, 11 Jun 2011 16:37:59 +0000 (16:37 +0000)]
2011-06-10  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Null parent element sheet pointers in CSSMutableStyleDeclaration consumers
        when removed from document, set them when reinserted into document.
        https://bugs.webkit.org/show_bug.cgi?id=62230

        When a HTMLBodyElement, StyledElement are removed from document,
        we didn't clear out the parent pointers from their link, style declarations.
        These parent pointers pointed to the document's element sheet which will
        get removed when document is getting destroyed. It does make sense to
        clear out parent pointers when we are getting removed from document and
        readd them when we get inserted again.

        Tests: fast/dom/body-link-decl-parent-crash.html
               fast/dom/styled-inline-style-decl-parent-crash.html

        * dom/StyledElement.cpp:
        (WebCore::StyledElement::insertedIntoDocument):
        (WebCore::StyledElement::removedFromDocument):
        * dom/StyledElement.h:
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::parseMappedAttribute):
        (WebCore::HTMLBodyElement::insertedIntoDocument):
        (WebCore::HTMLBodyElement::removedFromDocument):
        (WebCore::HTMLBodyElement::didMoveToNewOwnerDocument):
        * html/HTMLBodyElement.h:
2011-06-10  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Tests that accessing the parent element sheet of an inline style, link
        declaration of styled, body elements which are removed from document,
        does not result in crash.
        https://bugs.webkit.org/show_bug.cgi?id=62230

        * fast/dom/body-link-decl-parent-crash-expected.txt: Added.
        * fast/dom/body-link-decl-parent-crash.html: Added.
        * fast/dom/styled-inline-style-decl-parent-crash-expected.txt: Added.
        * fast/dom/styled-inline-style-decl-parent-crash.html: Added.

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

6 years ago2011-06-10 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Fri, 10 Jun 2011 17:31:29 +0000 (17:31 +0000)]
2011-06-10  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Tony Gentilcore.

        Tests that trying to remove all document children while building a svg <use>
        element shadow and instance tree does not result in crash.
        https://bugs.webkit.org/show_bug.cgi?id=62225

        * svg/dom/use-style-recalc-script-execute-crash-expected.txt: Added.
        * svg/dom/use-style-recalc-script-execute-crash.html: Added.
2011-06-10  James Simonsen  <simonjam@chromium.org>

        Reviewed by Tony Gentilcore.

        Don't execute scripts in shadow SVG.
        https://bugs.webkit.org/show_bug.cgi?id=62225

        Test: svg/dom/use-style-recalc-script-execute-crash.html

        * dom/ScriptElement.cpp:
        (WebCore::ScriptElement::prepareScript):

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

6 years agoCalling WebKitBlobBuilder.append with null argument should not crash
Jian Li [Fri, 10 Jun 2011 01:09:11 +0000 (01:09 +0000)]
Calling WebKitBlobBuilder.append with null argument should not crash
https://bugs.webkit.org/show_bug.cgi?id=62419

Reviewed by David Levin.

Source/WebCore:

Test: fast/files/blob-builder-crash.html

* fileapi/WebKitBlobBuilder.cpp:
(WebCore::WebKitBlobBuilder::append):

LayoutTests:

* fast/files/blob-builder-crash-expected.txt: Added.
* fast/files/blob-builder-crash.html: Added.

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

6 years agoBug 62405 - Fix integer overflow in Array.prototype.push
Gavin Barraclough [Fri, 10 Jun 2011 00:30:21 +0000 (00:30 +0000)]
Bug 62405 - Fix integer overflow in Array.prototype.push

Reviewed by Geoff Garen.

Fix geoff's review comments re static_cast.

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncPush):

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

6 years agoBug 62405 - Fix integer overflow in Array.prototype.push
Gavin Barraclough [Thu, 9 Jun 2011 23:46:54 +0000 (23:46 +0000)]
Bug 62405 - Fix integer overflow in Array.prototype.push

Reviewed by Oliver Hunt.

There are three integer overflows here, leading to safe (not a security risk)
but incorrect (non-spec-compliant) behaviour.

Two overflows occur when calculating the new length after pushing (one in the
fast version of push in JSArray, one in the generic version in ArrayPrototype).
The other occurs calculating indices to write to when multiple items are pushed.

These errors result in three test-262 failures.

Source/JavaScriptCore:

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncPush):
* runtime/JSArray.cpp:
(JSC::JSArray::put):
(JSC::JSArray::push):

LayoutTests:

* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.7_Array_prototype_push/S15.4.4.7_A3-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.7_Array_prototype_push/S15.4.4.7_A4_T2-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.7_Array_prototype_push/S15.4.4.7_A4_T3-expected.txt:

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

6 years ago2011-06-09 Julien Chaffraix <jchaffraix@codeaurora.org>
commit-queue [Thu, 9 Jun 2011 20:33:20 +0000 (20:33 +0000)]
2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>

        Reviewed by Antti Koivisto.

        REGRESSION(84329): Stylesheets on some pages do not load
        https://bugs.webkit.org/show_bug.cgi?id=61400

        Adding test to cover the regression. The test actually uncovered
        a bug in the way we handle alternate stylesheet and thus is
        failing some parts.

        * fast/css/link-disabled-attr-expected.txt: Added.
        * fast/css/link-disabled-attr.html: Added.
2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>

        Reviewed by Antti Koivisto.

        REGRESSION(84329): Stylesheets on some pages do not load
        https://bugs.webkit.org/show_bug.cgi?id=61400

        Test: fast/css/link-disabled-attr.html

        Fixed r84329: the change did not take into account the fact
        that HTMLLinkElement did already contain the disabled information
        and the 2 information were not linked as they should have!

        The new logic pushes the information to the stylesheet as this
        is what the spec mandates and what FF is doing. Also it keeps
        one bit of information (that JS enabled the stylesheet) as it
        is needed for the recalcStyleSelector logic.

        * dom/Document.cpp:
        (WebCore::Document::recalcStyleSelector): s/isDisabled/disabled.

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::HTMLLinkElement): Removed m_disabledState,
        replaced by m_isEnabledViaScript.
        (WebCore::HTMLLinkElement::setDisabled): Updated the logic after
        m_disabledState removal. It also matches the spec by forwarding
        the disabled state to our stylesheet if we have one.
        (WebCore::HTMLLinkElement::parseMappedAttribute): Removed harmful
        handling of the disabledAttr.
        (WebCore::HTMLLinkElement::process): Updated after m_disabledState removal.
        * html/HTMLLinkElement.h:
        (WebCore::HTMLLinkElement::isEnabledViaScript): Ditto.
        (WebCore::HTMLLinkElement::isAlternate): Ditto.

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

6 years ago2011-06-10 Andreas Kling <kling@webkit.org>
Andreas Kling [Fri, 10 Jun 2011 11:31:23 +0000 (11:31 +0000)]
2011-06-10  Andreas Kling  <kling@webkit.org>

        Reviewed by Benjamin Poulain.

        [Qt] Fix 'headers' autotest when building inside Qt.
        https://bugs.webkit.org/show_bug.cgi?id=62449

        * Api/qwebkitplatformplugin.h:

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

6 years ago2011-06-09 Simon Fraser <simon.fraser@apple.com>
Simon Fraser [Thu, 9 Jun 2011 20:05:51 +0000 (20:05 +0000)]
2011-06-09  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Darin Adler.

        Crashes in RenderLayerBacking::paintingGoesToWindow
        https://bugs.webkit.org/show_bug.cgi?id=61159

        Speculative fix for unreproducible crash that can occur when RenderObject::repaintUsingContainer()
        finds a repaintContainer that is not the RenderView, but that is also not
        composited (for unknown reasons), by checking to see if the layer is
        compositing before using backing(). An assertion remains to try to catch
        this in debug builds.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::setBackingNeedsRepaintInRect):

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

6 years ago2011-06-09 Julien Chaffraix <jchaffraix@webkit.org>
Julien Chaffraix [Thu, 9 Jun 2011 19:52:27 +0000 (19:52 +0000)]
2011-06-09  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        Test for WebCore::WebKitCSSKeyframesRuleInternal::nameAttrSetter() - crash
        https://bugs.webkit.org/show_bug.cgi?id=62384

        * fast/css/webkit-keyframes-crash-expected.txt: Added.
        * fast/css/webkit-keyframes-crash.html: Added.
2011-06-09  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        WebCore::WebKitCSSKeyframesRuleInternal::nameAttrSetter() - crash
        https://bugs.webkit.org/show_bug.cgi?id=62384

        Test: fast/css/webkit-keyframes-crash.html

        * css/WebKitCSSKeyframesRule.cpp:
        (WebCore::WebKitCSSKeyframesRule::setName): stylesheet() is never garanteed
        to return a non-null pointer. Thus null-check here like the rest of the code.

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

6 years ago2011-06-08 Adam Barth <abarth@webkit.org>
Adam Barth [Thu, 9 Jun 2011 00:34:13 +0000 (00:34 +0000)]
2011-06-08  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Use after free in WebCore::ContainerNode::parserAddChild
        https://bugs.webkit.org/show_bug.cgi?id=62160

        Test that we don't trigger asserts when re-entering the parser from
        tree construction.

        * fast/parser/document-write-onload-nesting-expected.txt: Added.
        * fast/parser/document-write-onload-nesting.html: Added.
        * fast/parser/document-write-onload-ordering-expected.txt: Added.
        * fast/parser/document-write-onload-ordering.html: Added.
            - The exact ordering of the script execution here differs a bit
              between browsers.  For example, Firefox executes the scripts in a
              slightly different order because Firefox runs the parser on a
              separate thread (and therefore cannot be re-entered from tree
              construction). If/when we move the parser off the main thread,
              we're likely to change the ordering here a bit, which should be
              ok.
2011-06-08  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        constructTreeFromToken can re-enter parser, causing ASSERTs
        https://bugs.webkit.org/show_bug.cgi?id=62160

        This patch clears the HTMLToken before constructing the tree from the
        token, putting the HTMLDocumentParser in a good state to be re-entered.

        Tests: fast/parser/document-write-onload-nesting.html
               fast/parser/document-write-onload-ordering.html

        * html/parser/HTMLDocumentParser.cpp:
        (WebCore::HTMLDocumentParser::pumpTokenizer):
        * html/parser/HTMLToken.h:
        (WebCore::HTMLToken::isUninitialized):
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::constructTreeFromToken):

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

6 years ago2011-06-09 Andras Becsi <abecsi@webkit.org>
Andras Becsi [Thu, 9 Jun 2011 16:05:08 +0000 (16:05 +0000)]
2011-06-09  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Andreas Kling.

        [Qt] Fix the in-tree build on Linux
        https://bugs.webkit.org/show_bug.cgi?id=62378

        In case of an in-tree build qmake generates defect prl dependencies for
        the QtWebKit library, because the inclusion of qtbase.pri adds explicitlib to CONFIG.

        * QtWebKit.pro: Remove explicitlib and staticlib from CONFIG.

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

6 years ago2011-06-08 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
Ademar de Souza Reis Junior [Wed, 8 Jun 2011 17:14:30 +0000 (17:14 +0000)]
2011-06-08  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>

        Reviewed by Andreas Kling.

        Webkit on SPARC Solaris has wrong endian
        https://bugs.webkit.org/show_bug.cgi?id=29407

        Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
        there are more ocurrences of the same code pattern in webkit.

        This patch includes the check on these other parts of the code.

        This is a speculative fix, I don't have a sparc machine to test and
        don't know which kind of test would trigger a crash (but it's quite
        obvious that it's the same code duplicated in different files).

        * runtime/UString.h:
        (JSC::UStringHash::equal):
        * wtf/text/StringHash.h:
        (WTF::StringHash::equal):

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

6 years ago2011-06-08 Yael Aharon <yael.aharon@nokia.com>
Yael Aharon [Wed, 8 Jun 2011 15:28:27 +0000 (15:28 +0000)]
2011-06-08  Yael Aharon  <yael.aharon@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] Build fix for building QtWebKit inside of Qt.
        https://bugs.webkit.org/show_bug.cgi?id=62280

        Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore
        into QtWebKit.prl.

        No new tests, as this is just a build fix.

        * JavaScriptCore.pri:
2011-06-08  Yael Aharon  <yael.aharon@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] Build fix for building QtWebKit inside of Qt.
        https://bugs.webkit.org/show_bug.cgi?id=62280

        Remove CONFIG=staticlib, because it causes the configure script to add -lwebcore
        into QtWebKit.prl.

        No new tests, as this is just a build fix.

        * WebCore.pri:
2011-06-08  Yael Aharon  <yael.aharon@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] Build fix for building QtWebKit inside of Qt.
        https://bugs.webkit.org/show_bug.cgi?id=62280

        Remove CONFIG=staticlib, because it causes the configure script to add -lwebkit2
        into QtWebKit.prl.

        * WebKit2.pri:

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

6 years ago2011-06-08 Andreas Kling <kling@webkit.org>
Andreas Kling [Wed, 8 Jun 2011 12:52:34 +0000 (12:52 +0000)]
2011-06-08  Andreas Kling  <kling@webkit.org>

        Reviewed by Benjamin Poulain.

        [Qt] FrameLoaderClient: Check Vector::find() return value for WTF::notFound.
        https://bugs.webkit.org/show_bug.cgi?id=62274

        Vector::find() returns size_t (which is unsigned), so we should check
        for WTF::notFound instead of -1.

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::createPlugin):

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

6 years ago2011-06-08 Andreas Kling <andreas.kling@nokia.com>
Ademar de Souza Reis Jr [Wed, 8 Jun 2011 14:41:31 +0000 (11:41 -0300)]
2011-06-08  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Laszlo Gombos.

        [Symbian] Float{32,64}Array and Int16Array fail to build.
        https://bugs.webkit.org/show_bug.cgi?id=62219

        For some reason, RVCT 2.x is moaning about "class member designated by
        a using-declaration must be visible in a direct base class".
        Apply same fix as r69122 and r76592.

        * html/canvas/Float32Array.h:
        (WebCore::Float32Array::set):
        * html/canvas/Float64Array.h:
        (WebCore::Float64Array::set):
        * html/canvas/Int16Array.h:
        (WebCore::Int16Array::set):

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

Conflicts:

Source/WebCore/html/canvas/Float64Array.h

6 years ago2011-06-07 Yi Shen <yi.4.shen@nokia.com>
Yi Shen [Wed, 8 Jun 2011 02:44:35 +0000 (02:44 +0000)]
2011-06-07  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Fix the error code for media resource failures when using QtMobility
        https://bugs.webkit.org/show_bug.cgi?id=55901

        Unskip the tests which are now passing.

        * platform/qt/Skipped:
2011-06-07  Yi Shen  <yi.4.shen@nokia.com>

        Reviewed by Simon Hausmann.

        [Qt] Fix the error code for media resource failures when using QtMobility
        https://bugs.webkit.org/show_bug.cgi?id=55901

        To indicate the media resource failures, set the network state to
        MediaPlayer::FormatError when receives QMediaPlayer::InvalidMedia or
        QMediaPlayer::ResourceError.

        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
        (WebCore::MediaPlayerPrivateQt::updateStates):

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

6 years ago2011-06-07 Aravind Akella <aravind.akella@nokia.com>
commit-queue@webkit.org [Tue, 7 Jun 2011 19:17:41 +0000 (19:17 +0000)]
2011-06-07  Aravind Akella  <aravind.akella@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt][Symbian] API test failure qdeclarativewebview
        https://bugs.webkit.org/show_bug.cgi?id=59481

        QML files cannot be loaded on Symbian due to difference
        in capabilities between qmlwebkitplugin.dll and Qtwebkit.dll.
        A PlatSec error that Qtwebkit.dll has "DRM AllFiles" capabilities
        missing is observed when dynamically loading the QML plugin.

        * declarative/declarative.pro: Match capabilities in QtWebKit.pro.
        * symbian/platformplugin/platformplugin.pro: Match capabilities with the other 2 DLLs.
        Also remove TARGET.VID from platformplugin, as it's not used in any other Qt WebKit DLL,
        and causes build warnings about undefined VENDOR_VID.
        * tests/tests.pri: Add WriteDeviceData capability for API tests.

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

6 years ago2011-06-07 Andreas Kling <andreas.kling@nokia.com>
Andreas Kling [Tue, 7 Jun 2011 13:22:31 +0000 (13:22 +0000)]
2011-06-07  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] Fix Symbian build with RVCT 2.x
        https://bugs.webkit.org/show_bug.cgi?id=62205

        RVCT 2.x doesn't support (or need) the --signed_bitfields command-line
        option, so restrict it to version 4.x of the compiler.

        * Source/WebKit.pri:

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

6 years ago2011-06-05 Igor Oliveira <igor.oliveira@openbossa.org> qtwebkit-2.2-week22
commit-queue [Sun, 5 Jun 2011 18:34:07 +0000 (18:34 +0000)]
2011-06-05  Igor Oliveira  <igor.oliveira@openbossa.org>

        Reviewed by Kenneth Rohde Christiansen.

        fast/viewport/viewport-45.html fails in GTK+/Qt
        https://bugs.webkit.org/show_bug.cgi?id=47481

        Rebaseline tests.

        * fast/viewport/viewport-45-expected.txt:
        * fast/viewport/viewport-86-expected.txt:
        * platform/qt/Skipped:
2011-06-05  Igor Oliveira  <igor.oliveira@openbossa.org>

        Reviewed by Kenneth Rohde Christiansen.

        fast/viewport/viewport-45.html fails in GTK+/Qt
        https://bugs.webkit.org/show_bug.cgi?id=47481

        computeViewportAttributes does many math operations with float point arithmetic
        and in some cases there is loss of precision making tests have incorrect values.

        * dom/ViewportArguments.cpp:
        (WebCore::computeViewportAttributes):

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

6 years agoSkip fast/forms/selectlist-minsize.html on mac
Ademar de Souza Reis Jr [Mon, 6 Jun 2011 16:59:01 +0000 (13:59 -0300)]
Skip fast/forms/selectlist-minsize.html on mac

New test introduced in r88029, but fails on Qt-Mac. Also skipped in
trunk by r88141.

6 years agoSkip editing/pasteboard tests on mac which are failing on QtWebKit-2.2
Ademar de Souza Reis Jr [Mon, 6 Jun 2011 16:49:31 +0000 (13:49 -0300)]
Skip editing/pasteboard tests on mac which are failing on QtWebKit-2.2

5 editing/pasteboard tests are failing on our 2.2 mac bots because
their actual results are including meta tags like this:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Disabling them for now.

6 years ago[Qt] Implement download feature for QtTestBrowser
Csaba Osztrogonác [Mon, 6 Jun 2011 14:52:19 +0000 (14:52 +0000)]
[Qt] Implement download feature for QtTestBrowser
https://bugs.webkit.org/show_bug.cgi?id=61865

Buildfix for --minimal and CONFIG+=qt_minimal build after r88161.

* QtTestBrowser/launcherwindow.cpp:
(LauncherWindow::LauncherWindow):
* QtTestBrowser/launcherwindow.h:

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

6 years ago2011-06-06 Barát Tibor <Barat.Tibor@stud.u-szeged.hu>
commit-queue [Mon, 6 Jun 2011 13:19:23 +0000 (13:19 +0000)]
2011-06-06  Barát Tibor  <Barat.Tibor@stud.u-szeged.hu>

        Reviewed by Csaba Osztrogonác.

        [Qt] Implement download feature for QtTestBrowser
        https://bugs.webkit.org/show_bug.cgi?id=61865

        * QtTestBrowser/launcherwindow.cpp:
        (LauncherWindow::LauncherWindow):
        (LauncherWindow::downloadRequest):
        (LauncherWindow::fileDownloadFinished):
        * QtTestBrowser/launcherwindow.h:

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

6 years ago2011-06-04 Abhishek Arya <inferno@chromium.org>
Ademar de Souza Reis Jr [Mon, 6 Jun 2011 14:46:15 +0000 (11:46 -0300)]
2011-06-04  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Kent Tamura.

        Add some asserts for array boundary checks in TextRun. Fix
        an integer issue in linux text controller code.
        https://bugs.webkit.org/show_bug.cgi?id=62085

        Testing ComplexTextControllerLinux change requires a testcase
        > 32 kb which is not feasible. All other changes are tested by
        existing layouttests.

        * platform/graphics/TextRun.h:
        (WebCore::TextRun::operator[]): add assert.
        (WebCore::TextRun::data): add assert.
        * platform/graphics/WidthIterator.cpp:
        (WebCore::WidthIterator::advance): bail early and prevent access
        to one byte across the text run boundary.
        * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
        (WebCore::ComplexTextController::getNormalizedTextRun): wrong
        int16 vs int comparison.
        * rendering/svg/SVGTextRunRenderingContext.cpp:
        (WebCore::SVGTextRunWalker::walk): bail early when from and to
        is outside the text run boundary. this hit easily after adding
        the assert when from = to = end and read in run.data(from).

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

Conflicts:

Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp

6 years ago2011-06-04 Jeffrey Pfau <jpfau@apple.com>
commit-queue [Sat, 4 Jun 2011 10:32:26 +0000 (10:32 +0000)]
2011-06-04  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by Beth Dakin.

        Crash in WebCore::RenderMathMLSubSup::baselinePosition()
        https://bugs.webkit.org/show_bug.cgi?id=57897

        Added simple test that hits the relevant code.

        * mathml/msubsup-remove-children-expected.txt: Added.
        * mathml/msubsup-remove-children.xhtml: Added.
2011-06-04  Jeffrey Pfau  <jpfau@apple.com>

        Reviewed by Beth Dakin.

        Crash in WebCore::RenderMathMLSubSup::baselinePosition()
        https://bugs.webkit.org/show_bug.cgi?id=57897

        Simple patch adding NULL checks in each function.
        Test: mathml/msubsup-remove-children.xhtml

        * rendering/mathml/RenderMathMLSubSup.cpp:
        (WebCore::RenderMathMLSubSup::stretchToHeight):
        (WebCore::RenderMathMLSubSup::baselinePosition):

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

6 years ago2011-06-03 Rafael Brandao <rafael.lobo@openbossa.org>
commit-queue [Fri, 3 Jun 2011 21:53:04 +0000 (21:53 +0000)]
2011-06-03  Rafael Brandao  <rafael.lobo@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] It made two Qt API tests fail
        https://bugs.webkit.org/show_bug.cgi?id=58847

        Modified failing test's base url so it could get a valid origin
        and make use of local storage. Also added another test that checks
        local storage visibility in both scenarios.

        * tests/qwebpage/tst_qwebpage.cpp:
        (tst_QWebPage::testOptionalJSObjects):
        (checkLocalStorageVisibility):
        (tst_QWebPage::testLocalStorageVisibility):

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

6 years ago2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
Alexis Menard [Fri, 3 Jun 2011 21:02:07 +0000 (21:02 +0000)]
2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] Warning fixes on comparisons between a signed and an unsigned.

        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
        (DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo):
        (DumpRenderTreeSupportQt::nodesFromRect):

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

6 years ago2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
alexis.menard@openbossa.org [Fri, 3 Jun 2011 20:32:47 +0000 (20:32 +0000)]
2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Andreas Kling.

        To support building namespaced Qt, we require that forward-declarations
        of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE.

        * WebCoreSupport/FrameLoaderClientQt.h:
2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Andreas Kling.

        To support building namespaced Qt, we require that forward-declarations
        of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE.

        * platform/network/qt/QtMIMETypeSniffer.h:

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

6 years ago2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
Alexis Menard [Fri, 3 Jun 2011 20:07:53 +0000 (20:07 +0000)]
2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>

        Unreviewed build fix after r87902.

        To support building namespaced Qt, we require that forward-declarations
        of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE but
        only on classes inside Qt.

        * WebCoreSupport/DumpRenderTreeSupportQt.h:

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

6 years ago2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
alexis.menard@openbossa.org [Fri, 3 Jun 2011 19:18:09 +0000 (19:18 +0000)]
2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Benjamin Poulain.

        Some warning fixes. Values in switch not handled, and
        a comparison between a signed and an unsigned.

        * Api/qwebpage.cpp:
        (QWebPagePrivate::inputMethodEvent):
        (QWebPagePrivate::dynamicPropertyChangeEvent):
        (QWebPage::action):

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

6 years ago2011-06-01 Dirk Pranke <dpranke@chromium.org>
Dirk Pranke [Wed, 1 Jun 2011 21:09:05 +0000 (21:09 +0000)]
2011-06-01  Dirk Pranke  <dpranke@chromium.org>

        Reviewed by Tony Chang.

        nrwt: make webaudio work w/o content-length header
        https://bugs.webkit.org/show_bug.cgi?id=61819

        * Scripts/webkitpy/layout_tests/layout_package/printing.py:
        * Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py:
        * Scripts/webkitpy/layout_tests/port/mock_drt.py:
        * Scripts/webkitpy/layout_tests/port/webkit.py:

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

6 years ago2011-06-01 Andras Becsi <abecsi@webkit.org>
Andras Becsi [Wed, 1 Jun 2011 18:16:14 +0000 (18:16 +0000)]
2011-06-01  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt] Fix the Phonon build when logging is disabled
        https://bugs.webkit.org/show_bug.cgi?id=61869

        No new tests needed.

        * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Add missing guards.
        (WebCore::MediaPlayerPrivatePhonon::networkState):
        (WebCore::MediaPlayerPrivatePhonon::readyState):
        (WebCore::MediaPlayerPrivatePhonon::updateStates):
        (WebCore::MediaPlayerPrivatePhonon::stateChanged):

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

6 years ago2011-05-31 Abhishek Arya <inferno@chromium.org>
Abhishek Arya [Tue, 31 May 2011 18:16:13 +0000 (18:16 +0000)]
2011-05-31  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dimitri Glazkov.

        Improve hasMediaControls logic to check that node has
        media controls. This can be false when cloning nodes.
        https://bugs.webkit.org/show_bug.cgi?id=61765

        Test: media/media-controls-clone-crash.html

        * dom/Node.h:
        (WebCore::Node::isMediaControls):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::mediaControls):
        (WebCore::HTMLMediaElement::hasMediaControls):
        * html/shadow/MediaControls.h:
        (WebCore::MediaControls::isMediaControls):
        (WebCore::toMediaControls):
2011-05-31  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Dimitri Glazkov.

        Tests that cloning an audio element with media controls does
        not result in crash.
        https://bugs.webkit.org/show_bug.cgi?id=61765

        * media/media-controls-clone-crash-expected.txt: Added.
        * media/media-controls-clone-crash.html: Added.

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

6 years ago2011-05-30 Eric Carlson <eric.carlson@apple.com>
Eric Carlson [Tue, 31 May 2011 01:44:55 +0000 (01:44 +0000)]
2011-05-30  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Alexey Proskuryakov.

        Audio and video files saved to the Application Cache should preserve the original file extension
        https://bugs.webkit.org/show_bug.cgi?id=61750
        <rdar://9524922>

        No new tests, it isn't possible to check the name of the file in the cache from within
        DRT. Changes verified manually.

        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache
            file name.
        (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter.
        * loader/appcache/ApplicationCacheStorage.h:

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

6 years ago2011-05-30 Jer Noble <jer.noble@apple.com>
Ademar de Souza Reis Jr [Fri, 3 Jun 2011 19:54:02 +0000 (16:54 -0300)]
2011-05-30  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler and Simon Fraser.

        REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again
        https://bugs.webkit.org/show_bug.cgi?id=61717
        rdar://problem/9522272

        May be some good way to test this later. No immediate idea about the best way.

        When a media element is taken into full-screen mode, stop events from propagating
        outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior()
        has been changed to take a shadow root node. In our full screen media element check,
        we check to see if the passed shadow root is the shadow root of the full screen media
        element, and if so, specify events should StayInsideShadowDOM. The end result is that
        inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the
        way from the SliderThumb to the video element's shadow root, but no further.

        * dom/EventDispatcher.cpp:
        (WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the
        shadow DOM when showing a full screen video.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls.
        The events telling us about activity in the shadow DOM no longer bubble out so we need to
        handle this inside the shadow DOM on the root element.
        (WebCore::HTMLMediaElement::play): Ditto.
        (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto.
        (WebCore::HTMLMediaElement::defaultEventHandler): Ditto.
        (WebCore::HTMLMediaElement::enterFullscreen): Ditto.
        (WebCore::HTMLMediaElement::exitFullscreen): Ditto.
        * html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out
        changes that tried to make special rules for events using preDispatchEventHandler and such.
        This rolls out both r87622 and r87655.
        (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
        * html/shadow/MediaControlElements.h: Ditto.

        * html/shadow/MediaControlRootElement.cpp:
        (WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members.
        (WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider
        hiding the controls later.
        (WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse
        is no longer over the controls.
        (WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide
        automatically if we're playing.
        (WebCore::MediaControlRootElement::enteredFullscreen): Start the timer.
        (WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care
        if we are full screen.
        (WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function.
        (WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions
        as the mouse is moved in and out.
        (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if
        needed.
        (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions
        are met.
        (WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer.

        * html/shadow/MediaControlRootElement.h: Added new functions and data members.

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

Conflicts:

Source/WebCore/html/shadow/MediaControlRootElement.cpp

6 years ago2011-05-29 Brian Weinstein <bweinstein@apple.com>
Jer Noble [Mon, 30 May 2011 03:37:14 +0000 (03:37 +0000)]
2011-05-29  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Darin Adler.

        Controls never hide in full screen after user stops moving mouse
        https://bugs.webkit.org/show_bug.cgi?id=61715
        <rdar://problem/9522182>

        When we get a mouse move event in HTMLMediaElement::defaultEventHandler, and we are in full screen,
        show the media controls, and then start a timer.

        The timer fires 3 seconds after the user's last mouse movement (timer is restarted on every mouse
        move), and hides the controls.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize our new timer.
        (WebCore::HTMLMediaElement::play): If we are in full screen mode, start our timer to hide the full screen
            controls. We don't want the user to have to move the mouse to hide them when they use the spacebar
            to play.
        (WebCore::HTMLMediaElement::startHideFullscreenControlsTimer): Starts a oneshot timer 3 seconds in the future
            if we are in full screen.
        (WebCore::HTMLMediaElement::hideFullscreenControlsTimerFired): Make sure that we are currently playing, and
            we are in full screen, and hide the controls. We don't want to hide the controls if we are paused.
        (WebCore::HTMLMediaElement::stopHideFullscreenControlsTimer): Stops the timer.
        (WebCore::HTMLMediaElement::defaultEventHandler): If we get a mouse move event and are in full screen, show the
            controls and start a timer to hide them.
        (WebCore::HTMLMediaElement::enterFullscreen): Start a timer to hide the full screen controls. The user shouldn't
            have the move the mouse once they enter full screen to hide the controls.
        (WebCore::HTMLMediaElement::exitFullscreen): Stop the timer to hide the full screen controls.
        * html/HTMLMediaElement.h:
        * html/shadow/MediaControls.h: Added pure virtual shouldHideControls() method.
        * html/shadow/MediaControlRootElement.cpp:
        (WebCore::MediaControlRootElement::playbackStopped): Stop the timer to hide the full screen controls.
        (WebCore::MediaControlRootElement::shouldHideControls): Added, only report that
            the caller should hide the controls if the panel is not hovered.
        * html/shadow/MediaControlRootElement.h:

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

6 years ago2011-05-29 Darin Adler <darin@apple.com>
Darin Adler [Mon, 30 May 2011 00:00:34 +0000 (00:00 +0000)]
2011-05-29  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker.

        REGRESSION (r87622): In media documents, clicking the full screen button and the play button pauses the video
        https://bugs.webkit.org/show_bug.cgi?id=61713

        We need to come up with a way to regression-test these changes. Nothing at the moment.

        The bug is that we removed calls to preventDefault, but we still do need to prevent
        default handling of this event.

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlElement::preDispatchEventHandler): Add back the preventDefault
        that was in here before r87622 as well as the stopPropagation that was added in r87622.
        (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.

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

6 years ago2011-05-28 Jer Noble <jer.noble@apple.com>
Jer Noble [Sat, 28 May 2011 19:41:14 +0000 (19:41 +0000)]
2011-05-28  Jer Noble  <jer.noble@apple.com>

        Reviewed by Maciej Stachowiak.

        Mouse clicks propagate outside full-screen media controls.
        https://bugs.webkit.org/show_bug.cgi?id=61689

        Mouse click events are propagating out of the media controls, so mouse click
        listeners registered on the video element are getting fired when the user
        clicks on media controller buttons.  By default, block propagation of click
        events from MediaControlElements by overriding preDispatchEventHandler, and
        convert all instances of defaultEventHandler -> preDispatchEventHandler.  Change
        all calls of event->setDefaultHandled() to event->stopPropagation().

        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlElement::preDispatchEventHandler): Added.  Block
            propagation of all mouse click events.
        (WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler):
            Renamed from setDefaultHandled.
        (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto.
        (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto.
        * html/shadow/MediaControlElements.h:

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

6 years ago2011-05-26 Alexis Menard <alexis.menard@openbossa.org>
Alexis Menard [Thu, 26 May 2011 18:34:52 +0000 (18:34 +0000)]
2011-05-26  Alexis Menard  <alexis.menard@openbossa.org>

        Unreviewed build fix for Qt and QuickTime backend.

        r87328 added a new system interface, we need to add it too.

        * WebCoreSupport/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):
2011-05-26  Alexis Menard  <alexis.menard@openbossa.org>

        Unreviewed build fix for Qt and QuickTime backend.

        r87328 added a new system interface, we need to add it too.

        * platform/qt/WebCoreSystemInterface.h:
        * platform/qt/WebCoreSystemInterface.mm:

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

6 years ago2011-05-24 Jer Noble <jer.noble@apple.com>
Ademar de Souza Reis Jr [Fri, 27 May 2011 19:18:32 +0000 (16:18 -0300)]
2011-05-24  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Video fails to play on Vimeo
        https://bugs.webkit.org/show_bug.cgi?id=61403

        No new tests; Covered by media/video-canvas-source.html.

        Vimeo redirects their assets from player.vimeo.com to av.vimeo.com, which is rejected
        by AVFoundation and QTKit due to our setting a ForbidCrossSiteReference option when
        creating an AVAsset or QTMovie. Instead, we should just reject local->remote and
        remote->local and make our answer to hasSingleSecurityOrigin dynamic.

        When checking whether a given request has a single security origin, use a
        SecurityOrigin to check the host, port, and scheme.

        * WebCore.exp.in:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
        (WebCore::MediaPlayerPrivateAVFoundation::assetURL): Added.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Exchange ForbidCrossSiteReference
            for ForbidRemoteReferenceToLocal and ForbidLocalReferenceToRemote
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check to see that the
            requested and resolved URLs have the same host and port.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): Exchange NoCrossSiteAttribute for
            NoRemoteToLocalSiteAttribute and NoLocalToRemoteSiteAttribute.
        (WebCore::MediaPlayerPrivateQTKit::hasSingleSecurityOrigin):     Check to see that the
                requested and resolved URLs have the same host and port.
        * platform/mac/WebCoreSystemInterface.h: Added wkAVAssetResolvedURL.
        * platform/mac/WebCoreSystemInterface.mm: Ditto.
2011-05-24  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Video fails to play on Vimeo
        https://bugs.webkit.org/show_bug.cgi?id=61403

        * WebCoreSupport/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Added support for wkAVAssetResolvedURL and
            wkQTMovieResolvedURL.
2011-05-24  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Video fails to play on Vimeo
        https://bugs.webkit.org/show_bug.cgi?id=61403

        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface): Added support for wkAVAssetResolvedURL and
            wkQTMovieResolvedURL.
2011-05-25  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Video fails to play on Vimeo
        https://bugs.webkit.org/show_bug.cgi?id=61403

        Added functions to retrieve the resolved URL for media types supported on
        mac.

        * WebKitSystemInterface.h:
        * WebKitSystemInterface.m:
        (WKAVAssetResolvedURL): Added.
        (WKQTMovieResolvedURL): Added.

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

Conflicts:

Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm

6 years ago2011-05-15 Eric Carlson <eric.carlson@apple.com>
Eric Carlson [Sun, 15 May 2011 16:18:03 +0000 (16:18 +0000)]
2011-05-15  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Maciej Stachowiak.

        Use new AVAssetReferenceRestrictions to prevent cross site media references
        https://bugs.webkit.org/show_bug.cgi?id=60791
        <rdar://problem/9374202>

        Test: http/tests/media/video-cross-site.html

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Set restriction
            to prevent cross-domain references from being followed.

2011-05-15  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Maciej Stachowiak.

        Use new AVAssetReferenceRestrictions to prevent cross site media references
        https://bugs.webkit.org/show_bug.cgi?id=60791
        <rdar://problem/9374202>

        Add test for cross-domain QuickTime reference movie and test.

        * http/tests/media/resources/cross-site-reference.mov: Added.
        * http/tests/media/video-cross-site-expected.txt: Added.
        * http/tests/media/video-cross-site.html: Added.
        * platform/chromium/test_expectations.txt: Skipped, QuickTime reference movies not supported.
        * platform/gtk/Skipped: Ditto.

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

6 years ago2011-05-10 Eric Carlson <eric.carlson@apple.com>
Eric Carlson [Tue, 10 May 2011 17:08:10 +0000 (17:08 +0000)]
2011-05-10  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Darin Adler.

        Files that load quickly sometimes won't play.
        https://bugs.webkit.org/show_bug.cgi?id=60556
        <rdar://problem/9330567>

        No new tests, this failure is very difficult to reproduce on some machines. The fix was
        verified manually.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::playabilityKnown): Move the call to updateStates
            to dispatchNotification so it is more obvious which state changes call it.
        (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize): Correct logging typo.
        (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): Move updateStates call to
            dispatchNotification.
        (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Call updateStates after
            processing "size changed" notification so we detect all state changes. Consolidate
            calls to updateStates here.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Name the video layer in
            a debug build.

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

6 years ago2011-05-05 Eric Carlson <eric.carlson@apple.com>
Eric Carlson [Thu, 5 May 2011 20:21:38 +0000 (20:21 +0000)]
2011-05-05  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adam Roben.

        Block callbacks delivered during destruction
        https://bugs.webkit.org/show_bug.cgi?id=60291
        <rdar://problem/9382942>

        No new tests, tested by existing tests.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::~MediaPlayerPrivateAVFoundation): Call
            setIgnoreLoadStateChanges(true) to cancel all callbacks.
        (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Return immediately if
            m_ignoreLoadStateChanges is true.
        (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): loadStateChanged -> updateStates.
            Don't call updateStates after calling loadedTimeRangesChanged, it already does it.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

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

6 years ago2011-05-25 Andrew Scherkus <scherkus@chromium.org>
Andrew Scherkus [Wed, 25 May 2011 21:47:39 +0000 (21:47 +0000)]
2011-05-25  Andrew Scherkus  <scherkus@chromium.org>

        Reviewed by Eric Carlson.

        Fix media element regression where ended event stopped firing after changing the src attribute.

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

        * media/media-ended-expected.txt: Added.
        * media/media-ended.html: Added.
2011-05-25  Andrew Scherkus  <scherkus@chromium.org>

        Reviewed by Eric Carlson.

        Fix media element regression where ended event stopped firing after changing the src attribute.

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

        Test: media/media-ended.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::prepareForLoad):

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

6 years ago2011-05-25 Jer Noble <jer.noble@apple.com>
Jer Noble [Wed, 25 May 2011 21:38:31 +0000 (21:38 +0000)]
2011-05-25  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
        https://bugs.webkit.org/show_bug.cgi?id=61461

        * fullscreen/full-screen-iframe-legacy-expected.txt: Added.
        * fullscreen/full-screen-iframe-legacy.html: Added.
        * fullscreen/resources/legacy.html: Added.
2011-05-25  Jer Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        REGRESSION: Fullscreen button on embedded Vimeo videos does nothing
        https://bugs.webkit.org/show_bug.cgi?id=61461

        Tests: fullscreen/full-screen-iframe-legacy.html

        Allow calls from the legacy full-screen API to bypass the iframe
        "webkitallowfullscreen" requirement by adding a parameter to
        Document::webkitRequestFullScreenForElement specifying the strictness
        of that check.  Specify this new parameter everywhere that function is
        called, including in the default controls' full-screen button handler.

        * dom/Document.cpp:
        (WebCore::Document::webkitRequestFullScreenForElement):
        * dom/Document.h:
        * dom/Element.cpp:
        (WebCore::Element::requestFullScreen): Renamed from webkitRequestFullScreen.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::enterFullscreen):
        * html/shadow/MediaControlElements.cpp:
        (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):

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

6 years ago2011-05-25 Alexis Menard <alexis.menard@openbossa.org>
Alexis Menard [Wed, 25 May 2011 19:22:25 +0000 (19:22 +0000)]
2011-05-25  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Eric Carlson.

        [Qt] Enable usage of QuickTime mediaplayer for the Qt port on Mac.
        https://bugs.webkit.org/show_bug.cgi?id=61279

        Enable the QuickTime backend for the Qt port on Mac. The patch adds the bits in WebCore
        to enable the QTKit backend of the Mac port. It can be enabled by passing DEFINES+=USE_QTKIT=1
        when calling build-webkit.

        * WebCore.pri:
        * WebCore.pro:
        * features.pri:
        * platform/KURL.h:
        * platform/SharedBuffer.h:
        * platform/cf/KURLCFNet.cpp:
        * platform/cf/SharedBufferCF.cpp:
        * platform/graphics/FloatSize.h:
        * platform/graphics/IntRect.h:
        * platform/graphics/IntSize.h:
        * platform/graphics/MediaPlayer.cpp:
        * platform/graphics/cg/FloatSizeCG.cpp:
        * platform/graphics/cg/IntRectCG.cpp:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
        (WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
        (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
        (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
        (WebCore::MediaPlayerPrivateQTKit::paint):
        (-[WebCoreMovieObserver layerHostChanged:]):
        * platform/mac/KURLMac.mm:
        * platform/mac/SharedBufferMac.mm:
        (+[WebCoreSharedBufferData initialize]):
        * platform/mac/WebCoreObjCExtras.mm:
        * platform/qt/WebCoreSystemInterface.h: Added.
        * platform/qt/WebCoreSystemInterface.mm: Added.
2011-05-25  Alexis Menard  <alexis.menard@openbossa.org>

        Reviewed by Eric Carlson.

        [Qt] Enable usage of QuickTime mediaplayer for the Qt port on Mac.
        https://bugs.webkit.org/show_bug.cgi?id=61279

        Enable the usage of QuickTime backend for the Qt port. It can be enabled by
        passing DEFINES+=USE_QTKIT=1 when calling build-webkit.

        * Api/qwebpage.cpp:
        (QWebPagePrivate::QWebPagePrivate):
        * QtWebKit.pro:
        * WebCoreSupport/FullScreenVideoQt.cpp:
        (WebCore::FullScreenVideoQt::enterFullScreenForNode):
        (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
        (WebCore::FullScreenVideoQt::isValid):
        * WebCoreSupport/WebSystemInterface.h: Added.
        * WebCoreSupport/WebSystemInterface.mm: Added.
        (InitWebCoreSystemInterface):

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

6 years agoUnreviewed; build fix for non-SnowLeopard builds.
Jer Noble [Mon, 16 May 2011 18:03:21 +0000 (18:03 +0000)]
Unreviewed; build fix for non-SnowLeopard builds.

* platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Wrap definition
    of layerIsDescendentOf in a #if check.

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

6 years ago2011-05-13 Jer Noble <jer.noble@apple.com>
Jer Noble [Mon, 16 May 2011 17:50:54 +0000 (17:50 +0000)]
2011-05-13  Jer Noble  <jer.noble@apple.com>

        Reviewed by Simon Fraser.

        Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
        https://bugs.webkit.org/show_bug.cgi?id=60826

        Listen for a WebKitLayerHostChanged notification and, if the affected layer is an
        ancestor layer of the qtMovieLayer, tear down the layer and recreate it the
        next time setVisible(true) is called.

        * dom/Document.cpp:
        (WebCore::Document::webkitDidEnterFullScreenForElement):  Call setFullScreenRootLayer(0)
            before disabling animation on the full screen renderer.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::createQTMovie): Register an observer for the new
            WebKitLayerHostChanged notification.
        (WebCore::layerIsDescendentOf): Added.
        (WebCore::MediaPlayerPrivateQTKit::layerHostChanged): Added.  If the changed
            layer is an ancestor of the movie layer, tear down rendering and re-
            create the next time setVisible(true) is called.
        (-[WebCoreMovieObserver layerHostChanged:]):  Added ObjC listener wrapper.
2011-05-13  Jer Noble  <jer.noble@apple.com>

        Reviewed by Simon Fraser.

        Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
        https://bugs.webkit.org/show_bug.cgi?id=60826

        Emit a notification when moving a CALayer from the WebProcess's main
        layer host to a new context.  This allows listeners to invalidate their
        layers which may not support moving between different CAContexts (as is
        the case with QTMovieLayer).  In order to allow listeners to determine if they
        are affected, the notification will pass the root CALayer in a userInfo
        dictionary.

        In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
        class (GraphicsLayer) to a retainable class (PlatformLayer).

        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
        (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize
            m_fullScreenRootLayer now that it is a RetainPtr<>.
        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification
            after either creating or destroying the full screen layer host.
        (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):

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

6 years ago2011-05-18 Jeremy Noble <jer.noble@apple.com>
Jer Noble [Thu, 19 May 2011 23:17:00 +0000 (23:17 +0000)]
2011-05-18  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Poster is not shown in Safari for video element with no playable source elements.
        https://bugs.webkit.org/show_bug.cgi?id=61109

        * media/video-src-invalid-poster-expected.txt: Added.
        * media/video-src-invalid-poster.html: Added.
2011-05-18  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Poster is not shown in Safari for video element with no playable source elements.
        https://bugs.webkit.org/show_bug.cgi?id=61109

        Test: media/video-src-invalid-poster.html

        In the case where no video sources are playable, update the display state and
        renderer, allowing the poster image to display.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::waitForSourceChange):

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

6 years ago2011-05-14 Jeremy Noble <jer.noble@apple.com>
Jer Noble [Sat, 14 May 2011 17:29:14 +0000 (17:29 +0000)]
2011-05-14  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Exiting full screen causes <video> element inline controls to become visible
        https://bugs.webkit.org/show_bug.cgi?id=60142

        * fullscreen/video-controls-override-expected.txt: Added.
        * fullscreen/video-controls-override.html: Added.
2011-05-14  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Exiting full screen causes <video> element inline controls to become visible
        https://bugs.webkit.org/show_bug.cgi?id=60142

        Create a queue of elements who must be targeted with webkitfullscreenchange events. Instead of dispatching
        a single event with whatever the current value of m_fullScreenElement is (which may have been cleared, or
        changed since the timer was asked to fire), dispatch one event for each entry in the queue.

        Test: fullscreen/video-controls-override.html

        * dom/Document.cpp:
        (WebCore::Document::webkitDidEnterFullScreenForElement): Push current full screen element onto the
            webkitfullscreenchange event delay queue.
        (WebCore::Document::webkitDidExitFullScreenForElement): Ditto.
        (WebCore::Document::fullScreenElementRemoved): Ditto.
        (WebCore::Document::fullScreenChangeDelayTimerFired): Empty the queue, dispatching a
            webkitfullscreenchange event for each entry.
        * dom/Document.h:

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

6 years ago2011-05-05 Jer Noble <jer.noble@apple.com>
Jer Noble [Tue, 10 May 2011 22:38:52 +0000 (22:38 +0000)]
2011-05-05  Jer Noble  <jer.noble@apple.com>

        Reviewed by Maciej Stachowiak.

        Removing the full screen element via parent.innerHTML="" does not result in a webkitfullscreenchange event.
        https://bugs.webkit.org/show_bug.cgi?id=60278

        * fullscreen/full-screen-remove-children-expected.txt: Added.
        * fullscreen/full-screen-remove-children.html: Added.
        * fullscreen/full-screen-test.js: Fixed an exception when running in Safari.
2011-05-05  Jer Noble  <jer.noble@apple.com>

        Reviewed by Maciej Stachowiak.

        Removing the full screen element via parent.innerHTML="" does not result in a webkitfullscreenchange event.
        https://bugs.webkit.org/show_bug.cgi?id=60278

        Handle the removal of a full screen element from within Node::willRemove() instead
        of Document::nodeWillBeRemoved().  The new function Document::fullScreenElementWillBeRemoved() will
        be called by Node::willRemove() to handle those changes which used to occur in nodeWillBeRemoved().

        Test: fullscreen/full-screen-remove-children.html

        * dom/Document.cpp:
        (WebCore::Document::nodeWillBeRemoved): Removed the code checking for the full screen element.
        (WebCore::Document::fullScreenElementWillBeRemoved): Added, moved from nodeWillBeRemoved.
        * dom/Document.h:
        * dom/Node.cpp:
        (WebCore::Node::willRemove): Check to see if this is the current full screen element.

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

6 years ago2011-05-04 Philippe Normand <pnormand@igalia.com>
Philippe Normand [Wed, 11 May 2011 15:08:40 +0000 (15:08 +0000)]
2011-05-04  Philippe Normand  <pnormand@igalia.com>

        Reviewed by Martin Robinson.

        [Gtk+] deadlock in gstreamer video player when exiting fullscreen
        https://bugs.webkit.org/show_bug.cgi?id=58548

        Block data flow towards the pipeline branch to remove to avoid
        potential deadlocks during the PAUSED->READY transitions of the
        elements to remove.

        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
        (WebCore::GStreamerGWorld::exitFullscreen):

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

6 years ago2011-05-11 Eric Carlson <eric.carlson@apple.com>
Eric Carlson [Wed, 11 May 2011 17:41:35 +0000 (17:41 +0000)]
2011-05-11  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Darin Adler.

        Video track sometimes fails to draw.
        https://bugs.webkit.org/show_bug.cgi?id=60635
        <rdar://problem/9281951>

        No new tests, covered by existing pixel tests.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource): Set display mode to "Unknown" to force a
            recalculation, and media engine notification, the next time the state machine runs.

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

6 years ago2011-05-09 Jeremy Noble <jer.noble@apple.com>
Jer Noble [Mon, 9 May 2011 23:50:28 +0000 (23:50 +0000)]
2011-05-09  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
        https://bugs.webkit.org/show_bug.cgi?id=60496

        When animating into and out of full screen, order out and back in the original webView window,
        disabling animations when necessary.  The exitFullscreen method was targeting the wrong window,
        as the webView is hosted in the full screen window when we ask for it's parent window.

        * WebView/WebFullScreenController.mm:
        (-[WebFullScreenController windowDidEnterFullscreen:]):
        (-[WebFullScreenController exitFullscreen]):
2011-05-09  Jeremy Noble  <jer.noble@apple.com>

        Reviewed by Darin Adler.

        Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
        https://bugs.webkit.org/show_bug.cgi?id=60496

        When animating into and out of full screen, order out and back in the original webView window,
        disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window,
        as the webView is hosted in the full screen window when we ask for it's parent window.

        * UIProcess/mac/WKFullScreenWindowController.mm:
        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
        (-[WKFullScreenWindowController beganExitFullScreenAnimation]):

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

6 years ago2011-05-05 Eric Carlson <eric.carlson@apple.com>
Eric Carlson [Thu, 5 May 2011 18:17:23 +0000 (18:17 +0000)]
2011-05-05  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adam Roben.

        The preload attribute of the video tag is not completely implemented
        https://bugs.webkit.org/show_bug.cgi?id=43673
        <rdar://problem/9369746>

        This change implements "preload=metadata" for the AVFoundation backend.
        Tested manually with manual-tests/media-elements/video-preload.html.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_havePreparedToPlay.
        (WebCore::HTMLMediaElement::prepareForLoad): Ditto.
        (WebCore::HTMLMediaElement::prepareToPlay): New, tell player to prepare to play.
        (WebCore::HTMLMediaElement::seek): Call prepareToPlay when preload is less than 'auto'
            because we need to have media data loaded to seek.
        (WebCore::HTMLMediaElement::updatePlayState): Call prepareToPlay.
        * html/HTMLMediaElement.h:

        * manual-tests/media-elements/video-preload.html: Make changing urls work.

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
        (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):  Remove
            m_videoFrameHasDrawn and m_delayingLoad as they are no longer used.
        (WebCore::MediaPlayerPrivateAVFoundation::resumeLoad): Removed.
        (WebCore::MediaPlayerPrivateAVFoundation::load): Don't initialize m_videoFrameHasDrawn.
            Move all preload logic to setPreload, call it from here.
        (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): Move all preload logic to
            setPreload, call it.
        (WebCore::MediaPlayerPrivateAVFoundation::duration): Don't cache duration = 0, it is
            unlikely to be correct and isn't worth caching. Use invalidTime() function.
        (WebCore::MediaPlayerPrivateAVFoundation::seeking): Use invalidTime() function.
        (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize): Add logging.
        (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Update for name change AVAssetStatus
            to AssetStatus. Always create a AVPlayerItem for live streams because they can't be inspected
            without one. Set networkState to 'idle' when the playback buffer is full because that is
            a signal that AVFoundation won't do any more IO. Set readyState to 'HAVE_CURRENT_DATA'
            when the first frame is available.
        (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): Call tracksChanged so we cache
            width, height, hasVideo, etc.
        (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Use invalidTime() function.
        (WebCore::MediaPlayerPrivateAVFoundation::timeChanged): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundation::repaint): Don't set m_videoFrameHasDrawn, it is done
            in derived classes.
        (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Centralize all logic about when to create
            AVAsset and AVPlayerItem here.
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
        (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
            m_videoFrameHasDrawn.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): New, renamed from
            videoLayerIsReadyToDisplay. Return true if we have a layer with frames available or
            if we have painted a frame to the context.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): New, create the AVAsset
            if necessary.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForCacheResource): Ditto.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Restructure logic.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): New, create AVPlayerItem.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Correct logging.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus): Return "buffer full" when
            the buffer is full.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Get the duration from the
            AVAsset when we haven't allocated the AVPlayerItem yet so that we can return duration
            when we only have metadata.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): Update for name change.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Set m_videoFrameHasDrawn.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Get attributes from AVAsset
            when when we haven't allocated the AVPlayerItem yet so that we can report attributes
            when we only have metadata.
        (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): Guard against being called before
            we have allocated the AVPlayerItem.

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

6 years ago2011-06-03 Doreen Jiang <doreen.jiang@nokia.com>
commit-queue [Fri, 3 Jun 2011 17:03:21 +0000 (17:03 +0000)]
2011-06-03  Doreen Jiang  <doreen.jiang@nokia.com>

        Reviewed by Benjamin Poulain.

        [Qt]The minimum size of the select menu list is incorrect for qtwebkit
        https://bugs.webkit.org/show_bug.cgi?id=56752

        The test is to get the render tree of select menu lists with varying widths based on content.
        Some select list based tests are rebaselined because minimum width of RenderMenuList changes
        based on the content with this fix.

        * fast/forms/selectlist-minsize.html: Added.
        * platform/mac/fast/forms/selectlist-minsize-expected.txt: Added.
        * platform/qt/editing/pasteboard/4641033-expected.txt:
        * platform/qt/editing/pasteboard/4944770-1-expected.txt:
        * platform/qt/editing/pasteboard/4944770-2-expected.txt:
        * platform/qt/editing/selection/caret-before-select-expected.txt:
        * platform/qt/fast/forms/003-expected.txt:
        * platform/qt/fast/forms/004-expected.txt:
        * platform/qt/fast/forms/HTMLOptionElement_label06-expected.txt:
        * platform/qt/fast/forms/HTMLOptionElement_label07-expected.txt:
        * platform/qt/fast/forms/basic-selects-expected.txt:
        * platform/qt/fast/forms/menulist-deselect-update-expected.txt:
        * platform/qt/fast/forms/menulist-separator-painting-expected.txt:
        * platform/qt/fast/forms/menulist-style-color-expected.txt:
        * platform/qt/fast/forms/option-script-expected.txt:
        * platform/qt/fast/forms/select-background-none-expected.txt:
        * platform/qt/fast/forms/select-baseline-expected.txt:
        * platform/qt/fast/forms/select-dirty-parent-pref-widths-expected.txt:
        * platform/qt/fast/forms/select-empty-option-height-expected.txt:
        * platform/qt/fast/forms/select-size-expected.txt:
        * platform/qt/fast/forms/select-style-expected.txt:
        * platform/qt/fast/forms/selectlist-minsize-expected.txt: Added.
        * platform/qt/fast/invalid/014-expected.txt:
        * platform/qt/fast/replaced/replaced-breaking-expected.txt:
        * platform/qt/fast/replaced/replaced-breaking-mixture-expected.txt:
        * platform/qt/fast/replaced/three-selects-break-expected.txt:
        * platform/qt/tables/mozilla/bugs/bug29326-expected.txt:
        * platform/qt/tables/mozilla/core/margins-expected.txt:
2011-06-03  Doreen Jiang  <doreen.jiang@nokia.com>

        Reviewed by Benjamin Poulain.

        [Qt]The minimum size of the select menu list is incorrect for qtwebkit
        https://bugs.webkit.org/show_bug.cgi?id=56752

        The minimum width of the select-box is calculated to be as small as possible
        instead of hardcoded value (width of 7 characters) in minimumMenuListSize() function
        This will avoid overapping the select lists in popular websites.

        Test: fast/forms/selectlist-minsize.html

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::minimumMenuListSize):

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

6 years ago2011-06-02 Ryosuke Niwa <rniwa@webkit.org>
Ademar de Souza Reis Jr [Fri, 3 Jun 2011 15:51:57 +0000 (12:51 -0300)]
2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION: inline style is lost when deleting line break between paragraphs with same style
        https://bugs.webkit.org/show_bug.cgi?id=61899

        Added a regression test to ensure WebKit preserves font family for a paragraph being merged
        to the previous paragraph when deleting a line break between two paragraphs with the same style.

        * editing/deleting/delete-line-break-between-paragraphs-with-same-style-expected.txt: Added.
        * editing/deleting/delete-line-break-between-paragraphs-with-same-style.html: Added.
2011-06-02  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION: inline style is lost when deleting line break between paragraphs with same style
        https://bugs.webkit.org/show_bug.cgi?id=61899

        The bug was caused by ReplaceSelectionCommand::doApply's calling handleStyleSpansBeforeInsertion
        before insertionPos is adjusted by positionAvoidingPrecedingNodes and positionOutsideTabSpan.

        Fixed the bug by calling handleStyleSpansBeforeInsertion after the calls to these two functions.

        Test: editing/deleting/delete-line-break-between-paragraphs-with-same-style.html

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):

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

Conflicts:

Source/WebCore/editing/ReplaceSelectionCommand.cpp