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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 211773002: Rename updateStyle to updateRenderTree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tracing test Created 6 years, 9 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/svg/SVGUseElement.cpp ('k') | Source/core/xml/XMLErrors.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 unsigned Internals::updateStyleAndReturnAffectedElementCount(ExceptionState& exc eptionState) const 289 unsigned Internals::updateStyleAndReturnAffectedElementCount(ExceptionState& exc eptionState) const
290 { 290 {
291 Document* document = contextDocument(); 291 Document* document = contextDocument();
292 if (!document) { 292 if (!document) {
293 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available."); 293 exceptionState.throwDOMException(InvalidAccessError, "No context documen t is available.");
294 return 0; 294 return 0;
295 } 295 }
296 296
297 unsigned beforeCount = document->styleEngine()->resolverAccessCount(); 297 unsigned beforeCount = document->styleEngine()->resolverAccessCount();
298 document->updateStyleIfNeeded(); 298 document->updateRenderTreeIfNeeded();
299 return document->styleEngine()->resolverAccessCount() - beforeCount; 299 return document->styleEngine()->resolverAccessCount() - beforeCount;
300 } 300 }
301 301
302 unsigned Internals::needsLayoutCount(ExceptionState& exceptionState) const 302 unsigned Internals::needsLayoutCount(ExceptionState& exceptionState) const
303 { 303 {
304 LocalFrame* contextFrame = frame(); 304 LocalFrame* contextFrame = frame();
305 if (!contextFrame) { 305 if (!contextFrame) {
306 exceptionState.throwDOMException(InvalidAccessError, "No context frame i s available."); 306 exceptionState.throwDOMException(InvalidAccessError, "No context frame i s available.");
307 return 0; 307 return 0;
308 } 308 }
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) 2445 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength)
2446 { 2446 {
2447 if (!node) 2447 if (!node)
2448 return String(); 2448 return String();
2449 blink::WebPoint point(x, y); 2449 blink::WebPoint point(x, y);
2450 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); 2450 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength);
2451 return surroundingText.content(); 2451 return surroundingText.content();
2452 } 2452 }
2453 2453
2454 } 2454 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/xml/XMLErrors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698