1. 17 Jan, 2013 40 commits
    • timothy_horton@apple.com's avatar
      [WK2] Minimum layout width auto-sizing should use... · 33058a4e
      timothy_horton@apple.com authored
      [WK2] Minimum layout width auto-sizing should use FrameView::enableAutoSizeMode so that it can shrink the viewport
      https://bugs.webkit.org/show_bug.cgi?id=107200
      <rdar://problem/12849029>
      
      Reviewed by Simon Fraser.
      
      Make use of FrameView's auto-size mode to allow WKView's computed intrinsic content
      size to shrink below the current viewport size.
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::setMinimumLayoutWidth): Forward minimumLayoutWidth changes to WebPage.
      * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
      (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): Remove minimumLayoutWidth argument on updateGeometry.
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Enable auto-size mode on the new FrameView if needed.
      * WebProcess/WebPage/DrawingArea.h:
      (WebKit::DrawingArea::updateGeometry): Remove minimumLayoutWidth argument.
      * WebProcess/WebPage/DrawingArea.messages.in: Remove minimumLayoutWidth argument on updateGeometry.
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage): Initialize m_minimumLayoutWidth to 0.
      (WebKit::WebPage::setMinimumLayoutWidth): Keep track of minimumLayoutWidth on WebPage. Update auto-sizing state if needed.
      * WebProcess/WebPage/WebPage.h:
      (WebKit::WebPage::minimumLayoutWidth):
      * WebProcess/WebPage/WebPage.messages.in: Add SetMinimumLayoutWidth.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
      (TiledCoreAnimationDrawingArea): Remove storage for m_minimumLayoutWidth. We can get it from WebPage instead.
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
      (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): Grab minimumLayoutWidth from WebPage.
      (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Don't setSize() if auto-sizing is enabled; FrameView will do the right thing.
      
      * WebCore.exp.in: Export FrameView::enableAutoSize(...).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33058a4e
    • mhahnenberg@apple.com's avatar
      Objective-C API: Clean up JSValue.mm · 953b3bf2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107163
      
      Reviewed by Darin Adler.
      
      m_context is no longer weak, so there is now a lot of dead code in in JSValue.mm, and a wasted message send
      on every API call.  In the head of just about every method in JSValue.mm we're doing:
      
      JSContext *context = [self context];
      if (!context)
          return nil;
      
      This is getting a retained copy of the context, which is no longer necessary now m_context is no longer weak.
      We can just delete all these lines from all functions doing this, and where they were referring to the local
      variable 'context', instead we can just access m_context directly.
      
      Since we're already going to be modifying most of JSValue.mm, we'll also do the following:
      
      1) context @property is no longer weak – the context property is declared as:
      
          @property(readonly, weak) JSContext *context;
      
      This is really only informative (since we're not presently synthesizing the ivar), but it is now misleading.
      We should change it to:
      
          @property(readonly, retain) JSContext *context;
      
      2) the JSContext ivar and accessor can be automatically generated.  Since we're no longer doing anything
      special with m_context, we can just let the compiler handle the ivar for us.  We'll delete:
      
          JSContext *m_context;
      
      and:
      
          - (JSContext *)context
          {
              return m_context;
      
          }
      
      and find&replace "m_context" to "_context" in JSValue.mm.
      
      * API/APIJSValue.h:
      * API/JSValue.mm:
      (-[JSValue toObject]):
      (-[JSValue toBool]):
      (-[JSValue toDouble]):
      (-[JSValue toNumber]):
      (-[JSValue toString]):
      (-[JSValue toDate]):
      (-[JSValue toArray]):
      (-[JSValue toDictionary]):
      (-[JSValue valueForProperty:]):
      (-[JSValue setValue:forProperty:]):
      (-[JSValue deleteProperty:]):
      (-[JSValue hasProperty:]):
      (-[JSValue defineProperty:descriptor:]):
      (-[JSValue valueAtIndex:]):
      (-[JSValue setValue:atIndex:]):
      (-[JSValue isUndefined]):
      (-[JSValue isNull]):
      (-[JSValue isBoolean]):
      (-[JSValue isNumber]):
      (-[JSValue isString]):
      (-[JSValue isObject]):
      (-[JSValue isEqualToObject:]):
      (-[JSValue isEqualWithTypeCoercionToObject:]):
      (-[JSValue isInstanceOf:]):
      (-[JSValue callWithArguments:]):
      (-[JSValue constructWithArguments:]):
      (-[JSValue invokeMethod:withArguments:]):
      (-[JSValue objectForKeyedSubscript:]):
      (-[JSValue setObject:forKeyedSubscript:]):
      (-[JSValue initWithValue:inContext:]):
      (-[JSValue dealloc]):
      (-[JSValue description]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      953b3bf2
    • hclam@chromium.org's avatar
      [chromium] Unreviewed gardening. · 0ee988db
      hclam@chromium.org authored
      This test times out on Win7 dbg half of the time:
      fast/js/toString-and-valueOf-override.html
      
      Mark it as Timeout.
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0ee988db
    • dominicc@chromium.org's avatar
      [Chromium] Unreviewed gardening. · 3a9c34cc
      dominicc@chromium.org authored
      Roll Chromium to 177561.
      
      * DEPS:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a9c34cc
    • jparent@chromium.org's avatar
      Flakiness dashboard assumes there must be ToT tests · 485ecc98
      jparent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107155
      
      Remove group as a default parameter, since we can't actually know
      the name of a group initially.  Instead, introduces
      currentBuilderGroupName which returns the current builder group
      if it has been explicitly set, or picks the first one available
      as a default. Allows us to remove some extra code tracking this
      stuff as well.
      
      Reviewed by Ojan Vafai.
      
      * TestResultServer/static-dashboards/dashboard_base.js:
      (parseCrossDashboardParameters):
      (currentBuilderGroupName):
      (currentBuilderGroup):
      * TestResultServer/static-dashboards/flakiness_dashboard.js:
      (platformAndBuildType):
      * TestResultServer/static-dashboards/loader.js:
      (.):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      485ecc98
    • dominicc@chromium.org's avatar
      [Chromium] Unreviewed gardening. · 0e4eb177
      dominicc@chromium.org authored
      Broaden the failure expectations of these tests:
      
      scrollingcoordinator/non-fast-scrollable-region-scaled-iframe.html
      scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
      
      These fail pixel tests by painting the system theme scrollbar; see
      <http://bugs.webkit.org/show_bug.cgi?id=106858>
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e4eb177
    • jonlee@apple.com's avatar
      Do not track user interaction for plugins that are not snapshotted · 3dce68ec
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107211
      <rdar://problem/12967277>
      
      Reviewed by Dean Jackson.
      
      When the user interacts with a snapshotted plug-in, we extend that plug-in origin's
      expiration date. However, plug-ins may not be snapshotted for other reasons than the
      user's initial opt-in. In this case, that plug-in's origin might be not be in the cached
      table. This is an edge case that was not initially considered.
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::plugInDidReceiveUserInteraction): Convert the assertion to an if
      check, and return early if the entry is not found in the cache table.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3dce68ec
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r139402. · 00c65bfb
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/139402
      https://bugs.webkit.org/show_bug.cgi?id=107212
      
      Perf regression on DOMDivWalk (Requested by falken_ on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-17
      
      Source/WebCore:
      
      * dom/Element.cpp:
      (WebCore::Element::removedFrom):
      (WebCore::Element::setIsInTopLayer):
      
      LayoutTests:
      
      * fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer-expected.html: Removed.
      * fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html: Removed.
      * fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd-expected.html: Removed.
      * fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00c65bfb
    • abarth@webkit.org's avatar
      BackgroundHTMLParser should go 18% faster on html-parser-srcdoc benchmark · 3e6bf009
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107201
      
      Reviewed by Tony Gentilcore.
      
      Prior to this patch, we would tokenize all the input before delivering
      any tokens to the main thread. Effectively, that prevented the
      background parser from running in parallel with the main thread.
      
      This patch causes us to send tokens to the main thread periodically.
      The constant in this patch is somewhat arbitrary. We'll need to tune it
      later with more realistic workloads.
      
      This patch improves the performance of the html-parser-srcdoc benchmark
      by 18%. (This patch is based on Eric's work in
      https://github.com/tonygentilcore/webkit/commit/072331194520c7770b5e34baefbbbba948834971.)
      
      * html/parser/BackgroundHTMLParser.cpp:
      (WebCore):
      (WebCore::BackgroundHTMLParser::pumpTokenizer):
      (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e6bf009
    • dominicc@chromium.org's avatar
      Unreviewed, rolling out r140051. · 5c1567f1
      dominicc@chromium.org authored
      http://trac.webkit.org/changeset/140051
      https://bugs.webkit.org/show_bug.cgi?id=107210
      
      html-parser-srcdoc.html failing on Chromium Linux Perf and
      Chromium Mac Perf with a lot of error spew about blocked
      script execution in 'about:srcdoc' (Requested by dominicc on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-17
      
      * Parser/html-parser-srcdoc.html: Removed.
      * Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c1567f1
    • hclam@chromium.org's avatar
      [chromium] Test expectations update · 287d8de1
      hclam@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107209
      
      Mark this test as crash on debug builds:
      fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html
      
      This crash seems to be caused by r140024.
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      287d8de1
    • hclam@chromium.org's avatar
      [chromium] Disable a unit test · e201ee01
      hclam@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107206
      
      Unreviewed. Disable a failing test due to 140025.
      
      * tests/WebFrameTest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e201ee01
    • falken@chromium.org's avatar
      Top layer fails for inline elements · 0884f324
      falken@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106538
      
      Reviewed by Hajime Morita.
      
      Source/WebCore:
      
      This patch makes position 'static' and 'relative' compute to
      'absolute' for elements in the top layer, as mandated by the
      Fullscreen spec.[1] By doing so, we also fix a crash that occurred in
      RenderLayer::rebuildZOrderLists when an inline element wrapped in an
      anonymous block was added to the top layer.
      
      [1]: http://fullscreen.spec.whatwg.org/#new-stacking-layer
      
      Tests: fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position.html
             fast/dom/HTMLDialogElement/top-layer-position-relative.html
             fast/dom/HTMLDialogElement/top-layer-position-static.html
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::adjustRenderStyle): Set position 'absolute'
      for an element in the top layer. Typically, absolutely positioned
      elements also automatically get display 'block', but it seems we must do
      that manually here. We require display 'block' to ensure the renderer is not
      considered inline and consequently wrapped in an anonymous block.
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::rebuildZOrderLists): Check node() so we don't
      crash on, e.g., an anonymous block. We don't expect top layer
      renderers to have anonymous blocks anymore, but we nevertheless
      shouldn't crash if some other renderer is parented by RenderView.
      
      LayoutTests:
      
      * fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position-expected.html: Added.
      * fast/dom/HTMLDialogElement/element-removed-from-top-layer-has-original-position.html: Added.
      * fast/dom/HTMLDialogElement/top-layer-position-relative-expected.html: Added.
      * fast/dom/HTMLDialogElement/top-layer-position-relative.html: Added.
      * fast/dom/HTMLDialogElement/top-layer-position-static-expected.html: Added.
      * fast/dom/HTMLDialogElement/top-layer-position-static.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0884f324
    • hclam@chromium.org's avatar
      [chromium] Test expectations update · f3e7e0ca
      hclam@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107204
      
      Mark this test as flaky:
      fast/events/touch/multi-touch-inside-iframes.html
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3e7e0ca
    • simon.fraser@apple.com's avatar
      Fix crash accessing RenderView's layer's backing when not composited · d5c13727
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107203
      
      Reviewed by Benjamin Poulain.
      
      The RenderView isn't always layer-backed in WebKit1, so null-check the backing.
      
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5c13727
    • rniwa@webkit.org's avatar
      Remove NodeListsNodeData when it's no longer needed · e6ab325d
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107074
      
      Reviewed by Darin Adler.
      
      PerformanceTests: 
      
      Added a micro benchmark to see the benefit of removing NodeListsNodeData.
      The test traverses all elements in the html5 specification page and accesses childNodes.
      
      Don't enable this test for now since it's really a micro benchmark specifically
      designed to test this patch.
      
      * DOM/TraverseChildNodes.html: Added.
      * Skipped: Don't enable newly added test by default.
      * resources/results-template.html: Compare against the unscaled unit (e.g. "bytes") as
      opposed to scaled units such as "K bytes".
      * resources/runner.js:
      (.start): Moved the code to call currentTest.setup from measureRunsPerSecondOnce so that
      it'll be ran for all test types, namely of PerfTestRunner.measureTime.
      (.measureRunsPerSecondOnce):
      
      Source/WebCore: 
      
      Remove NodeListsNodeData when the last node list is removed from it.
      
      If we detect that we have only one node list left in the data structure,
      we'll simply destroy the entire "this" object to free up the memory space.
      
      This reduced the memory usage of the micro benchmark by roughly 3%.
      
      Performance Tests: DOM/TraverseChildNodes.html
      
      * dom/Node.cpp:
      (WebCore::Node::clearNodeLists): Added.
      * dom/Node.h:
      * dom/NodeRareData.h:
      (WebCore::NodeListsNodeData::removeChildNodeList):
      (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
      (WebCore::NodeListsNodeData::removeCacheWithName):
      (WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
      (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList): Added.
      Removes "this" NodeListsNodeData if there is only one node list left.
      
      Tools: 
      
      Generalize the warning a little so that it's also ignored on PerformanceTests/DOM/TraverseChildNodes.html
      
      * Scripts/webkitpy/performance_tests/perftest.py:
      (PerfTest):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6ab325d
    • inferno@chromium.org's avatar
      Heap-use-after-free in WebCore::RenderBlock::checkFloatsInCleanLine · 845a71ce
      inferno@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90802
      
      Reviewed by Julien Chaffraix.
      
      Source/WebCore:
      
      Test: fast/multicol/float-not-removed-crash.html
      
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::moveChildrenTo):
      1. When fullRemoveInsert is True, make sure to clear the
      floating objects from our list (similar to positioned objects).
      Our children are getting moved to another block and we won't
      get notified when they are going away.
      2. Remove the redundant hasPositionedObjects check since it
      is already done inside removePositionedObjects.
      
      LayoutTests:
      
      * fast/multicol/float-not-removed-crash-expected.txt: Added.
      * fast/multicol/float-not-removed-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      845a71ce
    • simon.fraser@apple.com's avatar
      Make it possible for the root background to be painted into its own GraphicsLayer · ee9213cf
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107177
      
      Source/WebCore:
      
      Reviewed by Dave Hyatt.
      
      Make it possible to paint the root background into its own GraphicsLayer, and enable
      this when the root background has background-images that are all background-attachment: fixed.
      
      This is a step towards optimizing scrolling on pages with fixed root backgrounds.
      
      Tests: platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer.html
             platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html.html
             platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html.html
             platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed.html
             platform/mac/tiled-drawing/fixed-background/fixed-body-background.html
             platform/mac/tiled-drawing/fixed-background/fixed-html-background.html
             platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background.html
      
      * rendering/PaintInfo.h:
      (WebCore::PaintInfo::skipRootBackground): Utility function to check the paintBehavior flag.
      (WebCore::PaintInfo::paintRootBackgroundOnly): Ditto.
      * rendering/PaintPhase.h: New paint behavior flags to indicate that we should skip painting
      the root background, and only paint the root background.
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paint): When we're only painting the root background, avoid painting column
      rules, and bail early.
      (WebCore::RenderBlock::paintObject): Don't paint children if we're just painting the root background.
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::styleWillChange): If this box can paint the root background, tell the compositor
      when the fixedness of those backgrounds changes.
      (WebCore::RenderBox::paintRootBoxFillLayers): If the paintBehavior flag is set to skip painting the root
      background, bail. This will be true for the non-background GraphicsLayers which are painting the root.
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::paintLayerContents): We can bail early if we're not a root-like renderer and the
      flag is set to paint the root background only. This avoids walking the whole layer tree when just painting
      into the root background GraphicsLayer.
      Migrate layer paint flags into PaintBehavior flags, and use them.
      * rendering/RenderLayer.h: Layer painting flags that replicate the paintBehavior flags.
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::RenderLayerBacking): Init the m_backgroundLayerPaintsFixedRootBackground bit.
      (WebCore::RenderLayerBacking::~RenderLayerBacking): Clear the background layer.
      (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): No need to handle the transparent background
      stuff here. We'll do it later in updateRootLayerConfiguration().
      (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Actually make a background layer now
      if the compositor says we should.
      Call updateRootLayerConfiguration() to adjust the background color and opaqueness of the background/primary layers.
      (WebCore::RenderLayerBacking::updateInternalHierarchy): Parent the m_backgroundLayer in the containment layer,
      not m_graphicsLayer (this is a bug fix).
      (WebCore::RenderLayerBacking::updateDrawsContent):
      (WebCore::RenderLayerBacking::setBackgroundLayerPaintsFixedRootBackground):
      (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
      (WebCore::RenderLayerBacking::updateBackgroundColor): This no longer needs to update the tile cache
      background color; updateRootLayerConfiguration() does this now.
      (WebCore::RenderLayerBacking::updateRootLayerConfiguration): Update the opaqueness and background color
      of the background and/or main graphics layers.
      (WebCore::RenderLayerBacking::setContentsNeedDisplay): Invalidate the background layer if we have one.
      (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Invalidate the background layer if we have one.
      This will be optimized to only repaint the background if it was the background that changed.
      (WebCore::RenderLayerBacking::paintIntoLayer): Take a GraphicsLayer, not a RenderLayer argument.
      Adjust the paintFlags if we're being asked to paint the background layer, or if we have one, but are painting the foreground.
      (WebCore::RenderLayerBacking::paintContents):
      (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
      (WebCore::RenderLayerBacking::reportMemoryUsage):
      * rendering/RenderLayerBacking.h:
      (WebCore::RenderLayerBacking::backgroundLayer):
      (WebCore::RenderLayerBacking::backgroundLayerPaintsFixedRootBackground):
      (RenderLayerBacking):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): If we're told that the fixed-ness of
      the root background changed and we're using a TileCache, we need to re-evaluate compositing (this could be
      optimized to only update the root layer).
      (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer): For the root (RenderView's) layer,
      check whether the renderer that will paint the root (taking background propagation into account) has
      background images that are all fixed.
      (WebCore::RenderLayerCompositor::fixedRootBackgroundLayer): Accessor for the GraphicsLayer that paints
      the root background (will be used later).
      * rendering/RenderLayerCompositor.h:
      (RenderLayerCompositor):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::hasEntirelyFixedBackground): Returns true there are background images
      and all are fixed.
      * rendering/RenderObject.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::paintBoxDecorations): This function paints a solid color if we know that the root
      isn't going to fill the viewport; we want to avoid this painting if we're not painting the root background
      in this pass.
      * rendering/style/RenderStyle.cpp:
      (WebCore::allLayersAreFixed):
      (WebCore::RenderStyle::hasEntirelyFixedBackground): New helper function.
      * rendering/style/RenderStyle.h:
      
      LayoutTests:
      
      Reviewed by Dave Hyatt.
      
      New tests with results for a fixed root background layer when using tiled drawing.
      
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer.html: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html.html: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html.html: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed.html: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-body-background.html: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-html-background-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-html-background-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-html-background.html: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.png: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt: Added.
      * platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee9213cf
    • simon.fraser@apple.com's avatar
      Ref test images are upside-down in WebKit2 · 85008f5e
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=105457
      
      Reviewed by Sam "Speedy" Weinig.
      
      The bitmap context created in TestInvocation::dumpPixelsAndCompareWithExpected()
      from the window snapshot contained a flipped copy of the image, causing all ref
      and pixel images to be upside-down.
      
      * WebKitTestRunner/cg/TestInvocationCG.cpp:
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85008f5e
    • simon.fraser@apple.com's avatar
      Allow PaintInfo to carry all PaintBehavior flags · 29865a4c
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=106980
      
      Reviewed by Beth Dakin.
      
      In r139908 I missed one instance of the PaintInfo constructor that should take PaintBehaviorNormal
      instead of "false".
      
      * rendering/RenderScrollbarPart.cpp:
      (WebCore::RenderScrollbarPart::paintIntoRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29865a4c
    • hclam@chromium.org's avatar
      [chromium] Test expectations update · 1e722ec3
      hclam@chromium.org authored
      Unreviewed build fix. Update test expectations to reflect crashing tests:
      http/tests/appcache/fail-on-update.html
      http/tests/appcache/fail-on-update-2.html
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e722ec3
    • rafaelw@chromium.org's avatar
      [Template] Avoid reading beyond the end of the buffer in preload scanner when check for </template> · efa6c588
      rafaelw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107143
      
      Reviewed by Adam Barth.
      
      This patch corrects to use AtomicString constructor which takes an explicit size. Additionally, the logic
      for exiting early is slightly improved.
      
      No new tests.
      
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::PreloadTask::PreloadTask):
      (WebCore::HTMLPreloadScanner::processToken):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efa6c588
    • commit-queue@webkit.org's avatar
      [TexMap] Match initializing members in GraphicsLayerTransform to initializing... · 1445afee
      commit-queue@webkit.org authored
      [TexMap] Match initializing members in GraphicsLayerTransform to initializing members in GraphicsLayer.
      https://bugs.webkit.org/show_bug.cgi?id=107090
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-17
      Reviewed by Noam Rosenthal.
      
      GraphicsLayer initializes m_anchorPoint to FloatPoint3D(0.5, 0.5, 0) and
      m_preserves3D to false, while GraphicsLayerTransform initializes m_anchorPoint
      to FloatPoint3D(0, 0, 0) and m_flattening (= !m_preserves3D) to false. It is a
      potential bug. This patch corrects initialization of GraphicsLayerTransform.
      
      Covered by existing compositing pixel tests.
      
      * platform/graphics/GraphicsLayerTransform.cpp:
      (WebCore::GraphicsLayerTransform::GraphicsLayerTransform):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1445afee
    • fpizlo@apple.com's avatar
      ScriptDebugServer::didExecuteProgram should not try to pop stack if there is no stack to pop · cc12d4f5
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107186
      
      Reviewed by Geoffrey Garen.
      
      No new tests, because I'm not sure how to test this. I can repro it on a gnarly web site,
      but I don't know how to create a reduced case that triggers it.
      
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::didExecuteProgram):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc12d4f5
    • timothy@apple.com's avatar
      Build fix. Bad merge. · 2b6fc6b4
      timothy@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b6fc6b4
    • commit-queue@webkit.org's avatar
      [GTK] IndexedDB: Add LevelDB headers to include path if IndexedDB is enabled · 8262c3d0
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107181
      
      Patch by Michael Pruett <michael@68k.org> on 2013-01-17
      Reviewed by Martin Robinson.
      
      No new tests as this is just a build change.
      
      * GNUmakefile.am:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8262c3d0
    • eric@webkit.org's avatar
      The threaded html parser hangs when parsing empty documents (and about:blank) · 6d0ccfe2
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107160
      
      Reviewed by Tony Gentilcore.
      
      This is covered by many existing tests including the html5lib suite.
      
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::finish):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d0ccfe2
    • commit-queue@webkit.org's avatar
      imageSmoothingEnabled frequent, unpredictable crashes · 043c8b62
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107161
      
      Patch by Alexis Hetu <sugoi@chromium.org> on 2013-01-17
      Reviewed by Stephen White.
      
      Source/WebCore:
      
      Added a NULL pointer check to fix a crash.
      
      Test: fast/canvas/canvas-imageSmoothingEnabled-zero-size.html
      
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled):
      
      LayoutTests:
      
      Added a layout test for setting image smoothing enabled on a 0 sized
      canvas.
      
      * fast/canvas/canvas-imageSmoothingEnabled-zero-size-expected.txt: Added.
      * fast/canvas/canvas-imageSmoothingEnabled-zero-size.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      043c8b62
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r140049. · 90313da3
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/140049
      https://bugs.webkit.org/show_bug.cgi?id=107187
      
      Breaks lots of stuff (Requested by schenney on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-17
      
      Source/WebCore:
      
      * svg/SVGViewSpec.cpp:
      (WebCore::SVGViewSpec::setPreserveAspectRatioString):
      (WebCore):
      (WebCore::SVGViewSpec::viewTarget):
      (WebCore::SVGViewSpec::transform):
      (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
      (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
      (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
      * svg/SVGViewSpec.h:
      (SVGViewSpec):
      (WebCore::SVGViewSpec::viewBoxAnimated):
      (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
      * svg/SVGViewSpec.idl:
      
      LayoutTests:
      
      * svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt: Removed.
      * svg/dom/SVGViewSpec-invalid-ref-crash.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      90313da3
    • eric@webkit.org's avatar
      Threaded parser hangs when encountering an unmatched </script> tag · 8c5c85fa
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107170
      
      Reviewed by Adam Barth.
      
      The bug was that the BackgroundHTMLParser naively yields to the
      main thread every time it encounters a </script>
      (as we may have to run script on the main thread).  However, not every
      </script> results in script execution, so the main thread needs to know
      how to tell the BackgroundHTMLParser to continue in cases where no
      script execution is needed.
      
      This whole infrastructure will be replaced when we let the BackgroundHTMLParser
      continue speculatively tokenizing after yielding.
      
      * html/parser/BackgroundHTMLParser.cpp:
      (WebCore::TokenDelivery::TokenDelivery):
      (TokenDelivery):
      (WebCore::TokenDelivery::execute):
      (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
      * html/parser/HTMLDocumentParser.h:
      (HTMLDocumentParser):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c5c85fa
    • ap@apple.com's avatar
      REGRESSION (r139516): NetworkResourceLoadScheduler::receivedRedirect is not called. · 9465ba38
      ap@apple.com authored
              Rubber-stamped by Brady Eidson.
      
              * NetworkProcess/NetworkResourceLoader.cpp:
              (WebKit::NetworkResourceLoader::willSendRequest): Reverted a small part of r139516.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9465ba38
    • commit-queue@webkit.org's avatar
      Coordinated Graphics: Remove redundant behaviors in LayerTreeRenderer. · 18ac4c73
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107084
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-17
      Reviewed by Noam Rosenthal.
      
      There are two changes.
      1. It is redundant to call GraphicsLayer::removeFromParent() or
      GraphicsLayer::removeAllChildren() before deleting GraphicsLayer, because the
      destructor of GraphicsLayerTextureMapper removes a parent and all children.
      2. LayerTreeRenderer::setRootLayerID() does not need to remove all children of
      rootLayer because this method can be called only once.
      
      * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
      (WebKit::LayerTreeRenderer::deleteLayer):
      (WebKit::LayerTreeRenderer::setRootLayerID):
      (WebKit::LayerTreeRenderer::purgeGLResources):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18ac4c73
    • timothy@apple.com's avatar
      Fix build. · 6751878d
      timothy@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6751878d
    • eric@webkit.org's avatar
      Add a version of the html-parser benchmark which uses srcdoc instead of... · d6c45992
      eric@webkit.org authored
      Add a version of the html-parser benchmark which uses srcdoc instead of document.write so it tests the threaded parser
      https://bugs.webkit.org/show_bug.cgi?id=107158
      
      Reviewed by Ryosuke Niwa.
      
      Currently this test even opts-in to the threaded parser if available.
      We'll remove that line when the threaded parser becomes default or goes away.
      
      * Parser/html-parser-srcdoc.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6c45992
    • eric@webkit.org's avatar
      Stop the background parser when canceling parsing to avoid crashing on many layout tests · 061d5809
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107159
      
      Reviewed by Adam Barth.
      
      Covered by many existing tests.
      
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::stopParsing):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      061d5809
    • schenney@chromium.org's avatar
      SVGViewSpec fails when corresponding element has been removed · 3fb82f83
      schenney@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106957
      
      Reviewed by Dirk Schulze.
      
      Source/WebCore:
      
      When JS holds an SVGViewSpec object while deleting the object that
      defines the spec (an SVGSVGElement, or one of a few others) the
      pointer to the target is cleared in the SVGViewSpec but the methods
      that serve JS queries do not check and try to access the now null
      target. This atch fixes the prooblem, throwing JS exceptions where
      possible and returning null where necessary.
      
      Test: svg/dom/SVGViewSpec-invalid-ref-crash.html
      
      * svg/SVGViewSpec.cpp:
      (WebCore):
      (WebCore::SVGViewSpec::viewTarget): Check for null target and throw an exception.
      (WebCore::SVGViewSpec::transform): Check for null target and return
      null. It is not possible to throw an exception here because it leads
      to an invalid cast in the code generated from IDLs.
      (WebCore::SVGViewSpec::viewBoxAnimated): Check for null target and throw an exception.
      (WebCore::SVGViewSpec::preserveAspectRatioAnimated): Check for null target and throw an exception.
      (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): ASSERT non-null target
      (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): ASSERT non-null target
      (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): ASSERT non-null target
      * svg/SVGViewSpec.h:
      (SVGViewSpec): Add Exception arguments to getter methods.
      * svg/SVGViewSpec.idl: Mark attributes as throwing exceptions.
      
      LayoutTests:
      
      Test for the situation in which the target of an SVGViewSpec is
      removed while the view spec lives on in JS.
      
      * svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt: Added.
      * svg/dom/SVGViewSpec-invalid-ref-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fb82f83
    • alecflett@chromium.org's avatar
      IndexedDB: Remove unnecessary call to IDBDatabaseBackendInterface::metadata() · dda3f4e1
      alecflett@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107142
      
      Reviewed by Kentaro Hara.
      
      This call isn't necessary, and probably slipped through an earlier review
      because of the mention of 'm_metadata'.
      
      No new tests, as this code has no side effects and all tests sill pass.
      
      * Modules/indexeddb/IDBIndex.cpp:
      (WebCore::IDBIndex::count):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dda3f4e1
    • ojan@chromium.org's avatar
      Table layout does not need to explicitly call computePreferredLogicalWidths · 8cdbcc91
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=106931
      
      Reviewed by Julien Chaffraix.
      
      Code shouldn't need to explicitly call computePreferredLogicalWidths.
      It should only get called as a by-product of calling minPreferredLogicalWidth
      or maxPreferredLogicalWidth.
      
      Instead, make it clear that the calling code is just trying to clear
      preferred width dirty bits.
      
      * rendering/AutoTableLayout.cpp:
      (WebCore::AutoTableLayout::recalcColumn):
      The computePreferredLogicalWidths call on the table cell is redundant
      with the minPreferredLogicalWidth call on the next line.
      
      * rendering/FixedTableLayout.cpp:
      (WebCore::FixedTableLayout::calcWidthArray):
      We only need to clear the dirty bit here. Table cells don't use
      their preferred widths in fixed table layout calculations.
      
      * rendering/RenderTableCell.h:
      * rendering/RenderTableCol.cpp:
      (WebCore::RenderTableCol::clearPreferredLogicalWidthsDirtyBits):
      * rendering/RenderTableCol.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8cdbcc91
    • yoli@rim.com's avatar
      [BlackBerry] InRegionScroller should notify client before it deletes all the scrollables · a44c86b2
      yoli@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=107162
      
      Reviewed by Rob Buis.
      Internally reviewed by Gen Mak and Mike Fenton.
      
      Move the notification code from notifyInRegionScrollStopped() to reset() as there are
      other places where reset() gets called.
      
      * Api/InRegionScroller.cpp:
      (BlackBerry::WebKit::InRegionScrollerPrivate::reset):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a44c86b2
    • jchaffraix@webkit.org's avatar
      [CSS Grid Layout] Updating -webkit-grid-rows or -webkit-grid-columns doesn't work as expected · 67cadacb
      jchaffraix@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107062
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Tests: fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update.html
             fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update.html
      
      This change makes -webkit-grid-rows and -webkit-grid-columns dynamic change properly
      relayout their children, thus making them work!
      
      * rendering/RenderGrid.cpp:
      (WebCore::RenderGrid::layoutGridItems):
      Fixed the logic to force a grid item relayout if the grid area size changes. This is the
      safest approach as margins or paddings can also be a percent of the grid area's size.
      
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::diff):
      Fixed a dumb mistake.
      
      LayoutTests:
      
      * fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update-expected.txt: Added.
      * fast/css-grid-layout/percent-grid-item-in-percent-grid-track-update.html: Added.
      * fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update-expected.txt: Added.
      * fast/css-grid-layout/percent-padding-margin-resolution-grid-item-update.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67cadacb