Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: Source/WebCore/rendering/RenderObject.h

Issue 10696154: Merge 120639 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderInline.cpp ('k') | Source/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 virtual void updateDragState(bool dragOn); 560 virtual void updateDragState(bool dragOn);
561 561
562 // Inlined into RenderView.h for performance and to avoid a cyclic dependenc y. 562 // Inlined into RenderView.h for performance and to avoid a cyclic dependenc y.
563 RenderView* view() const; 563 RenderView* view() const;
564 564
565 // Returns true if this renderer is rooted, and optionally returns the hosti ng view (the root of the hierarchy). 565 // Returns true if this renderer is rooted, and optionally returns the hosti ng view (the root of the hierarchy).
566 bool isRooted(RenderView** = 0); 566 bool isRooted(RenderView** = 0);
567 567
568 Node* node() const { return isAnonymous() ? 0 : m_node; } 568 Node* node() const { return isAnonymous() ? 0 : m_node; }
569 569
570 // This is the same as node() except for renderers of :before. :after and fi rst-letter 570 // Returns the styled node that caused the generation of this renderer.
571 // This is the same as node() except for renderers of :before and :after
571 // pseudo elements for which their parent node is returned. 572 // pseudo elements for which their parent node is returned.
572 Node* generatingNode() const { return m_node == document() ? 0 : m_node; } 573 Node* generatingNode() const { return m_node == document() ? 0 : m_node; }
573
574 // Returns the styled node that caused the generation of this renderer.
575 // This is the same as node() except for anonymous renderers, for which
576 // it returns the node whose style caused the generation of this renderer.
577 // FIXME: merge with generatingNode()
578 Node* styledGeneratingNode() const;
579
580 void setNode(Node* node) { m_node = node; } 574 void setNode(Node* node) { m_node = node; }
581 575
582 Document* document() const { return m_node->document(); } 576 Document* document() const { return m_node->document(); }
583 Frame* frame() const { return document()->frame(); } 577 Frame* frame() const { return document()->frame(); }
584 578
585 bool hasOutlineAnnotation() const; 579 bool hasOutlineAnnotation() const;
586 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati on(); } 580 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati on(); }
587 581
588 // Returns the object containing this one. Can be different from parent for positioned elements. 582 // Returns the object containing this one. Can be different from parent for positioned elements.
589 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped 583 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const Layout Point& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); 645 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const Layout Point& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
652 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&); 646 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
653 647
654 virtual VisiblePosition positionForPoint(const LayoutPoint&); 648 virtual VisiblePosition positionForPoint(const LayoutPoint&);
655 VisiblePosition createVisiblePosition(int offset, EAffinity); 649 VisiblePosition createVisiblePosition(int offset, EAffinity);
656 VisiblePosition createVisiblePosition(const Position&); 650 VisiblePosition createVisiblePosition(const Position&);
657 651
658 virtual void dirtyLinesFromChangedChild(RenderObject*); 652 virtual void dirtyLinesFromChangedChild(RenderObject*);
659 653
660 // Called to update a style that is allowed to trigger animations. 654 // Called to update a style that is allowed to trigger animations.
655 // FIXME: Right now this will typically be called only when updating happens from the DOM on explicit elements.
656 // We don't yet handle generated content animation such as first-letter or b efore/after (we'll worry about this later).
661 void setAnimatableStyle(PassRefPtr<RenderStyle>); 657 void setAnimatableStyle(PassRefPtr<RenderStyle>);
662 658
663 // Set the style of the object and update the state of the object accordingl y. 659 // Set the style of the object and update the state of the object accordingl y.
664 virtual void setStyle(PassRefPtr<RenderStyle>); 660 virtual void setStyle(PassRefPtr<RenderStyle>);
665 661
666 // Updates only the local style ptr of the object. Does not update the stat e of the object, 662 // Updates only the local style ptr of the object. Does not update the stat e of the object,
667 // and so only should be called when the style is known not to have changed (or from setStyle). 663 // and so only should be called when the style is known not to have changed (or from setStyle).
668 void setStyleInternal(PassRefPtr<RenderStyle>); 664 void setStyleInternal(PassRefPtr<RenderStyle>);
669 665
670 // returns the containing block level element for this element. 666 // returns the containing block level element for this element.
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 // Outside the WebCore namespace for ease of invocation from gdb. 1213 // Outside the WebCore namespace for ease of invocation from gdb.
1218 void showTree(const WebCore::RenderObject*); 1214 void showTree(const WebCore::RenderObject*);
1219 void showLineTree(const WebCore::RenderObject*); 1215 void showLineTree(const WebCore::RenderObject*);
1220 void showRenderTree(const WebCore::RenderObject* object1); 1216 void showRenderTree(const WebCore::RenderObject* object1);
1221 // We don't make object2 an optional parameter so that showRenderTree 1217 // We don't make object2 an optional parameter so that showRenderTree
1222 // can be called from gdb easily. 1218 // can be called from gdb easily.
1223 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1219 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1224 #endif 1220 #endif
1225 1221
1226 #endif // RenderObject_h 1222 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderInline.cpp ('k') | Source/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698