[webkit-changes] [192203] trunk/Source/JavaScriptCore

2015-11-09 Thread sbarati
Title: [192203] trunk/Source/_javascript_Core








Revision 192203
Author sbar...@apple.com
Date 2015-11-09 23:48:54 -0800 (Mon, 09 Nov 2015)


Log Message
Implement try/catch in the FTL
https://bugs.webkit.org/show_bug.cgi?id=149409

Reviewed by Filip Pizlo.

This patch implements try/catch in the FTL in a similar
way to how it's implemented in the DFG. The main idea is
this: anytime an exception is thrown in a try block, 
we OSR exit into the baseline JIT's corresponding catch
block. We compile OSR exits in a few forms:
1) Explicit exception checks that check VM's exception
pointer. This is modeled explicitly in LLVM IR.
2) OSR exits that are arrived at from genericUnwind 
caused by an exception being thrown in a JS call (including
getters and setters).
3) Exception from lazy slow paths.
4) Exception from when an IC misses and makes a slow path C Call.

All stackmaps associated with the above types of exits all 
take arguments that correspond to variables that are 
bytecode-live in the catch block.

1) Item 1 is the simplest implementation. When inside
a try block, exception checks will emit a branch to
an OSR exit stackmap intrinsic. This stackmap intrinsic
takes as arguments the live catch variables.

2) All forms of calls and GetByIds and PutByIds are implemented
as patchpoints in LLVM. As a patchpoint, they have a stackmap ID.
We use the same stackmap ID for the OSR exit. The OSR exit arguments
are appended to the end of the normal arguments for the patchpoint. These
types of OSR exits are only reached indirectly via genericUnwind.
Therefore, the LLVM IR we generate never has a direct branch to them.
These are the OSR exits we store in the CodeBlock's exception handling
table. The exception handlers' code locations point to the beginning
of the corresponding OSR exit. There is an interesting story here
about how we preserve registers. LLVM patchpoints assume late clobber,
i.e, they assume we use the patchpoint arguments before we clobber them.
Therefore, it's sound for LLVM to pass us arguments in volatile registers.
We must take care to store the arguments in volatile registers to the
stack before making a call. We ensure we have stack space for these
by using LLVM's alloca instruction. Then, when making a call inside
a try block, we spill the needed registers, and if that call throws,
we make sure the OSR exit fills the corresponding registers.

3) Exceptions from lazy slow paths are similar to (2) except they
don't go through generic unwind. These OSR Exits are arrived at from explicit
exception checks in the generated lazy slow path. Therefore, the callframe
is intact when arriving at the OSR exit. We make sure such lazy slow
paths exception check are linked to the OSR exit's code location.

4) This has a really interesting register preservation story.
We may have a GetById that has an IC miss and therefore goes
through the FTL's callOperation machinery. LLVM may also
ask for the result to be placed in the same register as the
base. Therefore, after the call, when storing to the result,
we overwrite the base. This can't fly with exceptions because
operationGetByIdOptimize may throw an exception and return "undefined". What
we really want is the original base value for OSR exit value
recovery. In this case, we take special care to flush the base 
value to the stack before the callOperation GetById slow path. 
Like call OSR exits, these types of exits will recover the base 
value from the stack when necessary.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
(JSC::DFG::Graph::willCatchExceptionInMachineFrame):
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::appendExceptionHandlingOSRExit):
(JSC::DFG::JITCompiler::exceptionCheck):
(JSC::DFG::JITCompiler::recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded):
(JSC::DFG::JITCompiler::willCatchExceptionInMachineFrame): Deleted.
* dfg/DFGJITCompiler.h:
* dfg/DFGNodeOrigin.h:
(JSC::DFG::NodeOrigin::withSemantic):
(JSC::DFG::NodeOrigin::withForExitAndExitOK):
(JSC::DFG::NodeOrigin::withExitOK):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::OSRExit):
* dfg/DFGOSRExit.h:
(JSC::DFG::OSRExit::considerAddingAsFrequentExitSite):
* dfg/DFGOSRExitBase.h:
(JSC::DFG::OSRExitBase::OSRExitBase):
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLExitArgument.h:
(JSC::FTL::ExitArgument::withFormat):
(JSC::FTL::ExitArgument::representation):
* ftl/FTLExitThunkGenerator.cpp:
(JSC::FTL::ExitThunkGenerator::~ExitThunkGenerator):
(JSC::FTL::ExitThunkGenerator::emitThunk):
(JSC::FTL::ExitThunkGenerator::emitThunks):
* ftl/FTLExitThunkGenerator.h:
(JSC::FTL::ExitThunkGenerator::didThings):
* 

[webkit-changes] [192202] trunk/Source/JavaScriptCore

2015-11-09 Thread youenn . fablet
Title: [192202] trunk/Source/_javascript_Core








Revision 192202
Author youenn.fab...@crf.canon.fr
Date 2015-11-09 23:21:23 -0800 (Mon, 09 Nov 2015)


Log Message
Built-in generator should check that there are no duplicate in JS built-in internal functions
https://bugs.webkit.org/show_bug.cgi?id=151018

Reviewed by Brian Burg.

Added @internal to corresponding JS built-in files.
Added check in built-in generator so that clashing names result in an error.

* Scripts/builtins/builtins_generate_combined_header.py:
(generate_section_for_code_name_macro):
* Scripts/builtins/builtins_model.py:
(BuiltinsCollection.all_internal_functions):
* builtins/GlobalObject.js:
* builtins/Operations.Promise.js:
* Scripts/tests/builtins/expected/_javascript_Core-InternalClashingNames-Combined.js-error: Added.
* Scripts/tests/builtins/expected/_javascript_Core-InternalClashingNames-Combined.js-result: Added.

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Scripts/builtins/builtins_generate_combined_header.py
trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py
trunk/Source/_javascript_Core/builtins/GlobalObject.js
trunk/Source/_javascript_Core/builtins/Operations.Promise.js


Added Paths

trunk/Source/_javascript_Core/Scripts/tests/builtins/_javascript_Core-InternalClashingNames-Combined.js
trunk/Source/_javascript_Core/Scripts/tests/builtins/expected/_javascript_Core-InternalClashingNames-Combined.js-error
trunk/Source/_javascript_Core/Scripts/tests/builtins/expected/_javascript_Core-InternalClashingNames-Combined.js-result




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (192201 => 192202)

--- trunk/Source/_javascript_Core/ChangeLog	2015-11-10 07:19:45 UTC (rev 192201)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-11-10 07:21:23 UTC (rev 192202)
@@ -1,3 +1,22 @@
+2015-11-09  Youenn Fablet  
+
+Built-in generator should check that there are no duplicate in JS built-in internal functions
+https://bugs.webkit.org/show_bug.cgi?id=151018
+
+Reviewed by Brian Burg.
+
+Added @internal to corresponding JS built-in files.
+Added check in built-in generator so that clashing names result in an error.
+
+* Scripts/builtins/builtins_generate_combined_header.py:
+(generate_section_for_code_name_macro):
+* Scripts/builtins/builtins_model.py:
+(BuiltinsCollection.all_internal_functions):
+* builtins/GlobalObject.js:
+* builtins/Operations.Promise.js:
+* Scripts/tests/builtins/expected/_javascript_Core-InternalClashingNames-Combined.js-error: Added.
+* Scripts/tests/builtins/expected/_javascript_Core-InternalClashingNames-Combined.js-result: Added.
+
 2015-11-09  Saam barati  
 
 DFG::PutStackSinkingPhase should not treat the stack variables written by LoadVarargs/ForwardVarargs as being live


Modified: trunk/Source/_javascript_Core/Scripts/builtins/builtins_generate_combined_header.py (192201 => 192202)

--- trunk/Source/_javascript_Core/Scripts/builtins/builtins_generate_combined_header.py	2015-11-10 07:19:45 UTC (rev 192201)
+++ trunk/Source/_javascript_Core/Scripts/builtins/builtins_generate_combined_header.py	2015-11-10 07:21:23 UTC (rev 192202)
@@ -149,6 +149,10 @@
 'macroPrefix': self.model().framework.setting('macro_prefix'),
 }
 
+internal_function_names = [function.function_name for function in self.model().all_internal_functions()]
+if len(internal_function_names) != len(set(internal_function_names)):
+log.error("There are several internal functions with the same name. Private identifiers may clash.")
+
 lines = []
 lines.append("#define %(macroPrefix)s_FOREACH_BUILTIN_FUNCTION_NAME(macro) \\" % args)
 unique_names = list(set([function.function_name for function in self.model().all_functions()]))


Modified: trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py (192201 => 192202)

--- trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py	2015-11-10 07:19:45 UTC (rev 192201)
+++ trunk/Source/_javascript_Core/Scripts/builtins/builtins_model.py	2015-11-10 07:21:23 UTC (rev 192202)
@@ -185,6 +185,14 @@
 result.sort()
 return result
 
+def all_internal_functions(self):
+result = []
+for object in [o for o in self.objects if 'internal' in o.annotations]:
+result.extend(object.functions)
+
+result.sort()
+return result
+
 # Private methods.
 
 def _parse_copyright_lines(self, text):


Copied: trunk/Source/_javascript_Core/Scripts/tests/builtins/_javascript_Core-InternalClashingNames-Combined.js (from rev 192201, trunk/Source/_javascript_Core/builtins/GlobalObject.js) (0 => 192202)

--- trunk/Source/_javascript_Core/Scripts/tests/builtins/_javascript_Core-InternalClashingNames-Combined.js	(rev 0)
+++ trunk/Source/_javascript_Core/Scripts/tests/builtins/_javascript_Core-In

[webkit-changes] [192201] trunk/Source/WebKit2

2015-11-09 Thread carlosgc
Title: [192201] trunk/Source/WebKit2








Revision 192201
Author carlo...@webkit.org
Date 2015-11-09 23:19:45 -0800 (Mon, 09 Nov 2015)


Log Message
Unreviewed. Fix GTK+ build after r192184.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (192200 => 192201)

--- trunk/Source/WebKit2/ChangeLog	2015-11-10 06:24:34 UTC (rev 192200)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-10 07:19:45 UTC (rev 192201)
@@ -1,3 +1,11 @@
+2015-11-09  Carlos Garcia Campos  
+
+Unreviewed. Fix GTK+ build after r192184.
+
+* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+(WebKit::LayerTreeHostGtk::initialize):
+(WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
+
 2015-11-09  Eric Carlson  
 
 [Mac] Add a mock AppleTV device for testing


Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp (192200 => 192201)

--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp	2015-11-10 06:24:34 UTC (rev 192200)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp	2015-11-10 07:19:45 UTC (rev 192201)
@@ -171,7 +171,7 @@
 // The non-composited contents are a child of the root layer.
 m_nonCompositedContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
 m_nonCompositedContentLayer->setDrawsContent(true);
-m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground() && !m_webPage->drawsTransparentBackground());
+m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground());
 m_nonCompositedContentLayer->setSize(m_webPage->size());
 if (m_webPage->corePage()->settings().acceleratedDrawingEnabled())
 m_nonCompositedContentLayer->setAcceleratesDrawing(true);
@@ -399,7 +399,7 @@
 
 void LayerTreeHostGtk::pageBackgroundTransparencyChanged()
 {
-m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground() && !m_webPage->drawsTransparentBackground());
+m_nonCompositedContentLayer->setContentsOpaque(m_webPage->drawsBackground());
 }
 
 void LayerTreeHostGtk::cancelPendingLayerFlush()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192200] trunk

2015-11-09 Thread eric . carlson
Title: [192200] trunk








Revision 192200
Author eric.carl...@apple.com
Date 2015-11-09 22:24:34 -0800 (Mon, 09 Nov 2015)


Log Message
[Mac] Add a mock AppleTV device for testing
https://bugs.webkit.org/show_bug.cgi?id=148912


Reviewed by Tim Horton.

Source/WebCore:

No new tests, updated media/controls/airplay-picker.html.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled): New, enable or disable
  the mock picker.
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState): New, set mock picker state.
(WebCore::WebMediaSessionManager::mockPicker): New.
(WebCore::WebMediaSessionManager::targetPicker): Return the platform or mock picker, as per settings.
(WebCore::webMediaSessionManagerOverride): Deleted.
(WebCore::WebMediaSessionManager::shared): Deleted.
(WebCore::WebMediaSessionManager::setWebMediaSessionManagerOverride): Deleted.
* Modules/mediasession/WebMediaSessionManager.h:

* WebCore.xcodeproj/project.pbxproj: Add MediaPlaybackTargetPickerMock.* and MediaPlaybackTargetMock.*.

* page/ChromeClient.h: add setMockMediaPlaybackTargetPickerEnabled and setMockMediaPlaybackTargetPickerState.

* page/Page.cpp:
(WebCore::Page::playbackTargetPickerClientStateDidChange):
(WebCore::Page::setMockMediaPlaybackTargetPickerEnabled): New.
(WebCore::Page::setMockMediaPlaybackTargetPickerState): New.
(WebCore::Page::setPlaybackTarget):
* page/Page.h:

* platform/graphics/MediaPlaybackTarget.h:
(WebCore::noMediaPlaybackTargetContext):
(WebCore::MediaPlaybackTarget::~MediaPlaybackTarget):
(WebCore::MediaPlaybackTarget::deviceName):
(WebCore::MediaPlaybackTarget::MediaPlaybackTarget):

* platform/graphics/MediaPlaybackTargetContext.h: Make a class instead of a struct.
(WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
(WebCore::MediaPlaybackTargetContext::type):
(WebCore::MediaPlaybackTargetContext::mockDeviceName):
(WebCore::MediaPlaybackTargetContext::mockState):
(WebCore::MediaPlaybackTargetContext::avOutputContext):
(WebCore::MediaPlaybackTargetContext::encodingRequiresPlatformData):

* platform/graphics/MediaPlaybackTargetPicker.cpp: Move much of the code from MediaPlaybackTargetMac.mm
  here so it can be the base class.
(WebCore::MediaPlaybackTargetPicker::MediaPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPicker::~MediaPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPicker::pendingActionTimerFired):
(WebCore::MediaPlaybackTargetPicker::addPendingAction):
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
* platform/graphics/MediaPlaybackTargetPicker.h:
(WebCore::MediaPlaybackTargetPicker::availableDevicesDidChange):
(WebCore::MediaPlaybackTargetPicker::currentDeviceDidChange):
(WebCore::MediaPlaybackTargetPicker::client):
(WebCore::MediaPlaybackTargetPicker::setClient):

* platform/graphics/avfoundation/MediaPlaybackTargetMac.h:
(WebCore::MediaPlaybackTargetMac::outputContext):
(WebCore::MediaPlaybackTargetMac::targetType): Deleted.
* platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
(WebCore::MediaPlaybackTargetMac::targetContext):
(WebCore::MediaPlaybackTargetMac::hasActiveRoute):
(WebCore::MediaPlaybackTargetMac::deviceName):

* platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
(WebCore::WebMediaSessionManager::shared): Renamed from platformManager.
(WebCore::WebMediaSessionManagerMac::platformPicker): Renamed from targetPicker.
(WebCore::WebMediaSessionManager::platformManager): Deleted.
(WebCore::WebMediaSessionManagerMac::targetPicker): Deleted.
* platform/graphics/avfoundation/WebMediaSessionManagerMac.h:

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
(WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
(WebCore::MediaPlaybackTargetPickerMac::externalOutputDeviceAvailable):
(WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
(WebCore::MediaPlaybackTargetPickerMac::devicePicker):
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Deleted.
(WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Deleted.
(WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Deleted.
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Deleted.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): Add support for
  mock target.
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation

[webkit-changes] [192198] trunk/Source/WebInspectorUI

2015-11-09 Thread commit-queue
Title: [192198] trunk/Source/WebInspectorUI








Revision 192198
Author commit-qu...@webkit.org
Date 2015-11-09 20:39:23 -0800 (Mon, 09 Nov 2015)


Log Message
Web Inspector: Support Gesture Events to zoom in / out of the Timeline
https://bugs.webkit.org/show_bug.cgi?id=151071

Patch by Joseph Pecoraro  on 2015-11-09
Reviewed by Timothy Hatcher.

Adjust the Timeline's secondsPerPixel value by the gesture event's scale factor.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):
(WebInspector.TimelineOverview.prototype._handleGestureEnd):

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (192197 => 192198)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-11-10 02:22:09 UTC (rev 192197)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-11-10 04:39:23 UTC (rev 192198)
@@ -1,5 +1,21 @@
 2015-11-09  Joseph Pecoraro  
 
+Web Inspector: Support Gesture Events to zoom in / out of the Timeline
+https://bugs.webkit.org/show_bug.cgi?id=151071
+
+Reviewed by Timothy Hatcher.
+
+Adjust the Timeline's secondsPerPixel value by the gesture event's scale factor.
+
+* UserInterface/Views/TimelineOverview.js:
+(WebInspector.TimelineOverview):
+(WebInspector.TimelineOverview.prototype._handleWheelEvent):
+(WebInspector.TimelineOverview._handleGestureStart):
+(WebInspector.TimelineOverview.prototype._handleGestureChange):
+(WebInspector.TimelineOverview.prototype._handleGestureEnd):
+
+2015-11-09  Joseph Pecoraro  
+
 Web Inspector: Uncaught exception creating TimelineRecord alternate subtitles
 https://bugs.webkit.org/show_bug.cgi?id=151046
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (192197 => 192198)

--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2015-11-10 02:22:09 UTC (rev 192197)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2015-11-10 04:39:23 UTC (rev 192198)
@@ -38,6 +38,9 @@
 this._element = document.createElement("div");
 this._element.classList.add("timeline-overview", identifier);
 this._element.addEventListener("wheel", this._handleWheelEvent.bind(this));
+this._element.addEventListener("gesturestart", this._handleGestureStart.bind(this));
+this._element.addEventListener("gesturechange", this._handleGestureChange.bind(this));
+this._element.addEventListener("gestureend", this._handleGestureEnd.bind(this));
 
 this._graphsContainerElement = document.createElement("div");
 this._graphsContainerElement.classList.add("graphs-container");
@@ -423,6 +426,10 @@
 if (event.__cloned)
 return;
 
+// Ignore wheel events while handing gestures.
+if (this._handlingGesture)
+return;
+
 // Require twice the vertical delta to overcome horizontal scrolling. This prevents most
 // cases of inadvertent zooming for slightly diagonal scrolls.
 if (Math.abs(event.deltaX) >= Math.abs(event.deltaY) * 0.5) {
@@ -460,6 +467,46 @@
 event.stopPropagation();
 }
 
+_handleGestureStart(event)
+{
+if (this._handlingGesture) {
+// FIXME:  [Mac] Unexpected gesturestart events when already handling gesture
+return;
+}
+
+let mouseOffset = event.pageX - this._element.totalOffsetLeft;
+let mousePositionTime = this._scrollStartTime + (mouseOffset * this._durationPerPixel);
+
+this._handlingGesture = true;
+this._gestureStartStartTime = mousePositionTime;
+this._gestureStartDurationPerPixel = this._durationPerPixel;
+
+event.preventDefault();
+event.stopPropagation();
+}
+
+_handleGestureChange(event)
+{
+// Cap zooming out at 5x.
+let scale = Math.max(1/5, event.scale);
+
+let mouseOffset = event.pageX - this._element.totalOffsetLeft;
+let newSecondsPerPixel = this._gestureStartDurationPerPixel / scale;
+
+this.secondsPerPixel = newSecondsPerPixel;
+this.scrollStartTime = this._gestureStartStartTime - (mouseOffset * this._durationPerPixel);
+
+event.preventDefault();
+event.stopPropagation();
+}
+
+_handleGestureEnd(event)
+{
+this._handlingGesture = false;
+this._gestureStartStartTime = NaN;
+this._gestureStartDurationPerPixel = NaN;
+}
+
 _timelineAdded(timelineOrEvent)
 {
 var timeline = timelineOrEvent;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webki

[webkit-changes] [192197] trunk/Source/WebCore

2015-11-09 Thread wenson_hsieh
Title: [192197] trunk/Source/WebCore








Revision 192197
Author wenson_hs...@apple.com
Date 2015-11-09 18:22:09 -0800 (Mon, 09 Nov 2015)


Log Message
Unreviewed, fix the windows build

Update the signature of scrollableAreaBoundingBox, changed by r192193.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::scrollableAreaBoundingBox):
* platform/win/PopupMenuWin.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/win/PopupMenuWin.cpp
trunk/Source/WebCore/platform/win/PopupMenuWin.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (192196 => 192197)

--- trunk/Source/WebCore/ChangeLog	2015-11-10 01:46:39 UTC (rev 192196)
+++ trunk/Source/WebCore/ChangeLog	2015-11-10 02:22:09 UTC (rev 192197)
@@ -1,3 +1,13 @@
+2015-11-09  Wenson Hsieh  
+
+Unreviewed, fix the windows build
+
+Update the signature of scrollableAreaBoundingBox, changed by r192193.
+
+* platform/win/PopupMenuWin.cpp:
+(WebCore::PopupMenuWin::scrollableAreaBoundingBox):
+* platform/win/PopupMenuWin.h:
+
 2015-11-09  Simon Fraser  
 
 Allow iOS to create linearRGB colorspaces


Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.cpp (192196 => 192197)

--- trunk/Source/WebCore/platform/win/PopupMenuWin.cpp	2015-11-10 01:46:39 UTC (rev 192196)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.cpp	2015-11-10 02:22:09 UTC (rev 192197)
@@ -747,7 +747,7 @@
 return m_windowRect.size();
 }
 
-IntRect PopupMenuWin::scrollableAreaBoundingBox() const
+IntRect PopupMenuWin::scrollableAreaBoundingBox(bool*) const
 {
 return m_windowRect;
 }


Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.h (192196 => 192197)

--- trunk/Source/WebCore/platform/win/PopupMenuWin.h	2015-11-10 01:46:39 UTC (rev 192196)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.h	2015-11-10 02:22:09 UTC (rev 192197)
@@ -105,7 +105,7 @@
 virtual Scrollbar* verticalScrollbar() const override { return m_scrollbar.get(); }
 virtual IntSize visibleSize() const override;
 virtual IntSize contentsSize() const override;
-virtual IntRect scrollableAreaBoundingBox() const override;
+virtual IntRect scrollableAreaBoundingBox(bool* = nullptr) const override;
 virtual bool updatesScrollLayerPositionOnMainThread() const override { return true; }
 virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192195] trunk/Source/WebKit2

2015-11-09 Thread andersca
Title: [192195] trunk/Source/WebKit2








Revision 192195
Author ander...@apple.com
Date 2015-11-09 17:11:19 -0800 (Mon, 09 Nov 2015)


Log Message
Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
https://bugs.webkit.org/show_bug.cgi?id=151069
rdar://problem/23473435

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(initializeMethod):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (192194 => 192195)

--- trunk/Source/WebKit2/ChangeLog	2015-11-10 01:10:51 UTC (rev 192194)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-10 01:11:19 UTC (rev 192195)
@@ -1,5 +1,16 @@
 2015-11-09  Anders Carlsson  
 
+Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
+https://bugs.webkit.org/show_bug.cgi?id=151069
+rdar://problem/23473435
+
+Reviewed by Tim Horton.
+
+* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
+(initializeMethod):
+
+2015-11-09  Anders Carlsson  
+
 Fix 32-bit build.
 
 * Shared/API/Cocoa/RemoteObjectRegistry.mm:


Modified: trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm (192194 => 192195)

--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm	2015-11-10 01:10:51 UTC (rev 192194)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm	2015-11-10 01:11:19 UTC (rev 192195)
@@ -98,7 +98,7 @@
 
 if (*argumentType != '@') {
 // This is a non-object type; we won't allow any classes to be decoded for it.
-allowedClasses.uncheckedAppend({ });
+allowedClasses.append({ });
 continue;
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192194] trunk/Source/WebCore

2015-11-09 Thread simon . fraser
Title: [192194] trunk/Source/WebCore








Revision 192194
Author simon.fra...@apple.com
Date 2015-11-09 17:10:51 -0800 (Mon, 09 Nov 2015)


Log Message
Allow iOS to create linearRGB colorspaces
https://bugs.webkit.org/show_bug.cgi?id=151059

Reviewed by Tim Horton.

Remove iOS #ifdefs around code that creates linearized RGB colorspaces, as used
by SVG filters. Blending doesn't actually work correctly, but there's no reason
to #ifdef differently here.

* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::linearRGBColorSpaceRef):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (192193 => 192194)

