Changeset 254339 in webkit
- Timestamp:
- Jan 10, 2020 7:46:26 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r254336 r254339 1 2020-01-10 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Fix accessibility/scroll-to-make-visible-iframe-offscreen.html 4 https://bugs.webkit.org/show_bug.cgi?id=206063 5 6 Reviewed by Zalan Bujtas. 7 8 This is failing due to missing LFC implementation for RenderText::absoluteQuad. 9 10 * rendering/RenderText.cpp: 11 (WebCore::collectAbsoluteQuadsForNonComplexPaths): 12 13 Implement generic version for collecting absolute quads. It doesn't cover everything that is needed for 14 the complex path so that still calls into layout system specific code. 15 16 (WebCore::RenderText::absoluteQuadsClippedToEllipsis const): 17 (WebCore::RenderText::absoluteQuads const): 18 (WebCore::RenderText::layoutFormattingContextLineLayout const): 19 (WebCore::RenderText::usesComplexLineLayoutPath const): 20 * rendering/RenderText.h: 21 * rendering/SimpleLineLayoutFunctions.cpp: 22 (WebCore::SimpleLineLayout::collectAbsoluteQuads): Deleted. 23 24 Not needed anymore. 25 26 * rendering/SimpleLineLayoutFunctions.h: 27 1 28 2020-01-10 Zalan Bujtas <zalan@apple.com> 2 29 -
trunk/Source/WebCore/rendering/RenderText.cpp
r254159 r254339 414 414 #endif 415 415 416 static Vector<FloatQuad> collectAbsoluteQuadsForNonComplexPaths(const RenderText& textRenderer, bool* wasFixed) 417 { 418 // FIXME: This generic function doesn't currently cover everything that is needed for the complex line layout path. 419 ASSERT(!textRenderer.usesComplexLineLayoutPath()); 420 421 Vector<FloatQuad> quads; 422 for (auto& box : LineLayoutTraversal::textBoxesFor(textRenderer)) 423 quads.append(textRenderer.localToAbsoluteQuad(FloatQuad(box.rect()), UseTransforms, wasFixed)); 424 return quads; 425 } 426 416 427 Vector<FloatQuad> RenderText::absoluteQuadsClippedToEllipsis() const 417 428 { 418 if ( auto* layout = simpleLineLayout()) {429 if (!usesComplexLineLayoutPath()) { 419 430 ASSERT(style().textOverflow() != TextOverflow::Ellipsis); 420 return SimpleLineLayout::collectAbsoluteQuads(*this, *layout, nullptr);431 return collectAbsoluteQuadsForNonComplexPaths(*this, nullptr); 421 432 } 422 433 return m_lineBoxes.absoluteQuads(*this, nullptr, RenderTextLineBoxes::ClipToEllipsis); … … 425 436 void RenderText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) const 426 437 { 427 if ( auto* layout = simpleLineLayout()) {428 quads.appendVector( SimpleLineLayout::collectAbsoluteQuads(*this, *layout, wasFixed));438 if (!usesComplexLineLayoutPath()) { 439 quads.appendVector(collectAbsoluteQuadsForNonComplexPaths(*this, wasFixed)); 429 440 return; 430 441 } … … 1330 1341 } 1331 1342 1343 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 1344 const LayoutIntegration::LineLayout* RenderText::layoutFormattingContextLineLayout() const 1345 { 1346 if (!is<RenderBlockFlow>(*parent())) 1347 return nullptr; 1348 return downcast<RenderBlockFlow>(*parent()).layoutFormattingContextLineLayout(); 1349 } 1350 #endif 1351 1352 bool RenderText::usesComplexLineLayoutPath() const 1353 { 1354 if (simpleLineLayout()) 1355 return false; 1356 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 1357 if (layoutFormattingContextLineLayout()) 1358 return false; 1359 #endif 1360 return true; 1361 } 1362 1332 1363 float RenderText::width(unsigned from, unsigned len, float xPos, bool firstLine, HashSet<const Font*>* fallbackFonts, GlyphOverflow* glyphOverflow) const 1333 1364 { -
trunk/Source/WebCore/rendering/RenderText.h
r254153 r254339 36 36 struct GlyphOverflow; 37 37 38 namespace LayoutIntegration { 39 class LineLayout; 40 } 41 38 42 class RenderText : public RenderObject { 39 43 WTF_MAKE_ISO_ALLOCATED(RenderText); … … 166 170 void ensureLineBoxes(); 167 171 const SimpleLineLayout::Layout* simpleLineLayout() const; 172 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 173 const LayoutIntegration::LineLayout* layoutFormattingContextLineLayout() const; 174 #endif 175 bool usesComplexLineLayoutPath() const; 168 176 169 177 StringView stringView(unsigned start = 0, Optional<unsigned> stop = WTF::nullopt) const; -
trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp
r254153 r254339 186 186 } 187 187 188 Vector<FloatQuad> collectAbsoluteQuads(const RenderObject& renderer, const Layout& layout, bool* wasFixed)189 {190 Vector<FloatQuad> quads;191 auto& resolver = layout.runResolver();192 for (auto run : resolver.rangeForRenderer(renderer))193 quads.append(renderer.localToAbsoluteQuad(FloatQuad(run.rect()), UseTransforms, wasFixed));194 return quads;195 }196 197 188 unsigned textOffsetForPoint(const LayoutPoint& point, const RenderText& renderer, const Layout& layout) 198 189 { -
trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.h
r254153 r254339 50 50 void collectFlowOverflow(RenderBlockFlow&, const Layout&); 51 51 52 Vector<FloatQuad> collectAbsoluteQuads(const RenderObject&, const Layout&, bool* wasFixed);53 52 unsigned textOffsetForPoint(const LayoutPoint&, const RenderText&, const Layout&); 54 53 Vector<FloatQuad> collectAbsoluteQuadsForRange(const RenderObject&, unsigned start, unsigned end, const Layout&, bool ignoreEmptyTextSelections, bool* wasFixed);
Note: See TracChangeset
for help on using the changeset viewer.