Begin moving off of TypeTraits.h
https://bugs.webkit.org/show_bug.cgi?id=121006

Reviewed by Darin Adler.

Source/JavaScriptCore:

Convert uses of WTF type traits to STL type traits.

* heap/PassWeak.h:
* runtime/JSCell.h:
(JSC::jsCast):
(JSC::jsDynamicCast):
* runtime/WriteBarrier.h:
(JSC::validateCell):

Source/WebKit2:

Convert uses of WTF type traits to STL type traits.

* Platform/CoreIPC/ArgumentCoder.h:
* Platform/CoreIPC/ArgumentCoders.h:
* Platform/CoreIPC/ArgumentDecoder.h:
* Platform/CoreIPC/ArgumentEncoder.h:
* Platform/CoreIPC/Arguments.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toImpl):

Source/WTF:

The C++11 has its own type traits implementation that is more complete and handles corner cases better
since it ties into the compiler. Begin switching uses of WTF type traits to STL type traits.

* wtf/CheckedArithmetic.h:
* wtf/HashTraits.h:
* wtf/NeverDestroyed.h:
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
(WTF::adoptPtr):
* wtf/RetainPtr.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Preparing WebCore to receive Nix Port
https://bugs.webkit.org/show_bug.cgi?id=118326

Reviewed by Eric Carlson.

Only adding the compilation directives that are Nix specific, in the
existent WebCore files

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::defaultObjectContentType):
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/RunLoop.h:
* platform/Widget.h:
* platform/audio/FFTFrame.h:
* platform/audio/HRTFElevation.cpp:
* platform/cairo/WidgetBackingStore.h:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/OpenGLShims.h:
* platform/graphics/PlatformLayer.h:
* platform/graphics/cairo/GLContext.cpp:
(WebCore::GLContext::createContextForWindow):
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::reshape):
* platform/graphics/texmap/TextureMapper.h:
* plugins/PluginPackage.cpp:
* plugins/PluginView.cpp:
(WebCore::PluginView::PluginView):
* plugins/PluginView.h:
* plugins/PluginViewNone.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Nix upstreaming - Adding stubs and Nix specific platform files
https://bugs.webkit.org/show_bug.cgi?id=118358

Reviewed by Benjamin Poulain.

Basically adding all files that have "Nix" in their names and
are related to WebCore module.

Source/WebCore:

No new tests. They will be uploaded on another patch during the
upstreaming process.

* css/mediaControlsNix.css: Added.
* css/mediaControlsNixFullscreen.css: Added.
* page/nix/EventHandlerNix.cpp: Added.
* platform/graphics/egl/GLContextFromCurrentEGL.cpp: Added.
* platform/graphics/egl/GLContextFromCurrentEGL.h: Added.
* platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Added.
* platform/graphics/nix/IconNix.cpp: Added.
* platform/graphics/nix/ImageNix.cpp: Added.
* platform/nix/CursorNix.cpp: Added.
* platform/nix/DragDataNix.cpp: Added.
* platform/nix/DragImageNix.cpp: Added.
* platform/nix/GamepadsNix.cpp: Added.
* platform/nix/LanguageNix.cpp: Added.
* platform/nix/LocalizedStringsNix.cpp: Added.
* platform/nix/NixKeyboardUtilities.cpp: Added.
* platform/nix/NixKeyboardUtilities.h: Added.
* platform/nix/PasteboardNix.cpp: Added.
* platform/nix/PlatformKeyboardEventNix.cpp: Added.
* platform/nix/PlatformScreenNix.cpp: Added.
* platform/nix/SoundNix.cpp: Added.
* platform/nix/WidgetNix.cpp: Added.
* platform/text/nix/TextBreakIteratorInternalICUNix.cpp: Added.

Source/WTF:

* wtf/nix/FeatureDefinesNix.h: Added.
* wtf/nix/PlatformNix.h: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Assertion failure in WebCore::Page::checkSubframeCountConsistency when going back
https://bugs.webkit.org/show_bug.cgi?id=119781

Reviewed by Alexey Proskuryakov.

Source/WebCore:

We should pair restoring a cached frame and adding it to FrameTree so that
actual added frame count in FrameTree keeps same with restored frame count.
Otherwise assert failure occurs in Page::CheckSubframeCountConsistency.
We have added cached frames to FrameTree ahead and then restored them by tree travelsal.
But this way doesn't guarantee subframecount of Page and the number of child of FrameTree are equal.
In addition, we still make sure that adding a cached frame to FrameTree should happen
before opening it. Because FrameTree might be used while restoring a cached page.

