WebKit-https.git
7 years agoVersioning.
lforschler@apple.com [Tue, 15 Jul 2014 21:32:20 +0000 (21:32 +0000)]
Versioning.

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

7 years agoDispatch top content inset changes immediately if synchronously waiting for view...
timothy_horton@apple.com [Tue, 15 Jul 2014 21:26:27 +0000 (21:26 +0000)]
Dispatch top content inset changes immediately if synchronously waiting for view state changes
https://bugs.webkit.org/show_bug.cgi?id=134942
<rdar://problem/17666800>

Reviewed by Simon Fraser.

* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChangesSync]):
(-[WKView _dispatchSetTopContentInset]):
(-[WKView _setTopContentInset:]):
Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
This will ensure that the incoming contents have the right top content inset, and we don't
flash between the wrong inset and the right one.

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

7 years ago[Win] Unreviewed build fix after r171069.
bfulgham@apple.com [Tue, 15 Jul 2014 21:17:25 +0000 (21:17 +0000)]
[Win] Unreviewed build fix after r171069.

Add missing AudioHardwareListener implementation on Windows.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

7 years agoStores to PropertyTable use the Structure as the owner
mhahnenberg@apple.com [Tue, 15 Jul 2014 21:05:43 +0000 (21:05 +0000)]
Stores to PropertyTable use the Structure as the owner
https://bugs.webkit.org/show_bug.cgi?id=134595

Reviewed by Darin Adler.

Since PropertyTable is the object that does the marking of these references, it should be the owner.

Also removed some unused parameters to other methods that historically used the Structure as the owner.

* runtime/JSPropertyNameIterator.h:
(JSC::StructureRareData::setEnumerationCache):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncToString):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::copy):
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::clone):
(JSC::PropertyTable::PropertyTable):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::materializePropertyMap):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::despecifyFunctionTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::preventExtensionsTransition):
(JSC::Structure::takePropertyTableOrCloneIfPinned):
(JSC::Structure::nonPropertyTransition):
(JSC::Structure::copyPropertyTable):
(JSC::Structure::copyPropertyTableForPinning):
(JSC::Structure::putSpecificValue):
* runtime/Structure.h:
(JSC::Structure::setObjectToStringValue):
(JSC::Structure::setPreviousID):
* runtime/StructureInlines.h:
(JSC::Structure::setEnumerationCache):
* runtime/StructureRareData.h:
* runtime/StructureRareDataInlines.h:
(JSC::StructureRareData::setPreviousID):
(JSC::StructureRareData::setObjectToStringValue):

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

7 years agoREGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab...
enrica@apple.com [Tue, 15 Jul 2014 20:52:12 +0000 (20:52 +0000)]
REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
https://bugs.webkit.org/show_bug.cgi?id=134934
<rdar://problem/17224638>

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:

Tab and back tab should be handled as special keys that have
a command associated. The command specifies for each key the relevant
action. This patch implements the commands property to create the association
between key and command and the relevant actions that will execute the same
code executed when the used taps on the < > buttons in the accessory bar.

(-[WKContentView keyCommands]):
(-[WKContentView _nextAccessoryTab:]):
(-[WKContentView _prevAccessoryTab:]):

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

7 years agoMore tidying of the webcontent sandbox profile
oliver@apple.com [Tue, 15 Jul 2014 20:31:50 +0000 (20:31 +0000)]
More tidying of the webcontent sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=134938

Reviewed by Alexey Proskuryakov.

Remove some excessive abilities from the profile and make
the required ones explicit.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

7 years agoScriptExecutable::forEachCodeBlock can dereference null CodeBlocks
mhahnenberg@apple.com [Tue, 15 Jul 2014 19:11:57 +0000 (19:11 +0000)]
ScriptExecutable::forEachCodeBlock can dereference null CodeBlocks
https://bugs.webkit.org/show_bug.cgi?id=134928

Reviewed by Andreas Kling.

* bytecode/CodeBlock.h:
(JSC::ScriptExecutable::forEachCodeBlock): Check for null CodeBlocks before calling forEachRelatedCodeBlock.

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

7 years agoRevert: Run the FastMalloc scavenger thread on iOS as well.
akling@apple.com [Tue, 15 Jul 2014 18:34:35 +0000 (18:34 +0000)]
Revert: Run the FastMalloc scavenger thread on iOS as well.
<https://webkit.org/b/134927>
<rdar://problem/17485079>

This appears to be the cause of some elusive crashes, and since I don't
have a way to reproduce them, let's just go back to not running the
scavenger thread on iOS.

Reviewed by Antti Koivisto.

* wtf/FastMalloc.cpp:

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

7 years agoREGRESSION (r155957): Invalid cast in WebCore::RenderNamedFlowThread::getRanges
antti@apple.com [Tue, 15 Jul 2014 14:59:58 +0000 (14:59 +0000)]
REGRESSION (r155957): Invalid cast in WebCore::RenderNamedFlowThread::getRanges
https://bugs.webkit.org/show_bug.cgi?id=134888

Reviewed by Mihnea Ovidenie.

Source/WebCore:
Test: fast/regions/flowthread-getranges-box-cast.html

* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::getRanges): Test the type before casting.

LayoutTests:
* fast/regions/flowthread-getranges-box-cast-expected.txt: Added.
* fast/regions/flowthread-getranges-box-cast.html: Added.

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

7 years agoBuildfix if LLINT_SLOW_PATH_TRACING is enabled
commit-queue@webkit.org [Tue, 15 Jul 2014 10:49:58 +0000 (10:49 +0000)]
Buildfix if LLINT_SLOW_PATH_TRACING is enabled
https://bugs.webkit.org/show_bug.cgi?id=133790

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-07-15
Reviewed by Mark Lam.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

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

7 years ago[GTK] Update GObject DOM bindings symbols file after r171014.
commit-queue@webkit.org [Tue, 15 Jul 2014 09:34:16 +0000 (09:34 +0000)]
[GTK] Update GObject DOM bindings symbols file after r171014.
https://bugs.webkit.org/show_bug.cgi?id=134907

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-07-15
Reviewed by Philippe Normand.

* bindings/gobject/webkitdom.symbols: Update to the current API.

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

7 years agoUnreviwed fix wrong indentation from r171082.
rego@igalia.com [Tue, 15 Jul 2014 09:15:11 +0000 (09:15 +0000)]
Unreviwed fix wrong indentation from r171082.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):

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

7 years ago[iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
akling@apple.com [Tue, 15 Jul 2014 03:04:57 +0000 (03:04 +0000)]
[iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
<https://webkit.org/b/134915>

When we're under memory pressure, the last thing we want to be doing is
creating gratuitous new IOSurfaces. Just wait for the gesture to end before
rendering at the new scale.

Reviewed by Tim Horton.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

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

7 years agoSubpixel rendering: Zero sized compositing container's content positioned off by...
zalan@apple.com [Tue, 15 Jul 2014 02:55:26 +0000 (02:55 +0000)]
Subpixel rendering: Zero sized compositing container's content positioned off by one device pixel.
https://bugs.webkit.org/show_bug.cgi?id=134903

Reviewed by Simon Fraser.

The compositing layer boundaries are calculated using its renderer()'s and the renderer()'s
descendants' bounds. However when the renderer() is zero sized, its bounds are omitted.
In such cases, when the child content has offset from the renderer(), the subpixel adjustment
of the compositing layer becomes negative (-meaning that the compositing layer is to the right/bottom
direction from its renderer()). Remove fabs() to be able to express such direction.

Source/WebCore:
Test: compositing/hidpi-compositing-layer-with-zero-sized-container.html

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

LayoutTests:
* compositing/hidpi-compositing-layer-with-zero-sized-container-expected.html: Added.
* compositing/hidpi-compositing-layer-with-zero-sized-container.html: Added.

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

7 years agoFix crash on WebVideoFullscreenManagerProxy construction.
commit-queue@webkit.org [Tue, 15 Jul 2014 02:15:23 +0000 (02:15 +0000)]
Fix crash on WebVideoFullscreenManagerProxy construction.
https://bugs.webkit.org/show_bug.cgi?id=134909

Unreviewed fix crash from r171089

Remove unnecessary dispatch to main queue since it can happen during construction.

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-07-14

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): remove dispatch_async

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

7 years ago[Cocoa] _WKRemoteObjectInterface leaks NSString ivar
commit-queue@webkit.org [Tue, 15 Jul 2014 01:52:32 +0000 (01:52 +0000)]
[Cocoa] _WKRemoteObjectInterface leaks NSString ivar
https://bugs.webkit.org/show_bug.cgi?id=134914

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-14
Reviewed by Simon Fraser.

Release our copied NSString in dealloc.

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface dealloc]):

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

7 years agoProvide some large JPEG images with EXIF orientation for subsampling tests
dino@apple.com [Tue, 15 Jul 2014 01:37:28 +0000 (01:37 +0000)]
Provide some large JPEG images with EXIF orientation for subsampling tests
https://bugs.webkit.org/show_bug.cgi?id=134847

Reviewed by Sam Weinig.

Four images (either 3000x2000 or 2000x3000) that each have EXIF rotation
attributes that should render with an arrow pointing UP. The
orientation-rotate-0.jpg should always render correctly, even if EXIF
rotation is ignored. The others are variations on that image that were
saved in rotated form, then reverted to the correct orientation via EXIF.

* fast/canvas/resources/orientation-rotate-0.jpg: Added.
* fast/canvas/resources/orientation-rotate-180.jpg: Added.
* fast/canvas/resources/orientation-rotate-90-ccw.jpg: Added.
* fast/canvas/resources/orientation-rotate-90-cw.jpg: Added.

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

7 years agoAllow for Int52Rep to see things other than Int32, and make this testable
fpizlo@apple.com [Tue, 15 Jul 2014 00:41:39 +0000 (00:41 +0000)]
Allow for Int52Rep to see things other than Int32, and make this testable
https://bugs.webkit.org/show_bug.cgi?id=134873
<rdar://problem/17641915>

Reviewed by Geoffrey Garen and Mark Hahnenberg.

A major premise of our type inference is that prediction propagation can say whatever it
wants and we'll still have valid IR after Fixup. This previously didn't work with Int52s.
We required some kind of agreement between prediction propagation and fixup over which
data flow paths were Int52 and which weren't.

