зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
db218abf07
Коммит
c023da7f10
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче