WebKit-https.git
7 years agoMac rebaseline after r145242. I'm really hoping that the optimization didn't mess...
rniwa@webkit.org [Fri, 8 Mar 2013 20:56:39 +0000 (20:56 +0000)]
Mac rebaseline after r145242. I'm really hoping that the optimization didn't mess this up.

* css1/box_properties/margin_bottom-expected.txt: Replaced.
* css1/box_properties/margin_top-expected.txt: Replaced.
* css1/box_properties/padding_bottom-expected.txt: Replaced.
* css1/box_properties/padding_top-expected.txt: Replaced.
* css1/color_and_background/background_attachment-expected.txt: Replaced.
* platform/mac/css1/formatting_model/vertical_formatting-expected.txt:
* platform/mac/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt:
* platform/mac/css3/flexbox/flexbox-baseline-expected.txt:
* platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/mac/tables/mozilla/bugs/bug126742-expected.txt:
* platform/mac/tables/mozilla/bugs/bug69187-expected.txt:
* platform/win-future/css1: Added.
* platform/win-future/css1/box_properties: Added.
* platform/win-future/css1/box_properties/margin_bottom-expected.txt: Added.
* platform/win-future/css1/box_properties/margin_top-expected.txt: Added.
* platform/win-future/css1/box_properties/padding_bottom-expected.txt: Added.
* platform/win-future/css1/box_properties/padding_top-expected.txt: Added.
* platform/win-future/css1/color_and_background: Added.
* platform/win-future/css1/color_and_background/background_attachment-expected.txt: Added.

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

7 years agonon-Mac ports build fix after r145235.
rniwa@webkit.org [Fri, 8 Mar 2013 20:47:53 +0000 (20:47 +0000)]
non-Mac ports build fix after r145235.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::createInspectorPageGroup):

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

7 years ago[Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
benjamin@webkit.org [Fri, 8 Mar 2013 20:40:09 +0000 (20:40 +0000)]
[Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
https://bugs.webkit.org/show_bug.cgi?id=111297

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

The 'view-mode' Media Feature spec is implemented in WebCore but
there is no WebKit support for it on Mac.
Because of this, we always lie and report a windowed view mode.

This patch add a feature flag for the feature and disable it on
Mac so that we stop reporting incorrect default values.

* WebCore.exp.in:
* css/CSSValueKeywords.in:
* css/MediaFeatureNames.h:
(MediaFeatureNames):
* css/MediaQueryEvaluator.cpp:
* css/MediaQueryExp.cpp:
(WebCore::featureWithCSSValueID):
(WebCore::featureWithoutValue):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(Page):

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:

Source/WTF:

* wtf/FeatureDefines.h: Add a new feature flag for the view-mode
CSS media: ENABLE_VIEW_MODE_CSS_MEDIA.

Tools:

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setViewModeMediaFeature):

LayoutTests:

* platform/mac/TestExpectations:
Mark the view-mode tests as failing to track any regression
or crash in this area.

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

7 years ago Make it possible to reuse sandbox extensions
ap@apple.com [Fri, 8 Mar 2013 20:25:58 +0000 (20:25 +0000)]
    Make it possible to reuse sandbox extensions
        https://bugs.webkit.org/show_bug.cgi?id=111883

        Reviewed by Anders Carlsson.

        Replaced invalidate() with revoke().

        We now count how many times consume() was called, and keep the extension active
        for as long as revoke() hasn't been called as many times. Also, we only permanently
        destroy the extension in destructor.

        This allows for properly keeping extensions in NetworkBlobRegistry for as long as
        they are needed.

        * NetworkProcess/SchedulableLoader.cpp:
        (WebKit::SchedulableLoader::invalidateSandboxExtensions):
        * Shared/Downloads/Download.cpp:
        (WebKit::Download::didFinish):
        (WebKit::Download::didFail):
        (WebKit::Download::didCancel):
        * Shared/SandboxExtension.h:
        (SandboxExtension):
        * Shared/WebMemorySampler.cpp:
        (WebKit::WebMemorySampler::stop):
        * Shared/mac/SandboxExtensionMac.mm:
        (WebKit::SandboxExtension::SandboxExtension):
        (WebKit::SandboxExtension::revoke):
        (WebKit::SandboxExtension::consume):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::performDragControllerAction):
        (WebKit::WebPage::SandboxExtensionTracker::invalidate):
        (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
        (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
        (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):

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

7 years agoAfter sending message, Mail changes formatting
rniwa@webkit.org [Fri, 8 Mar 2013 20:11:02 +0000 (20:11 +0000)]
After sending message, Mail changes formatting
https://bugs.webkit.org/show_bug.cgi?id=111360

Reviewed by Enrica Casucci.

Source/WebCore:

Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
isomorphic but this is a step forward.

Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::isProhibitedParagraphChild): Added. Matches the list at
https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
except main element, which is currently missing in the specification.
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
(WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.

* editing/ReplaceSelectionCommand.h:
(ReplaceSelectionCommand):

LayoutTests:

Added a regression test, demonstrating that a paragraph element is not nested after a paste.
Also rebaselined multiple tests that had been exhibiting this bug in their expected results.

* editing/pasteboard/block-wrappers-necessary-expected.txt:
* editing/pasteboard/paste-table-001-expected.txt:
* editing/pasteboard/paste-text-011-expected.txt:
* editing/pasteboard/paste-text-015-expected.txt:
* editing/pasteboard/pasting-into-p-should-not-nest-p-expected.txt: Added.
* editing/pasteboard/pasting-into-p-should-not-nest-p.html: Added.
* editing/pasteboard/pasting-into-h6-should-not-nest-h6-expected.txt: Added.
* editing/pasteboard/pasting-into-h6-should-not-nest-h6.html: Added.
* platform/mac/editing/pasteboard/paste-text-016-expected.txt:

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

7 years agoUnreviewed. Rolled Chromium DEPS to r186991. Requested by
commit-queue@webkit.org [Fri, 8 Mar 2013 19:58:54 +0000 (19:58 +0000)]
Unreviewed.  Rolled Chromium DEPS to r186991.  Requested by
"James Robinson" <jamesr@chromium.org> via sheriffbot.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-08

* DEPS:

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

7 years agoUnreviewed chromium mac/win rebaselines for r145242.
eae@chromium.org [Fri, 8 Mar 2013 19:34:08 +0000 (19:34 +0000)]
Unreviewed chromium mac/win rebaselines for r145242.

* css1/basic/inheritance-expected.txt: Added.
* css1/box_properties/clear_float-expected.txt: Added.
* css1/box_properties/margin-expected.txt: Added.
* css1/box_properties/padding-expected.txt: Added.
* css1/font_properties/font_weight-expected.txt: Added.
* fast/css-generated-content/015-expected.txt: Added.
* fast/css/h1-in-section-elements-expected.txt: Added.
* platform/chromium-linux/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt: Removed.
* platform/chromium-mac-lion/css1/box_properties/clear_float-expected.png:
* platform/chromium-mac-lion/css1/box_properties/padding-expected.png:
* platform/chromium-mac-lion/css1/font_properties/font_weight-expected.png:
* platform/chromium-mac-lion/css3/flexbox/flexbox-baseline-expected.png:
* platform/chromium-mac-lion/fast/css/h1-in-section-elements-expected.png:
* platform/chromium-mac-lion/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt: Removed.
* platform/chromium-mac-lion/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-mac-lion/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-mac-lion/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac-lion/tables/mozilla/bugs/bug126742-expected.png:
* platform/chromium-mac-lion/tables/mozilla/bugs/bug69187-expected.png:
* platform/chromium-mac-lion/tables/mozilla/bugs/bug73321-expected.png:
* platform/chromium-mac-lion/tables/mozilla/bugs/bug73321-expected.txt: Added.
* platform/chromium-mac-snowleopard/css1/basic/inheritance-expected.png:
* platform/chromium-mac-snowleopard/css1/box_properties/padding-expected.png:
* platform/chromium-mac-snowleopard/css1/color_and_background/background_attachment-expected.png:
* platform/chromium-mac-snowleopard/css1/font_properties/font_weight-expected.png:
* platform/chromium-mac-snowleopard/css2.1/t080301-c411-vt-mrgn-00-b-expected.png:
* platform/chromium-mac-snowleopard/css3/flexbox/flexbox-baseline-expected.png:
* platform/chromium-mac-snowleopard/fast/css/h1-in-section-elements-expected.png:
* platform/chromium-mac-snowleopard/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt: Removed.
* platform/chromium-mac-snowleopard/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-mac-snowleopard/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-mac-snowleopard/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla/bugs/bug126742-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla/bugs/bug69187-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla/bugs/bug73321-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla/bugs/bug73321-expected.txt: Added.
* platform/chromium-mac/css1/basic/inheritance-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/clear_float-expected.png:
* platform/chromium-mac/css1/box_properties/clear_float-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/margin-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/margin_bottom-expected.txt: Added.
* platform/chromium-mac/css1/box_properties/margin_top-expected.txt: Added.
* platform/chromium-mac/css1/box_properties/padding-expected.png:
* platform/chromium-mac/css1/box_properties/padding-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/padding_bottom-expected.txt: Added.
* platform/chromium-mac/css1/box_properties/padding_top-expected.txt: Added.
* platform/chromium-mac/css1/color_and_background/background_attachment-expected.txt: Added.
* platform/chromium-mac/css1/font_properties/font_weight-expected.png:
* platform/chromium-mac/css1/font_properties/font_weight-expected.txt: Removed.
* platform/chromium-mac/css1/formatting_model/vertical_formatting-expected.txt:
* platform/chromium-mac/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt:
* platform/chromium-mac/css3/flexbox/flexbox-baseline-expected.png:
* platform/chromium-mac/css3/flexbox/flexbox-baseline-expected.txt:
* platform/chromium-mac/fast/css-generated-content/015-expected.txt: Removed.
* platform/chromium-mac/fast/css/h1-in-section-elements-expected.png:
* platform/chromium-mac/fast/css/h1-in-section-elements-expected.txt: Removed.
* platform/chromium-mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt: Added.
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: Removed.
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug126742-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug126742-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug69187-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug69187-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug73321-expected.png:
* platform/chromium-mac/tables/mozilla/bugs/bug73321-expected.txt: Added.
* platform/chromium-win/css1/basic/inheritance-expected.png:
* platform/chromium-win/css1/box_properties/clear_float-expected.png:
* platform/chromium-win/css1/box_properties/margin_top-expected.png:
* platform/chromium-win/css1/font_properties/font_weight-expected.png:
* platform/chromium-win/css3/flexbox/flexbox-baseline-expected.png:
* platform/chromium-win/fast/css/h1-in-section-elements-expected.png:
* platform/chromium-win/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt: Added.
* platform/chromium-win/tables/mozilla/bugs/bug126742-expected.png:
* platform/chromium-win/tables/mozilla/bugs/bug69187-expected.png:
* platform/chromium-win/tables/mozilla/bugs/bug73321-expected.png:
* platform/chromium/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt: Removed.
* platform/chromium/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: Added.
* platform/chromium/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt: Removed.
* platform/mac/css1/basic/inheritance-expected.txt: Removed.
* platform/mac/css1/box_properties/clear_float-expected.txt: Removed.
* platform/mac/css1/box_properties/margin-expected.txt: Removed.
* platform/mac/css1/box_properties/padding-expected.txt: Removed.
* platform/mac/css1/font_properties/font_weight-expected.txt: Removed.
* platform/mac/fast/css-generated-content/015-expected.txt: Removed.
* platform/mac/fast/css/h1-in-section-elements-expected.txt: Removed.

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

7 years agoUnreviewed apple rebaselines for r145242.
eae@chromium.org [Fri, 8 Mar 2013 19:28:30 +0000 (19:28 +0000)]
Unreviewed apple rebaselines for r145242.

* css1/box_properties/margin_bottom-expected.txt: Added.
* css1/box_properties/margin_top-expected.txt: Added.
* css1/box_properties/padding_bottom-expected.txt: Added.
* css1/box_properties/padding_top-expected.txt: Added.
* css1/color_and_background/background_attachment-expected.txt: Added.
* platform/chromium-mac/css1/box_properties/margin_bottom-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/margin_top-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/padding_bottom-expected.txt: Removed.
* platform/chromium-mac/css1/box_properties/padding_top-expected.txt: Removed.
* platform/chromium-mac/css1/color_and_background/background_attachment-expected.txt: Removed.
* platform/chromium-mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: Added.
* platform/chromium-mac/tables/mozilla/bugs/bug73321-expected.txt: Removed.
* platform/chromium/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: Removed.
* platform/efl/tables/mozilla/bugs/bug73321-expected.txt: Removed.
* platform/mac-lion/css1/box_properties: Removed.
* platform/mac/css1/basic/inheritance-expected.txt:
* platform/mac/css1/box_properties/clear_float-expected.txt:
* platform/mac/css1/box_properties/margin-expected.txt:
* platform/mac/css1/box_properties/margin_bottom-expected.txt: Removed.
* platform/mac/css1/box_properties/margin_top-expected.txt: Removed.
* platform/mac/css1/box_properties/padding-expected.txt:
* platform/mac/css1/box_properties/padding_bottom-expected.txt: Removed.
* platform/mac/css1/box_properties/padding_top-expected.txt: Removed.
* platform/mac/css1/color_and_background/background_attachment-expected.txt: Removed.
* platform/mac/css1/font_properties/font_weight-expected.txt:
* platform/mac/fast/css-generated-content/015-expected.txt:
* platform/mac/fast/css/h1-in-section-elements-expected.txt:
* platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/mac/tables/mozilla/bugs/bug73321-expected.txt:
* tables/mozilla/bugs/bug73321-expected.txt: Added.

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

7 years agoAtomicHTMLToken should not be heap allocated or RefCounted
eric@webkit.org [Fri, 8 Mar 2013 19:15:40 +0000 (19:15 +0000)]
AtomicHTMLToken should not be heap allocated or RefCounted
https://bugs.webkit.org/show_bug.cgi?id=111250

Reviewed by Adam Barth.

It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
We don't need the actual "token" saved, just enough of it to recreate a fake token.

This removed many more mallocs than I thought it would, for a nice little speed win.
Before:
median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
After:
median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms

* html/parser/AtomicHTMLToken.h:
(AtomicHTMLToken):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createElementFromSavedToken):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
(WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::isHTMLIntegrationPoint):
* html/parser/HTMLFormattingElementList.cpp:
(WebCore):
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
(WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::create):
(WebCore::HTMLStackItem::localName):
(WebCore::HTMLStackItem::attributes):
(WebCore::HTMLStackItem::getAttributeItem):
(HTMLStackItem):
(WebCore::HTMLStackItem::hasLocalName):
(WebCore::HTMLStackItem::hasTagName):
(WebCore::HTMLStackItem::HTMLStackItem):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processFakeStartTag):
(WebCore::HTMLTreeBuilder::processFakeEndTag):
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
(WebCore::HTMLTreeBuilder::defaultForBeforeHead):
(WebCore::HTMLTreeBuilder::defaultForInHead):
(WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
(WebCore::HTMLTreeBuilder::defaultForAfterHead):
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement):

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

