WebKit-https.git
6 years agoDFGStoreBarrierElisionPhase should should GCState directly instead of m_gcClobberSet...
mhahnenberg@apple.com [Wed, 5 Mar 2014 17:43:57 +0000 (17:43 +0000)]
DFGStoreBarrierElisionPhase should should GCState directly instead of m_gcClobberSet when calling writesOverlap()
https://bugs.webkit.org/show_bug.cgi?id=129717

Reviewed by Filip Pizlo.

* dfg/DFGStoreBarrierElisionPhase.cpp:
(JSC::DFG::StoreBarrierElisionPhase::StoreBarrierElisionPhase):
(JSC::DFG::StoreBarrierElisionPhase::couldCauseGC):

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

6 years ago[GTK][CMake] build-webkit should rerun cmake if the Makefile is missing
mrobinson@webkit.org [Wed, 5 Mar 2014 16:52:29 +0000 (16:52 +0000)]
[GTK][CMake] build-webkit should rerun cmake if the Makefile is missing
https://bugs.webkit.org/show_bug.cgi?id=129380

Reviewed by Philippe Normand.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Check for the existence of the Makefile before
skipping CMake execution.

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

6 years ago[GTK] The jhbuild environment should have the latest stable release of gtk-doc
mrobinson@webkit.org [Wed, 5 Mar 2014 16:46:53 +0000 (16:46 +0000)]
[GTK] The jhbuild environment should have the latest stable release of gtk-doc
https://bugs.webkit.org/show_bug.cgi?id=129651

Reviewed by Philippe Normand.

* gtk/jhbuild.modules: Add gtk-doc to the list of modules.

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

6 years agoUse range-based loops where possible in Heap methods
mhahnenberg@apple.com [Wed, 5 Mar 2014 16:46:23 +0000 (16:46 +0000)]
Use range-based loops where possible in Heap methods
https://bugs.webkit.org/show_bug.cgi?id=129513

Reviewed by Mark Lam.

Replace old school iterator based loops with the new range-based loop hotness
for a better tomorrow.

* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::~CodeBlockSet):
(JSC::CodeBlockSet::clearMarks):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):
(JSC::CodeBlockSet::traceMarked):
* heap/Heap.cpp:
(JSC::Heap::visitProtectedObjects):
(JSC::Heap::visitTempSortVectors):
(JSC::Heap::clearRememberedSet):
* heap/Heap.h:
(JSC::Heap::forEachProtectedCell):

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

6 years ago[GTK] Give the WebKit GObject DOM bindings API break detection it's own buildbot...
mrobinson@webkit.org [Wed, 5 Mar 2014 15:48:29 +0000 (15:48 +0000)]
[GTK] Give the WebKit GObject DOM bindings API break detection it's own buildbot bubble
https://bugs.webkit.org/show_bug.cgi?id=129637

Reviewed by Carlos Garcia Campos.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunGtkWebKitGObjectDOMBindingsAPIBreakTests): Added this test runner.
(RunGtkWebKitGObjectDOMBindingsAPIBreakTests.commandComplete): Run the breakage test command and scan the output.
(RunGtkWebKitGObjectDOMBindingsAPIBreakTests.evaluateCommand): Return failure if there is missing API (an API break).
New API typically just requires a rebaseline and isn't necessarily a faiulre.
(TestFactory.__init__): Add the test for GTK+.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add a unit test for the new bubble.

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

6 years agoSource/WebCore: [ATK] Expose missing functionalities of AtkTableCell to AT.
k.czech@samsung.com [Wed, 5 Mar 2014 15:16:08 +0000 (15:16 +0000)]
Source/WebCore: [ATK] Expose missing functionalities of AtkTableCell to AT.
https://bugs.webkit.org/show_bug.cgi?id=129492

Reviewed by Mario Sanchez Prada.

Implemented missing API of AtkTableCell.

No new tests. Covered by existing ones.

* accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
(webkitAccessibleTableCellGetColumnSpan):
(webkitAccessibleTableCellGetRowSpan):
(webkitAccessibleTableCellGetPosition):
(webkitAccessibleTableCellGetTable):
(webkitAccessibleTableCellInterfaceInit):

Tools: [ATK] Expose missing functionalities of AtkTableCell to AT
https://bugs.webkit.org/show_bug.cgi?id=129492

Reviewed by Mario Sanchez Prada.

Reducing some code by using new API of AtkTableCell.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

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

6 years ago[GStreamer] WebSource doesn't need the "iradio-mode" property
agomez@igalia.com [Wed, 5 Mar 2014 14:49:04 +0000 (14:49 +0000)]
[GStreamer] WebSource doesn't need the "iradio-mode" property
https://bugs.webkit.org/show_bug.cgi?id=129685

Reviewed by Philippe Normand.

Removed the "iradio-mode" property from the WK source element
since this was only available for its modification from
playbin/uridecodebin and, as discussed in GStreamer bug #725383,
it was not being set and now is going to be removed.

It is safe just to send always the "icy-metadata" header set and
deal with returning "icy" headers as we were already doing.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStart):

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

6 years agoCopying wrapping text results in multiple spaces between wrapped lines stripped.
commit-queue@webkit.org [Wed, 5 Mar 2014 14:02:06 +0000 (14:02 +0000)]
Copying wrapping text results in multiple spaces between wrapped lines stripped.
https://bugs.webkit.org/show_bug.cgi?id=129609.

Patch by Chang Shu <cshu@webkit.org> on 2014-03-05
Reviewed by Ryosuke Niwa.

Source/WebCore:

While checking the condition of restoring the missing space, the collapsed spaces
may not be exactly one.

editing/pasteboard/copy-text-with-wrapped-tag.html is enhanced to test this case.

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextBox):

LayoutTests:

* editing/pasteboard/copy-text-with-wrapped-tag-expected.txt:
* editing/pasteboard/copy-text-with-wrapped-tag.html:

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

6 years ago[EFL] Update baselines and test expectations
commit-queue@webkit.org [Wed, 5 Mar 2014 13:26:53 +0000 (13:26 +0000)]
[EFL] Update baselines and test expectations
https://bugs.webkit.org/show_bug.cgi?id=129737

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-03-05

* TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/fast/table/col-and-colgroup-offsets-expected.txt: Added.
Test was failing due to platform-specific numeric differences in the computed offsetHeight of the table cells.

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

6 years agoappendChild shouldn't invalidate LiveNodeLists and HTMLCollections if they don't...
rniwa@webkit.org [Wed, 5 Mar 2014 10:41:48 +0000 (10:41 +0000)]
appendChild shouldn't invalidate LiveNodeLists and HTMLCollections if they don't have valid caches
https://bugs.webkit.org/show_bug.cgi?id=129727

Reviewed by Andreas Kling.

Before this patch, invalidateNodeListAndCollectionCachesInAncestors invalidated node lists and HTML
collections on ancestors of a node whenever we're inserting or removing a child node. This patch
makes HTMLCollections and LiveNodeLists register themselves with Document only when they have valid
caches.

Each user of CollectionIndexCache now implements willValidateIndexCache member function that gets
called when CollectionIndexCache caches any state and necessitates the registration with document.

* dom/ChildNodeList.h: Added an empty willValidateIndexCache since child node lists are never
registered with document.

* dom/CollectionIndexCache.h:
(WebCore::CollectionIndexCache::hasValidCache): Added.
(WebCore::CollectionIndexCache::nodeCount): Calls willValidateIndexCache when caching node count.
(WebCore::CollectionIndexCache::nodeAfterCached): Ditto. Also assert that hasValidCache() true in
the cases where we're simply updating our caches or adding more caches.
(WebCore::CollectionIndexCache::nodeAt): Ditto. Also added a code to set the length cache when
we've reached the end of the list. This should be a slight speed up on some cases.

* dom/Document.cpp:
(WebCore::Document::Document): Initializes a variable used by assertions.
(WebCore::Document::unregisterNodeList): Added an early exit for when m_listsInvalidatedAtDocument
is empty since invalidateNodeListAndCollectionCaches swaps out the list.
(WebCore::Document::registerCollection): Removed the boolean hasIdNameMap since we now explicitly
call collectionCachedIdNameMap in HTMLCollection.
(WebCore::Document::unregisterCollection): Ditto. Exit early if m_collectionsInvalidatedAtDocument
is empty since invalidateNodeListAndCollectionCaches swaps out the list.
* dom/Document.h:

* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::invalidateCache): Unregister the node list with document if we had caches.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList): Ditto.
(WebCore::LiveNodeList::invalidateCache): Pass around document. This is necessary since document()
had already moved to the new document inside NodeListsNodeData::invalidateCaches.
(WebCore::LiveNodeList::willValidateIndexCache): Added. Registers itself with document.

* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches): Swap the lists since invalidateCache
tries to unregister node lists and HTML collections with document. Since this is the only case in
which node lists and HTML collections being removed may not be in the lists in unregisterNodeList
and unregisterCollection, assert this condition via m_inInvalidateNodeListAndCollectionCaches.
(WebCore::NodeListsNodeData::invalidateCaches):

* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument): Unregister node lists and HTML collections from old
document via invalidateCache. We need to explicitly pass in oldDocument here since owner node's
document had already been changed to newDocument at this point. Since we're invalidating caches,
there is no need to register node lists and HTML collections with newDocument.

* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection): Unregister the node list with document if we had caches.
(WebCore::HTMLCollection::invalidateCache): Ditto.
(WebCore::HTMLCollection::invalidateNamedElementCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::invalidateCache): Pass around document as done in LiveNodeList.
(WebCore::HTMLCollection::willValidateIndexCache): Ditto.

* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::invalidateCache): Ditto.
* html/HTMLFormControlsCollection.h:

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::invalidateSelectedItems): Ditto.
(WebCore::HTMLSelectElement::setRecalcListItems): Ditto.

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

6 years agoRemove unsupported spelling tests.
g.czajkowski@samsung.com [Wed, 5 Mar 2014 10:35:14 +0000 (10:35 +0000)]
Remove unsupported spelling tests.
https://bugs.webkit.org/show_bug.cgi?id=129482

Reviewed by Ryosuke Niwa.

Remove two spelling tests that require spellchecking of multiple words.
Currently, neither WebKit port is supporting this feature.
Those tests were added by Chromium at r141354.

* editing/spelling/spelling-exactly-selected-multiple-words-expected.txt: Removed.
* editing/spelling/spelling-exactly-selected-multiple-words.html: Removed.
* editing/spelling/spelling-should-select-multiple-words-expected.txt: Removed.
* editing/spelling/spelling-should-select-multiple-words.html: Removed.

* platform/efl-wk2/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
Clear TestExpectations.

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

6 years agoRefactoring spelling-insert-html.html to use asynchronous spellchecking
g.czajkowski@samsung.com [Wed, 5 Mar 2014 10:20:23 +0000 (10:20 +0000)]
Refactoring spelling-insert-html.html to use asynchronous spellchecking
https://bugs.webkit.org/show_bug.cgi?id=129422

Reviewed by Ryosuke Niwa.

Use asynchronous text checking in spelling-insert-html.html.
Add more logs to the test expectation so that it becomes
more descriptive.

Additionally, the word "foo" was changed to "moo" due to
only Mac had recognized this word as spelled correctly.

* editing/spelling/spelling-insert-html-expected.txt:
* editing/spelling/spelling-insert-html.html:

* platform/efl/TestExpectations:
Remove failing expectation for EFL.

* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:
Skip the tests for GTK+ because of missing asynchronous spellchecking.

* platform/mac-wk2/TestExpectations:
Ditto.

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

6 years agoFix linker error after r165087
jonlee@apple.com [Wed, 5 Mar 2014 09:13:24 +0000 (09:13 +0000)]
Fix linker error after r165087
https://bugs.webkit.org/show_bug.cgi?id=129730

Reviewed by Csaba Osztrogon√°c.

* WebCore.exp.in: Remove undefined symbol __ZN7WebCore32WebVideoFullscreenChangeObserverD2Ev.

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

6 years agoDFG and FTL should specialize for and support CompareStrictEq over Misc (i.e. boolean...
fpizlo@apple.com [Wed, 5 Mar 2014 07:41:03 +0000 (07:41 +0000)]
DFG and FTL should specialize for and support CompareStrictEq over Misc (i.e. boolean, undefined, or null)
https://bugs.webkit.org/show_bug.cgi?id=129563

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Rolling this back in after fixing an assertion failure. speculateMisc() should have
said DFG_TYPE_CHECK instead of typeCheck.

This adds a specialization of CompareStrictEq over Misc. I noticed the need for this
when I saw that we didn't support CompareStrictEq(Untyped) in FTL but that the main
user of this was EarleyBoyer, and in that benchmark what it was really doing was
comparing undefined, null, and booleans to each other.

This also adds support for miscellaneous things that I needed to make my various test
cases work. This includes comparison over booleans and the various Throw-related node
types.

This also improves constant folding of CompareStrictEq and CompareEq.

Also found a bug where we were claiming that GetByVals on typed arrays are OutOfBounds
based on profiling, which caused some downstream badness. We don't actually support
compiling OutOfBounds GetByVals on typed arrays. The DFG would ignore the flag and just
emit a bounds check, but in the FTL path, the SSA lowering phase would assume that it
shouldn't factor out the bounds check since the access is not InBounds but then the
backend would ignore the flag and assume that the bounds check was already emitted.
This showed up on an existing test but I added a test for this explicitly to have more
certain coverage. The fix is to not mark something as OutOfBounds if the semantics are
that we'll have a bounds check anyway.

This is a 1% speed-up on Octane mostly because of raytrace, but also because of just
general progressions across the board. No speed-up yet on EarleyBoyer, since there is
still a lot more coverage work to be done there.

* bytecode/SpeculatedType.cpp:
(JSC::speculationToAbbreviatedString):
(JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):
(JSC::valuesCouldBeEqual):
* bytecode/SpeculatedType.h:
(JSC::isMiscSpeculation):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine):
* dfg/DFGArrayMode.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateMisc):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::speculateMisc):
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileMiscStrictEq):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileMiscStrictEq):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
(JSC::FTL::LowerDFGToLLVM::compileThrow):
(JSC::FTL::LowerDFGToLLVM::isNotMisc):
(JSC::FTL::LowerDFGToLLVM::isMisc):
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::speculateMisc):
* tests/stress/float32-array-out-of-bounds.js: Added.
* tests/stress/weird-equality-folding-cases.js: Added.

LayoutTests:

Reviewed by Geoffrey Garen.

* js/regress/fold-strict-eq-expected.txt: Added.
* js/regress/fold-strict-eq.html: Added.
* js/regress/misc-strict-eq-expected.txt: Added.
* js/regress/misc-strict-eq.html: Added.
* js/regress/script-tests/fold-strict-eq.js: Added.
(foo):
(test):
* js/regress/script-tests/misc-strict-eq.js: Added.

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

6 years agoUnreviewed, rolling out r165085.
commit-queue@webkit.org [Wed, 5 Mar 2014 07:25:02 +0000 (07:25 +0000)]
Unreviewed, rolling out r165085.
http://trac.webkit.org/changeset/165085
https://bugs.webkit.org/show_bug.cgi?id=129729

Broke imported/w3c/html-templates/template-element/template-
content.html (Requested by ap on #webkit).

Source/JavaScriptCore:

* bytecode/SpeculatedType.cpp:
(JSC::speculationToAbbreviatedString):
* bytecode/SpeculatedType.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine):
* dfg/DFGArrayMode.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateBoolean):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
(JSC::FTL::LowerDFGToLLVM::speculate):
* tests/stress/float32-array-out-of-bounds.js: Removed.
* tests/stress/weird-equality-folding-cases.js: Removed.

LayoutTests:

* js/regress/fold-strict-eq-expected.txt: Removed.
* js/regress/fold-strict-eq.html: Removed.
* js/regress/misc-strict-eq-expected.txt: Removed.
* js/regress/misc-strict-eq.html: Removed.
* js/regress/script-tests/fold-strict-eq.js: Removed.
* js/regress/script-tests/misc-strict-eq.js: Removed.

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

6 years agoPreparing to run layout tests on Wincairo.
commit-queue@webkit.org [Wed, 5 Mar 2014 06:24:23 +0000 (06:24 +0000)]
Preparing to run layout tests on Wincairo.
https://bugs.webkit.org/show_bug.cgi?id=129709

Patch by Alex Christensen <achristensen@webkit.org> on 2014-03-04
Reviewed by Brent Fulgham.

* Scripts/webkitdirs.pm:
(setPathForRunningWebKitApp):
Add GStreamer directory for WinCairo running layout tests.
* win/DLLLauncher/DLLLauncherMain.cpp:
(modifyPath):
Added the WinCairo bin32 or bin64 directory for running WinLauncher.

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

6 years agoFix the build after r165095
benjamin@webkit.org [Wed, 5 Mar 2014 05:55:28 +0000 (05:55 +0000)]
Fix the build after r165095

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-04

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

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

6 years ago[iOS][WK2] Account for the keyboard when computing the unobscuredRect
benjamin@webkit.org [Wed, 5 Mar 2014 05:37:40 +0000 (05:37 +0000)]
[iOS][WK2] Account for the keyboard when computing the unobscuredRect
https://bugs.webkit.org/show_bug.cgi?id=129660

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-04
Reviewed by Enrica Casucci.

Adjust the unobscuredRect when a docked keyboard is on screen.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRectsWithStableState:]):
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

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

6 years agoEnable device pixel repaint rect tracking.
zalan@apple.com [Wed, 5 Mar 2014 05:30:25 +0000 (05:30 +0000)]
Enable device pixel repaint rect tracking.
https://bugs.webkit.org/show_bug.cgi?id=129712

Reviewed by Simon Fraser.

Tracked repaint rects are device pixel snapped now to support hiDPI test cases.

Source/WebCore:

Test: fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::addTrackedRepaintRect):
(WebCore::FrameView::trackedRepaintRectsAsText): Print them as LayoutUnits to get
trailing zeros cut off.
* page/FrameView.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::trackedRepaintRects):

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::trackedRepaintRects):

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView trackedRepaintRects]): Keep existing behavior for now.

LayoutTests:

* fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking-expected.txt: Added.
* fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html: Added.

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

6 years agoInspector does not restore breakpoints after a page reload
bburg@apple.com [Wed, 5 Mar 2014 04:44:15 +0000 (04:44 +0000)]
Inspector does not restore breakpoints after a page reload
https://bugs.webkit.org/show_bug.cgi?id=129655

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Fix a regression introduced by r162096 that erroneously removed
the inspector backend's mapping of files to breakpoints whenever the
global object was cleared.

The inspector's breakpoint mappings should only be cleared when the
debugger agent is disabled or destroyed. We should only clear the
debugger's breakpoint state when the global object is cleared.

To make it clearer what state is being cleared, the two cases have
been split into separate methods.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::clearInspectorBreakpointState):
(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
(Inspector::InspectorDebuggerAgent::didClearGlobalObject):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebInspectorUI:

Fix some console asserts that fire when breakpoints resolve.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.breakpointResolved):
This had a typo, it should be `breakpoint.identifier`.
(WebInspector.DebuggerManager.prototype.scriptDidParse):
Sometimes the `url` parameter is empty instead of null.

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

6 years ago[iOS][WebKit2] Exclude plug-in sandbox profiles from the build
aestes@apple.com [Wed, 5 Mar 2014 03:48:33 +0000 (03:48 +0000)]
[iOS][WebKit2] Exclude plug-in sandbox profiles from the build
https://bugs.webkit.org/show_bug.cgi?id=129719

Reviewed by Simon Fraser.

* Configurations/WebKit2.xcconfig:

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

6 years agoDon't clamp scrolling node offsets when the offset is changed by delegated scrolling
simon.fraser@apple.com [Wed, 5 Mar 2014 02:54:31 +0000 (02:54 +0000)]
Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
https://bugs.webkit.org/show_bug.cgi?id=129724

Reviewed by Sam Weinig.

Call setScrollPositionWithoutContentEdgeConstraints() from
ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
layers are not clamped during rubber-banding.

This requires making setScrollPositionWithoutContentEdgeConstraints()
a pure virtual function on the base class.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:

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

6 years agoStreamline JSValue::get().
akling@apple.com [Wed, 5 Mar 2014 02:35:18 +0000 (02:35 +0000)]
Streamline JSValue::get().
<https://webkit.org/b/129720>

Fetch each Structure and VM only once when walking the prototype chain
in JSObject::getPropertySlot(), then pass it along to the functions
we call from there, so they don't have to re-fetch it.

Reviewed by Geoff Garen.

* runtime/JSObject.h:
(JSC::JSObject::inlineGetOwnPropertySlot):
(JSC::JSObject::fastGetOwnPropertySlot):
(JSC::JSObject::getPropertySlot):

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

6 years ago[iOS][WK2] WKScrollView should be able to cancel touches in content view
benjamin@webkit.org [Wed, 5 Mar 2014 02:14:35 +0000 (02:14 +0000)]
[iOS][WK2] WKScrollView should be able to cancel touches in content view
https://bugs.webkit.org/show_bug.cgi?id=129711

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-04
Reviewed by Simon Fraser.

* UIProcess/ios/WKScrollView.mm:
We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
other gesture recognizers to fail if delayed touches have been dispatched.

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

6 years ago[iOS][WK2] Consider the entire view state on update to find if a change is stable...
benjamin@webkit.org [Wed, 5 Mar 2014 02:13:16 +0000 (02:13 +0000)]
[iOS][WK2] Consider the entire view state on update to find if a change is stable or not
https://bugs.webkit.org/show_bug.cgi?id=129721

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-04
Reviewed by Simon Fraser.

Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
is stable or not, we should consider the complete picture from all the type of updates.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _endInteractiveObscuredInsetsChange]):

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

6 years agoWebVideoFullscreen, should make the hand off of the video layer explicit.
commit-queue@webkit.org [Wed, 5 Mar 2014 01:51:53 +0000 (01:51 +0000)]
WebVideoFullscreen, should make the hand off of the video layer explicit.
https://bugs.webkit.org/show_bug.cgi?id=128844

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-03-04
Reviewed by Simon Fraser.

Source/WebCore:

This change introduces a more explicit hand-off of the video layer.
This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
WebVideoFullscreenModel <-> WebVideoFullscreenInterface
      enterFullScreen(*) ->
                        <- borrowVideoLayer
      willLendVideoLayer ->
       didLendVideoLayer ->
                        <- didEnterFullscreen
                        ...
                        <- requestExitFullscreen
          exitFullscreen ->
                        <- returnVideoLayer
                        <- didExitFullscreen
(*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.

* WebCore.exp.in:
Export new functions in WebVideoFullscreenInterfaceAVKit, WebVideoFullscreenModelMediaElement, etc.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
Add WebVideoFullscreenControllerChangeObserver to forward fullscreen callbacks to WebVideoFullscreenController

(WebVideoFullscreenControllerChangeObserver::setTarget):
Sets obj-c target of fullscreen change callbacks.

(-[WebVideoFullscreenController init]):
Point _changeObserver's target at self.

(-[WebVideoFullscreenController dealloc]):
Clear _changeObserver's target.

(-[WebVideoFullscreenController enterFullscreen:]):
Retain self to prevent dealloc during animation or while fullscreen.
Connect _interface to _changeObserver.

(-[WebVideoFullscreenController exitFullscreen]):
Remove use of completion move cleanup to -didExitFullscreen.

(-[WebVideoFullscreenController didEnterFullscreen]):
Nothing to see here.

(-[WebVideoFullscreenController didExitFullscreen]):
Move clean up code that was in a completion to here.

* platform/ios/WebVideoFullscreenInterface.h:
Add delarations for more explicit hand-off of video layer.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
Add WebVideoFullscreenChangeObserver to notify when fullscreen animations complete.
Add declarations for more explicit hand-off of video layer.
Add WebAVPlayerLayer now always wraps the m_videoLayer to prevent default behavior
of AVPlayerLayer.

(WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
Add empty virtual destructor.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
Include AVKit headers instead of declaring everything locally.
AVPlayerLayer protocol renamed to AVVideoLayer per AVKit.

(-[WebAVPlayerController dealloc]):
Don't refer to self.

(-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
Pause before requesting exit fullscreen.

(-[WebAVPlayerLayer setPlayerController:]):
This is required by AVVideoLayer, but we don't need it.

(WebVideoFullscreenInterfaceAVKit::playerController):
White space.

(WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenChangeObserver):
Set observer to forward fullscreen changes to.

(WebVideoFullscreenInterfaceAVKit::enterFullscreen):
Use more explicit video layer hand-off.

(WebVideoFullscreenInterfaceAVKit::doEnterFullscreen):
Move enterFullscreen logic here.
AVPlayerViewController now takes the video layer at init time.
Always provide a video layer wrapped in a WebAVPlayerLayer.

(WebVideoFullscreenInterfaceAVKit::willLendVideoLayer):
Use more explicit video layer hand-off.

(WebVideoFullscreenInterfaceAVKit::didLendVideoLayer):
Use more explicit video layer hand-off.

(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
Use more explicit video layer hand-off.

* platform/ios/WebVideoFullscreenModel.h:
Add functions for more explicit video layer hand-off.

* platform/ios/WebVideoFullscreenModelMediaElement.h:
Mark virtual functions as virtual.
Add changes for WebVideoFullscreenModel.

* platform/ios/WebVideoFullscreenModelMediaElement.mm:
Use more explicit video layer hand-off.

(WebVideoFullscreenModelMediaElement::setMediaElement):
Don't push the video layer. Wait for a request for it.

(WebVideoFullscreenModelMediaElement::handleEvent):
Make sure m_videoFullscreenInterface is valid.

(WebVideoFullscreenModelMediaElement::borrowVideoLayer):
Use more explicit video layer hand-off.
Lend videoLayer in request to a request to borrow the videoLayer.
Make sure to retain the video layer before it is removed from the layer tree.

(WebVideoFullscreenModelMediaElement::returnVideoLayer):
Use more explicit video layer hand-off.

(WebVideoFullscreenModelMediaElement::requestExitFullscreen):
Don't clear the mediaElement reference until completely exited from fullscreen.

Source/WebKit2:

This change introduces a more explicit hand-off of the video layer and fullscreen transition.
This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
WebVideoFullscreenModel <-> WebVideoFullscreenInterface
      enterFullScreen(*) ->
                        <- borrowVideoLayer
      willLendVideoLayer ->
       didLendVideoLayer ->
                        <- didEnterFullscreen
                        ...
                        <- requestExitFullscreen
          exitFullscreen ->
                        <- returnVideoLayer
                        <- didExitFullscreen
(*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.

* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Implement WebVideoFullscreenChangeObserver.
Add support for explicit video layer hand-off.
Add m_videoView to retain the videoLayer's UIView.

* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
WillLendVideoLayerWithID replaces SetVideoLayerID

* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
Adopt new methods for explicit video layer hand-off.

(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
Observe fullscreen changes.

(WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
It also removes the videoView from it's super view now that it is safe to do so.

(WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.

(WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
Adopt more explicit fullscreen transition.

(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
Adopt more explicit fullscreen transition.

(WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
Adopt more explicit fullscreen transition.

(WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
Adopt more explicit video layer hand-off.

(WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
Adopt more explicit video layer hand-off.

* WebProcess/ios/WebVideoFullscreenManager.cpp:
Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.

(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
Init three new state members.

(WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
Update animation state. Don't procede if animation is in progress.

(WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
Update animation state. Don't procede if animation is in progress.

(WebKit::WebVideoFullscreenManager::willLendVideoLayer):
Adopt more explicit video layer hand-off.
This replaces SetVideoLayer.

(WebKit::WebVideoFullscreenManager::didLendVideoLayer):
This is a no-op as this will be sent through a RemoteLayerTreeTransaction.

(WebKit::WebVideoFullscreenManager::didEnterFullscreen):
Adopt more explicit fullscreen transition.

(WebKit::WebVideoFullscreenManager::didExitFullscreen):
Adopt more explicit fullscreen transition.

* WebProcess/ios/WebVideoFullscreenManager.h:
Adopt more explicit fullscreen transition.

* WebProcess/ios/WebVideoFullscreenManager.messages.in:
Adopt more explicit fullscreen/video layer transition.

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

6 years agoSource/WebCore: Get position:fixed working slightly better on iOS
simon.fraser@apple.com [Wed, 5 Mar 2014 01:24:05 +0000 (01:24 +0000)]
Source/WebCore: Get position:fixed working slightly better on iOS
https://bugs.webkit.org/show_bug.cgi?id=129714

Reviewed by Benjamin Poulain.

Send the scroll position as a FloatPoint, rather than an IntPoint.

* WebCore.exp.in:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTree.h:

Source/WebKit2: Get position:fixed working slightly better on iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=129714

Reviewed by Benjamin Poulain.

Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
again, so it can update fixed and sticky layers.

Send the scroll position as a FloatPoint, rather than an IntPoint.

* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
Tell the RemoteScrollingCoordinatorProxy about the scroll update.
Only update the customFixedPositionRect if we've finished scrolling or zooming.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
whether the visible rects changed.

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

6 years agoDFG and FTL should specialize for and support CompareStrictEq over Misc (i.e. boolean...
fpizlo@apple.com [Wed, 5 Mar 2014 01:03:55 +0000 (01:03 +0000)]
DFG and FTL should specialize for and support CompareStrictEq over Misc (i.e. boolean, undefined, or null)
https://bugs.webkit.org/show_bug.cgi?id=129563

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

This adds a specialization of CompareStrictEq over Misc. I noticed the need for this
when I saw that we didn't support CompareStrictEq(Untyped) in FTL but that the main
user of this was EarleyBoyer, and in that benchmark what it was really doing was
comparing undefined, null, and booleans to each other.

This also adds support for miscellaneous things that I needed to make my various test
cases work. This includes comparison over booleans and the various Throw-related node
types.

This also improves constant folding of CompareStrictEq and CompareEq.

Also found a bug where we were claiming that GetByVals on typed arrays are OutOfBounds
based on profiling, which caused some downstream badness. We don't actually support
compiling OutOfBounds GetByVals on typed arrays. The DFG would ignore the flag and just
emit a bounds check, but in the FTL path, the SSA lowering phase would assume that it
shouldn't factor out the bounds check since the access is not InBounds but then the
backend would ignore the flag and assume that the bounds check was already emitted.
This showed up on an existing test but I added a test for this explicitly to have more
certain coverage. The fix is to not mark something as OutOfBounds if the semantics are
that we'll have a bounds check anyway.

This is a 1% speed-up on Octane mostly because of raytrace, but also because of just
general progressions across the board. No speed-up yet on EarleyBoyer, since there is
still a lot more coverage work to be done there.

* bytecode/SpeculatedType.cpp:
(JSC::speculationToAbbreviatedString):
(JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):
(JSC::valuesCouldBeEqual):
* bytecode/SpeculatedType.h:
(JSC::isMiscSpeculation):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateMisc):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::speculateMisc):
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileMiscStrictEq):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileMiscStrictEq):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq):
(JSC::FTL::LowerDFGToLLVM::compileThrow):
(JSC::FTL::LowerDFGToLLVM::isNotMisc):
(JSC::FTL::LowerDFGToLLVM::isMisc):
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::speculateMisc):
* tests/stress/float32-array-out-of-bounds.js: Added.
* tests/stress/weird-equality-folding-cases.js: Added.

LayoutTests:

Reviewed by Geoffrey Garen.

* js/regress/fold-strict-eq-expected.txt: Added.
* js/regress/fold-strict-eq.html: Added.
* js/regress/misc-strict-eq-expected.txt: Added.
* js/regress/misc-strict-eq.html: Added.
* js/regress/script-tests/fold-strict-eq.js: Added.
(foo):
(test):
* js/regress/script-tests/misc-strict-eq.js: Added.

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

6 years agoFixed Windows build without MEDIA_CONTROLS_SCRIPT enabled.
commit-queue@webkit.org [Wed, 5 Mar 2014 00:33:54 +0000 (00:33 +0000)]
Fixed Windows build without MEDIA_CONTROLS_SCRIPT enabled.
https://bugs.webkit.org/show_bug.cgi?id=129701

Patch by Alex Christensen <achristensen@webkit.org> on 2014-03-04
Reviewed by Jer Noble.

* WebCore.vcxproj/WebCore.vcxproj:
* DerivedSources.cpp:
Moved UserAgentScriptsData.cpp to DerivedSources.cpp to only be built if MEDIA_CONTROLS_SCRIPT is enabled.
* DerivedSources.make:
Only generate UserAgentScripts.cpp/h when USER_AGENT_SCRIPTS is non-empty.
* rendering/RenderThemeWin.cpp:
Only include UserAgentScripts.h when MEDIA_CONTROLS_SCRIPT is enabled.

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

6 years agoWKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should...
commit-queue@webkit.org [Wed, 5 Mar 2014 00:26:54 +0000 (00:26 +0000)]
WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
https://bugs.webkit.org/show_bug.cgi?id=129704

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-03-04
Reviewed by Beth Dakin.

Add NSColor-returning methods to complement the existing UIColor-returning methods.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageExtendedBackgroundColor]):
Return an NSColor created from the pageExtendedBackgroundColor.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.

* UIProcess/API/mac/WKView.mm:
(-[WKView _pageExtendedBackgroundColor]):
Return an NSColor created from the pageExtendedBackgroundColor.

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

6 years agoWeb Inspector: Give WebProcess private RWI entitlement
commit-queue@webkit.org [Wed, 5 Mar 2014 00:07:38 +0000 (00:07 +0000)]
Web Inspector: Give WebProcess private RWI entitlement
https://bugs.webkit.org/show_bug.cgi?id=129710

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-04
Reviewed by Timothy Hatcher.

* Configurations/WebContent-iOS.entitlements:
Add entitlements to "WebProcess" when code signing.

* Configurations/WebContentProcess.xcconfig:
Add the private RWI entitlement.

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

6 years ago[iOS WebKit2]: Next/Prev button in the accessory bar do not work.
enrica@apple.com [Tue, 4 Mar 2014 22:52:56 +0000 (22:52 +0000)]
[iOS WebKit2]: Next/Prev button in the accessory bar do not work.
https://bugs.webkit.org/show_bug.cgi?id=129690
<rdar://problem/16073569>

Reviewed by Simon Fraser.

Adding support for Next and Previous buttons in the accessory bar.
When the request is processed by the WebProcess, we identify the next
focusable node that needs to be assisted and we call focus() on the element
letting the focus changing machinery take care of updating the assisted node.
This change also add support for the Clear button, when appropriate and hooks up
the call to the WebProcess.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryTab:]):
(-[WKContentView accessoryClear]):
(-[WKContentView _updateAccessory]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::focusNextAssistedNode):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::nextFocusableElement):
(WebKit::hasFocusableElement):
(WebKit::WebPage::focusNextAssistedNode):
(WebKit::WebPage::getAssistedNodeInformation):

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

6 years agoAllow iOS DumpRenderTree crashes to show application-specific information
simon.fraser@apple.com [Tue, 4 Mar 2014 22:48:30 +0000 (22:48 +0000)]
Allow iOS DumpRenderTree crashes to show application-specific information
https://bugs.webkit.org/show_bug.cgi?id=129705

Source/WebCore:

Reviewed by David Kilzer.

Make the WKSI function SetCrashReportApplicationSpecificInformation available
in iOS simulator builds.

* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:

Source/WebKit/mac:

Reviewed by David Kilzer.

Make the WKSI function SetCrashReportApplicationSpecificInformation available
in iOS simulator builds.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

Reviewed by David Kilzer.

Make the WKSI function SetCrashReportApplicationSpecificInformation available
in iOS simulator builds.

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

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

6 years agoSpam static branch prediction hints on JS bindings.
akling@apple.com [Tue, 4 Mar 2014 22:42:53 +0000 (22:42 +0000)]
Spam static branch prediction hints on JS bindings.
<https://webkit.org/b/129703>

Source/JavaScriptCore:

Add LIKELY hint to jsDynamicCast since it's always used in a context
where we expect it to succeed and takes an error path when it doesn't.

Reviewed by Geoff Garen.

* runtime/JSCell.h:
(JSC::jsDynamicCast):

Source/WebCore:

Add UNLIKELY hints to all !castedThis and exec->hadException() paths
in the JS bindings since they are almost always going to get skipped.

Reviewed by Geoff Garen.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):

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

6 years agoGet to Structures more efficiently in JSCell::methodTable().
akling@apple.com [Tue, 4 Mar 2014 22:40:50 +0000 (22:40 +0000)]
Get to Structures more efficiently in JSCell::methodTable().
<https://webkit.org/b/129702>

In JSCell::methodTable(), get the VM once and pass that along to
structure(VM&) instead of using the heavier structure().

In JSCell::methodTable(VM&), replace calls to structure() with
calls to structure(VM&).

Reviewed by Mark Hahnenberg.

* runtime/JSCellInlines.h:
(JSC::JSCell::methodTable):

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

6 years agoRemove unused StdDeviation from Gaussian Blur effect
cavalcantii@gmail.com [Tue, 4 Mar 2014 22:40:46 +0000 (22:40 +0000)]
Remove unused StdDeviation from Gaussian Blur effect
https://bugs.webkit.org/show_bug.cgi?id=129693

Reviewed by Simon Fraser.

No new tests, no change on behavior.

* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FEGaussianBlur.h:

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

6 years agoAdd a Document::updateStyleIfNeededForNode(Node&).
akling@apple.com [Tue, 4 Mar 2014 22:23:13 +0000 (22:23 +0000)]
Add a Document::updateStyleIfNeededForNode(Node&).
<https://webkit.org/b/129689>

Generalize the mechanism that computed style uses to avoid doing full
style updates when the node we're interested in isn't actually dirty.

Reviewed by Antti Koivisto.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Document.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::Document::updateStyleIfNeededForNode):
* dom/Document.h:
* editing/htmlediting.cpp:
(WebCore::isEditablePosition):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):

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

6 years agoWeb Inspector: Listen for the XPC_ERROR_CONNECTION_INVALID event to deref
commit-queue@webkit.org [Tue, 4 Mar 2014 22:15:16 +0000 (22:15 +0000)]
Web Inspector: Listen for the XPC_ERROR_CONNECTION_INVALID event to deref
https://bugs.webkit.org/show_bug.cgi?id=129697

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-04
Reviewed by Timothy Hatcher.

* inspector/remote/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection):
(Inspector::RemoteInspectorXPCConnection::handleEvent):

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

6 years agoMerge API shims and JSLock
mhahnenberg@apple.com [Tue, 4 Mar 2014 21:38:05 +0000 (21:38 +0000)]
Merge API shims and JSLock
https://bugs.webkit.org/show_bug.cgi?id=129650

Reviewed by Mark Lam.

Source/JavaScriptCore:

JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason
to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.

* API/APICallbackFunction.h:
(JSC::APICallbackFunction::call):
(JSC::APICallbackFunction::construct):
* API/APIShims.h: Removed.
* API/JSBase.cpp:
(JSEvaluateScript):
(JSCheckScriptSyntax):
(JSGarbageCollect):
(JSReportExtraMemoryCost):
(JSSynchronousGarbageCollectForDebugging):
* API/JSCallbackConstructor.cpp:
* API/JSCallbackFunction.cpp:
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::init):
(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):
(JSC::JSCallbackObject<Parent>::put):
(JSC::JSCallbackObject<Parent>::putByIndex):
(JSC::JSCallbackObject<Parent>::deleteProperty):
(JSC::JSCallbackObject<Parent>::construct):
(JSC::JSCallbackObject<Parent>::customHasInstance):
(JSC::JSCallbackObject<Parent>::call):
(JSC::JSCallbackObject<Parent>::getOwnNonIndexPropertyNames):
(JSC::JSCallbackObject<Parent>::getStaticValue):
(JSC::JSCallbackObject<Parent>::callbackGetter):
* API/JSContext.mm:
(-[JSContext setException:]):
(-[JSContext wrapperForObjCObject:]):
(-[JSContext wrapperForJSObject:]):
* API/JSContextRef.cpp:
(JSContextGroupRelease):
(JSContextGroupSetExecutionTimeLimit):
(JSContextGroupClearExecutionTimeLimit):
(JSGlobalContextCreateInGroup):
(JSGlobalContextRetain):
(JSGlobalContextRelease):
(JSContextGetGlobalObject):
(JSContextGetGlobalContext):
(JSGlobalContextCopyName):
(JSGlobalContextSetName):
* API/JSManagedValue.mm:
(-[JSManagedValue value]):
* API/JSObjectRef.cpp:
(JSObjectMake):
(JSObjectMakeFunctionWithCallback):
(JSObjectMakeConstructor):
(JSObjectMakeFunction):
(JSObjectMakeArray):
(JSObjectMakeDate):
(JSObjectMakeError):
(JSObjectMakeRegExp):
(JSObjectGetPrototype):
(JSObjectSetPrototype):
(JSObjectHasProperty):
(JSObjectGetProperty):
(JSObjectSetProperty):
(JSObjectGetPropertyAtIndex):
(JSObjectSetPropertyAtIndex):
(JSObjectDeleteProperty):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
(JSObjectIsFunction):
(JSObjectCallAsFunction):
(JSObjectCallAsConstructor):
(JSObjectCopyPropertyNames):
(JSPropertyNameArrayRelease):
(JSPropertyNameAccumulatorAddName):
* API/JSScriptRef.cpp:
* API/JSValue.mm:
(isDate):
(isArray):
(containerValueToObject):
(valueToArray):
(valueToDictionary):
(objectToValue):
* API/JSValueRef.cpp:
(JSValueGetType):
(JSValueIsUndefined):
(JSValueIsNull):
(JSValueIsBoolean):
(JSValueIsNumber):
(JSValueIsString):
(JSValueIsObject):
(JSValueIsObjectOfClass):
(JSValueIsEqual):
(JSValueIsStrictEqual):
(JSValueIsInstanceOfConstructor):
(JSValueMakeUndefined):
(JSValueMakeNull):
(JSValueMakeBoolean):
(JSValueMakeNumber):
(JSValueMakeString):
(JSValueMakeFromJSONString):
(JSValueCreateJSONString):
(JSValueToBoolean):
(JSValueToNumber):
(JSValueToStringCopy):
(JSValueToObject):
(JSValueProtect):
(JSValueUnprotect):
* API/JSVirtualMachine.mm:
(-[JSVirtualMachine addManagedReference:withOwner:]):
(-[JSVirtualMachine removeManagedReference:withOwner:]):
* API/JSWeakObjectMapRefPrivate.cpp:
* API/JSWrapperMap.mm:
(constructorHasInstance):
(makeWrapper):
(tryUnwrapObjcObject):
* API/ObjCCallbackFunction.mm:
(JSC::objCCallbackFunctionCallAsFunction):
(JSC::objCCallbackFunctionCallAsConstructor):
(objCCallbackFunctionForInvocation):
* CMakeLists.txt:
* ForwardingHeaders/JavaScriptCore/APIShims.h: Removed.
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGWorklist.cpp:
* heap/DelayedReleaseScope.h:
(JSC::DelayedReleaseScope::~DelayedReleaseScope):
* heap/HeapTimer.cpp:
(JSC::HeapTimer::timerDidFire):
(JSC::HeapTimer::timerEvent):
* heap/IncrementalSweeper.cpp:
* inspector/InjectedScriptModule.cpp:
(Inspector::InjectedScriptModule::ensureInjected):
* jsc.cpp:
(jscmain):
* runtime/GCActivityCallback.cpp:
(JSC::DefaultGCActivityCallback::doWork):
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::connect):
(JSC::JSGlobalObjectDebuggable::disconnect):
(JSC::JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend):
* runtime/JSLock.cpp:
(JSC::JSLock::lock):
(JSC::JSLock::didAcquireLock):
(JSC::JSLock::unlock):
(JSC::JSLock::willReleaseLock):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
* testRegExp.cpp:
(realMain):

