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

Side by Side Diff: third_party/WebKit/Source/core/dom/Text.cpp

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Created 4 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
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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Text* newText = cloneWithData(oldStr.substring(offset)); 117 Text* newText = cloneWithData(oldStr.substring(offset));
118 setDataWithoutUpdate(oldStr.substring(0, offset)); 118 setDataWithoutUpdate(oldStr.substring(0, offset));
119 119
120 didModifyData(oldStr, CharacterData::UpdateFromNonParser); 120 didModifyData(oldStr, CharacterData::UpdateFromNonParser);
121 121
122 if (parentNode()) 122 if (parentNode())
123 parentNode()->insertBefore(newText, nextSibling(), exceptionState); 123 parentNode()->insertBefore(newText, nextSibling(), exceptionState);
124 if (exceptionState.hadException()) 124 if (exceptionState.hadException())
125 return nullptr; 125 return nullptr;
126 126
127 if (layoutObject()) 127 if (hasLayoutObject())
128 layoutObject()->setTextWithOffset(dataImpl(), 0, oldStr.length()); 128 layoutObject()->setTextWithOffset(dataImpl(), 0, oldStr.length());
129 129
130 if (parentNode()) 130 if (parentNode())
131 document().didSplitTextNode(*this); 131 document().didSplitTextNode(*this);
132 132
133 // [NewObject] must always create a new wrapper. Check that a wrapper 133 // [NewObject] must always create a new wrapper. Check that a wrapper
134 // does not exist yet. 134 // does not exist yet.
135 DCHECK(DOMDataStore::getWrapper(newText, v8::Isolate::GetCurrent()).IsEmpty( )); 135 DCHECK(DOMDataStore::getWrapper(newText, v8::Isolate::GetCurrent()).IsEmpty( ));
136 136
137 return newText; 137 return newText;
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 result.append("; "); 458 result.append("; ");
459 result.append("value="); 459 result.append("value=");
460 result.append(s); 460 result.append(s);
461 } 461 }
462 462
463 strncpy(buffer, result.toString().utf8().data(), length - 1); 463 strncpy(buffer, result.toString().utf8().data(), length - 1);
464 } 464 }
465 #endif 465 #endif
466 466
467 } // namespace blink 467 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698