OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 327 |
328 bool isRootEditableElement() const; | 328 bool isRootEditableElement() const; |
329 Element* rootEditableElement() const; | 329 Element* rootEditableElement() const; |
330 Element* rootEditableElement(EditableType) const; | 330 Element* rootEditableElement(EditableType) const; |
331 | 331 |
332 // For <link> and <style> elements. | 332 // For <link> and <style> elements. |
333 virtual bool sheetLoaded() { return true; } | 333 virtual bool sheetLoaded() { return true; } |
334 virtual void notifyLoadedSheetAndAllCriticalSubresources(bool /* error loadi
ng subresource */) { } | 334 virtual void notifyLoadedSheetAndAllCriticalSubresources(bool /* error loadi
ng subresource */) { } |
335 virtual void startLoadingDynamicSheet() { ASSERT_NOT_REACHED(); } | 335 virtual void startLoadingDynamicSheet() { ASSERT_NOT_REACHED(); } |
336 | 336 |
337 bool hasName() const { return !isTextNode() && getFlag(HasNameOrIsEditingTex
tFlag); } | 337 bool hasName() const { ASSERT(!isTextNode()); return getFlag(HasNameOrIsEdit
ingTextFlag); } |
338 | 338 |
339 bool isUserActionElement() const { return getFlag(IsUserActionElementFlag);
} | 339 bool isUserActionElement() const { return getFlag(IsUserActionElementFlag);
} |
340 void setUserActionElement(bool flag) { setFlag(flag, IsUserActionElementFlag
); } | 340 void setUserActionElement(bool flag) { setFlag(flag, IsUserActionElementFlag
); } |
341 | 341 |
342 bool active() const { return isUserActionElement() && isUserActionElementAct
ive(); } | 342 bool active() const { return isUserActionElement() && isUserActionElementAct
ive(); } |
343 bool inActiveChain() const { return isUserActionElement() && isUserActionEle
mentInActiveChain(); } | 343 bool inActiveChain() const { return isUserActionElement() && isUserActionEle
mentInActiveChain(); } |
344 bool hovered() const { return isUserActionElement() && isUserActionElementHo
vered(); } | 344 bool hovered() const { return isUserActionElement() && isUserActionElementHo
vered(); } |
345 bool focused() const { return isUserActionElement() && isUserActionElementFo
cused(); } | 345 bool focused() const { return isUserActionElement() && isUserActionElementFo
cused(); } |
346 | 346 |
347 bool needsAttach() const { return styleChangeType() == NeedsReattachStyleCha
nge; } | 347 bool needsAttach() const { return styleChangeType() == NeedsReattachStyleCha
nge; } |
348 bool needsStyleRecalc() const { return styleChangeType() != NoStyleChange; } | 348 bool needsStyleRecalc() const { return styleChangeType() != NoStyleChange; } |
349 StyleChangeType styleChangeType() const { return static_cast<StyleChangeType
>(m_nodeFlags & StyleChangeMask); } | 349 StyleChangeType styleChangeType() const { return static_cast<StyleChangeType
>(m_nodeFlags & StyleChangeMask); } |
350 bool childNeedsStyleRecalc() const { return getFlag(ChildNeedsStyleRecalcFla
g); } | 350 bool childNeedsStyleRecalc() const { return getFlag(ChildNeedsStyleRecalcFla
g); } |
351 bool isLink() const { return getFlag(IsLinkFlag); } | 351 bool isLink() const { return getFlag(IsLinkFlag); } |
352 bool isEditingText() const { return isTextNode() && getFlag(HasNameOrIsEditi
ngTextFlag); } | 352 bool isEditingText() const { ASSERT(isTextNode()); return getFlag(HasNameOrI
sEditingTextFlag); } |
353 | 353 |
354 void setHasName(bool f) { ASSERT(!isTextNode()); setFlag(f, HasNameOrIsEditi
ngTextFlag); } | 354 void setHasName(bool f) { ASSERT(!isTextNode()); setFlag(f, HasNameOrIsEditi
ngTextFlag); } |
355 void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); } | 355 void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); } |
356 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } | 356 void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); } |
357 | 357 |
358 void setNeedsStyleRecalc(StyleChangeType, const StyleChangeReasonForTracing&
); | 358 void setNeedsStyleRecalc(StyleChangeType, const StyleChangeReasonForTracing&
); |
359 void clearNeedsStyleRecalc(); | 359 void clearNeedsStyleRecalc(); |
360 | 360 |
361 bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistrib
utionRecalcFlag); } | 361 bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistrib
utionRecalcFlag); } |
362 void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionReca
lcFlag); } | 362 void setChildNeedsDistributionRecalc() { setFlag(ChildNeedsDistributionReca
lcFlag); } |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 } // namespace blink | 886 } // namespace blink |
887 | 887 |
888 #ifndef NDEBUG | 888 #ifndef NDEBUG |
889 // Outside the WebCore namespace for ease of invocation from gdb. | 889 // Outside the WebCore namespace for ease of invocation from gdb. |
890 void showNode(const blink::Node*); | 890 void showNode(const blink::Node*); |
891 void showTree(const blink::Node*); | 891 void showTree(const blink::Node*); |
892 void showNodePath(const blink::Node*); | 892 void showNodePath(const blink::Node*); |
893 #endif | 893 #endif |
894 | 894 |
895 #endif // Node_h | 895 #endif // Node_h |
OLD | NEW |