profile/ivi/webkit-efl.git
12 years agoAdd a perf test which updates the value of an already declared CSS property.
alexis.menard@openbossa.org [Tue, 27 Mar 2012 11:57:05 +0000 (11:57 +0000)]
Add a perf test which updates the value of an already declared CSS property.
https://bugs.webkit.org/show_bug.cgi?id=82321

Reviewed by Andreas Kling.

This benchmark update CSS existing properties of the style from JS.

* CSS/CSSPropertyUpdateValue.html: Added.

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

12 years agoA page containing multiparts with "multipart/x-mixed-replace" should not be cached.
commit-queue@webkit.org [Tue, 27 Mar 2012 11:53:15 +0000 (11:53 +0000)]
A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
https://bugs.webkit.org/show_bug.cgi?id=82291

Patch by Chris Guan <chris.guan@torchmobile.com.cn> on 2012-03-27
Reviewed by Rob Buis.

If we have a multiPart reponse with multipart/x-mixed-replace,
the current page should not be cached. I use isMultipartPayload()
API which was supposed to be set in NetworkJob to decide to
cache page or not.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::canCachePage):

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

12 years agoWeb Inspector: Editable TextViewer should show cursor when it is focused.
vsevik@chromium.org [Tue, 27 Mar 2012 11:40:29 +0000 (11:40 +0000)]
Web Inspector: Editable TextViewer should show cursor when it is focused.
https://bugs.webkit.org/show_bug.cgi?id=82320

Reviewed by Pavel Feldman.

TextViewer now focuses editable inner container unless read-only flag is set.

* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype.focus):
(WebInspector.TextEditorMainPanel):
(WebInspector.TextEditorMainPanel.prototype._handleElementFocus):
(WebInspector.TextEditorMainPanel.prototype.focus):

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

12 years agoUnreviewed. Unskip all GTK+ unit test.
carlosgc@webkit.org [Tue, 27 Mar 2012 11:08:49 +0000 (11:08 +0000)]
Unreviewed. Unskip all GTK+ unit test.

Currently, skipped tests contains the list of unit tests that have
failed in one or more bots. In this moment it's not possible to
skip just the test cases that fail, so the complete unit test is
skipped when a single test case fails. For that reason, we don't
know which test cases are actually failing for every skipped
test. We are planning to land a patch to allow skipping individual
test cases, but first we need to know which test cases are
currently failing in the bots to skip them. So, this patch simply
unskips all unit tests in order to watch the bots and get the list
of test cases failing. Failing tests will be skipped again as soon
as we have the new list of failing test cases.

* Scripts/run-gtk-tests:
(TestRunner): Reset the list of skipped tests.

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

12 years agoUnreviewed. Removing change markers from ChangeLog.
leviw@chromium.org [Tue, 27 Mar 2012 11:03:08 +0000 (11:03 +0000)]
Unreviewed. Removing change markers from ChangeLog.

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

12 years agoConvert RenderSelectionInfo::rect to LayoutUnits
leviw@chromium.org [Tue, 27 Mar 2012 10:52:49 +0000 (10:52 +0000)]
Convert RenderSelectionInfo::rect to LayoutUnits
https://bugs.webkit.org/show_bug.cgi?id=82213

Reviewed by Eric Seidel.

RenderSelectionInfoBase stores a cached repaint rect in local coordinates. Coordinates local to
renderers should be stored in LayoutUnits.

No new tests. No change in behavior.

* rendering/RenderSelectionInfo.h:
(WebCore::RenderSelectionInfo::rect):
(RenderSelectionInfo):

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

12 years agoEnable animVal support for SVGAnimatedRect
zimmermann@webkit.org [Tue, 27 Mar 2012 10:47:05 +0000 (10:47 +0000)]
Enable animVal support for SVGAnimatedRect
https://bugs.webkit.org/show_bug.cgi?id=82317

Reviewed by Zoltan Herczeg.

Source/WebCore:

Enable animVal support for SVGAnimatedRect. Very simple now that everything is prepared.
All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedRectAnimator.

Extended existing tests to cover this.

* svg/SVGAnimatedRect.cpp:
(WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedRectAnimator::animValWillChange):
(WebCore::SVGAnimatedRectAnimator::animValDidChange):
* svg/SVGAnimatedRect.h:
(SVGAnimatedRectAnimator):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::supportsAnimVal):

LayoutTests:

Extend SVGAnimatedRect tests to cover animVal support.

* svg/animations/script-tests/svgrect-animation-1.js:
(sample1):
(sample2):
(sample3):
* svg/animations/script-tests/svgrect-animation-2.js:
(sample1):
(sample2):
(sample3):
* svg/animations/svgrect-animation-1-expected.txt:
* svg/animations/svgrect-animation-2-expected.txt:

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

12 years ago2012-03-27 Nikolas Zimmermann <nzimmermann@rim.com>
zimmermann@webkit.org [Tue, 27 Mar 2012 10:44:12 +0000 (10:44 +0000)]
2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>

        Not reviewed. Use shouldBe() instead of shouldBeCloseEnough() when testing the baseVal in the SVGAngle tests.
        It doesn't get animated, and thus isn't timing dependant. All other tests are correct.

        * svg/animations/script-tests/svgangle-animation-deg-to-grad.js:
        (sample1):
        (sample2):
        (sample3):
        * svg/animations/script-tests/svgangle-animation-deg-to-rad.js:
        (sample1):
        (sample2):
        (sample3):
        * svg/animations/script-tests/svgangle-animation-grad-to-deg.js:
        (sample1):
        (sample2):
        (sample3):
        * svg/animations/script-tests/svgangle-animation-grad-to-rad.js:
        (sample1):
        (sample2):
        (sample3):
        * svg/animations/script-tests/svgangle-animation-rad-to-deg.js:
        (sample1):
        (sample2):
        (sample3):
        * svg/animations/script-tests/svgangle-animation-rad-to-grad.js:
        (sample1):
        (sample2):
        (sample3):

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

12 years agoUnreviewed, rolling out r112201.
commit-queue@webkit.org [Tue, 27 Mar 2012 10:43:36 +0000 (10:43 +0000)]
Unreviewed, rolling out r112201.
http://trac.webkit.org/changeset/112201
https://bugs.webkit.org/show_bug.cgi?id=82302

Breaks chromium's WebPageSerializerTest.HTMLNodes test
(Requested by pfeldman on #webkit).

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

* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::error):
(WebCore):
* loader/cache/CachedCSSStyleSheet.h:
(CachedCSSStyleSheet):
* loader/cache/CachedFont.cpp:
(WebCore):
(WebCore::CachedFont::error):
* loader/cache/CachedFont.h:
(CachedFont):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::error):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::error):
(WebCore):
* loader/cache/CachedScript.h:
(CachedScript):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::error):
(WebCore):
* loader/cache/CachedXSLStyleSheet.h:
(CachedXSLStyleSheet):

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

12 years ago[Qt] Unreviewed gardening. Skip accidentally unskipped tests again.
ossy@webkit.org [Tue, 27 Mar 2012 10:40:59 +0000 (10:40 +0000)]
[Qt] Unreviewed gardening. Skip accidentally unskipped tests again.

* platform/qt/Skipped:

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

12 years agoLayoutRepainter: Remove unused constructor parameter and update to LayoutUnits
leviw@chromium.org [Tue, 27 Mar 2012 10:35:27 +0000 (10:35 +0000)]
LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits
https://bugs.webkit.org/show_bug.cgi?id=82185

Reviewed by Eric Seidel.

Removing an optional parameter for old bounds in LayoutRepainter's constructor that
is no longer used. The old bounds are instead always gleaned from the renderer's
clippedOverflowRectForRepaint.

The renderer's bounds and outline rect also are stored in LayoutUnits to properly
detect sub-pixel changes during layout. Eventually, we'll pixel snap these values
when telling the embedder to invalidate. Adding a comment to that effect.

No new tests. No change in behavior.

* rendering/LayoutRepainter.cpp:
(WebCore::LayoutRepainter::LayoutRepainter):
* rendering/LayoutRepainter.h:
(LayoutRepainter):

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

12 years agoNot reviewed: chromium baselines updated.
pfeldman@chromium.org [Tue, 27 Mar 2012 10:29:52 +0000 (10:29 +0000)]
Not reviewed: chromium baselines updated.

* platform/chromium-mac-snowleopard/fast/forms/textfield-overflow-expected.png: Removed.

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

12 years ago[Qt] Unreviewed gardening after r112229.
ossy@webkit.org [Tue, 27 Mar 2012 10:23:28 +0000 (10:23 +0000)]
[Qt] Unreviewed gardening after r112229.

* platform/qt/fast/repaint/block-layout-inline-children-replaced-expected.png:
* platform/qt/fast/repaint/block-layout-inline-children-replaced-expected.txt:
* platform/qt/fast/table/quote-text-around-iframe-expected.png:
* platform/qt/fast/table/quote-text-around-iframe-expected.txt:

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

12 years agoEnable animVal support for SVGAnimatedString
zimmermann@webkit.org [Tue, 27 Mar 2012 10:22:35 +0000 (10:22 +0000)]
Enable animVal support for SVGAnimatedString
https://bugs.webkit.org/show_bug.cgi?id=82316

Reviewed by Zoltan Herczeg.

Source/WebCore:

Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared.
All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator.

Test: svg/animations/svgstring-animation-1.html

* svg/SVGAnimatedString.cpp:
(WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedStringAnimator::animValWillChange):
(WebCore::SVGAnimatedStringAnimator::animValDidChange):
* svg/SVGAnimatedString.h:
(SVGAnimatedStringAnimator):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::supportsAnimVal):

LayoutTests:

Add new test covering animVal+SVGAnimatedString.

* svg/animations/script-tests/svgstring-animation-1.js: Added.
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/svgstring-animation-1-expected.txt: Added.
* svg/animations/svgstring-animation-1.html: Added.

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

12 years agoUnreviewed, GTK rebaseline after r112229.
philn@webkit.org [Tue, 27 Mar 2012 10:18:41 +0000 (10:18 +0000)]
Unreviewed, GTK rebaseline after r112229.

* platform/gtk/fast/repaint/block-layout-inline-children-replaced-expected.txt:
* platform/gtk/fast/table/quote-text-around-iframe-expected.txt:

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

12 years agoUpdate usage of LayoutUnits in RenderListMarker
leviw@chromium.org [Tue, 27 Mar 2012 10:08:50 +0000 (10:08 +0000)]
Update usage of LayoutUnits in RenderListMarker
https://bugs.webkit.org/show_bug.cgi?id=81921

Reviewed by Eric Seidel.

Implementing proper pixel snapping in list marker painting, and correcting usage of integers
for local coordinates/margins that should be sub-pixel.

No new tests. No change in behavior.

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::localSelectionRect): Changed to LayoutUnits since this represents
a rect in local coordinates.
(WebCore::RenderListMarker::paint): Doing proper pixel snapping, and using integers for
results from text measurement.
(WebCore::RenderListMarker::computePreferredLogicalWidths): Using integers for results
from text measurement.
(WebCore::RenderListMarker::updateMargins): Fixing to be LayoutUnits.
* rendering/RenderListMarker.h:
(RenderListMarker):

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

12 years agoRevert linesBoundingBox to integers
leviw@chromium.org [Tue, 27 Mar 2012 10:06:49 +0000 (10:06 +0000)]
Revert linesBoundingBox to integers
https://bugs.webkit.org/show_bug.cgi?id=82182

Reviewed by Eric Seidel.

LayoutRects are intended to be pixel snapped to determine the ultimate screen
coordinates, but the Inline Box tree is laid out using floats, and pixel snapping
the resulting box from linesBoundingBox would produce a potentially incorrect
rectangle. Keeping this using enclosingIntRect retains the previous accuracy and
prevents misuse.

No new tests. No change in behavior.

* rendering/RenderInline.cpp:
(WebCore::RenderInline::linesBoundingBox):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
* rendering/RenderText.cpp:
(WebCore::RenderText::linesBoundingBox):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::linesBoundingBox):
* rendering/svg/RenderSVGInlineText.h:
(RenderSVGInlineText):

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

12 years agoWeb Inspector: store UIBreakpoints on UISourceCode.
podivilov@chromium.org [Tue, 27 Mar 2012 09:55:18 +0000 (09:55 +0000)]
Web Inspector: store UIBreakpoints on UISourceCode.
https://bugs.webkit.org/show_bug.cgi?id=82214

Source/WebCore:

This change will allow us to make breakpoint-added and breakpoint-removed events a part of UISourceCode interface.
See bug 82224 for more details.

Reviewed by Vsevolod Vlasov.

* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
(WebInspector.BreakpointManager.prototype.setBreakpoint):
(WebInspector.BreakpointManager.prototype.removeBreakpoint):
(WebInspector.BreakpointManager.prototype._addBreakpointToUI):
(WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
(WebInspector.BreakpointManager.prototype.debuggerReset):
* inspector/front-end/CompilerScriptMapping.js:
(WebInspector.CompilerScriptMapping.prototype.addScript):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
(WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode):
(WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
(WebInspector.UISourceCodeImpl):
(WebInspector.UISourceCodeImpl.prototype.breakpoints):
(WebInspector.UISourceCodeImpl.prototype.breakpointAdded):
(WebInspector.UISourceCodeImpl.prototype.breakpointRemoved):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.prototype._createUISourceCode):
* inspector/front-end/SnippetsModel.js:
(WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
(WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.get domain):
(WebInspector.UISourceCode.prototype.get folderName):
(WebInspector.UISourceCode.prototype.get fileName):
(WebInspector.UISourceCode.prototype.get displayName):
(WebInspector.UISourceCode.prototype._parseURL):
(WebInspector.UISourceCode.prototype._didRequestContent):
(WebInspector.UISourceCode.prototype.breakpoints):
* inspector/front-end/inspector.html:

LayoutTests:

Reviewed by Vsevolod Vlasov.

* inspector/debugger/breakpoint-manager.html:

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

12 years ago[chromium] Fix crash with fling with tracing enabled
nduca@chromium.org [Tue, 27 Mar 2012 09:48:21 +0000 (09:48 +0000)]
[chromium] Fix crash with fling with tracing enabled
https://bugs.webkit.org/show_bug.cgi?id=82306

The TRACE_EVENT_START instrumentation was deferencing a PassOwnPtr
after it had been passed into another OwnPtr. This caused frequent
crashes when tracing was enabled.

Reviewed by Adam Barth.

* platform/ActivePlatformGestureAnimation.cpp:
(WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
* platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
(WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):

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

12 years ago[SOUP] Implement missing methods in CookieJarSoup
carlosgc@webkit.org [Tue, 27 Mar 2012 09:42:59 +0000 (09:42 +0000)]
[SOUP] Implement missing methods in CookieJarSoup
https://bugs.webkit.org/show_bug.cgi?id=82082

Reviewed by Martin Robinson.

Source/WebCore:

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::defaultCookieJar): Return a global GRefPtr to store the
default cookie jar.
(WebCore::soupCookieJar): Return the current cookie jar or create
a new one.
(WebCore::setSoupCookieJar): Set the current cookie jar.
(WebCore::setCookies): Fix coding style.
(WebCore::cookiesForDocument): Helper function to get the list of
cookies as a string.
(WebCore::cookies): Use cookiesForDocument().
(WebCore::cookieRequestHeaderFieldValue): Ditto.
(WebCore::getRawCookies): Get the list of cookies for the given
document and url.
(WebCore::deleteCookie): Delete the given cookie.
(WebCore::getHostnamesWithCookies): Use GOwnPtr.
(WebCore::deleteCookiesForHostname): Use GOwnPtr and
soup_cookie_domain_matches() instead of comparing the domain
directly with the given hostname.
(WebCore::deleteAllCookies): Use GOwnPtr.
* platform/network/soup/CookieJarSoup.h:
* platform/network/soup/GOwnPtrSoup.cpp:
(WTF::SoupCookie): Add GOwnPtr template for SoupCookie.
* platform/network/soup/GOwnPtrSoup.h:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ensureSessionIsInitialized): Use soupCookieJar() instead
of defaultCookieJar().

Source/WebKit/efl:

* ewk/ewk_cookies.cpp:
(ewk_cookies_clear): Use soupCookieJar() instead of
defaultCookieJar().
(ewk_cookies_get_all): Ditto.
(ewk_cookies_cookie_del): Ditto.
(ewk_cookies_policy_set): Ditto.
(ewk_cookies_policy_get): Ditto.

Source/WebKit2:

* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Use
soupCookieJar() instead of defaultCookieJar().
(WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Ditto.

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

12 years ago[Qt] Unskipped 5 passing tests.
ossy@webkit.org [Tue, 27 Mar 2012 09:34:09 +0000 (09:34 +0000)]
[Qt] Unskipped 5 passing tests.

Patch by Szilard Ledan <szledan@inf.u-szeged.hu> on 2012-03-27
Reviewed by Csaba Osztrogonác.

* platform/qt/Skipped:

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

12 years ago[Qt] Unreviewed gardening, skip a failing test.
ossy@webkit.org [Tue, 27 Mar 2012 09:32:52 +0000 (09:32 +0000)]
[Qt] Unreviewed gardening, skip a failing test.

* platform/qt-5.0-wk2/Skipped:

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

12 years agoEnable animVal support for SVGAnimatedBoolean
zimmermann@webkit.org [Tue, 27 Mar 2012 09:29:18 +0000 (09:29 +0000)]
Enable animVal support for SVGAnimatedBoolean
https://bugs.webkit.org/show_bug.cgi?id=82311

Reviewed by Antti Koivisto.

Source/WebCore:

Enable animVal support for SVGAnimatedBoolean. Very simple now that everything is prepared.
All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedBooleanAnimator.

Extended existing tests to cover this.

* svg/SVGAnimatedBoolean.cpp:
(WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedBooleanAnimator::animValWillChange):
(WebCore::SVGAnimatedBooleanAnimator::animValDidChange):
* svg/SVGAnimatedBoolean.h:
(SVGAnimatedBooleanAnimator):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::setValueAsString):
(WebCore::SVGAnimatedType::supportsAnimVal):

LayoutTests:

Extend SVGAnimatedBoolean tests to cover animVal support.

* svg/animations/script-tests/svgboolean-animation-1.js:
(sample1):
(sample2):
(sample3):
* svg/animations/svgboolean-animation-1-expected.txt:

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

12 years agoUnreviewed, skip an inspector test failing on 64-bit Debug GTK bot.
philn@webkit.org [Tue, 27 Mar 2012 09:27:44 +0000 (09:27 +0000)]
Unreviewed, skip an inspector test failing on 64-bit Debug GTK bot.

* platform/gtk/Skipped:

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

12 years ago<img style='width: 100%' src='foo.svg'> gets pixellated when stretched
zimmermann@webkit.org [Tue, 27 Mar 2012 09:24:46 +0000 (09:24 +0000)]
<img style='width: 100%' src='foo.svg'> gets pixellated when stretched
https://bugs.webkit.org/show_bug.cgi?id=81631

Reviewed by Antti Koivisto.

Source/WebCore:

Final cleanup of RenderReplaced after the intrinsic size negotiation patch series from some weeks/months ago.
Stop tracking whether a RenderReplaced has an intrinsic size or not with an extra-bool, instead assume each
RenderReplaced derived class has an intrinsic size. If not, the class should override
computeIntrinsicRatioInformation() for any custom logic - currently only done by RenderImage.

Remove all logic depending on m_hasIntrinsicSize from computeReplacedLogicalWidth/Height, which was used
to support different sizing models depending on if the replaced element is a RenderImage or a RenderPart.
Unify all of this in computeIntrinsicRatioInformation right in RenderReplaced. This allows to remove
a hack from RenderImage::computeReplacedLogicalWidth(), which forced the synchroniziation of the intrinsicSize()
before calling the base classes RenderReplaced::computeReplacedLogicalWidth().
Now RenderImage just overrides the layout() method, calls RenderReplaced::layout() and then sets the container
size of the image resources to [contentWidth(), contentHeight()] - reflecting the actual result of the layout.
Furthermore this now allows us to unify CachedImage::imageSizeForRenderer() again for both SVG and non-SVG images.

Propagating the right container size to the image resource fixes the actual bug, that the SVGImage got pixellated.
Adding new tests covering percentage width or height set on an <img> embedding an external SVG, no more pixelation.

Tests: svg/as-image/img-relative-height-expected.html
       svg/as-image/img-relative-height.html
       svg/as-image/img-relative-width-expected.html
       svg/as-image/img-relative-width.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::layout):
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderImage.h:
(RenderImage):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::RenderReplaced):
(WebCore::rendererHasAspectRatio):
(WebCore):
(WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
(WebCore::RenderReplaced::computeIntrinsicRatioInformation):
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
(WebCore::RenderReplaced::computeReplacedLogicalHeight):
* rendering/RenderReplaced.h:
(WebCore::RenderReplaced::intrinsicSize):
(RenderReplaced):
(WebCore::RenderReplaced::setIntrinsicSize):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
* svg/graphics/SVGImage.h:
(WebCore::SVGImage::usesContainerSize):

LayoutTests:

Add new tests covering setting only one of width/height to a percentage when embedding SVGs into <img>s.

* platform/chromium/test_expectations.txt: Update expectations.
* platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.txt: Update changed result - slight rounding difference.
* platform/mac/fast/table/quote-text-around-iframe-expected.png: Update changed result, now the default intrinsic size respects scaling.
* platform/mac/fast/table/quote-text-around-iframe-expected.txt: Ditto.
* svg/as-image/img-relative-height-expected.html: Added.
* svg/as-image/img-relative-height.html: Added.
* svg/as-image/img-relative-width-expected.html: Added.
* svg/as-image/img-relative-width.html: Added.
* svg/as-image/resources/island.svg: Added.
* svg/as-image/svg-non-integer-scaled-image-expected.png:
* svg/as-image/svg-non-integer-scaled-image-expected.txt:

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

12 years agoUnreviewed, skip two new xmlhttprequest failures on GTK.
philn@webkit.org [Tue, 27 Mar 2012 08:58:54 +0000 (08:58 +0000)]
Unreviewed, skip two new xmlhttprequest failures on GTK.

* platform/gtk/Skipped:

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

12 years ago[GTK] Add method webkit_web_resource_get_data() to WebKit2 GTK+ API
carlosgc@webkit.org [Tue, 27 Mar 2012 08:56:45 +0000 (08:56 +0000)]
[GTK] Add method webkit_web_resource_get_data() to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=79667

Reviewed by Gustavo Noronha Silva.

* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkitWebResourceCreate): Add isMainResource parameter indication
whether the resource is the main one of the frame.
(resourceDataCallback): C API callback called when resource data
is available.
(webkit_web_resource_get_data): Asynchronously get the raw data of
the resource.
(webkit_web_resource_get_data_finish): Finish asynchronous
operation started by webkit_web_resource_get_data().
* UIProcess/API/gtk/WebKitWebResource.h:
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewResourceLoadStarted): Pass isMainResource parameter
to webkitWebResourceCreate().
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestResources.cpp:
(testWebResourceGetData):
(serverCallback):
(beforeAll):

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

12 years ago[Qt] Unreviewed gardening. Skip a new asserting test.
ossy@webkit.org [Tue, 27 Mar 2012 08:56:42 +0000 (08:56 +0000)]
[Qt] Unreviewed gardening. Skip a new asserting test.

* platform/qt/Skipped:

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

12 years agoWeb Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
loislo@chromium.org [Tue, 27 Mar 2012 08:34:19 +0000 (08:34 +0000)]
Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
https://bugs.webkit.org/show_bug.cgi?id=82305

Reviewed by Yury Semikhatsky.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._bfs):

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

12 years agoSVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation
zimmermann@webkit.org [Tue, 27 Mar 2012 08:30:45 +0000 (08:30 +0000)]
SVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation
https://bugs.webkit.org/show_bug.cgi?id=67563

Reviewed by Dirk Schulze.

Source/WebCore:

Add SVGAnimatedIntegerOptionalInteger type handling animation of pair<int, int> objects
as used for the SVG properties 'filterRes' and 'order'. They're currently animated as
SVGAnimatedNumberOptionalNumber - but that won't work for animVal support. Fix that
and enable animVal support for SVGAnimatedInteger(OptionalInteger).

Use 'int' as datatype for SVGAnimatedInteger instead of 'long' for consistency, and
move SVGAnimatedEnumeration from 'int' to 'unsigned short', to make them distinguishable.