--- trunk/Source/WebCore/ChangeLog	2015-11-10 01:07:47 UTC (rev 192193)
+++ trunk/Source/WebCore/ChangeLog	2015-11-10 01:10:51 UTC (rev 192194)
@@ -1,3 +1,18 @@
+2015-11-09  Simon Fraser  
+
+Allow iOS to create linearRGB colorspaces
+https://bugs.webkit.org/show_bug.cgi?id=151059
+
+Reviewed by Tim Horton.
+
+Remove iOS #ifdefs around code that creates linearized RGB colorspaces, as used
+by SVG filters. Blending doesn't actually work correctly, but there's no reason
+to #ifdef differently here.
+
+* platform/graphics/cg/GraphicsContextCG.cpp:
+* platform/graphics/mac/GraphicsContextMac.mm:
+(WebCore::linearRGBColorSpaceRef):
+
 2015-11-09  Wenson Hsieh  
 
 Sometimes unable to scroll fixed div when the body is scrollable


Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (192193 => 192194)

--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2015-11-10 01:07:47 UTC (rev 192193)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp	2015-11-10 01:10:51 UTC (rev 192194)
@@ -51,10 +51,6 @@
 #include 
 #endif
 
-#if PLATFORM(IOS)
-#include 
-#endif
-
 // FIXME: The following using declaration should be in .
 using WTF::pairIntHash;
 
@@ -93,7 +89,7 @@
 return sRGBSpace;
 }
 
-#if PLATFORM(WIN) || PLATFORM(IOS)
+#if PLATFORM(WIN)
 CGColorSpaceRef linearRGBColorSpaceRef()
 {
 // FIXME: Windows should be able to use linear sRGB, this is tracked by http://webkit.org/b/8.


Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm (192193 => 192194)

--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm	2015-11-10 01:07:47 UTC (rev 192193)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm	2015-11-10 01:10:51 UTC (rev 192194)
@@ -292,10 +292,9 @@
 CGContextRestoreGState(context);
 }
 
-#if !PLATFORM(IOS)
 CGColorSpaceRef linearRGBColorSpaceRef()
 {
-static CGColorSpaceRef linearSRGBSpace = 0;
+static CGColorSpaceRef linearSRGBSpace = nullptr;
 
 if (linearSRGBSpace)
 return linearSRGBSpace;
@@ -312,6 +311,5 @@
 
 return linearSRGBSpace;
 }
-#endif
 
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192193] trunk

2015-11-09 Thread wenson_hsieh
Title: [192193] trunk








Revision 192193
Author wenson_hs...@apple.com
Date 2015-11-09 17:07:47 -0800 (Mon, 09 Nov 2015)


Log Message
Sometimes unable to scroll fixed div when the body is scrollable
https://bugs.webkit.org/show_bug.cgi?id=151015


Reviewed by Simon Fraser.

Source/WebCore:

Currently, if we scroll a page containing a fixed scrollable area, the non-fast-scrollable region corresponding to a fixed
area will not move down to reflect its new bounds in absolute coordinates, making it impossible to scroll position: fixed
overflow elements when the body's scroll position changes. To fix this, we inflate the non-fast-scrollable region
corresponding to scrollable position: fixed elements such that their regions encompass the area, relative to the page,
wherein the fixed element may lie when the page is scrolled by any amount within its scroll limits.

We also optimize the non-fast-scrollable regions emitted by elements that handle wheel events. Currently, if a fixed element
also has a wheel event handler, we take the entire document's rect to be non-fast-scrollable. This patch changes this region
to behave the same way as fixed scrollable elements above.

This patch also folds some common logic used to accomplish this into FrameView for use by RenderLayerCompositor and RenderView.

Test: tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html

* page/FrameView.cpp:
(WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
(WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition):
* page/FrameView.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollableAreaBoundingBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollableAreaBoundingBox):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeExtent):
(WebCore::fixedPositionOffset): Deleted.
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::pushMappingToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
(WebCore::RenderView::computeRectForRepaint):
(WebCore::fixedPositionOffset): Deleted.

LayoutTests:

Adds a new test that scrolling a fixed div is possible when the page is scrolled. Also
changes some existing non-fast-scrollable region tests to match the new behavior for
computing non-fast-scrollable regions for fixed scrollable elements (see ChangeLog
entry in WebCore for more details).

* tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page-expected.txt: Added.
* tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html: Added.
* tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
* tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
* tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt
trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt
trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/page/FrameView.h
trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
trunk/Source/WebCore/platform/ScrollableArea.h
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayer.h
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
trunk/Source/WebCore/rendering/RenderListBox.cpp
trunk/Source/WebCore/rendering/RenderListBox.h
trunk/Source/WebCore/rendering/RenderView.cpp
trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h
trunk/Source/WebKit2/WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm


Added Paths

trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page-expected.txt
trunk/LayoutTests/tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html




Diff

Modified: trunk/LayoutTests/ChangeLog (192192 => 192193)

--- trunk/LayoutTests/ChangeLog	2015-11-10 00:55:28 UTC (rev 192192)
+++ trunk/LayoutTests/ChangeLog	2015-11-10 01:07:47 UTC (rev 192193)
@@ -1,3 +1,22 @@
+2015-11-09  Wenson Hsieh  
+
+Sometimes unable to scroll fixed div when the body is scrollable
+https://bugs.webkit.org/show_bug.cgi?id=151015
+
+
+Reviewed by Simon Fraser.
+
+Adds a new test that scrolling a fixed div is possible when the page is scrolled. Also
+changes some existing non-fast-scrollable region tests to match the new behavior for
+computing non-fast-scrollable regions for fixed scrollable elements (see ChangeLog
+entry in WebCore for more details).
+
+* tiled-drawing/scrolling/non-fast-region/fixed-div-in-sc

[webkit-changes] [192192] trunk

2015-11-09 Thread ryanhaddad
Title: [192192] trunk








Revision 192192
Author ryanhad...@apple.com
Date 2015-11-09 16:55:28 -0800 (Mon, 09 Nov 2015)


Log Message
Unreviewed, rolling out r192181.

This change causes asserts on mac-wk1 debug testers

Reverted changeset:

"Fixed crash loading Mozilla layout test
editor/libeditor/crashtests/431086-1.xhtml."
https://bugs.webkit.org/show_bug.cgi?id=150252
http://trac.webkit.org/changeset/192181

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/ios/EditorIOS.mm
trunk/Source/WebCore/editing/mac/EditorMac.mm


Removed Paths

trunk/LayoutTests/editing/execCommand/150252-expected.txt
trunk/LayoutTests/editing/execCommand/150252.xhtml
trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt
trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml




Diff

Modified: trunk/LayoutTests/ChangeLog (192191 => 192192)

--- trunk/LayoutTests/ChangeLog	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/LayoutTests/ChangeLog	2015-11-10 00:55:28 UTC (rev 192192)
@@ -1,3 +1,16 @@
+2015-11-09  Ryan Haddad  
+
+Unreviewed, rolling out r192181.
+
+This change causes asserts on mac-wk1 debug testers
+
+Reverted changeset:
+
+"Fixed crash loading Mozilla layout test
+editor/libeditor/crashtests/431086-1.xhtml."
+https://bugs.webkit.org/show_bug.cgi?id=150252
+http://trac.webkit.org/changeset/192181
+
 2015-11-09  Jiewen Tan  
 
 Crash when right clicking in input box with -webkit-user-select: none


Deleted: trunk/LayoutTests/editing/execCommand/150252-expected.txt (192191 => 192192)

--- trunk/LayoutTests/editing/execCommand/150252-expected.txt	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/LayoutTests/editing/execCommand/150252-expected.txt	2015-11-10 00:55:28 UTC (rev 192192)
@@ -1 +0,0 @@
-This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252


Deleted: trunk/LayoutTests/editing/execCommand/150252.xhtml (192191 => 192192)

--- trunk/LayoutTests/editing/execCommand/150252.xhtml	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/LayoutTests/editing/execCommand/150252.xhtml	2015-11-10 00:55:28 UTC (rev 192192)
@@ -1,26 +0,0 @@
-
-
-
-
-function boom()
-{
-  if (window.testRunner)
-testRunner.dumpAsText();
-
-  var r = document.documentElement;
-  r.style.position = "absolute";
-  r.contentEditable = "true";
-  r.focus();
-  r.contentEditable = "false";
-  r.focus();
-  r.contentEditable = "true";
-  document.execCommand("subscript", false, null);
-  r.contentEditable = "false";
-  document.getElementById("150252").innerHTML = "This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252";
-}
-
-window.addEventListener("load", boom, false);
-
-
-
-


Deleted: trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt (192191 => 192192)

--- trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt	2015-11-10 00:55:28 UTC (rev 192192)
@@ -1 +0,0 @@
-This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252


Deleted: trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml (192191 => 192192)

--- trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml	2015-11-10 00:55:28 UTC (rev 192192)
@@ -1,15 +0,0 @@
-
-
-
-
-if (window.testRunner)
-testRunner.dumpAsText();
-
-document.documentElement.contentEditable = "true";
-document.documentElement.focus();
-document.execCommand("superscript", false, null);
-document.getElementById("150252").innerHTML = "This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252";
-
-
-
-


Modified: trunk/Source/WebCore/ChangeLog (192191 => 192192)

--- trunk/Source/WebCore/ChangeLog	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/Source/WebCore/ChangeLog	2015-11-10 00:55:28 UTC (rev 192192)
@@ -1,3 +1,16 @@
+2015-11-09  Ryan Haddad  
+
+Unreviewed, rolling out r192181.
+
+This change causes asserts on mac-wk1 debug testers
+
+Reverted changeset:
+
+"Fixed crash loading Mozilla layout test
+editor/libeditor/crashtests/431086-1.xhtml."
+https://bugs.webkit.org/show_bug.cgi?id=150252
+http://trac.webkit.org/changeset/192181
+
 2015-11-09  Jiewen Tan  
 
 Crash when right clicking in input box with -webkit-user-select: none


Modified: trunk/Source/WebCore/editing/ios/EditorIOS.mm (192191 => 192192)

--- trunk/Source/WebCore/editing/ios/EditorIOS.mm	2015-11-10 00:44:17 UTC (rev 192191)
+++ trunk/Source/WebCore/editing/ios/EditorIOS.mm	2015-11-10 00:55:28 UTC (rev 192192)
@@ -192,13 +192,13 @@
 RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
 
 const Font* result = nullptr;
-if (style) {
+if (sty

[webkit-changes] [192191] trunk

2015-11-09 Thread jiewen_tan
Title: [192191] trunk








Revision 192191
Author jiewen_...@apple.com
Date 2015-11-09 16:44:17 -0800 (Mon, 09 Nov 2015)


Log Message
Crash when right clicking in input box with -webkit-user-select: none
https://bugs.webkit.org/show_bug.cgi?id=145981


Reviewed by Enrica Casucci.

Source/WebCore:

Test: editing/selection/minimal-user-select-crash.html

* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
Visible position cannot be created because of the style that doesn't allow the selection.

LayoutTests:

* editing/selection/minimal-user-select-crash-expected.txt: Added.
* editing/selection/minimal-user-select-crash.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/editing/Editor.cpp


Added Paths

trunk/LayoutTests/editing/selection/minimal-user-select-crash-expected.txt
trunk/LayoutTests/editing/selection/minimal-user-select-crash.html




Diff

Modified: trunk/LayoutTests/ChangeLog (192190 => 192191)

--- trunk/LayoutTests/ChangeLog	2015-11-10 00:39:13 UTC (rev 192190)
+++ trunk/LayoutTests/ChangeLog	2015-11-10 00:44:17 UTC (rev 192191)
@@ -1,3 +1,14 @@
+2015-11-09  Jiewen Tan  
+
+Crash when right clicking in input box with -webkit-user-select: none
+https://bugs.webkit.org/show_bug.cgi?id=145981
+
+
+Reviewed by Enrica Casucci.
+
+* editing/selection/minimal-user-select-crash-expected.txt: Added.
+* editing/selection/minimal-user-select-crash.html: Added.
+
 2015-11-09  Joseph Pecoraro  
 
 Web Inspector: $0 stops working after navigating to a different domain


Added: trunk/LayoutTests/editing/selection/minimal-user-select-crash-expected.txt (0 => 192191)

--- trunk/LayoutTests/editing/selection/minimal-user-select-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/selection/minimal-user-select-crash-expected.txt	2015-11-10 00:44:17 UTC (rev 192191)
@@ -0,0 +1 @@
+PASS. WebKit didn't crash.


Added: trunk/LayoutTests/editing/selection/minimal-user-select-crash.html (0 => 192191)

--- trunk/LayoutTests/editing/selection/minimal-user-select-crash.html	(rev 0)
+++ trunk/LayoutTests/editing/selection/minimal-user-select-crash.html	2015-11-10 00:44:17 UTC (rev 192191)
@@ -0,0 +1,32 @@
+
+
+
+
+#search-text {
+-webkit-user-select: none;
+}
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+function editingTest() {
+var element = document.getElementById('search-text');
+element.focus();
+
+if (window.eventSender) {
+eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop);
+eventSender.contextClick();
+
+document.write("PASS. WebKit didn't crash.")
+}
+}
+
+
+
+
+
+


Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (192190 => 192191)

