WebKit-https.git
6 years agoRenderEmbeddedObject::isReplacementObscured is wrong if an obscuring element has...
timothy_horton@apple.com [Wed, 31 Jul 2013 19:27:44 +0000 (19:27 +0000)]
RenderEmbeddedObject::isReplacementObscured is wrong if an obscuring element has pointer-events: none set
https://bugs.webkit.org/show_bug.cgi?id=119348

Reviewed by Dean Jackson.

Change the expected outcome of the test to want a visually-obscured
but clickable embed (because the obscuring element has pointer-events: none)
to be considered obscured.

Also, adjust the test so that it runs all of the subtests even if
some of them fail.

* plugins/unavailable-plugin-indicator-obscurity-expected.txt:
* plugins/unavailable-plugin-indicator-obscurity.html:

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

6 years agoUpdate scripts to reference contributors.json instead of committers.py in messaging
bjonesbe@adobe.com [Wed, 31 Jul 2013 19:26:22 +0000 (19:26 +0000)]
Update scripts to reference contributors.json instead of committers.py in messaging
https://bugs.webkit.org/show_bug.cgi?id=119342

Reviewed by Ryosuke Niwa.

Change the scripts to point people to contributors.json instead of
committers.py since the latter no longer contains the list of
contributors.

* Scripts/webkitpy/common/config/committervalidator.py:
(CommitterValidator._contributors_json_path):
(CommitterValidator._flag_permission_rejection_message):
* Scripts/webkitpy/common/config/committervalidator_unittest.py:
(CommitterValidatorTest.test_flag_permission_rejection_message):
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._commit_queue_flag):
* Scripts/webkitpy/common/watchlist/watchlistparser.py:
(WatchListParser._validate):
* Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py:
(WatchListParserTest.test_cc_rule_with_invalid_email):
* Scripts/webkitpy/tool/bot/feeders_unittest.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
* Scripts/webkitpy/tool/steps/validatereviewer.py:
(ValidateReviewer.run):

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

6 years agoUnreviewed. Re-enable WinEWS tests following r153527.
roger_fong@apple.com [Wed, 31 Jul 2013 19:22:49 +0000 (19:22 +0000)]
Unreviewed. Re-enable WinEWS tests following r153527.

* Scripts/webkitpy/common/config/ews.json:

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

6 years agoUnreviewed gardening. AppleWin port.
roger_fong@apple.com [Wed, 31 Jul 2013 19:20:43 +0000 (19:20 +0000)]
Unreviewed gardening. AppleWin port.

* platform/win/editing/selection/move-left-right-expected.txt:

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

6 years agoSome cleanup in JSValue::get
barraclough@apple.com [Wed, 31 Jul 2013 19:03:05 +0000 (19:03 +0000)]
Some cleanup in JSValue::get
https://bugs.webkit.org/show_bug.cgi?id=119343

Reviewed by Geoff Garen.

Source/JavaScriptCore:

JSValue::get is implemented to:
    1) Check if the value is a cell – if not, synthesize a prototype to search,
    2) call getOwnPropertySlot on the cell,
    3) if this returns false, cast to JSObject to get the prototype, and walk the prototype chain.
By all rights this should crash when passed a string and accessing a property that does not exist, because
the string is a cell, getOwnPropertySlot should return false, and the cast to JSObject should be unsafe.
To work around this, JSString::getOwnPropertySlot actually implements 'get' functionality - searching the
prototype chain, and faking out a return value of undefined if no property is found.

This is a huge hazard, since fixing JSString::getOwnPropertySlot or calling getOwnPropertySlot on cells
from elsewhere would introduce bugs. Fortunately it is only ever called in this one place.

The fix here is to move getOwnPropertySlot onto JSObjecte and end this madness - cells don't have property
slots anyway.

Interesting changes are in JSCJSValueInlines.h, JSString.cpp - the rest is pretty much all JSCell -> JSObject.

Source/WebCore:

* WebCore.exp.in:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getOwnPropertySlot):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertySlot):
* bridge/runtime_object.h:
    - getOwnPropertySlot, JSCell -> JSObject

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getOwnPropertySlot):
* WebProcess/Plugins/Netscape/JSNPObject.h:
    - getOwnPropertySlot, JSCell -> JSObject

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

6 years ago REGRESSION (r153406): DOM intervals are not properly restarted when resumed
ap@apple.com [Wed, 31 Jul 2013 18:48:50 +0000 (18:48 +0000)]
    REGRESSION (r153406): DOM intervals are not properly restarted when resumed
        https://bugs.webkit.org/show_bug.cgi?id=119345

        Reviewed by Sam Weinig.

        * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::suspend): Call base class
        version of repeatInterval(), not our version that will just return the current value
        of m_savedRepeatInterval in this situation.

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

6 years agoAvoid calling nextRenderer() in some cases
rniwa@webkit.org [Wed, 31 Jul 2013 18:44:21 +0000 (18:44 +0000)]
Avoid calling nextRenderer() in some cases
https://bugs.webkit.org/show_bug.cgi?id=119313

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/3207cfda52082f4fd6a04c7819c18a980de58beb.

* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):

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

6 years agoConvert most callers of setInlineStyleProperty passing strings to enums or doubles...
rniwa@webkit.org [Wed, 31 Jul 2013 18:41:08 +0000 (18:41 +0000)]
Convert most callers of setInlineStyleProperty passing strings to enums or doubles instead
https://bugs.webkit.org/show_bug.cgi?id=119304

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/8157dd9381716759f183fabbfed29c52962be746

* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
(WebCore::DeleteButtonController::show):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::resizeImageToFit):
(WebCore::ImageDocument::restoreImageSize):
(WebCore::ImageDocument::windowSizeChanged):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setFontSize):
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
(WebCore::TextTrackCueGeneric::setFontSize):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):

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

6 years ago[CSS Shapes] Stop using internals in shape-outside tests
bjonesbe@adobe.com [Wed, 31 Jul 2013 18:18:37 +0000 (18:18 +0000)]
[CSS Shapes] Stop using internals in shape-outside tests
https://bugs.webkit.org/show_bug.cgi?id=119229

Reviewed by Alexandru Chiculita.

We no longer need to use window.internals for shape-outside, since it
is enabled by default on ports where it is compiled in. To make the
w3c spec test cleaner, that reference has been removed from all of the
tests.

* csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-003.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-004.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-002.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-002.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-002.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-003.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-rounded-rectangle-004.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002-expected.html:
* csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html:
* csswg/submitted/shapes/shape-outside/w3c-import.log:

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

6 years ago[Win] JavaScript crash.
msaboff@apple.com [Wed, 31 Jul 2013 18:03:47 +0000 (18:03 +0000)]
[Win] JavaScript crash.
https://bugs.webkit.org/show_bug.cgi?id=119339

Reviewed by Mark Hahnenberg.

* jit/JITStubsX86.h: Implement ctiVMThrowTrampoline and
ctiVMThrowTrampolineSlowpath the same way as the gcc x86 version does.

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

6 years agoTest assignment to indexed window properties
rniwa@webkit.org [Wed, 31 Jul 2013 17:47:50 +0000 (17:47 +0000)]
Test assignment to indexed window properties
https://bugs.webkit.org/show_bug.cgi?id=119307

Reviewed by Geoffrey Garen.

Merge https://chromium.googlesource.com/chromium/blink/+/bdeca10fa79477f669cab1e5b081a480e743fd3f

* http/tests/security/xss-DENIED-window-index-assign-expected.txt: Added.
* http/tests/security/xss-DENIED-window-index-assign.html: Added.

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

6 years agoAdd a test to ensure SelectElement removes an option when null is assigned by indexed...
rniwa@webkit.org [Wed, 31 Jul 2013 16:52:12 +0000 (16:52 +0000)]
Add a test to ensure SelectElement removes an option when null is assigned by indexed setter
https://bugs.webkit.org/show_bug.cgi?id=119311

Reviewed by Alexey Proskuryakov.

Merge a test in https://chromium.googlesource.com/chromium/blink/+/da5c8d908b87f75c5ba3d1457c2353642e999963
even though the regression never existed in WebKit.

* fast/forms/select/select-assign-null-expected.txt: Added.
* fast/forms/select/select-assign-null.html: Added.

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

6 years agoUnreviewed: Adding myself to the committers' list.
bjonesbe@adobe.com [Wed, 31 Jul 2013 16:24:05 +0000 (16:24 +0000)]
Unreviewed: Adding myself to the committers' list.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years ago[Coordinated Graphics] Use m_ prefix only for member variable
commit-queue@webkit.org [Wed, 31 Jul 2013 16:08:00 +0000 (16:08 +0000)]
[Coordinated Graphics] Use m_ prefix only for member variable
https://bugs.webkit.org/show_bug.cgi?id=119250

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-07-31
Reviewed by Noam Rosenthal.

WebKit coding style suggests to use m_ prefix only for data members.
This patch also removes unnecessary copy by passing const-reference
parameter values.

* platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
(WebCore::CoordinatedCustomFilterProgram::create):

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

6 years ago[Qt] Images are down-scaled badly
allan.jensen@digia.com [Wed, 31 Jul 2013 14:39:38 +0000 (14:39 +0000)]
[Qt] Images are down-scaled badly
https://bugs.webkit.org/show_bug.cgi?id=119263

Reviewed by Jocelyn Turcotte.

QPainter only does bilinear filtering, which means it will downscaling beyond
0.5x will start skipping pixel and start to degrade the end result. Scaling in
QImage and QPixmap however uses a better but much more expensive sampling that
counts all pixels.

To get the high quality downscaling we must therefore prescale the images before
painting them. To avoid a performance impact on repeated paints the prescaled
image are saved in the QPixmapCache.

* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):

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

6 years ago[GTK] Unreviewed gardening. Remove flaky tests from TestExpectations.
simon.pena@samsung.com [Wed, 31 Jul 2013 14:35:07 +0000 (14:35 +0000)]
[GTK] Unreviewed gardening. Remove flaky tests from TestExpectations.

* platform/gtk/TestExpectations: Remove tests no longer flaky after
webkit.org/b/100688 was fixed in r140166.

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

6 years ago[Qt] Build WebKit with C++11
allan.jensen@digia.com [Wed, 31 Jul 2013 13:09:38 +0000 (13:09 +0000)]
[Qt] Build WebKit with C++11
https://bugs.webkit.org/show_bug.cgi?id=119337

Reviewed by Csaba Osztrogonác.

Source/WebKit2:

We no longer need to enable C++11 specifically for WebKit2.

* WebKit2.pri:

Tools:

Enable building with C++11.

* qmake/mkspecs/features/default_pre.prf:
* qmake/mkspecs/features/unix/default_post.prf:
* qmake/mkspecs/features/unix/default_pre.prf:

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

