diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-24 08:29:43 +0200 | 
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-08-24 08:29:43 +0200 | 
| commit | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (patch) | |
| tree | 3b94a9a9fa83efa384b8dac611cf8c6495532a62 /Source/WebCore/css/CSSComputedStyleDeclaration.cpp | |
| parent | f53e6f8e798362ed712d4a51633b0d0b03dbc213 (diff) | |
| download | qtwebkit-2e2ba8ff45915f40ed3e014101269c175f2a89a0.tar.gz | |
Imported WebKit commit bf0b0213bbf3886c96610020602012ca7d11b084 (http://svn.webkit.org/repository/webkit/trunk@126545)
New snapshot with clang and python build fixes
Diffstat (limited to 'Source/WebCore/css/CSSComputedStyleDeclaration.cpp')
| -rw-r--r-- | Source/WebCore/css/CSSComputedStyleDeclaration.cpp | 24 | 
1 files changed, 10 insertions, 14 deletions
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp index fe10eb0f6..0708c23ba 100644 --- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -614,7 +614,7 @@ static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, CSSProper              return 0;      } -    if (style->position() == AbsolutePosition || style->position() == FixedPosition) { +    if (style->hasOutOfFlowPosition()) {          if (l.type() == WebCore::Fixed)              return zoomAdjustedPixelValue(l.value(), style);          else if (l.isViewportPercentage()) @@ -622,7 +622,7 @@ static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, CSSProper          return cssValuePool().createValue(l);      } -    if (style->position() == RelativePosition || style->position() == StickyPosition) { +    if (style->hasInFlowPosition()) {          // FIXME: It's not enough to simply return "auto" values for one offset if the other side is defined.          // In other words if left is auto and right is not auto, then left's computed value is negative right().          // So we should get the opposite length unit and see if it is auto. @@ -715,21 +715,14 @@ static LayoutRect sizingBox(RenderObject* renderer)      return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box->computedCSSContentBoxRect();  } -static IntRect pixelSnappedSizingBox(RenderObject* renderer) -{ -    if (!renderer->isBox()) -        return IntRect(); - -    RenderBox* box = toRenderBox(renderer); -    return box->style()->boxSizing() == BORDER_BOX ? box->pixelSnappedBorderBoxRect() : pixelSnappedIntRect(box->computedCSSContentBoxRect()); -} -  static PassRefPtr<CSSValue> computedTransform(RenderObject* renderer, const RenderStyle* style)  { -    if (!renderer || style->transform().operations().isEmpty()) +    if (!renderer || !renderer->hasTransform() || !style->hasTransform())          return cssValuePool().createIdentifierValue(CSSValueNone); -    IntRect box = pixelSnappedSizingBox(renderer); +    IntRect box; +    if (renderer->isBox()) +        box = pixelSnappedIntRect(toRenderBox(renderer)->borderBoxRect());      TransformationMatrix transform;      style->applyTransform(transform, box.size(), RenderStyle::ExcludeTransformOrigin); @@ -2327,7 +2320,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert          case CSSPropertyWebkitTransformOrigin: {              RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();              if (renderer) { -                LayoutRect box = sizingBox(renderer); +                LayoutRect box; +                if (renderer->isBox()) +                    box = toRenderBox(renderer)->borderBoxRect(); +                  RenderView* renderView = m_node->document()->renderView();                  list->append(zoomAdjustedPixelValue(minimumValueForLength(style->transformOriginX(), box.width(), renderView), style.get()));                  list->append(zoomAdjustedPixelValue(minimumValueForLength(style->transformOriginY(), box.height(), renderView), style.get()));  | 
