WebKit-https.git
8 years agoEnsure HTMLElementStack fails gracefully if it has a non-Element.
simonjam@chromium.org [Wed, 2 May 2012 00:04:01 +0000 (00:04 +0000)]
Ensure HTMLElementStack fails gracefully if it has a non-Element.
https://bugs.webkit.org/show_bug.cgi?id=85167

Reviewed by Adam Barth.

Source/WebCore:

Test: Added to html5lib/resources/webkit02.dat

* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::oneBelowTop):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndTag):

LayoutTests:

* html5lib/resources/webkit02.dat:

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

8 years agoAdd myself to the watchlist to watch all rendering changes, as well as sort the watch...
eric@webkit.org [Tue, 1 May 2012 23:39:21 +0000 (23:39 +0000)]
Add myself to the watchlist to watch all rendering changes, as well as sort the watchers in the list
https://bugs.webkit.org/show_bug.cgi?id=85305

Reviewed by Adam Barth.

* Scripts/webkitpy/common/config/watchlist:

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

8 years ago*Command.h files shouldn't be exported to WebKit layer
rniwa@webkit.org [Tue, 1 May 2012 23:36:57 +0000 (23:36 +0000)]
*Command.h files shouldn't be exported to WebKit layer
https://bugs.webkit.org/show_bug.cgi?id=74778

Reviewed by Eric Seidel.

Source/WebCore:

Remove the dependency on *Command.h files from Mac port's WebKit layer.
Also wrapped the call to TypingCommand::insertParagraphSeparatorInQuotedContent in the Editor class
so that we can just expose Editor's method instead of directly exposing the said static method.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* editing/Editor.h:
(Editor):
* editing/mac/EditorMac.mm:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent):
(WebCore):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
* src/WebViewImpl.cpp:

Source/WebKit/gtk:

* webkit/webkitwebframe.cpp:

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _insertParagraphSeparatorInQuotedContent]):

Source/WebKit/win:

* WebView.cpp:

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:

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

8 years ago[EFL] fast/loader/file-protocol-fragment.html needs rebaselining
commit-queue@webkit.org [Tue, 1 May 2012 23:09:14 +0000 (23:09 +0000)]
[EFL] fast/loader/file-protocol-fragment.html needs rebaselining
https://bugs.webkit.org/show_bug.cgi?id=85182

Unreviewed, add EFL expectation for fast/loader/file-protocol-fragment.html
and unskip the test.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-05-01

* platform/efl/Skipped:
* platform/efl/fast/loader/file-protocol-fragment-expected.txt: Added.

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

8 years agoRemove expectations for media/encrypted-media/encrypted-media-events.html now that...
commit-queue@webkit.org [Tue, 1 May 2012 23:01:35 +0000 (23:01 +0000)]
Remove expectations for media/encrypted-media/encrypted-media-events.html now that crash is fixed.
https://bugs.webkit.org/show_bug.cgi?id=84596

Unreviewed expectations update.

Patch by David Dorwin <ddorwin@chromium.org> on 2012-05-01

* platform/chromium/test_expectations.txt:

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

8 years ago[Mac] inspector/debugger/linkifier.html is flakey
aestes@apple.com [Tue, 1 May 2012 22:52:00 +0000 (22:52 +0000)]
[Mac] inspector/debugger/linkifier.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=85319

* platform/mac/Skipped: Skip the flakey test.

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

8 years agoRemove one bit from m_column to pack RenderTableCell bits more
jchaffraix@webkit.org [Tue, 1 May 2012 22:35:52 +0000 (22:35 +0000)]
Remove one bit from m_column to pack RenderTableCell bits more
https://bugs.webkit.org/show_bug.cgi?id=85291

Reviewed by Ojan Vafai.

Memory improvement, covered by the existing unit tests.

* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
Remove one bit from m_column (which should be fine as I wouldn't expect tables above 1 millions
columns to render at all anyway) to pack the bitfields in 32 bits. Re-arranged the bits to have the bigger
bitfield first.

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

8 years agoUnreviewed, rolling out r115735.
zmo@google.com [Tue, 1 May 2012 22:25:36 +0000 (22:25 +0000)]
Unreviewed, rolling out r115735.
http://trac.webkit.org/changeset/115735
https://bugs.webkit.org/show_bug.cgi?id=85314

cause two tests to crash due to an ASSERTION failure
(Requested by zhenyao on #webkit).

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

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::gestureEvent):

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

8 years agoSlow scrolling on www.sholby.net
andersca@apple.com [Tue, 1 May 2012 22:22:25 +0000 (22:22 +0000)]
Slow scrolling on www.sholby.net
https://bugs.webkit.org/show_bug.cgi?id=85304
<rdar://problem/11138952>

Reviewed by Beth Dakin.

Fix two performance issues that showed up on the profiles.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
Reset the relevant painted object counter; it's only interesting when loading.

* page/Page.cpp:
(WebCore::Page::startCountingRelevantRepaintedObjects):
Set m_isCountingRelevantRepaintedObjects to true after calling reset, since reset now sets it to false.

(WebCore::Page::resetRelevantPaintedObjectCounter):
Set m_isCountingRelevantRepaintedObjects to false.

(WebCore::Page::addRelevantRepaintedObject):
Use HashSet::find to avoid an extra hash lookup.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
Remove the call to FrameView::updateCompositingLayersAfterLayout now, since FrameView::notifyScrollPositionChanged
already calls this and was making us to a lot of work twice.

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

8 years agoUse the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync
andersca@apple.com [Tue, 1 May 2012 22:03:49 +0000 (22:03 +0000)]
Use the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync
https://bugs.webkit.org/show_bug.cgi?id=85313
<rdar://problem/10996039>

Reviewed by Sam Weinig.

Use the new dispatchAfterEnsuringUpdatedScrollPosition function in forceRepaintAsync to
ensure that the scroll position is up to date.

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

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

8 years agoPhysijs demo crashes due to DFG not updating topCallFrame correctly.
oliver@apple.com [Tue, 1 May 2012 21:34:53 +0000 (21:34 +0000)]
Physijs demo crashes due to DFG not updating topCallFrame correctly.
https://bugs.webkit.org/show_bug.cgi?id=85311

Reviewed by Filip Pizlo.

A few of the dfg operations failed to correctly set the topCallFrame,
and so everything goes wrong.  This patch corrects the effected operations,
and makes debug builds poison topCallFrame before calling a dfg operation.

* dfg/DFGOperations.cpp:
(JSC::DFG::putByVal):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::prepareForExternalCall):
(JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
(JSC::DFG::SpeculativeJIT::appendCallSetResult):

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

8 years agoSource/WebCore: Audio controls have a 1px surplus outline coming from RenderImage...
commit-queue@webkit.org [Tue, 1 May 2012 21:26:04 +0000 (21:26 +0000)]
Source/WebCore: Audio controls have a 1px surplus outline coming from RenderImage::paintReplaced base class,
which needs overwriting.
https://bugs.webkit.org/show_bug.cgi?id=84570

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-05-01
Reviewed by Eric Carlson.

No new tests - covered by existing audio rendering tests.

* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::paintReplaced): Overwrite inherited function.
(WebCore):
* rendering/RenderMedia.h:
(RenderMedia):

LayoutTests: Audio controls have a 1px surplus outline coming from RenderImage::paintReplaced base class,
which needs overwriting. All layout tests with an audio element need a
visual update.
https://bugs.webkit.org/show_bug.cgi?id=84570

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-05-01
Reviewed by Eric Carlson.

* platform/chromium-linux/media/audio-controls-rendering-expected.png:
* platform/chromium-linux/media/audio-repaint-expected.png:
* platform/chromium-linux/media/controls-after-reload-expected.png:
* platform/chromium-linux/media/controls-layout-direction-expected.png:
* platform/chromium-linux/media/media-controls-clone-expected.png:
* platform/chromium-mac-leopard/media/audio-controls-rendering-expected.png:
* platform/chromium-mac-leopard/media/audio-repaint-expected.png:
* platform/chromium-mac-leopard/media/controls-after-reload-expected.png:
* platform/chromium-mac-snowleopard/media/audio-controls-rendering-expected.png:
* platform/chromium-mac-snowleopard/media/audio-repaint-expected.png:
* platform/chromium-mac-snowleopard/media/controls-layout-direction-expected.png:
* platform/chromium-mac-snowleopard/media/media-controls-clone-expected.png:
* platform/chromium-mac/media/audio-controls-rendering-expected.png:
* platform/chromium-mac/media/audio-repaint-expected.png:
* platform/chromium-mac/media/controls-after-reload-expected.png:
* platform/chromium-mac/media/controls-layout-direction-expected.png:
* platform/chromium-mac/media/media-controls-clone-expected.png:
* platform/chromium-win/media/audio-controls-rendering-expected.png:
* platform/chromium-win/media/audio-repaint-expected.png:
* platform/chromium-win/media/controls-after-reload-expected.png:
* platform/chromium-win/media/controls-layout-direction-expected.png:
* platform/chromium-win/media/media-controls-clone-expected.png:

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

8 years agoAllow a pre-targeted node to be specified when dispatching a GestureTap event
commit-queue@webkit.org [Tue, 1 May 2012 20:50:00 +0000 (20:50 +0000)]
Allow a pre-targeted node to be specified when dispatching a GestureTap event
https://bugs.webkit.org/show_bug.cgi?id=85296

Patch by Terry Anderson <tdanderson@chromium.org> on 2012-05-01
Reviewed by Adam Barth.

https://bugs.webkit.org/show_bug.cgi?id=85101
    The new parameter will be used and tested in this patch.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureTap):
    The new preTargetedNode parameter can be used to pass in the Node that is
    the target of the GestureTap event. If this parameter is used, adjustedPoint
    is changed to be the center of the Node's bounding rectangle.
* page/EventHandler.h:
(EventHandler):

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

8 years agoCrash calling disconnectFrame on a DOMWindowExtension a second time.
jberlin@webkit.org [Tue, 1 May 2012 20:15:26 +0000 (20:15 +0000)]
Crash calling disconnectFrame on a DOMWindowExtension a second time.
https://bugs.webkit.org/show_bug.cgi?id=85301

Reviewed by Darin Adler.

DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
DOMWindowProperties, even if it already did so when it entered the page cache.

* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrame):
Don't do anything if the frame has already been disconnected.

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

8 years agoSource/WebCore: Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
commit-queue@webkit.org [Tue, 1 May 2012 19:27:51 +0000 (19:27 +0000)]
Source/WebCore: Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
until the rest of the Media Source v0.5 methods are implemented. This is
to prevent ambiguity about whether v0.5 is fully supported or not.
https://bugs.webkit.org/show_bug.cgi?id=85295

Patch by Aaron Colwell <acolwell@chromium.org> on 2012-05-01
Reviewed by Eric Carlson.