6 years ago[Qt] ASSERTS trigger in release builds
allan.jensen@digia.com [Wed, 31 Jul 2013 12:49:46 +0000 (12:49 +0000)]
[Qt] ASSERTS trigger in release builds
https://bugs.webkit.org/show_bug.cgi?id=119336

Reviewed by Jocelyn Turcotte.

Ensure the qmake also defaults to release if no configuration is known.

* qmake/mkspecs/features/default_post.prf:

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

6 years ago[texmap][GStreamer][GTK] composited video shows tearing
zandobersek@gmail.com [Wed, 31 Jul 2013 12:42:12 +0000 (12:42 +0000)]
[texmap][GStreamer][GTK] composited video shows tearing
https://bugs.webkit.org/show_bug.cgi?id=118253

Reviewed by Martin Robinson.

* gtk/jhbuild.modules: Bump the Jhbuild versions of the Gdk-Pixbuf and GTK+ packages to 2.27.3 and 3.8.2, respectively.
The first is required by the second, and the GTK+ bump introduces proper display framerate synchronization that removes
screen tearing when enabling accelerated compositing and performing graphically heavy operations like viewing HD videos.

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

6 years ago[Qt][WK1] navigator.plugins shows too few entries.
michael.bruning@digia.com [Wed, 31 Jul 2013 12:12:10 +0000 (12:12 +0000)]
[Qt][WK1] navigator.plugins shows too few entries.
https://bugs.webkit.org/show_bug.cgi?id=119332

Reviewed by Jocelyn Turcotte.

Based on input by Choon Sik Cho.

PlatformStrategiesQt::getPluginInfo was using the
WTF::Vector::resize method wrongly.

This patch removes the call to Vector::resize as
Vector::append will take care of increasing capacity
if needed.

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::getPluginInfo):

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

6 years ago[Qt] Add interface API for origin whitelisting
commit-queue@webkit.org [Wed, 31 Jul 2013 11:56:06 +0000 (11:56 +0000)]
[Qt] Add interface API for origin whitelisting
https://bugs.webkit.org/show_bug.cgi?id=117823

Patch by Deepjyoti Saha <deesaha@cisco.com> on 2013-07-31
Reviewed by Jocelyn Turcotte.

Adding interface APIs in QWebSecurityOrigin to add and remove whiteList entires.

Re-used most of the test cases written by Carol Szabo  <carol.szabo@nokia.com>
for https://bugs.webkit.org/show_bug.cgi?id=31875 and added the same.

* Api/qwebsecurityorigin.cpp:
(QWebSecurityOrigin::addAccessWhitelistEntry):
(QWebSecurityOrigin::removeAccessWhitelistEntry):
* Api/qwebsecurityorigin.h:
* tests/qwebsecurityorigin: Added.
* tests/qwebsecurityorigin/qwebsecurityorigin.pro: Added.
* tests/qwebsecurityorigin/resources: Added.
* tests/qwebsecurityorigin/resources/test.html: Added.
* tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp: Added.
(tst_QWebSecurityOrigin::tst_QWebSecurityOrigin):
(tst_QWebSecurityOrigin::~tst_QWebSecurityOrigin):
(tst_QWebSecurityOrigin::init):
(tst_QWebSecurityOrigin::cleanup):
(tst_QWebSecurityOrigin::whiteList_data):
(tst_QWebSecurityOrigin::whiteList):
* tests/qwebsecurityorigin/tst_qwebsecurityorigin.qrc: Added.

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

6 years agoRemove guessesVector param from isUngrammatical
g.czajkowski@samsung.com [Wed, 31 Jul 2013 09:44:35 +0000 (09:44 +0000)]
Remove guessesVector param from isUngrammatical
https://bugs.webkit.org/show_bug.cgi?id=119241

Reviewed by Ryosuke Niwa.

TextCheckingHelper::isUngrammatical(Vector<String>& guessesVector) doesn't return
guesses for ungrammatical phrases through its parameter.
Editor::isSelectionUngrammatical() uses it to check whether the selection
is ungrammatical.

r71009 showed that isUngrammatical(Vector<String>& guessesVector) had not supported
grammar guesses.

The grammar guesses can be retrieved by guessesForMisspelledOrUngrammaticalRange
when UNIFIED_TEXT_CHECKING is on.

No new tests, this is dead code due to no WebKit port implements grammar using
legacy text checker.

* WebCore.exp.in: Removed __ZN7WebCore6Editor32guessesForUngrammaticalSelectionEv.
* editing/Editor.cpp:
(WebCore::Editor::isSelectionUngrammatical):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/Editor.h: Removed guessesForUngrammaticalSelection. Dead code.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::isUngrammatical):
* editing/TextCheckingHelper.h:

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

6 years agoShrink Vectors with inline capacity.
akling@apple.com [Wed, 31 Jul 2013 08:12:32 +0000 (08:12 +0000)]
Shrink Vectors with inline capacity.
<http://webkit.org/b/119295>
<rdar://problem/14598360>

Reviewed by Anders Carlsson.

Pack Vector::m_size next to VectorBufferBase::m_capacity so there's no space wasted
on padding when sizeof(T) >= 8. Since m_size is not conceptually part of the buffer,
I just using'ed it into Vector.

* wtf/SizeLimits.cpp:
* wtf/Vector.h:
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::Vector::Vector):
(WTF::::Vector):

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

6 years agoUnnecessary const_cast<TextCheckingHelper*>(this)->findFirstBadGrammar
g.czajkowski@samsung.com [Wed, 31 Jul 2013 08:06:54 +0000 (08:06 +0000)]
Unnecessary const_cast<TextCheckingHelper*>(this)->findFirstBadGrammar
https://bugs.webkit.org/show_bug.cgi?id=119244

Reviewed by Ryosuke Niwa.

Added missing const modifier to findFirstBadGrammar (and findFirstGrammarDetail
respectively) to call it in 'isUngrammatical() const' without const casting.

No new tests, no behavior change.

* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
Added const.

(WebCore::TextCheckingHelper::isUngrammatical):
Now const_cast can be removed.

* editing/TextCheckingHelper.h:

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

6 years agofindFirstGrammarDetail doesn't need to be exposed.
g.czajkowski@samsung.com [Wed, 31 Jul 2013 07:23:41 +0000 (07:23 +0000)]
findFirstGrammarDetail doesn't need to be exposed.
https://bugs.webkit.org/show_bug.cgi?id=119249

Reviewed by Darin Adler.

Make TextCheckingHelper::findFirstGrammarDetail private.
Remove badGrammarPhraseLength param. It's not used any longer.

No new tests, no behavior change.

* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
* editing/TextCheckingHelper.h:

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

6 years agoDHTML drag can result in a null-deref under WebDragClient::startDrag
timothy_horton@apple.com [Wed, 31 Jul 2013 05:57:28 +0000 (05:57 +0000)]
DHTML drag can result in a null-deref under WebDragClient::startDrag
https://bugs.webkit.org/show_bug.cgi?id=119297
<rdar://problem/14213012>

Reviewed by Simon Fraser.

Test: fast/events/setDragImage-in-document-element-crash.html

* page/mac/FrameSnapshottingMac.mm:
(WebCore::snapshotDragImage):
We shouldn't waste time painting an empty image, nor should we return
an image with no size.

Add a test that ensures that using a zero-size in-document non-<img>
element for setDragImage() doesn't crash.

* fast/events/setDragImage-in-document-element-crash-expected.txt: Added.
* fast/events/setDragImage-in-document-element-crash.html: Added.

* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::convertImageToBitmap):
ShareableBitmap::createShareable can return null, but shouldn't dereference that.

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

6 years agoDotted borders render w/ artifacts and sometimes as solid lines
commit-queue@webkit.org [Wed, 31 Jul 2013 04:59:52 +0000 (04:59 +0000)]
Dotted borders render w/ artifacts and sometimes as solid lines
https://bugs.webkit.org/show_bug.cgi?id=3964

Patch by Pravin D <pravind@samsung.com> on 2013-07-30
Reviewed by Elliott Sprehn.

Source/WebCore:

While drawing the dotted border, the common borders are drawn by the cells sharing them. The dotted borders
become(tend) solid when the starting and the end points of the border drawn by the two cells don't match. This
fixes the same.

Test: fast/table/border-collapsing/dotted-collapsed-border.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
(WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
 Helper function to decide if border's start point requires any adjustment.

(WebCore::RenderTableCell::paintCollapsedBorders):
Added logic to handle dotted borders so that they do not become solid.

* rendering/RenderTableCell.h:
 Helper function declarations.

LayoutTests:

* fast/table/border-collapsing/dotted-collapsed-border-expected.txt: Added.
* fast/table/border-collapsing/dotted-collapsed-border.html: Added.
* platform/qt/fast/table/border-collapsing/dotted-collapsed-border-expected.png: Added.

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

6 years agoGmail reply email - Bold and Italic style get stuck
commit-queue@webkit.org [Wed, 31 Jul 2013 04:55:02 +0000 (04:55 +0000)]
Gmail reply email - Bold and Italic style  get stuck
https://bugs.webkit.org/show_bug.cgi?id=118185

Patch by Vani Hegde <vani.hegde@samsung.com> on 2013-07-30
Reviewed by Ryosuke Niwa.

Source/WebCore:

When bold/italic style is applied to a content with mixed editability,
style is applied appropriately for the first time.
But after this, style toggling does not work any more. Same behavior
can be observed when the content on which style is applied contains
text node without renderer (Ex: text node corresponding to tab/space etc)

When bold/italic style is applied on a selection, we actually apply the
style only for text nodes that have renderers and also are contenteditable.
Similarly during style toggling, to check whether a style has been already
applied on a selection

Tests: editing/style/toggle-style-bold-italic-mixed-editability.html
       editing/style/toggle-style-bold-italic.html

* editing/EditingStyle.cpp:
(WebCore::EditingStyle::triStateOfStyle):
A particular selection on which style is applied may contain text nodes
without renderers(text nodes corresponding to tab/space) or text nodes
that are not contenteditable. We do not apply style to such text nodes.
Hence, even during style toggling we should not consider the styles
present in such nodes.

LayoutTests:

Layout tests added to test bold/italic style toggling on a content
with mixed editability.

* editing/editing.js:
(runDumpAsTextEditingTest): Replaced markupResultList with
elementsForDumpingMarkupList to store all markup data to be logged
at the end of test.
(debugForDumpAsText): Changed to use elementsForDumpingMarkupList.
(startNewMarkupGroup): Added utility function to hold intermediate
data by separating <ol>.
* editing/style/toggle-style-bold-italic-expected.txt: Added.
* editing/style/toggle-style-bold-italic-mixed-editability-expected.txt: Added.
* editing/style/toggle-style-bold-italic-mixed-editability.html: Added.
* editing/style/toggle-style-bold-italic.html: Added.

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

6 years agoXMLSerializer should reset default namespace when necessary
rwlbuis@webkit.org [Wed, 31 Jul 2013 01:59:00 +0000 (01:59 +0000)]
XMLSerializer should reset default namespace when necessary
https://bugs.webkit.org/show_bug.cgi?id=16739
XMLSerializer's handling of namespaces seems to be pretty broken
https://bugs.webkit.org/show_bug.cgi?id=106531

Reviewed by Ryosuke Niwa.

Source/WebCore:

Write out empty default namespace declaration if the element is not in any namespace, as
described in http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-serialization-algorithm.

Tests: fast/dom/XMLSerializer-element-empty-namespace.html
       fast/dom/XMLSerializer-element-empty-namespace2.html

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::appendOpenTag):
* editing/MarkupAccumulator.h:

LayoutTests:

Add tests based on the testcases of both bugs.

* fast/dom/XMLSerializer-element-empty-namespace-expected.txt: Added.
* fast/dom/XMLSerializer-element-empty-namespace.html: Added.
* fast/dom/XMLSerializer-element-empty-namespace2-expected.txt: Added.
* fast/dom/XMLSerializer-element-empty-namespace2.html: Added.

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

6 years agoDon't post accessibility notification on object in detached document.
cfleizach@apple.com [Wed, 31 Jul 2013 01:50:16 +0000 (01:50 +0000)]
Don't post accessibility notification on object in detached document.
https://bugs.webkit.org/show_bug.cgi?id=119286

Reviewed by Ryosuke Niwa.

Merge https://chromium.googlesource.com/chromium/blink/+/ef9fc9e70202dcf33e5cf2f0f0a2135945ffe17e%5E%21/#F0

Don't post accessibility notification on object in detached document.

This can happen if an accessibility notification is queued on a node,
then that node is reparented to a different document that's not attached
anywhere before the accessibility notification is fired.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):

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

6 years agoRename <input type='color'> functions in WebPageProxy, WebColorPicker
commit-queue@webkit.org [Wed, 31 Jul 2013 00:58:27 +0000 (00:58 +0000)]
Rename <input type='color'> functions in WebPageProxy, WebColorPicker
<rdar://problem/14549771> and https://bugs.webkit.org/show_bug.cgi?id=119097

Patch by Ruth Fong <ruth_fong@apple.com> on 2013-07-30
Reviewed by Tim Horton.

In bug 119025, WebColorChooserProxy was renamed WebColorPicker. This patch makes the UIProcess consistent
by renaming UIProcess INPUT_TYPE_COLOR functions from ...colorChooser to ...colorPicker.

* UIProcess/WebColorPicker.cpp:
(WebKit::WebColorPicker::endPicker):
* UIProcess/WebColorPicker.h:
* UIProcess/WebColorPickerResultListenerProxy.cpp:
(WebKit::WebColorPickerResultListenerProxy::setColor):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showColorPicker):
(WebKit::WebPageProxy::setColorPickerColor):
(WebKit::WebPageProxy::endColorPicker):
(WebKit::WebPageProxy::didEndColorPicker):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/WebColorPickerQt.cpp:
(WebKit::WebColorPickerQt::createItem):
(WebKit::WebColorPickerQt::notifyColorSelected):
(WebKit::WebColorPickerQt::endPicker):
* UIProcess/qt/WebColorPickerQt.h:
* WebProcess/WebCoreSupport/WebColorChooser.cpp:
(WebKit::WebColorChooser::WebColorChooser):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didEndColorPicker):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoUnreviewed: Adding myself to the committers' list.
ruthiecftg@gmail.com [Wed, 31 Jul 2013 00:19:44 +0000 (00:19 +0000)]
Unreviewed: Adding myself to the committers' list.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years agoContent filter replacement data uses the encoding from the blocked page's response...
aestes@apple.com [Tue, 30 Jul 2013 23:13:40 +0000 (23:13 +0000)]
Content filter replacement data uses the encoding from the blocked page's response headers
https://bugs.webkit.org/show_bug.cgi?id=119237

Reviewed by Darin Adler.

When a document specifies an encoding in an HTTP response header, or
when the embedder specifies an override encoding, and the content filter
blocks the document, we interpret the content filter's replacement data
using this encoding. This might be the wrong.

Forget about encodings determined from these sources. The replacement
data will specify an encoding in a <meta charset>, so let that be used
instead.

No new tests. We don't currently have a mechanism for testing the
content filter from WebKit.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData): Pretend as if no encoding is
specified if the content filter blocked the load.
(WebCore::DocumentLoader::dataReceived): Stopped calling commitLoad()
before early-returning if the content filter needs more data. This isn't
necessary.

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

6 years ago REGRESSION: Crash when opening a message on Gmail
ap@apple.com [Tue, 30 Jul 2013 22:43:23 +0000 (22:43 +0000)]
    REGRESSION: Crash when opening a message on Gmail
        https://bugs.webkit.org/show_bug.cgi?id=119105

        Landing missing test results.

        * fast/js/dfg-get-by-id-unset-then-proto-expected.txt: Added.
        * fast/js/dfg-get-by-id-unset-then-proto-less-warmup-expected.txt: Added.
        * fast/js/dfg-get-by-id-unset-then-proto-more-warmup-expected.txt: Added.

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

6 years agoGetByVal on Arguments does the wrong size load when checking the Arguments object...
mhahnenberg@apple.com [Tue, 30 Jul 2013 22:41:54 +0000 (22:41 +0000)]
GetByVal on Arguments does the wrong size load when checking the Arguments object length
https://bugs.webkit.org/show_bug.cgi?id=119281

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This leads to out of bounds accesses and subsequent crashes.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

LayoutTests:

* fast/js/dfg-strict-mode-arguments-get-beyond-length-expected.txt: Added.
* fast/js/dfg-strict-mode-arguments-get-beyond-length.html: Added.
* fast/js/script-tests/dfg-strict-mode-arguments-get-beyond-length.js: Added.
(foo):
(bar):

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

6 years agoSpeculative fix for crash due to string access on multiple threads
andersca@apple.com [Tue, 30 Jul 2013 22:20:21 +0000 (22:20 +0000)]
Speculative fix for crash due to string access on multiple threads
https://bugs.webkit.org/show_bug.cgi?id=119279
<rdar://problem/14267833>

Reviewed by Darin Adler.

We can't use String::isolatedCopy for passing the local storage directory to the storage thread since
that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window
where the refcount can be accessed simultaneously from two threads.

Work around this by passing a PassRefPtr<StringImpl> to bind instead; the act of copying the PassRefPtr will
clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null.

* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:

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

6 years ago REGRESSION(r139282): Fix document leak when selection is created inside the...
ap@apple.com [Tue, 30 Jul 2013 22:17:20 +0000 (22:17 +0000)]
    REGRESSION(r139282): Fix document leak when selection is created inside the document
        https://bugs.webkit.org/show_bug.cgi?id=119122

        OK'd by Ryosuke Niwa.

        The added test was very flaky. Trying to make it better with a gc() call at the beginning.

        * editing/selection/leak-document-with-selection-inside.html:

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

6 years agoAdd an assertion to SpeculateCellOperand
oliver@apple.com [Tue, 30 Jul 2013 22:12:25 +0000 (22:12 +0000)]
Add an assertion to SpeculateCellOperand
https://bugs.webkit.org/show_bug.cgi?id=119276

Reviewed by Michael Saboff.

More assertions are better

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compile):

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

6 years ago [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events...
ap@apple.com [Tue, 30 Jul 2013 22:01:25 +0000 (22:01 +0000)]
    [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
        https://bugs.webkit.org/show_bug.cgi?id=113094

        The test still fails on WK1, and needs to be marked accordingly.

        * platform/mac-wk2/TestExpectations:
        * platform/mac/TestExpectations:

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

6 years agoAdd 'colno' attribute to ErrorEvent interface
ch.dumez@sisa.samsung.com [Tue, 30 Jul 2013 21:44:51 +0000 (21:44 +0000)]
Add 'colno' attribute to ErrorEvent interface
https://bugs.webkit.org/show_bug.cgi?id=119257

Reviewed by Darin Adler.

Source/WebCore:

Add 'colno' attribute to ErrorEvent interface to match the latest specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#errorevent

The 'colno' attribute is already supported by IE10 and Blink.

No new tests, covered by existing tests.

* dom/ErrorEvent.cpp:
(WebCore::ErrorEventInit::ErrorEventInit):
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
* dom/ErrorEvent.idl:

LayoutTests:

Update several test cases to check the new ErrorEvent.colno
attribute.

* fast/events/constructors/error-event-constructor-expected.txt:
* fast/events/constructors/error-event-constructor.html:
* fast/events/window-onerror9-expected.txt:
* fast/events/window-onerror9.html:
* fast/workers/worker-script-error-expected.txt:
* fast/workers/worker-script-error.html:
* http/tests/workers/worker-importScriptsOnError-expected.txt:

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

6 years agoInactive style sheets should not trigger style recalc when loaded.
akling@apple.com [Tue, 30 Jul 2013 21:32:54 +0000 (21:32 +0000)]
Inactive style sheets should not trigger style recalc when loaded.
<http://webkit.org/b/119236>
<rdar://problem/14588132>

Reviewed by Antti Koivisto.

Style sheets that are either alternate sheets or are excluded by their media query should not trigger
a full style recalc when they finish loading, since the end result will not be observably different.

The sheets are still inspectable through document.styleSheets.

Changed enums from Blocking/NonBlocking to ActiveSheet/InactiveSheet to clarify what's going on.

* html/HTMLLinkElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::startLoadingDynamicSheet):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):

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

6 years agoFix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
timothy_horton@apple.com [Tue, 30 Jul 2013 21:27:09 +0000 (21:27 +0000)]
Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
https://bugs.webkit.org/show_bug.cgi?id=119275

Reviewed by Simon Fraser.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::paintContentsForSnapshot):
* page/FrameView.h:
Fix typo.

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):
Fix typo.

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

6 years agoCompile fix for WebGL on 32-bit Windows.
achristensen@apple.com [Tue, 30 Jul 2013 21:19:23 +0000 (21:19 +0000)]
Compile fix for WebGL on 32-bit Windows.
https://bugs.webkit.org/show_bug.cgi?id=119235

Reviewed by Darin Adler.

* platform/graphics/GLContext.cpp:
Created GLNativeWindowType typedef.
(WebCore::GLContext::createContextForWindow):
* platform/graphics/GLContext.h:
Replaced uint64_t with GLNativeWindowType.

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

6 years agoUnreviewed, add my new email to contributors.json.
ch.dumez@sisa.samsung.com [Tue, 30 Jul 2013 20:33:18 +0000 (20:33 +0000)]
Unreviewed, add my new email to contributors.json.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years agoPlug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessag...
andersca@apple.com [Tue, 30 Jul 2013 19:45:09 +0000 (19:45 +0000)]
Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate
https://bugs.webkit.org/show_bug.cgi?id=119270
<rdar://problem/13368226>