Test: svg/animations/svginteger-animation-2.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGAllInOne.cpp:
* svg/SVGAnimatedEnumeration.h:
(WebCore):
* svg/SVGAnimatedInteger.cpp:
(WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
(WebCore):
(WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedIntegerAnimator::animValWillChange):
(WebCore::SVGAnimatedIntegerAnimator::animValDidChange):
(WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
(WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
* svg/SVGAnimatedInteger.h:
(WebCore):
(SVGAnimatedIntegerAnimator):
* svg/SVGAnimatedIntegerOptionalInteger.cpp: Added.
(WebCore):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::SVGAnimatedIntegerOptionalIntegerAnimator):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndToValues):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndByValues):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateDistance):
* svg/SVGAnimatedIntegerOptionalInteger.h: Copied from Source/WebCore/svg/SVGAnimatedInteger.h.
(WebCore):
(SVGAnimatedIntegerOptionalIntegerAnimator):
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::~SVGAnimatedIntegerOptionalIntegerAnimator):
* svg/SVGAnimatedNumberOptionalNumber.cpp:
(WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::~SVGAnimatedType):
(WebCore::SVGAnimatedType::createIntegerOptionalInteger):
(WebCore):
(WebCore::SVGAnimatedType::integerOptionalInteger):
(WebCore::SVGAnimatedType::valueAsString):
(WebCore::SVGAnimatedType::setValueAsString):
(WebCore::SVGAnimatedType::supportsAnimVal):
* svg/SVGAnimatedType.h:
(SVGAnimatedType):
* svg/SVGAnimatorFactory.h:
(WebCore::SVGAnimatorFactory::create):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::setFilterRes):
* svg/SVGFilterElement.h:
(SVGFilterElement):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getPathSegAtLength):
* svg/SVGPathElement.h:
(SVGPathElement):
* svg/SVGPathParserFactory.cpp:
(WebCore::SVGPathParserFactory::getSVGPathSegAtLengthFromSVGPathByteStream):
* svg/SVGPathParserFactory.h:
(SVGPathParserFactory):
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
* svg/SVGPathTraversalStateBuilder.h:
(SVGPathTraversalStateBuilder):
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
(WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal):
(WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
(WebCore::SVGAnimatedEnumerationPropertyTearOff::currentAnimatedValue):
(WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
* svg/properties/SVGPropertyInfo.h:
* svg/properties/SVGPropertyTraits.h:

LayoutTests:

Extend SVGAnimatedInteger tests to cover animVal support.

* svg/animations/script-tests/svginteger-animation-1.js:
(sample1):
(sample2):
(sample3):
* svg/animations/script-tests/svginteger-animation-2.js: Copied from LayoutTests/svg/animations/script-tests/svginteger-animation-1.js.
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/svginteger-animation-1-expected.txt:
* svg/animations/svginteger-animation-2-expected.txt: Added.
* svg/animations/svginteger-animation-2.html: Added.

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

12 years agoEnable animVal support for SVGAngle
zimmermann@webkit.org [Tue, 27 Mar 2012 08:22:37 +0000 (08:22 +0000)]
Enable animVal support for SVGAngle
https://bugs.webkit.org/show_bug.cgi?id=82144

Reviewed by Rob Buis.

Source/WebCore:

Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared.
All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator.

Extended existing tests to cover this.

* svg/SVGAnimatedAngle.cpp:
(WebCore::sharedSVGAngle):
(WebCore::SVGAnimatedAngleAnimator::constructFromString):
(WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
(WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
(WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
(WebCore::SVGAnimatedAngleAnimator::animValWillChange):
(WebCore::SVGAnimatedAngleAnimator::animValDidChange):
(WebCore::SVGAnimatedAngleAnimator::calculateDistance):
* svg/SVGAnimatedAngle.h:
(SVGAnimatedAngleAnimator):
* svg/SVGAnimatedType.cpp:
(WebCore::SVGAnimatedType::supportsAnimVal):

LayoutTests:

Update tests after enabling animVal support for SVGAnimatedAngle.

* svg/animations/script-tests/svgangle-animation-deg-to-grad.js:
(sample2):
(sample3):
* svg/animations/script-tests/svgangle-animation-deg-to-rad.js:
(sample2):
(sample3):
* svg/animations/script-tests/svgangle-animation-grad-to-deg.js:
(sample2):
(sample3):
* svg/animations/script-tests/svgangle-animation-grad-to-rad.js:
(sample2):
(sample3):
* svg/animations/script-tests/svgangle-animation-rad-to-deg.js:
(sample2):
(sample3):
* svg/animations/script-tests/svgangle-animation-rad-to-grad.js:
(sample2):
(sample3):
* svg/animations/svgangle-animation-deg-to-grad-expected.txt:
* svg/animations/svgangle-animation-deg-to-rad-expected.txt:
* svg/animations/svgangle-animation-grad-to-deg-expected.txt:
* svg/animations/svgangle-animation-grad-to-rad-expected.txt:
* svg/animations/svgangle-animation-rad-to-deg-expected.txt:
* svg/animations/svgangle-animation-rad-to-grad-expected.txt:

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

12 years agoWeb Inspector: remove remains of path finder in heap profiler front-end
yurys@chromium.org [Tue, 27 Mar 2012 08:18:26 +0000 (08:18 +0000)]
Web Inspector: remove remains of path finder in heap profiler front-end
https://bugs.webkit.org/show_bug.cgi?id=82304

Removed remainders of heap path finder as this code is not used anymore.

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/HeapSnapshot.js:
* inspector/front-end/HeapSnapshotProxy.js:

LayoutTests:

* inspector/profiler/heap-snapshot-expected.txt:
* inspector/profiler/heap-snapshot.html:

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

12 years ago[GTK] Add resources API to WebKit2 GTK+
carlosgc@webkit.org [Tue, 27 Mar 2012 07:59:59 +0000 (07:59 +0000)]
[GTK] Add resources API to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=79477

Reviewed by Gustavo Noronha Silva.

* GNUmakefile.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitResourceLoadClient.cpp: Added.
(didInitiateLoadForResource): Call
webkitWebViewResourceLoadStarted() so that view will create the
resource and emit WebKitWebView::resource-load-started.
(didSendRequestForResource): Call webkitWebResourceSentRequest()
with the given request and response.
(didReceiveResponseForResource): Call
webkitWebResourceSetResponse() with the given response.
(didReceiveContentLengthForResource): Call
webkitWebResourceNotifyProgress().
(didFinishLoadForResource): Call webkitWebResourceFinished().
(didFailLoadForResource): Create a GError for the given WKError
and call webkitWebResourceFailed().
(attachResourceLoadClientToView): Add callbacks for the
WKPageResourceLoadClient.
* UIProcess/API/gtk/WebKitResourceLoadClient.h: Added.
* UIProcess/API/gtk/WebKitWebResource.cpp: Added.
(webkitWebResourceGetProperty):
(webkit_web_resource_init):
(webkit_web_resource_class_init):
(webkitWebResourceUpdateURI): Update the active URI every time a
new request is sent to the server.
(webkitWebResourceCreate): Create a WebResource for the given
frame.
(webkitWebResourceSentRequest): Update uri and emit
WebKitWebResource::sent-request.
(webkitWebResourceSetResponse): Set the response property.
(webkitWebResourceNotifyProgress): Emit
WebKitWebResource::received-data.
(webkitWebResourceFinished): Emit WebKitWebResource::finished.
(webkitWebResourceFailed): Emit WebKitWebResource::failed and then
WebKitWebResource::finished.
(webkit_web_resource_get_uri): Return the currentr active URI.
(webkit_web_resource_get_response): Return the response received
from the server.
* UIProcess/API/gtk/WebKitWebResource.h: Added.
* UIProcess/API/gtk/WebKitWebResourcePrivate.h: Added.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Attach the resource load client to the
view.
(webkit_web_view_class_init): Add
WebKitWebView::resource-load-started signal.
(webkitWebViewLoadChanged): Clear loading resources map when a new
load starts and loaded resources map when the new load has been
committed.
(webkitWebViewResourceLoadStarted): Create a resource for the
given identifier, add it to the loading resources map and emit
WebKitWebView::resource-load-started signal.
(webkitWebViewGetLoadingWebResource): Return the resource that is
being loaded corresponding to the given identifier.
(webkitWebViewRemoveLoadingWebResource): Remove the resouurce
corresponfing to the given identifier from the loading resources
map.
(webkitWebViewResourceLoadFinished): Move the resource from the
loading resources map to the loaded resources map.
(webkit_web_view_get_main_resource): Return the main resource.
(webkit_web_view_get_subresources): Return the list of
subresources.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
WebKitWebResource.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_web_resource_get_type.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for resources.
* UIProcess/API/gtk/tests/TestDownloads.cpp:
(testDownloadLocalFile): Use getWebKit1TestResoucesDir() from Test.
(testDownloadLocalFileError): Ditto.
(serverCallback): Ditto.
* UIProcess/API/gtk/tests/TestMain.h:
(Test::getWebKit1TestResoucesDir): Moed from TestDownloads so that
it can be used by other tests.
(Test): Add information about leaked objects.
* UIProcess/API/gtk/tests/TestResources.cpp: Added.
(testWebViewResources):
(testWebResourceLoading):
(testWebResourceResponse):
(testWebResourceActiveURI):
(addCacheHTTPHeadersToResponse):
(serverCallback):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/webkit2.h: Include WebKitWebResource.h
* UIProcess/API/gtk/webkit2marshal.list:

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

12 years agoReverted r112214, since it was not the right fix for the build.
mitz@apple.com [Tue, 27 Mar 2012 07:57:02 +0000 (07:57 +0000)]
Reverted r112214, since it was not the right fix for the build.

* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::asText):

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

12 years agoUnreviewed, GTK rebaseline.
philn@webkit.org [Tue, 27 Mar 2012 07:54:01 +0000 (07:54 +0000)]
Unreviewed, GTK rebaseline.

* platform/gtk/editing/inserting/before-after-input-element-expected.txt:
* platform/gtk/editing/spelling/inline_spelling_markers-expected.txt:

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

12 years ago[V8][Performance] Optimize createTextNode(), createElement(), cloneNode(), etc
haraken@chromium.org [Tue, 27 Mar 2012 07:48:09 +0000 (07:48 +0000)]
[V8][Performance] Optimize createTextNode(), createElement(), cloneNode(), etc
https://bugs.webkit.org/show_bug.cgi?id=82201

Reviewed by Adam Barth.

This patch improves performance of createTextNode() by 13%, createElement() by 14%,
and cloneNode() by 16%. Similar performance improvement will be observed in
DOM methods that create a new object every time.

Performance test: https://bugs.webkit.org/attachment.cgi?id=133799

The performance test results are as follows. Since the performance of V8's GC is
really unstable, the average of measured times makes no sense in Chromium.
Instead, let us focus on the median. I believe that this performance
improvement has impact on Dromaeo, but we cannot observe the improvement
due to the unsteadiness of V8's GC, as shown below.

Chromium/V8/Linux (without the patch):
createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
Dromaeo/dom-modify/createElement: 439.17runs/s +-31.60% (<--- pretty noisy)
Dromaeo/dom-modify/createTextNode: 287.71runs/s +-28.39% (<--- pretty noisy)
Dromaeo/dom-modify/cloneNode: 174.62runs/s +-25.68% (<--- pretty noisy)

Chromium/V8/Linux (with the patch):
createTextNode : median=240ms (mean=411.12ms, min=237ms, max=2965ms)
createElement : median=325ms (mean=585.30ms, min=317ms, max=2984ms)
cloneNode : median=310ms (mean=522.48ms, min=302ms, max=2988ms)
Dromaeo/dom-modify/createElement: 507.15runs/s +-36.00% (<--- pretty noisy)
Dromaeo/dom-modify/createTextNode: 251.01runs/s +-6.57%
Dromaeo/dom-modify/cloneNode: 177.85runs/s +-28.74% (<--- pretty noisy)

Chromium/V8/Mac (without the patch):
createTextNode : median=317ms (mean=439.08ms, min=303ms, max=3126ms)
createElement : median=403ms (mean=695.70ms, min=398ms, max=5615ms)
cloneNode : median=384ms (mean=577.96ms, min=372ms, max=5313ms)
Dromaeo/dom-modify/createElement: 493.89runs/s +-28.32% (<--- pretty noisy)
Dromaeo/dom-modify/createTextNode: 279.66runs/s +-1.91%
Dromaeo/dom-modify/cloneNode: 173.06runs/s +-24.41% (<--- pretty noisy)

Chromium/V8/Mac (with the patch):
createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
Dromaeo/dom-modify/createElement: 510.47runs/s +-28.13% (<--- pretty noisy)
Dromaeo/dom-modify/createTextNode: 215.80runs/s +-20.99% (<--- pretty noisy)
Dromaeo/dom-modify/cloneNode: 174.41runs/s +-24.85% (<--- pretty noisy)

Safari/JavaScriptCore/Mac:
createTextNode : median=142ms (mean=141.04ms, min=110ms, max=168ms)
createElement : median=234ms (mean=245.74ms, min=219ms, max=305ms)
cloneNode : median=210ms (mean=213.36ms, min=204ms, max=284ms)
Dromaeo/dom-modify/createElement: 822.49runs/s +-1.69%
Dromaeo/dom-modify/createTextNode: 735.57runs/s +-0.91%
Dromaeo/dom-modify/cloneNode: 135.20runs/s +-4.13%

This patch makes the following two optimizations:

[1] If the currently running context is equal to the context that we are about to enter,
we do not call context->Enter().
[2] We do not create a Local handle of the context until we really need to enter the context.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateToV8Converters):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::persistentContext):
(WebCore):
* bindings/v8/V8Proxy.h:
(V8Proxy):

* WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results.

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

12 years agocross-origin XMLHttpRequest doesn't work with redirect
bbudge@chromium.org [Tue, 27 Mar 2012 07:38:47 +0000 (07:38 +0000)]
cross-origin XMLHttpRequest doesn't work with redirect
https://bugs.webkit.org/show_bug.cgi?id=57600

Reviewed by Adam Barth.

Source/WebCore:

Changes DocumentThreadableLoader to follow the CORS redirect steps when
asynchronously loading a cross origin request with access control. Synchronous
loads should not be affected. Also adds methods to ResourceRequestBase to
clear special request headers that aren't allowed when using access control.
Follows the CORS spec as described in the Latest Editor Draft at:
http://www.w3.org/TR/cors/

Test: http/tests/xmlhttprequest/access-control-and-redirects-async.html

* loader/DocumentThreadableLoader.cpp:
* loader/DocumentThreadableLoader.h:
* platform/network/ResourceRequestBase.cpp:
* platform/network/ResourceRequestBase.h:

LayoutTests:

Adds tests to verify that an asynchronous XHR load that receives a redirect
response follows the CORS redirect steps.
Follows the CORS spec as described in the Latest Editor Draft at:
http://www.w3.org/TR/cors/

* http/tests/security/resources/cors-redirect.php: Removed.
* http/tests/security/xhr-cors-redirect.html: Removed.
* http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt: Added.
* http/tests/xmlhttprequest/access-control-and-redirects-async.html: Added.
* http/tests/xmlhttprequest/resources/redirect-cors.php: Added.

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

12 years agoUnreviewed, GTK gardening after r112112.
philn@webkit.org [Tue, 27 Mar 2012 07:35:21 +0000 (07:35 +0000)]
Unreviewed, GTK gardening after r112112.

* platform/gtk/css2.1/20110323/c543-txt-decor-000-expected.txt: Added.

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

12 years agoImageLoader::m_firedLoadEvent is a confusing name
abarth@webkit.org [Tue, 27 Mar 2012 07:21:37 +0000 (07:21 +0000)]
ImageLoader::m_firedLoadEvent is a confusing name
https://bugs.webkit.org/show_bug.cgi?id=82283

Reviewed by Kentaro Hara.

This patch renames m_firedLoadEvent (and friends) to
m_hasPendingLoadEvent (and negates the value).  That name more
accurately reflects the semantics of this piece of state.  For example,
we now initialize m_hasPendingLoadEvent to false, which makes sense as
there is no pending load event, whereas before we initialized
m_firedLoadEvent to true, which made less sense since we hadn't yet
actually fired the load event.

* bindings/v8/V8GCController.cpp:
(WebCore::calculateGroupId):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::attach):
* html/HTMLImageElement.h:
(HTMLImageElement):
(WebCore::HTMLImageElement::hasPendingLoadEvent):
(WebCore::HTMLImageElement::hasPendingActivity):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::attach):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::setImage):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
(WebCore::ImageLoader::dispatchPendingLoadEvent):
(WebCore::ImageLoader::dispatchPendingErrorEvent):
* loader/ImageLoader.h:
(WebCore::ImageLoader::hasPendingBeforeLoadEvent):
(WebCore::ImageLoader::hasPendingLoadEvent):
(ImageLoader):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::haveLoadedRequiredResources):

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

