https://bugs.webkit.org/show_bug.cgi?id=69009
Reviewed by Simon Fraser.
.:
* Source/autotools/symbols.filter:
Source/WebCore:
Upcoming patches may make use of absoluteBoundingBoxRect on a const RenderObject, so this needed to be fixed.
Making useTransforms default to true instead of false and replacing instances of absoluteBoundingBoxRect() to
absoluteBoundingBoxRectIgnoringTransforms() partially addreses // FIXME: useTransforms should go away eventually.
* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::screenRect):
* dom/Node.cpp:
(WebCore::Node::getRect):
(WebCore::Node::renderRect):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
* inspector/DOMNodeHighlighter.cpp:
* plugins/IFrameShimSupport.cpp:
(WebCore::getPluginOcclusions):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteRects):
(WebCore::RenderBlock::absoluteQuads):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteRects):
(WebCore::RenderBox::absoluteQuads):
* rendering/RenderBox.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore::RenderInline::culledInlineAbsoluteRects):
(WebCore::RenderInline::absoluteQuads):
(WebCore::RenderInline::culledInlineAbsoluteQuads):
* rendering/RenderInline.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::absoluteBoundingBoxRect):
(WebCore::RenderObject::addAbsoluteRectForLayer):
(WebCore::RenderObject::paintingRootRect):
* rendering/RenderObject.h:
(WebCore::RenderObject::absoluteRects):
(WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms):
(WebCore::RenderObject::absoluteQuads):
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRects):
(WebCore::RenderText::absoluteQuads):
* rendering/RenderText.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::showPopup):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
(WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
* rendering/RenderView.cpp:
(WebCore::RenderView::absoluteRects):
(WebCore::RenderView::absoluteQuads):
* rendering/RenderView.h:
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::absoluteRects):
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGHiddenContainer.cpp:
(WebCore::RenderSVGHiddenContainer::absoluteQuads):
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::absoluteQuads):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::absoluteRects):
(WebCore::RenderSVGModelObject::absoluteQuads):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::absoluteQuads):
* rendering/svg/RenderSVGText.h:
* testing/Internals.cpp:
(WebCore::Internals::boundingBox):
Source/WebKit/qt:
* Api/qwebframe.cpp:
(QWebHitTestResultPrivate::QWebHitTestResultPrivate):
Source/WebKit2:
* win/WebKit2.def:
* win/WebKit2CFLite.def:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96859
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-10-06 Fady Samuel <fsamuel@chromium.org>
+
+ Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false
+ https://bugs.webkit.org/show_bug.cgi?id=69009
+
+ Reviewed by Simon Fraser.
+
+ * Source/autotools/symbols.filter:
+
2011-10-06 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][Wk2] Fix build with Qt 5 when QtScript is built as standalone module
+2011-10-06 Fady Samuel <fsamuel@chromium.org>
+
+ Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false
+ https://bugs.webkit.org/show_bug.cgi?id=69009
+
+ Reviewed by Simon Fraser.
+
+ Upcoming patches may make use of absoluteBoundingBoxRect on a const RenderObject, so this needed to be fixed.
+ Making useTransforms default to true instead of false and replacing instances of absoluteBoundingBoxRect() to
+ absoluteBoundingBoxRectIgnoringTransforms() partially addreses // FIXME: useTransforms should go away eventually.
+
+ * WebCore.exp.in:
+ * dom/Element.cpp:
+ (WebCore::Element::screenRect):
+ * dom/Node.cpp:
+ (WebCore::Node::getRect):
+ (WebCore::Node::renderRect):
+ * html/shadow/SliderThumbElement.cpp:
+ (WebCore::SliderThumbElement::setPositionFromPoint):
+ * html/shadow/TextControlInnerElements.cpp:
+ (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
+ * inspector/DOMNodeHighlighter.cpp:
+ * plugins/IFrameShimSupport.cpp:
+ (WebCore::getPluginOcclusions):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::absoluteRects):
+ (WebCore::RenderBlock::absoluteQuads):
+ * rendering/RenderBlock.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::absoluteRects):
+ (WebCore::RenderBox::absoluteQuads):
+ * rendering/RenderBox.h:
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::paintObject):
+ * rendering/RenderIFrame.cpp:
+ (WebCore::RenderIFrame::flattenFrame):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::absoluteRects):
+ (WebCore::RenderInline::culledInlineAbsoluteRects):
+ (WebCore::RenderInline::absoluteQuads):
+ (WebCore::RenderInline::culledInlineAbsoluteQuads):
+ * rendering/RenderInline.h:
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::showPopup):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::absoluteBoundingBoxRect):
+ (WebCore::RenderObject::addAbsoluteRectForLayer):
+ (WebCore::RenderObject::paintingRootRect):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::absoluteRects):
+ (WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms):
+ (WebCore::RenderObject::absoluteQuads):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::absoluteRects):
+ (WebCore::RenderText::absoluteQuads):
+ * rendering/RenderText.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::showPopup):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
+ (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration):
+ (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::absoluteRects):
+ (WebCore::RenderView::absoluteQuads):
+ * rendering/RenderView.h:
+ * rendering/svg/RenderSVGBlock.cpp:
+ (WebCore::RenderSVGBlock::absoluteRects):
+ * rendering/svg/RenderSVGBlock.h:
+ * rendering/svg/RenderSVGHiddenContainer.cpp:
+ (WebCore::RenderSVGHiddenContainer::absoluteQuads):
+ * rendering/svg/RenderSVGHiddenContainer.h:
+ * rendering/svg/RenderSVGInline.cpp:
+ (WebCore::RenderSVGInline::absoluteQuads):
+ * rendering/svg/RenderSVGInline.h:
+ * rendering/svg/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::absoluteRects):
+ (WebCore::RenderSVGModelObject::absoluteQuads):
+ * rendering/svg/RenderSVGModelObject.h:
+ * rendering/svg/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::absoluteQuads):
+ * rendering/svg/RenderSVGText.h:
+ * testing/Internals.cpp:
+ (WebCore::Internals::boundingBox):
+
2011-10-06 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][Wk2] Fix build with Qt 5 when QtScript is built as standalone module
__ZN7WebCore12PrintContextC1EPNS_5FrameE
__ZN7WebCore12PrintContextD1Ev
__ZN7WebCore12RenderObject16repaintRectangleERKNS_7IntRectEb
-__ZN7WebCore12RenderObject23absoluteBoundingBoxRectEb
__ZN7WebCore12RenderWidget28resumeWidgetHierarchyUpdatesEv
__ZN7WebCore12RenderWidget29suspendWidgetHierarchyUpdatesEv
__ZN7WebCore12SharedBuffer10wrapNSDataEP6NSData
__ZNK7WebCore12IconDatabase12databasePathEv
__ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
__ZNK7WebCore12IconDatabase9isEnabledEv
+__ZNK7WebCore12RenderObject23absoluteBoundingBoxRectEb
__ZNK7WebCore12RenderObject14enclosingLayerEv
__ZNK7WebCore12RenderObject15localToAbsoluteERKNS_10FloatPointEbb
__ZNK7WebCore12RenderObject4viewEv
{
if (!renderer())
return LayoutRect();
- return renderer()->view()->frameView()->contentsToScreen(renderer()->absoluteBoundingBoxRect());
+ // FIXME: this should probably respect transforms
+ return renderer()->view()->frameView()->contentsToScreen(renderer()->absoluteBoundingBoxRectIgnoringTransforms());
}
static inline bool shouldIgnoreAttributeCase(const Element* e)
LayoutRect Node::getRect() const
{
if (renderer())
- return renderer()->absoluteBoundingBoxRect(true);
+ return renderer()->absoluteBoundingBoxRect();
return LayoutRect();
}
while (renderer && !renderer->isBody() && !renderer->isRoot()) {
if (renderer->isRenderBlock() || renderer->isInlineBlockOrInlineTable() || renderer->isReplaced()) {
*isReplaced = renderer->isReplaced();
- return renderer->absoluteBoundingBoxRect(true);
+ return renderer->absoluteBoundingBoxRect();
}
renderer = renderer->parent();
}
// We need to calculate currentPosition from absolute points becaue the
// renderer for this node is usually on a layer and renderBox()->x() and
// y() are unusable.
- LayoutPoint absoluteThumbOrigin = renderBox()->absoluteBoundingBoxRect().location();
+ // FIXME: This should probably respect transforms.
+ LayoutPoint absoluteThumbOrigin = renderBox()->absoluteBoundingBoxRectIgnoringTransforms().location();
LayoutPoint absoluteSliderContentOrigin = roundedLayoutPoint(input->renderer()->localToAbsolute());
if (isVertical) {
trackSize = input->renderBox()->contentHeight() - renderBox()->height();
RefPtr<HTMLInputElement> input = static_cast<HTMLInputElement*>(shadowAncestorNode());
AtomicString language = input->computeInheritedLanguage();
String grammar = input->getAttribute(webkitgrammarAttr);
- IntRect rect = renderer()->absoluteBoundingBoxRect();
+ // FIXME: this should probably respect transforms
+ IntRect rect = renderer()->absoluteBoundingBoxRectIgnoringTransforms();
if (speechInput()->startRecognition(m_listenerId, rect, language, grammar, document()->securityOrigin()))
setState(Recording);
}
return;
LayoutSize mainFrameOffset = frameToMainFrameOffset(containingFrame);
- LayoutRect boundingBox = renderer->absoluteBoundingBoxRect(true);
+ LayoutRect boundingBox = renderer->absoluteBoundingBoxRect();
boundingBox.move(mainFrameOffset);
RenderObject* iframeRenderer = element->renderer();
if (element->hasTagName(HTMLNames::iframeTag)
- && iframeRenderer->absoluteBoundingBoxRect().intersects(frameRect)
+ && iframeRenderer->absoluteBoundingBoxRectIgnoringTransforms().intersects(frameRect)
&& (!iframeRenderer->style() || iframeRenderer->style()->visibility() == VISIBLE)) {
getObjectStack(iframeRenderer, &iframeZstack);
if (iframeIsAbovePlugin(iframeZstack, pluginZstack)) {
m_rareData->m_pageLogicalOffset = logicalOffset;
}
-void RenderBlock::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
+void RenderBlock::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
// For blocks inside inlines, we go ahead and include margins so that we run right up to the
// inline boxes above and below us (thus getting merged with them to form a single irregular
rects.append(LayoutRect(accumulatedOffset, size()));
}
-void RenderBlock::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderBlock::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
// For blocks inside inlines, we go ahead and include margins so that we run right up to the
// inline boxes above and below us (thus getting merged with them to form a single irregular
LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, LayoutUnit position);
LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit position);
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
LayoutUnit desiredColumnWidth() const;
unsigned desiredColumnCount() const;
layer()->scrollToYOffset(newTop, RenderLayer::ScrollOffsetClamped);
}
-void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset)
+void RenderBox::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(LayoutRect(accumulatedOffset, size()));
}
-void RenderBox::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderBox::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
quads.append(localToAbsoluteQuad(FloatRect(0, 0, width(), height()), false, wasFixed));
}
virtual LayoutUnit collapsedMarginBefore() const { return marginBefore(); }
virtual LayoutUnit collapsedMarginAfter() const { return marginAfter(); }
- virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset);
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const;
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
IntRect reflectionBox() const;
int reflectionOffset() const;
textX = contentLeft + contentWidth() - buttonAndIconWidth - font.width(textRun);
// We want to match the button's baseline
RenderButton* buttonRenderer = toRenderButton(button->renderer());
- LayoutUnit textY = buttonRenderer->absoluteBoundingBoxRect().y()
+ // FIXME: Make this work with transforms.
+ LayoutUnit textY = buttonRenderer->absoluteBoundingBoxRectIgnoringTransforms().y()
+ buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine);
paintInfo.context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
return false;
// Do not flatten offscreen inner frames during frame flattening, as flattening might make them visible.
- IntRect boundingRect = absoluteBoundingBoxRect();
+ IntRect boundingRect = absoluteBoundingBoxRectIgnoringTransforms();
return boundingRect.maxX() > 0 && boundingRect.maxY() > 0;
}
m_lineBoxes.paint(this, paintInfo, paintOffset);
}
-void RenderInline::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
+void RenderInline::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
if (!alwaysCreateLineBoxes())
culledInlineAbsoluteRects(this, rects, toLayoutSize(accumulatedOffset));
}
}
-void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>& rects, const LayoutSize& offset)
+void RenderInline::culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>& rects, const LayoutSize& offset) const
{
if (!culledInlineFirstLineBox()) {
rects.append(IntRect(offset.width(), offset.height(), 0, 0));
}
}
-void RenderInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
if (!alwaysCreateLineBoxes())
culledInlineAbsoluteQuads(this, quads);
continuation()->absoluteQuads(quads, wasFixed);
}
-void RenderInline::culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>& quads)
+void RenderInline::culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>& quads) const
{
if (!culledInlineFirstLineBox()) {
quads.append(localToAbsoluteQuad(FloatRect()));
virtual LayoutUnit marginStart() const;
virtual LayoutUnit marginEnd() const;
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&) const;
LayoutRect culledInlineVisualOverflowBoundingBox() const;
InlineBox* culledInlineFirstLineBox() const;
InlineBox* culledInlineLastLineBox() const;
- void culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>&, const LayoutSize&);
- void culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>&);
+ void culledInlineAbsoluteRects(const RenderInline* container, Vector<LayoutRect>&, const LayoutSize&) const;
+ void culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>&) const;
void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChild);
virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObject* beforeChild = 0);
// Compute the top left taking transforms into account, but use
// the actual width of the element to size the popup.
FloatPoint absTopLeft = localToAbsolute(FloatPoint(), false, true);
- LayoutRect absBounds = absoluteBoundingBoxRect();
+ LayoutRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();
absBounds.setLocation(roundedIntPoint(absTopLeft));
m_popup->show(absBounds, document()->view(),
select->optionToListIndex(select->selectedIndex()));
graphicsContext->endTransparencyLayer();
}
-IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms)
+IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms) const
{
if (useTransforms) {
Vector<FloatQuad> quads;
void RenderObject::addAbsoluteRectForLayer(IntRect& result)
{
if (hasLayer())
- result.unite(absoluteBoundingBoxRect());
+ result.unite(absoluteBoundingBoxRectIgnoringTransforms());
for (RenderObject* current = firstChild(); current; current = current->nextSibling())
current->addAbsoluteRectForLayer(result);
}
LayoutRect RenderObject::paintingRootRect(LayoutRect& topLevelRect)
{
- LayoutRect result = absoluteBoundingBoxRect();
+ LayoutRect result = absoluteBoundingBoxRectIgnoringTransforms();
topLevelRect = result;
for (RenderObject* current = firstChild(); current; current = current->nextSibling())
current->addAbsoluteRectForLayer(result);
// Return the offset from an object up the container() chain. Asserts that none of the intermediate objects have transforms.
LayoutSize offsetFromAncestorContainer(RenderObject*) const;
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint&) { }
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint&) const { }
+
// FIXME: useTransforms should go away eventually
- IntRect absoluteBoundingBoxRect(bool useTransforms = false);
+ IntRect absoluteBoundingBoxRect(bool useTransform = true) const;
+ IntRect absoluteBoundingBoxRectIgnoringTransforms() const { return absoluteBoundingBoxRect(false); }
// Build an array of quads in absolute coords for line boxes
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) { }
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const { }
void absoluteFocusRingQuads(Vector<FloatQuad>&);
return (e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : 0;
}
-void RenderText::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
+void RenderText::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
rects.append(enclosingLayoutRect(FloatRect(accumulatedOffset + box->topLeft(), box->size())));
return IntRect();
}
-void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed, ClippingOption option)
+void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed, ClippingOption option) const
{
for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
IntRect boundaries = box->calculateBoundaries();
}
}
-void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
absoluteQuads(quads, wasFixed, NoClipping);
}
InlineTextBox* createInlineTextBox();
void dirtyLineBoxes(bool fullLayout);
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
void absoluteRectsForRange(Vector<IntRect>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false, bool* wasFixed = 0);
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
void absoluteQuadsForRange(Vector<FloatQuad>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false, bool* wasFixed = 0);
enum ClippingOption { NoClipping, ClipToEllipsis };
- void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed = 0, ClippingOption = NoClipping);
+ void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed = 0, ClippingOption = NoClipping) const;
virtual VisiblePosition positionForPoint(const LayoutPoint&);
m_searchPopup->saveRecentSearches(name, m_recentSearches);
}
- m_searchPopup->popupMenu()->show(absoluteBoundingBoxRect(true), document()->view(), -1);
+ m_searchPopup->popupMenu()->show(absoluteBoundingBoxRect(), document()->view(), -1);
}
void RenderTextControlSingleLine::hidePopup()
RenderObject* renderer = input->renderer();
ASSERT(renderer);
- IntRect searchRect = renderer->absoluteBoundingBoxRect();
+ IntRect searchRect = renderer->absoluteBoundingBoxRectIgnoringTransforms();
paintThemePart(SafariTheme::SearchFieldCancelButtonPart, paintInfo.context->platformContext(), searchRect, controlSizeFromRect(searchRect, searchFieldSizes()), determineState(o));
return false;
RenderObject* renderer = input->renderer();
ASSERT(renderer);
- IntRect searchRect = renderer->absoluteBoundingBoxRect();
+ IntRect searchRect = renderer->absoluteBoundingBoxRectIgnoringTransforms();
paintThemePart(SafariTheme::SearchFieldResultsDecorationPart, paintInfo.context->platformContext(), searchRect, controlSizeFromRect(searchRect, searchFieldSizes()), determineState(o));
return false;
RenderObject* renderer = input->renderer();
ASSERT(renderer);
- IntRect searchRect = renderer->absoluteBoundingBoxRect();
+ IntRect searchRect = renderer->absoluteBoundingBoxRectIgnoringTransforms();
paintThemePart(SafariTheme::SearchFieldResultsButtonPart, paintInfo.context->platformContext(), searchRect, controlSizeFromRect(searchRect, searchFieldSizes()), determineState(o));
return false;
rect = m_layer->transform()->mapRect(rect);
}
-void RenderView::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
+void RenderView::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
rects.append(LayoutRect(accumulatedOffset, m_layer->size()));
}
-void RenderView::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderView::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
if (wasFixed)
*wasFixed = false;
bool printing() const;
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
#if USE(ACCELERATED_COMPOSITING)
void setMaximalOutlineSize(int o);
setHasOverflowClip(false);
}
-void RenderSVGBlock::absoluteRects(Vector<LayoutRect>&, const LayoutPoint&)
+void RenderSVGBlock::absoluteRects(Vector<LayoutRect>&, const LayoutPoint&) const
{
// This code path should never be taken for SVG, as we're assuming useTransforms=true everywhere, absoluteQuads should be used.
ASSERT_NOT_REACHED();
virtual void setStyle(PassRefPtr<RenderStyle>);
virtual void updateBoxModelInfoFromStyle();
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
virtual void willBeDestroyed();
virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
// This subtree does not paint.
}
-void RenderSVGHiddenContainer::absoluteQuads(Vector<FloatQuad>&, bool*)
+void RenderSVGHiddenContainer::absoluteQuads(Vector<FloatQuad>&, bool*) const
{
// This subtree does not take up space or paint
}
virtual void paint(PaintInfo&, const LayoutPoint&);
virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject*) const { return LayoutRect(); }
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
};
SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState, wasFixed);
}
-void RenderSVGInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderSVGInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
- RenderObject* object = RenderSVGText::locateRenderSVGTextAncestor(this);
+ const RenderObject* object = RenderSVGText::locateRenderSVGTextAncestor(this);
if (!object)
return;
virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
private:
virtual InlineFlowBox* createInlineFlowBox();
return containerRelativeQuad.enclosingBoundingBox();
}
-void RenderSVGModelObject::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
+void RenderSVGModelObject::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset) const
{
LayoutRect rect = enclosingLayoutRect(strokeBoundingBox());
rect.moveBy(accumulatedOffset);
rects.append(rect);
}
-void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
quads.append(localToAbsoluteQuad(strokeBoundingBox(), false, wasFixed));
}
virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
virtual LayoutRect outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, LayoutPoint*) const;
- virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset) const;
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&, bool* wasFixed = 0) const;
virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
return closestBox->renderer()->positionForPoint(LayoutPoint(pointInContents.x(), closestBox->y()));
}
-void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed)
+void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const
{
quads.append(localToAbsoluteQuad(strokeBoundingBox(), false, wasFixed));
}
virtual bool requiresLayer() const { return false; }
virtual void layout();
- virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed);
+ virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
virtual LayoutRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer) const;
virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, LayoutRect&, bool fixed = false) const;
RenderObject* renderer = element->renderer();
if (!renderer)
return ClientRect::create();
- return ClientRect::create(renderer->absoluteBoundingBoxRect());
+ return ClientRect::create(renderer->absoluteBoundingBoxRectIgnoringTransforms());
}
unsigned Internals::markerCountForNode(Node* node, ExceptionCode& ec)
imageUrl = hitTest.absoluteImageURL();
innerNode = hitTest.innerNode();
innerNonSharedNode = hitTest.innerNonSharedNode();
- boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect(true) : IntRect();
+ boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect() : IntRect();
WebCore::Image *img = hitTest.image();
if (img) {
QPixmap *pix = img->nativeImageForCurrentFrame();
+2011-10-06 Fady Samuel <fsamuel@chromium.org>
+
+ Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false
+ https://bugs.webkit.org/show_bug.cgi?id=69009
+
+ Reviewed by Simon Fraser.
+
+ * Api/qwebframe.cpp:
+ (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
+
2011-10-06 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][Wk2] Fix build with Qt 5 when QtScript is built as standalone module
+2011-10-06 Fady Samuel <fsamuel@chromium.org>
+
+ Code clean-up: Make RenderObject::absoluteBoundingBoxRect and associated methods const and make its parameter useTransforms no longer default to false
+ https://bugs.webkit.org/show_bug.cgi?id=69009
+
+ Reviewed by Simon Fraser.
+
+ * win/WebKit2.def:
+ * win/WebKit2CFLite.def:
+
2011-10-06 Ravi Phaneendra Kasibhatla <ravi.kasibhatla@motorola.com>
Move windows specific TextChecker implementation common to all ports.
??0ClientRect@WebCore@@AAE@XZ
??0String@WTF@@QAE@PBD@Z
??0String@WTF@@QAE@PB_W@Z
- ?absoluteBoundingBoxRect@RenderObject@WebCore@@QAE?AVIntRect@2@_N@Z
+ ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z
+ ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ
?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z
?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z
?cacheDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PAV23@PBUClassInfo@3@@Z
??0String@WTF@@QAE@PB_W@Z
??1NodeRenderingContext@WebCore@@QAE@XZ
??1Range@WebCore@@QAE@XZ
- ?absoluteBoundingBoxRect@RenderObject@WebCore@@QAE?AVIntRect@2@_N@Z
+ ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z
+ ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ
?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z
?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z
?cacheDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PAV23@PBUClassInfo@3@@Z
_ZN7WebCore11EventTarget17toGeneratedStreamEv;
_ZN7WebCore11EventTarget8toStreamEv;
_ZN7WebCore12JSDOMWrapper34virtualFunctionToPreventWeakVtableEv;
-_ZN7WebCore12RenderObject23absoluteBoundingBoxRectEb;
+_ZNK7WebCore12RenderObject23absoluteBoundingBoxRectEb;
_ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE;
_ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi;
_ZN7WebCore16HTMLInputElement17setSuggestedValueERKN3WTF6StringE;