Reviewed by Darin Adler.

Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while
they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this
since we don't know the plug-in or connection.

Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in
destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector).

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::Connection):
(CoreIPC::Connection::sendSyncMessage):
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::inSendSync):
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::destroy):

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

6 years agoNull deref under WebPage::scaledSnapshotWithOptions
timothy_horton@apple.com [Tue, 30 Jul 2013 19:42:31 +0000 (19:42 +0000)]
Null deref under WebPage::scaledSnapshotWithOptions
https://bugs.webkit.org/show_bug.cgi?id=119243
<rdar://problem/14502050>

Reviewed by Darin Adler.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):
WebFrame::coreFrame() can be null (if the Frame is already torn down),
so we should check it.

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

6 years agoNull deref under PluginView::handlesPageScaleFactor()
timothy_horton@apple.com [Tue, 30 Jul 2013 19:38:47 +0000 (19:38 +0000)]
Null deref under PluginView::handlesPageScaleFactor()
https://bugs.webkit.org/show_bug.cgi?id=119231
<rdar://problem/14440207>

Reviewed by Darin Adler.

Null-check the PluginView in the caller as well.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handlesPageScaleGesture):

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

6 years ago[WIN] Remove dependency on CoreFoundation from DownloadBundle
paroga@webkit.org [Tue, 30 Jul 2013 19:01:07 +0000 (19:01 +0000)]
[WIN] Remove dependency on CoreFoundation from DownloadBundle
https://bugs.webkit.org/show_bug.cgi?id=119247

Reviewed by Anders Carlsson.

* platform/network/cf/DownloadBundle.h:
* platform/network/curl/DownloadBundle.h:
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::magicNumber):
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):

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

6 years agoRemove unused Download*.cpp files
paroga@webkit.org [Tue, 30 Jul 2013 18:54:58 +0000 (18:54 +0000)]
Remove unused Download*.cpp files
https://bugs.webkit.org/show_bug.cgi?id=119248

Reviewed by Anders Carlsson.

* Shared/Downloads/cfnet/DownloadCFNet.cpp: Removed.
* Shared/Downloads/curl/DownloadCurl.cpp: Removed.

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

6 years agoMove WindowsExtras.h from WebCore to WTF
paroga@webkit.org [Tue, 30 Jul 2013 18:54:18 +0000 (18:54 +0000)]
Move WindowsExtras.h from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=118125

Reviewed by Anders Carlsson.

Move it to WTF to be able to use the functions in WTF too.

Source/WebCore:

* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformWheelEvent.h:
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
* platform/win/MIMETypeRegistryWin.cpp:
* platform/win/PasteboardWin.cpp:
* platform/win/PopupMenuWin.cpp:
* platform/win/RunLoopWin.cpp:
* platform/win/SharedTimerWin.cpp:
* platform/win/WindowMessageListener.h:
* plugins/win/PluginDatabaseWin.cpp:

Source/WTF:

* wtf/WindowsExtras.h: Renamed from Source/WebCore/platform/win/WindowsExtras.h.
(WTF::getRegistryValue):
(WTF::getWindowPointer):
(WTF::setWindowPointer):
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):

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

6 years agoPage for WKPageLoaderClient processDidCrash callback always reports a process identif...
jeffm@apple.com [Tue, 30 Jul 2013 18:28:35 +0000 (18:28 +0000)]
Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0
https://bugs.webkit.org/show_bug.cgi?id=119269
<rdar://problem/14582393>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processIdentifier):
Return 0 if the page is closed instead of requiring isValid().

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

6 years ago[WK2] Move the implementation of WebEditorClient::checkTextOfParagraph to WebEditorCl...
kseo@webkit.org [Tue, 30 Jul 2013 17:40:09 +0000 (17:40 +0000)]
[WK2] Move the implementation of WebEditorClient::checkTextOfParagraph to WebEditorClient.cpp
https://bugs.webkit.org/show_bug.cgi?id=119034

Reviewed by Anders Carlsson.

The Mac and EFL ports use the same implementation of
WebEditorClient::checkTextOfParagraph and GTK will use the same
implementation too. So rather than duplicating the same code in
platform specific files, move the implementation to platform agnostic
WebProcess/WebCoreSupport/WebEditorClient.cpp.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::checkTextOfParagraph):
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:

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

6 years agoPass column as 4th argument to WorkerGlobalScope.onerror and Window.onerror handlers
ch.dumez@sisa.samsung.com [Tue, 30 Jul 2013 17:38:57 +0000 (17:38 +0000)]
Pass column as 4th argument to WorkerGlobalScope.onerror and Window.onerror handlers
https://bugs.webkit.org/show_bug.cgi?id=119251

Reviewed by Geoffrey Garen.

Source/WebCore:

As per the latest specification, the WorkerGlobalScope.onerror and Window.onerror event
handlers should be given the column as fourth argument:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#onerroreventhandler

The column argument is already supported by IE10 and Blink.

No new tests, covered by existing tests.

* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
(WebCore::ErrorEvent::create):
(WebCore::ErrorEvent::colno):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::sanitizeScriptError):
(WebCore::ScriptExecutionContext::reportException):
(WebCore::ScriptExecutionContext::dispatchErrorEvent):
* dom/ScriptExecutionContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):

LayoutTests:

Update several tests to make use of the new column argument passed to
WorkerGlobalScope.onerror and Window.onerror handlers.

* fast/events/window-onerror1-expected.txt:
* fast/events/window-onerror1.html:
* fast/events/window-onerror11-expected.txt:
* fast/events/window-onerror11.html:
* fast/events/window-onerror12-expected.txt:
* fast/events/window-onerror12.html:
* fast/events/window-onerror13.html:
* fast/events/window-onerror14.html:
* fast/events/window-onerror16.html:
* fast/events/window-onerror2-expected.txt:
* fast/events/window-onerror2.html:
* fast/events/window-onerror4-expected.txt:
* fast/events/window-onerror4.html:
* fast/events/window-onerror5-expected.txt:
* fast/events/window-onerror5.html:
* fast/events/window-onerror6-expected.txt:
* fast/events/window-onerror6.html:
* fast/events/window-onerror7-expected.txt:
* fast/events/window-onerror7.html:
* fast/events/window-onerror8-expected.txt:
* fast/events/window-onerror8.html:
* fast/events/window-onerror9-expected.txt:
* fast/events/window-onerror9.html:
* fast/workers/resources/worker-script-error-handled.js:
(onerror):
* fast/workers/worker-script-error-expected.txt:

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

6 years ago[WebKit2] [Gtk] WebKitResponsePolicyDecision URI response property incorrect
commit-queue@webkit.org [Tue, 30 Jul 2013 17:30:56 +0000 (17:30 +0000)]
[WebKit2] [Gtk] WebKitResponsePolicyDecision URI response property incorrect
https://bugs.webkit.org/show_bug.cgi?id=119258

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-30
Reviewed by Martin Robinson.

Corrected the installed URI response property from PROP_REQUEST to
PROP_RESPONSE and type from WEBKIT_TYPE_URI_REQUEST to
WEBKIT_TYPE_URI_RESPONSE.

* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
(webkit_response_policy_decision_class_init):

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

6 years agoUse OwnPtr in RenderThemeWin and ScrollbarThemeWin
paroga@webkit.org [Tue, 30 Jul 2013 17:27:22 +0000 (17:27 +0000)]
Use OwnPtr in RenderThemeWin and ScrollbarThemeWin
https://bugs.webkit.org/show_bug.cgi?id=117978

Reviewed by Brent Fulgham.

Use OwnPtr to avoid manual deletion of objects.

* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece):
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl):

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

6 years agoFix problems with divot and lineStart mismatches.
mark.lam@apple.com [Tue, 30 Jul 2013 17:01:40 +0000 (17:01 +0000)]
Fix problems with divot and lineStart mismatches.
https://bugs.webkit.org/show_bug.cgi?id=118662.

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

r152494 added the recording of lineStart values for divot positions.
This is needed for the computation of column numbers. Similarly, it also
added the recording of line numbers for the divot positions. One problem
with the approach taken was that the line and lineStart values were
recorded independently, and hence were not always guaranteed to be
sampled at the same place that the divot position is recorded. This
resulted in potential mismatches that cause some assertions to fail.

The solution is to introduce a JSTextPosition abstraction that records
the divot position, line, and lineStart as a single quantity. Wherever
we record the divot position as an unsigned int previously, we now record
its JSTextPosition which captures all 3 values in one go. This ensures
that the captured line and lineStart will always match the captured divot
position.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitDebugHook):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitExpressionInfo):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* bytecompiler/NodesCodegen.cpp:
(JSC::ThrowableExpressionData::emitThrowReferenceError):
(JSC::ResolveNode::emitBytecode):
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::NewExprNode::emitBytecode):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::PostfixNode::emitResolve):
(JSC::PostfixNode::emitBracket):
(JSC::PostfixNode::emitDot):
(JSC::DeleteResolveNode::emitBytecode):
(JSC::DeleteBracketNode::emitBytecode):
(JSC::DeleteDotNode::emitBytecode):
(JSC::PrefixNode::emitResolve):
(JSC::PrefixNode::emitBracket):
(JSC::PrefixNode::emitDot):
(JSC::UnaryOpNode::emitBytecode):
(JSC::BinaryOpNode::emitStrcat):
(JSC::BinaryOpNode::emitBytecode):
(JSC::ThrowableBinaryOpNode::emitBytecode):
(JSC::InstanceOfNode::emitBytecode):
(JSC::emitReadModifyAssignment):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::AssignDotNode::emitBytecode):
(JSC::ReadModifyDotNode::emitBytecode):
(JSC::AssignBracketNode::emitBytecode):
(JSC::ReadModifyBracketNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::ThrowNode::emitBytecode):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/ASTBuilder.h:
- Replaced ASTBuilder::PositionInfo with JSTextPosition.
(JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
(JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::createBracketAccess):
(JSC::ASTBuilder::createDotAccess):
(JSC::ASTBuilder::createRegExp):
(JSC::ASTBuilder::createNewExpr):
(JSC::ASTBuilder::createAssignResolve):
(JSC::ASTBuilder::createExprStatement):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createReturnStatement):
(JSC::ASTBuilder::createBreakStatement):
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createLabelStatement):
(JSC::ASTBuilder::createWithStatement):
(JSC::ASTBuilder::createThrowStatement):
(JSC::ASTBuilder::appendBinaryExpressionInfo):
(JSC::ASTBuilder::appendUnaryToken):
(JSC::ASTBuilder::unaryTokenStackLastStart):
(JSC::ASTBuilder::assignmentStackAppend):
(JSC::ASTBuilder::createAssignment):
(JSC::ASTBuilder::setExceptionLocation):
(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeFunctionCallNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::makeAssignNode):
(JSC::ASTBuilder::makePrefixNode):
(JSC::ASTBuilder::makePostfixNode):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/Lexer.cpp:
(JSC::::lex):
- Added support for capturing the appropriate JSTextPositions instead
  of just the character offset.