No new tests. Removing methods from DOM so relevant tests are removed.

* html/HTMLMediaElement.idl:

LayoutTests: Temporarily removing tests for webkitSourceAddId() & webkitSourceRemoveId()
until the rest of the Media Source v0.5 methods are implemented.
https://bugs.webkit.org/show_bug.cgi?id=85295

Patch by Aaron Colwell <acolwell@chromium.org> on 2012-05-01
Reviewed by Eric Carlson.

* http/tests/media/media-source/webm/video-media-source-add-and-remove-ids-expected.txt: Removed.
* http/tests/media/media-source/webm/video-media-source-add-and-remove-ids.html: Removed.
* platform/chromium/test_expectations.txt:

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

8 years agoIndexedDB: stale index entries may not be removed in some cases
commit-queue@webkit.org [Tue, 1 May 2012 19:05:25 +0000 (19:05 +0000)]
IndexedDB: stale index entries may not be removed in some cases
https://bugs.webkit.org/show_bug.cgi?id=85224

Patch by Douglas Stockwell <dstockwell@chromium.org> on 2012-05-01
Reviewed by Ojan Vafai.

Ensure that stale index entries are removed when the corresponding
object store entry no longer exists.

No new tests. Addresses a performance / storage leak that is
not amenable to verification in a layout test.

* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore):

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

8 years agoAdd seamless test cases (all of these will pass as we land the implementation patches)
eric@webkit.org [Tue, 1 May 2012 18:50:16 +0000 (18:50 +0000)]
Add seamless test cases (all of these will pass as we land the implementation patches)
https://bugs.webkit.org/show_bug.cgi?id=85251

Reviewed by Adam Barth.

These are all test cases which were written as part of implementing seamless
on my github branch: https://github.com/eseidel/webkit/compare/master...seamless
All of these will pass once the implementation is landed, which I am uploading
as a series of patches as we speak.  Because the each of pieces
affects variety of tests, it seems easiest to read the implmentation
diffs if I land all the tests up-front.

* fast/frames/seamless/resources/css-cascade-child.html: Added.
* fast/frames/seamless/resources/done.html: Added.
* fast/frames/seamless/resources/nested-seamless.html: Added.
* fast/frames/seamless/resources/quirks-square.html: Added.
* fast/frames/seamless/resources/square.html: Added.
* fast/frames/seamless/resources/two-inline-blocks.html: Added.
* fast/frames/seamless/seamless-basic-expected.txt: Added.
* fast/frames/seamless/seamless-basic.html: Added.
* fast/frames/seamless/seamless-css-cascade-expected.txt: Added.
* fast/frames/seamless/seamless-css-cascade.html: Added.
* fast/frames/seamless/seamless-designMode-expected.txt: Added.
* fast/frames/seamless/seamless-designMode.html: Added.
* fast/frames/seamless/seamless-float-expected.txt: Added.
* fast/frames/seamless/seamless-float.html: Added.
* fast/frames/seamless/seamless-form-get-expected.txt: Added.
* fast/frames/seamless/seamless-form-get-named-expected.txt: Added.
* fast/frames/seamless/seamless-form-get-named.html: Added.
* fast/frames/seamless/seamless-form-get-override-expected.txt: Added.
* fast/frames/seamless/seamless-form-get-override.html: Added.
* fast/frames/seamless/seamless-form-get.html: Added.
* fast/frames/seamless/seamless-form-post-expected.txt: Added.
* fast/frames/seamless/seamless-form-post-named-expected.txt: Added.
* fast/frames/seamless/seamless-form-post-named.html: Added.
* fast/frames/seamless/seamless-form-post-override-expected.txt: Added.
* fast/frames/seamless/seamless-form-post-override.html: Added.
* fast/frames/seamless/seamless-form-post.html: Added.
* fast/frames/seamless/seamless-hyperlink-expected.txt: Added.
* fast/frames/seamless/seamless-hyperlink-named-expected.txt: Added.
* fast/frames/seamless/seamless-hyperlink-named.html: Added.
* fast/frames/seamless/seamless-hyperlink-override-expected.txt: Added.
* fast/frames/seamless/seamless-hyperlink-override.html: Added.
* fast/frames/seamless/seamless-hyperlink.html: Added.
* fast/frames/seamless/seamless-inline-expected.txt: Added.
* fast/frames/seamless/seamless-inline.html: Added.
* fast/frames/seamless/seamless-min-max-expected.txt: Added.
* fast/frames/seamless/seamless-min-max.html: Added.
* fast/frames/seamless/seamless-nested-expected.txt: Added.
* fast/frames/seamless/seamless-nested.html: Added.
* fast/frames/seamless/seamless-quirks-expected.txt: Added.
* fast/frames/seamless/seamless-quirks.html: Added.
* fast/frames/seamless/seamless-sandbox-flag-expected.txt: Added.
* fast/frames/seamless/seamless-sandbox-flag.html: Added.
* fast/frames/seamless/seamless-sandbox-srcdoc-expected.txt: Added.
* fast/frames/seamless/seamless-sandbox-srcdoc.html: Added.
* fast/frames/seamless/seamless-window-location-expected.txt: Added.
* fast/frames/seamless/seamless-window-location-href-expected.txt: Added.
* fast/frames/seamless/seamless-window-location-href.html: Added.
* fast/frames/seamless/seamless-window-location-replace-expected.txt: Added.
* fast/frames/seamless/seamless-window-location-replace.html: Added.
* fast/frames/seamless/seamless-window-location-sandbox-expected.txt: Added.
* fast/frames/seamless/seamless-window-location-sandbox.html: Added.
* fast/frames/seamless/seamless-window-location.html: Added.
* fast/frames/seamless/seamless-window-open-expected.txt: Added.
* fast/frames/seamless/seamless-window-open-override-expected.txt: Added.
* fast/frames/seamless/seamless-window-open-override.html: Added.
* fast/frames/seamless/seamless-window-open.html: Added.
* http/tests/security/seamless/resources/square.html: Added.
* http/tests/security/seamless/seamless-cross-origin-expected.txt: Added.
* http/tests/security/seamless/seamless-cross-origin.html: Added.
* http/tests/security/seamless/seamless-sandbox-srcdoc-expected.txt: Added.
* http/tests/security/seamless/seamless-sandbox-srcdoc.html: Added.

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

8 years ago[Chromium] Fix WebPrerender::referrer() thunk.
gavinp@chromium.org [Tue, 1 May 2012 18:23:13 +0000 (18:23 +0000)]
[Chromium] Fix WebPrerender::referrer() thunk.
https://bugs.webkit.org/show_bug.cgi?id=85290

Reviewed by Dimitri Glazkov.

* chromium/public/WebPrerender.h:
(WebKit::WebPrerender::referrer):

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

8 years ago[GTK] Fix gstreamer detection during configure
commit-queue@webkit.org [Tue, 1 May 2012 18:04:48 +0000 (18:04 +0000)]
[GTK] Fix gstreamer detection during configure
https://bugs.webkit.org/show_bug.cgi?id=84325

Patch by Landry Breuil <landry@openbsd.org> on 2012-05-01
Reviewed by Philippe Normand.

* configure.ac: Fix GSTREAMER_REQUIRED_VERSION and
GSTREAMER_PLUGINS_BASE_REQUIRED_VERSION assignments.

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

8 years agoUse HashMap<OwnPtr> for CounterMap in RenderCounter
igor.o@sisa.samsung.com [Tue, 1 May 2012 17:40:03 +0000 (17:40 +0000)]
Use HashMap<OwnPtr> for CounterMap in RenderCounter
https://bugs.webkit.org/show_bug.cgi?id=85294

Reviewed by Eric Seidel.

* rendering/RenderCounter.cpp:
(WebCore):
(WebCore::makeCounterNode):
(WebCore::RenderCounter::destroyCounterNodes):

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

8 years ago[chromium] Accept four parameters when dispatching a WebInputEvent::GestureTap in...
commit-queue@webkit.org [Tue, 1 May 2012 17:19:24 +0000 (17:19 +0000)]
[chromium] Accept four parameters when dispatching a WebInputEvent::GestureTap in chromium DRT eventSender
https://bugs.webkit.org/show_bug.cgi?id=85289

Patch by Terry Anderson <tdanderson@chromium.org> on 2012-05-01
Reviewed by Eric Seidel.

* DumpRenderTree/chromium/EventSender.cpp:
(EventSender::gestureEvent):
    This change will allow for testing of WK85101. Currently no tests use the extra
    parameters deltaX and deltaY.

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

8 years agoWebKit test RenderTableCellDeathTest.CanSetRow is failing as of r115705
jchaffraix@webkit.org [Tue, 1 May 2012 16:59:33 +0000 (16:59 +0000)]
WebKit test RenderTableCellDeathTest.CanSetRow is failing as of r115705
https://bugs.webkit.org/show_bug.cgi?id=85274

Reviewed by Ojan Vafai.

The tests were crashing as we were creating a RenderTableCell without any RenderTableRow parent
which shouldn't happen inside the render tree.

Using RenderTableCell to access RenderTableRow was artificial and the checks have now been moved
to using a RenderTableRow directly.

* WebKit.gyp:
* WebKit.gypi:
Added the new file.

* tests/RenderTableCellTest.cpp:
Removed the row index tests as they are now in the following file.

* tests/RenderTableRowTest.cpp: Copied from Source/WebKit/chromium/tests/RenderTableCellTest.cpp.
Changed a bit the row index tests and re-enabled them.

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

8 years agoSkip building instance tree for disallowed target
pdr@google.com [Tue, 1 May 2012 16:10:33 +0000 (16:10 +0000)]
Skip building instance tree for disallowed target
https://bugs.webkit.org/show_bug.cgi?id=85202

Reviewed by Nikolas Zimmermann.

Source/WebCore:

When the target of a use is disallowed (e.g., a mask element) we can
skip building the instance tree because the shadow tree will be
skipped as well.

Test: svg/custom/animate-disallowed-mask-element.svg

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

LayoutTests:

* platform/chromium-win/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
* platform/gtk/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
* platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
* platform/qt/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
* svg/custom/animate-disallowed-mask-element-expected.txt: Added.
* svg/custom/animate-disallowed-mask-element.svg: Added.

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

8 years agoPrint out stderr output of ImageDiff if it is present
zandobersek@gmail.com [Tue, 1 May 2012 15:52:01 +0000 (15:52 +0000)]
Print out stderr output of ImageDiff if it is present
https://bugs.webkit.org/show_bug.cgi?id=85285

Reviewed by Philippe Normand.

Log the stderr output of ImageDiff as a warning if present. This is
especially helpful when ImageDiff crashes and stderr data might contain
relevant information about what caused the crash.

* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._read_image_diff):

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

