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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2557533005: Collect active stylesheets and and apply asynchronously. (Closed)
Patch Set: [Mac] Missing style recalc for device scale change Created 4 years 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 */ 25 */
26 26
27 #include "core/frame/FrameView.h" 27 #include "core/frame/FrameView.h"
28 28
29 #include "core/HTMLNames.h" 29 #include "core/HTMLNames.h"
30 #include "core/MediaTypeNames.h" 30 #include "core/MediaTypeNames.h"
31 #include "core/animation/DocumentAnimations.h" 31 #include "core/animation/DocumentAnimations.h"
32 #include "core/css/FontFaceSet.h" 32 #include "core/css/FontFaceSet.h"
33 #include "core/css/resolver/StyleResolver.h"
34 #include "core/dom/AXObjectCache.h" 33 #include "core/dom/AXObjectCache.h"
35 #include "core/dom/DOMNodeIds.h" 34 #include "core/dom/DOMNodeIds.h"
36 #include "core/dom/ElementVisibilityObserver.h" 35 #include "core/dom/ElementVisibilityObserver.h"
37 #include "core/dom/Fullscreen.h" 36 #include "core/dom/Fullscreen.h"
38 #include "core/dom/IntersectionObserverCallback.h" 37 #include "core/dom/IntersectionObserverCallback.h"
39 #include "core/dom/IntersectionObserverController.h" 38 #include "core/dom/IntersectionObserverController.h"
40 #include "core/dom/IntersectionObserverInit.h" 39 #include "core/dom/IntersectionObserverInit.h"
40 #include "core/dom/StyleChangeReason.h"
41 #include "core/dom/TaskRunnerHelper.h" 41 #include "core/dom/TaskRunnerHelper.h"
42 #include "core/editing/EditingUtilities.h" 42 #include "core/editing/EditingUtilities.h"
43 #include "core/editing/FrameSelection.h" 43 #include "core/editing/FrameSelection.h"
44 #include "core/editing/RenderedPosition.h" 44 #include "core/editing/RenderedPosition.h"
45 #include "core/editing/markers/DocumentMarkerController.h" 45 #include "core/editing/markers/DocumentMarkerController.h"
46 #include "core/events/ErrorEvent.h" 46 #include "core/events/ErrorEvent.h"
47 #include "core/fetch/ResourceFetcher.h" 47 #include "core/fetch/ResourceFetcher.h"
48 #include "core/frame/BrowserControls.h" 48 #include "core/frame/BrowserControls.h"
49 #include "core/frame/EventHandlerRegistry.h" 49 #include "core/frame/EventHandlerRegistry.h"
50 #include "core/frame/FrameHost.h" 50 #include "core/frame/FrameHost.h"
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 void FrameView::adjustMediaTypeForPrinting(bool printing) { 1456 void FrameView::adjustMediaTypeForPrinting(bool printing) {
1457 if (printing) { 1457 if (printing) {
1458 if (m_mediaTypeWhenNotPrinting.isNull()) 1458 if (m_mediaTypeWhenNotPrinting.isNull())
1459 m_mediaTypeWhenNotPrinting = mediaType(); 1459 m_mediaTypeWhenNotPrinting = mediaType();
1460 setMediaType(MediaTypeNames::print); 1460 setMediaType(MediaTypeNames::print);
1461 } else { 1461 } else {
1462 if (!m_mediaTypeWhenNotPrinting.isNull()) 1462 if (!m_mediaTypeWhenNotPrinting.isNull())
1463 setMediaType(m_mediaTypeWhenNotPrinting); 1463 setMediaType(m_mediaTypeWhenNotPrinting);
1464 m_mediaTypeWhenNotPrinting = nullAtom; 1464 m_mediaTypeWhenNotPrinting = nullAtom;
1465 } 1465 }
1466
1467 m_frame->document()->setNeedsStyleRecalc(
esprehn 2016/12/09 01:36:21 Ouch, did this code path always force a full docum
rune 2016/12/09 08:55:50 Yes, that is, setMediaType() called from here call
1468 SubtreeStyleChange,
1469 StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
1466 } 1470 }
1467 1471
1468 bool FrameView::contentsInCompositedLayer() const { 1472 bool FrameView::contentsInCompositedLayer() const {
1469 LayoutViewItem layoutViewItem = this->layoutViewItem(); 1473 LayoutViewItem layoutViewItem = this->layoutViewItem();
1470 return !layoutViewItem.isNull() && 1474 return !layoutViewItem.isNull() &&
1471 layoutViewItem.compositingState() == PaintsIntoOwnBacking; 1475 layoutViewItem.compositingState() == PaintsIntoOwnBacking;
1472 } 1476 }
1473 1477
1474 void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object) { 1478 void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object) {
1475 ASSERT(!m_backgroundAttachmentFixedObjects.contains(object)); 1479 ASSERT(!m_backgroundAttachmentFixedObjects.contains(object));
(...skipping 3183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4659 DCHECK(m_frame->isMainFrame()); 4663 DCHECK(m_frame->isMainFrame());
4660 return m_initialViewportSize.width(); 4664 return m_initialViewportSize.width();
4661 } 4665 }
4662 4666
4663 int FrameView::initialViewportHeight() const { 4667 int FrameView::initialViewportHeight() const {
4664 DCHECK(m_frame->isMainFrame()); 4668 DCHECK(m_frame->isMainFrame());
4665 return m_initialViewportSize.height(); 4669 return m_initialViewportSize.height();
4666 } 4670 }
4667 4671
4668 } // namespace blink 4672 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698