--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2015-11-10 00:39:13 UTC (rev 192190)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2015-11-10 00:44:17 UTC (rev 192191)
@@ -2466,6 +2466,7 @@
 editing/selection/extend-selection-home-end.html
 editing/spelling/spellcheck-async.html
 editing/style/style-text-node-without-editable-parent.html
+editing/selection/minimal-user-select-crash.html
 
 # Editing tests that fail:
 editing/deleting/delete-emoji.html [ Failure ]


Modified: trunk/Source/WebCore/ChangeLog (192190 => 192191)

--- trunk/Source/WebCore/ChangeLog	2015-11-10 00:39:13 UTC (rev 192190)
+++ trunk/Source/WebCore/ChangeLog	2015-11-10 00:44:17 UTC (rev 192191)
@@ -1,3 +1,17 @@
+2015-11-09  Jiewen Tan  
+
+Crash when right clicking in input box with -webkit-user-select: none
+https://bugs.webkit.org/show_bug.cgi?id=145981
+
+
+Reviewed by Enrica Casucci.
+
+Test: editing/selection/minimal-user-select-crash.html
+
+* editing/Editor.cpp:
+(WebCore::Editor::hasBidiSelection):
+Visible position cannot be created because of the style that doesn't allow the selection.
+
 2015-11-09  Joseph Pecoraro  
 
 Web Inspector: $0 stops working after navigating to a different domain


Modified: trunk/Source/WebCore/editing/Editor.cpp (192190 => 192191)

--- trunk/Source/WebCore/editing/Editor.cpp	2015-11-10 00:39:13 UTC (rev 192190)
+++ trunk/Source/WebCore/editing/Editor.cpp	2015-11-10 00:44:17 UTC (rev 192191)
@@ -708,6 +708,9 @@
 } else
 startNode = m_frame.selection().selection().visibleStart().deepEquivalent().deprecatedNode();
 
+if (!startNode)
+return false;
+
 auto renderer = startNode->renderer();
 while (renderer && !is(*renderer))
 renderer = renderer->parent();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192190] trunk/Source/JavaScriptCore

2015-11-09 Thread sbarati
Title: [192190] trunk/Source/_javascript_Core








Revision 192190
Author sbar...@apple.com
Date 2015-11-09 16:39:13 -0800 (Mon, 09 Nov 2015)


Log Message
DFG::PutStackSinkingPhase should not treat the stack variables written by LoadVarargs/ForwardVarargs as being live
https://bugs.webkit.org/show_bug.cgi?id=145295

Reviewed by Filip Pizlo.

This patch fixes PutStackSinkingPhase to no longer escape the stack
locations that LoadVarargs and ForwardVarargs write to. We used
to consider sinking PutStacks right before a LoadVarargs/ForwardVarargs
because we considered them uses of such stack locations. They aren't
uses of those stack locations, they unconditionally write to those
stack locations. Sinking PutStacks to these nodes was not needed before,
but seemed mostly innocent. But I ran into a problem with this while implementing 
FTL try/catch where we would end up having to generate a value for a sunken PutStack 
right before a LoadVarargs. This would cause us to issue a GetStack that loaded garbage that 
was then forwarded into a Phi that was used as the source as the PutStack. This caused the
abstract interpreter to confuse itself on type information for the garbage GetStack
that was fed into the Phi, which would cause the abstract interpreter to then claim 
that the basic block with the PutStack in it would never be reached. This isn't true, the 
block would indeed be reached. The solution here is to be more precise about the 
liveness of locals w.r.t LoadVarargs and ForwardVarargs.

* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::PreciseLocalClobberizeAdaptor):
(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSACalculator.h:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h
trunk/Source/_javascript_Core/dfg/DFGPutStackSinkingPhase.cpp
trunk/Source/_javascript_Core/dfg/DFGSSACalculator.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (192189 => 192190)

--- trunk/Source/_javascript_Core/ChangeLog	2015-11-10 00:36:14 UTC (rev 192189)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-11-10 00:39:13 UTC (rev 192190)
@@ -1,3 +1,32 @@
+2015-11-09  Saam barati  
+
+DFG::PutStackSinkingPhase should not treat the stack variables written by LoadVarargs/ForwardVarargs as being live
+https://bugs.webkit.org/show_bug.cgi?id=145295
+
+Reviewed by Filip Pizlo.
+
+This patch fixes PutStackSinkingPhase to no longer escape the stack
+locations that LoadVarargs and ForwardVarargs write to. We used
+to consider sinking PutStacks right before a LoadVarargs/ForwardVarargs
+because we considered them uses of such stack locations. They aren't
+uses of those stack locations, they unconditionally write to those
+stack locations. Sinking PutStacks to these nodes was not needed before,
+but seemed mostly innocent. But I ran into a problem with this while implementing 
+FTL try/catch where we would end up having to generate a value for a sunken PutStack 
+right before a LoadVarargs. This would cause us to issue a GetStack that loaded garbage that 
+was then forwarded into a Phi that was used as the source as the PutStack. This caused the
+abstract interpreter to confuse itself on type information for the garbage GetStack
+that was fed into the Phi, which would cause the abstract interpreter to then claim 
+that the basic block with the PutStack in it would never be reached. This isn't true, the 
+block would indeed be reached. The solution here is to be more precise about the 
+liveness of locals w.r.t LoadVarargs and ForwardVarargs.
+
+* dfg/DFGPreciseLocalClobberize.h:
+(JSC::DFG::PreciseLocalClobberizeAdaptor::PreciseLocalClobberizeAdaptor):
+(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
+* dfg/DFGPutStackSinkingPhase.cpp:
+* dfg/DFGSSACalculator.h:
+
 2015-11-09  Filip Pizlo  
 
 B3->Air lowering should support CCall


Modified: trunk/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h (192189 => 192190)

--- trunk/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h	2015-11-10 00:36:14 UTC (rev 192189)
+++ trunk/Source/_javascript_Core/dfg/DFGPreciseLocalClobberize.h	2015-11-10 00:39:13 UTC (rev 192190)
@@ -42,7 +42,7 @@
 : m_graph(graph)
 , m_node(node)
 , m_read(read)
-, m_write(write)
+, m_unconditionalWrite(write)
 , m_def(def)
 {
 }
@@ -70,7 +70,7 @@
 // We expect stack writes to already be precisely characterized by DFG::clobberize().
 if (heap.kind() == Stack) {
 RELEASE_ASSERT(!heap.payload().isTop());
-callIfAppropriate(m_write, VirtualRegister(heap.payload().value32()));
+callIfAppropriate(m_unconditionalWrite, VirtualRegister(heap.payload().value32()));

[webkit-changes] [192189] trunk/Source/WebKit2

2015-11-09 Thread andersca
Title: [192189] trunk/Source/WebKit2








Revision 192189
Author ander...@apple.com
Date 2015-11-09 16:36:14 -0800 (Mon, 09 Nov 2015)


Log Message
Fix 32-bit build.

* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::callReplyBlock):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (192188 => 192189)

--- trunk/Source/WebKit2/ChangeLog	2015-11-10 00:30:29 UTC (rev 192188)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-10 00:36:14 UTC (rev 192189)
@@ -1,5 +1,12 @@
 2015-11-09  Anders Carlsson  
 
+Fix 32-bit build.
+
+* Shared/API/Cocoa/RemoteObjectRegistry.mm:
+(WebKit::RemoteObjectRegistry::callReplyBlock):
+
+2015-11-09  Anders Carlsson  
+
 Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
 https://bugs.webkit.org/show_bug.cgi?id=151056
 rdar://problem/23222609


Modified: trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm (192188 => 192189)

--- trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm	2015-11-10 00:30:29 UTC (rev 192188)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm	2015-11-10 00:36:14 UTC (rev 192189)
@@ -63,7 +63,9 @@
 
 void RemoteObjectRegistry::callReplyBlock(uint64_t replyID, const UserData& blockInvocation)
 {
+#if WK_API_ENABLED
 [m_remoteObjectRegistry _callReplyWithID:replyID blockInvocation:blockInvocation];
+#endif
 }
 
 } // namespace WebKit






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192188] trunk/Source/WebInspectorUI

2015-11-09 Thread commit-queue
Title: [192188] trunk/Source/WebInspectorUI








Revision 192188
Author commit-qu...@webkit.org
Date 2015-11-09 16:30:29 -0800 (Mon, 09 Nov 2015)


Log Message
Web Inspector: Uncaught exception creating TimelineRecord alternate subtitles
https://bugs.webkit.org/show_bug.cgi?id=151046

Patch by Joseph Pecoraro  on 2015-11-09
Reviewed by Brian Burg.

* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
We just need to create an element, it does not need to be
a child of subtitle, as it gets appended to the right
place later on.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (192187 => 192188)

--- trunk/Source/WebInspectorUI/ChangeLog	2015-11-10 00:26:37 UTC (rev 192187)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-11-10 00:30:29 UTC (rev 192188)
@@ -1,3 +1,16 @@
+2015-11-09  Joseph Pecoraro  
+
+Web Inspector: Uncaught exception creating TimelineRecord alternate subtitles
+https://bugs.webkit.org/show_bug.cgi?id=151046
+
+Reviewed by Brian Burg.
+
+* UserInterface/Views/TimelineRecordTreeElement.js:
+(WebInspector.TimelineRecordTreeElement):
+We just need to create an element, it does not need to be
+a child of subtitle, as it gets appended to the right
+place later on.
+
 2015-11-09  Nikita Vasilyev  
 
 Web Inspector: [Regression] [Mavericks] Top border of selected tab matches the background when Web Inspector is undocked


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js (192187 => 192188)

--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js	2015-11-10 00:26:37 UTC (rev 192187)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordTreeElement.js	2015-11-10 00:30:29 UTC (rev 192188)
@@ -94,7 +94,7 @@
 case WebInspector.ScriptTimelineRecord.EventType.TimerInstalled:
 if (includeDetailsInMainTitle) {
 let timeoutString =  Number.secondsToString(timelineRecord.details.timeout / 1000);
-alternateSubtitle = subtitle.appendChild(document.createElement("span"));
+alternateSubtitle = document.createElement("span");
 alternateSubtitle.classList.add("alternate-subtitle");
 if (timelineRecord.details.repeating)
 alternateSubtitle.textContent = WebInspector.UIString("%s interval").format(timeoutString);






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192187] trunk/Source/JavaScriptCore

2015-11-09 Thread fpizlo
Title: [192187] trunk/Source/_javascript_Core








Revision 192187
Author fpi...@apple.com
Date 2015-11-09 16:26:37 -0800 (Mon, 09 Nov 2015)


Log Message
B3->Air lowering should support CCall
https://bugs.webkit.org/show_bug.cgi?id=151043

Reviewed by Geoffrey Garen.

Adds support for lowering CCall to Air, and adds a test that makes calls. I cannot test doubles
until https://bugs.webkit.org/show_bug.cgi?id=151002 lands, but this does test integer
arguments pretty thoroughly including a test for lots of arguments. That test ensures that the
arguments go to registers and the stack in the right order and such.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::marshallCCallArgument):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.h:
* b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::forEachArg):
(JSC::B3::Air::CCallSpecial::isValid):
(JSC::B3::Air::CCallSpecial::admitsStack):
(JSC::B3::Air::CCallSpecial::generate):
* b3/air/AirCCallSpecial.h:
* b3/testb3.cpp:
(JSC::B3::testCompare):
(JSC::B3::simpleFunction):
(JSC::B3::testCallSimple):
(JSC::B3::functionWithHellaArguments):
(JSC::B3::testCallFunctionWithHellaArguments):
(JSC::B3::run):
* jit/FPRInfo.h:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp
trunk/Source/_javascript_Core/b3/B3Opcode.h
trunk/Source/_javascript_Core/b3/air/AirCCallSpecial.cpp
trunk/Source/_javascript_Core/b3/air/AirCCallSpecial.h
trunk/Source/_javascript_Core/b3/testb3.cpp
trunk/Source/_javascript_Core/jit/FPRInfo.h




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (192186 => 192187)