It turns out that we basically had such an agreement, with the exception of code that was
unreachable due to ForceOSRExit. Then, fixup and prediction propagation would disagree. It
might be nice to fix that bug - but it's only in the case of Int52 that such a thing would
be a bug! Normally, we allow sloppiness in prediction propagation.

This patch allows us to be sloppy with Int52 prediction propagation by giving Int52Rep the
ability to see inputs other than Int32. This fixes the particular ForceOSRExit bug (see
int52-force-osr-exit-path.js for the reduced test case). To make sure that the newly
empowered Int52Rep is actually correct - in case we end up using it on paths other than
ForceOSRExit - this patch introduces an internal intrinsic called fiatInt52() that forces
us to attempt Int52 conversion on the input. This patch adds a bunch of tests that stress
this intrinsic. This means that we're now stressing Int52Rep more so than ever before!

Note that it would still be a bug for prediction propagation to ever cause us to create an
Int52Rep node for a non-Int32 input. But, this will now be a performance bug, rather than
a crash bug.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::fixTypeForRepresentation):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::injectTypeConversionsForEdge):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::isMachineIntConstant):
* dfg/DFGNode.h:
(JSC::DFG::Node::isMachineIntConstant):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::convertMachineInt):
(JSC::DFG::SpeculativeJIT::speculateMachineInt):
(JSC::DFG::SpeculativeJIT::speculateDoubleRepMachineInt):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
(JSC::DFG::isNumerical):
(JSC::DFG::isDouble):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileInt52Rep):
(JSC::FTL::LowerDFGToLLVM::doubleToInt32):
(JSC::FTL::LowerDFGToLLVM::jsValueToDouble):
(JSC::FTL::LowerDFGToLLVM::jsValueToStrictInt52):
(JSC::FTL::LowerDFGToLLVM::doubleToStrictInt52):
(JSC::FTL::LowerDFGToLLVM::speculate):
(JSC::FTL::LowerDFGToLLVM::speculateMachineInt):
(JSC::FTL::LowerDFGToLLVM::speculateDoubleRepMachineInt):
* jit/JITOperations.h:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionIdentity):
* runtime/Intrinsic.h:
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::tryConvertToInt52):
(JSC::isInt52):
(JSC::JSValue::isMachineInt):
* tests/stress/dead-fiat-double-to-int52-then-exit-not-int52.js: Added.
(foo):
* tests/stress/dead-fiat-double-to-int52.js: Added.
(foo):
* tests/stress/dead-fiat-int32-to-int52.js: Added.
(foo):
* tests/stress/dead-fiat-value-to-int52-double-path.js: Added.
(foo):
(bar):
* tests/stress/dead-fiat-value-to-int52-then-exit-not-double.js: Added.
(foo):
(bar):
* tests/stress/dead-fiat-value-to-int52-then-exit-not-int52.js: Added.
(foo):
(bar):
* tests/stress/dead-fiat-value-to-int52.js: Added.
(foo):
(bar):
* tests/stress/fiat-double-to-int52-then-exit-not-int52.js: Added.
(foo):
* tests/stress/fiat-double-to-int52-then-fail-to-fold.js: Added.
(foo):
* tests/stress/fiat-double-to-int52-then-fold.js: Added.
(foo):
* tests/stress/fiat-double-to-int52.js: Added.
(foo):
* tests/stress/fiat-int32-to-int52.js: Added.
(foo):
* tests/stress/fiat-value-to-int52-double-path.js: Added.
(foo):
(bar):
* tests/stress/fiat-value-to-int52-then-exit-not-double.js: Added.
(foo):
(bar):
* tests/stress/fiat-value-to-int52-then-exit-not-int52.js: Added.
(foo):
(bar):
* tests/stress/fiat-value-to-int52-then-fail-to-fold.js: Added.
(foo):
* tests/stress/fiat-value-to-int52-then-fold.js: Added.
(foo):
* tests/stress/fiat-value-to-int52.js: Added.
(foo):
(bar):
* tests/stress/int52-force-osr-exit-path.js: Added.
(foo):

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

7 years ago[PlugIns] Check for a non-null snapshot image before trying to decode it
dino@apple.com [Tue, 15 Jul 2014 00:14:34 +0000 (00:14 +0000)]
[PlugIns] Check for a non-null snapshot image before trying to decode it
https://bugs.webkit.org/show_bug.cgi?id=134913
<rdar://problem/17606033>

Reviewed by Tim Horton.

Changeset r169820 introduced a bug where we could examine the pixels of
an image (looking for solid colors) before checking if the image actually
existed.

I added a null check, and moved the code around a bit to avoid checking
for existence three times.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
before trying to look at it.

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

7 years ago[iOS] Add tests to ensure CSS :active and :hover are applied when processing touch...
dbates@webkit.org [Tue, 15 Jul 2014 00:14:03 +0000 (00:14 +0000)]
[iOS] Add tests to ensure CSS :active and :hover are applied when processing touch events
https://bugs.webkit.org/show_bug.cgi?id=134905
<rdar://problem/16602779>

Reviewed by Simon Fraser.

.:
Add a manual test to ensure that styles for CSS pseudo-class :hover aren't temporarily cleared
on the tapped element when processing a touchend as a result of finger pressing and releasing
on the same element that is initially positioned outside the visible content area.

* ManualTests/ios/touchstart-touchend-on-same-element-should-not-clear-hover.html: Added.

LayoutTests:
Upstream tests by Andreas Kling for <rdar://problem/14324231>.

Add a DRT test to ensure that we apply the style for the CSS pseudo-class :active when
processing touch events.

* platform/iphone-simulator/fast/events/ontouchstart-active-selector-expected.txt: Added.
* platform/iphone-simulator/fast/events/ontouchstart-active-selector.html: Added.

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

7 years agoFix 32-bit build.
andersca@apple.com [Tue, 15 Jul 2014 00:09:12 +0000 (00:09 +0000)]
Fix 32-bit build.

* UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::encodeSessionState):

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

7 years agoFlattening dictionaries with oversize backing stores can cause crashes
mhahnenberg@apple.com [Mon, 14 Jul 2014 23:59:15 +0000 (23:59 +0000)]
Flattening dictionaries with oversize backing stores can cause crashes
https://bugs.webkit.org/show_bug.cgi?id=134906

Reviewed by Filip Pizlo.

The collector expects any pointers into CopiedSpace passed to copyLater are within 32 KB
of the CopiedBlock header. This was always the case except for when flattening a dictionary
caused the size of the Butterfly to decrease. This was equivalent to moving the base of the
Butterfly to higher addresses. If the object was reduced sufficiently in size, the base
would no longer be within the first 32 KB of the CopiedBlock and the next collection would
choke on the Butterfly pointer.

This patch fixes this issue by detect this situation during flattening and memmove-ing
the Butterfly down to where the old base was.

* runtime/JSObject.cpp:
(JSC::JSObject::shiftButterflyAfterFlattening):
* runtime/JSObject.h:
(JSC::JSObject::butterflyPreCapacity):
(JSC::JSObject::butterflyTotalSize):
* runtime/Structure.cpp:
(JSC::Structure::flattenDictionaryStructure):
* tests/stress/flatten-oversize-dictionary-object.js: Added.
(foo):

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

7 years agoUse the legacy session coder for encoding/decoding session state
andersca@apple.com [Mon, 14 Jul 2014 23:35:47 +0000 (23:35 +0000)]
Use the legacy session coder for encoding/decoding session state
https://bugs.webkit.org/show_bug.cgi?id=134910

Reviewed by Beth Dakin.

* UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::encodeSessionState):
(WebKit::decodeSessionState):

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

7 years agoRestrict network process to remote connections
oliver@apple.com [Mon, 14 Jul 2014 23:13:56 +0000 (23:13 +0000)]
Restrict network process to remote connections
https://bugs.webkit.org/show_bug.cgi?id=134908

Reviewed by Geoffrey Garen.

Further restrict network client

* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

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

7 years agoWebVideoFullscreenInterfaceAVKit should only call the UI from main thread.
commit-queue@webkit.org [Mon, 14 Jul 2014 22:32:01 +0000 (22:32 +0000)]
WebVideoFullscreenInterfaceAVKit should only call the UI from main thread.
https://bugs.webkit.org/show_bug.cgi?id=134890

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

