|
@@ -14,7 +14,7 @@
|
|
|
*
|
|
*
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
* all copies or substantial portions of the Software.
|
|
* all copies or substantial portions of the Software.
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
@@ -417,7 +417,7 @@ void LayoutEngine::FormatElementReplaced(Element* element)
|
|
|
bool LayoutEngine::FormatElementSpecial(Element* element)
|
|
bool LayoutEngine::FormatElementSpecial(Element* element)
|
|
|
{
|
|
{
|
|
|
static String br("br");
|
|
static String br("br");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// Check for a <br> tag.
|
|
// Check for a <br> tag.
|
|
|
if (element->GetTagName() == br)
|
|
if (element->GetTagName() == br)
|
|
|
{
|
|
{
|
|
@@ -464,11 +464,8 @@ void LayoutEngine::BuildBoxWidth(Box& box, Element* element, float containing_bl
|
|
|
|
|
|
|
|
// Determine if the element has an automatic width, and if not calculate it.
|
|
// Determine if the element has an automatic width, and if not calculate it.
|
|
|
bool width_auto;
|
|
bool width_auto;
|
|
|
- int display_property = element->GetProperty< int >(DISPLAY);
|
|
|
|
|
- if (display_property == DISPLAY_INLINE_BLOCK)
|
|
|
|
|
- {
|
|
|
|
|
|
|
+ if (content_area.x >= 0)
|
|
|
width_auto = false;
|
|
width_auto = false;
|
|
|
- }
|
|
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
const Property* width_property = element->GetProperty(WIDTH);
|
|
const Property* width_property = element->GetProperty(WIDTH);
|