1. 24 Jan, 2011 1 commit
    • andersca@apple.com's avatar
      2011-01-24 Anders Carlsson <andersca@apple.com> · 34341a9c
      andersca@apple.com authored
              Reviewed by Dan Bernstein.
      
              Reset the page scale factor on standard frame loads
              https://bugs.webkit.org/show_bug.cgi?id=53058
              <rdar://problem/8908844>
      
              Add a symbol needed by WebKit2.
      
              * WebCore.exp.in:
      2011-01-24  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Reset the page scale factor on standard frame loads
              https://bugs.webkit.org/show_bug.cgi?id=53058
              <rdar://problem/8908844>
      
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::scaleWebView):
              Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
      
              (WebKit::WebPageProxy::viewScaleFactorDidChange):
              Update m_viewScaleFactor.
      
              * UIProcess/WebPageProxy.h:
              Add viewScaleFactorDidChange.
      
              * UIProcess/WebPageProxy.messages.in:
              Add ViewScaleFactorDidChange message.
      
              * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
              (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
              Set the scale factor.
      
              (WebKit::WebFrameLoaderClient::restoreViewState):
              Inform the UI process about the new view scale factor.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::scaleWebView):
              Send a ViewScaleFactorDidChange message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34341a9c
  2. 23 Jan, 2011 1 commit
    • pfeldman@chromium.org's avatar
      2011-01-22 Ilya Tikhonovsky <loislo@chromium.org> · f73e2772
      pfeldman@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: next step in splitting InspectorController.
      
              Splitting InspectorController is a bit tricky process.
      
              As a first step I'll do the next things:
              1) rename existing InspectorController to InspectorAgent;
              2) s/nspectorController/nspectorAgent/g everywhere in WebCore/inspector but InspectorInstrumentation;
              3) create a fake InspectorController derived from the InspectorAgent for the rest of WebCore and WebKit;
      
              The second step is a migration of a small set of functions described in bug 52510 from InspectorAgent to InspectorController.
      
              As far as the second step will have significant changes in the functions' implementation I'll do it as a separate patch.
      
              https://bugs.webkit.org/show_bug.cgi?id=52955
      
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSInjectedScriptHostCustom.cpp:
              (WebCore::JSInjectedScriptHost::nodeForId):
              (WebCore::JSInjectedScriptHost::selectDOMStorage):
              * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
              (WebCore::V8InjectedScriptHost::nodeForIdCallback):
              * inspector/CodeGeneratorInspector.pm:
              * inspector/InjectedScriptHost.cpp:
              (WebCore::InjectedScriptHost::InjectedScriptHost):
              (WebCore::InjectedScriptHost::clearConsoleMessages):
              (WebCore::InjectedScriptHost::databaseForId):
              (WebCore::InjectedScriptHost::selectDatabase):
              (WebCore::InjectedScriptHost::selectDOMStorage):
              (WebCore::InjectedScriptHost::injectedScriptForMainFrame):
              (WebCore::InjectedScriptHost::inspectorDOMAgent):
              (WebCore::InjectedScriptHost::frontend):
              (WebCore::InjectedScriptHost::didCreateWorker):
              (WebCore::InjectedScriptHost::didDestroyWorker):
              * inspector/InjectedScriptHost.h:
              (WebCore::InjectedScriptHost::create):
              (WebCore::InjectedScriptHost::inspectorAgent):
              (WebCore::InjectedScriptHost::disconnectController):
              * inspector/InspectorAgent.cpp: Copied from Source/WebCore/inspector/InspectorController.cpp.
              (WebCore::InspectorAgent::InspectorAgent):
              (WebCore::InspectorAgent::~InspectorAgent):
              (WebCore::InspectorAgent::inspectedPageDestroyed):
              (WebCore::InspectorAgent::enabled):
              (WebCore::InspectorAgent::inspectorStartsAttached):
              (WebCore::InspectorAgent::setInspectorStartsAttached):
              (WebCore::InspectorAgent::setInspectorAttachedHeight):
              (WebCore::InspectorAgent::inspectorAttachedHeight):
              (WebCore::InspectorAgent::searchingForNodeInPage):
              (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
              (WebCore::InspectorAgent::inspect):
              (WebCore::InspectorAgent::focusNode):
              (WebCore::InspectorAgent::highlight):
              (WebCore::InspectorAgent::highlightDOMNode):
              (WebCore::InspectorAgent::highlightFrame):
              (WebCore::InspectorAgent::hideHighlight):
              (WebCore::InspectorAgent::mouseDidMoveOverElement):
              (WebCore::InspectorAgent::handleMousePress):
              (WebCore::InspectorAgent::setInspectorFrontendClient):
              (WebCore::InspectorAgent::didClearWindowObjectInWorld):
              (WebCore::InspectorAgent::setSearchingForNode):
              (WebCore::InspectorAgent::connectFrontend):
              (WebCore::InspectorAgent::show):
              (WebCore::InspectorAgent::showPanel):
              (WebCore::InspectorAgent::close):
              (WebCore::InspectorAgent::disconnectFrontend):
              (WebCore::InspectorAgent::resourceAgent):
              (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
              (WebCore::InspectorAgent::populateScriptObjects):
              (WebCore::InspectorAgent::pushDataCollectedOffline):
              (WebCore::InspectorAgent::restoreDebugger):
              (WebCore::InspectorAgent::restoreProfiler):
              (WebCore::InspectorAgent::unbindAllResources):
              (WebCore::InspectorAgent::didCommitLoad):
              (WebCore::InspectorAgent::mainResourceFiredDOMContentEvent):
              (WebCore::InspectorAgent::mainResourceFiredLoadEvent):
              (WebCore::InspectorAgent::isMainResourceLoader):
              (WebCore::InspectorAgent::willSendRequest):
              (WebCore::InspectorAgent::ensureSettingsLoaded):
              (WebCore::InspectorAgent::startTimelineProfiler):
              (WebCore::InspectorAgent::stopTimelineProfiler):
              (WebCore::PostWorkerNotificationToFrontendTask::create):
              (WebCore::PostWorkerNotificationToFrontendTask::PostWorkerNotificationToFrontendTask):
              (WebCore::PostWorkerNotificationToFrontendTask::performTask):
              (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
              (WebCore::InspectorAgent::didCreateWorker):
              (WebCore::InspectorAgent::didDestroyWorker):
              (WebCore::InspectorAgent::didOpenDatabase):
              (WebCore::InspectorAgent::getCookies):
              (WebCore::InspectorAgent::buildArrayForCookies):
              (WebCore::InspectorAgent::buildObjectForCookie):
              (WebCore::InspectorAgent::deleteCookie):
              (WebCore::InspectorAgent::didUseDOMStorage):
              (WebCore::InspectorAgent::didCreateWebSocket):
              (WebCore::InspectorAgent::willSendWebSocketHandshakeRequest):
              (WebCore::InspectorAgent::didReceiveWebSocketHandshakeResponse):
              (WebCore::InspectorAgent::didCloseWebSocket):
              (WebCore::InspectorAgent::isRecordingUserInitiatedProfile):
              (WebCore::InspectorAgent::startUserInitiatedProfiling):
              (WebCore::InspectorAgent::stopUserInitiatedProfiling):
              (WebCore::InspectorAgent::profilerEnabled):
              (WebCore::InspectorAgent::enableProfiler):
              (WebCore::InspectorAgent::disableProfiler):
              (WebCore::InspectorAgent::showAndEnableDebugger):
              (WebCore::InspectorAgent::enableDebugger):
              (WebCore::InspectorAgent::disableDebugger):
              (WebCore::InspectorAgent::resume):
              (WebCore::InspectorAgent::setAllBrowserBreakpoints):
              (WebCore::InspectorAgent::evaluateForTestInFrontend):
              (WebCore::InspectorAgent::didEvaluateForTestInFrontend):
              (WebCore::quadToPath):
              (WebCore::drawOutlinedQuad):
              (WebCore::drawOutlinedQuadWithClip):
              (WebCore::drawHighlightForBox):
              (WebCore::drawHighlightForLineBoxesOrSVGRenderer):
              (WebCore::convertFromFrameToMainFrame):
              (WebCore::frameToMainFrameOffset):
              (WebCore::InspectorAgent::drawNodeHighlight):
              (WebCore::InspectorAgent::drawElementTitle):
              (WebCore::InspectorAgent::openInInspectedWindow):
              (WebCore::InspectorAgent::addScriptToEvaluateOnLoad):
              (WebCore::InspectorAgent::removeAllScriptsToEvaluateOnLoad):
              (WebCore::InspectorAgent::setInspectorExtensionAPI):
              (WebCore::InspectorAgent::inspectedURL):
              (WebCore::InspectorAgent::reloadPage):
              (WebCore::InspectorAgent::setExtraHeaders):
              * inspector/InspectorAgent.h: Copied from Source/WebCore/inspector/InspectorController.h.
              (WebCore::InspectorAgent::inspectorBackendDispatcher):
              (WebCore::InspectorAgent::inspectorClient):
              (WebCore::InspectorAgent::injectedScriptHost):
              (WebCore::InspectorAgent::inspectedPage):
              (WebCore::InspectorAgent::hideDOMNodeHighlight):
              (WebCore::InspectorAgent::hideFrameHighlight):
              (WebCore::InspectorAgent::frontend):
              (WebCore::InspectorAgent::inspectorController):
              (WebCore::InspectorAgent::inspectorAgent):
              (WebCore::InspectorAgent::consoleAgent):
              (WebCore::InspectorAgent::cssAgent):
              (WebCore::InspectorAgent::domAgent):
              (WebCore::InspectorAgent::injectedScriptAgent):
              (WebCore::InspectorAgent::runtimeAgent):
              (WebCore::InspectorAgent::timelineAgent):
              (WebCore::InspectorAgent::databaseAgent):
              (WebCore::InspectorAgent::domStorageAgent):
              (WebCore::InspectorAgent::fileSystemAgent):
              (WebCore::InspectorAgent::browserDebuggerAgent):
              (WebCore::InspectorAgent::debuggerAgent):
              (WebCore::InspectorAgent::profilerAgent):
              (WebCore::InspectorAgent::applicationCacheAgent):
              (WebCore::InspectorAgent::hasInspectorFrontendClient):
              (WebCore::InspectorAgent::hasFrontend):
              (WebCore::InspectorAgent::startProfiling):
              (WebCore::InspectorAgent::stopProfiling):
              (WebCore::InspectorAgent::debuggerEnabled):
              (WebCore::InspectorAgent::state):
              (WebCore::InspectorAgent::settings):
              * inspector/InspectorApplicationCacheAgent.cpp:
              (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
              (WebCore::InspectorApplicationCacheAgent::getApplicationCaches):
              * inspector/InspectorApplicationCacheAgent.h:
              * inspector/InspectorBrowserDebuggerAgent.cpp:
              (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
              (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
              (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint):
              (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
              (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
              (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
              (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
              (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
              (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
              (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
              (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
              * inspector/InspectorBrowserDebuggerAgent.h:
              (WebCore::InspectorBrowserDebuggerAgent::create):
              * inspector/InspectorConsoleAgent.cpp:
              (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
              (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
              (WebCore::InspectorConsoleAgent::clearConsoleMessages):
              (WebCore::InspectorConsoleAgent::addMessageToConsole):
              (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
              (WebCore::InspectorConsoleAgent::didReceiveResponse):
              (WebCore::InspectorConsoleAgent::didFailLoading):
              (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
              (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
              (WebCore::InspectorConsoleAgent::addConsoleMessage):
              * inspector/InspectorConsoleAgent.h:
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::InspectorController):
              * inspector/InspectorController.h:
              * inspector/InspectorDatabaseAgent.cpp:
              * inspector/InspectorDebuggerAgent.cpp:
              (WebCore::InspectorDebuggerAgent::create):
              (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
              (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent):
              (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
              (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
              (WebCore::InspectorDebuggerAgent::currentCallFrames):
              * inspector/InspectorDebuggerAgent.h:
              * inspector/InspectorFileSystemAgent.cpp:
              (WebCore::InspectorFileSystemAgentCallbacks::didOpenFileSystem):
              (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
              (WebCore::InspectorFileSystemAgent::stop):
              (WebCore::InspectorFileSystemAgent::getFileSystemPathAsync):
              (WebCore::InspectorFileSystemAgent::didGetFileSystemPath):
              (WebCore::InspectorFileSystemAgent::didGetFileSystemError):
              * inspector/InspectorFileSystemAgent.h:
              (WebCore::InspectorFileSystemAgent::create):
              * inspector/InspectorFrontendHost.cpp:
              (WebCore::InspectorFrontendHost::setExtensionAPI):
              * inspector/InspectorProfilerAgent.cpp:
              (WebCore::InspectorProfilerAgent::create):
              (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
              (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
              (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
              (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
              (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling):
              * inspector/InspectorProfilerAgent.h:
      2011-01-22  Ilya Tikhonovsky  <loislo@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: next step in splitting InspectorController.
      
              #include "InspectorController.h" was added.
      
              https://bugs.webkit.org/show_bug.cgi?id=52955
      
              * WebCoreSupport/InspectorServerQt.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f73e2772
  3. 21 Jan, 2011 2 commits
    • crogers@google.com's avatar
      2011-01-21 Chris Rogers <crogers@google.com> · 181d9870
      crogers@google.com authored
              Reviewed by Darin Fisher.
      
              Add run-time enable support for the web audio API
              https://bugs.webkit.org/show_bug.cgi?id=52741
      
              * public/WebRuntimeFeatures.h:
              * public/WebSettings.h:
              * src/WebRuntimeFeatures.cpp:
              (WebKit::WebRuntimeFeatures::enableWebAudio):
              (WebKit::WebRuntimeFeatures::isWebAudioEnabled):
              * src/WebSettingsImpl.cpp:
              (WebKit::WebSettingsImpl::setWebAudioEnabled):
              * src/WebSettingsImpl.h:
      2011-01-21  Chris Rogers  <crogers@google.com>
      
              Reviewed by Darin Fisher.
      
              Add run-time enable support for the web audio API
              https://bugs.webkit.org/show_bug.cgi?id=52741
      
              * WebPreferenceKeysPrivate.h:
              * WebView.cpp:
              (WebView::notifyPreferencesChanged):
      2011-01-21  Chris Rogers  <crogers@google.com>
      
              Reviewed by Darin Fisher.
      
              Add run-time enable support for the web audio API
              https://bugs.webkit.org/show_bug.cgi?id=52741
      
              * WebView/WebPreferenceKeysPrivate.h:
              * WebView/WebPreferences.mm:
              (-[WebPreferences webAudioEnabled]):
              (-[WebPreferences setWebAudioEnabled:]):
              * WebView/WebPreferencesPrivate.h:
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]):
      2011-01-21  Chris Rogers  <crogers@google.com>
      
              Reviewed by Darin Fisher.
      
              Add run-time enable support for the web audio API
              https://bugs.webkit.org/show_bug.cgi?id=52741
      
              No new tests since audio API is not yet implemented.
      
              * WebCore.exp.in:
              * bindings/generic/RuntimeEnabledFeatures.cpp:
              * bindings/generic/RuntimeEnabledFeatures.h:
              (WebCore::RuntimeEnabledFeatures::setWebkitAudioContextEnabled):
              (WebCore::RuntimeEnabledFeatures::webkitAudioContextEnabled):
              * page/DOMWindow.idl:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setWebAudioEnabled):
              * page/Settings.h:
              (WebCore::Settings::webAudioEnabled):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      181d9870
    • commit-queue@webkit.org's avatar
      2011-01-21 Charlie Reis <creis@chromium.org> · 987fd772
      commit-queue@webkit.org authored
              Reviewed by Darin Fisher.
      
              FrameLoader::checkLoadCompleteForThisFrame uses wrong history item
              https://bugs.webkit.org/show_bug.cgi?id=48812
      
              Test that we avoid updating back/forward list on a canceled navigation
              if a new navigation is already in process.  Also update forward-and-cancel
              to go forward, ensuring back/forward state is reset if user clicks stop.
      
              * http/tests/navigation/back-twice-without-commit-expected.txt: Added.
              * http/tests/navigation/back-twice-without-commit.html: Added.
              * http/tests/navigation/forward-and-cancel-expected.txt:
              * http/tests/navigation/forward-and-cancel.html: Go forward after stop, not back.
              * http/tests/navigation/resources/back-twice-page-2.html: Added.
              * http/tests/navigation/resources/back-twice-page-3.html: Added.
              * http/tests/navigation/resources/forward-and-cancel-frames.html: Reduced delay.
      2011-01-21  Charlie Reis  <creis@chromium.org>
      
              Reviewed by Darin Fisher.
      
              FrameLoader::checkLoadCompleteForThisFrame uses wrong history item
              https://bugs.webkit.org/show_bug.cgi?id=48812
      
              Most calls to stopAllLoaders now clear the history's provisional item(s).
              We can now avoid resetting the back/forward state if a new navigation
              is in progress.
      
              Test: http/tests/navigation/back-twice-without-commit.html
              Test: http/tests/navigation/forward-and-cancel.html
      
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * loader/FrameLoaderTypes.h:
              * WebCore.exp.in: Update stopAllLoaders signature.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      987fd772
  4. 20 Jan, 2011 1 commit
    • bdakin@apple.com's avatar
      Fix for <rdar://problem/8890255> · f76bd26b
      bdakin@apple.com authored
      Reviewed by Geoffrey Garen.
      
      Source/WebCore: 
      
      Allow WebKitSystemInterface to draw scrollbars 
      when appropriate.
      * WebCore.exp.in:
      * platform/mac/ScrollbarThemeMac.mm:
      (WebCore::scrollbarMap):
      (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
      (WebCore::ScrollbarThemeMac::registerScrollbar):
      (WebCore::ScrollbarThemeMac::unregisterScrollbar):
      (WebCore::ScrollbarThemeMac::paint):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      
      Source/WebKit/mac: 
      
      Allow WebKitSystemInterface to draw scrollbars 
      when appropriate.
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      Source/WebKit2: 
      
      Allow WebKitSystemInterface to draw scrollbars 
      when appropriate.
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f76bd26b
  5. 19 Jan, 2011 2 commits
    • simon.fraser@apple.com's avatar
      2011-01-19 Simon Fraser <simon.fraser@apple.com> · c961f41a
      simon.fraser@apple.com authored
              Reviewed by Sam Weinig.
      
              GraphicsLayers in subframes can get sync'd multiple times
              https://bugs.webkit.org/show_bug.cgi?id=52489
      
              Some cleanup that will work towards fixing this bug.
      
              Tested by existing iframe compositing tests.
      
              * WebCore.exp.in: syncCompositingStateRecursive()
              was renamed to syncCompositingStateIncludingSubframes().
      
              * page/FrameView.h:
              * page/FrameView.cpp:
              (WebCore::FrameView::syncCompositingStateForThisFrame): Some
              code cleanup: do all the word we need to do for this frame,
              including the needsLayout() check.
              (WebCore::FrameView::syncCompositingStateIncludingSubframes):
              This is no longer recursive; instead, it iterates over descendant
              frames via the frame tree, calling syncCompositingStateForThisFrame()
              on each Frame's view.
      
              * rendering/RenderLayerCompositor.h:
              (WebCore::RenderLayerCompositor::isFlushingLayers): Getter for the flag.
              * rendering/RenderLayerCompositor.cpp:
              (WebCore::RenderLayerCompositor::RenderLayerCompositor):
              (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Maintain
              a flag to say if we're flushing, which allows us to assert on re-entrant flushes.
              (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
              Add the ability to get the rootmost compositor that is in the middle
              of a flush.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c961f41a
    • commit-queue@webkit.org's avatar
      2011-01-19 Levi Weintraub <leviw@google.com> · c56f5de7
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              Replaced rangeCompliantEquivalent with Position::parentAnchoredEquivalent
              and simplified the logic a bit. Unfortunately, Tables and some legacy
              editing positions still need to be handled specifically.
      
              remove rangeCompliantEquivalent and replace it with Position methods
              https://bugs.webkit.org/show_bug.cgi?id=25057
      
              No new tests as this is a refactor that doesn't change behavior.
      
              * WebCore.exp.in:
              * dom/Document.cpp:
              (WebCore::Document::caretRangeFromPoint):
              * dom/Position.cpp:
              (WebCore::Position::parentAnchoredEquivalent):
              * dom/Position.h:
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyBlockStyle):
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::insertNodeAt):
              (WebCore::CompositeEditCommand::moveParagraphs):
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::initializePositionData):
              (WebCore::DeleteSelectionCommand::mergeParagraphs):
              * editing/Editor.cpp:
              (WebCore::Editor::textDirectionForSelection):
              (WebCore::Editor::advanceToNextMisspelling):
              * editing/InsertLineBreakCommand.cpp:
              (WebCore::InsertLineBreakCommand::shouldUseBreakElement):
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::handleStyleSpansBeforeInsertion):
              * editing/VisiblePosition.cpp:
              (WebCore::makeRange):
              (WebCore::setStart):
              (WebCore::setEnd):
              * editing/VisibleSelection.cpp:
              (WebCore::VisibleSelection::firstRange):
              (WebCore::VisibleSelection::toNormalizedRange):
              (WebCore::makeSearchRange):
              * editing/htmlediting.cpp:
              (WebCore::indexForVisiblePosition):
              * editing/htmlediting.h:
              * editing/visible_units.cpp:
              (WebCore::previousBoundary):
              (WebCore::nextBoundary):
              * page/DOMSelection.cpp:
              (WebCore::anchorPosition):
              (WebCore::focusPosition):
              (WebCore::basePosition):
              (WebCore::extentPosition):
      2011-01-19  Levi Weintraub  <leviw@google.com>
      
              Reviewed by Ryosuke Niwa.
      
              Updating to use Position::parentAnchoredEquivalent instead of
              the old htmlediting rangeCompliantEquivalent.
      
              remove rangeCompliantEquivalent and replace it with Position methods
              https://bugs.webkit.org/show_bug.cgi?id=25057
      
              * WebView/WebFrame.mm:
              (-[WebFrame _smartDeleteRangeForProposedRange:]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c56f5de7
  6. 17 Jan, 2011 3 commits
    • mrowe@apple.com's avatar
      Fix the 32-bit build. · d482bb41
      mrowe@apple.com authored
      * WebCore.exp.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d482bb41
    • ap@apple.com's avatar
      Reviewed by Dan Bernstein. · 2320483d
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=52495
      
              No change in behavior, so no tests.
      
              * WebCore.exp.in: Export additional methods, as I'm going to use more code from PrintContext.
      
              * page/PrintContext.cpp:
              (WebCore::PrintContext::~PrintContext): No need to clear m_pageRects, the object is being
              destroyed already.
              (WebCore::PrintContext::pageCount): Changed page count from int to size_t.
              (WebCore::PrintContext::pageRect): Ditto.
              (WebCore::PrintContext::computePageRects): Pass allowHorizontalTiling as an argument.
              PrintContext already has code to calculate scale factor, so it makes sense to make methods
              that contain it universal (allowHorizontalTiling is always true for Safari).
              Round page height to an integer, because Mac code does that, and because page height is
              treated as integer almost everywhere else in code.
              (WebCore::PrintContext::begin): Allow calling this function multiple times. There is no need
              to return to screen mode if e.g. "print backgounds" option changes.
              (WebCore::PrintContext::computeAutomaticScaleFactor): Expose scale factor computation, so
              that clients don't have to copy it.
              (WebCore::PrintContext::spoolRect): Add a way to spool a precomputed rect - handy if a request
              comes from code that doesn't have page number.
              (WebCore::PrintContext::pageNumberForElement): Page number int -> size_t.
      
              * page/PrintContext.h: Added comments and FIXMEs. PrintContext needs cleanup, but that
              depends on deciding how it really needs to work (e.g. whether computePageRects() should
              cause relayout).
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2320483d
    • pfeldman@chromium.org's avatar
      2011-01-17 Pavel Feldman <pfeldman@chromium.org> · 78371b25
      pfeldman@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: simplify debugger enabling routine.
              https://bugs.webkit.org/show_bug.cgi?id=52472
      
              * inspector/Inspector.idl:
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::restoreDebugger):
              (WebCore::InspectorController::showAndEnableDebugger):
              (WebCore::InspectorController::enableDebugger):
              * inspector/InspectorController.h:
              * inspector/front-end/DebuggerModel.js:
              * inspector/front-end/ScriptsPanel.js:
              (WebInspector.ScriptsPanel.prototype.show):
              (WebInspector.ScriptsPanel.prototype._toggleDebugging):
      2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
      
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: simplify debugger enabling routine.
              https://bugs.webkit.org/show_bug.cgi?id=52472
      
              * WebInspector/WebInspector.mm:
              (-[WebInspector startDebuggingJavaScript:]):
      2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
      
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: simplify debugger enabling routine.
              https://bugs.webkit.org/show_bug.cgi?id=52472
      
              * WebInspector.cpp:
              (WebInspector::toggleDebuggingJavaScript):
      2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
      
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: simplify debugger enabling routine.
              https://bugs.webkit.org/show_bug.cgi?id=52472
      
              * WebProcess/WebPage/WebInspector.cpp:
              (WebKit::WebInspector::startJavaScriptDebugging):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78371b25
  7. 16 Jan, 2011 1 commit
    • simon.fraser@apple.com's avatar
      2011-01-16 Simon Fraser <simon.fraser@apple.com> · 448c931f
      simon.fraser@apple.com authored
              Reviewed by Dan Bernstein.
      
              Issues with iframes and plugins when the WebView is scaled.
              <rdar://problem/6213380>
      
              When _scaleWebView has been called on a WebView, iframes
              in WebKit1 render and hit-test incorrectly, and plug-ins don't scale up.
              This is caused by AppKit NSViews not playing nicely with the scale
              applied through style.
      
              Work around most of these issues by adjusting the bounds size
              of widgets to allow iframe contents to paint with the correct scale,
              and fix various places in the code where we relied on coordinate
              transforms via NSViews (which ignore CSS transforms).
      
              * WebCore.exp.in:
              * platform/Widget.cpp:
              (WebCore::Widget::setBoundsSize):
              * platform/Widget.h:
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::setBoundsSize):
              (WebCore::Widget::paint):
              * rendering/RenderLayerCompositor.cpp:
              (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame):
              * rendering/RenderWidget.cpp:
              (WebCore::RenderWidget::setWidgetGeometry):
              (WebCore::RenderWidget::setWidget):
              (WebCore::RenderWidget::updateWidgetPosition):
              * rendering/RenderWidget.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      448c931f
  8. 14 Jan, 2011 2 commits
    • yuzo@google.com's avatar
      2011-01-14 Yuzo Fujishima <yuzo@google.com> · 13694ec6
      yuzo@google.com authored
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              No new tests because the behavior remains the same.
      
              * WebCore.exp.in:
              * WebCore.order:
              * history/PageCache.cpp:
              (WebCore::PageCache::releaseAutoreleasedPagesNow):
              * inspector/InspectorResourceAgent.cpp:
              (WebCore::InspectorResourceAgent::cachedResource):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
              * loader/archive/cf/LegacyWebArchive.cpp:
              (WebCore::LegacyWebArchive::create):
              * loader/cache/CachedImage.cpp:
              (WebCore::CachedImage::allClientsRemoved):
              (WebCore::CachedImage::data):
              * loader/cache/CachedResource.cpp:
              (WebCore::CachedResource::~CachedResource):
              (WebCore::CachedResource::addClientToSet):
              (WebCore::CachedResource::removeClient):
              (WebCore::CachedResource::setDecodedSize):
              (WebCore::CachedResource::setEncodedSize):
              (WebCore::CachedResource::didAccessDecodedData):
              * loader/cache/CachedResourceLoader.cpp:
              (WebCore::CachedResourceLoader::CachedResourceLoader):
              (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
              (WebCore::CachedResourceLoader::requestResource):
              (WebCore::CachedResourceLoader::revalidateResource):
              (WebCore::CachedResourceLoader::loadResource):
              (WebCore::CachedResourceLoader::clearPreloads):
              (WebCore::CachedResourceLoader::printPreloadStats):
              * loader/cache/CachedResourceRequest.cpp:
              (WebCore::CachedResourceRequest::load):
              (WebCore::CachedResourceRequest::didFail):
              (WebCore::CachedResourceRequest::didReceiveResponse):
              * loader/cache/MemoryCache.cpp:
              (WebCore::memoryCache):
              * loader/cache/MemoryCache.h:
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * src/WebCache.cpp:
              (WebKit::WebCache::setCapacities):
              (WebKit::WebCache::clear):
              (WebKit::WebCache::getUsageStats):
              (WebKit::WebCache::getResourceTypeStats):
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * webkit/webkitglobals.cpp:
              (webkit_set_cache_model):
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * Misc/WebCache.mm:
              (+[WebCache statistics]):
              (+[WebCache setDisabled:]):
              (+[WebCache isDisabled]):
              * WebView/WebView.mm:
              (+[WebView _setCacheModel:]):
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * Api/qwebpage.cpp:
              (QWebPagePrivate::_q_cleanupLeakMessages):
              * Api/qwebsettings.cpp:
              (QWebSettings::clearMemoryCaches):
              (QWebSettings::setObjectCacheCapacities):
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * WebCache.cpp:
              (WebCache::statistics):
              (WebCache::empty):
              (WebCache::setDisabled):
              (WebCache::disabled):
              * WebView.cpp:
              (WebView::setCacheModel):
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * WebView.cpp:
              (wxWebView::SetCachePolicy):
      2011-01-14  Yuzo Fujishima  <yuzo@google.com>
      
              Reviewed by Antti Koivisto.
      
              Rename cache() to memoryCache()
              https://bugs.webkit.org/show_bug.cgi?id=52433
      
              * WebProcess/WebProcess.cpp:
              (WebKit::WebProcess::shutdownIfPossible):
              (WebKit::WebProcess::didClose):
              * WebProcess/mac/WebProcessMac.mm:
              (WebKit::WebProcess::platformSetCacheModel):
              * WebProcess/win/WebProcessWin.cpp:
              (WebKit::WebProcess::platformSetCacheModel):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13694ec6
    • mitz@apple.com's avatar
      Source/WebCore: WebCore part of <rdar://problem/8441312> Crash in -[NSView... · 660edfe5
      mitz@apple.com authored
      Source/WebCore: WebCore part of <rdar://problem/8441312> Crash in -[NSView _invalidateGStatesForTree]
      
      Reviewed by Simon Fraser.
      
      * WebCore.exp.in: Export RenderWidget::suspendWidgetHierarchyUpdates() and
      RenderWidget::resumeWidgetHierarchyUpdates().
      * manual-tests/plug-in-mutates-NSView-hierarchy-during-resize.html: Added.
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::setWidgetGeometry): Removed the assertion that widget hierarchy updates
      are disabled. When this assertion was added, this condition was a subset of the “calling out to
      plug-in code is forbidden” condition, hence the assertion was valid. The WebKit part of this
      change now suspends widget hierarchy updates even at times where plug-in code is expected to be
      called, which invalidates the assertion.
      
      WebKit/mac: WebKit/mac part of <rdar://problem/8441312> Crash in -[NSView _invalidateGStatesForTree]
      
      Reviewed by Simon Fraser.
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _invalidateGStatesForTree]): Override this NSView method, and bracket the call
      to the superclass implementation with suspending WebCore Widget hierarchy updates. This ensures
      that the NSView tree doesn’t change from under AppKit as it traverses it.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      660edfe5
  9. 13 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: WebKit2: Add support for drag and drop · 9d9813d0
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * WebCore.exp.in:
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove): Added DragData parameter.
      (WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
      (WebCore::DragController::concludeEditDrag): Same as above.
      * page/DragController.h: Added parameter to isCopyKeyDown.
      * page/mac/DragControllerMac.mm:
      The following methods have been modified to use the information stored
      in the DragData class.
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * platform/DragData.h:
      (WebCore::DragData::flags):
      * platform/DragData.cpp: Added default flags parameter to the constructor.
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
      (WebCore::DragData::canSmartReplace):
      (WebCore::DragData::containsColor):
      (WebCore::DragData::containsFiles):
      (WebCore::DragData::asFilenames):
      (WebCore::DragData::containsPlainText):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      All the following files have been modified to add the DragData
      parameter to isCopyKeyDown. I plan to improve this in the future
      and make isCopyKeyDown not platform specific.
      * page/android/DragControllerAndroid.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/brew/DragControllerBrew.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/efl/DragControllerEfl.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/haiku/DragControllerHaiku.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::isCopyKeyDown):
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::isCopyKeyDown):
      * page/wx/DragControllerWx.cpp:
      (WebCore::DragController::isCopyKeyDown):
      
      WebKit/mac: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
              
      Reviewed by Darin Adler.
      
      The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      These are the changes to align the behavior for WebKit.
      
      * WebView/WebView.mm:
      (-[WebView applicationFlags:]): Added.
      (-[WebView draggingEntered:]): Added parameter to the DragData constructor.
      (-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
      (-[WebView draggingExited:]): Added parameter to the DragData constructor.
      (-[WebView performDragOperation:]): Added parameter to the DragData constructor.
      
      WebKit2: WebKit2: Add support for drag and drop
      https://bugs.webkit.org/show_bug.cgi?id=52343
      <rdar://problem/7660558>
                     
      Reviewed by Darin Adler.
      
      This patch contains the changes required to support dropping content
      in WebKit on the Mac. The DragData class has been extended to provide
      additional context from the application (keyboard state, modal windows, etc.)
      as well as information of the drag pasteboard being used.
      The support for WebKit as drag source will be added with a separate patch.
      
      * Shared/DragControllerAction.h: Added.
      * UIProcess/API/mac/WKView.mm:
      Added implemention of the methods required to add suport for a drop target.
      To maintain asynchronous communication with the WebProcess, we always return
      the previous calculated value for the drag operation.
      (-[WKView _registerDraggedTypes]):
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView applicationFlags:]):
      (-[WKView draggingEntered:]):
      (-[WKView draggingUpdated:]):
      (-[WKView draggingExited:]):
      (-[WKView prepareForDragOperation:]):
      (-[WKView performDragOperation:]):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::performDragControllerAction):
      (WebKit::WebPageProxy::didPerformDragControllerAction):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::dragOperation):
      (WebKit::WebPageProxy::resetDragOperation):
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebDragClient.cpp:
      (WebKit::WebDragClient::willPerformDragDestinationAction):
      (WebKit::WebDragClient::willPerformDragSourceAction):
      (WebKit::WebDragClient::actionMaskForDrag):
      (WebKit::WebDragClient::dragSourceActionMaskForPoint):
      (WebKit::WebDragClient::startDrag):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d9813d0
  10. 12 Jan, 2011 2 commits
    • bdakin@apple.com's avatar
      Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 · fd7c5cf6
      bdakin@apple.com authored
      Expose fixed layout through WebKit SPI
      -and corresponding-
      <rdar://problem/8844464>
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      And now with getters!
      * WebCore.exp.in:
      
      WebKit/mac: 
      
      And now with getters!
      * WebView/WebView.mm:
      (-[WebView _useFixedLayout]):
      (-[WebView _fixedLayoutSize]):
      * WebView/WebViewPrivate.h:
      
      WebKit2: 
      
      And now with getters!
      * UIProcess/API/C/WKPage.cpp:
      (WKPageUseFixedLayout):
      (WKPageFixedLayoutSize):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::useFixedLayout):
      (WebKit::WebPageProxy::fixedLayoutSize):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd7c5cf6
    • bdakin@apple.com's avatar
      Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose · d53573ca
      bdakin@apple.com authored
      fixed layout through WebKit SPI
      -and corresponding-
      <rdar://problem/8844464>
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Export symbols for ScrollView::setUseFixedLayout() and 
      ScrollView::setFixedLayoutSize()
      * WebCore.exp.in:
      
      WebKit/mac: 
      
      * WebView/WebView.mm:
      (-[WebView _setUseFixedLayout:]):
      (-[WebView _setFixedLayoutSize:]):
      * WebView/WebViewPrivate.h:
      
      WebKit2: 
      
      Store useFixedLayout and fixedLayoutSize in the 
      WebPageCreationParameters and the WebPageProxy.
      * Shared/WebPageCreationParameters.cpp:
      (WebKit::WebPageCreationParameters::encode):
      (WebKit::WebPageCreationParameters::decode):
      * Shared/WebPageCreationParameters.h:
      * UIProcess/API/C/WKPage.cpp:
      (WKPageSetUseFixedLayout):
      (WKPageSetFixedLayoutSize):
      * UIProcess/API/C/WKPage.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::setUseFixedLayout):
      (WebKit::WebPageProxy::setFixedLayoutSize):
      (WebKit::WebPageProxy::creationParameters):
      * UIProcess/WebPageProxy.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::setUseFixedLayout):
      (WebKit::WebPage::setFixedLayoutSize):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d53573ca
  11. 11 Jan, 2011 1 commit
    • enrica@apple.com's avatar
      Source/WebCore: Paste and drag and drop use different code paths to interact with the pasteboard. · 964ea218
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      No new tests. A test is already available for this
      (editing/pasteboard/drag-image-to-contenteditable-in-iframe.html) but had incorrect results.
      
      * WebCore.exp.in:
      * loader/EmptyClients.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      (WebCore::EmptyEditorClient::canonicalizeURL):
      (WebCore::EmptyEditorClient::canonicalizeURLString):
      * page/DragController.cpp:
      The following methods have been changed to pass a pointer to the Frame object
      to the DragData class.
      (WebCore::documentFragmentFromDragData):
      (WebCore::DragController::performDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      * page/EditorClient.h: Added two Mac only methods to call into WebKit to use functionality
      that is in NSURLExtras.
      The following files have been modified to pass the Frame object to the DragData method calls.
      * page/chromium/DragControllerChromium.cpp:
      (WebCore::DragController::dragOperation):
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::dragOperation):
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::dragOperation):
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::dragOperation):
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::dragOperation):
      * platform/DragData.h: Removed Mac specific constructor and reference to PasteboardHelper class.
      * platform/Pasteboard.h: Added public constructor to create a Pasteboard object from an NSPasteboard.
      The following files were all modified to match the new parameters of the methods listed.
      * platform/android/DragDataAndroid.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/gtk/DragDataGtk.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/haiku/DragDataHaiku.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/DragDataMac.mm:
      (WebCore::DragData::DragData):
      (WebCore::DragData::asPlainText):
      (WebCore::insertablePasteboardTypes):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::getBestURL):
      (WebCore::Pasteboard::asURL):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      * platform/win/DragDataWin.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsCompatibleContent):
      (WebCore::DragData::asFragment):
      * platform/wince/DragDataWinCE.cpp:
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::asFragment):
      * platform/wx/DragDataWx.cpp:
      (WebCore::DragData::asPlainText):
      (WebCore::DragData::containsURL):
      (WebCore::DragData::asURL):
      (WebCore::DragData::asFragment):
      
      WebKit: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebKit.xcodeproj/project.pbxproj: Removed WebPasteboardHelper.mm and WebPasteboardHelper.h.
      
      WebKit/mac: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebCoreSupport/WebEditorClient.h:
      * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebEditorClient::canonicalizeURL):
      (WebEditorClient::canonicalizeURLString):
      * WebCoreSupport/WebPasteboardHelper.h: Removed.
      * WebCoreSupport/WebPasteboardHelper.mm: Removed.
      * WebView/WebHTMLView.mm: Removed comment.
      * WebView/WebView.mm: The following methods have been changed to use the new DragData
      constructor that doesn't use the WebPasteboardHelper reference.
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      
      WebKit2: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      The change consists in a refactoring of the code to have only one class that
      deals with the pasteboard on Mac.
      
      Reviewed by Alexey Proskuryakov.
      
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
      exposed by NSURLExtras.
      (WebKit::WebEditorClient::canonicalizeURL):
      (WebKit::WebEditorClient::canonicalizeURLString):
      
      LayoutTests: Paste and drag and drop use different code paths to interact with the pasteboard.
      https://bugs.webkit.org/show_bug.cgi?id=52093
      
      Reviewed by Alexey Proskuryakov.
      
      New test results added to match the correct behavior.
              
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png:
      * platform/mac/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      964ea218
  12. 08 Jan, 2011 1 commit
  13. 07 Jan, 2011 4 commits
    • slewis@apple.com's avatar
      WebCore: <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit · b211c4bd
      slewis@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
              
      Reviewed by Geoff Garen.
      
      Add a sampler for printing off process memory statistics.
      Export file mode.
      
      * WebCore.exp.in:
      
      WebKit2: <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
      https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
              
      Reviewed by Geoff Garen.
      
      Add a sampler for printing off process memory statistics.
      This tool can track:
                      
              WebCore
                 - FastMalloc allocations bytes              (in use or committed)
              JavaScriptCore
                 - Garbage collector heap bytes              (in use or committed)
                 - Stack bytes                               (committed only!)
                 - JIT Code bytes                            (committed only!)
              Malloc zones
                 - In use bytes for the following zones:
                     * Default zone                          (in use or committed)
                     * DispCon zone                          (in use or committed)
                     * Purgable zone                         (in use or committed)
              Task Info
                 - Resident size memory (RSIZE)
              
              Data collected is dumped to a temporary file.
              
      Create a sandbox for a temporary file.
      * Shared/SandboxExtension.h:
      (WebKit::SandboxExtension::createHandleForTemporaryFile):
      * Shared/mac/SandboxExtensionMac.mm:
      (WebKit::SandboxExtension::createHandleForTemporaryFile):
              
      Memory Sampler files
              
      * Shared/WebMemorySampler.cpp: Added.
      (WebKit::WebMemorySampler::shared):
      (WebKit::WebMemorySampler::WebMemorySampler):
      (WebKit::WebMemorySampler::start):
      (WebKit::WebMemorySampler::initializeTimers):
      (WebKit::WebMemorySampler::stop):
      (WebKit::WebMemorySampler::isRunning):
      (WebKit::WebMemorySampler::initializeTempLogFile):
      (WebKit::WebMemorySampler::initializeSandboxedLogFile):
      (WebKit::WebMemorySampler::writeHeaders):
      (WebKit::WebMemorySampler::sampleTimerFired):
      (WebKit::WebMemorySampler::stopTimerFired):
      (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
      * Shared/WebMemorySampler.h: Added.
      * Shared/mac/WebMemorySampler.mac.mm: Added.
      (WebKit::WebMemorySampler::sampleSystemMalloc):
      (WebKit::WebMemorySampler::sampleProcessCommittedBytes):
      (WebKit::WebMemorySampler::processName):
      (WebKit::WebMemorySampler::sampleWebKit):
              
      API to start and stop UIProcess and WebProcess sampling.
              
      * UIProcess/API/C/WKContext.cpp:
      (WKContextStartMemorySampler):
      (WKContextStopMemorySampler):
      * UIProcess/API/C/WKContext.h:
              
      Send messages to WebProcess to start and stop memory sampling.
              
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::processDidFinishLaunching):
      (WebKit::WebContext::startMemorySampler):
      (WebKit::WebContext::stopMemorySampler):
      * UIProcess/WebContext.h:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::startMemorySampler):
      (WebKit::WebProcess::stopMemorySampler):
      * WebProcess/WebProcess.h:
      * WebProcess/WebProcess.messages.in:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b211c4bd
    • jer.noble@apple.com's avatar
      WebCore: Implement WebKit Full Screen support. · d9d59ff9
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      Mark for export all those WebCore functions needed by WebFullscreenController.
      
      * WebCore.exp.in:
      
      WebCore: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010-12-17
      Reviewed by Simon Fraser.
      
      screenRect is useful for more than just HTMLMediaElements.  Promote it into
      Element.
      
      * dom/Element.cpp: Moved into Element from HTMLMediaElement.
      * dom/Element.h: Ditto.
      * dom/Node.cpp:
      * html/HTMLMediaElement.cpp: Moved screenRect into Element.
      * html/HTMLMediaElement.h: Ditto.
      * WebCore.exp.in: Modify the exports list to reflect the new symbol name.
      
      WebCore: Implement WebKit Full Screen support.
      https://bugs.webkit.org/show_bug.cgi?id=49481
      rdar://problem/8247444
      
      Patch by Jer Noble <jer@kokode.apple.com> on 2010...
      d9d59ff9
    • jamesr@google.com's avatar
      2011-01-07 James Robinson <jamesr@chromium.org> · f894f68c
      jamesr@google.com authored
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * animations/animation-time-expected.txt: Removed.
              * animations/animation-time.html: Removed.
              * animations/script-tests/animation-time.js: Removed.
              * fast/dom/Window/window-properties-expected.txt:
              * fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/gtk/fast/dom/Window/window-properties-expected.txt:
              * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/qt/fast/dom/Window/window-properties-expected.txt:
              * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * DumpRenderTree/chromium/WebViewHost.cpp:
              (WebViewHost::paintInvalidatedRegion):
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * page/DOMWindow.cpp:
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              * page/Frame.cpp:
              * page/Frame.h:
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
              * page/animation/AnimationTimeController.cpp: Removed.
              * page/animation/AnimationTimeController.h: Removed.
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * public/WebWidget.h:
              * src/WebPopupMenuImpl.cpp:
              * src/WebPopupMenuImpl.h:
              * src/WebViewImpl.cpp:
              * src/WebViewImpl.h:
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView drawRect:]):
              * WebView/WebView.mm:
              (layerSyncRunLoopObserverCallBack):
      2011-01-07  James Robinson  <jamesr@chromium.org>
      
              Revert "Implement mozilla's animationTime property"
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              This approach isn't quite right.
      
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
              (WebKit::ChunkedUpdateDrawingArea::display):
              (WebKit::ChunkedUpdateDrawingArea::setSize):
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::drawRect):
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f894f68c
    • barraclough@apple.com's avatar
      Source/JavaScriptCore: [GTK] Port scrollbar painting to GtkStyleContext · d6544ee5
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=52051
      
      Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2011-01-07
      Reviewed by Martin Robinson.
      
      * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
      declaration.
      
      WebCore: Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
      
      Reviewed by Geoff Garen.
      
      The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
      destructor early, in order to release wrappers once we know we no longer intend to use them.
      Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
      lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
      A sequence of events that triggers the bug would look like this:
      
      (1) Create a DOMWrapperWorld.
      (2) Register a timer in the world.
      (3) Call unregisterWorld() on the world.
      (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
      (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
          called forgetWorld() none exists.
      (6) Attempt to add a wrapper to a NULL map.
      
      Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
      
      * WebCore.exp.in:
      * bindings/js/DOMWrapperWorld.cpp:
      (WebCore::DOMWrapperWorld::DOMWrapperWorld):
      (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
      (WebCore::DOMWrapperWorld::clearWrappers):
      * bindings/js/DOMWrapperWorld.h:
      
      WebKit/mac: Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
      
      Reviewed by Geoff Garen.
      
      The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
      destructor early, in order to release wrappers once we know we no longer intend to use them.
      Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
      lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
      A sequence of events that triggers the bug would look like this:
      
      (1) Create a DOMWrapperWorld.
      (2) Register a timer in the world.
      (3) Call unregisterWorld() on the world.
      (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
      (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
          called forgetWorld() none exists.
      (6) Attempt to add a wrapper to a NULL map.
      
      Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
      
      * WebView/WebScriptWorld.mm:
      (-[WebScriptWorld unregisterWorld]):
      
      WebKit/win: Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
      
      Reviewed by Geoff Garen.
      
      The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
      destructor early, in order to release wrappers once we know we no longer intend to use them.
      Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
      lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
      A sequence of events that triggers the bug would look like this:
      
      (1) Create a DOMWrapperWorld.
      (2) Register a timer in the world.
      (3) Call unregisterWorld() on the world.
      (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
      (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
          called forgetWorld() none exists.
      (6) Attempt to add a wrapper to a NULL map.
      
      Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
      
      * WebScriptWorld.cpp:
      (WebScriptWorld::unregisterWorld):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6544ee5
  14. 06 Jan, 2011 1 commit
    • jamesr@google.com's avatar
      2011-01-06 James Robinson <jamesr@chromium.org> · c0dca2a1
      jamesr@google.com authored
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Tests for window.webkitAnimationTime.
      
              * animations/animation-time-expected.txt: Added.
              * animations/animation-time.html: Added.
              * animations/script-tests/animation-time.js: Added.
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Chromium DRT support for webkitAnimationTime.
      
              * DumpRenderTree/chromium/WebViewHost.cpp:
              (WebViewHost::paintInvalidatedRegion):
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Implements mozilla's animationTime property as described here:
              https://developer.mozilla.org/en/DOM/window.mozAnimationStartTime
              and http://hacks.mozilla.org/2010/08/more-efficient-javascript-animations-with-mozrequestanimationframe/
              The property is called webkitAnimationTime as calling it the 'Start' time is not very informative.
              This property exposes a notion of a 'current' time to use for declarative animations and allows
              scripts to synchronize imperative animations with declarative ones if they choose to.  Once queried
              this time is saved and used for all declarative animation updates until the embedder paints/composites
              the next frame and clears it, or 15ms elapse (in case the embedder isn't producing frames, for example
              if the page is in a background tab).
      
              This patch also ensures that all declarative animations started in the same script execution block
              are synchronized even if some time elapses while script is running.
      
              Test: fast/animation/animation-time.html
      
              * WebCore.gypi:
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::webkitAnimationTime):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
              * page/Frame.cpp:
              (WebCore::Frame::currentAnimationTime):
              * page/Frame.h:
              * page/Page.cpp:
              (WebCore::Page::Page):
              * page/Page.h:
              (WebCore::Page::animationTime):
              * page/animation/AnimationController.cpp:
              (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
              * page/animation/AnimationTimeController.cpp: Added.
              (WebCore::AnimationTimeController::AnimationTimeController):
              (WebCore::AnimationTimeController::~AnimationTimeController):
              (WebCore::AnimationTimeController::currentAnimationTime):
              (WebCore::AnimationTimeController::clearCurrentAnimationTime):
              (WebCore::AnimationTimeController::clearCurrentAnimationTimeTimerFired):
              * page/animation/AnimationTimeController.h: Added.
              (WebCore::AnimationTimeController::create):
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              WebKit API support for webkitAnimationTime.
      
              * public/WebWidget.h:
              * src/WebPopupMenuImpl.cpp:
              (WebKit::WebPopupMenuImpl::clearCurrentAnimationTime):
              * src/WebPopupMenuImpl.h:
              * src/WebViewImpl.cpp:
              (WebKit::WebViewImpl::clearCurrentAnimationTime):
              * src/WebViewImpl.h:
      2011-01-06  James Robinson  <jamesr@chromium.org>
      
              Reviewed by Simon Fraser.
      
              Implement mozilla's animationTime property
              https://bugs.webkit.org/show_bug.cgi?id=51952
      
              Tells the page to clear the current animation time after producing a frame.
      
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::drawRect):
              * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
              (WebKit::ChunkedUpdateDrawingArea::display):
              (WebKit::ChunkedUpdateDrawingArea::setSize):
              * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
              (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0dca2a1
  15. 05 Jan, 2011 4 commits
  16. 04 Jan, 2011 2 commits
    • cfleizach@apple.com's avatar
      WK2: Support Accessibility · aa50410b
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51859
      
      Reviewed by Sam Weinig.
      
      Tools: 
      
      Use rootObject() method to get top of accessibility tree.
      
      * DumpRenderTree/mac/AccessibilityControllerMac.mm:
      (AccessibilityController::focusedElement):
      (AccessibilityController::rootElement):
      
      WebCore: 
      
      WK2 doesn't use platform scroll views anymore. Accessibility code
      needs to have its own scroll views. 
      
      Test: platform/mac/accessibility/webkit-scrollarea.html
      
      * CMakeLists.txt:
      * GNUmakefile.am:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::AXObjectCache):
      (WebCore::AXObjectCache::get):
      (WebCore::AXObjectCache::getOrCreate):
      (WebCore::AXObjectCache::rootObject):
      (WebCore::AXObjectCache::remove):
      (WebCore::AXObjectCache::handleScrollbarUpdate):
      * accessibility/AXObjectCache.h:
      (WebCore::AXObjectCache::handleScrollbarUpdate):
      * accessibility/AccessibilityARIAGrid.h:
      * accessibility/AccessibilityAllInOne.cpp:
      * accessibility/AccessibilityImageMapLink.cpp:
      * accessibility/AccessibilityImageMapLink.h:
      * accessibility/AccessibilityListBoxOption.cpp:
      * accessibility/AccessibilityListBoxOption.h:
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::updateChildrenIfNecessary):
      (WebCore::AccessibilityObject::elementAccessibilityHitTest):
      (WebCore::AccessibilityObject::axObjectCache):
      (WebCore::AccessibilityObject::focusedUIElement):
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityObject::isAccessibilityScrollView):
      (WebCore::AccessibilityObject::isScrollView):
      (WebCore::AccessibilityObject::canSetNumericValue):
      (WebCore::AccessibilityObject::scrollBar):
      (WebCore::AccessibilityObject::size):
      (WebCore::AccessibilityObject::setValue):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::parentObject):
      (WebCore::AccessibilityRenderObject::accessibilityHitTest):
      (WebCore::AccessibilityRenderObject::updateChildrenIfNecessary):
      (WebCore::AccessibilityRenderObject::addChildren):
      * accessibility/AccessibilityRenderObject.h:
      * accessibility/AccessibilityScrollView.cpp: Added.
      (WebCore::AccessibilityScrollView::AccessibilityScrollView):
      (WebCore::AccessibilityScrollView::create):
      (WebCore::AccessibilityScrollView::scrollBar):
      (WebCore::AccessibilityScrollView::children):
      (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
      (WebCore::AccessibilityScrollView::removeChildScrollbar):
      (WebCore::AccessibilityScrollView::addChildScrollbar):
      (WebCore::AccessibilityScrollView::addChildren):
      (WebCore::AccessibilityScrollView::webAreaObject):
      (WebCore::AccessibilityScrollView::accessibilityHitTest):
      (WebCore::AccessibilityScrollView::document):
      (WebCore::AccessibilityScrollView::elementRect):
      (WebCore::AccessibilityScrollView::parentObject):
      * accessibility/AccessibilityScrollView.h: Added.
      (WebCore::AccessibilityScrollView::roleValue):
      (WebCore::AccessibilityScrollView::scrollView):
      (WebCore::AccessibilityScrollView::accessibilityIsIgnored):
      (WebCore::AccessibilityScrollView::isAccessibilityScrollView):
      (WebCore::toAccessibilityScrollView):
      * accessibility/AccessibilityScrollbar.cpp:
      (WebCore::AccessibilityScrollbar::AccessibilityScrollbar):
      (WebCore::AccessibilityScrollbar::create):
      (WebCore::AccessibilityScrollbar::elementRect):
      (WebCore::AccessibilityScrollbar::document):
      (WebCore::AccessibilityScrollbar::orientation):
      (WebCore::AccessibilityScrollbar::isEnabled):
      (WebCore::AccessibilityScrollbar::valueForRange):
      (WebCore::AccessibilityScrollbar::setValue):
      * accessibility/AccessibilityScrollbar.h:
      (WebCore::AccessibilityScrollbar::setParent):
      (WebCore::AccessibilityScrollbar::canSetValueAttribute):
      (WebCore::AccessibilityScrollbar::canSetNumericValue):
      (WebCore::AccessibilityScrollbar::isAccessibilityScrollbar):
      (WebCore::AccessibilityScrollbar::parentObject):
      (WebCore::AccessibilityScrollbar::roleValue):
      * accessibility/mac/AccessibilityObjectMac.mm:
      (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
      * accessibility/mac/AccessibilityObjectWrapper.mm:
      (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
      (-[AccessibilityObjectWrapper remoteAccessibilityParentObject]):
      (-[AccessibilityObjectWrapper position]):
      (-[AccessibilityObjectWrapper scrollViewParent]):
      (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
      (-[AccessibilityObjectWrapper accessibilityHitTest:]):
      (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
      * dom/Document.cpp:
      (WebCore::Document::axObjectCache):
      * loader/EmptyClients.h:
      (WebCore::EmptyFrameLoaderClient::accessibilityRemoteObject):
      * loader/FrameLoaderClient.h:
      * page/FrameView.cpp:
      (WebCore::FrameView::~FrameView):
      (WebCore::FrameView::axObjectCache):
      * page/FrameView.h:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::setHasHorizontalScrollbar):
      (WebCore::ScrollView::setHasVerticalScrollbar):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::~Scrollbar):
      (WebCore::Scrollbar::scroll):
      (WebCore::Scrollbar::axObjectCache):
      * platform/Scrollbar.h:
      * platform/Widget.h:
      (WebCore::Widget::axObjectCache):
      
      WebKit/gtk: 
      
      Use rootObject() method to get top of ax tree.
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::getFocusedAccessibleElement):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_get_accessible):
      
      WebKit/mac: 
      
      Use rootObject() method to get top of AX tree.
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient::accessibilityRemoteObject):
      * WebView/WebFrame.mm:
      (-[WebFrame setAccessibleName:]):
      (-[WebFrame accessibilityRoot]):
      * WebView/WebFrameInternal.h:
      * WebView/WebFramePrivate.h:
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView accessibilityAttributeValue:]):
      (-[WebHTMLView accessibilityFocusedUIElement]):
      (-[WebHTMLView accessibilityHitTest:]):
      (-[WebHTMLView _accessibilityParentForSubview:]):
      
      WebKit/win: 
      
      Use rootObject() method to get the top of the AX tree.
      
      * AccessibleDocument.cpp:
      (AccessibleDocument::AccessibleDocument):
      
      WebKit2: 
      
      Implement remote accessibility API to support cross process accessibility
      on the Mac platform.
      
      * Shared/WebProcessCreationParameters.cpp:
      (WebKit::WebProcessCreationParameters::encode):
      (WebKit::WebProcessCreationParameters::decode):
      * Shared/WebProcessCreationParameters.h:
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::accessibilityChildTokenReceived):
      * UIProcess/API/mac/WKView.mm:
      (-[WKView initWithFrame:contextRef:pageGroupRef:]):
      (-[WKView _updateWindowAndViewFrames]):
      (-[WKView _setAccessibilityChildToken:]):
      (-[WKView accessibilityIsIgnored]):
      (-[WKView accessibilityHitTest:]):
      (-[WKView accessibilityAttributeValue:]):
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::ensureWebProcess):
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::windowAndViewFramesChanged):
      (WebKit::WebPageProxy::didReceiveAccessibilityPageToken):
      (WebKit::WebPageProxy::sendAccessibilityPresenterToken):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::accessibilityRemoteObject):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::windowAndViewFramesChanged):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::accessibilityPosition):
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Added.
      * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Added.
      (-[AccessibilityWebPageObject setWebPage:]):
      (-[AccessibilityWebPageObject setRemoteParent:]):
      (-[AccessibilityWebPageObject dealloc]):
      (-[AccessibilityWebPageObject accessibilityIsIgnored]):
      (-[AccessibilityWebPageObject accessibilityAttributeNames]):
      (-[AccessibilityWebPageObject accessibilityIsAttributeSettable:]):
      (-[AccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
      (-[AccessibilityWebPageObject accessibilityActionNames]):
      (-[AccessibilityWebPageObject accessibilityChildren]):
      (-[AccessibilityWebPageObject accessibilityAttributeValue:]):
      (-[AccessibilityWebPageObject accessibilityShouldUseUniqueId]):
      (-[AccessibilityWebPageObject accessibilityHitTest:]):
      (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::platformInitialize):
      (WebKit::WebPage::sendAccessibilityPresenterToken):
      (WebKit::WebPage::accessibilityRemoteObject):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::initializeWebProcess):
      * WebProcess/WebProcess.h:
      (WebKit::WebProcess::presenterApplicationPid):
      * WebProcess/mac/WebProcessMainMac.mm:
      (WebKit::WebProcessMain):
      
      LayoutTests: 
      
      * platform/mac/accessibility/webkit-scrollarea-expected.txt: Added.
      * platform/mac/accessibility/webkit-scrollarea.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa50410b
    • darin@apple.com's avatar
      2011-01-04 Darin Adler <darin@apple.com> · c9bf05d8
      darin@apple.com authored
              Reviewed by Brady Eidson.
      
              Add back/forward encoding and decoding to WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=51901
      
              * WebCore.exp.in: Export functions used in WebKit2.
      
              * history/HistoryItem.cpp:
              (WebCore::HistoryItem::encodeBackForwardTree): Use references instead of pointers.
              (WebCore::HistoryItem::encodeBackForwardTreeNode): Ditto.
              (WebCore::HistoryItem::decodeBackForwardTree): Ditto.
              * history/HistoryItem.h: Ditto.
              * platform/network/FormData.cpp:
              (WebCore::encode): Ditto.
              (WebCore::decode): Ditto.
              (WebCore::FormData::encodeForBackForward): Ditto.
              (WebCore::FormData::decodeForBackForward): Ditto.
              * platform/network/FormData.h: Ditto.
      2011-01-04  Darin Adler  <darin@apple.com>
      
              Reviewed by Brady Eidson.
      
              Add back/forward encoding and decoding to WebKit2
              https://bugs.webkit.org/show_bug.cgi?id=51901
      
              * G...
      c9bf05d8
  17. 24 Dec, 2010 2 commits
  18. 23 Dec, 2010 3 commits
    • jberlin@webkit.org's avatar
      Need WebKit2 API to create a SecurityOrigin from protocol, host, and port · 9cf9a80d
      jberlin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51563
      
      Reviewed by Sam Weinig.
      
      WebCore: 
      
      Add SecurityOrigin::create(const String& protocol, const String& host, int port).
      
      * WebCore.exp.in:
      Export the symbols for WebCore::SecurityOrigin::create(String, String, int).
      
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
      Use the constant MaxAllowedPort.
      (WebCore::SecurityOrigin::create):
      Sanitizing based off of that done in createFromDatabaseIdentifier.
      * page/SecurityOrigin.h:
      
      WebKit2: 
      
      Add WKSecurityOriginCreate(WKStringRef protocol, WKStringRef host, int port).
      
      * Shared/API/c/WKSecurityOrigin.cpp:
      (WKSecurityOriginCreateFromIdentifier):
      Renamed so as not to clash with the new WKSecurityOriginCreate.
      (WKSecurityOriginCreate):
      * Shared/API/c/WKSecurityOrigin.h:
      * Shared/WebSecurityOrigin.h:
      (WebKit::WebSecurityOrigin::create):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9cf9a80d
    • darin@apple.com's avatar
      2010-12-23 Darin Adler <darin@apple.com> · 50fec70c
      darin@apple.com authored
              Reviewed by Sam Weinig.
      
              WKView should not try to do asynchronous validation for selectors that are not editor commands
              https://bugs.webkit.org/show_bug.cgi?id=51555
      
              * WebCore.exp.in: Added commandIsSupportedFromMenuOrKeyBinding.
              * editing/Editor.h: Reordered arguments in the Editor::Command constructor
              and the data members too so the frame is last. Added
              commandIsSupportedFromMenuOrKeyBinding.
      
              * editing/EditorCommand.cpp:
              (WebCore::supported): Removed the EditorCommandSource argument. These
              functions are now only used when called from DOM.
              (WebCore::supportedFromMenuOrKeyBinding): Ditto.
              (WebCore::supportedCopyCut): Ditto.
              (WebCore::supportedPaste): Ditto.
              (WebCore::enabledDismissCorrectionPanel): Changed the supported function to
              an enabled function. It was incorrect to say that this is "supported" only
              when the correction panel is up. Correct to say that it is "enabled" only
              then. And also probably OK to enable it even when the selection is not in
              editable text, as long as the panel is up.
              (WebCore::createCommandMap): Moved conditional commands out of the main
              array into a separate section at the end.
              (WebCore::internalCommand): Added.
              (WebCore::Editor::command): Changed to use the new internalCommand function
              and simplified by relying on the null check in the Command constructor.
              (WebCore::Editor::commandIsSupportedFromMenuOrKeyBinding): Added.
              (WebCore::Editor::Command::Command): Removed unneeded initialization of
              m_source, which is never looked at if m_command is 0. Added feature of
              passing a null command pointer to the non-default constructor.
              (WebCore::Editor::Command::isSupported): Changed to only call the
              per-command isSupported function when the command source is DOM.
              Accordingly that function is now called isSupportedFromDOM.
      2010-12-23  Darin Adler  <darin@apple.com>
      
              Reviewed by Sam Weinig.
      
              WKView should not try to do asynchronous validation for selectors that are not editor commands
              https://bugs.webkit.org/show_bug.cgi?id=51555
      
              * UIProcess/API/mac/WKView.mm:
              (-[WKView validateUserInterfaceItem:]): Removed the special case for startSpeaking.
              Added call to commandIsSupportedFromMenuOrKeyBinding so we only try to do validation
              for commands that are supported. Tweaked comments and added some bug numbers.
              (-[WKView _setUserInterfaceItemState:enabled:state:]): Tweaked comment and added
              bug number.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50fec70c
    • rniwa@webkit.org's avatar
      2010-12-22 Ryosuke Niwa <rniwa@webkit.org> · bfb682fd
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * src/WebFrameImpl.cpp:
              (WebKit::WebFrameImpl::executeCommand):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientQt.cpp:
              (WebCore::EditorClientQt::handleKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:granularity:]):
              Takes SelectionDirection instead of SelectionController::EDirection.
              * WebView/WebFrameInternal.h:
              * WebView/WebTextCompletionController.mm:
              (-[WebTextCompletionController doCompletion]): Calls _rangeByAlteringCurrentSelection:SelectionController.
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientHaiku.cpp:
              (WebCore::EditorClientHaiku::handleKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientWinCE.cpp:
              (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Renamed SelectionController::EDirection to SelectionDirection.
      
              * WebCoreSupport/EditorClientEfl.cpp:
              (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Editor.h doesn't need to include SelectionController.h
              https://bugs.webkit.org/show_bug.cgi?id=51441
      
              Removed #include <Selection.h> from Editor.h.
              Also extracted WritingDirection.h from EditingStyle.h and renamed SelectionController::EDirection
              to SelectionDirection and moved its declaration from SelectionController.h to VisibleSelection.h
      
              * WebCore.exp.in: Signature changes.
              * WebCore.xcodeproj/project.pbxproj: Added WritingDirection.h
              * accessibility/AccessibilityRenderObject.cpp:
              (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine): Change due to SelectionDirection.
              * editing/EditingStyle.h: Removed WritingDirection and included WritingDirection.h
              * editing/Editor.cpp:
              (WebCore::Editor::deleteWithDirection): Change due to SelectionDirection.
              (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Ditto.
              (WebCore::Editor::markMisspellingsAfterTypingToWord): Ditto.
              * editing/Editor.h: Removed SelectionController.h; added DocumentMarker.h, Timer.h, VisibleSelection.h
              and WritingDirection.h; forward declared CSSMutableStyleDeclaration.
              * editing/EditorCommand.cpp:
              (WebCore::executeDeleteBackward): Change due to SelectionDirection.
              (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto.
              (WebCore::executeDeleteForward): Ditto.
              (WebCore::executeDeleteToBeginningOfLine): Ditto.
              (WebCore::executeDeleteToBeginningOfParagraph): Ditto.
              (WebCore::executeDeleteToEndOfLine): Ditto.
              (WebCore::executeDeleteToEndOfParagraph): Ditto.
              (WebCore::executeDeleteWordBackward): Ditto.
              (WebCore::executeDeleteWordForward): Ditto.
              (WebCore::executeForwardDelete): Ditto.
              (WebCore::executeMoveBackward): Ditto.
              (WebCore::executeMoveBackwardAndModifySelection): Ditto.
              (WebCore::executeMoveDown): Ditto.
              (WebCore::executeMoveDownAndModifySelection): Ditto.
              (WebCore::executeMoveForward): Ditto.
              (WebCore::executeMoveForwardAndModifySelection): Ditto.
              (WebCore::executeMoveLeft): Ditto.
              (WebCore::executeMoveLeftAndModifySelection): Ditto.
              (WebCore::executeMoveRight): Ditto.
              (WebCore::executeMoveRightAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfDocument): Ditto.
              (WebCore::executeMoveToBeginningOfDocumentAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfLine): Ditto.
              (WebCore::executeMoveToBeginningOfLineAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfParagraph): Ditto.
              (WebCore::executeMoveToBeginningOfParagraphAndModifySelection): Ditto.
              (WebCore::executeMoveToBeginningOfSentence): Ditto.
              (WebCore::executeMoveToBeginningOfSentenceAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfDocument): Ditto.
              (WebCore::executeMoveToEndOfDocumentAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfSentence): Ditto.
              (WebCore::executeMoveToEndOfSentenceAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfLine): Ditto.
              (WebCore::executeMoveToEndOfLineAndModifySelection): Ditto.
              (WebCore::executeMoveToEndOfParagraph): Ditto.
              (WebCore::executeMoveToEndOfParagraphAndModifySelection): Ditto.
              (WebCore::executeMoveParagraphBackwardAndModifySelection): Ditto.
              (WebCore::executeMoveParagraphForwardAndModifySelection): Ditto.
              (WebCore::executeMoveUp): Ditto.
              (WebCore::executeMoveUpAndModifySelection): Ditto.
              (WebCore::executeMoveWordBackward): Ditto.
              (WebCore::executeMoveWordBackwardAndModifySelection): Ditto.
              (WebCore::executeMoveWordForward): Ditto.
              (WebCore::executeMoveWordForwardAndModifySelection): Ditto.
              (WebCore::executeMoveWordLeft): Ditto.
              (WebCore::executeMoveWordLeftAndModifySelection): Ditto.
              (WebCore::executeMoveWordRight): Ditto.
              (WebCore::executeMoveWordRightAndModifySelection): Ditto.
              (WebCore::executeMoveToLeftEndOfLine): Ditto.
              (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Ditto.
              (WebCore::executeMoveToRightEndOfLine): Ditto.
              (WebCore::executeMoveToRightEndOfLineAndModifySelection): Ditto.
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::willBeModified): Takes SelectionDirection instead of EDirection.
              (WebCore::SelectionController::modify): Ditto.
              * editing/SelectionController.h: Change due to SelectionDirection.
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::deleteKeyPressed): Ditto.
              (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
              * editing/VisibleSelection.h: Added SelectionDirection, renamed and moved from EDirection
              in SelectionController.h
              * editing/WritingDirection.h: Added.
              * page/DOMSelection.cpp:
              (WebCore::DOMSelection::modify): Change due to SelectionDirection.
              (WebCore::DOMSelection::deleteFromDocument): Ditto.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::handleKeyboardSelectionMovement): Ditto.
              * page/Frame.h: Includes SelectionController.h.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bfb682fd
  19. 21 Dec, 2010 1 commit
    • andersca@apple.com's avatar
      2010-12-21 Anders Carlsson <andersca@apple.com> · d86d8421
      andersca@apple.com authored
              Reviewed by John Sullivan.
      
              Clicking missing plug-in text does not show a sheet
              https://bugs.webkit.org/show_bug.cgi?id=51403
      
              * WebCore.exp.in:
              Export symbols needed by WebKit2.
      
              * WebCore.xcodeproj/project.pbxproj:
              Make HTMLPlugInImageElement.h a private header.
      
              * html/HTMLPlugInImageElement.h:
              (WebCore::HTMLPlugInImageElement::serviceType):
              (WebCore::HTMLPlugInImageElement::url):
              Make these member functions public.
      2010-12-21  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by John Sullivan.
      
              Clicking missing plug-in text does not show a sheet
              https://bugs.webkit.org/show_bug.cgi?id=51403
      
              Update for changes to the WebPageUIClient.
      
              * MiniBrowser/mac/BrowserWindowController.m:
              (-[BrowserWindowController awakeFromNib]):
              * WebKitTestRunner/TestController.cpp:
              (WTR::createOtherPage):
              (WTR::TestController::initialize):
      2010-12-21  Anders Carlsson  <andersca@apple.com>
      
              Reviewed by John Sullivan.
      
              Clicking missing plug-in text does not show a sheet
              https://bugs.webkit.org/show_bug.cgi?id=51403
      
              * UIProcess/API/C/WKPage.h:
              Add missingPluginButtonClicked to WKPageUIClient.
      
              * UIProcess/WebPageProxy.cpp:        
              (WebKit::WebPageProxy::missingPluginButtonClicked):
              Call the WebUIClient member function.
      
              * UIProcess/WebPageProxy.messages.in:
              Add MissingPluginButtonClicked message.
      
              * UIProcess/WebUIClient.cpp:
              (WebKit::WebUIClient::missingPluginButtonClicked):
              Call the WKPageUIClient callback.
      
              * UIProcess/WebUIClient.h:
              * WebProcess/WebCoreSupport/WebChromeClient.cpp:
              (WebKit::WebChromeClient::shouldMissingPluginMessageBeButton):
              Always return true for now.
      
              (WebKit::WebChromeClient::missingPluginButtonClicked):
              Send a MissingPluginButtonClicked message.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d86d8421
  20. 16 Dec, 2010 1 commit
    • andersca@apple.com's avatar
      Save the manual plug-in stream data and redeliver it when the plug-in is initialized · 69501991
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51201
      
      Reviewed by Darin Adler.
      
      WebCore:
      
      Export SharedBuffer related symbols.
      
      * WebCore.exp.in:
      
      WebKit2:
      
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::PluginView):
      Initialize m_manualStreamState.
      
      (WebKit::PluginView::manualLoadDidReceiveResponse):
      If the plug-in hasn't been initialized, store the response.
      
      (WebKit::PluginView::manualLoadDidReceiveData):
      If the plug-in hasn't been initialized, store the data.
      
      (WebKit::PluginView::manualLoadDidFinishLoading):
      If the plug-in hasn't been initialized, update the state.
      
      (WebKit::PluginView::manualLoadDidFail):
      If the plug-in hasn't been initialized, store the error and update the state.
      
      (WebKit::PluginView::initializePlugin):
      Call redeliverManualStream.
      
      (WebKit::PluginView::redeliverManualStream):
      Redeliver the manual stream to the plug-in.
      
      * WebProcess/Plugins/PluginView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69501991
  21. 15 Dec, 2010 1 commit
    • weinig@apple.com's avatar
      WebKit2: Can't add files to an <input type=file> · 2e7a7cda
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=51087
      
      Reviewed by Anders Carlsson.
      
      WebCore: 
      
      Add exported function.
      
      * WebCore.exp.in:
      
      WebKit2: 
      
      * Scripts/webkit2/messages.py:
      Adds new types.
      
      * Shared/API/c/WKBase.h:
      Adds WKOpenPanelParametersRef and WKOpenPanelResultListenerRef.
      
      * Shared/APIObject.h:
      Adds TypeOpenPanelParameters and TypeOpenPanelResultListener.
      
      * Shared/WebOpenPanelParameters.cpp: Added.
      (WebKit::WebOpenPanelParameters::create):
      (WebKit::WebOpenPanelParameters::WebOpenPanelParameters):
      (WebKit::WebOpenPanelParameters::~WebOpenPanelParameters):
      (WebKit::WebOpenPanelParameters::Data::encode):
      (WebKit::WebOpenPanelParameters::Data::decode):
      * Shared/WebOpenPanelParameters.h: Added.
      (WebKit::WebOpenPanelParameters::allowMultipleFiles):
      (WebKit::WebOpenPanelParameters::type):
      Class representing options one can pass to open panel.
      
      * UIProcess/API/C/WKAPICast.h:
      Add casts for WebOpenPanelParameters and WebOpenPanelResultListenerProxy.
      
      * UIProcess/API/C/WKOpenPanelParameters.cpp: Added.
      (WKOpenPanelParametersGetTypeID):
      (WKOpenPanelParametersGetAllowsMultipleFiles):
      * UIProcess/API/C/WKOpenPanelParameters.h: Added.
      * UIProcess/API/C/WKOpenPanelResultListener.cpp: Added.
      (WKOpenPanelResultListenerGetTypeID):
      (WKOpenPanelResultListenerChooseFiles):
      (WKOpenPanelResultListenerCancel):
      * UIProcess/API/C/WKOpenPanelResultListener.h: Added.
      Add API wrappers.
      
      * UIProcess/API/C/WKPage.h:
      Add new UI callback, WKPageRunOpenPanelCallback.
      
      * UIProcess/API/C/WebKit2.h:
      Add includes for new API headers.
      
      * UIProcess/API/qt/qwkpage.cpp:
      (QWKPage::QWKPage):
      Stub out the runOpenPanel callback.
      
      * UIProcess/WebOpenPanelResultListenerProxy.cpp: Added.
      (WebKit::WebOpenPanelResultListenerProxy::WebOpenPanelResultListenerProxy):
      (WebKit::WebOpenPanelResultListenerProxy::~WebOpenPanelResultListenerProxy):
      (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
      (WebKit::WebOpenPanelResultListenerProxy::cancel):
      (WebKit::WebOpenPanelResultListenerProxy::invalidate):
      * UIProcess/WebOpenPanelResultListenerProxy.h: Added.
      (WebKit::WebOpenPanelResultListenerProxy::create):
      (WebKit::WebOpenPanelResultListenerProxy::type):
      Adds the listener used to choose files for <input type=file>
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::runOpenPanel):
      (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
      (WebKit::WebPageProxy::didCancelForOpenPanel):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/WebUIClient.cpp:
      (WebKit::WebUIClient::runOpenPanel):
      * UIProcess/WebUIClient.h:
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::runOpenPanel):
      * WebProcess/WebPage/WebOpenPanelResultListener.cpp: Added.
      (WebKit::WebOpenPanelResultListener::create):
      (WebKit::WebOpenPanelResultListener::WebOpenPanelResultListener):
      (WebKit::WebOpenPanelResultListener::~WebOpenPanelResultListener):
      (WebKit::WebOpenPanelResultListener::didChooseFiles):
      * WebProcess/WebPage/WebOpenPanelResultListener.h: Added.
      (WebKit::WebOpenPanelResultListener::disconnectFromPage):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::close):
      (WebKit::WebPage::setActiveOpenPanelResultListener):
      (WebKit::WebPage::didChooseFilesForOpenPanel):
      (WebKit::WebPage::didCancelForOpenPanel):
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::activeOpenPanelResultListener):
      * WebProcess/WebPage/WebPage.messages.in:
      Pipe through file choosing.
      
      * WebKit2.pro:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * win/WebKit2Generated.make:
      Add new files.
      
      WebKitTools: 
      
      * MiniBrowser/mac/BrowserWindowController.m:
      (runOpenPanel):
      (-[BrowserWindowController awakeFromNib]):
      Add simple implementation of runOpenPanel callback.
      
      * MiniBrowser/win/BrowserView.cpp:
      (BrowserView::create):
      * WebKitTestRunner/TestController.cpp:
      (WTR::createOtherPage):
      (WTR::TestController::initialize):
      Stub out runOpenPanel callback. 
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e7a7cda
  22. 13 Dec, 2010 3 commits
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End,... · a60d0cea
      hyatt@apple.com authored
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode. 
      
      Reviewed by Sam Weinig.
      
      Add logical scrolling to WebCore.  It basically mirrors physical scrolling but works in abstract logical
      directions and only converts to physical when it's time to attempt the scroll.
              
      Also fixed bugs in scrollRecursively and logicalScrollRecursively where overflow sections in containing
      frames got skipped over.
              
      Made the resetting of the inline axis scroll position on Home/End Mac-specific for overflow sections.
              
      * WebCore.exp.in:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::logicalScrollOverflow):
      (WebCore::EventHandler::scrollRecursively):
      (WebCore::EventHandler::logicalScrollRecursively):
      * page/EventHandler.h:
      * page/FrameView.cpp:
      (WebCore::FrameView::isVerticalDocument):
      (WebCore::FrameView::isFlippedDocument):
      * page/FrameView.h:
      * platform/ScrollTypes.h:
      (WebCore::logicalToPhysical):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::scroll):
      (WebCore::ScrollView::logicalScroll):
      * platform/ScrollView.h:
      (WebCore::ScrollView::isVerticalDocument):
      (WebCore::ScrollView::isFlippedDocument):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::logicalScroll):
      * rendering/RenderBox.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scroll):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::logicalScroll):
      * rendering/RenderListBox.h:
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::logicalScroll):
      * rendering/RenderTextControlSingleLine.h:
      
      WebKit2: https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PageUp/PageDwn should respect writing-mode.  Use
      logical scrolling instead of physical scrolling for those keys in WebKit2.
      
      Reviewed by Sam Weinig.
      
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::logicalScroll):
      (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
      * WebProcess/WebPage/qt/WebPageQt.cpp:
      (WebKit::logicalScroll):
      (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
      * WebProcess/WebPage/win/WebPageWin.cpp:
      (WebKit::logicalScroll):
      (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a60d0cea
    • antti@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=50758 · 6f72f782
      antti@apple.com authored
      <rdar://problem/8722094> 
      Defer loading print stylesheets
              
      Reviewed by Alexey Proskuryakov.
      
      - Make preload scanner skip stylesheets with non-screen media types.
      - Make it possible to specify non-default load priority from the client.
      - Use this mechanism to load print stylesheets using very low priority so they get loaded after everything else.
      - Move default priority code from Loader to CachedResource.
      - Move ResourceLoadScheduler::Priority enum to a separate file (as ResourceLoadPriority).
      - Add a way to make ResourceLoadScheduler load resources one at the time so the above functionality can be tested reliably.
      
      Tests: http/tests/local/link-stylesheet-load-order-preload.html
             http/tests/local/link-stylesheet-load-order.html
      
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.pro:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::cachedImage):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::HTMLNames::PreloadTask::PreloadTask):
      (WebCore::HTMLNames::PreloadTask::processAttributes):
      (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet):
      (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
      (WebCore::HTMLNames::PreloadTask::preload):
      * loader/DocumentThreadableLoader.cpp:
      (WebCore::DocumentThreadableLoader::loadRequest):
      * loader/ResourceLoadPriority.h: Added.
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
      (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
      (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
      (WebCore::ResourceLoadScheduler::scheduleLoad):
      (WebCore::ResourceLoadScheduler::servePendingRequests):
      (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
      (WebCore::ResourceLoadScheduler::HostInformation::schedule):
      (WebCore::ResourceLoadScheduler::HostInformation::remove):
      (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
      (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
      * loader/ResourceLoadScheduler.h:
      (WebCore::ResourceLoadScheduler::isSerialLoadingEnabled):
      (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled):
      (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
      * loader/cache/CachedResource.cpp:
      (WebCore::defaultPriorityForResourceType):
      (WebCore::CachedResource::CachedResource):
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::loadPriority):
      (WebCore::CachedResource::setLoadPriority):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestCSSStyleSheet):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::requestPreload):
      * loader/cache/CachedResourceLoader.h:
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::requestResource):
      * loader/cache/MemoryCache.h:
      * loader/loader.cpp:
      (WebCore::Loader::load):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=50758
      <rdar://problem/8722094> 
      Defer loading print stylesheets
              
      Reviewed by Alexey Proskuryakov.
      
      Expose SPI for DRT for making resources load serially. This is useful for testing resource load order.
      
      * WebView/WebView.mm:
      (+[WebView _setLoadResourcesSerially:forHost:]):
      * WebView/WebViewPrivate.h:
      
      WebKitTools: Add setSerializeHTTPLoads function to allow testing resource load order on OS X.
      https://bugs.webkit.org/show_bug.cgi?id=50758
      
      Reviewed by Alexey Proskuryakov.
      
      * DumpRenderTree/LayoutTestController.cpp:
      (setSerializeHTTPLoadsCallback):
      (LayoutTestController::staticFunctions):
      * DumpRenderTree/LayoutTestController.h:
      * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
      (LayoutTestController::setSerializeHTTPLoads):
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (resetDefaultsToConsistentValues):
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::setSerializeHTTPLoads):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::setSerializeHTTPLoads):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=50758
      <rdar://problem/8722094> 
      Defer loading print stylesheets
              
      Reviewed by Alexey Proskuryakov.
      
      Test load ordering.
      
      * http/tests/local/link-stylesheet-load-order-expected.txt: Added.
      * http/tests/local/link-stylesheet-load-order-preload-expected.txt: Added.
      * http/tests/local/link-stylesheet-load-order-preload.html: Added.
      * http/tests/local/link-stylesheet-load-order.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f72f782
    • mdelaney@apple.com's avatar
      2010-12-09 Matthew Delaney <mdelaney@apple.com> · 9b16ce29
      mdelaney@apple.com authored
              Reviewed by Simon Fraser.
      
              Adopt new CG API for canvas
              https://bugs.webkit.org/show_bug.cgi?id=50591
      
              * WebCoreSupport/WebSystemInterface.mm:
      2010-12-09  Matthew Delaney  <mdelaney@apple.com>
      
              Reviewed by Simon Fraser.
      
              Adopt new CG API for canvas
              https://bugs.webkit.org/show_bug.cgi?id=50591
      
              No new tests. All current layout tests are sufficient.
      
              * html/HTMLCanvasElement.cpp: Add in accelerateRendering flag for imagebuffer creation.
              * html/canvas/CanvasRenderingContext2D.cpp:
              (WebCore::CanvasRenderingContext2D::isAccelerated): Always return true if using CA on new platforms.
              (WebCore::CanvasRenderingContext2D::drawTextInternal): Use accelerateRendering for imagebuffer.
              * platform/graphics/ImageBuffer.h:
              (WebCore::ImageBuffer::create): Plumb through new flag.
              * platform/graphics/cairo/ImageBufferCairo.cpp: Update method sig.
              * platform/graphics/cg/ImageBufferCG.cpp: Switch off of accelerateRendering flag for new accelerated paths.
              * platform/graphics/cg/ImageBufferData.h: Add in surface ref
              * platform/graphics/haiku/ImageBufferHaiku.cpp: Update method sig.
              * platform/graphics/qt/ImageBufferQt.cpp: ^^
              * platform/graphics/skia/ImageBufferSkia.cpp: ^^
              * platform/graphics/wince/ImageBufferWinCE.cpp: ^^
              * platform/graphics/wx/ImageBufferWx.cpp: ^^
              * platform/mac/WebCoreSystemInterface.h: Add new method sigs
              * platform/mac/WebCoreSystemInterface.mm: ^^
              * rendering/RenderLayerBacking.cpp:
              * rendering/RenderLayerCompositor.cpp: Set acceleratesDrawing for canvas backings.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b16ce29