dispatch_async to the main thread before setting properties that would affect the UI.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel): wrap in call to dispatch_async
(WebVideoFullscreenInterfaceAVKit::setDuration): ditto
(WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
(WebVideoFullscreenInterfaceAVKit::setRate): ditto
(WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
(WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
(WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
(WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
(WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto

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

7 years agocheck-webkit-style should apply C++ rules to Objective-C++ files
dbates@webkit.org [Mon, 14 Jul 2014 22:22:28 +0000 (22:22 +0000)]
check-webkit-style should apply C++ rules to Objective-C++ files
https://bugs.webkit.org/show_bug.cgi?id=134884

Reviewed by Joseph Pecoraro.

Fixes an issue where check-webkit-style doesn't apply applicable C++ rules to
Objective-C++ files.

Currently check-webkit-style doesn't apply the following rules to Objective-C++
files: build/using_std, runtime/max_min_macros, runtime/wtf_move, readability/null.
Instead, we should teach check-webkit-style to apply these rules because, as
its name implies, an Objective-C++ file may contain C++ code.

* Scripts/webkitpy/style/checkers/cpp.py:
(_FileState.__init__): Add instance variable _is_objective_cpp to track whether a file has
extension mm (i.e. an Objective-C++ file).
(_FileState.is_objective_c_or_objective_cpp): Added; returns true if the file
has extension m or mm or if the file has extension h and contains Objective-C directives.
(check_for_null): No change in behavior; don't apply rule to Objective-C++ file.
(check_identifier_name_in_declaration): Substitute _FileState.is_objective_c_or_objective_cpp() for
_FileState.is_c_or_objective_c()
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_null_false_zero): Added test case for Objective-C++ file.
(WebKitStyleTest.test_max_macro): Add test case for Objective-C and Objective-C++ file.
(WebKitStyleTest.test_min_macro): Ditto.
(WebKitStyleTest.test_wtf_move): Add test case for Objective-C++ file.

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

7 years agoASSERT(isMainThread()) under OneShotDisplayLinkHandler
timothy_horton@apple.com [Mon, 14 Jul 2014 22:00:09 +0000 (22:00 +0000)]
ASSERT(isMainThread()) under OneShotDisplayLinkHandler
https://bugs.webkit.org/show_bug.cgi?id=134900

Reviewed by Simon Fraser.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[OneShotDisplayLinkHandler displayLinkFired:]):
isMainThread means the Web thread sometimes.

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

7 years agoFix the build.
timothy_horton@apple.com [Mon, 14 Jul 2014 21:57:59 +0000 (21:57 +0000)]
Fix the build.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):

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

7 years ago[UNIX] Log error description when failing to create shared memory file.
commit-queue@webkit.org [Mon, 14 Jul 2014 21:37:21 +0000 (21:37 +0000)]
[UNIX] Log error description when failing to create shared memory file.
https://bugs.webkit.org/show_bug.cgi?id=134892

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-07-14
Reviewed by Darin Adler.

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::create): Print the string describing the error number (errno).

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

7 years agoFix the !ENABLE(FILTERS) && !ENABLE(CSS_FILTERS) build after r167497
commit-queue@webkit.org [Mon, 14 Jul 2014 21:29:08 +0000 (21:29 +0000)]
Fix the !ENABLE(FILTERS) && !ENABLE(CSS_FILTERS) build after r167497
https://bugs.webkit.org/show_bug.cgi?id=134679

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-07-14
Reviewed by Darin Adler.

* html/ImageData.cpp:
* platform/graphics/cairo/ImageBufferCairo.cpp:

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

7 years ago[CSS Grid Layout] Support sparse in auto-placement algorithm
rego@igalia.com [Mon, 14 Jul 2014 21:23:49 +0000 (21:23 +0000)]
[CSS Grid Layout] Support sparse in auto-placement algorithm
https://bugs.webkit.org/show_bug.cgi?id=134544

Reviewed by Sergio Villar Senin.

Source/WebCore:
This patch implements sparse mode for auto-placement algorithm, which is
the default mode in the new grid-auto-flow syntax. It keeps track of the
auto-placement cursor in
RenderGrid::placeAutoMajorAxisItemsOnGrid() and updates it accordingly
when auto-positioned items are placed.
If we're in dense mode it resets the cursor after each item (which keeps
the old behavior that was using dense mode by default).

GridIterator has been adapted to look for empty areas from a given
position in both directions.

Test: fast/css-grid-layout/grid-auto-flow-sparse.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator): Modify constructor to
add an optional argument for the varying index. This allows to look for
empty areas in both axis.
(WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Defined the
auto-placement cursor and rested after each item if we're in dense mode.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Use auto-placement
cursor to look for empty areas from the last auto-positioned item
placed.
* rendering/RenderGrid.h: Modify placeAutoMajorAxisItemOnGrid() header
to receive the auto-placement cursor.

LayoutTests:
Test cases have been adapted accordingly, adding new cases to cover both
sparse and dense options.

* fast/css-grid-layout/grid-auto-flow-resolution-expected.txt:
* fast/css-grid-layout/grid-auto-flow-resolution.html:
* fast/css-grid-layout/grid-auto-flow-sparse-expected.txt: Added.
* fast/css-grid-layout/grid-auto-flow-sparse.html: Added.
* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html:
* fast/css-grid-layout/grid-item-auto-placement-automatic-span-expected.txt:
* fast/css-grid-layout/grid-item-auto-placement-automatic-span.html:
* fast/css-grid-layout/grid-item-auto-placement-definite-span-expected.txt:
* fast/css-grid-layout/grid-item-auto-placement-definite-span.html:
* fast/css-grid-layout/grid-item-removal-auto-placement-update.html:
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
* fast/css-grid-layout/resources/grid.css:
(.autoRowAutoColumnSpanning2):
(.autoRowSpanning2AutoColumn):
(.autoRowSpanning2AutoColumnSpanning3):
(.autoRowSpanning3AutoColumnSpanning2):
(.gridAutoFlowColumnDense):
(.gridAutoFlowRowDense):

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

7 years ago[iOS] Some videos play as inline audio-only content
bfulgham@apple.com [Mon, 14 Jul 2014 21:22:10 +0000 (21:22 +0000)]
[iOS] Some videos play as inline audio-only content
https://bugs.webkit.org/show_bug.cgi?id=134898.
<rdar://problem/17629379>

Reviewed by Eric Carlson.

Add a new 'presentationType' accessor that indicates if the media
element is playing in 'audio' mode. This can happen if a video
element plays an HLS stream that starts off in audio-only mode.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::presentationType): Added.
* html/HTMLMediaElement.h:
* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::presentationType): Added.
* platform/audio/MediaSession.h:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
Use the presentationType, rather than the mediaType to control
inline playback behavior.
* platform/audio/ios/AudioDestinationIOS.h:
(WebCore::AudioDestinationMac::presentationType): Add presentationType.
* platform/audio/mac/AudioDestinationMac.h:
(WebCore::AudioDestinationMac::presentationType): Ditto.

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

7 years ago[iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the...
benjamin@webkit.org [Mon, 14 Jul 2014 21:07:43 +0000 (21:07 +0000)]
[iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
https://bugs.webkit.org/show_bug.cgi?id=134875

Reviewed by Tim Horton.

On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
at the wrong orientation.

This patch fixes the issue by making a special case for animated resize:
-While starting animated resize, _frameOrBoundsChanged can be called several times in response to
 the API's client changing the WKWebView. In that case, we do not update the drawing area.
-After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
 is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
 DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
 order, and the updateGeometry() is always done after the viewport configuration has been updated.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView setMinimumSize:]): Deleted.

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

7 years ago[iOS][WK2] Fix withinEpsilon()
benjamin@webkit.org [Mon, 14 Jul 2014 21:02:19 +0000 (21:02 +0000)]
[iOS][WK2] Fix withinEpsilon()
https://bugs.webkit.org/show_bug.cgi?id=134798

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-07-14
Reviewed by Darin Adler.

Move the function back to WKWebView, it is no longer needed in WKContentView.

Use the real types as input to properly verify that the two inputs are within
a small value of the 32bit floating point.

The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
that would not make any difference on float.

The source of those small changes comes from the fact UIProcess does a lot of processing
on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
for scale. When we are getting updates from the WebProcess, we should ignore any small differences
caused by the computations done with less precision.

* UIProcess/API/Cocoa/WKWebView.mm:
(withinEpsilon):
* UIProcess/ios/WKContentViewInteraction.h:
(withinEpsilon): Deleted.

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

7 years agoRemove some dead code from FTLJITFinalizer
benjamin@webkit.org [Mon, 14 Jul 2014 20:55:14 +0000 (20:55 +0000)]
Remove some dead code from FTLJITFinalizer
https://bugs.webkit.org/show_bug.cgi?id=134874

Reviewed by Geoffrey Garen.

Not sure what that code was for...but it does not do anything :)

* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
The pointer of the label is computed but never used.

* ftl/FTLJITFinalizer.h:
* ftl/FTLLink.cpp:
(JSC::FTL::link):
The label is never set to anything.

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

7 years ago[Feature Queries] Enable Feature Queries on Mac
betravis@adobe.com [Mon, 14 Jul 2014 20:12:31 +0000 (20:12 +0000)]
[Feature Queries] Enable Feature Queries on Mac
https://bugs.webkit.org/show_bug.cgi?id=134404

Reviewed by Antti Koivisto.

Source/JavaScriptCore:
Enable Feature Queries on Mac and resume running the
feature tests.

* Configurations/FeatureDefines.xcconfig: Turn on
ENABLE_CSS3_CONDITIONAL_RULES.

Source/WebCore:
Enable Feature Queries on Mac and resume running the
feature tests.

* Configurations/FeatureDefines.xcconfig: Turn on
ENABLE_CSS3_CONDITIONAL_RULES.

Source/WebKit/mac:
Enable Feature Queries on Mac and resume running the
feature tests.

* Configurations/FeatureDefines.xcconfig: Turn on
ENABLE_CSS3_CONDITIONAL_RULES.

Source/WebKit2:
Enable Feature Queries on Mac and resume running the
feature tests.

* Configurations/FeatureDefines.xcconfig: Turn on
ENABLE_CSS3_CONDITIONAL_RULES.

LayoutTests:
Resume running the Feature Queries tests on Mac.

* platform/mac/TestExpectations: Unskip the tests.

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

7 years ago<rdar://problem/17305458> Cannot interact with video controls in ePubs
hyatt@apple.com [Mon, 14 Jul 2014 19:51:28 +0000 (19:51 +0000)]
<rdar://problem/17305458> Cannot interact with video controls in ePubs
Bug 134836 - [New Multicolumn] Crawl to check for compositing between us and the enclosingPaginationLayer
https://bugs.webkit.org/show_bug.cgi?id=134836

Reviewed by Dean Jackson.

The paginatedAndComposited bit being set in updateLayerPositions just didn't work, since compositing states
can change without triggering that function. This patch just gets rid of the bit and does a crawl every time
to check. This ensures that changes in compositing states don't necessitate any changes in pagination,
since the lookup will always check the current compositing state.

The new function that does this check is hasCompositedLayerInEnclosingPaginationChain.

I have been unable to reproduce this issue, and this is therefore a purely speculative fix. I have no test
case to provide because of this.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::hasCompositedLayerInEnclosingPaginationChain):
(WebCore::RenderLayer::updatePagination):
* rendering/RenderLayer.h:

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

7 years agoMove composite bounds calculation to RenderLayerBacking.
zalan@apple.com [Mon, 14 Jul 2014 19:15:24 +0000 (19:15 +0000)]
Move composite bounds calculation to RenderLayerBacking.
https://bugs.webkit.org/show_bug.cgi?id=134864

Reviewed by Darin Adler.

