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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 784453003: Initial scroll-blocks-on compositor integration (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Eliminate scrollbars from iframe test for cross-platform output consistency Created 5 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 if (includeSMILProperties && state.element()->isSVGElement()) 515 if (includeSMILProperties && state.element()->isSVGElement())
516 collector.addElementStyleProperties(toSVGElement(state.element())->a nimatedSMILStyleProperties(), false /* isCacheable */); 516 collector.addElementStyleProperties(toSVGElement(state.element())->a nimatedSMILStyleProperties(), false /* isCacheable */);
517 } 517 }
518 } 518 }
519 519
520 PassRefPtr<RenderStyle> StyleResolver::styleForDocument(Document& document) 520 PassRefPtr<RenderStyle> StyleResolver::styleForDocument(Document& document)
521 { 521 {
522 const LocalFrame* frame = document.frame(); 522 const LocalFrame* frame = document.frame();
523 523
524 RefPtr<RenderStyle> documentStyle = RenderStyle::create(); 524 RefPtr<RenderStyle> documentStyle = RenderStyle::create();
525 documentStyle->setDisplay(BLOCK);
526 documentStyle->setRTLOrdering(document.visuallyOrdered() ? VisualOrder : Log icalOrder); 525 documentStyle->setRTLOrdering(document.visuallyOrdered() ? VisualOrder : Log icalOrder);
527 documentStyle->setZoom(frame && !document.printing() ? frame->pageZoomFactor () : 1); 526 documentStyle->setZoom(frame && !document.printing() ? frame->pageZoomFactor () : 1);
528 documentStyle->setLocale(document.contentLanguage()); 527 documentStyle->setLocale(document.contentLanguage());
529 documentStyle->setZIndex(0); 528 documentStyle->setZIndex(0);
530 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE : READ_ONL Y); 529 documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE : READ_ONL Y);
530 // These are designed to match the user-agent stylesheet values for the docu ment element
531 // so that the common case doesn't need to create a new RenderStyle in
532 // Document::inheritHtmlAndBodyElementStyles.
533 documentStyle->setDisplay(BLOCK);
534 documentStyle->setScrollBlocksOn(WebScrollBlocksOnStartTouch | WebScrollBloc ksOnWheelEvent);
531 535
532 document.setupFontBuilder(documentStyle.get()); 536 document.setupFontBuilder(documentStyle.get());
533 537
534 return documentStyle.release(); 538 return documentStyle.release();
535 } 539 }
536 540
537 void StyleResolver::adjustRenderStyle(StyleResolverState& state, Element* elemen t) 541 void StyleResolver::adjustRenderStyle(StyleResolverState& state, Element* elemen t)
538 { 542 {
539 StyleAdjuster adjuster(document().inQuirksMode()); 543 StyleAdjuster adjuster(document().inQuirksMode());
540 adjuster.adjustRenderStyle(state.style(), state.parentStyle(), element, stat e.cachedUAStyle()); 544 adjuster.adjustRenderStyle(state.style(), state.parentStyle(), element, stat e.cachedUAStyle());
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 visitor->trace(m_uncommonAttributeRuleSet); 1600 visitor->trace(m_uncommonAttributeRuleSet);
1597 visitor->trace(m_watchedSelectorsRules); 1601 visitor->trace(m_watchedSelectorsRules);
1598 visitor->trace(m_treeBoundaryCrossingRules); 1602 visitor->trace(m_treeBoundaryCrossingRules);
1599 visitor->trace(m_styleSharingLists); 1603 visitor->trace(m_styleSharingLists);
1600 visitor->trace(m_pendingStyleSheets); 1604 visitor->trace(m_pendingStyleSheets);
1601 visitor->trace(m_document); 1605 visitor->trace(m_document);
1602 #endif 1606 #endif
1603 } 1607 }
1604 1608
1605 } // namespace blink 1609 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/html.css ('k') | Source/core/css/svg.css » ('j') | public/platform/WebLayer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698