12 years agoTried to fix 32-bit builds.
mitz@apple.com [Tue, 27 Mar 2012 07:17:36 +0000 (07:17 +0000)]
Tried to fix 32-bit builds.

* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::asText):

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

12 years agoNot reviewed: fixing Emil's rebaselined of of textfield-overflow for chromium.
pfeldman@chromium.org [Tue, 27 Mar 2012 07:05:08 +0000 (07:05 +0000)]
Not reviewed: fixing Emil's rebaselined of of textfield-overflow for chromium.

* platform/chromium-mac-snowleopard/fast/forms/textfield-overflow-expected.png: Added.
* platform/chromium-mac/fast/forms/textfield-overflow-expected.txt: Removed.

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

12 years agoNot reviewed: chromium expectations updated.
pfeldman@chromium.org [Tue, 27 Mar 2012 06:56:58 +0000 (06:56 +0000)]
Not reviewed: chromium expectations updated.

* platform/chromium/test_expectations.txt:

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

12 years agoNot reviewed: chromium expectations updated.
pfeldman@chromium.org [Tue, 27 Mar 2012 06:39:12 +0000 (06:39 +0000)]
Not reviewed: chromium expectations updated.

* platform/chromium/test_expectations.txt:

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

12 years ago[EFL] More gardening, update some fast/replaced expectations.
kubo@profusion.mobi [Tue, 27 Mar 2012 06:36:10 +0000 (06:36 +0000)]
[EFL] More gardening, update some fast/replaced expectations.

* platform/efl/fast/replaced/001-expected.png:
* platform/efl/fast/replaced/002-expected.png:
* platform/efl/fast/replaced/003-expected.png:
* platform/efl/fast/replaced/004-expected.png:
* platform/efl/fast/replaced/005-expected.png:
* platform/efl/fast/replaced/007-expected.png:
* platform/efl/fast/replaced/absolute-image-sizing-expected.png:
* platform/efl/fast/replaced/absolute-position-percentage-height-expected.png:
* platform/efl/fast/replaced/absolute-position-with-auto-height-and-top-and-bottom-expected.png:
* platform/efl/fast/replaced/absolute-position-with-auto-width-and-left-and-right-expected.png:
* platform/efl/fast/replaced/applet-disabled-positioned-expected.png:
* platform/efl/fast/replaced/applet-rendering-java-disabled-expected.png:
* platform/efl/fast/replaced/border-radius-clip-expected.png:
* platform/efl/fast/replaced/image-resize-width-expected.png:
* platform/efl/fast/replaced/image-sizing-expected.png:
* platform/efl/fast/replaced/image-solid-color-with-alpha-expected.png:
* platform/efl/fast/replaced/inline-box-wrapper-handover-expected.png:
* platform/efl/fast/replaced/max-width-percent-expected.png:
* platform/efl/fast/replaced/object-align-hspace-vspace-expected.png:
* platform/efl/fast/replaced/outline-replaced-elements-expected.png:
* platform/efl/fast/replaced/percent-height-in-anonymous-block-in-table-expected.png:
* platform/efl/fast/replaced/replaced-breaking-expected.png:
* platform/efl/fast/replaced/replaced-breaking-expected.txt:
* platform/efl/fast/replaced/replaced-breaking-mixture-expected.png:
* platform/efl/fast/replaced/replaced-breaking-mixture-expected.txt:
* platform/efl/fast/replaced/selection-rect-in-table-cell-expected.png:
* platform/efl/fast/replaced/selection-rect-transform-expected.png:
* platform/efl/fast/replaced/vertical-lr/absolute-position-with-auto-height-and-top-and-bottom-expected.png:
* platform/efl/fast/replaced/vertical-lr/absolute-position-with-auto-width-and-left-and-right-expected.png:
* platform/efl/fast/replaced/vertical-rl/absolute-position-with-auto-height-and-top-and-bottom-expected.png:
* platform/efl/fast/replaced/vertical-rl/absolute-position-with-auto-width-and-left-and-right-expected.png:
* platform/efl/fast/replaced/width100percent-button-expected.png:
* platform/efl/fast/replaced/width100percent-image-expected.png:
* platform/efl/fast/replaced/width100percent-textarea-expected.png:
* platform/efl/fast/replaced/width100percent-textfield-expected.png:

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

12 years agoNot reviewed: chromium test expectations lint.
pfeldman@chromium.org [Tue, 27 Mar 2012 06:23:03 +0000 (06:23 +0000)]
Not reviewed: chromium test expectations lint.

* platform/chromium/test_expectations.txt:

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

12 years agoNot reviewed: marking fast/events/platform-wheelevent-* as flaky on
pfeldman@chromium.org [Tue, 27 Mar 2012 06:06:56 +0000 (06:06 +0000)]
Not reviewed: marking fast/events/platform-wheelevent-* as flaky on
Chromium Snow Leopard.

* platform/chromium/test_expectations.txt:

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

12 years agoUnreviewed, rolling out r112199.
commit-queue@webkit.org [Tue, 27 Mar 2012 05:32:16 +0000 (05:32 +0000)]
Unreviewed, rolling out r112199.
http://trac.webkit.org/changeset/112199
https://bugs.webkit.org/show_bug.cgi?id=82295

Breaks Chromium Win compilation (Requested by pfeldman on
#webkit).

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

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorCallback):
(GenerateNamedConstructorCallback):
(GenerateToV8Converters):
(GetDomMapFunction):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::wrapSlow):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::wrapSlow):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
(WebCore):
* bindings/v8/V8DOMWrapper.h:
(WebCore):
(V8DOMWrapper):
(WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
(WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):

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

12 years agoDisable CCLayerTreeHostTestSetSingleLostContext.runMultiThread.
senorblanco@chromium.org [Tue, 27 Mar 2012 05:09:25 +0000 (05:09 +0000)]
Disable CCLayerTreeHostTestSetSingleLostContext.runMultiThread.
https://bugs.webkit.org/show_bug.cgi?id=82285

Reviewed by James Robinson.

* tests/CCLayerTreeHostTest.cpp:
(WTF::TEST_F):

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

12 years ago[chromium] Remove WebMediaElement from Chromium WebKit API.
scherkus@chromium.org [Tue, 27 Mar 2012 04:41:38 +0000 (04:41 +0000)]
[chromium] Remove WebMediaElement from Chromium WebKit API.
https://bugs.webkit.org/show_bug.cgi?id=82277

Reviewed by James Robinson.

This was added in r63859 but is no longer used by anyone.

* WebKit.gyp:
* public/WebMediaElement.h: Removed.
* src/WebMediaElement.cpp: Removed.

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

12 years agoFix flaky test fast/eventsource/eventsource-url-attribute.html
commit-queue@webkit.org [Tue, 27 Mar 2012 04:25:16 +0000 (04:25 +0000)]
Fix flaky test fast/eventsource/eventsource-url-attribute.html
https://bugs.webkit.org/show_bug.cgi?id=82257

Patch by Pablo Flouret <pablof@motorola.com> on 2012-03-26
Reviewed by Ryosuke Niwa.

The test used http://localhost, chosen as a semi-random url, but since
it doesn't return a text/event-stream mime-type sometimes a console
warning would appear. Moved the test to the http folder and changed it
to use a resource with the correct mime-type.

* http/tests/eventsource/eventsource-url-attribute-expected.txt: Renamed from LayoutTests/fast/eventsource/eventsource-url-attribute-expected.txt.
* http/tests/eventsource/eventsource-url-attribute.html: Renamed from LayoutTests/fast/eventsource/eventsource-url-attribute.html.

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

12 years agoBuild system prep work for upstreaming iOS changes
ddkilzer@apple.com [Tue, 27 Mar 2012 03:58:35 +0000 (03:58 +0000)]
Build system prep work for upstreaming iOS changes
<http://webkit.org/b/82267>

Reviewed by Mark Rowe.

* DerivedSources.make: Move 'bison' into a variable and use
xcrun to find it on Mac OS X.
* bindings/scripts/preprocessor.pm:
(applyPreprocessor): Add local @args variable.  On iOS, the
compiler needs additional "-isysroot $(SDKROOT)" arguments when
invoked, so it's easier to add them to an array, especially if
$SDKROOT contains a space in the path.  Remove now-redundant
$gccLocation variable.

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

12 years agoExtract logic of indexeddb html layout tests into js files that can
dgrogan@chromium.org [Tue, 27 Mar 2012 03:50:43 +0000 (03:50 +0000)]
Extract logic of indexeddb html layout tests into js files that can
be run from either a worker or a window.

The two changed -expected.txt files are just for line numbers in JS
error messages.

Skipped were:
- transaction-abort-with-js-recursion.html
- transaction-abort-with-js-recursion-cross-frame.html
- noblobs.html
- structured-clone.html
- tutorial.html
The first four simulate mouse events and the last isn't really a test.
structured-clone.html will be refactored for worker compatibility in a
future patch.

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

Reviewed by Tony Chang.

* storage/indexeddb/constants.html:
* storage/indexeddb/create-and-remove-object-store.html:
* storage/indexeddb/create-object-store-options.html:
... every html file in storage/indexeddb except the ones listed above

* storage/indexeddb/exception-in-event-aborts-expected.txt:
line number in javascript error message changed
* storage/indexeddb/version-change-abort-expected.txt:
line number in javascript error message changed

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

12 years agoRemove duplicate error() impls in CachedResource subclasses
japhet@chromium.org [Tue, 27 Mar 2012 03:50:00 +0000 (03:50 +0000)]
Remove duplicate error() impls in CachedResource subclasses
https://bugs.webkit.org/show_bug.cgi?id=81161

Reviewed by Alexey Proskuryakov.

No new tests, refactor only.

* loader/cache/CachedCSSStyleSheet.cpp:
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
* loader/cache/CachedResource.h: Make checkNotify()
     virtual, so the right checkNotify() gets called in error().
* loader/cache/CachedScript.cpp:
* loader/cache/CachedScript.h:
* loader/cache/CachedXSLStyleSheet.cpp:
* loader/cache/CachedXSLStyleSheet.h:

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

12 years agoAssert failure from capitalized RenderTextFragment
commit-queue@webkit.org [Tue, 27 Mar 2012 03:16:34 +0000 (03:16 +0000)]
Assert failure from capitalized RenderTextFragment
https://bugs.webkit.org/show_bug.cgi?id=82096

Patch by Ken Buchanan <kenrb@chromium.org> on 2012-03-26
Reviewed by Ryosuke Niwa.

Source/WebCore:

The cause of this bug was the call to RenderTextFragment::setTextInternal
resulting from a style change from RenderObject::addChild. The idea here
is to better separate the code path for transforming existing text from
the code path for replacing the underlying text of a node. For
RenderTextFragment this has to be clear because only in the latter case
does the first-letter get reset.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild): Added call to transformText
* rendering/RenderText.cpp:
(WebCore::RenderText::styleDidChange): Added call to transformText
(WebCore::RenderText::transformText): Added
* rendering/RenderText.h:
(WebCore::RenderText::setText): Changed to virtual so RenderTextFragment can override
(WebCore::RenderText::transformText): Added
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::styleDidChange): Removed references to
m_allowFragmentReset which was the previous approach to separating the
code paths
(WebCore::RenderTextFragment::setTextInternal): Deleted
(WebCore::RenderTextFragment::setText): Added with most of logic that was
previously in setTextInternal
(WebCore::RenderTextFragment::transformText): Added
* rendering/RenderTextFragment.h:
(WebCore::RenderTextFragment::setText): Added
(WebCore::RenderTextFragment::transformText): Added
(WebCore::RenderTextFragment::setTextInternal): Deleted