Source/WebCore:

No new tests.

JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason
to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.

* bindings/js/DOMRequestState.h:
(WebCore::DOMRequestState::Scope::Scope):
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredWrapper::resolve):
(WebCore::DeferredWrapper::reject):
(WebCore::DeferredWrapper::resolve<String>):
(WebCore::DeferredWrapper::resolve<bool>):
(WebCore::char>>):
(WebCore::DeferredWrapper::reject<String>):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):

Source/WebKit/mac:

JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason
to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.

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

Source/WebKit2:

JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason
to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):

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

6 years agoUnreviewed, rolling out r164812.
commit-queue@webkit.org [Tue, 4 Mar 2014 21:30:59 +0000 (21:30 +0000)]
Unreviewed, rolling out r164812.
http://trac.webkit.org/changeset/164812
https://bugs.webkit.org/show_bug.cgi?id=129699

it made things run slower (Requested by pizlo on #webkit).

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jsc.cpp:
(GlobalObject::finishCreation):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):

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

6 years agoGetMyArgumentByVal in FTL
fpizlo@apple.com [Tue, 4 Mar 2014 21:27:37 +0000 (21:27 +0000)]
GetMyArgumentByVal in FTL
https://bugs.webkit.org/show_bug.cgi?id=128850

Reviewed by Oliver Hunt.