Test: fast/history/go-back-to-iframe-with-plugin.html

* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::open):

LayoutTests:

To verify this fix, we need to use the CachedPage in WK2 debug mode.
And the test page should have at least one iframe with plugin.

* fast/history/go-back-to-iframe-with-plugin-expected.txt: Added.
* fast/history/go-back-to-iframe-with-plugin.html: Added.
* fast/history/resources/subframe-with-plugin.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Moving Add/Remove track from WebMediaStreamCenterClient to WebMediaStream
https://bugs.webkit.org/show_bug.cgi?id=120872

Reviewed by Jer Noble.

Merge https://chromium.googlesource.com/chromium/blink/+/7d740fd27c1f345b59c846df01c3adce53c18e6e
Simple cleanup that makes the API cleaner.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::removeRemoteTrack):
* platform/mediastream/MediaStreamCenter.cpp:
* platform/mediastream/MediaStreamCenter.h:
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeAudioComponent):
(WebCore::MediaStreamDescriptor::addRemoteTrack):
(WebCore::MediaStreamDescriptor::removeRemoteTrack):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fix build.

* Modules/encryptedmedia/MediaKeySession.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Stop means stop
https://bugs.webkit.org/show_bug.cgi?id=120873

Reviewed by Jer Noble.

Merge blink https://chromium.googlesource.com/chromium/blink/+/9a97b0f3892320fa5741485e06a78183b77c3635
by Tommy Widenflycht.

Removing notification functionality from MediaStreamTrack::stop because the world is being torn down.

No new tests, the original author was unable to come up with a reliable test case.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::stop): Don't call didEndTrack, the world is going away.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of isBlockFlowFlexBoxOrGrid().
https://bugs.webkit.org/show_bug.cgi?id=120897

Convert all callers and get rid of this method.

Reviewed by Beth Dakin.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::getInlineBoxAndOffset):
(WebCore::Position::primaryDirection):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
* editing/Editor.cpp:
(WebCore::Editor::baseWritingDirectionForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::caretRenderer):
* editing/TextIterator.cpp:
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::makeEditableRootEmpty):
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::collapseMargins):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::findFirstLetterBlock):
(WebCore::shouldCheckLines):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
(WebCore::RenderBox::positionForPoint):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeRectForRepaint):
(WebCore::RenderObject::styleWillChange):
(WebCore::firstLineStyleForCachedUncachedType):
* rendering/RenderObject.h:
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
* rendering/RenderView.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for BeforeUnloadEvent interface
https://bugs.webkit.org/show_bug.cgi?id=120849

Reviewed by Darin Adler.

Source/WebCore:

Add support for BeforeUnloadEvent as per the specification:
http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent

BeforeUnloadEvent has a returnValue attribute. Setting returnValue to a non-empty
string in an event handler causes the user agent should ask the user to confirm
that they wish to unload the document. This is equivalent to returning a non-empty
string in the EventHandler:
http://www.whatwg.org/specs/web-apps/current-work/#onbeforeunloadeventhandler

BeforeUnloadEvent and returnValue are already supported by IE and Firefox. Previously,
WebKit was passing a base Event type to the beforeunload event handlers instead of
a BeforeUnloadEvent.

Note that this patch keeps support for the legacy Event.returnValue attribute. This used
to be an IE extension but this is no longer supported by IE (nor Firefox). The standard
preventDefault() should be used instead however (supported in IE >= 9).

Test: fast/events/before-unload-returnValue.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* dom/BeforeUnloadEvent.cpp:
(WebCore::BeforeUnloadEvent::isBeforeUnloadEvent):
(WebCore::BeforeUnloadEvent::~BeforeUnloadEvent):
* dom/BeforeUnloadEvent.h:
(WebCore::BeforeUnloadEvent::create):
(WebCore::BeforeUnloadEvent::returnValue):
(WebCore::BeforeUnloadEvent::setReturnValue):
(WebCore::toBeforeUnloadEvent):
* dom/BeforeUnloadEvent.idl: Added.
* dom/Event.cpp:
(WebCore::Event::isBeforeUnloadEvent):
* dom/Event.h:
(WebCore::Event::legacyReturnValue):
(WebCore::Event::setLegacyReturnValue):
* dom/Event.idl:
* dom/EventNames.in:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleBeforeUnloadEvent):

