Clean up API (and its callers) for getting style data: remove unneeded null checks and switch to new inline member functions (one for each struct) that return values. b=197205 r+sr=roc a=brendan

This commit is contained in:
dbaron%dbaron.org 2006-05-17 02:37:54 +00:00
Родитель db218abf07
Коммит c023da7f10
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -108,11 +108,9 @@ inDOMUtils::IsIgnorableWhitespace(nsIDOMCharacterData *aDataNode,
nsCOMPtr<nsIContent> content = do_QueryInterface(aDataNode);
presShell->GetPrimaryFrameFor(content, &frame);
if (frame) {
const nsStyleText* text;
::GetStyleData(frame, &text);
if (text)
*aReturn = (text->mWhiteSpace != NS_STYLE_WHITESPACE_PRE &&
text->mWhiteSpace != NS_STYLE_WHITESPACE_MOZ_PRE_WRAP);
const nsStyleText* text = frame->GetStyleText();
*aReturn = text->mWhiteSpace != NS_STYLE_WHITESPACE_PRE &&
text->mWhiteSpace != NS_STYLE_WHITESPACE_MOZ_PRE_WRAP;
}
else {
// empty inter-tag text node without frame, e.g., in between <table>\n<tr>