LayoutTests:

Test that exercises failure condition in bug 82096.

* fast/css/first-letter-capitalized-edit-select-crash-expected.txt: Added
* fast/css/first-letter-capitalized-edit-select-crash.html: Added

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

12 years agoAlways set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap...
adamk@chromium.org [Tue, 27 Mar 2012 02:58:28 +0000 (02:58 +0000)]
Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set()
https://bugs.webkit.org/show_bug.cgi?id=82256

Reviewed by Adam Barth.

This moves leakRef() calls out of generated code, centralizing them in
V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take
PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void'
(which clearly can't be wrapped in a PassRefPtr).

Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic.
(GenerateNamedConstructorCallback): ditto.
(GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method
instead of directly accessing the wrapper maps and calling set.
(GetDomMapFunction): Refactored to call new GetDomWrapperMapName function.
(GetDomWrapperMapName): Helper pulled out of GetDomMapFunction.
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::wrapSlow):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::wrapSlow):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it.
* bindings/v8/V8DOMWrapper.h:
(WebCore): Forward decls.
(V8DOMWrapper):
(WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline.
(WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto.
(WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods;
this one handles non-active Nodes.
(WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse
DOMNode method, now handles only active Nodes.
(WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances.

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

12 years agoFix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumVa...
psolanki@apple.com [Tue, 27 Mar 2012 02:45:03 +0000 (02:45 +0000)]
Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength
https://bugs.webkit.org/show_bug.cgi?id=82254

Reviewed by Benjamin Poulain.

Source/WebCore:

No new tests because no functional changes.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/LengthFunctions.cpp:
(WebCore::minimumValueForLength):
(WebCore::valueForLength):
* css/LengthFunctions.h:
(WebCore):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::getRegion):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::textIndentOffset):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeBlockDirectionMargins):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paddingTop):
(WebCore::RenderBoxModelObject::paddingBottom):
(WebCore::RenderBoxModelObject::paddingLeft):
(WebCore::RenderBoxModelObject::paddingRight):
(WebCore::RenderBoxModelObject::paddingBefore):
(WebCore::RenderBoxModelObject::paddingAfter):
(WebCore::RenderBoxModelObject::paddingStart):
(WebCore::RenderBoxModelObject::paddingEnd):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
* rendering/RenderInline.cpp:
(WebCore::computeMargin):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateOptionsWidth):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeReplacedLogicalWidth):
* rendering/RenderScrollbarPart.cpp:
(WebCore::calcScrollbarThicknessUsing):
(WebCore::RenderScrollbarPart::computeScrollbarWidth):
(WebCore::RenderScrollbarPart::computeScrollbarHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
* rendering/RenderText.h:
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
* rendering/style/RenderStyle.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):

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

12 years agoTriggers assertion if dragging from outside of <meter> in a shadow tree to inside...
shinyak@chromium.org [Tue, 27 Mar 2012 02:42:48 +0000 (02:42 +0000)]
Triggers assertion if dragging from outside of <meter> in a shadow tree to inside of it.
https://bugs.webkit.org/show_bug.cgi?id=82177

Reviewed by Dimitri Glazkov.

Source/WebCore:

VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries has moved the start position or
the end position to the invalid position, i.e. position after (before) the non-existing node.

This patch fixes the problem, and adds assertion that the selection does not cross shadow boundaries.

Test: fast/dom/shadow/drag-to-meter-in-shadow-crash.html

* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):

LayoutTests:

* fast/dom/shadow/drag-to-meter-in-shadow-crash-expected.txt: Added.
* fast/dom/shadow/drag-to-meter-in-shadow-crash.html: Added.

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

12 years agoEnable layout testing of the scroll animator.
commit-queue@webkit.org [Tue, 27 Mar 2012 02:41:20 +0000 (02:41 +0000)]
Enable layout testing of the scroll animator.
https://bugs.webkit.org/show_bug.cgi?id=81858
Add a call to the InternalSettings that layout tests can use to
turn on scroll animation. Enable animation updates for the
Chromium platform DRT when scroll animation has been turned on in
a test. This should be a no-op for all current layout tests.

Patch by Scott Byer <scottbyer@chromium.org> on 2012-03-26
Reviewed by James Robinson.

Source/WebCore:

No new tests. Layout test results should be unchanged.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setEnableScrollAnimator):
(WebCore):
(WebCore::InternalSettings::scrollAnimatorEnabled):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium:

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::scrollAnimatorEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

Tools:

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::serviceAnimation):
(WebViewHost::scheduleAnimation):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

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

12 years ago[Qt][WK2] Support multi-file upload
commit-queue@webkit.org [Tue, 27 Mar 2012 02:29:41 +0000 (02:29 +0000)]
[Qt][WK2] Support multi-file upload
https://bugs.webkit.org/show_bug.cgi?id=81589

Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-03-26
Reviewed by Simon Hausmann.

Source/WebKit2:

Added 'allowMutipleFiles' property to filePicker context property to indicate whether to allow
multiple file selections.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::chooseFiles):
* UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_multiFileUpload.qml: Added.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml:
* UIProcess/API/qt/tests/qmltests/common/multifileupload.html: Added.
* UIProcess/API/qt/tests/qmltests/common/singlefileupload.html:
* UIProcess/API/qt/tests/qmltests/common/titleupdate.js: Added.
(updateTitle):
* UIProcess/qt/QtDialogRunner.cpp:
(FilePickerContextObject):
(FilePickerContextObject::FilePickerContextObject):
(FilePickerContextObject::allowMultipleFiles):
(FilePickerContextObject::accept):
(QtDialogRunner::initForFilePicker):
* UIProcess/qt/QtDialogRunner.h:
(QtDialogRunner):

Tools:

Modified filePicker to support multi-file upload.

* MiniBrowser/qt/MiniBrowser.qrc:
* MiniBrowser/qt/icons/checkbox_checked.png: Added.
* MiniBrowser/qt/icons/checkbox_unchecked.png: Added.
* MiniBrowser/qt/js/MultiSelect.js: Added.
(values):
(isSelected):
(removeValue):
* MiniBrowser/qt/qml/CheckBox.qml: Added.
* MiniBrowser/qt/qml/FilePicker.qml:

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

12 years agoFix minor spell error in DocumentLoader.h
charles.wei@torchmobile.com.cn [Tue, 27 Mar 2012 02:17:23 +0000 (02:17 +0000)]
Fix minor spell error in DocumentLoader.h
https://bugs.webkit.org/show_bug.cgi?id=82141

Reviewed by Nate Chapin.

Just fix spell error, no new tests.

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setClientRedirectSourceForHistory):

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

12 years ago[Skia] Remove use of deprecated Skia constant and struct field names
commit-queue@webkit.org [Tue, 27 Mar 2012 02:13:08 +0000 (02:13 +0000)]
[Skia] Remove use of deprecated Skia constant and struct field names
https://bugs.webkit.org/show_bug.cgi?id=81034

Patch by Brian Salomon <bsalomon@google.com> on 2012-03-26
Reviewed by James Robinson.

No behavior change, so no tests. The modified code is executed by many existing tests.

* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::createAcceleratedCanvas):
* platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
(WebCore::CCRenderSurfaceFilters::apply):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::createAcceleratedCanvas):

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

12 years agoUnaligned userspace access for SH4 platforms
commit-queue@webkit.org [Tue, 27 Mar 2012 02:03:47 +0000 (02:03 +0000)]
Unaligned userspace access for SH4 platforms
https://bugs.webkit.org/show_bug.cgi?id=79104

Patch by Thouraya ANDOLSI <thouraya.andolsi@st.com> on 2012-03-26
Reviewed by Gavin Barraclough.

* assembler/AbstractMacroAssembler.h:
(Jump):
(JSC::AbstractMacroAssembler::Jump::Jump):
(JSC::AbstractMacroAssembler::Jump::link):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::load16Unaligned):
(JSC::MacroAssemblerSH4::load32WithUnalignedHalfWords):
(JSC::MacroAssemblerSH4::branchDouble):
(JSC::MacroAssemblerSH4::branchTrue):
(JSC::MacroAssemblerSH4::branchFalse):
* assembler/SH4Assembler.h:
(JSC::SH4Assembler::extraInstrForBranch):
(SH4Assembler):
(JSC::SH4Assembler::bra):
(JSC::SH4Assembler::linkJump):
* jit/JIT.h:
(JIT):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):

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

12 years ago[chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
nduca@chromium.org [Tue, 27 Mar 2012 02:01:42 +0000 (02:01 +0000)]
[chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
https://bugs.webkit.org/show_bug.cgi?id=82265

Source/Platform:

Reviewed by James Robinson.

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
* chromium/public/WebLayerTreeViewClient.h:
(WebLayerTreeViewClient):
(WebKit::WebLayerTreeViewClient::didCommit):

Source/WebCore:

In threaded compositing mode, the WebWidget is self-scheduled,
receiving damage and processing it without forwarding that damage
up to the embedding WebWidgetClient. In Chromium's case, the
client uses the presence of damage to perform input flow
control. This patch exposes the need for input flow control to the
embedder, while keeping the actual logic about what exactly
warrants input flow control inside the implementation.

Reviewed by James Robinson.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::commitComplete):
(WebCore::CCLayerTreeHost::commitRequested):
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHostClient):
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCProxy.h:
(CCProxy):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::commitRequested):
(WebCore):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(CCSingleThreadProxy):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::commitRequested):
(WebCore):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):

Source/WebKit/chromium:

In threaded compositing mode, the WebWidget is self-scheduled,
receiving damage and processing it without forwarding that damage
up to the embedding WebWidgetClient. In Chromium's case, the
client uses the presence of damage to perform input flow
control. This patch exposes the need for input flow control to the
embedder, while keeping the actual logic about what exactly
warrants input flow control inside the implementation.

Reviewed by James Robinson.