No change in functionality.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
* rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
to the RenderLayer.
(WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
* rendering/RenderLayerCompositor.h:

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

7 years agoMake shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid...
andersca@apple.com [Mon, 14 Jul 2014 19:14:21 +0000 (19:14 +0000)]
Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
https://bugs.webkit.org/show_bug.cgi?id=134889

Reviewed by Beth Dakin.

Source/WebKit2:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPageLoaderClient.h:

Tools:
Bump loader version number to 5.

* TestWebKitAPI/Tests/WebKit2/ShouldKeepCurrentBackForwardListItemInList.cpp:
(TestWebKitAPI::setPageLoaderClient):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

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

7 years agoFix the build.
timothy_horton@apple.com [Mon, 14 Jul 2014 18:54:24 +0000 (18:54 +0000)]
Fix the build.

* platform/audio/MediaSessionManager.h:

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

7 years agoREGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordN...
mitz@apple.com [Mon, 14 Jul 2014 18:31:54 +0000 (18:31 +0000)]
REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
https://bugs.webkit.org/show_bug.cgi?id=134887

Reviewed by Tim Horton.

* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
the client is using WKView directly.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.

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

7 years ago[Mac] don't enable low power audio mode on external output devices
eric.carlson@apple.com [Mon, 14 Jul 2014 18:17:34 +0000 (18:17 +0000)]
[Mac] don't enable low power audio mode on external output devices
https://bugs.webkit.org/show_bug.cgi?id=134877

Reviewed by Sam Weinig.

Source/WebCore:
No new tests, this deals with changes to the audio hardware at runtime.

* WebCore.xcodeproj/project.pbxproj: Remove AudioSessionListener.h.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.

* platform/audio/AudioHardwareListener.cpp:
(WebCore::AudioHardwareListener::AudioHardwareListener): Initialize m_outputDeviceSupportsLowPowerMode
    to true on iOS.
* platform/audio/AudioHardwareListener.h:
(WebCore::AudioHardwareListener::outputDeviceSupportsLowPowerMode): New accessor.
(WebCore::AudioHardwareListener::setHardwareActivity): New setter for derived classes.
(WebCore::AudioHardwareListener::setOutputDeviceSupportsLowPowerMode): Ditto.

Remove AudioSessionListener interface, it wasn't being used.
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::addListener): Deleted.
(WebCore::AudioSession::removeListener): Deleted.
(WebCore::AudioSession::beganAudioInterruption): Deleted.
(WebCore::AudioSession::endedAudioInterruption): Deleted.
* platform/audio/AudioSession.h:
* platform/audio/AudioSessionListener.h: Removed.

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::addSession): Allocate the AudioHardwareListener if necessary.
(WebCore::MediaSessionManager::removeSession): Free the AudioHardwareListener if necessary.
(WebCore::MediaSessionManager::audioOutputDeviceChanged): AudioHardwareListener client interface
    called when the output device changes, call updateSessionState to make sure we are using
    the correct buffer size.
* platform/audio/MediaSessionManager.h:

* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSessionPrivate::AudioSessionPrivate): Drive-by cleanup, remove ObjC helper object
    that was used to listen for OS notifications, it is no longer used.
(SOFT_LINK_POINTER): Deleted.
(-[WebAudioSessionHelper initWithCallback:]): Deleted.
(-[WebAudioSessionHelper dealloc]): Deleted.
(-[WebAudioSessionHelper interruption:]): Deleted.

* platform/audio/mac/AudioHardwareListenerMac.cpp:
(WebCore::currentDeviceSupportsLowPowerBufferSize): New, return true only if using build-in
    transport device.
(WebCore::processIsRunningPropertyDescriptor): Return reference to static AudioObjectPropertyAddress
    for kAudioHardwarePropertyProcessIsRunning instead of declaring one in every method
    that needs one.
(WebCore::outputDevicePropertyDescriptor): Return reference to static AudioObjectPropertyAddress
    for kAudioHardwarePropertyDefaultOutputDevice.
(WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac): Restructure and add audio object
    listener for default output device.
(WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac): *Remove* listener audio object
    property listener instead of *Adding* a new one. Remove new listener.
(WebCore::AudioHardwareListenerMac::propertyChanged): Enumerate the properties that changed,
    call appropriate method.
(WebCore::AudioHardwareListenerMac::processIsRunningChanged): Renamed from setHardwareActive,
    cleanup.
(WebCore::AudioHardwareListenerMac::outputDeviceChanged): New, call client.audioHardwareOutputDeviceChanged.
(WebCore::AudioHardwareListenerMac::setHardwareActive): Deleted, renamed processIsRunningChanged.
* platform/audio/mac/AudioHardwareListenerMac.h:

* platform/audio/mac/MediaSessionManagerMac.cpp:
(MediaSessionManager::updateSessionState): Only set the output buffer size to 4K when hardware
    supports it.

Source/WebKit2:
* PluginProcess/PluginProcess.h: Add an empty implementation of
    AudioHardwareListener::audioOutputDeviceChanged.

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

7 years ago[iOS] Throttle painting using a UI-process-side CADisplayLink
timothy_horton@apple.com [Mon, 14 Jul 2014 18:11:46 +0000 (18:11 +0000)]
[iOS] Throttle painting using a UI-process-side CADisplayLink
https://bugs.webkit.org/show_bug.cgi?id=134879
<rdar://problem/17641699>

Reviewed by Simon Fraser.

Just waiting for CA to commit is insufficient to actually throttle to 60fps,
because nothing will block the main runloop from spinning.

Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
the first time it fires after we commit. This is not a guarantee that
our content is on the screen, but we don't have any way to make that guarantee yet.

This will throttle painting, rAF, etc. to the display refresh rate.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
(-[OneShotDisplayLinkHandler dealloc]):
(-[OneShotDisplayLinkHandler displayLinkFired:]):
(-[OneShotDisplayLinkHandler invalidate]):
(-[OneShotDisplayLinkHandler schedule]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.

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

7 years ago[css3-text] Add editing test for CSS3 Text Decoration properties
bruno.d@partner.samsung.com [Mon, 14 Jul 2014 17:16:57 +0000 (17:16 +0000)]
[css3-text] Add editing test for CSS3 Text Decoration properties
https://bugs.webkit.org/show_bug.cgi?id=120114

Reviewed by Darin Adler.

Adds editing layout test to verify that CSS3 Text Decoration properties
are being properly propagated.

* editing/pasteboard/insert-text-decoration-expected.txt: Added.
* editing/pasteboard/insert-text-decoration.html: Added.
* platform/mac/TestExpectations: Skip while CSS3_TEXT is disabled by default.
* platform/win/TestExpectations: Skip while CSS3_TEXT is disabled by default.

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

7 years ago<rdar://problem/17657391> [iOS] Networking process writes persistent credentials...
mitz@apple.com [Mon, 14 Jul 2014 16:17:26 +0000 (16:17 +0000)]
<rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
https://bugs.webkit.org/show_bug.cgi?id=134878

Reviewed by Sam Weinig.

Route CFNetwork’s calls to Security API through to the UI process.

* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.

* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
CFNetwork with alternate functions to call.

* Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
* UIProcess/mac/SecItemShimProxy.messages.in: Ditto.

* config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.

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

7 years agoTeach check-webkit-style to suggest WTF::move() when it sees std::move()
dbates@webkit.org [Mon, 14 Jul 2014 16:16:56 +0000 (16:16 +0000)]
Teach check-webkit-style to suggest WTF::move() when it sees std::move()
https://bugs.webkit.org/show_bug.cgi?id=134620

Reviewed by Joseph Pecoraro.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_max_min_macros): Fix up comment so that it reads well.
(check_wtf_move): Added.
(check_style): Modified to call check_wtf_move().
(CppChecker): Add category "runtime/wtf_move".
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_wtf_move): Added.

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

7 years ago[EFL] Unreviewed EFL gardening.
jinwoo7.song@samsung.com [Mon, 14 Jul 2014 10:56:00 +0000 (10:56 +0000)]
[EFL] Unreviewed EFL gardening.

Rebaseline tests after r170418 and r170433.

* platform/efl/fast/regions/repaint/japanese-rl-selection-repaint-in-regions-expected.png: Added. Rebaseline after r170418.
* platform/efl/fast/regions/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Rebaseline after r170418.
* platform/efl/fast/text/decorations-with-text-combine-expected.png: Rebaseline after r170418.
* platform/efl/fast/text/decorations-with-text-combine-expected.txt: Rebaseline after r170418.
* platform/efl/fast/text/emphasis-vertical-expected.png: Rebaseline after r170418.
* platform/efl/fast/text/emphasis-vertical-expected.txt: Rebaseline after r170418.
* platform/efl/fast/text/international/002-expected.png: Rebaseline after r170418.
* platform/efl/fast/text/international/002-expected.txt: Rebaseline after r170418.
* platform/efl/fast/text/international/text-combine-image-test-expected.png: Rebaseline after r170418.
* platform/efl/fast/text/international/text-combine-image-test-expected.txt: Rebaseline after r170418.
* platform/efl/fast/text/international/wrap-CJK-001-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/border-vertical-lr-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/border-vertical-lr-expected.txt: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-lr-selection-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-lr-selection-expected.txt: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-lr-text-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-lr-text-expected.txt: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-rl-selection-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-rl-selection-expected.txt: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-rl-text-expected.png: Rebaseline after r170418.
* platform/efl/fast/writing-mode/japanese-rl-text-expected.txt: Rebaseline after r170418.
* platform/efl/svg/W3C-SVG-1.1/filters-blend-01-b-expected.png: Rebaseline after r170433.
* platform/efl/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt: Added. Rebaseline after r170433.
* platform/efl/svg/filters/feBlend-all-blendmodes-expected.txt: Added. Rebaseline after r170433.

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

7 years ago[EFL] Unreviewed EFL gardening.
jinwoo7.song@samsung.com [Mon, 14 Jul 2014 10:25:31 +0000 (10:25 +0000)]
[EFL] Unreviewed EFL gardening.

Remove failure expectations for tests that have been passing after r168350, r169309 and r169620.

* platform/efl/TestExpectations:

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

7 years ago[EFL] Unreviewed EFL gardening.
jinwoo7.song@samsung.com [Mon, 14 Jul 2014 10:07:58 +0000 (10:07 +0000)]
[EFL] Unreviewed EFL gardening.

* platform/efl/css1/formatting_model/inline_elements-expected.png: Rebaseline after r170875.
* platform/efl/css1/formatting_model/inline_elements-expected.txt: Rebaseline after r170875.

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