* parser/Lexer.h:
(JSC::Lexer::currentPosition):
(JSC::::lexExpectIdentifier):
- Added support for capturing the appropriate JSTextPositions instead
  of just the character offset.
* parser/NodeConstructors.h:
(JSC::Node::Node):
(JSC::ResolveNode::ResolveNode):
(JSC::EvalFunctionCallNode::EvalFunctionCallNode):
(JSC::FunctionCallValueNode::FunctionCallValueNode):
(JSC::FunctionCallResolveNode::FunctionCallResolveNode):
(JSC::FunctionCallBracketNode::FunctionCallBracketNode):
(JSC::FunctionCallDotNode::FunctionCallDotNode):
(JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
(JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
(JSC::PostfixNode::PostfixNode):
(JSC::DeleteResolveNode::DeleteResolveNode):
(JSC::DeleteBracketNode::DeleteBracketNode):
(JSC::DeleteDotNode::DeleteDotNode):
(JSC::PrefixNode::PrefixNode):
(JSC::ReadModifyResolveNode::ReadModifyResolveNode):
(JSC::ReadModifyBracketNode::ReadModifyBracketNode):
(JSC::AssignBracketNode::AssignBracketNode):
(JSC::AssignDotNode::AssignDotNode):
(JSC::ReadModifyDotNode::ReadModifyDotNode):
(JSC::AssignErrorNode::AssignErrorNode):
(JSC::WithNode::WithNode):
(JSC::ForInNode::ForInNode):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/Nodes.cpp:
(JSC::StatementNode::setLoc):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/Nodes.h:
(JSC::Node::lineNo):
(JSC::Node::startOffset):
(JSC::Node::lineStartOffset):
(JSC::Node::position):
(JSC::ThrowableExpressionData::ThrowableExpressionData):
(JSC::ThrowableExpressionData::setExceptionSourceCode):
(JSC::ThrowableExpressionData::divot):
(JSC::ThrowableExpressionData::divotStart):
(JSC::ThrowableExpressionData::divotEnd):
(JSC::ThrowableSubExpressionData::ThrowableSubExpressionData):
(JSC::ThrowableSubExpressionData::setSubexpressionInfo):
(JSC::ThrowableSubExpressionData::subexpressionDivot):
(JSC::ThrowableSubExpressionData::subexpressionStart):
(JSC::ThrowableSubExpressionData::subexpressionEnd):
(JSC::ThrowablePrefixedSubExpressionData::ThrowablePrefixedSubExpressionData):
(JSC::ThrowablePrefixedSubExpressionData::setSubexpressionInfo):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionDivot):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionStart):
(JSC::ThrowablePrefixedSubExpressionData::subexpressionEnd):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/Parser.cpp:
(JSC::::Parser):
(JSC::::parseInner):
- Use JSTextPosition instead of passing line and lineStart explicitly.
(JSC::::didFinishParsing):
- Remove setting of m_lastLine value. We always pass in the value from
  m_lastLine anyway. So, this assignment is effectively a nop.
(JSC::::parseVarDeclaration):
(JSC::::parseVarDeclarationList):
(JSC::::parseForStatement):
(JSC::::parseBreakStatement):
(JSC::::parseContinueStatement):
(JSC::::parseReturnStatement):
(JSC::::parseThrowStatement):
(JSC::::parseWithStatement):
(JSC::::parseTryStatement):
(JSC::::parseBlockStatement):
(JSC::::parseFunctionDeclaration):
(JSC::LabelInfo::LabelInfo):
(JSC::::parseExpressionOrLabelStatement):
(JSC::::parseExpressionStatement):
(JSC::::parseAssignmentExpression):
(JSC::::parseBinaryExpression):
(JSC::::parseProperty):
(JSC::::parsePrimaryExpression):
(JSC::::parseMemberExpression):
(JSC::::parseUnaryExpression):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/Parser.h:
(JSC::Parser::next):
(JSC::Parser::nextExpectIdentifier):
(JSC::Parser::getToken):
(JSC::Parser::tokenStartPosition):
(JSC::Parser::tokenEndPosition):
(JSC::Parser::lastTokenEndPosition):
(JSC::::parse):
- Use JSTextPosition instead of passing line and lineStart explicitly.
* parser/ParserTokens.h:
(JSC::JSTextPosition::JSTextPosition):
(JSC::JSTextPosition::operator+):
(JSC::JSTextPosition::operator-):
(JSC::JSTextPosition::operator int):
- Added JSTextPosition.
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::makeFunctionCallNode):
(JSC::SyntaxChecker::makeAssignNode):
(JSC::SyntaxChecker::makePrefixNode):
(JSC::SyntaxChecker::makePostfixNode):
(JSC::SyntaxChecker::makeDeleteNode):
(JSC::SyntaxChecker::createResolve):
(JSC::SyntaxChecker::createBracketAccess):
(JSC::SyntaxChecker::createDotAccess):
(JSC::SyntaxChecker::createRegExp):
(JSC::SyntaxChecker::createNewExpr):
(JSC::SyntaxChecker::createAssignResolve):
(JSC::SyntaxChecker::createForInLoop):
(JSC::SyntaxChecker::createReturnStatement):
(JSC::SyntaxChecker::createBreakStatement):
(JSC::SyntaxChecker::createContinueStatement):
(JSC::SyntaxChecker::createWithStatement):
(JSC::SyntaxChecker::createLabelStatement):
(JSC::SyntaxChecker::createThrowStatement):
(JSC::SyntaxChecker::appendBinaryExpressionInfo):
(JSC::SyntaxChecker::operatorStackPop):
- Use JSTextPosition instead of passing line and lineStart explicitly.

LayoutTests:

Added regression test cases from https://bugs.webkit.org/show_bug.cgi?id=118662
and https://bugs.webkit.org/show_bug.cgi?id=118664.

* fast/js/line-column-numbers-expected.txt:
* fast/js/line-column-numbers.html:
* fast/js/script-tests/line-column-numbers.js:
(try.toFuzz1):
(try.toFuzz2):

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

6 years agoAdded include directories to Visual Studio for WebGL.
achristensen@apple.com [Tue, 30 Jul 2013 16:33:08 +0000 (16:33 +0000)]
Added include directories to Visual Studio for WebGL.
https://bugs.webkit.org/show_bug.cgi?id=119161

Reviewed by Brent Fulgham.

* WebCore.vcxproj/WebCoreCommon.props: Added more include directories.

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

6 years agoUnreviewed, rolling out r151957 and r152531.
ossy@webkit.org [Tue, 30 Jul 2013 16:32:13 +0000 (16:32 +0000)]
Unreviewed, rolling out r151957 and r152531.
http://trac.webkit.org/changeset/151957
http://trac.webkit.org/changeset/152531
https://bugs.webkit.org/show_bug.cgi?id=119267

They revealed a bug on Mac I can't fix (Requested by Ossy on
#webkit).

Patch by Commit Queue <commit-queue@webkit.org> on 2013-07-30

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameIsCompleteAtIndex):
(WebCore::BitmapImage::frameDurationAtIndex):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::frameIsCompleteAtIndex):
* platform/graphics/ImageSource.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::gifComplete):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::initFrameBuffer):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::frameContext):

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

6 years ago[GTK] Unreviewed gardening. Updated TestExpectations
simon.pena@samsung.com [Tue, 30 Jul 2013 16:26:39 +0000 (16:26 +0000)]
[GTK] Unreviewed gardening. Updated TestExpectations

* platform/gtk/TestExpectations: Mark transitions/created-while-suspended.html
as slow after r153396.

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

6 years agoMissing the rename REGISTER_PROCOTOL_HANDLER Macro to NAVIGATOR_CONTENT_UTILS in...
commit-queue@webkit.org [Tue, 30 Jul 2013 16:18:11 +0000 (16:18 +0000)]
Missing the rename REGISTER_PROCOTOL_HANDLER Macro to NAVIGATOR_CONTENT_UTILS in WebKitLibraries.
https://bugs.webkit.org/show_bug.cgi?id=119239

According to "https://bugs.webkit.org/show_bug.cgi?id=94920", REGISTER_PROCOTOL_HANDLER macro was changed to NAVIGATOR_CONTENT_UTILS.
But, FeatureDefines.props and FeatureDefinesCairo.props was not changed.

Patch by Sanghyun Park <sh919.park@samsung.com> on 2013-07-30
Reviewed by Brent Fulgham.

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

6 years ago[GTK] Unreviewed gardening. Update TestExpectations
simon.pena@samsung.com [Tue, 30 Jul 2013 14:12:25 +0000 (14:12 +0000)]
[GTK] Unreviewed gardening. Update TestExpectations

Some GTK tests are flaky or time out after the FTL merge.

* platform/gtk/TestExpectations:

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

6 years agoWeb Inspector: doesn't use localized user interface at remote inspector
commit-queue@webkit.org [Tue, 30 Jul 2013 13:52:19 +0000 (13:52 +0000)]
Web Inspector: doesn't use localized user interface at remote inspector
https://bugs.webkit.org/show_bug.cgi?id=119252

Patch by Roland Takács <rtakacs@inf.u-szeged.hu> on 2013-07-30
Reviewed by Timothy Hatcher.

Added a flag in order to not use localizedStrings in remote inspector.

* UserInterface/InspectorFrontendHostStub.js:
* UserInterface/LoadLocalizedStrings.js:
* UserInterface/Main.js:
(WebInspector.UIString):

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

6 years ago[EFL] REGRESSION after r153439: layout tests do not run.
ch.dumez@sisa.samsung.com [Tue, 30 Jul 2013 13:51:25 +0000 (13:51 +0000)]
[EFL] REGRESSION after r153439: layout tests do not run.
https://bugs.webkit.org/show_bug.cgi?id=119240

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-07-30
Reviewed by Christophe Dumez.

Changed attribute name from check_xvfb to check_driver.

* Scripts/webkitpy/port/efl.py:
(EflPort.check_sys_deps):

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

6 years agoRemove using namespace std from SpatialNavigation
kseo@webkit.org [Tue, 30 Jul 2013 13:49:06 +0000 (13:49 +0000)]
Remove using namespace std from SpatialNavigation
https://bugs.webkit.org/show_bug.cgi?id=119242

Reviewed by Antonio Gomes.

"using namespace" statements in headers are dangerous and should be
avoided. check-webkit-style has been changed to flag them as an error
since r152719. Use explicit std:: qualifiers instead.

No behavior change, no new tests needed.

* page/SpatialNavigation.cpp:
(WebCore::scrollInDirection):
* page/SpatialNavigation.h:
(WebCore::maxDistance):

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

6 years ago[GTK] fast/regions/firstletter-inside-flowthread.html is flaky
commit-queue@webkit.org [Tue, 30 Jul 2013 13:38:20 +0000 (13:38 +0000)]
[GTK] fast/regions/firstletter-inside-flowthread.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=106592

Unreviewed gardening.

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-07-30

