WebKit-https.git
4 years agoAI folding of IsObjectOrNull is broken for non-object types that may be null
fpizlo@apple.com [Sat, 11 Jul 2015 03:01:20 +0000 (03:01 +0000)]
AI folding of IsObjectOrNull is broken for non-object types that may be null
https://bugs.webkit.org/show_bug.cgi?id=146867

Reviewed by Ryosuke Niwa.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): Fix the bug and add some text describing what is going on.
* tests/stress/misc-is-object-or-null.js: Added. Test for the bug.
(foo):
* tests/stress/other-is-object-or-null.js: Added. Test for a bug I almost introduced.
(foo):

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

4 years agoIt should be easy to measure total compile times.
fpizlo@apple.com [Sat, 11 Jul 2015 02:30:04 +0000 (02:30 +0000)]
It should be easy to measure total compile times.
https://bugs.webkit.org/show_bug.cgi?id=146857

Reviewed by Sam Weinig.

This gives DFG::Plan the ability to track total compile times, and return them in a map
of stats that jsc.cpp can display.

I want to do some work to bring down DFG compile times. This will help me measure whether
I'm making a difference or not.

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::~Plan):
(JSC::DFG::Plan::computeCompileTimes):
(JSC::DFG::Plan::reportCompileTimes):
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::cancel):
(JSC::DFG::Plan::compileTimeStats):
(JSC::DFG::dumpAndVerifyGraph): Deleted.
(JSC::DFG::profilerCompilationKindForMode): Deleted.
* dfg/DFGPlan.h:
(JSC::DFG::Plan::compileTimeStats):
* jsc.cpp:
(jscmain):
* runtime/Options.h:

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

4 years ago[CoordinatedGraphics] Override primaryLayerID in CoordinatedGraphicsLayer
ryuan.choi@navercorp.com [Sat, 11 Jul 2015 00:40:19 +0000 (00:40 +0000)]
[CoordinatedGraphics] Override primaryLayerID in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=146826

Reviewed by Gyuyoung Kim.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::id): Moved id as inline function.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(WebCore::CoordinatedGraphicsLayer::id):

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

4 years agoUnskip some now-passing tests.
bfulgham@apple.com [Sat, 11 Jul 2015 00:40:01 +0000 (00:40 +0000)]
Unskip some now-passing tests.

* platform/mac-wk2/TestExpectations:

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

4 years agoWeb Inspector: Use -apple-system instead of -webkit-system-font
timothy@apple.com [Sat, 11 Jul 2015 00:16:19 +0000 (00:16 +0000)]
Web Inspector: Use -apple-system instead of -webkit-system-font
https://bugs.webkit.org/show_bug.cgi?id=146860

Remove explicit uses of font-family where inhertance from the body is enough.
Change -webkit-system-font to -apple-system and use -apple-system-monospaced-numbers
for DataGrid and the toolbar dashboard.

Reviewed by Sam Weinig.

* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
* UserInterface/Views/DataGrid.css:
(.data-grid td):
* UserInterface/Views/DefaultDashboardView.css:
(.toolbar .dashboard.default > .item):
(.toolbar .dashboard.default > :matches(.time, .resourcesSize)):
(.toolbar .dashboard.default > .resourcesSize):
* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component):
* UserInterface/Views/LogContentView.css:
(.console-messages):
* UserInterface/Views/Main.css:
(body):
* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree-array-index .index-name):
* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property .prototype-name):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree-outline li .empty-message):
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
(.timeline-overview-graph.rendering-frame > .divider > .label):
* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .issue-widget > .text):
* UserInterface/Views/TypeTreeView.css:
(.type-tree):

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

4 years agoExposing webkitMediaStream as MediaStream
commit-queue@webkit.org [Sat, 11 Jul 2015 00:12:19 +0000 (00:12 +0000)]
Exposing webkitMediaStream as MediaStream
https://bugs.webkit.org/show_bug.cgi?id=146813
<rdar://problem/21754383>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-10
Reviewed by Eric Carlson.

Source/WebCore:

* Modules/mediastream/MediaStream.idl: Changed interface
name from webkitMediaStream to MediaStream

LayoutTests:

* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
Changed attributes from webkitMediaStream to MediaStream
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
Ditto
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
Ditto

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

4 years agoREGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding...
bfulgham@apple.com [Sat, 11 Jul 2015 00:04:59 +0000 (00:04 +0000)]
REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
https://bugs.webkit.org/show_bug.cgi?id=146695
<rdar://problem/21441466>

Reviewed by Tim Horton.

Add a new test that checks for correct mac selection behavior for editable and read-only
text fields.

* platform/mac/editing/selection/context-menu-select-editability-expected.txt: Added.
* platform/mac/editing/selection/context-menu-select-editability.html: Added.

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

4 years agoWeb Inspector: Add source links to functions logged in the console
drousso@apple.com [Fri, 10 Jul 2015 23:31:05 +0000 (23:31 +0000)]
Web Inspector: Add source links to functions logged in the console
https://bugs.webkit.org/show_bug.cgi?id=146377

Reviewed by Timothy Hatcher.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Returns a promise that contains the sourceCodeLocation if the object represents a function and has an objectId.
(WebInspector.RemoteObject.prototype._isFunction):
* UserInterface/Views/ConsoleMessageView.css:
(.console-message .console-message-location):
Added specified values for font sizing and family to ensure that all location links have the same styling.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView):
Now creates a link to the source code of the entered text if the message is of the type "result".
(WebInspector.ConsoleMessageView.prototype._appendLocationLink):
(WebInspector.ConsoleMessageView.prototype._createRemoteObjectIfNeeded):
(WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
(WebInspector.ConsoleMessageView.prototype._linkifyLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrameLocation):
(WebInspector.ConsoleMessageView.prototype._linkifyCallFrame):

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

4 years ago[Mac] Unable to dismiss context menu during test runs
bfulgham@apple.com [Fri, 10 Jul 2015 23:09:59 +0000 (23:09 +0000)]
[Mac] Unable to dismiss context menu during test runs
https://bugs.webkit.org/show_bug.cgi?id=146836

Reviewed by Tim Horton.

Since Context Menus are modal, the test system would block on the displayed context menu,
causing tests to fail. Instead, we should do what WK1 was doing, which is to perform the
mouse click and generate the menu contents, but not ask AppKit to display it.

Drive-by fix: We did not handle 'escape' key presses. This is also fixed.

* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController keyDown:withModifiers:withLocation:]): Handle the 'escape' character.
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::mouseMoveTo): Keep track of the current mouse position.
(WTR::EventSendingController::contextClick): Don't emit an actual context menu invocation and then
copy the menu items. Instead, use WKBundlePageCopyContentMenuAtPointInWindow to do all the same
work without actually calling on AppKit to display the menu.
ask WebCore to do all the work EXCEPT displaying the menu.
* WebKitTestRunner/InjectedBundle/EventSendingController.h:
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::keyDown): Handle the 'escape' character.

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

4 years agoUse CoreAnimation fences instead of synchronous IPC to synchronize resize
timothy_horton@apple.com [Fri, 10 Jul 2015 22:29:07 +0000 (22:29 +0000)]
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>

Reviewed by Anders Carlsson.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
Tiny followup; don't touch Connection if the connection isn't valid.

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

4 years agoSource/WebCore:
commit-queue@webkit.org [Fri, 10 Jul 2015 22:04:50 +0000 (22:04 +0000)]
Source/WebCore:
Added ARIA 1.1 "cell" and "table" roles.
https://bugs.webkit.org/show_bug.cgi?id=146011
<rdar://problem/21398946>

Patch by Nan Wang <n_wang@apple.com> on 2015-07-10
Reviewed by Chris Fleizach.

Created a new role called GridCellRole to match the gridcell role,
so the previous CellRole and TableRole will match to cell and table role.
Made the changes to make sure that both GridRole and TableRole have same
behavior, as well as the circumstance for GridCellRole and CellRole.

Test: accessibility/roles-table-and-cell.html

* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute):
* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedRows):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::selectedChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::roleValue):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

LayoutTests:
Added tests for new role: table and cell.
https://bugs.webkit.org/show_bug.cgi?id=146011.

Patch by Nan Wang <n_wang@apple.com> on 2015-07-10
Reviewed by Chris Fleizach.

Added tests for table and cell role. Also modified other tests to fit the changes.

* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* accessibilit/roles-table-and-cell-expected.txt: Added.
* accessibility/roles-table-and-cell.html: Added.
* platform/mac/accessibility/aria-table-hierarchy-expected.txt:
* platform/mac/accessibility/aria-tables-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

4 years agoDFG fragile frozen values are fundamentally broken
fpizlo@apple.com [Fri, 10 Jul 2015 21:19:51 +0000 (21:19 +0000)]
DFG fragile frozen values are fundamentally broken
https://bugs.webkit.org/show_bug.cgi?id=146602

Reviewed by Mark Lam.

This change gets rid of the FragileValue value strength, because it was fundamentally
broken.

FragileValue was a value known to the compiler but not tracked by the GC in any way -
it wasn't marked and it wasn't weak. This was used to support AI bootstrap for OSR
must-handle values. The philosophy was that if the compiler did use the value for
optimization, it would have been strengthened to a weak value (or maybe even a strong
value, though we probably won't do that). But this was too much of a pipe dream. I've
found at least one case where the compiler did use the value, but never strengthened
it: it would happen if the value ended up in an OSR entry data expected value. Then if
we GCed, we might have killed the value, but OSR entry would still try to use it for
validation. That might have sort of just worked, but it's clearly shady.

The reason why we made must-handle values fragile and not weak is that most of the time
the values disappear from the abstract state: they are LUBed to a non-constant. If we
kept them around as weak, we'd have too many cases of the GC killing the code because
it thought that the value was somehow meaningful to the code when it was only used as a
temporary artifact of optimization.

So, it's true that it's very important for must-handle values not to automatically be
weak or strong. It's also true that the values are necessary for AI bootstrap because
we need to know what values OSR entry will require. But we shouldn't accomplish these
goals by having the compiler hold onto what are essentially dangling pointers.

This implements a better solution: instead of having InPlaceAbstractState bootstrap the
AI with must-handle values at the beginning, we now widen the valuesAtHead of the
must-handle block after AI converges. This widening is done in CFAPhase. This allows us
to see if the must-handle values are necessary at all. In most cases, the widening
takes a non-constant abstract value and simply amends something to its type based on
the type of the must-handle value, and so the must-handle value never actually shows up
in either the IR or any abstract value. In the unlikely event that the value at head is
bottom, we freeze the must-handle value. This change removes FragileValue, and this
freezing uses WeakValue as the strength. That makes sense: since the abstract value was
bottom, the must-handle value becomes integral to the IR and so it makes no sense for
the GC to keep the resulting CodeBlock alive if that must-handle value dies. This will
sometimes happen for example if you have a very long-running loop whose pre-header
allocates some object, but that pre-header appears to always exit to the optimizing JIT
because it was only profiled once in the LLInt and that profiling appears insufficient
to the DFG. In that case, we'll effectively constant-fold the references to the object
inside the loop, which is both efficient (yay constant folding!) and necessary
(otherwise we wouldn't know what the type of the variable should have been).

Testing and debugging this is complicated. So, this adds some new capabilities:

- DFG IR dumps also dump all of the FrozenValues that point to the heap along with
  their strengths, so that it's easy to see what GC objects the DFG feels are necessary
  for the compilation.

- DFG OSR entry preparation prints out the OSR entry data structures, so that it's easy
  to see what GC pointers (and other things) are used for OSR entry validation. The
  printouts are quite detailed, and should also help other kinds of OSR entry
  debugging.

- DFG::Plan now validates whether all of the GC pointers planted in the various JITCode
  data structures are also properly registered as either weak or strong pointers in the
  CodeBlock. This validation check previously failed due to fragile values ending up in
  the OSR entry data structures, both in the newly added test (dead-osr-entry-value.js)
  and in some pre-existing tests (like earley-boyer and 3d-raytrace).

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::stronglyVisitStrongReferences):
* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::visitAggregate):
* bytecode/Operands.h:
(JSC::Operands::operand):
(JSC::Operands::hasOperand):
* bytecode/StructureSet.cpp:
(JSC::StructureSet::dump):
(JSC::StructureSet::validateReferences):
* bytecode/StructureSet.h:
* bytecode/TrackedReferences.cpp: Added.
(JSC::TrackedReferences::TrackedReferences):
(JSC::TrackedReferences::~TrackedReferences):
(JSC::TrackedReferences::add):
(JSC::TrackedReferences::check):
(JSC::TrackedReferences::dump):
* bytecode/TrackedReferences.h: Added.
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::observeTransitions):
(JSC::DFG::AbstractValue::set):
(JSC::DFG::AbstractValue::fixTypeForRepresentation):
(JSC::DFG::AbstractValue::mergeOSREntryValue):
(JSC::DFG::AbstractValue::filter):
(JSC::DFG::AbstractValue::dumpInContext):
(JSC::DFG::AbstractValue::validateReferences):
(JSC::DFG::AbstractValue::setOSREntryValue): Deleted.
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::fullTop):
(JSC::DFG::AbstractValue::merge):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::run):
* dfg/DFGCommonData.cpp:
(JSC::DFG::CommonData::invalidate):
(JSC::DFG::CommonData::validateReferences):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::requiredRegisterCountForExecutionAndExit):
* dfg/DFGFrozenValue.h:
(JSC::DFG::FrozenValue::FrozenValue):
(JSC::DFG::FrozenValue::strengthenTo):
(JSC::DFG::FrozenValue::pointsToHeap):
(JSC::DFG::FrozenValue::strength):
(JSC::DFG::FrozenValue::freeze):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::registerFrozenValues):
(JSC::DFG::Graph::visitChildren):
(JSC::DFG::Graph::freeze):
(JSC::DFG::Graph::freezeStrong):
(JSC::DFG::Graph::freezeFragile): Deleted.
* dfg/DFGGraph.h:
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::setOptimizationThresholdBasedOnCompilationResult):
(JSC::DFG::JITCode::validateReferences):
* dfg/DFGJITCode.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::addressOfDoubleConstant):
(JSC::DFG::JITCompiler::noticeOSREntry):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::branchStructurePtr):
(JSC::DFG::JITCompiler::jitCode):
(JSC::DFG::JITCompiler::noticeOSREntry): Deleted.
* dfg/DFGMinifiedGraph.cpp: Added.
(JSC::DFG::MinifiedGraph::prepareAndShrink):
(JSC::DFG::MinifiedGraph::validateReferences):
* dfg/DFGMinifiedGraph.h:
(JSC::DFG::MinifiedGraph::append):
(JSC::DFG::MinifiedGraph::prepareAndShrink): Deleted.
* dfg/DFGOSREntry.cpp:
(JSC::DFG::OSREntryData::dumpInContext):
(JSC::DFG::OSREntryData::dump):
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntry.h:
(JSC::DFG::getOSREntryDataBytecodeIndex):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::linkOSREntries):
(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
* dfg/DFGStructureAbstractValue.cpp:
(JSC::DFG::StructureAbstractValue::dump):
(JSC::DFG::StructureAbstractValue::validateReferences):
* dfg/DFGStructureAbstractValue.h:
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* dfg/DFGValueStrength.cpp:
(WTF::printInternal):
* dfg/DFGValueStrength.h:
(JSC::DFG::merge):
* ftl/FTLExitPropertyValue.cpp:
(JSC::FTL::ExitPropertyValue::dump):
(JSC::FTL::ExitPropertyValue::validateReferences):
* ftl/FTLExitPropertyValue.h:
* ftl/FTLExitTimeObjectMaterialization.cpp:
(JSC::FTL::ExitTimeObjectMaterialization::dump):
(JSC::FTL::ExitTimeObjectMaterialization::validateReferences):
* ftl/FTLExitTimeObjectMaterialization.h:
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dump):
(JSC::FTL::ExitValue::validateReferences):
* ftl/FTLExitValue.h:
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::dfgCommon):
(JSC::FTL::JITCode::validateReferences):
* ftl/FTLJITCode.h:
(JSC::FTL::JITCode::handles):
(JSC::FTL::JITCode::dataSections):
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::validateReferences):
* ftl/FTLOSRExit.h:
(JSC::FTL::OSRExit::considerAddingAsFrequentExitSite):
* jit/JITCode.cpp:
(JSC::JITCode::typeName):
(JSC::JITCode::validateReferences):
(JSC::JITCode::execute):
* jit/JITCode.h:
(JSC::JITCode::start):
* tests/stress/dead-osr-entry-value.js: Added.
(foo):

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

4 years agoWeb Inspector: Storage tab should have a scope bar in the sidebar
timothy@apple.com [Fri, 10 Jul 2015 21:17:47 +0000 (21:17 +0000)]
Web Inspector: Storage tab should have a scope bar in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=146799

Fix a couple typos found post review.

* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):

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

4 years ago[WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
cdumez@apple.com [Fri, 10 Jul 2015 21:15:44 +0000 (21:15 +0000)]
[WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
https://bugs.webkit.org/show_bug.cgi?id=146855

Reviewed by Anders Carlsson.

Increase the QoS of some of our WorkQueues to match the one of our processes. For
e.g., even though the WebContent and the Networking processes have USER_UNITIATED
QoS, the IPC between them is using a WorkQueue with DEFAULT QoS. Similarly, the
WorkQueue used for network cache reads has DEFAULT QoS.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):

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

4 years agoIt should be possible to run the OSR exit fuzzer
fpizlo@apple.com [Fri, 10 Jul 2015 21:12:46 +0000 (21:12 +0000)]
It should be possible to run the OSR exit fuzzer
https://bugs.webkit.org/show_bug.cgi?id=146814

Reviewed by Mark Lam.

Source/JavaScriptCore:

Fix a silly bug: the option matching was accidentally allowing a prefix match, which
always did the wrong thing for --fireOSRExitFuzzAt and --fireOSRExitFuzzAtStatic. Make
this an exact match instead.

* runtime/Options.cpp:
(JSC::Options::setOption):

Tools:

This runs a test command to detect how many static OSR exit sites it had, and then for
each exit site, it triggers three exits (earliest opportunity, last opportunity, some
middle opportunity), plus a mode where the check always exits. This is an exhaustive
search, so in the future it'll be very appropriate for cases where we have a simple test
and we want to see what happens when you eventually exit in this test.

Right now this isn't hooked into any specific tests, but I've done some spot checks on it
and it seems to do the right thing.

* Scripts/jsc-stress-test-helpers/js-osr-exit-fuzz: Added.
(fail):

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

4 years agoSerialized declaration for background-size/-webkit-mask-size should preserve identical
dbates@webkit.org [Fri, 10 Jul 2015 20:40:27 +0000 (20:40 +0000)]
Serialized declaration for background-size/-webkit-mask-size should preserve identical
values instead of coalescing them
https://bugs.webkit.org/show_bug.cgi?id=143191
<rdar://problem/21759393>

Reviewed by Darin Adler.

Source/WebCore:

Inspired by Blink r157745:
<http://src.chromium.org/viewvc/blink?view=revision&revision=157745>
And Blink r172548:
<http://src.chromium.org/viewvc/blink?view=revision&revision=172548>

Fixes an issue where identical values in a CSS declaration for properties background-size
and -webkit-mask-size would be coalesced when serialized.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillSize): Modified to create a Pair object with the appropriate
identical value encoding strategy. We only coalesce identical values when serializing the
declaration of property -webkit-background-size.
* css/Pair.h:
(WebCore::Pair::create): Added variant that takes an encoding.
(WebCore::Pair::cssText): Moved implementation of Pair::generateCSSString() to here and
modified to conditionally coalesce identical values during serialization.
(WebCore::Pair::Pair): Added variant that takes an encoding.
(WebCore::Pair::generateCSSString): Deleted; moved implementation into Pair::cssText().

LayoutTests:

Inspired by Blink r172548:
<http://src.chromium.org/viewvc/blink?view=revision&revision=172548>

Update tests and test results to ensure we serialize background-size, -webkit-mask-size
correctly when identical values are present in their declarations.

* fast/backgrounds/size/parsing-background-size-values-expected.txt:
* fast/backgrounds/size/resources/parsing-background-size-values.js:
* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:

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

4 years agoBidi-Isolate inlines break layout with collapsed whitespace
mmaxfield@apple.com [Fri, 10 Jul 2015 20:39:16 +0000 (20:39 +0000)]
Bidi-Isolate inlines break layout with collapsed whitespace
https://bugs.webkit.org/show_bug.cgi?id=109624
<rdar://problem/21752834>

Reviewed by David Hyatt.

Source/WebCore:

This patch changes the logic in constructBidiRunsForSegment() when it encounters an
isolate. It already has logic to create a BidiResolver for the isolated text;
however, that logic doesn't handle setting up the MidpointState at all.
Specifically, we can set the MidpointState's cursor to point to the context which
we can remember from addPlaceholderRunForIsolatedInline(). This information is
remembered in a HashMap in BidiResolver.

This patch is a partial port of Blink patch
https://src.chromium.org/viewvc/blink?view=rev&revision=159203

Here is some explanatory text regarding how we collapse spaces:

Collapsing whitespace happens in a series of phases. The first phase occurs when
we perform line breaking. Here, we keep track of sequences of whitespace which
should be collapsed, in the form of a vector of pairs of InlineIterators. We put
this knowledge into a MidpointState object.

Then, once we have a line, we run the bidi algorithm on the line (including the
whitespace). As output, the bidi algorithm calls the BidiResolver::appendRun()
callback with two InlineIterators each time it wants to create a run. Because
each renderer that we create has to be owned by exactly one DOM node,
BidiResolver::appendRun() iterates between its two InlineIterator arguments,
calling RenderBlockFlow::appendRunsForObject() on each interstitial DOM node.

This is the function where whitespace collapsing happens. The MidpointState object
keeps a cursor into its remembered whitespace sequences. Here, we simply make a
bidi run for each region in between adjacent whitespace pairs in the MidpointState
object. These bidi runs eventually get turned into leaf InlineBoxes.

The problem is that the BidiResolver::appendRun() callbacks don't occur in
string-order, but the Midpoint InlineIterator pairs are in string-order. In
particular, within a particular isolate, appendRun() gets called in string
order, but callbacks that occur for inner isolates are deferred. This means that
RenderBlockFlow::appendRunsForObject() gets confused when it looks for relevant
whitespace to skip.

Test: fast/text/bidi-isolate-whitespace-collapse.html

