1. 03 Oct, 2012 31 commits
    • abarth@webkit.org's avatar
      Crash when calling document.open during unload · f12783fe
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98287
      
      Reviewed by Nate Chapin.
      
      Source/WebCore:
      
      Calling document.open results in us nulling out m_documentLoader. This
      code doesn't properly handle that case and crashes.
      
      Test: fast/parser/document-open-in-unload.html
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::commitProvisionalLoad):
      
      LayoutTests:
      
      Test that we don't crash when calling document.open during the unload event.
      
      * fast/parser/document-open-in-unload-expected.txt: Added.
      * fast/parser/document-open-in-unload.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f12783fe
    • benjamin@webkit.org's avatar
      Element::computeInheritedLanguage: evaluate the while() condition after fetching the string · 47757986
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98220
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-10-03
      Reviewed by Andreas Kling.
      
      * dom/Element.cpp:
      (WebCore::Element::computeInheritedLanguage):
      The condition is never false on the first execution. Move the condition to the
      end of the loop for fun and profit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47757986
    • hans@chromium.org's avatar
      Speech JavaScript API: Add SpeechRecognition.interimResults attribute · ec32fe67
      hans@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98279
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Add the interimResults attribute and pass it to the embedder. It was
      added to the spec draft in
      http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c
      
      Tested in fast/speech/scripted/basics.html
      
      * Modules/speech/SpeechRecognition.cpp:
      (WebCore::SpeechRecognition::start):
      (WebCore::SpeechRecognition::SpeechRecognition):
      * Modules/speech/SpeechRecognition.h:
      (WebCore::SpeechRecognition::interimResults):
      (WebCore::SpeechRecognition::setInterimResults):
      * Modules/speech/SpeechRecognition.idl:
      * Modules/speech/SpeechRecognitionClient.h:
      (SpeechRecognitionClient):
      * Modules/speech/SpeechRecognitionController.h:
      (WebCore::SpeechRecognitionController::start):
      
      Source/WebKit/chromium:
      
      Plumb interimResults through to Chromium.
      
      * public/WebSpeechRecognitionParams.h:
      (WebKit::WebSpeechRecognitionParams::WebSpeechRecognitionParams):
      (WebKit::WebSpeechRecognitionParams::interimResults):
      (WebSpeechRecognitionParams):
      * src/SpeechRecognitionClientProxy.cpp:
      (WebKit::SpeechRecognitionClientProxy::start):
      * src/SpeechRecognitionClientProxy.h:
      (SpeechRecognitionClientProxy):
      
      LayoutTests:
      
      Update test to check for the interimResults attribute.
      
      * fast/speech/scripted/basics-expected.txt:
      * fast/speech/scripted/basics.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec32fe67
    • hans@chromium.org's avatar
      Speech JavaScript API: Remove resultdeleted event · bf790a87
      hans@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98272
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Remove the resultdeleted event. This was never used, and was removed
      from the spec draft in
      http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
      
      The fast/speech/scripted/basics.html test is updated to reflect this.
      
      * Modules/speech/SpeechRecognition.cpp:
      * Modules/speech/SpeechRecognition.h:
      (SpeechRecognition):
      * Modules/speech/SpeechRecognition.idl:
      * Modules/speech/SpeechRecognitionEvent.cpp:
      * Modules/speech/SpeechRecognitionEvent.h:
      (SpeechRecognitionEvent):
      * dom/EventNames.h:
      (WebCore):
      
      Source/WebKit/chromium:
      
      Remove didDeleteResult. This was never used, and has been removed from
      the spec draft.
      
      * public/WebSpeechRecognizerClient.h:
      * src/SpeechRecognitionClientProxy.cpp:
      * src/SpeechRecognitionClientProxy.h:
      (SpeechRecognitionClientProxy):
      
      LayoutTests:
      
      Update layout test not to check for onresultdeleted event handler.
      
      * fast/speech/scripted/basics-expected.txt:
      * fast/speech/scripted/basics.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf790a87
    • mhahnenberg@apple.com's avatar
      Delayed structure sweep can leak structures without bound · 30738a77
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96546
      
      Reviewed by Geoffrey Garen.
      
      This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
      allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
      those objects with destructors and with immortal structures, and those objects with destructors that don't have 
      immortal structures. All of the objects of the third type (destructors without immortal structures) now 
      inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
      the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
      
      Source/JavaScriptCore: 
      
      * API/JSCallbackConstructor.cpp: Use JSDestructibleObject for JSCallbackConstructor.
      (JSC):
      (JSC::JSCallbackConstructor::JSCallbackConstructor):
      * API/JSCallbackConstructor.h:
      (JSCallbackConstructor):
      * API/JSCallbackObject.cpp: Inherit from JSDestructibleObject for normal JSCallbackObjects and use a finalizer for 
      JSCallbackObject<JSGlobalObject>, since JSGlobalObject also uses a finalizer.
      (JSC):
      (JSC::::create): We need to move the create function for JSCallbackObject<JSGlobalObject> out of line so we can add 
      the finalizer for it. We don't want to add the finalizer is something like finishCreation in case somebody decides 
      to subclass this. We use this same technique for many other subclasses of JSGlobalObject.
      (JSC::::createStructure):
      * API/JSCallbackObject.h:
      (JSCallbackObject):
      (JSC):
      * API/JSClassRef.cpp: Change all the JSCallbackObject<JSNonFinalObject> to use JSDestructibleObject instead.
      (OpaqueJSClass::prototype):
      * API/JSObjectRef.cpp: Ditto.
      (JSObjectMake):
      (JSObjectGetPrivate):
      (JSObjectSetPrivate):
      (JSObjectGetPrivateProperty):
      (JSObjectSetPrivateProperty):
      (JSObjectDeletePrivateProperty):
      * API/JSValueRef.cpp: Ditto.
      (JSValueIsObjectOfClass):
      * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
      * JSCTypedArrayStubs.h:
      (JSC):
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGSpeculativeJIT.h: Use the proper allocator type when doing inline allocation in the DFG.
      (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):
      (JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
      * heap/Heap.cpp:
      (JSC):
      * heap/Heap.h: Add accessors for the various types of allocators now. Also remove the isSafeToSweepStructures function 
      since it's always safe to sweep Structures now.
      (JSC::Heap::allocatorForObjectWithNormalDestructor): 
      (JSC::Heap::allocatorForObjectWithImmortalStructureDestructor):
      (Heap):
      (JSC::Heap::allocateWithNormalDestructor):
      (JSC):
      (JSC::Heap::allocateWithImmortalStructureDestructor):
      * heap/IncrementalSweeper.cpp: Remove all the logic to detect when it's safe to sweep Structures from the 
      IncrementalSweeper since it's always safe to sweep Structures now.
      (JSC::IncrementalSweeper::IncrementalSweeper):
      (JSC::IncrementalSweeper::sweepNextBlock):
      (JSC::IncrementalSweeper::startSweeping):
      (JSC::IncrementalSweeper::willFinishSweeping):
      (JSC):
      * heap/IncrementalSweeper.h:
      (IncrementalSweeper):
      * heap/MarkedAllocator.cpp: Remove the logic that was preventing us from sweeping Structures if it wasn't safe. Add 
      tracking of the specific destructor type of allocator. 
      (JSC::MarkedAllocator::tryAllocateHelper):
      (JSC::MarkedAllocator::allocateBlock):
      * heap/MarkedAllocator.h:
      (JSC::MarkedAllocator::destructorType):
      (MarkedAllocator):
      (JSC::MarkedAllocator::MarkedAllocator):
      (JSC::MarkedAllocator::init):
      * heap/MarkedBlock.cpp: Add all the destructor type stuff to MarkedBlocks so that we do the right thing when sweeping. 
      We also use the stored destructor type to determine the right thing to do in all JSCell::classInfo() calls.
      (JSC::MarkedBlock::create):
      (JSC::MarkedBlock::MarkedBlock):
      (JSC):
      (JSC::MarkedBlock::specializedSweep):
      (JSC::MarkedBlock::sweep):
      (JSC::MarkedBlock::sweepHelper):
      * heap/MarkedBlock.h:
      (JSC):
      (JSC::MarkedBlock::allocator):
      (JSC::MarkedBlock::destructorType):
      * heap/MarkedSpace.cpp: Add the new destructor allocators to MarkedSpace.
      (JSC::MarkedSpace::MarkedSpace):
      (JSC::MarkedSpace::resetAllocators):
      (JSC::MarkedSpace::canonicalizeCellLivenessData):
      (JSC::MarkedSpace::isPagedOut):
      (JSC::MarkedSpace::freeBlock):
      * heap/MarkedSpace.h:
      (MarkedSpace):
      (JSC::MarkedSpace::immortalStructureDestructorAllocatorFor):
      (JSC::MarkedSpace::normalDestructorAllocatorFor):
      (JSC::MarkedSpace::allocateWithImmortalStructureDestructor):
      (JSC::MarkedSpace::allocateWithNormalDestructor):
      (JSC::MarkedSpace::forEachBlock):
      * heap/SlotVisitor.cpp: Add include because the symbol was needed in an inlined function.
      * jit/JIT.h: Make sure we use the correct allocator when doing inline allocations in the baseline JIT.
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateBasicJSObject):
      (JSC::JIT::emitAllocateJSFinalObject):
      (JSC::JIT::emitAllocateJSArray):
      * jsc.cpp: 
      (GlobalObject::create): Add finalizer here since JSGlobalObject needs to use a finalizer instead of inheriting from 
      JSDestructibleObject.
      * runtime/Arguments.cpp: Inherit from JSDestructibleObject.
      (JSC):
      * runtime/Arguments.h:
      (Arguments):
      (JSC::Arguments::Arguments):
      * runtime/ErrorPrototype.cpp: Added an assert to make sure we have a trivial destructor.
      (JSC):
      * runtime/Executable.h: Indicate that all of the Executable* classes have immortal Structures.
      (JSC):
      * runtime/InternalFunction.cpp: Inherit from JSDestructibleObject.
      (JSC):
      (JSC::InternalFunction::InternalFunction):
      * runtime/InternalFunction.h:
      (InternalFunction):
      * runtime/JSCell.h: Added two static bools, needsDestruction and hasImmortalStructure, that classes can override 
      to indicate at compile time which part of the heap they should be allocated in.
      (JSC::allocateCell): Use the appropriate allocator depending on the destructor type.
      * runtime/JSDestructibleObject.h: Added. New class that stores the ClassInfo of any subclass so that it can be 
      accessed safely when the object is being destroyed.
      (JSC):
      (JSDestructibleObject):
      (JSC::JSDestructibleObject::classInfo):
      (JSC::JSDestructibleObject::JSDestructibleObject):
      (JSC::JSCell::classInfo): Checks the current MarkedBlock to see where it should get the ClassInfo from so that it's always safe.
      * runtime/JSGlobalObject.cpp: JSGlobalObject now uses a finalizer instead of a destructor so that it can avoid forcing all 
      of its relatives in the inheritance hierarchy (e.g. JSScope) to use destructors as well.
      (JSC::JSGlobalObject::reset):
      * runtime/JSGlobalObject.h:
      (JSGlobalObject):
      (JSC::JSGlobalObject::createRareDataIfNeeded): Since we always create a finalizer now, we don't have to worry about adding one 
      for the m_rareData field when it's created.
      (JSC::JSGlobalObject::create):
      (JSC):
      * runtime/JSGlobalThis.h: Inherit from JSDestructibleObject.
      (JSGlobalThis):
      (JSC::JSGlobalThis::JSGlobalThis):
      * runtime/JSPropertyNameIterator.h: Has an immortal Structure.
      (JSC):
      * runtime/JSScope.cpp:
      (JSC):
      * runtime/JSString.h: Has an immortal Structure.
      (JSC):
      * runtime/JSWrapperObject.h: Inherit from JSDestructibleObject.
      (JSWrapperObject):
      (JSC::JSWrapperObject::JSWrapperObject):
      * runtime/MathObject.cpp: Cleaning up some of the inheritance stuff.
      (JSC):
      * runtime/NameInstance.h: Inherit from JSDestructibleObject.
      (NameInstance):
      * runtime/RegExp.h: Has immortal Structure.
      (JSC):
      * runtime/RegExpObject.cpp: Inheritance cleanup.
      (JSC):
      * runtime/SparseArrayValueMap.h: Has immortal Structure.
      (JSC):
      * runtime/Structure.h: Has immortal Structure.
      (JSC):
      * runtime/StructureChain.h: Ditto.
      (JSC):
      * runtime/SymbolTable.h: Ditto.
      (SharedSymbolTable):
      (JSC):
      
      Source/WebCore: 
      
      No new tests.
      
      * ForwardingHeaders/runtime/JSDestructableObject.h: Added.
      * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
      (JSDOMWrapper):
      (WebCore::JSDOMWrapper::JSDOMWrapper):
      * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
      e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
      (GenerateHeader):
      * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
      (ObjcFallbackObjectImp):
      * bridge/objc/objc_runtime.mm:
      (Bindings):
      (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
      * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
      (JSC):
      (JSC::RuntimeArray::destroy):
      * bridge/runtime_array.h:
      (JSC::RuntimeArray::create):
      (JSC):
      * bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
      (Bindings):
      (JSC::Bindings::RuntimeObject::RuntimeObject):
      * bridge/runtime_object.h:
      (RuntimeObject):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30738a77
    • andersca@apple.com's avatar
      Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory · d857c85b
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98217
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::createGraphicsLayer):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
      (WebCore::RenderLayerCompositor::ensureRootLayer):
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::overlayLayer):
      
      Source/WebKit/chromium:
      
      * src/NonCompositedContentHost.cpp:
      (WebKit::NonCompositedContentHost::NonCompositedContentHost):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      (WebKit::AcceleratedCompositingContext::initialize):
      
      Source/WebKit/win:
      
      * WebView.cpp:
      (WebView::setAcceleratedCompositing):
      
      Source/WebKit2:
      
      * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
      (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
      (WebKit::LayerTreeCoordinator::createPageOverlayLayer):
      * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
      (WebKit::LayerTreeHostCA::initialize):
      (WebKit::LayerTreeHostCA::createPageOverlayLayer):
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::initialize):
      (WebKit::LayerTreeHostGtk::createPageOverlayLayer):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d857c85b
    • jsbell@chromium.org's avatar
      IndexedDB: Optimize encodeString/decodeString · 3ad9d8de
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97794
      
      Reviewed by Tony Chang.
      
      Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling.
      The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy
      isn't sufficient, but the code used StringBuilder::append() character-by-character
      and custom byte-swapping which was slow.
      
      Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string
      and putting it 20k times and getting it 20k times. On my test box, mean time before the
      patch was 8.2s, mean time after the patch was 4.6s.
      
      Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*'
      
      * Modules/indexeddb/IDBLevelDBCoding.cpp:
      (WebCore::IDBLevelDBCoding::encodeString):
      (WebCore::IDBLevelDBCoding::decodeString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ad9d8de
    • keishi@webkit.org's avatar
      Implement DataList UI for input type time on chromium · ca6178a6
      keishi@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98240
      
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      This adds datalist UI for input type time. We add the picker indicator to
      BaseMultipleFieldsDateAndTimeInputType. We enclose the dateTimeEdit element
      and picker indicator inside a new div element so we can position the picker
      indicator in the same place as input type=date.
      
      Tests: platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html
             platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html
             platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html
             platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html
             platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html
      
      * css/html.css:
      (input::-webkit-date-and-time-container):
      * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Creates a picker indicator.
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open the picker on Alt+Down.
      (WebCore):
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged): Updates picker visibility.
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility): In the future, DateInputType can override
      this so the picker indicator is always visible.
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator):
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator):
      * html/BaseMultipleFieldsDateAndTimeInputType.h:
      (WebCore):
      (BaseMultipleFieldsDateAndTimeInputType):
      * html/shadow/DateTimeFieldElement.cpp:
      (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Ignore Alt+down because it should trigger the picker to open.
      * rendering/RenderThemeChromiumCommon.cpp:
      (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add time to the list.
      
      LayoutTests:
      
      * fast/forms/number/number-spinbutton-click-in-iframe.html:
      * fast/forms/resources/common-spinbutton-click-in-iframe.js:
      (getSpinButton): This broke because of the change to shadow DOM structure.
      * fast/forms/resources/common.js:
      (traverseNextNode):
      (getElementByPseudoId): This finds a descendant node with a matching pseudo id.
      * fast/forms/resources/suggestion-picker-common.js: Added.
      (highlightedEntry):
      (openPicker):
      (sendKey):
      * fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html:
      * fast/forms/time-multiple-fields/time-multiple-fields-spinbutton-click-in-iframe.html:
      * platform/chromium-mac/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-expected.png: Added.
      * platform/chromium-mac/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl-expected.png: Added.
      * platform/chromium-mac/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar-expected.png: Added.
      * platform/chromium/TestExpectations:
      * platform/chromium/fast/forms/datalist/input-list-expected.txt:
      * platform/chromium/fast/forms/date/date-suggestion-picker-mouse-operations-expected.txt:
      * platform/chromium/fast/forms/date/date-suggestion-picker-mouse-operations.html:
      * platform/chromium/fast/forms/date/date-suggestion-picker-mouse-operations.html:
      * platform/chromium/fast/forms/time/time-suggestion-picker-appearance-expected.txt: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl-expected.txt: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar-expected.txt: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-key-operations-expected.txt: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations-expected.txt: Added.
      * platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca6178a6
    • kling@webkit.org's avatar
      Give CSSValueList backing vector an inline capacity. · a71cb789
      kling@webkit.org authored
      <http://webkit.org/b/98266>
      <rdar://problem/12421425>
      
      Reviewed by Anders Carlsson.
      
      Set an inline capacity of 4 on the CSSValue vector backing CSSValueList. This avoids an extra heap allocation
      in the common case, and reduces total memory use across the board, since the majority of CSSValueLists have
      at least 1 item, and the Vector will bump from 0 to 16 capacity on the first append.
      
      394kB progression on Membuster3.
      
      * css/CSSValueList.h:
      (CSSValueList):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a71cb789
    • loislo@chromium.org's avatar
      Web Inspector: NMI: instrument NativeImageSkia. · 58cf0c75
      loislo@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96277
      
      Reviewed by Yury Semikhatsky.
      
      * platform/graphics/skia/NativeImageSkia.cpp:
      (WebCore::NativeImageSkia::reportMemoryUsage):
      (WebCore::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58cf0c75
    • pfeldman@chromium.org's avatar
      Web Inspector: remember the last dock option so that user could toggle between... · f8044cca
      pfeldman@chromium.org authored
      Web Inspector: remember the last dock option so that user could toggle between dock to bottom and right
      https://bugs.webkit.org/show_bug.cgi?id=98255
      
      Reviewed by Vsevolod Vlasov.
      
      - Introduced DockController.js that covers the dock mechanics
      - Removed dock orientation from the settings
      - Storing the last dock option to present it as default
      - Simplified the multi-option status bar button
      
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * inspector/compile-front-end.py:
      * inspector/front-end/DockController.js: Added.
      (WebInspector.DockController):
      (WebInspector.DockController.prototype.get element):
      (WebInspector.DockController.prototype.setDocked.set if):
      (WebInspector.DockController.prototype.setDocked):
      (WebInspector.DockController.prototype.setDockingUnavailable):
      (WebInspector.DockController.prototype._updateUI.get states):
      (WebInspector.DockController.prototype._updateUI):
      (WebInspector.DockController.prototype._decorateButtonForTargetState):
      (WebInspector.DockController.prototype._createDockOptions):
      (WebInspector.DockController.prototype._toggleDockState):
      (WebInspector.DockController.prototype.isCompactMode):
      (WebInspector.DockController.prototype.setCompactMode):
      * inspector/front-end/InspectorFrontendAPI.js:
      (InspectorFrontendAPI.setAttachedWindow):
      * inspector/front-end/InspectorFrontendHostStub.js:
      (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
      (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
      * inspector/front-end/Settings.js:
      * inspector/front-end/SettingsScreen.js:
      (WebInspector.GenericSettingsTab):
      * inspector/front-end/StatusBarButton.js:
      (WebInspector.StatusBarButton):
      * inspector/front-end/Toolbar.js:
      (WebInspector.Toolbar):
      (WebInspector.Toolbar.prototype.setCompactMode):
      (WebInspector.Toolbar.prototype._toolbarDragStart):
      (WebInspector.Toolbar.prototype._toolbarDrag):
      * inspector/front-end/WebKit.qrc:
      * inspector/front-end/externs.js:
      (WebInspector.toggleSearchingForNode):
      * inspector/front-end/inspector.css:
      (body.undocked.platform-mac-snowleopard #toolbar):
      (body.undocked.platform-mac-snowleopard #toolbar-dropdown):
      * inspector/front-end/inspector.html:
      * inspector/front-end/inspector.js:
      (WebInspector._createGlobalStatusBarItems):
      (windowLoaded):
      (WebInspector.setDockingUnavailable):
      * inspector/front-end/inspectorCommon.css:
      (body.dock-to-right:not(.undocked)):
      (body.dock-to-right.inactive:not(.undocked)):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f8044cca
    • vsevik@chromium.org's avatar
      Web Inspector: UISourceCode commitWorkingCopy should not fail when original... · 1a6d5b21
      vsevik@chromium.org authored
      Web Inspector: UISourceCode commitWorkingCopy should not fail when original script had syntax error.
      https://bugs.webkit.org/show_bug.cgi?id=97272
      
      Reviewed by Pavel Feldman.
      
      This patch is based on patch by John J. Barton.
      
      Source/WebCore:
      
      * inspector/front-end/JavaScriptSource.js:
      (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): added rawLocation null check.
      
      LayoutTests:
      
      * http/tests/inspector/live-edit-test.js:
      (initialize_LiveEditTest.InspectorTest.replaceInSource):
      (initialize_LiveEditTest):
      * inspector/debugger/live-edit-expected.txt:
      * inspector/debugger/live-edit.html:
      * inspector/debugger/resources/edit-me-syntax-error.js: Added.
      (syntaxError):
      * platform/chromium/TestExpectations: re-enabled the test.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a6d5b21
    • apavlov@chromium.org's avatar
      Web Inspector: After "Edit as HTML", any click outside box should stop editing · b560f78b
      apavlov@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98258
      
      Reviewed by Vsevolod Vlasov.
      
      Make the DOM tree OL span the entire height of its container in the Elements panel to catch mouse events.
      
      * inspector/front-end/elementsPanel.css:
      (#elements-content > ol):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b560f78b
    • commit-queue@webkit.org's avatar
      [EFL] Skeleton code of File system API. · fe1e759f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91187
      
      Patch by Dongwoo Joshua Im <dw.im@samsung.com> on 2012-10-03
      Reviewed by Gyuyoung Kim.
      
      Add skeleton code of File System API on EFL port.
      Implementation patches will be created later.
      
      No new tests because this is just skeleton code.
      
      * CMakeLists.txt: Add new files which created by other patches in Modules/filesystem/ directory.
      * PlatformEfl.cmake: Add AsyncFileSystemEfl.cpp.
      * platform/AsyncFileSystem.cpp:
      (WebCore):
      * platform/efl/AsyncFileSystemEfl.cpp: Added.
      * platform/efl/AsyncFileSystemEfl.h: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe1e759f
    • kling@webkit.org's avatar
      Shrink ElementRareData by moving bool flags to NodeRareData. · c7b06dfb
      kling@webkit.org authored
      <http://webkit.org/b/98225>
      
      Reviewed by Antti Koivisto.
      
      Move all bool flags from ElementRareData to the bitfield in its base class NodeRareData.
      This shrinks ElementRareData by 8 bytes (on 64-bit) and saves a whopping 58kB on Membuster3.
      Also removed some double raredata hash lookups.
      
      * dom/Element.cpp:
      (WebCore::Element::detach):
      (WebCore::Element::recalcStyle):
      (WebCore::Element::ensureShadow):
      (WebCore::Element::setStyleAffectedByEmpty):
      (WebCore::Element::styleAffectedByEmpty):
      (WebCore::Element::setIsInCanvasSubtree):
      (WebCore::Element::isInCanvasSubtree):
      (WebCore::Element::containsFullScreenElement):
      (WebCore::Element::setContainsFullScreenElement):
      * dom/ElementRareData.h:
      (ElementRareData):
      (WebCore::ElementRareData::ElementRareData):
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::styleAffectedByEmpty):
      (WebCore::NodeRareData::setStyleAffectedByEmpty):
      (WebCore::NodeRareData::isInCanvasSubtree):
      (WebCore::NodeRareData::setIsInCanvasSubtree):
      (NodeRareData):
      (WebCore::NodeRareData::containsFullScreenElement):
      (WebCore::NodeRareData::setContainsFullScreenElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7b06dfb
    • commit-queue@webkit.org's avatar
      getComputedStyle perspective-origin is based on the wrong bounding box · 2800ee6f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98027
      
      Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-10-03
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      perspective-origin for ComputedStyleDeclaration is currently calculated using the
      wrong bounding box (sizingBox() which ends up as the contentbox).
      
      Start using borderbox for ComputedStyleDeclaration perspective-origin, similar to
      what transform-origin already does.
      
      Test: fast/css/getComputedStyle/getComputedStyle-origin-percentage.html
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      
      LayoutTests:
      
      Add test for perspective-origin calculation into existing transform-origin test.
      
      * transforms/2d/computed-style-origin-expected.txt:
      * transforms/2d/computed-style-origin.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2800ee6f
    • paroga@webkit.org's avatar
      Build fix for WinCE after r130160. · 6180797e
      paroga@webkit.org authored
      * platform/graphics/FontFastPath.cpp:
      (WebCore::Font::glyphDataAndPageForCharacter):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6180797e
    • tommyw@google.com's avatar
      MediaStream API: RTCPeerConnection should send down its handler via the... · 46689138
      tommyw@google.com authored
      MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation.
      https://bugs.webkit.org/show_bug.cgi?id=98149
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      The chromium implementation needs to know which Frame created a PeerConnection so
      that the right housekeeping can take place correctly.
      
      Not testable in DRT, but have verified the change manually and with our pyautotests.
      
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::RTCPeerConnection):
      * loader/FrameLoaderClient.h:
      (WebCore):
      (FrameLoaderClient):
      (WebCore::FrameLoaderClient::dispatchWillStartUsingPeerConnectionHandler):
      * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
      (WebCore::RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler):
      (WebCore):
      (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
      (WebCore::RTCPeerConnectionHandlerChromium::initialize):
      * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
      (RTCPeerConnectionHandlerChromium):
      
      Source/WebKit/chromium:
      
      Adding willStartUsingPeerConnectionHandler to the WebFrameClient.
      
      * public/WebFrameClient.h:
      (WebKit):
      (WebFrameClient):
      (WebKit::WebFrameClient::willStartUsingPeerConnectionHandler):
      * src/FrameLoaderClientImpl.cpp:
      (WebKit):
      (WebKit::FrameLoaderClientImpl::dispatchWillStartUsingPeerConnectionHandler):
      * src/FrameLoaderClientImpl.h:
      (FrameLoaderClientImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      46689138
    • commit-queue@webkit.org's avatar
      Web Inspector: Profiles: taking heap snapshot causes error message in console. · e508ef60
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97890
      
      Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-03
      Reviewed by Yury Semikhatsky.
      
      Actual problem is that proxy loader is closed twice.
      
      "_snapshotReceived" should never try to close receiver,
      because it is a callback fired by close.
      
      Also minor glitches fixed:
       - taking snapshot shows "Loading..." status first,
      and then "Saving xxx%";
       - after all chunks are sent "Parsing" status is set and
      then is replaced with "Saving 100%";
       - removed dead code in proxy;
       - proxy was ignoring callback parameter;
       - "Loading %d\%" is not localized.
      
      * English.lproj/localizedStrings.js: Added missing "Loading %d%" string.
      * inspector/front-end/HeapSnapshotProxy.js: Removed dead code.
      (WebInspector.HeapSnapshotLoaderProxy):
      (WebInspector.HeapSnapshotLoaderProxy.prototype.write): Make this method
      interface-conformant.
      * inspector/front-end/HeapSnapshotView.js:
      (WebInspector.HeapProfileHeader): Fixed update-status and
      finish-transfer logic.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e508ef60
    • jochen@chromium.org's avatar
      Make sure that user gestures can't be consumed twice · ca1aea26
      jochen@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97483
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Instead of a simple counter, use a ref counted token to track how many
      user gestures happened and where consumed. When creating a timer that
      is supposed to forward the user gesture, take a reference to this token
      and reinstantiate the UserGestureIndicator with that token when the
      timer is triggered.
      
      Tests: platform/chromium/fast/events/popup-forwarded-gesture-blocked.html
             platform/chromium/fast/events/popup-forwarded-gesture.html
      
      * dom/UserGestureIndicator.cpp:
      (WebCore):
      (WebCore::UserGestureIndicator::UserGestureIndicator):
      (WebCore::UserGestureIndicator::~UserGestureIndicator):
      (WebCore::UserGestureIndicator::processingUserGesture):
      (WebCore::UserGestureIndicator::consumeUserGesture):
      (WebCore::UserGestureIndicator::currentToken):
      * dom/UserGestureIndicator.h:
      (Token):
      (WebCore::UserGestureIndicator::Token::~Token):
      (UserGestureIndicator):
      * page/DOMTimer.cpp:
      (WebCore::DOMTimer::DOMTimer):
      (WebCore::DOMTimer::fired):
      * page/DOMTimer.h:
      (DOMTimer):
      
      LayoutTests:
      
      * platform/chromium/fast/events/popup-forwarded-gesture-blocked-expected.txt: Added.
      * platform/chromium/fast/events/popup-forwarded-gesture-blocked.html: Added.
      * platform/chromium/fast/events/popup-forwarded-gesture-expected.txt: Added.
      * platform/chromium/fast/events/popup-forwarded-gesture.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca1aea26
    • dmazzoni@google.com's avatar
      AX: Heap-use-after-free when deleting a ContainerNode with an AX object · a09b3cd4
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98073
      
      Reviewed by Hajime Morita.
      
      Source/WebCore:
      
      Calls axObjectCache()->remove(this) in ~ContainerNode so that the AX tree
      doesn't try to access the container node while walking up the parent chain
      from one of the container node's children.
      
      Test: accessibility/container-node-delete-causes-crash.html
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::~ContainerNode):
      * dom/Node.cpp:
      (WebCore::Node::~Node):
      * dom/Node.h:
      (WebCore::Node::document):
      (WebCore::Node::documentInternal):
      
      LayoutTests:
      
      Adds test for heap-use-after-free when container node with AX object is deleted.
      
      * accessibility/container-node-delete-causes-crash-expected.txt: Added.
      * accessibility/container-node-delete-causes-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a09b3cd4
    • vsevik@chromium.org's avatar
      Web Inspector: SourceURL should be taken from debugger agent when possible. · 4b25f827
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98239
      
      Reviewed by Yury Semikhatsky.
      
      Source/WebCore:
      
      Removed a check that sourceURL coming from js engine is the same as the one parsed by debugger agent.
      Alwys use the one from debugger agent now.
      
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::didParseSource):
      
      LayoutTests:
      
      Unskipped test.
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b25f827
    • loislo@chromium.org's avatar
      Unreviewed. Touch FrameView.cpp file for fixing mac bot compilation. · 3e7e2e81
      loislo@chromium.org authored
      * page/FrameView.cpp:
      (WebCore):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e7e2e81
    • loislo@chromium.org's avatar
      Web Inspector: "Load profile..." context menu item has to be shown only for... · cc5ebeb9
      loislo@chromium.org authored
      Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
      https://bugs.webkit.org/show_bug.cgi?id=98163
      
      Reviewed by Yury Semikhatsky.
      
      The text was changed to "Load Heap Snapshot..."
      Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
      The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
      
      * English.lproj/localizedStrings.js:
      * inspector/front-end/ProfilesPanel.js:
      (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
      (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc5ebeb9
    • commit-queue@webkit.org's avatar
      Add data passing to the GetStats interface of RTCPeerConnection · 301e929c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98003
      
      Patch by Harald Alvestrand <hta@google.com> on 2012-10-03
      Reviewed by Adam Barth.
      
      Source/Platform:
      
      * Platform.gypi:
      * chromium/public/WebRTCStatsRequest.h:
      (WebKit):
      (WebRTCStatsRequest):
      * chromium/public/WebRTCStatsResponse.h: Added.
      (WebCore):
      (WebKit):
      (WebRTCStatsResponse):
      (WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
      (WebKit::WebRTCStatsResponse::~WebRTCStatsResponse):
      (WebKit::WebRTCStatsResponse::operator=):
      
      Source/WebCore:
      
      Added an RTCStatsResponseBase interface to platform, and let the
      RTCStatsRequestImpl class produce an implementation of it that's returned
      to WebCore.
      
      Tested by extension of the RTCPeerConnection-stats.html test.
      
      * Modules/mediastream/RTCStatsElement.cpp:
      (WebCore::RTCStatsElement::addStatistic):
      (WebCore):
      * Modules/mediastream/RTCStatsElement.h:
      (RTCStatsElement):
      * Modules/mediastream/RTCStatsReport.cpp:
      (WebCore):
      (WebCore::RTCStatsReport::addElement):
      (WebCore::RTCStatsReport::addStatistic):
      * Modules/mediastream/RTCStatsReport.h:
      (RTCStatsReport):
      * Modules/mediastream/RTCStatsRequestImpl.cpp:
      (WebCore::RTCStatsRequestImpl::createResponse):
      (WebCore):
      (WebCore::RTCStatsRequestImpl::requestSucceeded):
      * Modules/mediastream/RTCStatsRequestImpl.h:
      (RTCStatsRequestImpl):
      * Modules/mediastream/RTCStatsResponse.cpp:
      (WebCore::RTCStatsResponse::create):
      (WebCore::RTCStatsResponse::addReport):
      (WebCore):
      (WebCore::RTCStatsResponse::addElement):
      (WebCore::RTCStatsResponse::addStatistic):
      * Modules/mediastream/RTCStatsResponse.h:
      (RTCStatsResponse):
      * WebCore.gypi:
      * platform/chromium/support/WebRTCStatsRequest.cpp:
      (WebKit::WebRTCStatsRequest::response):
      (WebKit):
      (WebKit::WebRTCStatsRequest::requestSucceeded):
      * platform/chromium/support/WebRTCStatsResponse.cpp: Added.
      (WebKit):
      (WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
      (WebKit::WebRTCStatsResponse::assign):
      (WebKit::WebRTCStatsResponse::reset):
      (WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>):
      (WebKit::WebRTCStatsResponse::addReport):
      (WebKit::WebRTCStatsResponse::addElement):
      (WebKit::WebRTCStatsResponse::addStatistic):
      * platform/mediastream/RTCStatsRequest.h:
      (WebCore):
      (RTCStatsRequest):
      * platform/mediastream/RTCStatsResponseBase.h: Added.
      (WebCore):
      (RTCStatsResponseBase):
      (WebCore::RTCStatsResponseBase::~RTCStatsResponseBase):
      
      Tools:
      
      * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
      (RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
      (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
      (MockWebRTCPeerConnectionHandler::addStream):
      (MockWebRTCPeerConnectionHandler::removeStream):
      (MockWebRTCPeerConnectionHandler::getStats):
      * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
      (MockWebRTCPeerConnectionHandler):
      
      LayoutTests:
      
      * fast/mediastream/RTCPeerConnection-stats-expected.txt:
      * fast/mediastream/RTCPeerConnection-stats.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      301e929c
    • carlosgc@webkit.org's avatar
      [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+ · 8cff89f2
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97895
      
      Reviewed by Martin Robinson.
      
      Source/WebCore:
      
      * platform/network/NetworkingContext.h:
      (NetworkingContext): Add initiatingPageID().
      * platform/network/ResourceHandle.h:
      (ResourceHandle): Add static method
      getSoupRequestInitiaingPageID().
      * platform/network/ResourceHandleInternal.h:
      (ResourceHandleInternal): Add initiatingPageID().
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore::ResourceHandleInternal::initiatingPageID): Get the
      initiating page ID of the resource handle networking context.
      (WebCore::setSoupRequestInitiaingPageID): Helper function to
      attach a page ID to a SoupRequest.
      (WebCore::startHTTPRequest): Call setSoupRequestInitiaingPageID()
      to attch the initiating page ID to the SoupRequest.
      (WebCore::startNonHTTPRequest): Ditto.
      (WebCore::ResourceHandle::getSoupRequestInitiaingPageID): Static
      method to get the page ID attached to a SoupRequest.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/FrameNetworkingContextEfl.cpp:
      (WebCore::FrameNetworkingContextEfl::initiatingPageID): Stub
      implementation.
      * WebCoreSupport/FrameNetworkingContextEfl.h:
      (FrameNetworkingContextEfl): Added.
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/FrameNetworkingContextGtk.cpp:
      (WebKit::FrameNetworkingContextGtk::initiatingPageID): Stub
      implementation.
      * WebCoreSupport/FrameNetworkingContextGtk.h:
      (FrameNetworkingContextGtk): Added.
      
      Source/WebKit2:
      
      The message DidReceiveURIRequest is now sent to the page that
      initiated the request that forwards the mesassage to the
      WebSoupRequestManagerProxy.
      
      * UIProcess/API/C/soup/WKSoupRequestManager.h: Update
      didReceiveURIRequest callback to receive the initiating page ID.
      * UIProcess/API/efl/ewk_context_request_manager_client.cpp:
      (didReceiveURIRequest): Update the callback API change.
      * UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
      (didReceiveURIRequest): Pass the initiating page to the
      WebKitURISchemeRequest constructor.
      * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
      (_WebKitURISchemeRequestPrivate): Keep a reference to the
      WebPageProxy that initiatesd the request.
      (webkitURISchemeRequestCreate): Save the initiating page.
      (webkit_uri_scheme_request_get_web_view): Return the view widget
      of the initiating WebPageProxy.
      * UIProcess/API/gtk/WebKitURISchemeRequest.h:
      * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
      * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
      * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::didReceiveURIRequest): Forward the request
      to the soup request manager proxy.
      * UIProcess/WebPageProxy.h:
      (WebPageProxy): Add didReceiveURIRequest().
      * UIProcess/WebPageProxy.messages.in: Add DidReceiveURIRequest
      message.
      * UIProcess/soup/WebSoupRequestManagerClient.cpp:
      (WebKit::WebSoupRequestManagerClient::didReceiveURIRequest):
      Pass the inititing page to the client callback.
      * UIProcess/soup/WebSoupRequestManagerClient.h:
      (WebSoupRequestManagerClient):
      * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
      (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Pass
      the inititing page to the client.
      * UIProcess/soup/WebSoupRequestManagerProxy.h:
      (WebSoupRequestManagerProxy):
      * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Remove
      DidReceiveURIRequest message.
      * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
      (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
      Save the pageID of the WebFrame.
      (WebKit::WebFrameNetworkingContext::initiatingPageID): Return the
      inititing page ID.
      * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
      * WebProcess/soup/WebSoupRequestManager.cpp:
      (WebKit::WebSoupRequestManager::send): Send DidReceiveURIRequest
      message to the WebPage that initiated the request.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8cff89f2
    • tkent@chromium.org's avatar
      Introduce DateComponents::minimumYear and maximumYear · 3d443374
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98230
      
      Reviewed by Kentaro Hara.
      
      Share same difinitions in DateComponents.cpp and DateTimeFieldElements.cpp.
      
      No new tests. This doesn't change any bahevior.
      
      * platform/DateComponents.h:
      (WebCore::DateComponents::minimumYear): Moved from DateComponents.cpp.
      (WebCore::DateComponents::maximumYear): ditto.
      * platform/DateComponents.cpp:
      (WebCore): Move out static minimumYear and maximumYear.
      (WebCore::DateComponents::parseYear): Use DateCompnents::minimumYear and/or maximumYear.
      (WebCore::withinHTMLDateLimits): ditto.
      (WebCore::DateComponents::parseWeek): ditto.
      (WebCore::DateComponents::setMonthsSinceEpoch): ditto.
      (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): ditto.
      
      * html/shadow/DateTimeFieldElements.cpp:
      (WebCore): Remove minimumYear and maximumYear.
      (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
      Use DateComponents::minimumYear and maximumYear.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3d443374
    • arko@motorola.com's avatar
      Microdata: itemprop names must not override builtin properties. · 222c11fa
      arko@motorola.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98025
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore: 
      
      We should look in the prototype for functions before assuming it as
      an item's name. Return false if the prototype of the object has a
      property (function) with propertyName.
      Named properties Spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties
      Named property visibility algorithm:
      http://dev.w3.org/2006/webapi/WebIDL/#indexed-and-named-properties
      ...
      7. If the result of calling the [[HasProperty]] internal method on
      prototype with property name P is true, then return false.
      ...
      Also [OverrideBuiltins] is not declared for any of the properties,
      hence no overriding is allowed in this case.
      
      Test: fast/dom/MicroData/itemprop-names-override-builtin-properties.html
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateGetOwnPropertySlotBody):
      (GenerateGetOwnPropertyDescriptorBody):
      
      LayoutTests: 
      
      Added test case to verify that itemprop names must not override builtin properties.
      
      * fast/dom/MicroData/itemprop-names-override-builtin-properties-expected.txt: Added.
      * fast/dom/MicroData/itemprop-names-override-builtin-properties.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      222c11fa
    • keishi@webkit.org's avatar
      REGRESSION (r129738): Suggestion picker label is placed in the wrong location · 6ba86f9e
      keishi@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98094
      
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      We needed to reverse padding-left/right when rtl.
      
      No new tests. Covered by date-suggestion-picker-appearance.html.
      
      * Resources/pagepopups/suggestionPicker.css:
      (.suggestion-list-entry .label):
      (.rtl .suggestion-list-entry .label):
      
      LayoutTests:
      
      * platform/chromium-mac/platform/chromium/fast/forms/date/date-suggestion-picker-appearance-expected.png:
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ba86f9e
    • yurys@chromium.org's avatar
      Provide memory instrumentation for HashCountedSet · 4d3e1731
      yurys@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98138
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      Replaced addHashCountedSet calls with addMember that now automatically
      detects HashCountedSet and calls appropriate routine.
      
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
      * loader/cache/CachedResource.cpp:
      
      Source/WebKit/chromium:
      
      Added unit test for HashCountedSet memory instrumentation.
      
      * tests/MemoryInstrumentationTest.cpp:
      
      Source/WTF:
      
      Added memory instrumentation for HashCountedSet.
      
      Extracted common routines for collecting memory info for an iterable sequence.
      
      * GNUmakefile.list.am:
      * WTF.gypi:
      * WTF.pro:
      * WTF.vcproj/WTF.vcproj:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/MemoryInstrumentation.h:
      (WTF):
      * wtf/MemoryInstrumentationHashCountedSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
      (WTF):
      (WTF::reportMemoryUsage):
      * wtf/MemoryInstrumentationHashMap.h:
      (WTF::reportMemoryUsage):
      * wtf/MemoryInstrumentationHashSet.h:
      * wtf/MemoryInstrumentationSequence.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashMap.h.
      (WTF):
      (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
      (WTF::reportSequenceMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d3e1731
    • ossy@webkit.org's avatar
      Buildfix after r130235. · 45ce807d
      ossy@webkit.org authored
      Patch by Nandor Huszka <hnandor@inf.u-szeged.hu> on 2012-10-02
      Reviewed by Csaba Osztrogonác.
      
      systemAllowsMultisamplingOnATICards was deleted from GraphicsContext3D,
      but function body remained in GraphicsContext3DOpenGLES. Delete method body.
      
      * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45ce807d
  2. 02 Oct, 2012 9 commits