* platform/gtk/TestExpectations: Unflag test as it is passing without
problems now.

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

6 years ago[Qt] Workaround to make syncqt run and generate forwarding headers in SVN repositorie...
kadam@inf.u-szeged.hu [Tue, 30 Jul 2013 13:34:05 +0000 (13:34 +0000)]
[Qt] Workaround to make syncqt run and generate forwarding headers in SVN repositories too.
https://bugs.webkit.org/show_bug.cgi?id=118725.

Reviewed by Tor Arne Vestbø.

* .qmake.conf:

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

6 years agoUnreviewed. Update NEWS and Versions.m4 for 2.1.4 release.
carlosgc@webkit.org [Tue, 30 Jul 2013 13:14:51 +0000 (13:14 +0000)]
Unreviewed. Update NEWS and Versions.m4 for 2.1.4 release.

.:

* Source/autotools/Versions.m4: Bump version numbers.

Source/WebKit/gtk:

* NEWS: Added release notes for 2.1.4.

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

6 years ago[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
graouts@apple.com [Tue, 30 Jul 2013 12:12:59 +0000 (12:12 +0000)]
[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
https://bugs.webkit.org/show_bug.cgi?id=113094

The test can-read-in-copy-and-cut-events.html now passes on mac-wk2.

* platform/mac/TestExpectations:

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

6 years ago[Qt][Win] Extend disabling of whole-program-optimizations to MSVC 2012
hausmann@webkit.org [Tue, 30 Jul 2013 12:01:00 +0000 (12:01 +0000)]
[Qt][Win] Extend disabling of whole-program-optimizations to MSVC 2012
https://bugs.webkit.org/show_bug.cgi?id=119238

Reviewed by Jocelyn Turcotte.

As suggested in https://bugreports.qt-project.org/browse/QTBUG-20556,
the WebKit build with MSVC 2012 is affected by the same size
limitations.

* WebCore.pri:

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

6 years agoMark compositing/patterns tests as passing for mac-wk2
graouts@apple.com [Tue, 30 Jul 2013 11:42:00 +0000 (11:42 +0000)]
Mark compositing/patterns tests as passing for mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=119246

These tests run fine on WK2.

* platform/mac-wk2/TestExpectations:

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

6 years agoREGRESSION: iframes with composited contents are not transparent in WK1
graouts@apple.com [Tue, 30 Jul 2013 11:23:30 +0000 (11:23 +0000)]
REGRESSION: iframes with composited contents are not transparent in WK1
https://bugs.webkit.org/show_bug.cgi?id=76478

Unskip these tests since the root cause has been fixed long ago already.

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

6 years agoREGRESION(r151091) ASSERTION FAILED: m_readableData || m_writableData
allan.jensen@digia.com [Tue, 30 Jul 2013 11:14:26 +0000 (11:14 +0000)]
REGRESION(r151091) ASSERTION FAILED: m_readableData || m_writableData
https://bugs.webkit.org/show_bug.cgi?id=119142

Reviewed by Jocelyn Turcotte.

Remove invalid assert.

Covered by existing tests.

* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::readData):

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

6 years agoUnreviewed. Fix make distcheck.
carlosgc@webkit.org [Tue, 30 Jul 2013 06:42:00 +0000 (06:42 +0000)]
Unreviewed. Fix make distcheck.

Source/JavaScriptCore:

* GNUmakefile.list.am: Add missing files to compilation.
* bytecode/CodeBlock.cpp: Add a ENABLE(FTL_JIT) #if block to
include FTL header files not included in the compilation.
* dfg/DFGDriver.cpp: Ditto.
* dfg/DFGPlan.cpp: Ditto.

Source/ThirdParty/ANGLE:

* GNUmakefile.am: Add missing header files to compilation.

Source/WebCore:

* GNUmakefile.list.am: Add missing header file to compilation.

Source/WebKit2:

* GNUmakefile.list.am: Add missing header file to compilation.

Source/WTF:

* GNUmakefile.list.am: Add missing files to compilation.

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

6 years ago[wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowC...
timothy_horton@apple.com [Tue, 30 Jul 2013 04:45:06 +0000 (04:45 +0000)]
[wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync
https://bugs.webkit.org/show_bug.cgi?id=119225
<rdar://problem/14568841>

Reviewed by Simon Fraser.

Tell CoreAnimation to flush the implicit transaction before replying
when using endDeferringViewInWindowChangesSync, as that method's contract
is that the WebProcess is totally ready to be in-window when it returns.

* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChanges]):
Adopt viewInWindowStateDidChange.

(-[WKView endDeferringViewInWindowChangesSync]):
Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewInWindowStateDidChange):
(WebKit::WebPageProxy::viewStateDidChange):
Pull viewInWindowStateDidChange out of viewStateDidChange.
Request a reply from SetIsInWindow if we're told to.

* UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didUpdateInWindowStateTimerFired):
Don't build this version on Mac, we'll have a WebPageMac version.

(WebKit::WebPage::setIsInWindow):
Only start the timer to send the didUpdateInWindowState reply if we're asked to.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Add an argument to the SetIsInWindow message for whether the WebProcess
should inform the UIProcess when SetIsInWindow completes or not.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateInWindowStateTimerFired):
Tell CA to flush the implicit transaction before telling the UIProcess that
we're finished moving in-window.

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

6 years agoEager stack trace for error objects.
commit-queue@webkit.org [Tue, 30 Jul 2013 04:33:35 +0000 (04:33 +0000)]
Eager stack trace for error objects.
https://bugs.webkit.org/show_bug.cgi?id=118918

Source/JavaScriptCore:

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-29
Reviewed by Geoffrey Garen.

Chrome and Firefox give error objects the stack property and we wanted to match
that functionality. This allows developers to see the stack without throwing an object.

* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::finishCreation):
 For error objects that are not thrown as an exception, we pass the stackTrace in
 as a parameter. This allows the error object to have the stack property.

* interpreter/Interpreter.cpp:
(JSC::stackTraceAsString):
Helper function used to eliminate duplicate code.

(JSC::Interpreter::addStackTraceIfNecessary):
When an error object is created by the user the vm->exceptionStack is not set.
If the user throws this error object later the stack that is in the error object
may not be the correct stack for the throw, so when we set the vm->exception stack,
the stack property on the error object is set as well.

* runtime/ErrorConstructor.cpp:
(JSC::constructWithErrorConstructor):
(JSC::callErrorConstructor):
* runtime/NativeErrorConstructor.cpp:
(JSC::constructWithNativeErrorConstructor):
(JSC::callNativeErrorConstructor):
These functions indicate that the user created an error object. For all error objects
that the user explicitly creates, the topCallFrame is at a new frame created to
handle the user's call. In this case though, the error object needs the caller's
frame to create the stack trace correctly.

* interpreter/Interpreter.h:
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::create):

LayoutTests:

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-07-29
Reviewed by Geoffrey Garen.

Added tests to ensure that the stack property was present at creation for all
error Objects. This test will fail without this patch.

* fast/js/script-tests/stack-at-creation-for-error-objects.js: Added.
(checkStack):
* fast/js/stack-at-creation-for-error-objects-expected.txt: Added.
* fast/js/stack-at-creation-for-error-objects.html: Added.

* inspector/console/console-format-expected.txt:
* inspector/console/console-format.html:
This test was modified by removing the error object from being evaluated. Prior to this patch
error objects did not have the stack property, so the stack information was not being
displayed. The stack trace includes a file path specific to the machine that is running
the test. The results would have differed from one computer to the next. There
is not an easy way to capture the error object to treat it differently. By removing
the error object there is no need to add extra code to treat it differently.
Also there are other tests inside inspector/console that test the  stack trace,
so the testing suite does not lose error testing by removing it.

The .stack property was added to the error objects at creation time.
* fast/js/exception-properties-expected.txt:
* fast/js/script-tests/exception-properties.js:

The column numbers are modified in the following test. When error objects are explicitly
invoked, the column number points to the beginning "(" instead of end ")".
Functionality between browsers do not match either. Firefox does not output column
numbers. Chrome points columns numbers to the beginning of the "new" call.

* fast/js/line-column-numbers-expected.txt:
* fast/js/stack-trace-expected.txt:

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

6 years ago[Gtk] Improve string use in PasteboardGtk
kseo@webkit.org [Tue, 30 Jul 2013 04:14:22 +0000 (04:14 +0000)]
[Gtk] Improve string use in PasteboardGtk
https://bugs.webkit.org/show_bug.cgi?id=119204

Reviewed by Martin Robinson.

Use emptyString() instead of "" and use ASCIILiteral where appropriate.

No behavior change, no new tests needed.

* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::documentFragment):
Use emptyString() instead of "".
(WebCore::Pasteboard::types):
Use ASCIILiteral where appropriate.

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

6 years ago<rdar://problem/14528244> Tons of FastMalloc leaks reported by leaks of objects that...
mrowe@apple.com [Tue, 30 Jul 2013 03:33:57 +0000 (03:33 +0000)]
<rdar://problem/14528244> Tons of FastMalloc leaks reported by leaks of objects that have already been deallocated

Reviewed by Sam Weinig.

* wtf/FastMalloc.cpp:
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Mark objects in the transfer cache as being free.

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

6 years agoSome cleanup in PropertySlot
barraclough@apple.com [Tue, 30 Jul 2013 01:15:18 +0000 (01:15 +0000)]
Some cleanup in PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119189

Reviewed by Geoff Garen.

PropertySlot represents a property in one of four states - value, getter, custom, or custom-index.
The state is currently tracked redundantly by two mechanisms - the custom getter function (m_getValue)
is set to a special value to indicate the type (other than custom), and the type is also tracked by
an enum - but only if cacheable. Cacheability can typically be determined by the value of m_offset
(this is invalidOffset if not cacheable).

    * Internally, always track the type of the property using an enum value, PropertyType.
    * Use m_offset to indicate cacheable.
    * Keep the external interface (CachedPropertyType) unchanged.
    * Better pack data into the m_data union.

Performance neutral.

* dfg/DFGRepatch.cpp:
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):
    - cachedPropertyType() -> isCacheable*()
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
    - cachedPropertyType() -> isCacheable*()
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
    - cachedPropertyType() -> isCacheable*()
* jit/JITStubs.cpp:
(JSC::tryCacheGetByID):
    - cachedPropertyType() -> isCacheable*()
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
    - cachedPropertyType() -> isCacheable*()
* runtime/PropertySlot.cpp:
(JSC::PropertySlot::functionGetter):
    - refactoring described above.
* runtime/PropertySlot.h:
(JSC::PropertySlot::PropertySlot):
(JSC::PropertySlot::getValue):
(JSC::PropertySlot::isCacheable):
(JSC::PropertySlot::isCacheableValue):
(JSC::PropertySlot::isCacheableGetter):
(JSC::PropertySlot::isCacheableCustom):
(JSC::PropertySlot::cachedOffset):
(JSC::PropertySlot::customGetter):
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::setCustomIndex):
(JSC::PropertySlot::setGetterSlot):
(JSC::PropertySlot::setCacheableGetterSlot):
(JSC::PropertySlot::setUndefined):
(JSC::PropertySlot::slotBase):
(JSC::PropertySlot::setBase):
    - refactoring described above.

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

