No new layout tests needed.
- eliminated the bogus kMin/kMax macros that we had in addition to inline functions
of the same name
* kwq/KWQKGlobal.h: Remove the kMin/kMax macros.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides
of kMin calls match.
(khtml::CSSStyleSelector::fontSizeForKeyword): Ditto.
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto.
- remove unused parameter to dirtyLinesFromChangedChild for clarity
* khtml/rendering/render_object.h: Don't take the parameter.
* khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto.
* khtml/rendering/render_flow.h: Don't take the parameter.
* khtml/rendering/render_flow.cpp:
(RenderFlow::detach): Don't pass the parameter.
(RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter.
* khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter.
- convert DOM::NodeImpl into an abstract base class by making a couple of functions
pure virtual for clarity
* khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual.
* khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9096
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-05-03 Darin Adler <darin@apple.com>
+
+ Reviewed by Dave Hyatt.
+ No new layout tests needed.
+
+ - eliminated the bogus kMin/kMax macros that we had in addition to inline functions
+ of the same name
+
+ * kwq/KWQKGlobal.h: Remove the kMin/kMax macros.
+
+ * khtml/css/cssstyleselector.cpp:
+ (khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides
+ of kMin calls match.
+ (khtml::CSSStyleSelector::fontSizeForKeyword): Ditto.
+ * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto.
+
+ - remove unused parameter to dirtyLinesFromChangedChild for clarity
+
+ * khtml/rendering/render_object.h: Don't take the parameter.
+ * khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto.
+
+ * khtml/rendering/render_flow.h: Don't take the parameter.
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::detach): Don't pass the parameter.
+ (RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter.
+
+ * khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter.
+
+ - convert DOM::NodeImpl into an abstract base class by making a couple of functions
+ pure virtual for clarity
+
+ * khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual.
+ * khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType.
+
2005-05-03 David Hyatt <hyatt@apple.com>
Fix for object element to support fallback content. WIth this change Safari passes the Acid2 test.
return; // Error case.
// Clamp opacity to the range 0-1
- style->setOpacity(kMin(1.0f, kMax(0, primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER))));
+ style->setOpacity(kMin(1.0, kMax(0.0, primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_NUMBER))));
return;
case CSS_PROP__KHTML_BOX_ALIGN:
HANDLE_INHERIT_AND_INITIAL(boxAlign, BoxAlign)
}
// Value is outside the range of the table. Apply the scale factor instead.
- float minLogicalSize = kMax(settings->minLogicalFontSize(), 1.0f);
+ float minLogicalSize = kMax(settings->minLogicalFontSize(), 1);
return kMax(fontSizeFactors[keyword - CSS_VAL_XX_SMALL]*mediumSize, minLogicalSize);
}
case Hexadecimal:
{
- int ll = kMin(src.length(), 8);
+ int ll = kMin(src.length(), 8U);
while(ll--) {
QChar csrc(src->lower());
cc = csrc.cell();
}
}
else if (isInline() && parent())
- parent()->dirtyLinesFromChangedChild(this, false);
+ parent()->dirtyLinesFromChangedChild(this);
}
deleteLineBoxes();
RenderContainer::detach();
}
-void RenderFlow::dirtyLinesFromChangedChild(RenderObject* child, bool adding)
+void RenderFlow::dirtyLinesFromChangedChild(RenderObject* child)
{
if (!parent() || selfNeedsLayout() || isTable())
return;
void deleteLineBoxes();
virtual void detach();
- virtual void dirtyLinesFromChangedChild(RenderObject* child, bool adding = true);
+ virtual void dirtyLinesFromChangedChild(RenderObject* child);
virtual short lineHeight(bool firstLine, bool isRootLineBox=false) const;
return parent()->computeAbsoluteRepaintRect(r, f);
}
-void RenderObject::dirtyLinesFromChangedChild(RenderObject* child, bool adding)
+void RenderObject::dirtyLinesFromChangedChild(RenderObject* child)
{
}
virtual VisiblePosition positionForCoordinates(int x, int y);
- virtual void dirtyLinesFromChangedChild(RenderObject* child, bool adding = true);
+ virtual void dirtyLinesFromChangedChild(RenderObject* child);
// Set the style of the object and update the state of the object accordingly.
virtual void setStyle(RenderStyle* style);
box->remove();
}
else if (parent())
- parent()->dirtyLinesFromChangedChild(this, false);
+ parent()->dirtyLinesFromChangedChild(this);
}
deleteTextBoxes();
RenderObject::detach();
// be default nodeValue is null, so setting it has no effect
}
-DOMString NodeImpl::nodeName() const
-{
- return DOMString();
-}
-
-unsigned short NodeImpl::nodeType() const
-{
- return 0;
-}
-
NodeListImpl *NodeImpl::childNodes()
{
return new ChildNodeListImpl(this);
MAIN_THREAD_ALLOCATED;
// DOM methods & attributes for Node
- virtual DOMString nodeName() const;
+ virtual DOMString nodeName() const = 0;
virtual DOMString nodeValue() const;
virtual void setNodeValue( const DOMString &_nodeValue, int &exceptioncode );
- virtual unsigned short nodeType() const;
+ virtual unsigned short nodeType() const = 0;
NodeImpl *parentNode() const { return m_parent; }
NodeImpl *previousSibling() const { return m_previous; }
NodeImpl *nextSibling() const { return m_next; }
class KStandardDirs;
class KConfig;
-#define kMin(a, b) ((a) < (b) ? (a) : (b))
-#define kMax(a, b) ((a) > (b) ? (a) : (b))
-
class KGlobal {
public:
static KInstance *instance() { return 0; }