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

Side by Side Diff: Source/core/html/HTMLElement.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/html/HTMLDetailsElement.cpp ('k') | Source/core/html/HTMLFieldSetElement.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) 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 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "core/events/KeyboardEvent.h" 46 #include "core/events/KeyboardEvent.h"
47 #include "core/frame/Settings.h" 47 #include "core/frame/Settings.h"
48 #include "core/frame/UseCounter.h" 48 #include "core/frame/UseCounter.h"
49 #include "core/html/HTMLBRElement.h" 49 #include "core/html/HTMLBRElement.h"
50 #include "core/html/HTMLFormElement.h" 50 #include "core/html/HTMLFormElement.h"
51 #include "core/html/HTMLInputElement.h" 51 #include "core/html/HTMLInputElement.h"
52 #include "core/html/HTMLMenuElement.h" 52 #include "core/html/HTMLMenuElement.h"
53 #include "core/html/HTMLTemplateElement.h" 53 #include "core/html/HTMLTemplateElement.h"
54 #include "core/html/HTMLTextFormControlElement.h" 54 #include "core/html/HTMLTextFormControlElement.h"
55 #include "core/html/parser/HTMLParserIdioms.h" 55 #include "core/html/parser/HTMLParserIdioms.h"
56 #include "core/layout/LayoutObject.h"
56 #include "core/page/SpatialNavigation.h" 57 #include "core/page/SpatialNavigation.h"
57 #include "core/rendering/RenderObject.h"
58 #include "platform/Language.h" 58 #include "platform/Language.h"
59 #include "platform/text/BidiResolver.h" 59 #include "platform/text/BidiResolver.h"
60 #include "platform/text/BidiTextRun.h" 60 #include "platform/text/BidiTextRun.h"
61 #include "platform/text/TextRunIterator.h" 61 #include "platform/text/TextRunIterator.h"
62 #include "wtf/StdLibExtras.h" 62 #include "wtf/StdLibExtras.h"
63 #include "wtf/text/CString.h" 63 #include "wtf/text/CString.h"
64 64
65 namespace blink { 65 namespace blink {
66 66
67 using namespace HTMLNames; 67 using namespace HTMLNames;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 removeChildren(); 420 removeChildren();
421 return; 421 return;
422 } 422 }
423 replaceChildrenWithText(this, text, exceptionState); 423 replaceChildrenWithText(this, text, exceptionState);
424 return; 424 return;
425 } 425 }
426 426
427 // FIXME: Do we need to be able to detect preserveNewline style even when th ere's no renderer? 427 // FIXME: Do we need to be able to detect preserveNewline style even when th ere's no renderer?
428 // FIXME: Can the renderer be out of date here? Do we need to call updateSty leIfNeeded? 428 // FIXME: Can the renderer be out of date here? Do we need to call updateSty leIfNeeded?
429 // For example, for the contents of textarea elements that are display:none? 429 // For example, for the contents of textarea elements that are display:none?
430 RenderObject* r = renderer(); 430 LayoutObject* r = renderer();
431 if (r && r->style()->preserveNewline()) { 431 if (r && r->style()->preserveNewline()) {
432 if (!text.contains('\r')) { 432 if (!text.contains('\r')) {
433 replaceChildrenWithText(this, text, exceptionState); 433 replaceChildrenWithText(this, text, exceptionState);
434 return; 434 return;
435 } 435 }
436 String textWithConsistentLineBreaks = text; 436 String textWithConsistentLineBreaks = text;
437 textWithConsistentLineBreaks.replace("\r\n", "\n"); 437 textWithConsistentLineBreaks.replace("\r\n", "\n");
438 textWithConsistentLineBreaks.replace('\r', '\n'); 438 textWithConsistentLineBreaks.replace('\r', '\n');
439 replaceChildrenWithText(this, textWithConsistentLineBreaks, exceptionSta te); 439 replaceChildrenWithText(this, textWithConsistentLineBreaks, exceptionSta te);
440 return; 440 return;
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 #ifndef NDEBUG 1036 #ifndef NDEBUG
1037 1037
1038 // For use in the debugger 1038 // For use in the debugger
1039 void dumpInnerHTML(blink::HTMLElement*); 1039 void dumpInnerHTML(blink::HTMLElement*);
1040 1040
1041 void dumpInnerHTML(blink::HTMLElement* element) 1041 void dumpInnerHTML(blink::HTMLElement* element)
1042 { 1042 {
1043 printf("%s\n", element->innerHTML().ascii().data()); 1043 printf("%s\n", element->innerHTML().ascii().data());
1044 } 1044 }
1045 #endif 1045 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDetailsElement.cpp ('k') | Source/core/html/HTMLFieldSetElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698