* platform/text/BidiResolver.h:
(WebCore::MidpointState::numMidpoints): Returning a const unsigned& is silly.
(WebCore::MidpointState::currentMidpoint): Ditto.
(WebCore::MidpointState::setCurrentMidpoint): The isolated MidpointState object
needs to be able to set its current midpoint to point to the first one inside
the isolate.
(WebCore::MidpointState::decrementNumMidpoints): Renamed from "decrease"
(WebCore::MidpointState::betweenMidpoints): This function is true iff
currentMidpoint() % 2. Instead of keeping a member variable, we can just compute
that.
(WebCore::MidpointState::reset): Deleted.
(WebCore::MidpointState::decreaseNumMidpoints): Deleted.
(WebCore::MidpointState::setBetweenMidpoints): Deleted.
* rendering/InlineIterator.h:
(WebCore::IsolateTracker::addFakeRunIfNecessary): Call
RenderBlockFlow::appendRunsForObject() to keep our MidpointState object in sync
when we pop out of the isolated object. However, we pass in a null run list,
because we don't want to append just yet (that happens when we process the
isolate).
(WebCore::InlineBidiResolver::appendRun): Update for new signature of
appendRunsForObject().
* rendering/RenderBlock.h:
(WebCore::RenderBlock::shouldSkipCreatingRunsForObject): Take a reference instead
of a pointer.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createRun): Ditto.
(WebCore::RenderBlockFlow::appendRunsForObject): Allow someone passing us a null
BidiRunList. In this case, we will keep the resolver's midpointState() up to date,
but won't actually emit any runs.
(WebCore::notifyResolverToResumeInIsolate): Renamed from setUp.
(WebCore::isolatedResolversMidpointState): Calculate the midpoint state for the
isolated resolver.
(WebCore::setUpResolverToResumeInIsolate): Call isolatedResolversMidpointState().
(WebCore::constructBidiRunsForSegment): Pass in the topResolver, which is
necessary for isolatedResolversMidpointState().
* rendering/line/BreakingContext.h:
(WebCore::checkMidpoints):

LayoutTests:

* fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean-expected.txt:
* fast/text/bidi-isolate-whitespace-collapse-expected.html: Added.
* fast/text/bidi-isolate-whitespace-collapse.html: Added.
* fast/text/international/embed-bidi-style-in-isolate-crash-expected.txt:
* fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt:

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

4 years agoCleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
dbates@webkit.org [Fri, 10 Jul 2015 20:34:30 +0000 (20:34 +0000)]
Cleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=146852

Reviewed by Anders Carlsson.

* css/CSSParser.cpp:
(WebCore::createPrimitiveValuePair): Write using a variadic template that forwards its
arguments to the appropriate Pair::create constructor.
(WebCore::CSSParser::parse4ValuesFillPosition): Use RefPtr&& instead of PassRefPtr.
(WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
(WebCore::CSSParser::parseFillPosition): Use WTF::move() instead of RefPtr::release()
so that we pass a rvalue reference to RefPtr.
(WebCore::CSSParser::parseFillSize): Ditto.
(WebCore::CSSParser::parseBorderImageRepeat): Ditto.
* css/CSSParser.h:
* css/Pair.h:
(WebCore::Pair::create): Use RefPtr&& instead of PassRefPtr.
(WebCore::Pair::setFirst): Ditto.
(WebCore::Pair::setSecond): Ditto.
(WebCore::Pair::Pair): Ditto. Also substitute nullptr for 0 in the member initialization
list of the default constructor.

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

4 years agoCrash at WebCore::WebPage::innerFrameQuad.
zalan@apple.com [Fri, 10 Jul 2015 20:19:52 +0000 (20:19 +0000)]
Crash at WebCore::WebPage::innerFrameQuad.
https://bugs.webkit.org/show_bug.cgi?id=146843
rdar://problem/21501819

Reviewed by Andreas Kling.

We may end up with a null rootEditableElement() after calling Document::updateLayout().

Speculative fix. Not reproducible.

Source/WebCore:

* page/Frame.cpp: Some const cleanup.
(WebCore::Frame::visiblePositionForPoint):
* page/Frame.h:

Source/WebKit2:

* WebProcess/WebPage/WebPage.h: Some const cleanup.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::innerFrameQuad): null check assistedNode.rootEditableElement()
(WebKit::constrainPoint):
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::updateSelectionWithExtentPoint):
(WebKit::WebPage::getPositionInformation):

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

4 years agoCrash in HistoryController::updateForCommit dereferencing a null HistoryItem.
beidson@apple.com [Fri, 10 Jul 2015 19:01:51 +0000 (19:01 +0000)]
Crash in HistoryController::updateForCommit dereferencing a null HistoryItem.
<rdar://problem/21371589> and https://bugs.webkit.org/show_bug.cgi?id=146842

Reviewed by Chris Dumez.

No new tests (Unknown how to reproduce).

This patch basically rolls back part of http://trac.webkit.org/changeset/179472.

r179472 changed HistoryController::setCurrentItem() to take a reference instead of a pointer.
Unfortunately, we sometimes call setCurrentItem(nullptr).

We'd like to *not* do that, and there are assertions in place to try to catch when we do,
but in the meantime it is not valid to dereference nullptr.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadSameDocumentItem):

* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::setCurrentItem): Take a ptr instead of a ref.
(WebCore::HistoryController::createItem):
* loader/HistoryController.h:

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

4 years ago[CSS Grid Layout] Grid item's auto-margins are not applied correctly
jfernandez@igalia.com [Fri, 10 Jul 2015 17:53:55 +0000 (17:53 +0000)]
[CSS Grid Layout] Grid item's auto-margins are not applied correctly
https://bugs.webkit.org/show_bug.cgi?id=146581

Reviewed by Darin Adler.

Source/WebCore:

Grid Layout specification states that auto-margins must prevent to apply
any Box Alignment property in that dimension. Instead, auto-margin is
applied as described in the spec.

http://dev.w3.org/csswg/css-grid/#auto-margins

Only Flexbox and Grid Layout implement vertical auto-margin alignment;
for other layout modes, auto-margin should compute as 0.

Tests: fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html
       fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html
       fast/css-grid-layout/grid-item-auto-margins-alignment.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateGridAlignmentAfterStyleChange):
* rendering/RenderBox.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::hasAutoMarginsInColumnAxis):
(WebCore::RenderGrid::hasAutoMarginsInRowAxis):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
(WebCore::RenderGrid::rowPositionForChild):
(WebCore::RenderGrid::columnPositionForChild):
* rendering/RenderGrid.h:

LayoutTests:

Tests to verify auto-margins alignment works as expected with grid items.

* fast/css-grid-layout/grid-item-auto-margins-alignment-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html: Added.
* fast/css-grid-layout/grid-item-auto-margins-alignment.html: Added.

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

4 years agoAdd tests for r186649
commit-queue@webkit.org [Fri, 10 Jul 2015 17:41:51 +0000 (17:41 +0000)]
Add tests for r186649
https://bugs.webkit.org/show_bug.cgi?id=146821

Patch by Alex Christensen <achristensen@webkit.org> on 2015-07-10
Reviewed by Darin Adler.

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::compareContents):
(TestWebKitAPI::expectedIndex):
Add some larger tests to test large jumps.

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

4 years agoFix overloaded virtual function warning in ScrollbarThemeGtk.h
ossy@webkit.org [Fri, 10 Jul 2015 17:38:16 +0000 (17:38 +0000)]
Fix overloaded virtual function warning in ScrollbarThemeGtk.h
https://bugs.webkit.org/show_bug.cgi?id=145920

Reviewed by Darin Adler.

* platform/gtk/ScrollbarThemeGtk.h:

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

4 years agoAX: <details> element should allow expand/close through AX API
cfleizach@apple.com [Fri, 10 Jul 2015 16:34:32 +0000 (16:34 +0000)]
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Apply review comments from Daniel Bates.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::setIsExpanded):

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

4 years ago[iOS] Document picker has overlapping icons on iPad
jhoneycutt@apple.com [Fri, 10 Jul 2015 16:33:47 +0000 (16:33 +0000)]
[iOS] Document picker has overlapping icons on iPad
https://bugs.webkit.org/show_bug.cgi?id=146808
<rdar://problem/21251875>

Reviewed by Sam Weinig.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel documentMenu:didPickDocumentPicker:]):
Don't show this UI as a popover on iPad; the default is a full screen
form sheet.

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

4 years agoASSERT restoring from page cache as DocumentLoader reattaches to its Frame.
beidson@apple.com [Fri, 10 Jul 2015 15:45:04 +0000 (15:45 +0000)]
ASSERT restoring from page cache as DocumentLoader reattaches to its Frame.
<rdar://problem/21766282> and https://bugs.webkit.org/show_bug.cgi?id=146786

Reviewed by NOBODY (Fixing obvious boneheaded mistake in r186642)

No new tests (Covered by existing)

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::attachToFrame): Bail if reattaching to the current Frame,
  which happens when restoring from the page cache.

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

4 years agoVersioning.
matthew_hanson@apple.com [Fri, 10 Jul 2015 14:53:22 +0000 (14:53 +0000)]
Versioning.

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

4 years agoFix typo in LayoutTests/platform/wk2/TestExpectation.
commit-queue@webkit.org [Fri, 10 Jul 2015 12:39:59 +0000 (12:39 +0000)]
Fix typo in LayoutTests/platform/wk2/TestExpectation.
https://bugs.webkit.org/show_bug.cgi?id=146830

Unreviewed, WK2 gardening.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-07-10

* platform/wk2/TestExpectations:

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

4 years ago[GTK] ar warning when linking static libraries
mcatanzaro@igalia.com [Fri, 10 Jul 2015 12:33:18 +0000 (12:33 +0000)]
[GTK] ar warning when linking static libraries
https://bugs.webkit.org/show_bug.cgi?id=144988

Reviewed by Carlos Garcia Campos.

Do not use 'u' when calling ar. This argument conflicts with 'D' and is ignored if 'D' is
used, and 'D' is used by default if binutils is built with --enable-deterministic-archives.
Using 'u' with 'D' causes a warning to be printed when linking static libraries. At least
Fedora and Debian have recently both chosen to use --enable-deterministic-archives, so we
should either stop using 'u' or else add 'U' as well in order to disable deterministic
archives. Using 'U' should result in a somewhat faster build (at least when using the
Makefile generator), but it's unlikely that the difference is significant, so let's simply
remove 'u' until someone determines otherwise. This seems like a better option than adding
'U' so as not to foil distributions' attempts to perform deterministic builds. This also
aligns us with the behavior of upstream CMake (which has never used 'u'). This is a minor
behavior change on distributions that do not use --enable-deterministic-archives, notably
Arch and openSUSE.

* Source/cmake/OptionsCommon.cmake:

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

4 years agoUpdated Swedish translation for WebKitGTK+
commit-queue@webkit.org [Fri, 10 Jul 2015 12:30:00 +0000 (12:30 +0000)]
Updated Swedish translation for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=146596

Patch by Josef Andersson <josef.andersson@fripost.org> on 2015-07-10
Reviewed by Carlos Garcia Campos.

* sv.po:

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

4 years ago[Planet WebKit] Update the feed url of the University of Szeged's blog.
loki@webkit.org [Fri, 10 Jul 2015 12:26:43 +0000 (12:26 +0000)]
[Planet WebKit] Update the feed url of the University of Szeged's blog.
https://bugs.webkit.org/show_bug.cgi?id=146835

Reviewed by Csaba Osztrogonác.

* config.ini:

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

4 years ago[Streams API] Fix readable-stream-tee.html
youenn.fablet@crf.canon.fr [Fri, 10 Jul 2015 06:05:45 +0000 (06:05 +0000)]
[Streams API] Fix readable-stream-tee.html
https://bugs.webkit.org/show_bug.cgi?id=146803

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-tee.html:

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