7 years agoAdded Radar link to the last ChangeLog entry
mitz@apple.com [Mon, 14 Jul 2014 07:19:36 +0000 (07:19 +0000)]
Added Radar link to the last ChangeLog entry

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

7 years agoNetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
mitz@apple.com [Mon, 14 Jul 2014 07:18:44 +0000 (07:18 +0000)]
NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
https://bugs.webkit.org/show_bug.cgi?id=134666

Reviewed by Tim Horton.

A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
only decoding fails, in this case silently, simply not delivering the
SecItemShim::secItemResponse message.

The fix is to teach ArgumentCodersCF about SecAccessControlRef.

* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
(IPC::encode): Encode the SecAccessControl serialized into CFData.
(IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
* Shared/cf/ArgumentCodersCF.h:
* config.h: Defined HAVE_SEC_ACCESS_CONTROL.

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

7 years agoRemove SelectorCheckerFastPath from the style resolution algorithm
benjamin@webkit.org [Sun, 13 Jul 2014 21:51:16 +0000 (21:51 +0000)]
Remove SelectorCheckerFastPath from the style resolution algorithm
https://bugs.webkit.org/show_bug.cgi?id=134866

Reviewed by Antti Koivisto.

SelectorCheckerFastPath is now pure overhead because it can almost never match
if the CSS JIT was unable to compile.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
The "pre-filter" behind fastCheckableSelector had two parts:
1) Filtering the pseudoID.
2) Filtering on the rule hash.

The first part has been generalized (RuleDatacanMatchPseudoElement())
and moved to collectMatchingRulesForList().

(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/RuleSet.cpp:
(WebCore::selectorCanMatchPseudoElement):
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addRulesFromSheet):
* css/RuleSet.h:
(WebCore::RuleData::canMatchPseudoElement):
(WebCore::RuleData::hasFastCheckableSelector): Deleted.
* css/StyleResolver.cpp:

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

7 years agoRemove an useless check from SelectorChecker
benjamin@webkit.org [Sun, 13 Jul 2014 21:46:07 +0000 (21:46 +0000)]
Remove an useless check from SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=134868

Reviewed by Darin Adler.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
The condition of this if() branch can never be met for the mode "QueryingRules".

The next condition in that if() is "dynamicPseudo != NOPSEUDO", which implies
a pseudo element was matched prior to the current context/simple selector.
This cannot happen with QueryingRules, since we never match pseudo elements for
SelectorQuery.

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

7 years ago<rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
mitz@apple.com [Sun, 13 Jul 2014 19:39:45 +0000 (19:39 +0000)]
<rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=134872

Reviewed by Sam Weinig.

* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
(WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
* Shared/InteractionInformationAtPosition.h: Added an image member to the struct.

* UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
an image property.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
parameter, which is stored in a new ivar.
(-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
into a cached Cocoa image and returns it.
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
initializer, removed _boundingRect property declaration from here.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
into the _WKActivatedElementInfo initializer.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotNode): Added.
* WebProcess/WebPage/WebPage.h:

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
snapshot of it in the image member of the InteractionInformationAtPosition.

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

7 years ago[Cocoa] Clean up session state API a little
mitz@apple.com [Sun, 13 Jul 2014 17:09:13 +0000 (17:09 +0000)]
[Cocoa] Clean up session state API a little
https://bugs.webkit.org/show_bug.cgi?id=134871

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
(-[WKWebView _restoreFromSessionState:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

7 years agoHashMap should have removeIf()
fpizlo@apple.com [Sun, 13 Jul 2014 17:03:13 +0000 (17:03 +0000)]
HashMap should have removeIf()
https://bugs.webkit.org/show_bug.cgi?id=134870

Reviewed by Sam Weinig.

Expose a new HashMap method, called removeIf(), which allows you to do an efficient
pass over the map and remove a bunch of things at once. This is used by DFG GCSE as
part of https://bugs.webkit.org/show_bug.cgi?id=134677.

* wtf/HashMap.h:
(WTF::X>::removeIf):
* wtf/HashTable.h:
(WTF::KeyTraits>::removeIf):

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

7 years agoREGRESSION(r171045) [GTK] Build broken.
jfernandez@igalia.com [Sun, 13 Jul 2014 11:28:58 +0000 (11:28 +0000)]
REGRESSION(r171045) [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134867

Unreviewed GTK build fix after r171045.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::willRecordNavigationSnapshot):
* UIProcess/API/gtk/PageClientImpl.h:

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

7 years agoUnreviewed, EFL build fix since r171045.
gyuyoung.kim@samsung.com [Sun, 13 Jul 2014 10:35:36 +0000 (10:35 +0000)]
Unreviewed, EFL build fix since r171045.

* UIProcess/CoordinatedGraphics/WebView.h:

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

7 years agoElements with rendering disabled due to dimensions should not contribute to parent...
commit-queue@webkit.org [Sun, 13 Jul 2014 06:35:21 +0000 (06:35 +0000)]
Elements with rendering disabled due to dimensions should not contribute to parent bounding box
https://bugs.webkit.org/show_bug.cgi?id=134184

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2014-07-12
Reviewed by Dirk Schulze.

Source/WebCore:
SVG elements that have rendering disabled should not contribute to any ancestor elements bounding box.
Examples of elements with rendering disabled:
- basic shape with width <= 0 or height <= 0
- path with no path data (d attribute missing or empty)
- polyline or polygon element with no point data (points attribute missing or empty)

To achieve this a method (isRenderingDisabled) was added to RenderSVGShape and it's derived classes.
This is used to determine if an element is included when creating the union of child bounding boxes
in a container element.

Tests: svg/custom/GetBBox-path-nodata.html
       svg/custom/GetBBox-polygon-nodata.html
       svg/custom/GetBBox-polyline-nodata.html
       svg/custom/getBBox-container-hiddenchild.html

* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::isRenderingDisabled):
New method added. Checks bounding box to determine if rendering is disabled.
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::isRenderingDisabled):
New method added. Checks bounding box to determine if rendering is disabled.
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::isRenderingDisabled):
New method added. Checks bounding box to determine if rendering is disabled.
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::isRenderingDisabled):
New method added. Always returns false so that derived classes that do not
implement this method retain the existing behaviour.
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
For each element potentially being included in the unioned bounding box of
a container, check isRenderingDisabled and skip that element if true.

* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::isRenderingDisabled):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::isRenderingDisabled):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::isRenderingDisabled):
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):

LayoutTests:
Test, for each element type, that when rendering is disabled, that element does not contribute
to the bounding box for an ancestor element.

Added test to ensure zero width/height polyline and polygon do contribute to ancestor bounding box.

Updated expected results for 1 existing test (shapes-rect-02-t) as this test included zero
width and zero height rects and these were previously included in the repaint rect.

* platform/mac/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt:
* svg/custom/GetBBox-path-nodata-expected.txt: Added.
* svg/custom/GetBBox-path-nodata.html: Added.
* svg/custom/GetBBox-polygon-nodata-expected.txt: Added.
* svg/custom/GetBBox-polygon-nodata.html: Added.
* svg/custom/GetBBox-polyline-nodata-expected.txt: Added.
* svg/custom/GetBBox-polyline-nodata.html: Added.
* svg/custom/getBBox-container-hiddenchild-expected.txt: Added.
* svg/custom/getBBox-container-hiddenchild.html: Added.
* svg/custom/getBBox-perpendicular-polygon-expected.txt: Added.
* svg/custom/getBBox-perpendicular-polygon.svg: Added.
* svg/custom/getBBox-perpendicular-polyline-expected.txt: Added.
* svg/custom/getBBox-perpendicular-polyline.svg: Added.

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

7 years ago[Cocoa] Notify the client when a navigation snapshot is taken
mitz@apple.com [Sun, 13 Jul 2014 05:51:20 +0000 (05:51 +0000)]
[Cocoa] Notify the client when a navigation snapshot is taken
https://bugs.webkit.org/show_bug.cgi?id=134865

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
m_navigationDelegateMethods.
(WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
WKNavigationDelegate method.

* UIProcess/PageClient.h: Declared new client function.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
* UIProcess/WebPageProxy.h:

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
NavigationState::willRecordNavigationSnapshot.

* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.

* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
WebPageProxy::willRecordNavigationSnapshot.

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

7 years agoStyle checker complains about namespace indentation when there is no namespace
commit-queue@webkit.org [Sun, 13 Jul 2014 02:37:58 +0000 (02:37 +0000)]
Style checker complains about namespace indentation when there is no namespace
https://bugs.webkit.org/show_bug.cgi?id=105427

Patch by Peter Szanka <h868064@stud.u-szeged.hu> on 2014-07-12
Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_namespace_indentation):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_indentation):

The indentation level depends on the parantheses too, to avoid false warning in case of several statements inside macros.

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

7 years agoRename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttribu...
benjamin@webkit.org [Sun, 13 Jul 2014 02:24:37 +0000 (02:24 +0000)]
Rename selectorListContainsUncommonAttributeSelector() to selectorListContainsAttributeSelector()
https://bugs.webkit.org/show_bug.cgi?id=134862

Reviewed by Sam Weinig.

Unlike containsUncommonAttributeSelector(), selectorListContainsUncommonAttributeSelector() does not
evaluate the attribute for "uncommon" types.

It would be possible to change the function instead to evaluate common attributes based
on the match type and the pseudo class type. Such change would be more risky
and we would get very little benefit from it, I leave that for later if that ever becomes useful.

* css/RuleSet.cpp:
(WebCore::selectorListContainsAttributeSelector):
(WebCore::containsUncommonAttributeSelector):
(WebCore::selectorListContainsUncommonAttributeSelector): Deleted.

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

7 years agoUnreviewed, fix EFL build break since r171034.
gyuyoung.kim@samsung.com [Sun, 13 Jul 2014 01:44:23 +0000 (01:44 +0000)]
Unreviewed, fix EFL build break since r171034.

* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformMediaCacheDirectory):

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

7 years agoTry to fix 32-bit Mac build.
darin@apple.com [Sun, 13 Jul 2014 01:27:40 +0000 (01:27 +0000)]
Try to fix 32-bit Mac build.

* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.

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

