Merge from Chromium at DEPS revision r213780
This commit was generated by merge_to_master.py.
Change-Id: I702915ad75bd2cc5201b0239db771978b0a8137d
diff --git a/Source/core/rendering/AutoTableLayout.cpp b/Source/core/rendering/AutoTableLayout.cpp
index fe43249..fbccbaa 100644
--- a/Source/core/rendering/AutoTableLayout.cpp
+++ b/Source/core/rendering/AutoTableLayout.cpp
@@ -61,7 +61,7 @@
for (unsigned i = 0; i < numRows; i++) {
RenderTableSection::CellStruct current = section->cellAt(i, effCol);
RenderTableCell* cell = current.primaryCell();
-
+
if (current.inColSpan || !cell)
continue;
@@ -81,9 +81,9 @@
maxContributor = cell;
}
- // All browsers implement a size limit on the cell's max width.
+ // All browsers implement a size limit on the cell's max width.
// Our limit is based on KHTML's representation that used 16 bits widths.
- // FIXME: Other browsers have a lower limit for the cell's max width.
+ // FIXME: Other browsers have a lower limit for the cell's max width.
const int cCellMaxWidth = 32760;
Length cellLogicalWidth = cell->styleOrColLogicalWidth();
if (cellLogicalWidth.value() > cCellMaxWidth)
@@ -97,7 +97,7 @@
int logicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(cellLogicalWidth.value());
if (columnLayout.logicalWidth.isFixed()) {
// Nav/IE weirdness
- if ((logicalWidth > columnLayout.logicalWidth.value())
+ if ((logicalWidth > columnLayout.logicalWidth.value())
|| ((columnLayout.logicalWidth.value() == logicalWidth) && (maxContributor == cell))) {
columnLayout.logicalWidth.setValue(Fixed, logicalWidth);
fixedContributor = cell;
@@ -396,7 +396,7 @@
} else {
int remainingMaxLogicalWidth = spanMaxLogicalWidth;
int remainingMinLogicalWidth = spanMinLogicalWidth;
-
+
// Give min to variable first, to fixed second, and to others third.
for (unsigned pos = effCol; remainingMaxLogicalWidth >= 0 && pos < lastCol; ++pos) {
if (m_layoutStruct[pos].logicalWidth.isFixed() && haveAuto && fixedWidth <= cellMinLogicalWidth) {
@@ -556,7 +556,7 @@
}
}
}
-
+
// then allocate width to fixed cols
if (available > 0) {
for (size_t i = 0; i < nEffCols; ++i) {
@@ -642,7 +642,7 @@
if (logicalWidth.isAuto())
logicalWidthBeyondMin += m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
}
-
+
for (unsigned i = nEffCols; i && logicalWidthBeyondMin > 0; ) {
--i;
Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
@@ -666,7 +666,7 @@
if (logicalWidth.isFixed())
logicalWidthBeyondMin += m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
}
-
+
for (unsigned i = nEffCols; i && logicalWidthBeyondMin > 0; ) {
--i;
Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
@@ -690,7 +690,7 @@
if (logicalWidth.isPercent())
logicalWidthBeyondMin += m_layoutStruct[i].computedLogicalWidth - m_layoutStruct[i].effectiveMinLogicalWidth;
}
-
+
for (unsigned i = nEffCols; i && logicalWidthBeyondMin > 0; ) {
--i;
Length& logicalWidth = m_layoutStruct[i].effectiveLogicalWidth;
diff --git a/Source/core/rendering/AutoTableLayout.h b/Source/core/rendering/AutoTableLayout.h
index c87efbe..4975a96 100644
--- a/Source/core/rendering/AutoTableLayout.h
+++ b/Source/core/rendering/AutoTableLayout.h
@@ -24,7 +24,7 @@
#include "core/platform/LayoutUnit.h"
#include "core/platform/Length.h"
#include "core/rendering/TableLayout.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/BidiRun.cpp b/Source/core/rendering/BidiRun.cpp
index b75c5bc..8e56a0b 100644
--- a/Source/core/rendering/BidiRun.cpp
+++ b/Source/core/rendering/BidiRun.cpp
@@ -24,8 +24,8 @@
#include "config.h"
#include "core/rendering/BidiRun.h"
#include "core/rendering/RenderArena.h"
-#include <wtf/RefCountedLeakCounter.h>
-#include <wtf/StdLibExtras.h>
+#include "wtf/RefCountedLeakCounter.h"
+#include "wtf/StdLibExtras.h"
using namespace WTF;
diff --git a/Source/core/rendering/BidiRun.h b/Source/core/rendering/BidiRun.h
index c4c266f..74f3fad 100644
--- a/Source/core/rendering/BidiRun.h
+++ b/Source/core/rendering/BidiRun.h
@@ -26,7 +26,7 @@
#include "core/platform/text/BidiResolver.h"
#include "core/rendering/RenderText.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
namespace WebCore {
diff --git a/Source/core/rendering/ClipPathOperation.h b/Source/core/rendering/ClipPathOperation.h
index 7b43c82..fcbf07b 100644
--- a/Source/core/rendering/ClipPathOperation.h
+++ b/Source/core/rendering/ClipPathOperation.h
@@ -32,10 +32,10 @@
#include "core/platform/graphics/Path.h"
#include "core/rendering/style/BasicShapes.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/core/rendering/ColumnInfo.h b/Source/core/rendering/ColumnInfo.h
index 6d0d0a6..bb30a16 100644
--- a/Source/core/rendering/ColumnInfo.h
+++ b/Source/core/rendering/ColumnInfo.h
@@ -20,14 +20,14 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ColumnInfo_h
#define ColumnInfo_h
#include "core/platform/LayoutUnit.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
@@ -51,7 +51,7 @@
LayoutUnit desiredColumnWidth() const { return m_desiredColumnWidth; }
void setDesiredColumnWidth(LayoutUnit width) { m_desiredColumnWidth = width; }
-
+
unsigned desiredColumnCount() const { return m_desiredColumnCount; }
void setDesiredColumnCount(unsigned count) { m_desiredColumnCount = count; }
@@ -69,7 +69,7 @@
// Set our count and height. This is enough info for a RenderBlock to compute page rects
// dynamically.
void setColumnCountAndHeight(int count, LayoutUnit height)
- {
+ {
m_columnCount = count;
m_columnHeight = height;
}
@@ -82,13 +82,13 @@
LayoutUnit forcedBreakOffset() const { return m_forcedBreakOffset; }
LayoutUnit maximumDistanceBetweenForcedBreaks() const { return m_maximumDistanceBetweenForcedBreaks; }
void clearForcedBreaks()
- {
+ {
m_forcedBreaks = 0;
m_maximumDistanceBetweenForcedBreaks = 0;
m_forcedBreakOffset = 0;
}
void addForcedBreak(LayoutUnit offsetFromFirstPage)
- {
+ {
ASSERT(!m_columnHeight);
LayoutUnit distanceFromLastBreak = offsetFromFirstPage - m_forcedBreakOffset;
if (!distanceFromLastBreak)
diff --git a/Source/core/rendering/CounterNode.cpp b/Source/core/rendering/CounterNode.cpp
index 4f3f3a1..86419c0 100644
--- a/Source/core/rendering/CounterNode.cpp
+++ b/Source/core/rendering/CounterNode.cpp
@@ -289,7 +289,7 @@
m_lastChild = last;
first->m_previousSibling = newChild;
-
+
// The case when the original next sibling of the inserted node becomes a child of
// one of the former children of the inserted node is not handled as it is believed
// to be impossible since:
@@ -331,7 +331,7 @@
oldChild->m_previousSibling = 0;
oldChild->m_parent = 0;
- if (previous)
+ if (previous)
previous->m_nextSibling = next;
else {
ASSERT(m_firstChild == oldChild);
diff --git a/Source/core/rendering/CounterNode.h b/Source/core/rendering/CounterNode.h
index 7d6def8..c467036 100644
--- a/Source/core/rendering/CounterNode.h
+++ b/Source/core/rendering/CounterNode.h
@@ -22,9 +22,9 @@
#ifndef CounterNode_h
#define CounterNode_h
-#include <wtf/Forward.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/RefCounted.h>
+#include "wtf/Forward.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/RefCounted.h"
// This implements a counter tree that is used for finding parents in counters() lookup,
// and for propagating count changes when nodes are added or removed.
diff --git a/Source/core/rendering/FilterEffectRenderer.cpp b/Source/core/rendering/FilterEffectRenderer.cpp
index 30797e4..85d6c07 100644
--- a/Source/core/rendering/FilterEffectRenderer.cpp
+++ b/Source/core/rendering/FilterEffectRenderer.cpp
@@ -21,7 +21,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -244,7 +244,7 @@
float amount = narrowPrecisionToFloat(componentTransferOperation->amount());
transferFunction.slope = amount;
transferFunction.intercept = -0.5 * amount + 0.5;
-
+
ComponentTransferFunction nullFunction;
effect = FEComponentTransfer::create(this, transferFunction, transferFunction, transferFunction, nullFunction);
break;
@@ -384,7 +384,7 @@
filter->setAbsoluteFilterRegion(AffineTransform().scale(zoom).mapRect(filterSourceRect));
filter->setFilterRegion(absoluteTransform.inverse().mapRect(filterSourceRect));
filter->lastEffect()->determineFilterPrimitiveSubregion();
-
+
bool hasUpdatedBackingStore = filter->updateBackingStoreRect(filterSourceRect);
if (filter->hasFilterThatMovesPixels()) {
if (hasUpdatedBackingStore)
@@ -396,11 +396,11 @@
}
return true;
}
-
+
GraphicsContext* FilterEffectRendererHelper::beginFilterEffect(GraphicsContext* oldContext)
{
ASSERT(m_renderLayer);
-
+
FilterEffectRenderer* filter = m_renderLayer->filterRenderer();
filter->allocateBackingStoreIfNeeded();
// Paint into the context that represents the SourceGraphic of the filter.
@@ -410,9 +410,9 @@
m_haveFilterEffect = false;
return oldContext;
}
-
+
m_savedGraphicsContext = oldContext;
-
+
// Translate the context so that the contents of the layer is captuterd in the offscreen memory buffer.
sourceGraphicsContext->save();
// FIXME: can we just use sourceImageRect for everything, and get rid of
@@ -421,7 +421,7 @@
sourceGraphicsContext->translate(-offset.x(), -offset.y());
sourceGraphicsContext->clearRect(m_repaintRect);
sourceGraphicsContext->clip(m_repaintRect);
-
+
return sourceGraphicsContext;
}
diff --git a/Source/core/rendering/FilterEffectRenderer.h b/Source/core/rendering/FilterEffectRenderer.h
index 9fd408d..5352713 100644
--- a/Source/core/rendering/FilterEffectRenderer.h
+++ b/Source/core/rendering/FilterEffectRenderer.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FilterEffectRenderer_h
@@ -36,10 +36,9 @@
#include "core/platform/graphics/filters/FilterOperations.h"
#include "core/platform/graphics/filters/SourceGraphic.h"
#include "core/svg/graphics/filters/SVGFilterBuilder.h"
-
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -58,7 +57,7 @@
, m_haveFilterEffect(haveFilterEffect)
{
}
-
+
bool haveFilterEffect() const { return m_haveFilterEffect; }
bool hasStartedFilterEffect() const { return m_savedGraphicsContext; }
@@ -85,7 +84,7 @@
}
void setSourceImageRect(const FloatRect& sourceImageRect)
- {
+ {
m_sourceDrawingRegion = sourceImageRect;
m_graphicsBufferAttached = false;
}
@@ -99,7 +98,7 @@
void allocateBackingStoreIfNeeded();
void clearIntermediateResults();
void apply();
-
+
IntRect outputRect() const { return lastEffect()->hasResult() ? lastEffect()->absolutePaintRect() : IntRect(); }
bool hasFilterThatMovesPixels() const { return m_hasFilterThatMovesPixels; }
@@ -114,12 +113,12 @@
FilterEffectRenderer();
virtual ~FilterEffectRenderer();
-
+
FloatRect m_sourceDrawingRegion;
-
+
RefPtr<SourceGraphic> m_sourceGraphic;
RefPtr<FilterEffect> m_lastEffect;
-
+
IntRectExtent m_outsets;
bool m_graphicsBufferAttached;
diff --git a/Source/core/rendering/FixedTableLayout.cpp b/Source/core/rendering/FixedTableLayout.cpp
index a8258da..74061f7 100644
--- a/Source/core/rendering/FixedTableLayout.cpp
+++ b/Source/core/rendering/FixedTableLayout.cpp
@@ -196,8 +196,8 @@
</td></tr></table>
</td></tr></table>
</td></tr></table>
- */
- // In this example, the two inner tables should be as large as the outer table.
+ */
+ // In this example, the two inner tables should be as large as the outer table.
// We can achieve this effect by making the maxwidth of fixed tables with percentage
// widths be infinite.
if (m_table->style()->logicalWidth().isPercent() && maxWidth < tableMaxWidth)
@@ -307,7 +307,7 @@
if (nEffCols > 0)
calcWidth[nEffCols - 1] += remainingWidth;
}
-
+
int pos = 0;
for (unsigned i = 0; i < nEffCols; i++) {
m_table->setColumnPosition(i, pos);
diff --git a/Source/core/rendering/FixedTableLayout.h b/Source/core/rendering/FixedTableLayout.h
index 886d098..7de0e48 100644
--- a/Source/core/rendering/FixedTableLayout.h
+++ b/Source/core/rendering/FixedTableLayout.h
@@ -23,7 +23,7 @@
#include "core/platform/Length.h"
#include "core/rendering/TableLayout.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/FlowThreadController.cpp b/Source/core/rendering/FlowThreadController.cpp
index 7ba712b..c061075 100644
--- a/Source/core/rendering/FlowThreadController.cpp
+++ b/Source/core/rendering/FlowThreadController.cpp
@@ -34,7 +34,7 @@
#include "core/dom/NamedFlowCollection.h"
#include "core/rendering/RenderFlowThread.h"
#include "core/rendering/RenderNamedFlowThread.h"
-#include <wtf/text/AtomicString.h>
+#include "wtf/text/AtomicString.h"
namespace WebCore {
diff --git a/Source/core/rendering/FlowThreadController.h b/Source/core/rendering/FlowThreadController.h
index 0f014cd..b7deda8 100644
--- a/Source/core/rendering/FlowThreadController.h
+++ b/Source/core/rendering/FlowThreadController.h
@@ -31,8 +31,8 @@
#define FlowThreadController_h
#include "core/rendering/RenderView.h"
-#include <wtf/ListHashSet.h>
-#include <wtf/OwnPtr.h>
+#include "wtf/ListHashSet.h"
+#include "wtf/OwnPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/GapRects.h b/Source/core/rendering/GapRects.h
index 515d4a6..48f7fec 100644
--- a/Source/core/rendering/GapRects.h
+++ b/Source/core/rendering/GapRects.h
@@ -31,7 +31,7 @@
const LayoutRect& left() const { return m_left; }
const LayoutRect& center() const { return m_center; }
const LayoutRect& right() const { return m_right; }
-
+
void uniteLeft(const LayoutRect& r) { m_left.unite(r); }
void uniteCenter(const LayoutRect& r) { m_center.unite(r); }
void uniteRight(const LayoutRect& r) { m_right.unite(r); }
diff --git a/Source/core/rendering/HitTestLocation.h b/Source/core/rendering/HitTestLocation.h
index 1e64663..bf03f0d 100644
--- a/Source/core/rendering/HitTestLocation.h
+++ b/Source/core/rendering/HitTestLocation.h
@@ -28,10 +28,10 @@
#include "core/platform/graphics/RoundedRect.h"
#include "core/platform/text/TextDirection.h"
#include "core/rendering/HitTestRequest.h"
-#include <wtf/Forward.h>
-#include <wtf/ListHashSet.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/RefPtr.h>
+#include "wtf/Forward.h"
+#include "wtf/ListHashSet.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp
index ae5cf68..5fd0969 100644
--- a/Source/core/rendering/HitTestResult.cpp
+++ b/Source/core/rendering/HitTestResult.cpp
@@ -145,7 +145,7 @@
n = n->parentOrShadowHostNode();
m_innerNode = n;
}
-
+
void HitTestResult::setInnerNonSharedNode(Node* n)
{
if (n && n->isPseudoElement())
@@ -153,9 +153,9 @@
m_innerNonSharedNode = n;
}
-void HitTestResult::setURLElement(Element* n)
-{
- m_innerURLElement = n;
+void HitTestResult::setURLElement(Element* n)
+{
+ m_innerURLElement = n;
}
void HitTestResult::setScrollbar(Scrollbar* s)
@@ -203,7 +203,7 @@
// currently supply strings, but maybe someday markers associated with misspelled words will also.
if (!m_innerNonSharedNode)
return String();
-
+
DocumentMarker* marker = m_innerNonSharedNode->document()->markers()->markerContainingPoint(m_hitTestLocation.point(), DocumentMarker::Grammar);
if (!marker)
return String();
@@ -242,12 +242,12 @@
{
if (!m_innerNonSharedNode)
return String();
-
+
if (m_innerNonSharedNode->hasTagName(imgTag)) {
HTMLImageElement* image = toHTMLImageElement(m_innerNonSharedNode.get());
return displayString(image->getAttribute(altAttr), m_innerNonSharedNode.get());
}
-
+
if (m_innerNonSharedNode->hasTagName(inputTag)) {
HTMLInputElement* input = toHTMLInputElement(m_innerNonSharedNode.get());
return displayString(input->alt(), m_innerNonSharedNode.get());
@@ -260,7 +260,7 @@
{
if (!m_innerNonSharedNode)
return 0;
-
+
RenderObject* renderer = m_innerNonSharedNode->renderer();
if (renderer && renderer->isImage()) {
RenderImage* image = static_cast<WebCore::RenderImage*>(renderer);
@@ -290,7 +290,7 @@
if (m_innerNonSharedNode->hasTagName(embedTag)
|| m_innerNonSharedNode->hasTagName(imgTag)
|| m_innerNonSharedNode->hasTagName(inputTag)
- || m_innerNonSharedNode->hasTagName(objectTag)
+ || m_innerNonSharedNode->hasTagName(objectTag)
|| m_innerNonSharedNode->hasTagName(SVGNames::imageTag)
) {
Element* element = toElement(m_innerNonSharedNode.get());
@@ -366,7 +366,7 @@
{
if (!m_innerURLElement)
return String();
-
+
return displayString(m_innerURLElement->title(), m_innerURLElement.get());
}
@@ -379,8 +379,8 @@
// FIXME: This function needs a better name and may belong in a different class. It's not
// really isContentEditable(); it's more like needsEditingContextMenu(). In many ways, this
-// function would make more sense in the ContextMenu class, except that WebElementDictionary
-// hooks into it. Anyway, we should architect this better.
+// function would make more sense in the ContextMenu class, except that WebElementDictionary
+// hooks into it. Anyway, we should architect this better.
bool HitTestResult::isContentEditable() const
{
if (!m_innerNonSharedNode)
diff --git a/Source/core/rendering/HitTestResult.h b/Source/core/rendering/HitTestResult.h
index 63347ca..c22efab 100644
--- a/Source/core/rendering/HitTestResult.h
+++ b/Source/core/rendering/HitTestResult.h
@@ -28,10 +28,10 @@
#include "core/platform/text/TextDirection.h"
#include "core/rendering/HitTestLocation.h"
#include "core/rendering/HitTestRequest.h"
-#include <wtf/Forward.h>
-#include <wtf/ListHashSet.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/RefPtr.h>
+#include "wtf/Forward.h"
+#include "wtf/ListHashSet.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/HitTestingTransformState.cpp b/Source/core/rendering/HitTestingTransformState.cpp
index 7a31128..c7c94a6 100644
--- a/Source/core/rendering/HitTestingTransformState.cpp
+++ b/Source/core/rendering/HitTestingTransformState.cpp
@@ -20,20 +20,20 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "core/rendering/HitTestingTransformState.h"
#include "core/platform/graphics/LayoutRect.h"
-#include <wtf/PassOwnPtr.h>
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
void HitTestingTransformState::translate(int x, int y, TransformAccumulation accumulate)
{
- m_accumulatedTransform.translate(x, y);
+ m_accumulatedTransform.translate(x, y);
if (accumulate == FlattenTransform)
flattenWithTransform(m_accumulatedTransform);
diff --git a/Source/core/rendering/HitTestingTransformState.h b/Source/core/rendering/HitTestingTransformState.h
index 6cb7ec5..bd81312 100644
--- a/Source/core/rendering/HitTestingTransformState.h
+++ b/Source/core/rendering/HitTestingTransformState.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef HitTestingTransformState_h
@@ -31,8 +31,8 @@
#include "core/platform/graphics/IntSize.h"
#include "core/platform/graphics/transforms/AffineTransform.h"
#include "core/platform/graphics/transforms/TransformationMatrix.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -76,7 +76,7 @@
, m_accumulatingTransform(false)
{
}
-
+
HitTestingTransformState(const HitTestingTransformState& other)
: RefCounted<HitTestingTransformState>()
, m_lastPlanarPoint(other.m_lastPlanarPoint)
@@ -86,7 +86,7 @@
, m_accumulatingTransform(other.m_accumulatingTransform)
{
}
-
+
void flattenWithTransform(const TransformationMatrix&);
};
diff --git a/Source/core/rendering/ImageQualityController.h b/Source/core/rendering/ImageQualityController.h
index 83e69df..c6487f1 100644
--- a/Source/core/rendering/ImageQualityController.h
+++ b/Source/core/rendering/ImageQualityController.h
@@ -37,7 +37,7 @@
#include "core/platform/graphics/IntSize.h"
#include "core/platform/graphics/LayoutSize.h"
#include "core/rendering/RenderObject.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
namespace WebCore {
diff --git a/Source/core/rendering/InlineBox.cpp b/Source/core/rendering/InlineBox.cpp
index 73d7305..a1bc0b9 100644
--- a/Source/core/rendering/InlineBox.cpp
+++ b/Source/core/rendering/InlineBox.cpp
@@ -63,7 +63,7 @@
#endif
void InlineBox::remove()
-{
+{
if (parent())
parent()->removeChild(this);
}
@@ -141,7 +141,7 @@
{
if (hasVirtualLogicalHeight())
return virtualLogicalHeight();
-
+
if (renderer()->isText())
return m_bitfields.isText() ? renderer()->style(isFirstLineStyle())->fontMetrics().height() : 0;
if (renderer()->isBox() && parent())
@@ -166,14 +166,14 @@
return boxModelObject()->lineHeight(m_bitfields.firstLine(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine);
}
-int InlineBox::caretMinOffset() const
-{
- return m_renderer->caretMinOffset();
+int InlineBox::caretMinOffset() const
+{
+ return m_renderer->caretMinOffset();
}
-int InlineBox::caretMaxOffset() const
-{
- return m_renderer->caretMaxOffset();
+int InlineBox::caretMaxOffset() const
+{
+ return m_renderer->caretMaxOffset();
}
void InlineBox::dirtyLineBoxes()
@@ -208,8 +208,8 @@
{
m_topLeft.move(dx, dy);
- if (m_renderer->isReplaced())
- toRenderBox(m_renderer)->move(dx, dy);
+ if (m_renderer->isReplaced())
+ toRenderBox(m_renderer)->move(dx, dy);
}
void InlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
@@ -220,7 +220,7 @@
LayoutPoint childPoint = paintOffset;
if (parent()->renderer()->style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
childPoint = renderer()->containingBlock()->flipForWritingModeForChild(toRenderBox(renderer()), childPoint);
-
+
// Paint all phases of replaced elements atomically, as though the replaced element established its
// own stacking context. (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
// specification.)
@@ -248,22 +248,22 @@
LayoutPoint childPoint = accumulatedOffset;
if (parent()->renderer()->style()->isFlippedBlocksWritingMode()) // Faster than calling containingBlock().
childPoint = renderer()->containingBlock()->flipForWritingModeForChild(toRenderBox(renderer()), childPoint);
-
+
return renderer()->hitTest(request, result, locationInContainer, childPoint);
}
const RootInlineBox* InlineBox::root() const
-{
+{
if (m_parent)
- return m_parent->root();
+ return m_parent->root();
ASSERT(isRootInlineBox());
return static_cast<const RootInlineBox*>(this);
}
RootInlineBox* InlineBox::root()
-{
+{
if (m_parent)
- return m_parent->root();
+ return m_parent->root();
ASSERT(isRootInlineBox());
return static_cast<RootInlineBox*>(this);
}
@@ -292,7 +292,7 @@
leaf = parent()->nextLeafChild();
return leaf;
}
-
+
InlineBox* InlineBox::prevLeafChild() const
{
InlineBox* leaf = 0;
@@ -329,7 +329,7 @@
// Non-replaced elements can always accommodate an ellipsis.
if (!m_renderer || !m_renderer->isReplaced())
return true;
-
+
IntRect boxRect(left(), 0, m_logicalWidth, 10);
IntRect ellipsisRect(ltr ? blockEdge - ellipsisWidth : blockEdge, 0, ellipsisWidth, 10);
return !(boxRect.intersects(ellipsisRect));
@@ -343,7 +343,7 @@
}
void InlineBox::clearKnownToHaveNoOverflow()
-{
+{
m_bitfields.setKnownToHaveNoOverflow(false);
if (parent() && parent()->knownToHaveNoOverflow())
parent()->clearKnownToHaveNoOverflow();
diff --git a/Source/core/rendering/InlineBox.h b/Source/core/rendering/InlineBox.h
index 0f9d0f7..b94346c 100644
--- a/Source/core/rendering/InlineBox.h
+++ b/Source/core/rendering/InlineBox.h
@@ -119,7 +119,7 @@
bool isText() const { return m_bitfields.isText(); }
void setIsText(bool isText) { m_bitfields.setIsText(isText); }
-
+
virtual bool isInlineFlowBox() const { return false; }
virtual bool isInlineTextBox() const { return false; }
virtual bool isRootInlineBox() const { return false; }
@@ -149,7 +149,7 @@
virtual void setConstructed() { m_bitfields.setConstructed(true); }
void setExtracted(bool extracted = true) { m_bitfields.setExtracted(extracted); }
-
+
void setFirstLineStyleBit(bool firstLine) { m_bitfields.setFirstLine(firstLine); }
bool isFirstLineStyle() const { return m_bitfields.firstLine(); }
@@ -170,7 +170,7 @@
bool nextOnLineExists() const;
virtual bool isLeaf() const { return true; }
-
+
InlineBox* nextLeafChild() const;
InlineBox* prevLeafChild() const;
@@ -264,7 +264,7 @@
virtual void markDirty(bool dirty = true) { m_bitfields.setDirty(dirty); }
virtual void dirtyLineBoxes();
-
+
virtual RenderObject::SelectionState selectionState();
virtual bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidth) const;
@@ -278,12 +278,12 @@
int expansion() const { return m_bitfields.expansion(); }
bool visibleToHitTestRequest(const HitTestRequest& request) const { return renderer()->visibleToHitTestRequest(request); }
-
+
EVerticalAlign verticalAlign() const { return renderer()->style(m_bitfields.firstLine())->verticalAlign(); }
// Use with caution! The type is not checked!
RenderBoxModelObject* boxModelObject() const
- {
+ {
if (!m_renderer->isText())
return toRenderBoxModelObject(m_renderer);
return 0;
@@ -332,7 +332,7 @@
, m_isHorizontal(isHorizontal)
, m_endsWithBreak(false)
, m_hasSelectedChildrenOrCanHaveLeadingExpansion(false)
- , m_knownToHaveNoOverflow(true)
+ , m_knownToHaveNoOverflow(true)
, m_hasEllipsisBoxOrHyphen(false)
, m_dirOverride(false)
, m_isText(false)
@@ -377,14 +377,14 @@
private:
mutable unsigned m_nextOnLineExists : 1;
-
+
public:
bool nextOnLineExists() const { return m_nextOnLineExists; }
void setNextOnLineExists(bool nextOnLineExists) const { m_nextOnLineExists = nextOnLineExists; }
private:
signed m_expansion : 12; // for justified text
-
+
public:
signed expansion() const { return m_expansion; }
void setExpansion(signed expansion) { m_expansion = expansion; }
@@ -405,12 +405,12 @@
// For InlineTextBox
bool hasHyphen() const { return m_bitfields.hasEllipsisBoxOrHyphen(); }
- void setHasHyphen(bool hasHyphen) { m_bitfields.setHasEllipsisBoxOrHyphen(hasHyphen); }
+ void setHasHyphen(bool hasHyphen) { m_bitfields.setHasEllipsisBoxOrHyphen(hasHyphen); }
bool canHaveLeadingExpansion() const { return m_bitfields.hasSelectedChildrenOrCanHaveLeadingExpansion(); }
void setCanHaveLeadingExpansion(bool canHaveLeadingExpansion) { m_bitfields.setHasSelectedChildrenOrCanHaveLeadingExpansion(canHaveLeadingExpansion); }
signed expansion() { return m_bitfields.expansion(); }
void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); }
-
+
// For InlineFlowBox and InlineTextBox
bool extracted() const { return m_bitfields.extracted(); }
diff --git a/Source/core/rendering/InlineFlowBox.cpp b/Source/core/rendering/InlineFlowBox.cpp
index cb1134e..8fc9a48 100644
--- a/Source/core/rendering/InlineFlowBox.cpp
+++ b/Source/core/rendering/InlineFlowBox.cpp
@@ -75,10 +75,10 @@
// Begin by snapping the x and y coordinates to the nearest pixel.
int snappedX = lroundf(x());
int snappedY = lroundf(y());
-
+
int snappedMaxX = lroundf(x() + width());
int snappedMaxY = lroundf(y() + height());
-
+
return IntRect(snappedX, snappedY, snappedMaxX - snappedX, snappedMaxY - snappedY);
}
@@ -90,7 +90,7 @@
}
}
-void InlineFlowBox::addToLine(InlineBox* child)
+void InlineFlowBox::addToLine(InlineBox* child)
{
ASSERT(!child->parent());
ASSERT(!child->nextOnLine());
@@ -167,7 +167,7 @@
|| (child->renderer()->isListMarker() && !toRenderListMarker(child->renderer())->isInside())
|| child->renderer()->style(isFirstLineStyle())->hasBorderImageOutsets()))
child->clearKnownToHaveNoOverflow();
-
+
if (knownToHaveNoOverflow() && child->isInlineFlowBox() && !toInlineFlowBox(child)->knownToHaveNoOverflow())
clearKnownToHaveNoOverflow();
}
@@ -192,7 +192,7 @@
child->nextOnLine()->setPrevOnLine(child->prevOnLine());
if (child->prevOnLine())
child->prevOnLine()->setNextOnLine(child->nextOnLine());
-
+
child->setParent(0);
checkConsistency();
@@ -269,7 +269,7 @@
{
if (!child)
return false;
-
+
if (child == ancestor)
return true;
@@ -280,7 +280,7 @@
return false;
if (parent == ancestor)
return true;
-
+
curr = parent;
parent = curr->parent();
}
@@ -416,7 +416,7 @@
// Just get all the physical margin and overflow values by hand based off |isVertical|.
LayoutUnit logicalLeftMargin = isHorizontal() ? curr->boxModelObject()->marginLeft() : curr->boxModelObject()->marginTop();
LayoutUnit logicalRightMargin = isHorizontal() ? curr->boxModelObject()->marginRight() : curr->boxModelObject()->marginBottom();
-
+
logicalLeft += logicalLeftMargin;
curr->setLogicalLeft(logicalLeft);
if (knownToHaveNoOverflow())
@@ -437,7 +437,7 @@
{
if (isHorizontal())
return false;
-
+
if (renderer()->style(isFirstLineStyle())->fontDescription().nonCJKGlyphOrientation() == NonCJKGlyphOrientationUpright
|| renderer()->style(isFirstLineStyle())->font().primaryFont()->hasVerticalGlyphs())
return true;
@@ -445,14 +445,14 @@
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer()->isOutOfFlowPositioned())
continue; // Positioned placeholders don't affect calculations.
-
+
if (curr->isInlineFlowBox()) {
if (toInlineFlowBox(curr)->requiresIdeographicBaseline(textBoxDataMap))
return true;
} else {
if (curr->renderer()->style(isFirstLineStyle())->font().primaryFont()->hasVerticalGlyphs())
return true;
-
+
const Vector<const SimpleFontData*>* usedFonts = 0;
if (curr->isInlineTextBox()) {
GlyphOverflowAndFallbackFontsMap::const_iterator it = textBoxDataMap.find(toInlineTextBox(curr));
@@ -467,7 +467,7 @@
}
}
}
-
+
return false;
}
@@ -521,7 +521,7 @@
bool affectsAscent = false;
bool affectsDescent = false;
bool checkChildren = !descendantsHaveSameLineHeightAndBaseline();
-
+
if (isRootInlineBox()) {
// Examine our root box.
int ascent = 0;
@@ -545,17 +545,17 @@
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer()->isOutOfFlowPositioned())
continue; // Positioned placeholders don't affect calculations.
-
+
InlineFlowBox* inlineFlowBox = curr->isInlineFlowBox() ? toInlineFlowBox(curr) : 0;
-
+
bool affectsAscent = false;
bool affectsDescent = false;
-
+
// The verticalPositionForBox function returns the distance between the child box's baseline
// and the root box's baseline. The value is negative if the child box's baseline is above the
// root box's baseline, and it is positive if the child box's baseline is below the root box's baseline.
curr->setLogicalTop(rootBox->verticalPositionForBox(curr, verticalPositionCache));
-
+
int ascent = 0;
int descent = 0;
rootBox->ascentAndDescentForBox(curr, textBoxDataMap, ascent, descent, affectsAscent, affectsDescent);
@@ -635,18 +635,18 @@
LayoutUnit posAdjust = maxAscent - curr->baselinePosition(baselineType);
curr->setLogicalTop(curr->logicalTop() + top + posAdjust);
}
-
+
LayoutUnit newLogicalTop = curr->logicalTop();
LayoutUnit newLogicalTopIncludingMargins = newLogicalTop;
LayoutUnit boxHeight = curr->logicalHeight();
LayoutUnit boxHeightIncludingMargins = boxHeight;
-
+
if (curr->isText() || curr->isInlineFlowBox()) {
const FontMetrics& fontMetrics = curr->renderer()->style(isFirstLineStyle())->fontMetrics();
newLogicalTop += curr->baselinePosition(baselineType) - fontMetrics.ascent(baselineType);
if (curr->isInlineFlowBox()) {
RenderBoxModelObject* boxObject = toRenderBoxModelObject(curr->renderer());
- newLogicalTop -= boxObject->style(isFirstLineStyle())->isHorizontalWritingMode() ? boxObject->borderTop() + boxObject->paddingTop() :
+ newLogicalTop -= boxObject->style(isFirstLineStyle())->isHorizontalWritingMode() ? boxObject->borderTop() + boxObject->paddingTop() :
boxObject->borderRight() + boxObject->paddingRight();
}
newLogicalTopIncludingMargins = newLogicalTop;
@@ -722,7 +722,7 @@
lineBottom = max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom());
lineBottomIncludingMargins = max(lineBottom, lineBottomIncludingMargins);
}
-
+
if (renderer()->style()->isFlippedLinesWritingMode())
flipLinesInBlockDirection(lineTopIncludingMargins, lineBottomIncludingMargins);
}
@@ -751,11 +751,11 @@
{
// Flip the box on the line such that the top is now relative to the lineBottom instead of the lineTop.
setLogicalTop(lineBottom - (logicalTop() - lineTop) - logicalHeight());
-
+
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer()->isOutOfFlowPositioned())
continue; // Positioned placeholders aren't affected here.
-
+
if (curr->isInlineFlowBox())
toInlineFlowBox(curr)->flipLinesInBlockDirection(lineTop, lineBottom);
else
@@ -776,22 +776,22 @@
LayoutUnit boxShadowLogicalTop;
LayoutUnit boxShadowLogicalBottom;
style->getBoxShadowBlockDirectionExtent(boxShadowLogicalTop, boxShadowLogicalBottom);
-
+
// Similar to how glyph overflow works, if our lines are flipped, then it's actually the opposite shadow that applies, since
// the line is "upside down" in terms of block coordinates.
LayoutUnit shadowLogicalTop = style->isFlippedLinesWritingMode() ? -boxShadowLogicalBottom : boxShadowLogicalTop;
LayoutUnit shadowLogicalBottom = style->isFlippedLinesWritingMode() ? -boxShadowLogicalTop : boxShadowLogicalBottom;
-
+
LayoutUnit logicalTopVisualOverflow = min(pixelSnappedLogicalTop() + shadowLogicalTop, logicalVisualOverflow.y());
LayoutUnit logicalBottomVisualOverflow = max(pixelSnappedLogicalBottom() + shadowLogicalBottom, logicalVisualOverflow.maxY());
-
+
LayoutUnit boxShadowLogicalLeft;
LayoutUnit boxShadowLogicalRight;
style->getBoxShadowInlineDirectionExtent(boxShadowLogicalLeft, boxShadowLogicalRight);
LayoutUnit logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() + boxShadowLogicalLeft, logicalVisualOverflow.x());
LayoutUnit logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + boxShadowLogicalRight, logicalVisualOverflow.maxX());
-
+
logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
}
@@ -801,7 +801,7 @@
// border-image-outset on root line boxes is applying to the block and not to the lines.
if (!parent())
return;
-
+
RenderStyle* style = renderer()->style(isFirstLineStyle());
if (!style->hasBorderImageOutsets())
return;
@@ -826,7 +826,7 @@
LayoutUnit logicalLeftVisualOverflow = min(pixelSnappedLogicalLeft() - outsetLogicalLeft, logicalVisualOverflow.x());
LayoutUnit logicalRightVisualOverflow = max(pixelSnappedLogicalRight() + outsetLogicalRight, logicalVisualOverflow.maxX());
-
+
logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
}
@@ -837,7 +837,7 @@
return;
RenderStyle* style = textBox->renderer()->style(isFirstLineStyle());
-
+
GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.find(textBox);
GlyphOverflow* glyphOverflow = it == textBoxDataMap.end() ? 0 : &it->value.second;
bool isFlippedLine = style->isFlippedLinesWritingMode();
@@ -869,14 +869,14 @@
LayoutUnit textShadowLogicalTop;
LayoutUnit textShadowLogicalBottom;
style->getTextShadowBlockDirectionExtent(textShadowLogicalTop, textShadowLogicalBottom);
-
+
LayoutUnit childOverflowLogicalTop = min<LayoutUnit>(textShadowLogicalTop + topGlyphOverflow, topGlyphOverflow);
LayoutUnit childOverflowLogicalBottom = max<LayoutUnit>(textShadowLogicalBottom + bottomGlyphOverflow, bottomGlyphOverflow);
-
+
LayoutUnit textShadowLogicalLeft;
LayoutUnit textShadowLogicalRight;
style->getTextShadowInlineDirectionExtent(textShadowLogicalLeft, textShadowLogicalRight);
-
+
LayoutUnit childOverflowLogicalLeft = min<LayoutUnit>(textShadowLogicalLeft + leftGlyphOverflow, leftGlyphOverflow);
LayoutUnit childOverflowLogicalRight = max<LayoutUnit>(textShadowLogicalRight + rightGlyphOverflow, rightGlyphOverflow);
@@ -884,17 +884,17 @@
LayoutUnit logicalBottomVisualOverflow = max(textBox->pixelSnappedLogicalBottom() + childOverflowLogicalBottom, logicalVisualOverflow.maxY());
LayoutUnit logicalLeftVisualOverflow = min(textBox->pixelSnappedLogicalLeft() + childOverflowLogicalLeft, logicalVisualOverflow.x());
LayoutUnit logicalRightVisualOverflow = max(textBox->pixelSnappedLogicalRight() + childOverflowLogicalRight, logicalVisualOverflow.maxX());
-
+
logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
-
+
textBox->setLogicalOverflowRect(logicalVisualOverflow);
}
inline void InlineFlowBox::addReplacedChildOverflow(const InlineBox* inlineBox, LayoutRect& logicalLayoutOverflow, LayoutRect& logicalVisualOverflow)
{
RenderBox* box = toRenderBox(inlineBox->renderer());
-
+
// Visual overflow only propagates if the box doesn't have a self-painting layer. This rectangle does not include
// transforms or relative positioning (since those objects always have self-painting layers), but it does need to be adjusted
// for writing-mode differences.
@@ -923,14 +923,14 @@
// transforms, relative positioning, etc.
LayoutRect logicalLayoutOverflow(enclosingLayoutRect(logicalFrameRectIncludingLineHeight(lineTop, lineBottom)));
LayoutRect logicalVisualOverflow(logicalLayoutOverflow);
-
+
addBoxShadowVisualOverflow(logicalVisualOverflow);
addBorderOutsetVisualOverflow(logicalVisualOverflow);
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer()->isOutOfFlowPositioned())
continue; // Positioned placeholders don't affect calculations.
-
+
if (curr->renderer()->isText()) {
InlineTextBox* text = toInlineTextBox(curr);
RenderText* rt = toRenderText(text->renderer());
@@ -950,7 +950,7 @@
} else
addReplacedChildOverflow(curr, logicalLayoutOverflow, logicalVisualOverflow);
}
-
+
setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, lineTop, lineBottom);
}
@@ -962,7 +962,7 @@
if (!m_overflow)
m_overflow = adoptPtr(new RenderOverflow(frameBox, frameBox));
-
+
m_overflow->setLayoutOverflow(rect);
}
@@ -971,10 +971,10 @@
LayoutRect frameBox = enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
if (frameBox.contains(rect) || rect.isEmpty())
return;
-
+
if (!m_overflow)
m_overflow = adoptPtr(new RenderOverflow(frameBox, frameBox));
-
+
m_overflow->setVisualOverflow(rect);
}
@@ -982,7 +982,7 @@
{
LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLayoutOverflow.transposedRect());
setLayoutOverflow(layoutOverflow, lineTop, lineBottom);
-
+
LayoutRect visualOverflow(isHorizontal() ? logicalVisualOverflow : logicalVisualOverflow.transposedRect());
setVisualOverflow(visualOverflow, lineTop, lineBottom);
}
@@ -1070,7 +1070,7 @@
overflowRect.inflate(renderer()->maximalOutlineSize(paintInfo.phase));
flipForWritingMode(overflowRect);
overflowRect.moveBy(paintOffset);
-
+
if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect)))
return;
@@ -1083,7 +1083,7 @@
RenderBlock* cb = 0;
bool containingBlockPaintsContinuationOutline = inlineFlow->continuation() || inlineFlow->isInlineElementContinuation();
- if (containingBlockPaintsContinuationOutline) {
+ if (containingBlockPaintsContinuationOutline) {
// FIXME: See https://bugs.webkit.org/show_bug.cgi?id=54690. We currently don't reconnect inline continuations
// after a child removal. As a result, those merged inlines do not get seperated and hence not get enclosed by
// anonymous blocks. In this case, it is better to bail out and paint it ourself.
@@ -1124,7 +1124,7 @@
PaintInfo childInfo(paintInfo);
childInfo.phase = paintPhase;
childInfo.updatePaintingRootForChildren(renderer());
-
+
// Paint our children.
if (paintPhase != PaintPhaseSelfOutline) {
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
@@ -1261,14 +1261,14 @@
LayoutRect frameRect = roundedFrameRect();
constrainToLineTopAndBottomIfNeeded(frameRect);
-
+
// Move x/y to our coordinates.
LayoutRect localRect(frameRect);
flipForWritingMode(localRect);
LayoutPoint adjustedPaintoffset = paintOffset + localRect.location();
-
+
GraphicsContext* context = paintInfo.context;
-
+
// You can use p::first-line to specify a background. If so, the root line boxes for
// a line may actually have to paint a background.
RenderStyle* styleToUse = renderer()->style(isFirstLineStyle());
@@ -1333,7 +1333,7 @@
LayoutRect frameRect = roundedFrameRect();
constrainToLineTopAndBottomIfNeeded(frameRect);
-
+
// Move x/y to our coordinates.
LayoutRect localRect(frameRect);
flipForWritingMode(localRect);
@@ -1350,7 +1350,7 @@
if (!compositedMask || flattenCompositingLayers) {
if ((maskBoxImage && renderer()->style()->maskLayers()->hasImage()) || renderer()->style()->maskLayers()->next())
pushTransparencyLayer = true;
-
+
compositeOp = CompositeDestinationIn;
if (pushTransparencyLayer) {
paintInfo.context->setCompositeOperation(CompositeDestinationIn);
@@ -1361,7 +1361,7 @@
LayoutRect paintRect = LayoutRect(adjustedPaintOffset, frameRect.size());
paintFillLayers(paintInfo, Color(), renderer()->style()->maskLayers(), paintRect, compositeOp);
-
+
bool hasBoxImage = maskBoxImage && maskBoxImage->canRender(renderer(), renderer()->style()->effectiveZoom());
if (!hasBoxImage || !maskBoxImage->isLoaded()) {
if (pushTransparencyLayer)
@@ -1392,7 +1392,7 @@
paintInfo.context->clip(clipRect);
boxModelObject()->paintNinePieceImage(paintInfo.context, LayoutRect(stripX, stripY, stripWidth, stripHeight), renderer()->style(), maskNinePieceImage, compositeOp);
}
-
+
if (pushTransparencyLayer)
paintInfo.context->endTransparencyLayer();
}
@@ -1469,16 +1469,16 @@
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer()->isOutOfFlowPositioned())
continue; // Positioned placeholders don't affect calculations.
-
+
if (curr->isInlineFlowBox())
result = max(result, toInlineFlowBox(curr)->computeOverAnnotationAdjustment(allowedPosition));
-
+
if (curr->renderer()->isReplaced() && curr->renderer()->isRubyRun() && curr->renderer()->style()->rubyPosition() == RubyPositionBefore) {
RenderRubyRun* rubyRun = toRenderRubyRun(curr->renderer());
RenderRubyText* rubyText = rubyRun->rubyText();
if (!rubyText)
continue;
-
+
if (!rubyRun->style()->isFlippedLinesWritingMode()) {
LayoutUnit topOfFirstRubyTextLine = rubyText->logicalTop() + (rubyText->firstRootBox() ? rubyText->firstRootBox()->lineTop() : LayoutUnit());
if (topOfFirstRubyTextLine >= 0)
@@ -1606,7 +1606,7 @@
(*customReverseImplementation)(userData, first, last);
} else
std::reverse(first, last);
- }
+ }
++minLevel;
}
}
diff --git a/Source/core/rendering/InlineFlowBox.h b/Source/core/rendering/InlineFlowBox.h
index a858edc..8128326 100644
--- a/Source/core/rendering/InlineFlowBox.h
+++ b/Source/core/rendering/InlineFlowBox.h
@@ -67,7 +67,7 @@
#ifndef NDEBUG
virtual ~InlineFlowBox();
-
+
virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, const InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const;
virtual const char* boxName() const;
#endif
@@ -81,7 +81,7 @@
InlineBox* lastChild() const { checkConsistency(); return m_lastChild; }
virtual bool isLeaf() const OVERRIDE FINAL { return false; }
-
+
InlineBox* firstLeafChild() const;
InlineBox* lastLeafChild() const;
@@ -108,7 +108,7 @@
virtual void clearTruncation() OVERRIDE;
IntRect roundedFrameRect() const;
-
+
void paintBoxDecorations(PaintInfo&, const LayoutPoint&);
void paintMask(PaintInfo&, const LayoutPoint&);
void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, CompositeOperator = CompositeSourceOver);
@@ -196,7 +196,7 @@
LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) const;
void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflowAndFallbackFontsMap&);
-
+
void removeChild(InlineBox* child);
virtual RenderObject::SelectionState selectionState();
@@ -208,7 +208,7 @@
bool hasTextDescendants() const { return m_hasTextDescendants; }
void setHasTextChildren() { m_hasTextChildren = true; setHasTextDescendants(); }
void setHasTextDescendants() { m_hasTextDescendants = true; }
-
+
void checkConsistency() const;
void setHasBadChildList();
@@ -216,7 +216,7 @@
// For horizontal-tb and vertical-lr they will match physical directions, but for horizontal-bt and vertical-rl, the top/bottom and left/right
// respectively are flipped when compared to their physical counterparts. For example minX is on the left in vertical-lr, but it is on the right in vertical-rl.
LayoutRect layoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
- {
+ {
return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
}
LayoutUnit logicalLeftLayoutOverflow() const
@@ -250,7 +250,7 @@
}
LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
- {
+ {
return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
}
LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect().y()) : static_cast<LayoutUnit>(logicalLeft()); }
@@ -285,15 +285,15 @@
return FloatRect(m_topLeft.x(), lineTop, width(), lineBottom - lineTop);
return FloatRect(lineTop, m_topLeft.y(), lineBottom - lineTop, height());
}
-
+
FloatRect logicalFrameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
return FloatRect(logicalLeft(), lineTop, logicalWidth(), lineBottom - lineTop);
}
-
+
bool descendantsHaveSameLineHeightAndBaseline() const { return m_descendantsHaveSameLineHeightAndBaseline; }
void clearDescendantsHaveSameLineHeightAndBaseline()
- {
+ {
m_descendantsHaveSameLineHeightAndBaseline = false;
if (parent() && parent()->descendantsHaveSameLineHeightAndBaseline())
parent()->clearDescendantsHaveSameLineHeightAndBaseline();
@@ -313,7 +313,7 @@
InlineBox* m_firstChild;
InlineBox* m_lastChild;
-
+
InlineFlowBox* m_prevLineBox; // The previous box that also uses our RenderObject
InlineFlowBox* m_nextLineBox; // The next box that also uses our RenderObject
diff --git a/Source/core/rendering/InlineIterator.h b/Source/core/rendering/InlineIterator.h
index 17e2193..6750b85 100644
--- a/Source/core/rendering/InlineIterator.h
+++ b/Source/core/rendering/InlineIterator.h
@@ -26,7 +26,7 @@
#include "core/rendering/BidiRun.h"
#include "core/rendering/RenderBlock.h"
#include "core/rendering/RenderText.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
namespace WebCore {
@@ -78,7 +78,7 @@
return m_obj && m_obj->preservesNewline() && m_obj->isText() && toRenderText(m_obj)->textLength()
&& !toRenderText(m_obj)->isWordBreak() && toRenderText(m_obj)->characterAt(m_pos) == '\n';
}
-
+
inline bool atParagraphSeparator()
{
return (m_obj && m_obj->isBR()) || atTextParagraphSeparator();
@@ -287,7 +287,7 @@
// Never skip empty inlines.
if (resolver)
resolver->commitExplicitEmbedding();
- return o;
+ return o;
}
}
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
index 64045a8..3a22c0f 100644
--- a/Source/core/rendering/InlineTextBox.cpp
+++ b/Source/core/rendering/InlineTextBox.cpp
@@ -200,7 +200,7 @@
{
int sPos = max(startPos - m_start, 0);
int ePos = min(endPos - m_start, (int)m_len);
-
+
if (sPos > ePos)
return LayoutRect();
@@ -256,7 +256,7 @@
{
if (!extracted())
return;
-
+
toRenderText(renderer())->attachTextBox(this);
}
@@ -269,7 +269,7 @@
// For LTR this is the left edge of the box, for RTL, the right edge in parent coordinates.
float ellipsisX = flowIsLTR ? visibleRightEdge - ellipsisWidth : visibleLeftEdge + ellipsisWidth;
-
+
// Criteria for full truncation:
// LTR: the left edge of the ellipsis is to the left of our text run.
// RTL: the right edge of the ellipsis is to the right of our text run.
@@ -328,24 +328,24 @@
return -1;
}
-Color correctedTextColor(Color textColor, Color backgroundColor)
+Color correctedTextColor(Color textColor, Color backgroundColor)
{
// Adjust the text color if it is too close to the background color,
// by darkening or lightening it to move it further away.
-
+
int d = differenceSquared(textColor, backgroundColor);
- // semi-arbitrarily chose 65025 (255^2) value here after a few tests;
+ // semi-arbitrarily chose 65025 (255^2) value here after a few tests;
if (d > 65025) {
return textColor;
}
-
+
int distanceFromWhite = differenceSquared(textColor, Color::white);
int distanceFromBlack = differenceSquared(textColor, Color::black);
if (distanceFromWhite < distanceFromBlack) {
return textColor.dark();
}
-
+
return textColor.light();
}
@@ -492,17 +492,17 @@
LayoutUnit logicalRightSide = logicalRightVisualOverflow();
LayoutUnit logicalStart = logicalLeftSide + (isHorizontal() ? paintOffset.x() : paintOffset.y());
LayoutUnit logicalExtent = logicalRightSide - logicalLeftSide;
-
+
LayoutUnit paintEnd = isHorizontal() ? paintInfo.rect.maxX() : paintInfo.rect.maxY();
LayoutUnit paintStart = isHorizontal() ? paintInfo.rect.x() : paintInfo.rect.y();
-
+
LayoutPoint adjustedPaintOffset = roundedIntPoint(paintOffset);
-
+
if (logicalStart >= paintEnd || logicalStart + logicalExtent <= paintStart)
return;
bool isPrinting = textRenderer()->document()->printing();
-
+
// Determine whether or not we're selected.
bool haveSelection = !isPrinting && paintInfo.phase != PaintPhaseTextClip && selectionState() != RenderObject::SelectionNone;
if (!haveSelection && paintInfo.phase == PaintPhaseSelection)
@@ -531,7 +531,7 @@
RenderObject* rendererToUse = renderer();
RenderStyle* styleToUse = rendererToUse->style(isFirstLineStyle());
-
+
adjustedPaintOffset.move(0, styleToUse->isHorizontalWritingMode() ? 0 : -logicalHeight());
FloatPoint boxOrigin = locationIncludingFlipping();
@@ -563,7 +563,7 @@
emphasisMarkColor = Color::black;
} else {
textFillColor = rendererToUse->resolveColor(styleToUse, CSSPropertyWebkitTextFillColor);
-
+
bool forceBackgroundToWhite = false;
if (isPrinting) {
if (styleToUse->printColorAdjust() == PrintColorAdjustEconomy)
@@ -577,13 +577,13 @@
textFillColor = correctedTextColor(textFillColor, Color::white);
textStrokeColor = rendererToUse->resolveColor(styleToUse, CSSPropertyWebkitTextStrokeColor);
-
+
// Make the text stroke color legible against a white background
if (forceBackgroundToWhite)
textStrokeColor = correctedTextColor(textStrokeColor, Color::white);
emphasisMarkColor = rendererToUse->resolveColor(styleToUse, CSSPropertyWebkitTextEmphasisColor);
-
+
// Make the text stroke color legible against a white background
if (forceBackgroundToWhite)
emphasisMarkColor = correctedTextColor(emphasisMarkColor, Color::white);
@@ -788,10 +788,10 @@
if (underline.endOffset <= start())
// underline is completely before this run. This might be an underline that sits
- // before the first run we draw, or underlines that were within runs we skipped
+ // before the first run we draw, or underlines that were within runs we skipped
// due to truncation.
continue;
-
+
if (underline.startOffset <= end()) {
// underline intersects this run. Paint it.
paintCompositionUnderline(context, boxOrigin, underline);
@@ -804,7 +804,7 @@
}
}
}
-
+
if (shouldRotate)
context->concatCTM(rotation(boxRect, Counterclockwise));
}
@@ -1098,13 +1098,13 @@
if (!isLeftToRightDirection())
localOrigin.move(m_logicalWidth - width, 0);
}
-
+
// Get the text decoration colors.
Color underline, overline, linethrough;
renderer()->getTextDecorationColors(deco, underline, overline, linethrough, true);
if (isFirstLineStyle())
renderer()->getTextDecorationColors(deco, underline, overline, linethrough, true, true);
-
+
// Use a special function for underlines to get the positioning exactly right.
bool isPrinting = textRenderer()->document()->printing();
context->setStrokeThickness(textDecorationThickness);
@@ -1241,7 +1241,7 @@
if (!markerSpansWholeBox || grammar) {
int startPosition = max<int>(marker->startOffset() - m_start, 0);
int endPosition = min<int>(marker->endOffset() - m_start, m_len);
-
+
if (m_truncation != cNoTruncation)
endPosition = min<int>(endPosition, m_truncation);
@@ -1255,7 +1255,7 @@
IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, startPoint, selHeight, startPosition, endPosition));
start = markerRect.x() - startPoint.x();
width = markerRect.width();
-
+
// Store rendered rects for bad grammar markers, so we can hit-test against it elsewhere in order to
// display a toolTip. We don't do this for misspelling markers.
if (grammar) {
@@ -1264,7 +1264,7 @@
toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
}
}
-
+
// IMPORTANT: The misspelling underline is not considered when calculating the text bounds, so we have to
// make sure to fit within those bounds. This means the top pixel(s) of the underline will overlap the
// bottom pixel(s) of the glyphs in smaller font sizes. The alternatives are to increase the line spacing (bad!!)
@@ -1325,7 +1325,7 @@
// Note end() points at the last char, not one past it like endOffset and ranges do.
for ( ; markerIt != markers.end(); markerIt++) {
DocumentMarker* marker = *markerIt;
-
+
// Paint either the background markers or the foreground markers, but not both
switch (marker->type()) {
case DocumentMarker::Grammar:
@@ -1345,11 +1345,11 @@
// marker is completely before this run. This might be a marker that sits before the
// first run we draw, or markers that were within runs we skipped due to truncation.
continue;
-
+
if (marker->startOffset() > end())
// marker is completely after this run, bail. A later run will paint it.
break;
-
+
// marker intersects this run. Paint it.
switch (marker->type()) {
case DocumentMarker::Spelling:
@@ -1372,7 +1372,7 @@
{
if (m_truncation == cFullTruncation)
return;
-
+
float start = 0; // start of line to draw, relative to tx
float width = m_logicalWidth; // how much line to draw
bool useWholeWidth = true;
diff --git a/Source/core/rendering/InlineTextBox.h b/Source/core/rendering/InlineTextBox.h
index cdfa3b0..2647d65 100644
--- a/Source/core/rendering/InlineTextBox.h
+++ b/Source/core/rendering/InlineTextBox.h
@@ -26,7 +26,7 @@
#include "core/platform/graphics/TextRun.h"
#include "core/rendering/InlineBox.h"
#include "core/rendering/RenderText.h" // so textRenderer() can be inline
-#include <wtf/text/StringBuilder.h>
+#include "wtf/text/StringBuilder.h"
namespace WebCore {
diff --git a/Source/core/rendering/LayoutState.cpp b/Source/core/rendering/LayoutState.cpp
index e89cd1b..fe30cda 100644
--- a/Source/core/rendering/LayoutState.cpp
+++ b/Source/core/rendering/LayoutState.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -94,13 +94,13 @@
m_pageLogicalHeight = m_next->m_pageLogicalHeight;
m_pageLogicalHeightChanged = m_next->m_pageLogicalHeightChanged;
m_pageOffset = m_next->m_pageOffset;
-
+
// Disable pagination for objects we don't support. For now this includes overflow:scroll/auto, inline blocks and
// writing mode roots.
if (renderer->isUnsplittableForPagination())
m_pageLogicalHeight = 0;
}
-
+
// Propagate line grid information.
propagateLineGridInfo(renderer);
@@ -119,7 +119,7 @@
m_layoutDeltaXSaturated = m_next->m_layoutDeltaXSaturated;
m_layoutDeltaYSaturated = m_next->m_layoutDeltaYSaturated;
#endif
-
+
m_isPaginated = m_pageLogicalHeight || m_columnInfo || renderer->isRenderFlowThread();
if (lineGrid() && renderer->hasColumns() && renderer->style()->hasInlineColumnAxis())
@@ -139,7 +139,7 @@
#if !ASSERT_DISABLED
, m_layoutDeltaXSaturated(false)
, m_layoutDeltaYSaturated(false)
-#endif
+#endif
, m_columnInfo(0)
, m_lineGrid(0)
, m_next(0)
@@ -241,10 +241,10 @@
}
}
}
-
+
// We didn't find an already-established grid with this identifier. Our render object establishes the grid.
m_lineGrid = block;
- m_lineGridOffset = m_layoutOffset;
+ m_lineGridOffset = m_layoutOffset;
}
void LayoutState::computeLineGridPaginationOrigin(RenderBox* renderer)
@@ -259,7 +259,7 @@
RootInlineBox* lineGridBox = lineGrid()->lineGridBox();
if (!lineGridBox)
return;
-
+
bool isHorizontalWritingMode = lineGrid()->isHorizontalWritingMode();
LayoutUnit lineGridBlockOffset = isHorizontalWritingMode ? lineGridOffset().height() : lineGridOffset().width();
@@ -273,7 +273,7 @@
return;
LayoutUnit firstLineTopWithLeading = lineGridBlockOffset + lineGridBox->lineTopWithLeading();
-
+
if (isPaginated() && pageLogicalHeight()) {
LayoutUnit pageLogicalTop = renderer->isHorizontalWritingMode() ? m_pageOffset.height() : m_pageOffset.width();
if (pageLogicalTop > firstLineTopWithLeading) {
diff --git a/Source/core/rendering/LayoutState.h b/Source/core/rendering/LayoutState.h
index eac3822..058aa43 100644
--- a/Source/core/rendering/LayoutState.h
+++ b/Source/core/rendering/LayoutState.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LayoutState_h
@@ -28,8 +28,8 @@
#include "core/platform/graphics/LayoutRect.h"
#include "core/rendering/ColumnInfo.h"
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
+#include "wtf/HashMap.h"
+#include "wtf/Noncopyable.h"
namespace WebCore {
@@ -76,13 +76,13 @@
void clearPaginationInformation();
bool isPaginatingColumns() const { return m_columnInfo && m_columnInfo->paginationUnit() == ColumnInfo::Column; }
bool isPaginated() const { return m_isPaginated; }
-
+
// The page logical offset is the object's offset from the top of the page in the page progression
// direction (so an x-offset in vertical text and a y-offset for horizontal text).
LayoutUnit pageLogicalOffset(RenderBox*, LayoutUnit childLogicalOffset) const;
void addForcedColumnBreak(RenderBox*, LayoutUnit childLogicalOffset);
-
+
LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; }
bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
@@ -124,14 +124,14 @@
// FIXME: Distinguish between the layout clip rect and the paint clip rect which may be larger,
// e.g., because of composited scrolling.
LayoutRect m_clipRect;
-
+
// x/y offset from container. Includes relative positioning and scroll offsets.
LayoutSize m_paintOffset;
// x/y offset from container. Does not include relative positioning or scroll offsets.
LayoutSize m_layoutOffset;
// Transient offset from the final position of the object
// used to ensure that repaints happen in the correct place.
- // This is a total delta accumulated from the root.
+ // This is a total delta accumulated from the root.
LayoutSize m_layoutDelta;
// The current page height for the pagination model that encloses us.
diff --git a/Source/core/rendering/OverlapTestRequestClient.h b/Source/core/rendering/OverlapTestRequestClient.h
index 71400ab..1dbb821 100644
--- a/Source/core/rendering/OverlapTestRequestClient.h
+++ b/Source/core/rendering/OverlapTestRequestClient.h
@@ -20,14 +20,14 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef OverlapTestRequestClient_h
#define OverlapTestRequestClient_h
namespace WebCore {
-
+
class OverlapTestRequestClient {
public:
virtual ~OverlapTestRequestClient() { }
diff --git a/Source/core/rendering/PaintInfo.h b/Source/core/rendering/PaintInfo.h
index 6f4b6f0..28338ad 100644
--- a/Source/core/rendering/PaintInfo.h
+++ b/Source/core/rendering/PaintInfo.h
@@ -32,8 +32,8 @@
#include "core/platform/graphics/LayoutRect.h"
#include "core/platform/graphics/transforms/AffineTransform.h"
#include "core/rendering/PaintPhase.h"
-#include <wtf/HashMap.h>
-#include <wtf/ListHashSet.h>
+#include "wtf/HashMap.h"
+#include "wtf/ListHashSet.h"
namespace WebCore {
@@ -72,7 +72,7 @@
// If we're the painting root, kids draw normally, and see root of 0.
if (paintingRoot == renderer) {
- paintingRoot = 0;
+ paintingRoot = 0;
return;
}
}
diff --git a/Source/core/rendering/PointerEventsHitRules.h b/Source/core/rendering/PointerEventsHitRules.h
index 73c0225..bc0e24c 100644
--- a/Source/core/rendering/PointerEventsHitRules.h
+++ b/Source/core/rendering/PointerEventsHitRules.h
@@ -39,7 +39,7 @@
bool requireFill;
bool requireStroke;
bool canHitStroke;
- bool canHitFill;
+ bool canHitFill;
};
}
diff --git a/Source/core/rendering/RenderArena.cpp b/Source/core/rendering/RenderArena.cpp
index 2b6a05c..69a4f29 100644
--- a/Source/core/rendering/RenderArena.cpp
+++ b/Source/core/rendering/RenderArena.cpp
@@ -38,9 +38,11 @@
#include <stdlib.h>
#include <string.h>
+
#include <limits>
-#include <wtf/Assertions.h>
-#include <wtf/CryptographicallyRandomNumber.h>
+
+#include "wtf/Assertions.h"
+#include "wtf/CryptographicallyRandomNumber.h"
#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
diff --git a/Source/core/rendering/RenderBR.cpp b/Source/core/rendering/RenderBR.cpp
index affc34f..df38fd9 100644
--- a/Source/core/rendering/RenderBR.cpp
+++ b/Source/core/rendering/RenderBR.cpp
@@ -50,10 +50,10 @@
if (s != style())
return s->computedLineHeight(view());
}
-
+
if (m_lineHeight == -1)
m_lineHeight = style()->computedLineHeight(view());
-
+
return m_lineHeight;
}
@@ -63,13 +63,13 @@
m_lineHeight = -1;
}
-int RenderBR::caretMinOffset() const
-{
+int RenderBR::caretMinOffset() const
+{
return 0;
}
-int RenderBR::caretMaxOffset() const
-{
+int RenderBR::caretMaxOffset() const
+{
return 1;
}
diff --git a/Source/core/rendering/RenderBR.h b/Source/core/rendering/RenderBR.h
index 5a805ab..c504a6e 100644
--- a/Source/core/rendering/RenderBR.h
+++ b/Source/core/rendering/RenderBR.h
@@ -37,7 +37,7 @@
virtual ~RenderBR();
virtual const char* renderName() const { return "RenderBR"; }
-
+
virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* /*repaintContainer*/, bool /*clipToVisibleContent*/) OVERRIDE { return LayoutRect(); }
virtual float width(unsigned /*from*/, unsigned /*len*/, const Font&, float /*xPos*/, HashSet<const SimpleFontData*>* = 0 /*fallbackFonts*/ , GlyphOverflow* = 0) const { return 0; }
@@ -62,13 +62,13 @@
inline RenderBR* toRenderBR(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBR());
return static_cast<RenderBR*>(object);
}
inline const RenderBR* toRenderBR(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBR());
return static_cast<const RenderBR*>(object);
}
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index ae65a06..b969ed8 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -62,8 +62,8 @@
#include "core/rendering/shapes/ShapeInsideInfo.h"
#include "core/rendering/shapes/ShapeOutsideInfo.h"
#include "core/rendering/svg/SVGTextRunRenderingContext.h"
-#include <wtf/StdLibExtras.h>
-#include <wtf/TemporaryChange.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/TemporaryChange.h"
using namespace std;
using namespace WTF;
@@ -106,7 +106,7 @@
static TrackedContainerMap* gPositionedContainerMap = 0;
static TrackedContainerMap* gPercentHeightContainerMap = 0;
static TrackedContainerMap* gFloatingObjectContainerMap = 0;
-
+
typedef WTF::HashMap<RenderBlock*, OwnPtr<ListHashSet<RenderInline*> > > ContinuationOutlineTableMap;
typedef WTF::HashSet<RenderBlock*> DelayedUpdateScrollInfoSet;
@@ -181,7 +181,7 @@
// with it. We also don't collapse if we have any bottom border/padding.
m_canCollapseMarginAfterWithChildren = m_canCollapseWithChildren && (afterBorderPadding == 0) &&
(blockStyle->logicalHeight().isAuto() && !blockStyle->logicalHeight().value()) && blockStyle->marginAfterCollapse() != MSEPARATE;
-
+
m_quirkContainer = block->isTableCell() || block->isBody();
m_discardMargin = m_canCollapseMarginBeforeWithChildren && block->mustDiscardMarginBefore();
@@ -279,6 +279,16 @@
// Mark as being destroyed to avoid trouble with merges in removeChild().
m_beingDestroyed = true;
+ if (!documentBeingDestroyed()) {
+ if (firstChild() && firstChild()->isRunIn()) {
+ // If we are moving inline children(run-in) from |this| to |parent|, then we need
+ // to clear our line box tree.
+ if (childrenInline())
+ deleteLineBoxTree();
+ moveRunInToOriginalPosition(firstChild());
+ }
+ }
+
// Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
// properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise.
children()->destroyLeftoverChildren();
@@ -291,7 +301,7 @@
continuation->destroy();
setContinuation(0);
}
-
+
if (!documentBeingDestroyed()) {
if (firstLineBox()) {
// We can't wait for RenderBox::destroy to clear the selection,
@@ -331,7 +341,7 @@
s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned() && !avoidsFloats() : false;
setReplaced(newStyle->isDisplayInlineType());
-
+
if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->position() != newStyle->position()) {
if (newStyle->position() == StaticPosition)
// Clear our positioned objects list. Our absolutely positioned descendants will be
@@ -348,7 +358,7 @@
}
cb = cb->parent();
}
-
+
if (cb->isRenderBlock())
toRenderBlock(cb)->removePositionedObjects(this, NewContainingBlock);
}
@@ -377,7 +387,7 @@
void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBox::styleDidChange(diff, oldStyle);
-
+
RenderStyle* newStyle = style();
updateShapeInsideInfoAfterStyleChange(newStyle->resolvedShapeInside(), oldStyle ? oldStyle->resolvedShapeInside() : 0);
@@ -392,7 +402,7 @@
}
}
- propagateStyleToAnonymousChildren(true);
+ propagateStyleToAnonymousChildren(true);
m_lineHeight = -1;
// After our style changed, if we lose our ability to propagate floats into next sibling
@@ -420,11 +430,11 @@
}
}
}
-
+
parentBlock->markAllDescendantsWithFloatsForLayout();
parentBlock->markSiblingsWithFloatsForLayout();
}
-
+
// It's possible for our border/padding to change, but for the overall logical width of the block to
// end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true.
m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff == StyleDifferenceLayout && needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, newStyle);
@@ -485,7 +495,7 @@
flow->addChildIgnoringContinuation(newChild, beforeChild);
return;
}
-
+
// The goal here is to match up if we can, so that we can coalesce and create the
// minimal # of continuations needed for the inline.
if (childIsNormal == bcpIsNormal) {
@@ -503,7 +513,7 @@
void RenderBlock::addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild)
{
ASSERT(!continuation()); // We don't yet support column spans that aren't immediate children of the multi-column block.
-
+
// The goal is to locate a suitable box in which to place our child.
RenderBlock* beforeChildParent = 0;
if (beforeChild) {
@@ -550,11 +560,11 @@
toRenderBlock(immediateChild->previousSibling())->addChildIgnoringAnonymousColumnBlocks(newChild, 0); // Treat like an append.
return;
}
-
+
// Split our anonymous blocks.
RenderObject* newBeforeChild = splitAnonymousBoxesAroundChild(beforeChild);
-
+
// Create a new anonymous box of the appropriate type.
RenderBlock* newBox = newChildHasColumnSpan ? createAnonymousColumnSpanBlock() : createAnonymousColumnsBlock();
children()->insertChildNode(this, newBox, newBeforeChild);
@@ -575,14 +585,14 @@
// multi-column for them to avoid this problem.
if (curr->isTable() || curr->isRenderButton() || curr->isListItem())
return 0;
-
+
RenderBlock* currBlock = toRenderBlock(curr);
if (!currBlock->createsAnonymousWrapper())
firstChildIgnoringAnonymousWrappers = currBlock;
if (currBlock->style()->specifiesColumns() && (allowAnonymousColumnBlock || !currBlock->isAnonymousColumnsBlock()))
return firstChildIgnoringAnonymousWrappers;
-
+
if (currBlock->isAnonymousColumnSpanBlock())
return 0;
}
@@ -630,7 +640,7 @@
// Now take all of the children from beforeChild to the end and remove
// them from |this| and place them in the clone.
moveChildrenTo(cloneBlock, beforeChild, 0, true);
-
+
// Hook |clone| up as the continuation of the middle block.
if (!cloneBlock->isAnonymousBlock())
middleBlock->setContinuation(cloneBlock);
@@ -644,9 +654,9 @@
while (curr && curr->isDescendantOf(fromBlock) && curr != fromBlock) {
ASSERT_WITH_SECURITY_IMPLICATION(curr->isRenderBlock());
-
+
RenderBlock* blockCurr = toRenderBlock(curr);
-
+
// Create a new clone.
RenderBlock* cloneChild = cloneBlock;
cloneBlock = blockCurr->clone();
@@ -687,10 +697,10 @@
{
RenderBlock* pre = 0;
RenderBlock* block = containingColumnsBlock();
-
+
// Delete our line boxes before we do the inline split into continuations.
block->deleteLineBoxTree();
-
+
bool madeNewBeforeBlock = false;
if (block->isAnonymousColumnsBlock()) {
// We can reuse this block and make it the preBlock of the next continuation.
@@ -714,7 +724,7 @@
block->children()->insertChildNode(block, newBlockBox, boxFirst);
block->children()->insertChildNode(block, post, boxFirst);
block->setChildrenInline(false);
-
+
if (madeNewBeforeBlock)
block->moveChildrenTo(pre, boxFirst, 0, true);
@@ -743,7 +753,7 @@
RenderBlock* post = 0;
RenderBlock* block = this; // Eventually block will not just be |this|, but will also be a block nested inside |this|. Assign to a variable
// so that we don't have to patch all of the rest of the code later on.
-
+
// Delete the block's line boxes before we do the split.
block->deleteLineBoxTree();
@@ -767,7 +777,7 @@
if (post)
block->children()->insertChildNode(block, post, boxFirst);
block->setChildrenInline(false);
-
+
// The pre/post blocks always have layers, so we know to always do a full insert/remove (so we pass true as the last argument).
block->moveChildrenTo(pre, boxFirst, beforeChild, true);
block->moveChildrenTo(post, beforeChild, 0, true);
@@ -881,7 +891,7 @@
TemporaryChange<bool> columnFlowSplitEnabled(gColumnFlowSplitEnabled, false);
// We are placing a column-span element inside a block.
RenderBlock* newBox = createAnonymousColumnSpanBlock();
-
+
if (columnsBlockAncestor != this && !isRenderFlowThread()) {
// We are nested inside a multi-column element and are being split by the span. We have to break up
// our block into continuations.
@@ -940,7 +950,7 @@
}
RenderBox::addChild(newChild, beforeChild);
-
+
// Handle placement of run-ins.
placeRunInIfNeeded(newChild);
@@ -980,21 +990,21 @@
// |boundary| indicates a non-inclusive boundary point. Regardless of whether |boundary|
// is inline or not, we will not include it in a run with inlines before it. It's as though we encountered
// a non-inline.
-
+
// Start by skipping as many non-inlines as we can.
RenderObject * curr = start;
bool sawInline;
do {
while (curr && !(curr->isInline() || curr->isFloatingOrOutOfFlowPositioned()))
curr = curr->nextSibling();
-
+
inlineRunStart = inlineRunEnd = curr;
-
+
if (!curr)
return; // No more inline children to be found.
-
+
sawInline = curr->isInline();
-
+
curr = curr->nextSibling();
while (curr && (curr->isInline() || curr->isFloatingOrOutOfFlowPositioned()) && (curr != boundary)) {
inlineRunEnd = curr;
@@ -1041,7 +1051,7 @@
}
void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint)
-{
+{
// makeChildrenNonInline takes a block whose children are *all* inline and it
// makes sure that inline children are coalesced under anonymous
// blocks. If |insertionPoint| is defined, then it represents the insertion point for
@@ -1093,10 +1103,10 @@
{
ASSERT(child->isAnonymousBlock());
ASSERT(!child->childrenInline());
-
+
if (child->continuation() || (child->firstChild() && (child->isAnonymousColumnSpanBlock() || child->isAnonymousColumnsBlock())))
return;
-
+
RenderObject* firstAnChild = child->m_children.firstChild();
RenderObject* lastAnChild = child->m_children.lastChild();
if (firstAnChild) {
@@ -1111,7 +1121,7 @@
child->previousSibling()->setNextSibling(firstAnChild);
if (child->nextSibling())
child->nextSibling()->setPreviousSibling(lastAnChild);
-
+
if (child == m_children.firstChild())
m_children.setFirstChild(firstAnChild);
if (child == m_children.lastChild())
@@ -1174,7 +1184,7 @@
RenderFlowThread* childFlowThread = child->flowThreadContainingBlock();
CurrentRenderFlowThreadMaintainer flowThreadMaintainer(childFlowThread);
-
+
RenderBlock* anonBlock = toRenderBlock(parent->children()->removeChildNode(parent, child, child->hasLayer()));
anonBlock->moveAllChildrenTo(parent, nextSibling, child->hasLayer());
// Delete the now-empty block's lines and nuke it.
@@ -1247,11 +1257,11 @@
prev->setNeedsLayoutAndPrefWidthsRecalc();
RenderBlock* nextBlock = toRenderBlock(next);
RenderBlock* prevBlock = toRenderBlock(prev);
-
+
if (prev->childrenInline() != next->childrenInline()) {
RenderBlock* inlineChildrenBlock = prev->childrenInline() ? prevBlock : nextBlock;
RenderBlock* blockChildrenBlock = prev->childrenInline() ? nextBlock : prevBlock;
-
+
// Place the inline children block inside of the block children block instead of deleting it.
// In order to reuse it, we have to reset it to just be a generic anonymous block. Make sure
// to clear out inherited column properties by just making a new style, and to also clear the
@@ -1262,12 +1272,12 @@
bool inlineChildrenBlockHasLayer = inlineChildrenBlock->hasLayer();
inlineChildrenBlock->setStyle(newStyle);
children()->removeChildNode(this, inlineChildrenBlock, inlineChildrenBlockHasLayer);
-
+
// Now just put the inlineChildrenBlock inside the blockChildrenBlock.
blockChildrenBlock->children()->insertChildNode(blockChildrenBlock, inlineChildrenBlock, prev == inlineChildrenBlock ? blockChildrenBlock->firstChild() : 0,
inlineChildrenBlockHasLayer || blockChildrenBlock->hasLayer());
next->setNeedsLayoutAndPrefWidthsRecalc();
-
+
// inlineChildrenBlock got reparented to blockChildrenBlock, so it is no longer a child
// of "this". we null out prev or next so that is not used later in the function.
if (inlineChildrenBlock == prevBlock)
@@ -1278,7 +1288,7 @@
// Take all the children out of the |next| block and put them in
// the |prev| block.
nextBlock->moveAllChildrenIncludingFloatsTo(prevBlock, nextBlock->hasLayer() || prevBlock->hasLayer());
-
+
// Delete the now-empty block's lines and nuke it.
nextBlock->deleteLineBoxTree();
nextBlock->destroy();
@@ -1370,7 +1380,7 @@
// line boxes, then we can't be self-collapsing, since we have content.
if (childrenInline())
return !firstLineBox();
-
+
// Whether or not we collapse is dependent on whether all our normal flow children
// are also self-collapsing.
for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
@@ -1443,7 +1453,7 @@
// Table cells call layoutBlock directly, so don't add any logic here. Put code into
// layoutBlock().
layoutBlock(false);
-
+
// It's safe to check for control clip here, since controls can never be table cells.
// If we have a lightweight clip, there can never be any overflow from children.
if (hasControlClip() && m_overflow)
@@ -1498,7 +1508,7 @@
setLogicalHeight(oldHeight);
setLogicalTop(oldTop);
-
+
return shapeInfoRequiresRelayout(this);
}
@@ -1560,7 +1570,7 @@
colInfo->setColumnHeight(pageLogicalHeight);
pageLogicalHeightChanged = true;
}
-
+
if (!hasSpecifiedPageLogicalHeight && !pageLogicalHeight)
colInfo->clearForcedBreaks();
@@ -1621,7 +1631,7 @@
bool isCell = isTableCell();
if (!isCell) {
initMaxMarginValues();
-
+
setHasMarginBeforeQuirk(styleToUse->hasMarginBeforeQuirk());
setHasMarginAfterQuirk(styleToUse->hasMarginAfterQuirk());
setPaginationStrut(0);
@@ -1641,7 +1651,7 @@
LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEncloseOverhangingFloats())
setLogicalHeight(lowestFloatLogicalBottom() + toAdd);
-
+
if (relayoutForPagination(hasSpecifiedPageLogicalHeight, pageLogicalHeight, statePusher))
return;
@@ -1679,7 +1689,7 @@
// Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
computeOverflow(oldClientAfterEdge);
-
+
statePusher.pop();
fitBorderToLinesIfNeeded();
@@ -1708,7 +1718,7 @@
repaintLogicalLeft = min(repaintLogicalLeft, logicalLeftLayoutOverflow());
repaintLogicalRight = max(repaintLogicalRight, logicalRightLayoutOverflow());
}
-
+
LayoutRect repaintRect;
if (isHorizontalWritingMode())
repaintRect = LayoutRect(repaintLogicalLeft, repaintLogicalTop, repaintLogicalRight - repaintLogicalLeft, repaintLogicalBottom - repaintLogicalTop);
@@ -1719,7 +1729,7 @@
adjustRectForColumns(repaintRect);
repaintRect.inflate(maximalOutlineSize(PaintPhaseOutline));
-
+
if (hasOverflowClip()) {
// Adjust repaint rect for scroll offset
repaintRect.move(-scrolledContentOffset());
@@ -1774,7 +1784,7 @@
// When we have overflow clip, propagate the original spillout since it will include collapsed bottom margins
// and bottom padding. Set the axis we don't care about to be 1, since we want this overflow to always
// be considered reachable.
- LayoutRect clientRect(clientBoxRect());
+ LayoutRect clientRect(noOverflowRect());
LayoutRect rectToApply;
if (isHorizontalWritingMode())
rectToApply = LayoutRect(clientRect.x(), clientRect.y(), 1, max<LayoutUnit>(0, oldClientAfterEdge - clientRect.y()));
@@ -1784,11 +1794,11 @@
if (hasRenderOverflow())
m_overflow->setLayoutClientAfterEdge(oldClientAfterEdge);
}
-
+
// Allow our overflow to catch cases where the caret in an empty editable element with negative text indent needs to get painted.
LayoutUnit textIndent = textIndentOffset();
if (textIndent < 0) {
- LayoutRect clientRect(clientBoxRect());
+ LayoutRect clientRect(noOverflowRect());
LayoutRect rectToApply = LayoutRect(clientRect.x() + min<LayoutUnit>(0, textIndent), clientRect.y(), clientRect.width() - min<LayoutUnit>(0, textIndent), clientRect.height());
addVisualOverflow(rectToApply);
}
@@ -1836,7 +1846,7 @@
TrackedRendererListHashSet::iterator end = positionedDescendants->end();
for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(); it != end; ++it) {
positionedObject = *it;
-
+
// Fixed positioned elements don't contribute to layout overflow, since they don't scroll with the content.
if (positionedObject->style()->position() != FixedPosition) {
LayoutUnit x = positionedObject->x();
@@ -1867,7 +1877,7 @@
{
bool isHorizontal = isHorizontalWritingMode();
bool hasStaticBlockPosition = child->style()->hasStaticBlockPosition(isHorizontal);
-
+
LayoutUnit logicalTop = logicalHeight();
updateStaticInlinePositionForChild(child, logicalTop);
@@ -1878,7 +1888,7 @@
LayoutUnit collapsedBeforeNeg = marginInfo.negativeMargin();
logicalTop += collapsedBeforePos - collapsedBeforeNeg;
}
-
+
RenderLayer* childLayer = child->layer();
if (childLayer->staticBlockPosition() != logicalTop) {
childLayer->setStaticBlockPosition(logicalTop);
@@ -1981,6 +1991,9 @@
if (!curr || !curr->isRenderBlock() || !curr->childrenInline())
return;
+ if (toRenderBlock(curr)->beingDestroyed())
+ return;
+
// Per CSS3, "A run-in cannot run in to a block that already starts with a
// run-in or that itself is a run-in".
if (curr->isRunIn() || (curr->firstChild() && curr->firstChild()->isRunIn()))
@@ -2070,7 +2083,7 @@
posTop = max(posTop, childMargins.positiveMarginAfter());
negTop = max(negTop, childMargins.negativeMarginAfter());
}
-
+
// See if the top margin is quirky. We only care if this child has
// margins that will collapse with us.
bool topQuirk = hasMarginBeforeQuirk(child);
@@ -2104,7 +2117,7 @@
setMustDiscardMarginBefore();
}
- // Once we find a child with discardMarginBefore all the margins collapsing with us must also discard.
+ // Once we find a child with discardMarginBefore all the margins collapsing with us must also discard.
if (childDiscardMarginBefore) {
marginInfo.setDiscardMargin(true);
marginInfo.clearMargin();
@@ -2125,9 +2138,9 @@
LayoutUnit collapsedBeforePos = max(marginInfo.positiveMargin(), childMargins.positiveMarginBefore());
LayoutUnit collapsedBeforeNeg = max(marginInfo.negativeMargin(), childMargins.negativeMarginBefore());
marginInfo.setMargin(collapsedBeforePos, collapsedBeforeNeg);
-
+
// Now collapse the child's margins together, which means examining our
- // bottom margin values as well.
+ // bottom margin values as well.
marginInfo.setPositiveMarginIfLarger(childMargins.positiveMarginAfter());
marginInfo.setNegativeMarginIfLarger(childMargins.negativeMarginAfter());
@@ -2157,7 +2170,7 @@
}
marginInfo.setDiscardMargin(childDiscardMarginAfter);
-
+
if (!marginInfo.discardMargin()) {
marginInfo.setPositiveMargin(childMargins.positiveMarginAfter());
marginInfo.setNegativeMargin(childMargins.negativeMarginAfter());
@@ -2167,7 +2180,7 @@
if (marginInfo.margin())
marginInfo.setHasMarginAfterQuirk(hasMarginAfterQuirk(child));
}
-
+
// If margins would pull us past the top of the next page, then we need to pull back and pretend like the margins
// collapsed into the page edge.
LayoutState* layoutState = view()->layoutState();
@@ -2186,7 +2199,7 @@
RenderObject* prev = child->previousSibling();
if (prev && prev->isBlockFlow() && !prev->isFloatingOrOutOfFlowPositioned()) {
RenderBlock* block = toRenderBlock(prev);
- if (block->containsFloats() && !block->avoidsFloats() && (block->logicalTop() + block->lowestFloatLogicalBottom()) > logicalTop)
+ if (block->containsFloats() && !block->avoidsFloats() && (block->logicalTop() + block->lowestFloatLogicalBottom()) > logicalTop)
addOverhangingFloats(block, false);
}
setLogicalHeight(oldLogicalHeight);
@@ -2216,7 +2229,7 @@
marginInfo.setDiscardMargin(childDiscardMargin);
// CSS2.1 states:
- // "If the top and bottom margins of an element with clearance are adjoining, its margins collapse with
+ // "If the top and bottom margins of an element with clearance are adjoining, its margins collapse with
// the adjoining margins of following siblings but that resulting margin does not collapse with the bottom margin of the parent block."
// So the parent's bottom margin cannot collapse through this block or any subsequent self-collapsing blocks. Check subsequent siblings
// for a block with height - if none is found then don't allow the margins to collapse with the parent.
@@ -2237,7 +2250,7 @@
} else
// Increase our height by the amount we had to clear.
setLogicalHeight(logicalHeight() + heightIncrease);
-
+
if (marginInfo.canCollapseWithMarginBefore()) {
// We can no longer collapse with the top of the block since a clear
// occurred. The empty blocks collapse into the cleared block.
@@ -2283,7 +2296,7 @@
if (!child->isRenderBlock())
return;
-
+
RenderBlock* childBlock = toRenderBlock(child);
if (childBlock->childrenInline() || childBlock->isWritingModeRoot())
return;
@@ -2297,7 +2310,7 @@
if (!grandchildBox->isFloatingOrOutOfFlowPositioned())
break;
}
-
+
// Give up if there is clearance on the box, since it probably won't collapse into us.
if (!grandchildBox || grandchildBox->style()->clear() != CNONE)
return;
@@ -2350,16 +2363,16 @@
logicalTopEstimate = min(logicalTopEstimate, nextPageLogicalTop(logicalHeight()));
logicalTopEstimate += getClearDelta(child, logicalTopEstimate);
-
+
estimateWithoutPagination = logicalTopEstimate;
if (layoutState->isPaginated()) {
// If the object has a page or column break value of "before", then we should shift to the top of the next page.
logicalTopEstimate = applyBeforeBreak(child, logicalTopEstimate);
-
+
// For replaced elements and scrolled elements, we want to shift them to the next page if they don't fit on the current one.
logicalTopEstimate = adjustForUnsplittableChild(child, logicalTopEstimate);
-
+
if (!child->selfNeedsLayout() && child->isRenderBlock())
logicalTopEstimate += toRenderBlock(child)->paginationStrut();
}
@@ -2402,7 +2415,7 @@
// Add in our start margin.
LayoutUnit childMarginStart = marginStartForChild(child);
LayoutUnit newPosition = startPosition + childMarginStart;
-
+
// Some objects (e.g., tables, horizontal rules, overflow:auto blocks) avoid floats. They need
// to shift over as necessary to dodge any floats that might get in the way.
if (child->avoidsFloats() && containsFloats() && !flowThreadContainingBlock())
@@ -2444,7 +2457,7 @@
if (!marginInfo.discardMargin() && (!marginInfo.canCollapseWithMarginAfter() && !marginInfo.canCollapseWithMarginBefore()
&& (!document()->inQuirksMode() || !marginInfo.quirkContainer() || !marginInfo.hasMarginAfterQuirk())))
setLogicalHeight(logicalHeight() + marginInfo.margin());
-
+
// Now add in our bottom border/padding.
setLogicalHeight(logicalHeight() + afterSide);
@@ -2518,7 +2531,7 @@
LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeight();
setLogicalHeight(beforeEdge);
-
+
// Lay out our hypothetical grid line as though it occurs at the top of the block.
if (view()->layoutState()->lineGrid() == this)
layoutLineGridBox();
@@ -2559,7 +2572,7 @@
// Lay out the child.
layoutBlockChild(child, marginInfo, previousFloatLogicalBottom, maxFloatLogicalBottom);
}
-
+
// Now do the handling of the bottom of the block, adding in our bottom border/padding and
// determining the correct collapsed bottom margin information.
handleAfterSideOfBlock(beforeEdge, afterEdge, marginInfo);
@@ -2631,7 +2644,7 @@
// Now check for clear.
LayoutUnit logicalTopAfterClear = clearFloatsIfNeeded(child, marginInfo, oldPosMarginBefore, oldNegMarginBefore, logicalTopBeforeClear);
-
+
bool paginated = view()->layoutState()->isPaginated();
if (paginated)
logicalTopAfterClear = adjustBlockChildForPagination(logicalTopAfterClear, estimateWithoutPagination, child,
@@ -2650,7 +2663,7 @@
// So go ahead and mark the item as dirty.
child->setChildNeedsLayout(true, MarkOnlyThis);
}
-
+
if (childRenderBlock) {
if (!child->avoidsFloats() && childRenderBlock->containsFloats())
childRenderBlock->markAllDescendantsWithFloatsForLayout();
@@ -2662,7 +2675,7 @@
child->layoutIfNeeded();
}
- // We are no longer at the top of the block if we encounter a non-empty child.
+ // We are no longer at the top of the block if we encounter a non-empty child.
// This has to be done after checking for clear, so that margins can be reset if a clear occurred.
if (marginInfo.atBeforeSideOfBlock() && !child->isSelfCollapsingBlock())
marginInfo.setAtBeforeSideOfBlock(false);
@@ -2724,7 +2737,7 @@
}
// FIXME: Glyph overflow will get lost in this case, but not really a big deal.
- GlyphOverflowAndFallbackFontsMap textBoxDataMap;
+ GlyphOverflowAndFallbackFontsMap textBoxDataMap;
for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it != lineBoxes.end(); ++it) {
RootInlineBox* box = *it;
box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap);
@@ -2743,7 +2756,7 @@
return false;
LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasColumns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
-
+
if (needsPositionedMovementLayout() && !tryLayoutDoingPositionedMovementOnly())
return false;
@@ -2753,7 +2766,7 @@
// Lay out our positioned objects if our positioned child bit is set.
// Also, if an absolute position element inside a relative positioned container moves, and the absolute element has a fixed position
- // child, neither the fixed element nor its container learn of the movement since posChildNeedsLayout() is only marked as far as the
+ // child, neither the fixed element nor its container learn of the movement since posChildNeedsLayout() is only marked as far as the
// relative positioned container. So if we can have fixed pos objects in our positioned objects list check if any of them
// are statically positioned and thus need to move with their absolute ancestors.
bool canContainFixedPosObjects = canContainFixedPositionObjects();
@@ -2771,7 +2784,7 @@
computeOverflow(oldClientAfterEdge, true);
statePusher.pop();
-
+
updateLayerTransform();
updateScrollInfoAfterLayout();
@@ -2815,7 +2828,7 @@
TrackedRendererListHashSet* positionedDescendants = positionedObjects();
if (!positionedDescendants)
return;
-
+
if (hasColumns())
view()->layoutState()->clearPaginationInformation(); // Positioned objects are not part of the column flow, so they don't paginate with the columns.
@@ -2825,7 +2838,7 @@
r = *it;
// A fixed position element with an absolute positioned ancestor has no way of knowing if the latter has changed position. So
- // if this is a fixed position element, mark it for layout if it has an abspos ancestor and needs to move with that ancestor, i.e.
+ // if this is a fixed position element, mark it for layout if it has an abspos ancestor and needs to move with that ancestor, i.e.
// it has static position.
markFixedPositionObjectForLayoutIfNeeded(r);
if (fixedPositionObjectsOnly) {
@@ -2839,23 +2852,23 @@
// positioned explicitly) this should not incur a performance penalty.
if (relayoutChildren || (r->style()->hasStaticBlockPosition(isHorizontalWritingMode()) && r->parent() != this))
r->setChildNeedsLayout(true, MarkOnlyThis);
-
+
// If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
if (relayoutChildren && r->needsPreferredWidthsRecalculation())
r->setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
-
+
if (!r->needsLayout())
r->markForPaginationRelayoutIfNeeded();
-
+
// We don't have to do a full layout. We just have to update our position. Try that first. If we have shrink-to-fit width
// and we hit the available width constraint, the layoutIfNeeded() will catch it and do a full layout.
if (r->needsPositionedMovementLayoutOnly() && r->tryLayoutDoingPositionedMovementOnly())
r->setNeedsLayout(false);
-
+
// If we are paginated or in a line grid, go ahead and compute a vertical position for our object now.
// If it's wrong we'll lay out again.
LayoutUnit oldLogicalTop = 0;
- bool needsBlockDirectionLocationSetBeforeLayout = r->needsLayout() && view()->layoutState()->needsBlockDirectionLocationSetBeforeLayout();
+ bool needsBlockDirectionLocationSetBeforeLayout = r->needsLayout() && view()->layoutState()->needsBlockDirectionLocationSetBeforeLayout();
if (needsBlockDirectionLocationSetBeforeLayout) {
if (isHorizontalWritingMode() == r->isHorizontalWritingMode())
r->updateLogicalHeight();
@@ -2863,7 +2876,7 @@
r->updateLogicalWidth();
oldLogicalTop = logicalTopForChild(r);
}
-
+
r->layoutIfNeeded();
// Lay out again if our estimate was wrong.
@@ -2872,7 +2885,7 @@
r->layoutIfNeeded();
}
}
-
+
if (hasColumns())
view()->layoutState()->m_columnInfo = columnInfo(); // FIXME: Kind of gross. We just put this back into the layout state so that pop() will work.
}
@@ -2923,13 +2936,13 @@
}
}
}
-
+
void RenderBlock::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
LayoutPoint adjustedPaintOffset = paintOffset + location();
-
+
PaintPhase phase = paintInfo.phase;
// Check if we need to do anything at all.
@@ -2994,7 +3007,7 @@
ruleLogicalLeft -= (inlineDirectionSize + colGap / 2);
currLogicalLeftOffset -= (inlineDirectionSize + colGap);
}
-
+
// Now paint the column rule.
if (i < colCount - 1) {
LayoutUnit ruleLeft = isHorizontalWritingMode() ? paintOffset.x() + ruleLogicalLeft - ruleThickness / 2 + ruleAdd : paintOffset.x() + borderLeft() + paddingLeft();
@@ -3004,7 +3017,7 @@
IntRect pixelSnappedRuleRect = pixelSnappedIntRectFromEdges(ruleLeft, ruleTop, ruleRight, ruleBottom);
drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRect.x(), pixelSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRect.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, antialias);
}
-
+
ruleLogicalLeft = currLogicalLeftOffset;
}
} else {
@@ -3069,11 +3082,11 @@
colRect.moveBy(paintOffset);
PaintInfo info(paintInfo);
info.rect.intersect(pixelSnappedIntRect(colRect));
-
+
if (!info.rect.isEmpty()) {
GraphicsContextStateSaver stateSaver(*context);
LayoutRect clipRect(colRect);
-
+
if (i < colCount - 1) {
if (isHorizontalWritingMode())
clipRect.expand(colGap / 2, 0);
@@ -3229,7 +3242,7 @@
// Do not add continuations for outline painting by our containing block if we are a relative positioned
// anonymous block (i.e. have our own layer), paint them straightaway instead. This is because a block depends on renderers in its continuation table being
- // in the same layer.
+ // in the same layer.
if (!inlineEnclosedInSelfPaintingLayer && !hasLayer())
cb->addContinuationWithOutline(inlineRenderer);
else if (!inlineRenderer->firstLineBox() || (!inlineEnclosedInSelfPaintingLayer && hasLayer()))
@@ -3241,7 +3254,7 @@
// 7. paint caret.
// If the caret's node's render object's containing block is this block, and the paint action is PaintPhaseForeground,
// then paint the caret.
- if (paintPhase == PaintPhaseForeground) {
+ if (paintPhase == PaintPhaseForeground) {
paintCaret(paintInfo, paintOffset, CursorCaret);
paintCaret(paintInfo, paintOffset, DragCaret);
}
@@ -3251,7 +3264,7 @@
{
if (!style()->isFlippedBlocksWritingMode())
return point;
-
+
// This is similar to RenderBox::flipForWritingModeForChild. We have to subtract out our left/top offsets twice, since
// it's going to get added back in. We hide this complication here so that the calling code looks normal for the unflipped
// case.
@@ -3291,7 +3304,7 @@
}
RenderInline* RenderBlock::inlineElementContinuation() const
-{
+{
RenderBoxModelObject* continuation = this->continuation();
return continuation && continuation->isInline() ? toRenderInline(continuation) : 0;
}
@@ -3306,7 +3319,7 @@
return nextContinuation->blockElementContinuation();
return nextContinuation;
}
-
+
static ContinuationOutlineTableMap* continuationOutlineTable()
{
DEFINE_STATIC_LOCAL(ContinuationOutlineTableMap, table, ());
@@ -3318,14 +3331,14 @@
// We can't make this work if the inline is in a layer. We'll just rely on the broken
// way of painting.
ASSERT(!flow->layer() && !flow->isInlineElementContinuation());
-
+
ContinuationOutlineTableMap* table = continuationOutlineTable();
ListHashSet<RenderInline*>* continuations = table->get(this);
if (!continuations) {
continuations = new ListHashSet<RenderInline*>;
table->set(this, adoptPtr(continuations));
}
-
+
continuations->add(flow);
}
@@ -3334,7 +3347,7 @@
ContinuationOutlineTableMap* table = continuationOutlineTable();
if (table->isEmpty())
return false;
-
+
ListHashSet<RenderInline*>* continuations = table->get(this);
if (!continuations)
return false;
@@ -3347,7 +3360,7 @@
ContinuationOutlineTableMap* table = continuationOutlineTable();
if (table->isEmpty())
return;
-
+
OwnPtr<ListHashSet<RenderInline*> > continuations = table->take(this);
if (!continuations)
return;
@@ -3361,7 +3374,7 @@
RenderBlock* block = flow->containingBlock();
for ( ; block && block != this; block = block->containingBlock())
accumulatedPaintOffset.moveBy(block->location());
- ASSERT(block);
+ ASSERT(block);
flow->paintOutline(info, accumulatedPaintOffset);
}
}
@@ -3376,24 +3389,24 @@
if (isPseudoElement())
return false;
ASSERT(node() || isAnonymous());
-
+
// FIXME: Eventually tables should have to learn how to fill gaps between cells, at least in simple non-spanning cases.
if (isTable())
return false;
-
+
if (isBody() || isRoot() || hasOverflowClip()
|| isPositioned() || isFloating()
|| isTableCell() || isInlineBlockOrInlineTable()
|| hasTransform() || hasReflection() || hasMask() || isWritingModeRoot()
|| isRenderFlowThread())
return true;
-
+
if (view() && view()->selectionStart()) {
Node* startElement = view()->selectionStart()->node();
if (startElement && startElement->rootEditableElement() == node())
return true;
}
-
+
return false;
}
@@ -3414,7 +3427,7 @@
LayoutUnit lastTop = 0;
LayoutUnit lastLeft = logicalLeftSelectionOffset(this, lastTop);
LayoutUnit lastRight = logicalRightSelectionOffset(this, lastTop);
-
+
return selectionGaps(this, offsetFromRepaintContainer, IntSize(), lastTop, lastLeft, lastRight);
}
@@ -3447,7 +3460,7 @@
{
if (!positionedObjects)
return;
-
+
TrackedRendererListHashSet::const_iterator end = positionedObjects->end();
for (TrackedRendererListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) {
RenderBox* r = *it;
@@ -3527,7 +3540,7 @@
// Go ahead and fill the vertical gap all the way to the bottom of our block if the selection extends past our block.
if (rootBlock == this && (selectionState() != SelectionBoth && selectionState() != SelectionEnd))
- result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
+ result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
logicalHeight(), paintInfo));
return result;
}
@@ -3561,9 +3574,9 @@
if (!containsStart && !lastSelectedLine &&
selectionState() != SelectionStart && selectionState() != SelectionBoth)
- result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
+ result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
selTop, paintInfo));
-
+
LayoutRect logicalRect(curr->logicalLeft(), selTop, curr->logicalWidth(), selTop + selHeight);
logicalRect.move(isHorizontalWritingMode() ? offsetFromRootBlock : offsetFromRootBlock.transposedSize());
LayoutRect physicalRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalPosition, logicalRect);
@@ -3618,7 +3631,7 @@
// We need to fill the vertical gap above this object.
if (childState == SelectionEnd || childState == SelectionInside)
// Fill the gap above the object.
- result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
+ result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPosition, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
curr->logicalTop(), paintInfo));
// Only fill side gaps for objects that paint their own selection if we know for sure the selection is going to extend all the way *past*
@@ -3643,7 +3656,7 @@
lastLogicalRight = logicalRightSelectionOffset(rootBlock, curr->logicalBottom());
} else if (childState != SelectionNone)
// We must be a block that has some selected object inside it. Go ahead and recur.
- result.unite(toRenderBlock(curr)->selectionGaps(rootBlock, rootBlockPhysicalPosition, LayoutSize(offsetFromRootBlock.width() + curr->x(), offsetFromRootBlock.height() + curr->y()),
+ result.unite(toRenderBlock(curr)->selectionGaps(rootBlock, rootBlockPhysicalPosition, LayoutSize(offsetFromRootBlock.width() + curr->x(), offsetFromRootBlock.height() + curr->y()),
lastLogicalTop, lastLogicalLeft, lastLogicalRight, paintInfo));
}
return result;
@@ -3787,7 +3800,7 @@
descendantsMap = new TrackedDescendantsMap;
containerMap = new TrackedContainerMap;
}
-
+
TrackedRendererListHashSet* descendantSet = descendantsMap->get(this);
if (!descendantSet) {
descendantSet = new TrackedRendererListHashSet;
@@ -3799,7 +3812,7 @@
ASSERT(containerMap->get(descendant)->contains(this));
return;
}
-
+
HashSet<RenderBlock*>* containerSet = containerMap->get(descendant);
if (!containerSet) {
containerSet = new HashSet<RenderBlock*>;
@@ -3813,11 +3826,11 @@
{
if (!descendantsMap)
return;
-
+
OwnPtr<HashSet<RenderBlock*> > containerSet = containerMap->take(descendant);
if (!containerSet)
return;
-
+
HashSet<RenderBlock*>::iterator end = containerSet->end();
for (HashSet<RenderBlock*>::iterator it = containerSet->begin(); it != end; ++it) {
RenderBlock* container = *it;
@@ -3852,7 +3865,7 @@
if (o->isRenderFlowThread())
return;
-
+
insertIntoTrackedRendererMaps(o, gPositionedDescendantsMap, gPositionedContainerMap);
}
@@ -3866,11 +3879,11 @@
TrackedRendererListHashSet* positionedDescendants = positionedObjects();
if (!positionedDescendants)
return;
-
+
RenderBox* r;
-
+
TrackedRendererListHashSet::iterator end = positionedDescendants->end();
-
+
Vector<RenderBox*, 16> deadObjects;
for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(); it != end; ++it) {
@@ -3878,7 +3891,7 @@
if (!o || r->isDescendantOf(o)) {
if (containingBlockState == NewContainingBlock)
r->setChildNeedsLayout(true, MarkOnlyThis);
-
+
// It is parent blocks job to add positioned child to positioned objects list of its containing block
// Parent layout needs to be invalidated to ensure this happens.
RenderObject* p = r->parent();
@@ -3886,11 +3899,11 @@
p = p->parent();
if (p)
p->setChildNeedsLayout(true);
-
+
deadObjects.append(r);
}
}
-
+
for (unsigned i = 0; i < deadObjects.size(); i++)
removePositionedObject(deadObjects.at(i));
}
@@ -3981,13 +3994,13 @@
// Create the special object entry & append it to the list
FloatingObject* newObj = new FloatingObject(o->style()->floating());
-
+
// Our location is irrelevant if we're unsplittable or no pagination is in effect.
// Just go ahead and lay out the float.
bool isChildRenderBlock = o->isRenderBlock();
if (isChildRenderBlock && !o->needsLayout() && view()->layoutState()->pageLogicalHeightChanged())
o->setChildNeedsLayout(true, MarkOnlyThis);
-
+
bool needsBlockDirectionLocationSetBeforeLayout = isChildRenderBlock && view()->layoutState()->needsBlockDirectionLocationSetBeforeLayout();
if (!needsBlockDirectionLocationSetBeforeLayout || isWritingModeRoot()) // We are unsplittable if we're a block flow root.
o->layoutIfNeeded();
@@ -4006,7 +4019,7 @@
newObj->m_renderer = o;
insertIntoFloatingObjectMaps(newObj);
-
+
return newObj;
}
@@ -4053,7 +4066,7 @@
{
if (!containsFloats())
return;
-
+
const FloatingObjectSet& floatingObjectSet = floatingObjects()->set();
FloatingObject* curr = floatingObjectSet.last();
while (curr != lastFloat && (!curr->isPlaced() || logicalTopForFloat(curr) >= logicalOffset)) {
@@ -4123,7 +4136,7 @@
// |floatLogicalWidth| was capped to the available line width.
// See fast/block/float/clamped-right-float.html.
}
-
+
return LayoutPoint(floatLogicalLeft, logicalTopOffset);
}
@@ -4158,7 +4171,7 @@
}
LayoutUnit logicalTop = logicalHeight();
-
+
// The float cannot start above the top position of the last positioned float.
if (lastPlacedFloatingObject)
logicalTop = max(logicalTopForFloat(lastPlacedFloatingObject), logicalTop);
@@ -4193,14 +4206,14 @@
bool isPaginated = layoutState->isPaginated();
if (isPaginated && !childBox->needsLayout())
childBox->markForPaginationRelayoutIfNeeded();
-
+
childBox->layoutIfNeeded();
if (isPaginated) {
// If we are unsplittable and don't fit, then we need to move down.
// We include our margins as part of the unsplittable area.
LayoutUnit newLogicalTop = adjustForUnsplittableChild(childBox, floatLogicalLocation.y(), true);
-
+
// See if we have a pagination strut that is making us move down further.
// Note that an unsplittable child can't also have a pagination strut, so this is
// exclusive with the case above.
@@ -4209,7 +4222,7 @@
newLogicalTop += childBlock->paginationStrut();
childBlock->setPaginationStrut(0);
}
-
+
if (newLogicalTop != floatLogicalLocation.y()) {
floatingObject->m_paginationStrut = newLogicalTop - floatLogicalLocation.y();
@@ -4218,7 +4231,7 @@
setLogicalLeftForChild(childBox, floatLogicalLocation.x() + childLogicalLeftMargin);
setLogicalTopForChild(childBox, floatLogicalLocation.y() + marginBeforeForChild(childBox));
-
+
if (childBlock)
childBlock->setChildNeedsLayout(true, MarkOnlyThis);
childBox->layoutIfNeeded();
@@ -4309,7 +4322,7 @@
for (RenderObject* curr = parent->firstChild(); curr; curr = curr->nextInPreOrder(parent)) {
if (!curr->isBox())
continue;
-
+
RenderBox* box = toRenderBox(curr);
if (!hasPercentHeightDescendant(box))
continue;
@@ -4348,7 +4361,7 @@
// All the objects returned from the tree should be already placed.
ASSERT(r->isPlaced() && rangesIntersect(m_renderer->pixelSnappedLogicalTopForFloat(r), m_renderer->pixelSnappedLogicalBottomForFloat(r), m_lowValue, m_highValue));
- if (FloatTypeValue == FloatingObject::FloatLeft
+ if (FloatTypeValue == FloatingObject::FloatLeft
&& m_renderer->logicalRightForFloat(r) > m_offset) {
m_offset = m_renderer->logicalRightForFloat(r);
if (m_heightRemaining)
@@ -4409,7 +4422,7 @@
const FloatingObject* lastFloat = adapter.lastFloat();
if (offsetMode == ShapeOutsideFloatShapeOffset && lastFloat) {
if (ShapeOutsideInfo* shapeOutside = lastFloat->renderer()->shapeOutsideInfo()) {
- shapeOutside->computeSegmentsForLine(logicalTop - logicalTopForFloat(lastFloat), logicalHeight);
+ shapeOutside->computeSegmentsForContainingBlockLine(logicalTop, logicalTopForFloat(lastFloat), logicalHeight);
left += shapeOutside->rightSegmentMarginBoxDelta();
}
}
@@ -4427,7 +4440,7 @@
if (style()->lineAlign() == LineAlignNone)
return left;
-
+
// Push in our left offset so that it is aligned with the character grid.
LayoutState* layoutState = view()->layoutState();
if (!layoutState)
@@ -4444,7 +4457,7 @@
LayoutUnit lineGridOffset = lineGrid->isHorizontalWritingMode() ? layoutState->lineGridOffset().width(): layoutState->lineGridOffset().height();
LayoutUnit layoutOffset = lineGrid->isHorizontalWritingMode() ? layoutState->layoutOffset().width() : layoutState->layoutOffset().height();
-
+
// Push in to the nearest character width.
// FIXME: This is wrong for RTL (https://bugs.webkit.org/show_bug.cgi?id=79945).
// FIXME: This doesn't work with columns or regions (https://bugs.webkit.org/show_bug.cgi?id=79942).
@@ -4471,7 +4484,7 @@
const FloatingObject* lastFloat = adapter.lastFloat();
if (offsetMode == ShapeOutsideFloatShapeOffset && lastFloat) {
if (ShapeOutsideInfo* shapeOutside = lastFloat->renderer()->shapeOutsideInfo()) {
- shapeOutside->computeSegmentsForLine(logicalTop - logicalTopForFloat(lastFloat), logicalHeight);
+ shapeOutside->computeSegmentsForContainingBlockLine(logicalTop, logicalTopForFloat(lastFloat), logicalHeight);
rightFloatOffset += shapeOutside->leftSegmentMarginBoxDelta();
}
}
@@ -4480,17 +4493,17 @@
}
return right;
}
-
+
LayoutUnit RenderBlock::adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFloats, bool applyTextIndent) const
{
LayoutUnit right = offsetFromFloats;
if (applyTextIndent && !style()->isLeftToRightDirection())
right -= textIndentOffset();
-
+
if (style()->lineAlign() == LineAlignNone)
return right;
-
+
// Push in our right offset so that it is aligned with the character grid.
LayoutState* layoutState = view()->layoutState();
if (!layoutState)
@@ -4507,7 +4520,7 @@
LayoutUnit lineGridOffset = lineGrid->isHorizontalWritingMode() ? layoutState->lineGridOffset().width(): layoutState->lineGridOffset().height();
LayoutUnit layoutOffset = lineGrid->isHorizontalWritingMode() ? layoutState->layoutOffset().width() : layoutState->layoutOffset().height();
-
+
// Push in to the nearest character width.
// FIXME: This is wrong for RTL (https://bugs.webkit.org/show_bug.cgi?id=79945).
// FIXME: This doesn't work with columns or regions (https://bugs.webkit.org/show_bug.cgi?id=79942).
@@ -4615,7 +4628,7 @@
}
}
- // We should not process floats if the parent node is not a RenderBlock. Otherwise, we will add
+ // We should not process floats if the parent node is not a RenderBlock. Otherwise, we will add
// floats in an invalid context. This will cause a crash arising from a bad cast on the parent.
// See <rdar://problem/8049753>, where float property is applied on a text node in a SVG.
if (!parent() || !parent()->isRenderBlock())
@@ -4637,7 +4650,7 @@
LayoutUnit logicalTopOffset = logicalTop();
if (parentHasFloats)
addIntrudingFloats(parentBlock, parentBlock->logicalLeftOffsetForContent(), logicalTopOffset);
-
+
LayoutUnit logicalLeftOffset = 0;
if (prev)
logicalTopOffset -= toRenderBox(prev)->logicalTop();
@@ -4646,7 +4659,7 @@
logicalLeftOffset += parentBlock->logicalLeftOffsetForContent();
}
- // Add overhanging floats from the previous RenderBlock, but only if it has a float that intrudes into our space.
+ // Add overhanging floats from the previous RenderBlock, but only if it has a float that intrudes into our space.
RenderBlock* block = toRenderBlock(prev);
if (block->floatingObjects() && block->lowestFloatLogicalBottom() > logicalTopOffset)
addIntrudingFloats(block, logicalLeftOffset, logicalTopOffset);
@@ -4772,7 +4785,7 @@
// it should paint.
r->setShouldPaint(true);
}
-
+
// Since the float doesn't overhang, it didn't get put into our list. We need to go ahead and add its overflow in to the
// child now.
if (r->isDescendant())
@@ -4828,10 +4841,10 @@
else
floatingObj->setY(floatingObj->y() + prev->marginTop());
}
-
+
floatingObj->setShouldPaint(false); // We are not in the direct inheritance chain for this float. We will never paint it.
floatingObj->m_renderer = r->m_renderer;
-
+
// We create the floating object list lazily.
if (!floats)
createFloatingObjects();
@@ -4887,7 +4900,7 @@
MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockChain;
setChildNeedsLayout(true, markParents);
-
+
if (floatToRemove)
removeFloatingObject(floatToRemove);
@@ -4932,7 +4945,7 @@
// There is no need to compute clearance if we have no floats.
if (!containsFloats())
return 0;
-
+
// At least one float is present. We need to perform the clearance computation.
bool clearSet = child->style()->clear() != CNONE;
LayoutUnit logicalBottom = 0;
@@ -4979,7 +4992,7 @@
child->setLogicalWidth(childOldLogicalWidth);
child->setMarginLeft(childOldMarginLeft);
child->setMarginRight(childOldMarginRight);
-
+
if (childLogicalWidthAtNewLogicalTopOffset <= availableLogicalWidthAtNewLogicalTopOffset) {
// Even though we may not be moving, if the logical width did shrink because of the presence of new floats, then
// we need to force a relayout as though we shifted. This happens because of the dynamic addition of overhanging floats
@@ -5397,7 +5410,7 @@
return createVisiblePosition(caretMinOffset(), DOWNSTREAM);
if (pointLogicalTop >= logicalHeight() || (pointLogicalTop >= 0 && pointLogicalLeft >= logicalWidth()))
return createVisiblePosition(caretMaxOffset(), DOWNSTREAM);
- }
+ }
LayoutPoint pointInContents = point;
offsetForContents(pointInContents);
@@ -5462,7 +5475,7 @@
}
void RenderBlock::calcColumnWidth()
-{
+{
if (document()->regionBasedColumnsEnabled())
return;
@@ -5470,13 +5483,13 @@
// FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
unsigned desiredColumnCount = 1;
LayoutUnit desiredColumnWidth = contentLogicalWidth();
-
+
// For now, we don't support multi-column layouts when printing, since we have to do a lot of work for proper pagination.
if (document()->paginated() || (style()->hasAutoColumnCount() && style()->hasAutoColumnWidth()) || !style()->hasInlineColumnAxis()) {
setDesiredColumnCountAndWidth(desiredColumnCount, desiredColumnWidth);
return;
}
-
+
LayoutUnit availWidth = desiredColumnWidth;
LayoutUnit colGap = columnGap();
LayoutUnit colWidth = max<LayoutUnit>(1, LayoutUnit(style()->columnWidth()));
@@ -5577,7 +5590,7 @@
{
if (!hasColumns())
return 0;
- return gColumnInfoMap->get(this);
+ return gColumnInfoMap->get(this);
}
unsigned RenderBlock::columnCount(ColumnInfo* colInfo) const
@@ -5645,14 +5658,14 @@
// Now that we know the intrinsic height of the columns, we have to rebalance them.
columnHeight = max<LayoutUnit>(colInfo->minimumColumnHeight(), ceilf((float)layoutOverflowLogicalBottom / desiredColumnCount));
}
-
+
if (columnHeight && columnHeight != pageLogicalHeight) {
statePusher.pop();
setEverHadLayout(true);
layoutBlock(false, columnHeight);
return true;
}
- }
+ }
if (pageLogicalHeight)
colInfo->setColumnCountAndHeight(ceilf((float)layoutOverflowLogicalBottom / pageLogicalHeight), pageLogicalHeight);
@@ -5662,7 +5675,7 @@
m_overflow.clear();
} else
m_overflow = savedOverflow.release();
-
+
return false;
}
@@ -5671,7 +5684,7 @@
// Just bail if we have no columns.
if (!hasColumns())
return;
-
+
ColumnInfo* colInfo = columnInfo();
if (!columnCount(colInfo))
return;
@@ -5758,9 +5771,9 @@
// Just bail if we have no columns.
if (!hasColumns())
return;
-
+
ColumnInfo* colInfo = columnInfo();
-
+
// Determine which columns we intersect.
unsigned colCount = columnCount(colInfo);
if (!colCount)
@@ -5830,11 +5843,11 @@
ASSERT(hasColumns());
if (!hasColumns() || !style()->isFlippedBlocksWritingMode())
return;
-
+
ColumnInfo* colInfo = columnInfo();
LayoutUnit columnLogicalHeight = colInfo->columnHeight();
LayoutUnit expandedLogicalHeight = borderBefore() + paddingBefore() + columnCount(colInfo) * columnLogicalHeight + borderAfter() + paddingAfter() + scrollbarLogicalHeight();
-
+
if (isHorizontalWritingMode())
rect.setY(expandedLogicalHeight - rect.maxY());
else
@@ -5858,7 +5871,7 @@
LayoutRect sliceRect = LayoutRect(logicalLeft, borderBefore() + paddingBefore() + i * colLogicalHeight, colLogicalWidth, colLogicalHeight);
if (!isHorizontalWritingMode())
sliceRect = sliceRect.transposedRect();
-
+
LayoutUnit logicalOffset = i * colLogicalHeight;
// Now we're in the same coordinate space as the point. See if it is inside the rectangle.
@@ -5919,22 +5932,22 @@
// FIXME: The isFixed() calls here should probably be checking for isSpecified since you
// should be able to use percentage, calc or viewport relative values for width.
RenderStyle* styleToUse = style();
- if (!isTableCell() && styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() >= 0
+ if (!isTableCell() && styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() >= 0
&& !(isDeprecatedFlexItem() && !styleToUse->logicalWidth().intValue()))
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalWidth().value());
else
computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
-
+
if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
}
-
+
if (styleToUse->logicalMaxWidth().isFixed()) {
m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
}
-
+
// Table layout uses integers, ceil the preferred widths to ensure that they can contain the contents.
if (isTableCell()) {
m_minPreferredLogicalWidth = m_minPreferredLogicalWidth.ceil();
@@ -6002,7 +6015,7 @@
if (!result->isOutOfFlowPositioned() && (result->isText() || result->isFloating() || result->isReplaced() || result->isRenderInline()))
break;
-
+
current = result;
result = 0;
}
@@ -6077,8 +6090,8 @@
RenderObject* trailingSpaceChild = 0;
// Firefox and Opera will allow a table cell to grow to fit an image inside it under
- // very specific cirucumstances (in order to match common WinIE renderings).
- // Not supporting the quirk has caused us to mis-render some real sites. (See Bugzilla 10517.)
+ // very specific cirucumstances (in order to match common WinIE renderings).
+ // Not supporting the quirk has caused us to mis-render some real sites. (See Bugzilla 10517.)
bool allowImagesToBreak = !document()->inQuirksMode() || !isTableCell() || !styleToUse->logicalWidth().isIntrinsicOrAuto();
bool autoWrap, oldAutoWrap;
@@ -6096,7 +6109,7 @@
bool isPrevChildInlineFlow = false;
bool shouldBreakLineAfterText = false;
while (RenderObject* child = childIterator.next()) {
- autoWrap = child->isReplaced() ? child->parent()->style()->autoWrap() :
+ autoWrap = child->isReplaced() ? child->parent()->style()->autoWrap() :
child->style()->autoWrap();
if (!child->isBR()) {
@@ -6150,7 +6163,7 @@
inlineMin += childMin;
inlineMax += childMax;
-
+
child->setPreferredLogicalWidthsDirty(false);
} else {
// Inline replaced elts add in their margins to their min/max values.
@@ -6268,7 +6281,7 @@
}
continue;
}
-
+
if (stripFrontSpaces)
trailingSpaceChild = child;
else
@@ -6280,7 +6293,7 @@
ti = textIndent.ceilToFloat();
childMin += ti;
firstLineMinWidth += ti;
-
+
// It the text indent negative and larger than the child minimum, we re-use the remainder
// in future minimum calculations, but using the negative value again on the maximum
// will lead to under-counting the max pref width.
@@ -6289,13 +6302,13 @@
firstLineMaxWidth += ti;
addedTextIndent = true;
}
-
+
if (childMin < 0) {
textIndent = childMin;
hasRemainingNegativeTextIndent = true;
}
}
-
+
// If we have no breakable characters at all,
// then this is the easy case. We add ourselves to the current
// min and max and continue.
@@ -6416,7 +6429,7 @@
LayoutUnit w = childMinPreferredLogicalWidth + margin;
minLogicalWidth = max(w, minLogicalWidth);
-
+
// IE ignores tables for calculation of nowrap. Makes some sense.
if (nowrap && !child->isTable())
maxLogicalWidth = max(w, maxLogicalWidth);
@@ -6440,7 +6453,7 @@
maxLogicalWidth = max(floatLeftWidth + floatRightWidth, maxLogicalWidth);
floatLeftWidth = floatRightWidth = 0;
}
-
+
if (child->isFloating()) {
if (childStyle->floating() == LeftFloat)
floatLeftWidth += w;
@@ -6448,7 +6461,7 @@
floatRightWidth += w;
} else
maxLogicalWidth = max(w, maxLogicalWidth);
-
+
child = child->nextSibling();
}
@@ -6463,13 +6476,13 @@
{
if (!node())
return false;
-
+
if (node()->isRootEditableElement())
return true;
-
+
if (node()->isShadowRoot() && toShadowRoot(node())->host()->hasTagName(inputTag))
return true;
-
+
return false;
}
@@ -6487,7 +6500,7 @@
if (s != style())
return s->computedLineHeight(view());
}
-
+
if (m_lineHeight == -1)
m_lineHeight = style()->computedLineHeight(view());
@@ -6507,7 +6520,7 @@
// FIXME: Need to patch form controls to deal with vertical lines.
if (style()->hasAppearance() && !theme()->isControlContainer(style()->appearance()))
return theme()->baselinePosition(this);
-
+
// CSS2.1 states that the baseline of an inline block is the baseline of the last line box in
// the normal flow. We make an exception for marquees, since their baselines are meaningless
// (the content inside them moves). This matches WinIE as well, which just bottom-aligns them.
@@ -6516,13 +6529,13 @@
// of our content box.
bool ignoreBaseline = (layer() && (isMarquee() || (direction == HorizontalLine ? (layer()->verticalScrollbar() || layer()->scrollYOffset())
: (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
-
+
int baselinePos = ignoreBaseline ? -1 : inlineBlockBaseline(direction);
-
+
LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
if (baselinePos != -1 && baselinePos <= bottomOfContent)
return direction == HorizontalLine ? marginTop() + baselinePos : marginRight() + baselinePos;
-
+
return RenderBox::baselinePosition(baselineType, firstLine, direction, linePositionMode);
}
@@ -6620,11 +6633,11 @@
break;
ASSERT_WITH_SECURITY_IMPLICATION(parentBlock->isRenderBlock());
firstLineBlock = toRenderBlock(parentBlock);
- }
-
+ }
+
if (!hasPseudo)
return 0;
-
+
return firstLineBlock;
}
@@ -6673,11 +6686,11 @@
return firstLetterBlock;
RenderObject* parentBlock = firstLetterBlock->parent();
- if (firstLetterBlock->isReplaced() || !parentBlock || parentBlock->firstChild() != firstLetterBlock ||
+ if (firstLetterBlock->isReplaced() || !parentBlock || parentBlock->firstChild() != firstLetterBlock ||
!parentBlock->isBlockFlow() || (parentBlock->isFlexibleBox() && !parentBlock->isRenderButton()))
return 0;
firstLetterBlock = parentBlock;
- }
+ }
return 0;
}
@@ -6762,22 +6775,22 @@
// Account for first letter.
length++;
-
+
// Keep looking for whitespace and allowed punctuation, but avoid
// accumulating just whitespace into the :first-letter.
for (unsigned scanLength = length; scanLength < oldText->length(); ++scanLength) {
- UChar c = (*oldText)[scanLength];
-
+ UChar c = (*oldText)[scanLength];
+
if (!shouldSkipForFirstLetter(c))
break;
if (isPunctuationForFirstLetter(c))
length = scanLength + 1;
}
-
+
// Construct a text fragment for the text after the first letter.
// This text fragment might be empty.
- RenderTextFragment* remainingText =
+ RenderTextFragment* remainingText =
new (renderArena()) RenderTextFragment(textObj->node() ? textObj->node() : textObj->document(), oldText.get(), length, oldText->length() - length);
remainingText->setStyle(textObj->style());
if (remainingText->node())
@@ -6787,9 +6800,9 @@
firstLetterContainer->removeChild(textObj);
remainingText->setFirstLetter(firstLetter);
toRenderBoxModelObject(firstLetter)->setFirstLetterRemainingText(remainingText);
-
+
// construct text fragment for the first letter
- RenderTextFragment* letter =
+ RenderTextFragment* letter =
new (renderArena()) RenderTextFragment(remainingText->node() ? remainingText->node() : remainingText->document(), oldText.get(), 0, length);
letter->setStyle(pseudoStyle);
firstLetter->addChild(letter);
@@ -6887,7 +6900,7 @@
return normalFlowChildWithoutLines->y() + normalFlowChildWithoutLines->height();
}
}
-
+
return -1;
}
@@ -6975,7 +6988,7 @@
}
}
}
-
+
if (FloatingObjects* floats = floatingObjects()) {
const FloatingObjectSet& floatingObjectSet = floats->set();
FloatingObjectSetIterator end = floatingObjectSet.end();
@@ -7003,17 +7016,17 @@
LayoutUnit right = LayoutUnit::min();
LayoutUnit oldWidth = contentWidth();
adjustForBorderFit(0, left, right);
-
+
// Clamp to our existing edges. We can never grow. We only shrink.
LayoutUnit leftEdge = borderLeft() + paddingLeft();
LayoutUnit rightEdge = leftEdge + oldWidth;
left = min(rightEdge, max(leftEdge, left));
right = max(leftEdge, min(rightEdge, right));
-
+
LayoutUnit newContentWidth = right - left;
if (newContentWidth == oldWidth)
return;
-
+
setOverrideLogicalContentWidth(newContentWidth);
layoutBlock(false);
clearOverrideLogicalContentWidth();
@@ -7063,7 +7076,7 @@
ASSERT(value);
return;
}
-
+
if (!m_rareData && !value)
return;
@@ -7301,12 +7314,12 @@
// inline boxes above and below us (thus getting merged with them to form a single irregular
// shape).
if (inlineElementContinuation()) {
- // FIXME: This check really isn't accurate.
+ // FIXME: This check really isn't accurate.
bool nextInlineHasLineBox = inlineElementContinuation()->firstLineBox();
// FIXME: This is wrong. The principal renderer may not be the continuation preceding this block.
// FIXME: This is wrong for block-flows that are horizontal.
// https://bugs.webkit.org/show_bug.cgi?id=46781
- bool prevInlineHasLineBox = toRenderInline(inlineElementContinuation()->node()->renderer())->firstLineBox();
+ bool prevInlineHasLineBox = toRenderInline(inlineElementContinuation()->node()->renderer())->firstLineBox();
float topMargin = prevInlineHasLineBox ? collapsedMarginBefore() : LayoutUnit();
float bottomMargin = nextInlineHasLineBox ? collapsedMarginAfter() : LayoutUnit();
LayoutRect rect(additionalOffset.x(), additionalOffset.y() - topMargin, width(), height() + topMargin + bottomMargin);
@@ -7329,7 +7342,7 @@
RenderBox* box = toRenderBox(curr);
FloatPoint pos;
// FIXME: This doesn't work correctly with transforms.
- if (box->layer())
+ if (box->layer())
pos = curr->localToContainerPoint(FloatPoint(), paintContainer);
else
pos = FloatPoint(additionalOffset.x() + box->x(), additionalOffset.y() + box->y());
@@ -7391,7 +7404,7 @@
LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
if (!pageLogicalHeight)
return logicalOffset;
-
+
// The logicalOffset is in our coordinate space. We can add in our pushed offset.
LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset);
if (pageBoundaryRule == ExcludePageBoundary)
@@ -7497,7 +7510,7 @@
{
RenderView* renderView = view();
offset += offsetFromLogicalTopOfFirstPage();
-
+
RenderFlowThread* flowThread = flowThreadContainingBlock();
if (!flowThread) {
LayoutUnit pageLogicalHeight = renderView->layoutState()->m_pageLogicalHeight;
@@ -7509,7 +7522,7 @@
}
return remainingHeight;
}
-
+
return flowThread->pageRemainingLogicalHeightForOffset(offset, pageBoundaryRule);
}
@@ -7667,7 +7680,7 @@
// So go ahead and mark the item as dirty.
child->setChildNeedsLayout(true, MarkOnlyThis);
}
-
+
if (childRenderBlock) {
if (!child->avoidsFloats() && childRenderBlock->containsFloats())
childRenderBlock->markAllDescendantsWithFloatsForLayout();
@@ -7702,7 +7715,7 @@
// For replaced elements and scrolled elements, we want to shift them to the next page if they don't fit on the current one.
LayoutUnit logicalTopBeforeUnsplittableAdjustment = result;
LayoutUnit logicalTopAfterUnsplittableAdjustment = adjustForUnsplittableChild(child, result);
-
+
LayoutUnit paginationStrut = 0;
LayoutUnit unsplittableAdjustmentDelta = logicalTopAfterUnsplittableAdjustment - logicalTopBeforeUnsplittableAdjustment;
if (unsplittableAdjustmentDelta)
@@ -7726,7 +7739,7 @@
// Similar to how we apply clearance. Go ahead and boost height() to be the place where we're going to position the child.
setLogicalHeight(logicalHeight() + (result - oldTop));
-
+
// Return the final adjusted logical top.
return result;
}
@@ -7823,7 +7836,7 @@
{
if (!flowThread || !flowThread->hasValidRegionInfo())
return false;
-
+
return flowThread->logicalWidthChangedInRegions(this, offsetFromLogicalTopOfFirstPage());
}
@@ -7842,12 +7855,12 @@
RenderRegion* startRegion;
RenderRegion* endRegion;
flowThread->getRegionRangeForBox(this, startRegion, endRegion);
-
+
if (startRegion && region->logicalTopForFlowThreadContent() < startRegion->logicalTopForFlowThreadContent())
return startRegion;
if (endRegion && region->logicalTopForFlowThreadContent() > endRegion->logicalTopForFlowThreadContent())
return endRegion;
-
+
return region;
}
@@ -7857,14 +7870,14 @@
// collapsed margin.
if (!child->isWritingModeRoot())
return child->collapsedMarginBefore();
-
+
// The child has a different directionality. If the child is parallel, then it's just
// flipped relative to us. We can use the collapsed margin for the opposite edge.
if (child->isHorizontalWritingMode() == isHorizontalWritingMode())
return child->collapsedMarginAfter();
-
+
// The child is perpendicular to us, which means its margins don't collapse but are on the
- // "logical left/right" sides of the child box. We can just return the raw margin in this case.
+ // "logical left/right" sides of the child box. We can just return the raw margin in this case.
return marginBeforeForChild(child);
}
@@ -7874,14 +7887,14 @@
// collapsed margin.
if (!child->isWritingModeRoot())
return child->collapsedMarginAfter();
-
+
// The child has a different directionality. If the child is parallel, then it's just
// flipped relative to us. We can use the collapsed margin for the opposite edge.
if (child->isHorizontalWritingMode() == isHorizontalWritingMode())
return child->collapsedMarginBefore();
-
+
// The child is perpendicular to us, which means its margins don't collapse but are on the
- // "logical left/right" side of the child box. We can just return the raw margin in this case.
+ // "logical left/right" side of the child box. We can just return the raw margin in this case.
return marginAfterForChild(child);
}
@@ -7891,12 +7904,12 @@
// margin quirk.
if (!child->isWritingModeRoot())
return child->isRenderBlock() ? toRenderBlock(child)->hasMarginBeforeQuirk() : child->style()->hasMarginBeforeQuirk();
-
+
// The child has a different directionality. If the child is parallel, then it's just
// flipped relative to us. We can use the opposite edge.
if (child->isHorizontalWritingMode() == isHorizontalWritingMode())
return child->isRenderBlock() ? toRenderBlock(child)->hasMarginAfterQuirk() : child->style()->hasMarginAfterQuirk();
-
+
// The child is perpendicular to us and box sides are never quirky in html.css, and we don't really care about
// whether or not authors specified quirky ems, since they're an implementation detail.
return false;
@@ -7908,12 +7921,12 @@
// margin quirk.
if (!child->isWritingModeRoot())
return child->isRenderBlock() ? toRenderBlock(child)->hasMarginAfterQuirk() : child->style()->hasMarginAfterQuirk();
-
+
// The child has a different directionality. If the child is parallel, then it's just
// flipped relative to us. We can use the opposite edge.
if (child->isHorizontalWritingMode() == isHorizontalWritingMode())
return child->isRenderBlock() ? toRenderBlock(child)->hasMarginBeforeQuirk() : child->style()->hasMarginBeforeQuirk();
-
+
// The child is perpendicular to us and box sides are never quirky in html.css, and we don't really care about
// whether or not authors specified quirky ems, since they're an implementation detail.
return false;
@@ -7930,7 +7943,7 @@
LayoutUnit afterMargin = 0;
RenderBlock* childRenderBlock = child->isRenderBlock() ? toRenderBlock(child) : 0;
-
+
// If the child has the same directionality as we do, then we can just return its
// margins in the same direction.
if (!child->isWritingModeRoot()) {
@@ -7983,7 +7996,7 @@
{
if (isBody())
return "RenderBody"; // FIXME: Temporary hack until we know that the regression tests pass.
-
+
if (isFloating())
return "RenderBlock (floating)";
if (isOutOfFlowPositioned())
@@ -8036,10 +8049,10 @@
}
inline void RenderBlock::FloatingObjects::increaseObjectsCount(FloatingObject::Type type)
-{
+{
if (type == FloatingObject::FloatLeft)
m_leftObjectsCount++;
- else
+ else
m_rightObjectsCount++;
}
@@ -8067,7 +8080,7 @@
m_placedFloatsTree.add(intervalForFloatingObject(floatingObject));
#ifndef NDEBUG
- floatingObject->setIsInPlacedTree(true);
+ floatingObject->setIsInPlacedTree(true);
#endif
}
@@ -8079,7 +8092,7 @@
bool removed = m_placedFloatsTree.remove(intervalForFloatingObject(floatingObject));
ASSERT_UNUSED(removed, removed);
}
-
+
floatingObject->setIsPlaced(false);
#ifndef NDEBUG
floatingObject->setIsInPlacedTree(false);
diff --git a/Source/core/rendering/RenderBlock.h b/Source/core/rendering/RenderBlock.h
index c9d5442..8952c9e 100644
--- a/Source/core/rendering/RenderBlock.h
+++ b/Source/core/rendering/RenderBlock.h
@@ -33,8 +33,8 @@
#include "core/rendering/RootInlineBox.h"
#include "core/rendering/shapes/ShapeInsideInfo.h"
#include "core/rendering/style/ShapeValue.h"
-#include <wtf/ListHashSet.h>
-#include <wtf/OwnPtr.h>
+#include "wtf/ListHashSet.h"
+#include "wtf/OwnPtr.h"
namespace WebCore {
@@ -228,7 +228,7 @@
LayoutUnit textIndentOffset() const;
virtual VisiblePosition positionForPoint(const LayoutPoint&);
-
+
// Block flows subclass availableWidth to handle multi column layout (shrinking the width available to children when laying out.)
virtual LayoutUnit availableLogicalWidth() const OVERRIDE FINAL;
@@ -282,7 +282,7 @@
{
return obj->isFloating() || (obj->isOutOfFlowPositioned() && !obj->style()->isOriginalDisplayInlineType() && !obj->container()->isRenderInline());
}
-
+
static void appendRunsForObject(BidiRunList<BidiRun>&, int start, int end, RenderObject*, InlineBidiResolver&);
static TextRun constructTextRun(RenderObject* context, const Font& font, const String& string, RenderStyle* style,
@@ -307,7 +307,7 @@
int columnGap() const;
void updateColumnInfoFromStyle(RenderStyle*);
-
+
// These two functions take the ColumnInfo* to avoid repeated lookups of the info in the global HashMap.
unsigned columnCount(ColumnInfo*) const;
LayoutRect columnRectAt(ColumnInfo*, unsigned) const;
@@ -366,17 +366,17 @@
, m_positiveMarginAfter(afterPos)
, m_negativeMarginAfter(afterNeg)
{ }
-
+
LayoutUnit positiveMarginBefore() const { return m_positiveMarginBefore; }
LayoutUnit negativeMarginBefore() const { return m_negativeMarginBefore; }
LayoutUnit positiveMarginAfter() const { return m_positiveMarginAfter; }
LayoutUnit negativeMarginAfter() const { return m_negativeMarginAfter; }
-
+
void setPositiveMarginBefore(LayoutUnit pos) { m_positiveMarginBefore = pos; }
void setNegativeMarginBefore(LayoutUnit neg) { m_negativeMarginBefore = neg; }
void setPositiveMarginAfter(LayoutUnit pos) { m_positiveMarginAfter = pos; }
void setNegativeMarginAfter(LayoutUnit neg) { m_negativeMarginAfter = neg; }
-
+
private:
LayoutUnit m_positiveMarginBefore;
LayoutUnit m_negativeMarginBefore;
@@ -390,7 +390,7 @@
LayoutUnit logicalLeftOffsetForContent(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
LayoutUnit logicalRightOffsetForContent(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
LayoutUnit availableLogicalWidthForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
- {
+ {
return max<LayoutUnit>(0, logicalRightOffsetForContent(region, offsetFromLogicalTopOfFirstPage) -
logicalLeftOffsetForContent(region, offsetFromLogicalTopOfFirstPage)); }
LayoutUnit startOffsetForContent(RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
@@ -427,7 +427,7 @@
LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetForContent() + availableLogicalWidth(); }
LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDirection() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForContent(); }
LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirection() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForContent(); }
-
+
void setStaticInlinePositionForChild(RenderBox*, LayoutUnit blockOffset, LayoutUnit inlinePosition);
void updateStaticInlinePositionForChild(RenderBox*, LayoutUnit logicalTop);
@@ -467,7 +467,7 @@
LayoutUnit maxNegativeMarginBefore() const { return m_rareData ? m_rareData->m_margins.negativeMarginBefore() : RenderBlockRareData::negativeMarginBeforeDefault(this); }
LayoutUnit maxPositiveMarginAfter() const { return m_rareData ? m_rareData->m_margins.positiveMarginAfter() : RenderBlockRareData::positiveMarginAfterDefault(this); }
LayoutUnit maxNegativeMarginAfter() const { return m_rareData ? m_rareData->m_margins.negativeMarginAfter() : RenderBlockRareData::negativeMarginAfterDefault(this); }
-
+
void setMaxMarginBeforeValues(LayoutUnit pos, LayoutUnit neg);
void setMaxMarginAfterValues(LayoutUnit pos, LayoutUnit neg);
@@ -550,7 +550,7 @@
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual bool hasLineIfEmpty() const;
-
+
bool simplifiedLayout();
virtual void simplifiedNormalFlowLayout();
@@ -620,7 +620,7 @@
void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild);
void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild = 0);
-
+
virtual bool isSelfCollapsingBlock() const OVERRIDE FINAL;
virtual LayoutUnit collapsedMarginBefore() const OVERRIDE FINAL { return maxPositiveMarginBefore() - maxNegativeMarginBefore(); }
@@ -679,7 +679,7 @@
if (type == LeftFloat)
m_type = FloatLeft;
else if (type == RightFloat)
- m_type = FloatRight;
+ m_type = FloatRight;
}
FloatingObject(Type type, const LayoutRect& frameRect)
@@ -711,7 +711,7 @@
Type type() const { return static_cast<Type>(m_type); }
RenderBox* renderer() const { return m_renderer; }
-
+
bool isPlaced() const { return m_isPlaced; }
void setIsPlaced(bool placed = true) { m_isPlaced = placed; }
@@ -804,7 +804,7 @@
else
return child->x() + marginBeforeForChild(child->renderer());
}
-
+
LayoutUnit yPositionForFloatIncludingMargin(const FloatingObject* child) const
{
if (isHorizontalWritingMode())
@@ -842,11 +842,11 @@
EClear clear() { return m_clear; }
private:
void reset();
-
+
InlineIterator nextSegmentBreak(InlineBidiResolver&, LineInfo&, RenderTextInfo&, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements&);
void skipTrailingWhitespace(InlineIterator&, const LineInfo&);
void skipLeadingWhitespace(InlineBidiResolver&, LineInfo&, FloatingObject* lastFloatFromPreviousLine, LineWidth&);
-
+
RenderBlock* m_block;
bool m_hyphenated;
EClear m_clear;
@@ -858,7 +858,7 @@
void determineEndPosition(LineLayoutState&, RootInlineBox* startBox, InlineIterator& cleanLineStart, BidiStatus& cleanLineBidiStatus);
bool matchedEndLine(LineLayoutState&, const InlineBidiResolver&, const InlineIterator& endLineStart, const BidiStatus& endLineStatus);
bool checkPaginationAndFloatsAtEndLine(LineLayoutState&);
-
+
RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&);
InlineFlowBox* createLineBoxes(RenderObject*, const LineInfo&, InlineBox* childBox, bool startsNewSegment);
@@ -888,7 +888,7 @@
FloatingObject* insertFloatingObject(RenderBox*);
void removeFloatingObject(RenderBox*);
void removeFloatingObjectsBelow(FloatingObject*, int logicalOffset);
-
+
// Called from lineWidth, to position the floats added in the last line.
// Returns true if and only if it has positioned any floats.
bool positionNewFloats();
@@ -904,9 +904,9 @@
void addIntrudingFloats(RenderBlock* prev, LayoutUnit xoffset, LayoutUnit yoffset);
LayoutUnit addOverhangingFloats(RenderBlock* child, bool makeChildPaintOtherFloats);
- LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::FloatLeftRight) const;
+ LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::FloatLeftRight) const;
LayoutUnit nextFloatLogicalBottomBelow(LayoutUnit) const;
-
+
bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset);
@@ -923,7 +923,7 @@
virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const OVERRIDE FINAL;
virtual RenderStyle* outlineStyleForRepaint() const OVERRIDE FINAL;
-
+
virtual RenderObject* hoverAncestor() const OVERRIDE FINAL;
virtual void updateDragState(bool dragOn) OVERRIDE FINAL;
virtual void childBecameNonInline(RenderObject* child) OVERRIDE FINAL;
@@ -956,7 +956,7 @@
virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0) OVERRIDE FINAL;
void adjustPointToColumnContents(LayoutPoint&) const;
-
+
void fitBorderToLinesIfNeeded(); // Shrink the box in which the border paints if border-fit is set.
void adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const; // Helper function for borderFitAdjust
@@ -992,9 +992,9 @@
// also have a custom style property for Safari RSS to deal with TypePad blog articles.
bool m_quirkContainer : 1;
- // This flag tracks whether we are still looking at child margins that can all collapse together at the beginning of a block.
+ // This flag tracks whether we are still looking at child margins that can all collapse together at the beginning of a block.
// They may or may not collapse with the top margin of the block (|m_canCollapseTopWithChildren| tells us that), but they will
- // always be collapsing with one another. This variable can remain set to true through multiple iterations
+ // always be collapsing with one another. This variable can remain set to true through multiple iterations
// as long as we keep encountering self-collapsing blocks.
bool m_atBeforeSideOfBlock : 1;
@@ -1089,7 +1089,7 @@
// Pagination routines.
virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&);
-
+
// Returns the logicalOffset at the top of the next page. If the offset passed in is already at the top of the current page,
// then nextPageLogicalTop with ExcludePageBoundary will still move to the top of the next page. nextPageLogicalTop with
// IncludePageBoundary set will not.
@@ -1108,7 +1108,7 @@
LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const;
LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBoundaryRule = IncludePageBoundary) const;
-
+
protected:
bool pushToNextPageWithMinimumLogicalHeight(LayoutUnit& adjustment, LayoutUnit logicalOffset, LayoutUnit minimumLogicalHeight) const;
@@ -1160,12 +1160,12 @@
typedef PODInterval<int, FloatingObject*> FloatingObjectInterval;
typedef PODIntervalTree<int, FloatingObject*> FloatingObjectTree;
typedef PODFreeListArena<PODRedBlackTree<FloatingObjectInterval>::Node> IntervalArena;
-
+
template <FloatingObject::Type FloatTypeValue>
class FloatIntervalSearchAdapter {
public:
typedef FloatingObjectInterval IntervalType;
-
+
FloatIntervalSearchAdapter(const RenderBlock* renderer, int lowValue, int highValue, LayoutUnit& offset, LayoutUnit* heightRemaining)
: m_renderer(renderer)
, m_lowValue(lowValue)
@@ -1175,7 +1175,7 @@
, m_last(0)
{
}
-
+
inline int lowValue() const { return m_lowValue; }
inline int highValue() const { return m_highValue; }
void collectIfNeeded(const IntervalType&) const;
@@ -1222,7 +1222,7 @@
const FloatingObjectTree& placedFloatsTree()
{
computePlacedFloatsTreeIfNeeded();
- return m_placedFloatsTree;
+ return m_placedFloatsTree;
}
private:
FloatingObjects(const RenderBlock*, bool horizontalWritingMode);
@@ -1250,7 +1250,7 @@
struct RenderBlockRareData {
WTF_MAKE_NONCOPYABLE(RenderBlockRareData); WTF_MAKE_FAST_ALLOCATED;
public:
- RenderBlockRareData(const RenderBlock* block)
+ RenderBlockRareData(const RenderBlock* block)
: m_margins(positiveMarginBeforeDefault(block), negativeMarginBeforeDefault(block), positiveMarginAfterDefault(block), negativeMarginAfterDefault(block))
, m_paginationStrut(0)
, m_pageLogicalOffset(0)
@@ -1259,15 +1259,15 @@
, m_shouldBreakAtLineToAvoidWidow(false)
, m_discardMarginBefore(false)
, m_discardMarginAfter(false)
- {
+ {
}
static LayoutUnit positiveMarginBeforeDefault(const RenderBlock* block)
- {
+ {
return std::max<LayoutUnit>(block->marginBefore(), 0);
}
static LayoutUnit negativeMarginBeforeDefault(const RenderBlock* block)
- {
+ {
return std::max<LayoutUnit>(-block->marginBefore(), 0);
}
static LayoutUnit positiveMarginAfterDefault(const RenderBlock* block)
@@ -1278,11 +1278,11 @@
{
return std::max<LayoutUnit>(-block->marginAfter(), 0);
}
-
+
MarginValues m_margins;
LayoutUnit m_paginationStrut;
LayoutUnit m_pageLogicalOffset;
-
+
RootInlineBox* m_lineGridBox;
RootInlineBox* m_lineBreakToAvoidWidow;
@@ -1323,13 +1323,13 @@
};
inline RenderBlock* toRenderBlock(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlock());
return static_cast<RenderBlock*>(object);
}
inline const RenderBlock* toRenderBlock(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlock());
return static_cast<const RenderBlock*>(object);
}
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index 22231b7..6662e74 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -41,10 +41,10 @@
#include "core/rendering/shapes/ShapeInsideInfo.h"
#include "core/rendering/svg/RenderSVGInlineText.h"
#include "core/rendering/svg/SVGRootInlineBox.h"
-#include <wtf/RefCountedLeakCounter.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/unicode/CharacterNames.h>
-#include <wtf/Vector.h>
+#include "wtf/RefCountedLeakCounter.h"
+#include "wtf/StdLibExtras.h"
+#include "wtf/Vector.h"
+#include "wtf/unicode/CharacterNames.h"
using namespace std;
using namespace WTF;
@@ -176,8 +176,7 @@
if (previousFloat != newFloat && previousFloat->type() == newFloat->type()) {
previousShapeOutsideInfo = previousFloat->renderer()->shapeOutsideInfo();
if (previousShapeOutsideInfo) {
- LayoutUnit lineTopInShapeCoordinates = m_block->logicalHeight() - m_block->logicalTopForFloat(previousFloat);
- previousShapeOutsideInfo->computeSegmentsForLine(lineTopInShapeCoordinates, logicalHeightForLine(m_block, m_isFirstLine));
+ previousShapeOutsideInfo->computeSegmentsForContainingBlockLine(m_block->logicalHeight(), m_block->logicalTopForFloat(previousFloat), logicalHeightForLine(m_block, m_isFirstLine));
}
break;
}
@@ -185,7 +184,7 @@
ShapeOutsideInfo* shapeOutsideInfo = newFloat->renderer()->shapeOutsideInfo();
if (shapeOutsideInfo)
- shapeOutsideInfo->computeSegmentsForLine(m_block->logicalHeight() - m_block->logicalTopForFloat(newFloat), logicalHeightForLine(m_block, m_isFirstLine));
+ shapeOutsideInfo->computeSegmentsForContainingBlockLine(m_block->logicalHeight(), m_block->logicalTopForFloat(newFloat), logicalHeightForLine(m_block, m_isFirstLine));
if (newFloat->type() == RenderBlock::FloatingObject::FloatLeft) {
float newLeft = m_block->logicalRightForFloat(newFloat);
@@ -778,7 +777,7 @@
, endOffset(0)
{
}
-
+
RenderText* renderer;
float width;
int startOffset;
@@ -791,7 +790,7 @@
{
HashSet<const SimpleFontData*> fallbackFonts;
GlyphOverflow glyphOverflow;
-
+
const Font& font = renderer->style(lineInfo.isFirstLine())->font();
// Always compute glyph overflow if the block's line-box-contain value is "glyphs".
if (lineBox->fitsToGlyphs()) {
@@ -804,9 +803,9 @@
int boxAscent = font.fontMetrics().ascent() - baselineShift;
int boxDescent = font.fontMetrics().descent() + baselineShift;
if (boxAscent > rootDescent || boxDescent > rootAscent)
- glyphOverflow.computeBounds = true;
+ glyphOverflow.computeBounds = true;
}
-
+
LayoutUnit hyphenWidth = 0;
if (toInlineTextBox(run->m_box)->hasHyphen()) {
const Font& font = renderer->style(lineInfo.isFirstLine())->font();
@@ -823,10 +822,10 @@
#else
bool canUseSimpleFontCodePath = renderer->canUseSimpleFontCodePath();
#endif
-
+
// Since we don't cache glyph overflows, we need to re-measure the run if
// the style is linebox-contain: glyph.
-
+
if (!lineBox->fitsToGlyphs() && canUseSimpleFontCodePath) {
int lastEndOffset = run->m_start;
for (size_t i = 0, size = wordMeasurements.size(); i < size && lastEndOffset < run->m_stop; ++i) {
@@ -888,12 +887,12 @@
break;
if (!r->m_box || r == trailingSpaceRun)
continue;
-
+
if (r->m_object->isText()) {
unsigned opportunitiesInRun = expansionOpportunities[i++];
-
+
ASSERT(opportunitiesInRun <= expansionOpportunityCount);
-
+
// Only justify text if whitespace is collapsed.
if (r->m_object->style()->collapseWhiteSpace()) {
InlineTextBox* textBox = toInlineTextBox(r->m_box);
@@ -1033,7 +1032,7 @@
lineBox->placeBoxesInInlineDirection(lineLogicalLeft, needsWordSpacing, textBoxDataMap);
}
-BidiRun* RenderBlock::computeInlineDirectionPositionsForSegment(RootInlineBox* lineBox, const LineInfo& lineInfo, ETextAlign textAlign, float& logicalLeft,
+BidiRun* RenderBlock::computeInlineDirectionPositionsForSegment(RootInlineBox* lineBox, const LineInfo& lineInfo, ETextAlign textAlign, float& logicalLeft,
float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache,
WordMeasurements& wordMeasurements)
{
@@ -1413,18 +1412,18 @@
bool usesRepaintBounds() const { return m_usesRepaintBounds; }
void setRepaintRange(LayoutUnit logicalHeight)
- {
+ {
m_usesRepaintBounds = true;
- m_repaintLogicalTop = m_repaintLogicalBottom = logicalHeight;
+ m_repaintLogicalTop = m_repaintLogicalBottom = logicalHeight;
}
-
+
void updateRepaintRangeFromBox(RootInlineBox* box, LayoutUnit paginationDelta = 0)
{
m_usesRepaintBounds = true;
m_repaintLogicalTop = min(m_repaintLogicalTop, box->logicalTopVisualOverflow() + min<LayoutUnit>(paginationDelta, 0));
m_repaintLogicalBottom = max(m_repaintLogicalBottom, box->logicalBottomVisualOverflow() + max<LayoutUnit>(paginationDelta, 0));
}
-
+
bool endLineMatched() const { return m_endLineMatched; }
void setEndLineMatched(bool endLineMatched) { m_endLineMatched = endLineMatched; }
@@ -1444,10 +1443,10 @@
void setLastFloat(RenderBlock::FloatingObject* lastFloat) { m_lastFloat = lastFloat; }
Vector<RenderBlock::FloatWithRect>& floats() { return m_floats; }
-
+
unsigned floatIndex() const { return m_floatIndex; }
void setFloatIndex(unsigned floatIndex) { m_floatIndex = floatIndex; }
-
+
RenderFlowThread* flowThread() const { return m_flowThread; }
void setFlowThread(RenderFlowThread* thread) { m_flowThread = thread; }
@@ -1460,7 +1459,7 @@
LayoutUnit m_endLineLogicalTop;
bool m_endLineMatched;
bool m_checkForFloatsFromLastLine;
-
+
bool m_isFullLayout;
// FIXME: Should this be a range object instead of two ints?
@@ -1468,7 +1467,7 @@
LayoutUnit& m_repaintLogicalBottom;
bool m_usesRepaintBounds;
-
+
RenderFlowThread* m_flowThread;
};
@@ -1862,7 +1861,7 @@
deleteLineRange(layoutState, renderArena(), layoutState.endLine());
}
}
-
+
if (floatingObjects() && (layoutState.checkForFloatsFromLastLine() || positionNewFloats()) && lastRootBox()) {
// In case we have a float on the last line, it might not be positioned up to now.
// This has to be done before adding in the bottom border/padding, or the float will
@@ -1919,7 +1918,7 @@
void RenderBlock::layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom)
{
setLogicalHeight(borderBefore() + paddingBefore());
-
+
// Lay out our hypothetical grid line as though it occurs at the top of the block.
if (view()->layoutState() && view()->layoutState()->lineGrid() == this)
layoutLineGridBox();
@@ -2232,11 +2231,11 @@
return false;
}
}
-
+
FloatingObjects* floats = floatingObjects();
if (!lineDelta || !floats)
return true;
-
+
// See if any floats end in the range along which we want to shift the lines vertically.
LayoutUnit logicalTop = min(logicalHeight(), layoutState.endLineLogicalTop());
@@ -2275,7 +2274,7 @@
// We have a match.
if (line->lineBreakBidiStatus() != resolver.status())
return false; // ...but the bidi state doesn't match.
-
+
bool matched = false;
RootInlineBox* result = line->nextRootBox();
layoutState.setEndLine(result);
@@ -2307,7 +2306,7 @@
static bool requiresLineBoxForContent(RenderInline* flow, const LineInfo& lineInfo)
{
RenderObject* parent = flow->parent();
- if (flow->document()->inNoQuirksMode()
+ if (flow->document()->inNoQuirksMode()
&& (flow->style(lineInfo.isFirstLine())->lineHeight() != parent->style(lineInfo.isFirstLine())->lineHeight()
|| flow->style()->verticalAlign() != parent->style()->verticalAlign()
|| !parent->style()->font().fontMetrics().hasIdenticalAscentDescentAndLineGap(flow->style()->font().fontMetrics())))
@@ -2730,7 +2729,7 @@
trailingObjects.clear();
lineInfo.setPreviousLineBrokeCleanly(true);
- // A <br> with clearance always needs a linebox in case the lines below it get dirtied later and
+ // A <br> with clearance always needs a linebox in case the lines below it get dirtied later and
// need to check for floats to clear - so if we're ignoring spaces, stop ignoring them and add a
// run for this object.
if (ignoringSpaces && currentStyle->clear() != CNONE)
@@ -2964,11 +2963,11 @@
wordMeasurements.grow(wordMeasurements.size() + 1);
WordMeasurement& wordMeasurement = wordMeasurements.last();
-
+
wordMeasurement.renderer = t;
wordMeasurement.endOffset = current.m_pos;
wordMeasurement.startOffset = lastSpace;
-
+
float additionalTmpW;
if (wordTrailingSpaceWidth && c == ' ')
additionalTmpW = textWidth(t, lastSpace, current.m_pos + 1 - lastSpace, f, width.currentWidth(), isFixedPitch, collapseWhiteSpace, &wordMeasurement.fallbackFonts, textLayout) - wordTrailingSpaceWidth;
@@ -3420,7 +3419,7 @@
setLineGridBox(0);
return;
}
-
+
setLineGridBox(0);
RootInlineBox* lineGridBox = new (renderArena()) RootInlineBox(this);
@@ -3429,9 +3428,9 @@
GlyphOverflowAndFallbackFontsMap textBoxDataMap;
VerticalPositionCache verticalPositionCache;
lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, verticalPositionCache);
-
+
setLineGridBox(lineGridBox);
-
+
// FIXME: If any of the characteristics of the box change compared to the old one, then we need to do a deep dirtying
// (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
// to this grid.
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 12360ed..e596013 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -108,7 +108,7 @@
{
if (!region)
return borderBoxRect();
-
+
// Compute the logical width and placement in this region.
RenderBoxRegionInfo* boxInfo = renderBoxRegionInfo(region, offsetFromTopOfFirstPage, cacheFlag);
if (!boxInfo)
@@ -117,7 +117,7 @@
// We have cached insets.
LayoutUnit logicalWidth = boxInfo->logicalWidth();
LayoutUnit logicalLeft = boxInfo->logicalLeft();
-
+
// Now apply the parent inset since it is cumulative whenever anything in the containing block chain shifts.
// FIXME: Doesn't work right with perpendicular writing modes.
const RenderBlock* currentBox = containingBlock();
@@ -133,7 +133,7 @@
region = currentBox->clampToStartAndEndRegions(region);
currentBoxInfo = currentBox->renderBoxRegionInfo(region, offsetFromTopOfFirstPage);
}
-
+
if (cacheFlag == DoNotCacheRenderBoxRegionInfo)
delete boxInfo;
@@ -207,11 +207,11 @@
if (diff >= StyleDifferenceRepaint && node() &&
(isHTMLHtmlElement(node()) || node()->hasTagName(bodyTag))) {
view()->repaint();
-
+
if (oldStyle->hasEntirelyFixedBackground() != newStyle->hasEntirelyFixedBackground())
view()->compositor()->rootFixedBackgroundsChanged();
}
-
+
// When a layout hint happens and an object's position style changes, we have to do a layout
// to dirty the render tree using the old position value now.
if (diff == StyleDifferenceLayout && parent() && oldStyle->position() != newStyle->position()) {
@@ -711,12 +711,12 @@
bool RenderBox::logicalScroll(ScrollLogicalDirection direction, ScrollGranularity granularity, float multiplier, Node** stopNode)
{
bool scrolled = false;
-
+
RenderLayer* l = layer();
if (l) {
if (l->scroll(logicalToPhysical(direction, isHorizontalWritingMode(), style()->isFlippedBlocksWritingMode()), granularity, multiplier))
scrolled = true;
-
+
if (scrolled) {
if (stopNode)
*stopNode = node();
@@ -737,7 +737,7 @@
{
return canBeProgramaticallyScrolled() && (scrollHeight() != clientHeight() || scrollWidth() != clientWidth());
}
-
+
bool RenderBox::canBeProgramaticallyScrolled() const
{
return (hasOverflowClip() && (scrollsOverflow() || (node() && node()->rendererIsEditable()))) || (node() && node()->isDocumentNode());
@@ -869,7 +869,7 @@
#endif
const_cast<RenderBox*>(this)->computePreferredLogicalWidths();
}
-
+
return m_minPreferredLogicalWidth;
}
@@ -881,7 +881,7 @@
#endif
const_cast<RenderBox*>(this)->computePreferredLogicalWidths();
}
-
+
return m_maxPreferredLogicalWidth;
}
@@ -1062,7 +1062,7 @@
return;
RenderObject* rootBackgroundRenderer = rendererForRootBackground();
-
+
const FillLayer* bgLayer = rootBackgroundRenderer->style()->backgroundLayers();
Color bgColor = rootBackgroundRenderer->resolveColor(CSSPropertyBackgroundColor);
@@ -1082,7 +1082,7 @@
AffineTransform ctm = context->getCTM();
FloatSize contextScaling(static_cast<float>(ctm.xScale()), static_cast<float>(ctm.yScale()));
- // Because RoundedRect uses IntRect internally the inset applied by the
+ // Because RoundedRect uses IntRect internally the inset applied by the
// BackgroundBleedShrinkBackground strategy cannot be less than one integer
// layout coordinate, even with subpixel layout enabled. To take that into
// account, we clamp the contextScaling to 1.0 for the following test so
@@ -1091,9 +1091,9 @@
// coordinates.
// This precaution will become obsolete if RoundedRect is ever promoted to
// a sub-pixel representation.
- if (contextScaling.width() > 1)
+ if (contextScaling.width() > 1)
contextScaling.setWidth(1);
- if (contextScaling.height() > 1)
+ if (contextScaling.height() > 1)
contextScaling.setHeight(1);
if (borderObscuresBackgroundEdge(contextScaling))
@@ -1330,7 +1330,7 @@
CompositeOperator compositeOp = CompositeSourceOver;
bool allMaskImagesLoaded = true;
-
+
if (!compositedMask || flattenCompositingLayers) {
pushTransparencyLayer = true;
StyleImage* maskBoxImage = style()->maskBoxImage().image();
@@ -1352,7 +1352,7 @@
paintFillLayers(paintInfo, Color(), style()->maskLayers(), paintRect, BackgroundBleedNone, compositeOp);
paintNinePieceImage(paintInfo.context, paintRect, style(), style()->maskBoxImage(), compositeOp);
}
-
+
if (pushTransparencyLayer)
paintInfo.context->endTransparencyLayer();
}
@@ -1362,12 +1362,12 @@
const NinePieceImage& maskBoxImage = style()->maskBoxImage();
if (maskBoxImage.image()) {
LayoutRect borderImageRect = borderBoxRect();
-
+
// Apply outsets to the border box.
borderImageRect.expand(style()->maskBoxImageOutsets());
return borderImageRect;
}
-
+
LayoutRect result;
LayoutRect borderBox = borderBoxRect();
for (const FillLayer* maskLayer = style()->maskLayers(); maskLayer; maskLayer = maskLayer->next()) {
@@ -1389,7 +1389,7 @@
while (curLayer) {
layers.append(curLayer);
// Stop traversal when an opaque layer is encountered.
- // FIXME : It would be possible for the following occlusion culling test to be more aggressive
+ // FIXME : It would be possible for the following occlusion culling test to be more aggressive
// on layers with no repeat by testing whether the image covers the layout rect.
// Testing that here would imply duplicating a lot of calculations that are currently done in
// RenderBoxModelObject::paintFillLayerExtended. A more efficient solution might be to move
@@ -1503,13 +1503,13 @@
{
if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseSelfOutline || paintInfo.phase == PaintPhaseMask)
return false;
-
+
bool isControlClip = hasControlClip();
bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer();
-
+
if (!isControlClip && !isOverflowClip)
return false;
-
+
if (paintInfo.phase == PaintPhaseOutline)
paintInfo.phase = PaintPhaseChildOutlines;
else if (paintInfo.phase == PaintPhaseChildBlockBackground) {
@@ -1587,7 +1587,7 @@
}
LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
-{
+{
RenderRegion* containingBlockRegion = 0;
LayoutUnit logicalTopPosition = logicalTop();
LayoutUnit adjustedPageOffsetForContainingBlock = offsetFromLogicalTopOfFirstPage - logicalTop();
@@ -1613,7 +1613,7 @@
else
result += startOffset - startContentSide;
}
-
+
if (childMarginEnd > 0) {
LayoutUnit endContentSide = cb->endOffsetForContent(containingBlockRegion, adjustedPageOffsetForContainingBlock);
LayoutUnit endContentSideWithMargin = endContentSide + childMarginEnd;
@@ -1730,9 +1730,9 @@
if (wasFixed)
*wasFixed = mode & IsFixed;
-
+
LayoutSize containerOffset = offsetFromContainer(o, roundedLayoutPoint(transformState.mappedPoint()));
-
+
bool preserve3D = mode & UseTransforms && (o->style()->preserves3D() || style()->preserves3D());
if (mode & UseTransforms && shouldUseTransformFromContainer(o)) {
TransformationMatrix t;
@@ -1779,7 +1779,7 @@
// 337 regions tests to fail.
ASSERT(o == container() || o->isRenderRegion());
- LayoutSize offset;
+ LayoutSize offset;
if (isInFlowPositioned())
offset += offsetForInFlowPosition();
@@ -1883,7 +1883,7 @@
// repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
r.move(v->layoutDelta());
}
-
+
if (style()) {
// We have to use maximalOutlineSize() because a child might have an outline
// that projects outside of our overflowRect.
@@ -1892,7 +1892,7 @@
r.inflate(v->maximalOutlineSize());
}
}
-
+
computeRectForRepaint(repaintContainer, r);
return r;
}
@@ -1969,7 +1969,7 @@
// flag on the RenderObject has been cleared, so use the one on the style().
topLeft += layer()->offsetForInFlowPosition();
}
-
+
if (position != AbsolutePosition && position != FixedPosition && o->hasColumns() && o->isBlockFlow()) {
LayoutRect repaintRect(topLeft, rect.size());
toRenderBlock(o)->adjustRectForColumns(repaintRect);
@@ -2096,7 +2096,7 @@
RenderBlock* cb = containingBlock();
LayoutUnit containerLogicalWidth = max<LayoutUnit>(0, containingBlockLogicalWidthForContentInRegion(region, offsetFromLogicalTopOfFirstPage));
bool hasPerpendicularContainingBlock = cb->isHorizontalWritingMode() != isHorizontalWritingMode();
-
+
if (isInline() && !isInlineBlockOrInlineTable()) {
// just calculate margins
RenderView* renderView = view();
@@ -2132,7 +2132,7 @@
hasInvertedDirection ? computedValues.m_margins.m_end : computedValues.m_margins.m_start,
hasInvertedDirection ? computedValues.m_margins.m_start : computedValues.m_margins.m_end);
}
-
+
if (!hasPerpendicularContainingBlock && containerLogicalWidth && containerLogicalWidth != (computedValues.m_extent + computedValues.m_margins.m_start + computedValues.m_margins.m_end)
&& !isFloating() && !isInline() && !cb->isFlexibleBoxIncludingDeprecated() && !cb->isRenderGrid()) {
LayoutUnit newMargin = containerLogicalWidth - computedValues.m_extent - cb->marginStartForChild(this);
@@ -2213,7 +2213,7 @@
LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd);
if (shrinkToAvoidFloats() && cb->containsFloats())
- logicalWidthResult = min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, region, offsetFromLogicalTopOfFirstPage));
+ logicalWidthResult = min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, region, offsetFromLogicalTopOfFirstPage));
if (widthType == MainOrPreferredSize && sizesLogicalWidthToFitContent(widthType))
return max(minPreferredLogicalWidth(), min(maxPreferredLogicalWidth(), logicalWidthResult));
@@ -2333,15 +2333,15 @@
marginStart = centeredMarginBoxStart + marginStartWidth;
marginEnd = containerWidth - childWidth - marginStart + marginEndWidth;
return;
- }
-
+ }
+
// Case Two: The object is being pushed to the start of the containing block's available logical width.
if (marginEndLength.isAuto() && childWidth < containerWidth) {
marginStart = valueForLength(marginStartLength, containerWidth, renderView);
marginEnd = containerWidth - childWidth - marginStart;
return;
- }
-
+ }
+
// Case Three: The object is being pushed to the end of the containing block's available logical width.
bool pushToEndFromTextAlign = !marginEndLength.isAuto() && ((!containingBlockStyle->isLeftToRightDirection() && containingBlockStyle->textAlign() == WEBKIT_LEFT)
|| (containingBlockStyle->isLeftToRightDirection() && containingBlockStyle->textAlign() == WEBKIT_RIGHT));
@@ -2349,8 +2349,8 @@
marginEnd = valueForLength(marginEndLength, containerWidth, renderView);
marginStart = containerWidth - childWidth - marginEnd;
return;
- }
-
+ }
+
// Case Four: Either no auto margins, or our width is >= the container width (css2.1, 10.3.3). In that case
// auto margins will just turn into 0.
marginStart = minimumValueForLength(marginStartLength, containerWidth, renderView);
@@ -2386,7 +2386,7 @@
offsetFromLogicalTopOfFirstPage - logicalTop());
LayoutUnit containingBlockLogicalWidth = cb->logicalWidth();
LayoutUnit containingBlockLogicalWidthInRegion = containingBlockInfo ? containingBlockInfo->logicalWidth() : containingBlockLogicalWidth;
-
+
LayoutUnit marginStartInRegion = computedValues.m_margins.m_start;
LayoutUnit startMarginDelta = marginStartInRegion - marginStart();
LayoutUnit logicalWidthInRegion = computedValues.m_extent;
@@ -2398,7 +2398,7 @@
LayoutUnit logicalRightDelta = isOutOfFlowPositioned() ? logicalRightInRegion - oldLogicalRight : startMarginDelta;
LayoutUnit logicalLeftOffset = 0;
-
+
if (!isOutOfFlowPositioned() && avoidsFloats() && cb->containsFloats()) {
LayoutUnit startPositionDelta = cb->computeStartPositionDeltaForChildAvoidingFloats(this, marginStartInRegion, region, offsetFromLogicalTopOfFirstPage);
if (cb->style()->isLeftToRightDirection())
@@ -2411,7 +2411,7 @@
logicalLeftOffset += logicalLeftDelta;
else
logicalLeftOffset -= (widthDelta + logicalRightDelta);
-
+
LayoutUnit logicalRightOffset = logicalWidth() - (logicalLeftOffset + logicalWidthInRegion);
bool isShifted = (containingBlockInfo && containingBlockInfo->isShifted())
|| (style()->isLeftToRightDirection() && logicalLeftOffset)
@@ -2477,7 +2477,7 @@
else {
RenderBlock* cb = containingBlock();
bool hasPerpendicularContainingBlock = cb->isHorizontalWritingMode() != isHorizontalWritingMode();
-
+
if (!hasPerpendicularContainingBlock) {
bool shouldFlipBeforeAfter = cb->style()->writingMode() != style()->writingMode();
computeBlockDirectionMargins(cb,
@@ -2540,7 +2540,7 @@
}
computedValues.m_extent = heightResult;
-
+
if (hasPerpendicularContainingBlock) {
bool shouldFlipBeforeAfter = shouldFlipBeforeAfterMargins(cb->style(), style());
computeInlineDirectionMargins(cb, containingBlockLogicalWidthForContent(), heightResult,
@@ -2551,8 +2551,8 @@
// WinIE quirk: The <html> block always fills the entire canvas in quirks mode. The <body> always fills the
// <html> block in quirks mode. Only apply this quirk if the block is normal flow and no height
- // is specified. When we're printing, we also need this quirk if the body or root has a percentage
- // height since we don't set a height in RenderView when we're printing. So without this quirk, the
+ // is specified. When we're printing, we also need this quirk if the body or root has a percentage
+ // height since we don't set a height in RenderView when we're printing. So without this quirk, the
// height has nothing to be a percentage of, and it ends up being 0. That is bad.
bool paginatedContentNeedsBaseHeight = document()->printing() && h.isPercent()
&& (isRoot() || (isBody() && document()->documentElement()->renderer()->style()->logicalHeight().isPercent())) && !isInline();
@@ -2638,7 +2638,7 @@
LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
{
LayoutUnit availableHeight = -1;
-
+
bool skippedAutoHeightContainingBlock = false;
RenderBlock* cb = containingBlock();
const RenderBox* containingBlockChild = this;
@@ -2821,7 +2821,7 @@
LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(newContentHeight);
return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, newHeight));
}
-
+
// FIXME: availableLogicalHeight() is wrong if the replaced element's block-flow is perpendicular to the
// containing block's block-flow.
// https://bugs.webkit.org/show_bug.cgi?id=46496
@@ -3024,7 +3024,7 @@
return toRenderFlowThread(containingBlock)->contentLogicalHeightOfFirstRegion();
return result;
}
-
+
ASSERT(containingBlock->isRenderInline() && containingBlock->isInFlowPositioned());
const RenderInline* flow = toRenderInline(containingBlock);
@@ -3122,7 +3122,7 @@
// We don't use containingBlock(), since we may be positioned by an enclosing
// relative positioned inline.
const RenderBoxModelObject* containerBlock = toRenderBoxModelObject(container());
-
+
const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, region, offsetFromLogicalTopOfFirstPage);
// Use the container block's direction except when calculating the static distance
@@ -3165,7 +3165,7 @@
// see FIXME 1
// Calculate the static distance if needed.
computeInlineStaticDistance(logicalLeftLength, logicalRightLength, this, containerBlock, containerLogicalWidth, region);
-
+
// Calculate constraint equation values for 'width' case.
computePositionedLogicalWidthUsing(style()->logicalWidth(), containerBlock, containerDirection,
containerLogicalWidth, bordersPlusPadding,
@@ -3207,7 +3207,7 @@
}
computedValues.m_extent += bordersPlusPadding;
-
+
// Adjust logicalLeft if we need to for the flipped version of our writing mode in regions.
// FIXME: Add support for other types of objects as containerBlock, not only RenderBlock.
RenderFlowThread* flowThread = flowThreadContainingBlock();
@@ -3426,7 +3426,7 @@
{
if (!logicalTop.isAuto() || !logicalBottom.isAuto())
return;
-
+
// FIXME: The static distance computation has not been patched for mixed writing modes.
LayoutUnit staticLogicalTop = child->layer()->staticBlockPosition() - containerBlock->borderBefore();
for (RenderObject* curr = child->parent(); curr && curr != containerBlock; curr = curr->container()) {
@@ -3526,7 +3526,7 @@
// Set final height value.
computedValues.m_extent += bordersPlusPadding;
-
+
// Adjust logicalTop if we need to for perpendicular writing modes in regions.
// FIXME: Add support for other types of objects as containerBlock, not only RenderBlock.
RenderFlowThread* flowThread = flowThreadContainingBlock();
@@ -4061,7 +4061,7 @@
if (isTable() && nonPseudoNode()) {
LayoutUnit right = contentWidth() + borderAndPaddingWidth();
LayoutUnit bottom = contentHeight() + borderAndPaddingHeight();
-
+
if (point.x() < 0 || point.x() > right || point.y() < 0 || point.y() > bottom) {
if (point.x() <= right / 2)
return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoNode()));
@@ -4080,17 +4080,17 @@
if ((!renderObject->firstChild() && !renderObject->isInline() && !renderObject->isBlockFlow() )
|| renderObject->style()->visibility() != VISIBLE)
continue;
-
+
if (!renderObject->isBox())
continue;
-
+
RenderBox* renderer = toRenderBox(renderObject);
LayoutUnit top = renderer->borderTop() + renderer->paddingTop() + (isTableRow() ? LayoutUnit() : renderer->y());
LayoutUnit bottom = top + renderer->contentHeight();
LayoutUnit left = renderer->borderLeft() + renderer->paddingLeft() + (isTableRow() ? LayoutUnit() : renderer->x());
LayoutUnit right = left + renderer->contentWidth();
-
+
if (point.x() <= right && point.x() >= left && point.y() <= top && point.y() >= bottom) {
if (renderer->isTableRow())
return renderer->positionForPoint(point + adjustedPoint - renderer->locationOffset());
@@ -4129,10 +4129,10 @@
minDist = dist;
}
}
-
+
if (closestRenderer)
return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset());
-
+
return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoNode()));
}
@@ -4141,7 +4141,7 @@
// Floating objects don't shrink. Objects that don't avoid floats don't shrink. Marquees don't shrink.
if ((isInline() && !isMarquee()) || !avoidsFloats() || isFloating())
return false;
-
+
// Only auto width objects can possibly shrink to avoid floats.
return style()->width().isAuto();
}
@@ -4158,13 +4158,13 @@
bool isFlipped = style()->isFlippedBlocksWritingMode();
bool isHorizontal = isHorizontalWritingMode();
-
+
LayoutRect borderBox = borderBoxRect();
LayoutUnit overflowMinX = borderBox.x();
LayoutUnit overflowMaxX = borderBox.maxX();
LayoutUnit overflowMinY = borderBox.y();
LayoutUnit overflowMaxY = borderBox.maxY();
-
+
// Compute box-shadow overflow first.
if (style()->boxShadow()) {
LayoutUnit shadowLeft;
@@ -4183,7 +4183,7 @@
// Now compute border-image-outset overflow.
if (style()->hasBorderImageOutsets()) {
LayoutBoxExtent borderOutsets = style()->borderImageOutsets();
-
+
// In flipped blocks writing modes, the physical sides are inverted. For example in vertical-rl, the right
// border is at the lower x coordinate value.
overflowMinX = min(overflowMinX, borderBox.x() - ((!isFlipped || isHorizontal) ? borderOutsets.left() : borderOutsets.right()));
@@ -4208,7 +4208,7 @@
LayoutRect childLayoutOverflowRect = child->layoutOverflowRectForPropagation(style());
childLayoutOverflowRect.move(delta);
addLayoutOverflow(childLayoutOverflowRect);
-
+
// Add in visual overflow from the child. Even if the child clips its overflow, it may still
// have visual overflow of its own set from box shadows or reflections. It is unnecessary to propagate this
// overflow if we are clipping our own overflow.
@@ -4221,14 +4221,14 @@
void RenderBox::addLayoutOverflow(const LayoutRect& rect)
{
- LayoutRect clientBox = clientBoxRect();
+ LayoutRect clientBox = noOverflowRect();
if (clientBox.contains(rect) || rect.isEmpty())
return;
-
+
// For overflow clip objects, we don't want to propagate overflow into unreachable areas.
LayoutRect overflowRect(rect);
if (hasOverflowClip() || isRenderView()) {
- // Overflow is in the block's coordinate space and thus is flipped for horizontal-bt and vertical-rl
+ // Overflow is in the block's coordinate space and thus is flipped for horizontal-bt and vertical-rl
// writing modes. At this stage that is actually a simplification, since we can treat horizontal-tb/bt as the same
// and vertical-lr/rl as the same.
bool hasTopOverflow = !style()->isLeftToRightDirection() && !isHorizontalWritingMode();
@@ -4256,7 +4256,7 @@
overflowRect.shiftXEdgeTo(max(overflowRect.x(), clientBox.x()));
else
overflowRect.shiftMaxXEdgeTo(min(overflowRect.maxX(), clientBox.maxX()));
-
+
// Now re-test with the adjusted rectangle and see if it has become unreachable or fully
// contained.
if (clientBox.contains(overflowRect) || overflowRect.isEmpty())
@@ -4265,7 +4265,7 @@
if (!m_overflow)
m_overflow = adoptPtr(new RenderOverflow(clientBox, borderBoxRect()));
-
+
m_overflow->addLayoutOverflow(overflowRect);
}
@@ -4274,10 +4274,10 @@
LayoutRect borderBox = borderBoxRect();
if (borderBox.contains(rect) || rect.isEmpty())
return;
-
+
if (!m_overflow)
- m_overflow = adoptPtr(new RenderOverflow(clientBoxRect(), borderBox));
-
+ m_overflow = adoptPtr(new RenderOverflow(noOverflowRect(), borderBox));
+
m_overflow->addVisualOverflow(rect);
}
@@ -4285,13 +4285,14 @@
{
if (!m_overflow)
return;
-
- if (visualOverflowRect() == borderBoxRect()) {
+
+ LayoutRect noOverflowRect = this->noOverflowRect();
+ if (visualOverflowRect() == noOverflowRect) {
m_overflow.clear();
return;
}
-
- m_overflow->setLayoutOverflow(borderBoxRect());
+
+ m_overflow->setLayoutOverflow(noOverflowRect);
}
inline static bool percentageLogicalHeightIsResolvable(const RenderBox* box)
@@ -4349,7 +4350,7 @@
bool isHorizontal = isHorizontalWritingMode();
if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverflowX()))
return false;
-
+
// We do have overflow. We'll still be willing to paginate as long as the block
// has auto logical height, auto or undefined max-logical-height and a zero or auto min-logical-height.
// Note this is just a heuristic, and it's still possible to have overflow under these
@@ -4407,12 +4408,12 @@
LayoutRect RenderBox::visualOverflowRectForPropagation(RenderStyle* parentStyle) const
{
- // If the writing modes of the child and parent match, then we don't have to
+ // If the writing modes of the child and parent match, then we don't have to
// do anything fancy. Just return the result.
LayoutRect rect = visualOverflowRect();
if (parentStyle->writingMode() == style()->writingMode())
return rect;
-
+
// We are putting ourselves into our parent's coordinate space. If there is a flipped block mismatch
// in a particular axis, then we have to flip the rect along that axis.
if (style()->writingMode() == RightToLeftWritingMode || parentStyle->writingMode() == RightToLeftWritingMode)
@@ -4444,22 +4445,22 @@
// this rectangle into physical coordinates, apply relative positioning and transforms
// to it, and then convert it back.
flipForWritingMode(rect);
-
+
if (hasTransform)
rect = layer()->currentTransform().mapRect(rect);
if (isInFlowPositioned())
rect.move(offsetForInFlowPosition());
-
+
// Now we need to flip back.
flipForWritingMode(rect);
}
-
- // If the writing modes of the child and parent match, then we don't have to
+
+ // If the writing modes of the child and parent match, then we don't have to
// do anything fancy. Just return the result.
if (parentStyle->writingMode() == style()->writingMode())
return rect;
-
+
// We are putting ourselves into our parent's coordinate space. If there is a flipped block mismatch
// in a particular axis, then we have to flip the rect along that axis.
if (style()->writingMode() == RightToLeftWritingMode || parentStyle->writingMode() == RightToLeftWritingMode)
@@ -4470,6 +4471,34 @@
return rect;
}
+LayoutRect RenderBox::noOverflowRect() const
+{
+ // Because of the special coodinate system used for overflow rectangles and many other
+ // rectangles (not quite logical, not quite physical), we need to flip the block progression
+ // coordinate in vertical-rl and horizontal-bt writing modes. In other words, the rectangle
+ // returned is physical, except for the block direction progression coordinate (y in horizontal
+ // writing modes, x in vertical writing modes), which is always "logical top". Apart from the
+ // flipping, this method does the same as clientBoxRect().
+
+ LayoutUnit left = borderLeft();
+ LayoutUnit top = borderTop();
+ LayoutUnit right = borderRight();
+ LayoutUnit bottom = borderBottom();
+ LayoutRect rect(left, top, width() - left - right, height() - top - bottom);
+ flipForWritingMode(rect);
+ // Subtract space occupied by scrollbars. Order is important here: first flip, then subtract
+ // scrollbars. This may seem backwards and weird, since one would think that a horizontal
+ // scrollbar at the physical bottom in horizontal-bt ought to be at the logical top (physical
+ // bottom), between the logical top (physical bottom) border and the logical top (physical
+ // bottom) padding. But this is how the rest of the code expects us to behave. This is highly
+ // related to https://bugs.webkit.org/show_bug.cgi?id=76129
+ // FIXME: when the above mentioned bug is fixed, it should hopefully be possible to call
+ // clientBoxRect() or paddingBoxRect() in this method, rather than fiddling with the edges on
+ // our own.
+ rect.contract(verticalScrollbarWidth(), horizontalScrollbarHeight());
+ return rect;
+}
+
LayoutRect RenderBox::overflowRectForPaintRejection() const
{
LayoutRect overflowRect = visualOverflowRect();
@@ -4495,7 +4524,7 @@
{
if (!style()->isFlippedBlocksWritingMode())
return point;
-
+
// The child is going to add in its x() and y(), so we have to make sure it ends up in
// the right place.
if (isHorizontalWritingMode())
@@ -4573,7 +4602,7 @@
RenderBlock* containerBlock = containingBlock();
if (!containerBlock || containerBlock == this)
return locationOffset();
-
+
LayoutRect rect(frameRect());
containerBlock->flipForWritingMode(rect); // FIXME: This is wrong if we are an absolutely positioned object enclosed by a relative-positioned inline.
return LayoutSize(rect.x(), rect.y());
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index ad38279..105f91f 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -136,7 +136,7 @@
IntSize pixelSnappedSize() const { return m_frameRect.pixelSnappedSize(); }
void setLocation(const LayoutPoint& location) { m_frameRect.setLocation(location); }
-
+
void setSize(const LayoutSize& size) { m_frameRect.setSize(size); }
void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); }
@@ -173,26 +173,27 @@
// For horizontal-tb and vertical-lr they will match physical directions, but for horizontal-bt and vertical-rl, the top/bottom and left/right
// respectively are flipped when compared to their physical counterparts. For example minX is on the left in vertical-lr,
// but it is on the right in vertical-rl.
- LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : clientBoxRect(); }
+ LayoutRect noOverflowRect() const;
+ LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : noOverflowRect(); }
IntRect pixelSnappedLayoutOverflowRect() const { return pixelSnappedIntRect(layoutOverflowRect()); }
LayoutSize maxLayoutOverflow() const { return LayoutSize(layoutOverflowRect().maxX(), layoutOverflowRect().maxY()); }
LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalWritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); }
LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontalWritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); }
-
+
virtual LayoutRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : borderBoxRect(); }
LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalWritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); }
LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontalWritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); }
LayoutRect overflowRectForPaintRejection() const;
-
+
void addLayoutOverflow(const LayoutRect&);
void addVisualOverflow(const LayoutRect&);
-
+
void addVisualEffectOverflow();
void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, child->locationOffset()); }
void addOverflowFromChild(RenderBox* child, const LayoutSize& delta);
void clearLayoutOverflow();
-
+
void updateLayerTransform();
LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - paddingRight(); }
@@ -248,7 +249,7 @@
LayoutUnit marginLogicalLeft() const { return m_marginBox.logicalLeft(style()->writingMode()); }
LayoutUnit marginLogicalRight() const { return m_marginBox.logicalRight(style()->writingMode()); }
-
+
virtual LayoutUnit marginBefore(const RenderStyle* overrideStyle = 0) const OVERRIDE FINAL { return m_marginBox.before((overrideStyle ? overrideStyle : style())->writingMode()); }
virtual LayoutUnit marginAfter(const RenderStyle* overrideStyle = 0) const OVERRIDE FINAL { return m_marginBox.after((overrideStyle ? overrideStyle : style())->writingMode()); }
virtual LayoutUnit marginStart(const RenderStyle* overrideStyle = 0) const OVERRIDE FINAL
@@ -287,7 +288,7 @@
virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
-
+
LayoutRect reflectionBox() const;
int reflectionOffset() const;
// Given a rect in the object's coordinate space, returns the corresponding rect in the reflection.
@@ -324,7 +325,7 @@
void clearOverrideContainingBlockContentLogicalHeight();
virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const;
-
+
LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const;
LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
@@ -365,7 +366,7 @@
enum RenderBoxRegionInfoFlags { CacheRenderBoxRegionInfo, DoNotCacheRenderBoxRegionInfo };
LayoutRect borderBoxRectInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage = 0, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
void clearRenderBoxRegionInfo();
-
+
void positionLineBox(InlineBox*);
virtual InlineBox* createInlineBox();
@@ -431,7 +432,7 @@
virtual LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); }
virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const;
LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeightType) const;
-
+
// There are a few cases where we need to refer specifically to the available physical width and available physical height.
// Relative positioning is one of those cases, since left/top offsets are physical.
LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode() ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding); }
@@ -459,7 +460,7 @@
bool scrollsOverflowX() const { return hasOverflowClip() && (style()->overflowX() == OSCROLL || hasAutoHorizontalScrollbar()); }
bool scrollsOverflowY() const { return hasOverflowClip() && (style()->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); }
bool usesCompositedScrolling() const;
-
+
bool hasUnsplittableScrollingOverflow() const;
bool isUnsplittableForPagination() const;
@@ -495,9 +496,9 @@
virtual VisiblePosition positionForPoint(const LayoutPoint&);
void removeFloatingOrPositionedChildFromBlockLists();
-
+
RenderLayer* enclosingFloatPaintingLayer() const;
-
+
virtual int firstLineBoxBaseline() const { return -1; }
virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // Returns -1 if we should skip this box when computing the baseline of an inline-block.
@@ -510,7 +511,7 @@
bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); }
bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloatingOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDeprecated(); }
-
+
virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const OVERRIDE;
@@ -593,7 +594,7 @@
virtual bool computeBackgroundIsKnownToBeObscured() OVERRIDE;
void paintBackground(const PaintInfo&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone);
-
+
void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgroundObject);
void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
@@ -606,7 +607,7 @@
LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
LayoutUnit computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) const;
-
+
virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !isInlineBlockOrInlineTable(); }
virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE;
@@ -629,7 +630,7 @@
bool repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer* layers, bool drawingBackground);
bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock) const;
-
+
LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = 0,
LayoutUnit offsetFromLogicalTopOfFirstPage = 0, bool checkForPerpendicularWritingMode = true) const;
LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode = true) const;
@@ -670,7 +671,7 @@
// The preferred logical width of the element if it were to break its lines at every possible opportunity.
LayoutUnit m_minPreferredLogicalWidth;
-
+
// The preferred logical width of the element if it never breaks any lines at all.
LayoutUnit m_maxPreferredLogicalWidth;
@@ -691,13 +692,13 @@
};
inline RenderBox* toRenderBox(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBox());
return static_cast<RenderBox*>(object);
}
inline const RenderBox* toRenderBox(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBox());
return static_cast<const RenderBox*>(object);
}
@@ -711,7 +712,7 @@
}
inline RenderBox* RenderBox::nextSiblingBox() const
-{
+{
return toRenderBox(nextSibling());
}
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index e7b605f..d2be443 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -44,7 +44,7 @@
#include "core/rendering/RenderNamedFlowThread.h"
#include "core/rendering/RenderRegion.h"
#include "core/rendering/RenderView.h"
-#include <wtf/CurrentTime.h>
+#include "wtf/CurrentTime.h"
using namespace std;
@@ -219,7 +219,7 @@
// Anonymous block boxes are ignored when resolving percentage values that would refer to it:
// the closest non-anonymous ancestor box is used instead.
- RenderBlock* cb = containingBlock();
+ RenderBlock* cb = containingBlock();
while (cb->isAnonymous())
cb = cb->containingBlock();
@@ -229,7 +229,7 @@
// don't care if the cell specified a height or not.
if (cb->isTableCell())
return false;
-
+
if (!cb->style()->logicalHeight().isAuto() || (!cb->style()->logicalTop().isAuto() && !cb->style()->logicalBottom().isAuto()))
return false;
@@ -285,9 +285,9 @@
LayoutPoint referencePoint = startPoint;
referencePoint.move(parent()->offsetForColumns(referencePoint));
-
+
// If the offsetParent of the element is null, or is the HTML body element,
- // return the distance between the canvas origin and the left border edge
+ // return the distance between the canvas origin and the left border edge
// of the element and stop this algorithm.
Element* element = offsetParent();
if (!element)
@@ -383,10 +383,10 @@
LayoutSize RenderBoxModelObject::stickyPositionOffset() const
{
LayoutRect viewportRect = view()->frameView()->viewportConstrainedVisibleContentRect();
-
+
StickyPositionViewportConstraints constraints;
computeStickyPositionConstraints(constraints, viewportRect);
-
+
// The sticky offset is physical, so we can just return the delta computed in absolute coords (though it may be wrong with transforms).
return LayoutSize(constraints.computeStickyOffset(viewportRect));
}
@@ -466,7 +466,7 @@
RoundedRect::Radii bottomCornerRadii;
bottomCornerRadii.setBottomRight(clipRect.radii().bottomRight());
context->clipRoundedRect(RoundedRect(bottomCorner, bottomCornerRadii));
- }
+ }
if (!clipRect.radii().topRight().isEmpty() || !clipRect.radii().bottomLeft().isEmpty()) {
IntRect topCorner(rect.x(), clipRect.rect().y(), clipRect.rect().maxX() - rect.x(), rect.maxY() - clipRect.rect().y());
@@ -538,7 +538,7 @@
Color bgColor = color;
StyleImage* bgImage = bgLayer->image();
bool shouldPaintBackgroundImage = bgImage && bgImage->canRender(this, style()->effectiveZoom());
-
+
bool forceBackgroundToWhite = false;
if (document()->printing()) {
if (style()->printColorAdjust() == PrintColorAdjustEconomy)
@@ -607,7 +607,7 @@
clipRoundedInnerRect(context, rect, border);
}
-
+
int bLeft = includeLeftEdge ? borderLeft() : 0;
int bRight = includeRightEdge ? borderRight() : 0;
LayoutUnit pLeft = includeLeftEdge ? paddingLeft() : LayoutUnit();
@@ -619,14 +619,14 @@
// Clip to the overflow area.
RenderBox* thisBox = toRenderBox(this);
context->clip(thisBox->overflowClipRect(rect.location(), paintInfo.renderRegion));
-
+
// Adjust the paint rect to reflect a scrolled content box with borders at the ends.
IntSize offset = thisBox->scrolledContentOffset();
scrolledPaintRect.move(-offset);
scrolledPaintRect.setWidth(bLeft + layer()->scrollWidth() + bRight);
scrolledPaintRect.setHeight(borderTop() + layer()->scrollHeight() + borderBottom());
}
-
+
GraphicsContextStateSaver backgroundClipStateSaver(*context, false);
IntRect maskRect;
@@ -833,8 +833,8 @@
image->computeIntrinsicDimensions(this, intrinsicWidth, intrinsicHeight, intrinsicRatio);
// Intrinsic dimensions expressed as percentages must be resolved relative to the dimensions of the rectangle
- // that establishes the coordinate system for the 'background-position' property.
-
+ // that establishes the coordinate system for the 'background-position' property.
+
// FIXME: Remove unnecessary rounding when layout is off ints: webkit.org/b/63656
if (intrinsicWidth.isPercent() && intrinsicHeight.isPercent() && intrinsicRatio.isEmpty()) {
// Resolve width/height percentages against positioningAreaSize, only if no intrinsic ratio is provided.
@@ -895,7 +895,7 @@
tileSize.setWidth(layerWidth.value());
else if (layerWidth.isPercent() || layerWidth.isViewportPercentage())
tileSize.setWidth(valueForLength(layerWidth, positioningAreaSize.width(), renderView));
-
+
if (layerHeight.isFixed())
tileSize.setHeight(layerHeight.value());
else if (layerHeight.isPercent() || layerHeight.isViewportPercentage())
@@ -915,7 +915,7 @@
// If both width and height are auto, use the image's intrinsic size.
tileSize = imageIntrinsicSize;
}
-
+
tileSize.clampNegativeToZero();
return flooredIntSize(tileSize);
}
@@ -1044,7 +1044,7 @@
viewportRect.setLocation(IntPoint());
else if (FrameView* frameView = view()->frameView())
viewportRect.setLocation(IntPoint(frameView->scrollOffsetForFixedPosition()));
-
+
geometry.setDestRect(pixelSnappedIntRect(viewportRect));
positioningAreaSize = geometry.destRect().size();
}
@@ -1270,7 +1270,7 @@
if (style == DOUBLE && edgeWidth < 3)
style = SOLID;
}
-
+
BorderEdge()
: width(0)
, style(BHIDDEN)
@@ -1278,7 +1278,7 @@
, isPresent(false)
{
}
-
+
bool hasVisibleColorAndStyle() const { return style > BHIDDEN && !isTransparent; }
bool shouldRender() const { return isPresent && width && hasVisibleColorAndStyle(); }
bool presentButInvisible() const { return usedWidth() && !hasVisibleColorAndStyle(); }
@@ -1307,7 +1307,7 @@
}
int usedWidth() const { return isPresent ? width : 0; }
-
+
void getDoubleBorderStripeWidths(int& outerWidth, int& innerWidth) const
{
int fullWidth = usedWidth();
@@ -1321,7 +1321,7 @@
if (fullWidth % 3 == 1)
innerWidth += 1;
}
-
+
int width;
Color color;
EBorderStyle style;
@@ -1468,7 +1468,7 @@
if (!edgesShareColor(edges[side], edges[adjacentSide]) && edges[adjacentSide].color.hasAlpha())
return false;
-
+
if (!borderStyleFillsBorderArea(edges[adjacentSide].style))
return false;
@@ -1509,7 +1509,7 @@
if (borderStylesRequireMitre(side, adjacentSide, edges[side].style, edges[adjacentSide].style))
return true;
-
+
return false;
}
@@ -1524,7 +1524,7 @@
bool mitreAdjacentSide1 = joinRequiresMitre(side, adjacentSide1, edges, !antialias);
bool mitreAdjacentSide2 = joinRequiresMitre(side, adjacentSide2, edges, !antialias);
-
+
bool adjacentSide1StylesMatch = colorsMatchAtCorner(side, adjacentSide1, edges);
bool adjacentSide2StylesMatch = colorsMatchAtCorner(side, adjacentSide2, edges);
@@ -1544,7 +1544,7 @@
bool clipAdjacentSide1 = colorNeedsAntiAliasAtCorner(side, adjacentSide1, edges) && mitreAdjacentSide1;
bool clipAdjacentSide2 = colorNeedsAntiAliasAtCorner(side, adjacentSide2, edges) && mitreAdjacentSide2;
bool shouldClip = clipForStyle || clipAdjacentSide1 || clipAdjacentSide2;
-
+
GraphicsContextStateSaver clipStateSaver(*graphicsContext, shouldClip);
if (shouldClip) {
bool aliasAdjacentSide1 = clipAdjacentSide1 || (clipForStyle && mitreAdjacentSide1);
@@ -1554,7 +1554,7 @@
mitreAdjacentSide1 = false;
mitreAdjacentSide2 = false;
}
-
+
drawLineForBoxSide(graphicsContext, sideRect.x(), sideRect.y(), sideRect.maxX(), sideRect.maxY(), side, colorToPaint, edgeToRender.style,
mitreAdjacentSide1 ? adjacentEdge1.width : 0, mitreAdjacentSide2 ? adjacentEdge2.width : 0, antialias);
}
@@ -1586,7 +1586,7 @@
Path roundedPath;
if (renderRadii)
roundedPath.addRoundedRect(outerBorder);
-
+
// The inner border adjustment for bleed avoidance mode BackgroundBleedBackgroundOverBorder
// is only applied to sideRect, which is okay since BackgroundBleedBackgroundOverBorder
// is only to be used for solid borders and the shape of the border painted by drawBoxSideFromPath
@@ -1635,7 +1635,7 @@
while (edgesToDraw) {
// Find undrawn edges sharing a color.
Color commonColor;
-
+
BorderEdgeFlags commonColorEdgeSet = 0;
for (size_t i = 0; i < sizeof(paintOrder) / sizeof(paintOrder[0]); ++i) {
BoxSide currSide = paintOrder[i];
@@ -1660,10 +1660,10 @@
}
paintBorderSides(graphicsContext, style, outerBorder, innerBorder, innerBorderAdjustment, edges, commonColorEdgeSet, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias, &commonColor);
-
+
if (useTransparencyLayer)
graphicsContext->endTransparencyLayer();
-
+
edgesToDraw &= ~commonColorEdgeSet;
}
}
@@ -1703,7 +1703,7 @@
allEdgesShareColor = false;
continue;
}
-
+
if (!currEdge.width) {
--numEdgesVisible;
continue;
@@ -1716,7 +1716,7 @@
if (currEdge.color.hasAlpha())
haveAlphaColor = true;
-
+
if (currEdge.style != SOLID)
haveAllSolidEdges = false;
@@ -1735,7 +1735,7 @@
if (numEdgesVisible == 4 && (outerBorder.isRounded() || haveAlphaColor)
&& (haveAllSolidEdges || (!outerBorder.isRounded() && !innerBorder.isRounded()))) {
Path path;
-
+
if (outerBorder.isRounded() && bleedAvoidance != BackgroundBleedUseTransparencyLayer)
path.addRoundedRect(outerBorder);
else
@@ -1789,7 +1789,7 @@
graphicsContext->setFillColor(edges[firstVisibleEdge].color);
graphicsContext->fillPath(path);
return;
- }
+ }
// Avoid creating transparent layers
if (haveAllSolidEdges && numEdgesVisible != 4 && !outerBorder.isRounded() && haveAlphaColor) {
Path path;
@@ -1849,8 +1849,8 @@
case DASHED: {
graphicsContext->setStrokeColor(color);
- // The stroke is doubled here because the provided path is the
- // outside edge of the border so half the stroke is clipped off.
+ // The stroke is doubled here because the provided path is the
+ // outside edge of the border so half the stroke is clipped off.
// The extra multiplier is so that the clipping mask can antialias
// the edges to prevent jaggies.
graphicsContext->setStrokeThickness(drawThickness * 2 * 1.1f);
@@ -1879,7 +1879,7 @@
lineDash.append(gapLength);
graphicsContext->setLineDash(lineDash, dashLength);
}
-
+
// FIXME: stroking the border path causes issues with tight corners:
// https://bugs.webkit.org/show_bug.cgi?id=58711
// Also, to get the best appearance we should stroke a path between the two borders.
@@ -1910,7 +1910,7 @@
RoundedRect innerClip = style->getRoundedInnerBorderFor(borderRect,
innerBorderTopWidth, innerBorderBottomWidth, innerBorderLeftWidth, innerBorderRightWidth,
includeLogicalLeftEdge, includeLogicalRightEdge);
-
+
graphicsContext->clipRoundedRect(innerClip);
drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
}
@@ -1926,7 +1926,7 @@
++outerBorderLeftWidth;
++outerBorderRightWidth;
}
-
+
RoundedRect outerClip = style->getRoundedInnerBorderFor(outerRect,
outerBorderTopWidth, outerBorderBottomWidth, outerBorderLeftWidth, outerBorderRightWidth,
includeLogicalLeftEdge, includeLogicalRightEdge);
@@ -1947,7 +1947,7 @@
s1 = OUTSET;
s2 = INSET;
}
-
+
// Paint full border
drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, s1, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge);
@@ -1999,12 +1999,12 @@
// 0----------------3
// 0 \ / 0
// |\ 1----------- 2 /|
- // | 1 1 |
+ // | 1 1 |
// | | | |
- // | | | |
- // | 2 2 |
- // |/ 1------------2 \|
- // 3 / \ 3
+ // | | | |
+ // | 2 2 |
+ // |/ 1------------2 \|
+ // 3 / \ 3
// 0----------------3
//
switch (side) {
@@ -2400,12 +2400,12 @@
static inline IntRect areaCastingShadowInHole(const IntRect& holeRect, int shadowBlur, int shadowSpread, const IntSize& shadowOffset)
{
IntRect bounds(holeRect);
-
+
bounds.inflate(shadowBlur);
if (shadowSpread < 0)
bounds.inflate(-shadowSpread);
-
+
IntRect offsetBounds = bounds;
offsetBounds.move(-shadowOffset);
return unionRect(bounds, offsetBounds);
@@ -2423,7 +2423,7 @@
bool hasBorderRadius = s->hasBorderRadius();
bool isHorizontal = s->isHorizontalWritingMode();
-
+
bool hasOpaqueBackground = s->visitedDependentColor(CSSPropertyBackgroundColor).isValid() && s->visitedDependentColor(CSSPropertyBackgroundColor).alpha() == 255;
for (const ShadowData* shadow = s->boxShadow(); shadow; shadow = shadow->next()) {
if (shadow->style() != shadowStyle)
@@ -2432,10 +2432,10 @@
IntSize shadowOffset(shadow->x(), shadow->y());
int shadowBlur = shadow->blur();
int shadowSpread = shadow->spread();
-
+
if (shadowOffset.isZero() && !shadowBlur && !shadowSpread)
continue;
-
+
const Color& shadowColor = resolveColor(shadow->color(), Color::stdShadowColor);
if (shadow->style() == Normal) {
@@ -2748,7 +2748,7 @@
if (fullRemoveInsert && isRenderBlock()) {
RenderBlock* block = toRenderBlock(this);
block->removePositionedObjects(0);
- block->removeFloatingObjects();
+ block->removeFloatingObjects();
}
ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
diff --git a/Source/core/rendering/RenderBoxModelObject.h b/Source/core/rendering/RenderBoxModelObject.h
index 21b6ab9..694d092 100644
--- a/Source/core/rendering/RenderBoxModelObject.h
+++ b/Source/core/rendering/RenderBoxModelObject.h
@@ -61,7 +61,7 @@
public:
RenderBoxModelObject(ContainerNode*);
virtual ~RenderBoxModelObject();
-
+
LayoutSize relativePositionOffset() const;
LayoutSize relativePositionLogicalOffset() const { return style()->isHorizontalWritingMode() ? relativePositionOffset() : relativePositionOffset().transposedSize(); }
@@ -133,7 +133,7 @@
LayoutUnit paddingLogicalLeft() const { return style()->isHorizontalWritingMode() ? paddingLeft() : paddingTop(); }
LayoutUnit paddingLogicalRight() const { return style()->isHorizontalWritingMode() ? paddingRight() : paddingBottom(); }
-
+
virtual LayoutUnit marginTop() const = 0;
virtual LayoutUnit marginBottom() const = 0;
virtual LayoutUnit marginLeft() const = 0;
@@ -199,7 +199,7 @@
{
m_destOrigin = destOrigin;
}
-
+
IntRect destRect() const { return m_destRect; }
void setDestRect(const IntRect& destRect)
{
@@ -208,27 +208,27 @@
// Returns the phase relative to the destination rectangle.
IntPoint relativePhase() const;
-
- IntPoint phase() const { return m_phase; }
+
+ IntPoint phase() const { return m_phase; }
void setPhase(const IntPoint& phase)
{
m_phase = phase;
}
- IntSize tileSize() const { return m_tileSize; }
+ IntSize tileSize() const { return m_tileSize; }
void setTileSize(const IntSize& tileSize)
{
m_tileSize = tileSize;
}
-
+
void setPhaseX(int x) { m_phase.setX(x); }
void setPhaseY(int y) { m_phase.setY(y); }
-
+
void setNoRepeatX(int xOffset);
void setNoRepeatY(int yOffset);
-
+
void useFixedAttachment(const IntPoint& attachmentPoint);
-
+
void clip(const IntRect&);
private:
IntRect m_destRect;
@@ -291,7 +291,7 @@
private:
LayoutUnit computedCSSPadding(Length) const;
virtual bool isBoxModelObject() const OVERRIDE FINAL { return true; }
-
+
virtual LayoutRect frameRectForStickyPositioning() const = 0;
IntSize calculateFillTileSize(const FillLayer*, const IntSize& scaledPositioningAreaSize) const;
@@ -301,7 +301,7 @@
RoundedRect getBackgroundRoundedRect(const LayoutRect&, InlineFlowBox*, LayoutUnit inlineBoxWidth, LayoutUnit inlineBoxHeight,
bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
-
+
bool fixedBackgroundPaintsInLocalCoordinates() const;
void clipBorderSidePolygon(GraphicsContext*, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
@@ -316,18 +316,18 @@
const IntPoint& innerBorderAdjustment, const class BorderEdge[], BorderEdgeFlags, BackgroundBleedAvoidance,
bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false, const Color* overrideColor = 0);
void drawBoxSideFromPath(GraphicsContext*, const LayoutRect&, const Path&, const class BorderEdge[],
- float thickness, float drawThickness, BoxSide, const RenderStyle*,
+ float thickness, float drawThickness, BoxSide, const RenderStyle*,
Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge);
};
inline RenderBoxModelObject* toRenderBoxModelObject(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBoxModelObject());
return static_cast<RenderBoxModelObject*>(object);
}
inline const RenderBoxModelObject* toRenderBoxModelObject(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBoxModelObject());
return static_cast<const RenderBoxModelObject*>(object);
}
diff --git a/Source/core/rendering/RenderBoxRegionInfo.h b/Source/core/rendering/RenderBoxRegionInfo.h
index 402b53d..2abfa09 100644
--- a/Source/core/rendering/RenderBoxRegionInfo.h
+++ b/Source/core/rendering/RenderBoxRegionInfo.h
@@ -28,7 +28,7 @@
#define RenderBoxRegionInfo_h
#include "core/platform/LayoutUnit.h"
-#include <wtf/FastAllocBase.h>
+#include "wtf/FastAllocBase.h"
namespace WebCore {
@@ -43,7 +43,7 @@
LayoutUnit logicalLeft() const { return m_logicalLeft; }
LayoutUnit logicalWidth() const { return m_logicalWidth; }
-
+
void shiftLogicalLeft(LayoutUnit delta) { m_logicalLeft += delta; m_isShifted = true; }
bool isShifted() const { return m_isShifted; }
diff --git a/Source/core/rendering/RenderButton.cpp b/Source/core/rendering/RenderButton.cpp
index b596c54..9b84765 100644
--- a/Source/core/rendering/RenderButton.cpp
+++ b/Source/core/rendering/RenderButton.cpp
@@ -47,7 +47,7 @@
setupInnerStyle(m_inner->style());
RenderFlexibleBox::addChild(m_inner);
}
-
+
m_inner->addChild(newChild, beforeChild);
}
@@ -87,7 +87,7 @@
setupInnerStyle(m_inner->style());
}
-void RenderButton::setupInnerStyle(RenderStyle* innerStyle)
+void RenderButton::setupInnerStyle(RenderStyle* innerStyle)
{
ASSERT(innerStyle->refCount() == 1);
// RenderBlock::createAnonymousBlock creates a new RenderStyle, so this is
diff --git a/Source/core/rendering/RenderButton.h b/Source/core/rendering/RenderButton.h
index cca80bb..395743d 100644
--- a/Source/core/rendering/RenderButton.h
+++ b/Source/core/rendering/RenderButton.h
@@ -69,13 +69,13 @@
};
inline RenderButton* toRenderButton(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderButton());
return static_cast<RenderButton*>(object);
}
inline const RenderButton* toRenderButton(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderButton());
return static_cast<const RenderButton*>(object);
}
diff --git a/Source/core/rendering/RenderCombineText.h b/Source/core/rendering/RenderCombineText.h
index 1850708..cddaab1 100644
--- a/Source/core/rendering/RenderCombineText.h
+++ b/Source/core/rendering/RenderCombineText.h
@@ -50,13 +50,13 @@
};
inline RenderCombineText* toRenderCombineText(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isCombineText());
return static_cast<RenderCombineText*>(object);
}
inline const RenderCombineText* toRenderCombineText(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isCombineText());
return static_cast<const RenderCombineText*>(object);
}
diff --git a/Source/core/rendering/RenderCounter.cpp b/Source/core/rendering/RenderCounter.cpp
index b1c13db..5da28ef 100644
--- a/Source/core/rendering/RenderCounter.cpp
+++ b/Source/core/rendering/RenderCounter.cpp
@@ -32,7 +32,7 @@
#include "core/rendering/RenderListMarker.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/style/RenderStyle.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
#ifndef NDEBUG
#include <stdio.h>
@@ -163,7 +163,7 @@
return false;
}
-// - Finds the insertion point for the counter described by counterOwner, isReset and
+// - Finds the insertion point for the counter described by counterOwner, isReset and
// identifier in the CounterNode tree for identifier and sets parent and
// previousSibling accordingly.
// - The function returns true if the counter whose insertion point is searched is NOT
@@ -174,7 +174,7 @@
// children or subsequent siblings of the renderer that owns the root of the tree
// form the rest of of the nodes of the tree.
// - The root of the tree is always a reset type reference.
-// - A subtree rooted at any reset node in the tree is equivalent to all counter
+// - A subtree rooted at any reset node in the tree is equivalent to all counter
// references that are in the scope of the counter or nested counter defined by that
// reset node.
// - Non-reset CounterNodes cannot have descendants.
@@ -231,9 +231,9 @@
previousSibling = previousSiblingProtector.get();
return true;
}
- } else {
+ } else {
// We are at the potential end of the search, but we had no previous sibling candidate
- // In this case we follow pretty much the same logic as above but no ASSERTs about
+ // In this case we follow pretty much the same logic as above but no ASSERTs about
// previousSibling, and when we are a sibling of the end counter we must set previousSibling
// to currentCounter.
if (currentCounter->actsAsReset()) {
@@ -265,7 +265,7 @@
if (currentCounter) {
// We found a suitable counter.
if (previousSiblingProtector) {
- // Since we had a suitable previous counter before, we should only consider this one as our
+ // Since we had a suitable previous counter before, we should only consider this one as our
// previousSibling if it is a reset counter and hence the current previousSibling is its child.
if (currentCounter->actsAsReset()) {
previousSiblingProtector = currentCounter;
@@ -281,7 +281,7 @@
}
}
// This function is designed so that the same test is not done twice in an iteration, except for this one
- // which may be done twice in some cases. Rearranging the decision points though, to accommodate this
+ // which may be done twice in some cases. Rearranging the decision points though, to accommodate this
// performance improvement would create more code duplication than is worthwhile in my oppinion and may further
// impede the readability of this already complex algorithm.
if (previousSiblingProtector)
@@ -488,7 +488,7 @@
// a style change for the renderer involving removal of all counter
// directives must occur, in which case, RenderCounter::destroyCounterNodes()
// must be called.
- // The destruction of the Renderer (possibly caused by the removal of its
+ // The destruction of the Renderer (possibly caused by the removal of its
// associated DOM node) is the other case that leads to the permanent
// destruction of all counters attached to a Renderer. In this case
// RenderCounter::destroyCounterNodes() must be and is now called, too.
@@ -534,7 +534,7 @@
}
RefPtr<CounterNode> newParent = 0;
RefPtr<CounterNode> newPreviousSibling = 0;
-
+
findPlaceForCounter(renderer, it->key, node->hasResetType(), newParent, newPreviousSibling);
if (node != counterMap->get(it->key))
continue;
diff --git a/Source/core/rendering/RenderCounter.h b/Source/core/rendering/RenderCounter.h
index 654af70..ee7943f 100644
--- a/Source/core/rendering/RenderCounter.h
+++ b/Source/core/rendering/RenderCounter.h
@@ -49,7 +49,7 @@
virtual const char* renderName() const;
virtual bool isCounter() const;
virtual PassRefPtr<StringImpl> originalText() const;
-
+
virtual void computePreferredLogicalWidths(float leadWidth) OVERRIDE;
// Removes the reference to the CounterNode associated with this renderer.
diff --git a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
index ef55739..ded6ea3 100644
--- a/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
+++ b/Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
@@ -30,8 +30,8 @@
#include "core/rendering/LayoutRepainter.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
-#include <wtf/StdLibExtras.h>
-#include <wtf/unicode/CharacterNames.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/unicode/CharacterNames.h"
using namespace std;
@@ -454,7 +454,7 @@
}
continue;
}
-
+
if (child->style()->visibility() == COLLAPSE) {
// visibility: collapsed children do not participate in our positioning.
// But we need to lay them down.
@@ -695,7 +695,7 @@
}
continue;
}
-
+
if (child->style()->visibility() == COLLAPSE) {
// visibility: collapsed children do not participate in our positioning.
// But we need to lay them down.
diff --git a/Source/core/rendering/RenderEmbeddedObject.cpp b/Source/core/rendering/RenderEmbeddedObject.cpp
index d70f061..b3d6e27 100644
--- a/Source/core/rendering/RenderEmbeddedObject.cpp
+++ b/Source/core/rendering/RenderEmbeddedObject.cpp
@@ -44,7 +44,7 @@
namespace WebCore {
using namespace HTMLNames;
-
+
static const float replacementTextRoundedRectHeight = 18;
static const float replacementTextRoundedRectLeftRightTextMargin = 6;
static const float replacementTextRoundedRectOpacity = 0.20f;
@@ -56,7 +56,7 @@
static const Color lightGray(205, 205, 205);
return lightGray;
}
-
+
RenderEmbeddedObject::RenderEmbeddedObject(Element* element)
: RenderPart(element)
, m_hasFallbackContent(false)
@@ -75,7 +75,7 @@
{
if (RenderPart::requiresLayer())
return true;
-
+
return allowsAcceleratedCompositing();
}
@@ -146,11 +146,11 @@
if (paintInfo.phase == PaintPhaseSelection)
return;
-
+
GraphicsContext* context = paintInfo.context;
if (context->paintingDisabled())
return;
-
+
FloatRect contentRect;
Path path;
FloatRect replacementTextRect;
@@ -159,7 +159,7 @@
float textWidth;
if (!getReplacementTextGeometry(paintOffset, contentRect, path, replacementTextRect, font, run, textWidth))
return;
-
+
GraphicsContextStateSaver stateSaver(*context);
context->clip(contentRect);
context->setAlpha(replacementTextRoundedRectOpacity);
@@ -180,7 +180,7 @@
{
contentRect = contentBoxRect();
contentRect.moveBy(roundedIntPoint(accumulatedOffset));
-
+
FontDescription fontDescription;
RenderTheme::defaultTheme()->systemFont(CSSValueWebkitSmallControl, fontDescription);
fontDescription.setWeight(FontWeightBold);
@@ -194,12 +194,12 @@
run = TextRun(m_unavailablePluginReplacementText);
textWidth = font.width(run);
-
+
replacementTextRect.setSize(FloatSize(textWidth + replacementTextRoundedRectLeftRightTextMargin * 2, replacementTextRoundedRectHeight));
float x = (contentRect.size().width() / 2 - replacementTextRect.size().width() / 2) + contentRect.location().x();
float y = (contentRect.size().height() / 2 - replacementTextRect.size().height() / 2) + contentRect.location().y();
replacementTextRect.setLocation(FloatPoint(x, y));
-
+
path.addRoundedRect(replacementTextRect, FloatSize(replacementTextRoundedRectRadius, replacementTextRoundedRectRadius));
return true;
@@ -240,23 +240,23 @@
if (!childBox)
return;
-
+
LayoutSize newSize = contentBoxRect().size();
if (newSize == oldSize && !childBox->needsLayout())
return;
-
+
// When calling layout() on a child node, a parent must either push a LayoutStateMaintainter, or
// instantiate LayoutStateDisabler. Since using a LayoutStateMaintainer is slightly more efficient,
// and this method will be called many times per second during playback, use a LayoutStateMaintainer:
LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
-
+
childBox->setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSize(paddingLeft(), paddingTop()));
childBox->style()->setHeight(Length(newSize.height(), Fixed));
childBox->style()->setWidth(Length(newSize.width(), Fixed));
childBox->setNeedsLayout(true, MarkOnlyThis);
childBox->layout();
setChildNeedsLayout(false);
-
+
statePusher.pop();
}
diff --git a/Source/core/rendering/RenderEmbeddedObject.h b/Source/core/rendering/RenderEmbeddedObject.h
index fb273f5..cc49411 100644
--- a/Source/core/rendering/RenderEmbeddedObject.h
+++ b/Source/core/rendering/RenderEmbeddedObject.h
@@ -79,7 +79,7 @@
virtual bool canHaveChildren() const OVERRIDE FINAL;
virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return children(); }
virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL { return children(); }
-
+
bool m_hasFallbackContent; // FIXME: This belongs on HTMLObjectElement.
bool m_showsUnavailablePluginIndicator;
diff --git a/Source/core/rendering/RenderFieldset.cpp b/Source/core/rendering/RenderFieldset.cpp
index 7c01b0e..291c686 100644
--- a/Source/core/rendering/RenderFieldset.cpp
+++ b/Source/core/rendering/RenderFieldset.cpp
@@ -128,7 +128,7 @@
for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibling()) {
if (option == IgnoreFloatingOrOutOfFlow && legend->isFloatingOrOutOfFlowPositioned())
continue;
-
+
if (legend->node() && (legend->node()->hasTagName(legendTag)))
return toRenderBox(legend);
}
@@ -165,7 +165,7 @@
if (!style()->hasBorder())
return;
-
+
// Create a clipping region around the legend and paint the border as normal
GraphicsContext* graphicsContext = paintInfo.context;
GraphicsContextStateSaver stateSaver(*graphicsContext);
diff --git a/Source/core/rendering/RenderFileUploadControl.cpp b/Source/core/rendering/RenderFileUploadControl.cpp
index b956709..7228e4b 100644
--- a/Source/core/rendering/RenderFileUploadControl.cpp
+++ b/Source/core/rendering/RenderFileUploadControl.cpp
@@ -96,7 +96,7 @@
{
if (style()->visibility() != VISIBLE)
return;
-
+
// Push a clip.
GraphicsContextStateSaver stateSaver(*paintInfo.context, false);
if (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseChildBlockBackgrounds) {
@@ -223,7 +223,7 @@
{
if (HTMLInputElement* button = uploadButton())
return button->value();
-
+
return String();
}
@@ -233,5 +233,5 @@
ASSERT(input->files());
return theme()->fileListNameForWidth(input->files(), style()->font(), maxFilenameWidth(), input->multiple());
}
-
+
} // namespace WebCore
diff --git a/Source/core/rendering/RenderFileUploadControl.h b/Source/core/rendering/RenderFileUploadControl.h
index eb19aa7..acfa504 100644
--- a/Source/core/rendering/RenderFileUploadControl.h
+++ b/Source/core/rendering/RenderFileUploadControl.h
@@ -40,7 +40,7 @@
String buttonValue();
String fileTextValue() const;
-
+
private:
virtual const char* renderName() const { return "RenderFileUploadControl"; }
@@ -53,7 +53,7 @@
virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
int maxFilenameWidth() const;
-
+
virtual VisiblePosition positionForPoint(const LayoutPoint&);
HTMLInputElement* uploadButton() const;
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
index b544fd1..b91e99d 100644
--- a/Source/core/rendering/RenderFlexibleBox.cpp
+++ b/Source/core/rendering/RenderFlexibleBox.cpp
@@ -35,7 +35,7 @@
#include "core/rendering/LayoutRepainter.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderFlowThread.cpp b/Source/core/rendering/RenderFlowThread.cpp
index 9abce2f..45d89f4 100644
--- a/Source/core/rendering/RenderFlowThread.cpp
+++ b/Source/core/rendering/RenderFlowThread.cpp
@@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -75,7 +75,7 @@
newStyle->setWidth(Length(100, Percent));
newStyle->setHeight(Length(100, Percent));
newStyle->font().update(0);
-
+
return newStyle.release();
}
@@ -154,7 +154,7 @@
LayoutUnit previousRegionLogicalWidth = 0;
LayoutUnit previousRegionLogicalHeight = 0;
bool firstRegionVisited = false;
-
+
for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
ASSERT(!region->needsLayout() || region->isRenderRegionSet());
@@ -304,7 +304,7 @@
context->translate(adjustedPaintOffset.x(), adjustedPaintOffset.y());
info.rect.moveBy(-adjustedPaintOffset);
-
+
layer()->paint(context, info.rect, 0, 0, region, RenderLayer::PaintLayerTemporaryClipRects);
context->restore();
@@ -364,7 +364,7 @@
// We can't use currentFlowThread as it is possible to have interleaved flow threads and the wrong one could be used.
// Let each region figure out the proper enclosing flow thread.
CurrentRenderFlowThreadDisabler disabler(view());
-
+
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
@@ -787,7 +787,7 @@
if (!objectABBRect.width())
objectABBRect.setWidth(1);
if (!objectABBRect.height())
- objectABBRect.setHeight(1);
+ objectABBRect.setHeight(1);
if (objectABBRect.intersects(region->absoluteBoundingBoxRect(true)))
return true;
@@ -980,7 +980,7 @@
void RenderFlowThread::collectLayerFragments(LayerFragments& layerFragments, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect)
{
ASSERT(!m_regionsInvalidated);
-
+
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
region->collectLayerFragments(layerFragments, layerBoundingBox, dirtyRect);
@@ -990,7 +990,7 @@
LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundingBox)
{
ASSERT(!m_regionsInvalidated);
-
+
LayoutRect result;
for (RenderRegionList::const_iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
RenderRegion* region = *iter;
@@ -1004,7 +1004,7 @@
result.unite(fragmentRect);
}
}
-
+
return result;
}
diff --git a/Source/core/rendering/RenderFlowThread.h b/Source/core/rendering/RenderFlowThread.h
index 4ed0c66..27ea3ac 100644
--- a/Source/core/rendering/RenderFlowThread.h
+++ b/Source/core/rendering/RenderFlowThread.h
@@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -49,7 +49,7 @@
// RenderFlowThread is used to collect all the render objects that participate in a
// flow thread. It will also help in doing the layout. However, it will not render
-// directly to screen. Instead, RenderRegion objects will redirect their paint
+// directly to screen. Instead, RenderRegion objects will redirect their paint
// and nodeAtPoint methods to this object. Each RenderRegion will actually be a viewPort
// of the RenderFlowThread.
@@ -57,17 +57,17 @@
public:
RenderFlowThread();
virtual ~RenderFlowThread() { };
-
+
virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; }
virtual void layout() OVERRIDE FINAL;
- // Always create a RenderLayer for the RenderFlowThread so that we
+ // Always create a RenderLayer for the RenderFlowThread so that we
// can easily avoid drawing the children directly.
virtual bool requiresLayer() const OVERRIDE FINAL { return true; }
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
-
+
void removeFlowChildInfo(RenderObject*);
#ifndef NDEBUG
bool hasChildInfo(RenderObject* child) const { return child && child->isBox() && m_regionRangeMap.contains(toRenderBox(child)); }
@@ -125,7 +125,7 @@
LayoutUnit contentLogicalWidthOfFirstRegion() const;
LayoutUnit contentLogicalHeightOfFirstRegion() const;
LayoutUnit contentLogicalLeftOfFirstRegion() const;
-
+
RenderRegion* firstRegion() const;
RenderRegion* lastRegion() const;
@@ -186,7 +186,7 @@
void setDispatchRegionOversetChangeEvent(bool value) { m_dispatchRegionOversetChangeEvent = value; }
bool shouldDispatchRegionOversetChangeEvent() const { return m_dispatchRegionOversetChangeEvent; }
-
+
// Override if the flow thread implementation supports dispatching events when the flow layout is updated (e.g. for named flows)
virtual void dispatchRegionLayoutUpdateEvent() { m_dispatchRegionLayoutUpdateEvent = false; }
virtual void dispatchRegionOversetChangeEvent() { m_dispatchRegionOversetChangeEvent = false; }
@@ -209,7 +209,7 @@
{
setRange(start, end);
}
-
+
void setRange(RenderRegion* start, RenderRegion* end)
{
m_startRegion = start;
diff --git a/Source/core/rendering/RenderFrameSet.cpp b/Source/core/rendering/RenderFrameSet.cpp
index eeedd85..5849e14 100644
--- a/Source/core/rendering/RenderFrameSet.cpp
+++ b/Source/core/rendering/RenderFrameSet.cpp
@@ -120,7 +120,7 @@
if (paintInfo.phase != PaintPhaseForeground)
return;
-
+
RenderObject* child = firstChild();
if (!child)
return;
@@ -130,7 +130,7 @@
size_t rows = m_rows.m_sizes.size();
size_t cols = m_cols.m_sizes.size();
LayoutUnit borderThickness = frameSet()->border();
-
+
LayoutUnit yPos = 0;
for (size_t r = 0; r < rows; r++) {
LayoutUnit xPos = 0;
@@ -158,7 +158,7 @@
m_sizes.resize(size);
m_deltas.resize(size);
m_deltas.fill(0);
-
+
// To track edges for resizability and borders, we need to be (size + 1). This is because a parent frameset
// may ask us for information about our left/top/right/bottom edges in order to make its own decisions about
// what to do. We are capable of tainting that parent frameset's borders, so we have to cache this info.
@@ -197,7 +197,7 @@
totalFixed += gridLayout[i];
countFixed++;
}
-
+
// Count the total percentage of all of the percentage columns/rows -> totalPercent
// Count the number of columns/rows which are percentages -> countPercent
if (grid[i].isPercentage()) {
@@ -211,13 +211,13 @@
if (grid[i].isRelative()) {
totalRelative += max<int>(grid[i].value(), 1);
countRelative++;
- }
+ }
}
int remainingLen = availableLen;
// Fixed columns/rows are our first priority. If there is not enough space to fit all fixed
- // columns/rows we need to proportionally adjust their size.
+ // columns/rows we need to proportionally adjust their size.
if (totalFixed > remainingLen) {
int remainingFixed = remainingLen;
@@ -230,8 +230,8 @@
} else
remainingLen -= totalFixed;
- // Percentage columns/rows are our second priority. Divide the remaining space proportionally
- // over all percentage columns/rows. IMPORTANT: the size of each column/row is not relative
+ // Percentage columns/rows are our second priority. Divide the remaining space proportionally
+ // over all percentage columns/rows. IMPORTANT: the size of each column/row is not relative
// to 100%, but to the total percentage. For example, if there are three columns, each of 75%,
// and the available space is 300px, each column will become 100px in width.
if (totalPercent > remainingLen) {
@@ -259,8 +259,8 @@
lastRelative = i;
}
}
-
- // If we could not evenly distribute the available space of all of the relative
+
+ // If we could not evenly distribute the available space of all of the relative
// columns/rows, the remainder will be added to the last column/row.
// For example: if we have a space of 100px and three columns (*,*,*), the remainder will
// be 1px and will be added to the last column: 33px, 33px, 34px.
@@ -274,9 +274,9 @@
// columns/rows
if (remainingLen) {
// Our first priority is to spread if over the percentage columns. The remaining
- // space is spread evenly, for example: if we have a space of 100px, the columns
- // definition of 25%,25% used to result in two columns of 25px. After this the
- // columns will each be 50px in width.
+ // space is spread evenly, for example: if we have a space of 100px, the columns
+ // definition of 25%,25% used to result in two columns of 25px. After this the
+ // columns will each be 50px in width.
if (countPercent && totalPercent) {
int remainingPercent = remainingLen;
int changePercent = 0;
@@ -300,14 +300,14 @@
changeFixed = (remainingFixed * gridLayout[i]) / totalFixed;
gridLayout[i] += changeFixed;
remainingLen -= changeFixed;
- }
+ }
}
}
}
-
+
// If we still have some left over space we probably ended up with a remainder of
- // a division. We cannot spread it evenly anymore. If we have any percentage
- // columns/rows simply spread the remainder equally over all available percentage columns,
+ // a division. We cannot spread it evenly anymore. If we have any percentage
+ // columns/rows simply spread the remainder equally over all available percentage columns,
// regardless of their size.
if (remainingLen && countPercent) {
int remainingPercent = remainingLen;
@@ -326,7 +326,7 @@
// columns/rows.
int remainingFixed = remainingLen;
int changeFixed = 0;
-
+
for (int i = 0; i < gridLen; ++i) {
if (grid[i].isAbsolute()) {
changeFixed = remainingFixed / countFixed;
@@ -376,7 +376,7 @@
m_cols.m_preventResize[c] = true;
if (edgeInfo.preventResize(RightFrameEdge))
m_cols.m_preventResize[c + 1] = true;
-
+
if (edgeInfo.allowBorder(TopFrameEdge))
m_rows.m_allowBorder[r] = true;
if (edgeInfo.allowBorder(BottomFrameEdge))
@@ -389,11 +389,11 @@
void RenderFrameSet::computeEdgeInfo()
{
- m_rows.m_preventResize.fill(frameSet()->noResize());
+ m_rows.m_preventResize.fill(frameSet()->noResize());
m_rows.m_allowBorder.fill(false);
- m_cols.m_preventResize.fill(frameSet()->noResize());
+ m_cols.m_preventResize.fill(frameSet()->noResize());
m_cols.m_allowBorder.fill(false);
-
+
RenderObject* child = firstChild();
if (!child)
return;
@@ -418,7 +418,7 @@
FrameEdgeInfo RenderFrameSet::edgeInfo() const
{
FrameEdgeInfo result(frameSet()->noResize(), true);
-
+
int rows = frameSet()->totalRows();
int cols = frameSet()->totalCols();
if (rows && cols) {
@@ -431,7 +431,7 @@
result.setPreventResize(BottomFrameEdge, m_rows.m_preventResize[rows]);
result.setAllowBorder(BottomFrameEdge, m_rows.m_allowBorder[rows]);
}
-
+
return result;
}
diff --git a/Source/core/rendering/RenderFullScreen.cpp b/Source/core/rendering/RenderFullScreen.cpp
index 56150c9..dea4e45 100644
--- a/Source/core/rendering/RenderFullScreen.cpp
+++ b/Source/core/rendering/RenderFullScreen.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -9,7 +9,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -31,9 +31,9 @@
class RenderFullScreenPlaceholder FINAL : public RenderBlock {
public:
- RenderFullScreenPlaceholder(RenderFullScreen* owner)
+ RenderFullScreenPlaceholder(RenderFullScreen* owner)
: RenderBlock(0)
- , m_owner(owner)
+ , m_owner(owner)
{
setDocumentForAnonymous(owner->document());
}
@@ -53,7 +53,7 @@
: RenderFlexibleBox(0)
, m_placeholder(0)
{
- setReplaced(false);
+ setReplaced(false);
}
RenderFullScreen* RenderFullScreen::createAnonymous(Document* document)
@@ -97,15 +97,15 @@
fullscreenStyle->setJustifyContent(JustifyCenter);
fullscreenStyle->setAlignItems(AlignCenter);
fullscreenStyle->setFlexDirection(FlowColumn);
-
+
fullscreenStyle->setPosition(FixedPosition);
fullscreenStyle->setWidth(Length(100.0, Percent));
fullscreenStyle->setHeight(Length(100.0, Percent));
fullscreenStyle->setLeft(Length(0, WebCore::Fixed));
fullscreenStyle->setTop(Length(0, WebCore::Fixed));
-
+
fullscreenStyle->setBackgroundColor(Color::black);
-
+
return fullscreenStyle.release();
}
@@ -129,7 +129,7 @@
parent->addChild(fullscreenRenderer, object);
object->remove();
-
+
// Always just do a full layout to ensure that line boxes get deleted properly.
// Because objects moved from |parent| to |fullscreenRenderer|, we want to
// make new line boxes instead of leaving the old ones around.
diff --git a/Source/core/rendering/RenderFullScreen.h b/Source/core/rendering/RenderFullScreen.h
index 6918ef9..66fbde6 100644
--- a/Source/core/rendering/RenderFullScreen.h
+++ b/Source/core/rendering/RenderFullScreen.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -9,7 +9,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -52,13 +52,13 @@
protected:
RenderBlock* m_placeholder;
};
-
+
inline RenderFullScreen* toRenderFullScreen(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(object->isRenderFullScreen());
return static_cast<RenderFullScreen*>(object);
}
-
+
// This will catch anyone doing an unnecessary cast:
void toRenderFullScreen(RenderFullScreen*);
}
diff --git a/Source/core/rendering/RenderGeometryMap.cpp b/Source/core/rendering/RenderGeometryMap.cpp
index 920c8dc..1a23c42 100644
--- a/Source/core/rendering/RenderGeometryMap.cpp
+++ b/Source/core/rendering/RenderGeometryMap.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -29,7 +29,7 @@
#include "core/platform/graphics/transforms/TransformState.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
-#include <wtf/TemporaryChange.h>
+#include "wtf/TemporaryChange.h"
namespace WebCore {
@@ -54,7 +54,7 @@
transformState.flatten();
return;
}
-
+
bool inFixed = false;
#if !ASSERT_DISABLED
bool foundContainer = !container || (m_mapping.size() && m_mapping[0].m_renderer == container);
@@ -97,13 +97,13 @@
}
ASSERT(foundContainer);
- transformState.flatten();
+ transformState.flatten();
}
FloatPoint RenderGeometryMap::mapToContainer(const FloatPoint& p, const RenderLayerModelObject* container) const
{
FloatPoint result;
-
+
if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() && (!container || (m_mapping.size() && container == m_mapping[0].m_renderer)))
result = p + roundedIntSize(m_accumulatedOffset);
else {
@@ -125,7 +125,7 @@
FloatQuad RenderGeometryMap::mapToContainer(const FloatRect& rect, const RenderLayerModelObject* container) const
{
FloatRect result;
-
+
if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() && (!container || (m_mapping.size() && container == m_mapping[0].m_renderer))) {
result = rect;
result.move(m_accumulatedOffset);
@@ -164,7 +164,7 @@
const RenderStyle* style = current->style();
if (style->position() == FixedPosition || style->isFlippedBlocksWritingMode())
return false;
-
+
if (current->hasColumns() || current->hasTransform() || current->isRenderFlowThread() || current->isSVGRoot())
return false;
@@ -188,7 +188,7 @@
if (canConvertInLayerTree) {
LayoutPoint layerOffset;
layer->convertToLayerCoords(ancestorLayer, layerOffset);
-
+
// The RenderView must be pushed first.
if (!m_mapping.size()) {
ASSERT(ancestorLayer->renderer()->isRenderView());
@@ -222,7 +222,7 @@
ASSERT(m_insertionPosition != notFound);
m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(renderer, accumulatingTransform, isNonUniform, isFixedPosition, hasTransform));
-
+
RenderGeometryMapStep& step = m_mapping[m_insertionPosition];
if (!t.isIntegerTranslation())
step.m_transform = adoptPtr(new TransformationMatrix(t));
@@ -238,12 +238,12 @@
ASSERT(!m_insertionPosition); // The view should always be the first step.
m_mapping.insert(m_insertionPosition, RenderGeometryMapStep(view, false, false, false, t));
-
+
RenderGeometryMapStep& step = m_mapping[m_insertionPosition];
step.m_offset = scrollOffset;
if (t)
step.m_transform = adoptPtr(new TransformationMatrix(*t));
-
+
stepInserted(step);
}
@@ -274,7 +274,7 @@
if (step.m_transform)
++m_transformedStepsCount;
-
+
if (step.m_isFixedPosition)
++m_fixedStepsCount;
}
diff --git a/Source/core/rendering/RenderGeometryMap.h b/Source/core/rendering/RenderGeometryMap.h
index 887b5c2..318cd16 100644
--- a/Source/core/rendering/RenderGeometryMap.h
+++ b/Source/core/rendering/RenderGeometryMap.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderGeometryMap_h
@@ -32,7 +32,7 @@
#include "core/platform/graphics/LayoutSize.h"
#include "core/platform/graphics/transforms/TransformationMatrix.h"
#include "core/rendering/RenderObject.h"
-#include <wtf/OwnPtr.h>
+#include "wtf/OwnPtr.h"
namespace WebCore {
@@ -94,13 +94,13 @@
// If the container is the RenderView, the scroll offset is applied, but not the scale.
FloatPoint mapToContainer(const FloatPoint&, const RenderLayerModelObject*) const;
FloatQuad mapToContainer(const FloatRect&, const RenderLayerModelObject*) const;
-
+
// Called by code walking the renderer or layer trees.
void pushMappingsToAncestor(const RenderLayer*, const RenderLayer* ancestorLayer);
void popMappingsToAncestor(const RenderLayer*);
void pushMappingsToAncestor(const RenderObject*, const RenderLayerModelObject* ancestorRenderer);
void popMappingsToAncestor(const RenderLayerModelObject*);
-
+
// The following methods should only be called by renderers inside a call to pushMappingsToAncestor().
// Push geometry info between this renderer and some ancestor. The ancestor must be its container() or some
@@ -116,7 +116,7 @@
void stepInserted(const RenderGeometryMapStep&);
void stepRemoved(const RenderGeometryMapStep&);
-
+
bool hasNonUniformStep() const { return m_nonUniformStepsCount; }
bool hasTransformStep() const { return m_transformedStepsCount; }
bool hasFixedPositionStep() const { return m_fixedStepsCount; }
diff --git a/Source/core/rendering/RenderHTMLCanvas.cpp b/Source/core/rendering/RenderHTMLCanvas.cpp
index 5101e8f..d75685a 100644
--- a/Source/core/rendering/RenderHTMLCanvas.cpp
+++ b/Source/core/rendering/RenderHTMLCanvas.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -48,7 +48,7 @@
{
if (RenderReplaced::requiresLayer())
return true;
-
+
HTMLCanvasElement* canvas = toHTMLCanvasElement(node());
return canvas && canvas->renderingContext() && canvas->renderingContext()->isAccelerated();
}
diff --git a/Source/core/rendering/RenderHTMLCanvas.h b/Source/core/rendering/RenderHTMLCanvas.h
index ffc1f22..100482a 100644
--- a/Source/core/rendering/RenderHTMLCanvas.h
+++ b/Source/core/rendering/RenderHTMLCanvas.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderHTMLCanvas_h
@@ -40,7 +40,7 @@
virtual bool requiresLayer() const;
void canvasSizeChanged();
-
+
private:
virtual const char* renderName() const { return "RenderHTMLCanvas"; }
virtual void paintReplaced(PaintInfo&, const LayoutPoint&);
diff --git a/Source/core/rendering/RenderIFrame.cpp b/Source/core/rendering/RenderIFrame.cpp
index 655f4aa..a4b649a 100644
--- a/Source/core/rendering/RenderIFrame.cpp
+++ b/Source/core/rendering/RenderIFrame.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -35,7 +35,7 @@
namespace WebCore {
using namespace HTMLNames;
-
+
RenderIFrame::RenderIFrame(Element* element)
: RenderPart(element)
{
diff --git a/Source/core/rendering/RenderIFrame.h b/Source/core/rendering/RenderIFrame.h
index 1d27d6c..b005572 100644
--- a/Source/core/rendering/RenderIFrame.h
+++ b/Source/core/rendering/RenderIFrame.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderIFrame_h
diff --git a/Source/core/rendering/RenderImage.cpp b/Source/core/rendering/RenderImage.cpp
index ef689ce..742ea55 100644
--- a/Source/core/rendering/RenderImage.cpp
+++ b/Source/core/rendering/RenderImage.cpp
@@ -40,11 +40,12 @@
#include "core/platform/graphics/Font.h"
#include "core/platform/graphics/FontCache.h"
#include "core/platform/graphics/GraphicsContext.h"
+#include "core/platform/graphics/GraphicsContextStateSaver.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderView.h"
#include "core/svg/graphics/SVGImage.h"
-#include <wtf/UnusedParam.h>
+#include "wtf/UnusedParam.h"
using namespace std;
@@ -160,7 +161,7 @@
if (newImage != m_imageResource->imagePtr() || !newImage)
return;
-
+
if (!m_didIncrementVisuallyNonEmptyPixelCount) {
// At a zoom level of 1 the image is guaranteed to have an integer size.
view()->frameView()->incrementVisuallyNonEmptyPixelCount(flooredIntSize(m_imageResource->imageSize(1.0f)));
@@ -247,7 +248,7 @@
repaintRect.intersect(contentBoxRect());
} else
repaintRect = contentBoxRect();
-
+
repaintRectangle(repaintRect);
// Tell any potential compositing layers that the image needs updating.
@@ -259,7 +260,7 @@
{
if (!m_imageResource)
return;
-
+
if (documentBeingDestroyed())
return;
@@ -366,9 +367,9 @@
LayoutPoint contentLocation = paintOffset;
contentLocation.move(leftBorder + leftPad, topBorder + topPad);
paintIntoRect(context, LayoutRect(contentLocation, contentSize));
-
+
if (cachedImage() && page && paintInfo.phase == PaintPhaseForeground) {
- // For now, count images as unpainted if they are still progressively loading. We may want
+ // For now, count images as unpainted if they are still progressively loading. We may want
// to refine this in the future to account for the portion of the image that has painted.
if (cachedImage()->isLoading())
page->addRelevantUnpaintedObject(this, LayoutRect(contentLocation, contentSize));
@@ -385,14 +386,14 @@
if (paintInfo.phase == PaintPhaseOutline)
paintAreaElementFocusRing(paintInfo);
}
-
+
void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo)
{
Document* document = this->document();
-
+
if (document->printing() || !document->frame()->selection()->isFocusedAndActive())
return;
-
+
if (paintInfo.context->paintingDisabled() && !paintInfo.context->updatingControlTints())
return;
@@ -418,6 +419,7 @@
// FIXME: Clip path instead of context when Skia pathops is ready.
// https://crbug.com/251206
+ GraphicsContextStateSaver savedContext(*paintInfo.context);
paintInfo.context->clip(absoluteContentBox());
paintInfo.context->drawFocusRing(path, outlineWidth,
areaElementStyle->outlineOffset(),
diff --git a/Source/core/rendering/RenderImage.h b/Source/core/rendering/RenderImage.h
index 81c7cea..aaee5a3 100644
--- a/Source/core/rendering/RenderImage.h
+++ b/Source/core/rendering/RenderImage.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
- * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
+ * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
* (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
* Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
*
diff --git a/Source/core/rendering/RenderImageResourceStyleImage.h b/Source/core/rendering/RenderImageResourceStyleImage.h
index 9593635..f77854d 100644
--- a/Source/core/rendering/RenderImageResourceStyleImage.h
+++ b/Source/core/rendering/RenderImageResourceStyleImage.h
@@ -28,7 +28,7 @@
#include "core/rendering/RenderImageResource.h"
#include "core/rendering/style/StyleImage.h"
-#include <wtf/RefPtr.h>
+#include "wtf/RefPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index a852eb0..ea48c87 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -88,7 +88,7 @@
continuation->destroy();
setContinuation(0);
}
-
+
if (!documentBeingDestroyed()) {
if (firstLineBox()) {
// We can't wait for RenderBoxModelObject::destroy to clear the selection,
@@ -107,7 +107,7 @@
for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
box->remove();
}
- } else if (parent())
+ } else if (parent())
parent()->dirtyLinesFromChangedChild(this);
}
@@ -132,7 +132,7 @@
// FIXME: Support transforms and reflections on inline flows someday.
setHasTransform(false);
- setHasReflection(false);
+ setHasReflection(false);
}
static RenderObject* inFlowPositionedInlineAncestor(RenderObject* p)
@@ -151,7 +151,7 @@
if (!toRenderBlock(block)->isAnonymousBlockContinuation() || block->style()->position() == newStyle->position())
continue;
// If we are no longer in-flow positioned but our descendant block(s) still have an in-flow positioned ancestor then
- // their containing anonymous block should keep its in-flow positioning.
+ // their containing anonymous block should keep its in-flow positioning.
RenderInline* cont = toRenderBlock(block)->inlineElementContinuation();
if (oldStyle->hasInFlowPosition() && inFlowPositionedInlineAncestor(cont))
continue;
@@ -310,7 +310,7 @@
// |newChild|. We then make that block box a continuation of this inline. We take all of
// the children after |beforeChild| and put them in a clone of this object.
RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK);
-
+
// If inside an inline affected by in-flow positioning the block needs to be affected by it too.
// Giving the block a layer like this allows it to collect the x/y offsets from inline parents later.
if (RenderObject* positionedAncestor = inFlowPositionedInlineAncestor(this))
@@ -375,13 +375,13 @@
// Once we hit the containing block we're done.
RenderBoxModelObject* curr = toRenderBoxModelObject(parent());
RenderBoxModelObject* currChild = this;
-
+
// FIXME: Because splitting is O(n^2) as tags nest pathologically, we cap the depth at which we're willing to clone.
// There will eventually be a better approach to this problem that will let us nest to a much
// greater depth (see bugzilla bug 13430) but for now we have a limit. This *will* result in
// incorrect rendering, but the alternative is to hang forever.
unsigned splitDepth = 1;
- const unsigned cMaxSplitDepth = 200;
+ const unsigned cMaxSplitDepth = 200;
while (curr && curr != fromBlock) {
ASSERT(curr->isRenderInline());
if (splitDepth < cMaxSplitDepth) {
@@ -408,7 +408,7 @@
tmp->setNeedsLayoutAndPrefWidthsRecalc();
}
}
-
+
// Keep walking up the chain.
currChild = curr;
curr = toRenderBoxModelObject(curr->parent());
@@ -433,10 +433,10 @@
{
RenderBlock* pre = 0;
RenderBlock* block = containingBlock();
-
+
// Delete our line boxes before we do the inline split into continuations.
block->deleteLineBoxTree();
-
+
bool madeNewBeforeBlock = false;
if (block->isAnonymousBlock() && (!block->parent() || !block->parent()->createsAnonymousWrapper())) {
// We can reuse this block and make it the preBlock of the next continuation.
@@ -458,7 +458,7 @@
block->children()->insertChildNode(block, newBlockBox, boxFirst);
block->children()->insertChildNode(block, post, boxFirst);
block->setChildrenInline(false);
-
+
if (madeNewBeforeBlock) {
RenderObject* o = boxFirst;
while (o) {
@@ -557,7 +557,7 @@
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
-
+
// We want to get the margin box in the inline direction, and then use our font ascent/descent in the block
// direction (aligned to the root box's baseline).
if (curr->isBox()) {
@@ -818,7 +818,7 @@
}
// Translate the coords from the pre-anonymous block to the post-anonymous block.
- LayoutPoint parentBlockPoint = cb->location() + point;
+ LayoutPoint parentBlockPoint = cb->location() + point;
RenderBoxModelObject* c = continuation();
while (c) {
RenderBox* contBlock = c->isInline() ? c->containingBlock() : toRenderBlock(c);
@@ -826,7 +826,7 @@
return c->positionForPoint(parentBlockPoint - contBlock->locationOffset());
c = toRenderBlock(c)->inlineElementContinuation();
}
-
+
return RenderBoxModelObject::positionForPoint(point);
}
@@ -856,7 +856,7 @@
}
IntRect result;
-
+
// See <rdar://problem/5289721>, for an unknown reason the linked list here is sometimes inconsistent, first is non-zero and last is zero. We have been
// unable to reproduce this at all (and consequently unable to figure ot why this is happening). The assert will hopefully catch the problem in debug
// builds and help us someday figure out why. We also put in a redundant check of lastLineBox() to avoid the crash for now.
@@ -871,9 +871,9 @@
if (curr == firstLineBox() || curr->logicalRight() > logicalRightSide)
logicalRightSide = curr->logicalRight();
}
-
+
bool isHorizontal = style()->isHorizontalWritingMode();
-
+
float x = isHorizontal ? logicalLeftSide : firstLineBox()->x();
float y = isHorizontal ? firstLineBox()->y() : logicalLeftSide;
float width = isHorizontal ? logicalRightSide - logicalLeftSide : lastLineBox()->logicalBottom() - x;
@@ -889,7 +889,7 @@
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
-
+
// We want to get the margin box in the inline direction, and then use our font ascent/descent in the block
// direction (aligned to the root box's baseline).
if (curr->isBox())
@@ -913,7 +913,7 @@
for (RenderObject* curr = lastChild(); curr; curr = curr->previousSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
-
+
// We want to get the margin box in the inline direction, and then use our font ascent/descent in the block
// direction (aligned to the root box's baseline).
if (curr->isBox())
@@ -942,7 +942,7 @@
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
-
+
// For overflow we just have to propagate by hand and recompute it all.
if (curr->isBox()) {
RenderBox* currBox = toRenderBox(curr);
@@ -991,11 +991,11 @@
RootInlineBox* firstRootBox = firstLineBox()->root();
RootInlineBox* lastRootBox = lastLineBox()->root();
-
+
LayoutUnit logicalTop = firstLineBox()->logicalTopVisualOverflow(firstRootBox->lineTop());
LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide;
LayoutUnit logicalHeight = lastLineBox()->logicalBottomVisualOverflow(lastRootBox->lineBottom()) - logicalTop;
-
+
LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
if (!style()->isHorizontalWritingMode())
rect = rect.transposedRect();
@@ -1105,7 +1105,7 @@
// flag on the RenderObject has been cleared, so use the one on the style().
topLeft += layer()->offsetForInFlowPosition();
}
-
+
// FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout,
// its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
rect.setLocation(topLeft);
@@ -1122,15 +1122,15 @@
rect.move(-containerOffset);
return;
}
-
+
o->computeRectForRepaint(repaintContainer, rect, fixed);
}
LayoutSize RenderInline::offsetFromContainer(RenderObject* container, const LayoutPoint& point, bool* offsetDependsOnPoint) const
{
ASSERT(container == this->container());
-
- LayoutSize offset;
+
+ LayoutSize offset;
if (isInFlowPositioned())
offset += offsetForInFlowPosition();
@@ -1228,7 +1228,7 @@
// We're in the continuation of a split inline. Adjust our local point to be in the coordinate space
// of the principal renderer's containing block. This will end up being the innerNonSharedNode.
RenderBlock* firstBlock = n->renderer()->containingBlock();
-
+
// Get our containing block.
RenderBox* block = containingBlock();
localPoint.moveBy(block->location() - firstBlock->locationOffset());
@@ -1278,7 +1278,7 @@
m_lineBoxes.deleteLineBoxTree(renderArena());
}
-InlineFlowBox* RenderInline::createInlineFlowBox()
+InlineFlowBox* RenderInline::createInlineFlowBox()
{
return new (renderArena()) InlineFlowBox(this);
}
@@ -1353,7 +1353,7 @@
{
if (!parent())
return;
-
+
// FIXME: We can do better.
repaint();
}
@@ -1367,7 +1367,7 @@
if (!curr->isText() && !curr->isListMarker()) {
FloatPoint pos(additionalOffset);
// FIXME: This doesn't work correctly with transforms.
- if (curr->hasLayer())
+ if (curr->hasLayer())
pos = curr->localToContainerPoint(FloatPoint(), paintContainer);
else if (curr->isBox())
pos.move(toRenderBox(curr)->locationOffset());
@@ -1414,7 +1414,7 @@
{
if (!hasOutline())
return;
-
+
RenderStyle* styleToUse = style();
if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
if (theme()->shouldDrawDefaultFocusRing(this)) {
@@ -1473,7 +1473,7 @@
IntRect pixelSnappedBox = pixelSnappedIntRect(box);
IntRect pixelSnappedLastLine = pixelSnappedIntRect(paintOffset.x() + lastline.x(), 0, lastline.width(), 0);
IntRect pixelSnappedNextLine = pixelSnappedIntRect(paintOffset.x() + nextline.x(), 0, nextline.width(), 0);
-
+
// left edge
drawLineForBoxSide(graphicsContext,
pixelSnappedBox.x() - outlineWidth,
@@ -1485,7 +1485,7 @@
(lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? outlineWidth : -outlineWidth),
(nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? outlineWidth : -outlineWidth),
antialias);
-
+
// right edge
drawLineForBoxSide(graphicsContext,
pixelSnappedBox.maxX(),
@@ -1508,7 +1508,7 @@
outlineWidth,
(!lastline.isEmpty() && paintOffset.x() + lastline.x() + 1 < pixelSnappedBox.maxX() + outlineWidth) ? -outlineWidth : outlineWidth,
antialias);
-
+
if (lastline.maxX() < thisline.maxX())
drawLineForBoxSide(graphicsContext,
max(lastline.isEmpty() ? -1000000 : pixelSnappedLastLine.maxX(), pixelSnappedBox.x() - outlineWidth),
@@ -1541,7 +1541,7 @@
outlineWidth,
(!nextline.isEmpty() && paintOffset.x() + nextline.x() + 1 < pixelSnappedBox.maxX() + outlineWidth) ? -outlineWidth : outlineWidth,
antialias);
-
+
if (nextline.maxX() < thisline.maxX())
drawLineForBoxSide(graphicsContext,
max(!nextline.isEmpty() ? pixelSnappedNextLine.maxX() : -1000000, pixelSnappedBox.x() - outlineWidth),
@@ -1584,7 +1584,7 @@
FloatPoint absPos = container->localToAbsolute();
region.bounds.setX(absPos.x() + region.bounds.x());
region.bounds.setY(absPos.y() + region.bounds.y());
-
+
regions.append(region);
}
diff --git a/Source/core/rendering/RenderInline.h b/Source/core/rendering/RenderInline.h
index 49ab4ca..dfa2889 100644
--- a/Source/core/rendering/RenderInline.h
+++ b/Source/core/rendering/RenderInline.h
@@ -78,7 +78,7 @@
RenderInline* inlineElementContinuation() const;
virtual void updateDragState(bool dragOn) OVERRIDE FINAL;
-
+
LayoutSize offsetForInFlowPositionedInline(const RenderBox* child) const;
virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE FINAL;
@@ -164,7 +164,7 @@
virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const OVERRIDE FINAL;
virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const OVERRIDE FINAL;
-
+
virtual void childBecameNonInline(RenderObject* child) OVERRIDE FINAL;
virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRIDE FINAL;
@@ -172,9 +172,9 @@
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE FINAL;
virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&) OVERRIDE FINAL;
-
+
virtual void updateFromStyle() OVERRIDE FINAL;
-
+
RenderInline* clone() const;
void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutRect& prevLine, const LayoutRect& thisLine,
@@ -188,13 +188,13 @@
};
inline RenderInline* toRenderInline(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderInline());
return static_cast<RenderInline*>(object);
}
inline const RenderInline* toRenderInline(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderInline());
return static_cast<const RenderInline*>(object);
}
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index a7133a9..fc7e403 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -103,9 +103,9 @@
#include "core/rendering/RenderView.h"
#include "core/rendering/svg/ReferenceFilterBuilder.h"
#include "core/rendering/svg/RenderSVGResourceClipper.h"
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/CString.h>
-#include <wtf/UnusedParam.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/UnusedParam.h"
+#include "wtf/text/CString.h"
#define MIN_INTERSECT_FOR_REVEAL 32
@@ -262,7 +262,7 @@
// FIXME: Eventually there will be more factors than isComposited() to decide whether or not to render the filter
if (!renderer()->hasFilter())
return false;
-
+
if (!isComposited())
return true;
@@ -271,8 +271,8 @@
return false;
}
-
-bool RenderLayer::requiresFullLayerImageForFilters() const
+
+bool RenderLayer::requiresFullLayerImageForFilters() const
{
if (!paintsWithFilters())
return false;
@@ -320,7 +320,7 @@
// Clear our cached clip rect information.
clearClipRects();
-
+
if (hasOverflowControls()) {
LayoutPoint offsetFromRoot;
if (geometryMap)
@@ -385,7 +385,7 @@
updatePagination();
flags |= UpdatePagination;
}
-
+
if (renderer()->hasColumns())
flags |= UpdatePagination;
@@ -736,7 +736,7 @@
// ASSERT(m_repaintRect == renderer()->clippedOverflowRectForRepaint(renderer()->containerForRepaint()));
// ASSERT(m_outlineBox == renderer()->outlineBoundsForRepaint(renderer()->containerForRepaint(), geometryMap));
}
-
+
for (RenderLayer* child = firstChild(); child; child = child->nextSibling())
child->updateLayerPositionsAfterScroll(geometryMap, flags);
@@ -793,11 +793,11 @@
m_transform = adoptPtr(new TransformationMatrix);
else
m_transform.clear();
-
+
// Layers with transforms act as clip rects roots, so clear the cached clip rects here.
clearClipRectsIncludingDescendants();
}
-
+
if (hasTransform) {
RenderBox* box = renderBox();
ASSERT(box);
@@ -839,7 +839,7 @@
{
if (!m_transform)
return TransformationMatrix();
-
+
if (paintBehavior & PaintBehaviorFlattenCompositingLayers) {
TransformationMatrix matrix = *m_transform;
makeMatrixRenderable(matrix, false /* flatten 3d */);
@@ -858,15 +858,15 @@
containingBlock && containingBlock != view && containingBlock != ancestorColumnsRenderer;
containingBlock = containingBlock->containingBlock())
prevBlock = containingBlock;
-
+
// If the columns block wasn't in our containing block chain, then we aren't paginated by it.
if (containingBlock != ancestorColumnsRenderer)
return false;
-
+
// If the previous block is absolutely positioned, then we can't be paginated by the columns block.
if (prevBlock->isOutOfFlowPositioned())
return false;
-
+
// Otherwise we are paginated by the columns block.
return true;
}
@@ -955,13 +955,13 @@
}
void RenderLayer::setHasVisibleContent()
-{
+{
if (m_hasVisibleContent && !m_visibleContentStatusDirty) {
ASSERT(!parent() || parent()->hasVisibleDescendant());
return;
}
- m_visibleContentStatusDirty = false;
+ m_visibleContentStatusDirty = false;
m_hasVisibleContent = true;
computeRepaintRects(renderer()->containerForRepaint());
if (!isNormalFlowOnly()) {
@@ -979,9 +979,9 @@
parent()->setAncestorChainHasVisibleDescendant();
}
-void RenderLayer::dirtyVisibleContentStatus()
-{
- m_visibleContentStatusDirty = true;
+void RenderLayer::dirtyVisibleContentStatus()
+{
+ m_visibleContentStatusDirty = true;
if (parent())
parent()->dirtyAncestorChainVisibleDescendantStatus();
}
@@ -1087,7 +1087,7 @@
RenderLayer* curr = ancestorStackingContainer();
if (curr)
curr->m_3DTransformedDescendantStatusDirty = true;
-
+
// This propagates up through preserve-3d hierarchies to the enclosing flattening layer.
// Note that preserves3D() creates stacking context, so we can just run up the stacking containers.
while (curr && curr->preserves3D()) {
@@ -1116,10 +1116,10 @@
for (unsigned i = 0; i < negativeZOrderList->size(); ++i)
m_has3DTransformedDescendant |= negativeZOrderList->at(i)->update3DTransformedDescendantStatus();
}
-
+
m_3DTransformedDescendantStatusDirty = false;
}
-
+
// If we live in a 3d hierarchy, then the layer at the root of that hierarchy needs
// the m_has3DTransformedDescendant set.
if (preserves3D())
@@ -1161,7 +1161,7 @@
localPoint -= toRenderBox(curr)->topLeftLocationOffset();
}
}
-
+
// Subtract our parent's scroll offset.
if (renderer()->isOutOfFlowPositioned() && enclosingPositionedAncestor()) {
RenderLayer* positionedParent = enclosingPositionedAncestor();
@@ -1171,7 +1171,7 @@
LayoutSize offset = positionedParent->scrolledContentOffset();
localPoint -= offset;
}
-
+
if (renderer()->isOutOfFlowPositioned() && positionedParent->renderer()->isInFlowPositioned() && positionedParent->renderer()->isRenderInline()) {
LayoutSize offset = toRenderInline(positionedParent->renderer())->offsetForInFlowPositionedInline(toRenderBox(renderer()));
localPoint += offset;
@@ -1194,7 +1194,7 @@
localPoint -= scrollOffset;
}
}
-
+
bool positionOrOffsetChanged = false;
if (renderer()->isInFlowPositioned()) {
LayoutSize newOffset = toRenderBoxModelObject(renderer())->offsetForInFlowPosition();
@@ -1207,7 +1207,7 @@
// FIXME: We'd really like to just get rid of the concept of a layer rectangle and rely on the renderers.
localPoint -= inlineBoundingBoxOffset;
-
+
positionOrOffsetChanged |= location() != localPoint;
setLocation(localPoint);
return positionOrOffsetChanged;
@@ -1234,12 +1234,12 @@
// We want it to be in the top-left, so subtract half the height and width.
perspectiveOriginX -= boxWidth / 2.0f;
perspectiveOriginY -= boxHeight / 2.0f;
-
+
TransformationMatrix t;
t.translate(perspectiveOriginX, perspectiveOriginY);
t.applyPerspective(style->perspective());
t.translate(-perspectiveOriginX, -perspectiveOriginY);
-
+
return t;
}
@@ -1334,7 +1334,7 @@
if (curr->isComposited())
return const_cast<RenderLayer*>(curr);
}
-
+
return 0;
}
@@ -1347,7 +1347,7 @@
if (curr->isComposited() && !curr->backing()->paintsIntoCompositedAncestor())
return const_cast<RenderLayer*>(curr);
}
-
+
return 0;
}
@@ -1358,7 +1358,7 @@
if (curr->requiresFullLayerImageForFilters())
return const_cast<RenderLayer*>(curr);
}
-
+
return 0;
}
@@ -1375,7 +1375,7 @@
{
if (rect.isEmpty())
return;
-
+
LayoutRect rectForRepaint = rect;
renderer()->style()->filterOutsets().expandRect(rectForRepaint);
@@ -1390,12 +1390,12 @@
// Note: This is only for output rect, so there's no need to expand the dirty source rect.
rectForRepaint.unite(calculateLayerBounds(this));
}
-
+
RenderLayer* parentLayer = enclosingFilterRepaintLayer();
ASSERT(parentLayer);
FloatQuad repaintQuad(rectForRepaint);
LayoutRect parentLayerRect = renderer()->localToContainerQuad(repaintQuad, parentLayer->renderer()).enclosingBoundingBox();
-
+
if (parentLayer->isComposited()) {
parentLayer->setBackingNeedsRepaintInRect(parentLayerRect);
return;
@@ -1403,15 +1403,15 @@
if (parentLayer->paintsWithFilters()) {
parentLayer->setFilterBackendNeedsRepaintingInRect(parentLayerRect);
- return;
+ return;
}
-
+
if (parentLayer->isRootLayer()) {
RenderView* view = toRenderView(parentLayer->renderer());
view->repaintViewRectangle(parentLayerRect);
return;
}
-
+
ASSERT_NOT_REACHED();
}
@@ -1424,7 +1424,7 @@
}
return false;
}
-
+
RenderLayer* RenderLayer::clippingRootForPainting() const
{
if (isComposited())
@@ -1530,7 +1530,7 @@
// FIXME: Although this function completely ignores CSS-imposed clipping, we did already intersect with the
// paintDirtyRect, and that should cut down on the amount we have to paint. Still it
// would be better to respect clips.
-
+
if (rootLayer != layer && ((transparencyBehavior == PaintingTransparencyClipBox && layer->paintsWithTransform(paintBehavior))
|| (transparencyBehavior == HitTestingTransparencyClipBox && layer->hasTransform()))) {
// The best we can do here is to use enclosed bounding boxes to establish a "fuzzy" enough clip to encompass
@@ -1552,19 +1552,19 @@
LayoutRect result = transform.mapRect(clipRect);
if (!paginationLayer)
return result;
-
+
// We have to break up the transformed extent across our columns.
// Split our box up into the actual fragment boxes that render in the columns/pages and unite those together to
// get our true bounding box.
RenderFlowThread* enclosingFlowThread = toRenderFlowThread(paginationLayer->renderer());
result = enclosingFlowThread->fragmentsBoundingBox(result);
-
+
LayoutPoint rootLayerDelta;
paginationLayer->convertToLayerCoords(rootLayer, rootLayerDelta);
result.moveBy(rootLayerDelta);
return result;
}
-
+
LayoutRect clipRect = layer->boundingBox(rootLayer, RenderLayer::UseFragmentBoxes);
expandClipRectForDescendantsAndReflection(clipRect, layer, rootLayer, transparencyBehavior, paintBehavior);
layer->renderer()->style()->filterOutsets().expandRect(clipRect);
@@ -1580,11 +1580,11 @@
{
if (context->paintingDisabled() || (paintsWithTransparency(paintBehavior) && m_usedTransparency))
return;
-
+
RenderLayer* ancestor = transparentPaintingAncestor();
if (ancestor)
ancestor->beginTransparencyLayers(context, rootLayer, paintDirtyRect, paintBehavior);
-
+
if (paintsWithTransparency(paintBehavior)) {
m_usedTransparency = true;
context->save();
@@ -1834,7 +1834,7 @@
break;
}
}
-
+
ASSERT(fixedPositionContainerLayer); // We should have hit the RenderView's layer at least.
if (fixedPositionContainerLayer != ancestorLayer) {
@@ -1850,7 +1850,7 @@
}
return ancestorLayer;
}
-
+
RenderLayer* parentLayer;
if (position == AbsolutePosition || position == FixedPosition) {
// Do what enclosingPositionedAncestor() does, but check for ancestorLayer along the way.
@@ -1883,7 +1883,7 @@
LayoutPoint thisCoords;
layer->convertToLayerCoords(positionedAncestor, thisCoords);
-
+
LayoutPoint ancestorCoords;
ancestorLayer->convertToLayerCoords(positionedAncestor, ancestorCoords);
@@ -1892,7 +1892,7 @@
}
} else
parentLayer = layer->parent();
-
+
if (!parentLayer)
return 0;
@@ -2020,9 +2020,9 @@
Frame* frame = renderer()->frame();
if (!frame)
return;
-
+
IntPoint lastKnownMousePosition = frame->eventHandler()->lastKnownMousePosition();
-
+
// We need to check if the last known mouse position is out of the window. When the mouse is out of the window, the position is incoherent
static IntPoint previousMousePosition;
if (lastKnownMousePosition.x() < 0 || lastKnownMousePosition.y() < 0)
@@ -2068,7 +2068,7 @@
// have an overflow clip. Which means that it is a document node that can be scrolled.
renderer()->view()->frameView()->scrollBy(delta);
- // FIXME: If we didn't scroll the whole way, do we want to try looking at the frames ownerElement?
+ // FIXME: If we didn't scroll the whole way, do we want to try looking at the frames ownerElement?
// https://bugs.webkit.org/show_bug.cgi?id=28237
}
}
@@ -2104,7 +2104,7 @@
if (m_scrollDimensionsDirty)
computeScrollDimensions();
}
-
+
if (m_scrollOffset == toIntSize(newScrollOffset))
return;
m_scrollOffset = toIntSize(newScrollOffset);
@@ -2113,7 +2113,7 @@
InspectorInstrumentation::willScrollLayer(renderer());
RenderView* view = renderer()->view();
-
+
// We should have a RenderView if we're trying to scroll.
ASSERT(view);
@@ -2185,7 +2185,7 @@
RenderLayer* parentLayer = 0;
LayoutRect newRect = rect;
- // We may end up propagating a scroll event. It is important that we suspend events until
+ // We may end up propagating a scroll event. It is important that we suspend events until
// the end of the function since they could delete the layer or the layer's renderer().
FrameView* frameView = renderer()->document()->view();
if (frameView)
@@ -2253,7 +2253,7 @@
}
}
}
-
+
if (parentLayer)
parentLayer->scrollRectToVisible(newRect, alignX, alignY);
@@ -2303,7 +2303,7 @@
// Given the X behavior, compute the X coordinate.
LayoutUnit x;
- if (scrollX == noScroll)
+ if (scrollX == noScroll)
x = visibleRect.x();
else if (scrollX == alignRight)
x = exposeRect.maxX() - visibleRect.width();
@@ -2336,7 +2336,7 @@
// Given the Y behavior, compute the Y coordinate.
LayoutUnit y;
- if (scrollY == noScroll)
+ if (scrollY == noScroll)
y = visibleRect.y();
else if (scrollY == alignBottom)
y = exposeRect.maxY() - visibleRect.height();
@@ -2409,17 +2409,17 @@
LayoutSize newOffset = offsetFromResizeCorner(document->view()->windowToContents(pos));
newOffset.setWidth(newOffset.width() / zoomFactor);
newOffset.setHeight(newOffset.height() / zoomFactor);
-
+
LayoutSize currentSize = LayoutSize(renderer->width() / zoomFactor, renderer->height() / zoomFactor);
LayoutSize minimumSize = element->minimumSizeForResizing().shrunkTo(currentSize);
element->setMinimumSizeForResizing(minimumSize);
-
+
LayoutSize adjustedOldOffset = LayoutSize(oldOffset.width() / zoomFactor, oldOffset.height() / zoomFactor);
if (renderer->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
newOffset.setWidth(-newOffset.width());
adjustedOldOffset.setWidth(-adjustedOldOffset.width());
}
-
+
LayoutSize difference = (currentSize + newOffset - adjustedOldOffset).expandedTo(minimumSize) - currentSize;
bool isBoxSizingBorder = renderer->style()->boxSizing() == BORDER_BOX;
@@ -2496,9 +2496,9 @@
verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()) ? verticalScrollbar()->width() : 0;
horizontalScrollbarHeight = (horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar()) ? horizontalScrollbar()->height() : 0;
}
-
+
return IntRect(IntPoint(scrollXOffset(), scrollYOffset()),
- IntSize(max(0, m_layerSize.width() - verticalScrollbarWidth),
+ IntSize(max(0, m_layerSize.width() - verticalScrollbarWidth),
max(0, m_layerSize.height() - horizontalScrollbarHeight)));
}
@@ -2731,7 +2731,7 @@
if (scrollbar == m_hBar.get())
return IntSize(horizontalScrollbarStart(0), box->height() - box->borderBottom() - scrollbar->height());
-
+
ASSERT_NOT_REACHED();
return IntSize();
}
@@ -2800,10 +2800,10 @@
widget = Scrollbar::createNativeScrollbar(scrollableArea(), orientation, RegularScrollbar);
if (orientation == HorizontalScrollbar)
scrollableArea()->didAddHorizontalScrollbar(widget.get());
- else
+ else
scrollableArea()->didAddVerticalScrollbar(widget.get());
}
- renderer()->document()->view()->addChild(widget.get());
+ renderer()->document()->view()->addChild(widget.get());
return widget.release();
}
@@ -2920,7 +2920,7 @@
{
if (!m_hBar && !m_vBar && !canResize())
return;
-
+
RenderBox* box = renderBox();
if (!box)
return;
@@ -2933,13 +2933,13 @@
vBarRect.move(offsetFromRoot);
m_vBar->setFrameRect(vBarRect);
}
-
+
if (m_hBar) {
IntRect hBarRect = rectForHorizontalScrollbar(borderBox);
hBarRect.move(offsetFromRoot);
m_hBar->setFrameRect(hBarRect);
}
-
+
if (m_scrollCorner)
m_scrollCorner->setFrameRect(scrollCorner);
if (m_resizer)
@@ -3146,7 +3146,7 @@
if (scrollCornerRect().intersects(localRect))
return true;
-
+
if (resizerCornerRect(borderBox, ResizerForPointer).intersects(localRect))
return true;
@@ -3163,7 +3163,7 @@
// on top of everything else. If this is the normal painting pass, paintingOverlayControls
// will be false, and we should just tell the root layer that there are overlay scrollbars
// that need to be painted. That will cause the second pass through the layer tree to run,
- // and we'll paint the scrollbars then. In the meantime, cache tx and ty so that the
+ // and we'll paint the scrollbars then. In the meantime, cache tx and ty so that the
// second pass doesn't need to re-enter the RenderTree to get it right.
if (hasOverlayScrollbars() && !paintingOverlayControls) {
m_cachedOverlayScrollbarOffset = paintOffset;
@@ -3211,7 +3211,7 @@
// We fill our scroll corner with white if we have a scrollbar that doesn't run all the way up to the
// edge of the box.
paintScrollCorner(context, adjustedPaintOffset, damageRect);
-
+
// Paint our resizer last, since it sits on top of the scroll corner.
paintResizer(context, adjustedPaintOffset, damageRect);
}
@@ -3331,7 +3331,7 @@
RenderBox* box = renderBox();
ASSERT(box);
-
+
IntRect resizeControlRect;
if (renderer()->style()->resize() != RESIZE_NONE) {
resizeControlRect = resizerCornerRect(box->pixelSnappedBorderBoxRect(), ResizerForPointer);
@@ -3404,13 +3404,13 @@
{
if (startLayer == endLayer)
return true;
-
+
RenderView* view = startLayer->renderer()->view();
for (RenderBlock* currentBlock = startLayer->renderer()->containingBlock(); currentBlock && currentBlock != view; currentBlock = currentBlock->containingBlock()) {
if (currentBlock->layer() == endLayer)
return true;
}
-
+
return false;
}
@@ -3421,7 +3421,7 @@
return;
context->save();
context->clip(pixelSnappedIntRect(clipRect.rect()));
-
+
if (!clipRect.hasRadius())
return;
@@ -3467,7 +3467,7 @@
{
return paintingReflection && !layer->has3DTransform();
}
-
+
static inline bool shouldSuppressPaintingLayer(RenderLayer* layer)
{
// Avoid painting descendants of the root layer when stylesheets haven't loaded. This eliminates FOUC.
@@ -3509,7 +3509,7 @@
if (shouldSuppressPaintingLayer(this))
return;
-
+
// If this layer is totally invisible then there is nothing to paint.
if (!renderer()->opacity())
return;
@@ -3545,7 +3545,7 @@
IgnoreOverlayScrollbarSize, (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip);
clipRect = backgroundClipRect(clipRectsContext);
clipRect.intersect(paintingInfo.paintDirtyRect);
-
+
// Push the parent coordinate space's clip.
parent()->clipToRect(paintingInfo.rootLayer, context, paintingInfo.paintDirtyRect, clipRect);
}
@@ -3558,7 +3558,7 @@
return;
}
-
+
paintLayerContentsAndReflection(context, paintingInfo, paintFlags);
}
@@ -3607,7 +3607,7 @@
context->setUseHighResMarkers(deviceScaleFactor > 1.5f);
GraphicsContext* transparencyLayerContext = context;
-
+
if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer()->isRenderView() && !renderer()->isRoot())
return;
@@ -3672,7 +3672,7 @@
// Rewire the old context to a memory buffer, so that we can capture the contents of the layer.
// NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer
- // on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that
+ // on the original context and avoid duplicating "beginFilterEffect" after each transparency layer call. Also, note that
// beginTransparencyLayers will only create a single lazy transparency layer, even though it is called twice in this method.
context = filterPainter.beginFilterEffect(context);
@@ -3705,7 +3705,7 @@
bool forceBlackText = localPaintingInfo.paintBehavior & PaintBehaviorForceBlackText;
bool selectionOnly = localPaintingInfo.paintBehavior & PaintBehaviorSelectionOnly;
-
+
PaintBehavior paintBehavior = PaintBehaviorNormal;
if (localPaintFlags & PaintLayerPaintingSkipRootBackground)
paintBehavior |= PaintBehaviorSkipRootBackground;
@@ -3721,7 +3721,7 @@
(isPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetFromRoot);
updatePaintingInfoForFragments(layerFragments, localPaintingInfo, localPaintFlags, shouldPaintContent, &offsetFromRoot);
}
-
+
if (isPaintingCompositedBackground) {
// Paint only the backgrounds for all of the fragments of the layer.
if (shouldPaintContent && !selectionOnly)
@@ -3732,7 +3732,7 @@
// Now walk the sorted list of children with negative z-indices.
if ((isPaintingScrollingContent && isPaintingOverflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackground))
paintList(negZOrderList(), context, localPaintingInfo, localPaintFlags);
-
+
if (isPaintingCompositedForeground) {
if (shouldPaintContent)
paintForegroundForFragments(layerFragments, context, transparencyLayerContext, paintingInfo.paintDirtyRect, haveTransparency,
@@ -3745,7 +3745,7 @@
if (isPaintingCompositedForeground) {
// Paint any child layers that have overflow.
paintList(m_normalFlowList.get(), context, localPaintingInfo, localPaintFlags);
-
+
// Now walk the sorted list of children with positive z-indices.
paintList(posZOrderList(), context, localPaintingInfo, localPaintFlags);
}
@@ -3761,7 +3761,7 @@
context = filterPainter.applyFilterEffect();
restoreClip(transparencyLayerContext, localPaintingInfo.paintDirtyRect, backgroundRect);
}
-
+
// Make sure that we now use the original transparency context.
ASSERT(transparencyLayerContext == context);
@@ -3836,11 +3836,11 @@
fragments.append(fragment);
return;
}
-
+
// Compute our offset within the enclosing pagination layer.
LayoutPoint offsetWithinPaginatedLayer;
convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginatedLayer);
-
+
// Calculate clip rects relative to the enclosingPaginationLayer. The purpose of this call is to determine our bounds clipped to intermediate
// layers between us and the pagination context. It's important to minimize the number of fragments we need to create and this helps with that.
ClipRectsContext paginationClipRectsContext(enclosingPaginationLayer(), region, clipRectsType, inOverlayScrollbarSizeRelevancy, respectOverflowClip);
@@ -3850,7 +3850,7 @@
ClipRect outlineRectInFlowThread;
calculateRects(paginationClipRectsContext, PaintInfo::infiniteRect(), layerBoundsInFlowThread, backgroundRectInFlowThread, foregroundRectInFlowThread,
outlineRectInFlowThread, &offsetWithinPaginatedLayer);
-
+
// Take our bounding box within the flow thread and clip it.
LayoutRect layerBoundingBoxInFlowThread = layerBoundingBox ? *layerBoundingBox : boundingBox(enclosingPaginationLayer(), 0, &offsetWithinPaginatedLayer);
layerBoundingBoxInFlowThread.intersect(backgroundRectInFlowThread.rect());
@@ -3865,10 +3865,10 @@
// that intersect the actual dirtyRect as well as the pages/columns that intersect our layer's bounding box.
RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginationLayer()->renderer());
enclosingFlowThread->collectLayerFragments(fragments, layerBoundingBoxInFlowThread, dirtyRectInFlowThread);
-
+
if (fragments.isEmpty())
return;
-
+
// Get the parent clip rects of the pagination layer, since we need to intersect with that when painting column contents.
ClipRect ancestorClipRect = dirtyRect;
if (enclosingPaginationLayer()->parent()) {
@@ -3879,17 +3879,17 @@
for (size_t i = 0; i < fragments.size(); ++i) {
LayerFragment& fragment = fragments.at(i);
-
+
// Set our four rects with all clipping applied that was internal to the flow thread.
fragment.setRects(layerBoundsInFlowThread, backgroundRectInFlowThread, foregroundRectInFlowThread, outlineRectInFlowThread);
-
+
// Shift to the root-relative physical position used when painting the flow thread in this fragment.
fragment.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
// Intersect the fragment with our ancestor's background clip so that e.g., columns in an overflow:hidden block are
// properly clipped by the overflow.
fragment.intersect(ancestorClipRect.rect());
-
+
// Now intersect with our pagination clip. This will typically mean we're just intersecting the dirty rect with the column
// clip, so the column clip ends up being all we apply.
fragment.intersect(fragment.paginationClip);
@@ -3918,18 +3918,18 @@
enclosingPaginationLayer()->collectFragments(enclosingPaginationFragments, paintingInfo.rootLayer, paintingInfo.region, paintingInfo.paintDirtyRect,
(paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects, IgnoreOverlayScrollbarSize,
(paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip, &offsetOfPaginationLayerFromRoot, &transformedExtent);
-
+
for (size_t i = 0; i < enclosingPaginationFragments.size(); ++i) {
const LayerFragment& fragment = enclosingPaginationFragments.at(i);
-
+
// Apply the page/column clip for this fragment, as well as any clips established by layers in between us and
// the enclosing pagination layer.
LayoutRect clipRect = fragment.backgroundRect.rect();
-
+
// Now compute the clips within a given fragment
if (parent() != enclosingPaginationLayer()) {
enclosingPaginationLayer()->convertToLayerCoords(paintingInfo.rootLayer, offsetOfPaginationLayerFromRoot);
-
+
ClipRectsContext clipRectsContext(enclosingPaginationLayer(), paintingInfo.region, (paintFlags & PaintLayerTemporaryClipRects) ? TemporaryClipRects : PaintingClipRects,
IgnoreOverlayScrollbarSize, (paintFlags & PaintLayerPaintingOverflowContents) ? IgnoreOverflowClip : RespectOverflowClip);
LayoutRect parentClipRect = backgroundClipRect(clipRectsContext).rect();
@@ -3955,13 +3955,13 @@
// Begin transparency layers lazily now that we know we have to paint something.
if (haveTransparency)
beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.rootLayer, transparencyPaintDirtyRect, localPaintingInfo.paintBehavior);
-
+
if (localPaintingInfo.clipToDirtyRect) {
// Paint our background first, before painting any child layers.
// Establish the clip used to paint our background.
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.backgroundRect, DoNotIncludeSelfForBorderRadius); // Background painting will handle clipping to self.
}
-
+
// Paint the background.
// FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseBlockBackground, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
@@ -3986,25 +3986,25 @@
}
}
}
-
+
PaintBehavior localPaintBehavior = forceBlackText ? (PaintBehavior)PaintBehaviorForceBlackText : paintBehavior;
// Optimize clipping for the single fragment case.
bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() == 1 && layerFragments[0].shouldPaintContent && !layerFragments[0].foregroundRect.isEmpty();
if (shouldClip)
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, layerFragments[0].foregroundRect);
-
+
// We have to loop through every fragment multiple times, since we have to repaint in each specific phase in order for
// interleaving of the fragments to work properly.
paintForegroundForFragmentsWithPhase(selectionOnly ? PaintPhaseSelection : PaintPhaseChildBlockBackgrounds, layerFragments,
context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
-
+
if (!selectionOnly) {
paintForegroundForFragmentsWithPhase(PaintPhaseFloat, layerFragments, context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
paintForegroundForFragmentsWithPhase(PaintPhaseForeground, layerFragments, context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
paintForegroundForFragmentsWithPhase(PaintPhaseChildOutlines, layerFragments, context, localPaintingInfo, localPaintBehavior, paintingRootForRenderer);
}
-
+
if (shouldClip)
restoreClip(context, localPaintingInfo.paintDirtyRect, layerFragments[0].foregroundRect);
}
@@ -4018,15 +4018,15 @@
const LayerFragment& fragment = layerFragments.at(i);
if (!fragment.shouldPaintContent || fragment.foregroundRect.isEmpty())
continue;
-
+
if (shouldClip)
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect);
-
+
PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.foregroundRect.rect()), phase, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
if (phase == PaintPhaseForeground)
paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequests;
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
-
+
if (shouldClip)
restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.foregroundRect);
}
@@ -4039,7 +4039,7 @@
const LayerFragment& fragment = layerFragments.at(i);
if (fragment.outlineRect.isEmpty())
continue;
-
+
// Paint our own outline
PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.outlineRect.rect()), PaintPhaseSelfOutline, paintBehavior, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.outlineRect, DoNotIncludeSelfForBorderRadius);
@@ -4058,12 +4058,12 @@
if (localPaintingInfo.clipToDirtyRect)
clipToRect(localPaintingInfo.rootLayer, context, localPaintingInfo.paintDirtyRect, fragment.backgroundRect, DoNotIncludeSelfForBorderRadius); // Mask painting will handle clipping to self.
-
+
// Paint the mask.
// FIXME: Eventually we will collect the region from the fragment itself instead of just from the paint info.
PaintInfo paintInfo(context, pixelSnappedIntRect(fragment.backgroundRect.rect()), PaintPhaseMask, PaintBehaviorNormal, paintingRootForRenderer, localPaintingInfo.region, 0, 0, localPaintingInfo.rootLayer->renderer());
renderer()->paint(paintInfo, toPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subPixelAccumulation));
-
+
if (localPaintingInfo.clipToDirtyRect)
restoreClip(context, localPaintingInfo.paintDirtyRect, fragment.backgroundRect);
}
@@ -4109,12 +4109,12 @@
ASSERT(columnBlock && columnBlock->hasColumns());
if (!columnBlock || !columnBlock->hasColumns())
return;
-
+
LayoutPoint layerOffset;
// FIXME: It looks suspicious to call convertToLayerCoords here
// as canUseConvertToLayerCoords is true for this layer.
columnBlock->layer()->convertToLayerCoords(paintingInfo.rootLayer, layerOffset);
-
+
bool isHorizontal = columnBlock->style()->isHorizontalWritingMode();
ColumnInfo* colInfo = columnBlock->columnInfo();
@@ -4142,10 +4142,10 @@
LayoutRect localDirtyRect(paintingInfo.paintDirtyRect);
localDirtyRect.intersect(colRect);
-
+
if (!localDirtyRect.isEmpty()) {
GraphicsContextStateSaver stateSaver(*context);
-
+
// Each strip pushes a clip, since column boxes are specified as being
// like overflow:hidden.
context->clip(pixelSnappedIntRect(colRect));
@@ -4158,9 +4158,9 @@
oldTransform = *childLayer->transform();
TransformationMatrix newTransform(oldTransform);
newTransform.translateRight(roundToInt(offset.width()), roundToInt(offset.height()));
-
+
childLayer->m_transform = adoptPtr(new TransformationMatrix(newTransform));
-
+
LayerPaintingInfo localPaintingInfo(paintingInfo);
localPaintingInfo.paintDirtyRect = localDirtyRect;
childLayer->paintLayer(context, localPaintingInfo, paintFlags);
@@ -4176,7 +4176,7 @@
columnLayers[colIndex - 1]->convertToLayerCoords(paintingInfo.rootLayer, childOffset);
TransformationMatrix transform;
transform.translateRight(roundToInt(childOffset.x() + offset.width()), roundToInt(childOffset.y() + offset.height()));
-
+
// Apply the transform.
context->concatCTM(transform.toAffineTransform());
@@ -4225,8 +4225,8 @@
RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestArea, hitTestLocation, false);
if (!insideLayer) {
- // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
- // return ourselves. We do this so mouse events continue getting delivered after a drag has
+ // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
+ // return ourselves. We do this so mouse events continue getting delivered after a drag has
// exited the WebView, and so hit testing over a scrollbar hits the content document.
if (!request.isChildFrameHitTest() && (request.active() || request.release()) && isRootLayer()) {
renderer()->updateHitTestResult(result, toRenderView(renderer())->flipForWritingMode(hitTestLocation.point()));
@@ -4280,7 +4280,7 @@
// Flatten the point into the target plane
FloatPoint targetPoint = transformState.mappedPoint();
-
+
// Now map the point back through the transform, which computes Z.
FloatPoint3D backmappedPoint = transformState.m_accumulatedTransform.mapPoint(FloatPoint3D(targetPoint));
return backmappedPoint.z();
@@ -4313,7 +4313,7 @@
} else {
transformState->translate(offset.x(), offset.y(), HitTestingTransformState::AccumulateTransform);
}
-
+
return transformState;
}
@@ -4326,7 +4326,7 @@
// The hit layer is depth-sorting with other layers, so just say that it was hit.
if (canDepthSort)
return true;
-
+
// We need to look at z-depth to decide if this layer was hit.
if (zOffset) {
ASSERT(transformState);
@@ -4347,8 +4347,8 @@
// transformState.m_accumulatedTransform holds the transform from the containing flattening layer.
// transformState.m_lastPlanarPoint is the hitTestLocation in the plane of the containing flattening layer.
// transformState.m_lastPlanarQuad is the hitTestRect as a quad in the plane of the containing flattening layer.
-//
-// If zOffset is non-null (which indicates that the caller wants z offset information),
+//
+// If zOffset is non-null (which indicates that the caller wants z offset information),
// *zOffset on return is the z offset of the hit point relative to the containing flattening layer.
RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result,
const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, bool appliedTransform,
@@ -4411,7 +4411,7 @@
double localZOffset = -numeric_limits<double>::infinity();
double* zOffsetForDescendantsPtr = 0;
double* zOffsetForContentsPtr = 0;
-
+
bool depthSortDescendants = false;
if (preserves3D()) {
depthSortDescendants = true;
@@ -4525,7 +4525,7 @@
if (hitTestContents(request, result, fragment.layerBounds, hitTestLocation, hitTestFilter))
return true;
}
-
+
return false;
}
@@ -4539,7 +4539,7 @@
if (fragment.backgroundRect.intersects(hitTestLocation) && resizerCornerRect(pixelSnappedIntRect(fragment.layerBounds), ResizerForPointer).contains(hitTestLocation.roundedPoint()))
return true;
}
-
+
return false;
}
@@ -4554,21 +4554,21 @@
for (int i = enclosingPaginationFragments.size() - 1; i >= 0; --i) {
const LayerFragment& fragment = enclosingPaginationFragments.at(i);
-
+
// Apply the page/column clip for this fragment, as well as any clips established by layers in between us and
// the enclosing pagination layer.
LayoutRect clipRect = fragment.backgroundRect.rect();
-
+
// Now compute the clips within a given fragment
if (parent() != enclosingPaginationLayer()) {
enclosingPaginationLayer()->convertToLayerCoords(rootLayer, offsetOfPaginationLayerFromRoot);
-
+
ClipRectsContext clipRectsContext(enclosingPaginationLayer(), hitTestLocation.region(), RootRelativeClipRects, IncludeOverlayScrollbarSize);
LayoutRect parentClipRect = backgroundClipRect(clipRectsContext).rect();
parentClipRect.moveBy(fragment.paginationOffset + offsetOfPaginationLayerFromRoot);
clipRect.intersect(parentClipRect);
}
-
+
if (!hitTestLocation.intersects(clipRect))
continue;
@@ -4577,7 +4577,7 @@
if (hitLayer)
return hitLayer;
}
-
+
return 0;
}
@@ -4633,14 +4633,14 @@
if (!result.innerNonSharedNode())
result.setInnerNonSharedNode(e);
}
-
+
return true;
}
RenderLayer* RenderLayer::hitTestList(Vector<RenderLayer*>* list, RenderLayer* rootLayer,
const HitTestRequest& request, HitTestResult& result,
const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation,
- const HitTestingTransformState* transformState,
+ const HitTestingTransformState* transformState,
double* zOffsetForDescendants, double* zOffset,
const HitTestingTransformState* unflattenedTransformState,
bool depthSortDescendants)
@@ -4805,7 +4805,7 @@
if (m_clipRectsCache && m_clipRectsCache->getClipRects(clipRectsType, clipRectsContext.respectOverflowClip)) {
ASSERT(clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType]);
ASSERT(m_clipRectsCache->m_scrollbarRelevancy[clipRectsType] == clipRectsContext.overlayScrollbarSizeRelevancy);
-
+
#ifdef CHECK_CACHED_CLIP_RECTS
// This code is useful to check cached clip rects, but is too expensive to leave enabled in debug builds by default.
ClipRectsContext tempContext(clipRectsContext);
@@ -4816,7 +4816,7 @@
#endif
return; // We have the correct cached value.
}
-
+
// For transformed layers, the root layer was shifted to be us, so there is no need to
// examine the parent. We want to cache clip rects with us as the root.
RenderLayer* parentLayer = clipRectsContext.rootLayer != this ? parent() : 0;
@@ -4847,14 +4847,14 @@
clipRects.reset(PaintInfo::infiniteRect());
return;
}
-
+
ClipRectsType clipRectsType = clipRectsContext.clipRectsType;
bool useCached = clipRectsType != TemporaryClipRects;
// For transformed layers, the root layer was shifted to be us, so there is no need to
// examine the parent. We want to cache clip rects with us as the root.
RenderLayer* parentLayer = clipRectsContext.rootLayer != this ? parent() : 0;
-
+
// Ensure that our parent's clip has been calculated so that we can examine the values.
if (parentLayer) {
if (useCached && parentLayer->clipRects(clipRectsContext))
@@ -4877,7 +4877,7 @@
clipRects.setPosClipRect(clipRects.overflowClipRect());
else if (renderer()->style()->position() == AbsolutePosition)
clipRects.setOverflowClipRect(clipRects.posClipRect());
-
+
// Update the clip rects that will be passed to child layers.
if ((renderer()->hasOverflowClip() && (clipRectsContext.respectOverflowClip == RespectOverflowClip || this != clipRectsContext.rootLayer)) || renderer()->hasClip()) {
// This layer establishes a clip of some kind.
@@ -4892,7 +4892,7 @@
if (view && clipRects.fixed() && clipRectsContext.rootLayer->renderer() == view) {
offset -= view->frameView()->scrollOffsetForFixedPosition();
}
-
+
if (renderer()->hasOverflowClip()) {
ClipRect newOverflowClip = toRenderBox(renderer())->overflowClipRect(offset, clipRectsContext.region, clipRectsContext.overlayScrollbarSizeRelevancy);
if (renderer()->style()->hasBorderRadius())
@@ -4936,7 +4936,7 @@
ClipRect RenderLayer::backgroundClipRect(const ClipRectsContext& clipRectsContext) const
{
ASSERT(parent());
-
+
ClipRects parentRects;
// If we cross into a different pagination context, then we can't rely on the cache.
@@ -4947,7 +4947,7 @@
parentClipRects(tempContext, parentRects);
} else
parentClipRects(clipRectsContext, parentRects);
-
+
ClipRect backgroundClipRect = backgroundClipRectForPosition(parentRects, renderer()->style()->position());
RenderView* view = renderer()->view();
ASSERT(view);
@@ -4970,7 +4970,7 @@
foregroundRect = backgroundRect;
outlineRect = backgroundRect;
-
+
LayoutPoint offset;
if (offsetFromRoot)
offset = *offsetFromRoot;
@@ -5105,7 +5105,7 @@
if (isRootLayer() || renderer()->isRoot())
return true;
- // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we
+ // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we
// can go ahead and return true.
RenderView* view = renderer()->view();
ASSERT(view);
@@ -5115,7 +5115,7 @@
if (b.intersects(damageRect))
return true;
}
-
+
// Otherwise we need to compute the bounding box of this single layer and see if it intersects
// the damage rect.
return boundingBox(rootLayer, 0, offsetFromRoot).intersects(damageRect);
@@ -5170,7 +5170,7 @@
}
LayoutRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer, CalculateLayerBoundsFlags flags, const LayoutPoint* offsetFromRoot) const
-{
+{
LayoutRect result = localBoundingBox(flags);
if (renderer()->isBox())
renderBox()->flipForWritingMode(result);
@@ -5181,12 +5181,12 @@
// Split our box up into the actual fragment boxes that render in the columns/pages and unite those together to
// get our true bounding box.
LayoutPoint offsetWithinPaginationLayer;
- convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginationLayer);
+ convertToLayerCoords(enclosingPaginationLayer(), offsetWithinPaginationLayer);
result.moveBy(offsetWithinPaginationLayer);
RenderFlowThread* enclosingFlowThread = toRenderFlowThread(enclosingPaginationLayer()->renderer());
result = enclosingFlowThread->fragmentsBoundingBox(result);
-
+
LayoutPoint delta;
if (offsetFromRoot)
delta = *offsetFromRoot;
@@ -5201,7 +5201,7 @@
delta = *offsetFromRoot;
else
convertToLayerCoords(ancestorLayer, delta);
-
+
result.moveBy(delta);
return result;
}
@@ -5241,7 +5241,7 @@
if (FrameView* frameView = renderer->view()->frameView()) {
LayoutUnit contentsWidth = frameView->contentsWidth();
LayoutUnit contentsHeight = frameView->contentsHeight();
-
+
boundingBoxRect.setWidth(max(boundingBoxRect.width(), contentsWidth - boundingBoxRect.x()));
boundingBoxRect.setHeight(max(boundingBoxRect.height(), contentsHeight - boundingBoxRect.y()));
}
@@ -5273,7 +5273,7 @@
unionBounds.unite(childUnionBounds);
}
}
-
+
ASSERT(isStackingContainer() || (!posZOrderList() || !posZOrderList()->size()));
#if !ASSERT_DISABLED
@@ -5331,7 +5331,7 @@
else
convertToLayerCoords(ancestorLayer, ancestorRelOffset);
unionBounds.moveBy(ancestorRelOffset);
-
+
return pixelSnappedIntRect(unionBounds);
}
@@ -5342,7 +5342,7 @@
return;
clearClipRects(typeToClear);
-
+
for (RenderLayer* l = firstChild(); l; l = l->nextSibling())
l->clearClipRectsIncludingDescendants(typeToClear);
}
@@ -5637,7 +5637,7 @@
m_normalFlowList->append(child);
}
}
-
+
m_normalFlowListDirty = false;
}
@@ -5682,7 +5682,7 @@
// Create the buffer if it doesn't exist yet.
if (!buffer)
buffer = adoptPtr(new Vector<RenderLayer*>);
-
+
// Append ourselves at the end of the appropriate buffer.
buffer->append(this);
}
@@ -5830,7 +5830,7 @@
if (!child->hasLayer()) {
if (child->isRenderInline() || !child->isBox())
return true;
-
+
if (toRenderBox(child)->width() > 0 || toRenderBox(child)->height() > 0)
return true;
}
@@ -6064,13 +6064,13 @@
UseCounter::count(renderer()->document(), UseCounter::Reflection);
updateReflectionStyle();
}
-
+
// FIXME: Need to detect a swap from custom to native scrollbars (and vice versa).
if (m_hBar)
m_hBar->styleChanged();
if (m_vBar)
m_vBar->styleChanged();
-
+
updateScrollCornerStyle();
updateResizerStyle();
@@ -6200,7 +6200,7 @@
{
RefPtr<RenderStyle> newStyle = RenderStyle::create();
newStyle->inheritFrom(renderer()->style());
-
+
// Map in our transform.
TransformOperations transform;
switch (renderer()->style()->boxReflect()->direction()) {
@@ -6229,7 +6229,7 @@
// Map in our mask.
newStyle->setMaskBoxImage(renderer()->style()->boxReflect()->mask());
-
+
m_reflection->setStyle(newStyle.release());
}
@@ -6279,13 +6279,13 @@
RefPtr<CustomFilterProgram> program = customOperation->program();
if (!program->isLoaded())
continue;
-
+
CustomFilterGlobalContext* globalContext = renderer()->view()->customFilterGlobalContext();
RefPtr<CustomFilterValidatedProgram> validatedProgram = globalContext->getValidatedProgram(program->programInfo());
if (!validatedProgram->isInitialized())
continue;
- RefPtr<ValidatedCustomFilterOperation> validatedOperation = ValidatedCustomFilterOperation::create(validatedProgram.release(),
+ RefPtr<ValidatedCustomFilterOperation> validatedOperation = ValidatedCustomFilterOperation::create(validatedProgram.release(),
customOperation->parameters(), customOperation->meshRows(), customOperation->meshColumns(), customOperation->meshType());
outputFilters.operations().append(validatedOperation.release());
continue;
@@ -6326,14 +6326,14 @@
return;
}
-
+
RenderLayerFilterInfo* filterInfo = ensureFilterInfo();
if (!filterInfo->renderer()) {
RefPtr<FilterEffectRenderer> filterRenderer = FilterEffectRenderer::create();
RenderingMode renderingMode = renderer()->frame()->page()->settings()->acceleratedFiltersEnabled() ? Accelerated : Unaccelerated;
filterRenderer->setRenderingMode(renderingMode);
filterInfo->setRenderer(filterRenderer.release());
-
+
// We can optimize away code paths in other places if we know that there are no software filters.
renderer()->document()->view()->setHasSoftwareFilters(true);
}
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index 528b4ce..1ac295c 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -49,7 +49,7 @@
#include "core/rendering/RenderBox.h"
#include "core/rendering/RenderLayerScrollableArea.h"
-#include <wtf/OwnPtr.h>
+#include "wtf/OwnPtr.h"
#include "core/rendering/RenderLayerFilterInfo.h"
@@ -85,12 +85,12 @@
ClipRect()
: m_hasRadius(false)
{ }
-
+
ClipRect(const LayoutRect& rect)
: m_rect(rect)
, m_hasRadius(false)
{ }
-
+
const LayoutRect& rect() const { return m_rect; }
void setRect(const LayoutRect& rect) { m_rect = rect; }
@@ -154,7 +154,7 @@
m_posClipRect = r;
m_fixed = false;
}
-
+
const ClipRect& overflowClipRect() const { return m_overflowClipRect; }
void setOverflowClipRect(const ClipRect& r) { m_overflowClipRect = r; }
@@ -277,7 +277,7 @@
foregroundRect = foreground;
outlineRect = outline;
}
-
+
void moveBy(const LayoutPoint& offset)
{
layerBounds.moveBy(offset);
@@ -286,23 +286,23 @@
outlineRect.moveBy(offset);
paginationClip.moveBy(offset);
}
-
+
void intersect(const LayoutRect& rect)
{
backgroundRect.intersect(rect);
foregroundRect.intersect(rect);
outlineRect.intersect(rect);
}
-
+
bool shouldPaintContent;
LayoutRect layerBounds;
ClipRect backgroundRect;
ClipRect foregroundRect;
ClipRect outlineRect;
-
+
// Unique to paginated fragments. The physical translation to apply to shift the layer when painting/hit-testing.
LayoutPoint paginationOffset;
-
+
// Also unique to paginated fragments. An additional clip that applies to the layer. It is in layer-local
// (physical) coordinates.
LayoutRect paginationClip;
@@ -368,7 +368,7 @@
curr = curr->parent();
return curr;
}
-
+
const LayoutPoint& location() const { return m_topLeft; }
void setLocation(const LayoutPoint& p) { m_topLeft = p; }
@@ -442,7 +442,7 @@
bool isRootLayer() const { return m_isRootLayer; }
RenderLayerCompositor* compositor() const;
-
+
// Notification from the renderer that its content changed (e.g. current frame of image changed).
// Allows updates of layer content without repainting.
void contentChanged(ContentChangeType);
@@ -601,7 +601,7 @@
PaintLayerPaintingSkipRootBackground = 1 << 11,
PaintLayerPaintingCompositingAllPhases = (PaintLayerPaintingCompositingBackgroundPhase | PaintLayerPaintingCompositingForegroundPhase | PaintLayerPaintingCompositingMaskPhase)
};
-
+
typedef unsigned PaintLayerFlags;
// The two main functions that use the layer system. The paint method
@@ -683,7 +683,7 @@
// Can pass offsetFromRoot if known.
IntRect calculateLayerBounds(const RenderLayer* ancestorLayer, const LayoutPoint* offsetFromRoot = 0, CalculateLayerBoundsFlags = DefaultCalculateLayerBoundsFlags) const;
-
+
// WARNING: This method returns the offset for the parent as this is what updateLayerPositions expects.
LayoutPoint computeOffsetFromRoot(bool& hasLayerOffset) const;
@@ -695,7 +695,7 @@
LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; }
LayoutUnit staticBlockPosition() const { return m_staticBlockPosition; }
-
+
void setStaticInlinePosition(LayoutUnit position) { m_staticInlinePosition = position; }
void setStaticBlockPosition(LayoutUnit position) { m_staticBlockPosition = position; }
@@ -707,7 +707,7 @@
// returns the identity matrix.
TransformationMatrix currentTransform(RenderStyle::ApplyTransformOrigin = RenderStyle::IncludeTransformOrigin) const;
TransformationMatrix renderableTransform(PaintBehavior) const;
-
+
// Get the perspective transform, which is applied to transformed sublayers.
// Returns true if the layer has a -webkit-perspective.
// Note that this transform has the perspective-origin baked in.
@@ -757,20 +757,20 @@
FilterOperations computeFilterOperations(const RenderStyle*);
bool paintsWithFilters() const;
bool requiresFullLayerImageForFilters() const;
- FilterEffectRenderer* filterRenderer() const
+ FilterEffectRenderer* filterRenderer() const
{
RenderLayerFilterInfo* filterInfo = this->filterInfo();
return filterInfo ? filterInfo->renderer() : 0;
}
-
+
RenderLayerFilterInfo* filterInfo() const { return hasFilterInfo() ? RenderLayerFilterInfo::filterInfoForRenderLayer(this) : 0; }
RenderLayerFilterInfo* ensureFilterInfo() { return RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded(this); }
- void removeFilterInfoIfNeeded()
+ void removeFilterInfoIfNeeded()
{
if (hasFilterInfo())
- RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this);
+ RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this);
}
-
+
bool hasFilterInfo() const { return m_hasFilterInfo; }
void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo; }
@@ -816,7 +816,10 @@
bool requiresScrollableArea() const
{
// We don't use hasOverflowClip as it is not set on a lot of cases (e.g. non-block and root).
- return renderer()->style()->overflowX() != OVISIBLE || canResize() || usesCompositedScrolling();
+ // FIXME: It's wrong to check for scrollbars here but the scrollbar / scrollablearea code is
+ // entangled and racy at the moment so we need to hold onto the ScrollableArea as long as we
+ // have scrollbars. This check will go away once the scrollbars have been moved to RenderLayerScrollableArea.
+ return renderer()->style()->overflowX() != OVISIBLE || canResize() || usesCompositedScrolling() || m_hBar || m_vBar;
}
enum CollectLayersBehavior {
@@ -934,7 +937,7 @@
PaintBehavior paintBehavior;
bool clipToDirtyRect;
};
-
+
void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint());
@@ -980,7 +983,7 @@
const LayoutRect& hitTestRect, const HitTestLocation&,
const HitTestingTransformState* containerTransformState,
const LayoutPoint& translationOffset = LayoutPoint()) const;
-
+
bool hitTestContents(const HitTestRequest&, HitTestResult&, const LayoutRect& layerBounds, const HitTestLocation&, HitTestFilter) const;
bool hitTestContentsForFragments(const LayerFragments&, const HitTestRequest&, HitTestResult&, const HitTestLocation&, HitTestFilter, bool& insideClipRect) const;
bool hitTestResizerInFragments(const LayerFragments&, const HitTestLocation&) const;
@@ -1067,7 +1070,7 @@
// This flag is computed by RenderLayerCompositor, which knows more about 3d hierarchies than we do.
void setHas3DTransformedDescendant(bool b) { m_has3DTransformedDescendant = b; }
bool has3DTransformedDescendant() const { return m_has3DTransformedDescendant; }
-
+
void dirty3DTransformedDescendantStatus();
// Both updates the status, and returns true if descendants of this have 3d.
bool update3DTransformedDescendantStatus();
@@ -1099,10 +1102,10 @@
void drawPlatformResizerImage(GraphicsContext*, IntRect resizerCornerRect);
void updatePagination();
-
+
// FIXME: Temporary. Remove when new columns come online.
bool useRegionBasedColumns() const;
-
+
bool hasCompositingDescendant() const { return m_compositingProperties.hasCompositingDescendant; }
void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompositingDescendant = b; }
@@ -1242,7 +1245,7 @@
OwnPtr<Vector<RenderLayer*> > m_normalFlowList;
OwnPtr<ClipRectsCache> m_clipRectsCache;
-
+
IntPoint m_cachedOverlayScrollbarOffset;
// Cached normal flow values for absolute positioned elements with static left/top values.
@@ -1250,10 +1253,10 @@
LayoutUnit m_staticBlockPosition;
OwnPtr<TransformationMatrix> m_transform;
-
+
// May ultimately be extended to many replicas (with their own paint order).
RenderReplica* m_reflection;
-
+
// Renderers to hold our custom scroll corner and resizer.
RenderScrollbarPart* m_scrollCorner;
RenderScrollbarPart* m_resizer;
@@ -1322,7 +1325,7 @@
{
m_layer->setLayerListMutationAllowed(false);
}
-
+
~LayerListMutationDetector()
{
m_layer->setLayerListMutationAllowed(m_previousMutationAllowedState);
diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
index ca15213..3e23e44 100644
--- a/Source/core/rendering/RenderLayerBacking.cpp
+++ b/Source/core/rendering/RenderLayerBacking.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -53,8 +53,8 @@
#include "core/rendering/RenderVideo.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/style/KeyframeList.h"
-#include <wtf/CurrentTime.h>
-#include <wtf/text/StringBuilder.h>
+#include "wtf/CurrentTime.h"
+#include "wtf/text/StringBuilder.h"
#include "core/platform/graphics/filters/custom/CustomFilterOperation.h"
#include "core/rendering/FilterEffectRenderer.h"
@@ -165,7 +165,7 @@
m_isMainFrameRenderViewLayer = true;
}
}
-
+
createPrimaryGraphicsLayer();
}
@@ -205,7 +205,7 @@
#ifndef NDEBUG
layerName = m_owningLayer->debugName();
#endif
-
+
m_graphicsLayer = createGraphicsLayer(layerName, m_owningLayer->compositingReasons());
#if !OS(ANDROID)
@@ -251,7 +251,7 @@
style->applyTransform(t, toRenderBox(renderer())->pixelSnappedBorderBoxRect().size(), RenderStyle::ExcludeTransformOrigin);
makeMatrixRenderable(t, compositor()->canRender3DTransforms());
}
-
+
m_graphicsLayer->setTransform(t);
}
@@ -303,7 +303,7 @@
if (curr->hasTransform() || curr->needsCompositedScrolling())
return true;
}
-
+
return false;
}
@@ -347,7 +347,7 @@
m_boundsConstrainedByClipping = true;
} else
m_boundsConstrainedByClipping = false;
-
+
// If the element has a transform-origin that has fixed lengths, and the renderer has zero size,
// then we need to ensure that the compositing layer has non-zero size so that we can apply
// the transform-origin via the GraphicsLayer anchorPoint (which is expressed as a fractional value).
@@ -384,14 +384,14 @@
if (!layerCompositor->compositingLayersNeedRebuild()) {
// Calling updateGraphicsLayerGeometry() here gives incorrect results, because the
// position of this layer's GraphicsLayer depends on the position of our compositing
- // ancestor's GraphicsLayer. That cannot be determined until all the descendant
+ // ancestor's GraphicsLayer. That cannot be determined until all the descendant
// RenderLayers of that ancestor have been processed via updateLayerPositions().
//
// The solution is to update compositing children of this layer here,
// via updateCompositingChildrenGeometry().
updateCompositedBounds();
layerCompositor->updateCompositingDescendantGeometry(m_owningLayer, m_owningLayer, flags & CompositingChildrenOnly);
-
+
if (flags & IsUpdateRoot) {
updateGraphicsLayerGeometry();
layerCompositor->updateRootLayerPosition();
@@ -400,7 +400,7 @@
layerCompositor->updateCompositingDescendantGeometry(stackingContainer, stackingContainer, flags & CompositingChildrenOnly);
}
}
-
+
if (flags & NeedsFullRepaint && !paintsIntoCompositedAncestor())
setContentsNeedDisplay();
}
@@ -415,14 +415,14 @@
bool layerConfigChanged = false;
setBackgroundLayerPaintsFixedRootBackground(compositor->needsFixedRootBackgroundLayer(m_owningLayer));
-
+
// The background layer is currently only used for fixed root backgrounds.
if (updateBackgroundLayer(m_backgroundLayerPaintsFixedRootBackground))
layerConfigChanged = true;
if (updateForegroundLayer(compositor->needsContentsCompositingLayer(m_owningLayer)))
layerConfigChanged = true;
-
+
bool needsDescendentsClippingLayer = compositor->clipsCompositingDescendants(m_owningLayer);
// Our scrolling layer will clip.
@@ -506,7 +506,7 @@
updateLayerBlendMode(renderer()->style());
bool isSimpleContainer = isSimpleContainerCompositingLayer();
-
+
m_owningLayer->updateDescendantDependentFlags();
// m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer and its non-compositing
@@ -521,7 +521,7 @@
m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == BackfaceVisibilityVisible);
RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer();
-
+
// We compute everything relative to the enclosing compositing layer.
IntRect ancestorCompositingBounds;
if (compAncestor) {
@@ -553,7 +553,7 @@
IntPoint scrollOrigin(renderBox->borderLeft(), renderBox->borderTop());
graphicsLayerParentLocation = scrollOrigin - scrollOffset;
}
-
+
if (compAncestor && m_ancestorClippingLayer) {
// Call calculateRects to get the backgroundRect which is what is used to clip the contents of this
// layer. Note that we call it with temporaryClipRects = true because normally when computing clip rects
@@ -572,10 +572,10 @@
}
FloatSize contentsSize = relativeCompositingBounds.size();
-
+
m_graphicsLayer->setPosition(FloatPoint(relativeCompositingBounds.location() - graphicsLayerParentLocation));
m_graphicsLayer->setOffsetFromRenderer(toIntSize(localCompositingBounds.location()));
-
+
FloatSize oldSize = m_graphicsLayer->size();
if (oldSize != contentsSize) {
m_graphicsLayer->setSize(contentsSize);
@@ -594,7 +594,7 @@
clipLayer->setSize(clippingBox.size());
clipLayer->setOffsetFromRenderer(toIntSize(clippingBox.location()));
}
-
+
if (m_maskLayer) {
if (m_maskLayer->size() != m_graphicsLayer->size()) {
m_maskLayer->setSize(m_graphicsLayer->size());
@@ -603,7 +603,7 @@
m_maskLayer->setPosition(FloatPoint());
m_maskLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer());
}
-
+
if (m_owningLayer->hasTransform()) {
const IntRect borderBox = toRenderBox(renderer())->pixelSnappedBorderBoxRect();
@@ -622,7 +622,7 @@
GraphicsLayer* clipLayer = clippingLayer();
if (style->hasPerspective()) {
TransformationMatrix t = owningLayer()->perspectiveTransform();
-
+
if (clipLayer) {
clipLayer->setChildrenTransform(t);
m_graphicsLayer->setChildrenTransform(TransformationMatrix());
@@ -676,7 +676,7 @@
if (m_owningLayer->reflectionLayer() && m_owningLayer->reflectionLayer()->isComposited()) {
RenderLayerBacking* reflectionBacking = m_owningLayer->reflectionLayer()->backing();
reflectionBacking->updateGraphicsLayerGeometry();
-
+
// The reflection layer has the bounds of m_owningLayer->reflectionLayer(),
// but the reflected layer is the bounds of this layer, so we need to position it appropriately.
FloatRect layerBounds = compositedBounds();
@@ -764,7 +764,7 @@
// so it's not inserted here.
if (m_ancestorClippingLayer)
m_ancestorClippingLayer->removeAllChildren();
-
+
m_graphicsLayer->removeFromParent();
if (m_ancestorClippingLayer)
@@ -864,7 +864,7 @@
m_ancestorClippingLayer = nullptr;
layersChanged = true;
}
-
+
if (needsDescendantClip) {
// We don't need a child containment layer if we're the main frame render view
// layer. It's redundant as the frame clip above us will handle this clipping.
@@ -878,7 +878,7 @@
m_childContainmentLayer = nullptr;
layersChanged = true;
}
-
+
return layersChanged;
}
@@ -945,7 +945,7 @@
}
layer->setDrawsContent(hBar && !layer->hasContentsLayer());
}
-
+
if (GraphicsLayer* layer = layerForVerticalScrollbar()) {
Scrollbar* vBar = m_owningLayer->verticalScrollbar();
if (vBar) {
@@ -1130,18 +1130,18 @@
float RenderLayerBacking::compositingOpacity(float rendererOpacity) const
{
float finalOpacity = rendererOpacity;
-
+
for (RenderLayer* curr = m_owningLayer->parent(); curr; curr = curr->parent()) {
// We only care about parents that are stacking contexts.
// Recall that opacity creates stacking context.
if (!curr->isStackingContainer())
continue;
-
+
// If we found a compositing layer, we want to compute opacity
// relative to it. So we can break here.
if (curr->isComposited())
break;
-
+
finalOpacity *= curr->renderer()->opacity();
}
@@ -1206,7 +1206,7 @@
{
if (m_owningLayer->hasVisibleContent() && m_owningLayer->hasNonEmptyChildRenderers())
return true;
-
+
if (hasVisibleNonCompositingDescendantLayers())
return true;
@@ -1229,7 +1229,7 @@
if (renderObject->isReplaced() && !isCompositedPlugin(renderObject))
return false;
-
+
if (paintsBoxDecorations() || paintsChildren())
return false;
@@ -1241,22 +1241,22 @@
RenderObject* rootObject = renderObject->document()->documentElement() ? renderObject->document()->documentElement()->renderer() : 0;
if (!rootObject)
return false;
-
+
RenderStyle* style = rootObject->style();
-
+
// Reject anything that has a border, a border-radius or outline,
// or is not a simple background (no background, or solid color).
if (hasBoxDecorationsOrBackgroundImage(style))
return false;
-
+
// Now look at the body's renderer.
HTMLElement* body = renderObject->document()->body();
RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ? body->renderer() : 0;
if (!bodyObject)
return false;
-
+
style = bodyObject->style();
-
+
if (hasBoxDecorationsOrBackgroundImage(style))
return false;
}
@@ -1339,7 +1339,7 @@
bool RenderLayerBacking::isDirectlyCompositedImage() const
{
RenderObject* renderObject = renderer();
-
+
if (!renderObject->isImage() || m_owningLayer->hasBoxDecorationsOrBackground() || renderObject->hasClip())
return false;
@@ -1398,7 +1398,7 @@
m_graphicsLayer->setContentsToImage(image);
bool isSimpleContainer = false;
updateDrawsContent(isSimpleContainer);
-
+
// Image animation is "lazy", in that it automatically stops unless someone is drawing
// the image. So we have to kick the animation each time; this has the downside that the
// image will keep animating, even if its layer is not visible.
@@ -1471,14 +1471,14 @@
{
if (requiresOwnBacking == m_requiresOwnBackingStore)
return;
-
+
m_requiresOwnBackingStore = requiresOwnBacking;
// This affects the answer to paintsIntoCompositedAncestor(), which in turn affects
// cached clip rects, so when it changes we have to clear clip rects on descendants.
m_owningLayer->clearClipRectsIncludingDescendants(PaintingClipRects);
m_owningLayer->computeRepaintRectsIncludingDescendants();
-
+
compositor()->repaintInCompositedAncestor(m_owningLayer, compositedBounds());
}
@@ -1489,10 +1489,10 @@
void RenderLayerBacking::setContentsNeedDisplay()
{
ASSERT(!paintsIntoCompositedAncestor());
-
+
if (m_graphicsLayer && m_graphicsLayer->drawsContent())
m_graphicsLayer->setNeedsDisplay();
-
+
if (m_foregroundLayer && m_foregroundLayer->drawsContent())
m_foregroundLayer->setNeedsDisplay();
@@ -1553,7 +1553,7 @@
}
FontCachePurgePreventer fontCachePurgePreventer;
-
+
RenderLayer::PaintLayerFlags paintFlags = 0;
if (paintingPhase & GraphicsLayerPaintBackground)
paintFlags |= RenderLayer::PaintLayerPaintingCompositingBackgroundPhase;
@@ -1570,7 +1570,7 @@
paintFlags |= (RenderLayer::PaintLayerPaintingRootBackgroundOnly | RenderLayer::PaintLayerPaintingCompositingForegroundPhase); // Need PaintLayerPaintingCompositingForegroundPhase to walk child layers.
else if (compositor()->fixedRootBackgroundLayer())
paintFlags |= RenderLayer::PaintLayerPaintingSkipRootBackground;
-
+
// FIXME: GraphicsLayers need a way to split for RenderRegions.
RenderLayer::LayerPaintingInfo paintingInfo(m_owningLayer, paintDirtyRect, paintBehavior, LayoutSize());
m_owningLayer->paintLayerContents(context, paintingInfo, paintFlags);
@@ -1678,7 +1678,7 @@
if (!hasOpacity && !hasTransform && !hasFilter)
return false;
-
+
KeyframeValueList transformVector(AnimatedPropertyWebkitTransform);
KeyframeValueList opacityVector(AnimatedPropertyOpacity);
KeyframeValueList filterVector(AnimatedPropertyWebkitFilter);
@@ -1691,14 +1691,14 @@
if (!keyframeStyle)
continue;
-
+
// Get timing function.
RefPtr<TimingFunction> tf = keyframeStyle->hasAnimations() ? (*keyframeStyle->animations()).animation(0)->timingFunction() : 0;
-
+
bool isFirstOrLastKeyframe = key == 0 || key == 1;
if ((hasTransform && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyWebkitTransform))
transformVector.insert(adoptPtr(new TransformAnimationValue(key, &(keyframeStyle->transform()), tf)));
-
+
if ((hasOpacity && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyOpacity))
opacityVector.insert(adoptPtr(new FloatAnimationValue(key, keyframeStyle->opacity(), tf)));
@@ -1869,14 +1869,14 @@
if (m_graphicsLayer->drawsContent())
return NormalCompositingLayer;
-
+
return ContainerCompositingLayer;
}
double RenderLayerBacking::backingStoreMemoryEstimate() const
{
double backingMemory;
-
+
// m_ancestorClippingLayer and m_childContainmentLayer are just used for masking or containment, so have no backing.
backingMemory = m_graphicsLayer->backingStoreMemoryEstimate();
if (m_foregroundLayer)
@@ -1897,7 +1897,7 @@
if (m_layerForScrollCorner)
backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate();
-
+
return backingMemory;
}
diff --git a/Source/core/rendering/RenderLayerBacking.h b/Source/core/rendering/RenderLayerBacking.h
index c8d7fe2..1df576f 100644
--- a/Source/core/rendering/RenderLayerBacking.h
+++ b/Source/core/rendering/RenderLayerBacking.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderLayerBacking_h
@@ -47,7 +47,7 @@
// RenderLayerBacking controls the compositing behavior for a single RenderLayer.
// It holds the various GraphicsLayers, and makes decisions about intra-layer rendering
// optimizations.
-//
+//
// There is one RenderLayerBacking for each RenderLayer that is composited.
class RenderLayerBacking : public GraphicsLayerClient {
@@ -65,7 +65,7 @@
};
typedef unsigned UpdateAfterLayoutFlags;
void updateAfterLayout(UpdateAfterLayoutFlags);
-
+
// Returns true if layer configuration changed.
bool updateGraphicsLayerConfiguration();
// Update graphics layer position and bounds.
@@ -88,7 +88,7 @@
GraphicsLayer* backgroundLayer() const { return m_backgroundLayer.get(); }
bool backgroundLayerPaintsFixedRootBackground() const { return m_backgroundLayerPaintsFixedRootBackground; }
-
+
bool hasScrollingLayer() const { return m_scrollingLayer; }
GraphicsLayer* scrollingLayer() const { return m_scrollingLayer.get(); }
GraphicsLayer* scrollingContentsLayer() const { return m_scrollingContentsLayer.get(); }
@@ -126,7 +126,7 @@
IntRect compositedBounds() const;
void setCompositedBounds(const IntRect&);
void updateCompositedBounds();
-
+
void updateAfterWidgetResize();
void positionOverflowControlsLayers(const IntSize& offsetFromRoot);
bool hasUnpositionedOverflowControlsLayers() const;
@@ -147,10 +147,10 @@
IntRect contentsBox() const;
IntRect backgroundBox() const;
-
+
// For informative purposes only.
CompositingLayerType compositingLayerType() const;
-
+
GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); }
GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); }
GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); }
@@ -166,7 +166,7 @@
private:
void createPrimaryGraphicsLayer();
void destroyGraphicsLayers();
-
+
PassOwnPtr<GraphicsLayer> createGraphicsLayer(const String& name, CompositingReasons);
RenderLayerModelObject* renderer() const { return m_owningLayer->renderer(); }
@@ -184,11 +184,11 @@
bool updateScrollingLayers(bool scrollingLayers);
void updateDrawsContent(bool isSimpleContainer);
void registerScrollingLayers();
-
+
void setBackgroundLayerPaintsFixedRootBackground(bool);
GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
-
+
IntSize contentOffsetInCompostingLayer() const;
// Result is transform origin in pixels.
FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
@@ -200,9 +200,9 @@
void updateLayerBlendMode(const RenderStyle*);
// Return the opacity value that this layer should use for compositing.
float compositingOpacity(float rendererOpacity) const;
-
+
bool isMainFrameRenderViewLayer() const;
-
+
bool paintsBoxDecorations() const;
bool paintsChildren() const;
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index f736740..9a2f22b 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -176,7 +176,7 @@
#endif
{
}
-
+
CompositingState(const CompositingState& other)
: m_compositingAncestor(other.m_compositingAncestor)
, m_subtreeIsCompositing(other.m_subtreeIsCompositing)
@@ -186,7 +186,7 @@
#endif
{
}
-
+
RenderLayer* m_compositingAncestor;
bool m_subtreeIsCompositing;
bool m_testingOverlap;
@@ -238,7 +238,7 @@
{
if (enable != m_compositing) {
m_compositing = enable;
-
+
if (m_compositing) {
ensureRootLayer();
notifyIFramesOfCompositingChange();
@@ -352,7 +352,7 @@
AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame()->animation());
TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true);
-
+
bool checkForHierarchyUpdate = m_reevaluateCompositingAfterLayout;
bool needGeometryUpdate = false;
@@ -439,7 +439,7 @@
// most of the time, geometry is updated via RenderLayer::styleChanged().
updateLayerTreeGeometry(updateRoot, 0);
}
-
+
#if !LOG_DISABLED
if (compositingLogEnabled() && isFullUpdate && (needHierarchyUpdate || needGeometryUpdate)) {
double endTime = currentTime();
@@ -478,7 +478,7 @@
{
if (!compositingLogEnabled())
return;
-
+
RenderLayerBacking* backing = layer->backing();
if (requiresCompositing(directReasonsForCompositing(layer)) || layer->isRootLayer()) {
++m_obligateCompositedLayerCount;
@@ -520,7 +520,7 @@
// requirements fully.
if (needsToBeComposited(layer)) {
enableCompositingMode();
-
+
if (!layer->backing()) {
// If we need to repaint, do so before making backing
if (shouldRepaint == CompositingChangeRepaintNow)
@@ -544,7 +544,7 @@
} else {
if (layer->backing()) {
// If we're removing backing on a reflection, clear the source GraphicsLayer's pointer to
- // its replica GraphicsLayer. In practice this should never happen because reflectee and reflection
+ // its replica GraphicsLayer. In practice this should never happen because reflectee and reflection
// are both either composited, or not composited.
if (layer->isReflection()) {
RenderLayer* sourceLayer = toRenderLayerModelObject(layer->renderer()->parent())->layer();
@@ -555,7 +555,7 @@
}
removeViewportConstrainedLayer(layer);
-
+
layer->clearBacking();
layerChanged = true;
@@ -574,7 +574,7 @@
if (innerCompositor && innerCompositor->inCompositingMode())
innerCompositor->updateRootLayerAttachment();
}
-
+
if (layerChanged)
layer->clearClipRectsIncludingDescendants(PaintingClipRects);
@@ -590,7 +590,7 @@
scrollingCoordinator->frameViewFixedObjectsDidChange(m_renderView->frameView());
}
}
-
+
return layerChanged;
}
@@ -709,7 +709,7 @@
// A null ancestorLayer is an indication that 'layer' has already been pushed.
if (ancestorLayer)
overlapMap.geometryMap().pushMappingsToAncestor(layer, ancestorLayer);
-
+
IntRect bounds;
bool haveComputedBounds = false;
addToOverlapMap(overlapMap, layer, bounds, haveComputedBounds);
@@ -745,7 +745,7 @@
}
}
}
-
+
if (ancestorLayer)
overlapMap.geometryMap().popMappingsToAncestor(ancestorLayer);
}
@@ -762,10 +762,10 @@
void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer* layer, OverlapMap* overlapMap, CompositingState& compositingState, bool& layersChanged, bool& descendantHas3DTransform)
{
layer->updateLayerListsIfNeeded();
-
+
if (overlapMap)
overlapMap->geometryMap().pushMappingsToAncestor(layer, ancestorLayer);
-
+
// Clear the flag
layer->setHasCompositingDescendant(false);
@@ -822,7 +822,7 @@
if (overlapMap)
overlapMap->pushCompositingContainer();
- // This layer is going to be composited, so children can safely ignore the fact that there's an
+ // This layer is going to be composited, so children can safely ignore the fact that there's an
// animation running behind this layer, meaning they can rely on the overlap map testing again.
childState.m_testingOverlap = true;
}
@@ -859,7 +859,7 @@
}
}
}
-
+
if (Vector<RenderLayer*>* normalFlowList = layer->normalFlowList()) {
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
@@ -925,7 +925,7 @@
bool isCompositedClippingLayer = canBeComposited(layer) && (reasonsToComposite & CompositingReasonClipsCompositingDescendants);
if ((!childState.m_testingOverlap && !isCompositedClippingLayer) || isRunningAcceleratedTransformAnimation(layer->renderer()))
compositingState.m_testingOverlap = false;
-
+
if (overlapMap && childState.m_compositingAncestor == layer && !layer->isRootLayer())
overlapMap->popCompositingContainer();
@@ -973,7 +973,7 @@
if (parentLayer) {
GraphicsLayer* hostingLayer = parentLayer->backing()->parentForSublayers();
GraphicsLayer* hostedLayer = childLayer->backing()->childForSuperlayers();
-
+
hostingLayer->addChild(hostedLayer);
} else
childLayer->backing()->childForSuperlayers()->removeFromParent();
@@ -1074,7 +1074,7 @@
rebuildCompositingLayerTree(curLayer, childList, depth + 1);
}
}
-
+
if (layer->isStackingContainer()) {
if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
size_t listSize = posZOrderList->size();
@@ -1084,7 +1084,7 @@
}
}
}
-
+
if (layerBacking) {
bool parented = false;
if (layer->renderer()->isRenderPart())
@@ -1232,7 +1232,7 @@
{
if (!renderer->node()->isFrameOwnerElement())
return 0;
-
+
HTMLFrameOwnerElement* element = toFrameOwnerElement(renderer->node());
if (Document* contentDocument = element->contentDocument()) {
if (RenderView* view = contentDocument->renderView())
@@ -1246,7 +1246,7 @@
RenderLayerCompositor* innerCompositor = frameContentsCompositor(renderer);
if (!innerCompositor || !innerCompositor->inCompositingMode() || innerCompositor->rootLayerAttachment() != RootLayerAttachedViaEnclosingFrame)
return false;
-
+
RenderLayer* layer = renderer->layer();
if (!layer->isComposited())
return false;
@@ -1304,7 +1304,7 @@
for (size_t i = 0; i < listSize; ++i)
updateLayerTreeGeometry(normalFlowList->at(i), depth + 1);
}
-
+
if (layer->isStackingContainer()) {
if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
size_t listSize = posZOrderList->size();
@@ -1341,7 +1341,7 @@
#if !ASSERT_DISABLED
LayerListMutationDetector mutationChecker(layer);
#endif
-
+
if (layer->isStackingContainer()) {
if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
size_t listSize = negZOrderList->size();
@@ -1355,7 +1355,7 @@
for (size_t i = 0; i < listSize; ++i)
updateCompositingDescendantGeometry(compositingAncestor, normalFlowList->at(i), compositedChildrenOnly);
}
-
+
if (layer->isStackingContainer()) {
if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
size_t listSize = posZOrderList->size();
@@ -1471,7 +1471,7 @@
removeViewportConstrainedLayer(layer);
layer->clearBacking();
}
-
+
for (RenderLayer* currLayer = layer->firstChild(); currLayer; currLayer = currLayer->nextSibling())
clearBackingForLayerIncludingDescendants(currLayer);
}
@@ -1585,7 +1585,7 @@
directReasons |= CompositingReasonPlugin;
else if (requiresCompositingForFrame(renderer))
directReasons |= CompositingReasonIFrame;
-
+
if (requiresCompositingForBackfaceVisibilityHidden(renderer))
directReasons |= CompositingReasonBackfaceVisibilityHidden;
@@ -1639,7 +1639,7 @@
if (reasons & CompositingReasonIFrame)
return "iframe";
-
+
if (reasons & CompositingReasonBackfaceVisibilityHidden)
return "backface-visibility: hidden";
@@ -1684,7 +1684,7 @@
if (reasons & CompositingReasonFilterWithCompositedDescendants)
return "filter with composited descendants";
-
+
if (reasons & CompositingReasonBlendingWithCompositedDescendants)
return "blending with composited descendants";
@@ -1728,7 +1728,7 @@
}
curr = next;
}
-
+
if (!computeClipRoot || computeClipRoot == layer)
return false;
@@ -1807,7 +1807,7 @@
return false;
m_reevaluateCompositingAfterLayout = true;
-
+
RenderWidget* pluginRenderer = toRenderWidget(renderer);
// If we can't reliably know the size of the plugin yet, don't change compositing state.
if (pluginRenderer->needsLayout())
@@ -1822,7 +1822,7 @@
{
if (!renderer->isRenderPart())
return false;
-
+
RenderPart* frameRenderer = toRenderPart(renderer);
if (!frameRenderer->requiresAcceleratedCompositing())
@@ -1837,7 +1837,7 @@
// If we can't reliably know the size of the iframe yet, don't change compositing state.
if (renderer->needsLayout())
return frameRenderer->hasLayer() && frameRenderer->layer()->isComposited();
-
+
// Don't go into compositing mode if height or width are zero.
IntRect contentBox = pixelSnappedIntRect(frameRenderer->contentBoxRect());
return contentBox.height() * contentBox.width() > 0;
@@ -1914,7 +1914,7 @@
if (has3DTransformedDescendants) {
if (renderer->style()->transformStyle3D() == TransformStyle3DPreserve3D)
subtreeReasons |= CompositingReasonPreserve3D;
-
+
if (renderer->style()->hasPerspective())
subtreeReasons |= CompositingReasonPerspective;
}
@@ -1942,12 +1942,12 @@
// z-index and clipping will be broken.
if (!renderer->isPositioned())
return false;
-
+
EPosition position = renderer->style()->position();
bool isFixed = renderer->isOutOfFlowPositioned() && position == FixedPosition;
if (isFixed && !layer->isStackingContainer())
return false;
-
+
bool isSticky = renderer->isInFlowPositioned() && position == StickyPosition;
if (!isFixed && !isSticky)
return false;
@@ -1975,7 +1975,7 @@
*viewportConstrainedNotCompositedReason = RenderLayer::NotCompositedForNonViewContainer;
return false;
}
-
+
// If the fixed-position element does not have any scrollable ancestor between it and
// its container, then we do not need to spend compositor resources for it. Start by
// assuming we can opt-out (i.e. no scrollable ancestor), and refine the answer below.
@@ -2026,7 +2026,7 @@
return false;
}
}
-
+
return true;
}
@@ -2046,7 +2046,7 @@
return false;
}
-// If an element has negative z-index children, those children render in front of the
+// If an element has negative z-index children, those children render in front of the
// layer background, so we need an extra 'contents' layer for the foreground of the layer
// object.
bool RenderLayerCompositor::needsContentsCompositingLayer(const RenderLayer* layer) const
@@ -2113,7 +2113,7 @@
RenderLayer* viewLayer = m_renderView->layer();
if (!viewLayer)
return 0;
-
+
if (viewLayer->isComposited() && viewLayer->backing()->backgroundLayerPaintsFixedRootBackground())
return viewLayer->backing()->backgroundLayer();
@@ -2547,8 +2547,8 @@
if (child->document() && child->document()->ownerElement())
child->document()->ownerElement()->scheduleLayerUpdate();
}
-
- // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
+
+ // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
// we need to schedule a style recalc in our parent document.
if (HTMLFrameOwnerElement* ownerElement = m_renderView->document()->ownerElement())
ownerElement->scheduleLayerUpdate();
@@ -2558,7 +2558,7 @@
{
const RenderStyle* style = layer->renderer()->style();
- if (style &&
+ if (style &&
(style->transformStyle3D() == TransformStyle3DPreserve3D ||
style->hasPerspective() ||
style->transform().has3DOperation()))
@@ -2672,7 +2672,7 @@
// If top and bottom are auto, use top.
if (style->top().isAuto() && style->bottom().isAuto())
constraints.addAnchorEdge(ViewportConstraints::AnchorEdgeTop);
-
+
return constraints;
}
@@ -2717,7 +2717,7 @@
{
if (Frame* frame = m_renderView->frameView()->frame())
return frame->page();
-
+
return 0;
}
diff --git a/Source/core/rendering/RenderLayerCompositor.h b/Source/core/rendering/RenderLayerCompositor.h
index 588ab69..31d715a 100644
--- a/Source/core/rendering/RenderLayerCompositor.h
+++ b/Source/core/rendering/RenderLayerCompositor.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderLayerCompositor_h
@@ -30,7 +30,7 @@
#include "core/page/Frame.h"
#include "core/platform/graphics/GraphicsLayerClient.h"
#include "core/rendering/RenderLayer.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
namespace WebCore {
@@ -54,7 +54,7 @@
// composited RenderLayers. It determines which RenderLayers
// become compositing, and creates and maintains a hierarchy of
// GraphicsLayers based on the RenderLayer painting order.
-//
+//
// There is one RenderLayerCompositor per RenderView.
class RenderLayerCompositor : public GraphicsLayerClient {
@@ -94,14 +94,14 @@
// Rebuild the tree of compositing layers
void updateCompositingLayers(CompositingUpdateType, RenderLayer* updateRoot = 0);
-
+
// Update the compositing state of the given layer. Returns true if that state changed.
enum CompositingChangeRepaint { CompositingChangeRepaintNow, CompositingChangeWillRepaintLater };
bool updateLayerCompositingState(RenderLayer*, CompositingChangeRepaint = CompositingChangeRepaintNow);
// Update the geometry for compositing children of compositingAncestor.
void updateCompositingDescendantGeometry(RenderLayer* compositingAncestor, RenderLayer*, bool compositedChildrenOnly);
-
+
// Whether layer's backing needs a graphics layer to do clipping by an ancestor (non-stacking-context parent with overflow).
bool clippedByAncestor(RenderLayer*) const;
// Whether layer's backing needs a graphics layer to clip z-order children of the given layer.
@@ -113,16 +113,16 @@
bool supportsFixedRootBackgroundCompositing() const;
bool needsFixedRootBackgroundLayer(const RenderLayer*) const;
GraphicsLayer* fixedRootBackgroundLayer() const;
-
+
// Return the bounding box required for compositing layer and its childern, relative to ancestorLayer.
// If layerBoundingBox is not 0, on return it contains the bounding box of this layer only.
IntRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer) const;
// Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
void repaintOnCompositingChange(RenderLayer*);
-
+
void repaintInCompositedAncestor(RenderLayer*, const LayoutRect&);
-
+
// Notify us that a layer has been added or removed
void layerWasAdded(RenderLayer* parent, RenderLayer* child);
void layerWillBeRemoved(RenderLayer* parent, RenderLayer* child);
@@ -149,11 +149,11 @@
RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachment; }
void updateRootLayerAttachment();
void updateRootLayerPosition();
-
+
void setIsInWindow(bool);
void clearBackingForAllLayers();
-
+
void layerBecameComposited(const RenderLayer*) { ++m_compositedLayerCount; }
void layerBecameNonComposited(const RenderLayer*);
@@ -163,7 +163,7 @@
// Walk the tree looking for layers with 3d transforms. Useful in case you need
// to know if there is non-affine content, e.g. for drawing into an image.
bool has3DContent() const;
-
+
static RenderLayerCompositor* frameContentsCompositor(RenderPart*);
// Return true if the layers changed.
static bool parentFrameContentLayers(RenderPart*);
@@ -204,7 +204,7 @@
// Returns all reasons (direct, indirectly due to subtree, and indirectly due to overlap) that a layer should be composited.
CompositingReasons reasonsForCompositing(const RenderLayer*) const;
-
+
private:
class OverlapMap;
@@ -213,7 +213,7 @@
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) OVERRIDE;
virtual bool isTrackingRepaints() const OVERRIDE;
-
+
// Whether the given RL needs a compositing layer.
bool needsToBeComposited(const RenderLayer*) const;
// Whether the layer could ever be composited.
@@ -238,13 +238,13 @@
// Returns true if any layer's compositing changed
void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer*, OverlapMap*, struct CompositingState&, bool& layersChanged, bool& descendantHas3DTransform);
-
+
// Recurses down the tree, parenting descendant compositing layers and collecting an array of child layers for the current compositing layer.
void rebuildCompositingLayerTree(RenderLayer*, Vector<GraphicsLayer*>& childGraphicsLayersOfEnclosingLayer, int depth);
// Recurses down the tree, updating layer geometry only.
void updateLayerTreeGeometry(RenderLayer*, int depth);
-
+
// Hook compositing layers together
void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer);
void removeCompositedChildren(RenderLayer*);
@@ -261,13 +261,13 @@
void detachRootLayer();
bool isMainFrame() const;
-
+
void updateOverflowControlsLayers();
void notifyIFramesOfCompositingChange();
Page* page() const;
-
+
GraphicsLayerFactory* graphicsLayerFactory() const;
ScrollingCoordinator* scrollingCoordinator() const;
@@ -326,7 +326,7 @@
bool m_needsUpdateCompositingRequirementsState;
bool m_isTrackingRepaints; // Used for testing.
-
+
RootLayerAttachment m_rootLayerAttachment;
// Enclosing container layer, which clips for iframe content
diff --git a/Source/core/rendering/RenderLayerFilterInfo.cpp b/Source/core/rendering/RenderLayerFilterInfo.cpp
index df709e1..9cf7cf7 100644
--- a/Source/core/rendering/RenderLayerFilterInfo.cpp
+++ b/Source/core/rendering/RenderLayerFilterInfo.cpp
@@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -58,13 +58,13 @@
{
if (!s_filterMap)
s_filterMap = new RenderLayerFilterInfoMap();
-
+
RenderLayerFilterInfoMap::iterator iter = s_filterMap->find(layer);
if (iter != s_filterMap->end()) {
ASSERT(layer->hasFilterInfo());
return iter->value;
}
-
+
RenderLayerFilterInfo* filter = new RenderLayerFilterInfo(layer);
s_filterMap->set(layer, filter);
layer->setHasFilterInfo(true);
@@ -100,8 +100,8 @@
}
void RenderLayerFilterInfo::setRenderer(PassRefPtr<FilterEffectRenderer> renderer)
-{
- m_renderer = renderer;
+{
+ m_renderer = renderer;
}
void RenderLayerFilterInfo::notifyFinished(CachedResource*)
diff --git a/Source/core/rendering/RenderLayerFilterInfo.h b/Source/core/rendering/RenderLayerFilterInfo.h
index 831045d..0f07a3a 100644
--- a/Source/core/rendering/RenderLayerFilterInfo.h
+++ b/Source/core/rendering/RenderLayerFilterInfo.h
@@ -12,7 +12,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -35,9 +35,9 @@
#include "core/platform/graphics/LayoutRect.h"
#include "core/platform/graphics/filters/FilterOperation.h"
#include "core/platform/graphics/filters/custom/CustomFilterProgramClient.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
+#include "wtf/HashMap.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -47,7 +47,7 @@
class RenderLayerFilterInfo;
typedef HashMap<const RenderLayer*, RenderLayerFilterInfo*> RenderLayerFilterInfoMap;
-
+
class RenderLayerFilterInfo : public CustomFilterProgramClient, public CachedDocumentClient {
public:
static RenderLayerFilterInfo* filterInfoForRenderLayer(const RenderLayer*);
@@ -57,7 +57,7 @@
const LayoutRect& dirtySourceRect() const { return m_dirtySourceRect; }
void expandDirtySourceRect(const LayoutRect& rect) { m_dirtySourceRect.unite(rect); }
void resetDirtySourceRect() { m_dirtySourceRect = LayoutRect(); }
-
+
FilterEffectRenderer* renderer() const { return m_renderer.get(); }
void setRenderer(PassRefPtr<FilterEffectRenderer>);
@@ -74,15 +74,15 @@
private:
RenderLayerFilterInfo(RenderLayer*);
~RenderLayerFilterInfo();
-
+
RenderLayer* m_layer;
-
+
RefPtr<FilterEffectRenderer> m_renderer;
LayoutRect m_dirtySourceRect;
typedef Vector<RefPtr<CustomFilterProgram> > CustomFilterProgramList;
CustomFilterProgramList m_cachedCustomFilterPrograms;
-
+
static RenderLayerFilterInfoMap* s_filterMap;
Vector<RefPtr<Element> > m_internalSVGReferences;
Vector<CachedResourceHandle<CachedDocument> > m_externalSVGReferences;
diff --git a/Source/core/rendering/RenderLineBoxList.cpp b/Source/core/rendering/RenderLineBoxList.cpp
index 2adc730..1205f19 100644
--- a/Source/core/rendering/RenderLineBoxList.cpp
+++ b/Source/core/rendering/RenderLineBoxList.cpp
@@ -51,7 +51,7 @@
void RenderLineBoxList::appendLineBox(InlineFlowBox* box)
{
checkConsistency();
-
+
if (!m_firstLineBox)
m_firstLineBox = m_lastLineBox = box;
else {
@@ -78,7 +78,7 @@
void RenderLineBoxList::extractLineBox(InlineFlowBox* box)
{
checkConsistency();
-
+
m_lastLineBox = box->prevLineBox();
if (box == m_firstLineBox)
m_firstLineBox = 0;
@@ -156,7 +156,7 @@
LayoutUnit physicalEnd = block->flipForWritingMode(logicalBottom);
LayoutUnit physicalExtent = absoluteValue(physicalEnd - physicalStart);
physicalStart = min(physicalStart, physicalEnd);
-
+
if (renderer->style()->isHorizontalWritingMode()) {
physicalStart += offset.y();
if (physicalStart >= rect.maxY() || physicalStart + physicalExtent <= rect.y())
@@ -166,7 +166,7 @@
if (physicalStart >= rect.maxX() || physicalStart + physicalExtent <= rect.x())
return false;
}
-
+
return true;
}
@@ -182,7 +182,7 @@
LayoutUnit lastLineBottom = lastLineBox()->logicalBottomVisualOverflow(lastRootBox->lineBottom());
LayoutUnit logicalTop = firstLineTop - outlineSize;
LayoutUnit logicalBottom = outlineSize + lastLineBottom;
-
+
return rangeIntersectsRect(renderer, logicalTop, logicalBottom, rect, offset);
}
@@ -191,14 +191,14 @@
RootInlineBox* root = box->root();
LayoutUnit logicalTop = min<LayoutUnit>(box->logicalTopVisualOverflow(root->lineTop()), root->selectionTop()) - renderer->maximalOutlineSize(paintInfo.phase);
LayoutUnit logicalBottom = box->logicalBottomVisualOverflow(root->lineBottom()) + renderer->maximalOutlineSize(paintInfo.phase);
-
+
return rangeIntersectsRect(renderer, logicalTop, logicalBottom, paintInfo.rect, offset);
}
void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintInfo, const LayoutPoint& paintOffset) const
{
// Only paint during the foreground/selection phases.
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline
+ if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseOutline
&& paintInfo.phase != PaintPhaseSelfOutline && paintInfo.phase != PaintPhaseChildOutlines && paintInfo.phase != PaintPhaseTextClip
&& paintInfo.phase != PaintPhaseMask)
return;
@@ -293,7 +293,7 @@
}
// Try to figure out which line box we belong in. First try to find a previous
- // line box by examining our siblings. If we didn't find a line box, then use our
+ // line box by examining our siblings. If we didn't find a line box, then use our
// parent's first line box.
RootInlineBox* box = 0;
RenderObject* curr = 0;
@@ -352,7 +352,7 @@
adjacentBox = box->nextRootBox();
// If |child| has been inserted before the first element in the linebox, but after collapsed leading
// space, the search for |child|'s linebox will go past the leading space to the previous linebox and select that
- // one as |box|. If we hit that situation here, dirty the |box| actually containing the child too.
+ // one as |box|. If we hit that situation here, dirty the |box| actually containing the child too.
bool insertedAfterLeadingSpace = box->lineBreakObj() == child->previousSibling();
if (adjacentBox && (adjacentBox->lineBreakObj() == child || child->isBR() || (curr && curr->isBR())
|| insertedAfterLeadingSpace || isIsolated(container->style()->unicodeBidi()))) {
diff --git a/Source/core/rendering/RenderLineBoxList.h b/Source/core/rendering/RenderLineBoxList.h
index 2dd5d9d..d0c1afd 100644
--- a/Source/core/rendering/RenderLineBoxList.h
+++ b/Source/core/rendering/RenderLineBoxList.h
@@ -59,7 +59,7 @@
void extractLineBox(InlineFlowBox*);
void attachLineBox(InlineFlowBox*);
void removeLineBox(InlineFlowBox*);
-
+
void dirtyLineBoxes();
void dirtyLinesFromChangedChild(RenderObject* parent, RenderObject* child);
diff --git a/Source/core/rendering/RenderListBox.cpp b/Source/core/rendering/RenderListBox.cpp
index 9ce0587..1771c60 100644
--- a/Source/core/rendering/RenderListBox.cpp
+++ b/Source/core/rendering/RenderListBox.cpp
@@ -7,13 +7,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -63,7 +63,7 @@
namespace WebCore {
using namespace HTMLNames;
-
+
const int rowSpacing = 1;
const int optionsSpacingHorizontal = 2;
@@ -115,7 +115,7 @@
if (m_optionsChanged) {
const Vector<HTMLElement*>& listItems = selectElement()->listItems();
int size = numItems();
-
+
float width = 0;
for (int i = 0; i < size; ++i) {
HTMLElement* element = listItems[i];
@@ -142,7 +142,7 @@
}
m_optionsWidth = static_cast<int>(ceilf(width));
m_optionsChanged = false;
-
+
setHasVerticalScrollbar(true);
setNeedsLayoutAndPrefWidthsRecalc();
@@ -163,7 +163,7 @@
else
scrollToRevealSelection();
}
-
+
if (AXObjectCache* cache = document()->existingAXObjectCache())
cache->selectedChildrenChanged(this);
}
@@ -191,7 +191,7 @@
}
void RenderListBox::scrollToRevealSelection()
-{
+{
HTMLSelectElement* select = selectElement();
m_scrollToRevealSelectionAfterLayout = false;
@@ -235,7 +235,7 @@
LayoutUnit toAdd = borderAndPaddingWidth();
m_minPreferredLogicalWidth += toAdd;
m_maxPreferredLogicalWidth += toAdd;
-
+
setPreferredLogicalWidthsDirty(false);
}
@@ -281,12 +281,12 @@
additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (index - m_indexOffset),
contentWidth(), itemHeight());
}
-
+
void RenderListBox::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
if (style()->visibility() != VISIBLE)
return;
-
+
int listItemsSize = numItems();
if (paintInfo.phase == PaintPhaseForeground) {
@@ -513,7 +513,7 @@
// If the point is too far from the center we limit the speed
yDelta = max<int>(min<int>(yDelta, maxSpeed), -maxSpeed);
-
+
if (abs(yDelta) < iconRadius) // at the center we let the space for the icon
return;
@@ -529,7 +529,7 @@
IntPoint scrollPoint(0, 0);
scrollPoint.setY(absOffset.y() + yDelta);
int newOffset = scrollToward(scrollPoint);
- if (newOffset < 0)
+ if (newOffset < 0)
return;
m_inAutoscroll = true;
@@ -546,13 +546,13 @@
int rows = numVisibleItems();
int offset = m_indexOffset;
-
+
if (positionOffset.height() < borderTop() + paddingTop() && scrollToRevealElementAtListIndex(offset - 1))
return offset - 1;
-
+
if (positionOffset.height() > height() - paddingBottom() - borderBottom() && scrollToRevealElementAtListIndex(offset + rows))
return offset + rows - 1;
-
+
return listIndexAtOffset(positionOffset);
}
@@ -602,7 +602,7 @@
}
bool RenderListBox::listIndexIsVisible(int index)
-{
+{
return index >= m_indexOffset && index < m_indexOffset + numVisibleItems();
}
@@ -687,11 +687,11 @@
void RenderListBox::setScrollTop(int newTop)
{
- // Determine an index and scroll to it.
+ // Determine an index and scroll to it.
int index = newTop / itemHeight();
if (index < 0 || index >= numItems() || index == m_indexOffset)
return;
-
+
scrollToOffsetWithoutAnimation(VerticalScrollbar, index);
}
@@ -861,7 +861,7 @@
widget = Scrollbar::createNativeScrollbar(this, VerticalScrollbar, theme()->scrollbarControlSizeForPart(ListboxPart));
didAddVerticalScrollbar(widget.get());
}
- document()->view()->addChild(widget.get());
+ document()->view()->addChild(widget.get());
return widget.release();
}
diff --git a/Source/core/rendering/RenderListBox.h b/Source/core/rendering/RenderListBox.h
index 1b53fda..97e73d3 100644
--- a/Source/core/rendering/RenderListBox.h
+++ b/Source/core/rendering/RenderListBox.h
@@ -8,13 +8,13 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -132,7 +132,7 @@
void setHasVerticalScrollbar(bool hasScrollbar);
PassRefPtr<Scrollbar> createScrollbar();
void destroyScrollbar();
-
+
LayoutUnit itemHeight() const;
void valueChanged(unsigned listIndex);
int numVisibleItems() const;
@@ -153,7 +153,7 @@
};
inline RenderListBox* toRenderListBox(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isListBox());
return static_cast<RenderListBox*>(object);
}
diff --git a/Source/core/rendering/RenderListItem.cpp b/Source/core/rendering/RenderListItem.cpp
index f6e8b40..0944508 100644
--- a/Source/core/rendering/RenderListItem.cpp
+++ b/Source/core/rendering/RenderListItem.cpp
@@ -29,8 +29,8 @@
#include "core/html/HTMLOListElement.h"
#include "core/rendering/RenderListMarker.h"
#include "core/rendering/RenderView.h"
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/StringBuilder.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/text/StringBuilder.h"
using namespace std;
@@ -57,7 +57,7 @@
RefPtr<RenderStyle> newStyle = RenderStyle::create();
// The marker always inherits from the list item, regardless of where it might end
// up (e.g., in some deeply nested line box). See CSS3 spec.
- newStyle->inheritFrom(style());
+ newStyle->inheritFrom(style());
if (!m_marker)
m_marker = RenderListMarker::createAnonymous(this);
m_marker->setStyle(newStyle.release());
@@ -68,7 +68,7 @@
}
void RenderListItem::willBeDestroyed()
-{
+{
if (m_marker) {
m_marker->destroy();
m_marker = 0;
@@ -303,9 +303,9 @@
void RenderListItem::layout()
{
StackStats::LayoutCheckPoint layoutCheckPoint;
- ASSERT(needsLayout());
+ ASSERT(needsLayout());
- updateMarkerLocation();
+ updateMarkerLocation();
RenderBlock::layout();
}
@@ -330,7 +330,7 @@
LayoutUnit markerLogicalLeft;
RootInlineBox* root = m_marker->inlineBoxWrapper()->root();
bool hitSelfPaintingLayer = false;
-
+
RootInlineBox* rootBox = m_marker->inlineBoxWrapper()->root();
LayoutUnit lineTop = rootBox->lineTop();
LayoutUnit lineBottom = rootBox->lineBottom();
@@ -377,7 +377,7 @@
adjustOverflow = true;
}
box->setOverflowFromLogicalRects(newLogicalLayoutOverflowRect, newLogicalVisualOverflowRect, lineTop, lineBottom);
-
+
if (box->boxModelObject()->hasSelfPaintingLayer())
hitSelfPaintingLayer = true;
}
diff --git a/Source/core/rendering/RenderListItem.h b/Source/core/rendering/RenderListItem.h
index 2a563f6..44731aa 100644
--- a/Source/core/rendering/RenderListItem.h
+++ b/Source/core/rendering/RenderListItem.h
@@ -57,7 +57,7 @@
virtual const char* renderName() const { return "RenderListItem"; }
virtual bool isListItem() const { return true; }
-
+
virtual void willBeDestroyed();
virtual void insertedIntoTree() OVERRIDE;
diff --git a/Source/core/rendering/RenderListMarker.cpp b/Source/core/rendering/RenderListMarker.cpp
index 2d08cbf..f965338 100644
--- a/Source/core/rendering/RenderListMarker.cpp
+++ b/Source/core/rendering/RenderListMarker.cpp
@@ -32,8 +32,8 @@
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderListItem.h"
#include "core/rendering/RenderView.h"
-#include <wtf/text/StringBuilder.h>
-#include <wtf/unicode/CharacterNames.h>
+#include "wtf/text/StringBuilder.h"
+#include "wtf/unicode/CharacterNames.h"
using namespace std;
using namespace WTF;
@@ -165,7 +165,7 @@
template <typename CharacterType, size_t size>
static inline String toSymbolic(int number, const CharacterType(&alphabet)[size])
-{
+{
return toSymbolic(number, alphabet, size);
}
@@ -1080,7 +1080,7 @@
{
if (style() && (newStyle->listStylePosition() != style()->listStylePosition() || newStyle->listStyleType() != style()->listStyleType()))
setNeedsLayoutAndPrefWidthsRecalc();
-
+
RenderBox::styleWillChange(diff, newStyle);
}
@@ -1323,7 +1323,7 @@
{
StackStats::LayoutCheckPoint layoutCheckPoint;
ASSERT(needsLayout());
-
+
if (isImage()) {
updateMarginsAndContent();
setWidth(m_image->imageSize(this, style()->effectiveZoom()).width());
@@ -1653,7 +1653,7 @@
}
marginStart = -marginEnd - minPreferredLogicalWidth();
}
-
+
}
style()->setMarginStart(Length(marginStart, Fixed));
@@ -1705,7 +1705,7 @@
{
if (isImage())
return IntRect(0, 0, m_image->imageSize(this, style()->effectiveZoom()).width(), m_image->imageSize(this, style()->effectiveZoom()).height());
-
+
IntRect relativeRect;
EListStyleType type = style()->listStyleType();
switch (type) {
@@ -1838,12 +1838,12 @@
RootInlineBox* root = inlineBoxWrapper()->root();
LayoutRect rect(0, root->selectionTop() - y(), width(), root->selectionHeight());
-
+
if (clipToVisibleContent)
computeRectForRepaint(repaintContainer, rect);
else
rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
-
+
return rect;
}
diff --git a/Source/core/rendering/RenderMarquee.cpp b/Source/core/rendering/RenderMarquee.cpp
index 6dee3e9..eed4b72 100644
--- a/Source/core/rendering/RenderMarquee.cpp
+++ b/Source/core/rendering/RenderMarquee.cpp
@@ -102,13 +102,13 @@
result = (dir == LTR) ? MRIGHT : MLEFT;
if (result == MBACKWARD)
result = (dir == LTR) ? MLEFT : MRIGHT;
-
+
// Now we have the real direction. Next we check to see if the increment is negative.
// If so, then we reverse the direction.
Length increment = style()->marqueeIncrement();
if (increment.isNegative())
result = static_cast<EMarqueeDirection>(-result);
-
+
return result;
}
@@ -154,10 +154,10 @@
else {
if (stopAtContentEdge)
return max(contentHeight - clientHeight, 0);
- else
+ else
return contentHeight;
}
- }
+ }
}
void RenderMarquee::start()
@@ -165,7 +165,7 @@
if (m_timer.isActive() || style()->marqueeIncrement().isZero())
return;
- // We may end up propagating a scroll event. It is important that we suspend events until
+ // We may end up propagating a scroll event. It is important that we suspend events until
// the end of the function since they could delete the layer, including the marquee.
FrameView* frameView = document()->view();
if (frameView)
@@ -233,13 +233,13 @@
RenderBlock::styleDidChange(difference, oldStyle);
RenderStyle* s = style();
-
+
if (m_direction != s->marqueeDirection() || (m_totalLoops != s->marqueeLoopCount() && m_currentLoop >= m_totalLoops))
m_currentLoop = 0; // When direction changes or our loopCount is a smaller number than our current loop, reset our loop.
-
+
m_totalLoops = s->marqueeLoopCount();
m_direction = s->marqueeDirection();
-
+
// Hack for WinIE. In WinIE, a value of 0 or lower for the loop count for SLIDE means to only do
// one loop.
if (m_totalLoops <= 0 && s->marqueeBehavior() == MSLIDE)
@@ -258,14 +258,14 @@
// Legacy hack - multiple browsers default vertical marquees to 200px tall.
if (!isHorizontal() && s->height().isAuto())
- s->setHeight(Length(200, Fixed));
-
+ s->setHeight(Length(200, Fixed));
+
if (speed() != marqueeSpeed()) {
m_speed = marqueeSpeed();
if (m_timer.isActive())
m_timer.startRepeating(speed() * 0.001);
}
-
+
// Check the loop count to see if we should now stop.
bool activate = (m_totalLoops <= 0 || m_currentLoop < m_totalLoops);
if (activate && !m_timer.isActive())
@@ -286,7 +286,7 @@
// FIXME: Why do we need to check the view and not just the RenderMarquee itself?
if (view()->needsLayout())
return;
-
+
if (m_reset) {
m_reset = false;
if (isHorizontal())
@@ -295,15 +295,15 @@
layer()->scrollToYOffset(m_start);
return;
}
-
+
RenderStyle* s = style();
-
+
int endPoint = m_end;
int range = m_end - m_start;
int newPos;
if (range == 0)
newPos = m_end;
- else {
+ else {
bool addIncrement = direction() == MUP || direction() == MLEFT;
bool isReversed = s->marqueeBehavior() == MALTERNATE && m_currentLoop % 2;
if (isReversed) {
@@ -330,7 +330,7 @@
else if (s->marqueeBehavior() != MALTERNATE)
m_reset = true;
}
-
+
if (isHorizontal())
layer()->scrollToXOffset(newPos);
else
diff --git a/Source/core/rendering/RenderMarquee.h b/Source/core/rendering/RenderMarquee.h
index 02aef3e..e956a00 100644
--- a/Source/core/rendering/RenderMarquee.h
+++ b/Source/core/rendering/RenderMarquee.h
@@ -70,7 +70,7 @@
int computePosition(EMarqueeDirection, bool stopAtClientEdge);
void setEnd(int end) { m_end = end; }
-
+
void start();
void suspend();
void stop();
diff --git a/Source/core/rendering/RenderMedia.cpp b/Source/core/rendering/RenderMedia.cpp
index 20634e4..6c7cd51 100644
--- a/Source/core/rendering/RenderMedia.cpp
+++ b/Source/core/rendering/RenderMedia.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -51,8 +51,8 @@
}
HTMLMediaElement* RenderMedia::mediaElement() const
-{
- return toMediaElement(node());
+{
+ return toMediaElement(node());
}
void RenderMedia::layout()
@@ -79,7 +79,7 @@
if (newSize == oldSize && !controlsNeedLayout)
return;
- // When calling layout() on a child node, a parent must either push a LayoutStateMaintainter, or
+ // When calling layout() on a child node, a parent must either push a LayoutStateMaintainter, or
// instantiate LayoutStateDisabler. Since using a LayoutStateMaintainer is slightly more efficient,
// and this method will be called many times per second during playback, use a LayoutStateMaintainer:
LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMode());
diff --git a/Source/core/rendering/RenderMedia.h b/Source/core/rendering/RenderMedia.h
index 6c99a03..c32bf29 100644
--- a/Source/core/rendering/RenderMedia.h
+++ b/Source/core/rendering/RenderMedia.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderMedia_h
diff --git a/Source/core/rendering/RenderMediaControls.cpp b/Source/core/rendering/RenderMediaControls.cpp
index 001ff7d..ae146c0 100644
--- a/Source/core/rendering/RenderMediaControls.cpp
+++ b/Source/core/rendering/RenderMediaControls.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -30,6 +30,6 @@
// FIXME: Unify more of the code for Mac and Win.
using namespace std;
-
+
namespace WebCore {
}
diff --git a/Source/core/rendering/RenderMediaControls.h b/Source/core/rendering/RenderMediaControls.h
index d1b3f87..aca27ba 100644
--- a/Source/core/rendering/RenderMediaControls.h
+++ b/Source/core/rendering/RenderMediaControls.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderMediaControls_h
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp
index 241185f..571e49e 100644
--- a/Source/core/rendering/RenderMenuList.cpp
+++ b/Source/core/rendering/RenderMenuList.cpp
@@ -166,7 +166,7 @@
{
float maxOptionWidth = 0;
const Vector<HTMLElement*>& listItems = selectElement()->listItems();
- int size = listItems.size();
+ int size = listItems.size();
FontCachePurgePreventer fontCachePurgePreventer;
for (int i = 0; i < size; ++i) {
@@ -268,14 +268,14 @@
// Clip to the intersection of the content box and the content box for the inner box
// This will leave room for the arrows which sit in the inner box padding,
// and if the inner box ever spills out of the outer box, that will get clipped too.
- LayoutRect outerBox(additionalOffset.x() + borderLeft() + paddingLeft(),
+ LayoutRect outerBox(additionalOffset.x() + borderLeft() + paddingLeft(),
additionalOffset.y() + borderTop() + paddingTop(),
- contentWidth(),
+ contentWidth(),
contentHeight());
-
- LayoutRect innerBox(additionalOffset.x() + m_innerBlock->x() + m_innerBlock->paddingLeft(),
+
+ LayoutRect innerBox(additionalOffset.x() + m_innerBlock->x() + m_innerBlock->paddingLeft(),
additionalOffset.y() + m_innerBlock->y() + m_innerBlock->paddingTop(),
- m_innerBlock->contentWidth(),
+ m_innerBlock->contentWidth(),
m_innerBlock->contentHeight());
return intersection(outerBox, innerBox);
@@ -292,7 +292,7 @@
{
m_minPreferredLogicalWidth = 0;
m_maxPreferredLogicalWidth = 0;
-
+
if (style()->width().isFixed() && style()->width().value() > 0)
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
else
@@ -350,7 +350,7 @@
Document* doc = toElement(node())->document();
if (!doc || doc != doc->frame()->document())
return;
-
+
HTMLSelectElement* select = selectElement();
select->optionSelectedByUser(select->listToOptionIndex(listIndex), fireOnChange);
}
@@ -426,7 +426,7 @@
return String();
return listItems[listIndex]->fastGetAttribute(aria_labelAttr);
}
-
+
String RenderMenuList::itemToolTip(unsigned listIndex) const
{
const Vector<HTMLElement*>& listItems = selectElement()->listItems();
diff --git a/Source/core/rendering/RenderMeter.h b/Source/core/rendering/RenderMeter.h
index d157a39..0c5f80a 100644
--- a/Source/core/rendering/RenderMeter.h
+++ b/Source/core/rendering/RenderMeter.h
@@ -36,7 +36,7 @@
HTMLMeterElement* meterElement() const;
virtual void updateFromElement();
-private:
+private:
virtual void updateLogicalWidth() OVERRIDE;
virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
diff --git a/Source/core/rendering/RenderMultiColumnBlock.cpp b/Source/core/rendering/RenderMultiColumnBlock.cpp
index 434fccd..8831a88 100644
--- a/Source/core/rendering/RenderMultiColumnBlock.cpp
+++ b/Source/core/rendering/RenderMultiColumnBlock.cpp
@@ -57,7 +57,7 @@
// FIXME: Can overflow on fast/block/float/float-not-removed-from-next-sibling4.html, see https://bugs.webkit.org/show_bug.cgi?id=68744
m_columnCount = 1;
m_columnWidth = contentLogicalWidth();
-
+
ASSERT(!style()->hasAutoColumnCount() || !style()->hasAutoColumnWidth());
LayoutUnit availWidth = m_columnWidth;
@@ -145,12 +145,12 @@
}
m_flowThread->addChild(newChild, beforeChild);
}
-
+
RenderObject* RenderMultiColumnBlock::layoutSpecialExcludedChild(bool relayoutChildren)
{
if (!m_flowThread)
return 0;
-
+
// Update the dimensions of our regions before we lay out the flow thread.
// FIXME: Eventually this is going to get way more complicated, and we will be destroying regions
// instead of trying to keep them around.
@@ -165,17 +165,17 @@
shouldInvalidateRegions = true;
}
}
-
+
if (shouldInvalidateRegions)
m_flowThread->invalidateRegions();
if (relayoutChildren)
m_flowThread->setChildNeedsLayout(true, MarkOnlyThis);
-
+
setLogicalTopForChild(m_flowThread, borderBefore() + paddingBefore());
m_flowThread->layoutIfNeeded();
determineLogicalLeftPositionForChild(m_flowThread);
-
+
return m_flowThread;
}
diff --git a/Source/core/rendering/RenderMultiColumnBlock.h b/Source/core/rendering/RenderMultiColumnBlock.h
index c4e3cdc..6b441c2 100644
--- a/Source/core/rendering/RenderMultiColumnBlock.h
+++ b/Source/core/rendering/RenderMultiColumnBlock.h
@@ -48,13 +48,13 @@
private:
virtual bool isRenderMultiColumnBlock() const { return true; }
-
+
virtual const char* renderName() const;
virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren) OVERRIDE;
virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE;
-
+
virtual bool updateLogicalWidthAndColumnWidth() OVERRIDE;
virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight) OVERRIDE;
virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&) OVERRIDE;
diff --git a/Source/core/rendering/RenderMultiColumnFlowThread.cpp b/Source/core/rendering/RenderMultiColumnFlowThread.cpp
index 5e3c26f..53bf05a 100644
--- a/Source/core/rendering/RenderMultiColumnFlowThread.cpp
+++ b/Source/core/rendering/RenderMultiColumnFlowThread.cpp
@@ -48,7 +48,7 @@
}
const char* RenderMultiColumnFlowThread::renderName() const
-{
+{
return "RenderMultiColumnFlowThread";
}
@@ -88,7 +88,7 @@
RenderMultiColumnSet* firstSet = toRenderMultiColumnSet(firstRegion());
if (firstSet)
return;
-
+
invalidateRegions();
RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
diff --git a/Source/core/rendering/RenderMultiColumnSet.cpp b/Source/core/rendering/RenderMultiColumnSet.cpp
index ee87b12..2c0175b 100644
--- a/Source/core/rendering/RenderMultiColumnSet.cpp
+++ b/Source/core/rendering/RenderMultiColumnSet.cpp
@@ -139,7 +139,7 @@
{
RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
setComputedColumnWidthAndCount(parentBlock->columnWidth(), parentBlock->columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
-
+
// FIXME: When we add regions support, we'll start it off at the width of the multi-column
// block in that particular region.
setLogicalWidth(parentBox()->contentLogicalWidth());
@@ -384,7 +384,7 @@
IntRect pixelSnappedRuleRect = pixelSnappedIntRectFromEdges(ruleLeft, ruleTop, ruleRight, ruleBottom);
drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRect.x(), pixelSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRect.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, antialias);
}
-
+
ruleLogicalLeft = currLogicalLeftOffset;
}
}
@@ -395,30 +395,30 @@
// entire column set. Put the repaint rect into flow thread coordinates by flipping it first.
LayoutRect flowThreadRepaintRect(repaintRect);
flowThread()->flipForWritingMode(flowThreadRepaintRect);
-
+
// Now we can compare this rect with the flow thread portions owned by each column. First let's
// just see if the repaint rect intersects our flow thread portion at all.
LayoutRect clippedRect(flowThreadRepaintRect);
clippedRect.intersect(RenderRegion::flowThreadPortionOverflowRect());
if (clippedRect.isEmpty())
return;
-
+
// Now we know we intersect at least one column. Let's figure out the logical top and logical
// bottom of the area we're repainting.
LayoutUnit repaintLogicalTop = isHorizontalWritingMode() ? flowThreadRepaintRect.y() : flowThreadRepaintRect.x();
LayoutUnit repaintLogicalBottom = (isHorizontalWritingMode() ? flowThreadRepaintRect.maxY() : flowThreadRepaintRect.maxX()) - 1;
-
+
unsigned startColumn = columnIndexAtOffset(repaintLogicalTop);
unsigned endColumn = columnIndexAtOffset(repaintLogicalBottom);
-
+
LayoutUnit colGap = columnGap();
unsigned colCount = columnCount();
for (unsigned i = startColumn; i <= endColumn; i++) {
LayoutRect colRect = columnRectAt(i);
-
+
// Get the portion of the flow thread that corresponds to this column.
LayoutRect flowThreadPortion = flowThreadPortionRectAt(i);
-
+
// Now get the overflow rect that corresponds to the column.
LayoutRect flowThreadOverflowPortion = flowThreadPortionOverflowRect(flowThreadPortion, i, colCount, colGap);
@@ -443,25 +443,25 @@
clippedRect.intersect(RenderRegion::flowThreadPortionOverflowRect());
if (clippedRect.isEmpty())
return;
-
+
// Now we know we intersect at least one column. Let's figure out the logical top and logical
// bottom of the area we're checking.
LayoutUnit layerLogicalTop = isHorizontalWritingMode() ? layerBoundsInFlowThread.y() : layerBoundsInFlowThread.x();
LayoutUnit layerLogicalBottom = (isHorizontalWritingMode() ? layerBoundsInFlowThread.maxY() : layerBoundsInFlowThread.maxX()) - 1;
-
+
// Figure out the start and end columns and only check within that range so that we don't walk the
// entire column set.
unsigned startColumn = columnIndexAtOffset(layerLogicalTop);
unsigned endColumn = columnIndexAtOffset(layerLogicalBottom);
-
+
LayoutUnit colLogicalWidth = computedColumnWidth();
LayoutUnit colGap = columnGap();
unsigned colCount = columnCount();
-
+
for (unsigned i = startColumn; i <= endColumn; i++) {
// Get the portion of the flow thread that corresponds to this column.
LayoutRect flowThreadPortion = flowThreadPortionRectAt(i);
-
+
// Now get the overflow rect that corresponds to the column.
LayoutRect flowThreadOverflowPortion = flowThreadPortionOverflowRect(flowThreadPortion, i, colCount, colGap);
@@ -470,7 +470,7 @@
clippedRect.intersect(flowThreadOverflowPortion);
if (clippedRect.isEmpty())
continue;
-
+
// We also need to intersect the dirty rect. We have to apply a translation and shift based off
// our column index.
LayoutPoint translationOffset;
@@ -490,18 +490,18 @@
// Shift the dirty rect to be in flow thread coordinates with this translation applied.
LayoutRect translatedDirtyRect(dirtyRectInFlowThread);
translatedDirtyRect.moveBy(-translationOffset);
-
+
// See if we intersect the dirty rect.
clippedRect = layerBoundsInFlowThread;
clippedRect.intersect(translatedDirtyRect);
if (clippedRect.isEmpty())
continue;
-
+
// Something does need to paint in this column. Make a fragment now and supply the physical translation
// offset and the clip rect for the column with that offset applied.
LayerFragment fragment;
fragment.paginationOffset = translationOffset;
-
+
LayoutRect flippedFlowThreadOverflowPortion(flowThreadOverflowPortion);
flipForWritingMode(flippedFlowThreadOverflowPortion);
fragment.paginationClip = flippedFlowThreadOverflowPortion;
@@ -510,7 +510,7 @@
}
const char* RenderMultiColumnSet::renderName() const
-{
+{
return "RenderMultiColumnSet";
}
diff --git a/Source/core/rendering/RenderMultiColumnSet.h b/Source/core/rendering/RenderMultiColumnSet.h
index a0d2792..d60bd97 100644
--- a/Source/core/rendering/RenderMultiColumnSet.h
+++ b/Source/core/rendering/RenderMultiColumnSet.h
@@ -66,13 +66,13 @@
LayoutUnit forcedBreakOffset() const { return m_forcedBreakOffset; }
LayoutUnit maximumDistanceBetweenForcedBreaks() const { return m_maximumDistanceBetweenForcedBreaks; }
void clearForcedBreaks()
- {
+ {
m_forcedBreaksCount = 0;
m_maximumDistanceBetweenForcedBreaks = 0;
m_forcedBreakOffset = 0;
}
void addForcedBreak(LayoutUnit offsetFromFirstPage)
- {
+ {
ASSERT(!computedColumnHeight());
LayoutUnit distanceFromLastBreak = offsetFromFirstPage - m_forcedBreakOffset;
if (!distanceFromLastBreak)
@@ -108,20 +108,20 @@
virtual LayoutUnit pageLogicalHeight() const OVERRIDE { return m_computedColumnHeight; }
virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const OVERRIDE;
-
+
// FIXME: This will change once we have column sets constrained by enclosing pages, etc.
virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const OVERRIDE { return m_computedColumnHeight; }
// FIXME: For now we return false, but it's likely we will leverage the auto height region code to do column
// balancing. That's why we have an override of this function that is distinct from RenderRegionSet's override.
virtual bool shouldHaveAutoLogicalHeight() const OVERRIDE { return false; }
-
+
virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const OVERRIDE;
virtual void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) OVERRIDE;
virtual const char* renderName() const;
-
+
void paintColumnRules(PaintInfo&, const LayoutPoint& paintOffset);
LayoutUnit columnGap() const;
@@ -142,7 +142,7 @@
unsigned m_computedColumnCount;
LayoutUnit m_computedColumnWidth;
LayoutUnit m_computedColumnHeight;
-
+
// The following variables are used when balancing the column set.
LayoutUnit m_maxColumnHeight; // Maximum column height allowed.
LayoutUnit m_minSpaceShortage; // The smallest amout of space shortage that caused a column break.
diff --git a/Source/core/rendering/RenderNamedFlowThread.cpp b/Source/core/rendering/RenderNamedFlowThread.cpp
index 0f64ff5..5537e81 100644
--- a/Source/core/rendering/RenderNamedFlowThread.cpp
+++ b/Source/core/rendering/RenderNamedFlowThread.cpp
@@ -71,22 +71,22 @@
}
const char* RenderNamedFlowThread::renderName() const
-{
+{
return "RenderNamedFlowThread";
}
-
+
void RenderNamedFlowThread::clearContentNodes()
{
for (NamedFlowContentNodes::iterator it = m_contentNodes.begin(); it != m_contentNodes.end(); ++it) {
Node* contentNode = *it;
-
+
ASSERT(contentNode && contentNode->isElementNode());
ASSERT(contentNode->inNamedFlow());
ASSERT(contentNode->document() == document());
-
+
contentNode->clearInNamedFlow();
}
-
+
m_contentNodes.clear();
}
@@ -129,7 +129,7 @@
void RenderNamedFlowThread::addFlowChild(RenderObject* newChild)
{
- // The child list is used to sort the flow thread's children render objects
+ // The child list is used to sort the flow thread's children render objects
// based on their corresponding nodes DOM order. The list is needed to avoid searching the whole DOM.
Node* childNode = newChild->node();
diff --git a/Source/core/rendering/RenderNamedFlowThread.h b/Source/core/rendering/RenderNamedFlowThread.h
index e9fad64..1e41f99 100644
--- a/Source/core/rendering/RenderNamedFlowThread.h
+++ b/Source/core/rendering/RenderNamedFlowThread.h
@@ -29,9 +29,9 @@
#include "core/platform/Timer.h"
#include "core/rendering/RenderFlowThread.h"
-#include <wtf/HashCountedSet.h>
-#include <wtf/ListHashSet.h>
-#include <wtf/text/AtomicString.h>
+#include "wtf/HashCountedSet.h"
+#include "wtf/ListHashSet.h"
+#include "wtf/text/AtomicString.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 1f43a15..a48ca9f 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -597,7 +597,7 @@
return toRenderBox(curr);
curr = curr->parent();
}
-
+
ASSERT_NOT_REACHED();
return 0;
}
@@ -623,7 +623,7 @@
RenderFlowThread* flowThread = view()->flowThreadController()->currentRenderFlowThread();
if (flowThread)
return flowThread;
-
+
// Not in the middle of layout so have to find the thread the slow way.
RenderObject* curr = const_cast<RenderObject*>(this);
while (curr) {
@@ -752,7 +752,7 @@
// in the chain that we mark dirty (even though they're kind of irrelevant).
RenderObject* o = isTableCell() ? containingBlock() : container();
while (o && !o->preferredLogicalWidthsDirty()) {
- // Don't invalidate the outermost object of an unrooted subtree. That object will be
+ // Don't invalidate the outermost object of an unrooted subtree. That object will be
// invalidated when the subtree is added to the document.
RenderObject* container = o->isTableCell() ? o->containingBlock() : o->container();
if (!container && !o->isRenderView())
@@ -846,7 +846,7 @@
if (sizeType == Contain || sizeType == Cover)
return true;
-
+
if (sizeType == SizeLength) {
if (layer->sizeLength().width().isPercent() || layer->sizeLength().height().isPercent())
return true;
@@ -875,7 +875,7 @@
if (mustRepaintFillLayers(this, style()->backgroundLayers()))
return true;
-
+
// Our fill layers are ok. Let's check border.
if (style()->hasBorder() && borderImageIsLoadedAndCanBeRendered())
return true;
@@ -1200,7 +1200,7 @@
int topInner = inner.y();
int bottomOuter = outer.maxY();
int bottomInner = inner.maxY();
-
+
drawLineForBoxSide(graphicsContext, leftOuter, topOuter, leftInner, bottomOuter, BSLeft, outlineColor, outlineStyle, outlineWidth, outlineWidth);
drawLineForBoxSide(graphicsContext, leftOuter, topOuter, rightOuter, topInner, BSTop, outlineColor, outlineStyle, outlineWidth, outlineWidth);
drawLineForBoxSide(graphicsContext, rightInner, topOuter, rightOuter, bottomOuter, BSRight, outlineColor, outlineStyle, outlineWidth, outlineWidth);
@@ -1219,7 +1219,7 @@
size_t n = quads.size();
if (!n)
return IntRect();
-
+
IntRect result = quads[0].enclosingBoundingBox();
for (size_t i = 1; i < n; ++i)
result.unite(quads[i].enclosingBoundingBox());
@@ -1301,7 +1301,7 @@
RenderView* v = view();
if (!v)
return 0;
-
+
RenderLayerModelObject* repaintContainer = 0;
if (v->usesCompositing()) {
@@ -1367,7 +1367,7 @@
return;
}
}
-
+
if (v->usesCompositing()) {
ASSERT(repaintContainer->hasLayer() && repaintContainer->layer()->isComposited());
repaintContainer->layer()->setBackingNeedsRepaintInRect(r);
@@ -1769,7 +1769,7 @@
else if (diff < StyleDifferenceRecompositeLayer)
diff = StyleDifferenceRecompositeLayer;
}
-
+
// The answer to requiresLayer() for plugins, iframes, and canvas can change without the actual
// style changing, since it depends on whether we decide to composite these elements. When the
// layer status of one of these elements changes, we need to force a layout.
@@ -1839,7 +1839,7 @@
diff = adjustStyleDifference(diff, contextSensitiveProperties);
styleWillChange(diff, style.get());
-
+
RefPtr<RenderStyle> oldStyle = m_style.release();
setStyleInternal(style);
@@ -1868,7 +1868,7 @@
// Now that the layer (if any) has been updated, we need to adjust the diff again,
// check whether we should layout now, and decide if we need to repaint.
StyleDifference updatedDiff = adjustStyleDifference(diff, contextSensitiveProperties);
-
+
if (diff <= StyleDifferenceLayoutPositionedMovementOnly) {
if (updatedDiff == StyleDifferenceLayout)
setNeedsLayoutAndPrefWidthsRecalc();
@@ -1880,7 +1880,7 @@
} else if (updatedDiff == StyleDifferenceSimplifiedLayout)
setNeedsSimplifiedNormalFlowLayout();
}
-
+
if (updatedDiff == StyleDifferenceRepaintLayer || shouldRepaintForStyleDifference(updatedDiff)) {
// Do a repaint with the new style now, e.g., for example if we go from
// not having an outline to having an outline.
@@ -1899,8 +1899,8 @@
// If our z-index changes value or our visibility changes,
// we need to dirty our stacking context's z-order list.
if (newStyle) {
- bool visibilityChanged = m_style->visibility() != newStyle->visibility()
- || m_style->zIndex() != newStyle->zIndex()
+ bool visibilityChanged = m_style->visibility() != newStyle->visibility()
+ || m_style->zIndex() != newStyle->zIndex()
|| m_style->hasAutoZIndex() != newStyle->hasAutoZIndex();
if (visibilityChanged) {
document()->setAnnotatedRegionsDirty(true);
@@ -2003,7 +2003,7 @@
if (!m_parent)
return;
-
+
if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) {
RenderCounter::rendererStyleChanged(this, oldStyle, m_style.get());
@@ -2069,7 +2069,7 @@
// Optimize the common case
if (oldLayers && !oldLayers->next() && newLayers && !newLayers->next() && (oldLayers->image() == newLayers->image()))
return;
-
+
// Go through the new layers and addClients first, to avoid removing all clients of an image.
for (const FillLayer* currNew = newLayers; currNew; currNew = currNew->next()) {
if (currNew->image())
@@ -2102,7 +2102,7 @@
TransformState transformState(TransformState::ApplyTransformDirection, localPoint);
mapLocalToContainer(0, transformState, mode | ApplyContainerFlip);
transformState.flatten();
-
+
return transformState.lastPlanarPoint();
}
@@ -2111,7 +2111,7 @@
TransformState transformState(TransformState::UnapplyInverseTransformDirection, containerPoint);
mapAbsoluteToLocalPoint(mode, transformState);
transformState.flatten();
-
+
return transformState.lastPlanarPoint();
}
@@ -2165,7 +2165,7 @@
offset = -toRenderBox(container)->scrolledContentOffset();
geometryMap.push(this, offset, hasColumns());
-
+
return container;
}
@@ -2193,7 +2193,7 @@
RenderLayer* layer;
if (hasLayer() && (layer = toRenderLayerModelObject(this)->layer()) && layer->transform())
transform.multiply(layer->currentTransform());
-
+
if (containerObject && containerObject->hasLayer() && containerObject->style()->hasPerspective()) {
// Perpsective on the container affects us, so we have to factor it in here.
ASSERT(containerObject->hasLayer());
@@ -2201,7 +2201,7 @@
TransformationMatrix perspectiveMatrix;
perspectiveMatrix.applyPerspective(containerObject->style()->perspective());
-
+
transform.translateRight3d(-perspectiveOrigin.x(), -perspectiveOrigin.y(), 0);
transform = perspectiveMatrix * transform;
transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0);
@@ -2215,7 +2215,7 @@
TransformState transformState(TransformState::ApplyTransformDirection, localQuad.boundingBox().center(), localQuad);
mapLocalToContainer(repaintContainer, transformState, mode | ApplyContainerFlip | UseTransforms, wasFixed);
transformState.flatten();
-
+
return transformState.lastPlanarQuad();
}
@@ -2355,7 +2355,7 @@
if (bodyObject)
return bodyObject;
}
-
+
return this;
}
@@ -2469,7 +2469,7 @@
children->destroyLeftoverChildren();
// If this renderer is being autoscrolled, stop the autoscroll timer
-
+
// FIXME: RenderObject::destroy should not get called with a renderer whose document
// has a null frame, so we assert this. However, we don't want release builds to crash which is why we
// check that the frame is not null.
@@ -2585,9 +2585,9 @@
{
if (flowThreadState() == NotInsideFlowThread)
return;
-
+
// Sometimes we remove the element from the flow, but it's not destroyed at that time.
- // It's only until later when we actually destroy it and remove all the children from it.
+ // It's only until later when we actually destroy it and remove all the children from it.
// Currently, that happens for firstLetter elements and list markers.
// Pass in the flow thread so that we don't have to look it up for all the children.
removeFromRenderFlowThreadRecursive(flowThreadContainingBlock());
@@ -2599,7 +2599,7 @@
for (RenderObject* child = children->firstChild(); child; child = child->nextSibling())
child->removeFromRenderFlowThreadRecursive(renderFlowThread);
}
-
+
RenderFlowThread* localFlowThread = renderFlowThread;
if (flowThreadState() == InsideInFlowThread)
localFlowThread = flowThreadContainingBlock(); // We have to ask. We can't just assume we are in the same flow thread.
@@ -2832,7 +2832,7 @@
RenderStyle* cachedStyle = style()->getCachedPseudoStyle(pseudo);
if (cachedStyle)
return cachedStyle;
-
+
RefPtr<RenderStyle> result = getUncachedPseudoStyle(PseudoStyleRequest(pseudo), parentStyle);
if (result)
return style()->addCachedPseudoStyle(result.release());
@@ -2843,7 +2843,7 @@
{
if (pseudoStyleRequest.pseudoId < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style()->hasPseudoStyle(pseudoStyleRequest.pseudoId))
return 0;
-
+
if (!parentStyle) {
ASSERT(!ownStyle);
parentStyle = style();
@@ -2884,7 +2884,7 @@
if (result.alpha())
return result.color();
}
-
+
result = object->resolveColor(style, CSSPropertyWebkitTextFillColor);
return result.color();
}
@@ -2940,7 +2940,7 @@
// Convert the style regions to absolute coordinates.
if (style()->visibility() != VISIBLE || !isBox())
return;
-
+
RenderBox* box = toRenderBox(this);
FloatPoint absPos = localToAbsolute();
@@ -3122,7 +3122,7 @@
// If this is a non-anonymous renderer in an editable area, then it's simple.
if (Node* node = nonPseudoNode()) {
if (!node->rendererIsEditable()) {
- // If it can be found, we prefer a visually equivalent position that is editable.
+ // If it can be found, we prefer a visually equivalent position that is editable.
Position position = createLegacyEditingPosition(node, offset);
Position candidate = position.downstream(CanCrossEditingBoundary);
if (candidate.deprecatedNode()->rendererIsEditable())
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 05df7a9..d85358c 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -38,9 +38,9 @@
#include "core/rendering/ScrollBehavior.h"
#include "core/rendering/style/RenderStyle.h"
#include "core/rendering/style/StyleInheritedData.h"
-#include <wtf/HashSet.h>
-#include <wtf/StackStats.h>
-#include <wtf/UnusedParam.h>
+#include "wtf/HashSet.h"
+#include "wtf/StackStats.h"
+#include "wtf/UnusedParam.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderObjectChildList.cpp b/Source/core/rendering/RenderObjectChildList.cpp
index 012bca5..e14404e 100644
--- a/Source/core/rendering/RenderObjectChildList.cpp
+++ b/Source/core/rendering/RenderObjectChildList.cpp
@@ -21,7 +21,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
diff --git a/Source/core/rendering/RenderObjectChildList.h b/Source/core/rendering/RenderObjectChildList.h
index b2804ec..81396e1 100644
--- a/Source/core/rendering/RenderObjectChildList.h
+++ b/Source/core/rendering/RenderObjectChildList.h
@@ -20,13 +20,13 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderObjectChildList_h
#define RenderObjectChildList_h
-#include <wtf/Forward.h>
+#include "wtf/Forward.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderOverflow.h b/Source/core/rendering/RenderOverflow.h
index c737eb3..d01d3ba 100644
--- a/Source/core/rendering/RenderOverflow.h
+++ b/Source/core/rendering/RenderOverflow.h
@@ -32,20 +32,20 @@
// visual overflow (which is not expected to be reachable via scrolling mechanisms).
//
// Layout overflow examples include other boxes that spill out of our box, For example, in the inline case a tall image
-// could spill out of a line box.
-
+// could spill out of a line box.
+
// Examples of visual overflow are shadows, text stroke (and eventually outline and border-image).
// This object is allocated only when some of these fields have non-default values in the owning box.
class RenderOverflow {
WTF_MAKE_NONCOPYABLE(RenderOverflow); WTF_MAKE_FAST_ALLOCATED;
public:
- RenderOverflow(const LayoutRect& layoutRect, const LayoutRect& visualRect)
+ RenderOverflow(const LayoutRect& layoutRect, const LayoutRect& visualRect)
: m_layoutOverflow(layoutRect)
, m_visualOverflow(visualRect)
{
}
-
+
const LayoutRect layoutOverflowRect() const { return m_layoutOverflow; }
const LayoutRect visualOverflowRect() const { return m_visualOverflow; }
@@ -53,14 +53,14 @@
void setMaxYLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setHeight(overflow - m_layoutOverflow.y()); }
void setMinXLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setX(overflow); }
void setMaxXLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setWidth(overflow - m_layoutOverflow.x()); }
-
+
void setMinYVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setY(overflow); }
void setMaxYVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setHeight(overflow - m_layoutOverflow.y()); }
void setMinXVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setX(overflow); }
void setMaxXVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setWidth(overflow - m_layoutOverflow.x()); }
-
+
void move(LayoutUnit dx, LayoutUnit dy);
-
+
void addLayoutOverflow(const LayoutRect&);
void addVisualOverflow(const LayoutRect&);
diff --git a/Source/core/rendering/RenderPart.cpp b/Source/core/rendering/RenderPart.cpp
index dad2632..4395bcc 100644
--- a/Source/core/rendering/RenderPart.cpp
+++ b/Source/core/rendering/RenderPart.cpp
@@ -69,14 +69,14 @@
{
if (RenderWidget::requiresLayer())
return true;
-
+
return requiresAcceleratedCompositing();
}
bool RenderPart::requiresAcceleratedCompositing() const
{
- // There are two general cases in which we can return true. First, if this is a plugin
- // renderer and the plugin has a layer, then we need a layer. Second, if this is
+ // There are two general cases in which we can return true. First, if this is a plugin
+ // renderer and the plugin has a layer, then we need a layer. Second, if this is
// a renderer with a contentDocument and that document needs a layer, then we need
// a layer.
if (widget() && widget()->isPluginView() && toPluginView(widget())->platformLayer())
diff --git a/Source/core/rendering/RenderProgress.cpp b/Source/core/rendering/RenderProgress.cpp
index ce65ce1..e5b52f0 100644
--- a/Source/core/rendering/RenderProgress.cpp
+++ b/Source/core/rendering/RenderProgress.cpp
@@ -24,8 +24,8 @@
#include "core/html/HTMLProgressElement.h"
#include "core/rendering/RenderTheme.h"
-#include <wtf/CurrentTime.h>
-#include <wtf/RefPtr.h>
+#include "wtf/CurrentTime.h"
+#include "wtf/RefPtr.h"
using namespace std;
@@ -108,6 +108,6 @@
ASSERT(node()->shadowHost());
return toHTMLProgressElement(node()->shadowHost());
-}
+}
} // namespace WebCore
diff --git a/Source/core/rendering/RenderRegion.cpp b/Source/core/rendering/RenderRegion.cpp
index c7cbc18..1952abe 100644
--- a/Source/core/rendering/RenderRegion.cpp
+++ b/Source/core/rendering/RenderRegion.cpp
@@ -254,7 +254,7 @@
bool hasAnchoredEndpointsForHeight = isOutOfFlowPositioned() && hasSpecifiedEndpointsForHeight;
return style()->logicalHeight().isAuto() && !hasAnchoredEndpointsForHeight;
}
-
+
void RenderRegion::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
RenderBlock::styleDidChange(diff, oldStyle);
@@ -329,7 +329,7 @@
// Now switch to the region's writing mode coordinate space and let it repaint itself.
flipForWritingMode(clippedRect);
-
+
// Issue the repaint.
repaintRectangle(clippedRect);
}
@@ -361,7 +361,7 @@
{
if (documentBeingDestroyed())
return;
-
+
// A region starts off invalid.
setIsValid(false);
@@ -369,7 +369,7 @@
// The flow thread lifetime is influenced by the number of regions attached to it,
// and we are attaching the region to the flow thread.
installFlowThread();
-
+
if (!m_flowThread)
return;
diff --git a/Source/core/rendering/RenderRegion.h b/Source/core/rendering/RenderRegion.h
index b9b562f..2e5d431 100644
--- a/Source/core/rendering/RenderRegion.h
+++ b/Source/core/rendering/RenderRegion.h
@@ -86,7 +86,7 @@
void setRegionOversetState(RegionOversetState);
Element* element() const;
-
+
// These methods represent the width and height of a "page" and for a RenderRegion they are just the
// content width and content height of a region. For RenderRegionSets, however, they will be the width and
// height of a single column or page in the set.
@@ -114,12 +114,12 @@
// flow thread portion we contain. For sets, we have to figure out the top of the nearest column or
// page.
virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
-
+
virtual void expandToEncompassFlowThreadContentsIfNeeded() { };
// Whether or not this region is a set.
virtual bool isRenderRegionSet() const { return false; }
-
+
virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const;
virtual void collectLayerFragments(LayerFragments&, const LayoutRect&, const LayoutRect&) { }
diff --git a/Source/core/rendering/RenderRegionSet.cpp b/Source/core/rendering/RenderRegionSet.cpp
index 217ac85..9336115 100644
--- a/Source/core/rendering/RenderRegionSet.cpp
+++ b/Source/core/rendering/RenderRegionSet.cpp
@@ -47,7 +47,7 @@
// of the flow thread content. This is because it is always capable of generating an
// infinite number of boxes in order to hold all of the remaining content.
LayoutRect rect(flowThreadPortionRect());
-
+
// Get the offset within the flow thread in its block progression direction. Then get the
// flow thread's remaining logical height including its overflow and expand our rect
// to encompass that remaining height and overflow. The idea is that we will generate
diff --git a/Source/core/rendering/RenderRegionSet.h b/Source/core/rendering/RenderRegionSet.h
index 3d19e88..6802852 100644
--- a/Source/core/rendering/RenderRegionSet.h
+++ b/Source/core/rendering/RenderRegionSet.h
@@ -48,7 +48,7 @@
class RenderRegionSet : public RenderRegion {
public:
RenderRegionSet(Element*, RenderFlowThread*);
-
+
protected:
virtual bool shouldHaveAutoLogicalHeight() const OVERRIDE { return false; }
@@ -58,7 +58,7 @@
virtual void expandToEncompassFlowThreadContentsIfNeeded() OVERRIDE FINAL;
virtual const char* renderName() const = 0;
-
+
virtual bool isRenderRegionSet() const OVERRIDE FINAL { return true; }
};
diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
index 2e19c57..4f47b3d 100644
--- a/Source/core/rendering/RenderReplaced.cpp
+++ b/Source/core/rendering/RenderReplaced.cpp
@@ -78,9 +78,9 @@
{
StackStats::LayoutCheckPoint layoutCheckPoint;
ASSERT(needsLayout());
-
+
LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
-
+
setHeight(minimumReplacedHeight());
updateLogicalWidth();
@@ -109,12 +109,12 @@
if (!shouldPaint(paintInfo, paintOffset))
return;
-
+
LayoutPoint adjustedPaintOffset = paintOffset + location();
-
- if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
+
+ if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
paintBoxDecorations(paintInfo, adjustedPaintOffset);
-
+
if (paintInfo.phase == PaintPhaseMask) {
paintMask(paintInfo, adjustedPaintOffset);
return;
@@ -123,13 +123,13 @@
LayoutRect paintRect = LayoutRect(adjustedPaintOffset, size());
if ((paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth())
paintOutline(paintInfo, paintRect);
-
+
if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection && !canHaveChildren())
return;
-
+
if (!paintInfo.shouldPaintWithinRoot(this))
return;
-
+
bool drawSelectionTint = selectionState() != SelectionNone && !document()->printing();
if (paintInfo.phase == PaintPhaseSelection) {
if (selectionState() == SelectionNone)
@@ -170,7 +170,7 @@
bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline
+ if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseOutline && paintInfo.phase != PaintPhaseSelfOutline
&& paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseMask)
return false;
@@ -276,7 +276,7 @@
if (rendererHasAspectRatio(this) && isPercentageIntrinsicSize)
intrinsicRatio = 1;
-
+
// Update our intrinsic size to match what the content renderer has computed, so that when we
// constrain the size below, the correct intrinsic size will be obtained for comparison against
// min and max widths.
@@ -452,7 +452,7 @@
m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
}
-
+
if (styleToUse->logicalMaxWidth().isFixed()) {
m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
@@ -470,19 +470,19 @@
// FIXME: This code is buggy if the replaced element is relative positioned.
InlineBox* box = inlineBoxWrapper();
RootInlineBox* rootBox = box ? box->root() : 0;
-
+
LayoutUnit top = rootBox ? rootBox->selectionTop() : logicalTop();
LayoutUnit bottom = rootBox ? rootBox->selectionBottom() : logicalBottom();
-
+
LayoutUnit blockDirectionPosition = isHorizontalWritingMode() ? point.y() + y() : point.x() + x();
LayoutUnit lineDirectionPosition = isHorizontalWritingMode() ? point.x() + x() : point.y() + y();
-
+
if (blockDirectionPosition < top)
return createVisiblePosition(caretMinOffset(), DOWNSTREAM); // coordinates are above
-
+
if (blockDirectionPosition >= bottom)
return createVisiblePosition(caretMaxOffset(), DOWNSTREAM); // coordinates are below
-
+
if (node()) {
if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2))
return createVisiblePosition(0, DOWNSTREAM);
@@ -498,13 +498,13 @@
if (!isSelected())
return LayoutRect();
-
+
LayoutRect rect = localSelectionRect();
if (clipToVisibleContent)
computeRectForRepaint(repaintContainer, rect);
else
rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
-
+
return rect;
}
@@ -516,7 +516,7 @@
if (!m_inlineBoxWrapper)
// We're a block-level replaced element. Just return our own dimensions.
return LayoutRect(LayoutPoint(), size());
-
+
RootInlineBox* root = m_inlineBoxWrapper->root();
LayoutUnit newLogicalTop = root->block()->style()->isFlippedBlocksWritingMode() ? m_inlineBoxWrapper->logicalBottom() - root->selectionBottom() : root->selectionTop() - m_inlineBoxWrapper->logicalTop();
if (root->block()->style()->isHorizontalWritingMode())
@@ -546,13 +546,13 @@
selectionStartEnd(selectionStart, selectionEnd);
if (s == SelectionStart)
return selectionStart == 0;
-
+
int end = node()->hasChildNodes() ? node()->childNodeCount() : 1;
if (s == SelectionEnd)
return selectionEnd == end;
if (s == SelectionBoth)
return selectionStart == 0 && selectionEnd == end;
-
+
ASSERT(0);
return false;
}
diff --git a/Source/core/rendering/RenderReplaced.h b/Source/core/rendering/RenderReplaced.h
index 8820449..43775ad 100644
--- a/Source/core/rendering/RenderReplaced.h
+++ b/Source/core/rendering/RenderReplaced.h
@@ -78,7 +78,7 @@
virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE;
virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
-
+
virtual bool canBeSelectionLeaf() const { return true; }
virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* repaintContainer, bool clipToVisibleContent = true) OVERRIDE FINAL;
diff --git a/Source/core/rendering/RenderReplica.cpp b/Source/core/rendering/RenderReplica.cpp
index d8cd92b..c5831f6 100644
--- a/Source/core/rendering/RenderReplica.cpp
+++ b/Source/core/rendering/RenderReplica.cpp
@@ -53,7 +53,7 @@
RenderReplica::~RenderReplica()
{
}
-
+
void RenderReplica::layout()
{
StackStats::LayoutCheckPoint layoutCheckPoint;
@@ -75,7 +75,7 @@
if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseMask)
return;
-
+
LayoutPoint adjustedPaintOffset = paintOffset + location();
if (paintInfo.phase == PaintPhaseForeground) {
diff --git a/Source/core/rendering/RenderReplica.h b/Source/core/rendering/RenderReplica.h
index 365e424..43bee56 100644
--- a/Source/core/rendering/RenderReplica.h
+++ b/Source/core/rendering/RenderReplica.h
@@ -40,11 +40,11 @@
virtual ~RenderReplica();
virtual const char* renderName() const { return "RenderReplica"; }
-
+
virtual bool requiresLayer() const { return true; }
virtual void layout();
-
+
virtual void paint(PaintInfo&, const LayoutPoint&);
private:
diff --git a/Source/core/rendering/RenderRuby.cpp b/Source/core/rendering/RenderRuby.cpp
index 5a49d65..3459add 100644
--- a/Source/core/rendering/RenderRuby.cpp
+++ b/Source/core/rendering/RenderRuby.cpp
@@ -34,7 +34,7 @@
#include "core/rendering/RenderRubyRun.h"
#include "core/rendering/style/RenderStyle.h"
-#include <wtf/RefPtr.h>
+#include "wtf/RefPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderRubyBase.cpp b/Source/core/rendering/RenderRubyBase.cpp
index 94e8a36..503a9f5 100644
--- a/Source/core/rendering/RenderRubyBase.cpp
+++ b/Source/core/rendering/RenderRubyBase.cpp
@@ -118,8 +118,8 @@
// If an anonymous block would be put next to another such block, then merge those.
RenderObject* firstChildHere = firstChild();
RenderObject* lastChildThere = toBase->lastChild();
- if (firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline()
- && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildThere->childrenInline()) {
+ if (firstChildHere->isAnonymousBlock() && firstChildHere->childrenInline()
+ && lastChildThere && lastChildThere->isAnonymousBlock() && lastChildThere->childrenInline()) {
RenderBlock* anonBlockHere = toRenderBlock(firstChildHere);
RenderBlock* anonBlockThere = toRenderBlock(lastChildThere);
anonBlockHere->moveAllChildrenTo(anonBlockThere, anonBlockThere->children());
diff --git a/Source/core/rendering/RenderRubyBase.h b/Source/core/rendering/RenderRubyBase.h
index 3a00b33..4d1f56d 100644
--- a/Source/core/rendering/RenderRubyBase.h
+++ b/Source/core/rendering/RenderRubyBase.h
@@ -40,7 +40,7 @@
class RenderRubyBase FINAL : public RenderBlock {
public:
virtual ~RenderRubyBase();
-
+
static RenderRubyBase* createAnonymous(Document*);
virtual const char* renderName() const { return "RenderRubyBase (anonymous)"; }
diff --git a/Source/core/rendering/RenderRubyRun.cpp b/Source/core/rendering/RenderRubyRun.cpp
index 3686cb0..5890d2a 100644
--- a/Source/core/rendering/RenderRubyRun.cpp
+++ b/Source/core/rendering/RenderRubyRun.cpp
@@ -230,13 +230,13 @@
void RenderRubyRun::layout()
{
RenderBlock::layout();
-
+
RenderRubyText* rt = rubyText();
if (!rt)
return;
rt->setLogicalLeft(0);
-
+
// Place the RenderRubyText such that its bottom is flush with the lineTop of the first line of the RenderRubyBase.
LayoutUnit lastLineRubyTextBottom = rt->logicalHeight();
LayoutUnit firstLineRubyTextTop = 0;
@@ -255,7 +255,7 @@
firstLineTop = rootBox->logicalTopLayoutOverflow();
firstLineTop += rb->logicalTop();
}
-
+
rt->setLogicalTop(-lastLineRubyTextBottom + firstLineTop);
} else {
LayoutUnit lastLineBottom = logicalHeight();
diff --git a/Source/core/rendering/RenderScrollbar.cpp b/Source/core/rendering/RenderScrollbar.cpp
index 51acda5..1f39c36 100644
--- a/Source/core/rendering/RenderScrollbar.cpp
+++ b/Source/core/rendering/RenderScrollbar.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -48,7 +48,7 @@
ASSERT(ownerNode || owningFrame);
// FIXME: We need to do this because RenderScrollbar::styleChanged is called as soon as the scrollbar is created.
-
+
// Update the scrollbar size.
int width = 0;
int height = 0;
@@ -68,10 +68,10 @@
RenderScrollbar::~RenderScrollbar()
{
if (!m_parts.isEmpty()) {
- // When a scrollbar is detached from its parent (causing all parts removal) and
+ // When a scrollbar is detached from its parent (causing all parts removal) and
// ready to be destroyed, its destruction can be delayed because of RefPtr
// maintained in other classes such as EventHandler (m_lastScrollbarUnderMouse).
- // Meanwhile, we can have a call to updateScrollbarPart which recreates the
+ // Meanwhile, we can have a call to updateScrollbarPart which recreates the
// scrollbar part. So, we need to destroy these parts since we don't want them
// to call on a destroyed scrollbar. See webkit bug 68009.
updateScrollbarParts(true);
@@ -137,10 +137,10 @@
{
ScrollbarPart oldPart = m_pressedPart;
Scrollbar::setPressedPart(part);
-
+
updateScrollbarPart(oldPart);
updateScrollbarPart(part);
-
+
updateScrollbarPart(ScrollbarBGPart);
updateScrollbarPart(TrackBGPart);
}
@@ -151,7 +151,7 @@
return 0;
RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(PseudoStyleRequest(pseudoId, this, partType), owningRenderer()->style());
- // Scrollbars for root frames should always have background color
+ // Scrollbars for root frames should always have background color
// unless explicitly specified as transparent. So we force it.
// This is because WebKit assumes scrollbar to be always painted and missing background
// causes visual artifact like non-repainted dirty region.
@@ -172,12 +172,12 @@
updateScrollbarPart(BackButtonEndPart, destroy);
updateScrollbarPart(ForwardButtonEndPart, destroy);
updateScrollbarPart(TrackBGPart, destroy);
-
+
if (destroy)
return;
// See if the scrollbar's thickness changed. If so, we need to mark our owning object as needing a layout.
- bool isHorizontal = orientation() == HorizontalScrollbar;
+ bool isHorizontal = orientation() == HorizontalScrollbar;
int oldThickness = isHorizontal ? height() : width();
int newThickness = 0;
RenderScrollbarPart* part = m_parts.get(ScrollbarBGPart);
@@ -185,7 +185,7 @@
part->layout();
newThickness = isHorizontal ? part->height() : part->width();
}
-
+
if (newThickness != oldThickness) {
setFrameRect(IntRect(location(), IntSize(isHorizontal ? width() : newThickness, isHorizontal ? newThickness : height())));
if (RenderBox* box = owningRenderer())
@@ -224,9 +224,9 @@
return;
RefPtr<RenderStyle> partStyle = !destroy ? getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)) : PassRefPtr<RenderStyle>(0);
-
+
bool needRenderer = !destroy && partStyle && partStyle->display() != NONE && partStyle->visibility() == VISIBLE;
-
+
if (needRenderer && partStyle->display() != BLOCK) {
// See if we are a button that should not be visible according to OS settings.
ScrollbarButtonsPlacement buttonsPlacement = theme()->buttonsPlacement();
@@ -249,7 +249,7 @@
break;
}
}
-
+
RenderScrollbarPart* partRenderer = m_parts.get(partType);
if (!partRenderer && needRenderer) {
partRenderer = RenderScrollbarPart::createAnonymous(owningRenderer()->document(), this, partType);
@@ -259,7 +259,7 @@
partRenderer->destroy();
partRenderer = 0;
}
-
+
if (partRenderer)
partRenderer->setStyle(partStyle.release());
}
@@ -277,9 +277,9 @@
RenderScrollbarPart* partRenderer = m_parts.get(partType);
if (!partRenderer)
return IntRect();
-
+
partRenderer->layout();
-
+
bool isHorizontal = orientation() == HorizontalScrollbar;
if (partType == BackButtonStartPart)
return IntRect(location(), IntSize(isHorizontal ? partRenderer->pixelSnappedWidth() : width(), isHorizontal ? height() : partRenderer->pixelSnappedHeight()));
@@ -288,7 +288,7 @@
isHorizontal ? y() : y() + height() - partRenderer->pixelSnappedHeight(),
isHorizontal ? partRenderer->pixelSnappedWidth() : width(),
isHorizontal ? height() : partRenderer->pixelSnappedHeight());
-
+
if (partType == ForwardButtonStartPart) {
IntRect previousButton = buttonRect(BackButtonStartPart);
return IntRect(isHorizontal ? x() + previousButton.width() : x(),
@@ -296,7 +296,7 @@
isHorizontal ? partRenderer->pixelSnappedWidth() : width(),
isHorizontal ? height() : partRenderer->pixelSnappedHeight());
}
-
+
IntRect followingButton = buttonRect(ForwardButtonEndPart);
return IntRect(isHorizontal ? x() + width() - followingButton.width() - partRenderer->pixelSnappedWidth() : x(),
isHorizontal ? y() : y() + height() - followingButton.height() - partRenderer->pixelSnappedHeight(),
@@ -318,7 +318,7 @@
int totalLength = startLength + endLength;
return IntRect(x() + startLength, y(), width() - totalLength, height());
}
-
+
int marginTop = part ? static_cast<int>(part->marginTop()) : 0;
int marginBottom = part ? static_cast<int>(part->marginBottom()) : 0;
startLength += marginTop;
@@ -333,9 +333,9 @@
RenderScrollbarPart* partRenderer = m_parts.get(partType);
if (!partRenderer)
return oldRect;
-
+
partRenderer->layout();
-
+
IntRect rect = oldRect;
if (orientation() == HorizontalScrollbar) {
rect.setX(rect.x() + partRenderer->marginLeft());
@@ -351,7 +351,7 @@
{
RenderScrollbarPart* partRenderer = m_parts.get(ThumbPart);
if (!partRenderer)
- return 0;
+ return 0;
partRenderer->layout();
return orientation() == HorizontalScrollbar ? partRenderer->width() : partRenderer->height();
}
diff --git a/Source/core/rendering/RenderScrollbar.h b/Source/core/rendering/RenderScrollbar.h
index 12c6032..a40ede8 100644
--- a/Source/core/rendering/RenderScrollbar.h
+++ b/Source/core/rendering/RenderScrollbar.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderScrollbar_h
@@ -28,7 +28,7 @@
#include "core/platform/Scrollbar.h"
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderScrollbarPart.cpp b/Source/core/rendering/RenderScrollbarPart.cpp
index 0e45be1..9d36cce 100644
--- a/Source/core/rendering/RenderScrollbarPart.cpp
+++ b/Source/core/rendering/RenderScrollbarPart.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -84,7 +84,7 @@
} else {
setWidth(m_scrollbar->width());
computeScrollbarHeight();
- }
+ }
}
static int calcScrollbarThicknessUsing(SizeType sizeType, const Length& length, int containingLength, RenderView* renderView)
@@ -106,8 +106,8 @@
int minWidth = calcScrollbarThicknessUsing(MinSize, style()->minWidth(), visibleSize, renderView);
int maxWidth = style()->maxWidth().isUndefined() ? w : calcScrollbarThicknessUsing(MaxSize, style()->maxWidth(), visibleSize, renderView);
setWidth(max(minWidth, min(maxWidth, w)));
-
- // Buttons and track pieces can all have margins along the axis of the scrollbar.
+
+ // Buttons and track pieces can all have margins along the axis of the scrollbar.
m_marginBox.setLeft(minimumValueForLength(style()->marginLeft(), visibleSize, renderView));
m_marginBox.setRight(minimumValueForLength(style()->marginRight(), visibleSize, renderView));
}
@@ -125,7 +125,7 @@
int maxHeight = style()->maxHeight().isUndefined() ? h : calcScrollbarThicknessUsing(MaxSize, style()->maxHeight(), visibleSize, renderView);
setHeight(max(minHeight, min(maxHeight, h)));
- // Buttons and track pieces can all have margins along the axis of the scrollbar.
+ // Buttons and track pieces can all have margins along the axis of the scrollbar.
m_marginBox.setTop(minimumValueForLength(style()->marginTop(), visibleSize, renderView));
m_marginBox.setBottom(minimumValueForLength(style()->marginBottom(), visibleSize, renderView));
}
@@ -134,7 +134,7 @@
{
if (!preferredLogicalWidthsDirty())
return;
-
+
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
setPreferredLogicalWidthsDirty(false);
@@ -168,7 +168,7 @@
return;
}
}
-
+
RenderBlock::imageChanged(image, rect);
}
}
diff --git a/Source/core/rendering/RenderScrollbarPart.h b/Source/core/rendering/RenderScrollbarPart.h
index dac6d3b..b2331cd 100644
--- a/Source/core/rendering/RenderScrollbarPart.h
+++ b/Source/core/rendering/RenderScrollbarPart.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderScrollbarPart_h
@@ -36,15 +36,15 @@
class RenderScrollbarPart FINAL : public RenderBlock {
public:
static RenderScrollbarPart* createAnonymous(Document*, RenderScrollbar* = 0, ScrollbarPart = NoPart);
-
+
virtual ~RenderScrollbarPart();
virtual const char* renderName() const { return "RenderScrollbarPart"; }
-
+
virtual bool requiresLayer() const { return false; }
virtual void layout();
-
+
void paintIntoRect(GraphicsContext*, const LayoutPoint&, const LayoutRect&);
// Scrollbar parts needs to be rendered at device pixel boundaries.
@@ -71,7 +71,7 @@
void computeScrollbarWidth();
void computeScrollbarHeight();
-
+
RenderScrollbar* m_scrollbar;
ScrollbarPart m_part;
};
diff --git a/Source/core/rendering/RenderScrollbarTheme.cpp b/Source/core/rendering/RenderScrollbarTheme.cpp
index 13aca53..84185ff 100644
--- a/Source/core/rendering/RenderScrollbarTheme.cpp
+++ b/Source/core/rendering/RenderScrollbarTheme.cpp
@@ -20,14 +20,14 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "core/platform/ScrollbarThemeClient.h"
#include "core/rendering/RenderScrollbar.h"
#include "core/rendering/RenderScrollbarTheme.h"
-#include <wtf/StdLibExtras.h>
+#include "wtf/StdLibExtras.h"
namespace WebCore {
@@ -93,7 +93,7 @@
}
IntRect RenderScrollbarTheme::constrainTrackRectToTrackPieces(ScrollbarThemeClient* scrollbar, const IntRect& rect)
-{
+{
IntRect backRect = toRenderScrollbar(scrollbar)->trackPieceRectWithMargins(BackTrackPart, rect);
IntRect forwardRect = toRenderScrollbar(scrollbar)->trackPieceRectWithMargins(ForwardTrackPart, rect);
IntRect result = rect;
diff --git a/Source/core/rendering/RenderScrollbarTheme.h b/Source/core/rendering/RenderScrollbarTheme.h
index fea8540..d718f5f 100644
--- a/Source/core/rendering/RenderScrollbarTheme.h
+++ b/Source/core/rendering/RenderScrollbarTheme.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderScrollbarTheme_h
@@ -37,7 +37,7 @@
class RenderScrollbarTheme : public ScrollbarThemeComposite {
public:
virtual ~RenderScrollbarTheme() {};
-
+
virtual int scrollbarThickness(ScrollbarControlSize controlSize) { return ScrollbarTheme::theme()->scrollbarThickness(controlSize); }
virtual ScrollbarButtonsPlacement buttonsPlacement() const { return ScrollbarTheme::theme()->buttonsPlacement(); }
@@ -47,7 +47,7 @@
virtual void paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect);
virtual bool shouldCenterOnThumb(ScrollbarThemeClient* scrollbar, const PlatformMouseEvent& event) { return ScrollbarTheme::theme()->shouldCenterOnThumb(scrollbar, event); }
-
+
virtual double initialAutoscrollTimerDelay() { return ScrollbarTheme::theme()->initialAutoscrollTimerDelay(); }
virtual double autoscrollTimerDelay() { return ScrollbarTheme::theme()->autoscrollTimerDelay(); }
@@ -57,7 +57,7 @@
virtual int minimumThumbLength(ScrollbarThemeClient*);
void buttonSizesAlongTrackAxis(ScrollbarThemeClient*, int& beforeSize, int& afterSize);
-
+
static RenderScrollbarTheme* renderScrollbarTheme();
protected:
@@ -67,7 +67,7 @@
virtual IntRect backButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
virtual IntRect forwardButtonRect(ScrollbarThemeClient*, ScrollbarPart, bool painting = false);
virtual IntRect trackRect(ScrollbarThemeClient*, bool painting = false);
-
+
virtual void paintScrollbarBackground(GraphicsContext*, ScrollbarThemeClient*);
virtual void paintTrackBackground(GraphicsContext*, ScrollbarThemeClient*, const IntRect&);
virtual void paintTrackPiece(GraphicsContext*, ScrollbarThemeClient*, const IntRect&, ScrollbarPart);
diff --git a/Source/core/rendering/RenderSearchField.cpp b/Source/core/rendering/RenderSearchField.cpp
index 2adc8b3..11ee314 100644
--- a/Source/core/rendering/RenderSearchField.cpp
+++ b/Source/core/rendering/RenderSearchField.cpp
@@ -1,6 +1,6 @@
/**
* Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
diff --git a/Source/core/rendering/RenderSelectionInfo.h b/Source/core/rendering/RenderSelectionInfo.h
index f916214..96d0027 100644
--- a/Source/core/rendering/RenderSelectionInfo.h
+++ b/Source/core/rendering/RenderSelectionInfo.h
@@ -46,7 +46,7 @@
, m_state(o->selectionState())
{
}
-
+
RenderObject* object() const { return m_object; }
RenderLayerModelObject* repaintContainer() const { return m_repaintContainer; }
RenderObject::SelectionState state() const { return m_state; }
@@ -65,7 +65,7 @@
, m_rect(o->canUpdateSelectionOnRootLineBoxes() ? o->selectionRectForRepaint(m_repaintContainer, clipToVisibleContent) : LayoutRect())
{
}
-
+
void repaint()
{
m_object->repaintUsingContainer(m_repaintContainer, enclosingIntRect(m_rect));
@@ -84,14 +84,14 @@
RenderBlockSelectionInfo(RenderBlock* b)
: RenderSelectionInfoBase(b)
, m_rects(b->canUpdateSelectionOnRootLineBoxes() ? block()->selectionGapRectsForRepaint(m_repaintContainer) : GapRects())
- {
+ {
}
void repaint()
{
m_object->repaintUsingContainer(m_repaintContainer, enclosingIntRect(m_rects));
}
-
+
RenderBlock* block() const { return toRenderBlock(m_object); }
GapRects rects() const { return m_rects; }
diff --git a/Source/core/rendering/RenderSlider.cpp b/Source/core/rendering/RenderSlider.cpp
index 76d24fd..bb0be19 100644
--- a/Source/core/rendering/RenderSlider.cpp
+++ b/Source/core/rendering/RenderSlider.cpp
@@ -23,7 +23,7 @@
#include "core/html/HTMLInputElement.h"
#include "core/html/shadow/SliderThumbElement.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
using std::min;
@@ -85,7 +85,7 @@
m_minPreferredLogicalWidth += toAdd;
m_maxPreferredLogicalWidth += toAdd;
- setPreferredLogicalWidthsDirty(false);
+ setPreferredLogicalWidthsDirty(false);
}
void RenderSlider::layout()
diff --git a/Source/core/rendering/RenderTable.cpp b/Source/core/rendering/RenderTable.cpp
index 01c1695..aaea9fb 100644
--- a/Source/core/rendering/RenderTable.cpp
+++ b/Source/core/rendering/RenderTable.cpp
@@ -67,7 +67,7 @@
{
setChildrenInline(false);
m_columnPos.fill(0, 1);
-
+
}
RenderTable::~RenderTable()
@@ -128,7 +128,7 @@
m_head = toRenderTableSection(child);
} else {
resetSectionPointerIfNotBefore(m_firstBody, beforeChild);
- if (!m_firstBody)
+ if (!m_firstBody)
m_firstBody = toRenderTableSection(child);
}
wrapInAnonymousSection = false;
@@ -411,14 +411,14 @@
// FIXME: We should do this recalc lazily in borderStart/borderEnd so that we don't have to make sure
// to call this before we call borderStart/borderEnd to avoid getting a stale value.
recalcBordersInRowDirection();
-
+
LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
LayoutStateMaintainer statePusher(view(), this, locationOffset(), style()->isFlippedBlocksWritingMode());
setLogicalHeight(0);
initMaxMarginValues();
-
+
LayoutUnit oldLogicalWidth = logicalWidth();
updateLogicalWidth();
@@ -484,11 +484,11 @@
updateLogicalHeight();
LayoutUnit computedLogicalHeight = 0;
-
+
Length logicalHeightLength = style()->logicalHeight();
if (logicalHeightLength.isIntrinsic() || (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive()))
computedLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
-
+
Length logicalMaxHeightLength = style()->logicalMaxHeight();
if (logicalMaxHeightLength.isIntrinsic() || (logicalMaxHeightLength.isSpecified() && !logicalMaxHeightLength.isNegative())) {
LayoutUnit computedMaxLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMaxHeightLength);
@@ -612,7 +612,7 @@
}
// Add overflow from our caption.
- for (unsigned i = 0; i < m_captions.size(); i++)
+ for (unsigned i = 0; i < m_captions.size(); i++)
addOverflowFromChild(m_captions[i]);
// Add overflow from our sections.
@@ -657,7 +657,7 @@
// We're done. We don't bother painting any children.
if (paintPhase == PaintPhaseBlockBackground)
return;
-
+
// We don't paint our own background, but we do let the kids paint their backgrounds.
if (paintPhase == PaintPhaseChildBlockBackgrounds)
paintPhase = PaintPhaseChildBlockBackground;
@@ -672,7 +672,7 @@
child->paint(info, childPoint);
}
}
-
+
if (collapseBorders() && paintPhase == PaintPhaseChildBlockBackground && style()->visibility() == VISIBLE) {
recalcCollapsedBorders();
// Using our cached sorted styles, we then do individual passes,
@@ -954,7 +954,7 @@
maxCols = sectionCols;
}
}
-
+
m_columns.resize(maxCols);
m_columnPos.resize(maxCols + 1);
@@ -1303,7 +1303,7 @@
unsigned effCol = colToEffCol(cell->col());
if (!effCol)
return 0;
-
+
// If we hit a colspan back up to a real cell.
RenderTableSection::CellStruct& prevCell = section->cellAt(cell->rowIndex(), effCol - 1);
return prevCell.primaryCell();
@@ -1370,7 +1370,7 @@
LayoutRect RenderTable::overflowClipRect(const LayoutPoint& location, RenderRegion* region, OverlayScrollbarSizeRelevancy relevancy)
{
LayoutRect rect = RenderBlock::overflowClipRect(location, region, relevancy);
-
+
// If we have a caption, expand the clip to include the caption.
// FIXME: Technically this is wrong, but it's virtually impossible to fix this
// for real until captions have been re-written.
diff --git a/Source/core/rendering/RenderTable.h b/Source/core/rendering/RenderTable.h
index 0d48432..d18b649 100644
--- a/Source/core/rendering/RenderTable.h
+++ b/Source/core/rendering/RenderTable.h
@@ -28,7 +28,7 @@
#include "CSSPropertyNames.h"
#include "core/rendering/RenderBlock.h"
#include "core/rendering/style/CollapsedBorderValue.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
@@ -49,7 +49,7 @@
// and rows respectively, not necessarily the horizontal and vertical spacing respectively".
int hBorderSpacing() const { return m_hSpacing; }
int vBorderSpacing() const { return m_vSpacing; }
-
+
bool collapseBorders() const { return style()->borderCollapse(); }
int borderStart() const { return m_borderStart; }
@@ -168,7 +168,7 @@
void appendColumn(unsigned span);
unsigned numEffCols() const { return m_columns.size(); }
unsigned spanOfEffCol(unsigned effCol) const { return m_columns[effCol].span; }
-
+
unsigned colToEffCol(unsigned column) const
{
unsigned effColumn = 0;
@@ -177,7 +177,7 @@
c += m_columns[effColumn].span;
return effColumn;
}
-
+
unsigned effColToCol(unsigned effCol) const
{
unsigned c = 0;
@@ -231,7 +231,7 @@
RenderTableCell* cellBelow(const RenderTableCell*) const;
RenderTableCell* cellBefore(const RenderTableCell*) const;
RenderTableCell* cellAfter(const RenderTableCell*) const;
-
+
typedef Vector<CollapsedBorderValue> CollapsedBorderValues;
void invalidateCollapsedBorders()
{
@@ -239,7 +239,7 @@
m_collapsedBorders.clear();
}
const CollapsedBorderValue* currentBorderValue() const { return m_currentBorder; }
-
+
bool hasSections() const { return m_head || m_foot || m_firstBody; }
void recalcSectionsIfNeeded() const
@@ -293,7 +293,7 @@
virtual RenderBlock* firstLineBlock() const;
virtual void updateFirstLetter();
-
+
virtual void updateLogicalWidth() OVERRIDE;
LayoutUnit convertStyleLogicalWidthToComputedWidth(const Length& styleLogicalWidth, LayoutUnit availableWidth);
diff --git a/Source/core/rendering/RenderTableCaption.h b/Source/core/rendering/RenderTableCaption.h
index 6213053..79b894d 100644
--- a/Source/core/rendering/RenderTableCaption.h
+++ b/Source/core/rendering/RenderTableCaption.h
@@ -31,7 +31,7 @@
explicit RenderTableCaption(Element*);
virtual ~RenderTableCaption();
virtual LayoutUnit containingBlockLogicalWidthForContent() const OVERRIDE;
-
+
private:
virtual bool isTableCaption() const OVERRIDE { return true; }
diff --git a/Source/core/rendering/RenderTableCell.cpp b/Source/core/rendering/RenderTableCell.cpp
index 429d521..b612c20 100644
--- a/Source/core/rendering/RenderTableCell.cpp
+++ b/Source/core/rendering/RenderTableCell.cpp
@@ -269,7 +269,7 @@
}
LayoutUnit RenderTableCell::paddingRight() const
-{
+{
int result = computedCSSPaddingRight();
if (isHorizontalWritingMode())
return result;
@@ -402,16 +402,16 @@
// The following rules apply for resolving conflicts and figuring out which border
// to use.
-// (1) Borders with the 'border-style' of 'hidden' take precedence over all other conflicting
+// (1) Borders with the 'border-style' of 'hidden' take precedence over all other conflicting
// borders. Any border with this value suppresses all borders at this location.
-// (2) Borders with a style of 'none' have the lowest priority. Only if the border properties of all
-// the elements meeting at this edge are 'none' will the border be omitted (but note that 'none' is
+// (2) Borders with a style of 'none' have the lowest priority. Only if the border properties of all
+// the elements meeting at this edge are 'none' will the border be omitted (but note that 'none' is
// the default value for the border style.)
-// (3) If none of the styles are 'hidden' and at least one of them is not 'none', then narrow borders
-// are discarded in favor of wider ones. If several have the same 'border-width' then styles are preferred
+// (3) If none of the styles are 'hidden' and at least one of them is not 'none', then narrow borders
+// are discarded in favor of wider ones. If several have the same 'border-width' then styles are preferred
// in this order: 'double', 'solid', 'dashed', 'dotted', 'ridge', 'outset', 'groove', and the lowest: 'inset'.
-// (4) If border styles differ only in color, then a style set on a cell wins over one on a row,
-// which wins over a row group, column, column group and, lastly, table. It is undefined which color
+// (4) If border styles differ only in color, then a style set on a cell wins over one on a row,
+// which wins over a row group, column, column group and, lastly, table. It is undefined which color
// is used when two elements of the same type disagree.
static int compareBorders(const CollapsedBorderValue& border1, const CollapsedBorderValue& border2)
{
@@ -432,7 +432,7 @@
}
if (border1.style() == BHIDDEN)
return 1;
-
+
// Rule #2 above. A style of 'none' has lowest priority and always loses to any other border.
if (border2.style() == BNONE) {
if (border1.style() == BNONE)
@@ -445,11 +445,11 @@
// The first part of rule #3 above. Wider borders win.
if (border1.width() != border2.width())
return border1.width() < border2.width() ? -1 : 1;
-
+
// The borders have equal width. Sort by border style.
if (border1.style() != border2.style())
return border1.style() < border2.style() ? -1 : 1;
-
+
// The border have the same width and style. Rely on precedence (cell over row over row group, etc.)
if (border1.precedence() == border2.precedence())
return 0;
@@ -524,7 +524,7 @@
if (!result.exists())
return result;
}
-
+
// (5) Our column and column group's start borders.
bool startColEdge;
bool endColEdge;
@@ -549,7 +549,7 @@
}
}
}
-
+
// (6) The end border of the preceding column.
if (cellBefore) {
if (RenderTableCol* colElt = table->colElement(col() - 1, &startColEdge, &endColEdge)) {
@@ -580,7 +580,7 @@
if (!result.exists())
return result;
}
-
+
return result;
}
@@ -604,7 +604,7 @@
int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
CollapsedBorderValue result = CollapsedBorderValue(style()->borderEnd(), includeColor ? resolveColor(endColorProperty) : Color(), BCELL);
-
+
// (2) The start border of the following cell.
if (!isEndColumn) {
if (RenderTableCell* cellAfter = table->cellAfter(this)) {
@@ -621,13 +621,13 @@
result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningEndCell(this), includeColor ? parent()->resolveColor(endColorProperty) : Color(), BROW));
if (!result.exists())
return result;
-
+
// (4) Our row group's end border.
result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningEndCell(this), includeColor ? section()->resolveColor(endColorProperty) : Color(), BROWGROUP));
if (!result.exists())
return result;
}
-
+
// (5) Our column and column group's end borders.
bool startColEdge;
bool endColEdge;
@@ -652,7 +652,7 @@
}
}
}
-
+
// (6) The start border of the next column.
if (!isEndColumn) {
if (RenderTableCol* colElt = table->colElement(col() + colSpan(), &startColEdge, &endColEdge)) {
@@ -682,7 +682,7 @@
if (!result.exists())
return result;
}
-
+
return result;
}
@@ -703,7 +703,7 @@
int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
CollapsedBorderValue result = CollapsedBorderValue(style()->borderBefore(), includeColor ? resolveColor(beforeColorProperty) : Color(), BCELL);
-
+
RenderTableCell* prevCell = table->cellAbove(this);
if (prevCell) {
// (2) A before cell's after border.
@@ -711,12 +711,12 @@
if (!result.exists())
return result;
}
-
+
// (3) Our row's before border.
result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderBefore(), includeColor ? parent()->resolveColor(beforeColorProperty) : Color(), BROW));
if (!result.exists())
return result;
-
+
// (4) The previous row's after border.
if (prevCell) {
RenderObject* prevRow = 0;
@@ -724,14 +724,14 @@
prevRow = parent()->previousSibling();
else
prevRow = prevCell->section()->lastChild();
-
+
if (prevRow) {
result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderAfter(), includeColor ? prevRow->resolveColor(afterColorProperty) : Color(), BROW), result);
if (!result.exists())
return result;
}
}
-
+
// Now check row groups.
RenderTableSection* currSection = section();
if (!rowIndex()) {
@@ -739,7 +739,7 @@
result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderBefore(), includeColor ? currSection->resolveColor(beforeColorProperty) : Color(), BROWGROUP));
if (!result.exists())
return result;
-
+
// (6) Previous row group's after border.
currSection = table->sectionAbove(currSection, SkipEmptySections);
if (currSection) {
@@ -748,7 +748,7 @@
return result;
}
}
-
+
if (!currSection) {
// (8) Our column and column group's before borders.
RenderTableCol* colElt = table->colElement(col());
@@ -762,13 +762,13 @@
return result;
}
}
-
+
// (9) The table's before border.
result = chooseBorder(result, CollapsedBorderValue(table->style()->borderBefore(), includeColor ? table->resolveColor(beforeColorProperty) : Color(), BTABLE));
if (!result.exists())
return result;
}
-
+
return result;
}
@@ -789,7 +789,7 @@
int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), styleForCellFlow()->writingMode()) : 0;
CollapsedBorderValue result = CollapsedBorderValue(style()->borderAfter(), includeColor ? resolveColor(afterColorProperty) : Color(), BCELL);
-
+
RenderTableCell* nextCell = table->cellBelow(this);
if (nextCell) {
// (2) An after cell's before border.
@@ -797,19 +797,19 @@
if (!result.exists())
return result;
}
-
+
// (3) Our row's after border. (FIXME: Deal with rowspan!)
result = chooseBorder(result, CollapsedBorderValue(parent()->style()->borderAfter(), includeColor ? parent()->resolveColor(afterColorProperty) : Color(), BROW));
if (!result.exists())
return result;
-
+
// (4) The next row's before border.
if (nextCell) {
result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->style()->borderBefore(), includeColor ? nextCell->parent()->resolveColor(beforeColorProperty) : Color(), BROW));
if (!result.exists())
return result;
}
-
+
// Now check row groups.
RenderTableSection* currSection = section();
if (rowIndex() + rowSpan() >= currSection->numRows()) {
@@ -817,7 +817,7 @@
result = chooseBorder(result, CollapsedBorderValue(currSection->style()->borderAfter(), includeColor ? currSection->resolveColor(afterColorProperty) : Color(), BROWGROUP));
if (!result.exists())
return result;
-
+
// (6) Following row group's before border.
currSection = table->sectionBelow(currSection, SkipEmptySections);
if (currSection) {
@@ -826,7 +826,7 @@
return result;
}
}
-
+
if (!currSection) {
// (8) Our column and column group's after borders.
RenderTableCol* colElt = table->colElement(col());
@@ -839,14 +839,14 @@
return result;
}
}
-
+
// (9) The table's after border.
result = chooseBorder(result, CollapsedBorderValue(table->style()->borderAfter(), includeColor ? table->resolveColor(afterColorProperty) : Color(), BTABLE));
if (!result.exists())
return result;
}
-
- return result;
+
+ return result;
}
inline CollapsedBorderValue RenderTableCell::cachedCollapsedLeftBorder(const RenderStyle* styleForCellFlow) const
@@ -958,7 +958,7 @@
return (border.width() + ((styleForCellFlow()->isLeftToRightDirection() ^ outer) ? 1 : 0)) / 2; // Give the extra pixel to top and left.
return 0;
}
-
+
int RenderTableCell::borderHalfEnd(bool outer) const
{
CollapsedBorderValue border = collapsedEndBorder(DoNotIncludeBorderColor);
@@ -1015,7 +1015,7 @@
: m_count(0)
{
}
-
+
void addBorder(const CollapsedBorderValue& borderValue, BoxSide borderSide, bool shouldPaint,
int x1, int y1, int x2, int y2, EBorderStyle borderStyle)
{
@@ -1040,10 +1040,10 @@
return &m_borders[i];
}
}
-
+
return 0;
}
-
+
CollapsedBorder m_borders[4];
unsigned m_count;
};
@@ -1109,7 +1109,7 @@
CollapsedBorderValue rightVal = cachedCollapsedRightBorder(styleForCellFlow);
CollapsedBorderValue topVal = cachedCollapsedTopBorder(styleForCellFlow);
CollapsedBorderValue bottomVal = cachedCollapsedBottomBorder(styleForCellFlow);
-
+
// Adjust our x/y/width/height so that we paint the collapsed borders at the correct location.
int topWidth = topVal.width();
int bottomWidth = bottomVal.width();
@@ -1125,14 +1125,14 @@
EBorderStyle bottomStyle = collapsedBorderStyle(bottomVal.style());
EBorderStyle leftStyle = collapsedBorderStyle(leftVal.style());
EBorderStyle rightStyle = collapsedBorderStyle(rightVal.style());
-
+
bool renderTop = topStyle > BHIDDEN && !topVal.isTransparent();
bool renderBottom = bottomStyle > BHIDDEN && !bottomVal.isTransparent();
bool renderLeft = leftStyle > BHIDDEN && !leftVal.isTransparent();
bool renderRight = rightStyle > BHIDDEN && !rightVal.isTransparent();
// We never paint diagonals at the joins. We simply let the border with the highest
- // precedence paint on top of borders with lower precedence.
+ // precedence paint on top of borders with lower precedence.
CollapsedBorders borders;
borders.addBorder(topVal, BSTop, renderTop, borderRect.x(), borderRect.y(), borderRect.maxX(), borderRect.y() + topWidth, topStyle);
borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderRect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle);
@@ -1140,10 +1140,10 @@
borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightWidth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle);
bool antialias = shouldAntialiasLines(graphicsContext);
-
+
for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) {
if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue())) {
- drawLineForBoxSide(graphicsContext, border->x1, border->y1, border->x2, border->y2, border->side,
+ drawLineForBoxSide(graphicsContext, border->x1, border->y1, border->x2, border->y2, border->side,
resolveColor(border->borderValue.color()), border->style, 0, 0, antialias);
}
}
@@ -1196,7 +1196,7 @@
LayoutRect paintRect = LayoutRect(paintOffset, pixelSnappedSize());
paintBoxShadow(paintInfo, paintRect, style(), Normal);
-
+
// Paint our cell background.
paintBackgroundsBehindCell(paintInfo, paintOffset, this);
@@ -1216,7 +1216,7 @@
RenderTable* tableElt = table();
if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
return;
-
+
paintMaskImages(paintInfo, LayoutRect(paintOffset, pixelSnappedSize()));
}
@@ -1230,7 +1230,7 @@
LayoutUnit scrollbarHeight = scrollbarLogicalHeight();
if (!scrollbarHeight)
return; // Not sure if we should be doing something when a scrollbar goes away or not.
-
+
// We only care if the scrollbar that affects our intrinsic padding has been added.
if ((isHorizontalWritingMode() && !horizontalScrollbarChanged) ||
(!isHorizontalWritingMode() && !verticalScrollbarChanged))
diff --git a/Source/core/rendering/RenderTableCell.h b/Source/core/rendering/RenderTableCell.h
index 933ff4c..14dac60 100644
--- a/Source/core/rendering/RenderTableCell.h
+++ b/Source/core/rendering/RenderTableCell.h
@@ -38,7 +38,7 @@
class RenderTableCell FINAL : public RenderBlock {
public:
explicit RenderTableCell(Element*);
-
+
unsigned colSpan() const
{
if (!m_hasColSpan)
@@ -125,10 +125,10 @@
void paintBackgroundsBehindCell(PaintInfo&, const LayoutPoint&, RenderObject* backgroundObject);
LayoutUnit cellBaselinePosition() const;
- bool isBaselineAligned() const
- {
+ bool isBaselineAligned() const
+ {
EVerticalAlign va = style()->verticalAlign();
- return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB || va == LENGTH;
+ return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB || va == LENGTH;
}
void computeIntrinsicPadding(int rowHeight);
@@ -141,7 +141,7 @@
virtual LayoutUnit paddingBottom() const OVERRIDE;
virtual LayoutUnit paddingLeft() const OVERRIDE;
virtual LayoutUnit paddingRight() const OVERRIDE;
-
+
// FIXME: For now we just assume the cell has the same block flow direction as the table. It's likely we'll
// create an extra anonymous RenderBlock to handle mixing directionality anyway, in which case we can lock
// the block flow directionality of the cells to the table's directionality.
diff --git a/Source/core/rendering/RenderTableRow.cpp b/Source/core/rendering/RenderTableRow.cpp
index 0e559ad..2584b37 100644
--- a/Source/core/rendering/RenderTableRow.cpp
+++ b/Source/core/rendering/RenderTableRow.cpp
@@ -76,7 +76,7 @@
RenderTable* table = this->table();
if (table && !table->selfNeedsLayout() && !table->normalChildNeedsLayout() && oldStyle && oldStyle->border() != style()->border())
table->invalidateCollapsedBorders();
-
+
if (table && oldStyle && diff == StyleDifferenceLayout && needsLayout() && table->collapseBorders() && borderWidthChanged(oldStyle, style())) {
// If the border width changes on a row, we need to make sure the cells in the row know to lay out again.
// This only happens when borders are collapsed, since they end up affecting the border sides of the cell
@@ -135,10 +135,10 @@
addChild(cell, beforeChild);
cell->addChild(child);
return;
- }
+ }
if (beforeChild && beforeChild->parent() != this)
- beforeChild = splitAnonymousBoxesAroundChild(beforeChild);
+ beforeChild = splitAnonymousBoxesAroundChild(beforeChild);
RenderTableCell* cell = toRenderTableCell(child);
@@ -162,7 +162,7 @@
LayoutStateMaintainer statePusher(view(), this, LayoutSize(), style()->isFlippedBlocksWritingMode());
bool paginated = view()->layoutState()->isPaginated();
-
+
for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
if (child->isTableCell()) {
RenderTableCell* cell = toRenderTableCell(child);
diff --git a/Source/core/rendering/RenderTableSection.cpp b/Source/core/rendering/RenderTableSection.cpp
index d8f632d..ac082fe 100644
--- a/Source/core/rendering/RenderTableSection.cpp
+++ b/Source/core/rendering/RenderTableSection.cpp
@@ -35,8 +35,8 @@
#include "core/rendering/RenderTableCol.h"
#include "core/rendering/RenderTableRow.h"
#include "core/rendering/RenderView.h"
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
+#include "wtf/HashSet.h"
+#include "wtf/Vector.h"
using namespace std;
@@ -453,7 +453,7 @@
ASSERT(!needsLayout());
RenderTableCell* cell;
-
+
RenderView* viewRenderer = view();
LayoutStateMaintainer statePusher(viewRenderer);
@@ -1114,7 +1114,7 @@
// avoid crashing on bugs that cause us to paint with dirty layout
if (needsLayout())
return;
-
+
unsigned totalRows = m_grid.size();
unsigned totalCols = table()->columns().size();
@@ -1199,7 +1199,7 @@
CellSpan RenderTableSection::dirtiedRows(const LayoutRect& damageRect) const
{
- if (m_forceSlowPaintPathWithOverflowingCell)
+ if (m_forceSlowPaintPathWithOverflowingCell)
return fullTableRowSpan();
CellSpan coveredRows = spannedRows(damageRect);
@@ -1216,7 +1216,7 @@
CellSpan RenderTableSection::dirtiedColumns(const LayoutRect& damageRect) const
{
- if (m_forceSlowPaintPathWithOverflowingCell)
+ if (m_forceSlowPaintPathWithOverflowingCell)
return fullTableColumnSpan();
CellSpan coveredColumns = spannedColumns(damageRect);
@@ -1455,7 +1455,7 @@
unsigned RenderTableSection::numColumns() const
{
unsigned result = 0;
-
+
for (unsigned r = 0; r < m_grid.size(); ++r) {
for (unsigned c = result; c < table()->numEffCols(); ++c) {
const CellStruct& cell = cellAt(r, c);
@@ -1463,7 +1463,7 @@
result = c;
}
}
-
+
return result + 1;
}
@@ -1596,7 +1596,7 @@
{
if (!table()->collapseBorders())
return;
-
+
for (int side = CBSBefore; side <= CBSEnd; ++side)
m_cellsCollapsedBorders.remove(make_pair(cell, side));
}
diff --git a/Source/core/rendering/RenderTableSection.h b/Source/core/rendering/RenderTableSection.h
index 2807af6..2707d74 100644
--- a/Source/core/rendering/RenderTableSection.h
+++ b/Source/core/rendering/RenderTableSection.h
@@ -26,7 +26,7 @@
#define RenderTableSection_h
#include "core/rendering/RenderTable.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
@@ -86,7 +86,7 @@
typedef Vector<RenderTableCell*, 2> SpanningRenderTableCells;
struct CellStruct {
- Vector<RenderTableCell*, 1> cells;
+ Vector<RenderTableCell*, 1> cells;
bool inColSpan; // true for columns after the first in a colspan
CellStruct()
@@ -212,7 +212,7 @@
{
return createAnonymousWithParentRenderer(parent);
}
-
+
virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
protected:
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
index 1e1ab09..cf91399 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -42,8 +42,8 @@
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/break_lines.h"
-#include <wtf/text/StringBuffer.h>
-#include <wtf/unicode/CharacterNames.h>
+#include "wtf/text/StringBuffer.h"
+#include "wtf/unicode/CharacterNames.h"
using namespace std;
using namespace WTF;
@@ -214,7 +214,7 @@
ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE;
ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE;
- if (needsResetText || oldTransform != newStyle->textTransform() || oldSecurity != newStyle->textSecurity())
+ if (needsResetText || oldTransform != newStyle->textTransform() || oldSecurity != newStyle->textSecurity())
transformText();
}
@@ -344,15 +344,15 @@
void RenderText::absoluteRectsForRange(Vector<IntRect>& rects, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed)
{
// Work around signed/unsigned issues. This function takes unsigneds, and is often passed UINT_MAX
- // to mean "all the way to the end". InlineTextBox coordinates are unsigneds, so changing this
- // function to take ints causes various internal mismatches. But selectionRect takes ints, and
- // passing UINT_MAX to it causes trouble. Ideally we'd change selectionRect to take unsigneds, but
+ // to mean "all the way to the end". InlineTextBox coordinates are unsigneds, so changing this
+ // function to take ints causes various internal mismatches. But selectionRect takes ints, and
+ // passing UINT_MAX to it causes trouble. Ideally we'd change selectionRect to take unsigneds, but
// that would cause many ripple effects, so for now we'll just clamp our unsigned parameters to INT_MAX.
ASSERT(end == UINT_MAX || end <= INT_MAX);
ASSERT(start <= INT_MAX);
start = min(start, static_cast<unsigned>(INT_MAX));
end = min(end, static_cast<unsigned>(INT_MAX));
-
+
for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
// Note: box->end() returns the index of the last character, not the index past it
if (start <= box->start() && box->end() < end) {
@@ -381,26 +381,26 @@
{
if (!box)
return IntRect();
-
+
unsigned short truncation = box->truncation();
if (truncation == cNoTruncation)
return IntRect();
-
+
IntRect rect;
if (EllipsisBox* ellipsis = box->root()->ellipsisBox()) {
int ellipsisStartPosition = max<int>(startPos - box->start(), 0);
int ellipsisEndPosition = min<int>(endPos - box->start(), box->len());
-
+
// The ellipsis should be considered to be selected if the end of
// the selection is past the beginning of the truncation and the
// beginning of the selection is before or at the beginning of the truncation.
if (ellipsisEndPosition >= truncation && ellipsisStartPosition <= truncation)
return ellipsis->selectionRect();
}
-
+
return IntRect();
}
-
+
void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed, ClippingOption option) const
{
for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
@@ -418,7 +418,7 @@
quads.append(localToAbsoluteQuad(boundaries, 0, wasFixed));
}
}
-
+
void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
absoluteQuads(quads, wasFixed, NoClipping);
@@ -427,15 +427,15 @@
void RenderText::absoluteQuadsForRange(Vector<FloatQuad>& quads, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed)
{
// Work around signed/unsigned issues. This function takes unsigneds, and is often passed UINT_MAX
- // to mean "all the way to the end". InlineTextBox coordinates are unsigneds, so changing this
- // function to take ints causes various internal mismatches. But selectionRect takes ints, and
- // passing UINT_MAX to it causes trouble. Ideally we'd change selectionRect to take unsigneds, but
+ // to mean "all the way to the end". InlineTextBox coordinates are unsigneds, so changing this
+ // function to take ints causes various internal mismatches. But selectionRect takes ints, and
+ // passing UINT_MAX to it causes trouble. Ideally we'd change selectionRect to take unsigneds, but
// that would cause many ripple effects, so for now we'll just clamp our unsigned parameters to INT_MAX.
ASSERT(end == UINT_MAX || end <= INT_MAX);
ASSERT(start <= INT_MAX);
start = min(start, static_cast<unsigned>(INT_MAX));
end = min(end, static_cast<unsigned>(INT_MAX));
-
+
for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
// Note: box->end() returns the index of the last character, not the index past it
if (start <= box->start() && box->end() < end) {
@@ -862,7 +862,7 @@
{
if (preferredLogicalWidthsDirty())
const_cast<RenderText*>(this)->computePreferredLogicalWidths(0);
-
+
return m_minWidth;
}
@@ -870,7 +870,7 @@
{
if (preferredLogicalWidthsDirty())
const_cast<RenderText*>(this)->computePreferredLogicalWidths(0);
-
+
return m_maxWidth;
}
@@ -1199,7 +1199,7 @@
}
return true;
}
-
+
bool RenderText::containsOnlyWhitespace(unsigned from, unsigned len) const
{
ASSERT(m_text);
@@ -1225,7 +1225,7 @@
{
return m_firstTextBox ? m_firstTextBox->y() : 0;
}
-
+
void RenderText::setSelectionState(SelectionState state)
{
RenderObject::setSelectionState(state);
@@ -1465,7 +1465,7 @@
setTextInternal(text);
setNeedsLayoutAndPrefWidthsRecalc();
m_knownToHaveNoOverflowAndNoFallbackFonts = false;
-
+
if (AXObjectCache* cache = document()->existingAXObjectCache())
cache->textChanged(this);
}
@@ -1585,7 +1585,7 @@
IntRect RenderText::linesBoundingBox() const
{
IntRect result;
-
+
ASSERT(!firstTextBox() == !lastTextBox()); // Either both are null or both exist.
if (firstTextBox() && lastTextBox()) {
// Return the width of the minimal left side and the maximal right side.
@@ -1597,9 +1597,9 @@
if (curr == firstTextBox() || curr->logicalRight() > logicalRightSide)
logicalRightSide = curr->logicalRight();
}
-
+
bool isHorizontal = style()->isHorizontalWritingMode();
-
+
float x = isHorizontal ? logicalLeftSide : firstTextBox()->x();
float y = isHorizontal ? firstTextBox()->y() : logicalLeftSide;
float width = isHorizontal ? logicalRightSide - logicalLeftSide : lastTextBox()->logicalBottom() - x;
@@ -1622,11 +1622,11 @@
logicalLeftSide = min(logicalLeftSide, curr->logicalLeftVisualOverflow());
logicalRightSide = max(logicalRightSide, curr->logicalRightVisualOverflow());
}
-
+
LayoutUnit logicalTop = firstTextBox()->logicalTopVisualOverflow();
LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide;
LayoutUnit logicalHeight = lastTextBox()->logicalBottomVisualOverflow() - logicalTop;
-
+
LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
if (!style()->isHorizontalWritingMode())
rect = rect.transposedRect();
diff --git a/Source/core/rendering/RenderText.h b/Source/core/rendering/RenderText.h
index 34ce468..4aa1d4c 100644
--- a/Source/core/rendering/RenderText.h
+++ b/Source/core/rendering/RenderText.h
@@ -25,7 +25,7 @@
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderView.h"
-#include <wtf/Forward.h>
+#include "wtf/Forward.h"
namespace WebCore {
@@ -153,14 +153,14 @@
virtual UChar previousCharacter() const;
virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset) const OVERRIDE;
-
+
virtual InlineTextBox* createTextBox(); // Subclassed by SVG.
private:
void computePreferredLogicalWidths(float leadWidth, HashSet<const SimpleFontData*>& fallbackFonts, GlyphOverflow&);
bool computeCanUseSimpleFontCodePath() const;
-
+
// Make length() private so that callers that have a RenderText*
// will use the more efficient textLength() instead, while
// callers with a RenderObject* can continue to use length().
@@ -194,7 +194,7 @@
bool m_canUseSimpleFontCodePath : 1;
mutable bool m_knownToHaveNoOverflowAndNoFallbackFonts : 1;
bool m_needsTranscoding : 1;
-
+
float m_minWidth;
float m_maxWidth;
float m_firstLineMinWidth;
@@ -221,13 +221,13 @@
}
inline RenderText* toRenderText(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isText());
return static_cast<RenderText*>(object);
}
inline const RenderText* toRenderText(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isText());
return static_cast<const RenderText*>(object);
}
diff --git a/Source/core/rendering/RenderTextControl.cpp b/Source/core/rendering/RenderTextControl.cpp
index b32c059..5ca4fd8 100644
--- a/Source/core/rendering/RenderTextControl.cpp
+++ b/Source/core/rendering/RenderTextControl.cpp
@@ -1,6 +1,6 @@
/**
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,7 +26,7 @@
#include "core/platform/ScrollbarTheme.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/RenderTheme.h"
-#include <wtf/unicode/CharacterNames.h>
+#include "wtf/unicode/CharacterNames.h"
using namespace std;
diff --git a/Source/core/rendering/RenderTextControl.h b/Source/core/rendering/RenderTextControl.h
index 13b81a6..e5fd2b7 100644
--- a/Source/core/rendering/RenderTextControl.h
+++ b/Source/core/rendering/RenderTextControl.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -73,7 +73,7 @@
virtual bool avoidsFloats() const { return true; }
virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; }
virtual bool canBeReplacedWithInlineRunIn() const OVERRIDE;
-
+
virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE;
virtual bool canBeProgramaticallyScrolled() const { return true; }
@@ -82,13 +82,13 @@
};
inline RenderTextControl* toRenderTextControl(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTextControl());
return static_cast<RenderTextControl*>(object);
}
inline const RenderTextControl* toRenderTextControl(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTextControl());
return static_cast<const RenderTextControl*>(object);
}
diff --git a/Source/core/rendering/RenderTextControlMultiLine.cpp b/Source/core/rendering/RenderTextControlMultiLine.cpp
index 8a8887d..22e9722 100644
--- a/Source/core/rendering/RenderTextControlMultiLine.cpp
+++ b/Source/core/rendering/RenderTextControlMultiLine.cpp
@@ -1,6 +1,6 @@
/**
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -106,5 +106,5 @@
placeholderBox->setY(borderTop() + paddingTop());
return placeholderRenderer;
}
-
+
}
diff --git a/Source/core/rendering/RenderTextControlMultiLine.h b/Source/core/rendering/RenderTextControlMultiLine.h
index 50c62da..5755f23 100644
--- a/Source/core/rendering/RenderTextControlMultiLine.h
+++ b/Source/core/rendering/RenderTextControlMultiLine.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -49,7 +49,7 @@
};
inline RenderTextControlMultiLine* toRenderTextControlMultiLine(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isTextArea());
return static_cast<RenderTextControlMultiLine*>(object);
}
diff --git a/Source/core/rendering/RenderTextControlSingleLine.cpp b/Source/core/rendering/RenderTextControlSingleLine.cpp
index 81ba019..4c09785 100644
--- a/Source/core/rendering/RenderTextControlSingleLine.cpp
+++ b/Source/core/rendering/RenderTextControlSingleLine.cpp
@@ -1,6 +1,6 @@
/**
* Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
@@ -347,7 +347,7 @@
PassRefPtr<RenderStyle> RenderTextControlSingleLine::createInnerTextStyle(const RenderStyle* startStyle) const
{
- RefPtr<RenderStyle> textBlockStyle = RenderStyle::create();
+ RefPtr<RenderStyle> textBlockStyle = RenderStyle::create();
textBlockStyle->inheritFrom(startStyle);
adjustInnerTextStyle(textBlockStyle.get());
diff --git a/Source/core/rendering/RenderTextControlSingleLine.h b/Source/core/rendering/RenderTextControlSingleLine.h
index 79ce710..91970d6 100644
--- a/Source/core/rendering/RenderTextControlSingleLine.h
+++ b/Source/core/rendering/RenderTextControlSingleLine.h
@@ -74,7 +74,7 @@
virtual float getAvgCharWidth(AtomicString family);
virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const;
virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const OVERRIDE;
-
+
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
virtual RenderStyle* textBaseStyle() const;
diff --git a/Source/core/rendering/RenderTextFragment.h b/Source/core/rendering/RenderTextFragment.h
index e2a4cae..3150616 100644
--- a/Source/core/rendering/RenderTextFragment.h
+++ b/Source/core/rendering/RenderTextFragment.h
@@ -70,13 +70,13 @@
};
inline RenderTextFragment* toRenderTextFragment(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || toRenderText(object)->isTextFragment());
return static_cast<RenderTextFragment*>(object);
}
inline const RenderTextFragment* toRenderTextFragment(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || toRenderText(object)->isTextFragment());
return static_cast<const RenderTextFragment*>(object);
}
diff --git a/Source/core/rendering/RenderTextTrackCue.cpp b/Source/core/rendering/RenderTextTrackCue.cpp
index 694beeb..b55209c 100644
--- a/Source/core/rendering/RenderTextTrackCue.cpp
+++ b/Source/core/rendering/RenderTextTrackCue.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
diff --git a/Source/core/rendering/RenderTextTrackCue.h b/Source/core/rendering/RenderTextTrackCue.h
index 08f106a..850ba80 100644
--- a/Source/core/rendering/RenderTextTrackCue.h
+++ b/Source/core/rendering/RenderTextTrackCue.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderTextTrackCue_h
diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp
index e182a4d..0150f98 100644
--- a/Source/core/rendering/RenderTheme.cpp
+++ b/Source/core/rendering/RenderTheme.cpp
@@ -168,7 +168,7 @@
// Whitespace
if (m_theme->controlRequiresPreWhiteSpace(part))
style->setWhiteSpace(PRE);
-
+
// Width / Height
// The width and height here are affected by the zoom.
// FIXME: Check is flawed, since it doesn't take min-width/max-width into account.
@@ -177,14 +177,14 @@
style->setWidth(controlSize.width());
if (controlSize.height() != style->height())
style->setHeight(controlSize.height());
-
+
// Min-Width / Min-Height
LengthSize minControlSize = m_theme->minimumControlSize(part, style->font(), style->effectiveZoom());
if (minControlSize.width() != style->minWidth())
style->setMinWidth(minControlSize.width());
if (minControlSize.height() != style->minHeight())
style->setMinHeight(minControlSize.height());
-
+
// Font
FontDescription controlFont = m_theme->controlFont(part, style->font(), style->effectiveZoom());
if (controlFont != style->font().fontDescription()) {
diff --git a/Source/core/rendering/RenderThemeChromiumFontProvider.cpp b/Source/core/rendering/RenderThemeChromiumFontProvider.cpp
index fc91a9c..81623a2 100644
--- a/Source/core/rendering/RenderThemeChromiumFontProvider.cpp
+++ b/Source/core/rendering/RenderThemeChromiumFontProvider.cpp
@@ -26,8 +26,8 @@
#include "config.h"
#include "core/rendering/RenderThemeChromiumFontProvider.h"
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp b/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
index c09bbcd..06fec41 100644
--- a/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
+++ b/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
@@ -29,8 +29,8 @@
#include "CSSValueKeywords.h"
#include "core/platform/graphics/FontDescription.h"
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp b/Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp
index a4225c2..e201d90 100644
--- a/Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp
+++ b/Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp
@@ -26,13 +26,13 @@
#include "config.h"
#include "core/rendering/RenderThemeChromiumFontProvider.h"
+#include <windows.h>
+
#include "CSSValueKeywords.h"
#include "core/platform/graphics/FontDescription.h"
#include "core/platform/win/HWndDC.h"
#include "core/platform/win/SystemInfo.h"
-
-#include <windows.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/text/WTFString.h"
#define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(structName, member) \
offsetof(structName, member) + \
diff --git a/Source/core/rendering/RenderThemeChromiumMac.h b/Source/core/rendering/RenderThemeChromiumMac.h
index 1475367..fbbf684 100644
--- a/Source/core/rendering/RenderThemeChromiumMac.h
+++ b/Source/core/rendering/RenderThemeChromiumMac.h
@@ -181,7 +181,7 @@
virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
virtual String extraFullScreenStyleSheet();
-
+
virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
diff --git a/Source/core/rendering/RenderThemeChromiumSkia.cpp b/Source/core/rendering/RenderThemeChromiumSkia.cpp
index 9163e78..ee4f442 100644
--- a/Source/core/rendering/RenderThemeChromiumSkia.cpp
+++ b/Source/core/rendering/RenderThemeChromiumSkia.cpp
@@ -35,8 +35,7 @@
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderProgress.h"
#include "core/rendering/RenderThemeChromiumFontProvider.h"
-
-#include <wtf/CurrentTime.h>
+#include "wtf/CurrentTime.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderThemeChromiumWin.cpp b/Source/core/rendering/RenderThemeChromiumWin.cpp
index e9df8e0..913c856 100644
--- a/Source/core/rendering/RenderThemeChromiumWin.cpp
+++ b/Source/core/rendering/RenderThemeChromiumWin.cpp
@@ -48,7 +48,7 @@
#include "public/platform/WebColor.h"
#include "public/platform/WebRect.h"
#include "public/platform/win/WebThemeEngine.h"
-#include <wtf/CurrentTime.h>
+#include "wtf/CurrentTime.h"
// FIXME: This dependency should eventually be removed.
@@ -339,7 +339,7 @@
static int menuListButtonWidth()
{
- static int width = isRunningLayoutTest() ? kStandardMenuListButtonWidth :
+ static int width = isRunningLayoutTest() ? kStandardMenuListButtonWidth :
IntSize(WebKit::Platform::current()->themeEngine()->getSize(SBP_ARROWBTN)).width();
return width;
}
diff --git a/Source/core/rendering/RenderTreeAsText.cpp b/Source/core/rendering/RenderTreeAsText.cpp
index aa917e8..fc0982c 100644
--- a/Source/core/rendering/RenderTreeAsText.cpp
+++ b/Source/core/rendering/RenderTreeAsText.cpp
@@ -79,12 +79,6 @@
return ts << "(" << p.x() << "," << p.y() << ")";
}
-TextStream& operator<<(TextStream& ts, const LayoutPoint& p)
-{
- // FIXME: These should be printed as floats. Keeping them ints for consistency with pervious test expectations.
- return ts << "(" << p.x().toInt() << "," << p.y().toInt() << ")";
-}
-
TextStream& operator<<(TextStream& ts, const FloatPoint& p)
{
ts << "(" << TextStream::FormatNumberRespectingIntegers(p.x());
@@ -190,7 +184,7 @@
result.append('\\');
result.append('x');
result.append('{');
- appendUnsignedAsHex(c, result);
+ appendUnsignedAsHex(c, result);
result.append('}');
}
}
@@ -222,7 +216,7 @@
ts << " *empty or unstyled AppleStyleSpan*";
}
}
-
+
RenderBlock* cb = o.containingBlock();
bool adjustForTableCells = cb ? cb->isTableCell() : false;
@@ -253,9 +247,7 @@
if (adjustForTableCells)
r.move(0, -toRenderTableCell(o.containingBlock())->intrinsicPaddingBefore());
- // FIXME: Convert layout test results to report sub-pixel values, in the meantime using enclosingIntRect
- // for consistency with old results.
- ts << " " << enclosingIntRect(r);
+ ts << " " << r;
if (!(o.isText() && !o.isBR())) {
if (o.isFileUploadControl())
@@ -271,7 +263,7 @@
if (o.parent()->resolveColor(CSSPropertyBackgroundColor) != backgroundColor
&& backgroundColor.rgb())
ts << " [bgcolor=" << backgroundColor.nameForRenderTreeAsText() << "]";
-
+
Color textFillColor = o.resolveColor(CSSPropertyWebkitTextFillColor);
if (o.parent()->resolveColor(CSSPropertyWebkitTextFillColor) != textFillColor
&& textFillColor != color && textFillColor.rgb())
@@ -389,7 +381,7 @@
ts << ": " << text;
}
}
-
+
if (behavior & RenderAsTextShowIDAndClass) {
if (Node* node = o.node()) {
if (node->hasID())
@@ -407,12 +399,12 @@
}
}
}
-
+
if (behavior & RenderAsTextShowLayoutState) {
bool needsLayout = o.selfNeedsLayout() || o.needsPositionedMovementLayout() || o.posChildNeedsLayout() || o.normalChildNeedsLayout();
if (needsLayout)
ts << " (needs layout:";
-
+
bool havePrevious = false;
if (o.selfNeedsLayout()) {
ts << " self";
@@ -455,7 +447,7 @@
// FIXME: Table cell adjustment is temporary until results can be updated.
if (o.containingBlock()->isTableCell())
y -= toRenderTableCell(o.containingBlock())->intrinsicPaddingBefore();
-
+
ts << "text run at (" << x << "," << y << ") width " << logicalWidth;
if (!run.isLeftToRightDirection() || run.dirOverride()) {
ts << (!run.isLeftToRightDirection() ? " RTL" : " LTR");
@@ -556,10 +548,10 @@
writeIndent(ts, indent);
ts << "layer ";
-
+
if (behavior & RenderAsTextShowAddresses)
ts << static_cast<const void*>(&l) << " ";
-
+
ts << adjustedLayoutBounds;
if (!adjustedLayoutBounds.isEmpty()) {
@@ -586,7 +578,7 @@
ts << " layerType: background only";
else if (paintPhase == LayerPaintPhaseForeground)
ts << " layerType: foreground only";
-
+
if (behavior & RenderAsTextShowCompositedLayers) {
if (l.isComposited())
ts << " (composited, bounds=" << l.backing()->compositedBounds() << ", drawsContent=" << l.backing()->graphicsLayer()->drawsContent() << ", paints into ancestor=" << l.backing()->paintsIntoCompositedAncestor() << ")";
@@ -665,7 +657,7 @@
paintDirtyRect.setHeight(max<LayoutUnit>(paintDirtyRect.height(), rootLayer->renderBox()->layoutOverflowRect().maxY()));
l->setSize(l->size().expandedTo(pixelSnappedIntSize(l->renderBox()->maxLayoutOverflow(), LayoutPoint(0, 0))));
}
-
+
// Calculate the clip rects we should use.
LayoutRect layerBounds;
ClipRect damageRect, clipRectToApply, outlineRect;
@@ -715,7 +707,7 @@
for (unsigned i = 0; i != posList->size(); ++i)
writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, currIndent, behavior);
}
-
+
// Altough the RenderFlowThread requires a layer, it is not collected by its parent,
// so we have to treat it as a special case.
if (l->renderer()->isRenderView()) {
@@ -785,7 +777,7 @@
TextStream ts;
if (!renderer->hasLayer())
return ts.release();
-
+
RenderLayer* layer = renderer->layer();
writeLayers(ts, layer, layer, layer->rect(), 0, behavior);
writeSelection(ts, renderer);
@@ -816,7 +808,7 @@
ASSERT(!(behavior & RenderAsTextPrintingMode));
if (!(behavior & RenderAsTextDontUpdateLayout) && element->document())
element->document()->updateLayout();
-
+
return externalRepresentation(toRenderBox(renderer), behavior | RenderAsTextShowAllLayers);
}
diff --git a/Source/core/rendering/RenderTreeAsText.h b/Source/core/rendering/RenderTreeAsText.h
index 8a24ccd..61bbadb 100644
--- a/Source/core/rendering/RenderTreeAsText.h
+++ b/Source/core/rendering/RenderTreeAsText.h
@@ -27,7 +27,7 @@
#define RenderTreeAsText_h
#include "core/platform/text/TextStream.h"
-#include <wtf/Forward.h>
+#include "wtf/Forward.h"
namespace WebCore {
diff --git a/Source/core/rendering/RenderVideo.cpp b/Source/core/rendering/RenderVideo.cpp
index 6c604cf..580bbf3 100644
--- a/Source/core/rendering/RenderVideo.cpp
+++ b/Source/core/rendering/RenderVideo.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -64,7 +64,7 @@
{
if (videoElement()->shouldDisplayPosterImage())
RenderMedia::intrinsicSizeChanged();
- updateIntrinsicSize();
+ updateIntrinsicSize();
}
void RenderVideo::updateIntrinsicSize()
@@ -83,19 +83,19 @@
setPreferredLogicalWidthsDirty(true);
setNeedsLayout(true);
}
-
+
LayoutSize RenderVideo::calculateIntrinsicSize()
{
HTMLVideoElement* video = videoElement();
-
+
// Spec text from 4.8.6
//
- // The intrinsic width of a video element's playback area is the intrinsic width
- // of the video resource, if that is available; otherwise it is the intrinsic
+ // The intrinsic width of a video element's playback area is the intrinsic width
+ // of the video resource, if that is available; otherwise it is the intrinsic
// width of the poster frame, if that is available; otherwise it is 300 CSS pixels.
//
- // The intrinsic height of a video element's playback area is the intrinsic height
- // of the video resource, if that is available; otherwise it is the intrinsic
+ // The intrinsic height of a video element's playback area is the intrinsic height
+ // of the video resource, if that is available; otherwise it is the intrinsic
// height of the poster frame, if that is available; otherwise it is 150 CSS pixels.
MediaPlayer* player = mediaElement()->player();
if (player && video->readyState() >= HTMLVideoElement::HAVE_METADATA) {
@@ -109,7 +109,7 @@
// When the natural size of the video is unavailable, we use the provided
// width and height attributes of the video element as the intrinsic size until
- // better values become available.
+ // better values become available.
if (video->hasAttribute(widthAttr) && video->hasAttribute(heightAttr))
return LayoutSize(video->width(), video->height());
@@ -253,9 +253,9 @@
return RenderReplaced::computeReplacedLogicalHeight();
}
-LayoutUnit RenderVideo::minimumReplacedHeight() const
+LayoutUnit RenderVideo::minimumReplacedHeight() const
{
- return RenderReplaced::minimumReplacedHeight();
+ return RenderReplaced::minimumReplacedHeight();
}
bool RenderVideo::supportsAcceleratedRendering() const
@@ -272,11 +272,11 @@
RenderObject* parent = renderer->parent();
if (!parent)
return 0;
-
+
RenderFullScreen* fullScreen = parent->isRenderFullScreen() ? toRenderFullScreen(parent) : 0;
if (!fullScreen)
return 0;
-
+
return fullScreen->placeholder();
}
diff --git a/Source/core/rendering/RenderVideo.h b/Source/core/rendering/RenderVideo.h
index 53b7380..03eeb2c 100644
--- a/Source/core/rendering/RenderVideo.h
+++ b/Source/core/rendering/RenderVideo.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef RenderVideo_h
@@ -29,7 +29,7 @@
#include "core/rendering/RenderMedia.h"
namespace WebCore {
-
+
class HTMLMediaElement;
class HTMLVideoElement;
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 89e7169..8bfcbf2 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -63,12 +63,12 @@
{
// init RenderObject attributes
setInline(false);
-
+
m_minPreferredLogicalWidth = 0;
m_maxPreferredLogicalWidth = 0;
setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
-
+
setPositionState(AbsolutePosition); // to 0,0 :)
}
@@ -172,13 +172,13 @@
// FIXME: May be better to push a clip and avoid issuing offscreen repaints.
state.m_clipped = false;
-
+
// Check the writing mode of the seamless ancestor. It has to match our document's writing mode, or we won't inherit any
// pagination information.
RenderBox* seamlessAncestor = enclosingSeamlessRenderer(document());
LayoutState* seamlessLayoutState = seamlessAncestor ? seamlessAncestor->view()->layoutState() : 0;
bool shouldInheritPagination = seamlessLayoutState && !m_pageLogicalHeight && seamlessAncestor->style()->writingMode() == style()->writingMode();
-
+
state.m_pageLogicalHeight = shouldInheritPagination ? seamlessLayoutState->m_pageLogicalHeight : m_pageLogicalHeight;
state.m_pageLogicalHeightChanged = shouldInheritPagination ? seamlessLayoutState->m_pageLogicalHeightChanged : m_pageLogicalHeightChanged;
state.m_isPaginated = state.m_pageLogicalHeight;
@@ -192,10 +192,10 @@
seamlessAncestor->borderRight() + seamlessAncestor->paddingRight()),
layoutOffset.height() + seamlessAncestor->y() + (!isFlipped ? seamlessAncestor->borderTop() + seamlessAncestor->paddingTop() :
seamlessAncestor->borderBottom() + seamlessAncestor->paddingBottom()));
-
+
LayoutSize offsetDelta = seamlessLayoutState->m_pageOffset - iFrameOffset;
state.m_pageOffset = offsetDelta;
-
+
// Set the current render flow thread to point to our ancestor. This will allow the seamless document to locate the correct
// regions when doing a layout.
if (seamlessAncestor->flowThreadContainingBlock()) {
@@ -212,7 +212,7 @@
// The algorithm below assumes this is a full layout. In case there are previously computed values for regions, supplemental steps are taken
// to ensure the results are the same as those obtained from a full layout (i.e. the auto-height regions from all the flows are marked as needing
// layout).
-// 1. The flows are laid out from the outer flow to the inner flow. This successfully computes the outer non-auto-height regions size so the
+// 1. The flows are laid out from the outer flow to the inner flow. This successfully computes the outer non-auto-height regions size so the
// inner flows have the necessary information to correctly fragment the content.
// 2. The flows are laid out from the inner flow to the outer flow. After an inner flow is laid out it goes into the constrained layout phase
// and marks the auto-height regions they need layout. This means the outer flows will relayout if they depend on regions with auto-height regions
@@ -294,7 +294,7 @@
#endif
m_layoutState = 0;
setNeedsLayout(false);
-
+
if (isSeamlessAncestorInFlowThread)
flowThreadController()->setCurrentRenderFlowThread(0);
}
@@ -308,7 +308,7 @@
getTransformFromContainer(0, LayoutSize(), t);
transformState.applyTransform(t);
}
-
+
if (mode & IsFixed && m_frameView)
transformState.move(m_frameView->scrollOffsetForFixedPosition());
@@ -422,13 +422,13 @@
{
if (!rootObject)
return false;
-
+
RenderStyle* style = rootObject->style();
if (style->visibility() != VISIBLE
|| style->opacity() != 1
|| style->hasTransform())
return false;
-
+
if (isComposited(rootObject))
return false;
@@ -475,7 +475,7 @@
rootFillsViewport = rootBox && !rootBox->x() && !rootBox->y() && rootBox->width() >= width() && rootBox->height() >= height();
rootObscuresBackground = rendererObscuresBackground(rootRenderer);
}
-
+
Page* page = document()->page();
float pageScaleFactor = page ? page->pageScaleFactor() : 1;
@@ -485,7 +485,7 @@
// This code typically only executes if the root element's visibility has been set to hidden,
// if there is a transform on the <html>, or if there is a page scale factor less than 1.
- // Only fill with the base background color (typically white) if we're the root document,
+ // Only fill with the base background color (typically white) if we're the root document,
// since iframes/frames with no background in the child document should show the parent's background.
if (frameView()->isTransparent()) // FIXME: This needs to be dynamic. We should be able to go back to blitting if we ever stop being transparent.
frameView()->setCannotBlitToWindow(); // The parent must show behind the child.
@@ -528,7 +528,7 @@
else if (RenderBox* obj = elt->renderBox()) {
LayoutRect vr = viewRect();
LayoutRect r = intersection(ur, vr);
-
+
// Subtract out the contentsX and contentsY offsets to get our coords within the viewing
// rectangle.
r.moveBy(-vr.location());
@@ -545,7 +545,7 @@
return;
repaintViewRectangle(ur);
-
+
if (compositor()->inCompositingMode()) {
IntRect repaintRect = pixelSnappedIntRect(ur);
compositor()->repaintCompositedLayers(&repaintRect);
@@ -555,7 +555,7 @@
void RenderView::repaintViewAndCompositedLayers()
{
repaint();
-
+
if (compositor()->inCompositingMode())
compositor()->repaintCompositedLayers();
}
@@ -580,7 +580,7 @@
if (fixed && m_frameView)
rect.move(m_frameView->scrollOffsetForFixedPosition());
-
+
// Apply our transform if we have one (because of full page zooming).
if (!repaintContainer && layer() && layer()->transform())
rect = layer()->transform()->mapRect(rect);
@@ -642,7 +642,7 @@
LayoutRect currRect = info->rect();
if (RenderLayerModelObject* repaintContainer = info->repaintContainer()) {
FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(currRect));
- currRect = absQuad.enclosingBoundingBox();
+ currRect = absQuad.enclosingBoundingBox();
}
selRect.unite(currRect);
}
@@ -884,7 +884,7 @@
renderWidgets.uncheckedAppend(*it);
(*it)->ref();
}
-
+
return size;
}
@@ -900,11 +900,11 @@
{
// updateWidgetPosition() can possibly cause layout to be re-entered (via plug-ins running
// scripts in response to NPP_SetWindow, for example), so we need to keep the Widgets
- // alive during enumeration.
+ // alive during enumeration.
Vector<RenderWidget*> renderWidgets;
size_t size = getRetainedWidgets(renderWidgets);
-
+
for (size_t i = 0; i < size; ++i)
renderWidgets[i]->updateWidgetPosition();
@@ -1132,7 +1132,7 @@
if (layoutState)
layoutState->m_isPaginated = false;
-
+
if (m_flowThreadState != RenderObject::NotInsideFlowThread)
m_root->setFlowThreadStateIncludingDescendants(RenderObject::NotInsideFlowThread);
}
@@ -1149,7 +1149,7 @@
if (layoutState)
layoutState->m_isPaginated = m_fragmenting;
-
+
if (m_flowThreadState != RenderObject::NotInsideFlowThread)
m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
}
diff --git a/Source/core/rendering/RenderView.h b/Source/core/rendering/RenderView.h
index cc36421..33846ef 100644
--- a/Source/core/rendering/RenderView.h
+++ b/Source/core/rendering/RenderView.h
@@ -26,7 +26,7 @@
#include "core/platform/PODFreeListArena.h"
#include "core/rendering/LayoutState.h"
#include "core/rendering/RenderBlock.h"
-#include <wtf/OwnPtr.h>
+#include "wtf/OwnPtr.h"
namespace WebCore {
@@ -105,7 +105,7 @@
void updateWidgetPositions();
void addWidget(RenderWidget*);
void removeWidget(RenderWidget*);
-
+
// layoutDelta is used transiently during layout to store how far an object has moved from its
// last layout location, in order to repaint correctly.
// If we're doing a full repaint m_layoutState will be 0, but in that case layoutDelta doesn't matter.
@@ -113,7 +113,7 @@
{
return m_layoutState ? m_layoutState->m_layoutDelta : LayoutSize();
}
- void addLayoutDelta(const LayoutSize& delta)
+ void addLayoutDelta(const LayoutSize& delta)
{
if (m_layoutState) {
m_layoutState->m_layoutDelta += delta;
@@ -123,7 +123,7 @@
#endif
}
}
-
+
#if !ASSERT_DISABLED
bool layoutDeltaMatches(const LayoutSize& delta)
{
@@ -171,7 +171,7 @@
// Renderer that paints the root background has background-images which all have background-attachment: fixed.
bool rootBackgroundIsEntirelyFixed() const;
-
+
bool hasRenderNamedFlowThreads() const;
bool checkTwoPassLayoutForAutoHeightRegions() const;
FlowThreadController* flowThreadController();
@@ -196,7 +196,7 @@
void addRenderCounter() { m_renderCounterCount++; }
void removeRenderCounter() { ASSERT(m_renderCounterCount > 0); m_renderCounterCount--; }
bool hasRenderCounters() { return m_renderCounterCount; }
-
+
virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE;
virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE FINAL;
@@ -207,7 +207,7 @@
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const;
virtual bool requiresColumns(int desiredColumnCount) const OVERRIDE;
virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const OVERRIDE;
-
+
private:
bool initializeLayoutState(LayoutState&);
@@ -254,7 +254,7 @@
size_t getRetainedWidgets(Vector<RenderWidget*>&);
void releaseWidgets(Vector<RenderWidget*>&);
-
+
friend class LayoutStateMaintainer;
friend class LayoutStateDisabler;
@@ -322,7 +322,7 @@
{
push(root, offset, pageHeight, pageHeightChanged, colInfo);
}
-
+
// ctor to maybe push later
LayoutStateMaintainer(RenderView* view)
: m_view(view)
@@ -357,7 +357,7 @@
if (m_disabled)
m_view->enableLayoutState();
}
-
+
m_didEnd = true;
}
}
diff --git a/Source/core/rendering/RenderWidget.cpp b/Source/core/rendering/RenderWidget.cpp
index 2d76543..99e30dd 100644
--- a/Source/core/rendering/RenderWidget.cpp
+++ b/Source/core/rendering/RenderWidget.cpp
@@ -97,7 +97,7 @@
{
if (RenderView* v = view())
v->removeWidget(this);
-
+
if (AXObjectCache* cache = document()->existingAXObjectCache()) {
cache->childrenChanged(this->parent());
cache->remove(this);
@@ -154,7 +154,7 @@
if (clipChanged && !boundsChanged)
m_widget->clipRectChanged();
-
+
if (hasLayer() && layer()->isComposited())
layer()->backing()->updateAfterWidgetResize();
@@ -330,7 +330,7 @@
return;
bool boundsChanged = updateWidgetGeometry();
-
+
// if the frame bounds got changed, or if view needs layout (possibly indicating
// content size is wrong) we have to do a layout to set the right widget size
if (m_widget && m_widget->isFrameView()) {
diff --git a/Source/core/rendering/RenderWidget.h b/Source/core/rendering/RenderWidget.h
index 3e6d1a3..3f4e572 100644
--- a/Source/core/rendering/RenderWidget.h
+++ b/Source/core/rendering/RenderWidget.h
@@ -53,7 +53,7 @@
static unsigned s_widgetHierarchyUpdateSuspendCount;
};
-
+
class RenderWidget : public RenderReplaced, private OverlapTestRequestClient {
public:
virtual ~RenderWidget();
diff --git a/Source/core/rendering/RenderWordBreak.cpp b/Source/core/rendering/RenderWordBreak.cpp
index 297c4d6..e852822 100644
--- a/Source/core/rendering/RenderWordBreak.cpp
+++ b/Source/core/rendering/RenderWordBreak.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
diff --git a/Source/core/rendering/RenderWordBreak.h b/Source/core/rendering/RenderWordBreak.h
index 24f3773..acf3c60 100644
--- a/Source/core/rendering/RenderWordBreak.h
+++ b/Source/core/rendering/RenderWordBreak.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
diff --git a/Source/core/rendering/RootInlineBox.cpp b/Source/core/rendering/RootInlineBox.cpp
index b2e5a31..fa1def2 100644
--- a/Source/core/rendering/RootInlineBox.cpp
+++ b/Source/core/rendering/RootInlineBox.cpp
@@ -36,12 +36,12 @@
#include "core/rendering/RenderFlowThread.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/VerticalPositionCache.h"
-#include <wtf/unicode/Unicode.h>
+#include "wtf/unicode/Unicode.h"
using namespace std;
namespace WebCore {
-
+
struct SameSizeAsRootInlineBox : public InlineFlowBox {
unsigned variables[5];
void* pointers[4];
@@ -135,7 +135,7 @@
EllipsisBox* ellipsisBox = new (renderer()->renderArena()) EllipsisBox(renderer(), ellipsisStr, this,
ellipsisWidth - (markupBox ? markupBox->logicalWidth() : 0), logicalHeight(),
y(), !prevRootBox(), isHorizontal(), markupBox);
-
+
if (!gEllipsisBoxMap)
gEllipsisBoxMap = new EllipsisBoxMap();
gEllipsisBoxMap->add(this, ellipsisBox);
@@ -273,7 +273,7 @@
lineTopIncludingMargins, lineBottomIncludingMargins, hasAnnotationsBefore, hasAnnotationsAfter, baselineType());
m_hasAnnotationsBefore = hasAnnotationsBefore;
m_hasAnnotationsAfter = hasAnnotationsAfter;
-
+
maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessary?
setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight);
@@ -354,7 +354,7 @@
RootInlineBox* lineGridBox = lineGrid->lineGridBox();
if (!lineGridBox)
return 0;
-
+
LayoutUnit lineGridBlockOffset = lineGrid->isHorizontalWritingMode() ? lineGridOffset.height() : lineGridOffset.width();
LayoutUnit blockOffset = block()->isHorizontalWritingMode() ? layoutState->layoutOffset().height() : layoutState->layoutOffset().width();
@@ -417,17 +417,17 @@
// If we aren't paginated we can return the result.
if (!layoutState->isPaginated() || !layoutState->pageLogicalHeight() || result == delta)
return result;
-
+
// We may end up shifted to a new page. We need to do a re-snap when that happens.
LayoutUnit newPageLogicalTop = block()->pageLogicalTopForOffset(lineBottomWithLeading() + result);
if (newPageLogicalTop == pageLogicalTop)
return result;
-
+
// Put ourselves at the top of the next page to force a snap onto the new grid established by that page.
return lineSnapAdjustment(newPageLogicalTop - (blockOffset + lineTopWithLeading()));
}
-GapRects RootInlineBox::lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
+GapRects RootInlineBox::lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
LayoutUnit selTop, LayoutUnit selHeight, const PaintInfo* paintInfo)
{
RenderObject::SelectionState lineState = selectionState();
@@ -659,7 +659,7 @@
}
BidiStatus RootInlineBox::lineBreakBidiStatus() const
-{
+{
return BidiStatus(static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusEor), static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLastStrong), static_cast<WTF::Unicode::Direction>(m_lineBreakBidiStatusLast), m_lineBreakContext);
}
@@ -700,7 +700,7 @@
LayoutRect lineLayoutOverflow = layoutOverflowRect(lineTop(), lineBottom());
if (!endPadding)
return lineLayoutOverflow;
-
+
// FIXME: Audit whether to use pixel snapped values when not using integers for layout: https://bugs.webkit.org/show_bug.cgi?id=63656
if (isHorizontal()) {
if (isLeftToRightDirection())
@@ -713,7 +713,7 @@
else
lineLayoutOverflow.shiftYEdgeTo(min<LayoutUnit>(lineLayoutOverflow.y(), pixelSnappedLogicalLeft() - endPadding));
}
-
+
return lineLayoutOverflow;
}
@@ -740,7 +740,7 @@
if (renderer()->style(isFirstLineStyle())->lineBoxContain() & LineBoxContainReplaced) {
ascent = box->baselinePosition(baselineType());
descent = box->lineHeight() - ascent;
-
+
// Replaced elements always affect both the ascent and descent.
affectsAscent = true;
affectsDescent = true;
@@ -755,10 +755,10 @@
usedFonts = it == textBoxDataMap.end() ? 0 : &it->value.first;
glyphOverflow = it == textBoxDataMap.end() ? 0 : &it->value.second;
}
-
+
bool includeLeading = includeLeadingForBox(box);
bool includeFont = includeFontForBox(box);
-
+
bool setUsedFont = false;
bool setUsedFontWithLeading = false;
@@ -791,27 +791,27 @@
int ascentWithLeading = box->baselinePosition(baselineType());
int descentWithLeading = box->lineHeight() - ascentWithLeading;
setAscentAndDescent(ascent, descent, ascentWithLeading, descentWithLeading, ascentDescentSet);
-
+
// Examine the font box for inline flows and text boxes to see if any part of it is above the baseline.
// If the top of our font box relative to the root box baseline is above the root box baseline, then
// we are contributing to the maxAscent value. Descent is similar. If any part of our font box is below
// the root box's baseline, then we contribute to the maxDescent value.
affectsAscent = ascentWithLeading - box->logicalTop() > 0;
- affectsDescent = descentWithLeading + box->logicalTop() > 0;
+ affectsDescent = descentWithLeading + box->logicalTop() > 0;
}
-
+
if (includeFontForBox(box) && !setUsedFont) {
int fontAscent = box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent(baselineType());
int fontDescent = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType());
setAscentAndDescent(ascent, descent, fontAscent, fontDescent, ascentDescentSet);
affectsAscent = fontAscent - box->logicalTop() > 0;
- affectsDescent = fontDescent + box->logicalTop() > 0;
+ affectsDescent = fontDescent + box->logicalTop() > 0;
}
if (includeGlyphsForBox(box) && glyphOverflow && glyphOverflow->computeBounds) {
setAscentAndDescent(ascent, descent, glyphOverflow->top, glyphOverflow->bottom, ascentDescentSet);
affectsAscent = glyphOverflow->top - box->logicalTop() > 0;
- affectsDescent = glyphOverflow->bottom + box->logicalTop() > 0;
+ affectsDescent = glyphOverflow->bottom + box->logicalTop() > 0;
glyphOverflow->top = min(glyphOverflow->top, max(0, glyphOverflow->top - box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent(baselineType())));
glyphOverflow->bottom = min(glyphOverflow->bottom, max(0, glyphOverflow->bottom - box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType())));
}
@@ -824,7 +824,7 @@
descentWithMargin += box->boxModelObject()->borderAfter() + box->boxModelObject()->paddingAfter() + box->boxModelObject()->marginAfter();
}
setAscentAndDescent(ascent, descent, ascentWithMargin, descentWithMargin, ascentDescentSet);
-
+
// Treat like a replaced element, since we're using the margin box.
affectsAscent = true;
affectsDescent = true;
@@ -835,7 +835,7 @@
{
if (box->renderer()->isText())
return box->parent()->logicalTop();
-
+
RenderBoxModelObject* renderer = box->boxModelObject();
ASSERT(renderer->isInline());
if (!renderer->isInline())
@@ -858,11 +858,11 @@
EVerticalAlign verticalAlign = renderer->style()->verticalAlign();
if (verticalAlign == TOP || verticalAlign == BOTTOM)
return 0;
-
+
RenderObject* parent = renderer->parent();
if (parent->isRenderInline() && parent->style()->verticalAlign() != TOP && parent->style()->verticalAlign() != BOTTOM)
verticalPosition = box->parent()->logicalTop();
-
+
if (verticalAlign != BASELINE) {
const Font& font = parent->style(firstLine)->font();
const FontMetrics& fontMetrics = font.fontMetrics();
@@ -916,7 +916,7 @@
{
if (box->renderer()->isReplaced() || (box->renderer()->isText() && !box->isText()))
return false;
-
+
if (!box->isText() && box->isInlineFlowBox() && !toInlineFlowBox(box)->hasTextChildren())
return false;
@@ -929,7 +929,7 @@
{
if (box->renderer()->isReplaced() || (box->renderer()->isText() && !box->isText()))
return false;
-
+
if (!box->isText() && box->isInlineFlowBox() && !toInlineFlowBox(box)->hasTextChildren())
return false;
@@ -974,12 +974,12 @@
startBox = 0;
return 0;
}
-
+
Node* RootInlineBox::getLogicalEndBoxWithNode(InlineBox*& endBox) const
{
Vector<InlineBox*> leafBoxesInLogicalOrder;
collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder);
- for (size_t i = leafBoxesInLogicalOrder.size(); i > 0; --i) {
+ for (size_t i = leafBoxesInLogicalOrder.size(); i > 0; --i) {
if (leafBoxesInLogicalOrder[i - 1]->renderer()->node()) {
endBox = leafBoxesInLogicalOrder[i - 1];
return endBox->renderer()->node();
diff --git a/Source/core/rendering/RootInlineBox.h b/Source/core/rendering/RootInlineBox.h
index 130744c..5cf5e68 100644
--- a/Source/core/rendering/RootInlineBox.h
+++ b/Source/core/rendering/RootInlineBox.h
@@ -53,7 +53,7 @@
LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; }
LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; }
-
+
LayoutUnit paginationStrut() const { return m_fragmentationData ? m_fragmentationData->m_paginationStrut : LayoutUnit(0); }
void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m_paginationStrut = strut; }
@@ -77,8 +77,8 @@
LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&);
void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom, LayoutUnit topWithLeading, LayoutUnit bottomWithLeading)
- {
- m_lineTop = top;
+ {
+ m_lineTop = top;
m_lineBottom = bottom;
m_lineTopWithLeading = topWithLeading;
m_lineBottomWithLeading = bottomWithLeading;
@@ -147,7 +147,7 @@
virtual void extractLineBoxFromRenderObject() OVERRIDE FINAL;
virtual void attachLineBoxToRenderObject() OVERRIDE FINAL;
virtual void removeLineBoxFromRenderObject() OVERRIDE FINAL;
-
+
FontBaseline baselineType() const { return static_cast<FontBaseline>(m_baselineType); }
bool hasAnnotationsBefore() const { return m_hasAnnotationsBefore; }
@@ -163,7 +163,7 @@
bool includeMarginForBox(InlineBox*) const;
bool fitsToGlyphs() const;
bool includesRootLineBoxFontOrLeading() const;
-
+
LayoutUnit logicalTopVisualOverflow() const
{
return InlineFlowBox::logicalTopVisualOverflow(lineTop());
diff --git a/Source/core/rendering/ScrollBehavior.h b/Source/core/rendering/ScrollBehavior.h
index 390c68a..5988f62 100644
--- a/Source/core/rendering/ScrollBehavior.h
+++ b/Source/core/rendering/ScrollBehavior.h
@@ -50,7 +50,7 @@
noScroll,
alignCenter,
alignTop,
- alignBottom,
+ alignBottom,
alignLeft,
alignRight,
alignToClosestEdge
diff --git a/Source/core/rendering/TableLayout.h b/Source/core/rendering/TableLayout.h
index 9b6e1e2..42be53d 100644
--- a/Source/core/rendering/TableLayout.h
+++ b/Source/core/rendering/TableLayout.h
@@ -21,8 +21,8 @@
#ifndef TableLayout_h
#define TableLayout_h
-#include <wtf/FastAllocBase.h>
-#include <wtf/Noncopyable.h>
+#include "wtf/FastAllocBase.h"
+#include "wtf/Noncopyable.h"
namespace WebCore {
diff --git a/Source/core/rendering/TextAutosizer.cpp b/Source/core/rendering/TextAutosizer.cpp
index d14ba17..c26dfbd 100644
--- a/Source/core/rendering/TextAutosizer.cpp
+++ b/Source/core/rendering/TextAutosizer.cpp
@@ -19,9 +19,10 @@
*/
#include "config.h"
-
#include "core/rendering/TextAutosizer.h"
+#include <algorithm>
+
#include "core/dom/Document.h"
#include "core/html/HTMLElement.h"
#include "core/inspector/InspectorInstrumentation.h"
@@ -34,10 +35,8 @@
#include "core/rendering/RenderView.h"
#include "core/rendering/style/RenderStyle.h"
#include "core/rendering/style/StyleInheritedData.h"
-
-#include <algorithm>
-#include <wtf/StdLibExtras.h>
-#include <wtf/Vector.h>
+#include "wtf/StdLibExtras.h"
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/TextAutosizer.h b/Source/core/rendering/TextAutosizer.h
index d1beecd..7adcbc5 100644
--- a/Source/core/rendering/TextAutosizer.h
+++ b/Source/core/rendering/TextAutosizer.h
@@ -28,8 +28,8 @@
#include "HTMLNames.h"
#include "core/platform/text/WritingMode.h"
-#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
+#include "wtf/Noncopyable.h"
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/VerticalPositionCache.h b/Source/core/rendering/VerticalPositionCache.h
index d853ca8..9b65ed9 100644
--- a/Source/core/rendering/VerticalPositionCache.h
+++ b/Source/core/rendering/VerticalPositionCache.h
@@ -27,7 +27,7 @@
#define VerticalPositionCache_h
#include "core/platform/graphics/FontBaseline.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
namespace WebCore {
@@ -41,7 +41,7 @@
public:
VerticalPositionCache()
{ }
-
+
int get(RenderObject* renderer, FontBaseline baselineType) const
{
const HashMap<RenderObject*, int>& mapToCheck = baselineType == AlphabeticBaseline ? m_alphabeticPositions : m_ideographicPositions;
@@ -50,7 +50,7 @@
return PositionUndefined;
return it->value;
}
-
+
void set(RenderObject* renderer, FontBaseline baselineType, int position)
{
if (baselineType == AlphabeticBaseline)
diff --git a/Source/core/rendering/break_lines.cpp b/Source/core/rendering/break_lines.cpp
index 471e58b..d1ab913 100644
--- a/Source/core/rendering/break_lines.cpp
+++ b/Source/core/rendering/break_lines.cpp
@@ -28,9 +28,9 @@
#include "core/rendering/break_lines.h"
#include "core/platform/text/TextBreakIterator.h"
-#include <wtf/ASCIICType.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/unicode/CharacterNames.h>
+#include "wtf/ASCIICType.h"
+#include "wtf/StdLibExtras.h"
+#include "wtf/unicode/CharacterNames.h"
namespace WebCore {
diff --git a/Source/core/rendering/break_lines.h b/Source/core/rendering/break_lines.h
index 072bc8d..3e0b131 100644
--- a/Source/core/rendering/break_lines.h
+++ b/Source/core/rendering/break_lines.h
@@ -21,7 +21,7 @@
#ifndef break_lines_h
#define break_lines_h
-#include <wtf/unicode/Unicode.h>
+#include "wtf/unicode/Unicode.h"
namespace WebCore {
diff --git a/Source/core/rendering/shapes/ShapeOutsideInfo.cpp b/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
index a3a004e..76f52dd 100644
--- a/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
+++ b/Source/core/rendering/shapes/ShapeOutsideInfo.cpp
@@ -39,6 +39,12 @@
return box->isFloatingWithShapeOutside() && value->type() == ShapeValue::Shape && value->shape();
}
+bool ShapeOutsideInfo::computeSegmentsForContainingBlockLine(LayoutUnit lineTop, LayoutUnit floatTop, LayoutUnit lineHeight)
+{
+ LayoutUnit lineTopInShapeCoordinates = lineTop - floatTop + logicalTopOffset();
+ return computeSegmentsForLine(lineTopInShapeCoordinates, lineHeight);
+}
+
bool ShapeOutsideInfo::computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight)
{
if (shapeSizeDirty() || m_lineTop != lineTop || m_lineHeight != lineHeight) {
diff --git a/Source/core/rendering/shapes/ShapeOutsideInfo.h b/Source/core/rendering/shapes/ShapeOutsideInfo.h
index 9bc3dcc..21e8380 100644
--- a/Source/core/rendering/shapes/ShapeOutsideInfo.h
+++ b/Source/core/rendering/shapes/ShapeOutsideInfo.h
@@ -42,6 +42,7 @@
LayoutUnit leftSegmentMarginBoxDelta() const { return m_leftSegmentMarginBoxDelta; }
LayoutUnit rightSegmentMarginBoxDelta() const { return m_rightSegmentMarginBoxDelta; }
+ bool computeSegmentsForContainingBlockLine(LayoutUnit lineTop, LayoutUnit floatTop, LayoutUnit lineHeight);
virtual bool computeSegmentsForLine(LayoutUnit lineTop, LayoutUnit lineHeight) OVERRIDE;
static PassOwnPtr<ShapeOutsideInfo> createInfo(const RenderBox* renderer) { return adoptPtr(new ShapeOutsideInfo(renderer)); }
diff --git a/Source/core/rendering/style/BasicShapes.cpp b/Source/core/rendering/style/BasicShapes.cpp
index 1f3ce3e..559bfe6 100644
--- a/Source/core/rendering/style/BasicShapes.cpp
+++ b/Source/core/rendering/style/BasicShapes.cpp
@@ -142,7 +142,7 @@
ASSERT(path.isEmpty());
ASSERT(!(m_values.size() % 2));
size_t length = m_values.size();
-
+
if (!length)
return;
diff --git a/Source/core/rendering/style/BasicShapes.h b/Source/core/rendering/style/BasicShapes.h
index 0f69c52..3cf6301 100644
--- a/Source/core/rendering/style/BasicShapes.h
+++ b/Source/core/rendering/style/BasicShapes.h
@@ -32,9 +32,9 @@
#include "core/platform/Length.h"
#include "core/platform/graphics/WindRule.h"
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/BorderData.h b/Source/core/rendering/style/BorderData.h
index 4ae8ee4..6c47601 100644
--- a/Source/core/rendering/style/BorderData.h
+++ b/Source/core/rendering/style/BorderData.h
@@ -59,53 +59,53 @@
return true;
return false;
}
-
+
unsigned borderLeftWidth() const
{
if (!m_image.hasImage() && (m_left.style() == BNONE || m_left.style() == BHIDDEN))
- return 0;
+ return 0;
return m_left.width();
}
-
+
unsigned borderRightWidth() const
{
if (!m_image.hasImage() && (m_right.style() == BNONE || m_right.style() == BHIDDEN))
return 0;
return m_right.width();
}
-
+
unsigned borderTopWidth() const
{
if (!m_image.hasImage() && (m_top.style() == BNONE || m_top.style() == BHIDDEN))
return 0;
return m_top.width();
}
-
+
unsigned borderBottomWidth() const
{
if (!m_image.hasImage() && (m_bottom.style() == BNONE || m_bottom.style() == BHIDDEN))
return 0;
return m_bottom.width();
}
-
+
bool operator==(const BorderData& o) const
{
return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && m_bottom == o.m_bottom && m_image == o.m_image
&& m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && m_bottomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight;
}
-
+
bool operator!=(const BorderData& o) const
{
return !(*this == o);
}
-
+
const BorderValue& left() const { return m_left; }
const BorderValue& right() const { return m_right; }
const BorderValue& top() const { return m_top; }
const BorderValue& bottom() const { return m_bottom; }
-
+
const NinePieceImage& image() const { return m_image; }
-
+
const LengthSize& topLeft() const { return m_topLeft; }
const LengthSize& topRight() const { return m_topRight; }
const LengthSize& bottomLeft() const { return m_bottomLeft; }
diff --git a/Source/core/rendering/style/ContentData.cpp b/Source/core/rendering/style/ContentData.cpp
index a11d0aa..dd052ba 100644
--- a/Source/core/rendering/style/ContentData.cpp
+++ b/Source/core/rendering/style/ContentData.cpp
@@ -55,14 +55,14 @@
PassOwnPtr<ContentData> ContentData::clone() const
{
OwnPtr<ContentData> result = cloneInternal();
-
+
ContentData* lastNewData = result.get();
for (const ContentData* contentData = next(); contentData; contentData = contentData->next()) {
OwnPtr<ContentData> newData = contentData->cloneInternal();
lastNewData->setNext(newData.release());
lastNewData = lastNewData->next();
}
-
+
return result.release();
}
diff --git a/Source/core/rendering/style/ContentData.h b/Source/core/rendering/style/ContentData.h
index e93bff3..00053a7 100644
--- a/Source/core/rendering/style/ContentData.h
+++ b/Source/core/rendering/style/ContentData.h
@@ -27,8 +27,8 @@
#include "core/rendering/style/CounterContent.h"
#include "core/rendering/style/StyleImage.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
@@ -43,7 +43,7 @@
static PassOwnPtr<ContentData> create(const String&);
static PassOwnPtr<ContentData> create(PassOwnPtr<CounterContent>);
static PassOwnPtr<ContentData> create(QuoteType);
-
+
virtual ~ContentData() { }
virtual bool isCounter() const { return false; }
diff --git a/Source/core/rendering/style/CounterContent.h b/Source/core/rendering/style/CounterContent.h
index 571956e..d47056c 100644
--- a/Source/core/rendering/style/CounterContent.h
+++ b/Source/core/rendering/style/CounterContent.h
@@ -26,7 +26,7 @@
#define CounterContent_h
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/text/AtomicString.h>
+#include "wtf/text/AtomicString.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/CounterDirectives.cpp b/Source/core/rendering/style/CounterDirectives.cpp
index a2913be..f2097dc 100644
--- a/Source/core/rendering/style/CounterDirectives.cpp
+++ b/Source/core/rendering/style/CounterDirectives.cpp
@@ -21,7 +21,7 @@
#include "config.h"
#include "core/rendering/style/CounterDirectives.h"
-#include <wtf/PassOwnPtr.h>
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/CounterDirectives.h b/Source/core/rendering/style/CounterDirectives.h
index cf793bb..f8035ab 100644
--- a/Source/core/rendering/style/CounterDirectives.h
+++ b/Source/core/rendering/style/CounterDirectives.h
@@ -25,11 +25,11 @@
#ifndef CounterDirectives_h
#define CounterDirectives_h
-#include <wtf/HashMap.h>
-#include <wtf/MathExtras.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/AtomicString.h>
-#include <wtf/text/AtomicStringHash.h>
+#include "wtf/HashMap.h"
+#include "wtf/MathExtras.h"
+#include "wtf/RefPtr.h"
+#include "wtf/text/AtomicString.h"
+#include "wtf/text/AtomicStringHash.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/CursorData.h b/Source/core/rendering/style/CursorData.h
index e2f2ea0..b5ec096 100644
--- a/Source/core/rendering/style/CursorData.h
+++ b/Source/core/rendering/style/CursorData.h
@@ -48,12 +48,12 @@
return !(*this == o);
}
- StyleImage* image() const { return m_image.get(); }
- void setImage(PassRefPtr<StyleImage> image) { m_image = image; }
+ StyleImage* image() const { return m_image.get(); }
+ void setImage(PassRefPtr<StyleImage> image) { m_image = image; }
// Hot spot in the image in logical pixels.
const IntPoint& hotSpot() const { return m_hotSpot; }
-
+
private:
RefPtr<StyleImage> m_image;
IntPoint m_hotSpot; // for CSS3 support
diff --git a/Source/core/rendering/style/CursorList.h b/Source/core/rendering/style/CursorList.h
index fe7cfb6..90bd00c 100644
--- a/Source/core/rendering/style/CursorList.h
+++ b/Source/core/rendering/style/CursorList.h
@@ -26,8 +26,8 @@
#define CursorList_h
#include "core/rendering/style/CursorData.h"
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
+#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/DataRef.h b/Source/core/rendering/style/DataRef.h
index c8d8072..9425695 100644
--- a/Source/core/rendering/style/DataRef.h
+++ b/Source/core/rendering/style/DataRef.h
@@ -24,7 +24,7 @@
#ifndef DataRef_h
#define DataRef_h
-#include <wtf/RefPtr.h>
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -54,7 +54,7 @@
ASSERT(o.m_data);
return m_data == o.m_data || *m_data == *o.m_data;
}
-
+
bool operator!=(const DataRef<T>& o) const
{
ASSERT(m_data);
diff --git a/Source/core/rendering/style/FillLayer.cpp b/Source/core/rendering/style/FillLayer.cpp
index 2a71b5f..0a3cf36 100644
--- a/Source/core/rendering/style/FillLayer.cpp
+++ b/Source/core/rendering/style/FillLayer.cpp
@@ -140,7 +140,7 @@
m_repeatYSet = o.m_repeatYSet;
m_xPosSet = o.m_xPosSet;
m_yPosSet = o.m_yPosSet;
-
+
m_type = o.m_type;
return *this;
@@ -175,7 +175,7 @@
pattern = this;
}
}
-
+
for (curr = this; curr && curr->isYPositionSet(); curr = curr->next()) { }
if (curr && curr != this) {
// We need to fill in the remaining values with the pattern specified.
@@ -201,7 +201,7 @@
pattern = this;
}
}
-
+
for (curr = this; curr && curr->isClipSet(); curr = curr->next()) { }
if (curr && curr != this) {
// We need to fill in the remaining values with the pattern specified.
@@ -267,7 +267,7 @@
pattern = this;
}
}
-
+
for (curr = this; curr && curr->isSizeSet(); curr = curr->next()) { }
if (curr && curr != this) {
// We need to fill in the remaining values with the pattern specified.
diff --git a/Source/core/rendering/style/FillLayer.h b/Source/core/rendering/style/FillLayer.h
index a3b0092..003572f 100644
--- a/Source/core/rendering/style/FillLayer.h
+++ b/Source/core/rendering/style/FillLayer.h
@@ -30,7 +30,7 @@
#include "core/platform/graphics/GraphicsTypes.h"
#include "core/rendering/style/RenderStyleConstants.h"
#include "core/rendering/style/StyleImage.h"
-#include <wtf/RefPtr.h>
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -96,7 +96,7 @@
bool isCompositeSet() const { return m_compositeSet; }
bool isBlendModeSet() const { return m_blendModeSet; }
bool isSizeSet() const { return m_sizeType != SizeNone; }
-
+
void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; }
void setXPosition(Length l) { m_xPosition = l; m_xPosSet = true; }
void setYPosition(Length l) { m_yPosition = l; m_yPosSet = true; }
@@ -112,7 +112,7 @@
void setSizeType(EFillSizeType b) { m_sizeType = b; }
void setSizeLength(LengthSize l) { m_sizeLength = l; }
void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; }
-
+
void clearImage() { m_image.clear(); m_imageSet = false; }
void clearXPosition()
{
@@ -136,7 +136,7 @@
void setNext(FillLayer* n) { if (m_next != n) { delete m_next; m_next = n; } }
- FillLayer& operator=(const FillLayer& o);
+ FillLayer& operator=(const FillLayer& o);
FillLayer(const FillLayer& o);
bool operator==(const FillLayer& o) const;
@@ -209,7 +209,7 @@
unsigned m_composite : 4; // CompositeOperator
unsigned m_sizeType : 2; // EFillSizeType
unsigned m_blendMode : 5; // BlendMode
-
+
unsigned m_imageSet : 1;
unsigned m_attachmentSet : 1;
unsigned m_clipSet : 1;
@@ -223,7 +223,7 @@
unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin
unsigned m_compositeSet : 1;
unsigned m_blendModeSet : 1;
-
+
unsigned m_type : 1; // EFillLayerType
mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer
diff --git a/Source/core/rendering/style/KeyframeList.cpp b/Source/core/rendering/style/KeyframeList.cpp
index 241be06..634699e 100644
--- a/Source/core/rendering/style/KeyframeList.cpp
+++ b/Source/core/rendering/style/KeyframeList.cpp
@@ -76,7 +76,7 @@
break;
}
}
-
+
if (!replaced && !inserted)
m_keyframes.append(keyframe);
diff --git a/Source/core/rendering/style/KeyframeList.h b/Source/core/rendering/style/KeyframeList.h
index 37eb316..adab92f 100644
--- a/Source/core/rendering/style/KeyframeList.h
+++ b/Source/core/rendering/style/KeyframeList.h
@@ -27,10 +27,10 @@
#include "CSSPropertyNames.h"
#include "core/rendering/style/StyleInheritedData.h"
-#include <wtf/HashSet.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/AtomicString.h>
-#include <wtf/Vector.h>
+#include "wtf/HashSet.h"
+#include "wtf/RefPtr.h"
+#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
namespace WebCore {
@@ -70,19 +70,19 @@
insert(KeyframeValue(1, 0));
}
~KeyframeList();
-
+
bool operator==(const KeyframeList& o) const;
bool operator!=(const KeyframeList& o) const { return !(*this == o); }
-
+
const AtomicString& animationName() const { return m_animationName; }
-
+
void insert(const KeyframeValue& keyframe);
-
+
void addProperty(CSSPropertyID prop) { m_properties.add(prop); }
bool containsProperty(CSSPropertyID prop) const { return m_properties.contains(prop); }
HashSet<CSSPropertyID>::const_iterator beginProperties() const { return m_properties.begin(); }
HashSet<CSSPropertyID>::const_iterator endProperties() const { return m_properties.end(); }
-
+
void clear();
bool isEmpty() const { return m_keyframes.isEmpty(); }
size_t size() const { return m_keyframes.size(); }
diff --git a/Source/core/rendering/style/LineClampValue.h b/Source/core/rendering/style/LineClampValue.h
index e4b6249..356f2e0 100644
--- a/Source/core/rendering/style/LineClampValue.h
+++ b/Source/core/rendering/style/LineClampValue.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 Apple Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -9,7 +9,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,7 +28,7 @@
#include "core/rendering/style/RenderStyleConstants.h"
namespace WebCore {
-
+
class LineClampValue {
public:
LineClampValue()
@@ -36,15 +36,15 @@
, m_value(-1)
{
}
-
+
LineClampValue(int value, ELineClampType type)
: m_type(type)
, m_value(value)
{
}
-
+
int value() const { return m_value; }
-
+
bool isPercentage() const { return m_type == LineClampPercentage; }
bool isNone() const { return m_value == -1; }
@@ -53,17 +53,17 @@
{
return value() == o.value() && isPercentage() == o.isPercentage();
}
-
+
bool operator!=(const LineClampValue& o) const
{
return !(*this == o);
}
-
+
private:
ELineClampType m_type;
int m_value;
};
-
+
} // namespace WebCore
#endif // LineClampValue_h
diff --git a/Source/core/rendering/style/NinePieceImage.h b/Source/core/rendering/style/NinePieceImage.h
index f3cd38d..d4d10c9 100644
--- a/Source/core/rendering/style/NinePieceImage.h
+++ b/Source/core/rendering/style/NinePieceImage.h
@@ -67,7 +67,7 @@
bool hasImage() const { return m_data->image; }
StyleImage* image() const { return m_data->image.get(); }
void setImage(PassRefPtr<StyleImage> image) { m_data.access()->image = image; }
-
+
const LengthBox& imageSlices() const { return m_data->imageSlices; }
void setImageSlices(const LengthBox& slices) { m_data.access()->imageSlices = slices; }
@@ -82,7 +82,7 @@
ENinePieceImageRule horizontalRule() const { return static_cast<ENinePieceImageRule>(m_data->horizontalRule); }
void setHorizontalRule(ENinePieceImageRule rule) { m_data.access()->horizontalRule = rule; }
-
+
ENinePieceImageRule verticalRule() const { return static_cast<ENinePieceImageRule>(m_data->verticalRule); }
void setVerticalRule(ENinePieceImageRule rule) { m_data.access()->verticalRule = rule; }
@@ -96,7 +96,7 @@
{
m_data.access()->borderSlices = other.m_data->borderSlices;
}
-
+
void copyOutsetFrom(const NinePieceImage& other)
{
m_data.access()->outset = other.m_data->outset;
diff --git a/Source/core/rendering/style/OutlineValue.h b/Source/core/rendering/style/OutlineValue.h
index df7775b..ccf3c27 100644
--- a/Source/core/rendering/style/OutlineValue.h
+++ b/Source/core/rendering/style/OutlineValue.h
@@ -36,17 +36,17 @@
: m_offset(0)
{
}
-
+
bool operator==(const OutlineValue& o) const
{
return m_width == o.m_width && m_style == o.m_style && m_color == o.m_color && m_colorIsValid == o.m_colorIsValid && m_offset == o.m_offset && m_isAuto == o.m_isAuto;
}
-
+
bool operator!=(const OutlineValue& o) const
{
return !(*this == o);
}
-
+
int offset() const { return m_offset; }
OutlineIsAuto isAuto() const { return static_cast<OutlineIsAuto>(m_isAuto); }
diff --git a/Source/core/rendering/style/QuotesData.h b/Source/core/rendering/style/QuotesData.h
index c6053ca..94e89e3 100644
--- a/Source/core/rendering/style/QuotesData.h
+++ b/Source/core/rendering/style/QuotesData.h
@@ -22,10 +22,10 @@
#ifndef QuotesData_h
#define QuotesData_h
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index 53979e2..2e89c6a 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -37,8 +37,8 @@
#include "core/rendering/style/ShadowData.h"
#include "core/rendering/style/StyleImage.h"
#include "core/rendering/style/StyleInheritedData.h"
-#include <wtf/MathExtras.h>
-#include <wtf/StdLibExtras.h>
+#include "wtf/MathExtras.h"
+#include "wtf/StdLibExtras.h"
using namespace std;
@@ -254,7 +254,7 @@
if (!m_cachedPseudoStyles || !m_cachedPseudoStyles->size())
return 0;
- if (styleType() != NOPSEUDO)
+ if (styleType() != NOPSEUDO)
return 0;
for (size_t i = 0; i < m_cachedPseudoStyles->size(); ++i) {
@@ -330,7 +330,7 @@
return false;
if (!a.top().isIntrinsicOrAuto() && !a.bottom().isIntrinsicOrAuto())
return false;
- // If our width is auto and left or right is specified then this
+ // If our width is auto and left or right is specified then this
// is not just a movement - we need to resize to our container.
if ((!a.left().isIntrinsicOrAuto() || !a.right().isIntrinsicOrAuto()) && width.isIntrinsicOrAuto())
return false;
@@ -372,7 +372,7 @@
return StyleDifferenceLayout;
if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {
- if (rareNonInheritedData->m_appearance != other->rareNonInheritedData->m_appearance
+ if (rareNonInheritedData->m_appearance != other->rareNonInheritedData->m_appearance
|| rareNonInheritedData->marginBeforeCollapse != other->rareNonInheritedData->marginBeforeCollapse
|| rareNonInheritedData->marginAfterCollapse != other->rareNonInheritedData->marginAfterCollapse
|| rareNonInheritedData->lineClamp != other->rareNonInheritedData->lineClamp
@@ -582,7 +582,7 @@
|| visual->clip != other->visual->clip || visual->hasClip != other->visual->hasClip)
return StyleDifferenceRepaintLayer;
}
-
+
if (RuntimeEnabledFeatures::cssCompositingEnabled())
if (rareNonInheritedData->m_effectiveBlendMode != other->rareNonInheritedData->m_effectiveBlendMode)
return StyleDifferenceRepaintLayer;
@@ -615,10 +615,10 @@
|| rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_borderFit
|| rareInheritedData->m_imageRendering != other->rareInheritedData->m_imageRendering)
return StyleDifferenceRepaint;
-
- // FIXME: The current spec is being reworked to remove dependencies between exclusions and affected
- // content. There's a proposal to use floats instead. In that case, wrap-shape should actually relayout
- // the parent container. For sure, I will have to revisit this code, but for now I've added this in order
+
+ // FIXME: The current spec is being reworked to remove dependencies between exclusions and affected
+ // content. There's a proposal to use floats instead. In that case, wrap-shape should actually relayout
+ // the parent container. For sure, I will have to revisit this code, but for now I've added this in order
// to avoid having diff() == StyleDifferenceEqual where wrap-shapes actually differ.
// Tracking bug: https://bugs.webkit.org/show_bug.cgi?id=62991
if (rareNonInheritedData->m_shapeOutside != other->rareNonInheritedData->m_shapeOutside)
@@ -712,7 +712,7 @@
{
if (!image)
return;
-
+
if (add) {
appendContent(ContentData::create(image));
return;
@@ -800,12 +800,12 @@
TransformOperation::OperationType type = transformOperations[i]->getOperationType();
if (type != TransformOperation::TRANSLATE_X
&& type != TransformOperation::TRANSLATE_Y
- && type != TransformOperation::TRANSLATE
+ && type != TransformOperation::TRANSLATE
&& type != TransformOperation::TRANSLATE_Z
&& type != TransformOperation::TRANSLATE_3D)
return true;
}
-
+
return false;
}
@@ -818,20 +818,20 @@
{
const Vector<RefPtr<TransformOperation> >& transformOperations = rareNonInheritedData->m_transform->m_operations.operations();
bool applyTransformOrigin = requireTransformOrigin(transformOperations, applyOrigin);
-
+
float offsetX = transformOriginX().type() == Percent ? boundingBox.x() : 0;
float offsetY = transformOriginY().type() == Percent ? boundingBox.y() : 0;
-
+
if (applyTransformOrigin) {
transform.translate3d(floatValueForLength(transformOriginX(), boundingBox.width()) + offsetX,
floatValueForLength(transformOriginY(), boundingBox.height()) + offsetY,
transformOriginZ());
}
-
+
unsigned size = transformOperations.size();
for (unsigned i = 0; i < size; ++i)
transformOperations[i]->apply(transform, boundingBox.size());
-
+
if (applyTransformOrigin) {
transform.translate3d(-floatValueForLength(transformOriginX(), boundingBox.width()) - offsetX,
-floatValueForLength(transformOriginY(), boundingBox.height()) - offsetY,
@@ -868,13 +868,13 @@
static RoundedRect::Radii calcRadiiFor(const BorderData& border, IntSize size, RenderView* renderView)
{
return RoundedRect::Radii(
- IntSize(valueForLength(border.topLeft().width(), size.width(), renderView),
+ IntSize(valueForLength(border.topLeft().width(), size.width(), renderView),
valueForLength(border.topLeft().height(), size.height(), renderView)),
IntSize(valueForLength(border.topRight().width(), size.width(), renderView),
valueForLength(border.topRight().height(), size.height(), renderView)),
- IntSize(valueForLength(border.bottomLeft().width(), size.width(), renderView),
+ IntSize(valueForLength(border.bottomLeft().width(), size.width(), renderView),
valueForLength(border.bottomLeft().height(), size.height(), renderView)),
- IntSize(valueForLength(border.bottomRight().width(), size.width(), renderView),
+ IntSize(valueForLength(border.bottomRight().width(), size.width(), renderView),
valueForLength(border.bottomRight().height(), size.height(), renderView)));
}
@@ -882,7 +882,7 @@
{
// Constrain corner radii using CSS3 rules:
// http://www.w3.org/TR/css3-background/#the-border-radius
-
+
float factor = 1;
unsigned radiiSum;
@@ -895,17 +895,17 @@
radiiSum = static_cast<unsigned>(radii.bottomLeft().width()) + static_cast<unsigned>(radii.bottomRight().width());
if (radiiSum > static_cast<unsigned>(rect.width()))
factor = min(static_cast<float>(rect.width()) / radiiSum, factor);
-
+
// left
radiiSum = static_cast<unsigned>(radii.topLeft().height()) + static_cast<unsigned>(radii.bottomLeft().height());
if (radiiSum > static_cast<unsigned>(rect.height()))
factor = min(static_cast<float>(rect.height()) / radiiSum, factor);
-
+
// right
radiiSum = static_cast<unsigned>(radii.topRight().height()) + static_cast<unsigned>(radii.bottomRight().height());
if (radiiSum > static_cast<unsigned>(rect.height()))
factor = min(static_cast<float>(rect.height()) / radiiSum, factor);
-
+
ASSERT(factor <= 1);
return factor;
}
@@ -954,9 +954,9 @@
RoundedRect RenderStyle::getRoundedInnerBorderFor(const LayoutRect& borderRect,
int topWidth, int bottomWidth, int leftWidth, int rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
{
- LayoutRect innerRect(borderRect.x() + leftWidth,
- borderRect.y() + topWidth,
- borderRect.width() - leftWidth - rightWidth,
+ LayoutRect innerRect(borderRect.x() + leftWidth,
+ borderRect.y() + topWidth,
+ borderRect.width() - leftWidth - rightWidth,
borderRect.height() - topWidth - bottomWidth);
RoundedRect roundedRect(pixelSnappedIntRect(innerRect));
@@ -972,7 +972,7 @@
static bool allLayersAreFixed(const FillLayer* layer)
{
bool allFixed = true;
-
+
for (const FillLayer* currLayer = layer; currLayer; currLayer = currLayer->next())
allFixed &= (currLayer->image() && currLayer->attachment() == FixedBackgroundAttachment);
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index dc21479..286ea49 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -366,9 +366,9 @@
bool hasBackgroundImage() const { return m_background->background().hasImage(); }
bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
-
+
bool hasEntirelyFixedBackground() const;
-
+
bool hasAppearance() const { return appearance() != NoControlPart; }
bool hasBackground() const
@@ -378,7 +378,7 @@
return true;
return hasBackgroundImage();
}
-
+
LayoutBoxExtent imageOutsets(const NinePieceImage&) const;
bool hasBorderImageOutsets() const
{
@@ -442,7 +442,7 @@
Length maxWidth() const { return m_box->maxWidth(); }
Length minHeight() const { return m_box->minHeight(); }
Length maxHeight() const { return m_box->maxHeight(); }
-
+
Length logicalWidth() const { return isHorizontalWritingMode() ? width() : height(); }
Length logicalHeight() const { return isHorizontalWritingMode() ? height() : width(); }
Length logicalMinWidth() const { return isHorizontalWritingMode() ? minWidth() : minHeight(); }
@@ -485,7 +485,7 @@
unsigned borderBottomWidth() const { return surround->border.borderBottomWidth(); }
EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); }
bool borderBottomIsTransparent() const { return surround->border.bottom().isTransparent(); }
-
+
unsigned short borderBeforeWidth() const;
unsigned short borderAfterWidth() const;
unsigned short borderStartWidth() const;
@@ -501,7 +501,7 @@
bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHIDDEN; }
EBorderStyle outlineStyle() const { return m_background->outline().style(); }
OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>(m_background->outline().isAuto()); }
-
+
EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags._overflowX); }
EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
@@ -639,7 +639,7 @@
const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask); }
const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_maskBoxImage; }
StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_maskBoxImage.image(); }
-
+
EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse>(inherited_flags._border_collapse); }
short horizontalBorderSpacing() const;
short verticalBorderSpacing() const;
@@ -818,8 +818,8 @@
RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInheritedData->m_rubyPosition); }
TextOrientation textOrientation() const { return static_cast<TextOrientation>(rareInheritedData->m_textOrientation); }
-
- // Return true if any transform related property (currently transform, transformStyle3D or perspective)
+
+ // Return true if any transform related property (currently transform, transformStyle3D or perspective)
// indicates that we are transforming
bool hasTransformRelatedProperty() const { return hasTransform() || preserves3D() || hasPerspective(); }
@@ -870,7 +870,7 @@
Length perspectiveOriginY() const { return rareNonInheritedData->m_perspectiveOriginY; }
LengthSize pageSize() const { return rareNonInheritedData->m_pageSize; }
PageSizeType pageSizeType() const { return static_cast<PageSizeType>(rareNonInheritedData->m_pageSizeType); }
-
+
// When set, this ensures that styles compare as different. Used during accelerated animations.
bool isRunningAcceleratedAnimation() const { return rareNonInheritedData->m_runningAcceleratedAnimation; }
@@ -959,7 +959,7 @@
void setBackgroundYPosition(Length length) { SET_VAR(m_background, m_background.m_yPosition, length); }
void setBackgroundSize(EFillSizeType b) { SET_VAR(m_background, m_background.m_sizeType, b); }
void setBackgroundSizeLength(LengthSize s) { SET_VAR(m_background, m_background.m_sizeLength, s); }
-
+
void setBorderImage(const NinePieceImage& b) { SET_VAR(surround, border.m_image, b); }
void setBorderImageSource(PassRefPtr<StyleImage>);
void setBorderImageSlices(LengthBox);
@@ -982,7 +982,7 @@
{
setBorderRadius(LengthSize(Length(s.width(), Fixed), Length(s.height(), Fixed)));
}
-
+
RoundedRect getRoundedBorderFor(const LayoutRect& borderRect, RenderView* = 0, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
@@ -1707,7 +1707,7 @@
if (zoomFactor > 1) {
if (value < 0)
value--;
- else
+ else
value++;
}
diff --git a/Source/core/rendering/style/RenderStyleConstants.h b/Source/core/rendering/style/RenderStyleConstants.h
index 52f8182..178b93a 100644
--- a/Source/core/rendering/style/RenderStyleConstants.h
+++ b/Source/core/rendering/style/RenderStyleConstants.h
@@ -438,7 +438,7 @@
enum EInsideLink {
NotInsideLink, InsideUnvisitedLink, InsideVisitedLink
};
-
+
enum EPointerEvents {
PE_NONE, PE_AUTO, PE_STROKE, PE_FILL, PE_PAINTED, PE_VISIBLE,
PE_VISIBLE_STROKE, PE_VISIBLE_FILL, PE_VISIBLE_PAINTED, PE_ALL
@@ -451,7 +451,7 @@
enum EBackfaceVisibility {
BackfaceVisibilityVisible, BackfaceVisibilityHidden
};
-
+
enum ELineClampType { LineClampLineCount, LineClampPercentage };
enum Hyphens { HyphensNone, HyphensManual, HyphensAuto };
diff --git a/Source/core/rendering/style/SVGRenderStyle.cpp b/Source/core/rendering/style/SVGRenderStyle.cpp
index 635c849..b839bd0 100644
--- a/Source/core/rendering/style/SVGRenderStyle.cpp
+++ b/Source/core/rendering/style/SVGRenderStyle.cpp
@@ -192,7 +192,7 @@
// NOTE: All comparisions below may only return StyleDifferenceRepaint
- // Painting related properties only need repaints.
+ // Painting related properties only need repaints.
if (miscNotEqual) {
if (misc->floodColor != other->misc->floodColor
|| misc->floodOpacity != other->misc->floodOpacity
diff --git a/Source/core/rendering/style/SVGRenderStyle.h b/Source/core/rendering/style/SVGRenderStyle.h
index 625e33f..76c981d 100644
--- a/Source/core/rendering/style/SVGRenderStyle.h
+++ b/Source/core/rendering/style/SVGRenderStyle.h
@@ -38,7 +38,7 @@
class IntRect;
class RenderObject;
-class SVGRenderStyle : public RefCounted<SVGRenderStyle> {
+class SVGRenderStyle : public RefCounted<SVGRenderStyle> {
public:
static PassRefPtr<SVGRenderStyle> create() { return adoptRef(new SVGRenderStyle); }
PassRefPtr<SVGRenderStyle> copy() const { return adoptRef(new SVGRenderStyle(*this));}
@@ -322,7 +322,7 @@
float fillOpacity() const { return fill->opacity; }
const SVGPaint::SVGPaintType& fillPaintType() const { return fill->paintType; }
const Color& fillPaintColor() const { return fill->paintColor; }
- const String& fillPaintUri() const { return fill->paintUri; }
+ const String& fillPaintUri() const { return fill->paintUri; }
float strokeOpacity() const { return stroke->opacity; }
const SVGPaint::SVGPaintType& strokePaintType() const { return stroke->paintType; }
const Color& strokePaintColor() const { return stroke->paintColor; }
@@ -389,7 +389,7 @@
}
unsigned _colorRendering : 2; // EColorRendering
- unsigned _shapeRendering : 2; // EShapeRendering
+ unsigned _shapeRendering : 2; // EShapeRendering
unsigned _clipRule : 1; // WindRule
unsigned _fillRule : 1; // WindRule
unsigned _capStyle : 2; // LineCap
@@ -410,7 +410,7 @@
union {
struct {
- unsigned _alignmentBaseline : 4; // EAlignmentBaseline
+ unsigned _alignmentBaseline : 4; // EAlignmentBaseline
unsigned _dominantBaseline : 4; // EDominantBaseline
unsigned _baselineShift : 2; // EBaselineShift
unsigned _vectorEffect: 1; // EVectorEffect
@@ -436,7 +436,7 @@
private:
enum CreateDefaultType { CreateDefault };
-
+
SVGRenderStyle();
SVGRenderStyle(const SVGRenderStyle&);
SVGRenderStyle(CreateDefaultType); // Used to create the default style.
diff --git a/Source/core/rendering/style/SVGRenderStyleDefs.cpp b/Source/core/rendering/style/SVGRenderStyleDefs.cpp
index d9a7208..8e93166 100644
--- a/Source/core/rendering/style/SVGRenderStyleDefs.cpp
+++ b/Source/core/rendering/style/SVGRenderStyleDefs.cpp
@@ -58,7 +58,7 @@
bool StyleFillData::operator==(const StyleFillData& other) const
{
- return opacity == other.opacity
+ return opacity == other.opacity
&& paintType == other.paintType
&& paintColor == other.paintColor
&& paintUri == other.paintUri
diff --git a/Source/core/rendering/style/SVGRenderStyleDefs.h b/Source/core/rendering/style/SVGRenderStyleDefs.h
index 4f9d706..60477d4 100644
--- a/Source/core/rendering/style/SVGRenderStyleDefs.h
+++ b/Source/core/rendering/style/SVGRenderStyleDefs.h
@@ -31,10 +31,10 @@
#include "core/rendering/style/ShadowData.h"
#include "core/svg/SVGLength.h"
#include "core/svg/SVGPaint.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -76,7 +76,7 @@
DB_IDEOGRAPHIC, DB_ALPHABETIC, DB_HANGING, DB_MATHEMATICAL,
DB_CENTRAL, DB_MIDDLE, DB_TEXT_AFTER_EDGE, DB_TEXT_BEFORE_EDGE
};
-
+
enum EVectorEffect {
VE_NONE,
VE_NON_SCALING_STROKE
@@ -147,7 +147,7 @@
Color visitedLinkPaintColor;
String visitedLinkPaintUri;
- private:
+ private:
StyleStrokeData();
StyleStrokeData(const StyleStrokeData&);
};
@@ -166,7 +166,7 @@
float opacity;
Color color;
- private:
+ private:
StyleStopData();
StyleStopData(const StyleStopData&);
};
@@ -175,7 +175,7 @@
public:
static PassRefPtr<StyleTextData> create() { return adoptRef(new StyleTextData); }
PassRefPtr<StyleTextData> copy() const { return adoptRef(new StyleTextData(*this)); }
-
+
bool operator==(const StyleTextData& other) const;
bool operator!=(const StyleTextData& other) const
{
diff --git a/Source/core/rendering/style/ShadowData.cpp b/Source/core/rendering/style/ShadowData.cpp
index 1723b19..52e391b 100644
--- a/Source/core/rendering/style/ShadowData.cpp
+++ b/Source/core/rendering/style/ShadowData.cpp
@@ -43,7 +43,7 @@
if ((m_next && !o.m_next) || (!m_next && o.m_next)
|| (m_next && o.m_next && *m_next != *o.m_next))
return false;
-
+
return m_location == o.m_location
&& m_blur == o.m_blur
&& m_spread == o.m_spread
diff --git a/Source/core/rendering/style/ShadowData.h b/Source/core/rendering/style/ShadowData.h
index bd6bf3c..30a981f 100644
--- a/Source/core/rendering/style/ShadowData.h
+++ b/Source/core/rendering/style/ShadowData.h
@@ -28,8 +28,8 @@
#include "core/css/StyleColor.h"
#include "core/platform/graphics/FloatRect.h"
#include "core/platform/graphics/LayoutRect.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
@@ -52,7 +52,7 @@
bool operator==(const ShadowData&) const;
bool operator!=(const ShadowData& o) const { return !(*this == o); }
-
+
int x() const { return m_location.x(); }
int y() const { return m_location.y(); }
IntPoint location() const { return m_location; }
diff --git a/Source/core/rendering/style/StyleBackgroundData.h b/Source/core/rendering/style/StyleBackgroundData.h
index 6c58b02..cbc668d 100644
--- a/Source/core/rendering/style/StyleBackgroundData.h
+++ b/Source/core/rendering/style/StyleBackgroundData.h
@@ -28,8 +28,8 @@
#include "core/css/StyleColor.h"
#include "core/rendering/style/FillLayer.h"
#include "core/rendering/style/OutlineValue.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -53,7 +53,7 @@
friend class RenderStyle;
StyleBackgroundData();
- StyleBackgroundData(const StyleBackgroundData&);
+ StyleBackgroundData(const StyleBackgroundData&);
FillLayer m_background;
StyleColor m_color;
diff --git a/Source/core/rendering/style/StyleBoxData.h b/Source/core/rendering/style/StyleBoxData.h
index 7f4bd71..ff9b543 100644
--- a/Source/core/rendering/style/StyleBoxData.h
+++ b/Source/core/rendering/style/StyleBoxData.h
@@ -27,8 +27,8 @@
#include "core/platform/Length.h"
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -45,18 +45,18 @@
Length width() const { return m_width; }
Length height() const { return m_height; }
-
+
Length minWidth() const { return m_minWidth; }
Length minHeight() const { return m_minHeight; }
-
+
Length maxWidth() const { return m_maxWidth; }
Length maxHeight() const { return m_maxHeight; }
-
+
Length verticalAlign() const { return m_verticalAlign; }
-
+
int zIndex() const { return m_zIndex; }
bool hasAutoZIndex() const { return m_hasAutoZIndex; }
-
+
EBoxSizing boxSizing() const { return static_cast<EBoxSizing>(m_boxSizing); }
EBoxDecorationBreak boxDecorationBreak() const { return static_cast<EBoxDecorationBreak>(m_boxDecorationBreak); }
diff --git a/Source/core/rendering/style/StyleCachedImage.h b/Source/core/rendering/style/StyleCachedImage.h
index f0d445c..de81fed 100644
--- a/Source/core/rendering/style/StyleCachedImage.h
+++ b/Source/core/rendering/style/StyleCachedImage.h
@@ -41,7 +41,7 @@
virtual WrappedImagePtr data() const { return m_image.get(); }
virtual PassRefPtr<CSSValue> cssValue() const;
-
+
virtual bool canRender(const RenderObject*, float multiplier) const;
virtual bool isLoaded() const;
virtual bool errorOccurred() const;
@@ -56,10 +56,10 @@
virtual PassRefPtr<Image> image(RenderObject*, const IntSize&) const;
virtual bool knownToBeOpaque(const RenderObject*) const OVERRIDE;
virtual CachedImage* cachedImage() const OVERRIDE { return m_image.get(); }
-
+
private:
explicit StyleCachedImage(CachedImage*);
-
+
CachedResourceHandle<CachedImage> m_image;
};
diff --git a/Source/core/rendering/style/StyleCachedShader.h b/Source/core/rendering/style/StyleCachedShader.h
index bc79519..645bf12 100644
--- a/Source/core/rendering/style/StyleCachedShader.h
+++ b/Source/core/rendering/style/StyleCachedShader.h
@@ -41,14 +41,14 @@
public:
// FIXME: Keep a reference to the actual CachedShader in this class.
static PassRefPtr<StyleCachedShader> create(CachedShader* shader) { return adoptRef(new StyleCachedShader(shader)); }
-
+
virtual PassRefPtr<CSSValue> cssValue() const;
-
+
virtual CachedShader* cachedShader() const { return m_shader.get(); }
-
+
private:
StyleCachedShader(CachedShader*);
-
+
CachedResourceHandle<CachedShader> m_shader;
};
diff --git a/Source/core/rendering/style/StyleCustomFilterProgram.h b/Source/core/rendering/style/StyleCustomFilterProgram.h
index 7ef768f..40e7760 100644
--- a/Source/core/rendering/style/StyleCustomFilterProgram.h
+++ b/Source/core/rendering/style/StyleCustomFilterProgram.h
@@ -47,35 +47,35 @@
class StyleCustomFilterProgram : public CustomFilterProgram, public CachedResourceClient {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassRefPtr<StyleCustomFilterProgram> create(KURL vertexShaderURL, PassRefPtr<StyleShader> vertexShader,
+ static PassRefPtr<StyleCustomFilterProgram> create(KURL vertexShaderURL, PassRefPtr<StyleShader> vertexShader,
KURL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader, CustomFilterProgramType programType,
const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
{
return adoptRef(new StyleCustomFilterProgram(vertexShaderURL, vertexShader, fragmentShaderURL, fragmentShader, programType, mixSettings, meshType));
}
-
+
void setVertexShader(PassRefPtr<StyleShader> shader)
{
// The shader is immutable while in the cache.
ASSERT(!m_cache);
- m_vertexShader = shader;
+ m_vertexShader = shader;
}
StyleShader* vertexShader() const { return m_vertexShader.get(); }
-
+
void setFragmentShader(PassRefPtr<StyleShader> shader)
{
// The shader is immutable while in the cache.
ASSERT(!m_cache);
- m_fragmentShader = shader;
+ m_fragmentShader = shader;
}
StyleShader* fragmentShader() const { return m_fragmentShader.get(); }
-
+
virtual String vertexShaderString() const
{
ASSERT(isLoaded());
return m_cachedVertexShader.get() ? m_cachedVertexShader->shaderString() : String();
}
-
+
virtual String fragmentShaderString() const
{
ASSERT(isLoaded());
@@ -104,7 +104,7 @@
m_cachedFragmentShader->addClient(this);
}
}
-
+
virtual void didRemoveLastClient()
{
if (m_cachedVertexShader.get()) {
@@ -118,7 +118,7 @@
m_isFragmentShaderLoaded = false;
}
}
-
+
virtual void notifyFinished(CachedResource* resource)
{
if (resource->errorOccurred())
@@ -134,19 +134,19 @@
bool hasPendingShaders() const
{
- return (m_vertexShader && m_vertexShader->isPendingShader())
+ return (m_vertexShader && m_vertexShader->isPendingShader())
|| (m_fragmentShader && m_fragmentShader->isPendingShader());
}
// StyleCustomFilterProgramCache is responsible with updating the reference to the cache.
void setCache(StyleCustomFilterProgramCache* cache) { m_cache = cache; }
bool inCache() const { return m_cache; }
-
+
KURL vertexShaderURL() const { return m_vertexShaderURL; }
KURL fragmentShaderURL() const { return m_fragmentShaderURL; }
private:
- StyleCustomFilterProgram(KURL vertexShaderURL, PassRefPtr<StyleShader> vertexShader, KURL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader,
+ StyleCustomFilterProgram(KURL vertexShaderURL, PassRefPtr<StyleShader> vertexShader, KURL fragmentShaderURL, PassRefPtr<StyleShader> fragmentShader,
CustomFilterProgramType programType, const CustomFilterProgramMixSettings& mixSettings, CustomFilterMeshType meshType)
: CustomFilterProgram(programType, mixSettings, meshType)
, m_vertexShader(vertexShader)
@@ -160,7 +160,7 @@
}
~StyleCustomFilterProgram();
-
+
RefPtr<StyleShader> m_vertexShader;
RefPtr<StyleShader> m_fragmentShader;
@@ -174,7 +174,7 @@
// The Cache is responsible of invalidating this reference.
StyleCustomFilterProgramCache* m_cache;
-
+
bool m_isVertexShaderLoaded;
bool m_isFragmentShaderLoaded;
};
diff --git a/Source/core/rendering/style/StyleCustomFilterProgramCache.cpp b/Source/core/rendering/style/StyleCustomFilterProgramCache.cpp
index be1d79a..fb4c011 100644
--- a/Source/core/rendering/style/StyleCustomFilterProgramCache.cpp
+++ b/Source/core/rendering/style/StyleCustomFilterProgramCache.cpp
@@ -36,7 +36,7 @@
namespace WebCore {
-static CustomFilterProgramInfo programCacheKey(StyleCustomFilterProgram* program)
+static CustomFilterProgramInfo programCacheKey(StyleCustomFilterProgram* program)
{
ASSERT(program->vertexShaderURL().isValid() || program->fragmentShaderURL().isValid());
return CustomFilterProgramInfo(program->vertexShaderURL().string(), program->fragmentShaderURL().string(),
diff --git a/Source/core/rendering/style/StyleCustomFilterProgramCache.h b/Source/core/rendering/style/StyleCustomFilterProgramCache.h
index 999ecb2..bfd1610 100644
--- a/Source/core/rendering/style/StyleCustomFilterProgramCache.h
+++ b/Source/core/rendering/style/StyleCustomFilterProgramCache.h
@@ -31,8 +31,8 @@
#define StyleCustomFilterProgramCache_h
#include "core/platform/graphics/filters/custom/CustomFilterProgramInfo.h"
-#include <wtf/FastAllocBase.h>
-#include <wtf/HashMap.h>
+#include "wtf/FastAllocBase.h"
+#include "wtf/HashMap.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleDeprecatedFlexibleBoxData.h b/Source/core/rendering/style/StyleDeprecatedFlexibleBoxData.h
index 33337bc..501157c 100644
--- a/Source/core/rendering/style/StyleDeprecatedFlexibleBoxData.h
+++ b/Source/core/rendering/style/StyleDeprecatedFlexibleBoxData.h
@@ -25,8 +25,8 @@
#ifndef StyleDeprecatedFlexibleBoxData_h
#define StyleDeprecatedFlexibleBoxData_h
-#include <wtf/RefCounted.h>
-#include <wtf/PassRefPtr.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleFilterData.cpp b/Source/core/rendering/style/StyleFilterData.cpp
index 9ff640b..ae75334 100644
--- a/Source/core/rendering/style/StyleFilterData.cpp
+++ b/Source/core/rendering/style/StyleFilterData.cpp
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
diff --git a/Source/core/rendering/style/StyleFilterData.h b/Source/core/rendering/style/StyleFilterData.h
index ce62c62..12a3e84 100644
--- a/Source/core/rendering/style/StyleFilterData.h
+++ b/Source/core/rendering/style/StyleFilterData.h
@@ -20,15 +20,15 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef StyleFilterData_h
#define StyleFilterData_h
#include "core/platform/graphics/filters/FilterOperations.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleFlexibleBoxData.h b/Source/core/rendering/style/StyleFlexibleBoxData.h
index 04c43e7..8877558 100644
--- a/Source/core/rendering/style/StyleFlexibleBoxData.h
+++ b/Source/core/rendering/style/StyleFlexibleBoxData.h
@@ -28,8 +28,8 @@
#include "core/platform/Length.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleGeneratedImage.cpp b/Source/core/rendering/style/StyleGeneratedImage.cpp
index f1fe1af..2ec1c87 100644
--- a/Source/core/rendering/style/StyleGeneratedImage.cpp
+++ b/Source/core/rendering/style/StyleGeneratedImage.cpp
@@ -29,9 +29,9 @@
#include "core/rendering/RenderObject.h"
namespace WebCore {
-
+
StyleGeneratedImage::StyleGeneratedImage(PassRefPtr<CSSImageGeneratorValue> value)
- : m_imageGeneratorValue(value)
+ : m_imageGeneratorValue(value)
, m_fixedSize(m_imageGeneratorValue->isFixedSize())
{
m_isGeneratedImage = true;
@@ -61,7 +61,7 @@
return LayoutSize(width, height);
}
-
+
return m_containerSize;
}
diff --git a/Source/core/rendering/style/StyleGeneratedImage.h b/Source/core/rendering/style/StyleGeneratedImage.h
index 30dbcb1..bf93af4 100644
--- a/Source/core/rendering/style/StyleGeneratedImage.h
+++ b/Source/core/rendering/style/StyleGeneratedImage.h
@@ -52,10 +52,10 @@
virtual void removeClient(RenderObject*);
virtual PassRefPtr<Image> image(RenderObject*, const IntSize&) const;
virtual bool knownToBeOpaque(const RenderObject*) const OVERRIDE;
-
+
private:
StyleGeneratedImage(PassRefPtr<CSSImageGeneratorValue>);
-
+
RefPtr<CSSImageGeneratorValue> m_imageGeneratorValue;
IntSize m_containerSize;
bool m_fixedSize;
diff --git a/Source/core/rendering/style/StyleGridData.h b/Source/core/rendering/style/StyleGridData.h
index 3b602ad..96f1ca5 100644
--- a/Source/core/rendering/style/StyleGridData.h
+++ b/Source/core/rendering/style/StyleGridData.h
@@ -28,10 +28,10 @@
#include "core/rendering/style/GridTrackSize.h"
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleGridItemData.h b/Source/core/rendering/style/StyleGridItemData.h
index 76214b5..21a5a46 100644
--- a/Source/core/rendering/style/StyleGridItemData.h
+++ b/Source/core/rendering/style/StyleGridItemData.h
@@ -33,9 +33,9 @@
#include "core/rendering/style/GridPosition.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleImage.h b/Source/core/rendering/style/StyleImage.h
index bea910e..58f0908 100644
--- a/Source/core/rendering/style/StyleImage.h
+++ b/Source/core/rendering/style/StyleImage.h
@@ -28,9 +28,9 @@
#include "core/platform/graphics/Image.h"
#include "core/platform/graphics/IntSize.h"
#include "core/platform/graphics/LayoutSize.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
@@ -72,7 +72,7 @@
ALWAYS_INLINE bool isPendingImage() const { return m_isPendingImage; }
ALWAYS_INLINE bool isGeneratedImage() const { return m_isGeneratedImage; }
ALWAYS_INLINE bool isCachedImageSet() const { return m_isCachedImageSet; }
-
+
static bool imagesEquivalent(const StyleImage* image1, const StyleImage* image2)
{
if (image1 != image2) {
diff --git a/Source/core/rendering/style/StyleInheritedData.h b/Source/core/rendering/style/StyleInheritedData.h
index 3cb6674..80bd3ec 100644
--- a/Source/core/rendering/style/StyleInheritedData.h
+++ b/Source/core/rendering/style/StyleInheritedData.h
@@ -28,9 +28,9 @@
#include "core/css/StyleColor.h"
#include "core/platform/Length.h"
#include "core/platform/graphics/Font.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleMarqueeData.cpp b/Source/core/rendering/style/StyleMarqueeData.cpp
index 9015d73..c0d3667 100644
--- a/Source/core/rendering/style/StyleMarqueeData.cpp
+++ b/Source/core/rendering/style/StyleMarqueeData.cpp
@@ -41,7 +41,7 @@
, speed(o.speed)
, loops(o.loops)
, behavior(o.behavior)
- , direction(o.direction)
+ , direction(o.direction)
{
}
diff --git a/Source/core/rendering/style/StyleMarqueeData.h b/Source/core/rendering/style/StyleMarqueeData.h
index 33719c2..31de9b8 100644
--- a/Source/core/rendering/style/StyleMarqueeData.h
+++ b/Source/core/rendering/style/StyleMarqueeData.h
@@ -27,8 +27,8 @@
#include "core/platform/Length.h"
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -48,7 +48,7 @@
int loops; // -1 means infinite.
- unsigned behavior : 2; // EMarqueeBehavior
+ unsigned behavior : 2; // EMarqueeBehavior
EMarqueeDirection direction : 3; // not unsigned because EMarqueeDirection has negative values
private:
diff --git a/Source/core/rendering/style/StyleMultiColData.h b/Source/core/rendering/style/StyleMultiColData.h
index d4531b3..bc97184 100644
--- a/Source/core/rendering/style/StyleMultiColData.h
+++ b/Source/core/rendering/style/StyleMultiColData.h
@@ -29,8 +29,8 @@
#include "core/platform/Length.h"
#include "core/rendering/style/BorderValue.h"
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -40,7 +40,7 @@
public:
static PassRefPtr<StyleMultiColData> create() { return adoptRef(new StyleMultiColData); }
PassRefPtr<StyleMultiColData> copy() const { return adoptRef(new StyleMultiColData(*this)); }
-
+
bool operator==(const StyleMultiColData& o) const;
bool operator!=(const StyleMultiColData &o) const
{
@@ -50,7 +50,7 @@
unsigned short ruleWidth() const
{
if (m_rule.style() == BNONE || m_rule.style() == BHIDDEN)
- return 0;
+ return 0;
return m_rule.width();
}
diff --git a/Source/core/rendering/style/StylePendingImage.h b/Source/core/rendering/style/StylePendingImage.h
index 8b6e7f1..9f7bc2a 100644
--- a/Source/core/rendering/style/StylePendingImage.h
+++ b/Source/core/rendering/style/StylePendingImage.h
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef StylePendingImage_h
@@ -65,7 +65,7 @@
return 0;
}
virtual bool knownToBeOpaque(const RenderObject*) const { return false; }
-
+
private:
StylePendingImage(CSSValue* value)
: m_value(value)
diff --git a/Source/core/rendering/style/StylePendingShader.h b/Source/core/rendering/style/StylePendingShader.h
index a97c66a..1158e33 100644
--- a/Source/core/rendering/style/StylePendingShader.h
+++ b/Source/core/rendering/style/StylePendingShader.h
@@ -33,7 +33,7 @@
#include "core/css/CSSShaderValue.h"
#include "core/css/CSSValue.h"
#include "core/rendering/style/StyleShader.h"
-#include <wtf/PassRefPtr.h>
+#include "wtf/PassRefPtr.h"
namespace WebCore {
@@ -42,7 +42,7 @@
class StylePendingShader : public StyleShader {
public:
static PassRefPtr<StylePendingShader> create(CSSShaderValue* value) { return adoptRef(new StylePendingShader(value)); }
-
+
virtual PassRefPtr<CSSValue> cssValue() const { return m_value; }
CSSShaderValue* cssShaderValue() const { return m_value; }
private:
@@ -51,7 +51,7 @@
{
m_isPendingShader = true;
}
-
+
CSSShaderValue* m_value; // Not retained; it owns us.
};
diff --git a/Source/core/rendering/style/StyleRareInheritedData.h b/Source/core/rendering/style/StyleRareInheritedData.h
index 8d914e3..a96179f 100644
--- a/Source/core/rendering/style/StyleRareInheritedData.h
+++ b/Source/core/rendering/style/StyleRareInheritedData.h
@@ -27,9 +27,9 @@
#include "core/css/StyleColor.h"
#include "core/platform/Length.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/AtomicString.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
+#include "wtf/text/AtomicString.h"
#include "core/rendering/style/DataRef.h"
#include "core/rendering/style/StyleVariableData.h"
diff --git a/Source/core/rendering/style/StyleRareNonInheritedData.h b/Source/core/rendering/style/StyleRareNonInheritedData.h
index 85c0a8f..a48395e 100644
--- a/Source/core/rendering/style/StyleRareNonInheritedData.h
+++ b/Source/core/rendering/style/StyleRareNonInheritedData.h
@@ -58,7 +58,7 @@
struct LengthSize;
// Page size type.
-// StyleRareNonInheritedData::m_pageSize is meaningful only when
+// StyleRareNonInheritedData::m_pageSize is meaningful only when
// StyleRareNonInheritedData::m_pageSizeType is PAGE_SIZE_RESOLVED.
enum PageSizeType {
PAGE_SIZE_AUTO, // size: auto
@@ -75,7 +75,7 @@
static PassRefPtr<StyleRareNonInheritedData> create() { return adoptRef(new StyleRareNonInheritedData); }
PassRefPtr<StyleRareNonInheritedData> copy() const { return adoptRef(new StyleRareNonInheritedData(*this)); }
~StyleRareNonInheritedData();
-
+
bool operator==(const StyleRareNonInheritedData&) const;
bool operator!=(const StyleRareNonInheritedData& o) const { return !(*this == o); }
@@ -113,7 +113,7 @@
OwnPtr<CounterDirectiveMap> m_counterDirectives;
OwnPtr<ShadowData> m_boxShadow; // For box-shadow decorations.
-
+
RefPtr<StyleReflection> m_boxReflect;
OwnPtr<CSSAnimationDataList> m_animations;
diff --git a/Source/core/rendering/style/StyleReflection.h b/Source/core/rendering/style/StyleReflection.h
index 0005a5e..76829a3 100644
--- a/Source/core/rendering/style/StyleReflection.h
+++ b/Source/core/rendering/style/StyleReflection.h
@@ -28,7 +28,7 @@
#include "core/css/CSSReflectionDirection.h"
#include "core/platform/Length.h"
#include "core/rendering/style/NinePieceImage.h"
-#include <wtf/RefCounted.h>
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -60,7 +60,7 @@
{
m_mask.setMaskDefaults();
}
-
+
CSSReflectionDirection m_direction;
Length m_offset;
NinePieceImage m_mask;
diff --git a/Source/core/rendering/style/StyleShader.h b/Source/core/rendering/style/StyleShader.h
index 9ca34ff..de43941 100644
--- a/Source/core/rendering/style/StyleShader.h
+++ b/Source/core/rendering/style/StyleShader.h
@@ -30,7 +30,7 @@
#ifndef StyleShader_h
#define StyleShader_h
-#include <wtf/RefCounted.h>
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -43,11 +43,11 @@
ALWAYS_INLINE bool isCachedShader() const { return m_isCachedShader; }
ALWAYS_INLINE bool isPendingShader() const { return m_isPendingShader; }
-
+
virtual PassRefPtr<CSSValue> cssValue() const = 0;
-
+
virtual CachedShader* cachedShader() const { return 0; }
-
+
protected:
StyleShader()
: m_isCachedShader(false)
diff --git a/Source/core/rendering/style/StyleSurroundData.h b/Source/core/rendering/style/StyleSurroundData.h
index c388e71..3d4913f 100644
--- a/Source/core/rendering/style/StyleSurroundData.h
+++ b/Source/core/rendering/style/StyleSurroundData.h
@@ -27,8 +27,8 @@
#include "core/platform/LengthBox.h"
#include "core/rendering/style/BorderData.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -36,7 +36,7 @@
public:
static PassRefPtr<StyleSurroundData> create() { return adoptRef(new StyleSurroundData); }
PassRefPtr<StyleSurroundData> copy() const { return adoptRef(new StyleSurroundData(*this)); }
-
+
bool operator==(const StyleSurroundData& o) const;
bool operator!=(const StyleSurroundData& o) const
{
@@ -47,10 +47,10 @@
LengthBox margin;
LengthBox padding;
BorderData border;
-
+
private:
StyleSurroundData();
- StyleSurroundData(const StyleSurroundData&);
+ StyleSurroundData(const StyleSurroundData&);
};
} // namespace WebCore
diff --git a/Source/core/rendering/style/StyleTransformData.h b/Source/core/rendering/style/StyleTransformData.h
index 92fe9f9..8f59a6d 100644
--- a/Source/core/rendering/style/StyleTransformData.h
+++ b/Source/core/rendering/style/StyleTransformData.h
@@ -27,8 +27,8 @@
#include "core/platform/Length.h"
#include "core/platform/graphics/transforms/TransformOperations.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleVariableData.h b/Source/core/rendering/style/StyleVariableData.h
index c2edb4f..23429f1 100644
--- a/Source/core/rendering/style/StyleVariableData.h
+++ b/Source/core/rendering/style/StyleVariableData.h
@@ -32,10 +32,10 @@
#ifndef StyleVariableData_h
#define StyleVariableData_h
-#include <wtf/Forward.h>
-#include <wtf/HashMap.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/AtomicStringHash.h>
+#include "wtf/Forward.h"
+#include "wtf/HashMap.h"
+#include "wtf/RefCounted.h"
+#include "wtf/text/AtomicStringHash.h"
namespace WebCore {
diff --git a/Source/core/rendering/style/StyleVisualData.h b/Source/core/rendering/style/StyleVisualData.h
index 464cb49..9e29cb0 100644
--- a/Source/core/rendering/style/StyleVisualData.h
+++ b/Source/core/rendering/style/StyleVisualData.h
@@ -27,8 +27,8 @@
#include "core/platform/LengthBox.h"
#include "core/rendering/style/RenderStyleConstants.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefCounted.h"
namespace WebCore {
@@ -57,7 +57,7 @@
private:
StyleVisualData();
- StyleVisualData(const StyleVisualData&);
+ StyleVisualData(const StyleVisualData&);
};
} // namespace WebCore
diff --git a/Source/core/rendering/svg/RenderSVGBlock.cpp b/Source/core/rendering/svg/RenderSVGBlock.cpp
index ad80432..1db2a55 100644
--- a/Source/core/rendering/svg/RenderSVGBlock.cpp
+++ b/Source/core/rendering/svg/RenderSVGBlock.cpp
@@ -43,11 +43,11 @@
return borderRect;
}
-void RenderSVGBlock::setStyle(PassRefPtr<RenderStyle> style)
+void RenderSVGBlock::setStyle(PassRefPtr<RenderStyle> style)
{
RefPtr<RenderStyle> useStyle = style;
- // SVG text layout code expects us to be a block-level style element.
+ // SVG text layout code expects us to be a block-level style element.
if (useStyle->isDisplayInlineType()) {
RefPtr<RenderStyle> newStyle = RenderStyle::create();
newStyle->inheritFrom(useStyle.get());
diff --git a/Source/core/rendering/svg/RenderSVGContainer.cpp b/Source/core/rendering/svg/RenderSVGContainer.cpp
index 25e5356..7b1bf66 100644
--- a/Source/core/rendering/svg/RenderSVGContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGContainer.cpp
@@ -75,7 +75,7 @@
if (m_needsBoundariesUpdate || updatedTransform) {
updateCachedBoundaries();
m_needsBoundariesUpdate = false;
-
+
// If our bounds changed, notify the parents.
RenderSVGModelObject::setNeedsBoundariesUpdate();
}
@@ -140,7 +140,7 @@
child->paint(childPaintInfo, IntPoint());
}
}
-
+
// FIXME: This really should be drawn from local coordinates, but currently we hack it
// to avoid our clip killing our outline rect. Thus we translate our
// outline rect into parent coords before drawing.
@@ -176,7 +176,7 @@
if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
return false;
-
+
for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) {
updateHitTestResult(result, roundedLayoutPoint(localPoint));
diff --git a/Source/core/rendering/svg/RenderSVGContainer.h b/Source/core/rendering/svg/RenderSVGContainer.h
index d8f3c31..f5a40fa 100644
--- a/Source/core/rendering/svg/RenderSVGContainer.h
+++ b/Source/core/rendering/svg/RenderSVGContainer.h
@@ -86,7 +86,7 @@
FloatRect m_repaintBoundingBox;
bool m_needsBoundariesUpdate : 1;
};
-
+
inline RenderSVGContainer* toRenderSVGContainer(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGContainer());
diff --git a/Source/core/rendering/svg/RenderSVGForeignObject.cpp b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
index 632e805..2153235 100644
--- a/Source/core/rendering/svg/RenderSVGForeignObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGForeignObject.cpp
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2006 Apple Computer, Inc.
* Copyright (C) 2009 Google, Inc.
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -34,7 +34,7 @@
namespace WebCore {
-RenderSVGForeignObject::RenderSVGForeignObject(SVGForeignObjectElement* node)
+RenderSVGForeignObject::RenderSVGForeignObject(SVGForeignObjectElement* node)
: RenderSVGBlock(node)
, m_needsTransformUpdate(true)
{
diff --git a/Source/core/rendering/svg/RenderSVGGradientStop.cpp b/Source/core/rendering/svg/RenderSVGGradientStop.cpp
index 274e3a6..f490629 100644
--- a/Source/core/rendering/svg/RenderSVGGradientStop.cpp
+++ b/Source/core/rendering/svg/RenderSVGGradientStop.cpp
@@ -27,7 +27,7 @@
#include "core/svg/SVGStopElement.h"
namespace WebCore {
-
+
using namespace SVGNames;
RenderSVGGradientStop::RenderSVGGradientStop(SVGStopElement* element)
diff --git a/Source/core/rendering/svg/RenderSVGGradientStop.h b/Source/core/rendering/svg/RenderSVGGradientStop.h
index b082bab..4899a14 100644
--- a/Source/core/rendering/svg/RenderSVGGradientStop.h
+++ b/Source/core/rendering/svg/RenderSVGGradientStop.h
@@ -24,7 +24,7 @@
#include "core/rendering/RenderObject.h"
namespace WebCore {
-
+
class SVGGradientElement;
class SVGStopElement;
diff --git a/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp b/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp
index 819b3a9..7f02252 100644
--- a/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGHiddenContainer.cpp
@@ -32,8 +32,8 @@
{
StackStats::LayoutCheckPoint layoutCheckPoint;
ASSERT(needsLayout());
- SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
- setNeedsLayout(false);
+ SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
+ setNeedsLayout(false);
}
void RenderSVGHiddenContainer::paint(PaintInfo&, const LayoutPoint&)
diff --git a/Source/core/rendering/svg/RenderSVGHiddenContainer.h b/Source/core/rendering/svg/RenderSVGHiddenContainer.h
index 99ebaec..ee2b992 100644
--- a/Source/core/rendering/svg/RenderSVGHiddenContainer.h
+++ b/Source/core/rendering/svg/RenderSVGHiddenContainer.h
@@ -23,7 +23,7 @@
#include "core/rendering/svg/RenderSVGContainer.h"
namespace WebCore {
-
+
class SVGStyledElement;
// This class is for containers which are never drawn, but do need to support style
@@ -41,7 +41,7 @@
virtual bool isSVGHiddenContainer() const OVERRIDE FINAL { return true; }
virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL;
-
+
virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject*) const OVERRIDE FINAL { return LayoutRect(); }
virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRIDE FINAL;
diff --git a/Source/core/rendering/svg/RenderSVGImage.cpp b/Source/core/rendering/svg/RenderSVGImage.cpp
index 2d37048..752a4b5 100644
--- a/Source/core/rendering/svg/RenderSVGImage.cpp
+++ b/Source/core/rendering/svg/RenderSVGImage.cpp
@@ -187,7 +187,7 @@
bool isVisible = (style()->visibility() == VISIBLE);
if (isVisible || !hitRules.requireVisible) {
FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
-
+
if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
return false;
diff --git a/Source/core/rendering/svg/RenderSVGInline.cpp b/Source/core/rendering/svg/RenderSVGInline.cpp
index 3791d29..bec0c50 100644
--- a/Source/core/rendering/svg/RenderSVGInline.cpp
+++ b/Source/core/rendering/svg/RenderSVGInline.cpp
@@ -29,7 +29,7 @@
#include "core/rendering/svg/SVGResourcesCache.h"
namespace WebCore {
-
+
RenderSVGInline::RenderSVGInline(Element* element)
: RenderInline(element)
{
diff --git a/Source/core/rendering/svg/RenderSVGInlineText.cpp b/Source/core/rendering/svg/RenderSVGInlineText.cpp
index 626bdc7..f81b3e1 100644
--- a/Source/core/rendering/svg/RenderSVGInlineText.cpp
+++ b/Source/core/rendering/svg/RenderSVGInlineText.cpp
@@ -221,7 +221,7 @@
Document* document = renderer->document();
ASSERT(document);
-
+
StyleResolver* styleResolver = document->styleResolver();
ASSERT(styleResolver);
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp
index f3e5ca8..f3a3d28 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.cpp
+++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp
@@ -1,10 +1,10 @@
/*
* Copyright (c) 2009, Google Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -181,7 +181,7 @@
{
quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())));
}
-
+
bool RenderSVGModelObject::checkIntersection(RenderObject* renderer, const SVGRect& rect)
{
if (!renderer || renderer->style()->pointerEvents() == PE_NONE)
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.h b/Source/core/rendering/svg/RenderSVGModelObject.h
index 5499d02..a6f3886 100644
--- a/Source/core/rendering/svg/RenderSVGModelObject.h
+++ b/Source/core/rendering/svg/RenderSVGModelObject.h
@@ -1,10 +1,10 @@
/*
* Copyright (c) 2009, Google Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/Source/core/rendering/svg/RenderSVGRect.cpp b/Source/core/rendering/svg/RenderSVGRect.cpp
index 6ad7ff9..9d1457e 100644
--- a/Source/core/rendering/svg/RenderSVGRect.cpp
+++ b/Source/core/rendering/svg/RenderSVGRect.cpp
@@ -50,7 +50,7 @@
m_fillBoundingBox = FloatRect();
m_innerStrokeRect = FloatRect();
m_outerStrokeRect = FloatRect();
- SVGRectElement* rect = static_cast<SVGRectElement*>(node());
+ SVGRectElement* rect = toSVGRectElement(node());
ASSERT(rect);
SVGLengthContext lengthContext(rect);
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
index 65ed669..a1875ff 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.cpp
@@ -316,7 +316,7 @@
// Resource was not layouted yet. Give back the boundingBox of the object.
if (selfNeedsLayout())
return object->objectBoundingBox();
-
+
if (m_clipBoundaries.isEmpty())
calculateClipContentRepaintRect();
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.h b/Source/core/rendering/svg/RenderSVGResourceClipper.h
index b464f2b..32e4971 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.h
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.h
@@ -49,7 +49,7 @@
virtual FloatRect resourceBoundingBox(RenderObject*);
virtual RenderSVGResourceType resourceType() const { return ClipperResourceType; }
-
+
bool hitTestClipContent(const FloatRect&, const FloatPoint&);
SVGUnitTypes::SVGUnitType clipPathUnits() const { return static_cast<SVGClipPathElement*>(node())->clipPathUnitsCurrentValue(); }
diff --git a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp
index 9342e7b..4b83d6f 100644
--- a/Source/core/rendering/svg/RenderSVGResourceFilter.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceFilter.cpp
@@ -144,7 +144,7 @@
if (filterData->boundaries.isEmpty())
return false;
- // Determine absolute transformation matrix for filter.
+ // Determine absolute transformation matrix for filter.
AffineTransform absoluteTransform;
SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(object, absoluteTransform);
if (!absoluteTransform.isInvertible())
@@ -222,13 +222,13 @@
m_filter.set(object, filterData.leakPtr());
return false;
}
-
+
// Set the rendering mode from the page's settings.
filterData->filter->setRenderingMode(renderingMode);
GraphicsContext* sourceGraphicContext = sourceGraphic->context();
ASSERT(sourceGraphicContext);
-
+
filterData->sourceGraphicBuffer = sourceGraphic.release();
filterData->savedContext = context;
diff --git a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
index f7c3abd..a23c163 100644
--- a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
@@ -27,7 +27,7 @@
#include "core/platform/graphics/GraphicsContext.h"
#include "core/rendering/svg/RenderSVGShape.h"
#include "core/rendering/svg/SVGRenderSupport.h"
-#include <wtf/UnusedParam.h>
+#include "wtf/UnusedParam.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGResourceGradient.h b/Source/core/rendering/svg/RenderSVGResourceGradient.h
index 343989c..fe04469 100644
--- a/Source/core/rendering/svg/RenderSVGResourceGradient.h
+++ b/Source/core/rendering/svg/RenderSVGResourceGradient.h
@@ -29,7 +29,7 @@
#include "core/rendering/svg/RenderSVGResourceContainer.h"
#include "core/svg/SVGGradientElement.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
index b33cc50..3a9cead 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceMarker.cpp
@@ -170,7 +170,7 @@
SVGMarkerElement* marker = toSVGMarkerElement(node());
ASSERT(marker);
-
+
SVGLengthContext lengthContext(marker);
float w = marker->markerWidthCurrentValue().value(lengthContext);
float h = marker->markerHeightCurrentValue().value(lengthContext);
diff --git a/Source/core/rendering/svg/RenderSVGResourceMarker.h b/Source/core/rendering/svg/RenderSVGResourceMarker.h
index 409c65d..7e83c53 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMarker.h
+++ b/Source/core/rendering/svg/RenderSVGResourceMarker.h
@@ -25,7 +25,7 @@
#include "core/svg/SVGMarkerElement.h"
#include "core/svg/SVGStyledElement.h"
-#include <wtf/HashSet.h>
+#include "wtf/HashSet.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGResourceMasker.cpp b/Source/core/rendering/svg/RenderSVGResourceMasker.cpp
index 6d5f46d..b4790e4 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMasker.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceMasker.cpp
@@ -31,8 +31,8 @@
#include "core/svg/SVGMaskElement.h"
#include "core/svg/SVGUnitTypes.h"
-#include <wtf/UnusedParam.h>
-#include <wtf/Vector.h>
+#include "wtf/UnusedParam.h"
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGResourceMasker.h b/Source/core/rendering/svg/RenderSVGResourceMasker.h
index d159e1f..66a34c6 100644
--- a/Source/core/rendering/svg/RenderSVGResourceMasker.h
+++ b/Source/core/rendering/svg/RenderSVGResourceMasker.h
@@ -28,8 +28,8 @@
#include "core/svg/SVGMaskElement.h"
#include "core/svg/SVGUnitTypes.h"
-#include <wtf/HashMap.h>
-#include <wtf/OwnPtr.h>
+#include "wtf/HashMap.h"
+#include "wtf/OwnPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGResourcePattern.cpp b/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
index 9f09fe9..ff4f87b 100644
--- a/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourcePattern.cpp
@@ -216,7 +216,7 @@
ASSERT(patternElement);
FloatRect objectBoundingBox = renderer->objectBoundingBox();
- patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement);
+ patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement);
if (patternBoundaries.width() <= 0 || patternBoundaries.height() <= 0)
return false;
diff --git a/Source/core/rendering/svg/RenderSVGResourcePattern.h b/Source/core/rendering/svg/RenderSVGResourcePattern.h
index e18bdea..acd7ae6 100644
--- a/Source/core/rendering/svg/RenderSVGResourcePattern.h
+++ b/Source/core/rendering/svg/RenderSVGResourcePattern.h
@@ -30,8 +30,8 @@
#include "core/svg/SVGPatternElement.h"
#include "core/svg/SVGUnitTypes.h"
-#include <wtf/HashMap.h>
-#include <wtf/OwnPtr.h>
+#include "wtf/HashMap.h"
+#include "wtf/OwnPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 1021b51..dc531b2 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -384,7 +384,7 @@
void RenderSVGRoot::computeFloatRectForRepaint(const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed) const
{
- // Apply our local transforms (except for x/y translation), then our shadow,
+ // Apply our local transforms (except for x/y translation), then our shadow,
// and then call RenderBox's method to handle all the normal CSS Box model bits
repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect);
@@ -450,7 +450,7 @@
if (hitTestAction == HitTestBlockBackground && visibleToHitTestRequest(request)) {
// Only return true here, if the last hit testing phase 'BlockBackground' is executed. If we'd return true in the 'Foreground' phase,
// hit testing would stop immediately. For SVG only trees this doesn't matter. Though when we have a <foreignObject> subtree we need
- // to be able to detect hits on the background of a <div> element. If we'd return true here in the 'Foreground' phase, we are not able
+ // to be able to detect hits on the background of a <div> element. If we'd return true here in the 'Foreground' phase, we are not able
// to detect these hits anymore.
LayoutRect boundsRect(accumulatedOffset + location(), size());
if (locationInContainer.intersects(boundsRect)) {
diff --git a/Source/core/rendering/svg/RenderSVGRoot.h b/Source/core/rendering/svg/RenderSVGRoot.h
index 405c664..e0b0998 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.h
+++ b/Source/core/rendering/svg/RenderSVGRoot.h
@@ -60,7 +60,7 @@
virtual bool hasRelativeIntrinsicLogicalWidth() const OVERRIDE;
virtual bool hasRelativeLogicalHeight() const OVERRIDE;
- // localToBorderBoxTransform maps local SVG viewport coordinates to local CSS box coordinates.
+ // localToBorderBoxTransform maps local SVG viewport coordinates to local CSS box coordinates.
const AffineTransform& localToBorderBoxTransform() const { return m_localToBorderBoxTransform; }
// The flag is cleared at the beginning of each layout() pass. Elements then call this
@@ -128,13 +128,13 @@
};
inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGRoot());
return static_cast<RenderSVGRoot*>(object);
}
inline const RenderSVGRoot* toRenderSVGRoot(const RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGRoot());
return static_cast<const RenderSVGRoot*>(object);
}
diff --git a/Source/core/rendering/svg/RenderSVGShape.cpp b/Source/core/rendering/svg/RenderSVGShape.cpp
index 5272fdf..e4f3131 100644
--- a/Source/core/rendering/svg/RenderSVGShape.cpp
+++ b/Source/core/rendering/svg/RenderSVGShape.cpp
@@ -41,7 +41,7 @@
#include "core/rendering/svg/SVGResources.h"
#include "core/rendering/svg/SVGResourcesCache.h"
#include "core/svg/SVGGraphicsElement.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGShape.h b/Source/core/rendering/svg/RenderSVGShape.h
index 5c01796..386ff9c 100644
--- a/Source/core/rendering/svg/RenderSVGShape.h
+++ b/Source/core/rendering/svg/RenderSVGShape.h
@@ -30,8 +30,8 @@
#include "core/platform/graphics/transforms/AffineTransform.h"
#include "core/rendering/svg/RenderSVGModelObject.h"
#include "core/rendering/svg/SVGMarkerData.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/Vector.h>
+#include "wtf/OwnPtr.h"
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/RenderSVGText.cpp b/Source/core/rendering/svg/RenderSVGText.cpp
index 1720601..4f79c74 100644
--- a/Source/core/rendering/svg/RenderSVGText.cpp
+++ b/Source/core/rendering/svg/RenderSVGText.cpp
@@ -54,7 +54,7 @@
namespace WebCore {
-RenderSVGText::RenderSVGText(SVGTextElement* node)
+RenderSVGText::RenderSVGText(SVGTextElement* node)
: RenderSVGBlock(node)
, m_needsReordering(false)
, m_needsPositioningValuesUpdate(false)
@@ -432,7 +432,7 @@
setNeedsLayout(false);
}
-RootInlineBox* RenderSVGText::createRootInlineBox()
+RootInlineBox* RenderSVGText::createRootInlineBox()
{
RootInlineBox* box = new (renderArena()) SVGRootInlineBox(this);
box->setHasVirtualLogicalHeight();
@@ -449,7 +449,7 @@
FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
- return false;
+ return false;
HitTestLocation hitTestLocation(LayoutPoint(flooredIntPoint(localPoint)));
return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoint(), hitTestAction);
diff --git a/Source/core/rendering/svg/RenderSVGTextPath.cpp b/Source/core/rendering/svg/RenderSVGTextPath.cpp
index 022afad..a1fbae3 100644
--- a/Source/core/rendering/svg/RenderSVGTextPath.cpp
+++ b/Source/core/rendering/svg/RenderSVGTextPath.cpp
@@ -39,9 +39,9 @@
Element* targetElement = SVGURIReference::targetElementFromIRIString(textPathElement->hrefCurrentValue(), textPathElement->document());
if (!targetElement || !targetElement->hasTagName(SVGNames::pathTag))
return Path();
-
+
SVGPathElement* pathElement = toSVGPathElement(targetElement);
-
+
Path pathData;
updatePathFromGraphicsElement(pathElement, pathData);
diff --git a/Source/core/rendering/svg/RenderSVGTextPath.h b/Source/core/rendering/svg/RenderSVGTextPath.h
index 930b9da..3990a90 100644
--- a/Source/core/rendering/svg/RenderSVGTextPath.h
+++ b/Source/core/rendering/svg/RenderSVGTextPath.h
@@ -43,7 +43,7 @@
};
inline RenderSVGTextPath* toRenderSVGTextPath(RenderObject* object)
-{
+{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGTextPath());
return static_cast<RenderSVGTextPath*>(object);
}
diff --git a/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp b/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp
index d53d892..4b7bb9f 100644
--- a/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGTransformableContainer.cpp
@@ -29,7 +29,7 @@
#include "core/svg/SVGUseElement.h"
namespace WebCore {
-
+
RenderSVGTransformableContainer::RenderSVGTransformableContainer(SVGGraphicsElement* node)
: RenderSVGContainer(node)
, m_needsTransformUpdate(true)
diff --git a/Source/core/rendering/svg/RenderSVGTransformableContainer.h b/Source/core/rendering/svg/RenderSVGTransformableContainer.h
index e6f8ef4..6aa752a 100644
--- a/Source/core/rendering/svg/RenderSVGTransformableContainer.h
+++ b/Source/core/rendering/svg/RenderSVGTransformableContainer.h
@@ -24,7 +24,7 @@
#include "core/rendering/svg/RenderSVGContainer.h"
namespace WebCore {
-
+
class SVGGraphicsElement;
class RenderSVGTransformableContainer FINAL : public RenderSVGContainer {
public:
diff --git a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
index 8cb7ee8..67c82e5 100644
--- a/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
+++ b/Source/core/rendering/svg/RenderSVGViewportContainer.cpp
@@ -117,12 +117,12 @@
}
}
-bool RenderSVGViewportContainer::calculateLocalTransform()
+bool RenderSVGViewportContainer::calculateLocalTransform()
{
m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::transformToRootChanged(parent());
if (!m_needsTransformUpdate)
return false;
-
+
m_localToParentTransform = AffineTransform::translation(m_viewport.x(), m_viewport.y()) * viewportTransform();
m_needsTransformUpdate = false;
return true;
@@ -143,7 +143,7 @@
// Respect the viewport clip (which is in parent coords)
if (!SVGRenderSupport::isOverflowHidden(this))
return true;
-
+
return m_viewport.contains(pointInParent);
}
diff --git a/Source/core/rendering/svg/RenderSVGViewportContainer.h b/Source/core/rendering/svg/RenderSVGViewportContainer.h
index a1183e9..3416ede 100644
--- a/Source/core/rendering/svg/RenderSVGViewportContainer.h
+++ b/Source/core/rendering/svg/RenderSVGViewportContainer.h
@@ -61,7 +61,7 @@
bool m_isLayoutSizeChanged : 1;
bool m_needsTransformUpdate : 1;
};
-
+
inline RenderSVGViewportContainer* toRenderSVGViewportContainer(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isSVGViewportContainer());
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index 0b94074..cb54b01 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -106,7 +106,7 @@
float SVGInlineTextBox::positionForOffset(int) const
{
- // SVG doesn't use the offset <-> position selection system.
+ // SVG doesn't use the offset <-> position selection system.
ASSERT_NOT_REACHED();
return 0;
}
diff --git a/Source/core/rendering/svg/SVGMarkerData.h b/Source/core/rendering/svg/SVGMarkerData.h
index 04be518..61f90a3 100644
--- a/Source/core/rendering/svg/SVGMarkerData.h
+++ b/Source/core/rendering/svg/SVGMarkerData.h
@@ -22,7 +22,7 @@
#include "core/platform/FloatConversion.h"
#include "core/platform/graphics/Path.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGPathData.cpp b/Source/core/rendering/svg/SVGPathData.cpp
index b15fe3d..707f548 100644
--- a/Source/core/rendering/svg/SVGPathData.cpp
+++ b/Source/core/rendering/svg/SVGPathData.cpp
@@ -30,7 +30,7 @@
#include "core/svg/SVGPolygonElement.h"
#include "core/svg/SVGPolylineElement.h"
#include "core/svg/SVGRectElement.h"
-#include <wtf/HashMap.h>
+#include "wtf/HashMap.h"
namespace WebCore {
@@ -111,8 +111,7 @@
static void updatePathFromRectElement(SVGElement* element, Path& path)
{
- ASSERT(element->hasTagName(SVGNames::rectTag));
- SVGRectElement* rect = static_cast<SVGRectElement*>(element);
+ SVGRectElement* rect = toSVGRectElement(element);
SVGLengthContext lengthContext(element);
float width = rect->widthCurrentValue().value(lengthContext);
diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp
index 7b0bf85..b87001c 100644
--- a/Source/core/rendering/svg/SVGRenderSupport.cpp
+++ b/Source/core/rendering/svg/SVGRenderSupport.cpp
@@ -38,7 +38,7 @@
#include "core/rendering/svg/SVGResources.h"
#include "core/rendering/svg/SVGResourcesCache.h"
#include "core/svg/SVGStyledElement.h"
-#include <wtf/UnusedParam.h>
+#include "wtf/UnusedParam.h"
namespace WebCore {
@@ -86,8 +86,8 @@
transformState.applyTransform(object->localToParentTransform());
RenderObject* parent = object->parent();
-
- // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
+
+ // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
// to map an element from SVG viewport coordinates to CSS box coordinates.
// RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates.
if (parent->isSVGRoot())
@@ -103,7 +103,7 @@
RenderObject* parent = object->parent();
- // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
+ // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
// to map an element from SVG viewport coordinates to CSS box coordinates.
// RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates.
if (parent->isSVGRoot()) {
diff --git a/Source/core/rendering/svg/SVGRenderTreeAsText.cpp b/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
index fc5b9a6..f6b6dde 100644
--- a/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
+++ b/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
@@ -331,7 +331,7 @@
SVGLengthContext lengthContext(svgElement);
if (svgElement->hasTagName(SVGNames::rectTag)) {
- SVGRectElement* element = static_cast<SVGRectElement*>(svgElement);
+ SVGRectElement* element = toSVGRectElement(svgElement);
writeNameValuePair(ts, "x", element->xCurrentValue().value(lengthContext));
writeNameValuePair(ts, "y", element->yCurrentValue().value(lengthContext));
writeNameValuePair(ts, "width", element->widthCurrentValue().value(lengthContext));
@@ -379,7 +379,7 @@
return;
ts << " " << enclosingIntRect(FloatRect(text.location(), FloatSize(box->logicalWidth(), box->logicalHeight())));
-
+
// FIXME: Remove this hack, once the new text layout engine is completly landed. We want to preserve the old layout test results for now.
ts << " contains 1 chunk(s)";
@@ -486,7 +486,7 @@
Element* element = toElement(object.node());
const AtomicString& id = element->getIdAttribute();
- writeNameAndQuotedValue(ts, "id", id);
+ writeNameAndQuotedValue(ts, "id", id);
RenderSVGResourceContainer* resource = const_cast<RenderObject&>(object).toRenderSVGResourceContainer();
ASSERT(resource);
diff --git a/Source/core/rendering/svg/SVGRenderingContext.h b/Source/core/rendering/svg/SVGRenderingContext.h
index 254aad8..2393106 100644
--- a/Source/core/rendering/svg/SVGRenderingContext.h
+++ b/Source/core/rendering/svg/SVGRenderingContext.h
@@ -35,7 +35,7 @@
class FloatRect;
class RenderSVGResourceFilter;
-// SVGRenderingContext
+// SVGRenderingContext
class SVGRenderingContext {
public:
enum NeedsGraphicsContextSave {
diff --git a/Source/core/rendering/svg/SVGResources.cpp b/Source/core/rendering/svg/SVGResources.cpp
index ce31a0b..c0d955b 100644
--- a/Source/core/rendering/svg/SVGResources.cpp
+++ b/Source/core/rendering/svg/SVGResources.cpp
@@ -384,7 +384,7 @@
break;
case ClipperResourceType:
if (!m_clipperFilterMaskerData)
- break;
+ break;
if (m_clipperFilterMaskerData->clipper == resource) {
m_clipperFilterMaskerData->clipper->removeAllClientsFromCache();
m_clipperFilterMaskerData->clipper = 0;
diff --git a/Source/core/rendering/svg/SVGResources.h b/Source/core/rendering/svg/SVGResources.h
index 06dd57f..b432208 100644
--- a/Source/core/rendering/svg/SVGResources.h
+++ b/Source/core/rendering/svg/SVGResources.h
@@ -20,10 +20,10 @@
#ifndef SVGResources_h
#define SVGResources_h
-#include <wtf/HashSet.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
+#include "wtf/HashSet.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGResourcesCycleSolver.cpp b/Source/core/rendering/svg/SVGResourcesCycleSolver.cpp
index 2d1fff3..aad9086 100644
--- a/Source/core/rendering/svg/SVGResourcesCycleSolver.cpp
+++ b/Source/core/rendering/svg/SVGResourcesCycleSolver.cpp
@@ -73,8 +73,8 @@
SVGResources* childResources = SVGResourcesCache::cachedResourcesForRenderObject(child);
if (!childResources)
continue;
-
- // A child of the given 'resource' contains resources.
+
+ // A child of the given 'resource' contains resources.
HashSet<RenderSVGResourceContainer*> childSet;
childResources->buildSetOfResources(childSet);
diff --git a/Source/core/rendering/svg/SVGResourcesCycleSolver.h b/Source/core/rendering/svg/SVGResourcesCycleSolver.h
index 07d50ae..cadaa5a 100644
--- a/Source/core/rendering/svg/SVGResourcesCycleSolver.h
+++ b/Source/core/rendering/svg/SVGResourcesCycleSolver.h
@@ -20,8 +20,8 @@
#ifndef SVGResourcesCycleSolver_h
#define SVGResourcesCycleSolver_h
-#include <wtf/HashSet.h>
-#include <wtf/Noncopyable.h>
+#include "wtf/HashSet.h"
+#include "wtf/Noncopyable.h"
namespace WebCore {
@@ -43,7 +43,7 @@
RenderObject* m_renderer;
SVGResources* m_resources;
- HashSet<RenderSVGResourceContainer*> m_allResources;
+ HashSet<RenderSVGResourceContainer*> m_allResources;
};
}
diff --git a/Source/core/rendering/svg/SVGSubpathData.h b/Source/core/rendering/svg/SVGSubpathData.h
index 026e1ad..1ab5294 100644
--- a/Source/core/rendering/svg/SVGSubpathData.h
+++ b/Source/core/rendering/svg/SVGSubpathData.h
@@ -21,7 +21,7 @@
#define SVGSubpathData_h
#include "core/platform/graphics/Path.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextChunkBuilder.h b/Source/core/rendering/svg/SVGTextChunkBuilder.h
index c7ac484..1830b2a 100644
--- a/Source/core/rendering/svg/SVGTextChunkBuilder.h
+++ b/Source/core/rendering/svg/SVGTextChunkBuilder.h
@@ -21,7 +21,7 @@
#define SVGTextChunkBuilder_h
#include "core/rendering/svg/SVGTextChunk.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextLayoutAttributes.cpp b/Source/core/rendering/svg/SVGTextLayoutAttributes.cpp
index 06e1857..ddf5ba9 100644
--- a/Source/core/rendering/svg/SVGTextLayoutAttributes.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutAttributes.cpp
@@ -18,11 +18,11 @@
*/
#include "config.h"
-
#include "core/rendering/svg/SVGTextLayoutAttributes.h"
#include <stdio.h>
-#include <wtf/text/CString.h>
+
+#include "wtf/text/CString.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextLayoutAttributes.h b/Source/core/rendering/svg/SVGTextLayoutAttributes.h
index 0e2f530..924a98e 100644
--- a/Source/core/rendering/svg/SVGTextLayoutAttributes.h
+++ b/Source/core/rendering/svg/SVGTextLayoutAttributes.h
@@ -21,10 +21,10 @@
#define SVGTextLayoutAttributes_h
#include "core/rendering/svg/SVGTextMetrics.h"
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/text/WTFString.h>
-#include <wtf/Vector.h>
+#include "wtf/HashMap.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -52,7 +52,7 @@
static float emptyValue();
RenderSVGInlineText* context() const { return m_context; }
-
+
SVGCharacterDataMap& characterDataMap() { return m_characterDataMap; }
const SVGCharacterDataMap& characterDataMap() const { return m_characterDataMap; }
diff --git a/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.cpp b/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
index e7bb42b..7c65a7e 100644
--- a/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
@@ -89,7 +89,7 @@
return;
}
- unsigned textLength = text->textLength();
+ unsigned textLength = text->textLength();
for (unsigned textPosition = 0; textPosition < textLength; ++textPosition) {
UChar currentCharacter = text->characterAt(textPosition);
if (currentCharacter == ' ' && lastCharacter == ' ')
@@ -104,7 +104,7 @@
{
ASSERT(!start->isSVGText() || m_textPositions.isEmpty());
- for (RenderObject* child = start->firstChild(); child; child = child->nextSibling()) {
+ for (RenderObject* child = start->firstChild(); child; child = child->nextSibling()) {
if (child->isSVGInlineText()) {
processRenderSVGInlineText(toRenderSVGInlineText(child), m_textLength, lastCharacter);
continue;
@@ -154,7 +154,7 @@
data.y = 0;
}
- // Fill character data map using child text positioning elements in top-down order.
+ // Fill character data map using child text positioning elements in top-down order.
unsigned size = m_textPositions.size();
for (unsigned i = 0; i < size; ++i)
fillCharacterDataMap(m_textPositions[i]);
diff --git a/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.h b/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.h
index f0e6fb0..d92c125 100644
--- a/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.h
+++ b/Source/core/rendering/svg/SVGTextLayoutAttributesBuilder.h
@@ -21,7 +21,7 @@
#define SVGTextLayoutAttributesBuilder_h
#include "core/rendering/svg/SVGTextMetricsBuilder.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
index 793d14b..2fca5c2 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
@@ -62,7 +62,7 @@
// Replace characters x/y position, with the current text position plus any
// relative adjustments, if it doesn't specify an absolute position itself.
- if (x == SVGTextLayoutAttributes::emptyValue())
+ if (x == SVGTextLayoutAttributes::emptyValue())
x = m_x + m_dx;
if (y == SVGTextLayoutAttributes::emptyValue())
@@ -428,7 +428,7 @@
return;
SVGElement* lengthContext = toSVGElement(text->parent()->node());
-
+
RenderObject* textParent = text->parent();
bool definesTextLength = textParent ? parentDefinesTextLength(textParent) : false;
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngine.h b/Source/core/rendering/svg/SVGTextLayoutEngine.h
index a68813d..3c6feca 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngine.h
+++ b/Source/core/rendering/svg/SVGTextLayoutEngine.h
@@ -25,7 +25,7 @@
#include "core/rendering/svg/SVGTextFragment.h"
#include "core/rendering/svg/SVGTextLayoutAttributes.h"
#include "core/rendering/svg/SVGTextMetrics.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.h b/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.h
index db23b7c..f483464 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.h
+++ b/Source/core/rendering/svg/SVGTextLayoutEngineBaseline.h
@@ -21,7 +21,7 @@
#define SVGTextLayoutEngineBaseline_h
#include "core/rendering/style/SVGRenderStyleDefs.h"
-#include <wtf/Noncopyable.h>
+#include "wtf/Noncopyable.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
index b2360f0..5eb5530 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
@@ -30,7 +30,7 @@
#include "core/svg/SVGFontElement.h"
#include "core/svg/SVGFontFaceElement.h"
#else
-#include <wtf/UnusedParam.h>
+#include "wtf/UnusedParam.h"
#endif
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextMetrics.h b/Source/core/rendering/svg/SVGTextMetrics.h
index 227bb1b..3f1ddea 100644
--- a/Source/core/rendering/svg/SVGTextMetrics.h
+++ b/Source/core/rendering/svg/SVGTextMetrics.h
@@ -20,7 +20,7 @@
#ifndef SVGTextMetrics_h
#define SVGTextMetrics_h
-#include <wtf/text/WTFString.h>
+#include "wtf/text/WTFString.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextMetricsBuilder.h b/Source/core/rendering/svg/SVGTextMetricsBuilder.h
index cf0b070..6c3148a 100644
--- a/Source/core/rendering/svg/SVGTextMetricsBuilder.h
+++ b/Source/core/rendering/svg/SVGTextMetricsBuilder.h
@@ -24,7 +24,7 @@
#include "core/platform/graphics/WidthIterator.h"
#include "core/rendering/svg/SVGTextLayoutAttributes.h"
#include "core/rendering/svg/SVGTextMetrics.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextQuery.cpp b/Source/core/rendering/svg/SVGTextQuery.cpp
index 27c7170..c04fcf5 100644
--- a/Source/core/rendering/svg/SVGTextQuery.cpp
+++ b/Source/core/rendering/svg/SVGTextQuery.cpp
@@ -28,7 +28,7 @@
#include "core/rendering/svg/SVGInlineTextBox.h"
#include "core/rendering/svg/SVGTextMetrics.h"
-#include <wtf/MathExtras.h>
+#include "wtf/MathExtras.h"
namespace WebCore {
@@ -120,7 +120,7 @@
queryData->isVerticalText = queryData->textRenderer->style()->svgStyle()->isVerticalWritingMode();
const Vector<SVGTextFragment>& fragments = queryData->textBox->textFragments();
-
+
// Loop over all text fragments in this text box, firing a callback for each.
unsigned fragmentCount = fragments.size();
for (unsigned i = 0; i < fragmentCount; ++i) {
diff --git a/Source/core/rendering/svg/SVGTextQuery.h b/Source/core/rendering/svg/SVGTextQuery.h
index 1a99cd3..652d751 100644
--- a/Source/core/rendering/svg/SVGTextQuery.h
+++ b/Source/core/rendering/svg/SVGTextQuery.h
@@ -23,7 +23,7 @@
#include "core/rendering/svg/SVGTextFragment.h"
#include "core/svg/SVGPoint.h"
#include "core/svg/SVGRect.h"
-#include <wtf/Vector.h>
+#include "wtf/Vector.h"
namespace WebCore {
diff --git a/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp b/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
index 9c962a5..eaf0196 100644
--- a/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
+++ b/Source/core/rendering/svg/SVGTextRunRenderingContext.cpp
@@ -81,7 +81,7 @@
glyphName = it.lastGlyphName();
return it.runWidthSoFar();
}
-
+
void SVGTextRunRenderingContext::drawSVGGlyphs(GraphicsContext* context, const TextRun& run, const SimpleFontData* fontData, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point) const
{
SVGFontElement* fontElement = 0;
@@ -104,7 +104,7 @@
solidPaintingResource->setColor(context->fillColor());
activePaintingResource = solidPaintingResource;
}
-
+
bool isVerticalText = false;
if (parentRenderObject) {
parentRenderObjectStyle = parentRenderObject->style();