7 years agoMakefile fixes.
roger_fong@apple.com [Fri, 8 Mar 2013 18:57:08 +0000 (18:57 +0000)]
Makefile fixes.

* WTF.vcxproj/WTF.make:
* JavaScriptCore.vcxproj/JavaScriptCore.make:
* WebCore.vcxproj/WebCore.make:

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

7 years ago[WK2][GTK] Invalid request returned by webkit_download_get_request if called before...
commit-queue@webkit.org [Fri, 8 Mar 2013 18:42:29 +0000 (18:42 +0000)]
[WK2][GTK] Invalid request returned by webkit_download_get_request if called before download starts
https://bugs.webkit.org/show_bug.cgi?id=111574

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-08
Reviewed by Alexey Proskuryakov.

webkit_download_get_request() creates the WebKitURIRequest object
on demand using the ResourceRequest from the DownloadProxy. The
ResourceRequest of the DownloadProxy is set in
DownloadProxy::didStart(), so if we call
webkit_download_get_request() before didStart we return an invalid
WebKitURIRequest created from a NULL ResourceRequest. This is not
a problem for downloads started in the web process, because we
create the WebKitDownload after DownloadProxy::didStart(). For
downloads started manually with webkit_web_context_download_uri()
we need to create download object with the ResourceRequest passed
to the DownloadProxy.

* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadCreateForRequest): New helper function for
downloads started manually to created them with a given
ResourceRequest.
* UIProcess/API/gtk/WebKitDownloadPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextStartDownload): Use
webkitDownloadCreateForRequest().
* UIProcess/API/gtk/tests/TestDownloads.cpp:
(testDownloadLocalFile):
(testDownloadLocalFileError):
(testDownloadRemoteFile):
(testDownloadRemoteFileError):
(testPolicyResponseDownload):

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

7 years agoSkip editing/selection/drag-list-item.html on Mac WebKit2 since drag and drop is...
rniwa@webkit.org [Fri, 8 Mar 2013 18:33:39 +0000 (18:33 +0000)]
Skip editing/selection/drag-list-item.html on Mac WebKit2 since drag and drop is not supported
in WebKitTestRunner yet.

* platform/mac-wk2/TestExpectations:

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

7 years ago[sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
eae@chromium.org [Fri, 8 Mar 2013 18:30:46 +0000 (18:30 +0000)]
[sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
https://bugs.webkit.org/show_bug.cgi?id=111794

Source/WebCore:

Reviewed by Levi Weintraub.

In RenderTableCell::logicalHeightForRowSizing the
adjustedLogicalHeight is calculated from the logicalHeight and
intrinsic padding and is then returned and floored. This can
cause cause the cell to be slightly smaller (0.5px) than the
element it contains.

Test: fast/sub-pixel/table-cell-height.html

* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::logicalHeightForRowSizing):
Change to use pixelSnapped version of logicalHeight method and
change signature to return int as the only caller immediately
down-casts the result to an int.

LayoutTests:

Reviewed by Levi Weintraub.

Add test for zoomed-in table containing block child.

* fast/sub-pixel/table-cell-height-expected.html: Added.
* fast/sub-pixel/table-cell-height.html: Added.

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

7 years agoRenderFullScreen needs to clear override sizes when exiting full screen
commit-queue@webkit.org [Fri, 8 Mar 2013 18:27:59 +0000 (18:27 +0000)]
RenderFullScreen needs to clear override sizes when exiting full screen
https://bugs.webkit.org/show_bug.cgi?id=111775

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-08
Reviewed by Ojan Vafai.

Source/WebCore:

Test: fullscreen/full-screen-with-flex-item.html

* rendering/RenderFullScreen.cpp:
(RenderFullScreen::unwrapRenderer):
RenderFullScreen is a flexbox, so it will potentially set override
sizes on its children while in fullscreen mode. When we exit
fullscreen mode, we need to clear this override size, otherwise the
the leftover override size may affect layout. See the testcase for an
example.

LayoutTests:

* fullscreen/full-screen-with-flex-item-expected.txt: Added.
* fullscreen/full-screen-with-flex-item.html: Added.

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

7 years ago[CSS Grid Layout] Handle 2 positions with one 'auto' properly
jchaffraix@webkit.org [Fri, 8 Mar 2013 18:25:30 +0000 (18:25 +0000)]
[CSS Grid Layout] Handle 2 positions with one 'auto' properly
https://bugs.webkit.org/show_bug.cgi?id=111653

Reviewed by Tony Chang.

Source/WebCore:

The rendering code was making the assumption that we have one position.
Thus it couldn't fully match what the specification wants as the 2 opposite
positions are required to resolve either position in several cases (e.g.
1 / span 2, auto / 'c').

This change introduces resolveGridPositionsFromStyle to do both opposite
positions resolution in one pass and thus handling more cases.

Test: fast/css-grid-layout/grid-item-spanning-resolution.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::maximumIndexInDirection):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
Updated the above functions to rely on resolveGridPositionsFromStyle.

(WebCore::RenderGrid::resolveGridPositionsFromStyle):
Added this new function that handle the correct resolution.

(WebCore::RenderGrid::resolveGridPositionFromStyle):
Updated the ASSERT to match the new code flow.

* rendering/RenderGrid.h:
(WebCore::RenderGrid::GridSpan::GridSpan):
Introduced this new struct to hold the 2 positions along one axis.

LayoutTests:

* fast/css-grid-layout/grid-auto-flow-resolution-expected.txt:
* fast/css-grid-layout/grid-auto-flow-resolution.html:
* fast/css-grid-layout/grid-item-spanning-resolution-expected.txt: Added.
* fast/css-grid-layout/grid-item-spanning-resolution.html: Added.
Extended and added a new test. Most of the new testing is failing as it
requires other changes to land. This will help us track our progress
towards fully supporting the new syntax and padding.

* fast/css-grid-layout/resources/grid.css:
Added the 2 new classes.

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

7 years agoRenderTextControlSingleLine should not assume that its text element has a renderer
dominicc@chromium.org [Fri, 8 Mar 2013 18:12:39 +0000 (18:12 +0000)]
RenderTextControlSingleLine should not assume that its text element has a renderer
https://bugs.webkit.org/show_bug.cgi?id=111826

Reviewed by Ojan Vafai.

Source/WebCore:

Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
       fast/forms/search/search-hide-decoration-container-crash.html
       fast/forms/search/search-scroll-hidden-decoration-container-crash.html

* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::controlClipRect):
(WebCore::RenderTextControlSingleLine::autoscroll):
(WebCore::RenderTextControlSingleLine::scroll):

LayoutTests:

* fast/forms/search/search-autoscroll-hidden-decoration-container-crash-expected.txt: Added.
* fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html: Added.
* fast/forms/search/search-hide-decoration-container-crash-expected.txt: Added.
* fast/forms/search/search-hide-decoration-container-crash.html: Added.
* fast/forms/search/search-scroll-hidden-decoration-container-crash-expected.txt: Added.
* fast/forms/search/search-scroll-hidden-decoration-container-crash.html: Added.

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