4 years agoPlugin create can end up destroying its renderer.
zalan@apple.com [Fri, 10 Jul 2015 05:55:20 +0000 (05:55 +0000)]
Plugin create can end up destroying its renderer.
https://bugs.webkit.org/show_bug.cgi?id=146824
rdar://problem/18921429

Reviewed by Andreas Kling.

Plugins can run arbitrary code during initialization. If the plugin
happens to destroy the associated node, its renderer becomes invalid.
This patch checks whether the renderer survived the createPlugin() call.
(This WeakPtr pattern is also used in RenderWidget to avoid dangling pointers.)

Speculative fix. Not reproducible.

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

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

4 years agoQuick fix for run_benchmark script that AppKit.NSRunningApplication does not work...
commit-queue@webkit.org [Fri, 10 Jul 2015 05:31:50 +0000 (05:31 +0000)]
Quick fix for run_benchmark script that AppKit.NSRunningApplication does not work properly
https://bugs.webkit.org/show_bug.cgi?id=146820

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-07-09
Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:
(OSXBrowserDriver):
(OSXBrowserDriver.close_browsers):
(OSXBrowserDriver._terminiate_processes):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
(OSXChromeDriver):
(OSXChromeCanaryDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
(OSXFirefoxDriver):
(OSXFirefoxNightlyDriver):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver):

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

4 years agoSource/WebCore:
mitz@apple.com [Fri, 10 Jul 2015 05:18:53 +0000 (05:18 +0000)]
Source/WebCore:
WebCore part of Track and expose policies for external URL schemes and App Links separately
https://bugs.webkit.org/show_bug.cgi?id=146822

Reviewed by Anders Carlsson.

* loader/FrameLoaderTypes.h: Added ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes,
meaning external schemes are allowed but App Links are not. The opposite state doesn’t
exist.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected): Opening a link in a new window
or in the current window should never open it as an App Link.

Source/WebKit2:
WebKit2 part of Track and expose policies for external URL schemes and App Links separately
https://bugs.webkit.org/show_bug.cgi?id=146822

Reviewed by Anders Carlsson.

* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
  Replaced the shouldOpenExternalURLsPolicy boolean member with a
  shouldOpenExternalURLsPolicy member whose type is ShouldOpenExternalURLsPolicy, and
  updated encoding and decoding:

* UIProcess/API/APINavigationAction.h:
  Added shouldOpenAppLinks boolean to NavigationAction::create and the constructor. It
  augments the policy in the NavigationActionData with a valude decided in the UI process.
  Replaced shouldOpenExternalURLs() with shouldOpenExternalSchemes() and
  shouldOpenAppLinks() which check the policy and the new m_shouldOpenAppLinks boolean.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _shouldOpenExternalSchemes]): Getter for new property, calls through
  to the NavigationAction.
(-[WKNavigationAction _shouldOpenAppLinks]): Ditto.
(-[WKNavigationAction _shouldOpenExternalURLs]): Now deprecated and returns the
  _shouldOpenExternalSchemes value.
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new properties for the two
  policies and deprecated old property.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryAppLink): Changed to use NavigationAction::shouldOpenAppLinks, which
  encapsulates logic that used to be here.

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage): Allow App Links (if already allowed by policy).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Moved logic from tryAppLink in
  NavigationState.mm here and pass the result to NavigationAction::create.
(WebKit::WebPageProxy::decidePolicyForNewWindowAction): Allow App Links (if already allowed
  by policy).
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::loadRequest): Changed the default policy to not allow App Links (but
  still allow external schemes).

* WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp:
(WKBundleNavigationActionGetShouldTryAppLinks): Added this getter.
* WebProcess/InjectedBundle/API/c/WKBundleNavigationActionPrivate.h:

* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
  Added m_shouldTryAppLinks boolean member, initialized from the policy. Updated the
  initialization of m_shouldOpenExternalURLs to account for the new policy.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Pass the policy
  in the navigation data.

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

4 years agoFetching Content Security Policy report URL should respect same origin policy
dbates@webkit.org [Fri, 10 Jul 2015 05:10:18 +0000 (05:10 +0000)]
Fetching Content Security Policy report URL should respect same origin policy
https://bugs.webkit.org/show_bug.cgi?id=146754
<rdar://problem/18860259>

Reviewed by Brady Eidson.

Inspired by Blink r149791 (by Mike West <mkwst@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=149791&view=revision>

Source/WebCore:

As per <http://www.w3.org/TR/2015/CR-CSP2-20150219/#send-violation-reports>, fetching the
Content Security Policy report URL should include cookies if and only if the origin of
the protected resource is equal to the origin of the report URL.

Tests: http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html
       http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html
       http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html
       http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html
       http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html
       http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html

* loader/PingLoader.cpp:
(WebCore::PingLoader::sendViolationReport):

LayoutTests:

Added additional tests for private browsing mode.

* http/tests/cookies/resources/setCookies.cgi:
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html: Added.
* http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html: Added.
* http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html: Added.
* http/tests/security/contentSecurityPolicy/resources/save-report.php:
* platform/wk2/TestExpectations: Skip private browsing mode tests in WebKit2 until we fix <https://bugs.webkit.org/show_bug.cgi?id=115274>.

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

4 years agoUse CoreAnimation fences instead of synchronous IPC to synchronize resize
timothy_horton@apple.com [Fri, 10 Jul 2015 03:45:10 +0000 (03:45 +0000)]
Use CoreAnimation fences instead of synchronous IPC to synchronize resize
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>

Reviewed by Anders Carlsson.

Because of changes in underlying frameworks, we can no longer depend on
blocking the UI process main thread to be sufficient to synchronize
UI process CA commits with commits coming from the Web process.

Instead, we have to use CoreAnimation fences to perform this synchronization.
Instead of blocking inside waitForAndDispatchImmediately, we'll end up
blocking during the CA commit.

* Platform/mac/LayerHostingContext.mm:
Use HAVE(COREANIMATION_FENCES).

* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::installIncomingSyncMessageCallback):
(IPC::Connection::uninstallIncomingSyncMessageCallback):
Keep track of a set of incoming sync message callbacks, and fire them
(on another queue) when a sync message arrives.

(IPC::Connection::hasIncomingSyncMessage):
* Platform/IPC/Connection.h:
Add a way to check if there are any sync messages in the queue.

* UIProcess/API/mac/WKView.mm:
(-[WKView forceAsyncDrawingAreaSizeUpdate:]):
(-[WKView waitForAsyncDrawingAreaSizeUpdate]):
These are no longer used; do nothing on 10.10+.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::updateGeometry):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add a MachSendRight parameter to UpdateGeometry, so that we can send along
a fence port with the geometry update if needed.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Apply the incoming fence so that geometry changes will be synchronized between processes.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
Don't wait for DidUpdateGeometry to come in if we're using fences to achieve the same thing.

(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Create and block us on a fence and send it along with the geometry update.
If a sync message is in the incoming message queue, don't create the fence;
if a sync message comes in at any point after we've installed the fence (but
before the relevant commit completes), invalidate the fence, so that we won't
end up temorarily deadlocked waiting for the fence timeout.

* platform/cocoa/MachSendRight.h:
Export some constructors.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.

* wtf/Platform.h:
Add HAVE(COREANIMATION_FENCES)

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

4 years agoFollowup to r186647
beidson@apple.com [Fri, 10 Jul 2015 00:40:36 +0000 (00:40 +0000)]
Followup to r186647

Reviewed by NOBODY.

Thanks, EWS and commit-queue, for not catching this!

* loader/DocumentLoader.h: Add a semi-colon.

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

4 years ago[GTK] pango should be included in the default jhbuild moduleset
mcatanzaro@igalia.com [Fri, 10 Jul 2015 00:20:31 +0000 (00:20 +0000)]
[GTK] pango should be included in the default jhbuild moduleset
https://bugs.webkit.org/show_bug.cgi?id=146683

Reviewed by Martin Robinson.

Recent releases of pango 1.36 use functions that are only provided by fontconfig 2.12 when
compiled against sufficiently-new versions of fontconfig. Since we depend on both pango and
fontconfig, and pango depends on fontconfig, we must either add pango to our jhbuild
moduleset or else upgrade fontconfig to a recent unstable release (knowing that we will have
the same problem again the next time pango wants to use a new fontconfig feature), or remove
fontconfig (which would make it hard to keep tests working). On the balance, adding pango is
best.

* gtk/jhbuild-optional.modules: Remove pango
* gtk/jhbuild.modules: Add pango and update to latest 1.36.8

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

4 years agoWeb Inspector: Storage tab should have a scope bar in the sidebar
timothy@apple.com [Fri, 10 Jul 2015 00:11:09 +0000 (00:11 +0000)]
Web Inspector: Storage tab should have a scope bar in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=146799

Reviewed by Mark Lam.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Main.html: Added StorageSidebarPanel.css.
* UserInterface/Views/StorageSidebarPanel.css: Added.
* UserInterface/Views/StorageSidebarPanel.js:
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype.hasCustomFilters):
(WebInspector.StorageSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.StorageSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.StorageSidebarPanel.prototype._scopeBarSelectionDidChange):

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

4 years ago[GTK] Crash when spell checker returns no guesses
mcatanzaro@igalia.com [Fri, 10 Jul 2015 00:09:11 +0000 (00:09 +0000)]
[GTK] Crash when spell checker returns no guesses
https://bugs.webkit.org/show_bug.cgi?id=146805

Reviewed by Martin Robinson.

Properly handle ContextMenuItemTagNoGuessesFound in the switch statement.

* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetForContextMenuItem):

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

4 years agoREGRESSION: Inline media scrubbing always pauses the video
dino@apple.com [Fri, 10 Jul 2015 00:02:50 +0000 (00:02 +0000)]
REGRESSION: Inline media scrubbing always pauses the video
https://bugs.webkit.org/show_bug.cgi?id=146819
<rdar://problem/21572027>

Reviewed by Eric Carlson. Joseph Pecoraro also was really
helpful in diagnosing the problem.

When we moved some code from a getter/setter in the child
class to the base class, it was no longer being called due
to the bad way we were implementing inheritance. The solution
was to have the child class explicitly call into the base
class.

The much better solution would have been to rewrite everything
to use ES6 classes or, as a smaller change, assign the __proto__
directly on the child prototype. But I felt that was a bit
too risky at this point.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.extend): Describe in a comment why the extend function
is not suitable.
* Modules/mediacontrols/mediaControlsiOS.js: Add a getter/setter for
scrubbing that calls into the base Controller.

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

4 years agoWeb Inspector: Make the TabBar work better with AX
timothy@apple.com [Fri, 10 Jul 2015 00:02:41 +0000 (00:02 +0000)]
Web Inspector: Make the TabBar work better with AX
https://bugs.webkit.org/show_bug.cgi?id=146806

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TabBar.js:
(WebInspector.TabBar): Set role to tablist and drop tabIndex.
* UserInterface/Views/TabBarItem.js:
(WebInspector.TabBarItem): Set role to tab and tabIndex.
(WebInspector.TabBarItem.prototype.set selected): Toggle aria-selected.

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

4 years agoAX: <details> element should allow expand/close through AX API
cfleizach@apple.com [Thu, 9 Jul 2015 23:43:08 +0000 (23:43 +0000)]
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Reviewed by Mario Sanchez Prada.

Forgot this file with the original commit.

* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::toggleOpen):

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

4 years ago[Content Extensions] Add 3 byte jump size.
achristensen@apple.com [Thu, 9 Jul 2015 23:33:25 +0000 (23:33 +0000)]
[Content Extensions] Add 3 byte jump size.
https://bugs.webkit.org/show_bug.cgi?id=146425