8 years agoAdd special attribute for alternate selection touch handling.
mifenton@rim.com [Tue, 1 May 2012 15:32:53 +0000 (15:32 +0000)]
Add special attribute for alternate selection touch handling.
https://bugs.webkit.org/show_bug.cgi?id=85284

Reviewed by Antonio Gomes.

PR 152975.

.:

Add manual test for -bb-selection-touchoverride.

Reviewed Internally by Gen Mak.

* ManualTests/blackberry/selection-touch-override.html: Added.

Source/WebKit/blackberry:

Add attribute -bb-selection-touchoverride to override
touch handling on selection overlay.

Reviewed Internally by Gen Mak.

* Api/WebPageClient.h:
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
(WebKit):
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
* WebKitSupport/SelectionHandler.h:
(SelectionHandler):

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

8 years ago[Qt] Add an experimental extension to set the min. contents width
kenneth@webkit.org [Tue, 1 May 2012 15:30:30 +0000 (15:30 +0000)]
[Qt] Add an experimental extension to set the min. contents width
https://bugs.webkit.org/show_bug.cgi?id=85281

Reviewed by Antonio Gomes.

Source/WebKit2:

Add the experimental property preferredMinimumContentsWidth: which
can be used to set the minimum contents width when not overriden by
the page itself.

Default value is set to 0, which defines normal [desktop] behaviour.

* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::preferredMinimumContentsWidth):
(QQuickWebViewExperimental::setPreferredMinimumContentsWidth):
* UIProcess/API/qt/qquickwebview_p.h:

Tools:

* MiniBrowser/qt/qml/BrowserWindow.qml:

Set the value of preferredMinimumContentsWidth to 980.

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

8 years agoAccumulation for values-animation is broken
zimmermann@webkit.org [Tue, 1 May 2012 15:18:09 +0000 (15:18 +0000)]
Accumulation for values-animation is broken
https://bugs.webkit.org/show_bug.cgi?id=85158

Reviewed by Darin Adler.

Source/WebCore:

Example:
<rect width="999" height="100" fill="green"/>
    <animate begin="0s" values="0; 30; 20" accumulate="sum" repeatCount="5" dur="2s"/>
</rect>

The rect should animate like this:
0.000s -> 0
0.500s -> 15
1.000s -> 30
1.500s -> 25
1.999s -> 20
2.000s -> 20 (first accumulation, starts accumulating from the last set value, here '20').
2.500s -> 45
3.000s -> 50
3.500s -> 45
3.999s -> 40
4.000s -> 40 (second accumulation)
etc.

This is currently broken for values-animation. The accumulation should happen after a full cycle of the values animation ran (aka. at the end of the duration).
A values animation works like this: iterate over the list of values, and calculate a 'from' and 'to' value for a given time. Example for values="0; 30; 20" dur="2s":
    - 0.0s .. 1.0s -> from=0, to=30
    - 1.0s .. 2.0s -> from=30, to=20

Accumulation currently is taken into account at each interval for a values-animation instead of the end of the cycle. Fix that
by passing an additional 'toAtEndOfDuration' type to calculateAnimatedValue() which is used for accumulation instead of the
current 'to' value.

Test: svg/animations/accumulate-values-width-animation.html

* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateAnimatedValue):
* svg/SVGAnimateElement.h:
(SVGAnimateElement):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
* svg/SVGAnimateMotionElement.h:
(SVGAnimateMotionElement):
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
* svg/SVGAnimatedAngle.h:
(SVGAnimatedAngleAnimator):
* svg/SVGAnimatedBoolean.cpp:
(WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
* svg/SVGAnimatedBoolean.h:
(SVGAnimatedBooleanAnimator):
* svg/SVGAnimatedColor.cpp:
(WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
* svg/SVGAnimatedColor.h:
(SVGAnimatedColorAnimator):
* svg/SVGAnimatedEnumeration.cpp:
(WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
* svg/SVGAnimatedEnumeration.h:
(SVGAnimatedEnumerationAnimator):
* svg/SVGAnimatedInteger.cpp:
(WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
(WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
* svg/SVGAnimatedInteger.h:
(SVGAnimatedIntegerAnimator):
* svg/SVGAnimatedIntegerOptionalInteger.cpp:
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
* svg/SVGAnimatedIntegerOptionalInteger.h:
(SVGAnimatedIntegerOptionalIntegerAnimator):
* svg/SVGAnimatedLength.cpp:
(WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
* svg/SVGAnimatedLength.h:
(SVGAnimatedLengthAnimator):
* svg/SVGAnimatedLengthList.cpp:
(WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
* svg/SVGAnimatedLengthList.h:
(SVGAnimatedLengthListAnimator):
* svg/SVGAnimatedNumber.cpp:
(WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
* svg/SVGAnimatedNumber.h:
(SVGAnimatedNumberAnimator):
* svg/SVGAnimatedNumberList.cpp:
(WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
* svg/SVGAnimatedNumberList.h:
(SVGAnimatedNumberListAnimator):
* svg/SVGAnimatedNumberOptionalNumber.cpp:
(WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
* svg/SVGAnimatedNumberOptionalNumber.h:
(SVGAnimatedNumberOptionalNumberAnimator):
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
* svg/SVGAnimatedPath.h:
(SVGAnimatedPathAnimator):
* svg/SVGAnimatedPointList.cpp:
(WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
* svg/SVGAnimatedPointList.h:
(SVGAnimatedPointListAnimator):
* svg/SVGAnimatedPreserveAspectRatio.cpp:
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
* svg/SVGAnimatedPreserveAspectRatio.h:
(SVGAnimatedPreserveAspectRatioAnimator):
* svg/SVGAnimatedRect.cpp:
(WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
* svg/SVGAnimatedRect.h:
(SVGAnimatedRectAnimator):
* svg/SVGAnimatedString.cpp:
(WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
* svg/SVGAnimatedString.h:
(SVGAnimatedStringAnimator):
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
* svg/SVGAnimatedTransformList.h:
(SVGAnimatedTransformListAnimator):
* svg/SVGAnimatedTypeAnimator.h:
(SVGAnimatedTypeAnimator):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
(WebCore::SVGAnimationElement::updateAnimation):
* svg/SVGAnimationElement.h:
(WebCore::SVGAnimationElement::animateAdditiveNumber):
(SVGAnimationElement):

LayoutTests:

* svg/animations/accumulate-values-width-animation-expected.txt: Added.
* svg/animations/accumulate-values-width-animation.html: Added.
* svg/animations/resources/accumulate-values-width-animation.svg: Added.
* svg/animations/script-tests/accumulate-values-width-animation.js: Added.
(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(sample6):
(sample7):
(sample8):
(sample9):
(sample10):
(sample11):
(executeTest):

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

8 years agohttps://bugs.webkit.org/show_bug.cgi?id=85231
bdakin@apple.com [Tue, 1 May 2012 15:08:29 +0000 (15:08 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=85231
Fixed position objects that are removed from the DOM don't kick off
fixed position recalculation
-and corresponding-
<rdar://problem/11297916>

Reviewed by Darin Adler.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):

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

8 years agodrag of links with styled text drop as links with plain text
rniwa@webkit.org [Tue, 1 May 2012 14:57:58 +0000 (14:57 +0000)]
drag of links with styled text drop as links with plain text
https://bugs.webkit.org/show_bug.cgi?id=19386

Reviewed by Hajime Morita.

Add a regression test since the said bug appears to have been fixed on ToT WebKit.

* editing/pasteboard/drag-drop-url-with-style-expected.txt: Added.
* editing/pasteboard/drag-drop-url-with-style.html: Added.

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

8 years ago[Qt] Stop repeating timers which should only fire once
kenneth@webkit.org [Tue, 1 May 2012 14:53:59 +0000 (14:53 +0000)]
[Qt] Stop repeating timers which should only fire once
https://bugs.webkit.org/show_bug.cgi?id=85277

Reviewed by Antonio Gomes.

The TapGestureRecognizer uses QBasicTimers which are
repeating timers, so stop then when they fire.

* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::highlightTimeout):
(WebKit::QtTapGestureRecognizer::singleTapTimeout):
(WebKit::QtTapGestureRecognizer::tapAndHoldTimeout):

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

8 years agoRemove Mac WK2-specific result for svg/zoom/page/zoom-replaced-intrinsic-ratio-001...
kling@webkit.org [Tue, 1 May 2012 14:20:44 +0000 (14:20 +0000)]
Remove Mac WK2-specific result for svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm.

* platform/mac-wk2/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: Removed.

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

8 years agoWebKit unit tests RenderTableCellDeathTest.CanSetRow* are failing as of r115705
pfeldman@chromium.org [Tue, 1 May 2012 12:55:40 +0000 (12:55 +0000)]
WebKit unit tests RenderTableCellDeathTest.CanSetRow* are failing as of r115705
https://bugs.webkit.org/show_bug.cgi?id=85274

Not reviewed: test disabled.

* tests/RenderTableCellTest.cpp:

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

8 years agoFix test regression introduced by r115086.
kling@webkit.org [Tue, 1 May 2012 12:28:42 +0000 (12:28 +0000)]
Fix test regression introduced by r115086.
https://bugs.webkit.org/show_bug.cgi?id=84566

Patch by Yuzhu Shen <yzshen@chromium.org> on 2012-05-01
Reviewed by Pavel Feldman.

* inspector/network-status-non-http.html:
* platform/qt/Skipped:

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

8 years agoWebKit test RenderTableCellDeathTest.CanSetRow is failing as of r115705
pfeldman@chromium.org [Tue, 1 May 2012 12:12:23 +0000 (12:12 +0000)]
WebKit test RenderTableCellDeathTest.CanSetRow is failing as of r115705
https://bugs.webkit.org/show_bug.cgi?id=85274

Not reviewed: test disabled.

The test is based on the standalone cell, while the new logic
requires parent to be present upon the row index set.

* tests/RenderTableCellTest.cpp:

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

8 years ago[Chromium] Regression r113405 ContextMenuImpl does not set a misspelled word
hbono@chromium.org [Tue, 1 May 2012 11:18:12 +0000 (11:18 +0000)]
[Chromium] Regression r113405 ContextMenuImpl does not set a misspelled word
https://bugs.webkit.org/show_bug.cgi?id=85271

Reviewed by Kent Tamura.

This change calls selectMisspelledWord() to get a misspelled word so Chrome can
set the misspelledWord variable without selecting text.

* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):

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

8 years ago[Chromium] Rebaseline for recent changes about <input type=date>.
tkent@chromium.org [Tue, 1 May 2012 10:47:49 +0000 (10:47 +0000)]
[Chromium] Rebaseline for recent changes about <input type=date>.

* platform/chromium-linux/fast/forms/date/date-appearance-expected.png:
* platform/chromium-linux/fast/forms/date/date-appearance-expected.txt:
* platform/chromium-mac/fast/forms/date/date-appearance-expected.png:
* platform/chromium-mac/fast/forms/date/date-appearance-expected.txt:
* platform/chromium-mac/fast/forms/date/date-input-visible-strings-expected.txt: Copied from LayoutTests/platform/chromium/fast/forms/date/date-input-visible-strings-expected.txt.
* platform/chromium-win/fast/forms/date/date-appearance-expected.png:
* platform/chromium-win/fast/forms/date/date-appearance-expected.txt:
* platform/chromium-win/fast/forms/date/date-input-visible-strings-expected.txt: Renamed from LayoutTests/platform/chromium/fast/forms/date/date-input-visible-strings-expected.txt.
* platform/chromium/test_expectations.txt:

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

8 years agoEarly-out for subtracting a non-intersecting region
danakj@chromium.org [Tue, 1 May 2012 09:15:11 +0000 (09:15 +0000)]
Early-out for subtracting a non-intersecting region
https://bugs.webkit.org/show_bug.cgi?id=85258

Reviewed by Hajime Morita.

Given regions A and B, if the bounds of the regions do not intersect,
then the regions themselves do not intersect. If the intersection of
A and B is empty, then A subtract B == A.

* platform/graphics/Region.cpp:
(WebCore::Region::subtract):

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

8 years ago[Chromium] Test expectation update for r115713.
tkent@chromium.org [Tue, 1 May 2012 08:43:43 +0000 (08:43 +0000)]
[Chromium] Test expectation update for r115713.
https://bugs.webkit.org/show_bug.cgi?id=84935

* platform/chromium/test_expectations.txt:
Mark TEXT for date-input-visible-strings.html

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

8 years agoUnreviewed, GTK test_expectations update.
philn@webkit.org [Tue, 1 May 2012 08:39:05 +0000 (08:39 +0000)]
Unreviewed, GTK test_expectations update.

* platform/gtk/test_expectations.txt: media/track/track-mode.html
is still flaky as per bug 83878.

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

8 years ago[Chromium/Windows] Add LocalizedDateWin
tkent@chromium.org [Tue, 1 May 2012 07:54:26 +0000 (07:54 +0000)]
[Chromium/Windows] Add LocalizedDateWin
https://bugs.webkit.org/show_bug.cgi?id=84935

Reviewed by Kentaro Hara.

Source/WebCore:

LocalizedDateICU.cpp doesn't reflect system settings. So there were some
problems such as <input type=date> doesn't use system's date format.

We need to use Windows API to get a date format and calendar parameters.

We obtain a date format like "MM/dd/yy" via Windows API, and
format/parse dates for the format by our own code because Windows API
can't handle years older than 1601 and doesn't have date parsing API.

Unit test: Source/WebKit/chromium/tests/LocaleWinTest.cpp

* WebCore.gypi: Add LocalizedDateWin.cpp.
* WebCore.gyp/WebCore.gyp:
For Windows, remove LocalizedDateICU.cpp and add LocalizedDateWin.cpp.
All of *Win.cpp files are excluded by default.

* platform/text/LocaleWin.cpp: Added.
(WebCore::LocaleWin::LocaleWin):
(WebCore::LocaleWin::create):
(WebCore::LocaleWin::currentLocale):
(WebCore::LocaleWin::~LocaleWin):
(WebCore::LocaleWin::getLocaleInfoString):
A helper function to obtain a string by GetLocaleInfo().
(WebCore::LocaleWin::initializeShortMonthLabels):
Obtain short month names from Windows.

(WebCore::DateFormatToken): A struct to represent a token in a date format.
e.g. A format string "MM/dd/yy" generates five DateFormatToken:
 Month2, Literal, Day2, Literal, Year2.
(isEraSymbol): A readability helper function.
(isYearSymbol): ditto.
(isMonthSymbol): ditto.
(isDaySymbol): ditto.
(countContinuousLetters):
(commitLiteralToken): A helper for parseDateFormat().
(parseDateFormat):
Parse a format string, and generate a list of DateFormatToken.

(WebCore::parseNumber): A helper for parseDate().
(WebCore::LocaleWin::parseNumberOrMonth): ditto.
(WebCore::LocaleWin::parseDate):
Parse a user-provided date string by matching with a DateFormatToken list.

(WebCore::appendNumber): A helper for formatDate().
(WebCore::appendTwoDigitsNumber): ditto. Write at least two digits.
(WebCore::appendFourDigitsNumber): ditto. Write at least four digits.
(WebCore::LocaleWin::formatDate):
Format a DateComponents by iterating a DateFormatToken list.

(WebCore::LocaleWin::initializeShortDateTokens):
(WebCore::substituteLabelsIntoFormat):
Creates a user-visible format string by iterating a DateFormatToken list.
(WebCore::LocaleWin::dateFormatText):
(WebCore::LocaleWin::initializeMonthLabels):
Creates month names by Windows API.
(WebCore::LocaleWin::initializeWeekDayShortLabels):
 Creates day names by Windows API.
(WebCore::LocaleWin::monthLabels):
Public accessor function for month names.
(WebCore::LocaleWin::weekDayShortLabels):
Public accessor function for day names.
* platform/text/LocaleWin.h: Added.

* platform/text/LocalizedDateWin.cpp:
Added. The following functions simply delegate to LocaleWin::currentLocale().
(WebCore::parseLocalizedDate):
(WebCore::formatLocalizedDate):
(WebCore::localizedDateFormatText):
(WebCore::monthLabels):
(WebCore::weekDayShortLabels):
(WebCore::firstDayOfWeek):

Source/WebKit/chromium:

Add test for LocaleWin.cpp.

* WebKit.gypi:
* tests/LocaleWinTest.cpp: Added.
(msForDate): A helper function.
(TEST):

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

8 years agoUnreviewed, rebaselining after r115666 and test expectations update
zandobersek@gmail.com [Tue, 1 May 2012 06:39:22 +0000 (06:39 +0000)]
Unreviewed, rebaselining after r115666 and test expectations update
after r115651.

* platform/gtk/fast/js/constructor-length-expected.txt:
* platform/gtk/test_expectations.txt:

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

8 years agoREGRESSION(r115600): parseLocalizedDate() should fail for invalid inputs
tkent@chromium.org [Tue, 1 May 2012 03:51:00 +0000 (03:51 +0000)]
REGRESSION(r115600): parseLocalizedDate() should fail for invalid inputs
https://bugs.webkit.org/show_bug.cgi?id=85176

Reviewed by Kentaro Hara.

Source/WebCore:

Test: fast/forms/date/input-date-commit-valid-only.html

* platform/text/mac/LocalizedDateMac.mm:
(WebCore::parseLocalizedDate):
We should check nil for the result of NSDateFormtter::dateFromString.

LayoutTests:

* platform/chromium/test_expectations.txt: Remove an entry for a fixed test.

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

8 years agoFix another leak due to misuse of createCFString.
mrowe@apple.com [Tue, 1 May 2012 03:27:20 +0000 (03:27 +0000)]
Fix another leak due to misuse of createCFString.

Reviewed by Darin Adler.

* plugins/mac/PluginPackageMac.cpp:
(WebCore::PluginPackage::fetchInfo): Adopt the result of createCFString.

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

8 years ago<rdar://problem/11312198> Many leaks during fast/events/dropzone-002.html
mrowe@apple.com [Tue, 1 May 2012 03:27:02 +0000 (03:27 +0000)]
<rdar://problem/11312198> Many leaks during fast/events/dropzone-002.html

Reviewed by Darin Adler.

* platform/mac/ClipboardMac.mm:
(WebCore::utiTypeFromCocoaType): Adopt the result of createCFString.

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

8 years ago<rdar://problem/11352575> Many CGImageRefs leaked during media layout tests
mrowe@apple.com [Tue, 1 May 2012 03:26:45 +0000 (03:26 +0000)]
<rdar://problem/11352575> Many CGImageRefs leaked during media layout tests

Reviewed by Brian Weinstein.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Adopt the CGImageRef.

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

8 years agoChange RenderBoxModelObject::calculateBackgroundImageGeometry to use roundToInt
eae@chromium.org [Tue, 1 May 2012 03:24:42 +0000 (03:24 +0000)]
Change RenderBoxModelObject::calculateBackgroundImageGeometry to use roundToInt
https://bugs.webkit.org/show_bug.cgi?id=85249

Reviewed by Eric Seidel.

Prepare RenderBoxModelObject for FractionalLayoutUnits by adding rounding
logic to calculateBackgroundImageGeometry. Background images, as all
images, needs to be layed out on pixel boundaries thus we need to convert
it to a integer value.

No new tests, no change in functionality.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

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

8 years agoUnreviewed, rolling out r113511.
isherman@chromium.org [Tue, 1 May 2012 03:21:54 +0000 (03:21 +0000)]
Unreviewed, rolling out r113511.
http://trac.webkit.org/changeset/113511
https://bugs.webkit.org/show_bug.cgi?id=66032
https://bugs.webkit.org/show_bug.cgi?id=85150

Regression: Many autofilled form fields lack the default
autofill background even when authors don’t override the
autofill colors

Source/WebCore:

* css/html.css:
(input:-webkit-autofill): Restore !important modifiers

LayoutTests:

* fast/forms/input-autofilled-expected.txt:
* fast/forms/input-autofilled.html:

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

8 years agoMove RenderTableCell's row index to RenderTableRow
jchaffraix@webkit.org [Tue, 1 May 2012 03:13:06 +0000 (03:13 +0000)]
Move RenderTableCell's row index to RenderTableRow
https://bugs.webkit.org/show_bug.cgi?id=85229

Reviewed by Ojan Vafai.

Source/WebCore:

Covered by the existing table tests.

Row index is a RenderTableRow concept and as such this change moves
the relevant logic into the class.

While touching the code, renamed row() -> rowIndex() as now RenderTableCell
can return its parent RenderTableRow and we were returning an index, not the row
itself.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::titleUIElement):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::cellAbove):
(WebCore::RenderTable::cellBelow):
(WebCore::RenderTable::cellBefore):
(WebCore::RenderTable::cellAfter):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
Updated after the renaming RenderTableCell::row() -> rowIndex().

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
(WebCore::RenderTableCell::computeCollapsedBeforeBorder):
(WebCore::RenderTableCell::computeCollapsedAfterBorder):
Updated after m_rowIndex removal and row() -> rowIndex() renaming.

(WebCore::RenderTableCell::styleDidChange):
Switched the rowWasSet check to an ASSERT. The new logic guarantees that
row index was set straight when we insert the row. The previous logic was
opened to some race conditions as we could wait for a recalcCells call before
setting the index on the rows which made this check necessary.

* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::row):
Added this RenderTableRow getter.

(WebCore::RenderTableCell::rowIndex):
Renamed from row().

* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::RenderTableRow):
(WebCore::RenderTableRow::styleDidChange):
Updated after adding m_rowIndex / rowIndex().

* rendering/RenderTableRow.h:
(WebCore::RenderTableRow::setRowIndex):
(WebCore::RenderTableRow::rowIndex):
Added those getter / setter. Also kept m_rowIndex's smaller size
for future optimization and for symmetry with the column index on
RenderTableCell.

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::recalcCells):
Made sure that whenever we insert or update our row index
we do call setRowIndex().

(WebCore::RenderTableSection::addCell):
This logic now doesn't need to query insertionRow as the cell's
should have the index of the row in which it is inserted.

(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::compareCellPositionsWithOverflowingCells):
More updates after row() -> rowIndex() renaming.

* rendering/RenderTableSection.h:
Removed rowIndexForRenderer now that the row caches this informatin.

Source/WebKit/chromium:

* tests/RenderTableCellTest.cpp:
Updated after the refactoring.

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

8 years agodatalist: Inconsistent behavior of HTMLInputElement::list
keishi@webkit.org [Tue, 1 May 2012 02:53:15 +0000 (02:53 +0000)]
datalist: Inconsistent behavior of HTMLInputElement::list
https://bugs.webkit.org/show_bug.cgi?id=84351

Source/WebCore:

Each platform will have a different set of input types that support the datalist UI.
This patch makes shouldRespectListAttribute ask the RenderTheme if it supports datalist UI for that input type.
Thus making it possible to do feature detection with JS.

Reviewed by Kent Tamura.

* WebCore.gypi: Added RenderThemeChromiumCommon.{cpp,h}
* html/ColorInputType.cpp:
(WebCore::ColorInputType::shouldRespectListAttribute):
(WebCore):
* html/ColorInputType.h:
(ColorInputType):
* html/InputType.cpp:
(WebCore::InputType::themeSupportsDataListUI): Static method used by TextFieldInputType, RangeInputType, and ColorInputType.
(WebCore):
* html/InputType.h:
(InputType):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::shouldRespectListAttribute):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::shouldRespectListAttribute):
* rendering/RenderTheme.h:
(RenderTheme):
(WebCore::RenderTheme::supportsDataListUI): Returns true if the platform can show the datalist suggestions for a given input type.
* rendering/RenderThemeChromiumCommon.cpp: Added.
(WebCore):
(WebCore::RenderThemeChromiumCommon::supportsDataListUI):
* rendering/RenderThemeChromiumCommon.h: Added.
(WebCore):
(RenderThemeChromiumCommon):
* rendering/RenderThemeChromiumMac.h:
(RenderThemeChromiumMac):
* rendering/RenderThemeChromiumMac.mm:
(WebCore::RenderThemeChromiumMac::supportsDataListUI):
(WebCore):
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumMac::supportsDataListUI):
(WebCore):
* rendering/RenderThemeChromiumSkia.h:
(RenderThemeChromiumSkia):

LayoutTests:

Reviewed by Kent Tamura.

* fast/forms/datalist/input-list-expected.txt:
* fast/forms/datalist/input-list.html: Added tests for all input types.
* platform/chromium/fast/forms/datalist/input-list-expected.txt: Added.

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

8 years ago[Chromium] Add thunk headers for staging Prerendering API.
gavinp@chromium.org [Tue, 1 May 2012 02:51:27 +0000 (02:51 +0000)]
[Chromium] Add thunk headers for staging Prerendering API.
https://bugs.webkit.org/show_bug.cgi?id=84880

Reviewed by Adam Barth.

These empty headers will be replaced by the actual API when Bug 85005 is commited.

Source/Platform:

* Platform.gypi:
* chromium/public/WebPrerender.h: Added.
(WebKit):
(WebPrerender):
(ExtraData):
(WebKit::WebPrerender::ExtraData::~ExtraData):
(WebKit::WebPrerender::url):
(WebKit::WebPrerender::referrer):
(WebKit::WebPrerender::referrerPolicy):
(WebKit::WebPrerender::setExtraData):
(WebKit::WebPrerender::extraData):
(WebKit::WebPrerender::WebPrerender):
(WebKit::WebPrerender::~WebPrerender):
* chromium/public/WebPrerenderingSupport.h: Added.
(WebKit):
(WebPrerenderingSupport):
(WebKit::WebPrerenderingSupport::initialize):
(WebKit::WebPrerenderingSupport::shutdown):
(WebKit::WebPrerenderingSupport::current):
(WebKit::WebPrerenderingSupport::add):
(WebKit::WebPrerenderingSupport::cancel):
(WebKit::WebPrerenderingSupport::abandon):
(WebKit::WebPrerenderingSupport::WebPrerenderingSupport):
(WebKit::WebPrerenderingSupport::~WebPrerenderingSupport):

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebPrerendererClient.h: Added.
(WebKit):
(WebPrerendererClient):
* public/WebView.h:
(WebKit):
(WebKit::WebView::setPrerendererClient):

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

8 years ago[Chromium] Fix Autofill popup visibility behavior
isherman@chromium.org [Tue, 1 May 2012 02:38:40 +0000 (02:38 +0000)]
[Chromium] Fix Autofill popup visibility behavior
Prevent users from interacting with invisible Autofill popups rendered outside the main frame's contents view.
This is a recommit of r115400, restricted to just Autofill popups.
https://bugs.webkit.org/show_bug.cgi?id=84420

Reviewed by Abhishek Arya

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::popupOpened): Hide popups rendered outside the main frame's contents view.
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::applyAutofillSuggestions): Fix up order of operations to support immediately hiding a popup if it would not be visible

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

8 years agoRenderObject incorrectly lists maximalOutlineSize as a LayoutUnit
leviw@chromium.org [Tue, 1 May 2012 02:15:51 +0000 (02:15 +0000)]
RenderObject incorrectly lists maximalOutlineSize as a LayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=85248

Reviewed by Eric Seidel.

Reverting RenderObject::maximalOutlineSize to int. This is a slop value for repaint
rects that doesn't affect layout. It also derives its value from RenderView's function
of the same name, which is already an integer.

No new tests. No change in behavior.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::maximalOutlineSize):
* rendering/RenderObject.h:
(RenderObject):

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

8 years agoREGRESSION: editing/inserting/insert-bg-font.html fails on Lion
commit-queue@webkit.org [Tue, 1 May 2012 02:09:08 +0000 (02:09 +0000)]
REGRESSION: editing/inserting/insert-bg-font.html fails on Lion
https://bugs.webkit.org/show_bug.cgi?id=82079

Patch by Koji Ishii <kojiishi@gmail.com> on 2012-04-30
Reviewed by Ryosuke Niwa.

The test fails only if "Correct spelling automatically" is turned on.
AutoCorrect kicks in because the test has "backgroundblue" as a word,
so changing it to "background blue" fixes the failure.

* editing/inserting/insert-bg-font-expected.txt: Change "backgroundblue" to "background blue".
* editing/inserting/insert-bg-font.html: Ditto.

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

8 years agoAdd multichannel support for input of JavaScriptAudioNode
commit-queue@webkit.org [Tue, 1 May 2012 01:50:35 +0000 (01:50 +0000)]
Add multichannel support for input of JavaScriptAudioNode
https://bugs.webkit.org/show_bug.cgi?id=84687

Patch by Xingnan Wang <xingnan.wang@intel.com> on 2012-04-30
Reviewed by Chris Rogers.

Source/WebCore:

Tests: webaudio/javascriptaudionode-downmix8-2channel-input.html
       webaudio/javascriptaudionode-upmix2-8channel-input.html

* Modules/webaudio/JavaScriptAudioNode.cpp:
(WebCore::JavaScriptAudioNode::create):
(WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
(WebCore::JavaScriptAudioNode::initialize):
(WebCore::JavaScriptAudioNode::process):
* Modules/webaudio/JavaScriptAudioNode.h:
(JavaScriptAudioNode):

LayoutTests:

* webaudio/javascriptaudionode-downmix8-2channel-input-expected.txt: Added.
* webaudio/javascriptaudionode-downmix8-2channel-input.html: Added.
* webaudio/javascriptaudionode-upmix2-8channel-input-expected.txt: Added.
* webaudio/javascriptaudionode-upmix2-8channel-input.html: Added.
* webaudio/resources/javascriptaudionode-testing.js: Added.
(createBuffer):
(processAudioData):
(fillData):
(checkStereoOnlyData):
(runJSNodeTest):

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

8 years agoCrash when opening plug-ins in background tabs
andersca@apple.com [Tue, 1 May 2012 01:38:12 +0000 (01:38 +0000)]
Crash when opening plug-ins in background tabs
https://bugs.webkit.org/show_bug.cgi?id=85255
<rdar://problem/11344053>

Reviewed by Dan Bernstein.

* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::setLayerHostingMode):
m_layerHostingContext can be null for plug-ins that don't use the Core Animation drawing model, so check for that.

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

8 years agoShould be able to use YARR JIT without the JS language JIT
barraclough@apple.com [Tue, 1 May 2012 01:20:54 +0000 (01:20 +0000)]
Should be able to use YARR JIT without the JS language JIT
https://bugs.webkit.org/show_bug.cgi?id=85252

Reviewed by Geoff Garen.

Need to split canUseRegExpJIT out of canUseJIT.

* runtime/JSGlobalData.cpp:
(JSC):
(JSC::useJIT):
(JSC::JSGlobalData::JSGlobalData):
    - replace m_canUseJIT with m_canUseAssembler
* runtime/JSGlobalData.h:
(JSGlobalData):
(JSC::JSGlobalData::canUseRegExpJIT):
    - Added canUseRegExpJIT, distinct from canUseJIT.
* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::compileMatchOnly):
    - Call canUseRegExpJIT instead of canUseJIT.

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

8 years ago[Qt][WK2] Fixed layers are shaking when zoom level is not 1.0 due to a rounding error.
yael.aharon@nokia.com [Tue, 1 May 2012 01:10:35 +0000 (01:10 +0000)]
[Qt][WK2] Fixed layers are shaking when zoom level is not 1.0 due to a rounding error.
https://bugs.webkit.org/show_bug.cgi?id=84306

Reviewed by Noam Rosenthal.

When zooming, we need to be careful about how to convert the visible rect from float to int.
Using toAlignedRect can produce inconsistent width and height when we are scrolling.
This patch carefully modifies each piece of the visible rect, to avoid such rounding errors.
In addition, the TransformationMatrix we use for painting, needs to be adjusted for the same rounding error.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::visibleContentsRect):
(QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
* UIProcess/DrawingAreaProxy.h:
(WebCore):
(WebKit::DrawingAreaProxy::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
* UIProcess/DrawingAreaProxyImpl.h:
(DrawingAreaProxyImpl):
* UIProcess/LayerTreeHostProxy.cpp:
(WebKit::LayerTreeHostProxy::setVisibleContentsRect):
* UIProcess/LayerTreeHostProxy.h:
(LayerTreeHostProxy):
* UIProcess/WebLayerTreeRenderer.cpp:
(WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
(WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
* UIProcess/WebLayerTreeRenderer.h:
(WebLayerTreeRenderer):

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

8 years agoSource/WebCore: Harden arithmetic in ImageBufferDataCG
oliver@apple.com [Tue, 1 May 2012 00:52:01 +0000 (00:52 +0000)]
Source/WebCore: Harden arithmetic in ImageBufferDataCG
https://bugs.webkit.org/show_bug.cgi?id=61373

Reviewed by Gavin Barraclough.

We have a checked type that allows us to automate many of the
bounds checks we want here, so let's replace the floating point
math, and just use Checked<> throughout.  We use a non-recording
Checked<> as no overflows should reach this point, so we'll take
a hard early failure, over the cost of many branches when
accessing the raw values in loops.

* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
(WebCore::ImageBufferData::putData):

Source/WTF: Investigate overflows in Canvas putImageData routine
https://bugs.webkit.org/show_bug.cgi?id=61373

Reviewed by Gavin Barraclough.

Allow floating point multiplies of checked types (complete with
bounds checks).

* wtf/CheckedArithmetic.h:
(Checked):
(WTF::Checked::operator*=):

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

8 years agoUnreviewed, test expectations update.
zmo@google.com [Tue, 1 May 2012 00:39:57 +0000 (00:39 +0000)]
Unreviewed, test expectations update.

* platform/chromium/test_expectations.txt:

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

8 years agoAdd absoluteValue method for LayoutUnits to allow overloading abs()
leviw@chromium.org [Tue, 1 May 2012 00:06:37 +0000 (00:06 +0000)]
Add absoluteValue method for LayoutUnits to allow overloading abs()
https://bugs.webkit.org/show_bug.cgi?id=85214

Reviewed by Eric Seidel.

Adding an absoluteValue free inline function that operates on LayoutUnits, which
allows us to have one function signature for ints or FractionalLayoutUnits. We
can't simply add a FractionalLayoutUnit flavor of abs because it confuses
some compilers due to the implicit FractionalLayoutUnit constructors that take
ints and floats.

No new tests. No change in behavior.

* page/SpatialNavigation.cpp:
(WebCore::distanceDataForNode):
* rendering/LayoutTypes.h:
(WebCore::absoluteValue):
(WebCore):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::rangeIntersectsRect):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):

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

8 years agoUpdate LayoutUnit usage in InlineFlowBox and RenderWidget
leviw@chromium.org [Mon, 30 Apr 2012 23:42:05 +0000 (23:42 +0000)]
Update LayoutUnit usage in InlineFlowBox and RenderWidget
https://bugs.webkit.org/show_bug.cgi?id=85239

Reviewed by Eric Seidel.

Updating LayoutUnit usage in a pair of remaining functions to minimize the remaining work to switching
to FractionalLayoutUnits for layout instead of integers.

No new tests. No change in behavior.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection): Though stored as a float, the top is always
set to an integer value. When we move to sub-pixel, we need to preserve this. Not preserving this
behavior affects text decorations, most notably underlines.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::updateWidgetGeometry): Adding pixel snapping for the content box if it's
not transformed (absoluteContentBox includes pixel snapping), and properly treating the boundingBox
as an IntRect.

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

