Changeset 116331 in webkit


Ignore:
Timestamp:
May 7, 2012 11:41:08 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Wrong positioning due to wrong width calculation wrt width:0
https://bugs.webkit.org/show_bug.cgi?id=50135

Patch by Pravin D <pravind.2k4@gmail.com> on 2012-05-07
Reviewed by Eric Seidel.

Source/WebCore:

Test: fast/block/block-parent-with-zero-width-child.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computePreferredLogicalWidths):
When width is fixed, the specified width must be taken, provided the value is positive.
Width=0 case was being ignored.

LayoutTests:

  • fast/block/block-parent-with-zero-width-child-expected.txt: Added.
  • fast/block/block-parent-with-zero-width-child.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116328 r116331  
     12012-05-07  Pravin D  <pravind.2k4@gmail.com>
     2
     3        Wrong positioning due to wrong width calculation wrt width:0
     4        https://bugs.webkit.org/show_bug.cgi?id=50135
     5
     6        Reviewed by Eric Seidel.
     7
     8        * fast/block/block-parent-with-zero-width-child-expected.txt: Added.
     9        * fast/block/block-parent-with-zero-width-child.html: Added.
     10
    1112012-05-07  Dominik Röttsches  <dominik.rottsches@linux.intel.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r116330 r116331  
     12012-05-07  Pravin D  <pravind.2k4@gmail.com>
     2
     3        Wrong positioning due to wrong width calculation wrt width:0
     4        https://bugs.webkit.org/show_bug.cgi?id=50135
     5
     6        Reviewed by Eric Seidel.
     7
     8        Test: fast/block/block-parent-with-zero-width-child.html
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::computePreferredLogicalWidths):
     12        When width is fixed, the specified width must be taken, provided the value is positive.
     13        Width=0 case was being ignored.
     14
    1152012-05-07  Noel Gordon  <noel.gordon@gmail.com>
    216
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r116325 r116331  
    51615161
    51625162    RenderStyle* styleToUse = style();
    5163     if (!isTableCell() && styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() > 0 && style()->marqueeBehavior() != MALTERNATE)
     5163    if (!isTableCell() && styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() >= 0 && style()->marqueeBehavior() != MALTERNATE)
    51645164        m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(styleToUse->logicalWidth().value());
    51655165    else {
Note: See TracChangeset for help on using the changeset viewer.