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

Unified Diff: Source/core/rendering/RenderInline.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index 101fdf78ad71818b057a5d1dc4ce936a8d77d0ec..daf7678c7e020b739b234e12842d8fc138b19995 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -207,7 +207,7 @@ void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout)
RenderStyle* parentStyle = parent()->style();
RenderInline* parentRenderInline = parent()->isRenderInline() ? toRenderInline(parent()) : 0;
- bool checkFonts = document()->inNoQuirksMode();
+ bool checkFonts = document().inNoQuirksMode();
RenderFlowThread* flowThread = flowThreadContainingBlock();
bool alwaysCreateLineBoxes = (parentRenderInline && parentRenderInline->alwaysCreateLineBoxes())
|| (parentRenderInline && parentStyle->verticalAlign() != BASELINE)
@@ -217,7 +217,7 @@ void RenderInline::updateAlwaysCreateLineBoxes(bool fullLayout)
|| parentStyle->lineHeight() != style()->lineHeight()))
|| (flowThread && flowThread->hasRegionsWithStyling());
- if (!alwaysCreateLineBoxes && checkFonts && document()->styleSheetCollections()->usesFirstLineRules()) {
+ if (!alwaysCreateLineBoxes && checkFonts && document().styleSheetCollections()->usesFirstLineRules()) {
// Have to check the first line style as well.
parentStyle = parent()->style(true);
RenderStyle* childStyle = style(true);
@@ -314,7 +314,7 @@ void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
if (RenderObject* positionedAncestor = inFlowPositionedInlineAncestor(this))
newStyle->setPosition(positionedAncestor->style()->position());
- RenderBlock* newBox = RenderBlock::createAnonymous(document());
+ RenderBlock* newBox = RenderBlock::createAnonymous(&document());
newBox->setStyle(newStyle.release());
RenderBoxModelObject* oldContinuation = continuation();
setContinuation(newBox);
@@ -349,7 +349,7 @@ void RenderInline::splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock,
// that renderer is wrapped in a RenderFullScreen, so |this| is not its
// parent. Since the splitting logic expects |this| to be the parent, set
// |beforeChild| to be the RenderFullScreen.
- if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(document())) {
+ if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(&document())) {
const Element* fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
if (fullScreenElement && beforeChild && beforeChild->node() == fullScreenElement)
beforeChild = fullscreen->fullScreenRenderer();
@@ -1288,7 +1288,7 @@ InlineFlowBox* RenderInline::createAndAppendInlineFlowBox()
LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*direction*/, LinePositionMode /*linePositionMode*/) const
{
- if (firstLine && document()->styleSheetCollections()->usesFirstLineRules()) {
+ if (firstLine && document().styleSheetCollections()->usesFirstLineRules()) {
RenderStyle* s = style(firstLine);
if (s != style())
return s->computedLineHeight(view());
« no previous file with comments | « Source/core/rendering/RenderImage.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698