6 years agoPage count can be incorrect if there is a pending style recalc
simon.fraser@apple.com [Tue, 30 Jul 2013 01:06:27 +0000 (01:06 +0000)]
Page count can be incorrect if there is a pending style recalc
https://bugs.webkit.org/show_bug.cgi?id=119232

Reviewed by Beth Dakin.

If style is changed in a way that schedules a style recalc on the Document,
and then Page::pageCount() is called, we may give the wrong answer because
the existing code only checked FrameView::needsLayout(), not whether a style
recale was pending.

Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
as we do for other properties that require layer, and are exposed to JS
or via API.

* page/Page.cpp:
(WebCore::Page::pageCount):

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

6 years agoMoved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
achristensen@apple.com [Tue, 30 Jul 2013 00:25:33 +0000 (00:25 +0000)]
Moved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119223

Reviewed by Kenneth Rohde Christiansen.

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Changed location of GLContext.cpp and GLContext.h.
* platform/graphics/GLContext.cpp: Copied from WebCore/platform/graphics/cairo/GLContext.cpp.
* platform/graphics/GLContext.h: Copied from WebCore/platform/graphics/cairo/GLContext.h.
* platform/graphics/cairo/GLContext.cpp: Removed.
* platform/graphics/cairo/GLContext.h: Removed.

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

6 years agoNull deref under PluginView::handlesPageScaleFactor()
timothy_horton@apple.com [Tue, 30 Jul 2013 00:20:03 +0000 (00:20 +0000)]
Null deref under PluginView::handlesPageScaleFactor()
https://bugs.webkit.org/show_bug.cgi?id=119231
<rdar://problem/14440207>

Reviewed by Simon Fraser.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handlesPageScaleFactor):
* WebProcess/Plugins/PluginView.h:
Null-check m_plugin and check m_isInitialized.
Make pageScaleFactor() and handlesPageScaleFactor const.

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

6 years agoTextTrackRepresentation captions often disappear then appear again.
jer.noble@apple.com [Tue, 30 Jul 2013 00:15:43 +0000 (00:15 +0000)]
TextTrackRepresentation captions often disappear then appear again.
https://bugs.webkit.org/show_bug.cgi?id=119228

Reviewed by Simon Fraser.

Calling updateTextTrackDisplay() will cause the entire DOM subtree containing the active cues
to be torn down and rebuilt. Only call into this method when text tracks have actually changed.

Add an enum parameter to configureTextTrackDisplay() which allows the caller to specify that
method should assume that the list of visible text tracks has changed, forcing a call to
updateTextTrackDisplay().

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove the unnecessary call to updateTextTrackDisplay().
(WebCore::HTMLMediaElement::textTrackModeChanged): Pass AssumeVisibleTextTracksChanged to configureTextTrackDisplay().
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Check the passed flags and exit early only if
    AssumeVisibleTextTracksChanged is not set.
* html/HTMLMediaElement.h:

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

6 years agoFix crash due to unexpected Node deletion during MutationObserver registration book...
rniwa@webkit.org [Tue, 30 Jul 2013 00:12:02 +0000 (00:12 +0000)]
Fix crash due to unexpected Node deletion during MutationObserver registration book-keeping
https://bugs.webkit.org/show_bug.cgi?id=119124

Reviewed by Sam Weinig.

Merge https://chromium.googlesource.com/chromium/blink/+/b6afb927695b3acf2c75c25f05e99682660993e2

No new tests since I could not reproduce the crash with the test attached in the Blink change.

The bug was caused by Node::unregisterMutationObserver removing the MutationObserverRegistration
that holds the last ref to the node. Avoid that by explicitly allocating a local RefPtr to the node
in MutationObserverRegistration::unregister. Also rename it to unregisterAndDelete to clarify
the semantics and make it a static member function to be even safer.

* dom/MutationObserver.cpp:
(WebCore::MutationObserver::disconnect):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::unregisterAndDelete):
* dom/MutationObserverRegistration.h:

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

6 years agoUnreviewed, rolling out r152860.
commit-queue@webkit.org [Mon, 29 Jul 2013 23:00:54 +0000 (23:00 +0000)]
Unreviewed, rolling out r152860.
http://trac.webkit.org/changeset/152860
https://bugs.webkit.org/show_bug.cgi?id=119227

Disable WinEWS tests until tests stop crashing (Requested by
rfong on #webkit).

* Scripts/webkitpy/common/config/ews.json:

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

6 years agoMoved GLTransportSurface.h and .cpp out of efl-specific directory.
achristensen@apple.com [Mon, 29 Jul 2013 22:40:12 +0000 (22:40 +0000)]
Moved GLTransportSurface.h and .cpp out of efl-specific directory.
https://bugs.webkit.org/show_bug.cgi?id=119163

Reviewed by Alexis Menard.

* PlatformEfl.cmake: Changed directory of GLTransportSurface.cpp.
* platform/graphics/surfaces/GLTransportSurface.cpp: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.cpp.
* platform/graphics/surfaces/GLTransportSurface.h: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.h.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp: Removed.
* platform/graphics/surfaces/efl/GLTransportSurface.h: Removed.

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

6 years agoSpeculative implementation of missing GraphicsContext3D methods on Windows.
achristensen@apple.com [Mon, 29 Jul 2013 21:25:33 +0000 (21:25 +0000)]
Speculative implementation of missing GraphicsContext3D methods on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119167

Reviewed by Dean Jackson.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/graphics/win/GraphicsContext3DWin.cpp: Added.
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
(WebCore::GraphicsContext3D::platformTexture):
(WebCore::GraphicsContext3D::isGLES2Compliant):
(WebCore::GraphicsContext3D::platformLayer):

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

6 years agoReintroduce convenience CheckedInt*, CheckedUint* types
zandobersek@gmail.com [Mon, 29 Jul 2013 20:10:27 +0000 (20:10 +0000)]
Reintroduce convenience CheckedInt*, CheckedUint* types
https://bugs.webkit.org/show_bug.cgi?id=119213

Reviewed by Oliver Hunt.

Reintroduce CheckedInt* and CheckedUint* types that were previously provided for convenience
through the CheckedInt header that was removed in r153095. The types are now based on the
Checked class, using the RecordOverflow class as the overflow handler.

* wtf/CheckedArithmetic.h:

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

6 years ago[GTK] Add WestonDriver, use it when appropriate
zandobersek@gmail.com [Mon, 29 Jul 2013 20:09:26 +0000 (20:09 +0000)]
[GTK] Add WestonDriver, use it when appropriate
https://bugs.webkit.org/show_bug.cgi?id=119100

Reviewed by Dirk Pranke.

Introduce the WestonDriver, a Driver-implementing class that sets up an instance of Weston, the Wayland compositor,
and sets up an environment that enables the test runner to run inside it.

The design very much mimics the XvfbDriver class. It is currently used by the GTK port when the WAYLAND_DISPLAY
environment variable is set, that is when NRWT is being run under a Wayland display.

* Scripts/webkitpy/port/base.py:
(Port.to.setup_environ_for_server): Also copy the XDG_RUNTIME_DIR env from the original environment for Linux-using ports.
* Scripts/webkitpy/port/gtk.py:
(GtkPort):
(GtkPort._driver_class): Make the method memoized - the display type is not going to change during the testing, so we
should only check once for the presence of the WAYLAND_DISPLAY env and determine the proper driver class to use based on that.
(GtkPort.check_sys_deps): Call the static check_driver method on the class as returned by the _driver_class method
instead of hard-coding the XvfbDriver class in the check.
* Scripts/webkitpy/port/westondriver.py: Added.
(WestonDriver):
(WestonDriver.check_driver): Similarly to XvfbDriver, this checks for existance of the weston executable.
(WestonDriver.__init__): Again, like in XvfbDriver, we use a small delay between launching the Weston display and launching the driver.
(WestonDriver._start): Sets up the driver-specific temporary directory, launches the Weston display, sets up the environment for the
driver and then launches the driver in said environment, using the driver's Weston display.
(WestonDriver.stop): Cleans up the Weston instance and the temporary directory.
(WestonDriver._ensure_driver_tmpdir_subdirectory): A helper function that creates a subdirectory in the driver's temporary directory
and returns the absolute path to it.
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver.check_driver): Renamed from check_xvfb.
(XvfbDriver._start): Access the FileSystem object through the Port's Host object, instead of the Port's private member.

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

6 years agoMax IOSurfaceDimension should be an inclusive upper bound
dino@apple.com [Mon, 29 Jul 2013 19:25:17 +0000 (19:25 +0000)]
Max IOSurfaceDimension should be an inclusive upper bound
https://bugs.webkit.org/show_bug.cgi?id=119206
<rdar://problem/14555311>

Reviewed by Simon Fraser.

The maxIOSurfaceDimension value should be an inclusive upper bound.
Change the greater than or equal to into a greater than. This will
allow canvas elements of this dimension to be accelerated.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer): Change >= to >

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

6 years ago[CSS Shapes] New positioning model: update percentage rectangle and inset rectangle...
commit-queue@webkit.org [Mon, 29 Jul 2013 19:20:24 +0000 (19:20 +0000)]
[CSS Shapes] New positioning model: update percentage rectangle and inset rectangle tests
https://bugs.webkit.org/show_bug.cgi?id=118086

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-29
Reviewed by Dirk Schulze.

Update percentage based tests to work with the new positioning model.
Also move the tests to be W3C spec tests, so they have been impored
back here from the CSSWG repo.

* TestExpectations: Remove skipping for replaced tests.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-003-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-003.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-004-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-004.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-002-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-002.html: Added.
* csswg/submitted/shapes/shape-outside/w3c-import.log:
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-inset-rectangle-percentage-expected.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-inset-rectangle-percentage.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage-expected.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html: Removed.

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

6 years agoSource/ThirdParty/ANGLE: Separated translator into preprocessor, translator_common,
achristensen@apple.com [Mon, 29 Jul 2013 18:51:55 +0000 (18:51 +0000)]
Source/ThirdParty/ANGLE: Separated translator into preprocessor, translator_common,
translator_hlsl (for libGLESv2), and translator_glsl
(for ANGLEWebKitBridge).
https://bugs.webkit.org/show_bug.cgi?id=119221

Reviewed by Brent Fulgham.