* public/WebWidget.h:
(WebWidget):
(WebKit::WebWidget::isInputThrottled):
* public/WebWidgetClient.h:
(WebWidgetClient):
(WebKit::WebWidgetClient::didBecomeReadyForAdditionalInput):
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::commitRequested):
(WebKit):
* src/WebLayerTreeViewImpl.cpp:
(WebKit::WebLayerTreeViewImpl::didCommit):
(WebKit):
* src/WebLayerTreeViewImpl.h:
(WebLayerTreeViewImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::isInputThrottled):
(WebKit):
(WebKit::WebViewImpl::didCommit):
* src/WebViewImpl.h:
(WebViewImpl):
* tests/CCLayerTreeHostTest.cpp:
(WTF::MockLayerTreeHostClient::didCommit):
(MockLayerTreeHostClient):
* tests/FakeCCLayerTreeHostClient.h:
(FakeCCLayerTreeHostClient):

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

12 years agoWhen <img crossorigin> fails the CORS check, we should fire the error event
abarth@webkit.org [Tue, 27 Mar 2012 01:59:06 +0000 (01:59 +0000)]
When <img crossorigin> fails the CORS check, we should fire the error event
https://bugs.webkit.org/show_bug.cgi?id=81998

Reviewed by Nate Chapin.

Source/WebCore:

The spec says we're supposed to fire the error event when the CORS
check fails, but we haven't been.  This patch is larger than it might
otherwise be because we're firing the event asynchronously, but that
seems like the right thing to do.

Tests: http/tests/security/img-with-failed-cors-check-fails-to-load.html

* dom/Document.cpp:
(WebCore::Document::implicitClose):
* loader/ImageLoader.cpp:
(WebCore::errorEventSender):
(WebCore):
(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::setImage):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::dispatchPendingEvent):
(WebCore::ImageLoader::dispatchPendingErrorEvent):
(WebCore::ImageLoader::dispatchPendingErrorEvents):
* loader/ImageLoader.h:
(ImageLoader):

LayoutTests:

Check that we're firing the error event in this case.

* http/tests/security/img-with-failed-cors-check-fails-to-load-expected.txt:
* http/tests/security/img-with-failed-cors-check-fails-to-load.html:

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

12 years agoRetry crashing tests serially at the end of NRWT on Apple Mac
mhahnenberg@apple.com [Tue, 27 Mar 2012 01:56:17 +0000 (01:56 +0000)]
Retry crashing tests serially at the end of NRWT on Apple Mac
https://bugs.webkit.org/show_bug.cgi?id=82233

Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.should_retry_crashes):
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.should_retry_crashes):

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

12 years agoRebaseline after r112177.
rniwa@webkit.org [Tue, 27 Mar 2012 01:32:23 +0000 (01:32 +0000)]
Rebaseline after r112177.

* fast/dom/css-dom-read-2-expected.txt:

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

12 years agoMake filters and the threaded compositor play well together.
senorblanco@chromium.org [Tue, 27 Mar 2012 01:31:50 +0000 (01:31 +0000)]
Make filters and the threaded compositor play well together.
https://bugs.webkit.org/show_bug.cgi?id=78139

Use a dedicated GraphicsContext3D instance for all filters calls in
the threaded case.  Clone all FilterOperations for thread safety
in the threaded case.

Reviewed by James Robinson.

Covered by tests in LayoutTests/css3/filters.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setFilters):
Set a global flag if we've seen content with filters, so we know
we need to create the filter context.
(WebCore::LayerChromium::pushPropertiesTo):
Clone all filter operations if we're in the threaded case.
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCLayerTreeHost::needsFilterContext):
(WebCore::CCLayerTreeHost::setNeedsFilterContext):
(CCLayerTreeHost):
Add flag and accessors for needsFilterContext.
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::applyFilters):
Pick up the appropriate context from SharedGraphicsContext3D,
depending if we're in the threaded case or not.
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::recreateContext):
For the threaded compositor re-create the filter context
alongside the main compositor context on lost context, if requested.
(WebCore::CCThreadProxy::beginFrame):
Create the filter context in beginFrame, if it was resquested and is
NULL.  This handles the first-use case.
* platform/graphics/filters/CustomFilterOperation.h:
(WebCore::CustomFilterOperation::clone):
Assert if trying to clone the custom filter operation (it has
non-threadsafe members).
* platform/graphics/filters/FilterOperation.h:
(WebCore::DefaultFilterOperation::clone):
(WebCore::PassthroughFilterOperation::clone):
(WebCore::ReferenceFilterOperation::clone):
(WebCore::BasicColorMatrixFilterOperation::clone):
(WebCore::BasicComponentTransferFilterOperation::clone):
(WebCore::GammaFilterOperation::clone):
(WebCore::BlurFilterOperation::clone):
(WebCore::DropShadowFilterOperation::clone):
Add clone methods for all FilterOperations.
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
(WebCore::SharedGraphicsContext3DImpl::getContext):
(WebCore::SharedGraphicsContext3DImpl::createContext):
(WebCore::SharedGraphicsContext3D::get):
(WebCore::getOrCreateContextForImplThread):
(WebCore::SharedGraphicsContext3D::getForImplThread):
(WebCore::SharedGraphicsContext3D::haveForImplThread):
(WebCore::SharedGraphicsContext3D::createForImplThread):
Split out context creation, lost context recovery, and retrieval
into separate functions, so the impl thread can use only the parts
it wants on the threads it wants (create and have on main, get on impl).
Add asserts to ensure that's how they're called.
* platform/graphics/gpu/SharedGraphicsContext3D.h:
(SharedGraphicsContext3D):
Reuse the SharedGraphicsContext infrastructure to create a new
context singleton for filter use in the threaded compositor.

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

12 years agoSet eol-style: native on WTF.sln per Ryan Sleevi's request.
rniwa@webkit.org [Tue, 27 Mar 2012 01:21:51 +0000 (01:21 +0000)]
Set eol-style: native on WTF.sln per Ryan Sleevi's request.

* WTF.vcproj/WTF.sln: Added property svn:eol-style.

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

12 years agoChromium build fix; add BitVector.h/cpp to gypi.
rniwa@webkit.org [Tue, 27 Mar 2012 01:12:31 +0000 (01:12 +0000)]
Chromium build fix; add BitVector.h/cpp to gypi.

* WTF.gypi:

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

12 years agoFrameLoader::shouldAllowNavigation uses Frame for context rather than Document
abarth@webkit.org [Tue, 27 Mar 2012 01:09:43 +0000 (01:09 +0000)]
FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
https://bugs.webkit.org/show_bug.cgi?id=81020

Reviewed by Eric Seidel.

Source/WebCore:

The vast majority of security checks in the browser should use a
ScriptExecutionContext (aka a Document) to designate "who" is
attempting to perform a given action.  Unfortunately,
shouldAllowNavigation was using a Frame to designate "who" is
attempting the navigation.

In cases when the executing script is "inactive" (i.e., belongs to a
document that is not currently displayed in a Frame), using the Frame
can cause us to grant the script the privileges of the document that's
currently displayed in the Frame rather than the one that contains the
script.

This patch moves shouldAllowNavigation from FrameLoader to Document
(and renames it to canNavigate), effectively change the context object
from a Frame to a Document.

Test: http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html

* bindings/generic/BindingSecurity.h:
(BindingSecurity):
(WebCore):
* bindings/v8/V8Utilities.cpp:
(WebCore):
* bindings/v8/V8Utilities.h:
(WebCore):
    - Deletes unused code.
* dom/Document.cpp:
(WebCore::canAccessAncestor):
(WebCore):
(WebCore::Document::canNavigate):
    - canNavigate is copied from FrameLoader::shouldAllowNavigation.
      I've added a null-check bailout if the document is inactive.
* dom/Document.h:
(Document):
* loader/FormState.cpp:
(WebCore::FormState::FormState):
(WebCore::FormState::create):
* loader/FormState.h:
(WebCore):
(FormState):
(WebCore::FormState::sourceDocument):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
    - Changes the context object from Frame to Document.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore):
(WebCore::FrameLoader::findFrameForNavigation):
    - FrameLoader::findFrameForNavigation still incorrectly uses Frame
      as the context object, but that's a bug for another patch.
(WebCore::createWindow):
* loader/FrameLoader.h:
(FrameLoader):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledFormSubmission::fire):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::open):
* page/History.cpp:
(WebCore::History::go):

Source/WebKit/mac:

Update call site to new function name.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchWillSubmitForm):

Source/WebKit/win:

Update call site to new function name.

* WebFrame.cpp:
(WebFrame::dispatchWillSubmitForm):

Source/WebKit2:

Update call site to new function name.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):

LayoutTests:

Test that a script from an inactive document doesn't inherit the
navigation privileges of the document that currently occupies the
frame.

* http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child-expected.txt: Added.
* http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html: Added.
* http/tests/security/frameNavigation/resources/fail.html: Added.
* http/tests/security/frameNavigation/resources/iframe-with-inner-frame-on-foreign-domain.html:
* http/tests/security/frameNavigation/resources/popup-ready-to-navigate-child.html: Added.

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

12 years agoTrigger a build on Chromium Linux boxes to see if clean builds succeed or not.
rniwa@webkit.org [Tue, 27 Mar 2012 01:02:54 +0000 (01:02 +0000)]
Trigger a build on Chromium Linux boxes to see if clean builds succeed or not.

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

12 years ago[chromium] Simplify and fix CCLayerSorter
vangelis@chromium.org [Tue, 27 Mar 2012 00:16:30 +0000 (00:16 +0000)]
[chromium] Simplify and fix CCLayerSorter
https://bugs.webkit.org/show_bug.cgi?id=82114

Source/WebCore:

A significant cleanup, simplification and improvement of the CCLayerSorter code.
Simplified the LayerShape structure to use WebCore's FloatQuad for all overlap tests.
By treating every layer as two triangles, the old overlap code did a lot of redundant work
including testing two of the vertices of the layer and its diagonal twice. The new overlap
tests check:
1. The four corners of each of the two layers against the other layer.
2. The four edges of each layer against the edges of the other layer.
Unlike the old code, the new code has no early-outs in the overlap tests as those where causing
us to miss legitimate overlaps.
A new technique for breaking dependency cycles introduced by intersecting layers is implemented.
Instead of arbitrarily breaking cycles by choosing the node in the graph with the smallest number of
incoming edges (i.e. layers that need to be drawn before it) we chose the one with the smallest sum
of graph edge weights (defined as the max depth difference between two layers). Layers that intersect
have their respective graph edge weight set to zero, making them more likely to be picked for breaking
the cycles (it's not a perfect solution but it seems to perform much better than the previous one).

In addition to being overly complex and doing reduntant work, the old code was missing a
perspective divide when computing the coordinates of the layer's corners in the projected plane
which was the source of a lot of mis-sorted results.

In all, these improvements, fix a lot of outstanding issues with layer sorting, on pages such as:
http://www.keithclark.co.uk/labs/3dcss/demo/
http://2012.beercamp.com
https://developer.mozilla.org/fr/demos/detail/the-box/launch

Tests: CCLayerSorter unit tests.

Reviewed by Kenneth Russell.

* platform/graphics/chromium/cc/CCLayerSorter.cpp:
(WebCore):
(WebCore::perpProduct):
(WebCore::edgeEdgeTest):
(WebCore::CCLayerSorter::checkOverlap):
(WebCore::CCLayerSorter::LayerShape::LayerShape):
(WebCore::CCLayerSorter::LayerShape::layerZFromProjectedPoint):
(WebCore::CCLayerSorter::createGraphNodes):
(WebCore::CCLayerSorter::createGraphEdges):
(WebCore::CCLayerSorter::sort):
* platform/graphics/chromium/cc/CCLayerSorter.h:
(WebCore::CCLayerSorter::CCLayerSorter):
(CCLayerSorter):
(LayerShape):
(WebCore::CCLayerSorter::GraphNode::GraphNode):
(GraphNode):
(WebCore::CCLayerSorter::GraphEdge::GraphEdge):
(GraphEdge):

Source/WebKit/chromium:

Adjustments to the CCLayerSorter unit tests to account for API changes in the
CCLayerSorter class.

Reviewed by Kenneth Russell.

* tests/CCLayerSorterTest.cpp:
(WebCore):
(WebCore::TEST):

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

12 years agoNRWT should retry failures serially
mhahnenberg@apple.com [Tue, 27 Mar 2012 00:12:49 +0000 (00:12 +0000)]
NRWT should retry failures serially
https://bugs.webkit.org/show_bug.cgi?id=82241

Reviewed by Dirk Pranke.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._run_tests): Add another parameter to specify the number of workers to use.
(Manager.run): Run the failures serially.

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

12 years agoTouch BitVector as a speculative fix for Chromium Linux.
rniwa@webkit.org [Tue, 27 Mar 2012 00:12:20 +0000 (00:12 +0000)]
Touch BitVector as a speculative fix for Chromium Linux.

