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

Side by Side Diff: Source/core/editing/markup.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/iterators/TextIterator.cpp ('k') | Source/core/events/MouseRelatedEvent.h » ('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) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Igalia S.L. 4 * Copyright (C) 2011 Igalia S.L.
5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "core/html/HTMLAnchorElement.h" 55 #include "core/html/HTMLAnchorElement.h"
56 #include "core/html/HTMLBRElement.h" 56 #include "core/html/HTMLBRElement.h"
57 #include "core/html/HTMLBodyElement.h" 57 #include "core/html/HTMLBodyElement.h"
58 #include "core/html/HTMLDivElement.h" 58 #include "core/html/HTMLDivElement.h"
59 #include "core/html/HTMLElement.h" 59 #include "core/html/HTMLElement.h"
60 #include "core/html/HTMLQuoteElement.h" 60 #include "core/html/HTMLQuoteElement.h"
61 #include "core/html/HTMLSpanElement.h" 61 #include "core/html/HTMLSpanElement.h"
62 #include "core/html/HTMLTableCellElement.h" 62 #include "core/html/HTMLTableCellElement.h"
63 #include "core/html/HTMLTableElement.h" 63 #include "core/html/HTMLTableElement.h"
64 #include "core/html/HTMLTextFormControlElement.h" 64 #include "core/html/HTMLTextFormControlElement.h"
65 #include "core/rendering/RenderObject.h" 65 #include "core/layout/LayoutObject.h"
66 #include "platform/weborigin/KURL.h" 66 #include "platform/weborigin/KURL.h"
67 #include "wtf/StdLibExtras.h" 67 #include "wtf/StdLibExtras.h"
68 #include "wtf/text/StringBuilder.h" 68 #include "wtf/text/StringBuilder.h"
69 69
70 namespace blink { 70 namespace blink {
71 71
72 using namespace HTMLNames; 72 using namespace HTMLNames;
73 73
74 static bool propertyMissingOrEqualToNone(StylePropertySet*, CSSPropertyID); 74 static bool propertyMissingOrEqualToNone(StylePropertySet*, CSSPropertyID);
75 75
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 812
813 if (element.hasOneChild()) 813 if (element.hasOneChild())
814 return element.firstChild()->isTextNode() || element.firstChild()->hasCh ildren(); 814 return element.firstChild()->isTextNode() || element.firstChild()->hasCh ildren();
815 815
816 return element.hasChildCount(2) && isTabHTMLSpanElementTextNode(element.firs tChild()->firstChild()) && element.lastChild()->isTextNode(); 816 return element.hasChildCount(2) && isTabHTMLSpanElementTextNode(element.firs tChild()->firstChild()) && element.lastChild()->isTextNode();
817 } 817 }
818 818
819 static bool shouldPreserveNewline(const Range& range) 819 static bool shouldPreserveNewline(const Range& range)
820 { 820 {
821 if (Node* node = range.firstNode()) { 821 if (Node* node = range.firstNode()) {
822 if (RenderObject* renderer = node->renderer()) 822 if (LayoutObject* renderer = node->renderer())
823 return renderer->style()->preserveNewline(); 823 return renderer->style()->preserveNewline();
824 } 824 }
825 825
826 if (Node* node = range.startPosition().anchorNode()) { 826 if (Node* node = range.startPosition().anchorNode()) {
827 if (RenderObject* renderer = node->renderer()) 827 if (LayoutObject* renderer = node->renderer())
828 return renderer->style()->preserveNewline(); 828 return renderer->style()->preserveNewline();
829 } 829 }
830 830
831 return false; 831 return false;
832 } 832 }
833 833
834 PassRefPtrWillBeRawPtr<DocumentFragment> createFragmentFromText(Range* context, const String& text) 834 PassRefPtrWillBeRawPtr<DocumentFragment> createFragmentFromText(Range* context, const String& text)
835 { 835 {
836 if (!context) 836 if (!context)
837 return nullptr; 837 return nullptr;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 node->document().updateLayoutIgnorePendingStylesheets(); 1085 node->document().updateLayoutIgnorePendingStylesheets();
1086 1086
1087 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation Transition, nullptr, 0); 1087 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation Transition, nullptr, 0);
1088 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node)) ; 1088 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node)) ;
1089 1089
1090 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\" content=\"width=device-width, user-scalable=0\">"; 1090 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\" content=\"width=device-width, user-scalable=0\">";
1091 return documentMarkup + accumulator.takeResults(); 1091 return documentMarkup + accumulator.takeResults();
1092 } 1092 }
1093 1093
1094 } 1094 }
OLDNEW
« no previous file with comments | « Source/core/editing/iterators/TextIterator.cpp ('k') | Source/core/events/MouseRelatedEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698