This would have been easy if the OSR exit compiler's arity checks hadn't been wrong.
They checked arity by doing "exec->argumentCount == codeBlock->numParameters", which
caused it to think that the arity check had failed if the caller had passed more
arguments than needed. This would cause the call frame copying to sort of go into
reverse (because the amount-by-which-we-failed-arity would have opposite sign,
throwing off a bunch of math) and the stack would end up being corrupted.

The bug was revealed by two existing tests although as far as I could tell, neither
test was intending to cover this case directly. So, I added a new test.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetMyArgumentsLength):
(JSC::FTL::LowerDFGToLLVM::compileGetMyArgumentByVal):
(JSC::FTL::LowerDFGToLLVM::compileCheckArgumentsNotCreated):
(JSC::FTL::LowerDFGToLLVM::checkArgumentsNotCreated):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* ftl/FTLState.h:
* tests/stress/exit-from-ftl-when-caller-passed-extra-args-then-use-function-dot-arguments.js: Added.
* tests/stress/ftl-get-my-argument-by-val-inlined-and-not-inlined.js: Added.
* tests/stress/ftl-get-my-argument-by-val-inlined.js: Added.
* tests/stress/ftl-get-my-argument-by-val.js: Added.

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

6 years agoREGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
bdakin@apple.com [Tue, 4 Mar 2014 20:22:03 +0000 (20:22 +0000)]
REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
https://bugs.webkit.org/show_bug.cgi?id=129691
-and corresponding-
<rdar://problem/15666846>

Reviewed by Simon Fraser.

This regression started happening after we adopted the setPresentationValue
ScrollbarPainter API which allows us to update the position of the scrollbar knob
from our secondary scrolling thread. The bug occurs when the scrollbar grows while
it still thinks it is in presentation-value mode. Whenever the scrollbar grows, it
should be in non-presentation value mode.

If the wheel event has ended or been cancelled, we can switch out of presentation
value mode.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):

Sometimes we will grow the scrollbar before we have received a wheel event with
the end or cancelled phase, and so automatically switch out of presentation-value
mode whenever we start one of these animations.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):

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

6 years agoMove Source/WebCore/html/track/ code to std::unique_ptr
zandobersek@gmail.com [Tue, 4 Mar 2014 20:15:38 +0000 (20:15 +0000)]
Move Source/WebCore/html/track/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129666

Reviewed by Eric Carlson.

Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/track/ with std::unique_ptr.

* html/track/AudioTrack.h:
* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
* html/track/InbandWebVTTTextTrack.h:
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired):
(WebCore::LoadableTextTrack::newCuesAvailable):
(WebCore::LoadableTextTrack::cueLoadingCompleted):
(WebCore::LoadableTextTrack::newRegionsAvailable):
* html/track/LoadableTextTrack.h:
* html/track/TextTrack.h:
* html/track/TextTrackCue.h:
* html/track/TextTrackRegion.h:
* html/track/VTTCue.cpp:
(WebCore::VTTCue::createWebVTTNodeTree):
(WebCore::VTTCue::markFutureAndPastNodes):
* html/track/VTTCue.h:
* html/track/VideoTrack.h:
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::WebVTTParser):
* html/track/WebVTTParser.h:
* html/track/WebVTTTokenizer.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData):
* loader/TextTrackLoader.h:

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

6 years ago[GTK] Build the Udis86 disassembler
zandobersek@gmail.com [Tue, 4 Mar 2014 20:12:01 +0000 (20:12 +0000)]
[GTK] Build the Udis86 disassembler
https://bugs.webkit.org/show_bug.cgi?id=129679

Reviewed by Michael Saboff.

.:

* GNUmakefile.am: Add the Udis86_nosources variable.
* Source/cmake/OptionsGTK.cmake: Enable the Udis86 disassembler.

Source/JavaScriptCore:

* GNUmakefile.am: Generate the Udis86-related derived sources. Distribute the required files.
* GNUmakefile.list.am: Add the Udis86 disassembler files to the build.

Source/WTF:

* wtf/Platform.h: Also enable the Udis86 disassembler for the GTK port on Linux.

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

6 years agoFix too-narrow assertion I added in r165054.
akling@apple.com [Tue, 4 Mar 2014 19:56:01 +0000 (19:56 +0000)]
Fix too-narrow assertion I added in r165054.

It's okay for a 1-character string to come in here. This will happen
if the VM small string optimization doesn't apply (ch > 0xFF)

* runtime/JSString.h:
(JSC::jsStringWithWeakOwner):

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

6 years agoSubpixel rendering: Make border-radius painting device pixel aware.
zalan@apple.com [Tue, 4 Mar 2014 19:53:26 +0000 (19:53 +0000)]
Subpixel rendering: Make border-radius painting device pixel aware.
https://bugs.webkit.org/show_bug.cgi?id=129558

Reviewed by Simon Fraser.

Snap rounded rects to device pixels right before passing them to GraphicsContext.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipRoundedInnerRect):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::paintBorder):
* rendering/RenderBoxModelObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):

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

6 years agoCrashes and assertions running iOS compositing tests
simon.fraser@apple.com [Tue, 4 Mar 2014 19:43:49 +0000 (19:43 +0000)]
Crashes and assertions running iOS compositing tests
https://bugs.webkit.org/show_bug.cgi?id=129688

Reviewed by Dean Jackson.

When a layer is no longer composited, we need to unregister it
from the scrolling coordinator, and remove it from m_scrollCoordinatedLayers.

Tested by compositing tests on iOS.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):

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

6 years ago[CSS Shapes] Add test for adjusted lineTop position between left and right shape...
zoltan@webkit.org [Tue, 4 Mar 2014 19:31:35 +0000 (19:31 +0000)]
[CSS Shapes] Add test for adjusted lineTop position between left and right shape-outside floats
https://bugs.webkit.org/show_bug.cgi?id=128696

Reviewed by David Hyatt.

* fast/shapes/shape-outside-floats/shape-outside-floats-linetop-adjusted-between-left-right-floats-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-linetop-adjusted-between-left-right-floats.html: Added.

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

6 years agoUpdate bindings test results after r165046.
antti@apple.com [Tue, 4 Mar 2014 19:11:51 +0000 (19:11 +0000)]
Update bindings test results after r165046.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_set_reflected_string_attr):
(webkit_dom_test_obj_set_reflected_url_attr):
(webkit_dom_test_obj_set_reflected_custom_url_attr):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj setReflectedStringAttr:]):
(-[DOMTestObj setReflectedURLAttr:]):
(-[DOMTestObj setReflectedCustomURLAttr:]):

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

6 years agoUnreviewed gardening. Skip inspector tests that are still flaky.
bburg@apple.com [Tue, 4 Mar 2014 19:01:39 +0000 (19:01 +0000)]
Unreviewed gardening. Skip inspector tests that are still flaky.

Skip inspector-protocol/dom/dom-search-crash.html (tracked by https://webkit.org/b/129639).
Skip inspector/test-harness-trivially-works.html (tracked by https://webkit.org/b/129642).

* TestExpectations:

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

6 years ago[GTK] Simplify the GObject DOM bindings API break check into one step
mrobinson@webkit.org [Tue, 4 Mar 2014 18:43:54 +0000 (18:43 +0000)]
[GTK] Simplify the GObject DOM bindings API break check into one step
https://bugs.webkit.org/show_bug.cgi?id=129571

Reviewed by Carlos Garcia Campos.

.:

* Source/PlatformGTK.cmake: We don't need to run the API break check before gtkdoc generation.
Add the check to 'make check.'

Source/WebCore:

* bindings/gobject/GNUmakefile.am: We no longer generate the webkitdom.symbols file in the
DerivedSources directory. All the logic is handled internally in the script now.
* bindings/scripts/gobject-run-api-break-test: Removed.

Tools:

* GNUmakefile.am: Add the API break check to 'make check.'
* gtk/check-for-webkitdom-api-breaks: Added. A combination of the two removed scripts.
* gtk/check-gdom-symbols: Removed.
* gtk/webkitdom.py: Added.
(header_name_list_from_gtkdoc_config_file): Gets the names of all headers from the gtkdoc config file.
(get_all_webkitdom_symbol_files): Find the symbol files from the names.

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

6 years ago[GTK][CMake] ENABLE_NAVIGATOR_CONTENT_UTILS is mistakenly enabled for the CMake build
mrobinson@webkit.org [Tue, 4 Mar 2014 18:20:23 +0000 (18:20 +0000)]
[GTK][CMake] ENABLE_NAVIGATOR_CONTENT_UTILS is mistakenly enabled for the CMake build
https://bugs.webkit.org/show_bug.cgi?id=129502

Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsGTK.cmake: Disable the option for GTK+.

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

6 years agoBuild fix for iOS.
zalan@apple.com [Tue, 4 Mar 2014 18:05:42 +0000 (18:05 +0000)]
Build fix for iOS.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::addRoundedBorderClip):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):

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

6 years agoSubpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup...
zalan@apple.com [Tue, 4 Mar 2014 17:06:50 +0000 (17:06 +0000)]
Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
https://bugs.webkit.org/show_bug.cgi?id=129557

Reviewed by Simon Fraser.

This is the preparation for snapping rounded rects to device pixel position. It enables
device pixel aware border-radius painting.

No change in functionality.

Source/WebCore:

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaSliderThumb):
* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::isRenderable):
* platform/graphics/FloatRoundedRect.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clipRoundedRect):
(WebCore::GraphicsContext::clipOutRoundedRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):
* platform/graphics/Path.h:
* platform/graphics/RoundedRect.cpp:
(WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
* platform/graphics/RoundedRect.h:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawRectShadow):
(WebCore::ShadowBlur::drawInsetShadow):
(WebCore::ShadowBlur::drawRectShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
(WebCore::ShadowBlur::drawRectShadowWithTiling):
* platform/graphics/ShadowBlur.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::platformFillRoundedRect):
(WebCore::GraphicsContext::fillRectWithRoundedHole):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::fillRoundedRect):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::borderRadiiFromStyle):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaSliderThumb):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::pushContentsClip):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::clipRoundedInnerRect):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
(WebCore::RenderBoxModelObject::paintBoxShadow):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintRadioDecorations):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
(WebCore::RenderThemeIOS::paintSliderTrack):
(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintSliderTrack):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):
* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::buildDisplayPaths):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInset::path):

Source/WebKit/win:

* FullscreenVideoController.cpp:
(HUDSlider::draw):
(FullscreenVideoController::draw):

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

6 years agoMicro-optimize Strings in JS bindings.
akling@apple.com [Tue, 4 Mar 2014 17:05:26 +0000 (17:05 +0000)]
Micro-optimize Strings in JS bindings.
<https://webkit.org/b/129673>

Source/JavaScriptCore:

Make jsStringWithWeakOwner() take a StringImpl& instead of a String.
This avoids branches in length() and operator[].

Also call JSString::create() directly instead of jsString() and just
assert that the string length is >1. This way we don't duplicate the
optimizations for empty and single-character strings.

Reviewed by Ryosuke Niwa.

* runtime/JSString.h:
(JSC::jsStringWithWeakOwner):

Source/WebCore:

Tweaked for new jsStringWithWeakOwner signature. This patch removes
36 bytes of code from every wrapper getter that returns a DOMString.

Reviewed by Ryosuke Niwa.

* bindings/js/JSDOMBinding.h:
(WebCore::jsStringWithCache):

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

6 years agoSVGPropertyTearOffs should detachChildren before deleting its value.
ddkilzer@apple.com [Tue, 4 Mar 2014 17:02:05 +0000 (17:02 +0000)]
SVGPropertyTearOffs should detachChildren before deleting its value.
<http://webkit.org/b/129618>
<rdar://problem/15661617>

Reviewed by Maciej Stachowiak.

Merged from Blink (patch by kouhei@chromium.org):
https://src.chromium.org/viewvc/blink?revision=158563&view=revision
http://crbug.com/296276

Test: svg/transforms/svg-matrix-tearoff-crash.html

NOTE: The test does not reproduce a crash on WebKit using
JavaScriptCore.

* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::setValue):
(WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
- Call detachChildren() if m_value is a copy.  The original
  Blink patch did not modify the destructor code path, although
  that seems obvious via code inspection.

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

6 years agoWeb Inspector: Remove WebInspector.EventHandler in favor of WebInspector.EventListenerSet
commit-queue@webkit.org [Tue, 4 Mar 2014 16:32:19 +0000 (16:32 +0000)]
Web Inspector: Remove WebInspector.EventHandler in favor of WebInspector.EventListenerSet
https://bugs.webkit.org/show_bug.cgi?id=129185

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-03-04
Reviewed by Timothy Hatcher.

* UserInterface/Base/EventHandler.js: Removed.
* UserInterface/Main.html: Don't include EventHandler.js.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):
Use EventListenerSet instead of EventHandler.

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

6 years ago[WK2] Selection remains after reload.
enrica@apple.com [Tue, 4 Mar 2014 16:22:30 +0000 (16:22 +0000)]
[WK2] Selection remains after reload.
https://bugs.webkit.org/show_bug.cgi?id=129648
<rdar://problem/16207547>

Reviewed by Sam Weinig.

We normally clear the selection when resigninig first responder but
that doesn't get called when reloading the page or when navigating with
back/forward buttons. The correct place to do this is when we get
_didCommitLoadForMainFrame where we already stop assisting the node.
The method we call into webselectionassistant is resignedFirstResponder
which takes care of clearing the selection and removing the selection view.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _stopAssistingNode]):

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

6 years agoSubpixel rendering: Incorrect repaint rect cuts off content's right edge after move.
zalan@apple.com [Tue, 4 Mar 2014 16:17:46 +0000 (16:17 +0000)]
Subpixel rendering: Incorrect repaint rect cuts off content's right edge after move.
https://bugs.webkit.org/show_bug.cgi?id=129652

Reviewed by Simon Fraser.

When repaint rect is adjusted in order to take the distance from renderer into account,
the accumulated fraction value need to be added too. This is always a positive value.

Source/WebCore:

Test: fast/borders/hidpi-border-clipping-right-after-move.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

LayoutTests:

* fast/borders/hidpi-border-clipping-right-after-move-expected.html: Added.
* fast/borders/hidpi-border-clipping-right-after-move.html: Added.

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

6 years agoRemove unused member variable of NetworkInfoController
ryuan.choi@samsung.com [Tue, 4 Mar 2014 13:19:34 +0000 (13:19 +0000)]
Remove unused member variable of NetworkInfoController
https://bugs.webkit.org/show_bug.cgi?id=129674

Reviewed by Gyuyoung Kim.

* Modules/networkinfo/NetworkInfoController.cpp:
(WebCore::NetworkInfoController::NetworkInfoController):
(WebCore::NetworkInfoController::create):
(WebCore::provideNetworkInfoTo):
* Modules/networkinfo/NetworkInfoController.h: Removed m_page which is not really used.

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

6 years ago[CSS Grid Layout] Percentages of indefinite sizes should compute to auto
svillar@igalia.com [Tue, 4 Mar 2014 12:36:20 +0000 (12:36 +0000)]
[CSS Grid Layout] Percentages of indefinite sizes should compute to auto
https://bugs.webkit.org/show_bug.cgi?id=128173

Reviewed by Darin Adler.

Source/WebCore:

We should treat percentages of indefinite sizes as auto as
mandated by the spec. Otherwise we would end up calculating a
percentage of -1, the value we use to represent infinite.

Added some test cases to the current tests.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridTrackSize):
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::isPercentage):

LayoutTests:

Added a grid with indefinite sizes to check that we use auto to
compute the track breadths instead of the specified percentages.

* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-element-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
* fast/css-grid-layout/resources/grid.css:
(.indefiniteSizeGrid):

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

6 years agoImplement Number.prototype.clz()
dbatyai.u-szeged@partner.samsung.com [Tue, 4 Mar 2014 11:27:13 +0000 (11:27 +0000)]
Implement Number.prototype.clz()
https://bugs.webkit.org/show_bug.cgi?id=129479

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Implemented Number.prototype.clz() as specified in the ES6 standard.

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

LayoutTests:

Added/updated tests to account for Number.prototype.clz().

* js/number-clz.html: Added.
* js/number-clz-expected.txt: Added.
* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/number-clz.js: Added.
* js/script-tests/Object-getOwnPropertyNames.js:

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

6 years agoDon't synchronize attributes in reflect setters when we don't need to
rniwa@webkit.org [Tue, 4 Mar 2014 10:48:48 +0000 (10:48 +0000)]
Don't synchronize attributes in reflect setters when we don't need to
https://bugs.webkit.org/show_bug.cgi?id=129662

Reviewed by Andreas Kling.

The vast majority of attributes don't need synchronization. Avoid calling synchronizeAttribute in setters
for those content attributes generated by "Reflect" keyword in IDL.

* bindings/scripts/CodeGenerator.pm:
(SetterExpression):
* dom/Element.cpp:
(WebCore::Element::setAttributeWithoutSynchronization): Added.
* dom/Element.h:

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

6 years agoRemove Document::idAttributeName().
akling@apple.com [Tue, 4 Mar 2014 10:28:38 +0000 (10:28 +0000)]
Remove Document::idAttributeName().
<https://webkit.org/b/129663>

Reviewed by Ryosuke "DYEB" Niwa.

This abstraction is not actually used and causes unnecessary indirection
in some pretty hot code paths.

Replace it with hard-coded HTMLNames::idAttr instead which is a compile
time constant pointer. We can revisit this in the future if we wish to
implement support for custom id attributes.

* dom/Attr.cpp:
(WebCore::Attr::isId):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::willModifyAttribute):
* dom/Element.h:
(WebCore::Element::getIdAttribute):
(WebCore::Element::getNameAttribute):
(WebCore::Element::setIdAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseAttribute):
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeChanged):
(WebCore::SVGElement::isKnownAttribute):
(WebCore::SVGElement::svgAttributeChanged):

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

6 years agoREGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore...
rniwa@webkit.org [Tue, 4 Mar 2014 09:45:55 +0000 (09:45 +0000)]
REGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore::StyledElement::attributeChanged
https://bugs.webkit.org/show_bug.cgi?id=129550

Reviewed by Andreas Kling.

Source/WebCore:

We can't store a reference to QualifiedName here because ensureUniqueElementData could delete QualifiedName inside Attribute.

Test: fast/dom/uniquing-attributes-via-setAttribute.html

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

LayoutTests:

Added a regression test.

* fast/dom/uniquing-attributes-via-setAttribute-expected.txt: Added.
* fast/dom/uniquing-attributes-via-setAttribute.html: Added.

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

6 years agoMove EvasGLContext and EvasGLSurface files into the efl common directory.
commit-queue@webkit.org [Tue, 4 Mar 2014 08:26:28 +0000 (08:26 +0000)]
Move EvasGLContext and EvasGLSurface files into the efl common directory.
https://bugs.webkit.org/show_bug.cgi?id=129603

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-03-04
Reviewed by Gyuyoung Kim.

Source/WebCore:

EFL port will use EvasGLContext and EvasGLSurface files in both WK1 and WK2.

No new tests, just refactorings.

* PlatformEfl.cmake:
* platform/graphics/efl/EvasGLContext.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp.
(WebKit::EvasGLContext::EvasGLContext):
(WebKit::EvasGLContext::~EvasGLContext):
* platform/graphics/efl/EvasGLContext.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.h.
(WebKit::EvasGLContext::create):
(WebKit::EvasGLContext::context):
* platform/graphics/efl/EvasGLSurface.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp.
(WebKit::EvasGLSurface::EvasGLSurface):
(WebKit::EvasGLSurface::~EvasGLSurface):
* platform/graphics/efl/EvasGLSurface.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h.
(WebKit::EvasGLSurface::create):
(WebKit::EvasGLSurface::surface):

Source/WebKit2:

* PlatformEfl.cmake: Update for removed files.

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

6 years ago[GTK] Fix some simple gtkdoc warnings for WebKit1
mrobinson@webkit.org [Tue, 4 Mar 2014 07:36:02 +0000 (07:36 +0000)]
[GTK] Fix some simple gtkdoc warnings for WebKit1
https://bugs.webkit.org/show_bug.cgi?id=129659

Reviewed by Carlos Garcia Campos.

* docs/webkitgtk-sections.txt: Make public some enum documentation that is used
in public APIs.
* webkit/webkitwebview.cpp: Fix typos and add documentation for enums previously
marked as private.
(webkit_web_view_class_init):
* webkit/webkitwebview.h: Ditto.

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

6 years agoFix the GTK+ CMake build
mrobinson@webkit.org [Tue, 4 Mar 2014 07:35:38 +0000 (07:35 +0000)]
Fix the GTK+ CMake build

* PlatformGTK.cmake: Add a missing file to the source list.

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

6 years agoWeb Inspector: Avoid too early deref caused by RemoteInspectorXPCConnection::close
commit-queue@webkit.org [Tue, 4 Mar 2014 06:57:59 +0000 (06:57 +0000)]
Web Inspector: Avoid too early deref caused by RemoteInspectorXPCConnection::close
https://bugs.webkit.org/show_bug.cgi?id=129631

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-03
Reviewed by Timothy Hatcher.

Avoid deref() too early if a client calls close(). The xpc_connection_close
will cause another XPC_ERROR event to come in from the queue, deref then.
Likewise, protect multithreaded access to m_client. If a client calls
close() we want to immediately clear the pointer to prevent calls to it.

Overall the multi-threading aspects of RemoteInspectorXPCConnection are
growing too complicated for probably little benefit. We may want to
clean this up later.

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::xpcConnectionFailed):
* inspector/remote/RemoteInspectorXPCConnection.h:
* inspector/remote/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection):
(Inspector::RemoteInspectorXPCConnection::close):
(Inspector::RemoteInspectorXPCConnection::closeOnQueue):
(Inspector::RemoteInspectorXPCConnection::deserializeMessage):
(Inspector::RemoteInspectorXPCConnection::handleEvent):
(Inspector::RemoteInspectorXPCConnection::sendMessage):

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

