Hi blink & chromium guys,
I've hit a problem which i cannot figure out why.
The problem is, i need to reset <img> element's margin-left to 0 if it's greater than 0.
The method i prefer is:
1, update <img>'s renderer(LayoutImage)'s ComputedSty;e via setMarginLeft
2, set renderer `needsLayout`
However, this doesn't work.
I can update <img>'s layout width(logicalWidth) by using this way.
But why logicalLeft/margin-left doesn't work?
when i add VLOG in LayoutReplaced::layout(), its contentRect's x/y is both 0/0, but logicalLeft() always remains the initial value 100, which is exactly the css style margin-left:100px; I've set in test case html.
BTW, from the code, LayoutReplaced::layout() calls LayoutBox::updateLogicalWidth() which calls LayoutBox::updateLogicalLeft(), which is really puzzling me...