1. 18 Apr, 2013 1 commit
    • andersca@apple.com's avatar
      Change storage factory functions to take a PageGroup and Page respectively · e44d33f5
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114776
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Change StorageNamespace::localStorageNamespace to take a PageGroup since WebKit2 needs
      to know which local storage namespace belongs to which page group. Also remove the quota parameter from
      the sessionStorageNamespace function since that's trivial to get from the Page.
      
      * WebCore.exp.in:
      * page/Page.cpp:
      (WebCore::Page::sessionStorage):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::localStorage):
      * storage/StorageNamespace.cpp:
      (WebCore::StorageNamespace::localStorageNamespace):
      (WebCore::StorageNamespace::sessionStorageNamespace):
      * storage/StorageNamespace.h:
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::localStorageNamespace):
      (WebCore::StorageNamespaceImpl::sessionStorageNamespace):
      * storage/StorageNamespaceImpl.h:
      * storage/StorageStrategy.cpp:
      (WebCore::StorageStrategy::localStorageNamespace):
      (WebCore::StorageStrategy::sessionStorageNamespace):
      * storage/StorageStrategy.h:
      
      Source/WebKit2:
      
      Update for WebCore changes.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::localStorageNamespace):
      (WebKit::WebPlatformStrategies::sessionStorageNamespace):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
      (WebPlatformStrategies):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e44d33f5
  2. 16 Apr, 2013 2 commits
    • bdakin@apple.com's avatar
      Need a new layout milestone to notify bundle clients when the header has been · 60d628f6
      bdakin@apple.com authored
      flushed
      https://bugs.webkit.org/show_bug.cgi?id=114706
      -and corresponding-
      <rdar://problem/13657284>
      
      Reviewed by Simon Fraser.
      
      Source/WebCore: 
      
      New LayoutMilestone is DidFirstFlushForHeaderLayer.
      * page/LayoutMilestones.h:
              
      New API to allow removing a LayoutMilestone.
      * WebCore.exp.in:
      * page/Page.cpp:
      (WebCore::Page::removeLayoutMilestones):
      * page/Page.h:
      (Page):
      
      New boolean member variable m_headerLayerAwaitingFirstFlush keeps track of whether 
      we need to send the DidFirstFlushForHeaderLayer milestone.
      * rendering/RenderLayerCompositor.h:
      (RenderLayerCompositor):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::RenderLayerCompositor):
      
      Send the milestone if appropriate.
      (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
      
       Set m_headerLayerAwaitingFirstFlush to true for a newly created layer.
      (WebCore::RenderLayerCompositor::updateLayerForHeader):
      
      Source/WebKit2: 
      
      Make this new LayoutMilestone private at the API layer. 
      * Shared/API/c/WKPageLoadTypes.h:
      * Shared/API/c/WKPageLoadTypesPrivate.h: Added.
      
      Handle the new milestone.
      * Shared/API/c/WKSharedAPICast.h:
      (WebKit::toWKLayoutMilestones):
      (WebKit::toLayoutMilestones):
      
      New file to make the milestone private.
      * WebKit2.xcodeproj/project.pbxproj:
      
      Add or remove the DidFirstFlushForHeaderLayer millstone based on whether we just 
      added or removed a header.
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::setHeaderLayerWithHeight):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60d628f6
    • ap@apple.com's avatar
      Remove unused AlternativeTextClient::dismissDictationAlternativeUI · e7b48f78
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114598
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Removing dead code.
      
      * WebCore.exp.in:
      * editing/mac/AlternativeTextUIController.h: Made dismissAlternatives() private.
      * page/AlternativeTextClient.h:
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebAlternativeTextClient.h:
      * WebCoreSupport/WebAlternativeTextClient.mm:
      * WebView/WebView.mm:
      * WebView/WebViewInternal.h:
      
      Source/WebKit2:
      
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::dictationAlternatives):
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
      * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7b48f78
  3. 14 Apr, 2013 4 commits
    • weinig@apple.com's avatar
      Move Mac specific snapshotting code into its own file · 197a9e18
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114597
      
      Reviewed by Andreas Kling.
      
      Source/WebCore: 
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMRange renderedImageForcingBlackText:]):
      * page/Frame.h:
      * page/mac/FrameMac.mm:
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.h: Added.
      * page/mac/FrameSnapshottingMac.mm: Added.
      (WebCore::imageFromRect):
      (WebCore::selectionImage):
      (WebCore::rangeImage):
      (WebCore::snapshotDragImage):
      * platform/mac/ClipboardMac.mm:
      (WebCore::ClipboardMac::dragNSImage):
      Move the four Mac specific snapshotting functions in Frame.h into FrameSnapshottingMac.h/mm and turn
      them into free standing functions.
      
      Source/WebKit/mac: 
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      197a9e18
    • akling@apple.com's avatar
      Hawtfix Mac build. · 2b103758
      akling@apple.com authored
      * WebCore.exp.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b103758
    • akling@apple.com's avatar
      Only MutableStylePropertySets should be able to have CSSOM wrappers. · 0add35c4
      akling@apple.com authored
      <http://webkit.org/b/114595>
      
      Reviewed by Antti Koivisto.
      
      Tighten typing so that only MutableStylePropertySets can have CSSOM wrappers associated.
      This allows us to get rid of the out-of-line base class destructor.
      
      * WebCore.exp.in:
      * css/StylePropertySet.cpp:
      (WebCore::MutableStylePropertySet::~MutableStylePropertySet):
      (WebCore::MutableStylePropertySet::cssStyleDeclaration):
      (WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
      * css/StylePropertySet.h:
      (StylePropertySet):
      (MutableStylePropertySet):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::inlineStyleCSSOMWrapper):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0add35c4
    • akling@apple.com's avatar
      Move CSSOM classes to using MutableStylePropertySet over StylePropertySet. · b977e619
      akling@apple.com authored
      <http://webkit.org/b/114581>
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Moved ensureCSSStyleDeclaration() and ensureInlineCSSStyleDeclaration() from StylePropertySet
      to MutableStylePropertySet.
      
      StyleRule & co now return a MutableStylePropertySet* from mutableProperties() to aid with...
      
      CSSStyleDeclaration now only deals with MutableStylePropertySets. This was already the case
      in practice, we just didn't have any compile-time foot-shooting protection.
      In other words, if there's a CSSOM wrapper for a given StylePropertySet, it's guaranteed to
      be mutable, and the pointer types now reflect this.
      
      * WebCore.exp.in:
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration):
      (WebCore::StyleRuleCSSStyleDeclaration::reattach):
      * css/PropertySetCSSStyleDeclaration.h:
      (WebCore::PropertySetCSSStyleDeclaration::PropertySetCSSStyleDeclaration):
      (PropertySetCSSStyleDeclaration):
      (WebCore::StyleRuleCSSStyleDeclaration::create):
      (StyleRuleCSSStyleDeclaration):
      (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
      * css/StylePropertySet.cpp:
      (WebCore::MutableStylePropertySet::ensureCSSStyleDeclaration):
      (WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
      * css/StylePropertySet.h:
      (StylePropertySet):
      (MutableStylePropertySet):
      * css/StyleRule.cpp:
      (WebCore::StyleRule::mutableProperties):
      (WebCore::StyleRulePage::mutableProperties):
      (WebCore::StyleRuleFontFace::mutableProperties):
      (WebCore::StyleRuleViewport::mutableProperties):
      (WebCore::StyleRuleFilter::mutableProperties):
      * css/StyleRule.h:
      (StyleRule):
      (StyleRuleFontFace):
      (StyleRulePage):
      (StyleRuleViewport):
      (StyleRuleFilter):
      * css/WebKitCSSKeyframeRule.cpp:
      (WebCore::StyleKeyframe::mutableProperties):
      * css/WebKitCSSKeyframeRule.h:
      (StyleKeyframe):
      * dom/Attr.cpp:
      (WebCore::Attr::style):
      * dom/Attr.h:
      (Attr):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::removeStyleAddedByNode):
      (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
      (WebCore::EditingStyle::triStateOfStyle):
      (WebCore::styleFromMatchedRulesForElement):
      (WebCore::EditingStyle::removeStyleFromRulesAndContext):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::copyTypingStyle):
      * editing/FrameSelection.h:
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/EditorClientGtk.cpp:
      (WebKit::EditorClient::shouldApplyStyle):
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::shouldApplyStyle):
      * WebView/WebFrame.mm:
      (-[WebFrame _typingStyle]):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::shouldApplyStyle):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b977e619
  4. 13 Apr, 2013 1 commit
    • andersca@apple.com's avatar
      Add form delegate method that's invoked right before sending a submit event to a form element · e5e98f73
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114575
      
      Reviewed by Dan Bernstein.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      Export a symbol.
      
      * WebCore.xcodeproj/project.pbxproj:
      Make DOMHTMLFormElementInternal.h a private header.
      
      Source/WebKit/mac:
      
      * MigrateHeaders.make:
      Copy DOMHTMLFormElementInternal.h over to WebKit.
      
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (makeFormFieldValuesDictionary):
      New helper function that returns the values of a form in dictionary form.
      
      (WebFrameLoaderClient::dispatchWillSendSubmitEvent):
      Call the right delegate method.
      
      (WebFrameLoaderClient::dispatchWillSubmitForm):
      Use the helper function.
      
      * WebView/WebDelegateImplementationCaching.h:
      * WebView/WebDelegateImplementationCaching.mm:
      (CallFormDelegate):
      Add another overload.
      
      * WebView/WebFormDelegate.h:
      * WebView/WebFormDelegate.m:
      (-[WebFormDelegate willSendSubmitEventToForm:inFrame:withValues:]):
      Add a default implementation.
      
      Tools:
      
      Add a test.
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm: Added.
      (-[FormDelegate willSendSubmitEventToForm:inFrame:withValues:]):
      (TestWebKitAPI):
      (TestWebKitAPI::TEST):
      
      * TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
      (TestWebKitAPI::Util::toSTD):
      Don't crash when a null NSString is passed to toSTD.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5e98f73
  5. 12 Apr, 2013 2 commits
    • jer.noble@apple.com's avatar
      TimeRanges::nearest() returns incorrect results. · b6ea0d4a
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114483
      
      Reviewed by Eric Carlson.
      
      .:
      
      Add symbols needed by WebCoreTestSupport to exports list.
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      Test: media/timeranges-nearest.html
      
      TimeRanges::nearest() has had an incorrect algorithm since its
      addition, which has gone unnoticed because no media engine supports
      seekable ranges with greater than one entry, and no media engine
      seekable ranges with startTime values > 0.
      
      Fix the algorithm used to walk a TimeRanges object; return the closest
      time, not the smallest delta between range and target time.
      * html/TimeRanges.cpp:
      (TimeRanges::nearest):
      
      Add some internal functions to allow us to write LayoutTests for
      TimeRanges objects:
      * WebCore.exp.in:
      * testing/Internals.cpp:
      (WebCore::Internals::createTimeRanges):
      (WebCore::Internals::closestTimeToTimeRanges):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Source/WebKit:
      
      Add symbols needed by WebCoreTestSupport to the exports list.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/win:
      
      Add symbols needed by WebCoreTestSupport to the exports list.
      
      * WebKit.vcproj/WebKitExports.def.in:
      
      LayoutTests:
      
      * media/timeranges-nearest-expected.txt: Added.
      * media/timeranges-nearest.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6ea0d4a
    • rniwa@webkit.org's avatar
      [Mac] Enable spellchecking tests added in r141471 · ebea09c0
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108525
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Made automatic quote substitution, dash substitution, text replacement, and spelling correction
      togglable via internals object. These functions are no-op when text replacement is not used.
      
      This allows us to disable automatic spelling correction in spellcheck tests.
      
      Enabled several tests added in r141471.
      
      * WebCore.exp.in:
      * testing/Internals.cpp:
      (WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
      null whenever frame() is not null.
      (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
      (WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
      (WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
      (WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
      (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Tools:
      
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (createWebViewAndOffscreenWindow):
      (resetDefaultsToConsistentValues):
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::resetStateToConsistentValues):
      
      LayoutTests:
      
      Updated the tests not to assume spelling correction suggestions were listed in a context menu since
      only Chromium port did this.
      
      * editing/spelling/resources/util.js:
      (initSpellTest): Disable automatic text replacements.
      
      * editing/spelling/spelling-with-underscore-selection-expected.txt: Removed.
      * editing/spelling/spelling-with-underscore-selection.html: Removed.
      
      This test erroneously assumed a specific word breaking behavior that doesn't include the underscore
      when selecting a word especially since Chromium was the only port that was running these tests.
      
      * editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt: Removed.
      * editing/spelling/spelling-double-clicked-word-with-underscores.html: Removed.
      
      Ditto.
      
      * editing/spelling/spelling-should-select-single-word-expected.txt: Removed.
      * editing/spelling/spelling-should-select-single-word.html: Removed.
      
      Removed since this test doesn't do anything useful without the assertion for the context menu.
      
      * editing/spelling/spelling-double-clicked-word-expected.txt:
      * editing/spelling/spelling-double-clicked-word.html:
      * editing/spelling/spelling-exactly-selected-word-expected.txt:
      * editing/spelling/spelling-exactly-selected-word.html:
      * editing/spelling/spelling-with-punctuation-selection-expected.txt:
      * editing/spelling/spelling-with-punctuation-selection.html:
      * editing/spelling/spelling-with-whitespace-selection-expected.txt:
      * editing/spelling/spelling-with-whitespace-selection.html:
      
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      * platform/wk2/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ebea09c0
  6. 11 Apr, 2013 3 commits
    • andersca@apple.com's avatar
      Implement removing storage area items · dc5b6ca9
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114472
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Export StorageMap::removeItem.
      
      * WebCore.exp.in:
      
      Source/WebKit2:
      
      * UIProcess/Storage/StorageManager.cpp:
      (StorageManager::StorageArea):
      (WebKit::StorageManager::StorageArea::setItem):
      Rename connection to sourceConnection.
      
      (WebKit::StorageManager::StorageArea::removeItem):
      Remove the item from the map and dispatch events if needed.
      
      (WebKit::StorageManager::removeItem):
      Find the right storage area, remove the item and send back a DidRemoveItem message.
      
      * UIProcess/Storage/StorageManager.messages.in:
      Add RemoveItem message.
      
      * WebProcess/Storage/StorageAreaImpl.cpp:
      (WebKit::StorageAreaImpl::removeItem):
      Call StorageAreaMap::removeItem.
      
      * WebProcess/Storage/StorageAreaMap.cpp:
      (WebKit::StorageAreaMap::removeItem):
      Send a RemoveItem message to the storage manager.
      
      (WebKit::StorageAreaMap::didRemoveItem):
      Add empty stub.
      
      * WebProcess/Storage/StorageAreaMap.messages.in:
      Add DidRemoveItem message.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc5b6ca9
    • andersca@apple.com's avatar
      Make StorageAreaMap dispatch session storage events · 2d16cbe9
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114454
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Export storage symbols and headers needed by WebKit2.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      * WebProcess/Storage/StorageAreaMap.cpp:
      (WebKit::StorageAreaMap::dispatchStorageEvent):
      Depending on the storage area type, call dispatchSessionStorageEvent or dispatchLocalStorageEvent.
      
      (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
      Enumerate all the frames in our page and dispatch the event to the relevant ones.
      
      (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
      Add empty stub for now.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d16cbe9
    • commit-queue@webkit.org's avatar
      Incorrect evaluation of resolution media queries · 5314a9de
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114029
      
      Patch by Rune Lillesveen <rune@opera.com> on 2013-04-11
      Reviewed by Kenneth Rohde Christiansen.
      
      .:
      
      Removed setResolutionOverride from exports.
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      The implementation used the physical resolution to evaluate the
      resolution media features. Changed to use the actual CSS resolution,
      also known as the device-pixel-ratio, instead. Unified the code for
      evaluating the resolution and device-pixel-ratio media features.
      
      No new tests, covered by existing tests.
      
      * WebCore.exp.in:
      * css/CSSPrimitiveValue.h:
      (WebCore::CSSPrimitiveValue::isResolution):
      * css/MediaQueryEvaluator.cpp:
      (WebCore::evalResolution):
      (WebCore::device_pixel_ratioMediaFeatureEval):
      (WebCore::resolutionMediaFeatureEval):
      * page/Screen.cpp:
      * page/Screen.h:
      * page/Settings.cpp:
      (WebCore):
      * page/Settings.h:
      (Settings):
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::Backup::Backup):
      (WebCore::InternalSettings::Backup::restoreTo):
      * testing/InternalSettings.h:
      (Backup):
      (InternalSettings):
      * testing/InternalSettings.idl:
      
      Source/WebKit:
      
      Removed setResolutionOverride from exports.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/win:
      
      Removed setResolutionOverride from exports.
      
      * WebKit.vcproj/WebKitExports.def.in:
      
      LayoutTests:
      
      Modified tests to change CSS resolution instead of physical resolution.
      
      * fast/media/mq-resolution.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5314a9de
  7. 10 Apr, 2013 3 commits
    • bdakin@apple.com's avatar
      FindBanner matches are offset when the WKView has a header or footer · b622f319
      bdakin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114314
      -and corresponding-
      <rdar://problem/13522434>
      
      Reviewed by Simon Fraser.
      
      Source/WebCore: 
      
      There were already a few places in the code where we needed to adjust the 
      scrollOffset() to pretend that (0,0) is that the top of the Document rather than 
      the top of the header. To fix the FindBanner issues, we need to know that version 
      of the offset in a few more places, so I added a function on ScrollView to fetch 
      it called scrollOffsetRelativeToDocument().
      
      New function subtracts out the headerHeight() to treat the top of 
      the document as (0,0).
      * WebCore.exp.in:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::scrollOffsetRelativeToDocument):
      
      Use scrollOffsetRelativeToDocument() where we were previously making this 
      calculation. Also re-name an inaccurately named variable where we are actually 
      converting FROM a document offset to a ScrollableArea offset.
      (WebCore::ScrollView::windowToContents):
      * platform/ScrollView.h:
      (ScrollView):
      
      getRectToExpose needs to know about the actual visibleContentRect and the 
      visibleContentRect that is relative to the Document. So this 
      patch adds a new parameter to getRectToExpose for that purpose.
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollRectToVisible):
      (WebCore::RenderLayer::getRectToExpose):
      * rendering/RenderLayer.h:
      
      Source/WebKit2: 
      
      When calculating the matching rects, also adjust to the scroll offset that is  
      relative to the Document.
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::rectsForTextMatches):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b622f319
    • commit-queue@webkit.org's avatar
      Blob content type normalization. · 684fac8f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111380
      
      Patch by Victor Costan <costan@gmail.com> on 2013-04-10
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Tests: http/tests/fast/files/blob-constructor.js
             http/tests/fileapi/xhr-send-form-data-filename-escaping.html
             http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html
      
      * WebCore.exp.in: exported Blob::isNormalizedContentType()
      * bindings/js/JSBlobCustom.cpp:
      (WebCore::JSBlobConstructor::constructJSBlob): remove checks on Blob type, BlobBuilder will normalize it
      * fileapi/Blob.cpp:
      (BlobType): utilities for normalizing a Blob's type according to the File API spec
      (WebCore::BlobType::isValid): content type validity checks in the File API spec
      (WebCore::BlobType::normalize): implements the normalization rules in the File API spec
      (WebCore::BlobType::isNormalized): useful for ASSERTing that a Blob type has been normalized
      (WebCore): implement Blob type normalization according to the File API spec
      (WebCore::Blob::Blob): normalize the Blob type in the data URL
      (WebCore::Blob::slice): normalize the Blob type argument
      * fileapi/Blob.h:
      (BlobType): utilities for normalizing a Blob's type according to the File API spec
      (WebCore::Blob::create): assert that the deserialized Blob's type was normalized
      * fileapi/File.cpp:
      (WebCore::createBlobDataForFileWithType): assert that the File's MIME type is a normalized Blob type
      * fileapi/WebKitBlobBuilder.cpp:
      (WebCore::BlobBuilder::getBlob): normalize the Blob's type before building it
      * platform/network/BlobData.h:
      (WebCore::BlobData::setContentType): assert that the Blob type has been normalized
      * platform/network/FormData.cpp:
      (WebCore::FormData::appendKeyValuePairItems): assert that Blob's type has been normalized
      * platform/network/FormDataBuilder.cpp:
      (WebCore::FormDataBuilder::addContentTypeToMultiPartHeader): assert that the Content-Type field is normalized
      * xml/XMLHttpRequest.cpp: when responseType is blob, normalize Content-Type before passing to Blob constructor
      
      LayoutTests:
      
      * http/tests/fast/files/script-tests/blob-constructor.js: added/updated test cases for Blob type normalization
      * http/tests/fast/files/blob-constructor-expected.txt: added/updated test cases for Blob type normalization
      * http/tests/fileapi/xhr-send-form-data-filename-escaping-expected.txt: Added.
      * http/tests/fileapi/xhr-send-form-data-filename-escaping.html: Added.
      * http/tests/fileapi/xhr-send-form-data-mimetype-normalization-expected.txt: Added.
      * http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html: Added.
      * http/tests/local/formdata/resources/send-form-data-common.js:
      (dumpResponse): return the HTTP response text so it can be used in JS test code
      (sendFormData): passthrough the HTTP response text returned by dumpResponse()
      (testSendingFormData): passthrough the HTTP response text returned by dumpResponse()
      * http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt: updated expectation for invalid Content-Type
      * http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt: updated expectation for invalid Content-Type
      * http/tests/xmlhttprequest/post-blob-content-type-tests.js: updated expectation for invalid Content-Type
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      684fac8f
    • eric.carlson@apple.com's avatar
      Update all float attributes in HTMLMediaElement to double · ffd4ecb5
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113615
      
      Reviewed by Geoffrey Garen
      Patch by Aaron Colwell
      
      No new tests. Primary behavior doesn't change. Just time, playbackRate, and volume precision.
      All existing LayoutTests/media tests still pass.
      
      * WebCore.exp.in: Remove function that no longer need to be exported.
      
      * html/HTMLMediaElement.cpp: Change all float attributes to double.
      * html/HTMLMediaElement.h: Ditto.
      * html/HTMLMediaElement.idl: Ditto.
      * html/MediaController.cpp: Ditto.
      * html/MediaController.h: Ditto.
      * html/MediaControllerInterface.h: Ditto.
      * html/TimeRanges.cpp: Ditto.
      * html/TimeRanges.idl: Ditto.
      * html/shadow/MediaControlElementTypes.cpp: Ditto.
      * html/shadow/MediaControlElementTypes.h: Ditto.
      * html/shadow/MediaControlElements.cpp: Ditto.
      * html/shadow/MediaControlElements.h: Ditto.
      * html/shadow/MediaControls.cpp: Ditto.
      * html/shadow/MediaControlsApple.cpp: Ditto.
      * html/shadow/MediaControlsBlackBerry.cpp: Ditto.
      * html/shadow/MediaControlsBlackBerry.h: Ditto.
      * html/shadow/MediaControlsGtk.cpp: Ditto.
      * html/track/TextTrackCue.cpp: Ditto.
      * html/track/TextTrackCue.h: Ditto.
      * platform/Clock.h: Ditto.
      * platform/ClockGeneric.cpp: Ditto.
      * platform/ClockGeneric.h: Ditto.
      * platform/graphics/MediaPlayer.cpp: Ditto.
      * platform/graphics/MediaPlayer.h: Ditto.
      * platform/graphics/MediaPlayerPrivate.h: Ditto.
      * platform/mac/PlatformClockCA.cpp: Ditto.
      * platform/mac/PlatformClockCA.h: Ditto.
      * platform/mac/PlatformClockCM.h: Ditto.
      * platform/mac/PlatformClockCM.mm: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ffd4ecb5
  8. 08 Apr, 2013 2 commits
    • andersca@apple.com's avatar
      Add an async version of ResourceHandle::didReceiveResponse · ac87e20e
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114215
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      In order to support converting NSURLConnections to NSURLDownloads when using the network process
      we need an async version of didReceiveResponse.
      
      * WebCore.exp.in:
      * platform/network/ResourceHandleClient.cpp:
      (WebCore::ResourceHandleClient::didReceiveResponseAsync):
      Just call continueDidReceiveResponse().
      
      * platform/network/mac/ResourceHandleMac.mm:
      (WebCore::ResourceHandle::continueWillSendRequest):
      Split up a single condition in two, making it easier to see which assertion fails.
      
      (WebCore::ResourceHandle::continueDidReceiveResponse):
      Call -[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse].
      
      (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
      (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
      (WebCore::ResourceHandle::continueWillCacheResponse):
      Split up a single condition in two, making it easier to see which assertion fails.
      
      * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
      * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
      (-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]):
      Signal the semaphore.
      
      (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
      Call didReceiveResponseAsync on the main thread and wait on the semaphore.
      
      Source/WebKit2:
      
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
      Send the message and then call continueDidReceiveResponse.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac87e20e
    • jer.noble@apple.com's avatar
      Unreviewed build fix; r147892 moved an export definition out of · ed74b149
      jer.noble@apple.com authored
      a protective #ifdef, causing a link error on platforms which do
      not define that method.
      
      * WebCore.exp.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed74b149
  9. 07 Apr, 2013 2 commits
    • benjamin@webkit.org's avatar
      Remove the android code from WebCore · 11e52cf9
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114136
      
      Reviewed by Anders Carlsson.
      
      * WebCore.exp.in:
      * dom/ViewportArguments.cpp:
      (WebCore):
      (WebCore::setViewportFeature):
      (WebCore::viewportErrorMessageTemplate):
      (WebCore::viewportErrorMessageLevel):
      * dom/ViewportArguments.h:
      (WebCore::ViewportArguments::ViewportArguments):
      (ViewportArguments):
      (WebCore::ViewportArguments::operator==):
      * editing/EditingBehavior.h:
      (WebCore::EditingBehavior::shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom):
      (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
      (WebCore::EditingBehavior::shouldNavigateBackOnBackspace):
      * editing/EditingBehaviorTypes.h:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleGestureLongTap):
      (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
      * page/Settings.cpp:
      (WebCore):
      (WebCore::editingBehaviorTypeForPlatform):
      * platform/graphics/FontCache.h:
      (FontCache):
      * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
      (WebCore::FontPlatformData::getRenderStyleForStrike):
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::setEditingBehavior):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11e52cf9
    • oliver@apple.com's avatar
      Add bounds checking for WTF::Vector::operator[] · 4e3f9653
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=89600
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      Make a few JSC classes opt-out of release mode bounds checking.
      
      * assembler/AssemblerBuffer.h:
      (AssemblerBuffer):
      * assembler/AssemblerBufferWithConstantPool.h:
      (AssemblerBufferWithConstantPool):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::bytecodeOffset):
      (JSC):
      (JSC::replaceExistingEntries):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
      (JSC::CodeBlock::callReturnIndexVector):
      (JSC::CodeBlock::codeOrigins):
      (RareData):
      * bytecode/UnlinkedCodeBlock.h:
      (JSC::UnlinkedEvalCodeBlock::adoptVariables):
      (UnlinkedEvalCodeBlock):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::emitNewArray):
      (JSC::BytecodeGenerator::emitCall):
      (JSC::BytecodeGenerator::emitConstruct):
      * bytecompiler/BytecodeGenerator.h:
      (CallArguments):
      (JSC::BytecodeGenerator::instructions):
      (BytecodeGenerator):
      * bytecompiler/StaticPropertyAnalysis.h:
      (JSC::StaticPropertyAnalysis::create):
      (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis):
      (StaticPropertyAnalysis):
      * bytecompiler/StaticPropertyAnalyzer.h:
      (StaticPropertyAnalyzer):
      (JSC::StaticPropertyAnalyzer::StaticPropertyAnalyzer):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      * parser/ASTBuilder.h:
      (ASTBuilder):
      * runtime/ArgList.h:
      (MarkedArgumentBuffer):
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncSort):
      
      Source/WebCore:
      
      Fix exports
      
      * WebCore.exp.in:
      
      Source/WTF:
      
      Add a template parameter to Vector<> that controls whether
      bounds checking is performed in release builds or not.
      Defaults to crashing on overflow.
      
      * wtf/Forward.h:
      (WTF):
      * wtf/Vector.h:
      (WTF):
      (Vector):
      (WTF::Vector::at):
      (WTF::Vector::removeLast):
      (WTF::::Vector):
      (WTF::=):
      (WTF::::contains):
      (WTF::::find):
      (WTF::::reverseFind):
      (WTF::::fill):
      (WTF::::appendRange):
      (WTF::::expandCapacity):
      (WTF::::tryExpandCapacity):
      (WTF::::resize):
      (WTF::::shrink):
      (WTF::::grow):
      (WTF::::reserveCapacity):
      (WTF::::tryReserveCapacity):
      (WTF::::reserveInitialCapacity):
      (WTF::::shrinkCapacity):
      (WTF::::append):
      (WTF::::tryAppend):
      (WTF::::appendSlowCase):
      (WTF::::uncheckedAppend):
      (WTF::::appendVector):
      (WTF::::insert):
      (WTF::::prepend):
      (WTF::::remove):
      (WTF::::reverse):
      (WTF::::releaseBuffer):
      (WTF::::checkConsistency):
      (WTF::deleteAllValues):
      (WTF::swap):
      (WTF::operator==):
      (WTF::operator!=):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e3f9653
  10. 05 Apr, 2013 2 commits
    • andersca@apple.com's avatar
      Stop building Objective-C bindings for the SVG DOM · 8b914b1d
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114076
      
      Reviewed by Geoffrey Garen.
      
      The DOM SVG Objective-C bindings have never been exposed as API, and not building them cuts WebCore build by 10%.
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig:
      * Configurations/WebCore.xcconfig:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (WebCore::createElementClassMap):
      (kitClass):
      * bindings/objc/DOMCSS.mm:
      (kitClass):
      * bindings/objc/DOMEvents.mm:
      * bindings/objc/DOMSVG.h: Removed.
      * bindings/objc/DOMSVGException.h: Removed.
      * bindings/objc/DOMSVGPathSegInternal.mm: Removed.
      * bindings/objc/ExceptionHandlers.mm:
      * html/HTMLEmbedElement.idl:
      * html/HTMLFrameElement.idl:
      * html/HTMLIFrameElement.idl:
      * html/HTMLObjectElement.idl:
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig:
      * MigrateHeaders.make:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b914b1d
    • benjamin@webkit.org's avatar
      Remove WTFURL from WebKit · fee685df
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113994
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-05
      Reviewed by Ryosuke Niwa.
      
      .: 
      
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/WebCore: 
      
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/KURL.cpp:
      (WebCore):
      (WebCore::KURL::reportMemoryUsage):
      (WebCore::KURL::isSafeToSendToAnotherThread):
      * platform/KURL.h:
      (KURL):
      (WebCore):
      * platform/KURLWTFURL.cpp: Removed.
      * platform/KURLWTFURLImpl.h: Removed.
      * platform/cf/KURLCFNet.cpp:
      (WebCore::KURL::KURL):
      (WebCore::KURL::createCFURL):
      (WebCore):
      * platform/mac/KURLMac.mm:
      (WebCore::KURL::KURL):
      (WebCore::KURL::createCFURL):
      
      Source/WebKit/blackberry: 
      
      * WebCoreSupport/AboutDataUseFeatures.in:
      
      Source/WTF: 
      
      Painful, but that is for the best now :(
      
      * GNUmakefile.list.am:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/MemoryInstrumentationParsedURL.h: Removed.
      * wtf/url/api/ParsedURL.cpp: Removed.
      * wtf/url/api/ParsedURL.h: Removed.
      * wtf/url/api/URLBuffer.h: Removed.
      * wtf/url/api/URLQueryCharsetConverter.h: Removed.
      * wtf/url/api/URLString.cpp: Removed.
      * wtf/url/api/URLString.h: Removed.
      * wtf/url/src/RawURLBuffer.h: Removed.
      * wtf/url/src/URLCanon.h: Removed.
      * wtf/url/src/URLCanonEtc.cpp: Removed.
      * wtf/url/src/URLCanonFilesystemurl.cpp: Removed.
      * wtf/url/src/URLCanonFileurl.cpp: Removed.
      * wtf/url/src/URLCanonHost.cpp: Removed.
      * wtf/url/src/URLCanonICU.cpp: Removed.
      * wtf/url/src/URLCanonIP.cpp: Removed.
      * wtf/url/src/URLCanonInternal.cpp: Removed.
      * wtf/url/src/URLCanonInternal.h: Removed.
      * wtf/url/src/URLCanonMailto.cpp: Removed.
      * wtf/url/src/URLCanonPath.cpp: Removed.
      * wtf/url/src/URLCanonPathurl.cpp: Removed.
      * wtf/url/src/URLCanonQuery.cpp: Removed.
      * wtf/url/src/URLCanonRelative.cpp: Removed.
      * wtf/url/src/URLCanonStdURL.cpp: Removed.
      * wtf/url/src/URLCharacterTypes.cpp: Removed.
      * wtf/url/src/URLCharacterTypes.h: Removed.
      * wtf/url/src/URLComponent.h: Removed.
      * wtf/url/src/URLFile.h: Removed.
      * wtf/url/src/URLParse.cpp: Removed.
      * wtf/url/src/URLParse.h: Removed.
      * wtf/url/src/URLParseFile.cpp: Removed.
      * wtf/url/src/URLParseInternal.h: Removed.
      * wtf/url/src/URLSegments.cpp: Removed.
      * wtf/url/src/URLSegments.h: Removed.
      * wtf/url/src/URLUtil.cpp: Removed.
      * wtf/url/src/URLUtil.h: Removed.
      * wtf/url/src/URLUtilInternal.h: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fee685df
  11. 02 Apr, 2013 2 commits
  12. 01 Apr, 2013 1 commit
    • andersca@apple.com's avatar
      Apply changes from storage events locally · c4232f57
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111502
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Add and export a helper function for setting an item without taking
      into account the quota for the map. Also, reindent StorageMap.h
      
      * WebCore.exp.in:
      * storage/StorageMap.cpp:
      (WebCore::StorageMap::setItemIgnoringQuota):
      (WebCore):
      * storage/StorageMap.h:
      (StorageMap):
      (WebCore::StorageMap::quota):
      
      Source/WebKit2:
      
      * WebProcess/Storage/StorageAreaProxy.cpp:
      (WebKit::StorageAreaProxy::StorageAreaProxy):
      Store the security origin as a member variable.
      
      (WebKit::StorageAreaProxy::dispatchStorageEvent):
      Set the item and call the appropriate event dispatch function.
      
      (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
      (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
      Add stubs.
      
      * WebProcess/Storage/StorageAreaProxy.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4232f57
  13. 27 Mar, 2013 2 commits
    • bdakin@apple.com's avatar
      Need WK2 API to give a WebView a header and footer · 9d3bf065
      bdakin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113352
      -and corresponding-
      <rdar://problem/13383835>
      
      Reviewed by Simon Fraser.
      
      Source/WebCore: 
      
      This API will require RenderLayerCompositor to keep layers for the header and 
      footer when the exist. It also requires the scrolling machinery to know that the 
      size of the scrollable area will differ from the contentsSize when there is a 
      header or footer.
      
      setWantsLayerForHeader() and setWantsLayerForFooter() return GraphicsLayers to 
      WK2. setHeaderHeight() and setFooterHeight() set the header and footer heights
      respectively.
      * WebCore.exp.in:
      * page/FrameView.h:
      (FrameView):
      * page/FrameView.cpp:
      (WebCore::FrameView::FrameView):
      (WebCore::FrameView::setWantsLayerForHeader):
      (WebCore::FrameView::setWantsLayerForFooter):
      (WebCore::FrameView::setHeaderHeight):
      (WebCore::FrameView::setFooterHeight):
      
      Should use totalContentsSize() instead of contentsSize().
      (WebCore::FrameView::windowClipRect):
      (WebCore::FrameView::isScrollable):
      * page/SpatialNavigation.cpp:
      (WebCore::canScrollInDirection):
      
      This should also use totalContentsSize() instead of contentsSize(), and while 
      we're at it, re-name the variable and function names in the scrolling tree code 
      from contentsSize to totalContentsSize.
      * page/scrolling/ScrollingStateScrollingNode.cpp:
      (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
      (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
      (WebCore::ScrollingStateScrollingNode::dumpProperties):
      * page/scrolling/ScrollingStateScrollingNode.h:
      (WebCore::ScrollingStateScrollingNode::totalContentsSize):
      (ScrollingStateScrollingNode):
      * page/scrolling/ScrollingTreeScrollingNode.cpp:
      (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
      * page/scrolling/ScrollingTreeScrollingNode.h:
      (WebCore::ScrollingTreeScrollingNode::totalContentsSize):
      (ScrollingTreeScrollingNode):
      * page/scrolling/mac/ScrollingCoordinatorMac.h:
      (ScrollParameters):
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
      (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
      * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
      (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
      (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
      (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
      
      Use totalContentsSize() instead of contentsSize().
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::maximumScrollPosition):
      (WebCore::ScrollView::setScrollOffset):
      (WebCore::ScrollView::overhangAmount):
      (WebCore::ScrollView::updateScrollbars):
      (WebCore::ScrollView::calculateOverhangAreasForPainting):
      
      scrollOffset() represents the offset within the totalContentsSize, but that is 
      not what we need here. So subtract out the headerHeight() for the appropriate 
      value.
      (WebCore::ScrollView::windowToContents):
      (WebCore::ScrollView::contentsToWindow):
      
      Use totalContentsSize() instead of contentsSize().
      * platform/ScrollableArea.cpp:
      (WebCore::ScrollableArea::maximumScrollPosition):
      (WebCore):
      (WebCore::ScrollableArea::totalContentsSize):
      * platform/ScrollableArea.h:
      (WebCore::ScrollableArea::headerHeight):
      (WebCore::ScrollableArea::footerHeight):
      (ScrollableArea):
      * platform/mac/ScrollAnimatorMac.mm:
      (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
      (WebCore::ScrollAnimatorMac::pinnedInDirection):
      * platform/mac/ThemeMac.mm:
      (WebCore::ThemeMac::ensuredView):
      
      The rootContentLayer needs to be offset by the headerHeight().
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateRootLayerPosition):
      
      New member variables m_layerForHeader and m_layerForFooter. This code properly 
      creates and manages them.
      (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
      (WebCore::RenderLayerCompositor::updateLayerForHeader):
      (WebCore):
      (WebCore::RenderLayerCompositor::updateLayerForFooter):
      (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
      (WebCore::RenderLayerCompositor::reportMemoryUsage):
      * rendering/RenderLayerCompositor.h:
      (RenderLayerCompositor):
      
      Test infrastructure. 
      * testing/Internals.cpp:
      (WebCore::Internals::resetToConsistentState):
      (WebCore::Internals::setHeaderHeight):
      (WebCore):
      (WebCore::Internals::setFooterHeight):
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Source/WebKit2: 
      
      New API allows setting and getting layers for a header and footer.
      
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/InjectedBundle/API/c/mac: Added.
      * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added.
      * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added.
      (WKBundlePageGetHeaderLayer):
      (WKBundlePageSetHeaderLayer):
      (WKBundlePageGetFooterLayer):
      (WKBundlePageSetFooterLayer):
      * WebProcess/WebPage/WebPage.h:
      (WebPage):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::setTopOverhangImage):
      (WebKit::WebPage::setBottomOverhangImage):
      (WebKit):
      (WebKit::WebPage::getHeaderLayer):
      (WebKit::WebPage::setHeaderLayerWithHeight):
      (WebKit::WebPage::getFooterLayer):
      (WebKit::WebPage::setFooterLayerWithHeight):
      
      LayoutTests: 
      
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-expected.txt: Added.
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-with-page-scale-expected.txt: Added.
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing-with-page-scale.html: Added.
      * platform/mac-wk2/tiled-drawing/header-and-footer-hit-testing.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d3bf065
    • timothy@apple.com's avatar
      Add support for dock-to-right of the Web Inspector in the Mac port. · 3e6451ee
      timothy@apple.com authored
      Unfortunately this requires Safari changes, so it is disabled in the nightly builds.
      
      https://webkit.org/b/113341
      rdar://problem/10368152
      
      Reviewed by Joseph Pecoraro.
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * inspector/InspectorFrontendClient.h:
      (InspectorFrontendClient):
      * inspector/InspectorFrontendClientLocal.cpp:
      (WebCore):
      (WebCore::InspectorFrontendClientLocal::frontendLoaded):
      (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
      (WebCore::InspectorFrontendClientLocal::canAttachWindow):
      (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
      (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
      (WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
      * inspector/InspectorFrontendClientLocal.h:
      (InspectorFrontendClientLocal):
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::InspectorFrontendHost::setAttachedWindowWidth):
      (WebCore):
      * inspector/InspectorFrontendHost.h:
      (InspectorFrontendHost):
      * inspector/InspectorFrontendHost.idl:
      * inspector/front-end/InspectorFrontendHostStub.js:
      (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowWidth):
      * inspector/front-end/externs.js:
      (InspectorFrontendHostAPI.prototype.setAttachedWindowWidth):
      * testing/Internals.cpp:
      
      Source/WebKit/chromium:
      
      * src/InspectorFrontendClientImpl.cpp:
      (WebKit::InspectorFrontendClientImpl::changeAttachedWindowWidth):
      * src/InspectorFrontendClientImpl.h:
      (InspectorFrontendClientImpl):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/InspectorClientEfl.cpp:
      (WebCore::InspectorFrontendClientEfl::attachWindow):
      (WebCore::InspectorFrontendClientEfl::setAttachedWindowWidth):
      * WebCoreSupport/InspectorClientEfl.h:
      (InspectorFrontendClientEfl):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/InspectorClientGtk.cpp:
      (WebKit::InspectorFrontendClient::attachWindow):
      (WebKit::InspectorFrontendClient::setAttachedWindowWidth):
      * WebCoreSupport/InspectorClientGtk.h:
      (InspectorFrontendClient):
      
      Source/WebKit/mac:
      
      * Resources/Dock.pdf: Updated.
      * WebCoreSupport/WebInspectorClient.h:
      (WebInspectorFrontendClient):
      * WebCoreSupport/WebInspectorClient.mm:
      (WebInspectorFrontendClient::frontendLoaded):
      (WebInspectorFrontendClient::attachWindow):
      (WebInspectorFrontendClient::setAttachedWindowWidth):
      (-[WebInspectorWindowController attachWindow:]):
      (-[WebInspectorWindowController attach]):
      (-[WebInspectorWindowController detach]):
      * WebInspector/WebInspectorFrontend.mm:
      (-[WebInspectorFrontend attach]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/InspectorClientQt.cpp:
      (WebCore::InspectorFrontendClientQt::frontendLoaded):
      (WebCore::InspectorFrontendClientQt::attachWindow):
      (WebCore::InspectorFrontendClientQt::setAttachedWindowWidth):
      * WebCoreSupport/InspectorClientQt.h:
      (InspectorFrontendClientQt):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebInspectorClient.cpp:
      (WebInspectorFrontendClient::frontendLoaded):
      (WebInspectorFrontendClient::attachWindow):
      (WebInspectorFrontendClient::setAttachedWindowWidth):
      * WebCoreSupport/WebInspectorClient.h:
      (WebInspectorFrontendClient):
      
      Source/WebKit2:
      
      * Resources/Dock.pdf: Removed.
      * Resources/DockBottom.pdf: Added.
      * Resources/DockRight.pdf: Added.
      * Shared/WebPreferencesStore.h:
      * UIProcess/WebInspectorProxy.cpp:
      (WebKit::WebInspectorProxy::WebInspectorProxy):
      (WebKit::WebInspectorProxy::attachBottom):
      (WebKit::WebInspectorProxy::attachRight):
      (WebKit::WebInspectorProxy::attach):
      (WebKit::WebInspectorProxy::detach):
      (WebKit::WebInspectorProxy::setAttachedWindowWidth):
      (WebKit::WebInspectorProxy::createInspectorPage):
      (WebKit::WebInspectorProxy::canAttach):
      * UIProcess/WebInspectorProxy.h:
      (WebInspectorProxy):
      * UIProcess/WebInspectorProxy.messages.in:
      * UIProcess/mac/WebInspectorProxyMac.mm:
      (-[WKWebInspectorProxyObjCAdapter attachRight:]):
      (-[WKWebInspectorProxyObjCAdapter attachBottom:]):
      (-[WKWebInspectorWindow _cursorForResizeDirection:]):
      (-[WKWebInspectorWindow _customTitleFrame]):
      (WebKit::createDockButton):
      (WebKit::WebInspectorProxy::createInspectorWindow):
      (WebKit::WebInspectorProxy::platformCreateInspectorPage):
      (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
      (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
      (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
      (WebKit::WebInspectorProxy::platformAttach):
      (WebKit::WebInspectorProxy::platformDetach):
      (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
      (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
      * WebKit2.xcodeproj/project.pbxproj:
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
      (WebKit::WebInspectorFrontendClient::attachWindow):
      (WebKit::WebInspectorFrontendClient::setAttachedWindowWidth):
      * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
      (WebInspectorFrontendClient):
      * WebProcess/WebPage/WebInspector.cpp:
      (WebKit::WebInspector::attachBottom):
      (WebKit::WebInspector::attachRight):
      (WebKit::WebInspector::setAttachedWindowWidth):
      (WebKit::WebInspector::attachedBottom):
      (WebKit::WebInspector::attachedRight):
      (WebKit::WebInspector::detached):
      * WebProcess/WebPage/WebInspector.h:
      (WebInspector):
      * WebProcess/WebPage/WebInspector.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e6451ee
  14. 26 Mar, 2013 3 commits
    • timothy_horton@apple.com's avatar
      [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing · 15745130
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107539
      <rdar://problem/13032692>
      
      Reviewed by Simon Fraser.
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Update WebCoreSystemInterface.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Initially move the Page out of the window if necessary;
      Page defaults to in-window, which is wrong in many cases - we depend on
      Page::isInWindow being accurate to decide whether WebPage::setIsInWindow is actually
      a state change or not.
      (WebKit::WebPage::setIsInWindow):
      * WebProcess/WebProcess.cpp: Inform WebProcess when we go on/off screen.
      (WebKit::WebProcess::WebProcess):
      (WebKit::WebProcess::pageDidMoveOnscreen): Keep track of the number of on-screen pages in this process.
      (WebKit::WebProcess::pageWillMoveOffscreen): If the number of on-screen pages drops to zero,  clean up unused rendering resources.
      * WebProcess/WebProcess.h:
      
      Update WebSystemInterface.
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15745130
    • dino@apple.com's avatar
      When a primary plugin is restarted, also start similar plugins · cf69686e
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113265
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      If we detect a primary plugin that is snapshotted, we immediately restart it.
      When this happens, we should also restart any other plugins that
      match the same origin and type. This allows sites with a lot of
      (geometrically) nearby plugins to behave as if they are a single big plugin.
      
      Tests: plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html
             plugins/snapshotting/autoplay-similar-to-dominant.html
      
      * WebCore.exp.in: Export mimeTypeFromURL.
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Use loadedMimeType helper.
      (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): New method, which copied the
          existing code from userDidClickSnapshot.
      (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Move the similar plugin detection
          out into another function and call it.
      (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Call restartSimilarPlugIns.
      (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use loadedMimeType helper.
      * html/HTMLPlugInImageElement.h: Declaration of restartSimilarPlugIns.
      (WebCore::HTMLPlugInImageElement::loadedMimeType): New helper method since this
          code was being often duplicated.
      
      Source/WebKit2:
      
      Remember the origin of the primary plugin, so that we can
      autostart anything that is similar.
      
      * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
      (WebKit::WebPlugInClient::WebPlugInClient): Keep a pointer to the WebPage.
      (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Pass the page onto the process.
      * WebProcess/WebCoreSupport/WebPlugInClient.h:
      (WebPlugInClient): New member variable for the WebPage we were created with.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Remember the origin information
          for the primary plugin.
      (WebKit::WebPage::matchesPrimaryPlugIn): Returns true if we're seeing something that
          looks like the primary plugin.
      * WebProcess/WebPage/WebPage.h: New method matchesPrimaryPlugIn.
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check if the page thinks this is
          the primary plugin.
      * WebProcess/WebProcess.h: Accept a reference to the page in shouldPlugInAutoStartFromOrigin.
      
      LayoutTests:
      
      Two new tests. The first has one big plugin (that should be detected as the primary)
      and then a few smaller versions (which should autostart along with the primary).
      The second has one big plugin, and then adds a similar one after a short delay.
      
      * platform/mac-wk2/plugins/snapshotting/autoplay-similar-to-dominant-after-delay-expected.txt: Added.
      * platform/mac-wk2/plugins/snapshotting/autoplay-similar-to-dominant-expected.txt: Added.
      * plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html: Added.
      * plugins/snapshotting/autoplay-similar-to-dominant.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf69686e
    • ap@apple.com's avatar
      <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues · cd1fa45e
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=113256
      
              Reviewed by Brady Eidson.
      
              Added a new code path in ResourceHandle/ResourceHandleClient that doesn't need
              blocking calls. Implemented it for NSURLConnection by changing NSOperationQueue
              version to forward calls to main thread.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cd1fa45e
  15. 24 Mar, 2013 1 commit
  16. 23 Mar, 2013 1 commit
    • dmazzoni@google.com's avatar
      Implement Web Speech Synthesis for Chromium · 4998a2a6
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111695
      
      Reviewed by Adam Barth.
      
      Source/Platform:
      
      Exposes a platform API that the embedder can implement to
      provide speech synthesis for the Chromium port.
      
      * Platform.gypi:
      * chromium/public/Platform.h:
      (WebKit):
      (Platform):
      (WebKit::Platform::speechSynthesizer):
      * chromium/public/WebSpeechSynthesisUtterance.h: Added.
      (WebKit):
      (WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::~WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::operator=):
      (WebKit::WebSpeechSynthesisUtterance::isNull):
      * chromium/public/WebSpeechSynthesisVoice.h: Added.
      (WebCore):
      (WebKit):
      (WebSpeechSynthesisVoice):
      (WebKit::WebSpeechSynthesisVoice::WebSpeechSynthesisVoice):
      (WebKit::WebSpeechSynthesisVoice::~WebSpeechSynthesisVoice):
      (WebKit::WebSpeechSynthesisVoice::operator=):
      * chromium/public/WebSpeechSynthesizer.h: Added.
      (WebKit):
      (WebSpeechSynthesizer):
      (WebKit::WebSpeechSynthesizer::~WebSpeechSynthesizer):
      * chromium/public/WebSpeechSynthesizerClient.h: Added.
      (WebKit):
      (WebSpeechSynthesizerClient):
      (WebKit::WebSpeechSynthesizerClient::~WebSpeechSynthesizerClient):
      
      Source/WebCore:
      
      Straightforward implementation of speech synthesis
      for Chromium by exposing interfaces for the platform
      to implement.
      
      * Modules/speech/SpeechSynthesis.cpp:
      (WebCore::SpeechSynthesis::boundaryEventOccurred):
      (WebCore::SpeechSynthesis::didStartSpeaking):
      (WebCore::SpeechSynthesis::didPauseSpeaking):
      (WebCore::SpeechSynthesis::didResumeSpeaking):
      (WebCore::SpeechSynthesis::didFinishSpeaking):
      (WebCore::SpeechSynthesis::speakingErrorOccurred):
      (WebCore):
      * Modules/speech/SpeechSynthesis.h:
      (SpeechSynthesis):
      * Modules/speech/SpeechSynthesisUtterance.cpp:
      (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
      (WebCore):
      (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
      (WebCore::SpeechSynthesisUtterance::setVoice):
      * Modules/speech/SpeechSynthesisUtterance.h:
      (SpeechSynthesisUtterance):
      (WebCore::SpeechSynthesisUtterance::text):
      (WebCore::SpeechSynthesisUtterance::setText):
      (WebCore::SpeechSynthesisUtterance::lang):
      (WebCore::SpeechSynthesisUtterance::setLang):
      (WebCore::SpeechSynthesisUtterance::volume):
      (WebCore::SpeechSynthesisUtterance::setVolume):
      (WebCore::SpeechSynthesisUtterance::rate):
      (WebCore::SpeechSynthesisUtterance::setRate):
      (WebCore::SpeechSynthesisUtterance::pitch):
      (WebCore::SpeechSynthesisUtterance::setPitch):
      (WebCore::SpeechSynthesisUtterance::startTime):
      (WebCore::SpeechSynthesisUtterance::setStartTime):
      (WebCore::SpeechSynthesisUtterance::platformUtterance):
      * Modules/speech/SpeechSynthesisVoice.h:
      (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
      * WebCore.exp.in:
      * WebCore.gypi:
      * platform/PlatformSpeechSynthesis.h:
      (PlatformSpeechSynthesis):
      * platform/PlatformSpeechSynthesisUtterance.cpp:
      (WebCore):
      (WebCore::PlatformSpeechSynthesisUtterance::create):
      * platform/PlatformSpeechSynthesisUtterance.h:
      (PlatformSpeechSynthesisUtterance):
      (WebCore::PlatformSpeechSynthesisUtterance::setClient):
      * platform/PlatformSpeechSynthesisVoice.cpp:
      (WebCore):
      (WebCore::PlatformSpeechSynthesisVoice::create):
      (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
      * platform/PlatformSpeechSynthesisVoice.h:
      (PlatformSpeechSynthesisVoice):
      (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
      (WebCore::PlatformSpeechSynthesisVoice::setName):
      (WebCore::PlatformSpeechSynthesisVoice::setLang):
      (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
      (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
      * platform/PlatformSpeechSynthesizer.cpp:
      (WebCore::PlatformSpeechSynthesizer::create):
      (WebCore::PlatformSpeechSynthesizer::setVoiceList):
      (WebCore):
      * platform/PlatformSpeechSynthesizer.h:
      (WebKit):
      (PlatformSpeechSynthesizerClient):
      (PlatformSpeechSynthesizer):
      * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
      (WebCore):
      (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
      (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
      (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
      (WebCore::PlatformSpeechSynthesizer::speak):
      (WebCore::PlatformSpeechSynthesizer::pause):
      (WebCore::PlatformSpeechSynthesizer::resume):
      (WebCore::PlatformSpeechSynthesizer::cancel):
      * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
      (WebKit):
      (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::operator=):
      (WebKit::WebSpeechSynthesisUtterance::assign):
      (WebKit::WebSpeechSynthesisUtterance::reset):
      (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
      (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
      (WebKit::WebSpeechSynthesisUtterance::text):
      (WebKit::WebSpeechSynthesisUtterance::lang):
      (WebKit::WebSpeechSynthesisUtterance::voice):
      (WebKit::WebSpeechSynthesisUtterance::volume):
      (WebKit::WebSpeechSynthesisUtterance::rate):
      (WebKit::WebSpeechSynthesisUtterance::pitch):
      (WebKit::WebSpeechSynthesisUtterance::startTime):
      * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
      (WebKit):
      (WebKit::WebSpeechSynthesisVoice::assign):
      (WebKit::WebSpeechSynthesisVoice::reset):
      (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
      (WebKit::WebSpeechSynthesisVoice::setName):
      (WebKit::WebSpeechSynthesisVoice::setLanguage):
      (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
      (WebKit::WebSpeechSynthesisVoice::setIsDefault):
      (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
      * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
      (WebCore):
      (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
      (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
      (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
      (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
      (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
      (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
      * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
      (WebCore):
      (WebSpeechSynthesizerClientImpl):
      * platform/mac/PlatformSpeechSynthesizerMac.mm:
      (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
      (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
      (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
      (WebCore):
      (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
      (WebCore::PlatformSpeechSynthesizer::speak):
      * platform/mock/PlatformSpeechSynthesizerMock.cpp:
      (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
      (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
      (WebCore::PlatformSpeechSynthesizerMock::speak):
      * platform/mock/PlatformSpeechSynthesizerMock.h:
      (PlatformSpeechSynthesizerMock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4998a2a6
  17. 22 Mar, 2013 2 commits
    • cmuppala@apple.com's avatar
      Add runtime setting for hidden page DOM timer throttling and CSS animation suspension · a756fa61
      cmuppala@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112308
      
      Reviewed by Gavin Barraclough.
      
      Source/WebCore:
      
      No new tests.  Only adding settings to enable/disable existing features
      and hence existing tests suffice.
      
      * WebCore.exp.in:
      * page/Page.cpp:
      (WebCore::Page::setVisibilityState): Check if DOM timer throttling
      and CSS animation suspension are enabled before turning them on.
      (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): Start or stop
      DOM timer throttling based on page visibility and the new setting state.
      (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): Ditto
      for CSS animation suspension.
      * page/Page.h:
      * page/Settings.cpp:
      (WebCore::Settings::Settings): Initialize the flags for enabling hidden
      page DOM timer throttling and CSS animation suspension to false.
      (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Update flag
      and notify page that the state of the setting has changed.
      (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): Ditto.
      * page/Settings.h:
      (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
      (WebCore::Settings::hiddenPageCSSAnimationSuspensionEnabled):
      
      Source/WebKit/mac:
      
      Add private preference for enabling/disabling hidden page DOM timer
      throttling and CSS animation suspension.  The preference should be
      disabled by default to avoid compatibility issues.
      
      * WebView/WebPreferenceKeysPrivate.h:
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      (-[WebPreferences hiddenPageDOMTimerThrottlingEnabled]):
      (-[WebPreferences setHiddenPageDOMTimerThrottlingEnabled:]):
      (-[WebPreferences hiddenPageCSSAnimationSuspensionEnabled]):
      (-[WebPreferences setHiddenPageCSSAnimationSuspensionEnabled:]):
      * WebView/WebPreferencesPrivate.h:
      * WebView/WebView.mm:
      (-[WebView _preferencesChanged:]):
      
      Source/WebKit2:
      
      Add private preference for enabling/disabling hidden page DOM timer
      throttling and CSS animation suspension.  The preference should be
      enabled by default only on Mac, where WebKit2 is a private API and
      hence compatibility is less of a issue.
      
      * Shared/WebPreferencesStore.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled):
      (WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled):
      (WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled):
      (WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled):
      * UIProcess/API/C/WKPreferencesPrivate.h:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Allow
      WebKitTestRunner to override hiddenPageDOMTimerThrottlingEnabled.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      
      LayoutTests:
      
      Hidden page DOM timer throttling is disabled by default in WebKit1 and
      in WebKit2 for platforms other than Mac.  Override the preference to
      enable it during the test.
      
      * fast/dom/timer-throttling-hidden-page.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a756fa61
    • ddkilzer@apple.com's avatar
      BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS · 66f1ea52
      ddkilzer@apple.com authored
      Fixes the following build failure:
      
          Undefined symbols for architecture i386:
            "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from:
                  +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o
            "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from:
                  +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o
          ld: symbol(s) not found for architecture i386
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
      * WebCore.exp.in: Move symbols so they're exported for iOS as
      well.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66f1ea52
  18. 21 Mar, 2013 5 commits
    • beidson@apple.com's avatar
      If a previously loaded resource is later stored to the disk cache, replace the... · 21302485
      beidson@apple.com authored
      If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
      <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943
      
      Reviewed by Geoff Garen.
      
      Source/WebCore:
      
      No new tests (No change in behavior.)
      
      Give SharedBuffer the ability to replace its contents from another SharedBuffer:
      * platform/SharedBuffer.h:
      * platform/cf/SharedBufferCF.cpp:
      (WebCore::SharedBuffer:: tryReplaceContentsWithPlatformBuffer):
      
      Forward along SharedBuffer's new ability to ResourceBuffer:
      * loader/mac/ResourceBuffer.mm:
      (WebCore::ResourceBuffer:: tryReplaceSharedBufferContents):
      * loader/ResourceBuffer.h:
      
      Give CachedResource the ability to replace its encoded data buffer if appropriate:
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource:: tryReplaceEncodedData):
      * loader/cache/CachedResource.h:
      
      * WebCore.exp.in:
      
      Source/WebKit2:
      
      Add a timer that will try to look up the disk cached buffer for the resource a few seconds after the load
      completes and - if the resource is disk backed - send it to the WebProcess for sharing:
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::NetworkResourceLoader):
      (WebKit::NetworkResourceLoader::diskCacheTimerFired):
      (WebKit::NetworkResourceLoader::didReceiveResponse):
      (WebKit::NetworkResourceLoader::didReceiveData):
      (WebKit::NetworkResourceLoader::didFinishLoading):
      * NetworkProcess/NetworkResourceLoader.h:
      
      * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
      (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):
      
      Refactor SharedMemory to remove the unnecessary vm_copy and only vm_allocate when an appropriate buffer
      doesn't already exist:
      * Platform/SharedMemory.h:
      * Platform/mac/SharedMemoryMac.cpp:
      (WebKit::SharedMemory::create):
      (WebKit::SharedMemory::createFromVMBuffer):
      (WebKit::SharedMemory::~SharedMemory):
      
      Give ShareableResource the ability to create a CFDataRef that wraps "this", and return it in a SharedBuffer:
      * Shared/ShareableResource.cpp:
      (WebKit::shareableResourceDeallocate):
      (WebKit::createShareableResourceDeallocator):
      (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
      * Shared/ShareableResource.h:
      
      * Shared/WebCoreArgumentCoders.cpp: Encode/decode the cache partition for ResourceRequest.
      
      * WebProcess/Network/NetworkProcessConnection.cpp:
      (WebKit::NetworkProcessConnection::didReceiveMessage):
      (WebKit::NetworkProcessConnection::didCacheResource): Lookup the CachedResource in the WebCore memory cache
        and try to replace its encoded data with the shared mmap'ed buffer.
      * WebProcess/Network/NetworkProcessConnection.h:
      * WebProcess/Network/NetworkProcessConnection.messages.in:
      
      * WebProcess/Network/WebResourceLoader.cpp:
      (WebKit::WebResourceLoader::didReceiveResource):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21302485
    • ap@apple.com's avatar
      Move non-trivial virtual functions out of ResourceHandleClient.h · 47ed39b0
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=112950
      
              Reviewed by Brady Eidson.
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * Target.pri:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcxproj/WebCore.vcxproj:
              * WebCore.vcxproj/WebCore.vcxproj.filters:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/network/ResourceHandleClient.cpp: Added.
              (WebCore::ResourceHandleClient::ResourceHandleClient):
              (WebCore::ResourceHandleClient::~ResourceHandleClient):
              (WebCore::ResourceHandleClient::didReceiveBuffer):
              (WebCore::ResourceHandleClient::getBuffer):
              * platform/network/ResourceHandleClient.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47ed39b0
    • antonm@chromium.org's avatar
      Unreviewed, rolling out r146483. · 59a21b56
      antonm@chromium.org authored
      http://trac.webkit.org/changeset/146483
      https://bugs.webkit.org/show_bug.cgi?id=111695
      
      Source/JavaScriptCore: 
      
      Breaks debug builds.
      
      * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
      
      Source/Platform: 
      
      Breaks
      
      * Platform.gypi:
      * chromium/public/Platform.h:
      (WebKit):
      (Platform):
      * chromium/public/WebSpeechSynthesisUtterance.h: Removed.
      * chromium/public/WebSpeechSynthesisVoice.h: Removed.
      * chromium/public/WebSpeechSynthesizer.h: Removed.
      * chromium/public/WebSpeechSynthesizerClient.h: Removed.
      
      Source/WebCore: 
      
      Breaks
      
      * Modules/speech/SpeechSynthesis.cpp:
      (WebCore::SpeechSynthesis::boundaryEventOccurred):
      (WebCore::SpeechSynthesis::didStartSpeaking):
      (WebCore::SpeechSynthesis::didPauseSpeaking):
      (WebCore::SpeechSynthesis::didResumeSpeaking):
      (WebCore::SpeechSynthesis::didFinishSpeaking):
      (WebCore::SpeechSynthesis::speakingErrorOccurred):
      (WebCore):
      * Modules/speech/SpeechSynthesis.h:
      (SpeechSynthesis):
      * Modules/speech/SpeechSynthesisUtterance.cpp:
      (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
      (WebCore::SpeechSynthesisUtterance::setVoice):
      * Modules/speech/SpeechSynthesisUtterance.h:
      (WebCore::SpeechSynthesisUtterance::text):
      (WebCore::SpeechSynthesisUtterance::setText):
      (WebCore::SpeechSynthesisUtterance::lang):
      (WebCore::SpeechSynthesisUtterance::setLang):
      (WebCore::SpeechSynthesisUtterance::volume):
      (WebCore::SpeechSynthesisUtterance::setVolume):
      (WebCore::SpeechSynthesisUtterance::rate):
      (WebCore::SpeechSynthesisUtterance::setRate):
      (WebCore::SpeechSynthesisUtterance::pitch):
      (WebCore::SpeechSynthesisUtterance::setPitch):
      (WebCore::SpeechSynthesisUtterance::startTime):
      (WebCore::SpeechSynthesisUtterance::setStartTime):
      (WebCore::SpeechSynthesisUtterance::platformUtterance):
      (SpeechSynthesisUtterance):
      * Modules/speech/SpeechSynthesisVoice.h:
      (SpeechSynthesisVoice):
      * WebCore.exp.in:
      * WebCore.gypi:
      * platform/PlatformSpeechSynthesis.h:
      (PlatformSpeechSynthesis):
      * platform/PlatformSpeechSynthesisUtterance.cpp:
      * platform/PlatformSpeechSynthesisUtterance.h:
      (PlatformSpeechSynthesisUtterance):
      (WebCore::PlatformSpeechSynthesisUtterance::client):
      * platform/PlatformSpeechSynthesisVoice.cpp:
      (WebCore::PlatformSpeechSynthesisVoice::create):
      (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
      * platform/PlatformSpeechSynthesisVoice.h:
      (PlatformSpeechSynthesisVoice):
      (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
      (WebCore::PlatformSpeechSynthesisVoice::name):
      (WebCore::PlatformSpeechSynthesisVoice::lang):
      (WebCore::PlatformSpeechSynthesisVoice::localService):
      * platform/PlatformSpeechSynthesizer.cpp:
      (WebCore::PlatformSpeechSynthesizer::create):
      (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
      (WebCore):
      * platform/PlatformSpeechSynthesizer.h:
      (PlatformSpeechSynthesizerClient):
      (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
      (PlatformSpeechSynthesizer):
      * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
      * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
      * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
      * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
      * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
      * platform/mac/PlatformSpeechSynthesizerMac.mm:
      (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
      (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
      (WebCore):
      (WebCore::PlatformSpeechSynthesizer::speak):
      * platform/mock/PlatformSpeechSynthesizerMock.cpp:
      (WebCore::PlatformSpeechSynthesizerMock::create):
      (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
      (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
      (WebCore::PlatformSpeechSynthesizerMock::speak):
      * platform/mock/PlatformSpeechSynthesizerMock.h:
      (PlatformSpeechSynthesizerMock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59a21b56
    • dmazzoni@google.com's avatar
      Implement Web Speech Synthesis for Chromium · 00dd10cf
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111695
      
      Reviewed by Adam Barth.
      
      Source/Platform:
      
      Exposes a platform API that the embedder can implement to
      provide speech synthesis for the Chromium port.
      
      * Platform.gypi:
      * chromium/public/Platform.h:
      (WebKit):
      (Platform):
      (WebKit::Platform::speechSynthesizer):
      * chromium/public/WebSpeechSynthesisUtterance.h: Added.
      (WebKit):
      (WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::~WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::operator=):
      (WebKit::WebSpeechSynthesisUtterance::isNull):
      * chromium/public/WebSpeechSynthesisVoice.h: Added.
      (WebCore):
      (WebKit):
      (WebSpeechSynthesisVoice):
      (WebKit::WebSpeechSynthesisVoice::WebSpeechSynthesisVoice):
      (WebKit::WebSpeechSynthesisVoice::~WebSpeechSynthesisVoice):
      (WebKit::WebSpeechSynthesisVoice::operator=):
      * chromium/public/WebSpeechSynthesizer.h: Added.
      (WebKit):
      (WebSpeechSynthesizer):
      (WebKit::WebSpeechSynthesizer::~WebSpeechSynthesizer):
      * chromium/public/WebSpeechSynthesizerClient.h: Added.
      (WebKit):
      (WebSpeechSynthesizerClient):
      (WebKit::WebSpeechSynthesizerClient::~WebSpeechSynthesizerClient):
      
      Source/WebCore:
      
      Straightforward implementation of speech synthesis
      for Chromium by exposing interfaces for the platform
      to implement.
      
      * Modules/speech/SpeechSynthesis.cpp:
      (WebCore::SpeechSynthesis::boundaryEventOccurred):
      (WebCore::SpeechSynthesis::didStartSpeaking):
      (WebCore::SpeechSynthesis::didPauseSpeaking):
      (WebCore::SpeechSynthesis::didResumeSpeaking):
      (WebCore::SpeechSynthesis::didFinishSpeaking):
      (WebCore::SpeechSynthesis::speakingErrorOccurred):
      (WebCore):
      * Modules/speech/SpeechSynthesis.h:
      (SpeechSynthesis):
      * Modules/speech/SpeechSynthesisUtterance.cpp:
      (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
      (WebCore):
      (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
      (WebCore::SpeechSynthesisUtterance::setVoice):
      * Modules/speech/SpeechSynthesisUtterance.h:
      (SpeechSynthesisUtterance):
      (WebCore::SpeechSynthesisUtterance::text):
      (WebCore::SpeechSynthesisUtterance::setText):
      (WebCore::SpeechSynthesisUtterance::lang):
      (WebCore::SpeechSynthesisUtterance::setLang):
      (WebCore::SpeechSynthesisUtterance::volume):
      (WebCore::SpeechSynthesisUtterance::setVolume):
      (WebCore::SpeechSynthesisUtterance::rate):
      (WebCore::SpeechSynthesisUtterance::setRate):
      (WebCore::SpeechSynthesisUtterance::pitch):
      (WebCore::SpeechSynthesisUtterance::setPitch):
      (WebCore::SpeechSynthesisUtterance::startTime):
      (WebCore::SpeechSynthesisUtterance::setStartTime):
      (WebCore::SpeechSynthesisUtterance::platformUtterance):
      * Modules/speech/SpeechSynthesisVoice.h:
      (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
      * WebCore.exp.in:
      * WebCore.gypi:
      * platform/PlatformSpeechSynthesis.h:
      (PlatformSpeechSynthesis):
      * platform/PlatformSpeechSynthesisUtterance.cpp:
      (WebCore):
      (WebCore::PlatformSpeechSynthesisUtterance::create):
      * platform/PlatformSpeechSynthesisUtterance.h:
      (PlatformSpeechSynthesisUtterance):
      (WebCore::PlatformSpeechSynthesisUtterance::setClient):
      * platform/PlatformSpeechSynthesisVoice.cpp:
      (WebCore):
      (WebCore::PlatformSpeechSynthesisVoice::create):
      (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
      * platform/PlatformSpeechSynthesisVoice.h:
      (PlatformSpeechSynthesisVoice):
      (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
      (WebCore::PlatformSpeechSynthesisVoice::setName):
      (WebCore::PlatformSpeechSynthesisVoice::setLang):
      (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
      (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
      * platform/PlatformSpeechSynthesizer.cpp:
      (WebCore::PlatformSpeechSynthesizer::create):
      (WebCore::PlatformSpeechSynthesizer::setVoiceList):
      (WebCore):
      * platform/PlatformSpeechSynthesizer.h:
      (WebKit):
      (PlatformSpeechSynthesizerClient):
      (PlatformSpeechSynthesizer):
      * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
      (WebCore):
      (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
      (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
      (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
      (WebCore::PlatformSpeechSynthesizer::speak):
      (WebCore::PlatformSpeechSynthesizer::pause):
      (WebCore::PlatformSpeechSynthesizer::resume):
      (WebCore::PlatformSpeechSynthesizer::cancel):
      * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
      (WebKit):
      (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
      (WebKit::WebSpeechSynthesisUtterance::operator=):
      (WebKit::WebSpeechSynthesisUtterance::assign):
      (WebKit::WebSpeechSynthesisUtterance::reset):
      (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
      (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
      (WebKit::WebSpeechSynthesisUtterance::text):
      (WebKit::WebSpeechSynthesisUtterance::lang):
      (WebKit::WebSpeechSynthesisUtterance::voice):
      (WebKit::WebSpeechSynthesisUtterance::volume):
      (WebKit::WebSpeechSynthesisUtterance::rate):
      (WebKit::WebSpeechSynthesisUtterance::pitch):
      (WebKit::WebSpeechSynthesisUtterance::startTime):
      * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
      (WebKit):
      (WebKit::WebSpeechSynthesisVoice::assign):
      (WebKit::WebSpeechSynthesisVoice::reset):
      (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
      (WebKit::WebSpeechSynthesisVoice::setName):
      (WebKit::WebSpeechSynthesisVoice::setLanguage):
      (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
      (WebKit::WebSpeechSynthesisVoice::setIsDefault):
      (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
      * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
      (WebCore):
      (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
      (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
      (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
      (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
      (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
      (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
      (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
      * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
      (WebCore):
      (WebSpeechSynthesizerClientImpl):
      * platform/mac/PlatformSpeechSynthesizerMac.mm:
      (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
      (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
      (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
      (WebCore):
      (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
      (WebCore::PlatformSpeechSynthesizer::speak):
      * platform/mock/PlatformSpeechSynthesizerMock.cpp:
      (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
      (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
      (WebCore::PlatformSpeechSynthesizerMock::speak):
      * platform/mock/PlatformSpeechSynthesizerMock.h:
      (PlatformSpeechSynthesizerMock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00dd10cf
    • rniwa@webkit.org's avatar
      Merge MainResourceLoader into DocumentLoader · b1242489
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104969
      
      Patch by Nate Chapin <japhet@chromium.org> on 2013-03-21
      Reviewed by Adam Barth.
      
      No new tests, refactor only.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::DocumentLoader):
      (WebCore::DocumentLoader::mainResourceLoader):
      (WebCore::DocumentLoader::~DocumentLoader): Move main resource clearing from
          ~MainResourceLoader.
      (WebCore::DocumentLoader::mainResourceData):
      (WebCore::DocumentLoader::stopLoading):
      (WebCore::DocumentLoader::notifyFinished): Moved from MainResourceLoader::notifyFinished.
      (WebCore):
      (WebCore::DocumentLoader::finishedLoading):
      (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
      (WebCore::DocumentLoader::redirectReceived):
      (WebCore::DocumentLoader::continueAfterNavigationPolicy):
      (WebCore::DocumentLoader::responseReceived):
      (WebCore::DocumentLoader::continueAfterContentPolicy):
      (WebCore::DocumentLoader::reportMemoryUsage):
      (WebCore::DocumentLoader::dataReceived):
      (WebCore::DocumentLoader::clearMainResourceLoader):
      (WebCore::DocumentLoader::setDefersLoading):
      (WebCore::DocumentLoader::setMainResourceDataBufferingPolicy):
      (WebCore::DocumentLoader::addSubresourceLoader):
      (WebCore::DocumentLoader::maybeLoadEmpty):
      (WebCore::DocumentLoader::startLoadingMainResource): Don't keep separate checks
           for normal and empty loads, just use a single boolean.
      * loader/DocumentLoader.h:
      (WebCore::DocumentLoader::isLoadingMainResource):
      * loader/MainResourceLoader.cpp: Removed.
      * loader/MainResourceLoader.h: Removed.
      * loader/mac/DocumentLoaderMac.cpp:
      (WebCore::DocumentLoader::schedule):
      (WebCore::DocumentLoader::unschedule):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1242489
  19. 20 Mar, 2013 1 commit
    • commit-queue@webkit.org's avatar
      [JSC] Implement EnforceRange IDL attribute for integer conversions · 91f1ffcd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112506
      
      Patch by Michael Pruett <michael@68k.org> on 2013-03-20
      Reviewed by Kentaro Hara.
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      Implement the EnforceRange attribute for JSC bindings.
      
      The EnforceRange attribute requires a type error to be thrown when
      converting an ECMAScript number which is beyond the representable
      range of the IDL integer type.
      
      Tests: fast/js/webidl-type-mapping.html
             storage/indexeddb/cursor-advance-workers.html
             storage/indexeddb/cursor-advance.html
             storage/indexeddb/intversion-bad-parameters.html
      
      * WebCore.exp.in:
      * bindings/js/JSDOMBinding.cpp:
      (WebCore):
      (WebCore::enforceRange):
      (WebCore::toInt32EnforceRange):
      (WebCore::toUInt32EnforceRange):
      (WebCore::toInt64):
      (WebCore::toUInt64):
      * bindings/js/JSDOMBinding.h:
      (WebCore::toInt32):
      (WebCore):
      (WebCore::toUInt32):
      * bindings/scripts/CodeGeneratorJS.pm:
      (JSValueToNative):
      * bindings/scripts/test/JS/JSTestEventTarget.cpp:
      (WebCore::jsTestEventTargetPrototypeFunctionItem):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore::setJSTestObjShortAttr):
      (WebCore::setJSTestObjUnsignedShortAttr):
      (WebCore::setJSTestObjLongAttr):
      (WebCore::setJSTestObjLongLongAttr):
      (WebCore::setJSTestObjUnsignedLongLongAttr):
      (WebCore::setJSTestObjReflectedIntegralAttr):
      (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
      (WebCore::setJSTestObjReflectedCustomIntegralAttr):
      (WebCore::setJSTestObjAttrWithGetterException):
      (WebCore::setJSTestObjAttrWithSetterException):
      (WebCore::setJSTestObjWithScriptStateAttribute):
      (WebCore::setJSTestObjConditionalAttr1):
      (WebCore::setJSTestObjConditionalAttr2):
      (WebCore::setJSTestObjConditionalAttr3):
      (WebCore::setJSTestObjStrawberry):
      (WebCore::setJSTestObjId):
      (WebCore::setJSTestObjNullableLongSettableAttribute):
      (WebCore::setJSTestObjNullableStringValue):
      (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
      (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
      (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
      (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
      (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
      (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
      (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
      (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
      (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
      (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
      (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
      (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
      (WebCore::jsTestObjPrototypeFunctionStrictFunction):
      * bindings/scripts/test/JS/JSTestTypedefs.cpp:
      (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
      (WebCore::setJSTestTypedefsAttrWithGetterException):
      (WebCore::setJSTestTypedefsAttrWithSetterException):
      
      Source/WebKit/win:
      
      * WebKit.vcproj/WebKitExports.def.in:
      
      LayoutTests:
      
      * fast/js/webidl-type-mapping-expected.txt:
      * platform/chromium/fast/js/webidl-type-mapping-expected.txt: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      91f1ffcd