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

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

Issue 232013002: Rewind the DocumentLifecycle when dirtying state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address Ojan's comments Created 6 years, 8 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/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | 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 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 return document->frame()->trackedRepaintRectsAsText(); 1877 return document->frame()->trackedRepaintRectsAsText();
1878 } 1878 }
1879 1879
1880 PassRefPtrWillBeRawPtr<ClientRectList> Internals::repaintRects(Element* element, ExceptionState& exceptionState) const 1880 PassRefPtrWillBeRawPtr<ClientRectList> Internals::repaintRects(Element* element, ExceptionState& exceptionState) const
1881 { 1881 {
1882 if (!element) { 1882 if (!element) {
1883 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: argumentNullOrIncorrectType(1, "Element")); 1883 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages:: argumentNullOrIncorrectType(1, "Element"));
1884 return nullptr; 1884 return nullptr;
1885 } 1885 }
1886 1886
1887 element->document().frame()->view()->updateLayoutAndStyleForPainting();
1888
1887 if (RenderLayer* layer = getRenderLayerForElement(element, exceptionState)) { 1889 if (RenderLayer* layer = getRenderLayerForElement(element, exceptionState)) {
1888 if (layer->compositingState() == PaintsIntoOwnBacking) { 1890 if (layer->compositingState() == PaintsIntoOwnBacking) {
1889 OwnPtr<Vector<FloatRect> > rects = layer->collectTrackedRepaintRects (); 1891 OwnPtr<Vector<FloatRect> > rects = layer->collectTrackedRepaintRects ();
1890 ASSERT(rects.get()); 1892 ASSERT(rects.get());
1891 Vector<FloatQuad> quads(rects->size()); 1893 Vector<FloatQuad> quads(rects->size());
1892 for (size_t i = 0; i < rects->size(); ++i) 1894 for (size_t i = 0; i < rects->size(); ++i)
1893 quads[i] = FloatRect(rects->at(i)); 1895 quads[i] = FloatRect(rects->at(i));
1894 return ClientRectList::create(quads); 1896 return ClientRectList::create(quads);
1895 } 1897 }
1896 } 1898 }
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) 2470 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength)
2469 { 2471 {
2470 if (!node) 2472 if (!node)
2471 return String(); 2473 return String();
2472 blink::WebPoint point(x, y); 2474 blink::WebPoint point(x, y);
2473 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); 2475 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength);
2474 return surroundingText.content(); 2476 return surroundingText.content();
2475 } 2477 }
2476 2478
2477 } 2479 }
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698