--- trunk/Source/_javascript_Core/ChangeLog	2015-11-10 00:19:26 UTC (rev 192186)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-11-10 00:26:37 UTC (rev 192187)
@@ -1,3 +1,35 @@
+2015-11-09  Filip Pizlo  
+
+B3->Air lowering should support CCall
+https://bugs.webkit.org/show_bug.cgi?id=151043
+
+Reviewed by Geoffrey Garen.
+
+Adds support for lowering CCall to Air, and adds a test that makes calls. I cannot test doubles
+until https://bugs.webkit.org/show_bug.cgi?id=151002 lands, but this does test integer
+arguments pretty thoroughly including a test for lots of arguments. That test ensures that the
+arguments go to registers and the stack in the right order and such.
+
+* b3/B3LowerToAir.cpp:
+(JSC::B3::Air::LowerToAir::createCompare):
+(JSC::B3::Air::LowerToAir::marshallCCallArgument):
+(JSC::B3::Air::LowerToAir::lower):
+* b3/B3Opcode.h:
+* b3/air/AirCCallSpecial.cpp:
+(JSC::B3::Air::CCallSpecial::forEachArg):
+(JSC::B3::Air::CCallSpecial::isValid):
+(JSC::B3::Air::CCallSpecial::admitsStack):
+(JSC::B3::Air::CCallSpecial::generate):
+* b3/air/AirCCallSpecial.h:
+* b3/testb3.cpp:
+(JSC::B3::testCompare):
+(JSC::B3::simpleFunction):
+(JSC::B3::testCallSimple):
+(JSC::B3::functionWithHellaArguments):
+(JSC::B3::testCallFunctionWithHellaArguments):
+(JSC::B3::run):
+* jit/FPRInfo.h:
+
 2015-11-09  Joseph Pecoraro  
 
 Web Inspector: $0 stops working after navigating to a different domain


Modified: trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp (192186 => 192187)

--- trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp	2015-11-10 00:19:26 UTC (rev 192186)
+++ trunk/Source/_javascript_Core/b3/B3LowerToAir.cpp	2015-11-10 00:26:37 UTC (rev 192187)
@@ -28,12 +28,14 @@
 
 #if ENABLE(B3_JIT)
 
+#include "AirCCallSpecial.h"
 #include "AirCode.h"
 #include "AirInsertionSet.h"
 #include "AirInstInlines.h"
 #include "AirStackSlot.h"
 #include "B3ArgumentRegValue.h"
 #include "B3BasicBlockInlines.h"
+#include "B3CCallValue.h"
 #include "B3CheckSpecial.h"
 #include "B3Commutativity.h"
 #include "B3IndexMap.h"
@@ -1148,6 +1150,27 @@
 inverted);
 }
 
+template
+Arg marshallCCallArgument(unsigned& argumentCount, unsigned& stackCount, Value* child)
+{
+unsigned argumentIndex = argumentCount++;
+if (argumentIndex < BankInfo::numberOfArgumentRegisters) {
+Tmp result = Tmp(BankInfo::toArgumentRegister(argumentIndex));
+append(relaxedMoveForType(child->type()), immOrTmp(child), result);
+return result;
+}
+
+// Compute the place that this goes onto the stack. On X86_64 and probably other calling
+// conventions that don't involve obsolete computers and operating systems, sub-pointer-size
+// arguments are still given a full pointer-sized stack slot. Hence we don't have to consider
+// the type of the argument when deducing the stack index.
+unsigned stackIndex = stackCount++;
+
+Arg result = Arg::callArg(stackIndex * sizeof(void*));
+appendStore(child, result);
+return result;
+}
+
 void lower()
 {
 switch (m_value->o

[webkit-changes] [192186] trunk

2015-11-09 Thread commit-queue
Title: [192186] trunk








Revision 192186
Author commit-qu...@webkit.org
Date 2015-11-09 16:19:26 -0800 (Mon, 09 Nov 2015)


Log Message
Web Inspector: $0 stops working after navigating to a different domain
https://bugs.webkit.org/show_bug.cgi?id=147962

Patch by Joseph Pecoraro  on 2015-11-09
Reviewed by Brian Burg.

Source/_javascript_Core:

Extract the per-GlobalObject cache of JSValue wrappers for
InjectedScriptHost objects to be reused by WebCore for its
CommandLineAPIHost objects injected into multiple contexts.

* CMakeLists.txt:
* _javascript_Core.vcxproj/_javascript_Core.vcxproj:
* _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
* _javascript_Core.xcodeproj/project.pbxproj:
Add new files.

* inspector/PerGlobalObjectWrapperWorld.h:
* inspector/PerGlobalObjectWrapperWorld.cpp:
(Inspector::PerGlobalObjectWrapperWorld::getWrapper):
(Inspector::PerGlobalObjectWrapperWorld::addWrapper):
(Inspector::PerGlobalObjectWrapperWorld::clearAllWrappers):
Hold a bunch of per-global-object wrappers for an object
that will outlive the global object. This inspector does this
for host objects that it exposes into scripts it injects into
each execution context created by the page.

* inspector/InjectedScriptHost.cpp:
(Inspector::InjectedScriptHost::wrapper):
(Inspector::InjectedScriptHost::clearAllWrappers):
(Inspector::InjectedScriptHost::jsWrapper): Deleted.
(Inspector::clearWrapperFromValue): Deleted.
(Inspector::InjectedScriptHost::clearWrapper): Deleted.
Extract and simplify the Per-GlobalObject wrapping into a class.
Simplify object construction as well.

* inspector/InjectedScriptHost.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::createInjectedScript):
(Inspector::InjectedScriptManager::discardInjectedScripts):
Make discarding virtual so subclasses may also discard injected scripts.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::JSInjectedScriptHost):
(Inspector::JSInjectedScriptHost::releaseImpl): Deleted.
(Inspector::JSInjectedScriptHost::~JSInjectedScriptHost): Deleted.
(Inspector::toJS): Deleted.
(Inspector::toJSInjectedScriptHost): Deleted.
* inspector/JSInjectedScriptHost.h:
(Inspector::JSInjectedScriptHost::create):
(Inspector::JSInjectedScriptHost::impl):
Update this code originally copied from older generated bindings to
be more like new generated bindings and remove some now unused code.

Source/WebCore:

Test: http/tests/inspector/console/cross-domain-inspected-node-access.html

The inspector backend injects the CommandLineAPI Source with a
corresponding CommandLineAPIHost into each execution context
created by the page (main frame, sub frames, etc).

When creating the JSValue wrapper for the CommandLineAPIHost using
the generated toJS(...) DOM bindings, we were using the cached
CommandLineAPIHost wrapper values in the single DOMWrapperWorld shared
across all frames. This meant that the first time the wrapper was
needed it was created in context A. But when needed for context B
it was using the wrapper created in context A. Using this wrapper
in context B was producing unexpected cross-origin warnings.

The solution taken here, is to create a new JSValue wrapper for
the CommandLineAPIHost per execution context. This way each time
the CommandLineAPIHost wrapper is used in a frame, it is using
the one created for that frame.

The C++ host object being wrapped has a lifetime equivalent to
the Page. It does not change in this patch. The wrapper values
are cleared on page navigation or when the page is closed, and
will be garbage collected.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* ForwardingHeaders/inspector/PerGlobalObjectWrapperWorld.h: Added.
New forwarding header.

* inspector/CommandLineAPIHost.h:
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::CommandLineAPIHost):
(WebCore::CommandLineAPIHost::wrapper):
Cached JSValue wrappers per GlobalObject.

(WebCore::CommandLineAPIHost::clearAllWrappers):
Clear any wrappers we have, including the $0 value itself
which we weren't explicitly clearing previously.

* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::host):
Simplify creating the wrapper.

* inspector/WebInjectedScriptManager.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::discardInjectedScripts):
When the main frame window object clears, also clear the
CommandLineAPI wrappers we may have created. Also take this
opportunity to clear any $0 value that may have pointed
to a value in the previous page.

LayoutTests:

* TestExpectations:
* http/tests/inspector/console/access-inspected-object-expected.txt: Removed.
* http/tests/inspector/console/access-inspected-object.html: Removed.
* http/tests/inspector/console/cross-domain-inspected-node-access-expected.txt: Added.
* http/tests/inspector/console/cross-domain-inspected-node-access.html: Added.
Rewrite the old test with the new testing infrastructure.
Test this particular c

[webkit-changes] [192185] trunk

2015-11-09 Thread andersca
Title: [192185] trunk








Revision 192185
Author ander...@apple.com
Date 2015-11-09 16:05:30 -0800 (Mon, 09 Nov 2015)


Log Message
Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
https://bugs.webkit.org/show_bug.cgi?id=151056
rdar://problem/23222609

Reviewed by Tim Horton.

Source/WebKit2:

* Platform/spi/Cocoa/NSInvocationSPI.h:
Add NSBlockInvocation declaration.

* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::encode):
Encode true if we have a reply ID.

* Shared/API/Cocoa/RemoteObjectRegistry.h:
Add new members.

* Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
Add new CallReplyBlock message.

* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::sendReplyBlock):
Just send the CallReplyBlock message.

(WebKit::RemoteObjectRegistry::callReplyBlock):
Call through to _WKRemoteObjectRegistry.

* Shared/API/Cocoa/WKRemoteObjectCoder.h:
Pass an optional reply selector.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
Don't hard-code the first argument index.

(encodeInvocation):
Encode block invocations.

(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:replyToSelector:]):
Initialize _replyToSelector.

(validateClass):
NSBlockInvocation doesn't need to conform to NSSecureCoding.

(decodeInvocationArguments):
Don't hard-code the first argument, take it as a parameter instead.

(decodeInvocation):
Decode NSBlockInvocations (reply block invocations).

(decodeObject):
Check for NSBlockInvocation.

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
Return null if we can't find the method.

(-[_WKRemoteObjectInterface _methodSignatureForReplyBlockOfSelector:]):
Look up the reply block signature and return it.