7 years agoREGRESSION(r171034) [GTK] Build broken.
jfernandez@igalia.com [Sun, 13 Jul 2014 01:09:49 +0000 (01:09 +0000)]
REGRESSION(r171034) [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134861

Unreviewed GTK build fix.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::navigationGestureDidBegin):
(WebKit::PageClientImpl::navigationGestureWillEnd):
(WebKit::PageClientImpl::navigationGestureDidEnd):
* UIProcess/API/gtk/PageClientImpl.h:

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

7 years agoRemove excessive nesting from _EnumState.process_clean_line at cpp style checker
commit-queue@webkit.org [Sun, 13 Jul 2014 00:54:13 +0000 (00:54 +0000)]
Remove excessive nesting from _EnumState.process_clean_line at cpp style checker
https://bugs.webkit.org/show_bug.cgi?id=125317

Patch by Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org> on 2014-07-12
Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(_EnumState.process_clean_line):

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

7 years agoStyle Checker should prevent enums in bitfields
brian.holt@samsung.com [Sun, 13 Jul 2014 00:31:14 +0000 (00:31 +0000)]
Style Checker should prevent enums in bitfields
https://bugs.webkit.org/show_bug.cgi?id=57352

Reviewed by Darin Adler.

Added check that enums are not used as types for bitfields
and a unit test.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest):
(CppStyleTest.test_enum_bitfields):
(CppStyleTest.test_plain_integral_bitfields):

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

7 years agoUse braced-init-list to create one-item Vector object in insertPerformanceEntry
commit-queue@webkit.org [Sun, 13 Jul 2014 00:19:41 +0000 (00:19 +0000)]
Use braced-init-list to create one-item Vector object in insertPerformanceEntry
https://bugs.webkit.org/show_bug.cgi?id=133675

Patch by Zan Dobersek <zdobersek@igalia.com> on 2014-07-12
Reviewed by Darin Adler.

* page/PerformanceUserTiming.cpp:
(WebCore::insertPerformanceEntry): Avoid wasting three lines for creating a
Vector object with just one item that in the end gets copied. Use the
braced-init-list syntax instead, leveraging Vector's std::initializer_list
constructor.

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

7 years agoMemory leaks with autoLoadImages off
allan.jensen@digia.com [Sun, 13 Jul 2014 00:10:23 +0000 (00:10 +0000)]
Memory leaks with autoLoadImages off
https://bugs.webkit.org/show_bug.cgi?id=124411

Reviewed by Darin Adler.

Do not emit notifyFinished for images with deferred load,
and allow deferred loads to be cancelled.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::checkNotify):
(WebCore::CachedResource::cancelLoad):

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

7 years agoREGRESSION(r171024) [GTK] Build broken.
jfernandez@igalia.com [Sat, 12 Jul 2014 23:39:47 +0000 (23:39 +0000)]
REGRESSION(r171024) [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134859

Unreviewed GTK build fix.

* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformMediaCacheDirectory):

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

7 years ago<rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation...
mitz@apple.com [Sat, 12 Jul 2014 23:32:39 +0000 (23:32 +0000)]
<rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
https://bugs.webkit.org/show_bug.cgi?id=134853

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
methods.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.

* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
_isShowingNavigationGestureSnapshot.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
m_navigationDelegateMethods.
(WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
WKNavigationDelegate method.
(WebKit::NavigationState::navigationGestureWillEnd): Ditto.
(WebKit::NavigationState::navigationGestureDidEnd): Ditto.

* UIProcess/PageClient.h: Declared new client functions.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
(WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
and call the new client function.
(WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
(WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
m_isShowingNavigationGestureSnapshot.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.

* UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
NavigationState function.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture): Added calls to
WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
(WebKit::ViewGestureController::endSwipeGesture): Added calls to
WebPageProxy::navigationGestureDidEnd.
(WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
WebPageProxy::navigationGestureSnapshotWasRemoved.

* UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
NavigationState function.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture): Added call to
WebPageProxy::navigationGestureDidBegin.
(WebKit::ViewGestureController::endSwipeGesture): Added calls to
WebPageProxy::navigationGestureDidEnd.
(WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
WebPageProxy::navigationGestureSnapshotWasRemoved.

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

7 years ago[MSE] http/tests/media/media-source/mediasource-duration.html is failing.
jer.noble@apple.com [Sat, 12 Jul 2014 22:39:43 +0000 (22:39 +0000)]
[MSE] http/tests/media/media-source/mediasource-duration.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=134852

Reviewed by Eric Carlson.

Source/WebCore:
Fixes the following tests:
http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
http/tests/media/media-source/mediasource-duration.html
http/tests/media/media-source/mediasource-play.html

The primary change necessary to fix the mediasource-duration.html test was to add support
for delaying the completion of a seek operation until the HTMLMediaElement's readyState
rises to > HAVE_CURRENT_DATA. This is accomplished by modifying MediaSourcePrivate to have
waitForSeekCompleted() and seekCompleted() virtual methods. These are called by MediaSource
when a seek operation results in the current time moving outside the currently buffered time
ranges, and when an append operation results in the readyState changing, respectively.

A number of other drive-by fixes were necessary to get this test fully passing, as noted
below.

Make the MediaSource the primary owner of the media's duration, rather than the MediaSourcePrivate.
Move the MediaSourcePrivateClient pointer to the MediaSourcePrivate from the MediaPlayerPrivate, so
the MediaSource's duration can be retrieved.  While we're at it, do the same thing for buffered.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource): Initialize m_duration.
(WebCore::MediaSource::duration): Simple accessor.
(WebCore::MediaSource::setDurationInternal): Bring 'duration change algorithm' up to spec.
(WebCore::MediaSource::setReadyState): Reset m_duration on close.
* Modules/mediasource/MediaSource.h:
* platform/graphics/MediaSourcePrivate.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Do not call setPrivateAndOpen().
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Pass through to MediaSourcePrivateAVFObjC.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Ditto.
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::create): Call setPrivateAndOpen().
(WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC): Set m_client.
(WebCore::MediaSourcePrivateAVFObjC::duration): Pass through to MediaSourcePrivateClient.
(WebCore::MediaSourcePrivateAVFObjC::buffered): Ditto.
(WebCore::MediaSourcePrivateAVFObjC::durationChanged): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
(WebCore::MediaSourcePrivateAVFObjC::setDuration): Deleted.
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
(WebCore::MediaSourceGStreamer::open): Pass in MediaSourcePrivateClient.
(WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Initialize m_mediaSource.
(WebCore::MediaSourceGStreamer::durationChanged): Retrieve the duration from MediaSourcePrivateClient.
(WebCore::MediaSourceGStreamer::markEndOfStream): Remove unnecssary ASSERT.
(WebCore::MediaSourceGStreamer::unmarkEndOfStream): Ditto.
(WebCore::MediaSourceGStreamer::setDuration): Deleted.
* platform/graphics/gstreamer/MediaSourceGStreamer.h:
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::load): Do not call setPrivateAndOpen().
(WebCore::MockMediaPlayerMediaSource::buffered): Pass through to MockMediaSourcePrivate.
(WebCore::MockMediaPlayerMediaSource::durationDouble): Ditto.
(WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Ditto.
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::create): Call setPrivateAndOpen().
(WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set m_client.
(WebCore::MockMediaSourcePrivate::duration): Pass through to MediaSourcePrivateClient.
(WebCore::MockMediaSourcePrivate::buffered): Ditto.
(WebCore::MockMediaSourcePrivate::durationChanged): Pass thorugh to MockMediaPlayerMediaSource.
(WebCore::MockMediaSourcePrivate::setDuration): Deleted.

Route seekToTime through MediaSource, rather than through MediaSourcePrivate, so that
the time can be compared against the buffered ranges, and trigger the delay of the seek
operation if necessary. Add a seekTimer to MediaPlayerPrivateMediaSourceAVFObjC, as this
guarantees the order of asynchronous operations, rather than callOnMainThread, which can
cause async operations to occur out of order.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::seekToTime): Bring up to spec.
(WebCore::MediaSource::completeSeek): Ditto.
(WebCore::MediaSource::monitorSourceBuffers): Call completeSeek() when appropriate.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateSeekToTime): Deleted.
(WebCore::SourceBuffer::seekToTime): Renamed from sourceBufferPrivateSeekToTime().
* platform/graphics/MediaSourcePrivate.h:
* platform/graphics/MediaSourcePrivateClient.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Add seekTimer. Only
    call timeChanged() if no longer seeking, thereby triggering a 'seeked' event.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC): Clear m_seekTimer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance): Use m_seekTimer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Call seekInternal.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal): Add logging.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted): Added.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted): Added; trigger 'seeked'.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): No longer attempt to finish seek when
    readyState changes here; this has been moved up to MediaSource.cpp.
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::waitForSeekCompleted): Pass through to MediaPlayerPrivateMediaSourceAVFObjC.
(WebCore::MediaSourcePrivateAVFObjC::seekCompleted): Ditto.
(WebCore::MediaSourcePrivateAVFObjC::seekToTime): Pass through to MediaSourcePrivateClient.
(WebCore::MediaSourcePrivateAVFObjC::fastSeekTimeForMediaTime): Ditto.
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource): Initialize m_seekCompleted.
(WebCore::MockMediaPlayerMediaSource::seeking): Check for an uncompleted seek operation.
(WebCore::MockMediaPlayerMediaSource::seekWithTolerance): Ditto.
(WebCore::MockMediaPlayerMediaSource::waitForSeekCompleted): Added.
(WebCore::MockMediaPlayerMediaSource::seekCompleted): Added; trigger 'seeked'.
* platform/mock/mediasource/MockMediaPlayerMediaSource.h:
* platform/mock/mediasource/MockMediaSourcePrivate.cpp:
(WebCore::MockMediaSourcePrivate::waitForSeekCompleted): Pass through to MockMediaPlayerMediaSource.
(WebCore::MockMediaSourcePrivate::seekCompleted): Ditto.
* platform/mock/mediasource/MockMediaSourcePrivate.h:

Drive-by fixes.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::streamEndedWithError): Re-order the steps in streamEndedWithError()
    to avoid the MediaSource being closed and re-opened by the resulting duration change
    operation.
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::remove): Added logging.
(WebCore::SourceBuffer::removeCodedFrames): Ditto.
(WebCore::SourceBuffer::hasFutureTime): Swap an ASSERT for an early-return; it's possible
    for currentTime() to be outside of a buffered area.
* Modules/mediasource/SourceBuffer.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Do not issue an additional 'timeupdate' event
    after finishSeek() issues one of its own.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::globalDataParserQueue): Allow parsing operations to happen concurrently on
    background queues.

LayoutTests:
Eliminate flakiness in the mediasource-duration.html test by not playing
the media while testing seeking and duration.
* http/tests/media/media-source/mediasource-duration.html:

Update testharness.js to the latest W3C version:
* http/tests/w3c/resources/testharness.js:

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

7 years ago[iOS] update control type when playback state changes
eric.carlson@apple.com [Sat, 12 Jul 2014 22:14:44 +0000 (22:14 +0000)]
[iOS] update control type when playback state changes
https://bugs.webkit.org/show_bug.cgi?id=134856

Reviewed by Dean Jackson.

Check to make sure the correct type of media controls are showing when playback state
changes so we don't end up with the wrong type of controls during playback.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.HandledVideoEvents): Drive-by fix, call handlePlay on 'playing' instead
    of 'play' so controls don't hide too early.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.setPlaying): New, call updateControls to make sure inline
    controls are shown when appropriate.

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

7 years agoFix typo in prior patch
oliver@apple.com [Sat, 12 Jul 2014 21:49:41 +0000 (21:49 +0000)]
Fix typo in prior patch
https://bugs.webkit.org/show_bug.cgi?id=134858

Reviewed by Sam Weinig.

Fix typo

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):

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

7 years ago[iOS Media] Start playback button should indicate when it can't play
dino@apple.com [Sat, 12 Jul 2014 21:36:42 +0000 (21:36 +0000)]
[iOS Media] Start playback button should indicate when it can't play
https://bugs.webkit.org/show_bug.cgi?id=134851

Post-commit review with Eric Carlson on IRC.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.updateStatusDisplay): Remove the line that sets the
class on the inline play button.

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

7 years ago[iOS Media] Start playback button should indicate when it can't play
dino@apple.com [Sat, 12 Jul 2014 21:17:50 +0000 (21:17 +0000)]
[iOS Media] Start playback button should indicate when it can't play
https://bugs.webkit.org/show_bug.cgi?id=134851

Reviewed by Sam Weinig.

If a video element has errors and cannot play, then the start
playback button should use the "broken" icon.

* Modules/mediacontrols/mediaControlsApple.js: Add a new "failed" class.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): We need a playback button
even when there is an error.
(ControllerIOS.prototype.handleWirelessPickerButtonTouchStart): Don't offer Airplay
if we're in an error state.
(ControllerIOS.prototype.updateStatusDisplay): Set the "failed" class on
the playback buttons if we are in an error state.

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

7 years ago[Cocoa] Client is not notified of same-document navigations
mitz@apple.com [Sat, 12 Jul 2014 20:40:17 +0000 (20:40 +0000)]
[Cocoa] Client is not notified of same-document navigations
https://bugs.webkit.org/show_bug.cgi?id=134855

Reviewed by Sam Weinig.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Ditto.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.

* UIProcess/Cocoa/NavigationState.h: Declare override of
API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
flag.
(WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
values.
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
the delegate method, if implemented.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
which is forwarded to the client.
* UIProcess/WebPageProxy.h: Added navigationID parameter.
* UIProcess/WebPageProxy.messages.in: Ditto.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.

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

7 years agoExtend WebContent sandbox to allow some extra access for frameworks
oliver@apple.com [Sat, 12 Jul 2014 18:33:43 +0000 (18:33 +0000)]
Extend WebContent sandbox to allow some extra access for frameworks
https://bugs.webkit.org/show_bug.cgi?id=134844

Reviewed by Sam Weinig.

Open up the webcontent sandbox a bit so that some external frameworks
can work correctly.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::mediaCacheDirectory):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformMediaCacheDirectory):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

7 years agoTemporary work around for <rdar://<rdar://problem/17513375>
oliver@apple.com [Sat, 12 Jul 2014 18:32:13 +0000 (18:32 +0000)]
Temporary work around for <rdar://<rdar://problem/17513375>
https://bugs.webkit.org/show_bug.cgi?id=134848

Reviewed by Sam Weinig.

Temporarily work around <rdar://<rdar://problem/17513375> by
dropping the explicit cookie storage if it points out of the
container.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):

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

7 years agoPartition the CSS rules based on the most specific filter of the rightmost fragment
benjamin@webkit.org [Sat, 12 Jul 2014 05:08:33 +0000 (05:08 +0000)]
Partition the CSS rules based on the most specific filter of the rightmost fragment
https://bugs.webkit.org/show_bug.cgi?id=134828

Reviewed by Andreas Kling.

Previously, RuleSet was partitioning each rule based on the rightmost filter.
While fast, this had the side effect of putting many selectors with ID match in the class
bucket (because the selectors are generally written starting with the ID).

This patch replace the code of findBestRuleSetAndAdd() by a simple loop going over all
the simple selectors in the rightmost fragment to find the best bucket.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/RuleSet.cpp:
(WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
I unified ruleData.hasRightmostSelectorMatchingHTMLBasedOnRuleHash() and hasMultipartSelector().

(WebCore::RuleData::RuleData):
(WebCore::rulesCountForName):
(WebCore::RuleSet::addRule):
I removed the recursive part of findBestRuleSetAndAdd() (which was wrong anyway). The function
was useless so I just moved the algorithm to addRule() directly.

We first loop over all the CSSSelectors related by SubSelector, this correspond to the rightmost fragment.
If a filter with high specificity is found, we add the rule immediately and end there.
If a filter that is not very specific is found, we keep a pointer to the selector to use it later.

(WebCore::RuleSet::findBestRuleSetAndAdd): Deleted.
* css/RuleSet.h:
(WebCore::RuleData::hasMultipartSelector): Deleted.

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

7 years ago[WinCairo] Unreviewed build fix after r170937.
achristensen@apple.com [Sat, 12 Jul 2014 03:54:05 +0000 (03:54 +0000)]
[WinCairo] Unreviewed build fix after r170937.

* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
Update and apply changes applied to WebCoreGenerated.make in r170937.

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

7 years agoWeb Inspector: Crash when using a stale InspectableNode Node
commit-queue@webkit.org [Sat, 12 Jul 2014 01:49:11 +0000 (01:49 +0000)]
Web Inspector: Crash when using a stale InspectableNode Node
https://bugs.webkit.org/show_bug.cgi?id=134849

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

* inspector/PageConsoleAgent.cpp:

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

7 years ago[MSE] Separate MediaSource logging into its own log channel
jer.noble@apple.com [Sat, 12 Jul 2014 00:53:44 +0000 (00:53 +0000)]
[MSE] Separate MediaSource logging into its own log channel
https://bugs.webkit.org/show_bug.cgi?id=134809

Reviewed by Eric Carlson.

Separate out MediaSource logging (which can be quite verbose) into its own log channel,
distinct from the Media log channel. Add some per-sample logging and further sequester that
logging into its own MediaSourceSamples log channel.

Add the MediaSource and MediaSourceSamples channels:
* platform/Logging.h:

Move LOG(Media) -> LOG(MediaSource):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::~MediaSource):
(WebCore::MediaSource::setReadyState):
(WebCore::MediaSource::addSourceBuffer):
(WebCore::MediaSource::removeSourceBuffer):
(WebCore::MediaSource::isTypeSupported):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
(WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::monitorBufferingRate):
(WebCore::SourceBuffer::textTrackAddCues):
(WebCore::SourceBuffer::hasFutureTime):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):

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

7 years agoPhone numbers that span two lines are not detected.
beidson@apple.com [Fri, 11 Jul 2014 23:54:55 +0000 (23:54 +0000)]
Phone numbers that span two lines are not detected.
<rdar://problem/17601146> and https://bugs.webkit.org/show_bug.cgi?id=134808

Reviewed by Tim Horton.

* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers): After scanning a range from the TextIterator,
    create an "edge range" window around the end of the TextIterator range, and scan it.
    Also make sure to not accumulate duplicate ranges that might have showed up in both the
    TextIterator range and the edge window range.

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

7 years agoImplement textStylingAtPosition in WK2.
enrica@apple.com [Fri, 11 Jul 2014 23:24:24 +0000 (23:24 +0000)]
Implement textStylingAtPosition in WK2.
https://bugs.webkit.org/show_bug.cgi?id=134843
<rdar://problem/17614981>

Source/WebCore:

Reviewed by Benjamin Poulain.

Adding some exports and making styleForSelectionStart public.

* WebCore.exp.in:
* editing/Editor.h:

Source/WebKit2:

Reviewed by Benjamin Poulain.

Adding information about typing attributes to EditorState so
that we can implement textStylingAtPosition.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView toggleBoldface:]):
(-[WKContentView toggleItalics:]):
(-[WKContentView toggleUnderline:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):

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

7 years agoREGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversi...
zalan@apple.com [Fri, 11 Jul 2014 22:36:14 +0000 (22:36 +0000)]
REGRESSION (r168868): eBay 'see all' links fail due to different JS bindings conversion behavior.
https://bugs.webkit.org/show_bug.cgi?id=134841
<rdar://problem/17577563>

Reviewed by Simon Fraser.

Revert back to type int for Element.scroll* APIs in order to preserve exception handling
behavior.

Source/WebCore:
Test: cssom/non-subpixel-scroll-top-left-values.html

* dom/Element.cpp:
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):
(WebCore::Element::scrollWidth):
(WebCore::Element::scrollHeight):
* dom/Element.h:
* dom/Element.idl:
* html/HTMLBodyElement.cpp:
(WebCore::adjustForZoom):
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
(WebCore::HTMLBodyElement::scrollHeight):
(WebCore::HTMLBodyElement::scrollWidth):
* html/HTMLBodyElement.h:

LayoutTests:
* cssom/non-subpixel-scroll-top-left-values-expected.txt: Added.
* cssom/non-subpixel-scroll-top-left-values.html: Added.

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