Reviewed by Darin Adler.

Source/WebCore:

* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::smallestPossibleJumpSize):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::appendZeroes):
(WebCore::ContentExtensions::DFABytecodeCompiler::compile):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::jumpSizeInBytes):
(WebCore::ContentExtensions::getJumpSize):
(WebCore::ContentExtensions::getJumpDistance):
Added DFABytecodeJumpSize::Int24.

Source/WebKit2:

* UIProcess/API/APIUserContentExtensionStore.h:
Increment CurrentContentExtensionFileVersion because of change in the bytecode.

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

4 years agoSafariViewController loads partial webpage or entirely blank webpage
andersca@apple.com [Thu, 9 Jul 2015 23:32:15 +0000 (23:32 +0000)]
SafariViewController loads partial webpage or entirely blank webpage
https://bugs.webkit.org/show_bug.cgi?id=146815
rdar://problem/21734757

Reviewed by Dan Bernstein.

* Platform/spi/ios/UIKitSPI.h:
Add _hostProcessIdentifier getter.

* UIProcess/ApplicationStateTracker.h:
Change ApplicationStateTracker to hold on to a WKContentView instead of a UIView.

* UIProcess/ApplicationStateTracker.mm:
(WebKit::applicationType):
Add a helper function that returns the type of application the web view is hosted by (regular
application, view service or extension).

(WebKit::ApplicationStateTracker::ApplicationStateTracker):
Register notifications and update m_isInBackground. For regular applications, just listen for UIApplication notifications.
For view services, walk the view controller hierarchy and find the service view controller and listen for notifications and use
BKS to find the background state of the host application. For extensions, just use BKSApplicationStateMonitor directly.

(WebKit::isViewService): Deleted.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView willMoveToWindow:]):
If we're moving out of a window, null out the state tracker.

(-[WKContentView didMoveToWindow]):
If we moved to a window, create a new state tracker.

(-[WKContentView isBackground]):
Handle a null application state.

(-[WKContentView _commonInitializationWithProcessPool:configuration:]): Deleted.
Don't create the application state here.

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

4 years agoAdd better ASSERTs to learn more about what is going wrong in DocumentLoader::detachF...
beidson@apple.com [Thu, 9 Jul 2015 23:29:33 +0000 (23:29 +0000)]
Add better ASSERTs to learn more about what is going wrong in DocumentLoader::detachFromFrame()
https://bugs.webkit.org/show_bug.cgi?id=146816

Reviewed by Alex Christensen.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::attachToFrame): Set the "has ever been attached" flag to true.
(WebCore::DocumentLoader::detachFromFrame): ASSERT m_frame is non-null, but with a message
  depending on the value of the "has ever been attached" flag.
* loader/DocumentLoader.h:

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

4 years ago[Mac, iOS] The mimeTypeCache should return a reference
bfulgham@apple.com [Thu, 9 Jul 2015 23:27:24 +0000 (23:27 +0000)]
[Mac, iOS] The mimeTypeCache should return a reference
https://bugs.webkit.org/show_bug.cgi?id=146809

Reviewed by Eric Carlson.

No new tests: No change in functionality.

Don't copy the mime type cache every time someone asks it a question. Return
by reference instead.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::mimeTypeCache):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::mimeTypeCache):
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::mimeTypeCache):

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

4 years agoWeb Inspector: Don't clear the console when navigating to a different page
drousso@apple.com [Thu, 9 Jul 2015 23:21:11 +0000 (23:21 +0000)]
Web Inspector: Don't clear the console when navigating to a different page
https://bugs.webkit.org/show_bug.cgi?id=142751

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager): No longer distinguishes from page refreshes and page navigations for console clearing.
(WebInspector.LogManager.prototype._delayedMessagesCleared):
(WebInspector.LogManager.prototype._mainResourceDidChange):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent): Changed context menu keep/clear log text.
(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
(WebInspector.LogContentView.prototype._toggleClearLogOnReloadSetting): Deleted.

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

4 years agoRubber banding is broken when using a Mighty Mouse
commit-queue@webkit.org [Thu, 9 Jul 2015 23:02:41 +0000 (23:02 +0000)]
Rubber banding is broken when using a Mighty Mouse
https://bugs.webkit.org/show_bug.cgi?id=146693

Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2015-07-09
Reviewed by Tim Horton.

Source/WebCore:

Sets the "constrain content edge scrolling" flag to true by default, causing scrolling
with a Mighty Mouse to not extend beyond the container's edges.

Test: platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html

* rendering/RenderLayer.cpp: Remove code that defaulted the flag to false.
(WebCore::RenderLayer::RenderLayer): Deleted.
* rendering/RenderMarquee.cpp: Added special case for marquees that allows content to scroll.
(WebCore::RenderMarquee::RenderMarquee): See above.

LayoutTests:

* platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html: Added.

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

4 years agoSymbolTable::entryFor() should do a bounds check before indexing into the localToEntr...
mark.lam@apple.com [Thu, 9 Jul 2015 22:58:05 +0000 (22:58 +0000)]
SymbolTable::entryFor() should do a bounds check before indexing into the localToEntry vector.
https://bugs.webkit.org/show_bug.cgi?id=146807

Reviewed by Filip Pizlo.

When we capture an argument by name and we use "arguments", we put all of the
arguments into the scope.  But destructured arguments are put into the scope
anonymously i.e. the SymbolTable knows that the scope offset is in use via
SymbolTable::m_maxScopeOffset, but that ScopeOffset won't appear in
SymbolTable::m_map.

The SymbolTable's m_localToEntry vector is synthesized from its m_map, and will
have a size which is based on the largest ScopeOffset in the m_map.  If we have a
scenario where the anonymous argument is at a higher ScopeOffset than all the
named arguments, then the m_localsToEntry vector will not have an entry for it
i.e. the m_localsToEntry vector will have a size that is <= the ScopeOffset of
the anonymous argument.

Hence, SymbolTable::entryFor() should ensure that the requested ScopeOffset is
within the bounds of the m_localToEntry vector before indexing into it.

* runtime/SymbolTable.cpp:
(JSC::SymbolTable::entryFor):

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

4 years agoDocumentLoader::detachFromFrame() is being called with no current Frame set.
beidson@apple.com [Thu, 9 Jul 2015 22:30:42 +0000 (22:30 +0000)]
DocumentLoader::detachFromFrame() is being called with no current Frame set.
<rdar://problem/21293082> and https://bugs.webkit.org/show_bug.cgi?id=146786

Reviewed by Sam Weinig.

No new tests (Unknown how to reproduce).

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::attachToFrame):
(WebCore::DocumentLoader::detachFromFrame): Null check m_frame before dereferencing it.
(WebCore::DocumentLoader::setFrame): Deleted, renamed to attachToFrame(), and take's
  a Frame& instead of a Frame*.
* loader/DocumentLoader.h:

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::initForSynthesizedDocument): setFrame is now attachToFrame.
(WebCore::FrameLoader::setPolicyDocumentLoader): Ditto.
(WebCore::FrameLoader::transitionToCommitted): Ditto.

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

4 years agoExpose MediaStream methods to be used in the MediaStream Engine
commit-queue@webkit.org [Thu, 9 Jul 2015 22:11:53 +0000 (22:11 +0000)]
Expose MediaStream methods to be used in the MediaStream Engine
https://bugs.webkit.org/show_bug.cgi?id=146791
<rdar://problem/21747589>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-09
Reviewed by Brent Fulgham.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::getAudioTracks): Removed const
(WebCore::MediaStream::getVideoTracks): Ditto
* Modules/mediastream/MediaStream.h: Needed to change functions to
override
* platform/mediastream/MediaStreamPrivate.h: Added certain calls to
PrivateClient that exposes methods to be used in the engine

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

4 years agoWeb Inspector: Fix shape-highlight layout tests
drousso@apple.com [Thu, 9 Jul 2015 22:07:51 +0000 (22:07 +0000)]
Web Inspector: Fix shape-highlight layout tests
https://bugs.webkit.org/show_bug.cgi?id=146080

Reviewed by Joseph Pecoraro.

Source/WebCore:

* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForShapeOutside): Now properly returns the shape margin.

LayoutTests:

* http/tests/inspector/dom/shapes-test.js: Updated.

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

4 years ago[Mac] AirPlay to password protected AppleTV fails
eric.carlson@apple.com [Thu, 9 Jul 2015 21:59:33 +0000 (21:59 +0000)]
[Mac] AirPlay to password protected AppleTV fails
https://bugs.webkit.org/show_bug.cgi?id=146812

Reviewed by NOBODY (OOPS!).

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Initialize previouslyRequestedPicker.
(WebCore::WebMediaSessionManager::clientStateDidChange): Cleanup the logic and add a comment
  to make it slightly easier to follow. Don't begin playing to a device unless playback
  has just started (don't switch in mid-play).
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Use the last client to
  request the device picker as a fallback in case no other client is a canditate. Add more
  logging to make it possible to debug the selection logic.
(WebCore::WebMediaSessionManager::scheduleDelayedTask): Fiddle with the logging.

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

4 years agoWeb Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique...
drousso@apple.com [Thu, 9 Jul 2015 21:57:32 +0000 (21:57 +0000)]
Web Inspector: Pseudo-element style ordering is wrong for pseudo-styles on unique selectors
https://bugs.webkit.org/show_bug.cgi?id=146804

Reviewed by Timothy Hatcher.

* UserInterface/Models/CSSRule.js:
(WebInspector.CSSRule.prototype.selectorIsGreater):
Loops through the selectors in a rule to check if their specificity is greater than a given selector's specificity.
* UserInterface/Models/CSSSelector.js:
(WebInspector.CSSSelector.prototype.isGreaterThan):
Determines if the given selector's specificity is greater than this selector's specificity.
(WebInspector.CSSSelector):
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
If the pseudo-element selector's specificity is greater than the current selector's
specificity, create the pseudo-element's section and add it before the current style.

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

4 years agoWeb Inspector: Special Logs to Console that do not have an expression should be style...
drousso@apple.com [Thu, 9 Jul 2015 21:54:11 +0000 (21:54 +0000)]
Web Inspector: Special Logs to Console that do not have an expression should be styled differently, looks like code
https://bugs.webkit.org/show_bug.cgi?id=143840

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.WebInspector.JavaScriptLogViewController.appendImmediateExecutionWithResult):
Now applies a class to special logs initiated by the user (log element, log object, etc).
* UserInterface/Views/ConsoleCommandView.js:
(WebInspector.ConsoleCommandView): Added className parameter.
* UserInterface/Views/ConsoleMessageView.css:
(.console-user-command.selected-element-log):
(.console-user-command.special-user-log > .console-message-text):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu):
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):

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

4 years agoUnreviewed. Added myself as a committer.
drousso@apple.com [Thu, 9 Jul 2015 20:47:58 +0000 (20:47 +0000)]
Unreviewed.  Added myself as a committer.

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

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

4 years agoImplementing platform-specific section of enumerateDevices
commit-queue@webkit.org [Thu, 9 Jul 2015 20:47:15 +0000 (20:47 +0000)]
Implementing platform-specific section of enumerateDevices
https://bugs.webkit.org/show_bug.cgi?id=146461
<rdar://problem/21614466>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-09
Reviewed by Darin Adler.

* Modules/mediastream/MediaDeviceInfo.cpp: Changed access methods
(WebCore::MediaDeviceInfo::audioInputType): Added AtomicString
permanent refs
(WebCore::MediaDeviceInfo::audioOutputType): Ditto
(WebCore::MediaDeviceInfo::videoInputType): Ditto
* Modules/mediastream/MediaDeviceInfo.h: Changed String refs to values
(WebCore::MediaDeviceInfo::label): Ditto
(WebCore::MediaDeviceInfo::deviceId): Ditto
(WebCore::MediaDeviceInfo::groupId): Ditto
(WebCore::MediaDeviceInfo::kind): Ditto
* platform/mediastream/MediaDevicesPrivate.cpp: Implemented query for
available devices
(WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
(WebCore::MediaDevicesPrivate::create):
(WebCore::MediaDevicesPrivate::availableMediaDevices):
* platform/mediastream/MediaDevicesPrivate.h:
(WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Needed
to tack on extra fields to hold data
(WebCore::TrackSourceInfo::create):
(WebCore::TrackSourceInfo::groupId):
(WebCore::TrackSourceInfo::deviceId):
(WebCore::TrackSourceInfo::TrackSourceInfo):
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::getSourcesInfo):

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

4 years ago[Win] Add memory pressure handler.
peavo@outlook.com [Thu, 9 Jul 2015 20:37:49 +0000 (20:37 +0000)]
[Win] Add memory pressure handler.
https://bugs.webkit.org/show_bug.cgi?id=146685

Reviewed by Brent Fulgham.

Source/WebCore:

Add memory pressure handler implementation on Windows.
We check the memory usage at regular intervals with a timer.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::uninstall):
(WebCore::MemoryPressureHandler::holdOff):
* platform/win/MemoryPressureHandlerWin.cpp: Added.
(WebCore::CheckMemoryTimer::CheckMemoryTimer):
(WebCore::CheckMemoryTimer::fired):
(WebCore::CheckMemoryTimer::handleMemoryLow):
(WebCore::MemoryPressureHandler::platformReleaseMemory):
(WebCore::memCheckTimer):
(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::uninstall):
(WebCore::MemoryPressureHandler::holdOff):
(WebCore::MemoryPressureHandler::respondToMemoryPressure):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
* platform/win/Win32Handle.h:
(WebCore::Win32Handle::operator=):

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKitCommon.props: Link with process api library.

Source/WebKit/win:

* WebView.cpp:
(WebView::initWithFrame): Install memory pressure handler.

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

4 years agoREGRESSION (r180248): Repro Crash: com.apple.WebKit.WebContent at com.apple.JavaScrip...
msaboff@apple.com [Thu, 9 Jul 2015 20:24:39 +0000 (20:24 +0000)]
REGRESSION (r180248): Repro Crash: com.apple.WebKit.WebContent at com.apple.JavaScriptCore: JSC::createRangeError + 20
https://bugs.webkit.org/show_bug.cgi?id=146767

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

If the stack check fails at the top most frame, we must use that frame to
generate the exception.  Reverted the code to always use the current frame to
throw an out of stack exception.

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

LayoutTests:

New test that generates a call to a function that involves creating a huge
object literal that exceeds the available stack space.

* http/tests/misc/large-js-program-expected.txt: Added.
* http/tests/misc/large-js-program.php: Added.

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

4 years agoOSR exit fuzzing should allow us to select a static exit site
fpizlo@apple.com [Thu, 9 Jul 2015 19:43:28 +0000 (19:43 +0000)]
OSR exit fuzzing should allow us to select a static exit site
https://bugs.webkit.org/show_bug.cgi?id=146601

Reviewed by Geoffrey Garen.

The original implementation of the fuzzer allows us to trigger an exit based on its index
in the dynamic sequence of exit sites encountered. But there are usually millions of
dynamically encountered exit sites, even if the program only has thousands of static exit
sites. That means that we would at best be able to do a random sampling of exits, and
those would be biased to the hottest exit sites.

This change allows us to also select exit sites based on their index in the static
sequence of exit sites that the compiler compiled. Then, once that static exit site is
selected, we can select which dynamic exit at that exit site we should trigger. Since the
number of static exit sites is usually smallish (it's bounded by program size), we can do
an exhaustive search over all exit sites in most programs.

* dfg/DFGOSRExitFuzz.cpp:
(JSC::numberOfStaticOSRExitFuzzChecks):
(JSC::numberOfOSRExitFuzzChecks):
* dfg/DFGOSRExitFuzz.h:
(JSC::DFG::doOSRExitFuzzing):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitOSRExitFuzzCheck):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
* jsc.cpp:
(jscmain):
* runtime/Options.h:
* runtime/TestRunnerUtils.h:

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

4 years agoAdd a way to set the default URL from Minibrowser UI
timothy_horton@apple.com [Thu, 9 Jul 2015 19:31:09 +0000 (19:31 +0000)]
Add a way to set the default URL from Minibrowser UI
https://bugs.webkit.org/show_bug.cgi?id=146780

Reviewed by Simon Fraser.

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate didChangeSettings]):
* MiniBrowser/mac/BrowserWindowController.h:
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController fetch:]):
(-[BrowserWindowController reload:]):
(-[BrowserWindowController forceRepaint:]):
(-[BrowserWindowController goBack:]):
(-[BrowserWindowController goForward:]):
(-[BrowserWindowController showHideWebView:]):
(-[BrowserWindowController removeReinsertWebView:]):
(-[BrowserWindowController zoomIn:]):
(-[BrowserWindowController zoomOut:]):
(-[BrowserWindowController resetZoom:]):
(-[BrowserWindowController canZoomIn]):
(-[BrowserWindowController canZoomOut]):
(-[BrowserWindowController canResetZoom]):
(-[BrowserWindowController toggleZoomMode:]):
(-[BrowserWindowController setScale:]):
(-[BrowserWindowController toggleShrinkToFit:]):
(-[BrowserWindowController dumpSourceToConsole:]):
(-[BrowserWindowController find:]):
(-[BrowserWindowController didChangeSettings]):
(-[BrowserWindowController currentURL]):
Get rid of the BrowserController protocol. It was a bad idea and confused
Interface Builder more than I thought possible.

* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController setDefaultURLToCurrentURL:]):
If we have a BrowserWindowController, grab its URL and set the relevant default.

* MiniBrowser/mac/WK1BrowserWindowController.h:
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController currentURL]):
* MiniBrowser/mac/WK2BrowserWindowController.h:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController currentURL]):
Retrieve the current URL from the WKView/WebView.

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

4 years agoIncrease MiniBrowser location bar maximum width
timothy_horton@apple.com [Thu, 9 Jul 2015 19:30:25 +0000 (19:30 +0000)]
Increase MiniBrowser location bar maximum width
https://bugs.webkit.org/show_bug.cgi?id=146779

Reviewed by Simon Fraser.

* MiniBrowser/mac/BrowserWindow.xib:
Have an enormous maximum width on the location bar, so that it doesn't
stop expanding with the window at 800px.

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

4 years agoWeb Inspector: Checkbox disappears when unchecking CSS background style
drousso@apple.com [Thu, 9 Jul 2015 19:25:25 +0000 (19:25 +0000)]
Web Inspector: Checkbox disappears when unchecking CSS background style
https://bugs.webkit.org/show_bug.cgi?id=146776

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers): Now uses _createCommentedCheckboxMarker.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createCommentedCheckboxMarker):
Scans the content of the given lineHandle for any commented text and adds an unselected checkbox to
the beginning of that lineHandle's line.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent): Now adds commented checkbox markers.

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

4 years agoWeb Inspector: Align slider knobs in the color picker
nvasilyev@apple.com [Thu, 9 Jul 2015 19:16:10 +0000 (19:16 +0000)]
Web Inspector: Align slider knobs in the color picker
https://bugs.webkit.org/show_bug.cgi?id=146778

Also:
- Use half pixel borders on retina
- Remove one pixel white outline to match native OS X color picker more closely

Reviewed by Timothy Hatcher.

* UserInterface/Views/ColorPicker.css:
(.color-picker > .slider > img):
* UserInterface/Views/Slider.css:
(.slider):
(@media (-webkit-min-device-pixel-ratio: 2)):

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

4 years agoExposed AVVideoCaptureSource's bounds
commit-queue@webkit.org [Thu, 9 Jul 2015 18:48:52 +0000 (18:48 +0000)]
Exposed AVVideoCaptureSource's bounds
https://bugs.webkit.org/show_bug.cgi?id=146760
<rdar://problem/21736772>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-09
Reviewed by Brent Fulgham.

* platform/mediastream/mac/AVVideoCaptureSource.h:
(WebCore::AVVideoCaptureSource::width): Needed access to video width
(WebCore::AVVideoCaptureSource::height): Needed access to video height

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

4 years ago[WinCairo] ClearType should be enabled on Cairo port
achristensen@apple.com [Thu, 9 Jul 2015 18:40:34 +0000 (18:40 +0000)]
[WinCairo] ClearType should be enabled on Cairo port
https://bugs.webkit.org/show_bug.cgi?id=145492

Patch by Karlen Simonyan <szkarlen@gmail.com> on 2015-07-09
Reviewed by Brent Fulgham.

* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
Use CAIRO_ANTIALIAS_BEST instead of CAIRO_ANTIALIAS_GRAY.

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

4 years agoAX: <details> element should allow expand/close through AX API
cfleizach@apple.com [Thu, 9 Jul 2015 18:38:39 +0000 (18:38 +0000)]
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Allow AXExpanded to be writeable for <details> element, which, when set
will toggle the opening and closing of the element.
Post a notification when that happens as well.

Modified test: platform/mac/accessibility/details-summary.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::hierarchicalLevel):
(WebCore::AccessibilityNodeObject::setIsExpanded):
(WebCore::shouldUseAccessibilityObjectInnerText):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsPressAction):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::toggleOpen):

LayoutTests:

* platform/mac/accessibility/details-summary-expected.txt:
* platform/mac/accessibility/details-summary.html:

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

4 years ago[Content Extensions] Prevent crashes with plugins.
achristensen@apple.com [Thu, 9 Jul 2015 18:36:29 +0000 (18:36 +0000)]
[Content Extensions] Prevent crashes with plugins.
https://bugs.webkit.org/show_bug.cgi?id=146705
rdar://problem/20855444

Reviewed by Brady Eidson.

Source/WebCore:

* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::create):
Call addPlugInStreamLoader in ResourceLoader::willSendRequest to always add blocked loads.
* loader/NetscapePlugInStreamLoader.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
Removed unnecessary early returns.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::isPlugInStreamLoader):

LayoutTests:

* http/tests/contentextensions/plugin-doesnt-crash-expected.txt: Copied from http/tests/plugins/get-url-expected.txt.
* http/tests/contentextensions/plugin-doesnt-crash.html: Copied from http/tests/plugins/get-url.html.
* http/tests/contentextensions/plugin-doesnt-crash.html.json: Added.
* http/tests/contentextensions/resources/load-me-1.txt: Copied from http/tests/plugins/resources/load-me-1.txt.

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

4 years ago[Win] Skip canvas/philip/tests/2d.text.draw.fontface.notinpage.html
bfulgham@apple.com [Thu, 9 Jul 2015 18:34:42 +0000 (18:34 +0000)]
[Win] Skip canvas/philip/tests/2d.text.draw.fontface.notinpage.html
https://bugs.webkit.org/show_bug.cgi?id=146795

* platform/win/TestExpectations:

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

4 years agoAX: VoiceOver cannot get to any content in Yahoo Mail messages table
cfleizach@apple.com [Thu, 9 Jul 2015 18:16:36 +0000 (18:16 +0000)]
AX: VoiceOver cannot get to any content in Yahoo Mail messages table
https://bugs.webkit.org/show_bug.cgi?id=146674