7 years agoIndexedDB: Use WeakPtr for Factory-to-BackingStore reference
jsbell@chromium.org [Fri, 8 Mar 2013 18:06:23 +0000 (18:06 +0000)]
IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
https://bugs.webkit.org/show_bug.cgi?id=111459

Reviewed by Adam Barth.

Source/WebCore:

IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
origin is opened, the backing store instance must be re-used). This was a map to raw
pointers so that the backing store can be collected when all database references are
dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
would add/remove itself on creation/destruction.

Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
"leak" but are purged on subsequent opens.

Added webkit_unit_test (Chromium port) to verify refcounts.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
(WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
(WebCore::IDBBackingStore::open): Ditto.
* Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
(WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
(WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl): Remove plumbing methods.

Source/WebKit/chromium:

Add new test that verifies refcounts.

* WebKit.gyp: Don't include files depending on webkit_support.
* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp): No need for dummy factory.
(MockIDBFactoryBackend): Allow access to protected openBackingStore method.
(WebCore::TEST): Add new test that verifies refcounts.
* tests/IDBCleanupOnIOErrorTest.cpp:
(WebCore::TEST): No need for dummy factory.

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

7 years ago <rdar://problem/13363499> Blobs are not cleaned up when WebProcess terminates
ap@apple.com [Fri, 8 Mar 2013 17:38:36 +0000 (17:38 +0000)]
    <rdar://problem/13363499> Blobs are not cleaned up when WebProcess terminates
        https://bugs.webkit.org/show_bug.cgi?id=111803

        Reviewed by Brady Eidson.

        Track which blobs were created for each connection, and unregister them when
        the connection closes.

        Normally, this happens when a document is destroyed through PublicURLManager
        in WebProcess. But we don't get there when the web process crashes, or is terminated
        without waiting for document destruction.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURL):
        (WebKit::NetworkBlobRegistry::unregisterBlobURL):
        (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::didClose):
        (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
        (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
        (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):

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

7 years agoMake the WebKit2 Web Inspector use tiled drawing and accelerated drawing.
timothy@apple.com [Fri, 8 Mar 2013 17:30:54 +0000 (17:30 +0000)]
Make the WebKit2 Web Inspector use tiled drawing and accelerated drawing.

<rdar://problem/12676223>

Reviewed by David Kilzer.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::createInspectorPageGroup): Call setAcceleratedDrawingEnabled with true on 10.8+.
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorWKView _shouldUseTiledDrawingArea]): Added. Return YES on 10.8+.

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

7 years ago@media queries do not take zooming into account
commit-queue@webkit.org [Fri, 8 Mar 2013 17:19:58 +0000 (17:19 +0000)]
@media queries do not take zooming into account
https://bugs.webkit.org/show_bug.cgi?id=53186

Patch by John Mellor <johnme@chromium.org> on 2013-03-08
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Fixes @media width and height to take into account full page zoom, by
adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
corresponding to the existing code in Element::clientWidth which makes
document.documentElement.clientWidth take into account page zoom.

Test: fast/media/mq-width-pagezoom.html

* css/MediaQueryEvaluator.cpp:
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):

LayoutTests:

* fast/media/mq-width-pagezoom-expected.html: Added.
* fast/media/mq-width-pagezoom.html: Added.

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

7 years ago[BlackBerry] Add stubs for DNSResolveQueue platform specific methods
commit-queue@webkit.org [Fri, 8 Mar 2013 17:12:24 +0000 (17:12 +0000)]
[BlackBerry] Add stubs for DNSResolveQueue platform specific methods
https://bugs.webkit.org/show_bug.cgi?id=111841

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

Add empty implementations of
DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
build.

* platform/network/blackberry/DNSBlackBerry.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
(WebCore::DNSResolveQueue::platformResolve):

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

7 years ago[Mac] [WK2] platform/mac/accessibility/press-action-is-first.html fails
cfleizach@apple.com [Fri, 8 Mar 2013 16:59:16 +0000 (16:59 +0000)]
[Mac] [WK2] platform/mac/accessibility/press-action-is-first.html fails
https://bugs.webkit.org/show_bug.cgi?id=111814

Reviewed by Ryosuke Niwa.

Tools:

Add the needed supportedActions() attribute to WKTestRunner.

* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::supportedActions):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::supportedActions):

LayoutTests:

* platform/mac-wk2/TestExpectations:

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

7 years agoCoordinated Graphics: Handle scrolling correctly.
commit-queue@webkit.org [Fri, 8 Mar 2013 16:33:39 +0000 (16:33 +0000)]
Coordinated Graphics: Handle scrolling correctly.
https://bugs.webkit.org/show_bug.cgi?id=111406

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-08
Reviewed by Simon Fraser.

Coordinated Graphics deals with fast scrolling and slow scrolling in the same
routine, so WebChromeClient::invalidateContentsForSlowScroll() should call
DrawingArea:scroll().

When CoordinatedLayerTreeHost::scrollNonCompositedContents() is called, we
should call scheduleLayerFlush() to notify to UI Process. In addition, when we
don't use fixed layout, we should call setNonCompositedContentsNeedDisplay() to
update non composited contents.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::invalidateContentsForSlowScroll):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):

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

7 years ago Adding a hook to collect data for a Google UMA histogram to track when
commit-queue@webkit.org [Fri, 8 Mar 2013 16:28:32 +0000 (16:28 +0000)]
   Adding a hook to collect data for a Google UMA histogram to track when
       m_needsCompositedScrolling is turned on and off.
       https://bugs.webkit.org/show_bug.cgi?id=111725

       Reviewed by Julien Chaffraix.

       We want to keep track of this information to quantify the effects of a
       few patches that will cause us to opt in to composited scrolling.
       Specifically, we want to measure the effects of
       https://bugs.webkit.org/show_bug.cgi?id=109302,
       https://bugs.webkit.org/show_bug.cgi?id=109966,
       https://bugs.webkit.org/show_bug.cgi?id=109591, and
       https://bugs.webkit.org/show_bug.cgi?id=107618.

       We do this by measuring a per-layer boolean value, and comparing the
       ratio between number of layers opted in and number of layers that remain
       uncomposited. We hope the relative number of layers opting in will
       increase after the relevant patches land and are enabled.

       Unfortunately implementing extra statistics is impractical at the
       moment since most of the actionable relevant data is expensive to
       compute. For example, it would be useful to know if the layers that opt
       out do so because of invisible or non-overlapping layers that cause a
       potential stacking container's children to be discontiguous, because we
       would potentially be able to mitigate the problem. However, this would
       add considerable overhead to perform overlap testing just to gather
       data.

       No new tests (no change in behaviour).

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

Patch by Glenn Hartmann <hartmanng@chromium.org> on 2013-03-08

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

7 years agoUnreviewed EFL gardening.
sudarsana.nagineni@linux.intel.com [Fri, 8 Mar 2013 16:28:21 +0000 (16:28 +0000)]
Unreviewed EFL gardening.

Update platform expectations for failing tests after r145024 and r145067.

* platform/efl/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/efl/fast/forms/datalist/input-list-expected.txt:
* platform/efl/fast/forms/validationMessage-expected.txt: Added.

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

7 years agoUnreviewed EFL gardening.
sudarsana.nagineni@linux.intel.com [Fri, 8 Mar 2013 16:06:21 +0000 (16:06 +0000)]
Unreviewed EFL gardening.

Skip failing tests on EFL bots.

* platform/efl/TestExpectations:

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