8 years agoShould be able to build YARR JIT without the JS language JIT
barraclough@apple.com [Mon, 30 Apr 2012 23:34:20 +0000 (23:34 +0000)]
Should be able to build YARR JIT without the JS language JIT
https://bugs.webkit.org/show_bug.cgi?id=85242

Reviewed by Michael Saboff.

Some build macros are wrong.

* assembler/RepatchBuffer.h:
* jit/ExecutableAllocator.h:
(JSC):
* jit/JITExceptions.cpp:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):

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

8 years agoPrepare RenderDeprecatedFlexibleBox for sub-pixel layout
leviw@chromium.org [Mon, 30 Apr 2012 23:03:02 +0000 (23:03 +0000)]
Prepare RenderDeprecatedFlexibleBox for sub-pixel layout
https://bugs.webkit.org/show_bug.cgi?id=85217

Reviewed by Eric Seidel.

Bailing from the space distribution loop in layoutHorizontal/VerticalBox when
the remaining space falls below one pixel. This has no effect in whole-pixel
layout, but avoids unnecessary work/infinite loops in the sub-pixel case.

No new tests. No change in behavior.

* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):

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

8 years agoNULL ptr in WebCore::Range::getBorderAndTextQuads
rniwa@webkit.org [Mon, 30 Apr 2012 22:51:41 +0000 (22:51 +0000)]
NULL ptr in WebCore::Range::getBorderAndTextQuads
https://bugs.webkit.org/show_bug.cgi?id=77218