(-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
Look up the allowed reply argument classes and return them.

* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
Add new methods.

* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(PendingReply::PendingReply):
Add new object that represents a pending reply.

(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
If the invocation has a reply block, add a pending reply to our map.

(-[_WKRemoteObjectRegistry _invokeMethod:]):
If the method we're about to invoke has a reply block, construct a special reply block that calls us back with an invocation.
Encode this invocation and send it back across the wire.

(-[_WKRemoteObjectRegistry _callReplyWithID:blockInvocation:]):
Find the pending reply, decode the reply block invocation and call it.

* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
Add new methods.

Tools:

Update test.

* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:
(-[RemoteObjectRegistryPlugIn sayHello:completionHandler:]):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Platform/spi/Cocoa/NSInvocationSPI.h
trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectInvocation.mm
trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h
trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.messages.in
trunk/Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm
trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.h
trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (192184 => 192185)

--- trunk/Source/WebKit2/ChangeLog	2015-11-10 00:03:28 UTC (rev 192184)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-10 00:05:30 UTC (rev 192185)
@@ -1,3 +1,86 @@
+2015-11-09  Anders Carlsson  
+
+Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
+https://bugs.webkit.org/show_bug.cgi?id=151056
+rdar://problem/23222609
+
+Reviewed by Tim Horton.
+
+* Platform/spi/Cocoa/NSInvocationSPI.h:
+Add NSBlockInvocation declaration.
+
+* Shared/API/Cocoa/RemoteObjectInvocation.mm:
+(WebKit::RemoteObjectInvocation::encode):
+Encode true if we have a reply ID.
+
+* Shared/API/Cocoa/RemoteObjectRegistry.h:
+Add new members.
+
+* Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
+Add new CallReplyBlock message.
+
+* Shared/API/Cocoa/RemoteObjectRegistry.mm:
+(WebKit::RemoteObjectRegistry::sendReplyBlock):
+Just send the CallReplyBlock message.
+
+(WebKit::RemoteObjectRegistry::callReplyBlock):
+Call through

[webkit-changes] [192184] trunk

2015-11-09 Thread timothy_horton
Title: [192184] trunk








Revision 192184
Author timothy_hor...@apple.com
Date 2015-11-09 16:03:28 -0800 (Mon, 09 Nov 2015)


Log Message
Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=151054


Reviewed by Simon Fraser.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Deleted.
(WebKit::WebPageCreationParameters::decode): Deleted.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView setDrawsTransparentBackground:]):
(-[WKView drawsTransparentBackground]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
(WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Deleted.
(WebKit::WebPageProxy::setDrawsTransparentBackground): Deleted.
(WebKit::WebPageProxy::creationParameters): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::drawsTransparentBackground): Deleted.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Deleted.
(WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
(WebKit::WebPage::setDrawsTransparentBackground): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawsTransparentBackground): Deleted.
* WebProcess/WebPage/WebPage.messages.in:
Get rid of drawsTransparentBackground. It doesn't seem like there's any observable
difference in a layer-backed world. WKView's (set)drawsTransparentBackground
will just forward to drawsBackground (inverted).

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
Move _webProcessIsResponsive up with the other cross-platform SPI methods, instead
of below all of the platform-specific SPI methods.

(-[WKWebView _drawsBackground]):
(-[WKWebView _setDrawsBackground:]):
Added.

(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
Deleted.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Replace drawsTransparentBackground with drawsBackground.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):
Use drawsBackground instead, and make sure to set the window background color,
otherwise it might end up being gray anyway!

WebKit1 still doesn't work unless you turn off toolbar blurring, but at least
WebKit2 is working now!

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp
trunk/Source/WebKit2/Shared/WebPageCreationParameters.h
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h
trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
trunk/Tools/ChangeLog
trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m
trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m




Diff

Modified: trunk/Source/WebKit2/ChangeLog (192183 => 192184)

--- trunk/Source/WebKit2/ChangeLog	2015-11-10 00:01:24 UTC (rev 192183)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-10 00:03:28 UTC (rev 192184)
@@ -1,3 +1,60 @@
+2015-11-09  Tim Horton  
+
+Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
+https://bugs.webkit.org/show_bug.cgi?id=151054
+
+
+Reviewed by Simon Fraser.
+
+* Shared/WebPageCreationParameters.cpp:
+(WebKit::WebPageCreationParameters::encode): Deleted.
+(WebKit::WebPageCreationParameters::decode): Deleted.
+* Shared/WebPageCreationParameters.h:
+* UIProcess/API/mac/WKView.mm:
+(-[WKView setDrawsTransparentBackground:]):
+(-[WKView drawsTransparentBackground]):
+* UIProcess/Cocoa/WebViewImpl.h:
+* UIProcess/Cocoa/WebViewImpl.mm:
+(WebKit::WebViewImpl::updateLayer):
+(WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
+(WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::WebPageProxy): Deleted.
+(WebKit::WebPageProxy::setDrawsTransparentBackground): De

[webkit-changes] [192183] trunk/Source/JavaScriptCore

2015-11-09 Thread fpizlo
Title: [192183] trunk/Source/_javascript_Core








Revision 192183
Author fpi...@apple.com
Date 2015-11-09 16:01:24 -0800 (Mon, 09 Nov 2015)


Log Message
B3 should be able to compile a program with a double constant
https://bugs.webkit.org/show_bug.cgi?id=151002

Reviewed by Benjamin Poulain.

This implements a bunch of annoying stuff that is necessary to support constants that need a
data section, such as double constants on X86_64:

- B3::Procedure can now tell you what to keep alive in addition to the MacroAssemblerCodeRef.
  We call this the B3::OpaqueByproducts. It's the client's responsibility to keep this alive
  after calling B3::generate().

- Added a new helper for compiling B3 code, called B3::Compilation. Constructing a
  Compilation runs the compiler. Then you can pass around a Compilation the way you would
  have passed around a MacroAssemblerCodeRef.

- Added a constant motion phase, called moveConstants(). This does very simple constant
  hoisting/sinking: it makes sure that each constant is only materialized in one place in
  each basic block. It uses a DataSection, which is a kind of OpaqueByproduct, to store
  double constants.

- The way I wanted to do constant motion is to basically track what constants are of interest
  and then recreate them as needed, so the original Values become irrelevant in the process.
  To do that, I needed an abstraction that is almost identical to the DFG PureValue
  abstraction that we use for CSE. So, I created such a thing, and called it ValueKey. It
  can be used to compare and hash pure Values, and to recreate them as needed.

- Fixed the lowering's handling of constants so that we don't perturb the placement of the
  constant materializations.

* _javascript_Core.xcodeproj/project.pbxproj:
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
(JSC::MacroAssemblerX86Common::moveZeroToDouble):
(JSC::MacroAssemblerX86Common::branchDoubleNonZero):
* b3/B3Common.h:
(JSC::B3::isIdentical):
(JSC::B3::isRepresentableAsImpl):
* b3/B3Compilation.cpp: Added.
(JSC::B3::Compilation::Compilation):
(JSC::B3::Compilation::~Compilation):
* b3/B3Compilation.h: Added.
(JSC::B3::Compilation::code):
* b3/B3ConstDoubleValue.h:
(JSC::B3::ConstDoubleValue::accepts): Deleted.
* b3/B3DataSection.cpp: Added.
(JSC::B3::DataSection::DataSection):
(JSC::B3::DataSection::~DataSection):
(JSC::B3::DataSection::dump):
* b3/B3DataSection.h: Added.
(JSC::B3::DataSection::data):
(JSC::B3::DataSection::size):
* b3/B3Generate.cpp:
(JSC::B3::generate):
(JSC::B3::generateToAir):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::immOrTmp):
(JSC::B3::Air::LowerToAir::fillStackmap):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::immForMove): Deleted.
(JSC::B3::Air::LowerToAir::immOrTmpForMove): Deleted.
* b3/B3MoveConstants.cpp: Added.
(JSC::B3::moveConstants):
* b3/B3MoveConstants.h: Added.
* b3/B3OpaqueByproduct.h: Added.
(JSC::B3::OpaqueByproduct::OpaqueByproduct):
(JSC::B3::OpaqueByproduct::~OpaqueByproduct):
* b3/B3OpaqueByproducts.cpp: Added.
(JSC::B3::OpaqueByproducts::OpaqueByproducts):
(JSC::B3::OpaqueByproducts::~OpaqueByproducts):
(JSC::B3::OpaqueByproducts::add):
(JSC::B3::OpaqueByproducts::dump):
* b3/B3OpaqueByproducts.h: Added.
(JSC::B3::OpaqueByproducts::count):
* b3/B3Opcode.h:
(JSC::B3::constPtrOpcode):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::Procedure):
(JSC::B3::Procedure::dump):
(JSC::B3::Procedure::blocksInPreOrder):
(JSC::B3::Procedure::deleteValue):
(JSC::B3::Procedure::addDataSection):
(JSC::B3::Procedure::addValueIndex):
* b3/B3Procedure.h:
(JSC::B3::Procedure::lastPhaseName):
(JSC::B3::Procedure::byproducts):
(JSC::B3::Procedure::takeByproducts):
* b3/B3Type.h:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::performSubstitution):
* b3/B3Value.h:
* b3/B3ValueKey.cpp: Added.
(JSC::B3::ValueKey::dump):
(JSC::B3::ValueKey::materialize):
* b3/B3ValueKey.h: Added.
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::opcode):
(JSC::B3::ValueKey::type):
(JSC::B3::ValueKey::childIndex):
(JSC::B3::ValueKey::value):
(JSC::B3::ValueKey::doubleValue):
(JSC::B3::ValueKey::operator==):
(JSC::B3::ValueKey::operator!=):
(JSC::B3::ValueKey::hash):
(JSC::B3::ValueKey::operator bool):
(JSC::B3::ValueKey::canMaterialize):
(JSC::B3::ValueKey::isHashTableDeletedValue):
(JSC::B3::ValueKeyHash::hash):
(JSC::B3::ValueKeyHash::equal):
* b3/B3ValueKeyInlines.h: Added.
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::child):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::Code):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::proc):
(JSC::B3::Air::Code::lastPhaseName):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::compile):
(JSC::B3::invoke):
(JSC::B3::compileAndRun):
(JSC::B3::test42):
(JSC::B3::testBranch):
(JSC::B3::testBranchPtr):
(JSC::B3::testDiamond):
(JSC::B3::testBranchNotEqual):
(JSC::B3::testBranchNotEqualCommute):
(JSC::B3::testBranchNotEqualNotEqual):
(

[webkit-changes] [192182] trunk/LayoutTests

2015-11-09 Thread ryanhaddad
Title: [192182] trunk/LayoutTests








Revision 192182
Author ryanhad...@apple.com
Date 2015-11-09 14:47:12 -0800 (Mon, 09 Nov 2015)


Log Message
Marking crypto/subtle/rsa-export-generated-keys.html as slow on mac
https://bugs.webkit.org/show_bug.cgi?id=144938

Unreviewed test gardening.

* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (192181 => 192182)

--- trunk/LayoutTests/ChangeLog	2015-11-09 22:43:18 UTC (rev 192181)
+++ trunk/LayoutTests/ChangeLog	2015-11-09 22:47:12 UTC (rev 192182)
@@ -1,5 +1,14 @@
 2015-11-09  Ryan Haddad  
 
+Marking crypto/subtle/rsa-export-generated-keys.html as slow on mac
+https://bugs.webkit.org/show_bug.cgi?id=144938
+
+Unreviewed test gardening.
+
+* platform/mac/TestExpectations:
+
+2015-11-09  Ryan Haddad  
+
 Marking http/tests/security/cross-frame-access-put.html as flaky on mac-wk2
 https://bugs.webkit.org/show_bug.cgi?id=151053
 


Modified: trunk/LayoutTests/platform/mac/TestExpectations (192181 => 192182)

--- trunk/LayoutTests/platform/mac/TestExpectations	2015-11-09 22:43:18 UTC (rev 192181)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2015-11-09 22:47:12 UTC (rev 192182)
@@ -1363,3 +1363,5 @@
 webkit.org/b/150830 [ Mavericks Yosemite ElCapitan ] fast/text/woff2.html [ ImageOnlyFailure ]
 
 webkit.org/b/150956 imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html [ Pass Timeout ]
+
+webkit.org/b/144938 crypto/subtle/rsa-export-generated-keys.html [ Slow ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192181] trunk

2015-11-09 Thread ddkilzer
Title: [192181] trunk








Revision 192181
Author ddkil...@apple.com
Date 2015-11-09 14:43:18 -0800 (Mon, 09 Nov 2015)


Log Message
Fixed crash loading Mozilla layout test editor/libeditor/crashtests/431086-1.xhtml.
https://bugs.webkit.org/show_bug.cgi?id=150252


Patch by Pranjal Jumde  on 2015-11-09
Reviewed by Brent Fulgham.

* Source/WebCore/editing/ios/EditorIOS.mm
* Source/WebCore/editing/mac/EditorMac.mm
  In Editor::fontForSelection moved the node removal code, so that the
  node is only removed if style is not NULL.
* LayoutTests/editing/execCommand/150252.xhtml
* LayoutTests/editing/execCommand/150252_minimal.xhtml
* LayoutTests/editing/execCommand/150252-expected.txt
* LayoutTests/editing/execCommand/150252_minimal-expected.txt

Modified Paths

trunk/ChangeLog
trunk/Source/WebCore/editing/ios/EditorIOS.mm
trunk/Source/WebCore/editing/mac/EditorMac.mm


Added Paths

trunk/LayoutTests/editing/execCommand/150252-expected.txt
trunk/LayoutTests/editing/execCommand/150252.xhtml
trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt
trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml




Diff

Modified: trunk/ChangeLog (192180 => 192181)

--- trunk/ChangeLog	2015-11-09 22:34:16 UTC (rev 192180)
+++ trunk/ChangeLog	2015-11-09 22:43:18 UTC (rev 192181)
@@ -1,3 +1,20 @@
+2015-11-09  Pranjal Jumde  
+
+Fixed crash loading Mozilla layout test editor/libeditor/crashtests/431086-1.xhtml.
+https://bugs.webkit.org/show_bug.cgi?id=150252
+
+
+Reviewed by Brent Fulgham.
+
+* Source/WebCore/editing/ios/EditorIOS.mm
+* Source/WebCore/editing/mac/EditorMac.mm
+  In Editor::fontForSelection moved the node removal code, so that the
+  node is only removed if style is not NULL.
+* LayoutTests/editing/execCommand/150252.xhtml
+* LayoutTests/editing/execCommand/150252_minimal.xhtml
+* LayoutTests/editing/execCommand/150252-expected.txt
+* LayoutTests/editing/execCommand/150252_minimal-expected.txt
+
 2015-11-06  Daniel Bates  
 
 Teach Makefile to build LayoutTestRelay when building for iOS Simulator


Added: trunk/LayoutTests/editing/execCommand/150252-expected.txt (0 => 192181)

--- trunk/LayoutTests/editing/execCommand/150252-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/execCommand/150252-expected.txt	2015-11-09 22:43:18 UTC (rev 192181)
@@ -0,0 +1 @@
+This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252


Added: trunk/LayoutTests/editing/execCommand/150252.xhtml (0 => 192181)

--- trunk/LayoutTests/editing/execCommand/150252.xhtml	(rev 0)
+++ trunk/LayoutTests/editing/execCommand/150252.xhtml	2015-11-09 22:43:18 UTC (rev 192181)
@@ -0,0 +1,26 @@
+
+
+
+
+function boom()
+{
+  if (window.testRunner)
+testRunner.dumpAsText();
+
+  var r = document.documentElement;
+  r.style.position = "absolute";
+  r.contentEditable = "true";
+  r.focus();
+  r.contentEditable = "false";
+  r.focus();
+  r.contentEditable = "true";
+  document.execCommand("subscript", false, null);
+  r.contentEditable = "false";
+  document.getElementById("150252").innerHTML = "This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252";
+}
+
+window.addEventListener("load", boom, false);
+
+
+
+


Added: trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt (0 => 192181)

--- trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt	(rev 0)
+++ trunk/LayoutTests/editing/execCommand/150252_minimal-expected.txt	2015-11-09 22:43:18 UTC (rev 192181)
@@ -0,0 +1 @@
+This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252


Added: trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml (0 => 192181)

--- trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml	(rev 0)
+++ trunk/LayoutTests/editing/execCommand/150252_minimal.xhtml	2015-11-09 22:43:18 UTC (rev 192181)
@@ -0,0 +1,15 @@
+
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+document.documentElement.contentEditable = "true";
+document.documentElement.focus();
+document.execCommand("superscript", false, null);
+document.getElementById("150252").innerHTML = "This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252";
+
+
+
+


Modified: trunk/Source/WebCore/editing/ios/EditorIOS.mm (192180 => 192181)

--- trunk/Source/WebCore/editing/ios/EditorIOS.mm	2015-11-09 22:34:16 UTC (rev 192180)
+++ trunk/Source/WebCore/editing/ios/EditorIOS.mm	2015-11-09 22:43:18 UTC (rev 192181)
@@ -192,13 +192,13 @@
 RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
 
 const Font* result = nullptr;
-if (style)
+if (style) {
 result = &style->fontCascade().primaryFont();
-
-if (nodeToRemove) {
-ExceptionCode ec;
-nodeToRemove->remo

[webkit-changes] [192180] trunk/Websites/test-results

2015-11-09 Thread rniwa
Title: [192180] trunk/Websites/test-results








Revision 192180
Author rn...@webkit.org
Date 2015-11-09 14:34:16 -0800 (Mon, 09 Nov 2015)


Log Message
Allow , in the builder name.

Rubber-stamped by Alexey Proskuryakov.

* public/api/report.php:

Modified Paths

trunk/Websites/test-results/ChangeLog
trunk/Websites/test-results/public/api/report.php




Diff

Modified: trunk/Websites/test-results/ChangeLog (192179 => 192180)

--- trunk/Websites/test-results/ChangeLog	2015-11-09 22:13:31 UTC (rev 192179)
+++ trunk/Websites/test-results/ChangeLog	2015-11-09 22:34:16 UTC (rev 192180)
@@ -1,3 +1,11 @@
+2015-11-09  Ryosuke Niwa  
+
+Allow , in the builder name.
+
+Rubber-stamped by Alexey Proskuryakov.
+
+* public/api/report.php:
+
 2015-08-10  Dana Burkart  
 
 Fix flakiness dashboard stability and performance issues.


Modified: trunk/Websites/test-results/public/api/report.php (192179 => 192180)

--- trunk/Websites/test-results/public/api/report.php	2015-11-09 22:13:31 UTC (rev 192179)
+++ trunk/Websites/test-results/public/api/report.php	2015-11-09 22:34:16 UTC (rev 192180)
@@ -38,7 +38,7 @@
 function main() {
 require_existence_of($_POST, array(
 'master' => '/[A-Za-z0-9\.]+/',
-'builder_name' => '/^[A-Za-z0-9 \(\)\-_]+$/',
+'builder_name' => '/^[A-Za-z0-9 \(\)\-_,]+$/',
 'build_number' => '/^[0-9]+?$/',
 'build_slave' => '/^[A-Za-z0-9\-_]+$/',
 'revisions' => '/^.+?$/',






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192179] trunk/LayoutTests

2015-11-09 Thread ryanhaddad
Title: [192179] trunk/LayoutTests








Revision 192179
Author ryanhad...@apple.com
Date 2015-11-09 14:13:31 -0800 (Mon, 09 Nov 2015)


Log Message
Marking http/tests/security/cross-frame-access-put.html as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=151053

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (192178 => 192179)

--- trunk/LayoutTests/ChangeLog	2015-11-09 22:07:19 UTC (rev 192178)
+++ trunk/LayoutTests/ChangeLog	2015-11-09 22:13:31 UTC (rev 192179)
@@ -1,3 +1,12 @@
+2015-11-09  Ryan Haddad  
+
+Marking http/tests/security/cross-frame-access-put.html as flaky on mac-wk2
+https://bugs.webkit.org/show_bug.cgi?id=151053
+
+Unreviewed test gardening.
+
+* platform/mac-wk2/TestExpectations:
+
 2015-11-09  Alex Christensen  
 
 XHR timeouts should not fire if there is an immediate network error.


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (192178 => 192179)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2015-11-09 22:07:19 UTC (rev 192178)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2015-11-09 22:13:31 UTC (rev 192179)
@@ -285,6 +285,8 @@
 
 webkit.org/b/150942 animations/multiple-backgrounds.html [ Pass ImageOnlyFailure ]
 
+webkit.org/b/151053 http/tests/security/cross-frame-access-put.html [ Pass Failure ]
+
 ### END OF (1) Classified failures with bug reports
 
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192178] trunk/Source/WebKit2

2015-11-09 Thread commit-queue
Title: [192178] trunk/Source/WebKit2








Revision 192178
Author commit-qu...@webkit.org
Date 2015-11-09 14:07:19 -0800 (Mon, 09 Nov 2015)


Log Message
Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
https://bugs.webkit.org/show_bug.cgi?id=151050

Patch by Joseph Pecoraro  on 2015-11-09
Reviewed by Brian Burg.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
Check now that the inspected view can be a WKWebView.

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm




Diff

Modified: trunk/Source/WebKit2/ChangeLog (192177 => 192178)

--- trunk/Source/WebKit2/ChangeLog	2015-11-09 22:00:31 UTC (rev 192177)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-09 22:07:19 UTC (rev 192178)
@@ -1,3 +1,14 @@
+2015-11-09  Joseph Pecoraro  
+
+Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
+https://bugs.webkit.org/show_bug.cgi?id=151050
+
+Reviewed by Brian Burg.
+
+* UIProcess/mac/WebInspectorProxyMac.mm:
+(WebKit::WebInspectorProxy::platformCanAttach):
+Check now that the inspected view can be a WKWebView.
+
 2015-11-09  Anders Carlsson  
 
 Introspect reply block types as well


Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (192177 => 192178)

--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2015-11-09 22:00:31 UTC (rev 192177)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm	2015-11-09 22:07:19 UTC (rev 192178)
@@ -468,7 +468,7 @@
 return false;
 
 NSView *inspectedView = inspectedPage()->inspectorAttachmentView();
-if ([inspectedView isKindOfClass:[WKView class]])
+if ([inspectedView isKindOfClass:[WKView class]] || [inspectedView isKindOfClass:[WKWebView class]])
 return webProcessCanAttach;
 
 static const float minimumAttachedHeight = 250;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192177] trunk/Source

2015-11-09 Thread andersca
Title: [192177] trunk/Source








Revision 192177
Author ander...@apple.com
Date 2015-11-09 14:00:31 -0800 (Mon, 09 Nov 2015)


Log Message
Introspect reply block types as well
https://bugs.webkit.org/show_bug.cgi?id=151048

Reviewed by Tim Horton.

Source/WebKit2:

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(initializeMethod):
(initializeMethods):
(-[_WKRemoteObjectInterface debugDescription]):

Source/WTF:

Fix operator-> implementation.

* wtf/Optional.h:
(WTF::Optional::operator->):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/Optional.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm




Diff

Modified: trunk/Source/WTF/ChangeLog (192176 => 192177)

--- trunk/Source/WTF/ChangeLog	2015-11-09 21:50:46 UTC (rev 192176)
+++ trunk/Source/WTF/ChangeLog	2015-11-09 22:00:31 UTC (rev 192177)
@@ -1,3 +1,15 @@
+2015-11-09  Anders Carlsson  
+
+Introspect reply block types as well
+https://bugs.webkit.org/show_bug.cgi?id=151048
+
+Reviewed by Tim Horton.
+
+Fix operator-> implementation.
+
+* wtf/Optional.h:
+(WTF::Optional::operator->):
+
 2015-11-05  Nikos Andronikos  
 
 Add runtime and compile time flags for enabling Web Animations API and model.


Modified: trunk/Source/WTF/wtf/Optional.h (192176 => 192177)

--- trunk/Source/WTF/wtf/Optional.h	2015-11-09 21:50:46 UTC (rev 192176)
+++ trunk/Source/WTF/wtf/Optional.h	2015-11-09 22:00:31 UTC (rev 192177)
@@ -136,13 +136,13 @@
 const T* operator->() const
 {
 ASSERT(m_isEngaged);
-return asPtr()->operator->();
+return asPtr();
 }
 
 T* operator->()
 {
 ASSERT(m_isEngaged);
-return asPtr()->operator->();
+return asPtr();
 }
 
 const T& operator*() const { return value(); }


Modified: trunk/Source/WebKit2/ChangeLog (192176 => 192177)

--- trunk/Source/WebKit2/ChangeLog	2015-11-09 21:50:46 UTC (rev 192176)
+++ trunk/Source/WebKit2/ChangeLog	2015-11-09 22:00:31 UTC (rev 192177)
@@ -1,5 +1,17 @@
 2015-11-09  Anders Carlsson  
 
+Introspect reply block types as well
+https://bugs.webkit.org/show_bug.cgi?id=151048
+
+Reviewed by Tim Horton.
+
+* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
+(initializeMethod):
+(initializeMethods):
+(-[_WKRemoteObjectInterface debugDescription]):
+
+2015-11-09  Anders Carlsson  
+
 Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
 https://bugs.webkit.org/show_bug.cgi?id=151044
 


Modified: trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm (192176 => 192177)

--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm	2015-11-09 21:50:46 UTC (rev 192176)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm	2015-11-09 22:00:31 UTC (rev 192177)
@@ -31,6 +31,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -39,13 +40,20 @@
 const char *_protocol_getMethodTypeEncoding(Protocol *p, SEL sel, BOOL isRequiredMethod, BOOL isInstanceMethod);
 
 @interface NSMethodSignature ()
+- (NSMethodSignature *)_signatureForBlockAtArgumentIndex:(NSInteger)idx;
 - (Class)_classForObjectAtArgumentIndex:(NSInteger)idx;
+- (NSString *)_typeString;
 @end
 
 struct MethodInfo {
 Vector> allowedArgumentClasses;
 
-// FIXME: This should have allowed reply argument classes too.
+struct ReplyInfo {
+NSUInteger replyPosition;
+CString replySignature;
+Vector> allowedReplyClasses;
+};
+Optional replyInfo;
 };
 
 @implementation _WKRemoteObjectInterface {
@@ -77,13 +85,14 @@
 return propertyListClasses;
 }
 
-static void initializeMethod(MethodInfo& methodInfo, NSMethodSignature *methodSignature, bool forReplyBlock)
+static void initializeMethod(MethodInfo& methodInfo, Protocol *protocol, SEL selector, NSMethodSignature *methodSignature, bool forReplyBlock)
 {
 Vector> allowedClasses;
 
 NSUInteger firstArgument = forReplyBlock ? 1 : 2;
 NSUInteger argumentCount = methodSignature.numberOfArguments;
 
+bool foundBlock = false;
 for (NSUInteger i = firstArgument; i < argumentCount; ++i) {
 const char* argumentType = [methodSignature getArgumentTypeAtIndex:i];
 
@@ -93,6 +102,23 @@
 continue;
 }
 
+if (*(argumentType + 1) == '?') {
+if (forReplyBlock)
+[NSException raise:NSInvalidArgumentException format:@"Blocks as arguments to the reply block of method (%s / %s) are not allowed", protocol_getName(protocol), sel_getName(selector)];
+
+if (foundBlock)
+[NSException raise:NSInvalidArgumentException format:@"Only one reply block is allowed per method (%s / %s)", protocol_getName(protocol), sel_getName(selector)];
+foundBlock = true;
+NSMethodSignature *blockSignature = [methodSignature _si

[webkit-changes] [192175] trunk

2015-11-09 Thread commit-queue
Title: [192175] trunk








Revision 192175
Author commit-qu...@webkit.org
Date 2015-11-09 13:25:48 -0800 (Mon, 09 Nov 2015)


Log Message
XHR timeouts should not fire if there is an immediate network error.
https://bugs.webkit.org/show_bug.cgi?id=150577

Patch by Alex Christensen  on 2015-11-09
Reviewed by Darin Adler.

Source/WebCore:

This fixes flakiness of http/tests/contentextensions/async-xhr-onerror.html since r191077.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::internalAbort):
(WebCore::XMLHttpRequest::didFinishLoading):
If the timeout timer has been started and we are going to immediately report a network error, then stop the timeout timer.
The timeout timer sometimes fired before the network error timer if it was a very short timeout (such as 1ms).
Also checks to isActive before calling stop on a timer are not necessary.

LayoutTests:

* platform/mac-wk2/TestExpectations:
http/tests/contentextensions/async-xhr-onerror.html shouldn't be flaky any more.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/xml/XMLHttpRequest.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (192174 => 192175)

--- trunk/LayoutTests/ChangeLog	2015-11-09 21:20:08 UTC (rev 192174)
+++ trunk/LayoutTests/ChangeLog	2015-11-09 21:25:48 UTC (rev 192175)
@@ -1,3 +1,13 @@
+2015-11-09  Alex Christensen  
+
+XHR timeouts should not fire if there is an immediate network error.
+https://bugs.webkit.org/show_bug.cgi?id=150577
+
+Reviewed by Darin Adler.
+
+* platform/mac-wk2/TestExpectations:
+http/tests/contentextensions/async-xhr-onerror.html shouldn't be flaky any more.
+
 2015-11-09  Nan Wang  
 
 AX: Input type: time is not accessible on iOS


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (192174 => 192175)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2015-11-09 21:20:08 UTC (rev 192174)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2015-11-09 21:25:48 UTC (rev 192175)
@@ -283,8 +283,6 @@
 
 webkit.org/b/150736 http/tests/notifications/legacy/events.html [ Pass Crash ]
 
-webkit.org/b/150577 http/tests/contentextensions/async-xhr-onerror.html [ Pass Failure ]
-
 webkit.org/b/150942 animations/multiple-backgrounds.html [ Pass ImageOnlyFailure ]
 
 ### END OF (1) Classified failures with bug reports


Modified: trunk/Source/WebCore/ChangeLog (192174 => 192175)

--- trunk/Source/WebCore/ChangeLog	2015-11-09 21:20:08 UTC (rev 192174)
+++ trunk/Source/WebCore/ChangeLog	2015-11-09 21:25:48 UTC (rev 192175)
@@ -1,3 +1,20 @@
+2015-11-09  Alex Christensen  
+
+XHR timeouts should not fire if there is an immediate network error.
+https://bugs.webkit.org/show_bug.cgi?id=150577
+
+Reviewed by Darin Adler.
+
+This fixes flakiness of http/tests/contentextensions/async-xhr-onerror.html since r191077.
+
+* xml/XMLHttpRequest.cpp:
+(WebCore::XMLHttpRequest::createRequest):
+(WebCore::XMLHttpRequest::internalAbort):
+(WebCore::XMLHttpRequest::didFinishLoading):
+If the timeout timer has been started and we are going to immediately report a network error, then stop the timeout timer.
+The timeout timer sometimes fired before the network error timer if it was a very short timeout (such as 1ms).
+Also checks to isActive before calling stop on a timer are not necessary.
+
 2015-11-09  Eric Carlson  
 
 [MediaStream] Add mock audio and video sources


Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (192174 => 192175)

--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2015-11-09 21:20:08 UTC (rev 192174)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2015-11-09 21:25:48 UTC (rev 192175)
@@ -781,8 +781,10 @@
 // a request is in progress because we need to keep the listeners alive,
 // and they are referenced by the _javascript_ wrapper.
 setPendingActivity(this);
-if (!m_loader)
+if (!m_loader) {
+m_timeoutTimer.stop();
 m_networkErrorTimer.startOneShot(0);
+}
 } else {
 InspectorInstrumentation::willLoadXHRSynchronously(scriptExecutionContext());
 ThreadableLoader::loadResourceSynchronously(scriptExecutionContext(), request, *this, options);
@@ -829,8 +831,7 @@
 
 m_decoder = nullptr;
 
-if (m_timeoutTimer.isActive())
-m_timeoutTimer.stop();
+m_timeoutTimer.stop();
 
 if (!m_loader)
 return true;
@@ -1121,8 +1122,7 @@
 m_responseEncoding = String();
 m_decoder = nullptr;
 
-if (m_timeoutTimer.isActive())
-m_timeoutTimer.stop();
+m_timeoutTimer.stop();
 
 if (hadLoader)
 dropProtection();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192174] trunk/Source/WebCore

2015-11-09 Thread eric . carlson
Title: [192174] trunk/Source/WebCore








Revision 192174
Author eric.carl...@apple.com
Date 2015-11-09 13:20:08 -0800 (Mon, 09 Nov 2015)


Log Message
[MediaStream] Add mock audio and video sources
https://bugs.webkit.org/show_bug.cgi?id=150997


Reviewed by Jer Noble.

Create basic mock audio and video realtime media source classes so we can test MediaStream
API without requiring test machines to have audio/video input hardware. No new tests added
yet, thoe will follow.

No new tests, these changes will allow us to write MediaStream tests.

* CMakeLists.txt: Add MockRealtimeAudioSource.cpp, MockRealtimeMediaSource.cpp, and
  MockRealtimeVideoSource.cpp

* PlatformMac.cmake: Add MockRealtimeVideoSourceMac.mm

* WebCore.xcodeproj/project.pbxproj: Add new files.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Don't set autoresizingMask,
  it isn't necessary.

* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::refreshCaptureDeviceList): AVCaptureDevice -> getAVCaptureDeviceClass()
(WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Ditto.
(WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto.

Mac class implements RealtimeVideoSource::platformLayer, returns a CALayer which uses the
GraphicsContext as contents.
* platform/mediastream/mac/MockRealtimeVideoSourceMac.h: Added.
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: Added.
(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac):
(WebCore::MockRealtimeVideoSourceMac::platformLayer):
(WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer):

Mock audio source. Doesn't provide data yet, only provides states and capabilities.
* platform/mock/MockRealtimeAudioSource.cpp: Added.
(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::updateStates):
(WebCore::MockRealtimeAudioSource::initializeCapabilities):
* platform/mock/MockRealtimeAudioSource.h: Added.
(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):

Mock source base class, sets persistent ID and updates states and capabilities.
* platform/mock/MockRealtimeMediaSource.cpp: Added.
(WebCore::MockRealtimeMediaSource::mockAudioPersistentID):
(WebCore::MockRealtimeMediaSource::mockVideoPersistentID):
(WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource):
(WebCore::MockRealtimeMediaSource::capabilities):
(WebCore::MockRealtimeMediaSource::states):
* platform/mock/MockRealtimeMediaSource.h: Added.
(WebCore::MockRealtimeMediaSource::mockAudioSourcePersistentID):
(WebCore::MockRealtimeMediaSource::mockAudioSourceName):
(WebCore::MockRealtimeMediaSource::mockVideoSourcePersistentID):
(WebCore::MockRealtimeMediaSource::mockVideoSourceName):
(WebCore::MockRealtimeMediaSource::trackSourceWithUID):
(WebCore::MockRealtimeMediaSource::~MockRealtimeMediaSource):
(WebCore::MockRealtimeMediaSource::currentStates):
(WebCore::MockRealtimeMediaSource::constraints):

Use new mock source classes. Create a new source instance for each request instead of reusing the
same sources each time.
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::mockSourceMap):
(WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter):
(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
(WebCore::MockSource::MockSource): Deleted.
(WebCore::MockSource::~MockSource): Deleted.
(WebCore::MockSource::capabilities): Deleted.
(WebCore::MockSource::states): Deleted.
(WebCore::mockAudioSourceID): Deleted.
(WebCore::mockVideoSourceID): Deleted.
(WebCore::initializeMockSources): Deleted.

Mock video source. Generate bip-bop inspired frames with burned in state information.
* platform/mock/MockRealtimeVideoSource.cpp: Added.
(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::startProducingData):
(WebCore::MockRealtimeVideoSource::stopProducingData):
(WebCore::MockRealtimeVideoSource::elapsedTime):
(WebCore::MockRealtimeVideoSource::updateStates):
(WebCore::MockRealtimeVideoSource::initializeCapabilities):
(WebCore::MockRealtimeVideoSource::setFacingMode):
(WebCore::MockRealtimeVideoSource::setFrameRate):
(WebCore::MockRealtimeVideoSource::setSize):
(WebCore::MockRealtimeVideoSource::drawAnimation):
(WebCore::MockRealtimeVideoSource::drawBoxes):
(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::generateFrame):
(WebCore::MockRealtimeVideoSource::imageBuffer):
(WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext):
(WebCore::MockRealtimeVideoSource::currentFrameImage):
* platform/mock/MockRealtimeVideoSource.h: Added.
(WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSou

[webkit-changes] [192173] trunk

2015-11-09 Thread n_wang
Title: [192173] trunk








Revision 192173
Author n_w...@apple.com
Date 2015-11-09 13:16:14 -0800 (Mon, 09 Nov 2015)


Log Message
AX: Input type: time is not accessible on iOS
https://bugs.webkit.org/show_bug.cgi?id=150984

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed input type: time as popup button on iOS.

Test: accessibility/ios-simulator/input-type-time.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests:

* accessibility/ios-simulator/input-type-time-expected.txt: Added.
* accessibility/ios-simulator/input-type-time.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp


Added Paths

trunk/LayoutTests/accessibility/ios-simulator/input-type-time-expected.txt
trunk/LayoutTests/accessibility/ios-simulator/input-type-time.html




Diff

Modified: trunk/LayoutTests/ChangeLog (192172 => 192173)

--- trunk/LayoutTests/ChangeLog	2015-11-09 20:29:54 UTC (rev 192172)
+++ trunk/LayoutTests/ChangeLog	2015-11-09 21:16:14 UTC (rev 192173)
@@ -1,3 +1,13 @@
+2015-11-09  Nan Wang  
+
+AX: Input type: time is not accessible on iOS
+https://bugs.webkit.org/show_bug.cgi?id=150984
+
+Reviewed by Chris Fleizach.
+
+* accessibility/ios-simulator/input-type-time-expected.txt: Added.
+* accessibility/ios-simulator/input-type-time.html: Added.
+
 2015-11-09  Jiewen Tan  
 
 Null dereference loading Blink layout test editing/inserting/insert-html-crash-01.html


Added: trunk/LayoutTests/accessibility/ios-simulator/input-type-time-expected.txt (0 => 192173)

--- trunk/LayoutTests/accessibility/ios-simulator/input-type-time-expected.txt	(rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/input-type-time-expected.txt	2015-11-09 21:16:14 UTC (rev 192173)
@@ -0,0 +1,12 @@
+
+This tests that input type: time is accessible on iOS.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS timeinput.description is 'AXLabel: (Between: 07:00 AM-09:00 AM)'
+PASS timeinput.isIgnored is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/accessibility/ios-simulator/input-type-time.html (0 => 192173)

--- trunk/LayoutTests/accessibility/ios-simulator/input-type-time.html	(rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/input-type-time.html	2015-11-09 21:16:14 UTC (rev 192173)
@@ -0,0 +1,33 @@
+
+
+
+
+var successfullyParsed = false;
+
+
+
+
+
+
+

+
+ +