7 years ago[BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
commit-queue@webkit.org [Fri, 8 Mar 2013 16:00:59 +0000 (16:00 +0000)]
[BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
https://bugs.webkit.org/show_bug.cgi?id=111852

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This changed in r139353.

* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
(WebCore::GraphicsContext::clipRoundedRect):

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

7 years ago[BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
commit-queue@webkit.org [Fri, 8 Mar 2013 15:59:17 +0000 (15:59 +0000)]
[BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
https://bugs.webkit.org/show_bug.cgi?id=111840

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This parameter was added in r137011.

* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation):

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

7 years ago[BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
commit-queue@webkit.org [Fri, 8 Mar 2013 15:57:27 +0000 (15:57 +0000)]
[BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
https://bugs.webkit.org/show_bug.cgi?id=111838

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This was removed in r139138.

* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:

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

7 years ago[BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
commit-queue@webkit.org [Fri, 8 Mar 2013 15:56:00 +0000 (15:56 +0000)]
[BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
https://bugs.webkit.org/show_bug.cgi?id=111836

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

This parameter was added in r139967.

* platform/graphics/blackberry/PathBlackBerry.cpp:
(WebCore):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::canvasClip):

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

7 years ago[Qt] Unreviewed gardening. Unskip now passing compositing tests.
kadam@inf.u-szeged.hu [Fri, 8 Mar 2013 15:51:34 +0000 (15:51 +0000)]
[Qt] Unreviewed gardening. Unskip now passing compositing tests.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:
* platform/qt/compositing/visibility/visibility-image-layers-dynamic-expected.txt: Added.

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

7 years agoWeb Inspector: Get rid of file system ids and use file pathes as uri for file based...
vsevik@chromium.org [Fri, 8 Mar 2013 15:39:36 +0000 (15:39 +0000)]
Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
https://bugs.webkit.org/show_bug.cgi?id=111753

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/FileSystemMapping.js:
(WebInspector.FileSystemMappingImpl):
(WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
(WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
(WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
(WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
(WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
(WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
(WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
* inspector/front-end/FileSystemProjectDelegate.js:
(WebInspector.FileSystemProjectDelegate.projectId):
(WebInspector.FileSystemProjectDelegate.prototype.id):
(WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
(WebInspector.FileSystemWorkspaceProvider):
(WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
(WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
(WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
* inspector/front-end/IsolatedFileSystemManager.js:
(WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
(WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
* inspector/front-end/Workspace.js:
(WebInspector.Workspace.prototype.uiSourceCodeForURL):

LayoutTests:

* inspector/file-system-mapping-expected.txt:
* inspector/file-system-mapping.html:
* inspector/file-system-project-expected.txt:
* inspector/workspace-mapping-expected.txt:
* inspector/workspace-mapping.html:

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

7 years agoWeb Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
vsevik@chromium.org [Fri, 8 Mar 2013 15:25:04 +0000 (15:25 +0000)]
Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
https://bugs.webkit.org/show_bug.cgi?id=111732

Reviewed by Pavel Feldman.

Resources matching inspectedPageURL are always expanded in NavigatorView now.
Snippets tab in scripts navigator is not automatically opened anymore.
Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.

* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorView):
(WebInspector.NavigatorView.prototype.addUISourceCode):
(WebInspector.NavigatorView.prototype._inspectedURLChanged):
(WebInspector.NavigatorView.prototype.revealUISourceCode):
(WebInspector.NavigatorView.prototype.removeUISourceCode):
(WebInspector.NavigatorFolderTreeElement.prototype.onattach):
(WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
(WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._showFile):
* inspector/front-end/Settings.js:
(WebInspector.VersionController.prototype._updateVersionFrom1To2):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
(WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
(WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):

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

7 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Fri, 8 Mar 2013 15:14:52 +0000 (15:14 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations: Skip test after r145195.

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

7 years agoWeb Inspector: Add shortcut for running a snippet.
vsevik@chromium.org [Fri, 8 Mar 2013 15:11:30 +0000 (15:11 +0000)]
Web Inspector: Add shortcut for running a snippet.
https://bugs.webkit.org/show_bug.cgi?id=111680

Reviewed by Pavel Feldman.

Added Ctrl/Cmd+Enter as a shortcut for running a snippet.

* inspector/front-end/SnippetJavaScriptSourceFrame.js:
(WebInspector.SnippetJavaScriptSourceFrame):
(WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
(WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
(WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):

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

7 years ago[EFL] Memory leak at WKViewClientWebProcessCallbacks API test
mikhail.pozdnyakov@intel.com [Fri, 8 Mar 2013 15:05:26 +0000 (15:05 +0000)]
[EFL] Memory leak at WKViewClientWebProcessCallbacks API test
https://bugs.webkit.org/show_bug.cgi?id=111851

Reviewed by Kenneth Rohde Christiansen.

* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp:
(TestWebKitAPI::TEST):

    Fixed WKURLRef instance leaking.

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

7 years agoPrevent infinite loop in SVG use cycle detection
pdr@google.com [Fri, 8 Mar 2013 14:37:57 +0000 (14:37 +0000)]
Prevent infinite loop in SVG use cycle detection
https://bugs.webkit.org/show_bug.cgi?id=111822

Reviewed by Stephen Chenney.

Source/WebCore:

SVG use cycle detection depended on idForStyleResolution() which differs from
getIdAttribute() in quirks mode. During use tree cycle detection, this difference
resulted in an infinite loop because idForStyleResolution() used lower-cased id
attributes. This patch removes an existing fixme for this and switches to using
getIdAttribute().

Test: svg/custom/use-cycle-detection.html

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::hasCycleUseReferencing):

LayoutTests:

* svg/custom/use-cycle-detection-expected.html: Added.
* svg/custom/use-cycle-detection.html: Added.

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

7 years agoWhen we set word-wrap: break-word and xml:space="preserve" to svg text element, the...
commit-queue@webkit.org [Fri, 8 Mar 2013 14:32:54 +0000 (14:32 +0000)]
When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
https://bugs.webkit.org/show_bug.cgi?id=111675

Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2013-03-08
Reviewed by Stephen Chenney.

Source/WebCore:

RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().

In the following spec, SVG don't perform automatic line break or word wrapping.
http://www.w3.org/TR/SVG/text.html#Introduction
> SVG performs no automatic line breaking or word wrapping.
However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
This make single character lines and make RenderSVGText narrow.

We must ignore word-wrap property to make the text a single line.

We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.

Test: svg/text/preserve-break-word.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.

LayoutTests:

Test combination of xml:space="preserve" and word-wrap: break-word to SVG Text.
These text should not be collapsed.

* svg/text/preserve-break-word-expected.html: Added.
* svg/text/preserve-break-word.html: Added.

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

7 years ago[Qt] HTML5 video - sound volume bar out of widget
allan.jensen@digia.com [Fri, 8 Mar 2013 14:23:01 +0000 (14:23 +0000)]
[Qt] HTML5 video - sound volume bar out of widget
https://bugs.webkit.org/show_bug.cgi?id=108213

Reviewed by Jocelyn Turcotte.

Since we use Safari shadow DOM for media controls, follow
the overall layout of Safari media control CSS.

* css/mediaControlsQt.css:
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
(audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
(audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
(audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
(audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
(audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
(audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):

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

7 years ago[WK2][EFL] Remove EwkView::setImageData()
mikhail.pozdnyakov@intel.com [Fri, 8 Mar 2013 14:13:35 +0000 (14:13 +0000)]
[WK2][EFL] Remove EwkView::setImageData()
https://bugs.webkit.org/show_bug.cgi?id=111849

Reviewed by Andreas Kling.

EwkView::setImageData() removed as it is not used at the moment
(it used to be part of eliminated non coord graphics code path).

* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/EwkView.h:
(EwkView):
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate):

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

7 years agoAllow platform-dependent strings for validationMessage property
tkent@chromium.org [Fri, 8 Mar 2013 14:12:56 +0000 (14:12 +0000)]
Allow platform-dependent strings for validationMessage property
https://bugs.webkit.org/show_bug.cgi?id=111846

Reviewed by Kentaro Hara.

Do not check matching with fixed strings in validationMessage.html
test. We print validationMessage values in the test instead.
We'd like to change user-visible strings at our own discretion.

* fast/forms/validationMessage-expected.txt:
Note that many platforms don't have a dedicated message for
badInput and uses the same message as typeMismatch for now.
* fast/forms/validationMessage.html:
* platform/chromium/fast/forms/validationMessage-expected.txt:
Chromium has a dedicated one for badInput.

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

7 years ago[Qt] QWebSettings::clearMemoryCaches should release FastMalloc's free pages to OS
commit-queue@webkit.org [Fri, 8 Mar 2013 13:43:50 +0000 (13:43 +0000)]
[Qt] QWebSettings::clearMemoryCaches should release FastMalloc's free pages to OS
https://bugs.webkit.org/show_bug.cgi?id=111605

Patch by Arunprasad Rajkumar <arunprasadr@nds.com> on 2013-03-08
Reviewed by Jocelyn Turcotte.

* Api/qwebsettings.cpp:
(QWebSettings::clearMemoryCaches):

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

7 years ago[Qt] Doesn't build with QtMultimedia
allan.jensen@digia.com [Fri, 8 Mar 2013 13:24:11 +0000 (13:24 +0000)]
[Qt] Doesn't build with QtMultimedia
https://bugs.webkit.org/show_bug.cgi?id=111847

Reviewed by Jocelyn Turcotte.

Fix include.

* platform/graphics/qt/MediaPlayerPrivateQt.h:

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

7 years ago[EFL] [WK2] Some authentication tests fail in WebKit2
ch.dumez@sisa.samsung.com [Fri, 8 Mar 2013 13:18:57 +0000 (13:18 +0000)]
[EFL] [WK2] Some authentication tests fail in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=106407

Reviewed by Kenneth Rohde Christiansen.

Tools:

Add patch from upstream for libsoup 2.40 to fix several authentication
test cases.

* efl/jhbuild.modules:
* efl/patches/libsoup-2.40-auth-fix.patch: Added.

LayoutTests:

Unskip several authentication test cases now that we cherry-picked
the needed libsoup fix from upstream.

* platform/efl-wk2/TestExpectations:

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Fri, 8 Mar 2013 12:12:07 +0000 (12:12 +0000)]
Unreviewed GTK gardening.

* platform/gtk/fast/js/global-constructors-expected.txt: Rebaselining after r145200.

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

7 years ago[EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
commit-queue@webkit.org [Fri, 8 Mar 2013 11:25:47 +0000 (11:25 +0000)]
[EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
https://bugs.webkit.org/show_bug.cgi?id=111829

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-08
Reviewed by Noam Rosenthal.

Currently, flagsChanged deals with all boolean flags. It introduces this bug
because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
to false. So this patch updates all flags when at least one flag is changed.

In addition, this patch amends isScrollable code to match other flags.

This patch can only be tested manually since there is no automated
testing facilities for in-motion touch.
Test: ManualTests/fixed-position.html
      ManualTests/nested-fixed-position.html

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setScrollableArea):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):

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

7 years ago[GTK] Memory leak in webkit_web_view_load_request() in WebKit2 API
commit-queue@webkit.org [Fri, 8 Mar 2013 10:40:10 +0000 (10:40 +0000)]
[GTK] Memory leak in webkit_web_view_load_request() in WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=111160

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-08
Reviewed by Benjamin Poulain.

leakRef() is used for the returned PassRefPtr without taking the
ownership of the leaked ref.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_request): Use RefPtr local variable.

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

7 years ago[Autotools] Remove definitions of unnecessary Automake conditionals
zandobersek@gmail.com [Fri, 8 Mar 2013 10:29:30 +0000 (10:29 +0000)]
[Autotools] Remove definitions of unnecessary Automake conditionals
https://bugs.webkit.org/show_bug.cgi?id=111830

Reviewed by Philippe Normand.

The following Automake conditionals are not used anywhere and should have their
definitions in SetupAutomake.m4 removed:
ENABLE_GAMEPAD, ENABLE_XSLT, ENABLE_GEOLOCATION, ENABLE_SVG_FONTS,
ENABLE_OPCODE_STATS, ENABLE_CSS_FILTERS, ENABLE_CSS_SHADERS.

* Source/autotools/SetupAutomake.m4:

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

7 years ago[GTK] Enable Web Audio in development builds
zandobersek@gmail.com [Fri, 8 Mar 2013 10:08:05 +0000 (10:08 +0000)]
[GTK] Enable Web Audio in development builds
https://bugs.webkit.org/show_bug.cgi?id=111831

Reviewed by Philippe Normand.

Web Audio is already quite well supported on the GTK port but still has a few issues
that must be addressed before it is enabled by default. Despite that it should be enabled
in development builds just so we are up-to-date with future feature infrastructure changes.
The Web Audio-related layout tests are not run yet due to missing support in DRT/WKTR, but
that's an obvious goal before enabling the feature in release builds.

* Scripts/webkitperl/FeatureList.pm:

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

7 years ago[GTK] Remove media stream support from the configuration options
zandobersek@gmail.com [Fri, 8 Mar 2013 10:06:35 +0000 (10:06 +0000)]
[GTK] Remove media stream support from the configuration options
https://bugs.webkit.org/show_bug.cgi?id=111813

Reviewed by Philippe Normand.

Remove the media-stream configuration flag. The feature is incomplete and
thus unsupported, so it really shouldn't be possible to enable it.

* Source/autotools/PrintBuildConfiguration.m4:
* Source/autotools/ReadCommandLineArguments.m4:
* Source/autotools/SetupAutomake.m4:
* Source/autotools/SetupWebKitFeatures.m4:

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Fri, 8 Mar 2013 10:04:28 +0000 (10:04 +0000)]
Unreviewed GTK gardening.

Skipping the tests in inspector-protocol/layers as they rely on compositing support
which is not available on the GTK builders.
Adding failure expectations for tests that regressed with r145100.

* platform/gtk/TestExpectations:

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

7 years agoRemove dead label code in snapshotted plugin
dino@apple.com [Fri, 8 Mar 2013 10:01:42 +0000 (10:01 +0000)]
Remove dead label code in snapshotted plugin
https://bugs.webkit.org/show_bug.cgi?id=111781

Reviewed by Tim Horton.

Since ports can use the shadow tree to do label display,
there is no need for the hardcoded timers in RenderSnapshottedPlugin.

* rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
(WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
(WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
(WebCore::RenderSnapshottedPlugIn::updateSnapshot):
(WebCore::RenderSnapshottedPlugIn::handleEvent):
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):

Conflicts:
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp

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

7 years agoImplement a custom appearance for the snapshotted plugin background
dino@apple.com [Fri, 8 Mar 2013 10:01:21 +0000 (10:01 +0000)]
Implement a custom appearance for the snapshotted plugin background
https://bugs.webkit.org/show_bug.cgi?id=108368

Reviewed by NOBODY (OOPS!).

Source/WebCore:

After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
snapshotted plugin was no longer drawing the background of the
label blurred. Since the snapshot content was now a shadow tree,
it wasn't feasible to pre-blur a region of the snapshot: the label
could be any size and in any location, with ports being able to
override the appearance through their UA style sheet.

Instead we now use one of the elements in the tree, the snapshot-overlay,
as a hook where ports can add any effect they want. This could be simply
a border, or a transparent mask, or even a CSS filter. We introduce a custom
CSS appearance "snapshotted-plugin-overlay", which could be added to the
element in the injected UA stylesheet. This calls into RenderTheme in
the same way that custom controls do.

Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
content of the plugin snapshot into the background of the element. That
way we can add effects in CSS.

Test: plugins/snapshot-appearance.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
* css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
* platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
* html/HTMLPlugInElement.h:
(WebCore::toHTMLPlugInElement): Add safer casting helpers.
* html/HTMLPlugInImageElement.h:
(WebCore::toHTMLPlugInImageElement): Ditto.
* rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
    the blur directly in the renderer.
(WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
    no longer trying to blur here.
(WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
* rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
    to blur the image directly.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
* rendering/RenderThemeMacShared.h:
(RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
* rendering/RenderThemeMacShared.mm:
(WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
    that takes the snapshot image from the node's parent, and draws it into the background.
    Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).

LayoutTests:

Toggles our new snapshotted-plugin-overlay appearance, to make sure it
isn't getting applied to non-plugins.

* plugins/snapshot-appearance-expected.html: Added.
* plugins/snapshot-appearance.html: Added.

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

7 years agoImprove drag&drop of list items in contentEditable divs
sergio@webkit.org [Fri, 8 Mar 2013 09:58:28 +0000 (09:58 +0000)]
Improve drag&drop of list items in contentEditable divs
https://bugs.webkit.org/show_bug.cgi?id=111556

Reviewed by Ryosuke Niwa.

Source/WebCore:

A single fully selected <li> should generate the same markup as if
we were selecting some of them, i.e., we should preserve the list
structure and appearance.

Test: editing/selection/drag-list-item.html

* editing/htmlediting.cpp:
(WebCore::isListItem): modified constness.
* editing/htmlediting.h:
(WebCore): ditto.
* editing/markup.cpp:
(WebCore::highestAncestorToWrapMarkup):

LayoutTests:

Added a new test case. The test performs 2 drag&drops, first of
all a selection of a single list item, and secondly a selection of
two list items. It checks that both behave the same way, i.e, the
whole <li> is moved and not only the text.

* editing/selection/drag-list-item-expected.txt: Added.
* editing/selection/drag-list-item.html: Added.

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

7 years agoCache flush problem on ARMv7 JSC
rgabor@webkit.org [Fri, 8 Mar 2013 09:27:38 +0000 (09:27 +0000)]
Cache flush problem on ARMv7 JSC
https://bugs.webkit.org/show_bug.cgi?id=111441

Reviewed by Zoltan Herczeg.

Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests.
The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712.
Change the cache fulsh mechanism similar to ARM traditinal and revert the
temporary fix.

Source/JavaScriptCore:

* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::cacheFlush):

Source/WTF:

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::decommit):

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

7 years ago[BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
commit-queue@webkit.org [Fri, 8 Mar 2013 09:21:24 +0000 (09:21 +0000)]
[BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
https://bugs.webkit.org/show_bug.cgi?id=111828

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-08
Reviewed by Carlos Garcia Campos.

This changed in r141637.

* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::updateTextureContentsIfNeeded):

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

7 years ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Fri, 8 Mar 2013 09:17:18 +0000 (09:17 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations: Skip failing test after r145100.
* platform/qt/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Rebaselining after r145067.

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

7 years agoFix a couple of typos, unreviewed.
graouts@apple.com [Fri, 8 Mar 2013 08:56:45 +0000 (08:56 +0000)]
Fix a couple of typos, unreviewed.

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

7 years ago[BlackBerry] Use OwnPtr for CredentialBackingStore members
commit-queue@webkit.org [Fri, 8 Mar 2013 08:29:02 +0000 (08:29 +0000)]
[BlackBerry] Use OwnPtr for CredentialBackingStore members
https://bugs.webkit.org/show_bug.cgi?id=111737

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-08
Reviewed by Rob Buis.

It simplifies the code a bit.

* platform/network/blackberry/CredentialBackingStore.cpp:
(WebCore::CredentialBackingStore::~CredentialBackingStore):
(WebCore::CredentialBackingStore::open):
(WebCore::CredentialBackingStore::certMgrWrapper):
* platform/network/blackberry/CredentialBackingStore.h:
(CredentialBackingStore):

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

7 years ago[chromium] delay clearing the TestRunners until the main view was deleted
jochen@chromium.org [Fri, 8 Mar 2013 08:00:54 +0000 (08:00 +0000)]
[chromium] delay clearing the TestRunners until the main view was deleted
https://bugs.webkit.org/show_bug.cgi?id=111823

Reviewed by Eric Seidel.

During WebViewHost::shutdown, we navigate the WebView to about:blank.
This may call into the test runners which assume that the delegate is
always non-NULL.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell):

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

7 years agoMemoryPressureHandler should fully flush the WebCore & NS URL caches
barraclough@apple.com [Fri, 8 Mar 2013 07:57:01 +0000 (07:57 +0000)]
MemoryPressureHandler should fully flush the WebCore & NS URL caches
https://bugs.webkit.org/show_bug.cgi?id=111827

Rubber Stamped by Geoff Garen

When the handler is fired we should free as much memory as possible.

* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::releaseMemory):
    - fully flush the WebCore & NS URL caches

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

7 years agoSheriffbot whois command can't search by full name
commit-queue@webkit.org [Fri, 8 Mar 2013 07:55:38 +0000 (07:55 +0000)]
Sheriffbot whois command can't search by full name
https://bugs.webkit.org/show_bug.cgi?id=111825

Patch by Alan Cutter <alancutter@chromium.org> on 2013-03-07
Reviewed by Eric Seidel.

Allowed multiple arguments to Sheriffbot's whois command.
Updated test expectations.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Whois.execute):
* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest.test_whois):

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

7 years agoUpdate calendar picker UI
keishi@webkit.org [Fri, 8 Mar 2013 07:37:00 +0000 (07:37 +0000)]
Update calendar picker UI
https://bugs.webkit.org/show_bug.cgi?id=109439

Reviewed by Kent Tamura.

.:

* ManualTests/forms/calendar-picker.html: New test file with more options.
* ManualTests/forms/date-suggestion-picker.html: Copied from ManualTests/forms/calendar-picker.html. Old one kept for dat/time suggestion picker testing.

Source/WebCore:

This patch changes the calendar picker UI.

Added tests to existing calendar picker tests.
Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html

* Resources/pagepopups/calendarPicker.css:
(body):
(.rtl):
(.scroll-view):
(.scroll-view-content):
(.list-cell):
(.list-cell.hidden):
(.day-cell):
(.week-number-cell):
(.day-cell.today):
(.day-cell.highlighted):
(.day-cell.highlighted.disabled):
(.day-cell.selected):
(.day-cell.disabled):
(.day-cell.current-month):
(.calendar-table-view):
(.preparing .calendar-table-view:focus):
(.week-day-label):
(.week-number-label):
(.calendar-table-header-view):
(.calendar-picker):
(.calendar-header-view):
(.calendar-title):
(.rtl .calendar-title):
(.month-popup-button:disabled):
(.month-popup-button):
(.month-popup-button .disclosure-triangle):
(.month-popup-button .disclosure-triangle svg):
(.today-button::after):
(.calendar-navigation-button):
(.year-list-view):
(.year-list-cell):
(.year-list-cell .label):
(.year-list-cell .month-chooser):
(.month-buttons-row):
(.month-button):
(.month-button.highlighted):
(.scrubby-scroll-bar):
(.scrubby-scroll-thumb):
(.month-popup-view):
(.year-list-view .scrubby-scroll-bar):
(.rtl .year-list-view .scrubby-scroll-bar):
* Resources/pagepopups/calendarPicker.js:
(setGlobalParams): Sets the global params.
(initialize):
(openCalendarPicker):
(CalendarHeaderView.prototype.onNavigationButtonClick): Fix typo.
(CalendarPicker):
(CalendarPicker.prototype.onWindowResize): We want to have the "preparing" class applied
to cancel css transitions while setting up the calendar picker so we can avoid flaky pixel tests.
(CalendarPicker.prototype.onYearListViewDidHide): The user clicked on a month so hide the month popup.
(CalendarPicker.prototype.onYearListViewDidSelectMonth): Change the current month in response to the month popup.
(CalendarPicker.prototype.attachTo): We want the calendar table focused when the calendar picker first opens.
(CalendarPicker.prototype.cleanup): Clean up any event listeners or elements attached to nodes outside of this.element.
(CalendarPicker.prototype.onMonthPopupButtonClick): Open the month popup in response to the month popup button being clicked.
(CalendarPicker.prototype._setConfig): Configures the calendar picker.
(CalendarPicker.prototype.currentMonth): The currently shown month.
(CalendarPicker.prototype.setCurrentMonth): Scrolls the calendar table to the given month. Use the navigation behavior param to specify if you want a transition animation.
(CalendarPicker.prototype.adjustHeight): Adjusts the height so its just tall enough to fit the current month. If the month picker is open, fit that.
(CalendarPicker.prototype.selection): Currently selected date range.
(CalendarPicker.prototype.highlight): Currently highlighted date range.
(CalendarPicker.prototype.firstVisibleDay): Returns the first visible day ignoring scroll animation (i.e. this is the first visible day when the scroll animation is done).
(CalendarPicker.prototype.lastVisibleDay): Returns the last visible day ignoring scroll animation.
(CalendarPicker.prototype.selectRangeContainingDay): Sets the selection to the date range containing the given day.
(CalendarPicker.prototype.highlightRangeContainingDay): Sets the highlight to the date range containing the given day.
(CalendarPicker.prototype.setSelection): Sets the selection to the given date range.
(CalendarPicker.prototype._setHighlight): Sets the highlight to the given date range.
(CalendarPicker.prototype._stepMismatch): Just moving.
(CalendarPicker.prototype._outOfRange): Ditto.
(CalendarPicker.prototype.isValid): Returns true if the given date range is a valid selection.
(CalendarPicker.prototype.isValidDay): Returns true if the day is part of a valid selection.
(CalendarPicker.prototype._moveHighlight): Moves the highlight to the given date range if possible. Returns true if it succeeds.
(CalendarPicker.prototype.onCalendarTableKeyDown): Handles the arrow keys, etc.
(CalendarPicker.prototype.width):
(CalendarPicker.prototype.height):
(CalendarPicker.prototype.setHeight):
(CalendarPicker.prototype.onBodyKeyDown): Handles esc/m/y/d.
* Resources/pagepopups/chromium/calendarPickerChromium.css:
(.calendar-table-view:focus):
(.preparing .calendar-table-view:focus):

Source/WebKit/chromium:

* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument): Adding shortMonthLabels property.

LayoutTests:

* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/month-picker-appearance-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/month-picker-appearance-step-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-expected.png:
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step-expected.png:
* platform/chromium-win/platform/chromium/fast/forms/calendar-picker/month-picker-key-operations-expected.txt: Removed.
* platform/chromium-win/platform/chromium/fast/forms/calendar-picker/week-picker-key-operations-expected.txt: Removed.
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations-expected.txt:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-key-operations-expected.txt:
* platform/chromium-win/platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-key-operations-expected.txt:
* platform/chromium/TestExpectations:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-with-step-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-with-step.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-datetimelocal-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-datetimelocal.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-key-operations-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-key-operations.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-mouse-operations-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-mouse-operations.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-pre-100-year-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-pre-100-year.html:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-with-step-expected.txt:
* platform/chromium/fast/forms/calendar-picker/calendar-picker-with-step.html:
* platform/chromium/fast/forms/calendar-picker/date-picker-events-expected.txt:
* platform/chromium/fast/forms/calendar-picker/date-picker-events.html:
* platform/chromium/fast/forms/calendar-picker/datetimelocal-picker-events-expected.txt:
* platform/chromium/fast/forms/calendar-picker/datetimelocal-picker-events.html:
* platform/chromium/fast/forms/calendar-picker/month-picker-key-operations-expected.txt:
* platform/chromium/fast/forms/calendar-picker/month-picker-key-operations.html:
* platform/chromium/fast/forms/calendar-picker/month-picker-mouse-operations-expected.txt:
* platform/chromium/fast/forms/calendar-picker/month-picker-mouse-operations.html:
* platform/chromium/fast/forms/calendar-picker/month-picker-with-step-expected.txt:
* platform/chromium/fast/forms/calendar-picker/month-picker-with-step.html:
* platform/chromium/fast/forms/calendar-picker/resources/calendar-picker-common.js:
(currentMonth):
(highlightedValue):
(selectedValue):
(skipAnimation):
(hoverOverDayCellAt):
(clickDayCellAt):
* platform/chromium/fast/forms/calendar-picker/week-picker-key-operations-expected.txt:
* platform/chromium/fast/forms/calendar-picker/week-picker-key-operations.html:
* platform/chromium/fast/forms/calendar-picker/week-picker-mouse-operations-expected.txt:
* platform/chromium/fast/forms/calendar-picker/week-picker-mouse-operations.html:
* platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations-expected.txt:
* platform/chromium/fast/forms/suggestion-picker/date-suggestion-picker-key-operations.html:
* platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-key-operations-expected.txt:
* platform/chromium/fast/forms/suggestion-picker/month-suggestion-picker-key-operations.html:
* platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-key-operations-expected.txt:
* platform/chromium/fast/forms/suggestion-picker/week-suggestion-picker-key-operations.html:

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

7 years ago[EFL] EwkView should keep css position instead of scroll position in device pixel.
commit-queue@webkit.org [Fri, 8 Mar 2013 07:30:02 +0000 (07:30 +0000)]
[EFL] EwkView should keep css position instead of scroll position in device pixel.
https://bugs.webkit.org/show_bug.cgi?id=110847

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-07
Reviewed by Kenneth Rohde Christiansen.

Signed off for WebKit2 by Benjamin Poulain.

There are bugs that some code expect that EwkView::pagePosition() returns css
position while others expect that it returns scroll position in device pixel.
In addition, some code call EwkView::setPagePosition() with css position while
others call it with scroll position in device pixel.

This patch makes all code use setPagePosition() and pagePosition() with
UI pixels (a.k.a Density Independent Pixel).

* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::setViewportPosition):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::paintToCairoSurface):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::transformToScene):
(WebKit::WebView::pageDidRequestScroll):

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

7 years ago https://bugs.webkit.org/show_bug.cgi?id=111801
ap@apple.com [Fri, 8 Mar 2013 07:17:30 +0000 (07:17 +0000)]
    https://bugs.webkit.org/show_bug.cgi?id=111801
        https://bugs.webkit.org/show_bug.cgi?id=111801

        Reviewed by Geoff Garen.

        Move unnecessary includes out of headers.

        * NetworkProcess/HostRecord.h:
        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        * NetworkProcess/NetworkProcess.cpp:
        * NetworkProcess/NetworkResourceLoadScheduler.cpp:
        * NetworkProcess/NetworkResourceLoadScheduler.h:
        * NetworkProcess/NetworkResourceLoader.h:
        * NetworkProcess/SchedulableLoader.cpp:
        * NetworkProcess/SchedulableLoader.h:
        * NetworkProcess/SyncNetworkResourceLoader.cpp:

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

7 years agoWeb Inspector: Remove unused return value after r122962
commit-queue@webkit.org [Fri, 8 Mar 2013 07:10:52 +0000 (07:10 +0000)]
Web Inspector: Remove unused return value after r122962
https://bugs.webkit.org/show_bug.cgi?id=111821

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-03-07
Reviewed by Pavel Feldman.

No new tests.

* inspector/front-end/ConsolePanel.js:
(WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):

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

7 years agoUnreviewed gardening.
hayato@chromium.org [Fri, 8 Mar 2013 07:02:49 +0000 (07:02 +0000)]
Unreviewed gardening.

* platform/chromium/TestExpectations: compositing/rtl/rtl-iframe-absolute-overflow.html

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

7 years agoUnreviewed gardening.
hayato@chromium.org [Fri, 8 Mar 2013 06:29:22 +0000 (06:29 +0000)]
Unreviewed gardening.

* platform/chromium/TestExpectations: fast/js/exception-sequencing-binops2.html

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

7 years agoUnreviewed, rolling out r145166.
commit-queue@webkit.org [Fri, 8 Mar 2013 05:51:31 +0000 (05:51 +0000)]
Unreviewed, rolling out r145166.
http://trac.webkit.org/changeset/145166
https://bugs.webkit.org/show_bug.cgi?id=111819

build break - no symbol
webkit_support::CreateScopedTempDirectory() (Requested by
hayato on #webkit).

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

Source/WebCore:

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::IDBBackingStore):
(WebCore::IDBBackingStore::~IDBBackingStore):
(WebCore::IDBBackingStore::open):
* Modules/indexeddb/IDBBackingStore.h:
(WebCore):
(IDBBackingStore):
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
(WebCore):
(WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
(WebCore::IDBFactoryBackendImpl::openBackingStore):
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl):

Source/WebKit/chromium:

* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp):
(IDBBackingStoreTest):
* tests/IDBCleanupOnIOErrorTest.cpp:
(WebCore::TEST):

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

7 years agoSource/ThirdParty: Replace Mersenne Twister RNG with a simple but fast RNG
commit-queue@webkit.org [Fri, 8 Mar 2013 05:49:46 +0000 (05:49 +0000)]
Source/ThirdParty: Replace Mersenne Twister RNG with a simple but fast RNG
https://bugs.webkit.org/show_bug.cgi?id=111533

Patch by Andrew Bortz <andrew@abortz.net> on 2013-03-07
Reviewed by Adam Barth.

This code is no longer used.

* mt19937ar.c: Removed.

Source/WTF: Replace Mersenne Twister random number generator with a simpler one.
https://bugs.webkit.org/show_bug.cgi?id=111533

Patch by Andrew Bortz <andrew@abortz.net> on 2013-03-07
Reviewed by Adam Barth.

The new generator is only a single line long, but passes all the Diehard
statistical tests and runs ~3x faster than the Mersenne Twister, with a
guaranteed cycle length of 2^64 and only 8 bytes of state.

* wtf/Platform.h: Mersenne Twister defines are no longer needed
* wtf/RandomNumber.cpp:
(WTF::Internal::initializeRandomNumber): State initialization
(WTF::Internal::randomNumber): Actual implementation
(WTF::randomNumber): We don't need to fall back on rand()-based generator anymore,
so this code is greatly simplified.
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator): This code is no longer needed.
Additionally, the code had an error, since rand() returns 32-bits, so each
initializationBuffer's upper 16-bits has more bits set than random.

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

7 years agoAdd Mac WebKit2 test expectations per bugs 111814 and 111815.
hayato@chromium.org [Fri, 8 Mar 2013 04:48:24 +0000 (04:48 +0000)]
Add Mac WebKit2 test expectations per bugs 111814 and 111815.

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2013-03-07

* platform/mac-wk2/TestExpectations:

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

7 years agoAdd Mac WebKit2 test expectations per bugs 111814 and 111815.
rniwa@webkit.org [Fri, 8 Mar 2013 04:31:29 +0000 (04:31 +0000)]
Add Mac WebKit2 test expectations per bugs 111814 and 111815.

* platform/mac-wk2/TestExpectations:

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

7 years agoAdd Nils Barth and Koji Hara to committers.py
commit-queue@webkit.org [Fri, 8 Mar 2013 04:29:37 +0000 (04:29 +0000)]
Add Nils Barth and Koji Hara to committers.py
https://bugs.webkit.org/show_bug.cgi?id=111806

Patch by Nils Barth <nbarth@chromium.org> on 2013-03-07
Reviewed by Eric Seidel.

* Scripts/webkitpy/common/config/committers.py:

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

7 years agoCustom Elements: CustomElement constructor shouldn't share function instance
morrita@google.com [Fri, 8 Mar 2013 04:25:52 +0000 (04:25 +0000)]
Custom Elements: CustomElement constructor shouldn't share function instance
https://bugs.webkit.org/show_bug.cgi?id=111807

Reviewed by Kentaro Hara.

Source/WebCore:

Adaptor functions of custom elements unintentionally share the instance.
This fix gives new one for each.

Test: Updated fast/dom/custom/document-register-basic.html

* bindings/v8/V8AdaptorFunction.cpp:
(WebCore::V8AdaptorFunction::wrap):

LayoutTests:

* fast/dom/custom/document-register-basic-expected.txt:
* fast/dom/custom/document-register-basic.html:

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

7 years agoUnreviewed gardening.
hayato@chromium.org [Fri, 8 Mar 2013 04:24:23 +0000 (04:24 +0000)]
Unreviewed gardening.

* platform/win/TestExpectations: Remove duplication of svg/custom/foreign-object-skew.svg.

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

7 years agorun-pert-tests should have a --test-runner-count option
glenn@skynav.com [Fri, 8 Mar 2013 04:11:54 +0000 (04:11 +0000)]
run-pert-tests should have a --test-runner-count option
https://bugs.webkit.org/show_bug.cgi?id=111726

Reviewed by Ryosuke Niwa.

Add --test-runner-count option to run-perf-tests, with default value of 4.
This option allows command line configuration of the number of times to invoke
the test runner (serially, not in parallel) when running a specific test in
a test set.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest): Add DEFAULT_TEST_RUNNER_COUNT constant.
(PerfTest.__init__): Rename process_run_count to test_runner_count (throughout).
(PerfTest.run): Rename process_run_count to test_runner_count.
(SingleProcessPerfTest.__init__): Add test_runner_count optional argument.
(ChromiumStylePerfTest.__init__): Add test_runner_count optional argument.
(ReplayPerfTest.__init__): Add test_runner_count optional argument.
(PerfTestFactory.create_perf_test): Add test_runner_count optional argument.
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args): Add '--test-runner-count' option.
(PerfTestsRunner._collect_tests): Use test_runner_count when creating PerfTest.
* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(MainTest._test_run_with_json_output): Add optional compare_logs argument.
(MainTest.test_run_with_repeat):
(MainTest.test_run_with_test_runner_count): Add new test for test-runner-count option semantics.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_default_args): Add test for default option argument values.
(MainTest.test_parse_args): Add test for test-runner-count option parsing.

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

7 years agoReading border radius from style property returns in wrong order.
commit-queue@webkit.org [Fri, 8 Mar 2013 03:52:08 +0000 (03:52 +0000)]
Reading border radius from style property returns in wrong order.
https://bugs.webkit.org/show_bug.cgi?id=110853

Source/WebCore:

Patch by Jared Wyles <wyles@adobe.com> on 2013-03-07
Reviewed by Ryosuke Niwa

Updating the order of border-radius to return in the order specified
in http://www.w3.org/TR/css3-background/#the-border-radius

Tests updated in LayoutTests/fast/borders/border-radius-parsing.html
Changed the expectations in LayoutTests/inspector/elements/elements-panel-styles-expected.txt

Compat information -
jQuery's css function favours using getComputedStyle for elements so that should not be impacted.
Zepto does check for the element on style first so may be a slight concern there.

* css/StylePropertyShorthand.cpp:
(WebCore::borderRadiusShorthand):

LayoutTests:

Patch by Jared Wyles <wyles@adobe.com> on 2013-03-07
Reviewed by Ryosuke Niwa

* fast/borders/border-radius-parsing-expected.txt:
* fast/borders/border-radius-parsing.html:
* inspector/elements/elements-panel-styles-expected.txt:

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

7 years agoREGRESSION (r143759): 40% JSBench regression, 20% Octane/closure regression, 40%...
ggaren@apple.com [Fri, 8 Mar 2013 03:01:27 +0000 (03:01 +0000)]
REGRESSION (r143759): 40% JSBench regression, 20% Octane/closure regression, 40% Octane/jquery regression, 2% Octane regression
https://bugs.webkit.org/show_bug.cgi?id=111797

Reviewed by Oliver Hunt.

The bot's testing configuration stresses the cache's starting guess
of 1MB.

This patch removes any starting guess, and just uses wall clock time
to discover the initial working set size of an app, in code size.

* runtime/CodeCache.cpp:
(JSC::CodeCacheMap::pruneSlowCase): Update our timer as we go.

Also fixed a bug where pruning from 0 to 0 would hang -- that case is
a possibility now that we start with a capacity of 0.

* runtime/CodeCache.h:
(CodeCacheMap):
(JSC::CodeCacheMap::CodeCacheMap):
(JSC::CodeCacheMap::add):
(JSC::CodeCacheMap::prune): Don't prune if we're in the middle of
discovering the working set size of an app, in code size.

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

7 years agoAdd didFocusTextField:inFrame to WebFormDelegate
andersca@apple.com [Fri, 8 Mar 2013 02:29:48 +0000 (02:29 +0000)]
Add didFocusTextField:inFrame to WebFormDelegate
https://bugs.webkit.org/show_bug.cgi?id=111804

Reviewed by Dan Bernstein.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedNodeChanged):
* WebView/WebFormDelegate.h:
* WebView/WebFormDelegate.m:
(-[WebFormDelegate didFocusTextField:inFrame:]):

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

7 years agoResizing Cappuccino is very laggy on WebKit since Safari 5.1
akling@apple.com [Fri, 8 Mar 2013 02:24:34 +0000 (02:24 +0000)]
Resizing Cappuccino is very laggy on WebKit since Safari 5.1
<http://webkit.org/b/71354>
<rdar://problem/10565998>

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in: Export FloatPoint(const NSPoint&)

Source/WebKit2:

On Mac, we already cache the window rect through the WindowAndViewFramesChanged
message, so simply return that in WebChromeClient::windowRect() instead of
sending a synchronous query to the UIProcess.

If a programmatic resize is requested, we bypass the cache until we've received
a new WindowAndViewFramesChanged message. This compromise allows us to return
cached rects in the common case, and handles creating a new window and immediately
resizing it gracefully.

Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
IntRect/IntPoint to match the ChromeClient::windowRect() return type.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateWindowAndViewFrames]):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginView.h:
(PluginView):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setWindowRect):
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::sendSetWindowFrame):
(WebKit::WebPage::windowAndViewFramesChanged):
* WebProcess/WebPage/WebPage.h:
(WebPage):
(WebKit::WebPage::windowFrameInScreenCoordinates):
(WebKit::WebPage::viewFrameInWindowCoordinates):
(WebKit::WebPage::hasCachedWindowFrame):
(WebKit::WebPage::accessibilityPosition):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):

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

7 years agoRemove desktop version of -webkit-text-size-adjust property.
akling@apple.com [Fri, 8 Mar 2013 02:08:41 +0000 (02:08 +0000)]
Remove desktop version of -webkit-text-size-adjust property.
<http://webkit.org/b/56543>
<rdar://problem/9150203>

Reviewed by Simon Fraser.

Source/WebCore:

This property existed to support a number of Apple-internal clients of WebKit.
We no longer need this property, and since it's clashing with a mobile version of the
same property with different meaning, let's remove it altogether from the desktop build.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyLineHeight::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::updateFont):
(WebCore::StyleResolver::applyProperties):
(WebCore::StyleResolver::applyProperty):
* css/StyleResolver.h:
(StyleResolver):
* css/svg.css:
* editing/EditingStyle.cpp:
* inspector/front-end/inspector.css:
(#console-messages):
* inspector/front-end/resourcesPanel.css:
(.storage-view.query):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):

LayoutTests:

* editing/pasteboard/5078739.html:
* editing/pasteboard/data-transfer-items-expected.txt:
* editing/pasteboard/onpaste-text-html-expected.txt:
* fast/css/font-size-nan.svg:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:
* fast/css/ignore-text-zoom.html: Removed.
* fast/css/text-rendering-priority.html:
* fast/events/ondrop-text-html-expected.txt:
* platform/chromium-linux/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/chromium-mac-lion/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/chromium-mac/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/chromium-win/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/chromium-win/fast/css/ignore-text-zoom-expected.txt: Removed.
* platform/chromium/fast/css/ignore-text-zoom-expected.txt: Removed.
* platform/efl/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/efl/fast/css/ignore-text-zoom-expected.txt: Removed.
* platform/gtk/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/gtk/fast/css/ignore-text-zoom-expected.txt: Removed.
* platform/mac/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/mac/fast/css/ignore-text-zoom-expected.txt: Removed.
* platform/qt/fast/css/ignore-text-zoom-expected.png: Removed.
* platform/qt/fast/css/ignore-text-zoom-expected.txt: Removed.

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

7 years agoDon't try to create a sandbox extension when path is empty
ap@apple.com [Fri, 8 Mar 2013 01:47:56 +0000 (01:47 +0000)]
Don't try to create a sandbox extension when path is empty
https://bugs.webkit.org/show_bug.cgi?id=111788

Reviewed by Anders Carlsson.

* Shared/FileAPI/BlobRegistrationData.cpp:
(WebKit::BlobRegistrationData::BlobRegistrationData): Skip File objects with empty
paths to avoid logging an error to console.

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

7 years agoIndexedDB: Use WeakPtr for Factory-to-BackingStore reference
jsbell@chromium.org [Fri, 8 Mar 2013 01:42:17 +0000 (01:42 +0000)]
IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
https://bugs.webkit.org/show_bug.cgi?id=111459

Reviewed by Adam Barth.

Source/WebCore:

IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
origin is opened, the backing store instance must be re-used). This was a map to raw
pointers so that the backing store can be collected when all database references are
dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
would add/remove itself on creation/destruction.

Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
"leak" but are purged on subsequent opens.

Added webkit_unit_test (Chromium port) to verify refcounts.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
(WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
(WebCore::IDBBackingStore::open): Ditto.
* Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
(WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
(WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl): Remove plumbing methods.

Source/WebKit/chromium:

Added tests to verify refcounts on backing stores, update method signatures.

* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp): No dummy factory needed.
(MockIDBFactoryBackend): Expose protected method to tests.
(WebCore::TEST): Added BackingStoreLifetime test.
* tests/IDBCleanupOnIOErrorTest.cpp: No dummy factory needed.

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

7 years agoFix commented out code in LayoutTests/http/tests/misc/delete-frame-during-readystatec...
acolwell@chromium.org [Fri, 8 Mar 2013 01:36:42 +0000 (01:36 +0000)]
Fix commented out code in LayoutTests/http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
https://bugs.webkit.org/show_bug.cgi?id=111800

Unreviewed.

* http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html:

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

7 years agoWebPageProxy::exceededDatabaseQuota() needs to be serialized.
mark.lam@apple.com [Fri, 8 Mar 2013 01:31:19 +0000 (01:31 +0000)]
WebPageProxy::exceededDatabaseQuota() needs to be serialized.
https://bugs.webkit.org/show_bug.cgi?id=111631.

Reviewed by Geoffrey Garen.

Previously, WebPageProxy::exceededDatabaseQuota() is called synchronously
with script execution in the WebProcess. Hence, it is never called in a
recursive manner.

In webkit2, we can have multiple WebProcesses concurrently triggering a
call to this function. While the function is waiting on feedback from a
UI dialog, the wait loop may re-enter the function to service a second
request to call this function from another WebProcess. This results in
problems where some of the WebProcesses will not get a proper reply, and
therefore hangs perpetually waiting for a non-forthcoming reply.

This changeset changes the function to queue the requests and ensure
that we do not recursively callback to the UI client.

* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
* UIProcess/WebPageProxy.cpp:
(ExceededDatabaseQuotaRecords):
(Record):
(WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
(WebKit::ExceededDatabaseQuotaRecords::ExceededDatabaseQuotaRecords):
(WebKit::ExceededDatabaseQuotaRecords::~ExceededDatabaseQuotaRecords):
(WebKit::ExceededDatabaseQuotaRecords::shared):
(WebKit::ExceededDatabaseQuotaRecords::createRecord):
(WebKit::ExceededDatabaseQuotaRecords::add):
(WebKit::ExceededDatabaseQuotaRecords::next):
(WebKit::WebPageProxy::exceededDatabaseQuota):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

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

7 years ago[BlackBerry] RefCounting ParsedCookie to avoid SegFaults
commit-queue@webkit.org [Fri, 8 Mar 2013 01:31:02 +0000 (01:31 +0000)]
[BlackBerry] RefCounting ParsedCookie to avoid SegFaults
https://bugs.webkit.org/show_bug.cgi?id=111761

Patch by Otto Derek Cheung <otcheung@rim.com> on 2013-03-07
Reviewed by Rob Buis.

Source/WebCore:

Making necessary changes to ref count the ParsedCookie object.

Tested using the opera cookie test suite and the BB Browser cookie test suite.
Tested using the browser, visiting popular sites such as facebook, reddit, google etc
to ensure cookie functionality isn't changed.

* loader/blackberry/CookieJarBlackBerry.cpp:
(WebCore::getRawCookies):
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
(WebCore::CookieDatabaseBackingStore::insert):
(WebCore::CookieDatabaseBackingStore::update):
(WebCore::CookieDatabaseBackingStore::remove):
(WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
(WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
(WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
(WebCore::CookieDatabaseBackingStore::addToChangeQueue):
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
(CookieDatabaseBackingStore):
* platform/blackberry/CookieManager.cpp:
(WebCore::cookieSorter):
(WebCore::CookieManager::setCookies):
(WebCore::CookieManager::getCookie):
(WebCore::CookieManager::generateHtmlFragmentForCookies):
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::checkAndTreatCookie):
(WebCore::CookieManager::addCookieToMap):
(WebCore::CookieManager::getBackingStoreCookies):
(WebCore::CookieManager::findOrCreateCookieMap):
(WebCore::CookieManager::removeCookieWithName):
(WebCore::CookieManager::cookieLimitCleanUp):
* platform/blackberry/CookieManager.h:
* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::addOrReplaceCookie):
(WebCore::CookieMap::removeCookieAtIndex):
(WebCore::CookieMap::removeCookie):
(WebCore::CookieMap::getAllCookies):
(WebCore::CookieMap::removeOldestCookie):
(WebCore::CookieMap::deleteAllCookiesAndDomains):
(WebCore::CookieMap::getAllChildCookies):
* platform/blackberry/CookieMap.h:
(CookieMap):
* platform/blackberry/CookieParser.cpp:
(WebCore):
(WebCore::CookieParser::parse):
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/CookieParser.h:
(CookieParser):
* platform/blackberry/ParsedCookie.cpp:
* platform/blackberry/ParsedCookie.h:
(ParsedCookie):
(WebCore::ParsedCookie::create):

Source/WebKit/blackberry:

Making necessary changes to ref-count the ParsedCookie object.

* Api/WebCookieJar.cpp:
(BlackBerry::WebKit::WebCookieJar::cookies):

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

7 years agoHeap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
acolwell@chromium.org [Fri, 8 Mar 2013 01:12:44 +0000 (01:12 +0000)]
Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=110623

Reviewed by Kentaro Hara.

Source/WebCore:

Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html

* bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
                                  that have pending activity.
* html/HTMLAudioElement.h:
(HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
* html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
                                                 has audio and is playing. This brings the code into
                                                 compliance with the detached element behavior outlined
                                                 in the HTML5 spec.
* html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
                             considered ActiveDOMObjects.

LayoutTests:

* http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal-expected.txt: Added.
* http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html: Added.
* http/tests/misc/resources/delete-frame-during-readystatechange-frame-with-gc-after-video-removal.html: Added.

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

7 years agoCFNetwork cache partitioning does not work properly on subdomains
jpfau@apple.com [Fri, 8 Mar 2013 01:10:54 +0000 (01:10 +0000)]
CFNetwork cache partitioning does not work properly on subdomains
https://bugs.webkit.org/show_bug.cgi?id=111772

Reviewed by David Kilzer.

Source/WebCore:

Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.

Not possible to test with current automated test tools, must be tested manually.

* loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
(WebCore):
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::evict):
(WebCore::MemoryCache::removeResourcesWithOrigin):
* platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
(ResourceRequest):
(WebCore::ResourceRequest::cachePartition):
(WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore):
(WebCore::ResourceRequest::partitionName):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name

Source/WebKit2:

Ensure that the CFString is UTF-8 so that WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition will always work.

* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::partitionName): Create a UTF-8 CFString explicitly

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

7 years ago Roll out an accidentally committed change I made for local testing.
ap@apple.com [Fri, 8 Mar 2013 01:06:58 +0000 (01:06 +0000)]
    Roll out an accidentally committed change I made for local testing.

        * http/tests/misc/empty-file-formdata.html:

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

7 years agoCompute WebGL context attributes from DrawingBuffer when it is used
kbr@google.com [Fri, 8 Mar 2013 01:06:47 +0000 (01:06 +0000)]
Compute WebGL context attributes from DrawingBuffer when it is used
https://bugs.webkit.org/show_bug.cgi?id=111666

Reviewed by James Robinson.

Fixed computation of antialias flag when DrawingBuffer is used.

No new tests; covered by existing tests. Ran WebGL conformance
tests on desktop Linux and Android to test.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::getContextAttributes):
    Query DrawingBuffer, when used, for antialias flag.

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

7 years agoAdd myself to reviewers.py
commit-queue@webkit.org [Fri, 8 Mar 2013 00:59:21 +0000 (00:59 +0000)]
Add myself to reviewers.py
https://bugs.webkit.org/show_bug.cgi?id=111757

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-07
Reviewed by Eric Seidel.

* Scripts/webkitpy/common/config/committers.py:

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Fri, 8 Mar 2013 00:59:15 +0000 (00:59 +0000)]
Unreviewed gardening.

* platform/chromium/TestExpectations: fast/events/before-unload-adopt-subframe-to-outside.html

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

7 years agoNeed API to draw custom overhang area
bdakin@apple.com [Fri, 8 Mar 2013 00:57:00 +0000 (00:57 +0000)]
Need API to draw custom overhang area
https://bugs.webkit.org/show_bug.cgi?id=111679
-and corresponding-
<rdar://problem/13291415>

Reviewed by Simon Fraser.

Source/WebCore:

This will allow clients to put custom images into the top or bottom overhang area.

New FrameView API takes a bool indicating whether the client wants a top/bottom
overhang layer. If the bool is true, the overhang layer will be returned.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setWantsLayerForTopOverHangArea):
(WebCore::FrameView::setWantsLayerForBottomOverHangArea):
* page/FrameView.h:
(FrameView):

Keep member variables for the top and bottom overhang layers. Create them if
necessary, and update them if the root layer changes.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::reportMemoryUsage):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):

Source/WebKit2:

The new API is WKBundlePageSetTopOverhangImage() and
WKBundlePageSetBottomOverhangImage(). When the API is called, WebPage will get
GraphicsLayers for the appropriate area from FrameView, and then set the image as
the contents of the layer.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetTopOverhangImage):
(WKBundlePageSetBottomOverhangImage):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setTopOverhangImage):
(WebKit):
(WebKit::WebPage::setBottomOverhangImage):

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Fri, 8 Mar 2013 00:54:35 +0000 (00:54 +0000)]
Unreviewed gardening.

* platform/chromium-linux/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.

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

7 years agoReduce page cache size on Mac
barraclough@apple.com [Fri, 8 Mar 2013 00:53:42 +0000 (00:53 +0000)]
Reduce page cache size on Mac
https://bugs.webkit.org/show_bug.cgi?id=111795

Rubber stamped by Geoff Garen

5 entries is unnecessarily large; research show 3 should suffice.
On a low memory warning we should clear this completely.

Source/WebCore:

* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::releaseMemory):
    - clear the page cache completely

