Positioned, replaced elements with intrinsic width keywords compute the wrong width
[WebKit-https.git] / Source / WebCore / ChangeLog
index 6bf5e43..9aafb56 100644 (file)
@@ -1,3 +1,400 @@
+2013-02-20  Ojan Vafai  <ojan@chromium.org>
+
+        Positioned, replaced elements with intrinsic width keywords compute the wrong width
+        https://bugs.webkit.org/show_bug.cgi?id=110393
+
+        Reviewed by Emil A Eklund.
+
+        Test: fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
+        Add the intrinsic size keywords to the switch. Confusingly, we have to
+        subtract the border and padding since the callers expect the content width.
+
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::computeReplacedLogicalWidth):
+        Don't do the intrinsic ratio calculation if the width is an
+        intrinsic width keyword, as per, http://dev.w3.org/csswg/css3-sizing/#replaced-intrinsic.
+
+        (WebCore::RenderReplaced::computeIntrinsicLogicalWidths):
+        (WebCore::RenderReplaced::computePreferredLogicalWidths):
+        The old code was trying to apply the intrinsic ratio calculation to
+        the intrinsic width, which is wrong per spec.
+
+2013-02-20  Alec Flett  <alecflett@chromium.org>
+
+        LevelDB: Remove excess vector copy
+        https://bugs.webkit.org/show_bug.cgi?id=110399
+
+        Reviewed by Tony Chang.
+
+        Remove an extra copy introduced by the makeVector function.
+
+        No new tests, this is covered by existing tests.
+
+        * platform/leveldb/LevelDBDatabase.cpp:
+        (WebCore::LevelDBDatabase::safeGet):
+
+2013-02-20  Simon Fraser  <simon.fraser@apple.com>
+
+        Zoomed, slow-scrolling pages keep recreating tiles when scrolled
+        https://bugs.webkit.org/show_bug.cgi?id=110379
+
+        Reviewed by Tim Horton.
+
+        On slow-scrolling pages the TileCache makes the tiles the size of
+        the visible rect to minimize per-tile painting overhead. If the size
+        of that rect changes, the TileCache re-creates all the tiles.
+        
+        This was a problem whem zoomed, because mapping the visible rect
+        through the scale transform and then rounding it would cause the
+        size to keep changing, causing lots of tile re-creation.
+        
+        Fix by carrying the visibleRect around as a FloatRect, and doing
+        the same for the exposedRect. We then only expand to integers
+        when computing the tile size. This also fixes an issue where we could
+        sometimes make extra tiles because of fractional bits of tiles at the edges,
+        as shown by the test result change.
+
+        * platform/graphics/TiledBacking.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::updateVisibleRect):
+        * platform/graphics/ca/mac/TileCache.h:
+        * platform/graphics/ca/mac/TileCache.mm:
+        (WebCore::TileCache::setVisibleRect):
+        (WebCore::TileCache::setExposedRect):
+        (WebCore::TileCache::prepopulateRect):
+        (WebCore::TileCache::computeTileCoverageRect):
+        (WebCore::TileCache::tileSizeForCoverageRect):
+        (WebCore::TileCache::blankPixelCountForTiles):
+        (WebCore::TileCache::revalidateTiles):
+        (WebCore::TileCache::ensureTilesForRect):
+        * platform/graphics/ca/mac/WebTileLayer.mm:
+        (-[WebTileLayer logFilledFreshTile]):
+
+2013-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
+
+        [CSS Grid Layout] Implement the auto-placement algorithm without grid growth
+        https://bugs.webkit.org/show_bug.cgi?id=110277
+
+        Reviewed by Tony Chang.
+
+        Tests: fast/css-grid-layout/grid-item-addition-auto-placement-update.html
+               fast/css-grid-layout/grid-item-removal-auto-placement-update.html
+               fast/css-grid-layout/grid-auto-flow-resolution.html (extended to cover more cases)
+
+        This change implements most of the auto-placement algorithm per
+        http://dev.w3.org/csswg/css3-grid-layout/#auto-placement-algo
+
+        To limit the size of the code change, it doesn't implement growing the grid if there
+        are no empty grid areas. If we don't find any empty grid areas, we just insert in the first
+        one, like what grid-auto-flow: none would do (which explains the test failures).
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
+        Added this function to return the GridCoordinate of the next empty grid area along
+        the iterator's direction.
+
+        (WebCore::RenderGrid::placeItemsOnGrid):
+        Split this function into the different steps below. For efficiency, collect the auto vs specified
+        major axis grid items in different Vectors.
+
+        (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
+        Added this function that implements part of step 1 of the algorithm (the grid items without
+        auto row / column are already handled in placeItemsOnGrid).
+
+        (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
+        Added this function that iterates over the auto grid items and call placeAutoMajorAxisItemOnGrid.
+
+        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
+        Added this method to handle the step 4 of the algorithm. Based on the minor axis's position,
+        it either walks along the major axis once or several times until it finds an empty grid area
+        for the grid item.
+
+        (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
+        (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):
+        (WebCore::RenderGrid::autoPlacementMajorAxisDirection):
+        (WebCore::RenderGrid::autoPlacementMinorAxisDirection):
+        Added these helper functions that return minor / major axis positions & direction.
+
+        * rendering/RenderGrid.h:
+        Added the previous new RenderGrid functions.
+
+2013-02-20  Vincent Scheib  <scheib@chromium.org>
+
+        Accept 'allowfullscreen' in addition to 'webkitallowfullscreen'.
+        https://bugs.webkit.org/show_bug.cgi?id=110374
+
+        Reviewed by Adam Barth.
+
+        The fullscreen API also includes a new HTML attribute for iframes
+        which permits its use. That attribute, 'allowfullcreen' is now
+        included in the HTML specification [1] and is stable enough
+        to remove the webkit prefix.
+
+        [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-allowfullscreen
+
+        Tests: fullscreen/full-screen-enabled-prefixed.html
+               fullscreen/full-screen-iframe-allowed-prefixed.html
+               fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html
+
+        * dom/Document.cpp:
+        (WebCore::isAttributeOnAllOwners):
+        (WebCore::Document::fullScreenIsAllowedForElement):
+        (WebCore::Document::webkitFullscreenEnabled):
+        * html/HTMLAttributeNames.in:
+
+2013-02-20  Roger Fong  <roger_fong@apple.com>
+
+        Unreviewed. Remove references to SAFARI_THEME from Windows Solution.
+        <rdar://problem/13258710>
+
+        * config.h:
+        * page/Settings.cpp:
+        * page/Settings.h:
+        * platform/win/ScrollbarThemeWin.cpp:
+        * rendering/RenderThemeWin.cpp:
+
+2013-02-20  Roger Fong  <roger_fong@apple.com>
+
+        Get VS2010 Solution B&I ready.
+        <rdar://problem/1322988>
+
+        Rubberstamped by Timothy Horton.
+
+        Add Production configuration. 
+        Add a WebCore submit solution with a DebugSuffix configuration. 
+        Modify WebCore.make as necessary.
+        
+        * DerivedSources.make:
+        * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
+        * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props:
+        * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props: Added.
+        * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
+        * WebCore.vcxproj/WebCore.make: Added.
+        * WebCore.vcxproj/WebCore.sln: Removed.
+        * WebCore.vcxproj/WebCore.submit.sln: Copied from Source/WebCore/WebCore.vcxproj/WebCore.sln.
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCoreGenerated.vcxproj:
+        * WebCore.vcxproj/WebCoreGeneratedProduction.props: Added.
+        * WebCore.vcxproj/WebCoreGeneratedRelease.props:
+        * WebCore.vcxproj/WebCoreProduction.props: Added.
+        * WebCore.vcxproj/WebCoreRelease.props:
+        * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
+
+2013-02-20  Adam Klein  <adamk@chromium.org>
+
+        [v8] Fix an erroneous WrapperGrouper call in preparation for refactoring
+        https://bugs.webkit.org/show_bug.cgi?id=110396
+
+        Reviewed by Kentaro Hara.
+
+        This is in preparation for a refactor to expose a simplified
+        WrapperGrouper interface to V8 wrapper classes enabling them to
+        specify multiple roots per wrapper object. 
+
+        * bindings/v8/V8GCController.cpp: Since MutationObservers are not Nodes, the correct call here is addObjectToGroup, as it is for all other non-Node wrappers.
+
+2013-02-20  Levi Weintraub  <leviw@chromium.org>
+
+        Line layout (but not pref widths) double-counts word spacing when between inlines
+        https://bugs.webkit.org/show_bug.cgi?id=110381
+
+        Reviewed by Emil A Eklund.
+
+        When a word break with a space occurs between inlines and word-spacing is non-zero,
+        line layout incorrectly committed the word-spacing value to the line twice, causing
+        wrapping in inline-blocks. To fix this, clear the word-spacing value when between
+        words and ignoring spaces, as we will already have added the word-spacing to the
+        line.
+
+        Test: fast/text/word-space-between-inlines.html
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
+
+2013-02-20  Nate Chapin  <japhet@chromium.org>
+
+        Crash in WebCore::FrameLoader::checkCompleted()
+        https://bugs.webkit.org/show_bug.cgi?id=110237
+
+        Reviewed by Abhishek Arya.
+
+        Test: http/tests/misc/delete-frame-during-readystatechange.html
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::checkCompleted): Protect before setReadyState() is called.
+
+2013-02-20  David Grogan  <dgrogan@chromium.org>
+
+        IndexedDB: Limit LevelDB's max open files
+        https://bugs.webkit.org/show_bug.cgi?id=109993
+
+        Reviewed by Tony Chang.
+
+        LevelDB keeps up to 1000 (by default) data files open at a time to
+        avoid having to open() them. This has caused chromium to hit the
+        process-wide open file limit. This patch changes max_open_files to 20,
+        as that's the minimum permitted by LevelDB and we have no reason to
+        think that performance will suffer because of the extra open calls.
+
+        No new tests - a chromium browser test that tracks the open LevelDB
+        files is plausible but is blocked on http://crbug.com/177249/.
+
+        * platform/leveldb/LevelDBDatabase.cpp:
+        (WebCore::openDB):
+
+2013-02-20  David Hyatt  <hyatt@apple.com>
+
+        [New Multicolumn] Resize RenderMultiColumnSets around their columns.
+        https://bugs.webkit.org/show_bug.cgi?id=110378.
+
+        Reviewed by Dirk Schulze.
+
+        Test: fast/multicol/newmulticol/positioned-with-constrained-height.html.
+
+        * rendering/RenderBlock.h:
+        (RenderBlock):
+        Make computeOverflow public so that RenderMultiColumnFlowThread can
+        access it.
+
+        * rendering/RenderMultiColumnFlowThread.cpp:
+        (WebCore::RenderMultiColumnFlowThread::layout):
+        Subclass layout to recompute the overflow for RenderMultiColumnBlock
+        after the flow thread has finished layout. This way it can account
+        for changes in RenderMultiColumnSets without having to do a second
+        layout pass.
+
+        * rendering/RenderMultiColumnFlowThread.h:
+        (RenderMultiColumnFlowThread):
+        Override layout().
+
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::columnCount):
+        Clean up a comment that referred to portions as region rects still.
+
+        (WebCore::RenderMultiColumnSet::setFlowThreadPortionRect):
+        * rendering/RenderMultiColumnSet.h:
+        * rendering/RenderRegion.h:
+        (WebCore::RenderRegion::setFlowThreadPortionRect):
+        Make setFlowThreadPortionRect virtual and actually mutate the size
+        and position of RenderMultiColumnSets so that they enclose their
+        column rects.
+
+2013-02-20  Dirk Schulze  <krit@webkit.org>
+
+        Enable CANVAS_PATH flag
+        https://bugs.webkit.org/show_bug.cgi?id=108508
+
+        Reviewed by Simon Fraser.
+
+        Enable CANVAS_PATH flag on trunk.
+
+        Existing tests cover the feature.
+
+        * Configurations/FeatureDefines.xcconfig:
+
+2013-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r143441.
+        http://trac.webkit.org/changeset/143441
+        https://bugs.webkit.org/show_bug.cgi?id=110376
+
+        May be causing chromium content_browsertests failures.
+        (Requested by vollick on #webkit).
+
+        * bindings/v8/ScriptValue.cpp:
+        (WebCore::ScriptValue::serialize):
+        (WebCore::ScriptValue::getString):
+        (WebCore::ScriptValue::toString):
+        (WebCore::ScriptValue::toInspectorValue):
+        * bindings/v8/ScriptValue.h:
+        (WebCore::ScriptValue::ScriptValue):
+        (WebCore::ScriptValue::operator=):
+        (WebCore::ScriptValue::operator==):
+        (WebCore::ScriptValue::isEqual):
+        (WebCore::ScriptValue::isFunction):
+        (WebCore::ScriptValue::isNull):
+        (WebCore::ScriptValue::isUndefined):
+        (WebCore::ScriptValue::isObject):
+        (WebCore::ScriptValue::hasNoValue):
+        (WebCore::ScriptValue::clear):
+        (WebCore::ScriptValue::v8Value):
+        (ScriptValue):
+        * bindings/v8/SharedPersistent.h:
+        (WebCore):
+        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+        (WebCore::InjectedScriptHost::scriptValueAsNode):
+        * bindings/v8/custom/V8MessageEventCustom.cpp:
+        (WebCore::V8MessageEvent::dataAttrGetterCustom):
+
+2013-02-15  Dirk Schulze  <krit@webkit.org>
+
+        [Chromium] Add runtime flag for CanvasPath
+        https://bugs.webkit.org/show_bug.cgi?id=109997
+
+        Reviewed by Adam Barth.
+
+        Add runtime flag for Chromium.
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        (WebCore):
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (RuntimeEnabledFeatures):
+        (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
+        (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
+        * html/canvas/DOMPath.idl:
+        * page/DOMWindow.idl:
+
+2013-02-20  Laszlo Gombos  <l.gombos@samsung.com>
+
+        Remove unnecessary includes for Platform.h from headers
+        https://bugs.webkit.org/show_bug.cgi?id=110300
+
+        Reviewed by Alexey Proskuryakov.
+
+        wtf/Platform.h only need to be included in a few places directly
+        as it is included in config.h. Remove the unnecessay duplicate as
+        it can be confusing.
+
+        No new tests, no change in functionality.
+
+        * platform/SecureTextInput.h:
+        * platform/audio/Biquad.h:
+        * platform/audio/FFTFrame.h:
+        * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
+        * platform/graphics/cpu/arm/filters/NEONHelpers.h:
+        * platform/graphics/filters/FELighting.h:
+
+2013-02-20  Florin Malita  <fmalita@chromium.org>
+
+        [SVG] Update of element referenced by multiple 'use' nodes is absurdly slow
+        https://bugs.webkit.org/show_bug.cgi?id=97905
+
+        Reviewed by Dirk Schulze.
+
+        Rebuilding the shadow and instance trees of dependent use nodes recursively can be
+        extremely inefficient with non-trivial dependency graphs (the trees are not constructed
+        in topological order).
+
+        To avoid redundant buildShadowAndInstanceTree() invokations, separate the invalidation
+        phase from the actual tree (re)building phase, and only descend into the dependency DAG
+        during the invalidation phase (recursion also stops at nodes that have been previously
+        invalidated).
+
+        No new tests: functional coverage provided by existing tests, perfomance tracked by
+        PerformanceTests/SVG/SvgNestedUse.html.
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::buildPendingResource):
+        (WebCore::SVGUseElement::buildShadowAndInstanceTree):
+        (WebCore::SVGUseElement::invalidateShadowTree):
+        (WebCore):
+        (WebCore::SVGUseElement::invalidateDependentShadowTrees):
+        * svg/SVGUseElement.h:
+        (SVGUseElement):
+
 2013-02-20  Tim Horton  <timothy_horton@apple.com>
 
         RenderLayerBacking should initialize TiledBacking's isInWindow state with Page's isInWindow, not isOnscreen