1. 22 Mar, 2012 30 commits
    • philn@webkit.org's avatar
      [GTK] ASSERT bug in WebAudio (AudioFileReader) · 1cf7bc93
      philn@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81777
      
      Reviewed by Martin Robinson.
      
      * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
      (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal
      the GstBus floating reference.
      (WebCore::AudioFileReader::createBus): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1cf7bc93
    • loislo@chromium.org's avatar
      Unreviewed: Web Inspector: fix syntax error in text. · 24dd2c0b
      loislo@chromium.org authored
      * English.lproj/localizedStrings.js:
      * inspector/front-end/HeapSnapshotProxy.js:
      (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24dd2c0b
    • yurys@chromium.org's avatar
      Unreviewed, rolling out r111688. · 82bad543
      yurys@chromium.org authored
      http://trac.webkit.org/changeset/111688
      https://bugs.webkit.org/show_bug.cgi?id=81912
      
      "Heap profiler test fails" (Requested by yurys on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-22
      
      * inspector/front-end/HeapSnapshot.js:
      (WebInspector.HeapSnapshot.prototype._buildRetainers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82bad543
    • commit-queue@webkit.org's avatar
      [chromium] Early out in a new prepareToDraw() step if checkerboarding an... · a0a09190
      commit-queue@webkit.org authored
      [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
      https://bugs.webkit.org/show_bug.cgi?id=81437
      
      Patch by Dana Jansens <danakj@chromium.org> on 2012-03-22
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      Split CCLayerTreeHostImpl::drawLayers() into two phases:
      prepareToDraw() and drawLayers().
      
      When calculating a RenderPass, and we checkerboard a quad on a
      layer, bubble this info back up to CCLayerTreeHostImpl. If the
      layer is transforming in an animation, then abort the prepareToDraw()
      phase and cause it to return false back to the thread proxy.
      
      Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
      
      * platform/graphics/chromium/cc/CCLayerImpl.cpp:
      (WebCore::CCLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCLayerImpl.h:
      (CCLayerImpl):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
      (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
      (WebCore::CCLayerTreeHostImpl::prepareToDraw):
      (WebCore):
      (WebCore::CCLayerTreeHostImpl::drawLayers):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
      (CCLayerTreeHostImpl):
      (FrameData):
      * platform/graphics/chromium/cc/CCQuadCuller.cpp:
      (WebCore::CCQuadCuller::append):
      * platform/graphics/chromium/cc/CCQuadCuller.h:
      (CCQuadCuller):
      * platform/graphics/chromium/cc/CCRenderPass.cpp:
      (WebCore::CCRenderPass::appendQuadsForLayer):
      * platform/graphics/chromium/cc/CCRenderPass.h:
      (CCRenderPass):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
      (WebCore::CCScrollbarLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
      (CCScrollbarLayerImpl):
      * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
      (WebCore::CCSingleThreadProxy::doComposite):
      * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
      (WebCore::CCSolidColorLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
      (CCSolidColorLayerImpl):
      * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
      (WebCore::CCTextureLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
      (CCTextureLayerImpl):
      * platform/graphics/chromium/cc/CCThreadProxy.cpp:
      (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
      * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
      (WebCore::CCTiledLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
      (CCTiledLayerImpl):
      * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
      (WebCore::CCVideoLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
      (CCVideoLayerImpl):
      
      Source/WebKit/chromium:
      
      * tests/CCAnimationTestCommon.cpp:
      (WebCore):
      (WebCore::addAnimatedTransform):
      (WebKitTests::addOpacityTransitionToLayer):
      (WebKitTests):
      (WebKitTests::addAnimatedTransformToLayer):
      * tests/CCAnimationTestCommon.h:
      (WebCore):
      (WebKitTests):
      * tests/CCLayerTreeHostImplTest.cpp:
      (WebKitTests::TEST_F):
      (DidDrawCheckLayer):
      (WebKitTests::DidDrawCheckLayer::DidDrawCheckLayer):
      (MissingTextureAnimatingLayer):
      (WebKitTests::MissingTextureAnimatingLayer::create):
      (WebKitTests::MissingTextureAnimatingLayer::MissingTextureAnimatingLayer):
      (WebKitTests):
      (WebKitTests::BlendStateCheckLayer::appendQuads):
      * tests/CCLayerTreeHostTest.cpp:
      (WTF::TestHooks::prepareToDrawOnCCThread):
      (WTF::MockLayerTreeHostImpl::prepareToDraw):
      (MockLayerTreeHostImpl):
      (WTF::MockLayerTreeHostImpl::drawLayers):
      * tests/CCQuadCullerTest.cpp:
      (WebCore::appendQuads):
      * tests/CCSolidColorLayerImplTest.cpp:
      (CCLayerTestCommon::TEST):
      * tests/CCTiledLayerImplTest.cpp:
      (CCLayerTestCommon::TEST):
      (CCLayerTestCommon::getQuads):
      * tests/MockCCQuadCuller.h:
      (WebCore::MockCCQuadCuller::append):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0a09190
    • leviw@chromium.org's avatar
      Correct LayoutUnit usage in Accessibility code · 3be076ee
      leviw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81789
      
      Reviewed by Eric Seidel.
      
      Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from
      the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly
      expose them to the embedder.
      
      No new tests. No change in behavior.
      
      * accessibility/AccessibilityListBox.cpp:
      (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above.
      * accessibility/AccessibilityListBox.h:
      (AccessibilityListBox):
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu,
      which is always done with integer coordinates.
      (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We
      don't pixel snap floats, so we return an integer bounding box.
      (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above.
      (WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying
      up the code to position it at (0,0).
      * accessibility/AccessibilityObject.h:
      (WebCore::AccessibilityObject::accessibilityHitTest): See above.
      (AccessibilityObject):
      (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers.
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from
      screen coordinates and originates in embedder code. Reverting it to take an integer.
      (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above.
      (WebCore::AccessibilityRenderObject::accessibilityHitTest): See above.
      * accessibility/AccessibilityRenderObject.h:
      (AccessibilityRenderObject):
      * accessibility/AccessibilityScrollView.cpp:
      (WebCore::AccessibilityScrollView::accessibilityHitTest): See above.
      * accessibility/AccessibilityScrollView.h:
      (AccessibilityScrollView):
      * accessibility/AccessibilitySlider.cpp:
      (WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above.
      * accessibility/AccessibilitySlider.h:
      (AccessibilitySlider):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3be076ee
    • loislo@chromium.org's avatar
      Web Inspector: HeapProfiler: Heap snapshot worker has to report the errors to the front-end · 82e1c364
      loislo@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81804
      
      Sometimes the worker process of HeapSnapshot does some wrong thing and throw an Exception.
      At this momemnt we have no way to see the error in the front-end.
      
      Reviewed by Yury Semikhatsky.
      
      * English.lproj/localizedStrings.js:
      * inspector/front-end/HeapSnapshotProxy.js: check the exception field and dump it into front-end's console.
      (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
      * inspector/front-end/HeapSnapshotWorkerDispatcher.js: catch the exception and transfer it's text to requester's side.
      (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82e1c364
    • carlosgc@webkit.org's avatar
      [GTK] Use the angle-bracket form to include wtf headers · 40a6dd61
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81884
      
      Patch by Carlos Garcia Campos <cgarcia@bb-webkit-rel-64.local.igalia.com> on 2012-03-22
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      Use #include <wtf/foo> instead of #include "foo".
      
      * platform/graphics/freetype/FontPlatformData.h:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/gtk/DataObjectGtk.h:
      * platform/network/ResourceHandleInternal.h:
      * platform/network/soup/SocketStreamHandleSoup.cpp:
      
      Source/WebKit/gtk:
      
      Use #include <wtf/foo> instead of #include "foo".
      
      * WebCoreSupport/DocumentLoaderGtk.cpp:
      * WebCoreSupport/DragClientGtk.h:
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      * WebCoreSupport/FullscreenVideoController.h:
      * WebCoreSupport/GeolocationClientGtk.h:
      * WebCoreSupport/InspectorClientGtk.h:
      * WebCoreSupport/TextCheckerClientGtk.cpp:
      * WebCoreSupport/TextCheckerClientGtk.h:
      * webkit/webkitdownload.cpp:
      * webkit/webkitfavicondatabase.cpp:
      * webkit/webkitglobals.cpp:
      * webkit/webkithittestresult.cpp:
      * webkit/webkitnetworkrequest.cpp:
      * webkit/webkitnetworkresponse.cpp:
      * webkit/webkitspellcheckerenchant.cpp:
      * webkit/webkitwebdatasourceprivate.h:
      * webkit/webkitwebsettings.cpp:
      * webkit/webkitwebsettingsprivate.h:
      * webkit/webkitwebviewprivate.h:
      
      Source/WebKit2:
      
      Use #include <wtf/foo> instead of #include <JavaScriptCore/foo>.
      
      * UIProcess/API/gtk/tests/TestMain.h:
      * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
      
      Tools:
      
      Use #include <wtf/foo> instead of #include "foo".
      
      * DumpRenderTree/gtk/AccessibilityCallbacks.cpp:
      * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
      * DumpRenderTree/gtk/DumpRenderTree.cpp:
      * DumpRenderTree/gtk/EditingCallbacks.cpp:
      * DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
      * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40a6dd61
    • apavlov@chromium.org's avatar
      Web Inspector: Case of the elements of the xml document should be shown as it is in the console · ad50b0b8
      apavlov@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81902
      
      Source/WebCore:
      
      When registering a detached root, DOMAgent always presumes it is a node,
      while it can also be a document.
      
      Reviewed by Vsevolod Vlasov.
      
      Test: inspector/console/console-xml-document.html
      
      * inspector/front-end/ConsoleMessage.js:
      (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
      * inspector/front-end/DOMAgent.js:
      (WebInspector.DOMAgent.prototype._setDetachedRoot):
      
      LayoutTests:
      
      Reviewed by Vsevolod Vlasov.
      
      * inspector/console/console-xml-document-expected.txt: Added.
      * inspector/console/console-xml-document.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad50b0b8
    • vsevik@chromium.org's avatar
      Web Inspector: Introduce ScriptBound/ScriptUnbound events in ScriptMapping. · f62e26cd
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81904
      
      Reviewed by Pavel Feldman.
      
      This is another step on the way to cleaner BreakpointManager logic.
      Here we extract ScriptBound/ScriptUnbound events from UISourceCodeListChanged event.
      This allows us to handle script-uiSourceCode binding separately from
      uiSourceCode creation/deletion and to handle unbinding that was not
      possible at all before.
      
      * inspector/front-end/CompilerScriptMapping.js:
      (WebInspector.CompilerScriptMapping.prototype._uiSourceCodesForSourceMap):
      (WebInspector.CompilerScriptMapping.prototype.addScript.get this):
      (WebInspector.CompilerScriptMapping.prototype.addScript):
      (WebInspector.CompilerScriptMapping.prototype.reset):
      * inspector/front-end/ResourceScriptMapping.js:
      (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
      * inspector/front-end/ScriptMapping.js:
      (WebInspector.MainScriptMapping):
      (WebInspector.MainScriptMapping.prototype._updateLiveLocation):
      (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
      (WebInspector.MainScriptMapping.prototype._handleScriptBound):
      (WebInspector.MainScriptMapping.prototype._handleScriptUnbound):
      * inspector/front-end/SnippetsModel.js:
      (WebInspector.SnippetsScriptMapping.prototype.addScript.get this):
      (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
      (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
      (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this):
      (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved):
      (WebInspector.SnippetsScriptMapping.prototype.reset):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f62e26cd
    • commit-queue@webkit.org's avatar
      https://bugs.webkit.org/show_bug.cgi?id=81893 · 07589066
      commit-queue@webkit.org authored
      Remove custom bindings form ScriptProfileNode.idl of attribute type Array.
      
      Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-03-22
      Reviewed by Kentaro Hara.
      
      Replace [CustomGetter] Array with sequence<ScriptProfileNode>.
      To remove the custom bindings code.
      
      Test: No new tests. LayoutTests/fast/profiler/* test are enough for this.
      
      * bindings/js/JSScriptProfileNodeCustom.cpp: Removed custom function.
      (WebCore::JSScriptProfileNode::callUID):
      * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed custom function.
      (WebCore):
      * inspector/ScriptProfileNode.idl: Replaced Array with sequence<ScriptProfileNode>.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07589066
    • caseq@chromium.org's avatar
      Web Inspector: only update timeline overview categories strips when these are visible · 7ed96f0b
      caseq@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81903
      
      Reviewed by Pavel Feldman.
      
      - factor out category strips update into a separate method;
      - only invoke it when "Timeline" overview mode is selected.
      
      * inspector/front-end/TimelineOverviewPane.js:
      (WebInspector.TimelineOverviewPane.prototype._showTimelines):
      (WebInspector.TimelineOverviewPane.prototype.update):
      (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ed96f0b
    • leviw@chromium.org's avatar
      Update LayoutUnit usage in FrameSelection · 34845ebc
      leviw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81754
      
      Reviewed by Eric Seidel.
      
      FrameSelection stores its caret and repaint bounds in absolute coordinates. Absolute coordinates
      we treat as pixel values, so this patch changes these values to integers. Sub-pixel precision
      will still be used when these coordinates are passed down and used locally.
      
      No new tests. No change in behavior.
      
      * editing/FrameSelection.cpp:
      (WebCore::absoluteCaretY): Uses absolute coordinates, which are ints.
      (WebCore::FrameSelection::modify): Uses absolute coordinates to handle vertical selection
      modification. Sub-pixel precision will be used when these values are converted to local ones.
      (WebCore::CaretBase::absoluteBoundsForLocalRect): Absolute coordinates -> ints.
      (WebCore::FrameSelection::absoluteCaretBounds): Ditto.
      (WebCore::CaretBase::caretRepaintRect): The caret repaint rect is stored in absolute coordinates.
      Reverting the values to ints.
      (WebCore::FrameSelection::recomputeCaretRect): Ditto.
      * editing/FrameSelection.h:
      (FrameSelection):
      * editing/mac/FrameSelectionMac.mm:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Switching to store absolute
      coordinates as integers.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34845ebc
    • yurys@chromium.org's avatar
      Web Inspector: Speed up the build retainers phase. · 544408c5
      yurys@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81763
      
      Replacing the edge iterator with a raw loop makes it
      faster by more than 10 times.
      
      Patch by Alexei Filippov <alexeif@chromium.org> on 2012-03-22
      Reviewed by Yury Semikhatsky.
      
      * inspector/front-end/HeapSnapshot.js:
      (WebInspector.HeapSnapshot.prototype._buildRetainers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      544408c5
    • noam.rosenthal@nokia.com's avatar
      [Qt][WK2] The background appears to have one extra pixel from the contents · da3e8d3e
      noam.rosenthal@nokia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=81830
      
      Reviewed by Kenneth Rohde Christiansen.
      
      Source/WebCore:
      
      TextureMapperGL applied a 1-offset that was covering for another bug,
      which was already fixed.
      
      No new tests, this would be tested once we test GL rendering results.
      
      * platform/graphics/texmap/TextureMapperGL.cpp:
      (WebCore::TextureMapperGLData::SharedGLData::scissorClip):
      
      Source/WebKit2:
      
      The clip-polygon from the scenegraph uses floats, not integers.
      This could cause 1-offset clipping problems in some cases.
      
      * UIProcess/qt/QtWebPageSGNode.cpp:
      (WebKit::ContentsSGNode::clipRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da3e8d3e
    • wjmaclean@chromium.org's avatar
      Rename touchpad fling curve, add curve parameters to constructor. · f55dd424
      wjmaclean@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81820
      
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      Covered by existing unit tests.
      
      * GNUmakefile.list.am:
      * WebCore.gypi:
      * platform/ScrollAnimatorNone.cpp:
      (WebCore::ScrollAnimatorNone::fireUpAnAnimation):
      * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp.
      (WebCore):
      (WebCore::TouchpadFlingPlatformGestureCurve::create):
      (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
      (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve):
      (WebCore::TouchpadFlingPlatformGestureCurve::apply):
      * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h.
      (WebCore):
      (TouchpadFlingPlatformGestureCurve):
      
      Source/WebKit/chromium:
      
      * src/WebCompositorInputHandlerImpl.cpp:
      (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::gestureEvent):
      * tests/PlatformGestureCurveTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f55dd424
    • pfeldman@chromium.org's avatar
      Web Inspector: make CSS and JavaScript files editable by default. · f338a076
      pfeldman@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81787
      
      Reviewed by Vsevolod Vlasov.
      
      This change removes cancelEditing and setReadOnly capabilities from source frame.
      It removes dblclick handler as well since one does not need to enter editing mode.
      It also establishes proper content dispatching so that views are updated with the
      resource content. All these are inter-dependent, need to be landed simultaneously.
      Drive-by follow up to the r111675 where range is modified prior to the exiting
      edit mode.
      
      * inspector/front-end/JavaScriptSourceFrame.js:
      (WebInspector.JavaScriptSourceFrame):
      (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
      (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
      (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
      (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
      (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
      * inspector/front-end/ResourceView.js:
      (WebInspector.ResourceSourceFrame):
      (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
      (WebInspector.ResourceSourceFrame.prototype._contentChanged):
      (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
      (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper):
      (WebInspector.EditableResourceSourceFrame.prototype.editContent):
      (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
      * inspector/front-end/ResourcesPanel.js:
      (WebInspector.ResourcesPanel.prototype._innerShowView):
      (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
      * inspector/front-end/ScriptsPanel.js:
      (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty):
      * inspector/front-end/Settings.js:
      (WebInspector.ExperimentsSettings):
      * inspector/front-end/SourceFrame.js:
      (WebInspector.SourceFrame):
      (WebInspector.SourceFrame.prototype.wasShown):
      (WebInspector.SourceFrame.prototype.willHide):
      (WebInspector.SourceFrame.prototype.beforeTextChanged):
      (WebInspector.SourceFrame.prototype.setContent):
      (WebInspector.SourceFrame.prototype.commitEditing):
      (WebInspector.SourceFrame.prototype.didEditContent):
      (WebInspector.SourceFrame.prototype.editContent):
      * inspector/front-end/TextPrompt.js:
      (WebInspector.TextPrompt.prototype._startEditing):
      (WebInspector.TextPrompt.prototype._stopEditing):
      * inspector/front-end/TextViewer.js:
      (WebInspector.TextViewer):
      (WebInspector.TextViewer.prototype._registerShortcuts):
      (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f338a076
    • commit-queue@webkit.org's avatar
      [Qt] Enable FAST_MOBILE_SCROLLING when scrolling is delegated. · 53acaa4d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81889
      
      Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-03-22
      Reviewed by Kenneth Rohde Christiansen.
      
      Source/WebCore:
      
      On the Qt platform only enable the fast mobile scroll feature when scrolling is delegated.
      
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::styleWillChange):
      
      Tools:
      
      Enable FAST_MOBILE_SCROLLING feature.
      
      * qmake/mkspecs/features/features.prf:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53acaa4d
    • pfeldman@chromium.org's avatar
      Source/WebCore: Web Inspector: dispatch styleSheetChanged event synchronously. · 9638cdeb
      pfeldman@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81892
      
      Reviewed by Vsevolod Vlasov.
      
      Today, backend generates stylesheet change event synchronously from within set* command.
      But CSSStyleModel defers its dispatching until the stylesheet content is available. This
      prevents us from ignoring update events from within commands that initiated those updates.
      
      This change makes stylesheet change event dispatch synchronously and delegates stylesheet
      content fetching to the event client.
      
      * inspector/front-end/CSSStyleModel.js:
      (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
      (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
      (WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
      (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper):
      (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent):
      (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.callback):
      (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged):
      (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged):
      
      Source/WebKit/chromium: [chromium] timing functions are getting incorrectly applied for accelerated css transitions
      https://bugs.webkit.org/show_bug.cgi?id=81692
      
      Patch by Ian Vollick <vollick@chromium.org> on 2012-03-21
      Reviewed by Adrienne Walker.
      
      * tests/CCAnimationTestCommon.cpp:
      (WebCore::addOpacityTransition):
      (WebKitTests::addOpacityTransitionToController):
      (WebKitTests::addOpacityTransitionToLayer):
      * tests/CCAnimationTestCommon.h:
      (WebKitTests):
      * tests/CCLayerAnimationControllerTest.cpp:
      (WebKitTests::TEST):
      * tests/CCLayerTreeHostTest.cpp:
      (WTF::CCLayerTreeHostTest::dispatchAddInstantAnimation):
      (WTF::CCLayerTreeHostTest::dispatchAddAnimation):
      (WTF::TEST_F):
      (WTF):
      (CCLayerTreeHostTestAddAnimationWithTimingFunction):
      (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::CCLayerTreeHostTestAddAnimationWithTimingFunction):
      (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::beginTest):
      (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::animateLayers):
      (WTF::CCLayerTreeHostTestAddAnimationWithTimingFunction::afterTest):
      
      LayoutTests: Web Inspector: dispatch styleSheetChanged event synchronously.
      https://bugs.webkit.org/show_bug.cgi?id=81892
      
      Reviewed by Vsevolod Vlasov.
      
      * http/tests/inspector/resources-test.js:
      (initialize_ResourceTest.InspectorTest.showResource.callbackWrapper):
      (initialize_ResourceTest.InspectorTest.showResource.showResourceCallback.visit):
      (initialize_ResourceTest.InspectorTest.showResource.showResourceCallback):
      (initialize_ResourceTest.InspectorTest.showResource):
      (initialize_ResourceTest):
      * inspector/styles/styles-history.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9638cdeb
    • pfeldman@chromium.org's avatar
      Web Inspector: allow on-hover popover while in edit mode. · efdc6974
      pfeldman@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81898
      
      Reviewed by Vsevolod Vlasov.
      
      This change allows popover while in-edit mode, hides it upon Esc. It also introduces anchorOverride
      concept in ObjectPopoverHelper that allows dynamically switching the anchor (say if we want to highlight anchor itself).
      
      * inspector/front-end/DetailedHeapshotView.js:
      * inspector/front-end/ElementsPanel.js:
      * inspector/front-end/JavaScriptSourceFrame.js:
      (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover):
      (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
      (WebInspector.JavaScriptSourceFrame.prototype._onKeyDown):
      * inspector/front-end/NetworkPanel.js:
      * inspector/front-end/ObjectPopoverHelper.js:
      (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
      (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
      * inspector/front-end/Popover.js:
      (WebInspector.PopoverHelper.prototype.isPopoverVisible):
      * inspector/front-end/TimelinePanel.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efdc6974
    • pfeldman@chromium.org's avatar
      Web Inspector: breakpoints should shift when line break is inserted in the middle of the line. · 5cdec52e
      pfeldman@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81896
      
      Reviewed by Vsevolod Vlasov.
      
      There is a bug that collapses selection prior to exiting change mode, we should never
      collapse edit area prior committing.
      
      * inspector/front-end/TextEditorModel.js:
      (WebInspector.TextEditorModel.endsWithBracketRegex.):
      * inspector/front-end/TextViewer.js:
      (WebInspector.TextViewer):
      (WebInspector.TextEditorMainPanel.prototype.highlightLine):
      (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.callback):
      (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5cdec52e
    • zherczeg@webkit.org's avatar
      Merge SVGImageBufferTools to SVGRenderingContext · c77e01fb
      zherczeg@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81890
      
      Reviewed by Nikolas Zimmermann.
      
      Copy the code to SVGRenderingContext and delete
      SVGImageBufferTools[.cpp.h]. Update build systems,
      no functionality change. This is the first step
      towards making SVGImageBufferTools stageful.
      
      Existing tests cover this issue.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/filters/FETile.cpp:
      (WebCore::FETile::platformApplySoftware):
      * rendering/svg/RenderSVGAllInOne.cpp:
      * rendering/svg/RenderSVGInlineText.cpp:
      (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
      * rendering/svg/RenderSVGResourceClipper.cpp:
      (WebCore::RenderSVGResourceClipper::applyClippingToContext):
      (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
      * rendering/svg/RenderSVGResourceFilter.cpp:
      (WebCore::RenderSVGResourceFilter::applyResource):
      * rendering/svg/RenderSVGResourceGradient.cpp:
      (WebCore::createMaskAndSwapContextForTextGradient):
      (WebCore::clipToTextMask):
      * rendering/svg/RenderSVGResourceMasker.cpp:
      (WebCore::RenderSVGResourceMasker::applyResource):
      (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
      * rendering/svg/RenderSVGResourcePattern.cpp:
      (WebCore::RenderSVGResourcePattern::applyResource):
      (WebCore::RenderSVGResourcePattern::createTileImage):
      * rendering/svg/SVGImageBufferTools.cpp: Removed.
      * rendering/svg/SVGImageBufferTools.h: Removed.
      * rendering/svg/SVGInlineTextBox.cpp:
      * rendering/svg/SVGRenderingContext.cpp:
      (WebCore::currentContentTransformation):
      (WebCore):
      (WebCore::SVGRenderingContext::calculateTransformationToOutermostSVGCoordinateSystem):
      (WebCore::SVGRenderingContext::createImageBuffer):
      (WebCore::SVGRenderingContext::createImageBufferForPattern):
      (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
      (WebCore::SVGRenderingContext::clipToImageBuffer):
      (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect):
      (WebCore::SVGRenderingContext::clampedAbsoluteSize):
      (WebCore::SVGRenderingContext::clear2DRotation):
      * rendering/svg/SVGRenderingContext.h:
      (SVGRenderingContext):
      (WebCore::SVGRenderingContext::calculateImageBufferRect):
      * svg/graphics/filters/SVGFEImage.cpp:
      (WebCore::FEImage::platformApplySoftware):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c77e01fb
    • commit-queue@webkit.org's avatar
      [EFL] Add PageClientEfl to WebCoreSupport. · e5055a7d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=80748
      
      Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2012-03-22
      Reviewed by Noam Rosenthal.
      
      Source/WebCore:
      
      * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient.
      (WebCore):
      * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
      (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type.
      * plugins/efl/PluginViewEfl.cpp:
      (WebCore::PluginView::platformGetValue): Use PageClientEfl.
      
      Source/WebKit:
      
      * PlatformEfl.cmake: Add WebCore/platform/graphics/efl to the include path
      and PageClientEfl.cpp to the source list.
      
      Source/WebKit/efl:
      
      This patch adds PageClientEfl for implementaion of accelerated compositing.
      
      * WebCoreSupport/ChromeClientEfl.cpp:
      (WebCore::ChromeClientEfl::platformPageClient):
      * WebCoreSupport/PageClientEfl.cpp: Added.
      (WebCore):
      (WebCore::PageClientEfl::PageClientEfl):
      (WebCore::PageClientEfl::~PageClientEfl):
      (WebCore::PageClientEfl::createEvasObjectForAcceleratedCompositing):
      Just call ewk_view_accelerated_compositing_object_create().
      (WebCore::PageClientEfl::acceleratedCompositingContext):
      Just call ewk_view_accelerated_compositing_context_get().
      * WebCoreSupport/PageClientEfl.h: Added.
      (WebCore):
      (PageClientEfl):
      (WebCore::PageClientEfl::view): Return ewkView.
      * ewk/ewk_private.h:
      (WebCore):
      (EWKPrivate):
      * ewk/ewk_view.cpp:
      (_Ewk_View_Private_Data): Add OwnPtr<PageClientEfl>.
      (_ewk_view_priv_new): Create a new PageClientEfl.
      (ewk_view_accelerated_compositing_object_create): Not implemented.
      (ewk_view_accelerated_compositing_context_get): Not implemented.
      (EWKPrivate::corePageClient): Return the PageClientEfl pointer.
      (EWKPrivate):
      
      Source/WTF:
      
      * wtf/Platform.h: Disable accelerated compositing. It's not ready yet.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5055a7d
    • commit-queue@webkit.org's avatar
      blur() on shadow host should work when a shadow host contains a focused... · 63a89dad
      commit-queue@webkit.org authored
      blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees
      https://bugs.webkit.org/show_bug.cgi?id=81102
      
      Patch by Kaustubh Atrawalkar <kaustubh@motorola.com> on 2012-03-22
      Reviewed by Hajime Morita.
      
      Source/WebCore:
      
      This implementation will support blur for a focused element when its shadowHost's blur() is called.
      To achieve this Element::blur() function is modified to blur the focused node in it's treeScope.
      
      Test: fast/dom/shadow/shadow-root-blur.html
      
      * dom/Element.cpp:
      (WebCore::Element::blur): Modified to blur current treeScope's focused node.
      * dom/ShadowRoot.h:
      (WebCore::ShadowRoot::activeElement): Rework for code sharing.
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node.
      * dom/TreeScope.h:
      (TreeScope): New function declartion.
      * html/HTMLDocument.cpp:
      (WebCore::HTMLDocument::activeElement): Rework for code sharing.
      
      LayoutTests:
      
      * fast/dom/shadow/shadow-root-blur-expected.txt: Added.
      * fast/dom/shadow/shadow-root-blur.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63a89dad
    • vsevik@chromium.org's avatar
      Web Inspector: RawSourceCode does not need uiSourceCode lists because it never has more than one. · eed14789
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81894
      
      Source/WebCore:
      
      RawSourceCode never has more than one uiSourceCode, uiSourceCodeList
      are just remains of older implementation. This patch switches RawSourceCode
      and SourceMappings from uiSourceCodeList to uiSourceCode.
      
      Reviewed by Pavel Feldman.
      
      * inspector/front-end/RawSourceCode.js:
      (WebInspector.RawSourceCode.prototype.uiSourceCode):
      (WebInspector.RawSourceCode.prototype._saveSourceMapping):
      (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation):
      (WebInspector.RawSourceCode.SourceMapping.prototype.uiSourceCode):
      (WebInspector.RawSourceCode.PlainSourceMapping):
      (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation):
      (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
      (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCode):
      (WebInspector.RawSourceCode.FormattedSourceMapping):
      (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
      (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
      (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCode):
      * inspector/front-end/ResourceScriptMapping.js:
      (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
      (WebInspector.ResourceScriptMapping.prototype.addScript):
      (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
      (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
      (WebInspector.ResourceScriptMapping.prototype.reset):
      
      LayoutTests:
      
      Reviewed by Pavel Feldman.
      
      * inspector/debugger/raw-source-code.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eed14789
    • commit-queue@webkit.org's avatar
      [GTK] Fix the only remaining coding style issue in GTK accessibility code · e9a6ff36
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81885
      
      Patch by Mario Sanchez Prada <msanchez@igalia.com> on 2012-03-22
      Reviewed by Xan Lopez.
      
      Add needed extra line and remove an unneeded one.
      
      * accessibility/gtk/AccessibilityObjectAtk.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e9a6ff36
    • tkent@chromium.org's avatar
      Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect(). · f0be6b83
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81866
      
      Reviewed by Hajime Morita.
      
      We need to expand the controlClipRect because the existing shadow
      tree of a text field can be wrapped by another shadow tree. e.g.
      
      A current situation:
      
      <input>
        ┗ ShadowRoot
           ┗ container element
      ┌────────────┐<input>'s border box
      │┌──────────┐│
      ││container box       ││
      │└──────────┘│
      └────────────┘
      
      Wrapped by another ShadowRoot:
      
      <input>
        ┗ New ShadowRoot
           ┣ <shadow> represents the existing shadow tree
           ┃  ┗ container element
           ┗ D: an additional decoration element
      ┌────────────┐<input>'s border box
      │┌───────┬──┐│
      ││container box │ D  ││
      │└───────┴──┘│
      └────────────┘
      In this case, if we clip child renderers by container box, D is not
      drawn. We should clip by the content box of the <input>.
      
      A search field has an exceptional behavior. It can have the container
      box of which height is taller than the content box height. The
      controlClipRect should contain both of the container box and the content
      box in this case. In other cases, the container box is equivalent to the
      content box. So the code always unites them.
      
      No new tests. This won't make any behavior change for now.
      
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::controlClipRect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0be6b83
    • commit-queue@webkit.org's avatar
      [Forms] The option element should not be form associated element. · a0dc317e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=79764
      
      Patch by Yoshifumi Inoue <yosin@chromium.org> on 2012-03-22
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      This patch changes base class of HTMLOptionELement to HTMLElement
      from HTMLFormControlElement for saving memory space and iteration
      time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
      and matching the HTML5 specification for ease of maintenance.
      
      This patch changes behavior of handling of CSS pseudo classes "invalid"
      and "valid". The "option" elements no longer use these CSS pseudo classes
      as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
      
      Changes of TextIterator is lead by usage of isFormControlElement. This
      changes will be replaced with more meaningful predicate as part of
      https://bugs.webkit.org/show_bug.cgi?id=80381
      
      No new tests but updated select-live-pseudo-selectors.html test.
      
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
      (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
      (WebCore::HTMLOptionElement::attach): Changeid base class.
      (WebCore::HTMLOptionElement::detach): Changed base class.
      (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
      (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
      (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
      * html/HTMLOptionElement.h:
      (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
      (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
      * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
      
      LayoutTests:
      
      This patch fixes a bug in select-live-pseudo-selectors.js, adds
      assertions to improve coverage, and updates test expectation for
      behavior changes (makes the "option" element uses CSS pseudo class
      ":valid".)
      
      * fast/forms/resources/select-live-pseudo-selectors.js:
      (mouseDownOnSelect): Copied from listbox-selection.html for replacing broken simulateClick which used position and size of the "option" element, but these values are zero. Note: five files use mouseDownOnSelect. We'll share this function in future tracked by https://bugs.webkit.org/show_bug.cgi?id=81496.
      (backgroundOf): Added String parameter support for ease of writing test case.
      * fast/forms/select-live-pseudo-selectors-expected.txt: Added check fo background color of the "selection" element. Changed expected color of the "option" element because the "option" element doesn't support CSS pseudo class ":valid". This also covers bug 80088.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0dc317e
    • podivilov@chromium.org's avatar
      Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move... · 08655342
      podivilov@chromium.org authored
      Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js.
      https://bugs.webkit.org/show_bug.cgi?id=81780
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * inspector/compile-front-end.py:
      * inspector/front-end/CompilerScriptMapping.js:
      (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
      (WebInspector.SourceMapParserPayload):
      (WebInspector.SourceMapParser):
      (WebInspector.SourceMapParser.prototype.load):
      (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation):
      (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation):
      (WebInspector.SourceMapParser.prototype.sources):
      (WebInspector.SourceMapParser.prototype.loadSourceCode):
      (WebInspector.SourceMapParser.prototype._findMapping):
      (WebInspector.SourceMapParser.prototype._parseMappingPayload):
      (WebInspector.SourceMapParser.prototype._parseSections):
      (WebInspector.SourceMapParser.prototype._parseMap):
      (WebInspector.SourceMapParser.prototype._isSeparator):
      (WebInspector.SourceMapParser.prototype._decodeVLQ):
      (WebInspector.SourceMapParser.prototype._canonicalizeURL):
      (WebInspector.SourceMapParser.StringCharIterator):
      (WebInspector.SourceMapParser.StringCharIterator.prototype.next):
      (WebInspector.SourceMapParser.StringCharIterator.prototype.peek):
      (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext):
      * inspector/front-end/CompilerSourceMapping.js: Removed.
      * inspector/front-end/WebKit.qrc:
      * inspector/front-end/inspector.html:
      
      LayoutTests:
      
      * http/tests/inspector/compiler-script-mapping-expected.txt: Added.
      * http/tests/inspector/compiler-script-mapping.html: Renamed from LayoutTests/http/tests/inspector/compiler-source-mapping.html.
      * http/tests/inspector/compiler-source-mapping-expected.txt: Removed.
      * inspector/debugger/compiler-source-mapping-expected.txt: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08655342
    • vsevik@chromium.org's avatar
      Web Inspector: IndexedDB transaction is not closed when requesting data. · 2bc401be
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81837
      
      Reviewed by Pavel Feldman.
      
      * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call.
      (WebCore):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2bc401be
    • yurys@chromium.org's avatar
      Web Inspector: event listeners section is broken for about:blank page · 844ef62d
      yurys@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81795
      
      Source/WebCore:
      
      Parse about:blank as a valid URL.
      
      Reviewed by Pavel Feldman.
      
      Test: inspector/elements/event-listeners-about-blank.html
      
      * inspector/front-end/utilities.js:
      (String.prototype.asParsedURL):
      
      LayoutTests:
      
      Reviewed by Pavel Feldman.
      
      * inspector/elements/event-listeners-about-blank-expected.txt: Added.
      * inspector/elements/event-listeners-about-blank.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      844ef62d
  2. 21 Mar, 2012 10 commits
    • mitz@apple.com's avatar
      REGRESSION (r111635): Assertion failure in... · 56b5f59c
      mitz@apple.com authored
      REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests
      https://bugs.webkit.org/show_bug.cgi?id=81870
      
      Reverted r111635, the fix for bug 81843.
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext):
      (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset):
      (RenderFlexibleBox::WrapReverseContext):
      (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine):
      (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta):
      (WebCore::RenderFlexibleBox::layoutFlexItems):
      (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
      (WebCore::RenderFlexibleBox::alignChildren):
      (WebCore::RenderFlexibleBox::flipForWrapReverse):
      * rendering/RenderFlexibleBox.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56b5f59c
    • eae@chromium.org's avatar
      Unreviewed change touching CustomFilterProgram.h to try · 644840c7
      eae@chromium.org authored
      to force the chromium-win bots to rebuilt it and pick up
      on the fact that CSS_SHADERS is not set (since r111610). 
      
      * platform/graphics/filters/CustomFilterProgram.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      644840c7
    • vangelis@chromium.org's avatar
      [chromium] FPS counter causes garbage to be displayed at top left corner · b4ccfaee
      vangelis@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81851
      
      The HUD expects the PlatformCanvas it paints on to be cleared on creation which is
      no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 .
      This patch does an explicit clearRect before the HUD contents are painted.
      
      Reviewed by Adrienne Walker.
      
      TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly.
      
      * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
      (WebCore::CCHeadsUpDisplay::draw):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4ccfaee
    • rniwa@webkit.org's avatar
      Touch a file to make Chromium Windows bots happy. · c2dc5f87
      rniwa@webkit.org authored
      Source/Platform: 
      
      * chromium/public/WebGraphicsContext3D.h:
      
      Source/WebCore: 
      
      * css/CSSValueKeywords.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2dc5f87
    • igor.o@sisa.samsung.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=38025 · 251a2ec0
      igor.o@sisa.samsung.com authored
      Implement updateAnimationTimerForRender. This reduces unnecessary animation
      steps on the current RenderObject by checking the value of timeToNextService
      before starting a new timer.
      
      Reviewed by Dean Jackson.
      
      Test: animations/animation-welcome-safari.html
      
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
      (WebCore):
      (WebCore::AnimationController::updateAnimations):
      * page/animation/AnimationControllerPrivate.h:
      (AnimationControllerPrivate):
      
      LayoutTests;
      
      Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2)
      https://bugs.webkit.org/show_bug.cgi?id=38025
      
      Reviewed Dean Jackson.
      
      * animations/animation-welcome-safari-expected.txt: Added.
      * animations/animation-welcome-safari.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      251a2ec0
    • eae@chromium.org's avatar
      Unreviewed, rolling out r111616. · 95fe6ae7
      eae@chromium.org authored
      http://trac.webkit.org/changeset/111616
      https://bugs.webkit.org/show_bug.cgi?id=81862
      
      broke chromium mac (Requested by eae on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-21
      
      Source/WebCore: 
      
      * platform/graphics/chromium/cc/CCLayerImpl.cpp:
      (WebCore::CCLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCLayerImpl.h:
      (CCLayerImpl):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
      (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
      (WebCore::CCLayerTreeHostImpl::drawLayers):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
      (CCLayerTreeHostImpl):
      * platform/graphics/chromium/cc/CCQuadCuller.cpp:
      (WebCore::CCQuadCuller::append):
      * platform/graphics/chromium/cc/CCQuadCuller.h:
      (CCQuadCuller):
      * platform/graphics/chromium/cc/CCRenderPass.cpp:
      (WebCore::CCRenderPass::appendQuadsForLayer):
      * platform/graphics/chromium/cc/CCRenderPass.h:
      (CCRenderPass):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
      (WebCore::CCScrollbarLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
      (CCScrollbarLayerImpl):
      * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
      (WebCore::CCSingleThreadProxy::doComposite):
      * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
      (WebCore::CCSolidColorLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
      (CCSolidColorLayerImpl):
      * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
      (WebCore::CCTextureLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
      (CCTextureLayerImpl):
      * platform/graphics/chromium/cc/CCThreadProxy.cpp:
      (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
      * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
      (WebCore::CCTiledLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
      (CCTiledLayerImpl):
      * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
      (WebCore::CCVideoLayerImpl::appendQuads):
      * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
      (CCVideoLayerImpl):
      
      Source/WebKit/chromium: 
      
      * tests/CCAnimationTestCommon.cpp:
      * tests/CCAnimationTestCommon.h:
      (WebKitTests):
      * tests/CCLayerTreeHostImplTest.cpp:
      (WebKit::TEST_F):
      (DidDrawCheckLayer):
      (WebKit::DidDrawCheckLayer::DidDrawCheckLayer):
      (WebKit::BlendStateCheckLayer::appendQuads):
      * tests/CCLayerTreeHostTest.cpp:
      (WTF::MockLayerTreeHostImpl::drawLayers):
      * tests/CCQuadCullerTest.cpp:
      (WebCore::appendQuads):
      * tests/CCSolidColorLayerImplTest.cpp:
      (CCLayerTestCommon::TEST):
      * tests/CCTiledLayerImplTest.cpp:
      (CCLayerTestCommon::TEST):
      (CCLayerTestCommon::getQuads):
      * tests/MockCCQuadCuller.h:
      (WebCore::MockCCQuadCuller::append):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95fe6ae7
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=80322 · ef50492c
      bdakin@apple.com authored
      Implement image-set
      
      Reviewed by Dean Jackson.
      
      Source/WebCore: 
      
      This initial implementation of -webkit-image-set. 
      http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html
      The idea behind the feature is to allow authors to provide multiple variants 
      of the same image at differing resolutions, and to allow the User Agent to 
      choose the resource that is most appropriate at the time. This patch will 
      choose the most appropriate image based on device scale factor.
      
      CSSImageSetValue inherits from CSSValueList and behaves a lot like 
      CSSImageValue.
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSImageSetValue.h: Added.
      (WebCore):
      (CSSImageSetValue):
      (WebCore::CSSImageSetValue::create):
      (WebCore::CSSImageSetValue::isPending):
      (ImageWithScale):
      (WebCore::CSSImageSetValue::compareByScaleFactor):
      * css/CSSImageSetValue.cpp: Added.
      (WebCore):
      (WebCore::CSSImageSetValue::CSSImageSetValue):
      (WebCore::CSSImageSetValue::~CSSImageSetValue):
      (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
      (WebCore::CSSImageSetValue::customCssText):
      
      fillImageSet() iterates through the value list and turns the information into 
      a sorted Vector of ImageWithScales (which is a struct containing image URLs 
      and scale factors).
      (WebCore::CSSImageSetValue::fillImageSet):
      
      cachedImageSet() finds which image is most appropriate based on the device 
      scale factor, and it loads only that image. In the future, additional scale 
      factors will be taken into account.
      (WebCore::CSSImageSetValue::bestImageForScaleFactor):
      (WebCore::CSSImageSetValue::cachedImageSet):
      
      parseImageSet() is called everywhere in the CSSParser that a regular image or 
      generated image can be found.
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::parseContent):
      (WebCore::CSSParser::parseFillImage):
      (WebCore::CSSParser::parseBorderImage):
      (WebCore):
      (WebCore::CSSParser::parseImageSet):
      * css/CSSParser.h:
      
      Since CSSImageSetValue is implemented as a value list, 
      ApplyPropertyFillLayer::applyValue() needs to be more specific when it's 
      looking for a list of multiple URLs.
      * css/CSSStyleApplyProperty.cpp:
      (WebCore::ApplyPropertyFillLayer::applyValue):
      
      Handle image-set as a valid image value.
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::collectMatchingRulesForList):
      * css/CSSStyleSelector.h:
      (CSSStyleSelector):
      * css/CSSValue.cpp:
      (WebCore::CSSValue::cssText):
      (WebCore::CSSValue::destroy):
      * css/CSSValue.h:
      (CSSValue):
      (WebCore::CSSValue::isImageSetValue):
      
      computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image.
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::computeIntrinsicDimensions):
      * loader/cache/CachedImage.h:
      (CachedImage):
      * platform/graphics/GeneratedImage.h:
      (GeneratedImage):
      * platform/graphics/GeneratorGeneratedImage.cpp:
      (WebCore::GeneratedImage::computeIntrinsicDimensions):
      * platform/graphics/Image.cpp:
      (WebCore::Image::computeIntrinsicDimensions):
      * platform/graphics/Image.h:
      (Image):
      * platform/graphics/cg/PDFDocumentImage.cpp:
      (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
      * platform/graphics/cg/PDFDocumentImage.h:
      (PDFDocumentImage):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::computeIntrinsicDimensions):
      * svg/graphics/SVGImage.h:
      (SVGImage):
      
      Inherits from StyleImage and returns a scaled size for imageSize() and 
      computeIntrinsicDimensions().
      * rendering/style/StyleCachedImageSet.cpp: Added.
      (WebCore):
      (WebCore::StyleCachedImageSet::StyleCachedImageSet):
      (WebCore::StyleCachedImageSet::cssValue):
      (WebCore::StyleCachedImageSet::canRender):
      (WebCore::StyleCachedImageSet::isLoaded):
      (WebCore::StyleCachedImageSet::errorOccurred):
      (WebCore::StyleCachedImageSet::imageSize):
      (WebCore::StyleCachedImageSet::imageHasRelativeWidth):
      (WebCore::StyleCachedImageSet::imageHasRelativeHeight):
      (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
      (WebCore::StyleCachedImageSet::usesImageContainerSize):
      (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
      (WebCore::StyleCachedImageSet::addClient):
      (WebCore::StyleCachedImageSet::removeClient):
      (WebCore::StyleCachedImageSet::image):
      * rendering/style/StyleCachedImageSet.h: Added.
      (WebCore):
      (StyleCachedImageSet):
      (WebCore::StyleCachedImageSet::create):
      (WebCore::StyleCachedImageSet::data):
      (WebCore::StyleCachedImageSet::cachedImage):
      
      Handle image-set.
      * rendering/style/StyleImage.h:
      (WebCore::StyleImage::isCachedImageSet):
      (WebCore::StyleImage::StyleImage):
      (StyleImage):
      * rendering/style/StylePendingImage.h:
      (StylePendingImage):
      (WebCore::StylePendingImage::cssImageSetValue):
      
      Source/WTF: 
      
      For the time being, image-set is opt-in since the implementation is 
      incomplete. 
      
      Add an ENABLE flag for image-set.
      * wtf/Platform.h:
      
      LayoutTests: 
      
      * fast/css/image-set-parsing-expected.txt: Added.
      * fast/css/image-set-parsing-invalid-expected.txt: Added.
      * fast/css/image-set-parsing-invalid.html: Added.
      * fast/css/image-set-parsing.html: Added.
      * fast/css/script-tests/image-set-parsing-invalid.js: Added.
      (testInvalidImageSet):
      * fast/css/script-tests/image-set-parsing.js: Added.
      (jsWrapperClass):
      (shouldBeType):
      (testImageSetRule):
      * fast/hidpi/image-set-as-background.html: Added.
      * fast/hidpi/image-set-background-repeat-without-size.html: Added.
      * fast/hidpi/image-set-background-repeat.html: Added.
      * fast/hidpi/image-set-border-image-simple.html: Added.
      * fast/hidpi/image-set-out-of-order.html: Added.
      * fast/hidpi/image-set-simple.html: Added.
      * fast/hidpi/image-set-without-specified-width.html: Added.
      * fast/hidpi/resources: Added.
      * fast/hidpi/resources/blue-100-px-square.png: Added.
      * fast/hidpi/resources/deleteButton-2x.png: Added.
      * fast/hidpi/resources/deleteButton.png: Added.
      * fast/hidpi/resources/red-200-px-square.png: Added.
      * platform/efl/Skipped:
      * platform/gtk/Skipped:
      * platform/mac/fast/hidpi/image-set-as-background-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-as-background-expected.txt: Added.
      * platform/mac/fast/hidpi/image-set-background-repeat-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-background-repeat-expected.txt: Added.
      * platform/mac/fast/hidpi/image-set-background-repeat-without-size-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-background-repeat-without-size-expected.txt: Added.
      * platform/mac/fast/hidpi/image-set-border-image-simple-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-border-image-simple-expected.txt: Added.
      * platform/mac/fast/hidpi/image-set-out-of-order-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-out-of-order-expected.txt: Added.
      * platform/mac/fast/hidpi/image-set-simple-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-simple-expected.txt: Added.
      * platform/mac/fast/hidpi/image-set-without-specified-width-expected.png: Added.
      * platform/mac/fast/hidpi/image-set-without-specified-width-expected.txt: Added.
      * platform/qt/Skipped:
      * platform/win/Skipped:
      * platform/wincairo/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef50492c
    • commit-queue@webkit.org's avatar
      MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp · b838d6ba
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81850
      
      Patch by David Barton <dbarton@mathscribe.com> on 2012-03-21
      Reviewed by Eric Seidel.
      
      This prepares these files for bug fixes, and eventually combining their common code. To
      understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's
      simpler than RenderMathMLRoot.cpp.
      
      No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this.
      
      * rendering/mathml/RenderMathMLRoot.cpp:
      (WebCore):
      (WebCore::RenderMathMLRoot::addChild):
      (WebCore::RenderMathMLRoot::paint):
      (WebCore::RenderMathMLRoot::layout):
      * rendering/mathml/RenderMathMLRoot.h:
      (WebCore):
      (RenderMathMLRoot):
      * rendering/mathml/RenderMathMLSquareRoot.cpp:
      (WebCore):
      (WebCore::RenderMathMLSquareRoot::paint):
      (WebCore::RenderMathMLSquareRoot::layout):
      * rendering/mathml/RenderMathMLSquareRoot.h:
      (WebCore):
      (RenderMathMLSquareRoot):
      * rendering/mathml/RenderMathMLSubSup.h:
      (WebCore):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b838d6ba
    • tony@chromium.org's avatar
      refactor flexbox in preparation for flex-line-pack · dd40f8ad
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81843
      
      Reviewed by Ojan Vafai.
      
      Replace WrapReverseContext with a vector of LineContexts that contain
      the same information, plus values needed for flex-align.
      
      alignChildren has been moved to after all the lines have been
      positioned. We want to align children after flex-line-pack has changed
      the size of each line to avoid unnecessary layouts.
      
      No new tests, just refactoring.
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
      holds information needed for wrap-reverse and aligning children.
      (RenderFlexibleBox::LineContext):
      (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
      (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
      (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
      (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
      * rendering/RenderFlexibleBox.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd40f8ad
    • rniwa@webkit.org's avatar
      BDI element should have dir=auto by default · 00fa4f3a
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=68773
      
      Reviewed by Daniel Bates.
      
      Source/WebCore: 
      
      Treat bdi elements without dir content attribute as if they have dir=auto per spec:
      http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-bdi-element
      
      The patch tries to encapsulate the logic to look for dir content attribute and dir=auto.
      
      It also adds HTMLBDIElement interface (binding remains to use HTMLElement) to set
      selfOrAncestorHasDirAutoAttribute flag true by default, which is used by functions like
      directionalityIfhasDirAutoAttribute to look for elements with dir=auto. Since dir=auto-ness of bdi
      elements can be overridden by dir content attribute, we must change and only change the default value.
      
      Tests: fast/text/international/bdi-dir-default-to-auto-expected.html
             fast/text/international/bdi-dir-default-to-auto.html
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::collectMatchingRulesForList):
      * html/HTMLBDIElement.h: Added.
      (WebCore):
      (HTMLBDIElement):
      (WebCore::HTMLBDIElement::create):
      (WebCore::HTMLBDIElement::HTMLBDIElement): Sets selfOrAncestorHasDirAutoAttribute to true because
      bdi elements are treated as if it has dir=auto by default.
      * html/HTMLElement.cpp:
      (WebCore::elementAffectsDirectionality): Added. Checks if the specified element is bdi or
      has dir content attribute.
      (WebCore):
      (WebCore::setHasDirAutoFlagRecursively):
      (WebCore::HTMLElement::hasDirectionAuto): Added. Checks if the specified element should be treated
      as if it has dir=auto (bdi or element with dir=auto).
      (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute):
      (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
      (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
      * html/HTMLElement.h:
      (HTMLElement):
      * html/HTMLTagNames.in: Use HTMLBDIElement instead of HTMLElement for constructing bdi element
      to set selfOrAncestorHasDirAutoAttribute true but still use HTMLElement for binding.
      
      LayoutTests: 
      
      Add a test written by Aharon Lanin.
      
      * fast/text/international/bdi-dir-default-to-auto-expected.html: Added.
      * fast/text/international/bdi-dir-default-to-auto.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00fa4f3a