6 years agoWeb Inspector: Match color of regex in source view with a popover
commit-queue@webkit.org [Tue, 4 Mar 2014 06:52:56 +0000 (06:52 +0000)]
Web Inspector: Match color of regex in source view with a popover
https://bugs.webkit.org/show_bug.cgi?id=129645

Patch by Jonathan Wells <jonowells@apple.com> on 2014-03-03
Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.css:
(.console-formatted-string):
(.console-formatted-regexp):

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

6 years agoAbstractMacroAssembler::CachedTempRegister should start out invalid
msaboff@apple.com [Tue, 4 Mar 2014 06:38:09 +0000 (06:38 +0000)]
AbstractMacroAssembler::CachedTempRegister should start out invalid
https://bugs.webkit.org/show_bug.cgi?id=129657

Reviewed by Filip Pizlo.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::AbstractMacroAssembler):
- Invalidate all cached registers in constructor as we don't know the
  contents of any register at the entry to the code we are going to
  generate.

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

6 years ago:active style is not cleared when its display property is set to none before mouse...
commit-queue@webkit.org [Tue, 4 Mar 2014 06:37:43 +0000 (06:37 +0000)]
:active style is not cleared when its display property is set to none before mouse released.
https://bugs.webkit.org/show_bug.cgi?id=129465

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2014-03-03
Reviewed by Antonio Gomes.

Source/WebCore:

We currently clearing the :active style when element has a renderer.
This patch makes elements clear its active style regardless of renderer.

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

LayoutTests:

* fast/css/active-display-none-expected.txt: Added.
* fast/css/active-display-none.html: Added.

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

6 years agoStructureOrOffset should be fastmalloced.
akling@apple.com [Tue, 4 Mar 2014 04:21:39 +0000 (04:21 +0000)]
StructureOrOffset should be fastmalloced.
<https://webkit.org/b/129640>

Reviewed by Geoffrey Garen.

* runtime/StructureIDTable.h:

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

6 years agoUse DYEBench v0.9 by default.
rniwa@webkit.org [Tue, 4 Mar 2014 04:11:17 +0000 (04:11 +0000)]
Use DYEBench v0.9 by default.

Rubber-stamped by Benjamin Poulain.

* perf/DoYouEvenBench/index.html:

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

6 years ago[iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead...
benjamin@webkit.org [Tue, 4 Mar 2014 03:24:32 +0000 (03:24 +0000)]
[iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
https://bugs.webkit.org/show_bug.cgi?id=129649

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-03
Reviewed by Sam Weinig.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
from the UI.

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

6 years ago[iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
benjamin@webkit.org [Tue, 4 Mar 2014 03:23:58 +0000 (03:23 +0000)]
[iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
https://bugs.webkit.org/show_bug.cgi?id=129641

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-03
Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
did not match the actual WKContentView's area on screen.

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

6 years agoRemove 2 unnecessary includes from JSDOMBinding.h
akling@apple.com [Tue, 4 Mar 2014 02:22:13 +0000 (02:22 +0000)]
Remove 2 unnecessary includes from JSDOMBinding.h
<https://webkit.org/b/129619>

Reviewed by Antti Koivisto.

* bindings/js/JSDOMBinding.h:

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

6 years agoGraphicsContext::drawLineForText needs to be exported from WebCore.dylib for iOS...
mmaxfield@apple.com [Tue, 4 Mar 2014 02:00:02 +0000 (02:00 +0000)]
GraphicsContext::drawLineForText needs to be exported from WebCore.dylib for iOS builds
https://bugs.webkit.org/show_bug.cgi?id=129647

Reviewed by NOBODY (This is a build fix).

Fixing after r165025 and r165016.

No new tests as this is a build fix.

* WebCore.exp.in:

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

6 years ago[iOS] Start playback button misplaced
jer.noble@apple.com [Tue, 4 Mar 2014 01:53:38 +0000 (01:53 +0000)]
[iOS] Start playback button misplaced
https://bugs.webkit.org/show_bug.cgi?id=129628

Reviewed by Simon Fraser.

On YouTube embeds, while the video is loading it is placed into the DOM with a 0x0 size.
This causes the start playback button to be visible in the upper-left corner of the embed
area. The button wasn't visible previously (in plugin mode) because the plugin clipped its
drawing to its bounds, and so the <video> shadow should do the same.

* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls):

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

6 years agoBuild fix for iOS simulator.
enrica@apple.com [Tue, 4 Mar 2014 01:45:32 +0000 (01:45 +0000)]
Build fix for iOS simulator.

* WebCore.exp.in:

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

6 years agoForward application suspend resume notifications to the web process.
commit-queue@webkit.org [Tue, 4 Mar 2014 01:29:41 +0000 (01:29 +0000)]
Forward application suspend resume notifications to the web process.
https://bugs.webkit.org/show_bug.cgi?id=129356

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-03-03
Reviewed by Eric Carlson.

Source/WebCore:

* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper initWithCallback:]):
Observe UIApplicationDidBecomeActiveNotification,
WebUIApplicationDidBecomeActiveNotification,
WebUIApplicationWillEnterForegroundNotification, and
WebUIApplicationWillResignActiveNotification

(-[WebMediaSessionHelper applicationDidBecomeActive:]):
Resume session.

Source/WebKit2:

Repost UIApplicationWillEnterForegroundNotification,
UIApplicationDidBecomeActiveNotification and
UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
As WebUIApplicationWillEnterForegroundNotification,
WebUIApplicationDidBecomeActiveNotification, and
WebUIApplicationWillResignActiveNotification

* UIProcess/WebPageProxy.h:
Add applicationWillEnterForeground()
applicationWillResignActive()
applicationDidBecomeActive()

* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
Observe notifications.

(-[WKContentView dealloc]):
Stop observing notifications.

(-[WKContentView _applicationWillResignActive:]):
Notify WebPageProxy of the event.

(-[WKContentView _applicationWillEnterForeground:]):
Notify WebPageProxy of the event.

(-[WKContentView _applicationDidBecomeActive:]):
Notify WebPageProxy of the event.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationWillEnterForeground):
Send corresponding Message to WebPage.

(WebKit::WebPageProxy::applicationWillResignActive):
Send corresponding Message to WebPage.

(WebKit::WebPageProxy::applicationDidBecomeActive):
Send corresponding Message to WebPage.

* WebProcess/WebPage/WebPage.h:
Add applicationWillEnterForeground()
applicationWillResignActive()
applicationDidBecomeActive()

* WebProcess/WebPage/WebPage.messages.in:
Add applicationWillEnterForeground()
applicationWillResignActive()
applicationDidBecomeActive()

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillResignActive):
Post corresponding NSNotification.

(WebKit::WebPage::applicationWillEnterForeground):
Post corresponding NSNotification.

(WebKit::WebPage::applicationDidBecomeActive):
Post corresponding NSNotification.

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

6 years agoUnreviewed, rolling out r165013.
commit-queue@webkit.org [Tue, 4 Mar 2014 01:22:01 +0000 (01:22 +0000)]
Unreviewed, rolling out r165013.
http://trac.webkit.org/changeset/165013
https://bugs.webkit.org/show_bug.cgi?id=129646

New code is not thread safe, asserting on a worker test
(Requested by ap on #webkit).

Source/WebCore:

* WebCore.exp.in:
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::~CachedResource):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::CachedSVGDocument):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::CachedTextTrack):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForURL):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::evict):
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::removeUrlFromCache):
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromCacheImpl):
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
(WebCore::MemoryCache::getStatistics):
(WebCore::MemoryCache::setDisabled):
* loader/cache/MemoryCache.h:
* platform/CrossThreadCopier.cpp:
* platform/CrossThreadCopier.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/DiskCacheMonitor.h:
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:

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

6 years agoWeb Inspector: Better Debugger popovers for RegExp values
commit-queue@webkit.org [Tue, 4 Mar 2014 01:20:54 +0000 (01:20 +0000)]
Web Inspector: Better Debugger popovers for RegExp values
https://bugs.webkit.org/show_bug.cgi?id=129633

Patch by Jonathan Wells <jonowells@apple.com> on 2014-03-03
Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression.populate):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp):

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

6 years agoFix the iOS Simulator build.
weinig@apple.com [Tue, 4 Mar 2014 01:20:31 +0000 (01:20 +0000)]
Fix the iOS Simulator build.

* WebCore.exp.in:

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

6 years ago[iOS WebKit2]: Text fields don't zoom in when focused
enrica@apple.com [Tue, 4 Mar 2014 01:00:00 +0000 (01:00 +0000)]
[iOS WebKit2]: Text fields don't zoom in when focused
https://bugs.webkit.org/show_bug.cgi?id=129632
<rdar://problem/16185230>

Reviewed by Benjamin Poulain.

When focusing the node we need to zoom and center it and possibly
scroll to make it visible.
On iPad we only scroll, without zooming.

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView _startAssistingNode:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):

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

6 years agoCrash in JIT code while watching a video @ storyboard.tumblr.com
msaboff@apple.com [Tue, 4 Mar 2014 00:49:19 +0000 (00:49 +0000)]
Crash in JIT code while watching a video @ storyboard.tumblr.com
https://bugs.webkit.org/show_bug.cgi?id=129635

Reviewed by Filip Pizlo.

Clear m_set before we set bits in the TempRegisterSet(const RegisterSet& other)
construtor.

* jit/TempRegisterSet.cpp:
(JSC::TempRegisterSet::TempRegisterSet): Clear map before setting it.
* jit/TempRegisterSet.h:
(JSC::TempRegisterSet::TempRegisterSet): Use new clearAll() helper.
(JSC::TempRegisterSet::clearAll): New private helper.

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

6 years agoFix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
weinig@apple.com [Tue, 4 Mar 2014 00:44:02 +0000 (00:44 +0000)]
Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch

Reviewed by Simon Fraser.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitializeAccessibility):

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

6 years agoDon't try to parse legacy CSS gradients -- we don't support them.
timothy@apple.com [Tue, 4 Mar 2014 00:08:37 +0000 (00:08 +0000)]
Don't try to parse legacy CSS gradients -- we don't support them.

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

Reviewed by Joseph Pecoraro.

* UserInterface/Models/Gradient.js:
(WebInspector.Gradient.stopsWithComponents): Fix a possible exception on malformed stops.
(WebInspector.LinearGradient.linearGradientWithComponents): Return early for legacy gradients.

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

6 years agoSpace between double underlines does not scale with font size
mmaxfield@apple.com [Mon, 3 Mar 2014 23:49:27 +0000 (23:49 +0000)]
Space between double underlines does not scale with font size
https://bugs.webkit.org/show_bug.cgi?id=129521

Reviewed by Simon Fraser.

Source/WebCore:

This patch moves the logic about how far to draw the second underline (when text-decoration-style: double
is specified) from InlineTextBox to GraphicsContext, because GraphicsContext is the authoritative source
about how thick underlines should be. The space between the two underlines is set to the thickness of
each of the underlines.

This patch also deletes some unused code in InlineTextBox that was never getting triggered, in addition
to unifying drawLineForText with drawLinesForText. This didn't have any performance impact in my testing.

Test: fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html