* wtf/BitVector.h:
(BitVector):

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

12 years agoMore Chromium rebaselines for assorted failing tests. Almost all of the differences
ojan@chromium.org [Tue, 27 Mar 2012 00:10:21 +0000 (00:10 +0000)]
More Chromium rebaselines for assorted failing tests. Almost all of the differences
are text rendering or antialiasing. Some of them are imperceptibly different shades
of a color for tests that aren't testing that (e.g the test tests clipping).

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

12 years ago[Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to...
fsamuel@chromium.org [Tue, 27 Mar 2012 00:09:12 +0000 (00:09 +0000)]
[Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to fail
https://bugs.webkit.org/show_bug.cgi?id=81954

Reviewed by James Robinson.

A static variable s_inPaintContents is set when painting, and it ensures
that we don't delete GraphicsLayers or create GraphicsLayers while painting.

However, because this variable is static, it does not permit the existence
of multiple WebViews in different stages (one laying out and one painting).

This manifests itself if one attempts to use the --force-compositing-mode
in Chromium and attempts to navigate to a page with a missing or old plugin
or a browser plugin (which uses a WebViewPlugin as a placeholder until it's
done loading).

The solution to simplify debugging is to make this flag per-Page.
We can access Page from RenderLayerBacking which is a GraphicsLayerClient.
We add a new method GraphicsLayerClient::verifyNotPainting with a default
(do nothing) implementation and override it in RenderLayerBacking to
test the flag set in Page.

* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(Page):
(WebCore::Page::setIsPainting):
(WebCore::Page::isPainting):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::~GraphicsLayer):
(WebCore::GraphicsLayer::paintGraphicsLayerContents):
* platform/graphics/GraphicsLayerClient.h:
(GraphicsLayerClient):
(WebCore::GraphicsLayerClient::verifyNotPainting):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintContents):
(WebCore):
(WebCore::RenderLayerBacking::verifyNotPainting):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):

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

12 years agocssText should use shorthand notations
rniwa@webkit.org [Mon, 26 Mar 2012 23:59:27 +0000 (23:59 +0000)]
cssText should use shorthand notations
https://bugs.webkit.org/show_bug.cgi?id=81737

Reviewed by Enrica Casucci.

Source/JavaScriptCore:

Export symbols of BitVector on Windows.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

Source/WebCore:

Use shorthand properties to serialize style properties for cssText.

The overall algorithm is to look for any property that has a shorthand, and then check if
the shorthand value could be obtained (the condition is quite complicated for border properties).
If it could, then append that value to the string builder, and set the corresponding entries in
shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in
shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties
that use the same shorthand property when we cannot use the shorthand.

Test: fast/css/cssText-shorthand.html

* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::asText):

Source/WTF:

* wtf/BitVector.h:
(BitVector):
(WTF::BitVector::ensureSizeAndSet): Added.

LayoutTests:

Rebaseline existing tests and add a regression test for unprefixed CSS properties with
the exception of -webkit-border-horizontal/vertical-spacing (the shorthand version of
these properties (border-spacing) is unprefixed.

* editing/pasteboard/paste-and-sanitize-expected.txt: Uses border instead of longhand
properties as desired.
* editing/pasteboard/paste-and-sanitize.html:
* editing/style/non-inheritable-styles-expected.txt: Ditto.
* fast/css/background-position-serialize-expected.txt: No longer emits "background-*:
initial" as desired.
* fast/css/cssText-shorthand-expected.txt: Added.
* fast/css/cssText-shorthand.html: Added.
* fast/css/remove-shorthand-expected.txt:
* fast/css/remove-shorthand.html: Modified to do elaborative comparison of the lists of
properties before and after removing a shorthand since now removing a shorthand property
may end up adding new longhand property.
* fast/css/uri-token-parsing-expected.txt:
* fast/css/uri-token-parsing.html: Uses shorthand properties instead of longhand equivalents.
* inspector/styles/styles-update-from-js-expected.txt: Ditto.
* printing/page-rule-css-text-expected.txt: Ditto.

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

12 years agoAllow expectations on directories in virtual test suites
enne@google.com [Mon, 26 Mar 2012 23:53:59 +0000 (23:53 +0000)]
Allow expectations on directories in virtual test suites
https://bugs.webkit.org/show_bug.cgi?id=82250

Reviewed by Dirk Pranke.

lookup_virtual_test_base was only returning valid results for files
and not directories. Fix by falling back to the virtual test suite
mapping if possible.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.lookup_virtual_test_base):
* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort.skipped_tests):
(TestPort.virtual_test_suites):

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

12 years agoNever remove root compositing layers in the web process
andersca@apple.com [Mon, 26 Mar 2012 23:42:17 +0000 (23:42 +0000)]
Never remove root compositing layers in the web process
https://bugs.webkit.org/show_bug.cgi?id=82255
<rdar://problem/11058521>

Reviewed by Sam Weinig.

Since we never leave accelerated compositing mode when using tiled drawing, we should
never remove root compositing layers in the web process.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):

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

12 years ago[Chromium] Add Android keycodes
commit-queue@webkit.org [Mon, 26 Mar 2012 23:39:27 +0000 (23:39 +0000)]
[Chromium] Add Android keycodes
https://bugs.webkit.org/show_bug.cgi?id=81950

Add the missing Android keycodes listed in the bug.

Patch by Bolin Hsu <bhsu@google.com> on 2012-03-26
Reviewed by Adam Barth.

* platform/chromium/KeyCodeConversionAndroid.cpp:
(WebCore::windowsKeyCodeForKeyEvent):
* platform/chromium/KeyboardCodes.h:

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

12 years agoFix duplicated ChangeLog entry from r112171.
dpranke@chromium.org [Mon, 26 Mar 2012 23:39:02 +0000 (23:39 +0000)]
Fix duplicated ChangeLog entry from r112171.

Unreviewed, build fix.

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

12 years agoSwitch ColumnInfo::addForcedBreak to LayoutUnits
leviw@chromium.org [Mon, 26 Mar 2012 23:37:44 +0000 (23:37 +0000)]
Switch ColumnInfo::addForcedBreak to LayoutUnits
https://bugs.webkit.org/show_bug.cgi?id=82210

Reviewed by Eric Seidel.

Forced breaks are added by local offsets, which should be in LayoutUnits.

No new tests. No change in behavior.

* rendering/ColumnInfo.h:
(WebCore::ColumnInfo::addForcedBreak):

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

12 years agotest-webkitpy: split test-finding code into a different module
dpranke@chromium.org [Mon, 26 Mar 2012 23:36:06 +0000 (23:36 +0000)]
test-webkitpy: split test-finding code into a different module
https://bugs.webkit.org/show_bug.cgi?id=82253

Reviewed by Adam Barth.

Per suggestion from abarth, this change splits all the
filesystem-crawling, test-finding code in test-webkitpy out into
a separate module and switches to using a FileSystem object.
This makes things much more testable, so we also add tests :).

We also add a realpath() method to the Filesystem object, since
test-webkitpy needs that in order to be able to resolve symlinks
properly to determine whether a file is under a particular tree
or not.

* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.realpath):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.realpath):
* Scripts/webkitpy/test/main.py:
(Tester.__init__):
(Tester.add_tree):
(Tester.run):
(Tester._run_tests):
(Tester._log_exception):
* Scripts/webkitpy/test/test_finder.py: Added.
(TestDirectoryTree):
(TestDirectoryTree.__init__):
(TestDirectoryTree.find_modules):
(TestDirectoryTree.find_modules.file_filter):
(TestDirectoryTree.to_module):
(TestDirectoryTree.clean):
(TestFinder):
(TestFinder.__init__):
(TestFinder.add_tree):
(TestFinder.additional_paths):
(TestFinder.clean_trees):
(TestFinder.is_module):
(TestFinder.to_module):
(TestFinder.find_names):
(TestFinder._exclude):
* Scripts/webkitpy/test/test_finder_unittest.py: Added.
(TestFinderTest):
(TestFinderTest.setUp):
(TestFinderTest.tearDown):
(TestFinderTest.test_additional_system_paths):
(TestFinderTest.test_is_module):
(TestFinderTest.test_to_module):
(TestFinderTest.test_clean):
(TestFinderTest.test_find_names):

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

12 years agoUpdate LayoutUnit usage in ContainerNode, Element, and ElementRareData
leviw@chromium.org [Mon, 26 Mar 2012 23:35:04 +0000 (23:35 +0000)]
Update LayoutUnit usage in ContainerNode, Element, and ElementRareData
https://bugs.webkit.org/show_bug.cgi?id=82219

Reviewed by Eric Seidel.

No new tests. No change in behavior.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect
of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped.
* dom/Element.cpp:
(WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute
coordinates, which are always expressed in integers.
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of
INT_MAX to avoid overflowing when LayoutUnits are sub-pixel.

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

12 years agoUnreviewed test_expectations update for chromium.
eae@chromium.org [Mon, 26 Mar 2012 23:33:58 +0000 (23:33 +0000)]
Unreviewed test_expectations update for chromium.

* platform/chromium/test_expectations.txt:

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

12 years agotest-webkitpy: split test-finding code into a different module
dpranke@chromium.org [Mon, 26 Mar 2012 23:31:05 +0000 (23:31 +0000)]
test-webkitpy: split test-finding code into a different module
https://bugs.webkit.org/show_bug.cgi?id=82253

Reviewed by Adam Barth.

Per suggestion from abarth, this change splits all the
filesystem-crawling, test-finding code in test-webkitpy out into
a separate module and switches to using a FileSystem object.
This makes things much more testable, so we also add tests :).

We also add a realpath() method to the Filesystem object, since
test-webkitpy needs that in order to be able to resolve symlinks
properly to determine whether a file is under a particular tree
or not.

* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.realpath):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.realpath):
* Scripts/webkitpy/test/main.py:
(Tester.__init__):
(Tester.add_tree):
(Tester.run):
(Tester._run_tests):
(Tester._log_exception):
* Scripts/webkitpy/test/test_finder.py: Added.
(TestDirectoryTree):
(TestDirectoryTree.__init__):
(TestDirectoryTree.find_modules):
(TestDirectoryTree.find_modules.file_filter):
(TestDirectoryTree.to_module):
(TestDirectoryTree.clean):
(TestFinder):
(TestFinder.__init__):
(TestFinder.add_tree):
(TestFinder.additional_paths):
(TestFinder.clean_trees):
(TestFinder.is_module):
(TestFinder.to_module):
(TestFinder.find_names):
(TestFinder._exclude):
* Scripts/webkitpy/test/test_finder_unittest.py: Added.
(TestFinderTest):
(TestFinderTest.setUp):
(TestFinderTest.tearDown):
(TestFinderTest.test_additional_system_paths):
(TestFinderTest.test_is_module):
(TestFinderTest.test_to_module):
(TestFinderTest.test_clean):
(TestFinderTest.test_find_names):

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

12 years agoUpdate binding test output for V8 after r112163.
adamk@chromium.org [Mon, 26 Mar 2012 23:05:29 +0000 (23:05 +0000)]
Update binding test output for V8 after r112163.

* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::constructorCallback):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructorConstructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::constructorCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):

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

12 years agoUpdate localSelectionRect to return a LayoutRect
leviw@chromium.org [Mon, 26 Mar 2012 23:01:23 +0000 (23:01 +0000)]
Update localSelectionRect to return a LayoutRect
https://bugs.webkit.org/show_bug.cgi?id=82183

Reviewed by Eric Seidel.

localSelectionRect returns a rectangle in the coordinate space of its renderer,
and therefor should remain LayoutUnits until being promoted to absolute
coordinates or painted. Also fixing an incorrect conversion of startPos and
endPos in selectionRectForRepaint.

No new tests. No change in behavior.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect
for the value being returned from the font engine since these floating point
values should not be pixel snapped.
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::localSelectionRect):
* rendering/RenderReplaced.h:
(RenderReplaced):
* rendering/RenderText.cpp:
(WebCore::localQuadForTextBox):
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuadsForRange):
(WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of
start/endPos to LayoutUnits. These values represent a range of selected characters,
not layout values!
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::localCaretRect):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::localSelectionRect):
* rendering/svg/SVGInlineTextBox.h:
(SVGInlineTextBox):

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

