1. 08 Jan, 2014 29 commits
  2. 07 Jan, 2014 11 commits
    • akling@apple.com's avatar
      createAnonymousMathMLBlock() should return RenderPtr. · 16a1aafb
      akling@apple.com authored
      <https://webkit.org/b/126583>
      
      Reviewed by Antti Koivisto.
      
      * rendering/mathml/RenderMathMLBlock.h:
      * rendering/mathml/RenderMathMLBlock.cpp:
      (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):
      
          Make this return a RenderPtr<RenderMathMLBlock> and removed the
          EDisplay argument since it was always using the default (FLEX.)
      
      * rendering/mathml/RenderMathMLFraction.cpp:
      (WebCore::RenderMathMLFraction::addChild):
      
          Updated for the new createAnonymousMathMLBlock() signature.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16a1aafb
    • eric.carlson@apple.com's avatar
      Teach MediaSessionManager to manage interruptions · 1016295d
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126530
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Tests: media/video-interruption-active-when-element-created.html
             media/video-interruption-with-resume-allowing-play.html
             media/video-interruption-with-resume-not-allowing-play.html
      
      * WebCore.exp.in: Export functions needed by Internals.
      
      Add MediaSession and MediaSessionManager.
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      Automatically pause/play for interruptions. Move media restriction management to a MediaSession.
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement): Get rid of m_loadInitiatedByUserGesture and m_userStartedPlayback,
          they aren't needed.
      (WebCore::HTMLMediaElement::load): Ditto.
      (WebCore::HTMLMediaElement::loadInternal): Use the media session to manage restrictions.
      (WebCore::HTMLMediaElement::play): Remove redundant iOS code. Postpone playback if called
          during an interruption.
      (WebCore::HTMLMediaElement::pause): Remember to not resume playback when it ends if called during
          an interruption.
      (WebCore::HTMLMediaElement::potentiallyPlaying): Rearrange code to make it easier to understand.
      (WebCore::HTMLMediaElement::couldPlayIfEnoughData): Ditto.
      (WebCore::HTMLMediaElement::pausedForUserInteraction): Return true if paused because of an interruption.
      (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Be explicit about
          which restrictions are removed.
      (WebCore::HTMLMediaElement::mediaType): MediaSessionManager::<Type> -> MediaSession::<Type>.
      (WebCore::HTMLMediaElement::beginInterruption): New.
      (WebCore::HTMLMediaElement::endInterruption): Ditto.
      * html/HTMLMediaElement.h:
      
      Pulled MediaSessionManagerToken out of MediaSessionManager.cpp, added functionality to manage interruptions.
      * platform/audio/MediaSession.cpp: Added.
      (WebCore::MediaSession::create):
      (WebCore::MediaSession::MediaSession):
      (WebCore::MediaSession::~MediaSession):
      (WebCore::MediaSession::beginInterruption): Inform client of interruption state change.
      (WebCore::MediaSession::endInterruption): Ditto.
      * platform/audio/MediaSession.h: Added.
      
      * platform/audio/MediaSessionManager.cpp:
      (WebCore::MediaSessionManager::MediaSessionManager): Initialize interruption counter.
      (WebCore::MediaSessionManager::has): MediaType is defined in MediaSession.
      (WebCore::MediaSessionManager::count): Ditto.
      (WebCore::MediaSessionManager::beginInterruption): Inform all clients of interruption start if
          not already in an interruption.
      (WebCore::MediaSessionManager::endInterruption): Inform all clients if interruption has ended.
      (WebCore::MediaSessionManager::addSession): Renamed from addToken. Set session interruption state.
      (WebCore::MediaSessionManager::removeSession): Renamed from removeToken.
      * platform/audio/MediaSessionManager.h:
      
      * platform/audio/mac/AudioDestinationMac.cpp:
      (WebCore::AudioDestinationMac::AudioDestinationMac): MediaSessionManagerToken -> MediaSession.
      * platform/audio/mac/AudioDestinationMac.h:
      
      * platform/audio/mac/MediaSessionManagerMac.cpp:
      (MediaSessionManager::updateSessionState): Ditto.
      
      Make it possible for tests to begin and end interruptions.
      * testing/Internals.cpp:
      (WebCore::Internals::beginMediaSessionInterruption):
      (WebCore::Internals::endMediaSessionInterruption):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Source/WebKit:
      
      * CMakeLists.txt: Add ${WEBCORE_DIR}/platform/animation to WebCore include directories.
      
      Source/WebKit2:
      
      * CMakeLists.txt: Add ${WEBCORE_DIR}/platform/animation to WebCore include directories.
      
      LayoutTests:
      
      * media/video-interruption-active-when-element-created-expected.txt: Added.
      * media/video-interruption-active-when-element-created.html: Added.
      * media/video-interruption-with-resume-allowing-play-expected.txt: Added.
      * media/video-interruption-with-resume-allowing-play.html: Added.
      * media/video-interruption-with-resume-not-allowing-play-expected.txt: Added.
      * media/video-interruption-with-resume-not-allowing-play.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1016295d
    • rniwa@webkit.org's avatar
      DoYouEvenBench: Turn BenchmarkRunner into a real class · 4f872c2a
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126613
      
      Reviewed by Stephanie Lewis.
      
      Made BenchmarkRunner an instantiatable class. Made tests.js simply create an array of suite objects
      instead of calling BenchmarkRunner.Suite now that we can have mulitple instances of BenchmarkRunner.
      
      * DoYouEvenBench/benchmark.html:
      (formatTestName): Moved and renamed from BenchmarkRunner._testName.
      (createUIForSuites): Extracted from a giant blob of code.
      (startTest): Ditto.
      * DoYouEvenBench/resources/benchmark-runner.js:
      (BenchmarkRunner): Added.
      (BenchmarkRunner.prototype.waitForElement):
      (BenchmarkRunner.prototype._removeFrame):
      (BenchmarkRunner.prototype._appendFrame):
      (BenchmarkRunner.prototype._waitAndWarmUp):
      (BenchmarkRunner.prototype._runTest):
      (BenchmarkState.prototype.prepareCurrentSuite):
      (BenchmarkRunner.prototype.step):
      (BenchmarkRunner.prototype._runTestAndRecordResults):
      (BenchmarkRunner.prototype._finalize):
      * DoYouEvenBench/resources/tests.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4f872c2a
    • aestes@apple.com's avatar
      [iOS] Clean up some exported headers · 155516be
      aestes@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126403
      
      Reviewed by Simon Fraser.
      
      Public header files that are completely excluded on iOS don't need
      !TARGET_OS_IPHONE guards since they are already listed in
      EXCLUDED_SOURCE_FILE_NAMES.
      
      I also took the opportunity to sort EXCLUDED_SOURCE_FILE_NAMES and to
      clean up some #imports.
      
      * Configurations/WebKit.xcconfig:
      * Misc/WebCache.h:
      * Misc/WebIconDatabasePrivate.h:
      * Misc/WebLocalizableStrings.h:
      * Misc/WebNSEventExtras.h:
      * Misc/WebNSPasteboardExtras.h:
      * Misc/WebNSWindowExtras.h:
      * Panels/WebPanelAuthenticationHandler.h:
      * Plugins/WebPluginsPrivate.h:
      * Storage/WebDatabaseManagerPrivate.h:
      * WebCoreSupport/WebJavaScriptTextInputPanel.h:
      * WebCoreSupport/WebKeyGenerator.h:
      * WebCoreSupport/WebSecurityOriginPrivate.h:
      * WebView/WebDashboardRegion.h:
      * WebView/WebDynamicScrollBarsView.h:
      * WebView/WebFrameView.h:
      * WebView/WebPreferenceKeysPrivate.h:
      * WebView/WebResourceLoadDelegatePrivate.h:
      * WebView/WebView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      155516be
    • jinwoo7.song@samsung.com's avatar
      [EFL][WK2] Fix failing ewk_view_page_contents_get() API test · 64ad4bcc
      jinwoo7.song@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126609
      
      Reviewed by Gyuyoung Kim.
      
      Compare the amount of bytes in the expected result file with
      the size of callback data from the API since the 'Date' field
      and the boundaries will be different on each case.
      Refered the test case of GTK port.
      
      * UIProcess/API/efl/tests/resources/resultMHTML.mht: Added.
      * UIProcess/API/efl/tests/test_ewk2_view.cpp:
      (EWK2ViewTest::PageContentsAsMHTMLCallback):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64ad4bcc
    • seokju@webkit.org's avatar
      Web Inspector: Remove leftover 'device metrics' code · 4a2db1db
      seokju@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=126607
      
      Reviewed by Joseph Pecoraro.
      
      Source/WebCore:
      
      No new tests, No changes in behavior.
      
      Removes unused code related to 'device metrics'.
      
      * css/MediaQueryEvaluator.cpp:
      (WebCore::device_heightMediaFeatureEval):
      (WebCore::device_widthMediaFeatureEval):
      * inspector/InspectorClient.h:
      * inspector/InspectorInstrumentation.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::InspectorPageAgent):
      (WebCore::InspectorPageAgent::disable):
      (WebCore::InspectorPageAgent::didLayout):
      * inspector/InspectorPageAgent.h:
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::innerHeight):
      (WebCore::DOMWindow::innerWidth):
      * page/Screen.cpp:
      (WebCore::Screen::height):
      (WebCore::Screen::width):
      * rendering/TextAutosizer.cpp:
      (WebCore::TextAutosizer::processSubtree):
      
      Source/WebKit/blackberry:
      
      Clean up after removing InspectorClient::overrideDeviceMetrics().
      
      * WebCoreSupport/InspectorClientBlackBerry.cpp:
      * WebCoreSupport/InspectorClientBlackBerry.h:
      
      Source/WebKit/mac:
      
      * WebKit.order: Update after removing InspectorClient::overrideDeviceMetrics().
      
      Source/WebKit2:
      
      * mac/WebKit2.order: Update after removing InspectorClient::overrideDeviceMetrics().
      
      LayoutTests:
      
      * inspector/styles/override-screen-size-expected.txt: Removed.
      * inspector/styles/override-screen-size.html: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a2db1db
    • simon.fraser@apple.com's avatar
      Fix the build. The WebKit2 project copied all of WebKit2/Scripts/webkit2 into... · 8e50f67d
      simon.fraser@apple.com authored
      Fix the build. The WebKit2 project copied all of WebKit2/Scripts/webkit2 into WebKit2.framework/PrivateHeaders,
      but that's bad because there are test result files in there now. Fix by having the project copy specific
      .py files into rivateHeaders/webkit2
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e50f67d
    • bfulgham@apple.com's avatar
      Unreviewed test fix: Correct whitespace around ] · fe8169a1
      bfulgham@apple.com authored
      * platform/mac/TestExpectations: "Debug]" should be "Debug ]"
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe8169a1
    • simon.fraser@apple.com's avatar
      Make it possible for MessageReceivers to pass messages to their superclass,... · 3415cb21
      simon.fraser@apple.com authored
      Make it possible for MessageReceivers to pass messages to their superclass, and use it for RemoteLayerTreeDrawingAreaProxy
      https://bugs.webkit.org/show_bug.cgi?id=126558
      
      Reviewed by Anders Carlsson.
      
      In a message.in file it's now possible to say:
      
      messages -> Subclass : Superclass { ... } and the generated code will
      call Superclass::didReceiveMessage().
      
      Use this to have RemoteLayerTreeDrawingAreaProxy pass messages up to
      DrawingAreaProxy.
      
      * Scripts/webkit2/messages.py:
      (generate_message_handler):
      * Scripts/webkit2/model.py:
      (MessageReceiver.__init__):
      * Scripts/webkit2/parser.py:
      (parse):
      * UIProcess/DrawingAreaProxy.h:
      * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3415cb21
    • simon.fraser@apple.com's avatar
      Add message-generation test for non-legacy message receiver · 3a2b0ceb
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126603
      
      Reviewed by Anders Carlsson.
      
      Add expected output files for a non-legacy message receiver, and add
      testing for same.
      
      * Scripts/webkit2/LegacyMessageReceiver-expected.cpp: Copied from Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp.
      * Scripts/webkit2/LegacyMessages-expected.h: Added.
      * Scripts/webkit2/MessageReceiver-expected.cpp:
      (WebKit::WebPage::didReceiveMessage):
      (WebKit::WebPage::didReceiveSyncMessage):
      * Scripts/webkit2/messages_unittest.py:
      (MessagesTest.setUp):
      (ParsingTest.test_receiver):
      (HeaderTest.test_header):
      (ReceiverImplementationTest.test_receiver_implementation):
      * Scripts/webkit2/test-legacy-messages.in: Copied from Source/WebKit2/Scripts/webkit2/test-messages.in.
      * Scripts/webkit2/test-messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a2b0ceb
    • simon.fraser@apple.com's avatar
      Move expected results out of messages_unittest.py into separate files · e4a887a4
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=126602
      
      Reviewed by Anders Carlsson.
      
      Uninline the test input and output from messages_unittest.py to make
      it easier to add more tests.
      
      * Scripts/webkit2/MessageReceiver-expected.cpp: Added.
      (WebKit::WebPage::didReceiveWebPageMessage):
      (WebKit::WebPage::didReceiveSyncWebPageMessage):
      * Scripts/webkit2/Messages-expected.h: Added.
      * Scripts/webkit2/messages_unittest.py:
      (ParsingTest.test_receiver):
      * Scripts/webkit2/test-messages.in: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4a887a4