* platform/graphics/GraphicsContext.h: drawLineForText takes a boolean for if we should draw double
underlines.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::drawLinesForText):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawLineForText):
* rendering/InlineTextBox.cpp: Use new boolean argument
(WebCore::drawSkipInkUnderline):
(WebCore::InlineTextBox::paintDecoration):

LayoutTests:

This test renders large text with a double underline, but then barely clips off the bottom underline
using overflow: hidden. It makes sure that this is exactly the same as a single underline. If the
space between the two underlines does not scale with font size, it will appear as though there is a
single thick underline (because they will be drawn on top of each other) and will thus fail this test.

* fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html: Added.

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

6 years agoComposited masks not working on iOS after r164890
simon.fraser@apple.com [Mon, 3 Mar 2014 23:36:20 +0000 (23:36 +0000)]
Composited masks not working on iOS after r164890
https://bugs.webkit.org/show_bug.cgi?id=129630

Reviewed by Jer Noble.

Fix typo in UIView-related masks code; set the mask layer
on the view, not the maskView.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):

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

6 years agoAX: Support IOS Accessibility in WK2
cfleizach@apple.com [Mon, 3 Mar 2014 23:30:09 +0000 (23:30 +0000)]
AX: Support IOS Accessibility in WK2
https://bugs.webkit.org/show_bug.cgi?id=129527

Reviewed by Sam Weinig.

Source/WebCore:

Update the iOS wrapper so that it can convert points to screen space in WebKit2.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):

Source/WebKit2:

Implement enough AX hooks so that accessibility can work in WebKit2.

* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::identifier):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _updateForScreen:]):
(-[WKContentView _setAccessibilityWebProcessToken:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _didRelaunchProcess]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
(-[WKAccessibilityWebPageObject init]):
(-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
(-[WKAccessibilityWebPageObject pageScale]):
(-[WKAccessibilityWebPageObject dealloc]):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::platformInitializeAccessibility):
(WebKit::WebPage::accessibilityObjectForMainFramePlugin):
(WebKit::WebPage::registerUIProcessAccessibilityTokens):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
(-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
(-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
(-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
(-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
(-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
(-[WKAccessibilityWebPageObject accessibilityActionNames]):
(-[WKAccessibilityWebPageObject accessibilityChildren]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
(-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeProcess):

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

6 years agoAdd support for sessions to MemoryCache.
commit-queue@webkit.org [Mon, 3 Mar 2014 23:07:50 +0000 (23:07 +0000)]
Add support for sessions to MemoryCache.
https://bugs.webkit.org/show_bug.cgi?id=127794

Patch by Martin Hock <mhock@apple.com> on 2014-03-03
Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
* html/DOMURL.cpp:
(WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR): Ditto.
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp: Ditto.
(WebCore::CachedFont::CachedFont):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp: Ditto.
(WebCore::CachedImage::CachedImage):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp: Ditto.
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp: Ditto.
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::sessionID):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource): Constructors take sessionID.
(WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
(WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
(WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
(WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
(WebCore::CachedSVGDocument::CachedSVGDocument):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp: Ditto.
(WebCore::CachedScript::CachedScript):
* loader/cache/CachedScript.h:
* loader/cache/CachedTextTrack.cpp: Ditto.
(WebCore::CachedTextTrack::CachedTextTrack):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp: Ditto.
(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
* loader/cache/CachedXSLStyleSheet.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
(WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
(WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
(WebCore::MemoryCache::resourceForURL): Ditto.
(WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
(WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
(WebCore::MemoryCache::addImageToCache): Use default sessionID.
(WebCore::MemoryCache::removeImageFromCache): Ditto.
(WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
(WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::getOriginsWithCache): Ditto.
(WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
(WebCore::MemoryCache::removeRequestFromCache): Ditto.
(WebCore::MemoryCache::removeRequestFromCacheImpl): Ditto.
(WebCore::MemoryCache::removeRequestFromSessionCaches): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
(WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
(WebCore::MemoryCache::setDisabled): Ditto.
* loader/cache/MemoryCache.h: Create another level for cache.
* platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
(WebCore::SessionID>::copy):
* platform/CrossThreadCopier.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
(WebKit::NetworkResourceLoader::sessionID):
* NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
* WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/Network/NetworkProcessConnection.h: Ditto.
* WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.

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

6 years agoRemove an innocuous error message and support default views for Resource and Debugger...
timothy@apple.com [Mon, 3 Mar 2014 23:04:55 +0000 (23:04 +0000)]
Remove an innocuous error message and support default views for Resource and Debugger sidebars.

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

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): Added.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView): Added.
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Don't log an error
if the tree element isn't a Script. We try to find any represented object, and it can fail.

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

6 years agoAdd Jeremy Jones to the contributors list as a contributor.
simon.fraser@apple.com [Mon, 3 Mar 2014 22:42:28 +0000 (22:42 +0000)]
Add Jeremy Jones to the contributors list as a contributor.

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

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

6 years agoRemove unused DataView code from JSDOMBinding.h
akling@apple.com [Mon, 3 Mar 2014 22:34:35 +0000 (22:34 +0000)]
Remove unused DataView code from JSDOMBinding.h
<https://webkit.org/b/129616>

Reviewed by Antti Koivisto.

* bindings/js/JSDOMBinding.h:

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

6 years ago[x86] Improve code generation of byte test
benjamin@webkit.org [Mon, 3 Mar 2014 22:28:16 +0000 (22:28 +0000)]
[x86] Improve code generation of byte test
https://bugs.webkit.org/show_bug.cgi?id=129597

Reviewed by Geoffrey Garen.

When possible, test the 8 bit register to itself instead of comparing it
to a literal.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::test32):

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

6 years agoWeb Inspector: debugger statements do not break.
mark.lam@apple.com [Mon, 3 Mar 2014 22:12:10 +0000 (22:12 +0000)]
Web Inspector: debugger statements do not break.
<https://webkit.org/b/129524>

Reviewed by Geoff Garen.

Source/JavaScriptCore:

Since we no longer call op_debug hooks unless there is a debugger request
made on the CodeBlock, the op_debug for the debugger statement never gets
serviced.

With this fix, we check in the CodeBlock constructor if any debugger
statements are present.  If so, we set a m_hasDebuggerStatement flag that
causes the CodeBlock to show as having debugger requests.  Hence,
breaking at debugger statements is now restored.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasDebuggerRequests):
(JSC::CodeBlock::clearDebuggerRequests):

LayoutTests:

* inspector-protocol/debugger/debugger-statement-expected.txt: Added.
* inspector-protocol/debugger/debugger-statement.html: Added.
* inspector-protocol/debugger/resources/breakpoint.js:
(debuggerStatement):

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

6 years agoFix an exception caused by trying to access the DOM before it is loaded.
timothy@apple.com [Mon, 3 Mar 2014 21:52:31 +0000 (21:52 +0000)]
Fix an exception caused by trying to access the DOM before it is loaded.

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

Reviewed by Andreas Kling.

* UserInterface/Base/Main.js:
(WebInspector.loaded): Move global event listeners from here...
(WebInspector.contentLoaded): ... to here.

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

6 years agoAllow overflow-scroll to be one-finger scrolled until we hook up UIScrollViews
simon.fraser@apple.com [Mon, 3 Mar 2014 21:45:25 +0000 (21:45 +0000)]
Allow overflow-scroll to be one-finger scrolled until we hook up UIScrollViews
https://bugs.webkit.org/show_bug.cgi?id=129621

Reviewed by Benjamin Poulain.

Temporary change to allow overflow:scroll to be scrolled in iOS WK2.

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

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

6 years agoASSERTION FAILED: m_numBreakpoints >= numBreakpoints when deleting breakpoints.
mark.lam@apple.com [Mon, 3 Mar 2014 21:39:21 +0000 (21:39 +0000)]
ASSERTION FAILED: m_numBreakpoints >= numBreakpoints when deleting breakpoints.
<https://webkit.org/b/129393>

Reviewed by Geoffrey Garen.

The issue manifests because the debugger will iterate all CodeBlocks in
the heap when setting / clearing breakpoints, but it is possible for a
CodeBlock to have been instantiate but is not yet registered with the
debugger.  This can happen because of the following:

1. DFG worklist compilation is still in progress, and the target
   codeBlock is not ready for installation in its executable yet.

2. DFG compilation failed and we have a codeBlock that will never be
   installed in its executable, and the codeBlock has not been cleaned
   up by the GC yet.

The code for installing the codeBlock in its executable is the same code
that registers it with the debugger.  Hence, these codeBlocks are not
registered with the debugger, and any pending breakpoints that would map
to that CodeBlock is as yet unset or will never be set.  As such, an
attempt to remove a breakpoint in that CodeBlock will fail that assertion.

To fix this, we do the following:

1. We'll eagerly clean up any zombie CodeBlocks due to failed DFG / FTL
   compilation.  This is achieved by providing a
   DeferredCompilationCallback::compilationDidComplete() that does this
   clean up, and have all sub classes call it at the end of their
   compilationDidComplete() methods.

2. Before the debugger or profiler iterates CodeBlocks in the heap, they
   will wait for all compilations to complete before proceeding.  This
   ensures that:
   1. any zombie CodeBlocks would have been cleaned up, and won't be
      seen by the debugger or profiler.
   2. all CodeBlocks that the debugger and profiler needs to operate on
      will be "ready" for whatever needs to be done to them e.g.
      jettison'ing of DFG codeBlocks.

* bytecode/DeferredCompilationCallback.cpp:
(JSC::DeferredCompilationCallback::compilationDidComplete):
* bytecode/DeferredCompilationCallback.h:
- Provide default implementation method to clean up zombie CodeBlocks.

* debugger/Debugger.cpp:
(JSC::Debugger::forEachCodeBlock):
- Utility function to iterate CodeBlocks.  It ensures that all compilations
  are complete before proceeding.
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::recompileAllJSFunctions):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
- Use the utility iterator function.

* debugger/Debugger.h:
* dfg/DFGOperations.cpp:
- Added an assert to ensure that zombie CodeBlocks will be imminently cleaned up.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
- Remove unneeded code (that was not the best solution anyway) for ensuring
  that we don't generate new DFG codeBlocks after enabling the debugger or
  profiler.  Now that we wait for compilations to complete before proceeding
  with debugger and profiler work, this scenario will never happen.

* dfg/DFGToFTLDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):
- Call the super class method to clean up zombie codeBlocks.

* dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLForOSREntryDeferredCompilationCallback::compilationDidComplete):
- Call the super class method to clean up zombie codeBlocks.

* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::remove):
* heap/CodeBlockSet.h:
* heap/Heap.h:
(JSC::Heap::removeCodeBlock):
- New method to remove a codeBlock from the codeBlock set.

* jit/JITOperations.cpp:
- Added an assert to ensure that zombie CodeBlocks will be imminently cleaned up.

* jit/JITToDFGDeferredCompilationCallback.cpp:
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
- Call the super class method to clean up zombie codeBlocks.

* runtime/VM.cpp:
(JSC::VM::waitForCompilationsToComplete):
- Renamed from prepareToDiscardCode() to be clearer about what it does.

(JSC::VM::discardAllCode):
(JSC::VM::releaseExecutableMemory):
(JSC::VM::setEnabledProfiler):
- Wait for compilation to complete before enabling the profiler.

* runtime/VM.h:

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