Source/WebKit2:

* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):
    - reduce maximum to 3.

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

7 years agoAdding id attribute test for MediaStream
li.yin@intel.com [Fri, 8 Mar 2013 00:44:04 +0000 (00:44 +0000)]
Adding id attribute test for MediaStream
https://bugs.webkit.org/show_bug.cgi?id=111526

Reviewed by Kentaro Hara.

Spec: http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStream-id
The id strings must only use characters in the ranges U+0021, U+0023 to U+0027,
U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041 to U+005A,
U+005E to U+007E, and must be 36 characters long.

* fast/mediastream/MediaStreamConstructor-expected.txt:
* fast/mediastream/MediaStreamConstructor.html:

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

7 years agorun-perf-tests should have a --repeat option
glenn@skynav.com [Fri, 8 Mar 2013 00:38:45 +0000 (00:38 +0000)]
run-perf-tests should have a --repeat option
https://bugs.webkit.org/show_bug.cgi?id=100030

Reviewed by Ryosuke Niwa.

Add --repeat option to run-perf-tests, with default value of 1. When greater
than 1, runs test set specified number of times. Note that multiple runs are
not aggregated for statistical purposes.

Incidentally fixed typo: s/suceeds/succeeds/.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args): Add repeat option.
(PerfTestsRunner.run): Add outer repeat loop.
(PerfTestsRunner._generate_results): Split from original _generate_and_show_results.
(PerfTestsRunner._upload_and_show_results): Split from original _generate_and_show_results.
* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(MainTest._test_run_with_json_output): Add repeat optional argument for generating expected logs. Fix typo.
(MainTest._test_run_with_json_output.mock_upload_json): Fix typo.
(MainTest.test_run_with_json_output): Fix typo.
(MainTest.test_run_with_description): Fix typo.
(MainTest.test_run_respects_no_results): Fix typo.
(MainTest.test_run_with_slave_config_json): Fix typo.
(MainTest.test_run_with_multiple_repositories): Fix typo.
(MainTest.test_run_with_upload_json): Fix typo.
(MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Fix typo.
(MainTest.test_run_with_repeat): Added new test for repeat count semantics.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_parse_args): Add test for repeat option parsing.

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