7 years agoWeb Inspector: Debugger Pause button does not work
joepeck@webkit.org [Fri, 11 Jul 2014 21:54:19 +0000 (21:54 +0000)]
Web Inspector: Debugger Pause button does not work
https://bugs.webkit.org/show_bug.cgi?id=134785

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:
* CMakeLists.txt:
* DerivedSources.make:
Minification strips the sourceURL command. Add it back with minification.

Source/WebCore:
* CMakeLists.txt:
* DerivedSources.make:
* inspector/CommandLineAPIModuleSource.js:
Minification strips the sourceURL command. Add it back with minification.

Source/WebInspectorUI:
Previously we were automatically resuming if we had no recognized
call frames in the call stack we get when paused. However, we
were accidentally skipping over anonymous scripts instead of
just Web Inspector originated call frames.

Now that we allow anonymous scripts we can step into anonymous
scripts (e.g. evals, new Function(...)) as expected.

Also, remove the condition of automatically resuming if the
call stack was empty. The UI handles this with "No Call Frames".

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.debuggerDidPause):

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

7 years agoUse the bare minimum tile coverage rect when under memory pressure.
akling@apple.com [Fri, 11 Jul 2014 21:10:46 +0000 (21:10 +0000)]
Use the bare minimum tile coverage rect when under memory pressure.
<https://webkit.org/b/134837>

When the browser is under critical memory pressure, don't generate any
more tiles than are needed to cover the exposed viewport rect.

Reviewed by Pratik Solanki.

* page/FrameView.cpp:
(WebCore::FrameView::computeCoverageRect):

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

7 years agoWeb Inspector: CSS Autocompletion: "background" only has colors, should support others
commit-queue@webkit.org [Fri, 11 Jul 2014 21:04:17 +0000 (21:04 +0000)]
Web Inspector: CSS Autocompletion: "background" only has colors, should support others
https://bugs.webkit.org/show_bug.cgi?id=134839

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

Update and consolidate the background related CSS properties
and include sub-property completions in the shorthand property.

Also take the opportunity to add or update other properties
(-webkit-alt, -webkit-text-decoration-skip, -webkit-aspect-ratio)
and remove unnecessary newlines / commas in the list.

* UserInterface/Models/CSSKeywordCompletions.js:

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

7 years ago[CSS Grid Layout] Implement justify-self css property
jfernandez@igalia.com [Fri, 11 Jul 2014 20:26:00 +0000 (20:26 +0000)]
[CSS Grid Layout] Implement justify-self css property
https://bugs.webkit.org/show_bug.cgi?id=134419

Reviewed by Dean Jackson.

This change adds the justify-self property from CSS 3 Box Alignment
and implements the parsing.

From Blink r164685 by <jchaffraix@chromium.org>

Source/WebCore:
Test: fast/css/parse-justify-self.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
(WebCore::isItemPositionKeyword):
(WebCore::CSSParser::parseJustifySelf):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EJustifySelf):
(WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:
* fast/css/parse-justify-self-expected.txt: Added.
* fast/css/parse-justify-self.html: Added.

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

7 years ago[Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
betravis@adobe.com [Fri, 11 Jul 2014 19:00:24 +0000 (19:00 +0000)]
[Feature Queries] Feature Query CSS Grammar Productions Should Return a Value
https://bugs.webkit.org/show_bug.cgi?id=134810

Reviewed by Antti Koivisto.

The parsing return values are used to determine if a feature query is valid. Two
grammar productions have been updated to correctly return a value.

Tests exist for this feature but will not be run until the feature is turned on.
See https://bugs.webkit.org/show_bug.cgi?id=134404.

* css/CSSGrammar.y.in: Adding return values for two valid feature query productions.

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

7 years ago[Win] Enable DFG JIT.
commit-queue@webkit.org [Fri, 11 Jul 2014 18:53:19 +0000 (18:53 +0000)]
[Win] Enable DFG JIT.
https://bugs.webkit.org/show_bug.cgi?id=123615

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-07-11
Reviewed by Mark Lam.

Source/JavaScriptCore:
When the return type of a JIT generated function call is larger than 64-bit (e.g. SlowPathReturnType),
the normal call() implementation cannot be used on 64-bit Windows, because the 64-bit Windows ABI is different in this case.
Also, when generating calls with double arguments, we need to make sure the arguments are put in the correct registers,
since the register allocation differs on 64-bit Windows.

* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::callWithSlowPathReturnType): Added method to handle function calls where the return value type size is larger than 64-bit.
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState): Move arguments to correct registers when there are floating point arguments.
(JSC::CCallHelpers::setupArgumentsWithExecStateForCallWithSlowPathReturnType): Added method.
* jit/JIT.h:
(JSC::JIT::appendCallWithSlowPathReturnType): Added method.
* jit/JITInlines.h:
(JSC::JIT::appendCallWithExceptionCheckAndSlowPathReturnType): Added method.
(JSC::JIT::callOperation): Call new method.

Source/WTF:
* wtf/Platform.h:

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

7 years agoUse a separate backdrop element to allow cues to have highlight and background color
bfulgham@apple.com [Fri, 11 Jul 2014 17:32:17 +0000 (17:32 +0000)]
Use a separate backdrop element to allow cues to have highlight and background color
https://bugs.webkit.org/show_bug.cgi?id=134821
<rdar://problem/15999721>

Reviewed by Eric Carlson.

Source/WebCore:
Add a new <div> element wrapping the existing cue <span>. This allows
us to have a highlight on the cue (in the <span> background), as well
as an overall background color.

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-text-track-display-backdrop): New markup for
the backdrop element of the caption.
* html/track/VTTCue.cpp:
(WebCore::VTTCue::cueBackdropShadowPseudoId): Added to
allow user customization of the cue backdrop.
(WebCore::VTTCue::initialize): Rename the old "m_cueBackgroundBox" to
"m_cueHighlightBox" and add a new "m_cueBackdropBox" member.
(WebCore::VTTCue::updateDisplayTree): Update for m_cueHighlightBox.
(WebCore::VTTCue::getDisplayTree): Make m_cueHighlightBox a child
of the new m_cueBackdropBox element, and add m_cueBackdropBox to
the display tree.
* html/track/VTTCue.h:
(WebCore::VTTCue::element):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
Fix for missing caption style updates. Even if we are already
listening for caption changes, we still want to update the new
instance's style sheet to match.
(WebCore::CaptionUserPreferencesMediaAF::captionsStyleSheetOverride):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::initializeLayoutParameters): Take the new
<div> into consideration when looking for the Cue text element.

LayoutTests:
Updated tests for new formatting logic.

* platform/mac/media/track/track-cue-rendering-horizontal-expected.png:
* platform/mac/media/track/track-cue-rendering-horizontal-expected.txt:

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

7 years agoTighten WebContent sandbox
oliver@apple.com [Fri, 11 Jul 2014 17:15:31 +0000 (17:15 +0000)]
Tighten WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=134834

Reviewed by Sam Weinig.

Define a much tighter sandbox profile for the WebContent process

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

7 years agoREGRESSION (r170163?): Web content shifts revealing space equivalent to the find...
antti@apple.com [Fri, 11 Jul 2014 16:29:33 +0000 (16:29 +0000)]
REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
https://bugs.webkit.org/show_bug.cgi?id=134833
<rdar://problem/17580021>

Reviewed by Zalan Bujtas.

Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.

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

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

7 years agoSubpixel layout: return integral results for offset*, client*, scroll* by default.
zalan@apple.com [Fri, 11 Jul 2014 15:27:42 +0000 (15:27 +0000)]
Subpixel layout: return integral results for offset*, client*, scroll* by default.
https://bugs.webkit.org/show_bug.cgi?id=134651

Reviewed by Simon Fraser.

Revert to returning integral values for Element.offset* client* scroll* by default.
Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).

Since snapped dimension depends on both the original point and the width/height of the box,
we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().

Covered by existing tests

Source/WebCore:

* dom/Element.cpp:
(WebCore::subpixelMetricsEnabled):
(WebCore::convertToNonSubpixelValueIfNeeded):
(WebCore::Element::offsetLeft):
(WebCore::Element::offsetTop):
(WebCore::Element::offsetWidth):
(WebCore::Element::offsetHeight):
(WebCore::Element::clientLeft):
(WebCore::Element::clientTop):
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:

LayoutTests:

* cssom/subpixel-offsetleft-top-width-height-values-expected.txt:

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

7 years agoSubpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
zalan@apple.com [Fri, 11 Jul 2014 14:19:12 +0000 (14:19 +0000)]
Subpixel rendering: icloud.com password arrow has clipped circle at some window sizes.
https://bugs.webkit.org/show_bug.cgi?id=134824
<rdar://problem/17612729>

Reviewed by Simon Fraser.

Transparent layer clipping needs device pixel offset adjusting.

Source/WebCore:
Test: fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
* rendering/RenderLayer.h:

LayoutTests:
* fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position-expected.html: Added.
* fast/layers/wrong-clipping-semi-transparent-compositing-layer-on-subpixel-position.html: Added.

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

7 years agoUnreviewed, rolling out r170995.
commit-queue@webkit.org [Fri, 11 Jul 2014 12:26:08 +0000 (12:26 +0000)]
Unreviewed, rolling out r170995.
https://bugs.webkit.org/show_bug.cgi?id=134831

Causing odd crashes in debug builds (Requested by zdobersek on
#webkit).

Reverted changeset:

"[WTF] Add the move constructor, move assignment operator for
HashTable"
https://bugs.webkit.org/show_bug.cgi?id=130772
http://trac.webkit.org/changeset/170995

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

7 years agoUnreviewed. Remove unused file.
carlosgc@webkit.org [Fri, 11 Jul 2014 12:15:48 +0000 (12:15 +0000)]
Unreviewed. Remove unused file.

* html/shadow/MediaControlsGtk.h: Removed.

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

7 years ago[GTK] Enable VIDEO_TRACK by default
carlosgc@webkit.org [Fri, 11 Jul 2014 12:12:43 +0000 (12:12 +0000)]
[GTK] Enable VIDEO_TRACK by default
https://bugs.webkit.org/show_bug.cgi?id=134801

Reviewed by Philippe Normand.

* Source/cmake/OptionsGTK.cmake:

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