LayoutTests:

Add layout test for validate support for the BeforeUnloadEvent.
Also rebaseline fast/js/global-constructors-attributes.html as
BeforeUnloadEvent is now exposed on the global Window object.

* fast/events/before-unload-returnValue-expected.txt: Added.
* fast/events/before-unload-returnValue.html: Added.
* fast/js/global-constructors-attributes-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-expected.txt:
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move logical(Left|Right)FloatOffsetForLine methods into FloatingObjects
https://bugs.webkit.org/show_bug.cgi?id=120705

Reviewed by Sam Weinig.

These are the only consumers of the CalculateFloatOffsetAdapter and
the placed floats tree, so it will allow us to reduce the public
interface of FloatingObjects and make the placed floats tree private.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
(WebCore::RenderBlock::FloatingObjects::logicalLeftOffset):
(WebCore::RenderBlock::FloatingObjects::logicalRightOffset):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObjects::placedFloatsTree):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change some remaining fast/* files to use pre and post js files in LayoutTests/resources.
https://bugs.webkit.org/show_bug.cgi?id=120899.

Rubber stamped by Filip Pizlo.

* fast/dom/Element/scroll-width-hidden.html:
* fast/dom/Element/scroll-width-visible.html:
* fast/dom/HTMLInputElement/input-line-height.html:
* fast/dom/processing-instruction-inherit-characterdata.xhtml:
* fast/events/before-unload-returnValue.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make RenderView anonymous
https://bugs.webkit.org/show_bug.cgi?id=121013

Reviewed by Darin Adler and Dave Hyatt.

RenderView is currently the only renderer that has an associated Node that is not either Element or Text.
By making it anonymous (not have associated node, RenderView::node() returns null) we will be able to 
significantly tighten typing in both render and DOM trees.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::node):
        
    We need to grab document() instead of node() in a few places for RenderViews to keep existing code
    behaving like it did.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
        
    Don't tell inspector that the root layer is anonymous for now to avoid changing behavior.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeForHitTest):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::canBeProgramaticallyScrolled):
        
    The old non-virtual RenderView test renderer->node == &renderer->document() does not work anymore.
    Switch to isRenderView() which is now non-virtual in a number of places.

(WebCore::RenderBox::canAutoscroll):
(WebCore::RenderBox::findAutoscrollable):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderReplaced):
(WebCore::RenderObject::isAnonymousBlock):
        
    RenderView is anonymous but not a CSS anonymous block.

(WebCore::RenderObject::isText):
(WebCore::RenderObject::isRenderView):
        
    Make isRenderView non-virtual since it is now hot. Reuse existing bits.

(WebCore::RenderObject::setIsText):
(WebCore::RenderObject::setIsRenderView):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeSelection):
* rendering/RenderView.cpp:
        
    Make anonymous.

(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155370 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Add myself as a committer.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] 32-bit builder should run the JSC tests
https://bugs.webkit.org/show_bug.cgi?id=119215

Reviewed by Philippe Normand.

Rename the TestClass member of the TestFactory and BuildAndTestFactory classes
to a more descriptive name, 'LayoutTestClass'. In these two factory classes, the layout testing-specific
steps are only added if the LayoutTestClass member was not overridden to the value of None in a
derived class.

Remove the BuildAndAPITestFactory class and replace it with the BuildAndNonLayoutTestFactory class that
is derived from the BuildAndTestFactory class and overrides the LayoutTestClass member to the value of None.
This allows for builders of the BuildAndNonLayoutTest type to run all but the layout tests. This type
is currently used by the GTK 32-bit builder - there's at the moment no interest to have the builder cover
layout testing while other types of testing are still expected to be performed.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(BuildFactory.__init__):
(TestFactory):
(TestFactory.__init__):
(BuildAndTestFactory):
(BuildAndTestFactory.__init__):
(BuildAndTestWebKit2Factory):
(BuildAndTestWebKit2OnlyFactory):
(BuildAndNonLayoutTestFactory):
(TestLeaksFactory):
(TestWebKit2Factory):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[webkitpy] Remove the DeprecatedPort class
https://bugs.webkit.org/show_bug.cgi?id=121030

Reviewed by Ryosuke Niwa.

Remove the remaining uses of DeprecatedPort, folding its functionality into the Port class.

The various methods returning commands are moved from the DeprecatedPort class into the Port class,
with the Port subclasses overriding specific methods as required.

* Scripts/webkitpy/common/config/ports.py: Removed.
* Scripts/webkitpy/common/config/ports_mock.py: Removed.
* Scripts/webkitpy/common/config/ports_unittest.py: Removed.
* Scripts/webkitpy/port/base.py:
(Port.tooling_flag): This method returns the command line argument that corresponds to the type of the port.
It's formatted as '--port=port_name', where port_name is the port's name that's additionally appended the '-wk2'
string if the port instance represents the WK2 variation of the port.
(Port.script_shell_command): Moved here from the DeprecatedPort interface.
(Port.make_args): Ditto.
(Port.update_webkit_command): Ditto.
(Port.check_webkit_style_command): Ditto.
(Port.prepare_changelog_command): Ditto.
(Port.build_webkit_command): Ditto.
(Port.run_javascriptcore_tests_command): Ditto.
(Port.run_webkit_unit_tests_command): Ditto.
(Port.run_webkit_tests_command): Ditto.
(Port.run_python_unittests_command): Ditto.
(Port.run_perl_unittests_command): Ditto.
(Port.run_bindings_tests_command): Ditto.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_build_webkit_command): Add a test for the Port.build_webkit_command() method that tests correct
return value with different build types passed to the method.
* Scripts/webkitpy/port/efl.py:
(EflPort.build_webkit_command): Override the Port.build_webkit_command() method, appending the necessary options
to the command line.
* Scripts/webkitpy/port/efl_unittest.py:
(EflPortTest.test_commands): A thorough test of return values for all the new methods, for both the WK1 and WK2
variations of the EflPort class.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.build_webkit_command): Override the Port.build_webkit_command() method, appending the necessary options
to the command line.
(GtkPort.run_webkit_tests_command): Ditto for Port.run_webkit_tests_command().
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_commands): A thorough test of return values for all the new methods, for both the WK1
and WK2 variations of the GtkPort class.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_commands): A thorough test of return values for all the new methods, for both the WK1 and WK2
variations of the MacPort class.
* Scripts/webkitpy/port/qt.py:
(QtPort.build_webkit_command): Override the Port.build_webkit_command() method, appending the necessary options
to the command line.
(QtPort.run_webkit_tests_command): Ditto for Port.run_webkit_tests_command().
* Scripts/webkitpy/port/qt_unittest.py:
(QtPortTest.test_commands): A thorough test of return values for all the new methods, for both the WK1 and WK2
variations of the QtPort class.
* Scripts/webkitpy/port/test.py:
(TestPort.make_args): Return a mock value that's intended for testing.
(TestPort.check_webkit_style_command): Return the script's name prepended with 'mock-'.
(TestPort.update_webkit_command): Ditto.
(TestPort.build_webkit_command): Ditto.
(TestPort.prepare_changelog_command): Ditto.
(TestPort.run_python_unittests_command): Ditto.
(TestPort.run_perl_unittests_command): Ditto.
(TestPort.run_javascriptcore_tests_command): Ditto.
(TestPort.run_webkit_unit_tests_command): Ditto.
(TestPort.run_webkit_tests_command): Ditto.
(TestPort.run_bindings_tests_command): Ditto.
* Scripts/webkitpy/tool/bot/flakytestreporter.py:
(FlakyTestReporter.__init__): WebKitPatch.port() should be called now.
* Scripts/webkitpy/tool/bot/irc_command.py:
(Rollout._update_working_copy): Ditto.
* Scripts/webkitpy/tool/commands/download_unittest.py:
(DownloadCommandsTest.test_land_cowhand): Fix a typo, javacriptcore -> javascriptcore.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.run_command): Use the tooling flag as provided by the Port interface.
* Scripts/webkitpy/tool/commands/queues.py:
(PatchProcessingQueue.begin_work_queue): Remove the use of the DeprecatedPort. Create the port that will be used
by the PatchProcessingQueue through the tool's port factory, and also pass it to the tool, keeping the nasty
abstraction violation.
(CommitQueue.run_command): Use the tooling flag as provided by the Port interface.
* Scripts/webkitpy/tool/main.py:
(WebKitPatch.__init__): self._deprecated_port -> self._port.
(WebKitPatch.port): Replaces the WebKitPatch.deprecated_port() method, returns self._port.
(WebKitPatch.handle_global_options): Create the Port object through the PortFactory.
* Scripts/webkitpy/tool/mocktool.py:
(MockTool.__init__): self._deprecated_port -> self._port. The TestPort object also has its name method overridden
to return 'MockPort', as many output comparisons rely on the MockPort name. These should all be replaced later, in
a separate patch.
(MockTool.port): Mimicks WebKitPatch.port().
* Scripts/webkitpy/tool/steps/build.py:
(Build.build): WebKitPatch.port() should be called now.
* Scripts/webkitpy/tool/steps/checkstyle.py:
(CheckStyle.run): Ditto.
* Scripts/webkitpy/tool/steps/commit.py:
(Commit._check_test_expectations): Ditto.
* Scripts/webkitpy/tool/steps/preparechangelog.py:
(PrepareChangeLog.run): Ditto.
* Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
(PrepareChangeLogForRevert.run): Ditto.
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run): Ditto.
* Scripts/webkitpy/tool/steps/runtests_unittest.py:
(RunTestsTest.test_webkit_run_unit_tests): The unnecessary methods should now be overridden on MockTool._port.
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest.test_runtests_args): Remove the MockTool._deprecated_port override, but don't replace it. Rather than
that the expected test output is adjusted to contain the mock-* command names.
* Scripts/webkitpy/tool/steps/update.py:
(Update._update_command): WebKitPatch.port() should be called now.
* Scripts/webkitpy/tool/steps/update_unittest.py:
(UpdateTest.test_update_command_non_interactive): Override the MockTool._port for testing purposes with the port
that corresponds to the removed DeprecatedPort subclasses.
(UpdateTest.test_update_command_interactive): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hide node() below RenderLayerModelObject, use element() instead
https://bugs.webkit.org/show_bug.cgi?id=121038

Reviewed by Dave Hyatt.

Switch all call sites to element(). Remove now unnecessary casts, type checks and dead code.
Make constructors below RenderLayerModelObject take an Element instead of a ContainerNode.
        
This also removes a branch from many hasTagName() and isFooElement() calls.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::startOfContinuations):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::titleUIElement):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObjectForSection):
* editing/markup.cpp:
(WebCore::highestAncestorToWrapMarkup):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::cellAbove):
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderThumb::updateAppearance):
(WebCore::RenderSliderContainer::computeLogicalHeight):
(WebCore::RenderSliderContainer::layout):
* page/Frame.cpp:
(WebCore::Frame::frameForWidget):
* rendering/RenderBlock.cpp:
(WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::clone):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::isSelectionRoot):
(WebCore::RenderBlock::nodeForHitTest):
(WebCore::RenderBlock::hasLineIfEmpty):
(WebCore::RenderBlock::addFocusRingRects):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::addOverflowFromInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox):
(WebCore::RenderBox::updateFromStyle):
(WebCore::RenderBox::scroll):
(WebCore::RenderBox::logicalScroll):
(WebCore::RenderBox::canBeProgramaticallyScrolled):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::paintCustomHighlight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
(WebCore::RenderBox::localCaretRect):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::RenderBoxModelObject):
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
(WebCore::RenderButton::canHaveGeneratedChildren):
* rendering/RenderButton.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObject::layout):
(WebCore::RenderEmbeddedObject::viewCleared):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::updateFromElement):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
(WebCore::RenderFileUploadControl::uploadButton):
(WebCore::RenderFileUploadControl::fileTextValue):
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::edgeInfo):
(WebCore::RenderFrame::viewCleared):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::frameSet):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::requiresLayer):
(WebCore::RenderHTMLCanvas::paintReplaced):
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::isSeamless):
(WebCore::RenderIFrame::flattenFrame):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::paintAreaElementFocusRing):
(WebCore::RenderImage::areaElementFocusChanged):
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::nodeAtPoint):
(WebCore::RenderImage::updateAltText):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clone):
(WebCore::RenderInline::hitTestCulledInline):
(WebCore::RenderInline::updateHitTestResult):
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
(WebCore::RenderLayer::name):
(WebCore::RenderLayer::isTransparent):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::resize):
(WebCore::RenderLayer::filterNeedsRepaint):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameContentsCompositor):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::notifyFinished):
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
(WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::RenderLayerModelObject):
* rendering/RenderLayerModelObject.h:
(WebCore::RenderLayerModelObject::element):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::selectElement):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::scrollTo):
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderListItem.cpp:
(WebCore::isList):
(WebCore::enclosingList):
(WebCore::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::RenderListItem::setExplicitValue):
(WebCore::RenderListItem::clearExplicitValue):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::marqueeSpeed):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::mediaElement):
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaControlTimelineContainer::layout):
(WebCore::RenderTextTrackContainerElement::layout):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::selectElement):
(WebCore::RenderMenuList::valueChanged):
(WebCore::RenderMenuList::createScrollbar):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::meterElement):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::requiresAcceleratedCompositing):
(WebCore::RenderPart::embeddedContentBox):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::progressElement):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::positionForPoint):
(WebCore::RenderReplaced::isSelected):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::autosaveName):
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::layout):
(WebCore::RenderSlider::inDragMode):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::plugInImageElement):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):
(WebCore::RenderTableCell::updateColAndRowSpanFlags):
(WebCore::RenderTableCell::colSpanOrRowSpanChanged):
(WebCore::RenderTableCell::computePreferredLogicalWidths):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::updateFromElement):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textFormControlElement):
(WebCore::RenderTextControl::adjustInnerTextStyle):
(WebCore::RenderTextControl::updateFromElement):
(WebCore::RenderTextControl::layoutSpecialExcludedChild):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
(WebCore::RenderTextControlMultiLine::nodeAtPoint):
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
(WebCore::RenderTextControlSingleLine::inputElement):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::updateIntrinsicSize):
(WebCore::RenderVideo::videoElement):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::updateWidgetPosition):
(WebCore::RenderWidget::nodeAtPoint):
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::updateFromElement):
(WebCore::RenderMathMLFenced::createMathMLOperator):
(WebCore::RenderMathMLFenced::styleDidChange):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::createGlyph):
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::updateFromElement):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::layout):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
(WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::paintReplaced):
(WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
(WebCore::RenderSVGRoot::nodeAtPoint):
(WebCore::RenderSVGRoot::hasRelativeDimensions):
(WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
(WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::layoutPath):
(WebCore::RenderSVGTextPath::startOffset):
(WebCore::RenderSVGTextPath::exactAlignment):
(WebCore::RenderSVGTextPath::stretchMethod):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix GTK build.
        
Not reviewed.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move layoutBlock and layoutBlockChildren into RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=121036

Reviewed by Dean Jackson.

Move layoutBlock into RenderBlockFlow and make the base class version of
the method ASSERT_NOT_REACHED. Begin the process of moving block layout 
into RenderBlockFlow by putting layoutBlockChildren there as well.
        
This patch also puts clearFloats into RenderBlockFlow and just ditches the
SVG-specific forceLayoutInlineChildren by letting RenderSVGText do what it
needs in its own file.

Convert RenderListBox to be a RenderBlockFlow, since this is necessary for it
to get the correct layoutBlock method.
        
Patch RenderRegion to call RenderBlockFlow::layoutBlock rather than RenderBlock::layoutBlock.
        
Fix run-ins so that they create block flows rather than blocks, and restrict run-ins to
only be block flows.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChildren):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutInlineChildren):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::layout):
(WebCore::RenderListBox::paintObject):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::nodeAtPoint):
* rendering/RenderListBox.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::paintObject):
(WebCore::RenderRegion::styleDidChange):
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::insertedIntoTree):
(WebCore::RenderRegion::willBeRemovedFromTree):
(WebCore::RenderRegion::computeIntrinsicLogicalWidths):
(WebCore::RenderRegion::computePreferredLogicalWidths):
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Internals should always cause a layout before calling into TextIterator
https://bugs.webkit.org/show_bug.cgi?id=120891

Reviewed by Antti Koivisto.

Source/WebCore: 

Inspired by https://chromium.googlesource.com/chromium/blink/+/5fee5da7b04a710171c79bd6e87eca3533188e45.

Force a layout in the constructors of TextIterator, and SimplifiedBackwardsTextIterator and remove
superfluous calls to updateLayout() in other places.

As much as I hate for a constructor to have a side effect like this, I couldn't think of a better place
to update the layout. Unfortunately, we're slowly moving away from manually createing TextIterator and
wrapping them in a static function.

* editing/TextIterator.cpp:
(WebCore::TextIterator::TextIterator):
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
(WebCore::TextIterator::rangeFromLocationAndLength):
(WebCore::findPlainText):

LayoutTests: 

Progression.

* platform/mac/editing/input/caret-primary-bidi-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable WebGL for OS X nightlies
https://bugs.webkit.org/show_bug.cgi?id=121040

Reviewed by Beth Dakin.

Source/WebKit/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Set WebPreference to YES.

Source/WebKit2:

* Shared/WebPreferencesStore.h: Set initial value to true.

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