7 years agoborder-fit should happen at layout time rather than paint time
dino@apple.com [Fri, 8 Mar 2013 00:26:06 +0000 (00:26 +0000)]
border-fit should happen at layout time rather than paint time
https://bugs.webkit.org/show_bug.cgi?id=111606

Unreviewed. Skipping some broken tests.

* platform/mac/TestExpectations:

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

7 years agoCrash when updating predictions below JSC::arrayProtoFuncForEach on tuaw.com article
msaboff@apple.com [Fri, 8 Mar 2013 00:19:39 +0000 (00:19 +0000)]
Crash when updating predictions below JSC::arrayProtoFuncForEach on tuaw.com article
https://bugs.webkit.org/show_bug.cgi?id=111777

Reviewed by Filip Pizlo.

Moved register allocations to be above any generated control flow so that any
resulting spill would be visible to all subsequently generated code.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compile):

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

7 years agoRename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
simon.fraser@apple.com [Thu, 7 Mar 2013 23:54:13 +0000 (23:54 +0000)]
Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
https://bugs.webkit.org/show_bug.cgi?id=111779

Reviewed by Tim Horton.

"TileCache" was a name conflict in downstream code, so rename it to TileController.
The layer that has a TileController is now a WebTiledBackingLayer (which fits with
the TiledBacking API that TileController exposes).

Also renamed the flags in PlatformCALayer to match.

Rename only, no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldUseTiledBacking):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
(WebCore::GraphicsLayerCA::updateVisibleRect):
(WebCore::GraphicsLayerCA::getDebugBorderInfo):
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::usesTiledBackingLayer):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::~PlatformCALayer):
(PlatformCALayer::tiledBacking):
* platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
* platform/graphics/ca/mac/WebTileLayer.h:
(TileController):
* platform/graphics/ca/mac/WebTileLayer.mm:
(-[WebTileLayer drawInContext:]):
(-[WebTileLayer setTileController:WebCore::]):
(-[WebTileLayer logFilledFreshTile]):
* platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
* platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::shouldUseTiledBacking):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::usingTiledBacking):
(RenderLayerBacking):
(WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidLayout):
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
(WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):

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