* ANGLE.vcxproj/ANGLEGenerated.vcxproj:
Removed unused preprocessor definitions.
* ANGLE.vcxproj/libEGL.vcxproj:
* ANGLE.vcxproj/libGLESv2.vcxproj:
Removed dependency on removed translator project.
* ANGLE.vcxproj/libGLESv2Common.props:
Link to translator_hlsl libraries.
* ANGLE.vcxproj/preprocessor.vcxproj: Added.
* ANGLE.vcxproj/preprocessor.vcxproj.filters: Added.
* ANGLE.vcxproj/translator.vcxproj: Removed.
* ANGLE.vcxproj/translator.vcxproj.filters: Removed.
* ANGLE.vcxproj/translator_common.vcxproj: Added.
* ANGLE.vcxproj/translator_common.vcxproj.filters: Added.
* ANGLE.vcxproj/translator_glsl.vcxproj: Added.
* ANGLE.vcxproj/translator_glsl.vcxproj.filters: Added.
* ANGLE.vcxproj/translator_hlsl.vcxproj: Added.
* ANGLE.vcxproj/translator_hlsl.vcxproj.filters: Added.

Source/WebKit: Separated translator into preprocessor, translator_common,
translator_hlsl (for libGLESv2), and translator_glsl (for ANGLEWebKitBridge).
These projects are still not built by default.
https://bugs.webkit.org/show_bug.cgi?id=119221

Reviewed by Brent Fulgham.

* WebKit.vcxproj/WebKit.sln:
Added separate ANGLE translator projects.

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

6 years ago[ATK] Implement attributesOfChildren() for AccessibilityUIElement
mario@webkit.org [Mon, 29 Jul 2013 18:26:52 +0000 (18:26 +0000)]
[ATK] Implement attributesOfChildren() for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118967

Reviewed by Gustavo Noronha Silva.

Tools:

Implemented AccessibilityUIElement::attributesOfChildren() both
in DumpRenderTree and the WebKitTestRunner.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::attributesOfChildren): Implemented.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributesOfChildren): Implemented.

LayoutTests:

Removed fixed tests from TestExpectations and added/updated expected
results for tests that are now dumping more useful information.

* platform/gtk/TestExpectations: Removed three fixed tests.
* platform/gtk/accessibility/image-map2-expected.txt: Updated.
* platform/gtk/accessibility/lists-expected.txt: Added.
* platform/gtk/accessibility/plugin-expected.txt: Added.
* platform/gtk/accessibility/table-with-aria-role-expected.txt: Added.

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

6 years agoRemove setUnderlayPage() and associated code
andersca@apple.com [Mon, 29 Jul 2013 18:10:32 +0000 (18:10 +0000)]
Remove setUnderlayPage() and associated code
https://bugs.webkit.org/show_bug.cgi?id=119220
<rdar://problem/14392426>

Reviewed by Jessie Berlin.

This is dead code, get rid of it.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
(WebKit::WebPage::layoutIfNeeded):
(WebKit::WebPage::drawRect):
* WebProcess/WebPage/WebPage.h:

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

6 years agoASSERT_NOT_REACHED was touched in WebCore::SVGAnimatedType::valueAsString
reni@webkit.org [Mon, 29 Jul 2013 17:45:51 +0000 (17:45 +0000)]
ASSERT_NOT_REACHED was touched in WebCore::SVGAnimatedType::valueAsString
https://bugs.webkit.org/show_bug.cgi?id=118744

Reviewed by Philip Rogers.

Source/WebCore:

If we have an <animateTransform> tag that sets the attributeName and attributeType
properties however they are not consistent and we shouldn't try to apply it.
It is already checked and catched in SVGAnimateElement::resetAnimatedType() but
DontApplyAnimation case isn't handled properly. The patch forces an early return
in this case.

Test: svg/animations/attributeNameAndAttributeTypeMissmatch.svg

* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::resetAnimatedType):

LayoutTests:

Adding test to check whether attributeName and attributeType are consistent in <animateTransform>.

* platform/qt/svg/animations/attributeNameAndAttributeTypeMissmatch-expected.txt: Added.
* svg/animations/attributeNameAndAttributeTypeMissmatch.svg: Added.

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

6 years ago[ATK] Implement allAttributes() for AccessibilityUIElement
mario@webkit.org [Mon, 29 Jul 2013 17:16:25 +0000 (17:16 +0000)]
[ATK] Implement allAttributes() for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118966

Reviewed by Gustavo Noronha Silva.

Tools:

Implemented AccessibilityUIElement::allAttributes() both in
DumpRenderTree and the WebKitTestRunner.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(getAtkAttributeSetAsString): Moved up in the file, and refactored
to use StringBuilder and return a String instead of a gchar*.
(roleToString): Changed not to return the "AXRole: " prefix, so
we can use it as well from attributesOfElement().
(attributesOfElement): New function to dump attributes for an object.
(AccessibilityUIElement::allAttributes): Call attributesOfElement().
(AccessibilityUIElement::role): Updated to prefix "AXRole: ".

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(getAtkAttributeSetAsString): Refactored to use StringBuilder and return
a String instead of a gchar*.

(WTF::roleToString): Changed not to return the "AXRole: " prefix,
so we can use it as well from attributesOfElement().
(WTF::attributesOfElement): New function to dump attributes for an object.
(WTR::AccessibilityUIElement::allAttributes): Call attributesOfElement().
(WTR::AccessibilityUIElement::role): Updated to prefix "AXRole: ".

LayoutTests:

Removed fixed tests from TestExpectations and added/updated expected
results for tests that are now dumping more useful information.

* platform/gtk/TestExpectations: Removed four fixed tests.
* platform/gtk/accessibility/image-link-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated
* platform/gtk/accessibility/table-cells-expected.txt: Updated
* platform/gtk/accessibility/table-detection-expected.txt: Added.
* platform/gtk/accessibility/table-one-cell-expected.txt: Added.
* platform/gtk/accessibility/table-with-rules-expected.txt: Added.
* platform/gtk/accessibility/transformed-element-expected.txt: Added.

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

6 years agoREGRESSION(148300) GIFs not reanimated after resumeActiveDOMObjectAndAnimations
allan.jensen@digia.com [Mon, 29 Jul 2013 17:10:31 +0000 (17:10 +0000)]
REGRESSION(148300) GIFs not reanimated after resumeActiveDOMObjectAndAnimations
https://bugs.webkit.org/show_bug.cgi?id=119217

Reviewed by Tim Horton.

Commit 148300 introduced a new better was of restarting GIF animations after
they have been suspended. Unfortunately the method was not activated when a page
is resumed but only when it is returning from background.

This fixes GIF animations that are stopped during user interaction on Qt and other
platforms using suspendActiveDOMObjectAndAnimations.

* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):

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

6 years agoAdd support infrastructure for iOS WebKit port
dbates@webkit.org [Mon, 29 Jul 2013 16:35:34 +0000 (16:35 +0000)]
Add support infrastructure for iOS WebKit port
https://bugs.webkit.org/show_bug.cgi?id=119168

Reviewed by Ryosuke Niwa.

Implement support infrastructure towards building iOS WebKit.

* Scripts/webkitdirs.pm:
(xcodeSDKPlatformName): Added.
(determineConfigurationProductDir):
(builtDylibPathForName):
(willUseIOSDeviceSDKWhenBuilding): Added.
(willUseIOSSimulatorSDKWhenBuilding): Added.
(isIOSWebKit): Added.
(copyInspectorFrontendFiles):

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

6 years agoMade EGL useable by non-cairo ports.
achristensen@apple.com [Mon, 29 Jul 2013 16:34:47 +0000 (16:34 +0000)]
Made EGL useable by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119177

Reviewed by Brent Fulgham.

* platform/graphics/cairo/GLContext.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
* platform/graphics/egl/GLContextEGL.h:
Protected Cairo-specific code with #if USE(CAIRO)

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

6 years agoCoordinatedGraphics: Add API to get and set the active state of a WebView
commit-queue@webkit.org [Mon, 29 Jul 2013 16:25:08 +0000 (16:25 +0000)]
CoordinatedGraphics: Add API to get and set the active state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=119067

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-07-29
Reviewed by Noam Rosenthal.

Source/WebCore:

Added a method to return whether a scene is active or not.

No new tests, no behavior change.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(WebCore::CoordinatedGraphicsScene::isActive): Added method to return the
active state of the scene.

Source/WebKit2:

A view being in the "active" state generally means that it is not in the
"background", although this definition can vary depending on the platform
under consideration.

This patch adds the following APIs to WKView:
- bool WKViewIsActive(WKViewRef)
This API accepts a WKViewRef as parameter and returns a boolean indicating
whether the given view is active.

- void WKViewSetIsActive(WKViewRef, bool)
This API accepts a WKViewRef and a boolean as parameteres, and it sets the
active state of the given view to the given boolean argument.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewIsActive): API added.
(WKViewSetIsActive): Ditto.
* UIProcess/API/C/CoordinatedGraphics/WKView.h: Export aforementioned API.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::initialize): Use new setActive method.
(WebKit::WebView::setActive): Added method to set the active state of the
view.
(WebKit::WebView::isActive): Added method to return the active state of
view.
(WebKit::WebView::enterAcceleratedCompositingMode): Use new setActive
method.
(WebKit::WebView::exitAcceleratedCompositingMode): Ditto.
* UIProcess/CoordinatedGraphics/WebView.h: Added declarations of isActive
and setActive.

Tools:

Added API tests for WKViewIsActive and WKViewSetIsActive.

* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive.cpp: Added.
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::webProcessCrashed):
(TestWebKitAPI::webProcessRelaunched):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewIsActiveSetIsActive_Bundle.cpp:
Bundle added to allow crashing the WebProcess and testing the active state of a view
under such condition.
(TestWebKitAPI::WKViewIsActiveSetIsActiveTest::WKViewIsActiveSetIsActiveTest):
(TestWebKitAPI::WKViewIsActiveSetIsActiveTest::didReceiveMessage):

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

6 years ago[ATK] Issues with edge cases when getting offsets for a text range in AtkText
mario@webkit.org [Mon, 29 Jul 2013 15:46:35 +0000 (15:46 +0000)]
[ATK] Issues with edge cases when getting offsets for a text range in AtkText
https://bugs.webkit.org/show_bug.cgi?id=118908

Reviewed by Martin Robinson.

Source/WebCore:

Reimplement getSelectionOffsetsForObject() just in term of
Positions instead of using ranges, which makes it simpler and
works better. Also, make sure we use the right Node as reference
for the accessibility object by getting the proper one both for
text control objects (e.g. input, text area) and normal ones.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getNodeForAccessibilityObject): New helper function to ensure we
always get the relevant object from the DOM tree for a given
accessibility object, in the context of the implementation of
AtkText, so it works both with Text Controls and other elements.
(getSelectionOffsetsForObject): Rewritten this function in terms
of VisiblePositions and avoiding weird operations with ranges, so
we have more control to fine tune the results and give more
accurate ones. Besides, now it works better with edge cases.

Source/WebKit/gtk:

* tests/testatk.c:
(runGetTextTests): Updated unit tests to check more cases of
calling the atk_text_get_text_*_offset() functions for WORD.

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