Reviewed by Eric Seidel.

Source/WebCore:

The crash was caused by a malformed range obtained within an event handler of mutation events
(DOMNodeRemovedFromDocument). Because this range wasn't updated per node removal, range functions
end up not behaving well.

Fixed the bug by changing the order of the notifications in ContainerNode::willRemoveChild.
We now fire mutation events first before updating ranges so that any range created inside those
event handlers can also be updated prior to the actual node removal.

Test: fast/dom/Range/range-created-in-mutation-event-crash.xhtml

* dom/ContainerNode.cpp:
(WebCore::willRemoveChild):

LayoutTests:

Add a regression test. We use alert here instead of innerHTML, textContent, etc...
because document element is no longer well-formed at the end of the test.

* fast/dom/Range/range-created-in-mutation-event-crash-expected.txt: Added.
* fast/dom/Range/range-created-in-mutation-event-crash.xhtml: Added.

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

8 years agoFix tests to not depend on the actual list of builders at build.chromium.org.
ojan@chromium.org [Mon, 30 Apr 2012 22:51:09 +0000 (22:51 +0000)]
Fix tests to not depend on the actual list of builders at build.chromium.org.

* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(testHtmlForIndividualTestOnAllBuildersWithChrome):
(testHtmlForIndividualTestOnAllBuildersWithChromeWebkitMaster):

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

8 years agoREGRESSION (r115544): platform/mac/fast/events/pointer-events-dashboard.html is failing
mrowe@apple.com [Mon, 30 Apr 2012 22:49:33 +0000 (22:49 +0000)]
REGRESSION (r115544): platform/mac/fast/events/pointer-events-dashboard.html is failing

Remove the test since r115544 removed the special behavior in Dashboard.

Rubber-stamped by Anders Carlsson.

* platform/mac/fast/events/pointer-events-dashboard-expected.png: Removed.
* platform/mac/fast/events/pointer-events-dashboard-expected.txt: Removed.
* platform/mac/fast/events/pointer-events-dashboard.html: Removed.

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

8 years agoUnreviewed gardening
tomz@codeaurora.org [Mon, 30 Apr 2012 22:46:32 +0000 (22:46 +0000)]
Unreviewed gardening

* platform/qt/test_expectations.txt:

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

8 years agoSource/WebKit/chromium: [chromium] Disable battery-status API support.
commit-queue@webkit.org [Mon, 30 Apr 2012 22:44:17 +0000 (22:44 +0000)]
Source/WebKit/chromium: [chromium] Disable battery-status API support.

The battery-status API support should not have view-dependency. So disable it until
that is fixed.
https://bugs.webkit.org/show_bug.cgi?id=84499

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-04-30
Reviewed by Adam Barth.

* features.gypi:

LayoutTests: [chromium] Disable battery-status API support.
https://bugs.webkit.org/show_bug.cgi?id=84499

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-04-30
Reviewed by Adam Barth.

* platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/chromium/test_expectations.txt:

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

8 years agoScrollingCoordinator::requestScrollPositionUpdate should not update the main frame...
andersca@apple.com [Mon, 30 Apr 2012 22:42:37 +0000 (22:42 +0000)]
ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
https://bugs.webkit.org/show_bug.cgi?id=85240
<rdar://problem/11286609>

Reviewed by Sam Weinig.

Source/WebCore:

The call to updateMainFrameScrollPosition was added to make the WebKit2 find overlay work, since it relies
on scroll position updates being synchronous. Change the find code in WebKit2 to handle asynchronous scroll
position updates and remove the call to updateMainFrameScrollPosition.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):

Source/WebKit2:

The find machinery should cope with asynchronous scroll position updates.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
Split the code that handles updating the find indicator and find overlay out into a separate function.

(WebKit::FindController::findString):
Call updateFindUIAfterPageScroll once we know that the scroll position has been updated.

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

