| OLD | NEW |
| 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 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2286 } | 2286 } |
| 2287 | 2287 |
| 2288 FrameView* frameView = document->view(); | 2288 FrameView* frameView = document->view(); |
| 2289 frameView->updateAllLifecyclePhases(); | 2289 frameView->updateAllLifecyclePhases(); |
| 2290 frameView->setTracksPaintInvalidations(false); | 2290 frameView->setTracksPaintInvalidations(false); |
| 2291 } | 2291 } |
| 2292 | 2292 |
| 2293 void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks( | 2293 void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks( |
| 2294 Node* node, | 2294 Node* node, |
| 2295 ExceptionState& exceptionState) { | 2295 ExceptionState& exceptionState) { |
| 2296 Document* document; | 2296 Document* document = nullptr; |
| 2297 if (!node) { | 2297 if (!node) { |
| 2298 document = contextDocument(); | 2298 document = contextDocument(); |
| 2299 } else if (node->isDocumentNode()) { | 2299 } else if (node->isDocumentNode()) { |
| 2300 document = toDocument(node); | 2300 document = toDocument(node); |
| 2301 } else if (isHTMLIFrameElement(*node)) { | 2301 } else if (isHTMLIFrameElement(*node)) { |
| 2302 document = toHTMLIFrameElement(*node).contentDocument(); | 2302 document = toHTMLIFrameElement(*node).contentDocument(); |
| 2303 } else { | 2303 } |
| 2304 |
| 2305 if (!document) { |
| 2304 exceptionState.throwTypeError( | 2306 exceptionState.throwTypeError( |
| 2305 "The node provided is neither a document nor an IFrame."); | 2307 "The node provided is neither a document nor an IFrame."); |
| 2306 return; | 2308 return; |
| 2307 } | 2309 } |
| 2308 document->updateStyleAndLayoutIgnorePendingStylesheets( | 2310 document->updateStyleAndLayoutIgnorePendingStylesheets( |
| 2309 Document::RunPostLayoutTasksSynchronously); | 2311 Document::RunPostLayoutTasksSynchronously); |
| 2310 } | 2312 } |
| 2311 | 2313 |
| 2312 void Internals::forceFullRepaint(Document* document, | 2314 void Internals::forceFullRepaint(Document* document, |
| 2313 ExceptionState& exceptionState) { | 2315 ExceptionState& exceptionState) { |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3009 return ClientRect::create(); | 3011 return ClientRect::create(); |
| 3010 | 3012 |
| 3011 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); | 3013 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); |
| 3012 } | 3014 } |
| 3013 | 3015 |
| 3014 void Internals::crash() { | 3016 void Internals::crash() { |
| 3015 CHECK(false) << "Intentional crash"; | 3017 CHECK(false) << "Intentional crash"; |
| 3016 } | 3018 } |
| 3017 | 3019 |
| 3018 } // namespace blink | 3020 } // namespace blink |
| OLD | NEW |