1. 15 Aug, 2012 1 commit
    • ojan@chromium.org's avatar
      z-index should work without position on flexitems · a4039c89
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91405
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Require a layer on any RenderBox that has a non-auto z-index.
      Statically positioned, non-flex-item's have their z-index coerced to auto,
      so it's safe to check z-index unconditionally.
      
      Test: css3/flexbox/z-index.html
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::adjustRenderStyle):
      -Don't coerce z-index to auto on statically positioned flex-items.
      -Use the parentStyle to determine if the parent is a flexbox instead of
      looking at the element's parentNode's renderer.
      * rendering/RenderBox.h:
      -Add having a non-auto z-index to the list of things that require a layer.
      
      LayoutTests:
      
      * css3/flexbox/z-index-expected.html: Added.
      * css3/flexbox/z-index.html: Added.
      Use a ref-test since we want to be sure that the elements get painted in the right order.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4039c89
  2. 14 Aug, 2012 1 commit
    • achicu@adobe.com's avatar
      [CSS Shaders][Chromium] Filters area applied twice when CustomFilterOperation is in the list · 196c77ea
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93900
      
      Reviewed by James Robinson.
      
      Source/WebCore:
      
      Whenever the platform cannot render a shader in hardware it will fallback to software.
      In such cases, the platform should remove any old filters applied, so that the filters do not apply twice.
      
      Test: css3/filters/custom/filter-fallback-to-software.html
      
      * platform/graphics/chromium/GraphicsLayerChromium.cpp:
      (WebCore::GraphicsLayerChromium::setFilters):
      
      LayoutTests:
      
      Added a test that first applies a blur and then switches to a CSS Shader plus a blur.
      The test was failing on Chromium by not removing the old blur filter from the platform layer.
      
      * css3/filters/custom/filter-fallback-to-software-expected.html: Added.
      * css3/filters/custom/filter-fallback-to-software.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      196c77ea
  3. 10 Aug, 2012 2 commits
    • ojan@chromium.org's avatar
      New test introduced in r125262 css3/flexbox/inline-flex-crash2.html fails · a100162e
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93718
      
      Test uses layoutTestController instead of testRunner.
      
      * css3/flexbox/inline-flex-crash2.html:
      * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a100162e
    • tony@chromium.org's avatar
      implement display: -webkit-inline-flex · bdd6383a
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=77772
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      The crashes last time were because we were marking too much of the tree for relayout. During some editing
      operations, this causes a layout when we're in an inconsistent state.
      
      Tests: css3/flexbox/inline-flex-crash.html
             css3/flexbox/inline-flex-crash2.html
             css3/flexbox/inline-flex.html
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Only layout the child.
      (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Only layout the child.
      (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Only layout the child.
      * rendering/style/RenderStyle.h: Include INLINE_FLEX as an inline and replaced display type.
      
      LayoutTests:
      
      Include 2 crash tests that caused this to be reverted the last time.
      
      * css3/flexbox/inline-flex-crash-expected.txt: Added.
      * css3/flexbox/inline-flex-crash.html: Added.
      * css3/flexbox/inline-flex-crash2-expected.txt: Added.
      * css3/flexbox/inline-flex-crash2.html: Added.
      * css3/flexbox/inline-flex-expected.html: Added.
      * css3/flexbox/inline-flex.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bdd6383a
  4. 08 Aug, 2012 5 commits
    • tony@chromium.org's avatar
      css3/flexbox/content-height-with-scrollbars.html failing on non-fractional pixel layout machines · 6abef185
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93530
      
      Unreviewed, fixing the test to not depend on rounding behavior.
      
      * css3/flexbox/content-height-with-scrollbars-expected.html: Use a fixed width.
      * css3/flexbox/content-height-with-scrollbars.html: Use a fixed width.
      * platform/efl/TestExpectations: Remove failing expectation.
      * platform/gtk/TestExpectations: Remove failing expectation.
      * platform/mac/TestExpectations: Remove failing expectation.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6abef185
    • achicu@adobe.com's avatar
      [CSS Shaders] Invalid shaders should act as pass-through filters · 73b916c0
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93405
      
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      If the shader fails to apply then clearShaderResult will just copy the result of the previous filter
      to the output of the current filter.
      
      Test: css3/filters/custom/invalid-custom-filter-shader.html
      
      * platform/graphics/filters/FECustomFilter.cpp:
      (WebCore::FECustomFilter::platformApplySoftware):
      (WebCore):
      (WebCore::FECustomFilter::clearShaderResult):
      (WebCore::FECustomFilter::applyShader):
      * platform/graphics/filters/FECustomFilter.h:
      (FECustomFilter):
      * rendering/style/StyleCustomFilterProgram.h: The test was exposing the fact that if the shaders were referencing the same
      file then StyleCustomFilterProgram will never complete the load. Having the same file for both the vertex and the fragment shader
      cannot really work, because the shaders would not compile anyway, thus triggering an invalid shader.
      I'm fixing it part of this change because the current test actually exposes that on Safari Mac builds. See the note in the LayoutTest/ChangeLog.
      (WebCore::StyleCustomFilterProgram::notifyFinished):
      
      LayoutTests:
      
      Note that invalid-custom-filter-shader-expected.html is actually using another builtin filter,
      just to make sure we trigger the whole FilterEffectRenderer on the images, otherwise the result will be
      slightly different because of the conversion errors. Having another filter like grayscale(0) will trigger
      the same precission errors on the result of the expected html.
      
      * css3/filters/custom/invalid-custom-filter-shader-expected.html: Added.
      * css3/filters/custom/invalid-custom-filter-shader.html: Added.
      * css3/filters/resources/invalid-shader.vs: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      73b916c0
    • commit-queue@webkit.org's avatar
      css3/calc/transitions-dependent.html was causing css3/calc/transitions.html to fail · aa067260
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93515
      
      Patch by Roger Fong <roger_fong@apple.com> on 2012-08-08
      Reviewed by Tim Horton.
      
      The transitions-dependent.html test was causing the transitions.html test to fail.
      This was a result of a timeout callback set in the first test that was only being fired
      in the second test because the first test did not use waitUntilDone/notifyDone.
      The second test printed out an extra TypeError: 'undefined' error message because the callback
      was defined in the first test and was thus 'undefined' by the time it was called while the second test
      was running.
      
      In addition, the test contained the following line:
      window.addEventListener("load", function() { waitForAnimationStart(runTest(expectedValues)); }, false);
      which does not work as intended because the parameter to waitForAnimationStart should have been a function
      that calls runTest, not the call to the runTest function itself, which calls the method immediately.
      
      * css3/calc/transitions-dependent.html:
      Added waitUntilDone/notifyDone.
      Fixed function parameter.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa067260
    • ojan@chromium.org's avatar
      percentage height/width values in quirks mode are incorrectly resolved in flexbox children · 1c5ee94a
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=81809
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      When computing percentage logical heights we need to use the RenderBox helper methods
      to make sure we handle all the edge cases correctly (e.g. walk up the containing block
      ancestor chain in quirks mode until we find a definite size).
      
      For widths, the containing block always has a definite size, so all we need to do
      is call computeContentBoxLogicalWidth(valueForLength(...)), although I'm not sure
      this does the right thing for the intrinsic sizing keywords.
      
      Tests: css3/flexbox/box-sizing-min-max-sizes.html
             css3/flexbox/percentage-sizes-quirks.html
             css3/flexbox/percentage-sizes.html
      
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::computeLogicalClientHeight):
      (WebCore):
      * rendering/RenderBox.h:
      (RenderBox):
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::computeMainAxisSizeForChild):
      (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
      (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
      * rendering/RenderFlexibleBox.h:
      
      LayoutTests:
      
      * css3/flexbox/box-sizing-min-max-sizes-expected.txt: Added.
      * css3/flexbox/box-sizing-min-max-sizes.html: Added.
      * css3/flexbox/percentage-sizes-expected.txt: Added.
      * css3/flexbox/percentage-sizes-quirks-expected.txt: Added.
      * css3/flexbox/percentage-sizes-quirks.html: Added.
      * css3/flexbox/percentage-sizes.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c5ee94a
    • achicu@adobe.com's avatar
      [Chromium] Skia assert triggered by custom filter unmultiplied results · 401c4c4d
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=92758
      
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      The FECustomFilter (which renders the CSS Shaders) used premultiplied colors for both input and ouput.
      The problem with that is that some shaders do not pre-multiply the values and the reality is that
      we cannot trust the shader to do that. The easy way would be to use only unpremultiplied colors and do the
      computation in C++ code. This will be changed when the mix blending is implemented to do that in the shader itself.
      
      No new tests, just updated existing tests to take unpremultiplied colors instead.
      
      * platform/graphics/filters/FECustomFilter.cpp:
      (WebCore::FECustomFilter::platformApplySoftware):
      
      LayoutTests:
      
      Updated the shaders to output un-premultiplied colors. Also, updated the output results where needed.
      
      * css3/filters/custom/custom-filter-shader-cache-expected.png:
      * css3/filters/custom/effect-color-check-expected.png:
      * css3/filters/custom/effect-custom-combined-missing-expected.png:
      * css3/filters/custom/effect-custom-expected.png:
      * css3/filters/custom/effect-custom-parameters-expected.png:
      * css3/filters/custom/filter-repaint-custom-expected.png:
      * css3/filters/custom/missing-custom-filter-shader-expected.png:
      * css3/filters/resources/color-add.fs:
      * css3/filters/resources/color-fill.fs:
      * platform/chromium/TestExpectations: Disabled the following tests on Windows. They need a rebaseline.
      * platform/chromium-linux/css3/filters/custom/effect-color-check-expected.png:
      * platform/chromium-linux/css3/filters/custom/effect-custom-combined-missing-expected.png:
      * platform/chromium-linux/css3/filters/custom/effect-custom-parameters-expected.png:
      * platform/chromium-mac/css3/filters/custom/effect-color-check-expected.png:
      * platform/chromium-mac/css3/filters/custom/effect-custom-combined-missing-expected.png:
      * platform/chromium-mac/css3/filters/custom/effect-custom-parameters-expected.png:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      401c4c4d
  5. 07 Aug, 2012 2 commits
    • ojan@chromium.org's avatar
      percentage margins + flex incorrectly overflows the flexbox · e55104fd
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93411
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Percent margins should always be computed with respect to the containing
      block's width, not it's height. We were getting this wrong in column flows.
      
      Test: css3/flexbox/percent-margins.html
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::computeMarginValue):
      (WebCore):
      (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
      (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
      * rendering/RenderFlexibleBox.h:
      
      LayoutTests:
      
      * css3/flexbox/percent-margins-expected.txt: Added.
      * css3/flexbox/percent-margins.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e55104fd
    • achicu@adobe.com's avatar
      [CSS Shaders] Reuse precompiled shaders across elements · 5ab975b3
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=88427
      
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      Added CustomFilterProgramInfo as a link between the CustomFilterProgram and the CustomFilterCompiledProgram.
      CustomFilterGlobalContext now acts as a cache for the compiled shaders. Note that only the shaders displayed on the page
      are cached, making it useful in animations or when more elements share the same shader filter.
      
      For CSS Shaders we need two files, vertex and fragment shaders, so that's why we have a CustomFilterProgram.
      CustomFilterProgram is the platform object, so StyleCustomFilterProgram implements it and is referenced from the RenderStyle.
      
      StyleCustomFilterProgram is also the one that actually keeps references to the CachedShaders and has all the loading logic.
      The only problem is that there might be multiple StyleCustomFilterProgram with the same set of CachedShaders.
      That's why in this patch I've added CustomFilterProgramInfo as a simple class to be used as a key in a hash map.
      
      For now CustomFilterProgramInfo should act similar to a pair<String, String>. There's only one exception: one of the strings
      is allowed to be null. A null string is the placeholder for the default shader.
      
      Note that alpha compositing and blending will be added to the CustomFilterProgramInfo after the mix()
      function parsing will land in https://bugs.webkit.org/show_bug.cgi?id=90101 .
      
      Test: css3/filters/custom/custom-filter-shader-reuse.html
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
      (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
      (WebCore::CustomFilterCompiledProgram::getDefaultShaderString): Returns the default shader based on the type.
      (WebCore):
      (WebCore::CustomFilterCompiledProgram::compileShader): Added check for isNull and used the default shader in that case.
      (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram): Added call to CustomFilterGlobalContext::removeCompiledProgram.
      * platform/graphics/filters/CustomFilterCompiledProgram.h:
      (WebCore::CustomFilterCompiledProgram::detachFromGlobalContext): Called from ~CustomFilterGlobalContext, so that it doesn't call into a deleted object later when ~CustomFilterCompiledProgram is called. It should only happen when CustomFilterGlobalContext dies before the
      CustomFilterCompiledPrograms that it caches.
      (WebCore):
      * platform/graphics/filters/CustomFilterGlobalContext.cpp:
      (WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
      (WebCore::CustomFilterGlobalContext::getCompiledProgram): Gets or creates a compiled shader for a specific CustomFilterProgramInfo.
      (WebCore):
      (WebCore::CustomFilterGlobalContext::removeCompiledProgram): Called by ~CustomFilterCompiledProgram.
      * platform/graphics/filters/CustomFilterGlobalContext.h:
      (WebCore):
      (CustomFilterGlobalContext):
      * platform/graphics/filters/CustomFilterProgram.cpp:
      (WebCore::CustomFilterProgram::programInfo):
      * platform/graphics/filters/CustomFilterProgram.h:
      (WebCore):
      * platform/graphics/filters/CustomFilterProgramInfo.cpp: Added.
      (WebCore):
      (WebCore::hashPossiblyNullString): We need to allow null strings in the hash, so this is a helper to check for isNull
      before asking for the hash.
      (WebCore::CustomFilterProgramInfo::CustomFilterProgramInfo):
      (WebCore::CustomFilterProgramInfo::isEmptyValue):
      (WebCore::CustomFilterProgramInfo::isHashTableDeletedValue):
      (WebCore::CustomFilterProgramInfo::hash):
      (WebCore::CustomFilterProgramInfo::operator==):
      * platform/graphics/filters/CustomFilterProgramInfo.h: Added.
      (WebCore):
      (CustomFilterProgramInfo):
      (WebCore::CustomFilterProgramInfo::vertexShaderString):
      (WebCore::CustomFilterProgramInfo::fragmentShaderString):
      (WebCore::CustomFilterProgramInfoHash::hash):
      (WebCore::CustomFilterProgramInfoHash::equal):
      (CustomFilterProgramInfoHash): Structures needed to make this a key in the hash map.
      (CustomFilterProgramInfoHashTraits):
      (WebCore::CustomFilterProgramInfoHashTraits::isEmptyValue): I've used the deleted strings value to mark a deleted
      CustomFilterProgramInfo object. Those are not safe to compare to deleted, so there's a need to set safeToCompareToEmptyOrDeleted to false, meaning that there's a need to manually check for empty values.
      (WTF):
      * platform/graphics/filters/FECustomFilter.cpp:
      (WebCore::FECustomFilter::initializeContext): Moved to using the cached shader instead.
      
      LayoutTests:
      
      Added a new test to check for cases when CSS Shaders are removed and readded. Two cases are verified in the new test:
      1. When all the shaders are removed.
      2. When only some of the shaders are removed.
      
      * css3/filters/custom/custom-filter-shader-reuse-expected.txt: Added.
      * css3/filters/custom/custom-filter-shader-reuse.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ab975b3
  6. 06 Aug, 2012 2 commits
    • commit-queue@webkit.org's avatar
      [CSS Shaders] Parse mix function · 957a6757
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90101
      
      Patch by Max Vujovic <mvujovic@adobe.com> on 2012-08-06
      Reviewed by Dirk Schulze.
      
      Source/WebCore:
      
      Parse the mix function syntax for CSS Shaders as defined in the Filter Effects spec:
      https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterFunction
      
      The fragment shader argument of the custom filter function can now be a mix function with
      the following syntax:
      mix(<uri> [ <blend-mode> || <alpha-compositing> ]?)
      
      For example:
      -webkit-filter: custom(url(shader.vert) mix(url(shader.frag multiply source-over))
      
      The Filter Effects spec references the Compositing and Blending spec, which defines the
      supported blend modes and alpha compositing modes.
      
      Blend modes:
      https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blend-mode
      
      This patch adds all of the blend modes in the spec.
      
      Alpha compositing modes:
      https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#alpha-compositing
      
      This patch does not add any new CSS values for alpha compositing. Currently, we parse the
      values that are the same between the spec and the -webkit-background-composite property,
      including:
          clear
          copy
          source-over
          source-in
          source-out
          source-atop
          destination-over
          destination-in
          destination-out
          destination-atop
          xor
      
      In the future, we may need to add the following CSS values for alpha compositing:
          lighter
          destination
      
      This is currently under discussion on the www-style mailing list:
      http://lists.w3.org/Archives/Public/www-style/2012Aug/0123.html
      
      No new test files. Add test cases in:
          css3/filters/script-tests/custom-filter-property-computed-style.js:
          css3/filters/script-tests/custom-filter-property-parsing-invalid.js:
          css3/filters/script-tests/custom-filter-property-parsing.js:
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::valueForFilter):
      * css/CSSParser.cpp:
      (WebCore::CSSParser::isBlendMode):
      (WebCore):
      (WebCore::CSSParser::isCompositeOperator):
      (WebCore::CSSParser::parseMixFunction):
      (WebCore::CSSParser::parseCustomFilter):
      * css/CSSParser.h:
      (WebCore):
      * css/CSSParserValues.h:
      (WebCore::CSSParserValueList::currentIndex):
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
      (WebCore):
      (WebCore::CSSPrimitiveValue::operator BlendMode):
      * css/CSSValue.cpp:
      (WebCore::CSSValue::reportMemoryUsage):
      (WebCore::CSSValue::cssText):
      (WebCore::CSSValue::destroy):
      (WebCore::CSSValue::cloneForCSSOM):
      * css/CSSValue.h:
      (WebCore::CSSValue::isWebKitCSSMixFunctionValue):
      (CSSValue):
      * css/CSSValueKeywords.in:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/WebKitCSSMixFunctionValue.cpp: Added.
      (WebCore):
      (WebCore::WebKitCSSMixFunctionValue::WebKitCSSMixFunctionValue):
      (WebCore::WebKitCSSMixFunctionValue::customCssText):
      (WebCore::WebKitCSSMixFunctionValue::cloneForCSSOM):
      (WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
      * css/WebKitCSSMixFunctionValue.h: Added.
      (WebCore):
      (WebKitCSSMixFunctionValue):
      (WebCore::WebKitCSSMixFunctionValue::create):
      * platform/graphics/GraphicsTypes.h:
      * platform/graphics/filters/CustomFilterProgram.cpp:
      (WebCore::CustomFilterProgram::CustomFilterProgram):
      * platform/graphics/filters/CustomFilterProgram.h:
      (WebCore::CustomFilterProgramMixSettings::CustomFilterProgramMixSettings):
      (CustomFilterProgramMixSettings):
      (WebCore):
      * rendering/style/StyleCustomFilterProgram.h:
      (WebCore::StyleCustomFilterProgram::create):
      (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):
      
      LayoutTests:
      
      Add tests for custom filter mix function parsing as defined in the Filter Effects spec:
      https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#FilterFunction
      
      Remove some mac-wk2 and chromium expectations because they are the same as the general
      expectations.
      
      * css3/filters/custom/custom-filter-property-computed-style-expected.txt:
      * css3/filters/custom/custom-filter-property-parsing-expected.txt:
      * css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt:
      * css3/filters/script-tests/custom-filter-property-computed-style.js:
      * css3/filters/script-tests/custom-filter-property-parsing-invalid.js:
      * css3/filters/script-tests/custom-filter-property-parsing.js:
      * platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt:
      * platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt:
      * platform/chromium/css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt: Removed.
      * platform/mac-wk2/css3/filters/custom/custom-filter-property-computed-style-expected.txt: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      957a6757
    • ojan@chromium.org's avatar
      need tests to ensure flexboxes play nicely with box-sizing · 897876a5
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=70771
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Anytime we grab the width/height off of the RenderStyle, we need to adjust
      it for box-sizing. Fortunately, we only do this two places in RenderFlexibleBox.
      Also, delete crossAxisLength since it's unused.
      
      Test: css3/flexbox/box-sizing.html
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
      * rendering/RenderFlexibleBox.h:
      
      LayoutTests:
      
      * css3/flexbox/box-sizing-expected.txt: Added.
      * css3/flexbox/box-sizing.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      897876a5
  7. 03 Aug, 2012 1 commit
    • rniwa@webkit.org's avatar
      Use testRunner instead of layoutTestController in the remaining layout tests · 8abd95ab
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93172
      
      Reviewed by Adam Barth.
      
      One last sweeping patch.
      
      * accessibility/canvas-accessibilitynodeobject.html:
      * compositing/backface-visibility/backface-visibility-webgl.html:
      * compositing/fixed-position-scroll-offset-history-restore.html:
      * compositing/overflow/image-load-overflow-scrollbars.html:
      * css3/flexbox/flexitem.html:
      * dom/html/level1/core/selfhtml.js:
      (startTest):
      * dom/html/level2/core/selfhtml.js:
      (startTest):
      * dom/html/level2/events/selfhtml.js:
      (startTest):
      * dom/html/level2/html/AppletsCollection.html:
      * dom/html/level2/html/HTMLBaseElement01.html:
      * dom/html/level2/html/HTMLBaseElement02.html:
      * dom/html/level2/html/selfhtml.js:
      (startTest):
      * dom/svg/level3/xpath/svgunit.js:
      * dom/xhtml/level1/core/selfxhtml.js:
      (startTest):
      * dom/xhtml/level2/core/selfxhtml.js:
      (startTest):
      * dom/xhtml/level2/events/selfxhtml.js:
      (startTest):
      * dom/xhtml/level2/html/HTMLBaseElement01.xhtml:
      * dom/xhtml/level2/html/HTMLBaseElement02.xhtml:
      * dom/xhtml/level2/html/selfxhtml.js:
      (startTest):
      * dom/xhtml/level3/core/selfxhtml.js:
      (startTest):
      * editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html:
      * editing/shadow/bold-twice-in-shadow.html:
      * editing/shadow/breaking-editing-boundaries-2.html:
      * editing/shadow/contenteditable-propagation-at-shadow-boundary.html:
      * editing/shadow/delete-characters-in-distributed-node-crash.html:
      * editing/shadow/delete-list-in-shadow.html:
      * editing/shadow/insertorderedlist-crash.html:
      * editing/shadow/pressing-enter-on-list.html:
      * editing/spelling/grammar-edit-word-expected.txt:
      * editing/spelling/grammar-edit-word.html:
      * fast/block/percent-height-descendant-not-removed-crash2.html:
      * fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html:
      * fast/block/positioning/insert-positioned-in-anonymous-crash.html:
      * fast/canvas/fallback-content.html:
      * fast/css/counters/counter-reset-subtree-insert-crash.html:
      * fast/css/crash-on-gradient-with-derived-color.html:
      * fast/dom/NodeList/childNodes-reverse-iteration.html:
      * fast/dom/Window/window-property-shadowing-onclick.html:
      * fast/dom/XMLSerializer-xml-namespace.html:
      * fast/dom/shadow/content-after-style.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8abd95ab
  8. 31 Jul, 2012 5 commits
    • commit-queue@webkit.org's avatar
      -webkit-flex-flow does not work with inherit/initial values · d38a8862
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92709
      
      Patch by Douglas Stockwell <dstockwell@chromium.org> on 2012-07-31
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Add a new handler for flex-flow and move flex to StyleBuilder to mirror the standard pattern for handling initial/inherit in shorthands.
      
      Test: css3/flexbox/flex-flow-initial.html
      
      * css/StyleBuilder.cpp:
      (WebCore::StyleBuilder::StyleBuilder): Added handlers for flex and flex-flow.
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList): Removed hand written logic for handling flex.
      
      LayoutTests:
      
      Test that flex-flow handles 'initial' as expected.
      
      * css3/flexbox/flex-flow-initial-expected.txt: Added.
      * css3/flexbox/flex-flow-initial.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d38a8862
    • tony@chromium.org's avatar
      flexbox should avoid floats · b60b7ea6
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92661
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Block types should avoid floats. Deprecated flexbox and grid already avoid floats.
      
      Tests: css3/flexbox/floated-flexbox.html - added a test case.
      
      * rendering/RenderFlexibleBox.h:
      
      LayoutTests:
      
      Add a test case to make sure flexboxen avoid floats.
      
      * css3/flexbox/floated-flexbox.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b60b7ea6
    • tony@chromium.org's avatar
      REGRESSION: flexbox content-size fails to exclude scrollbar · 58dd0fe9
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92667
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      In r123909, we switched to computing the height using computeContentLogicalHeightUsing().
      Unfortunately, this includes the scrollbar when we want the content height. Add a helper
      method for computing the value needed by flexbox.
      
      Test: css3/flexbox/content-height-with-scrollbars.html
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::mainAxisContentExtent): Use computeLogicalClientHeight
      (WebCore::RenderFlexibleBox::computeLogicalClientHeight): Add new method for taking scrollbar into consideration.
      (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): Use computeLogicalClientHeight
      (WebCore::RenderFlexibleBox::lineBreakLength): Use computeLogicalClientHeight
      * rendering/RenderFlexibleBox.h:
      
      LayoutTests:
      
      Add column flow test cases with scrollbars forced on.
      
      * css3/flexbox/content-height-with-scrollbars-expected.html: Added.
      * css3/flexbox/content-height-with-scrollbars.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58dd0fe9
    • tony@chromium.org's avatar
      -webkit-order should take an integer, not a number · cbad8a2f
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92688
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      The spec changed back from floats to integers:
      http://lists.w3.org/Archives/Public/www-style/2012Jul/0607.html
      
      Tests: css3/flexbox/css-properties.html: Updated.
             css3/flexbox/flex-order.html: Test cases modified.
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseValue):
      * css/StyleBuilder.cpp:
      (WebCore::StyleBuilder::StyleBuilder):
      * rendering/RenderFlexibleBox.cpp:
      (WebCore):
      (RenderFlexibleBox::OrderHashTraits):
      (WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue):
      (WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue):
      (WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue):
      (RenderFlexibleBox::OrderIterator):
      * rendering/RenderFlexibleBox.h:
      * rendering/style/RenderStyle.h:
      * rendering/style/StyleRareNonInheritedData.h:
      (StyleRareNonInheritedData):
      
      LayoutTests:
      
      Update tests.
      
      * css3/flexbox/css-properties-expected.txt:
      * css3/flexbox/css-properties.html:
      * css3/flexbox/flex-order.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cbad8a2f
    • commit-queue@webkit.org's avatar
      [CSS Shaders] CSS parser rejects parameter names that are also CSS keywords · 1a530357
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92537
      
      Patch by Max Vujovic <mvujovic@adobe.com> on 2012-07-31
      Reviewed by Dirk Schulze.
      
      Source/WebCore:
      
      Remove the CSS keyword check for CSS Shaders parameter names. Parameters are allowed to be
      any valid CSS identifier, including CSS keywords. See the spec:
      https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#feCustom
      
      The CSS parser was rejecting input like the following because it uses a CSS keyword
      "background" as a parameter name:
      -webkit-filter: custom(none url(fragment.shader), background 0 1 0 1);
      
      Test: css3/filters/custom/custom-filter-css-keyword-as-parameter-name.html
      
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseCustomFilter): Do not return early when the parameter name is a
      CSS keyword (i.e. when the CSSParserValue has a non-zero id).
      
      LayoutTests:
      
      Add a pixel test that uses the CSS keyword "background" as a CSS Shaders parameter name.
      Add a parsing test case that uses the CSS keyword "background".
      
      * css3/filters/custom/custom-filter-css-keyword-as-parameter-name-expected.png: Added.
      * css3/filters/custom/custom-filter-css-keyword-as-parameter-name-expected.txt: Added.
      * css3/filters/custom/custom-filter-css-keyword-as-parameter-name.html: Added.
      * css3/filters/custom/custom-filter-property-parsing-expected.txt:
      * css3/filters/resources/css-keyword-as-parameter-name.fs: Added.
      * css3/filters/script-tests/custom-filter-property-parsing.js:
      * platform/chromium/TestExpectations:
      * platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a530357
  9. 30 Jul, 2012 1 commit
  10. 27 Jul, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Source/WebCore: flex-wrap: wrap not wrapping for % sized items in column flow · 5113b27b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92324
      
      Patch by Tony Chang <tony@chromium.org> on 2012-07-27
      Reviewed by Ojan Vafai.
      
      We were using trying to use the value of contentLogicalHeight() before having called computeLogicalHeight()
      in a few places. Fix this in mainAxisContentExtent() rather than at the callers.
      
      Test: css3/flexbox/percentage-heights.html
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::mainAxisContentExtent):
      (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): If we haven't called computeLogicalHeight, we try to compute
      the height based on the fixed flexbox value. min/max don't matter here since percent values are only based on height/width.
      * rendering/RenderFlexibleBox.h: Drop const because computeContentLogicalHeightUsing is not const. I can
      try making computeContentLogicalHeightUsing const in a follow up change (might be non-trivial).
      
      Source/WebKit2: Show the unavailable plug-in indicator for Java applets as well
      https://bugs.webkit.org/show_bug.cgi?id=92521
      
      Patch by Anders Carlsson <andersca@apple.com> on 2012-07-27
      Reviewed by Sam Weinig.
      
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::unavailablePluginButtonClicked):
      This can now be called on applet elements as well.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
      Get the MIME type from the applet element.
      
      LayoutTests: flex-wrap: wrap not wrapping for % sized items in column flow
      https://bugs.webkit.org/show_bug.cgi?id=92324
      
      Patch by Tony Chang <tony@chromium.org> on 2012-07-27
      Reviewed by Ojan Vafai.
      
      Test cases for column flow with percentage heights. There are three
      test cases for the three callers of mainAxisContentExtent() that were
      broken by this.
      
      * css3/flexbox/percentage-heights-expected.txt: Added.
      * css3/flexbox/percentage-heights.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5113b27b
    • tony@chromium.org's avatar
      changing -webkit-order should change the paint order of flex items · cc6c2674
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92041
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Override paintChildren and use the flex order iterator to determine the order to paint the children.
      
      Test: css3/flexbox/order-painting.html
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::layoutBlock): Save a reference to the order iterator.
      (WebCore::RenderFlexibleBox::paintChildren):
      * rendering/RenderFlexibleBox.h:
      (RenderFlexibleBox): Hold a reference to the order iterator so we don't have to recreate it at paint time.
          Also mark all the virtual methods with OVERRIDE.
      
      LayoutTests:
      
      Use a ref test since this is testing paint behavior.
      
      * css3/flexbox/order-painting-expected.html: Added.
      * css3/flexbox/order-painting.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc6c2674
  11. 26 Jul, 2012 1 commit
  12. 25 Jul, 2012 1 commit
  13. 15 Jul, 2012 1 commit
    • mikelawther@chromium.org's avatar
      Fix calculation of rgba's alpha in CSS custom text · 1b7d8e84
      mikelawther@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91355
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Alpha values are stored as an 8 bit value. To convert this to a float in the
      range [0,1], we need to divide by 255, not 256.
      
      Test: fast/css/rgba-custom-text.html
      
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::customCssText):
      
      LayoutTests:
      
      * css3/calc/color-hsl-expected.txt:
      * css3/calc/color-rgb-expected.txt:
      * editing/execCommand/query-command-value-background-color-expected.txt:
      * editing/execCommand/query-command-value-background-color.html:
      * fast/css/rgba-custom-text-expected.txt: Added.
      * fast/css/rgba-custom-text.html: Added.
      * media/track/track-cue-rendering-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b7d8e84
  14. 13 Jul, 2012 1 commit
    • tony@chromium.org's avatar
      Move layout checking js script into LayoutTest/resources and generalize · b1541cae
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91268
      
      Reviewed by Ojan Vafai.
      
      flexbox.js contains helper scripts for verifying the size and position of nodes.
      I will be writing similar tests for grid, so move the js file into a location
      for sharing and generalize the script.
      
      * css3/flexbox/align-absolute-child.html: Change include path and call.
      * css3/flexbox/auto-height-dynamic.html:
      * css3/flexbox/columns-auto-size.html:
      * css3/flexbox/flex-algorithm-min-max.html:
      * css3/flexbox/flex-algorithm-with-margins.html:
      * css3/flexbox/flex-algorithm.html:
      * css3/flexbox/flex-align-column.html:
      * css3/flexbox/flex-align-end.html:
      * css3/flexbox/flex-align-max.html:
      * css3/flexbox/flex-align-percent-height.html:
      * css3/flexbox/flex-align-stretch.html:
      * css3/flexbox/flex-align-vertical-writing-mode.html:
      * css3/flexbox/flex-align.html:
      * css3/flexbox/flex-flow-auto-margins.html:
      * css3/flexbox/flex-flow-border.html:
      * css3/flexbox/flex-flow-margins-auto-size.html:
      * css3/flexbox/flex-flow-margins.html:
      * css3/flexbox/flex-flow-orientations.html:
      * css3/flexbox/flex-flow-overflow.html:
      * css3/flexbox/flex-flow-padding.html:
      * css3/flexbox/flex-flow.html:
      * css3/flexbox/flex-item-child-overflow.html:
      * css3/flexbox/flex-item-min-size.html:
      * css3/flexbox/flex-justify-content.html:
      * css3/flexbox/flex-no-flex.html:
      * css3/flexbox/flexitem.html:
      * css3/flexbox/floated-flexbox.html:
      * css3/flexbox/line-wrapping.html:
      * css3/flexbox/multiline-align-content-horizontal-column.html:
      * css3/flexbox/multiline-align-content.html:
      * css3/flexbox/multiline-align-self.html:
      * css3/flexbox/multiline-column-auto.html:
      * css3/flexbox/multiline-justify-content.html:
      * css3/flexbox/multiline-reverse-wrap-overflow.html:
      * css3/flexbox/multiline.html:
      * css3/flexbox/nested-stretch.html:
      * css3/flexbox/orthogonal-flex-directions.html:
      * css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
      * css3/flexbox/position-absolute-child.html:
      * css3/flexbox/preferred-widths-orthogonal.html:
      * css3/flexbox/preferred-widths.html:
      * css3/flexbox/style-change.html:
      * css3/flexbox/true-centering.html:
      * css3/flexbox/writing-modes.html:
      * resources/check-layout.js: Renamed from LayoutTests/css3/flexbox/resources/flexbox.js.
      (.): Rename checkFlexboxen to checkLayout that takes a CSS selector. Hide functions in a closure.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b1541cae
  15. 12 Jul, 2012 1 commit
    • ojan@chromium.org's avatar
      Implied minimum size of flex items is min-content · e1037f55
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87546
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
      In the main axis direction, min-size of auto means min-content.
      
      Test: css3/flexbox/flex-item-min-size.html
      
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
      (WebCore::RenderBox::computeContentLogicalHeightUsing):
      (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
      (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
      (WebCore::RenderBox::computePositionedLogicalWidthUsing):
      (WebCore::RenderBox::computePositionedLogicalHeightUsing):
      It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
      
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
      (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
      
      LayoutTests:
      
      Mostly just set min-height/min-width:0 as appropriate to keep the tests testing
      what the used to be testing. I made sure that each rendering was correct before
      making the changes. In a couple cases, I changed expectations where I thought
      the test was still testing was it was intending to test.
      
      * css3/flexbox/child-overflow.html:
      * css3/flexbox/columns-auto-size.html:
      * css3/flexbox/cross-axis-scrollbar.html:
      * css3/flexbox/flex-item-min-size-expected.txt: Added.
      * css3/flexbox/flex-item-min-size.html: Added.
      * css3/flexbox/flexitem.html:
      * css3/flexbox/line-wrapping.html:
      * css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
      * css3/flexbox/repaint-rtl-column.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1037f55
  16. 11 Jul, 2012 1 commit
  17. 09 Jul, 2012 1 commit
    • achicu@adobe.com's avatar
      [CSS Filters] Blur filter is not repainted correctly when applied on a parent of a fixed element · 60b0a195
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90087
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      Added a new method, RenderLayer::hasAncestorWithFilterOutsets, to check that there's no filter with outsets (ie. blur)
      applied on top level fixed positioned elements, nor any of its parent layers. In the event of a blur filter we need to
      disable the fast scrolling optimization, otherwise the outsets of the filter will be carried around the page and
      repainting will not work correctly.
      
      Tests: css3/filters/blur-filter-page-scroll-parents.html
             css3/filters/blur-filter-page-scroll-self.html
      
      * page/FrameView.cpp:
      (WebCore::FrameView::scrollContentsFastPath):
      * rendering/RenderLayer.cpp:
      (WebCore):
      (WebCore::RenderLayer::hasAncestorWithFilterOutsets):
      * rendering/RenderLayer.h:
      (RenderLayer):
      
      LayoutTests:
      
      Added two new tests to check that we disable fast path scrolling for fixed positioned
      elements that have blur applied on them or any of the parent layers.
      
      * css3/filters/blur-filter-page-scroll-parents.html: Added.
      * css3/filters/blur-filter-page-scroll-self.html: Added.
      * platform/chromium/css3/filters/blur-filter-page-scroll-parents-expected.png: Added.
      * platform/chromium/css3/filters/blur-filter-page-scroll-parents-expected.txt: Added.
      * platform/chromium/css3/filters/blur-filter-page-scroll-self-expected.png: Added.
      * platform/chromium/css3/filters/blur-filter-page-scroll-self-expected.txt: Added.
      * platform/mac/css3/filters/blur-filter-page-scroll-parents-expected.png: Added.
      * platform/mac/css3/filters/blur-filter-page-scroll-parents-expected.txt: Added.
      * platform/mac/css3/filters/blur-filter-page-scroll-self-expected.png: Added.
      * platform/mac/css3/filters/blur-filter-page-scroll-self-expected.txt: Added.
      * platform/qt/Skipped: Qt needs platform results.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60b0a195
  18. 02 Jul, 2012 1 commit
  19. 29 Jun, 2012 2 commits
  20. 28 Jun, 2012 2 commits
    • senorblanco@chromium.org's avatar
      Source/WebCore: Implement filter url() function. · 7ba72ddc
      senorblanco@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=72443
      
      url() references can be internal, in which case the DOM nodes are
      retrieved directly from the current document, or external, in which
      case a CachedSVGDocument request is made, and the filter node build is
      deferred until the document is loaded.  WebKitSVGDocumentValue
      holds the CachedSVGDocument (if any) and the URL as a CSSValue,
      and is stored in the CSSValue chain as the argument to the reference
      filter.
      
      One notable difference between internal and external references is
      that internal references will automatically update on an SVG filter node
      attribute change, while external references will not, since they live
      in a separate document.  This is consistent with the Mozilla
      implementation.  In order to make this work, the RenderLayer is made a
      client of the RenderSVGResourceContainer, and calls
      filterNeedsRepaint() when the SVG nodes are invalidated.
      
      Some plumbing:  The CSS StyleResolver was refactored to load all
      all external resources (images, shaders and (now) SVG filters) in a
      single function, loadPendingResources().  The PlatformLayer typedef
      was moved out into its own file, in order to break a cyclic
      dependency.  SVGFilterBuilder was modified to accept the SourceGraphic
      and SourceAlpha FilterEffects in its constructor and factory function,
      rather than extracting them from the parent Filter.  (This is necessary
      so that the url() filter can correctly hook up its inputs from
      previous CSS filters.)
      
      Reviewed by Dean Jackson.
      
      Tests: css3/filters/effect-reference-external.html
             css3/filters/effect-reference-hw.html
             css3/filters/effect-reference-ordering.html
             css3/filters/effect-reference.html
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      Add WebKitCSSSVGDocumentValue to the various build files.
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::valueForFilter):
      Use the reference filter's url when getting the computed style for
      a reference filter.
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseFilter):
      Create the referenceFilterValue's argument as a
      WebKitCSSSVGDocumentValue instead of a CSS string.
      * css/CSSValue.cpp:
      (WebCore::CSSValue::cssText):
      Add support for WebKitCSSSVGDocumentValue.
      (WebCore::CSSValue::destroy):
      Add support for WebKitCSSSVGDocumentValue.
      * css/CSSValue.h:
      (WebCore::CSSValue::isWebKitCSSSVGDocumentValue):
      Add support for WebKitCSSSVGDocumentValue.
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList):
      Keep track of pending SVG document references, and load them when
      necessary.
      * css/StyleResolver.h:
      * css/WebKitCSSSVGDocumentValue.cpp: Added.
      New CSSValue subclass for holding SVG document references.
      (WebCore::WebKitCSSSVGDocumentValue::WebKitCSSSVGDocumentValue):
      (WebCore::WebKitCSSSVGDocumentValue::~WebKitCSSSVGDocumentValue):
      (WebCore::WebKitCSSSVGDocumentValue::load):
      (WebCore::WebKitCSSSVGDocumentValue::customCssText):
      * css/WebKitCSSSVGDocumentValue.h: Added.
      (WebCore::WebKitCSSSVGDocumentValue::create):
      (WebCore::WebKitCSSSVGDocumentValue::cachedSVGDocument):
      (WebCore::WebKitCSSSVGDocumentValue::url):
      (WebCore::WebKitCSSSVGDocumentValue::loadRequested):
      * platform/graphics/GraphicsLayer.h:
      Refactor PlatformLayer out into its own file, to avoid circular
      includes.
      * platform/graphics/ImageBuffer.h:
      Include PlatformLayer.h instead of GraphicsLayer.h.
      * platform/graphics/PlatformLayer.h: Added.
      Refactor PlatformLayer out into its own file, to avoid circular
      includes.
      * platform/graphics/filters/FilterOperation.h:
      (WebCore::ReferenceFilterOperation::create):
      (WebCore::ReferenceFilterOperation::clone):
      (WebCore::ReferenceFilterOperation::url):
      (WebCore::ReferenceFilterOperation::fragment):
      (ReferenceFilterOperation):
      (WebCore::ReferenceFilterOperation::data):
      (WebCore::ReferenceFilterOperation::setData):
      (WebCore::ReferenceFilterOperation::operator==):
      (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
      Augment ReferenceFilterOperation to maintain a data pointer,
      in order to preserve context while loading external SVG documents.
      Replace "reference" with "url" and "fragment" members, in order to
      ease retrieval of the appropriate DOM objects.
      * platform/graphics/filters/FilterOperations.cpp:
      (WebCore::FilterOperations::hasReferenceFilter):
      Convenience function for finding reference filters.
      * platform/graphics/filters/FilterOperations.h:
      (FilterOperations):
      * platform/mac/ScrollbarThemeMac.mm:
      Include GraphicsLayer.h explicitly, since ImageBuffer.h no longer
      includes it (and only includes PlatformLayer.h).
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::FilterEffectRenderer::buildReferenceFilter):
      Utility function to build a FilterEffect node graph for a
      ReferenceFilterOperation.
      (WebCore::FilterEffectRenderer::build):
      Call the above builder function for ReferenceFilterOperations.
      * rendering/FilterEffectRenderer.h:
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::updateOrRemoveFilterEffect):
      If we have reference filters, update them along with other filters.
      (WebCore::RenderLayer::filterNeedsRepaint):
      * rendering/RenderLayerFilterInfo.cpp:
      (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo):
      (WebCore::RenderLayerFilterInfo::notifyFinished):
      Implement callback function when external SVGDocuments are loaded.
      (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):
      Add the FilterInfo as a client to be called when SVGDocuments are
      loaded.
      (WebCore::RenderLayerFilterInfo::removeReferenceFilterClients):
      Remove this from the list of notified clients.
      * rendering/RenderLayerFilterInfo.h:
      Add new member vars for tracking internal and external SVG
      references, so we can remove ourselves as a client when done.
      * rendering/svg/RenderSVGResourceContainer.cpp:
      (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
      When marking client DOM nodes for repaint, also mark any RenderLayers
      referring to this DOM tree via filters as needing repaint.
      (WebCore::RenderSVGResourceContainer::addClientRenderLayer):
      (WebCore::RenderSVGResourceContainer::removeClientRenderLayer):
      * rendering/svg/RenderSVGResourceContainer.h:
      Maintain a list of RenderLayer clients on each SVG resource container,
      and turn SVG DOM repaint notifications into filter repaint (CSS)
      notifications.
      * rendering/svg/RenderSVGResourceFilter.cpp:
      (WebCore::RenderSVGResourceFilter::buildPrimitives):
      Construct a SourceGraphic and SourceAlpha node explicitly for the
      SVG builder case.
      * svg/graphics/filters/SVGFilterBuilder.cpp:
      (WebCore::SVGFilterBuilder::SVGFilterBuilder):
      * svg/graphics/filters/SVGFilterBuilder.h:
      (WebCore::SVGFilterBuilder::create):
      Add the SourceGraphic and SourceAlpha as parameters to the constructor
      and create() methods, so they can be supplied by the caller.
      
      LayoutTests: Add tests for the url() filter function.
      https://bugs.webkit.org/show_bug.cgi?id=72443
      
      Reviewed by Dean Jackson.
      
      * css3/filters/effect-reference-external.html: Added.
      * css3/filters/effect-reference-hw.html: Added.
      * css3/filters/effect-reference-ordering.html: Added.
      * css3/filters/effect-reference.html: Added.
      * css3/filters/resources/hueRotate.svg: Added.
      * platform/chromium-linux/css3/filters/effect-reference-expected.png: Added.
      * platform/chromium-linux/css3/filters/effect-reference-expected.txt: Added.
      * platform/chromium-linux/css3/filters/effect-reference-external-expected.png: Added.
      * platform/chromium-linux/css3/filters/effect-reference-external-expected.txt: Added.
      * platform/chromium-linux/css3/filters/effect-reference-hw-expected.png: Added.
      * platform/chromium-linux/css3/filters/effect-reference-hw-expected.txt: Added.
      * platform/chromium-linux/css3/filters/effect-reference-ordering-expected.png: Added.
      * platform/chromium-linux/css3/filters/effect-reference-ordering-expected.txt: Added.
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ba72ddc
    • tony@chromium.org's avatar
      Split flex into flex-grow/flex-shrink/flex-basis · 092bb3c7
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86525
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Split flex into 3 separate properties per the spec:
      http://dev.w3.org/csswg/css3-flexbox/#flex-components
      
      Tests: css3/flexbox/flex-longhand-parsing.html
             css3/flexbox/flex-property-parsing.html: Updated test results.
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore): -webkit-flex is no longer enumerable.
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use
      getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names.
      * css/CSSParser.cpp:
      (WebCore::isValidKeywordPropertyAndValue): Fix indent.
      (WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none.
      (WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink,
      preferred size -> basis) and assign to longhand properties.
      * css/CSSParser.h:
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::isInheritedProperty): Add new properties.
      * css/CSSPropertyNames.in: Add new properties.
      * css/StyleBuilder.cpp:
      (WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers.
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::getPropertyValue): Add new shorthand.
      (WebCore::StylePropertySet::asText):
      * css/StylePropertyShorthand.cpp:
      (WebCore::webkitFlexShorthand): Add new shorthand.
      (WebCore::shorthandForProperty):
      * css/StylePropertyShorthand.h:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder.
      Handle initial and inherit for flex.
      
      LayoutTests:
      
      If -webkit-flex is set to none, when the user reads the value back out, it is
      now 0 0 auto. 'none' is for convenience, not an actual value.
      
      * css3/flexbox/flex-longhand-parsing-expected.txt:
      * css3/flexbox/flex-longhand-parsing.html: Test flex-grow, flex-shrink and flex-basis.
      * css3/flexbox/flex-property-parsing-expected.txt:
      * css3/flexbox/flex-property-parsing.html: Update results for 'none'.
      * fast/css/getComputedStyle/computed-style-expected.txt:
      * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
      * fast/css/getComputedStyle/resources/property-names.js: Remove -webkit-flex since it's no longer enumerable.
      * svg/css/getComputedStyle-basic-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      092bb3c7
  21. 27 Jun, 2012 4 commits
    • tony@chromium.org's avatar
      Unreviewed, rolling out r121380. · 7fe1d912
      tony@chromium.org authored
      http://trac.webkit.org/changeset/121380
      https://bugs.webkit.org/show_bug.cgi?id=86525
      
      Hits an ASSERT in debug.
      
      Source/WebCore:
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore):
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      * css/CSSParser.cpp:
      (WebCore::isValidKeywordPropertyAndValue):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::parseFlex):
      * css/CSSParser.h:
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::isInheritedProperty):
      * css/CSSPropertyNames.in:
      * css/StyleBuilder.cpp:
      (ApplyPropertyFlex):
      (WebCore::ApplyPropertyFlex::applyInheritValue):
      (WebCore::ApplyPropertyFlex::applyInitialValue):
      (WebCore::ApplyPropertyFlex::applyValue):
      (WebCore::ApplyPropertyFlex::createHandler):
      (WebCore::ApplyPropertyFlex::getFlexValue):
      (WebCore):
      (WebCore::StyleBuilder::StyleBuilder):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::getPropertyValue):
      (WebCore::StylePropertySet::asText):
      * css/StylePropertyShorthand.cpp:
      (WebCore::webkitFlexFlowShorthand):
      (WebCore::shorthandForProperty):
      * css/StylePropertyShorthand.h:
      (WebCore):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList):
      
      LayoutTests:
      
      * css3/flexbox/flex-longhand-parsing-expected.txt: Removed.
      * css3/flexbox/flex-longhand-parsing.html: Removed.
      * css3/flexbox/flex-property-parsing-expected.txt:
      * css3/flexbox/flex-property-parsing.html:
      * fast/css/getComputedStyle/computed-style-expected.txt:
      * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
      * fast/css/getComputedStyle/resources/property-names.js:
      * svg/css/getComputedStyle-basic-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7fe1d912
    • tony@chromium.org's avatar
      Split flex into flex-grow/flex-shrink/flex-basis · 7514b66a
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86525
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Split flex into 3 separate properties per the spec:
      http://dev.w3.org/csswg/css3-flexbox/#flex-components
      
      Tests: css3/flexbox/flex-longhand-parsing.html
             css3/flexbox/flex-property-parsing.html: Updated test results.
      
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore): -webkit-flex is no longer enumerable.
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use
      getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names.
      * css/CSSParser.cpp:
      (WebCore::isValidKeywordPropertyAndValue): Fix indent.
      (WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none.
      (WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink,
      preferred size -> basis) and assign to longhand properties.
      * css/CSSParser.h:
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::isInheritedProperty): Add new properties.
      * css/CSSPropertyNames.in: Add new properties.
      * css/StyleBuilder.cpp:
      (WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers.
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::getPropertyValue): Add new shorthand.
      (WebCore::StylePropertySet::asText):
      * css/StylePropertyShorthand.cpp:
      (WebCore::webkitFlexShorthand): Add new shorthand.
      (WebCore::shorthandForProperty):
      * css/StylePropertyShorthand.h:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder.
      
      LayoutTests:
      
      If -webkit-flex is set to none, when the user reads the value back out, it is
      now 0 0 auto. 'none' is for convenience, not an actual value.
      
      * css3/flexbox/flex-longhand-parsing-expected.txt:
      * css3/flexbox/flex-longhand-parsing.html: Test flex-grow, flex-shrink and flex-basis.
      * css3/flexbox/flex-property-parsing-expected.txt:
      * css3/flexbox/flex-property-parsing.html: Update results for 'none'.
      * fast/css/getComputedStyle/computed-style-expected.txt:
      * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
      * fast/css/getComputedStyle/resources/property-names.js: Remove -webkit-flex since it's no longer enumerable.
      * svg/css/getComputedStyle-basic-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7514b66a
    • mikelawther@chromium.org's avatar
      CSS3 calc: blending involving expressions · 31c9f470
      mikelawther@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86160
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      If either endpoint of a blend involves a calc expression, we create a new
      expression to perform the blend calculation.
      
      Test: css3/calc/transitions.html
            css3/calc/transitions-dependent.html
      
      * platform/Length.cpp:
      (WebCore):
      (WebCore::Length::blendCalculation):
      * platform/Length.h:
      (WebCore::Length::blend):
      (Length):
      
      LayoutTests:
      
      Removed existing test as it was folded into transitions.html.
      
      * css3/calc/transition-start-end-with-calc-expected.txt: Removed.
      * css3/calc/transition-start-end-with-calc.html: Removed.
      * css3/calc/transitions-dependent-expected.txt: Added.
      * css3/calc/transitions-dependent.html: Added.
      * css3/calc/transitions-expected.txt: Added.
      * css3/calc/transitions.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31c9f470
    • achicu@adobe.com's avatar
      Blur filter causes issues when scrolling · 7d1b0e09
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=89475
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      This patch disables the fast scrolling when there is a fixed postioned element that
      has a filter applied on its parent layer. Otherwise the scroll blitting will just
      copy the outsets of the blur effect.
      
      Test: css3/filters/blur-filter-page-scroll.html
      
      * page/FrameView.cpp:
      (WebCore::FrameView::scrollContentsFastPath):
      
      LayoutTests:
      
      Checking that the fixed positioned element repaints correctly when there is a blur filter
      applied on its parent layer.
      
      * css3/filters/blur-filter-page-scroll.html: Added.
      * platform/chromium/css3/filters/blur-filter-page-scroll-expected.png: Added.
      * platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt: Added.
      * platform/chromium/TestExpectations: The new test needs to be checked on Windows.
      * platform/mac/css3/filters/blur-filter-page-scroll-expected.png: Added.
      * platform/mac/css3/filters/blur-filter-page-scroll-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d1b0e09
  22. 26 Jun, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r121285. · 7978373f
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/121285
      https://bugs.webkit.org/show_bug.cgi?id=90014
      
      "We misinterpreted 'size of the initial containing block'"
      (Requested by tomz on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-26
      
      Source/WebCore:
      
      * css/CSSCalculationValue.cpp:
      (WebCore::CSSCalcValue::computeLengthPx):
      (WebCore::CSSCalcPrimitiveValue::toCalcValue):
      (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
      (WebCore::CSSCalcBinaryOperation::toCalcValue):
      (WebCore::CSSCalcBinaryOperation::computeLengthPx):
      * css/CSSCalculationValue.h:
      (CSSCalcExpressionNode):
      (WebCore::CSSCalcValue::toCalcValue):
      (CSSCalcValue):
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientValue::addStops):
      (WebCore::positionFromValue):
      (WebCore::CSSGradientValue::computeEndPoint):
      (WebCore::CSSLinearGradientValue::createGradient):
      (WebCore::CSSRadialGradientValue::resolveRadius):
      (WebCore::CSSRadialGradientValue::createGradient):
      * css/CSSGradientValue.h:
      (CSSGradientValue):
      (CSSRadialGradientValue):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::computeLength):
      (WebCore::CSSPrimitiveValue::computeLengthDouble):
      * css/CSSPrimitiveValue.h:
      (CSSPrimitiveValue):
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::convertToLength):
      * css/CSSToStyleMap.cpp:
      (WebCore::CSSToStyleMap::mapFillSize):
      (WebCore::CSSToStyleMap::mapFillXPosition):
      (WebCore::CSSToStyleMap::mapFillYPosition):
      (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
      * css/CSSToStyleMap.h:
      (CSSToStyleMap):
      * css/MediaQueryEvaluator.cpp:
      (WebCore::computeLength):
      (WebCore::device_heightMediaFeatureEval):
      (WebCore::device_widthMediaFeatureEval):
      (WebCore::heightMediaFeatureEval):
      (WebCore::widthMediaFeatureEval):
      * css/SVGCSSStyleSelector.cpp:
      (WebCore::StyleResolver::applySVGProperty):
      * css/StyleBuilder.cpp:
      (WebCore::ApplyPropertyAuto::applyValue):
      (WebCore::ApplyPropertyClip::convertToLength):
      (WebCore::ApplyPropertyLength::applyValue):
      (WebCore::ApplyPropertyBorderRadius::applyValue):
      (WebCore::ApplyPropertyComputeLength::applyValue):
      (WebCore::ApplyPropertyFontSize::applyValue):
      (WebCore::ApplyPropertyLineHeight::applyValue):
      (WebCore::ApplyPropertyPageSize::mmLength):
      (WebCore::ApplyPropertyPageSize::inchLength):
      (WebCore::ApplyPropertyPageSize::applyValue):
      (WebCore::ApplyPropertyVerticalAlign::applyValue):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/StyleResolver.h:
      (StyleResolver):
      * css/WebKitCSSMatrix.cpp:
      (WebCore::WebKitCSSMatrix::setMatrixValue):
      
      LayoutTests:
      
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html: Removed.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html: Removed.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html: Removed.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html: Removed.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm: Removed.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html: Removed.
      * ietestcenter/css3/valuesandunits/units-000.htm:
      * platform/chromium/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7978373f
    • tomz@codeaurora.org's avatar
      ietestcenter/css3/valuesandunits/units-000.htm asserts · f9a938b8
      tomz@codeaurora.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86176
      
      Patch by Dave Tharp <dtharp@codeaurora.org> on 2012-06-26
      Reviewed by Beth Dakin.
      
      Source/WebCore:
      
      Modified computeLengthDouble() to handle vh, vw, and vmin units. Per the spec
      (http://dev.w3.org/csswg/css3-values/#viewport-relative-lengths) viewport -percentage
      lengths are "relative to the size of the initial containing block", which I read to be
      the size of the parent element. Since parentStyle was not available in computeLengthDouble,
      most of the changes for this patch involved "pushing down" the parentStyle pointer through
      the network of computeLength methods and dependencies.
      
      Tests: css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html
             css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html
             css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html
      
      * css/CSSCalculationValue.cpp:
      (WebCore::CSSCalcValue::computeLengthPx):
      (WebCore::CSSCalcPrimitiveValue::toCalcValue):
      (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
      (WebCore::CSSCalcBinaryOperation::toCalcValue):
      (WebCore::CSSCalcBinaryOperation::computeLengthPx):
      * css/CSSCalculationValue.h:
      (CSSCalcExpressionNode):
      (WebCore::CSSCalcValue::toCalcValue):
      (CSSCalcValue):
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientValue::addStops):
      (WebCore::positionFromValue):
      (WebCore::CSSGradientValue::computeEndPoint):
      (WebCore::CSSLinearGradientValue::createGradient):
      (WebCore::CSSRadialGradientValue::resolveRadius):
      (WebCore::CSSRadialGradientValue::createGradient):
      * css/CSSGradientValue.h:
      (CSSGradientValue):
      (CSSRadialGradientValue):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::computeLength):
      (WebCore::CSSPrimitiveValue::computeLengthDouble):
      * css/CSSPrimitiveValue.h:
      (CSSPrimitiveValue):
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::convertToLength):
      * css/CSSToStyleMap.cpp:
      (WebCore::CSSToStyleMap::parentStyle):
      (WebCore):
      (WebCore::CSSToStyleMap::mapFillSize):
      (WebCore::CSSToStyleMap::mapFillXPosition):
      (WebCore::CSSToStyleMap::mapFillYPosition):
      (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
      * css/CSSToStyleMap.h:
      (CSSToStyleMap):
      * css/MediaQueryEvaluator.cpp:
      (WebCore::computeLength):
      (WebCore::device_heightMediaFeatureEval):
      (WebCore::device_widthMediaFeatureEval):
      (WebCore::heightMediaFeatureEval):
      (WebCore::widthMediaFeatureEval):
      * css/SVGCSSStyleSelector.cpp:
      (WebCore::StyleResolver::applySVGProperty):
      * css/StyleBuilder.cpp:
      (WebCore::ApplyPropertyAuto::applyValue):
      (WebCore::ApplyPropertyClip::convertToLength):
      (WebCore::ApplyPropertyLength::applyValue):
      (WebCore::ApplyPropertyBorderRadius::applyValue):
      (WebCore::ApplyPropertyComputeLength::applyValue):
      (WebCore::ApplyPropertyFontSize::applyValue):
      (WebCore::ApplyPropertyLineHeight::applyValue):
      (WebCore::ApplyPropertyPageSize::mmLength):
      (WebCore::ApplyPropertyPageSize::inchLength):
      (WebCore::ApplyPropertyPageSize::applyValue):
      (WebCore::ApplyPropertyVerticalAlign::applyValue):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/StyleResolver.h:
      (WebCore::StyleResolver::parentNode):
      (StyleResolver):
      * css/WebKitCSSMatrix.cpp:
      (WebCore::WebKitCSSMatrix::setMatrixValue):
      
      LayoutTests:
      
      Adding explicit tests for viewport border length tests. Inspired by IE Test center
      units-000 test which highlighted that vw, vh, and vmin were not being handled in computeLengthDouble().
      Also, adjusting test_expectations and Skipped for units-000, which no longer Asserts with this
      patch implemented.
      
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border-expected.html: Added.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vh-border.html: Added.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border-expected.html: Added.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vmin-border.html: Added.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border-expected.htm: Added.
      * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-vw-border.html: Added.
      * ietestcenter/css3/valuesandunits/units-000.htm:
      * platform/chromium/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9a938b8