8 years ago[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
gavinp@chromium.org [Mon, 30 Apr 2012 22:41:45 +0000 (22:41 +0000)]
[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
https://bugs.webkit.org/show_bug.cgi?id=84552

After http://codereview.chromium.org/10139023/ lands, this thunk is no
longer needed.

Reviewed by Adam Barth.

* WebKit.gyp:
* public/WebReferrerPolicy.h: Removed.

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

8 years agoArguments object resets attributes on redefinition of a parameter
barraclough@apple.com [Mon, 30 Apr 2012 22:29:10 +0000 (22:29 +0000)]
Arguments object resets attributes on redefinition of a parameter
https://bugs.webkit.org/show_bug.cgi?id=84994

Rubber stamped by Oliver Hunt.

Source/JavaScriptCore:

There is a bug that we always re-add the original property before
redefinition, doing so in a way that will reset the attributes
without checking configurability.

* runtime/Arguments.cpp:
(JSC::Arguments::defineOwnProperty):
    - Only instantiate the property once - do not re-add if
      it has already been added, or if it has been deleted.

LayoutTests:

* fast/js/arguments-expected.txt:
* fast/js/script-tests/arguments.js:
    - Added test cases.

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

8 years agoAdd a way to asynchronously call a function once the scroll position of a page has...
andersca@apple.com [Mon, 30 Apr 2012 22:21:56 +0000 (22:21 +0000)]
Add a way to asynchronously call a function once the scroll position of a page has been updated
https://bugs.webkit.org/show_bug.cgi?id=85237

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
Export functions needed by WebKit2.

* page/scrolling/ScrollingCoordinator.h:
Make commitTreeStateIfNeeded public.

Source/WebKit2:

Add DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition, which will call the given function object after
making sure that the scroll position has been updated correctly. This is important for TiledCoreAnimationDrawingArea,
which updates the scrolling position asynchronously.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
Since scroll position updates are synchronous by default, just call function directly.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
Commit the layer tree state and then use ScrollingThread::dispatchBarrier to make sure that the function is called when any
scroll position changes have been made. If possible, freeze the layer tree to make sure that the update is atomic.

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

8 years agoFix ALL the build failures!
andersca@apple.com [Mon, 30 Apr 2012 22:14:15 +0000 (22:14 +0000)]
Fix ALL the build failures!

* UIProcess/API/mac/WKView.mm:
(-[WKView WebKit::]):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

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

8 years agoBuild fix.
andersca@apple.com [Mon, 30 Apr 2012 22:06:17 +0000 (22:06 +0000)]
Build fix.

* Shared/DrawingAreaInfo.h:

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

8 years agoRemove an erroneous assertion after r115655.
rniwa@webkit.org [Mon, 30 Apr 2012 21:52:30 +0000 (21:52 +0000)]
Remove an erroneous assertion after r115655.

* runtime/NumberPrototype.cpp:
(JSC::toUStringWithRadix):

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

8 years agoWebGLRenderingContext methods should throw TypeError for not enough arguments
haraken@chromium.org [Mon, 30 Apr 2012 21:48:07 +0000 (21:48 +0000)]
WebGLRenderingContext methods should throw TypeError for not enough arguments
https://bugs.webkit.org/show_bug.cgi?id=84787

Reviewed by Kenneth Russell.

Currently, WebGLRenderingcontext methods implement
"Not enough arguments" error as SyntaxError. The Web IDL
spec requires that it should be TypeError:
http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm

This patch changes SyntaxError to TypeError.

Source/WebCore:

I wanted to confirm the behavior of Firefox and Opera,
but they do not implement WebGL yet.

Test: fast/canvas/webgl/webgl-exceptions.html

* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getExtension):
(WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::JSWebGLRenderingContext::getParameter):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getExtensionCallback):
(WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
(WebCore::V8WebGLRenderingContext::getParameterCallback):
(WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
(WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
(WebCore::V8WebGLRenderingContext::getUniformCallback):
(WebCore::vertexAttribAndUniformHelperf):
(WebCore::uniformHelperi):
(WebCore::uniformMatrixHelper):

LayoutTests:

* fast/canvas/webgl/webgl-exceptions-expected.txt: Added.
* fast/canvas/webgl/webgl-exceptions.html: Added.

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

8 years ago[gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
eae@chromium.org [Mon, 30 Apr 2012 21:41:19 +0000 (21:41 +0000)]
[gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
https://bugs.webkit.org/show_bug.cgi?id=85222

Reviewed by Eric Seidel.

Update platform code to use the pixel snapped values for painting rects
to line up with device pixels and change platform specific hit testing
code to use roundedPoint as hit testing is still mostly done on integer
bounds.

Source/WebCore:

No new tests, no change in functionality.

* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
(WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::mouseDidMoveOverElement):
* webkit/webkithittestresult.cpp:
(WebKit::kit):
* webkit/webkitwebview.cpp:
(getLocationForKeyboardGeneratedContextMenu):
(webkit_web_view_query_tooltip):

Source/WebKit2:

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

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

8 years agoPut all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
andersca@apple.com [Mon, 30 Apr 2012 21:38:59 +0000 (21:38 +0000)]
Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
https://bugs.webkit.org/show_bug.cgi?id=85232

Reviewed by Sam Weinig.

Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::dispatchBackToMainThread):
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

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

8 years ago[V8][JSC] Remove hard-coded "Not enough arguments" errors
haraken@chromium.org [Mon, 30 Apr 2012 21:37:14 +0000 (21:37 +0000)]
[V8][JSC] Remove hard-coded "Not enough arguments" errors
https://bugs.webkit.org/show_bug.cgi?id=85207

Reviewed by Sam Weinig.

In bug 85022 and bug 85097, we implemented
createNotEnoughArgumentsError() in JSC and
V8Proxy::throwNotEnoughArgumentsError() in V8 and partially
removed hard-coded "Not enough arguments" errors.
This patch removes hard-coded "Not enough arguments"
errors by using the helper methods.

No tests. No change in behavior.

* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::convertToSpecifiedUnits):
* bindings/js/JSWebSocketCustom.cpp:
(WebCore::JSWebSocketConstructor::constructJSWebSocket):
(WebCore::JSWebSocket::send):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/v8/ScriptController.cpp:
(WebCore::setValueAndClosePopupCallback):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8SVGLengthCustom.cpp:
(WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
(WebCore::V8WebSocket::sendCallback):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::openCallback):

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

8 years agoAdd String::startsWith() and endsWith() for string literals
benjamin@webkit.org [Mon, 30 Apr 2012 21:32:44 +0000 (21:32 +0000)]
Add String::startsWith() and endsWith() for string literals
https://bugs.webkit.org/show_bug.cgi?id=85154

Reviewed by Darin Adler.

Source/WebCore:

Update WebCore to use the simpler startsWith() and endsWith() taking
a UChar.

* css/CSSParser.cpp:
(WebCore::CSSParser::markPropertyEnd):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::parseKeyString):
* editing/markup.cpp:
(WebCore::createFragmentFromText):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase):
* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::shouldRejectForSecurityReason):
* platform/posix/FileSystemPOSIX.cpp:
(WebCore::pathByAppendingComponent):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::findPlugin):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::parseAttribute):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseOffsetValue):
(WebCore::SVGSMILElement::parseCondition):

Source/WebKit/blackberry:

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::elementPatternMatches):

Source/WebKit2:

Update WebKit2 to use String::endsWith(UChar).

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::pathExtension):

Source/WTF:

When invoking StringImpl::startsWidth() or StringImpl::endsWith() with
a string literal, a new String was constructed implicitly, allocating
a new StringImpl and copying the characters for the operation.

This patch adds a version of those methods for single characters and
string literals.
This allows us to avoid allocating memory and use the characters in place,
and it permits some extra shortcuts in the implementation.

* wtf/text/AtomicString.h:
(WTF::AtomicString::startsWith):
(AtomicString):
(WTF::AtomicString::endsWith):
* wtf/text/StringImpl.cpp:
(WTF::equalInner):
(WTF):
(WTF::StringImpl::startsWith):
(WTF::StringImpl::endsWith):
* wtf/text/StringImpl.h:
(WTF::StringImpl::startsWith):
(StringImpl):
(WTF::StringImpl::endsWith):
* wtf/text/WTFString.h:
(WTF::String::startsWith):
(String):
(WTF::String::endsWith):

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

8 years agoSource/WebCore: Remove positioned float code.
inferno@chromium.org [Mon, 30 Apr 2012 21:30:56 +0000 (21:30 +0000)]
Source/WebCore: Remove positioned float code.
https://bugs.webkit.org/show_bug.cgi?id=84795

Reviewed by Dan Bernstein.

Backout r92004 and some pieces from r91702.

Test: fast/block/float/positioned-float-crash.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFloat):
* css/CSSValueKeywords.in:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::FloatingObjects::clear):
(WebCore::RenderBlock::FloatingObjects::increaseObjectsCount):
(WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount):
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::forceLayoutInlineChildren):
(FloatingObject):
(WebCore::RenderBlock::FloatingObject::FloatingObject):
(WebCore::RenderBlock::hasOverhangingFloats):
(WebCore::RenderBlock::FloatingObjects::FloatingObjects):
(FloatingObjects):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateBoxModelInfoFromStyle):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderDeprecatedFlexibleBox.h:
(RenderDeprecatedFlexibleBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/style/RenderStyleConstants.h:

LayoutTests: Remove positioned float code.
https://bugs.webkit.org/show_bug.cgi?id=84795

Reviewed by Dan Bernstein.

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

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

8 years agoRemove BlobBuilder
weinig@apple.com [Mon, 30 Apr 2012 21:11:45 +0000 (21:11 +0000)]
Remove BlobBuilder
https://bugs.webkit.org/show_bug.cgi?id=84036

Reviewed by Anders Carlsson.

Source/WebCore:

* GNUmakefile.am:
* fileapi/WebKitBlobBuilder.idl:
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
Make exposing the WebKitBlobBuilder JS object conditional on a new
ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
but do for everyone else.

Source/WebKit/chromium:

* features.gypi:
Keep WebKitBlobBuilder enabled for Chromium, since it has shipped it.

Tools:

* Scripts/build-webkit:
* qmake/mkspecs/features/features.prf:
Make exposing the WebKitBlobBuilder JS object conditional on a new
ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
but do for everyone else.

LayoutTests:

* fast/js/constructor-length.html:
* platform/mac/fast/js/constructor-length-expected.txt:
Remove WebKitBlobBuilder from this test, as it is not exposed on all platforms,
and add Blob, which is.

* platform/mac/Skipped:
Skip fast/files/blob-builder-crash.html, since we no longer support WebKitBlobBuilder.

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

8 years agoAdd a barrier-style dispatch member function to ScrollingThread
andersca@apple.com [Mon, 30 Apr 2012 21:10:21 +0000 (21:10 +0000)]
Add a barrier-style dispatch member function to ScrollingThread
https://bugs.webkit.org/show_bug.cgi?id=85228

Reviewed by Sam Weinig.

Add a ScrollingThread::dispatchBarrier function which takes a WTF::Function and dispatches it to the main thread
once all the currently scheduled scrolling thread functions have run. This is to be used for synchronization between the
scrolling thread and the main thread.

* page/scrolling/ScrollingThread.cpp:
(WebCore::callFunctionOnMainThread):
(WebCore):
(WebCore::ScrollingThread::dispatchBarrier):
* page/scrolling/ScrollingThread.h:
(ScrollingThread):

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

8 years ago[CMake] Add a proper license to FindSqlite.cmake.
rakuco@webkit.org [Mon, 30 Apr 2012 21:02:51 +0000 (21:02 +0000)]
[CMake] Add a proper license to FindSqlite.cmake.
https://bugs.webkit.org/show_bug.cgi?id=84901

Reviewed by Daniel Bates.

FindSqlite.cmake referenced COPYING-CMAKE-SCRIPTS, which was
supposed to contain its license. This file, however, was not
imported with FindSqlite.cmake into the tree.

Add it from kdelibs (where the Find file came from) at git
revision [1]. Also worth mentioning is that Alexander Neundorf
added Gilles Caulier as the script author in revision [2].

[1] https://projects.kde.org/projects/kde/kdelibs/repository/revisions/c27925edf98b9952aeada677dfc74ce9c809c48a
[2] https://projects.kde.org/projects/kde/kdelibs/repository/revisions/14d0a92e04e1a200d6e58397e57a29194a0819cf

* Source/cmake/FindSqlite.cmake:

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

8 years agoWTF::bind should work with blocks
andersca@apple.com [Mon, 30 Apr 2012 21:02:39 +0000 (21:02 +0000)]
WTF::bind should work with blocks
https://bugs.webkit.org/show_bug.cgi?id=85227

Reviewed by Sam Weinig.

Add a block type FunctionWrapper specialization.

* wtf/Functional.h:

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

8 years agoExpose a flag so that fullscreen video on android can work with FULLSCREEN_API
commit-queue@webkit.org [Mon, 30 Apr 2012 20:27:35 +0000 (20:27 +0000)]
Expose a flag so that fullscreen video on android can work with FULLSCREEN_API
https://bugs.webkit.org/show_bug.cgi?id=84414

Patch by Min Qin <qinmin@google.com> on 2012-04-30
Reviewed by Darin Fisher.

Source/WebCore:

No tests, just exposing the flag, and will be used by android later.
Sorry, there is a merge error during the previous commit, resolved now

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setControls):
(WebCore):
(WebCore::MediaPlayer::enterFullscreen):
(WebCore::MediaPlayer::exitFullscreen):
* platform/graphics/MediaPlayer.h:
(MediaPlayer):
* platform/graphics/MediaPlayerPrivate.h:
(MediaPlayerPrivateInterface):
(WebCore::MediaPlayerPrivateInterface::enterFullscreen):