12 years ago[Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
commit-queue@webkit.org [Mon, 26 Mar 2012 22:59:53 +0000 (22:59 +0000)]
[Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
https://bugs.webkit.org/show_bug.cgi?id=82243

Patch by Justin Novosad <junov@chromium.org> on 2012-03-26
Reviewed by James Robinson.

Adding null pointer check to prevent crash and texture object
validity check to prevent potential graphics glitch

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::pushPropertiesTo):

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

12 years agoDFG should assert that argument value recoveries can only be
fpizlo@apple.com [Mon, 26 Mar 2012 22:58:35 +0000 (22:58 +0000)]
DFG should assert that argument value recoveries can only be
AlreadyInRegisterFile or Constant
https://bugs.webkit.org/show_bug.cgi?id=82249

Reviewed by Michael Saboff.

Made the assertions that the DFG makes for argument value recoveries match
what Arguments expects.

* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::isConstant):
(ValueRecovery):
(JSC::ValueRecovery::isAlreadyInRegisterFile):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

12 years agoUse PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
adamk@chromium.org [Mon, 26 Mar 2012 22:57:22 +0000 (22:57 +0000)]
Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
https://bugs.webkit.org/show_bug.cgi?id=82238

Reviewed by Adam Barth.

The setJSWrapper* methods previously featured a comment that asked
callers to ref the objects before passing them in. This change makes
that contract explicit (and allows the removal of the comment).

In addition, for ConstructorCallbacks, this change slightly reduces
refcount churn by passing on the initial ref via RefPtr::release().

No new tests, no change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
(GenerateNamedConstructorCallback): ditto.
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
(WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
(WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
* bindings/v8/V8Proxy.h:
(WebCore::toV8): Remove explicit ref.
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
(WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback): ditto.
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback): ditto.

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

12 years ago Remove obsolete FormDataStreamMac code
ap@apple.com [Mon, 26 Mar 2012 22:51:32 +0000 (22:51 +0000)]
    Remove obsolete FormDataStreamMac code
        https://bugs.webkit.org/show_bug.cgi?id=82244

        Reviewed by Brady Eidson.

        * platform/network/ResourceHandle.h:
        Removed ResourceHandle::didSendBodyDataDelegateExists().

        * platform/network/mac/FormDataStreamMac.h:
        * platform/network/mac/FormDataStreamMac.mm:
        Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation
        added support for it.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::cancel):
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
        (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
        (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
        We no longer need to associate streams with ResourceHandles!

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

12 years agoV8RecursionScope should not hold a raw pointer to ScriptExecutionContext
adamk@chromium.org [Mon, 26 Mar 2012 22:49:27 +0000 (22:49 +0000)]
V8RecursionScope should not hold a raw pointer to ScriptExecutionContext
https://bugs.webkit.org/show_bug.cgi?id=82222

Reviewed by Eric Seidel.

Source/WebCore:

Instead of holding onto ScriptExecutionContext, cache the boolean value we
care about (context->isDocument()). This avoids problems if the
context goes away as a result of the script we just ran.

Test: fast/frames/subframe-load-js-url-crash.html

* bindings/v8/V8RecursionScope.cpp:
(WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached
bool instead of calling into the context.
* bindings/v8/V8RecursionScope.h:
(WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from
the constructor and cache the result.
(WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass
anything to didLeaveScriptContext since it's now a member.
(V8RecursionScope): Make didLeaveScriptContext a member function and
remove its argument. Add member bool to hold the value of isDocument.

LayoutTests:

* fast/frames/resources/subframe-load-js-url-crash-iframe.html: Added.
* fast/frames/subframe-load-js-url-crash-expected.txt: Added.
* fast/frames/subframe-load-js-url-crash.html: Added.

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

12 years ago[EFL] Unreviewed gardening i fast/frames, fast/html and
kubo@profusion.mobi [Mon, 26 Mar 2012 22:47:29 +0000 (22:47 +0000)]
[EFL] Unreviewed gardening i fast/frames, fast/html and
fast/lists.

* platform/efl/Skipped:
* platform/efl/fast/frames/001-expected.png:
* platform/efl/fast/frames/flattening/frameset-flattening-subframe-resize-expected.png:
* platform/efl/fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-expected.png:
* platform/efl/fast/frames/flattening/iframe-flattening-nested-expected.png:
* platform/efl/fast/frames/frame-navigation-expected.png:
* platform/efl/fast/frames/frame-scrolling-attribute-expected.png:
* platform/efl/fast/frames/frameset-style-recalc-expected.png:
* platform/efl/fast/frames/iframe-scrolling-attribute-expected.png:
* platform/efl/fast/frames/iframe-with-frameborder-expected.png:
* platform/efl/fast/frames/onlyCommentInIFrame-expected.png:
* platform/efl/fast/frames/viewsource-attribute-expected.png:
* platform/efl/fast/frames/viewsource-on-image-file-expected.png:
* platform/efl/fast/html/details-add-child-1-expected.png: Added.
* platform/efl/fast/html/details-add-child-2-expected.png: Added.
* platform/efl/fast/html/details-add-details-child-1-expected.png: Added.
* platform/efl/fast/html/details-add-details-child-2-expected.png: Added.
* platform/efl/fast/html/details-add-summary-1-and-click-expected.png: Copied from LayoutTests/platform/efl/fast/lists/li-br-expected.png.
* platform/efl/fast/html/details-add-summary-1-expected.png: Copied from LayoutTests/platform/efl/fast/lists/li-br-expected.png.
* platform/efl/fast/html/details-add-summary-10-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-10-expected.png: Added.
* platform/efl/fast/html/details-add-summary-2-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-2-expected.png: Copied from LayoutTests/platform/efl/fast/lists/li-br-expected.png.
* platform/efl/fast/html/details-add-summary-3-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-3-expected.png: Added.
* platform/efl/fast/html/details-add-summary-4-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-4-expected.png: Added.
* platform/efl/fast/html/details-add-summary-5-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-5-expected.png: Copied from LayoutTests/platform/efl/fast/lists/li-br-expected.png.
* platform/efl/fast/html/details-add-summary-6-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-6-expected.png: Added.
* platform/efl/fast/html/details-add-summary-7-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-7-expected.png: Added.
* platform/efl/fast/html/details-add-summary-8-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-8-expected.png: Added.
* platform/efl/fast/html/details-add-summary-9-and-click-expected.png: Added.
* platform/efl/fast/html/details-add-summary-9-expected.png: Added.
* platform/efl/fast/html/details-add-summary-child-1-expected.png: Added.
* platform/efl/fast/html/details-add-summary-child-2-expected.png: Added.
* platform/efl/fast/html/details-nested-1-expected.png: Added.
* platform/efl/fast/html/details-nested-2-expected.png: Added.
* platform/efl/fast/html/details-no-summary1-expected.png: Added.
* platform/efl/fast/html/details-no-summary2-expected.png: Added.
* platform/efl/fast/html/details-no-summary3-expected.png: Added.
* platform/efl/fast/html/details-no-summary4-expected.png: Added.
* platform/efl/fast/html/details-open-javascript-expected.png: Added.
* platform/efl/fast/html/details-open1-expected.png: Added.
* platform/efl/fast/html/details-open2-expected.png: Added.
* platform/efl/fast/html/details-open3-expected.png: Added.
* platform/efl/fast/html/details-open4-expected.png: Added.
* platform/efl/fast/html/details-open5-expected.png: Added.
* platform/efl/fast/html/details-open6-expected.png: Added.
* platform/efl/fast/html/details-position-expected.png: Added.
* platform/efl/fast/html/details-remove-child-1-expected.png: Added.
* platform/efl/fast/html/details-remove-child-2-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-1-and-click-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-1-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-2-and-click-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-2-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-3-and-click-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-3-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-4-and-click-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-4-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-5-and-click-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-5-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-6-and-click-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-6-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-child-1-expected.png: Added.
* platform/efl/fast/html/details-remove-summary-child-2-expected.png: Added.
* platform/efl/fast/html/details-replace-summary-child-expected.png: Added.
* platform/efl/fast/html/details-replace-text-expected.png: Added.
* platform/efl/fast/html/details-writing-mode-expected.png: Added.
* platform/efl/fast/html/link-rel-stylesheet-expected.png:
* platform/efl/fast/html/listing-expected.png:
* platform/efl/fast/html/marquee-scroll-expected.png:
* platform/efl/fast/html/marquee-scrollamount-expected.png:
* platform/efl/fast/lists/001-expected.png:
* platform/efl/fast/lists/001-vertical-expected.png:
* platform/efl/fast/lists/002-expected.png:
* platform/efl/fast/lists/002-vertical-expected.png:
* platform/efl/fast/lists/003-expected.png:
* platform/efl/fast/lists/003-vertical-expected.png:
* platform/efl/fast/lists/005-expected.png:
* platform/efl/fast/lists/005-vertical-expected.png:
* platform/efl/fast/lists/007-expected.png:
* platform/efl/fast/lists/007-vertical-expected.png:
* platform/efl/fast/lists/008-expected.png:
* platform/efl/fast/lists/008-vertical-expected.png:
* platform/efl/fast/lists/anonymous-items-expected.png:
* platform/efl/fast/lists/big-list-marker-expected.png:
* platform/efl/fast/lists/dynamic-marker-crash-expected.png:
* platform/efl/fast/lists/li-br-expected.png:
* platform/efl/fast/lists/li-style-alpha-huge-value-crash-expected.png:
* platform/efl/fast/lists/marker-before-empty-inline-expected.png:
* platform/efl/fast/lists/marker-image-error-expected.png:
* platform/efl/fast/lists/markers-in-selection-expected.png:
* platform/efl/fast/lists/ol-display-types-expected.png:
* platform/efl/fast/lists/ol-start-parsing-expected.png:
* platform/efl/fast/lists/olstart-expected.png:
* platform/efl/fast/lists/ordered-list-with-no-ol-tag-expected.png:
* platform/efl/fast/lists/scrolled-marker-paint-expected.png:

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

12 years ago[chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
commit-queue@webkit.org [Mon, 26 Mar 2012 22:43:43 +0000 (22:43 +0000)]
[chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
https://bugs.webkit.org/show_bug.cgi?id=82239

Patch by Dana Jansens <danakj@chromium.org> on 2012-03-26
Reviewed by Adrienne Walker.

The assert is incorrect and should check the animation state on
the surface, not the owning layer.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateCompositorResources):

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

12 years agoCorrect LayoutUnit usage in RenderFieldSet and RenderMenuItem
leviw@chromium.org [Mon, 26 Mar 2012 22:41:28 +0000 (22:41 +0000)]
Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem
https://bugs.webkit.org/show_bug.cgi?id=82179

Reviewed by Julien Chaffraix.

Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also
adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details.

No new tests. No change in behavior.

* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror
the actual coordinates we paint.
(WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the
sub-pixel build.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect.
(WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header.
(WebCore::RenderMenuList::clientPaddingRight): Ditto.

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

12 years agoChromium rebaselines for test failing due to text rendering or antialiasing differences.
ojan@chromium.org [Mon, 26 Mar 2012 22:39:33 +0000 (22:39 +0000)]
Chromium rebaselines for test failing due to text rendering or antialiasing differences.
Changes to non-chromium results were from "webkit-patch optimize-baselines".

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

12 years agoTried to fix an unused parameter warning after r112154.
mitz@apple.com [Mon, 26 Mar 2012 22:39:18 +0000 (22:39 +0000)]
Tried to fix an unused parameter warning after r112154.

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to
layoutFlexItems.
(WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter.
* rendering/RenderFlexibleBox.h:

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

12 years agoSyntheticStyleCalc on an element should not force recalculation on its children
commit-queue@webkit.org [Mon, 26 Mar 2012 22:32:47 +0000 (22:32 +0000)]
SyntheticStyleCalc on an element should not force recalculation on its children
https://bugs.webkit.org/show_bug.cgi?id=79389

Patch by Rob Arnold <robarnold@fb.com> on 2012-03-26
Reviewed by Simon Fraser.

No new tests. Existing tests cover correctness, not sure how to test for performance.

* dom/Element.cpp:
(WebCore::Element::recalcStyle):

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

12 years agoapply cross axis constraints before aligning children in flexbox
tony@chromium.org [Mon, 26 Mar 2012 22:26:02 +0000 (22:26 +0000)]
apply cross axis constraints before aligning children in flexbox
https://bugs.webkit.org/show_bug.cgi?id=82240

Reviewed by Ojan Vafai.

Source/WebCore:

We weren't applying max-height constraints before aligning children.
This would cause center, end, stretch alignment to be wrong if we hit
a max-height on a flexbox.

This patch also moves the repositioning logic to happen after
computeLogicalHeight, which will be useful for flex-line-pack.

New test case in css3/flexbox/flex-align.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
* rendering/RenderFlexibleBox.h:

LayoutTests:

* css3/flexbox/flex-align-expected.txt:
* css3/flexbox/flex-align.html:

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