OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1326 { | 1326 { |
1327 RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElemen t(HTMLNames::linkTag, false); | 1327 RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElemen t(HTMLNames::linkTag, false); |
1328 | 1328 |
1329 styleElement->setAttribute(HTMLNames::typeAttr, "text/css"); | 1329 styleElement->setAttribute(HTMLNames::typeAttr, "text/css"); |
1330 styleElement->setAttribute(HTMLNames::relAttr, "stylesheet"); | 1330 styleElement->setAttribute(HTMLNames::relAttr, "stylesheet"); |
1331 styleElement->setAttribute(HTMLNames::hrefAttr, url); | 1331 styleElement->setAttribute(HTMLNames::hrefAttr, url); |
1332 | 1332 |
1333 frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCE PTION); | 1333 frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCE PTION); |
1334 } | 1334 } |
1335 | 1335 |
1336 void WebLocalFrameImpl::notifyTransitionShown(int elementsToHide) | |
abarth-chromium
2014/06/21 05:38:36
Perhaps this function should be called "beginExitT
oystein (OOO til 10th of July)
2014/07/22 21:17:21
Done.
| |
1337 { | |
1338 frame()->loader().closeURL(); | |
1339 | |
1340 if (elementsToHide >= 0) | |
1341 frame()->document()->hideTransitionElements((unsigned)elementsToHide); | |
abarth-chromium
2014/06/21 05:38:36
Why randomly cast from signed to unsigned? Will a
| |
1342 frame()->document()->setIsTransitionDocument(); | |
1343 frame()->document()->styleEngine()->enableExitTransitionStylesheets(); | |
1344 } | |
1345 | |
1346 void WebLocalFrameImpl::setupTransitionView(const WebData& markup) | |
1347 { | |
1348 // Need this so that the transition UA stylesheet gets applied. | |
1349 frame()->document()->setIsTransitionDocument(); | |
1350 | |
1351 ASSERT(document().securityOrigin().isUnique()); | |
1352 frame()->document()->enforceSandboxFlags(SandboxAll); | |
1353 | |
1354 loadData(markup, WebString::fromUTF8("text/html"), WebString::fromUTF8("UTF- 8"), document().url(), WebURL(), true); | |
1355 } | |
abarth-chromium
2014/06/21 05:38:36
These all seem like separate steps that the embedd
oystein (OOO til 10th of July)
2014/07/22 21:17:21
I moved the setIsTransitionDocument to a separate
| |
1356 | |
1336 void WebLocalFrameImpl::setCaretVisible(bool visible) | 1357 void WebLocalFrameImpl::setCaretVisible(bool visible) |
1337 { | 1358 { |
1338 frame()->selection().setCaretVisible(visible); | 1359 frame()->selection().setCaretVisible(visible); |
1339 } | 1360 } |
1340 | 1361 |
1341 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint& point) | 1362 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint& point) |
1342 { | 1363 { |
1343 // FIXME(bokan): crbug.com/371902 - These scale/pinch transforms shouldn't | 1364 // FIXME(bokan): crbug.com/371902 - These scale/pinch transforms shouldn't |
1344 // be ad hoc and explicit. | 1365 // be ad hoc and explicit. |
1345 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); | 1366 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1949 { | 1970 { |
1950 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host , owner); | 1971 RefPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClientImpl, host , owner); |
1951 setWebCoreFrame(frame); | 1972 setWebCoreFrame(frame); |
1952 frame->tree().setName(name, fallbackName); | 1973 frame->tree().setName(name, fallbackName); |
1953 // May dispatch JS events; frame may be detached after this. | 1974 // May dispatch JS events; frame may be detached after this. |
1954 frame->init(); | 1975 frame->init(); |
1955 return frame; | 1976 return frame; |
1956 } | 1977 } |
1957 | 1978 |
1958 } // namespace blink | 1979 } // namespace blink |
OLD | NEW |