Source/WebKit/chromium:

On android, the fullscreen video was implemented by passing a java
surfaceView to an android mediaplayer class.
The implementation of that logic should happen in WebKit::WebMediaPlayer.
This change makes it possble for WebViewImpl::enterFullScreenForElement()
to call WebMediaPlayer->enterFullscreen(), thus solving the issue.

Sorry, there is a merge error during the previous commit, resolved now

No new tests. This just exposes the flag so later it can be used by android.

* features.gypi:
* public/WebMediaPlayer.h:
(WebMediaPlayer):
(WebKit::WebMediaPlayer::enterFullscreen):
(WebKit::WebMediaPlayer::exitFullscreen):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit):
(WebKit::WebMediaPlayerClientImpl::enterFullscreen):
(WebKit::WebMediaPlayerClientImpl::exitFullscreen):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::enterFullScreenForElement):
(WebKit::WebViewImpl::exitFullScreenForElement):

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

8 years agoUnreviewed. Rolled DEPS.
gavinp@chromium.org [Mon, 30 Apr 2012 20:20:47 +0000 (20:20 +0000)]
Unreviewed.  Rolled DEPS.

* DEPS:

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

8 years ago[GTK] Add glib as a dependency to build glib-networking
amruthraj@motorola.com [Mon, 30 Apr 2012 19:47:22 +0000 (19:47 +0000)]
[GTK] Add glib as a dependency to build glib-networking
https://bugs.webkit.org/show_bug.cgi?id=85181

Reviewed by Martin Robinson.

* gtk/jhbuild.modules:

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

8 years agofast/js/random-array-gc-stress times out in debug mode
mhahnenberg@apple.com [Mon, 30 Apr 2012 19:23:56 +0000 (19:23 +0000)]
fast/js/random-array-gc-stress times out in debug mode
https://bugs.webkit.org/show_bug.cgi?id=84821

Reviewed by Darin Adler.

* fast/js/script-tests/random-array-gc-stress.js: Lowering the iterations even more.

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

8 years agoEnd of Interpreter::tryCacheGetByID can trigger the garbage collector
commit-queue@webkit.org [Mon, 30 Apr 2012 19:20:04 +0000 (19:20 +0000)]
End of Interpreter::tryCacheGetByID can trigger the garbage collector
https://bugs.webkit.org/show_bug.cgi?id=84927

Patch by Myles Maxfield <mmaxfield@google.com> on 2012-04-30
Reviewed by Oliver Hunt.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::tryCacheGetByID):

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

8 years agojsSingleCharacterString and jsSingleCharacterSubstring are not inlined
benjamin@webkit.org [Mon, 30 Apr 2012 19:12:12 +0000 (19:12 +0000)]
jsSingleCharacterString and jsSingleCharacterSubstring are not inlined
https://bugs.webkit.org/show_bug.cgi?id=85147

Reviewed by Darin Adler.

The functions jsSingleCharacterString() and jsSingleCharacterSubstring() were not inlined
by the compiler. This annihilate the gains of using SmallStrings.

On stringProtoFuncCharAt(), this patch improves the performance by 11%.

* runtime/JSString.h:
(JSC::jsSingleCharacterString):
(JSC::jsSingleCharacterSubstring):

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

8 years agoSource/JavaScriptCore: Add fast patch for radix == 10 on numberProtoFuncToString
benjamin@webkit.org [Mon, 30 Apr 2012 19:02:25 +0000 (19:02 +0000)]
Source/JavaScriptCore: Add fast patch for radix == 10 on numberProtoFuncToString
https://bugs.webkit.org/show_bug.cgi?id=85120

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-04-30
Reviewed by Darin Adler.

When radix, we use to turn the doubleValue into a JSValue just to convert
it to a String. The problem is that was using the slow path for conversion and
for the toString() operation.

This patch shortcuts the creation of a JSValue and uses NumericStrings directly.
The conversion is split between Integer and Double to ensure the fastest conversion
for the common case of integer arguments.

Converting number with radix 10 becomes 5% faster.

Due to the simpler conversion of number to string for integer, converting
integers that do not fall in the two previous optimizations get 32% faster.

* runtime/NumberPrototype.cpp:
(JSC::extractRadixFromArgs):
(JSC::integerValueToString):
(JSC::numberProtoFuncToString):

LayoutTests: Add fast path for radix == 10 to numberProtoFuncToString
https://bugs.webkit.org/show_bug.cgi?id=85120

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-04-30
Reviewed by Darin Adler.

Add more test coverage for Number.proto.toString.

* platform/chromium/test_expectations.txt: Mark the test as failing on Chromium.
* fast/js/toString-number-expected.txt: Added.
* fast/js/toString-number.html: Added.

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

8 years agoMove more of committing and starting to write a Document
japhet@chromium.org [Mon, 30 Apr 2012 18:51:27 +0000 (18:51 +0000)]
Move more of committing and starting to write a Document
to DocumentLoader.
https://bugs.webkit.org/show_bug.cgi?id=83908

Reviewed by Adam Barth.

No new tests, refactor only.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitIfReady): Ignore m_gotFirstByte here, since
    it was always true here anyway.
(WebCore::DocumentLoader::finishedLoading): If we are finishing an empty
    document, create the document now, so that FrameLoaderClient doesn't
    have to do it later (FrameLoaderClient code will be removed in a later
    patch).
(WebCore::DocumentLoader::commitData): Call receivedFirstData() directly and
    do some work receivedFirstData() used to do, setEncoding() only once per
    load.
(WebCore::DocumentLoader::receivedData):
(WebCore::DocumentLoader::maybeCreateArchive):
* loader/DocumentLoader.h:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::setEncoding):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData): Move DocumentLoader calls
    to DocumentLoader.
* loader/FrameLoader.h: Remove m_hasReceivedFirstData and willSetEncoding(),
    allow hasReceivedData() to be called directly.
(FrameLoader):

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

8 years agoUnreviewed. Fix test crashes in Win/Linux debug builds.
haraken@chromium.org [Mon, 30 Apr 2012 17:53:53 +0000 (17:53 +0000)]
Unreviewed. Fix test crashes in Win/Linux debug builds.

* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::V8LazyEventListener):
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/V8LazyEventListener.h:
(V8LazyEventListener):

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

8 years agoMediaStream API: Adding a test for the experimental PeerConnection00
tommyw@google.com [Mon, 30 Apr 2012 17:45:00 +0000 (17:45 +0000)]
MediaStream API: Adding a test for the experimental PeerConnection00
https://bugs.webkit.org/show_bug.cgi?id=82881

Reviewed by Dimitri Glazkov.

Tests construction of objects.

* fast/mediastream/constructors-expected.txt: Added.
* fast/mediastream/constructors.html: Added.

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

8 years ago Validate keypress command names
ap@apple.com [Mon, 30 Apr 2012 17:44:58 +0000 (17:44 +0000)]
    Validate keypress command names
        https://bugs.webkit.org/show_bug.cgi?id=85204
        <rdar://problem/11249368>

        Reviewed by Darin Adler.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView doCommandBySelector:]):
        (-[WKView insertText:replacementRange:]):
        * UIProcess/WebPageProxy.h:
        (WebKit::WebPageProxy::registerKeypressCommandName):
        (WebKit::WebPageProxy::isValidKeypressCommandName):
        * UIProcess/mac/WebPageProxyMac.mm:
        (WebKit::WebPageProxy::executeSavedCommandBySelector):

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

8 years agoMediaStream API: Change LocalMediaStream::stop to be synchronous
tommyw@google.com [Mon, 30 Apr 2012 17:44:38 +0000 (17:44 +0000)]
MediaStream API: Change LocalMediaStream::stop to be synchronous
https://bugs.webkit.org/show_bug.cgi?id=84942

Reviewed by Dimitri Glazkov.

Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
behaviour needs to change since it is no longer a good idea to start a timer when called.

Not possible to write a test for this.

* Modules/mediastream/LocalMediaStream.cpp:
(WebCore::LocalMediaStream::LocalMediaStream):
(WebCore::LocalMediaStream::stop):
* Modules/mediastream/LocalMediaStream.h:
(LocalMediaStream):

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

8 years agoMove myself to reviewers.
alexis.menard@openbossa.org [Mon, 30 Apr 2012 17:13:23 +0000 (17:13 +0000)]
Move myself to reviewers.

Reviewed by Andreas Kling.

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

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

8 years agoAdd ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
eae@chromium.org [Mon, 30 Apr 2012 17:03:41 +0000 (17:03 +0000)]
Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
https://bugs.webkit.org/show_bug.cgi?id=85146

Source/WebCore:

Patch by Emil A Eklund  <eae@chromium.org> and Levi Weintraub <leviw@chromium.org> on 2012-04-28
Reviewed by Eric Seidel.

Add a new flag for controlling the fixed point denominator in
FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
Until we change the LayoutUnit typedef this change will have no effect.

No new tests, no change in functionality.

* platform/FractionalLayoutUnit.h:
(WebCore):
(WebCore::FractionalLayoutUnit::operator++):
(WebCore::operator/):
(WebCore::operator+):
Add ++, / double and and + double operators. These are needed when
ENABLE_SUBPIXEL_LAYOUT is not enabled.

* platform/graphics/FractionalLayoutRect.cpp:
(WebCore::enclosingFractionalLayoutRect):

Source/WTF:

Reviewed by Eric Seidel.

Add a new flag for controlling the fixed point denominator in
FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
Until we change the LayoutUnit typedef this change will have no effect.

* wtf/Platform.h:

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

8 years agoloadOrRedirectSubframe should return the owner element's frame
jschuh@chromium.org [Mon, 30 Apr 2012 16:59:50 +0000 (16:59 +0000)]
loadOrRedirectSubframe should return the owner element's frame
https://bugs.webkit.org/show_bug.cgi?id=84780

Reviewed by Nate Chapin.

Source/WebCore:

Test: fast/loader/javascript-url-iframe-remove-on-navigate.html

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadOrRedirectSubframe):

LayoutTests:

* fast/loader/javascript-url-iframe-remove-on-navigate-expected.txt: Added.
* fast/loader/javascript-url-iframe-remove-on-navigate.html: Added.

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