Unreviewed. Skip a test on windows that needs more WKTR and DRT implementations.

* platform/win/TestExpectations:

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

4 years ago[Win] Honor CACFLayer content scale factor
bfulgham@apple.com [Thu, 9 Jul 2015 18:09:47 +0000 (18:09 +0000)]
[Win] Honor CACFLayer content scale factor
https://bugs.webkit.org/show_bug.cgi?id=146792

Reviewed by Dean Jackson.

* AVFoundationSupport.py: Check for the CACFLayerSet/GetContentsScale
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::PlatformCALayerWin): Use owner's scale factor (if
present).
(PlatformCALayerWin::contentsScale): Use CACFLayer API if present.
(PlatformCALayerWin::setContentsScale): Ditto.
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::PlatformCALayerWinInternal): Use owner's scale
factor (if present).
(PlatformCALayerWinInternal::addTile): Use tile parent's scale factor.

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

4 years agoMedia Session: report to chrome client 'hasActiveMediaElements' changes
mrajca@apple.com [Thu, 9 Jul 2015 16:26:33 +0000 (16:26 +0000)]
Media Session: report to chrome client 'hasActiveMediaElements' changes
https://bugs.webkit.org/show_bug.cgi?id=146745

Reviewed by Eric Carlson.

* Modules/mediasession/MediaSession.cpp: All updates to active media elements are now funneled through a helper
  method that will invoke the 'hasMediaSessionWithActiveMediaElementsDidChange' callback when necessary.
(WebCore::MediaSession::removeMediaElement):
(WebCore::MediaSession::changeActiveMediaElements):
(WebCore::MediaSession::addActiveMediaElement):
(WebCore::MediaSession::releaseSession):
* Modules/mediasession/MediaSession.h:
* Modules/mediasession/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::hasActiveMediaElements):
* Modules/mediasession/MediaSessionManager.h:

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

4 years agoREGRESSION (r182866): repeated prompts for password on internal Apple website using...
darin@apple.com [Thu, 9 Jul 2015 15:27:43 +0000 (15:27 +0000)]
REGRESSION (r182866): repeated prompts for password on internal Apple website using workers
https://bugs.webkit.org/show_bug.cgi?id=146769

Reviewed by Sam Weinig.

Not sure how to make a regression test for this. Sure would be nice to have one though.

* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Added. Calls through to the
base class copy constructor to copy data members of the base class (the lack of this was
the bug). Also initializes all the data members of this class.
(WebCore::ThreadableLoaderOptions::isolatedCopy): Changed to call the constructor above.

* loader/ThreadableLoader.h: Added new constructor.

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

4 years agoWeb Inspector: Rendering Frame segment colors should match those used in original...
mattbaker@apple.com [Thu, 9 Jul 2015 08:58:49 +0000 (08:58 +0000)]
Web Inspector: Rendering Frame segment colors should match those used in original Timelines graph
https://bugs.webkit.org/show_bug.cgi?id=146777

Reviewed by Brian Burg.

* UserInterface/Views/TimelineRecordFrame.css:
(.timeline-record-frame > .frame > .duration):
(.timeline-record-frame > .frame > .duration:last-child):
(.timeline-record-frame > .frame > .duration.rendering-frame-timeline-record-script):
(.timeline-record-frame > .frame > .duration.rendering-frame-timeline-record-layout):
(.timeline-record-frame > .frame > .duration.rendering-frame-timeline-record-paint):
Use same RGB values as TimelineRecordBar.

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

4 years agoWeb Inspector: New JavaScript/Probe breakpoint action disappears when clicking contin...
mattbaker@apple.com [Thu, 9 Jul 2015 08:03:55 +0000 (08:03 +0000)]
Web Inspector: New JavaScript/Probe breakpoint action disappears when clicking continue checkbox
https://bugs.webkit.org/show_bug.cgi?id=146688

Reviewed by Brian Burg.

Delay removal of empty Evaluate and Probe actions until after the breakpoint popover has been dismissed. This
will make the breakpoint editing experience less jarring, by preventing actions from disappearing when clicking
other controls in the popover.

* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.didDismissPopover):
Clear empty Evaluate and Probe actions on popover dismissal.

* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._codeMirrorBlurred):
Don't remove actions with empty data on CodeMirror blur.

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

4 years agoWeb Inspector: new breakpoint action dialog should reuse same action type
mattbaker@apple.com [Thu, 9 Jul 2015 07:35:15 +0000 (07:35 +0000)]
Web Inspector: new breakpoint action dialog should reuse same action type
https://bugs.webkit.org/show_bug.cgi?id=137255

Reviewed by Brian Burg.

* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._appendActionButtonClicked):
Use the view's action type instead of the default.

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

4 years agoAX: VoiceOver cannot get to any content in Yahoo Mail messages table
cfleizach@apple.com [Thu, 9 Jul 2015 07:31:27 +0000 (07:31 +0000)]
AX: VoiceOver cannot get to any content in Yahoo Mail messages table
https://bugs.webkit.org/show_bug.cgi?id=146674

Reviewed by Darin Adler.

Source/WebCore:

A table row could have any number of parent elements in the render tree, but for the purposes
of accessibility we only want to report the AXTable as the parent so that it looks like a sane
data table.

Test: accessibility/aria-table-with-presentational-elements.html

* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentObjectUnignored):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityARIAGridRow.h:

LayoutTests:

* accessibility/aria-table-with-presentational-elements-expected.txt: Added.
* accessibility/aria-table-with-presentational-elements.html: Added.

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

4 years ago[Cocoa] Report the first paint after committing a load as a rendering progress event
mitz@apple.com [Thu, 9 Jul 2015 07:01:49 +0000 (07:01 +0000)]
[Cocoa] Report the first paint after committing a load as a rendering progress event
https://bugs.webkit.org/show_bug.cgi?id=146765

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
NavigationState::didFirstPaint.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
with _WKRenderingProgressEventFirstPaint.

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

4 years agoWeb Inspector: Copy Rule in the context menu copies hidden properties in the rule
drousso@apple.com [Thu, 9 Jul 2015 06:41:12 +0000 (06:41 +0000)]
Web Inspector: Copy Rule in the context menu copies hidden properties in the rule
https://bugs.webkit.org/show_bug.cgi?id=146775

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._generateCSSRuleString):
Now only uses properties from the rule's visibleProperties list.

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

4 years agoFix grammar issue in TypeError attempting to change an unconfigurable property
commit-queue@webkit.org [Thu, 9 Jul 2015 06:04:42 +0000 (06:04 +0000)]
Fix grammar issue in TypeError attempting to change an unconfigurable property
https://bugs.webkit.org/show_bug.cgi?id=146774

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* runtime/JSFunction.cpp:
(JSC::JSFunction::defineOwnProperty):
* runtime/JSObject.cpp:
(JSC::JSObject::defineOwnNonIndexProperty):
* runtime/StringObject.cpp:
(JSC::StringObject::defineOwnProperty):

LayoutTests:

* js/dom/Object-defineProperty-expected.txt:

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

4 years ago[EFL] When closing inspector window, EwkView is not released properly.
jinwoo7.song@samsung.com [Thu, 9 Jul 2015 06:01:01 +0000 (06:01 +0000)]
[EFL] When closing inspector window, EwkView is not released properly.
https://bugs.webkit.org/show_bug.cgi?id=146716

Reviewed by Gyuyoung Kim.

It's because inspector window could not be deleted by remaining reference
from inspector view(evas object). This patch deletes the inspector window
after finishing the evas object smart call.

* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::destroyInspectorWindow):
(WebKit::WebInspectorProxy::platformDidClose):

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

4 years ago[EFL] vibration/navigator-vibration.html failed after r186265
dbates@webkit.org [Thu, 9 Jul 2015 05:52:54 +0000 (05:52 +0000)]
[EFL] vibration/navigator-vibration.html failed after r186265
https://bugs.webkit.org/show_bug.cgi?id=146770

Reviewed by Gyuyoung Kim.

Update test LayoutTests/vibration/navigator-vibration.html and its expected result.

Following <http://trac.webkit.org/changeset/186265> extra arguments passed
to a Web IDL overloaded function are ignored per section "Interface object Call? method"
of the Web IDL spec, <http://www.w3.org/TR/2012/CR-WebIDL-20120419/> (19 April 2012).

* vibration/navigator-vibration-expected.txt:
* vibration/navigator-vibration.html:

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

4 years ago[GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
commit-queue@webkit.org [Thu, 9 Jul 2015 05:50:38 +0000 (05:50 +0000)]
[GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
https://bugs.webkit.org/show_bug.cgi?id=146707

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-07-08
Reviewed by Martin Robinson.

Currently, WebKitGTK+ doesn't show the "Missing Plug-in" buttons if the plugin-related tags
don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitGTK+,
MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
array of <extension, mime type>, looking for the mime type for the given extension.
But |extensionMap| in MIMETypeRegistryGtk.cpp doesn't have the information for ".swf",
so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
not ObjectContentNetscapePlugin.

* platform/gtk/MIMETypeRegistryGtk.cpp:

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

4 years agoWeb Inspector: Add page weight and time back to the toolbar dashboard
timothy@apple.com [Thu, 9 Jul 2015 05:47:04 +0000 (05:47 +0000)]
Web Inspector: Add page weight and time back to the toolbar dashboard
https://bugs.webkit.org/show_bug.cgi?id=146755

Revert r183328 which removed the page weight and load time from the dashboard. We have space
in the dashboard, we can put these back since we didn't find a better home for them.

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Base/Main.js:
(WebInspector.showNetworkTab):
* UserInterface/Images/Time.svg: Added.
* UserInterface/Images/Weight.svg: Added.
* UserInterface/Images/gtk/Time.svg: Added.
* UserInterface/Images/gtk/Weight.svg: Added.
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard):
(WebInspector.DefaultDashboard.prototype.get resourcesSize):
(WebInspector.DefaultDashboard.prototype.set resourcesSize):
(WebInspector.DefaultDashboard.prototype.get time):
(WebInspector.DefaultDashboard.prototype.set time):
(WebInspector.DefaultDashboard.prototype._mainResourceDidChange):
(WebInspector.DefaultDashboard.prototype._capturingStopped):
(WebInspector.DefaultDashboard.prototype._startUpdatingTime):
(WebInspector.DefaultDashboard.prototype._stopUpdatingTime):
(WebInspector.DefaultDashboard.prototype._updateTime):
* UserInterface/Views/DashboardContainerView.css:
(body.web .toolbar .dashboard-container):
(body.javascript .toolbar .dashboard-container):
(.toolbar.collapsed .dashboard-container):
(.toolbar .dashboard-container): Deleted.
* UserInterface/Views/DefaultDashboardView.css:
(body.web .toolbar.collapsed .dashboard.default > :matches(.resourcesSize, .time, .logs)):
(body.javascript .toolbar .dashboard.default > :matches(.resourcesCount, .resourcesSize, .time)):
(.toolbar .dashboard.default > .resourcesSize):
(.toolbar .dashboard.default > .time > img):
(.toolbar .dashboard.default > .resourcesSize > img):
(body.web .toolbar.collapsed .dashboard.default > .item.resourcesCount): Deleted.
(body.javascript .toolbar .dashboard.default > .item.resourcesCount): Deleted.
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView):
(WebInspector.DefaultDashboardView.prototype._updateDisplay):
(WebInspector.DefaultDashboardView.prototype._networkItemWasClicked):
(WebInspector.DefaultDashboardView.prototype._timelineItemWasClicked):

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

