1. 18 Dec, 2012 40 commits
    • commit-queue@webkit.org's avatar
      EventSource should support CORS · 2df44228
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=61862
      
      Patch by Per-Erik Brodin <per-erik.brodin@ericsson.com> on 2012-12-18
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Enabled CORS in EventSource with optional constructor argument to
      indicate whether credentials should be included or not, as per the spec.
      Added didFailAccessControlCheck to ThreadableLoaderClient to be able to
      properly distinguish CORS failures from other errors.
      
      Tests: http/tests/eventsource/eventsource-cors-basic.html
             http/tests/eventsource/eventsource-cors-no-server.html
             http/tests/eventsource/eventsource-cors-with-credentials.html
      
      * loader/DocumentThreadableLoader.cpp:
      (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
      (WebCore::DocumentThreadableLoader::didReceiveResponse):
      (WebCore::DocumentThreadableLoader::preflightFailure):
      * loader/ThreadableLoaderClient.h:
      (WebCore::ThreadableLoaderClient::didFailAccessControlCheck):
      * loader/ThreadableLoaderClientWrapper.h:
      (WebCore::ThreadableLoaderClientWrapper::didFailAccessControlCheck):
      (ThreadableLoaderClientWrapper):
      * loader/WorkerThreadableLoader.cpp:
      (WebCore::workerContextDidFailAccessControlCheck):
      (WebCore):
      (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
      * loader/WorkerThreadableLoader.h:
      (MainThreadBridge):
      * page/EventSource.cpp:
      (WebCore::EventSource::EventSource):
      (WebCore::EventSource::create):
      (WebCore::EventSource::connect):
      (WebCore::EventSource::withCredentials):
      (WebCore):
      (WebCore::EventSource::didReceiveResponse):
      (WebCore::EventSource::didFailAccessControlCheck):
      (WebCore::EventSource::didFailRedirectCheck):
      (WebCore::EventSource::abortConnectionAttempt):
      (WebCore::EventSource::parseEventStreamLine):
      (WebCore::EventSource::createMessageEvent):
      * page/EventSource.h:
      (WebCore):
      (EventSource):
      (WebCore::EventSource::refEventTarget):
      (WebCore::EventSource::derefEventTarget):
      * page/EventSource.idl:
      
      LayoutTests:
      
      Added new CORS tests for EventSource. Modified existing test to verify
      that the new constructor argument can be passed to the constructor.
      
      * fast/eventsource/eventsource-constructor-expected.txt:
      * fast/eventsource/eventsource-constructor.html:
      * fast/js/constructor-length.html:
      * http/tests/eventsource/eventsource-cors-basic-expected.txt: Added.
      * http/tests/eventsource/eventsource-cors-basic.html: Added.
      * http/tests/eventsource/eventsource-cors-no-server-expected.txt: Added.
      * http/tests/eventsource/eventsource-cors-no-server.html: Added.
      * http/tests/eventsource/eventsource-cors-with-credentials-expected.txt: Added.
      * http/tests/eventsource/eventsource-cors-with-credentials.html: Added.
      * http/tests/eventsource/resources/es-cors-basic.php: Added.
      * http/tests/eventsource/resources/es-cors-credentials.php: Added.
      * platform/blackberry/fast/js/constructor-length-expected.txt:
      * platform/chromium/fast/js/constructor-length-expected.txt:
      * platform/gtk/fast/js/constructor-length-expected.txt:
      * platform/mac/fast/js/constructor-length-expected.txt:
      * platform/qt/fast/js/constructor-length-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2df44228
    • dpranke@chromium.org's avatar
      [chromium] pull in the CDM module recently added to media · 561d3c1c
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105360
      
      Unreiviewed build fix, but sanity checked by ddorwin.
      
      * DEPS:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      561d3c1c
    • commit-queue@webkit.org's avatar
      IndexedDB: Implement custom bindings for parsing options · 41e22baa
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96614
      
      Patch by Michael Pruett <michael@68k.org> on 2012-12-18
      Reviewed by Darin Adler.
      
      Parsing the options dictionary in IDBDatabase.createObjectStore()
      and IDBObjectStore.createIndex() requires custom bindings in JSC.
      
      Tests: storage/indexeddb/*
      
      * GNUmakefile.list.am:
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::createObjectStore):
      (WebCore):
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabase.idl:
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore::IDBObjectStore::createIndex):
      (WebCore):
      * Modules/indexeddb/IDBObjectStore.h:
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStore.idl:
      * UseJSC.cmake:
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::idbKeyPathFromValue): Added utility function for converting a JSValue to an IDBKeyPath.
      (WebCore):
      * bindings/js/IDBBindingUtilities.h:
      (WebCore):
      * bindings/js/JSIDBDatabaseCustom.cpp: Added.
      (WebCore):
      (WebCore::JSIDBDatabase::createObjectStore):
      * bindings/js/JSIDBObjectStoreCustom.cpp: Added.
      (WebCore):
      (WebCore::JSIDBObjectStore::createIndex):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41e22baa
    • commit-queue@webkit.org's avatar
      Cannot click an element at 2nd line or more inside inline-block in vertical writing mode. · 84fe7f51
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104775
      
      Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2012-12-18
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      If the parent of an inline box changes writing mode, then the inline box must flip incoming hit point coordinates.
      Otherwise, the coordinate will be misunderstood because the box has a different origin from its parent.
      If the InlineBox doesn't flip its offset, its children will use the wrong offset
      because they don't know their grandparent changed writing modes.
      InlineBox::nodeAtPoint should flip accumulatedOffset like InlineBox::paint().
      
      Test: fast/writing-mode/vertical-inline-block-hittest.html
      
      * rendering/InlineBox.cpp:
      (WebCore::InlineBox::nodeAtPoint):
      
      LayoutTests:
      
      Test that we can click 2nd line inside inline-block in vertical writing mode.
      
      * fast/writing-mode/vertical-inline-block-hittest-expected.txt: Added.
      * fast/writing-mode/vertical-inline-block-hittest.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84fe7f51
    • dino@apple.com's avatar
      Unreviewed attempted build fix for Chromium. · bc978b52
      dino@apple.com authored
      Insert stub methods for localized text track menu labels.
      
      * src/LocalizedStrings.cpp:
      (WebCore):
      (WebCore::textTrackClosedCaptionsText):
      (WebCore::textTrackSubtitlesText):
      (WebCore::textTrackOffText):
      (WebCore::textTrackNoLabelText):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc978b52
    • ike@apple.com's avatar
      <rdar://problem/12720539> per-pid private temporary directories for sandboxed webkit2 plugins · b41ad5d0
      ike@apple.com authored
      Reviewed by Sam Weinig, Alexey Proskuryakov, Anders Carlsson.
      
      Previously we assigned each PluginProcess a private temporary and
      cache directory based on the bundle name of the plugin that was
      running. This sometimes led to overly-long pathnames (sockets on OS X
      can only be 103 characters long), and didn't provide isolation between
      multiple running instances of the same plugin on behalf of different
      processes. We now assign each PluginProcess its own private
      temporary and cache directory regardless of which plugin it's running,
      and make an attempt to clean these up when the process terminates.
      
      We also pass the temporary directory into the sandbox
      profile as a parameter, in case the plugin profile needs to apply
      additional rules beyond the default read/write policy.
      
      * PluginProcess/mac/PluginProcessMainMac.mm:
      (WebKit::PluginProcessMain):
      * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
      (enterSandbox):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b41ad5d0
    • dpranke@chromium.org's avatar
      Pull in the opus codec sources. · def15189
      dpranke@chromium.org authored
      Unreviewed, build fix.
      
      * DEPS:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      def15189
    • simon.fraser@apple.com's avatar
      Allow position:sticky elements to be moved by the scrolling thread · 9dd70fad
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105245
      
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Allow sticky position elements to be repositioned on the scrolling thread.
      
      RenderLayerCompositor::requiresCompositingForPosition() is changed to make
      all position:-webkit-sticky elements composited.
      
      Sticky position constraints are already communicated to the ScrollingCoordinator,
      but now we created ScrollingStateStickyNodes for them, and send the constraints
      over to the scrolling thread for new ScrollingTreeStickyNodes. That allows
      their layers to be repositioned on the scrolling thread.
      
      Tests: platform/mac/tiled-drawing/sticky/sticky-horizontal.html
             platform/mac/tiled-drawing/sticky/sticky-vertical.html
      
      * WebCore.xcodeproj/project.pbxproj: Add new files.
      * page/scrolling/ScrollingConstraints.h:
      (WebCore::StickyPositionViewportConstraints::absoluteContainingBlockRect): New accessors.
      (WebCore::StickyPositionViewportConstraints::absoluteStickyBoxRect):
      (WebCore::StickyPositionViewportConstraints::operator==):
      (WebCore::StickyPositionViewportConstraints::operator!=):
      * page/scrolling/ScrollingCoordinator.h: Added StickyNode type.
      * page/scrolling/ScrollingStateFixedNode.cpp:
      (WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect):
      New virtual method that allows different kinds of nodes to sync layer positions.
      * page/scrolling/ScrollingStateFixedNode.h:
      * page/scrolling/ScrollingStateNode.h:
      (WebCore::ScrollingStateNode::isStickyNode):
      (WebCore::ScrollingStateNode::syncLayerPositionForViewportRect):
      * page/scrolling/ScrollingStateStickyNode.cpp: Added.
      (WebCore::ScrollingStateStickyNode::create):
      (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
      (WebCore::ScrollingStateStickyNode::~ScrollingStateStickyNode):
      (WebCore::ScrollingStateStickyNode::clone):
      (WebCore::ScrollingStateStickyNode::updateConstraints):
      (WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect):
      (WebCore::ScrollingStateStickyNode::dumpProperties):
      * page/scrolling/ScrollingStateStickyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateFixedNode.h.
      (ScrollingStateStickyNode):
      (WebCore::ScrollingStateStickyNode::viewportConstraints):
      (WebCore::toScrollingStateStickyNode):
      * page/scrolling/ScrollingTree.cpp:
      (WebCore::ScrollingTree::updateTreeFromStateNode):
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      (WebCore::ScrollingCoordinatorMac::attachToStateTree): Handle sticky nodes.
      (WebCore::ScrollingCoordinatorMac::syncChildPositions): Generalize to different kinds of nodes by
      calling a virtual method on the node.
      (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
      * page/scrolling/mac/ScrollingTreeFixedNode.mm:
      (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
      * page/scrolling/mac/ScrollingTreeStickyNode.h: Added.
      (ScrollingTreeStickyNode):
      * page/scrolling/mac/ScrollingTreeStickyNode.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm.
      (WebCore::ScrollingTreeStickyNode::create):
      (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
      (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
      (WebCore::ScrollingTreeStickyNode::update):
      (WebCore::operator*):
      (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
      (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
      (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
      (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
      * rendering/RenderLayerCompositor.h:
      (RenderLayerCompositor):
      
      LayoutTests:
      
      Sticky position tests that dump the scrolling tree.
      
      * platform/mac/tiled-drawing/sticky/sticky-horizontal-expected.txt: Added.
      * platform/mac/tiled-drawing/sticky/sticky-horizontal.html: Added.
      * platform/mac/tiled-drawing/sticky/sticky-vertical-expected.txt: Added.
      * platform/mac/tiled-drawing/sticky/sticky-vertical.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9dd70fad
    • dpranke@chromium.org's avatar
      Remove entries for passing tests and one bad expectation for a reftest. · 5569a487
      dpranke@chromium.org authored
      Unreviewed.
      
      * platform/chromium-mac/compositing/background-color/background-color-change-to-text-expected.png: Removed.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5569a487
    • fpizlo@apple.com's avatar
      SunSpider/date-format-tofte shouldn't compile each of the tiny worthless... · d29f9635
      fpizlo@apple.com authored
      SunSpider/date-format-tofte shouldn't compile each of the tiny worthless eval's only to OSR exit in the prologue every time
      https://bugs.webkit.org/show_bug.cgi?id=105335
      
      Reviewed by Geoffrey Garen.
      
      The first thing I did was restructure the logic of canInlineResolveOperations(),
      because I didn't understand it. This was relevant because the OSR exits are
      caused by a resolve that the DFG cannot handle.
              
      I was then going to make it so that we didn't compile the resolve at all, but
      realized that this would not be the best fix: it didn't seem sensible to me to
      be optimizing these evals after only 60 invocations. Evals should have a higher
      threshold, since they often contain code for which the baseline JIT does a
      pretty good job already (if all you've got is a single heap access or a single
      hard-to-inline call, then the baseline JIT has got you covered), and typically
      if we see one eval code block we expect to see more (from the same eval site):
      so our typical low threshold could lead to a *lot* of compilation. As such, the
      main effect of this patch is to introduce an evalThresholdMultiplier, which is
      now set to 10.
              
      This is a ~5% speed-up on data-format-tofte. No regressions anywhere as far as
      I can see.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::codeTypeThresholdMultiplier):
      (JSC):
      (JSC::CodeBlock::optimizationThresholdScalingFactor):
      (JSC::CodeBlock::exitCountThresholdForReoptimization):
      (JSC::CodeBlock::exitCountThresholdForReoptimizationFromLoop):
      * bytecode/CodeBlock.h:
      (CodeBlock):
      * dfg/DFGCapabilities.h:
      (JSC::DFG::canInlineResolveOperations):
      * dfg/DFGOSRExitCompiler.cpp:
      * runtime/Options.h:
      (JSC):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d29f9635
    • fpizlo@apple.com's avatar
      Convert indexingTypeToString to IndexingTypeDump · 0520bd41
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105351
      
      Reviewed by Mark Hahnenberg.
      
      This gets rid of another case of static char buffer[thingy].
      
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      * runtime/IndexingType.cpp:
      (JSC::dumpIndexingType):
      * runtime/IndexingType.h:
      (JSC):
      * runtime/JSValue.cpp:
      (JSC::JSValue::dump):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0520bd41
    • dgrogan@chromium.org's avatar
      IndexedDB: Split BackingStore histogram · 524a2489
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105222
      
      Reviewed by Tony Chang.
      
      Add separate histograms for Consistency, Write, and Read errors.
      Recategorize some read errors as consistency errors.
      
      Tested the preprocessor logic by manually making some functions fail
      and printing the histogram string from chromium code.
      
      Next up is logging successes to get an idea of which functions have
      the highest failure _rate_.
      
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::recordInternalError):
      (WebCore):
      (WebCore::setUpMetadata):
      (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
      (WebCore::getNewDatabaseId):
      (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
      (WebCore::IDBBackingStore::getObjectStores):
      (WebCore::setMaxObjectStoreId):
      (WebCore::IDBBackingStore::deleteObjectStore):
      (WebCore::IDBBackingStore::getRecord):
      (WebCore::getNewVersionNumber):
      (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
      (WebCore::IDBBackingStore::keyExistsInObjectStore):
      (WebCore::IDBBackingStore::getIndexes):
      (WebCore::setMaxIndexId):
      (WebCore::versionExists):
      (WebCore::IDBBackingStore::findKeyInIndex):
      (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
      (WebCore::IDBBackingStore::keyExistsInIndex):
      (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
      (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
      (WebCore::IndexKeyCursorImpl::loadCurrentRow):
      (WebCore::IndexCursorImpl::loadCurrentRow):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      524a2489
    • dino@apple.com's avatar
      Track menu needs localization · 6a507318
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105233
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Allow the UI strings in the closed captions menu to be localized, and
      profile strings for the English locale.
      
      Test: media/video-controls-captions-trackmenu-localized.html
      
      * English.lproj/Localizable.strings: Adds the four new captions strings.
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Use localized getters.
      * platform/LocalizedStrings.cpp:
      (WebCore::textTrackClosedCaptionsText): New localized string getter.
      (WebCore::textTrackSubtitlesText): Ditto.
      (WebCore::textTrackOffText): Ditto.
      (WebCore::textTrackNoLabelText): Ditto.
      * platform/LocalizedStrings.h:
      
      LayoutTests:
      
      Test to exercise the localization of strings in the captions menu.
      While I was here I merged some common code into a helper file.
      
      * media/trackmenu-test.js: Added. New helper file to run common test operations.
      * media/video-controls-captions-trackmenu-localized-expected.txt: Added.
      * media/video-controls-captions-trackmenu-localized.html: Added.
      * media/video-controls-captions-trackmenu-sorted.html: Updated to use helper functions.
      * platform/chromium/TestExpectations: Skip unimplemented test.
      * platform/efl/TestExpectations: Ditto.
      * platform/gtk/TestExpectations: Ditto.
      * platform/qt/TestExpectations: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a507318
    • dpranke@chromium.org's avatar
      Unreviewed, roll chromium deps to r173769 · 75e8291d
      dpranke@chromium.org authored
      * DEPS:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75e8291d
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=102579 · 9a0f89d9
      bdakin@apple.com authored
      [mac] Enable scaled cursors
      
      Reviewed by Dean Jackson.
      
      Source/JavaScriptCore: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore: 
      
      Not much is required to get this turned on. We just need the feature to be 
      defined, and we need to initialize m_imageScaleFactor in the Cursor constructors.
      
      * Configurations/FeatureDefines.xcconfig:
      * platform/mac/CursorMac.mm:
      (WebCore::Cursor::Cursor):
      (WebCore::Cursor::operator=):
      
      Source/WebKit/mac: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      LayoutTests: 
      
      Un-skip these tests now that the feature is enabled.
      * platform/mac/TestExpectations:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9a0f89d9
    • thakis@chromium.org's avatar
      Fix broken loop in style guide · fe5b2bf2
      thakis@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105346
      
      Reviewed by Ryosuke Niwa.
      
      Found by Sean Silva <silvas@purdue.edu>
      
      * coding/coding-style.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe5b2bf2
    • mhahnenberg@apple.com's avatar
      Restrictions on oversize CopiedBlock allocations should be relaxed · 22e209a9
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105339
      
      Reviewed by Filip Pizlo.
      
      Currently the DFG has a single branch in the inline allocation path for property/array storage where
      it checks to see if the number of bytes requested will fit in the current block. This does not match
      what the C++ allocation path does; it checks if the requested number of bytes is oversize, and then
      if it's not, it tries to fit it in the current block. The garbage collector assumes that ALL allocations
      that are greater than 16KB are in oversize blocks. Therefore, this mismatch can lead to crashes when
      the collector tries to perform some operation on a CopiedBlock.
      
      To avoid adding an extra branch to the inline allocation path in the JIT, we should make it so that
      oversize blocks are allocated on the same alignment boundaries so that there is a single mask to find
      the block header of any CopiedBlock (rather than two, one for normal and one for oversize blocks), and
      we should figure out if a block is oversize by some other method than just whatever the JSObject says
      it is. One way we could record this info Region of the block, since we allocate a one-off Region for
      oversize blocks.
      
      * heap/BlockAllocator.h:
      (JSC::Region::isCustomSize):
      (Region):
      (JSC::Region::createCustomSize):
      (JSC::Region::Region):
      (JSC::BlockAllocator::deallocateCustomSize):
      * heap/CopiedBlock.h:
      (CopiedBlock):
      (JSC::CopiedBlock::isOversize):
      (JSC):
      * heap/CopiedSpace.cpp:
      (JSC::CopiedSpace::tryAllocateOversize):
      (JSC::CopiedSpace::tryReallocate):
      (JSC::CopiedSpace::tryReallocateOversize):
      * heap/CopiedSpace.h:
      (CopiedSpace):
      * heap/CopiedSpaceInlines.h:
      (JSC::CopiedSpace::contains):
      (JSC::CopiedSpace::tryAllocate):
      (JSC):
      * heap/CopyVisitor.h:
      (CopyVisitor):
      * heap/CopyVisitorInlines.h:
      (JSC::CopyVisitor::checkIfShouldCopy):
      (JSC::CopyVisitor::didCopy):
      * heap/SlotVisitorInlines.h:
      (JSC::SlotVisitor::copyLater):
      * runtime/JSObject.cpp:
      (JSC::JSObject::copyButterfly):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22e209a9
    • jpetsovits@rim.com's avatar
      [BlackBerry] Build fix for r138024. · 39b7f542
      jpetsovits@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105199
      RIM PR 260232
      
      Reviewed by Yong Li.
      
      The clearVisibleTiles() function doesn't exist anymore
      and apparently I fail at merge conflict resolution.
      
      * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
      (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39b7f542
    • joepeck@webkit.org's avatar
      [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros) · 8d836261
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104279
      
      Reviewed by David Kilzer.
      
      Source/JavaScriptCore:
      
      Add a build phase to check the public JavaScriptCore headers for
      inappropriate macros.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      
      Source/WebCore:
      
      Set the executable as an input path on the check-* build phases.
      
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit:
      
      Add a build phase to check the public WebKit headers for
      inappropriate macros. Also set the executable as an input
      path on the other check-* build phases.
      
      * WebKit.xcodeproj/project.pbxproj:
      
      Source/WebKit2:
      
      Add a build phase to check the public WebKit2 headers for
      inappropriate macros. Also set the executable as an input
      path on the other check-* build phases.
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d836261
    • joepeck@webkit.org's avatar
      [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros) · 30024bad
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104279
      
      Reviewed by David Kilzer.
      
      Add a build phase script that checks a framework's header files for
      Platform.h and Compiler.h macros. Also add some tests for the script.
      
      * Scripts/check-for-inappropriate-macros-in-external-headers: Added.
      Script to be used in build phases to check for inappropriate macros in headers.
      
      * Scripts/test-webkitruby: Added.
      Script that can be used to run all webkitruby tests.
      
      * Scripts/test-webkit-scripts:
      Also run the ruby tests.
      
      * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/fake-data-failing-expected.txt: Added.
      * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/pass-expected.txt: Added.
      * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/passing-expected.txt: Added.
      * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Fail.h: Added.
      * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Pass.h: Added.
      * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb: Added.
      Tests for the new script.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30024bad
    • dmazzoni@google.com's avatar
      [chromium] Unreviewed gardening. · 8e53ca3c
      dmazzoni@google.com authored
      Updating the expectation and unskipping a test whose output was correct.
      
      * platform/chromium/TestExpectations:
      * platform/chromium/accessibility/legend-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e53ca3c
    • jer.noble@apple.com's avatar
      REGRESSION: Using the Exit Full Screen button in the menu bar to exit HTML5 /... · f23e90a3
      jer.noble@apple.com authored
      REGRESSION: Using the Exit Full Screen button in the menu bar to exit HTML5 / media full screen breaks Safari windows
      https://bugs.webkit.org/show_bug.cgi?id=104610
      
      Reviewed by Anders Carlsson.
      
      When a user clicks on the menu-bar exit fullscreen button, that skips notifying the document that
      the window is exiting fullscreen and tearing down the placeholder. Manually call that part of the code
      when we detect that it has been skipped.
      
      * UIProcess/mac/WKFullScreenWindowController.mm:
      (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f23e90a3
    • dmazzoni@google.com's avatar
      AX: support clickPoint in DRT for chromium · d205b923
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97359
      
      Reviewed by Chris Fleizach.
      
      Source/WebKit/chromium:
      
      Exposes the clickPoint accessibility method in WebAccessibilityObject.
      
      * public/WebAccessibilityObject.h:
      (WebAccessibilityObject):
      * src/WebAccessibilityObject.cpp:
      (WebKit::WebAccessibilityObject::clickPoint):
      (WebKit):
      
      Tools:
      
      Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that
      several more tests can pass.
      
      * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
      (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
      (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback):
      (WebTestRunner):
      (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback):
      (WebTestRunner::AccessibilityUIElement::elementAtPointCallback):
      * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
      (AccessibilityUIElement):
      
      LayoutTests:
      
      Enable four more tests now that clickPointX, clickPointY,
      and elementAtPoint are implemented for Chromium.
      
      Minor fixes to two tests to make them more robust
      across platfoms and when run in parallel.
      
      * accessibility/svg-bounds.html: Updated
      * accessibility/svg-bounds-expected.txt: Added (made cross-platform
      * accessibility/svg-remote-element.html: Updated
      * accessibility/svg-remote-element-expected.txt: Added (made cross-platform)
      * platform/mac/accessibility/svg-bounds-expected.txt: Deleted
      * platform/mac/accessibility/svg-remote-element-expected.txt: Deleted
      * platform/chromium/TestExpectations: Updated
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d205b923
    • beidson@apple.com's avatar
      WebProcesses often crash if they access the network after a NetworkProcess crash. · e986d652
      beidson@apple.com authored
      <rdar://problem/12865789> and https://bugs.webkit.org/show_bug.cgi?id=105338
      
      Reviewed by Alexey Proskuryakov.
      
      After a NetworkProcess crash we should try to re-establish a connection to a new NetworkProcess
      when it is needed.
      
      If that attempt fails, then the WebProcess should "cleanly" crash.
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::networkConnection):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e986d652
    • adamk@chromium.org's avatar
      [HTMLTemplateElement] Prevent first-level recursive <template> from resetting the implied context · 25d88258
      adamk@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=104142
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      This patch adds a stack of InsertionModes retains the chosen
      "implied context" for each template element.
      
      Based on a patch by Rafael Weinstein.
      
      Tests added to html5lib/run-template.html
      
      * html/parser/HTMLTreeBuilder.cpp:
      (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Initialize the stack appropriately for HTMLTemplateElement.innerHTML.
      (WebCore::HTMLTreeBuilder::processTemplateStartTag):
      (WebCore::HTMLTreeBuilder::processTemplateEndTag):
      (WebCore::HTMLTreeBuilder::processStartTag): Once we've figured out the insertion mode for a given <template> store it in the stack.
      (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
      (WebCore::HTMLTreeBuilder::processEndTag):
      (WebCore::HTMLTreeBuilder::processEndOfFile): Clear the stack if we hit end of file to allow the assertion in finish().
      (WebCore::HTMLTreeBuilder::finished):
      * html/parser/HTMLTreeBuilder.h:
      (HTMLTreeBuilder):
      
      LayoutTests:
      
      Added test that the original template context is retained after inner template.
      
      * html5lib/resources/template.dat:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25d88258
    • rniwa@webkit.org's avatar
      Build fix after r138045. · dc4c0bed
      rniwa@webkit.org authored
      * Scripts/webkitpy/performance_tests/perftestsrunner.py:
      (PerfTestsRunner._collect_tests): Use relative_path. We skip only when this path
      is not explicitly specified. The condition was backwards but never matched so we
      always ran the test regardless of whether it's listed in the skipped list or not.
      * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
      (test_collect_tests_with_ignored_skipped_list): Renamed so that it actually runs.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc4c0bed
    • jpetsovits@rim.com's avatar
      [BlackBerry] Clean up "frontState" vs. "geometry" naming confusion. · 75dfa06d
      jpetsovits@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105331
      RIM PR 260232
      
      Reviewed by Adam Treat.
      
      The concept of the "front state" is going away or will be
      marginalized/renamed, but I don't want to clutter upcoming
      patches with renames. So do the variable renames in here,
      once, and have future patches focus on actual behavior changes.
      
      * Api/BackingStore.cpp:
      (BlackBerry::WebKit::BackingStorePrivate::shouldDirectRenderingToWindow):
      (BlackBerry::WebKit::BackingStorePrivate::setBackingStoreRect):
      (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
      (BlackBerry::WebKit::BackingStorePrivate::render):
      (BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
      (BlackBerry::WebKit::BackingStorePrivate::compositeContents):
      (BlackBerry::WebKit::BackingStorePrivate::resetTiles):
      (BlackBerry::WebKit::BackingStorePrivate::updateTiles):
      (BlackBerry::WebKit::BackingStorePrivate::updateTilesForScrollOrNotRenderedRegion):
      (BlackBerry::WebKit::BackingStorePrivate::createSurfaces):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75dfa06d
    • commit-queue@webkit.org's avatar
      [BlackBerry] Use midpoint for fixed position heuristic · 012f9a1a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105329
      
      Patch by Andrew Lo <anlo@rim.com> on 2012-12-18
      Reviewed by Rob Buis.
      Internally reviewed by Joe Mason.
      
      Use the midpoint of the layer when determining whether the
      fixed-position layer is on the top or bottom half of the screen
      rather than the top of the layer.
      Internal PR 237073.
      
      No new tests are needed.
      
      * platform/graphics/blackberry/LayerRenderer.cpp:
      (WebCore::LayerRenderer::updateLayersRecursive):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      012f9a1a
    • commit-queue@webkit.org's avatar
      [BlackBerry] Fixed position elements should be fixed position on x axis · 7b1d556a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105333
      
      Patch by Andrew Lo <anlo@rim.com> on 2012-12-18
      Reviewed by Rob Buis.
      Internally reviewed by Joe Mason.
      
      Have fixed position elements be fixed on the X axis as well as Y.
      This better aligns with what other ports are doing.
      Internal PR237073.
      
      No new tests are needed.
      
      * platform/graphics/blackberry/LayerRenderer.cpp:
      (WebCore::LayerRenderer::updateLayersRecursive):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b1d556a
    • nghanavatian@rim.com's avatar
      [BlackBerry] Reduce calls to IMF on return · dafab1c1
      nghanavatian@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105308
      
      Reviewed by Yong Li.
      
      PR207743
      The extra calls of selection change and most importantly, end composition
      are sent incorrectly on return. This is causing our state to be reset
      every time we hit enter.
      
      Internally reviewed by Mike Fenton and Gen Mak.
      
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::InputHandler):
      (BlackBerry::WebKit::InputHandler::nodeTextChanged):
      (BlackBerry::WebKit::InputHandler::selectionChanged):
      (BlackBerry::WebKit::InputHandler::handleKeyboardInput):
      (BlackBerry::WebKit::InputHandler::shouldNotifyWebView):
      (WebKit):
      * WebKitSupport/InputHandler.h:
      (InputHandler):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dafab1c1
    • commit-queue@webkit.org's avatar
      [BlackBerry] Add -fno-exceptions to CXX_FLAGS · 9d9eed3e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105306
      
      Patch by Ming Xie <mxie@rim.com> on 2012-12-18
      Reviewed by Rob Buis.
      
      Disable exception handling. We don't have any try or catch
      constructs in our code.
      
      * Source/cmake/OptionsBlackBerry.cmake:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9d9eed3e
    • danakj@chromium.org's avatar
      [chromium] Make WebLayerTreeView::loseCompositorContext non-pure virtual · 2890e213
      danakj@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105328
      
      Reviewed by James Robinson.
      
      This allows us to decouple the chromium and webkit sides and remove this
      function entirely on each side.
      
      * chromium/public/WebLayerTreeView.h:
      (WebKit::WebLayerTreeView::loseCompositorContext):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2890e213
    • simonjam@chromium.org's avatar
      [Resource Timing] Populate responseEnd on cross-origin requests · 24c380b7
      simonjam@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105231
      
      Reviewed by Tony Gentilcore.
      
      No new tests. Covered by existing cross-origin test, but masked by iframe bug.
      
      * page/PerformanceResourceTiming.cpp:
      (WebCore::PerformanceResourceTiming::responseEnd):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24c380b7
    • eae@chromium.org's avatar
      TestWebKitAPI/Tests/WebCore/LayoutUnit fails on mac · 858a34ff
      eae@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105332
              
      Reviewed by Levi Weintraub.
              
      Create new test suite for LayoutUnit tests as the KURL tests are
      of the incompatible TEST_F type.
      
      * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
      (TestWebKitAPI):
      (TestWebKitAPI::TEST_F):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      858a34ff
    • commit-queue@webkit.org's avatar
      Enable media stream on Android for Chromium · 2e96f88a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=102545
      
      Patch by Wei Jia <wjia@chromium.org> on 2012-12-18
      Reviewed by Eric Seidel.
      
      Put all webrtc related stuff under one flag "enable_webrtc" which is set to 1
      on Linux/Windows/Mac and 0 on Android.
      
      * features.gypi:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e96f88a
    • mvujovic@adobe.com's avatar
      [ANGLE] Use of uninitialized memory in ArrayBoundsClamper · 4cbd2527
      mvujovic@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105218
      
      Reviewed by Dean Jackson.
      
      TIntermBinary::addIndexClamp is uninitialized when the compile flag
      SH_CLAMP_INDIRECT_ARRAY_BOUNDS is not set. Then, addIndexClamp is used in OutputGLSLBase.
      CSS Shaders needs to do a first validation pass without the SH_CLAMP_INDIRECT_ARRAY_BOUNDS
      flag and its effects. However, sometimes addIndexClamp is true, which inserts clamping code
      that causes a shader to fail compilation at the WebGL level.
      
      * src/compiler/intermediate.h:
      (TIntermBinary::TIntermBinary):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4cbd2527
    • commit-queue@webkit.org's avatar
      [chromium] Fix include style in WebTransformOperations.h · b08f624c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105259
      
      Patch by James Robinson <jamesr@chromium.org> on 2012-12-18
      Reviewed by Adrienne Walker.
      
      Changes include of WebTransformationMatrix.h from '#include <public/..h>' to '#include "....h". The latter
      always works, since #include "foo.h" always finds foo.h in the same directory, and doesn't require all
      downstream users of this header to have Source/Platform/chromium/ on the include path.
      
      * chromium/public/WebTransformOperations.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b08f624c
    • timothy_horton@apple.com's avatar
      Unreviewed build fix after http://trac.webkit.org/changeset/138041 · 71cc8568
      timothy_horton@apple.com authored
      Need to cast int64_t to int32_t to avoid a warning on some compilers.
      
      * platform/LayoutUnit.h:
      (WebCore::boundedMultiply):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71cc8568
    • rniwa@webkit.org's avatar
      Running a skipped test with run-perf-tests could alert the user · 2b8143d8
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105219
      
      Reviewed by Eric Seidel.
      
      Force run skipped performance tests explicitly specified in the command line.
      Also warn the user when the specified paths don't exist.
      
      * Scripts/webkitpy/layout_tests/port/base.py:
      (Port.relative_test_filename):
      * Scripts/webkitpy/performance_tests/perftestsrunner.py:
      (PerfTestsRunner._parse_args):
      (PerfTestsRunner._collect_tests):
      * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
      (test_collect_tests_with_skipped_list_and_files):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b8143d8
    • commit-queue@webkit.org's avatar
      Chrome Android java output is too verbose · d1e93537
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105247
      
      Patch by Yaron Friedman <yfriedman@chromium.org> on 2012-12-18
      Reviewed by Tony Chang.
      
      Pass -quiet to ant to suppress extraneous output.
      
      Source/WebKit/chromium:
      
      * WebKitUnitTests.gyp:
      
      Tools:
      
      * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
      * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1e93537