4 years agoCrash calling [WebView close] in didFinishLoadForFrame callback.
beidson@apple.com [Thu, 9 Jul 2015 04:47:09 +0000 (04:47 +0000)]
Crash calling [WebView close] in didFinishLoadForFrame callback.
<rdar://problem/21690765> and https://bugs.webkit.org/show_bug.cgi?id=146773

Reviewed by David Kilzer.

Source/WebCore:

Added API Test "WebViewCloseInsideDidFinishLoadForFrame"

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): After the delegate callback,
  don't use the local Page* variable from earlier, but instead refetch it from m_frame.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

* TestWebKitAPI/Tests/mac/WebViewCloseInsideDidFinishLoadForFrame.mm: Added.
(-[WebViewCloseFrameLoadDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):

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

4 years agoAttempt to fix the Apple Windows build after <https://trac.webkit.org/changeset/186566>
dbates@webkit.org [Thu, 9 Jul 2015 04:31:41 +0000 (04:31 +0000)]
Attempt to fix the Apple Windows build after <https://trac.webkit.org/changeset/186566>
(https://bugs.webkit.org/show_bug.cgi?id=146591)

Update implementation of PluginView::create() to return a Ref<PluginView> object
instead of a PassRefPtr<PluginView> object.

* Plugins/PluginView.cpp:
(WebCore::PluginView::create):

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

4 years agoWeb Inspector: Style sidebar is showing incorrect strikethroughs
drousso@apple.com [Thu, 9 Jul 2015 04:20:35 +0000 (04:20 +0000)]
Web Inspector: Style sidebar is showing incorrect strikethroughs
https://bugs.webkit.org/show_bug.cgi?id=146768

Reviewed by Timothy Hatcher.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._markOverriddenProperties):
No longer sets the effective property as overridden if the overriding property is anonymous (not visible).

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

4 years agoCleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
dbates@webkit.org [Thu, 9 Jul 2015 04:10:05 +0000 (04:10 +0000)]
Cleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
https://bugs.webkit.org/show_bug.cgi?id=146670

Reviewed by Darin Adler.

Make calling the ContentSecurityPolicy::allow* functions less error prone by making
ContentSecurityPolicy::ReportingStatus an enum class. Among other benefits this will
prevent a caller from inadvertently passing an enumerator of ContentSecurityPolicy::ReportingStatus
as the boolean argument overridingContentSecurityPolicy, which is taken by the various
ContentSecurityPolicy::allow* functions, by causing a compile-time error (since an enum class
enumerator cannot be implicitly converted to an integral type).

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):
(WebCore::CSPDirectiveList::allowPluginType):
(WebCore::CSPDirectiveList::allowScriptFromSource):
(WebCore::CSPDirectiveList::allowObjectFromSource):
(WebCore::CSPDirectiveList::allowChildFrameFromSource):
(WebCore::CSPDirectiveList::allowImageFromSource):
(WebCore::CSPDirectiveList::allowStyleFromSource):
(WebCore::CSPDirectiveList::allowFontFromSource):
(WebCore::CSPDirectiveList::allowMediaFromSource):
(WebCore::CSPDirectiveList::allowConnectToSource):
(WebCore::CSPDirectiveList::allowFormAction):
(WebCore::CSPDirectiveList::allowBaseURI):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
(WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
* page/ContentSecurityPolicy.h:
* page/DOMSecurityPolicy.cpp:
(WebCore::DOMSecurityPolicy::allowsEval):

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

4 years agoActivate DOMURLMediaStream
commit-queue@webkit.org [Thu, 9 Jul 2015 03:55:19 +0000 (03:55 +0000)]
Activate DOMURLMediaStream
https://bugs.webkit.org/show_bug.cgi?id=146764
<rdar://problem/21738101>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Eric Carlson.

* DerivedSources.make: Added DOMURLMediaStream.idl to list
* WebCore.xcodeproj/project.pbxproj: Added DOMURLMediaStream.cpp and
DOMURLMediaStream.h to compile

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

4 years agoMake sure MediaStream uses blob protocol
commit-queue@webkit.org [Thu, 9 Jul 2015 03:51:39 +0000 (03:51 +0000)]
Make sure MediaStream uses blob protocol
https://bugs.webkit.org/show_bug.cgi?id=146752
<rdar://problem/21736057>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectNextSourceChild): Added MediaStream
blob protocol

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

4 years agoFix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
commit-queue@webkit.org [Thu, 9 Jul 2015 03:33:49 +0000 (03:33 +0000)]
Fix ASSERTION FAILED: !m_pendingNavigationID in WebPage::reload().
https://bugs.webkit.org/show_bug.cgi?id=146546

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-07-08
Reviewed by Darin Adler.

We did't reset pendingNavigationID value when request url is empty.
Hence we need to ignore ASSERT check in this case.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reload):

Tools:

* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
(TestWebKitAPI::TEST):

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

4 years agoVideos on apple.com don't show up when restored from page cache.
akling@apple.com [Thu, 9 Jul 2015 03:28:24 +0000 (03:28 +0000)]
Videos on apple.com don't show up when restored from page cache.
<https://webkit.org/b/146766>
<rdar://problem/21712311>

Reviewed by Darin Adler.

Source/WebCore:

Break out most of HTMLMediaElement::stop() (override of ActiveDOMObject::stop(), to be clear)
into a stopWithoutDestroyingMediaPlayer() function that both stop() and suspend() can call.

Before this change, suspend() would call stop() when moving into the page cache, killing the
internal MediaPlayer object which caused the video to disappear from the page.

Test: LayoutTests/media/restore-from-page-cache.html (amended)

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::stop):
(WebCore::HTMLMediaElement::suspend):
* html/HTMLMediaElement.h:

LayoutTests:

Tweaked an existing media element page caching test to dump out the video height
after restoring from page cache. Failure to restore the video player would result
in incorrect geometry (it falls back to RenderReplaced's default 300x150.)

* media/restore-from-page-cache-expected.txt:
* media/restore-from-page-cache.html:

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

4 years agoUse Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
gyuyoung.kim@webkit.org [Thu, 9 Jul 2015 02:31:21 +0000 (02:31 +0000)]
Use Ref/RefPtr instead of PassRefPtr in WebKit2 - 2
https://bugs.webkit.org/show_bug.cgi?id=146591

Reviewed by Darin Adler.

Following patch in order to reduce use of PassRefPtr.

* Shared/BlobDataFileReferenceWithSandboxExtension.h:
* Shared/Cocoa/CompletionHandlerCallChecker.h:
* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::CompletionHandlerCallChecker::create):
* Shared/Downloads/DownloadAuthenticationClient.h:
(WebKit::DownloadAuthenticationClient::create):
* Shared/SandboxExtension.h:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::create):
* Shared/ShareableResource.h:
* Shared/mac/ObjCObjectGraph.h:
(WebKit::ObjCObjectGraph::create):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::create):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(getInjectedBundleInitializationUserData):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::create):
* UIProcess/WebPreferences.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayCreate):
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
(WKBundlePageBannerCreateBannerWithCALayer):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
(WebKit::InjectedBundleDOMWindowExtension::create):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::create):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::InjectedBundleNavigationAction::create):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
(WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::InjectedBundleScriptWorld::create):
* WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
* WebProcess/Network/NetworkProcessConnection.h:
(WebKit::NetworkProcessConnection::create):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::create):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::create):
* WebProcess/Notifications/NotificationPermissionRequestManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::create):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
(WebKit::NetscapePluginStream::create):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::create):
* WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
(WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::create):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::create):
* WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
* WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
(WebKit::PDFPluginPasswordField::create):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::create):
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::create):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::create):
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::URLRequest::create):
(WebKit::PluginView::Stream::create):
(WebKit::PluginView::create):
* WebProcess/Plugins/PluginView.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
(WebKit::RemoteScrollingCoordinator::create):
* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::create):
* WebProcess/Storage/StorageAreaImpl.h:
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::create):
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::create):
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
(WebKit::WebSearchPopupMenu::create):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
(WebKit::WebFrameNetworkingContext::create):
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::create):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::create):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::create):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/PageBanner.h:
* WebProcess/WebPage/WebBackForwardListProxy.h:
(WebKit::WebBackForwardListProxy::create):
* WebProcess/WebPage/WebContextMenu.h:
(WebKit::WebContextMenu::create):
* WebProcess/WebPage/WebDocumentLoader.h:
(WebKit::WebDocumentLoader::create):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::create):
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::create):
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebPage/WebOpenPanelResultListener.cpp:
(WebKit::WebOpenPanelResultListener::create):
* WebProcess/WebPage/WebOpenPanelResultListener.h:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::create):
* WebProcess/WebPage/WebPageOverlay.h:
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::WebUndoStep::create):
* WebProcess/WebPage/WebUndoStep.h:
* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::create):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::create):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::create):

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

4 years agoMake MediaStream conform to its private client like MediaSource does
commit-queue@webkit.org [Thu, 9 Jul 2015 02:27:32 +0000 (02:27 +0000)]
Make MediaStream conform to its private client like MediaSource does
https://bugs.webkit.org/show_bug.cgi?id=146756
<rdar://problem/21736457>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

MediaStream should be inheriting its PrivateClient's getters and
setters for RefCounted, not inheriting its own.

* Modules/mediastream/MediaStream.h: Changed MediaStream's inherit
statements
* platform/mediastream/MediaStreamPrivate.h: Changed
MediaStreamPrivateClient to inherit RefCounted<MediaStreamPrivateClient>

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

4 years agoMade AVMediaCaptureSource's session accessor public
commit-queue@webkit.org [Thu, 9 Jul 2015 02:23:25 +0000 (02:23 +0000)]
Made AVMediaCaptureSource's session accessor public
https://bugs.webkit.org/show_bug.cgi?id=146758
<rdar://problem/21736651>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

* platform/mediastream/mac/AVMediaCaptureSource.h:
(WebCore::AVMediaCaptureSource::session): Changed to public

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

4 years agoMake sure MediaStream engine loaded for interpreting MediaStreams
commit-queue@webkit.org [Thu, 9 Jul 2015 01:22:28 +0000 (01:22 +0000)]
Make sure MediaStream engine loaded for interpreting MediaStreams
https://bugs.webkit.org/show_bug.cgi?id=146748
<rdar://problem/21735416>

Patch by Matthew Daiter <mdaiter@apple.com> on 2015-07-08
Reviewed by Brent Fulgham.

Prevent the MediaSource engine from being used to process
MediaStreams, since they are not compatible

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
Changed MediaStream to never be loaded
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
Changed MediaStream to never be loaded

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

4 years agoWeb Inspector: Color swatches show up in color names in comments
drousso@apple.com [Thu, 9 Jul 2015 01:17:44 +0000 (01:17 +0000)]
Web Inspector: Color swatches show up in color names in comments
https://bugs.webkit.org/show_bug.cgi?id=146757

Reviewed by Timothy Hatcher.

* UserInterface/Views/CodeMirrorAdditions.js: Color markers now only appear if the color is in a keyword.

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

4 years agoWeb Inspector: Only record a timeline when the Timelines tab is showing
timothy@apple.com [Thu, 9 Jul 2015 01:14:03 +0000 (01:14 +0000)]
Web Inspector: Only record a timeline when the Timelines tab is showing
https://bugs.webkit.org/show_bug.cgi?id=146759

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.get autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
(WebInspector.TimelineManager.prototype._startAutoCapturing):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype.shown):
(WebInspector.TimelineTabContentView.prototype.hidden):

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