Changeset 244798 in webkit
- Timestamp:
- Apr 30, 2019, 1:13:09 PM (7 years ago)
- Location:
- branches/safari-607-branch
- Files:
-
- 4 added
- 4 deleted
- 38 edited
-
ChangeLog (modified) (1 diff)
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/map-b3-licm-infinite-loop.js (deleted)
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/text/trailing-word-detection-expected.txt (deleted)
-
LayoutTests/fast/text/trailing-word-detection.html (deleted)
-
LayoutTests/fast/text/trailing-word-expected.html (added)
-
LayoutTests/fast/text/trailing-word.html (added)
-
LayoutTests/platform/gtk/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac/fast/text/trailing-word-parse-expected.txt (added)
-
LayoutTests/platform/mac/fast/text/trailing-word-parse.html (added)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
PerformanceTests/ChangeLog (modified) (1 diff)
-
PerformanceTests/MotionMark/resources/debug-runner/motionmark.css (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/JavaScriptCore/b3/testb3.cpp (modified) (2 diffs)
-
Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/WTF.xcodeproj/project.pbxproj (modified) (2 diffs)
-
Source/WTF/wtf/BackwardsGraph.h (modified) (3 diffs)
-
Source/WTF/wtf/SpanningTree.h (deleted)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (modified) (1 diff)
-
Source/WebCore/PAL/ChangeLog (modified) (1 diff)
-
Source/WebCore/PAL/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/WebCore/css/CSSProperties.json (modified) (1 diff)
-
Source/WebCore/page/DOMWindow.cpp (modified) (1 diff)
-
Source/WebCore/rendering/SimpleLineLayout.cpp (modified) (1 diff)
-
Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp (modified) (1 diff)
-
Source/WebCore/rendering/SimpleLineLayoutCoverage.h (modified) (1 diff)
-
Source/WebCore/rendering/line/BreakingContext.h (modified) (23 diffs)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (2 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.h (modified) (1 diff)
-
Source/WebInspectorUI/ChangeLog (modified) (1 diff)
-
Source/WebInspectorUI/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/mac/Configurations/Version.xcconfig (modified) (1 diff)
-
Source/cmake/WebKitFeatures.cmake (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/Scripts/webkitperl/FeatureList.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 1 5 2019-04-10 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-607-branch/JSTests/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244122. rdar://problem/50132675 4 1 5 2019-04-09 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-607-branch/LayoutTests/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244174. rdar://problem/28160396 8 1 9 2019-04-10 Alan Coon <alancoon@apple.com> 2 10 -
branches/safari-607-branch/LayoutTests/platform/gtk/TestExpectations
r244621 r244798 3159 3159 webkit.org/b/160248 fast/text/combining-mark-paint.html [ ImageOnlyFailure ] 3160 3160 webkit.org/b/160248 fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ] 3161 webkit.org/b/160248 fast/text/trailing-word -detection.html [Failure ]3161 webkit.org/b/160248 fast/text/trailing-word.html [ ImageOnlyFailure ] 3162 3162 3163 3163 webkit.org/b/160249 fast/shrink-wrap/rect-shrink-wrap.html [ ImageOnlyFailure ] -
branches/safari-607-branch/LayoutTests/platform/win/TestExpectations
r244621 r244798 3001 3001 fast/text/combining-mark-paint.html [ ImageOnlyFailure ] 3002 3002 fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ] 3003 fast/text/trailing-word -detection.html [Failure ]3003 fast/text/trailing-word.html [ ImageOnlyFailure ] 3004 3004 3005 3005 # TestRunner::addChromeInputField() and focusWebView() not implemented -
branches/safari-607-branch/PerformanceTests/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244174. rdar://problem/28160396 4 1 5 2019-04-10 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-607-branch/PerformanceTests/MotionMark/resources/debug-runner/motionmark.css
r244621 r244798 210 210 color: hsl(11, 72%, 50%); 211 211 margin-bottom: 1em; 212 -apple-trailing-word: -apple-partially-balanced; 212 213 } 213 214 -
branches/safari-607-branch/Source/JavaScriptCore/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244122. rdar://problem/50132675 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244173. rdar://problem/28160396 8 9 2019-04-24 Alan Coon <alancoon@apple.com> 10 11 Revert r244174. rdar://problem/28160396 12 1 13 2019-04-10 Alan Coon <alancoon@apple.com> 2 14 -
branches/safari-607-branch/Source/JavaScriptCore/Configurations/Version.xcconfig
r244788 r244798 25 25 MINOR_VERSION = 2; 26 26 TINY_VERSION = 6; 27 MICRO_VERSION = 1;27 MICRO_VERSION = 0; 28 28 NANO_VERSION = 1; 29 29 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/JavaScriptCore/b3/testb3.cpp
r244621 r244798 16326 16326 16327 16327 compileAndRun<void>(proc); 16328 }16329 16330 void testInfiniteLoopDoesntCauseBadHoisting()16331 {16332 Procedure proc;16333 if (proc.optLevel() < 2)16334 return;16335 BasicBlock* root = proc.addBlock();16336 BasicBlock* header = proc.addBlock();16337 BasicBlock* loadBlock = proc.addBlock();16338 BasicBlock* postLoadBlock = proc.addBlock();16339 16340 Value* arg = root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR0);16341 root->appendNewControlValue(proc, Jump, Origin(), header);16342 16343 header->appendNewControlValue(16344 proc, Branch, Origin(),16345 header->appendNew<Value>(proc, Equal, Origin(),16346 arg,16347 header->appendNew<Const64Value>(proc, Origin(), 10)), header, loadBlock);16348 16349 PatchpointValue* patchpoint = loadBlock->appendNew<PatchpointValue>(proc, Void, Origin());16350 patchpoint->effects = Effects::none();16351 patchpoint->effects.writesLocalState = true; // Don't DCE this.16352 patchpoint->setGenerator(16353 [&] (CCallHelpers& jit, const StackmapGenerationParams&) {16354 // This works because we don't have callee saves.16355 jit.emitFunctionEpilogue();16356 jit.ret();16357 });16358 16359 Value* badLoad = loadBlock->appendNew<MemoryValue>(proc, Load, Int64, Origin(), arg, 0);16360 16361 loadBlock->appendNewControlValue(16362 proc, Branch, Origin(),16363 loadBlock->appendNew<Value>(proc, Equal, Origin(),16364 badLoad,16365 loadBlock->appendNew<Const64Value>(proc, Origin(), 45)), header, postLoadBlock);16366 16367 postLoadBlock->appendNewControlValue(proc, Return, Origin(), badLoad);16368 16369 // The patchpoint early ret() works because we don't have callee saves.16370 auto code = compileProc(proc);16371 RELEASE_ASSERT(!proc.calleeSaveRegisterAtOffsetList().size());16372 invoke<void>(*code, static_cast<uint64_t>(55)); // Shouldn't crash dereferncing 55.16373 16328 } 16374 16329 … … 17944 17899 RUN(testLoopWithMultipleHeaderEdges()); 17945 17900 17946 RUN(testInfiniteLoopDoesntCauseBadHoisting());17947 17948 17901 if (isX86()) { 17949 17902 RUN(testBranchBitAndImmFusion(Identity, Int64, 1, Air::BranchTest32, Air::Arg::Tmp)); -
branches/safari-607-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig
r244788 r244798 25 25 MINOR_VERSION = 2; 26 26 TINY_VERSION = 6; 27 MICRO_VERSION = 1;27 MICRO_VERSION = 0; 28 28 NANO_VERSION = 1; 29 29 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/WTF/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244122. rdar://problem/50132675 4 1 5 2019-04-09 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-607-branch/Source/WTF/WTF.xcodeproj/project.pbxproj
r244621 r244798 389 389 70ECA60B1B02426800449739 /* SymbolImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolImpl.h; sourceTree = "<group>"; }; 390 390 70ECA60C1B02426800449739 /* UniquedStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniquedStringImpl.h; sourceTree = "<group>"; }; 391 79038E05224B05A7004C0738 /* SpanningTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpanningTree.h; sourceTree = "<group>"; };392 391 7936D6A91C99F8AE000D1AED /* SmallPtrSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmallPtrSet.h; sourceTree = "<group>"; }; 393 392 793BFADD9CED44B8B9FBCA16 /* StdUnorderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StdUnorderedMap.h; sourceTree = "<group>"; }; … … 1079 1078 7936D6A91C99F8AE000D1AED /* SmallPtrSet.h */, 1080 1079 A30D412D1F0DE13F00B71954 /* SoftLinking.h */, 1081 79038E05224B05A7004C0738 /* SpanningTree.h */,1082 1080 A8A4730D151A825B004123FF /* Spectrum.h */, 1083 1081 A8A4730E151A825B004123FF /* StackBounds.cpp */, -
branches/safari-607-branch/Source/WTF/wtf/BackwardsGraph.h
r244621 r244798 1 1 /* 2 * Copyright (C) 2016 -2019Apple Inc. All rights reserved.2 * Copyright (C) 2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 30 30 #include <wtf/Noncopyable.h> 31 31 #include <wtf/SingleRootGraph.h> 32 #include <wtf/SpanningTree.h>33 32 #include <wtf/StdLibExtras.h> 34 33 … … 58 57 } 59 58 }; 60 61 {62 // Loops are a form of terminality (you can loop forever). To have a loop, you need to63 // have a back edge. An edge u->v is a back edge when u is a descendent of v in the64 // DFS spanning tree of the Graph.65 SpanningTree<Graph> spanningTree(graph);66 for (unsigned i = 0; i < graph.numNodes(); ++i) {67 if (typename Graph::Node node = graph.node(i)) {68 for (typename Graph::Node successor : graph.successors(node)) {69 if (spanningTree.isDescendent(node, successor)) {70 addRootSuccessor(node);71 break;72 }73 }74 }75 }76 }77 59 78 60 for (unsigned i = 0; i < graph.numNodes(); ++i) { -
branches/safari-607-branch/Source/WebCore/ChangeLog
r244793 r244798 1 2019-04-30 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r244632. rdar://problem/50344188 4 5 Do not restart WebRTC stats timer if backend is stopped 6 https://bugs.webkit.org/show_bug.cgi?id=197257 7 <rdar://problem/50095879> 8 9 Reviewed by Eric Carlson. 10 11 We used to stop and reschedule the stat gathering timer in case the 12 gathering delay is changing. Timer should not be rescheduled if the backend is stopped. 13 14 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: 15 (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): 16 17 18 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244632 268f45cc-cd09-0410-ab3c-d52691b4dbfc 19 20 2019-04-24 Youenn Fablet <youenn@apple.com> 21 22 Do not restart WebRTC stats timer if backend is stopped 23 https://bugs.webkit.org/show_bug.cgi?id=197257 24 <rdar://problem/50095879> 25 26 Reviewed by Eric Carlson. 27 28 We used to stop and reschedule the stat gathering timer in case the 29 gathering delay is changing. Timer should not be rescheduled if the backend is stopped. 30 31 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: 32 (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244120. rdar://problem/50132675 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244173. rdar://problem/28160396 8 9 2019-04-24 Alan Coon <alancoon@apple.com> 10 11 Revert r244174. rdar://problem/28160396 33 12 34 13 2019-04-10 Alan Coon <alancoon@apple.com> -
branches/safari-607-branch/Source/WebCore/Configurations/Version.xcconfig
r244788 r244798 25 25 MINOR_VERSION = 2; 26 26 TINY_VERSION = 6; 27 MICRO_VERSION = 1;27 MICRO_VERSION = 0; 28 28 NANO_VERSION = 1; 29 29 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
r244793 r244798 848 848 849 849 callOnMainThread([protectedThis = makeRef(*this), this, timestamp, report] { 850 if (m_ backend && m_statsLogTimer.repeatInterval() != statsLogInterval(timestamp)) {850 if (m_statsLogTimer.repeatInterval() != statsLogInterval(timestamp)) { 851 851 m_statsLogTimer.stop(); 852 852 m_statsLogTimer.startRepeating(statsLogInterval(timestamp)); -
branches/safari-607-branch/Source/WebCore/PAL/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244174. rdar://problem/28160396 8 1 9 2019-04-10 Alan Coon <alancoon@apple.com> 2 10 -
branches/safari-607-branch/Source/WebCore/PAL/Configurations/Version.xcconfig
r244788 r244798 25 25 MINOR_VERSION = 2; 26 26 TINY_VERSION = 6; 27 MICRO_VERSION = 1;27 MICRO_VERSION = 0; 28 28 NANO_VERSION = 1; 29 29 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/WebCore/css/CSSProperties.json
r244621 r244798 6710 6710 "enable-if": "ENABLE_CSS_TRAILING_WORD" 6711 6711 }, 6712 "status": { 6713 "status": "non-standard", 6714 "comment": "Needed for feature-detecting the Safari browser. Implementation has no effect." 6715 } 6712 "status": "non-standard" 6716 6713 }, 6717 6714 "-apple-pay-button-style": { -
branches/safari-607-branch/Source/WebCore/page/DOMWindow.cpp
r244621 r244798 489 489 if (m_performance) 490 490 m_performance->clearResourceTimings(); 491 492 JSDOMWindowBase::fireFrameClearedWatchpointsForWindow(this);493 InspectorInstrumentation::frameWindowDiscarded(*frame(), this);494 491 } 495 492 -
branches/safari-607-branch/Source/WebCore/rendering/SimpleLineLayout.cpp
r244621 r244798 241 241 if (style.nbspMode() != NBSPMode::Normal) 242 242 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasWebKitNBSPMode, reasons, includeReasons); 243 #if ENABLE(CSS_TRAILING_WORD) 244 if (style.trailingWord() != TrailingWord::Auto) 245 SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonAutoTrailingWord, reasons, includeReasons); 246 #endif 243 247 if (style.hyphens() == Hyphens::Auto) { 244 248 auto textReasons = canUseForText(style.hyphenString(), style.fontCascade(), WTF::nullopt, false, includeReasons); -
branches/safari-607-branch/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp
r244621 r244798 136 136 stream << "line-break is not auto"; 137 137 break; 138 case FlowHasNonAutoTrailingWord: 139 stream << "-apple-trailing-word is not auto"; 140 break; 138 141 case FlowHasSVGFont: 139 142 stream << "SVG font"; -
branches/safari-607-branch/Source/WebCore/rendering/SimpleLineLayoutCoverage.h
r244621 r244798 67 67 FlowHasBorderFitLines = 1LLU << 29, 68 68 FlowHasNonAutoLineBreak = 1LLU << 30, 69 FlowHasNonAutoTrailingWord = 1LLU << 31, 69 70 FlowHasSVGFont = 1LLU << 32, 70 71 FlowTextIsEmpty = 1LLU << 33, -
branches/safari-607-branch/Source/WebCore/rendering/line/BreakingContext.h
r244621 r244798 98 98 , m_resolver(resolver) 99 99 , m_current(resolver.position()) 100 , m_lineBreak(resolver.position()) 100 #if ENABLE(CSS_TRAILING_WORD) 101 , m_lineBreakHistory(InlineIterator(resolver.position()), block.style().trailingWord() == TrailingWord::PartiallyBalanced ? 5 : 1) 102 #else 103 , m_lineBreakHistory(InlineIterator(resolver.position()), 1) 104 #endif 101 105 , m_block(block) 102 106 , m_lastObject(m_current.renderer()) … … 131 135 132 136 RenderObject* currentObject() { return m_current.renderer(); } 133 InlineIterator lineBreak() { return m_lineBreak ; }137 InlineIterator lineBreak() { return m_lineBreakHistory.current(); } 134 138 LineWidth& lineWidth() { return m_width; } 135 139 bool atEnd() { return m_atEnd; } … … 150 154 void commitAndUpdateLineBreakIfNeeded(); 151 155 InlineIterator handleEndOfLine(); 156 #if ENABLE(CSS_TRAILING_WORD) 157 InlineIterator optimalLineBreakLocationForTrailingWord(); 158 #endif 152 159 153 160 float computeAdditionalBetweenWordsWidth(RenderText&, TextLayout*, UChar, WordTrailingSpace&, HashSet<const Font*>& fallbackFonts, WordMeasurements&, const FontCascade&, bool isFixedPitch, unsigned lastSpace, float lastSpaceWordSpacing, float wordSpacingForWordMeasurement, unsigned offset); … … 156 163 { 157 164 if (m_width.fitsOnLine(ignoringTrailingSpace) || m_lastWS == WhiteSpace::NoWrap || m_hangsAtEnd) 158 m_lineBreak .clear();165 m_lineBreakHistory.clear(); 159 166 m_hangsAtEnd = false; 160 167 } … … 163 170 { 164 171 m_width.commit(); 165 m_lineBreak .clear();172 m_lineBreakHistory.clear(); 166 173 m_hangsAtEnd = false; 167 174 } … … 170 177 { 171 178 m_width.commit(); 172 m_lineBreak .moveTo(object, offset, nextBreak);179 m_lineBreakHistory.moveTo(object, offset, nextBreak); 173 180 m_hangsAtEnd = false; 174 181 } 175 182 176 183 private: 184 // This class keeps a sliding window of the past n locations for an InlineIterator. 185 class InlineIteratorHistory : private Vector<InlineIterator, 1> { 186 public: 187 InlineIteratorHistory() = delete; 188 InlineIteratorHistory(const InlineIterator& initial, size_t capacity) 189 : m_capacity(capacity) 190 { 191 ASSERT(capacity > 0); 192 this->append(initial); 193 } 194 195 void push(const WTF::Function<void(InlineIterator& modifyMe)>& updater) 196 { 197 ASSERT(!this->isEmpty()); 198 if (m_capacity != 1) 199 this->insert(0, InlineIterator(this->at(0))); 200 updater(this->at(0)); 201 if (m_capacity != 1) 202 this->resize(m_capacity); 203 } 204 205 void update(const WTF::Function<void(InlineIterator& modifyMe)>& updater) 206 { 207 ASSERT(!this->isEmpty()); 208 updater(this->at(0)); 209 } 210 211 RenderObject* renderer() const { return this->at(0).renderer(); } 212 unsigned offset() const { return this->at(0).offset(); } 213 Optional<unsigned> nextBreakablePosition() const { return this->at(0).nextBreakablePosition(); } 214 bool atTextParagraphSeparator() const { return this->at(0).atTextParagraphSeparator(); } 215 UChar previousInSameNode() const { return this->at(0).previousInSameNode(); } 216 const InlineIterator& get(size_t i) const { return this->at(i); }; 217 const InlineIterator& current() const { return get(0); } 218 size_t historyLength() const { return this->size(); } 219 220 void moveTo(RenderObject& object, unsigned offset, Optional<unsigned> nextBreak = WTF::nullopt) 221 { 222 push([&](InlineIterator& modifyMe) { 223 modifyMe.moveTo(object, offset, nextBreak); 224 }); 225 } 226 227 void increment() 228 { 229 update([](InlineIterator& modifyMe) { 230 modifyMe.increment(); 231 }); 232 } 233 234 void clear() 235 { 236 push([](InlineIterator& modifyMe) { 237 modifyMe.clear(); 238 }); 239 } 240 241 private: 242 const size_t m_capacity; 243 }; 244 177 245 LineBreaker& m_lineBreaker; 178 246 InlineBidiResolver& m_resolver; 179 247 180 248 InlineIterator m_current; 181 InlineIterator m_lineBreak;249 InlineIteratorHistory m_lineBreakHistory; 182 250 InlineIterator m_startOfIgnoredSpaces; 183 251 … … 275 343 if (fitsOnLineOrHangsAtEnd()) { 276 344 RenderObject& br = *m_current.renderer(); 277 m_lineBreak.moveToStartOf(br); 278 m_lineBreak.increment(); 345 m_lineBreakHistory.push([&](InlineIterator& modifyMe) { 346 modifyMe.moveToStartOf(br); 347 modifyMe.increment(); 348 }); 279 349 280 350 // A <br> always breaks a line, so don't let the line be collapsed … … 395 465 if (m_floatsFitOnLine && m_width.fitsOnLineExcludingTrailingWhitespace(m_block.logicalWidthForFloat(floatingObject))) { 396 466 m_lineBreaker.positionNewFloatOnLine(floatingObject, m_lastFloatFromPreviousLine, m_lineInfo, m_width); 397 if (m_lineBreak .renderer() == m_current.renderer()) {398 ASSERT(!m_lineBreak .offset());399 m_lineBreak .increment();467 if (m_lineBreakHistory.renderer() == m_current.renderer()) { 468 ASSERT(!m_lineBreakHistory.offset()); 469 m_lineBreakHistory.increment(); 400 470 } 401 471 } else … … 683 753 combineRenderer.combineTextIfNeeded(); 684 754 // The length of the renderer's text may have changed. Increment stale iterator positions 685 if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreak , combineRenderer)) {755 if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreakHistory.current(), combineRenderer)) { 686 756 ASSERT(iteratorIsBeyondEndOfRenderCombineText(m_resolver.position(), combineRenderer)); 687 m_lineBreak .increment();757 m_lineBreakHistory.increment(); 688 758 m_resolver.increment(); 689 759 } … … 851 921 if (!m_width.fitsOnLineIncludingExtraWidth(charWidth)) { 852 922 lineWasTooWide = true; 853 m_lineBreak.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition()); 854 m_lineBreaker.skipTrailingWhitespace(m_lineBreak, m_lineInfo); 923 m_lineBreakHistory.push([&](InlineIterator& modifyMe) { 924 modifyMe.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition()); 925 m_lineBreaker.skipTrailingWhitespace(modifyMe, m_lineInfo); 926 }); 855 927 } 856 928 } … … 860 932 // bad so just don't allow it. 861 933 if (canHyphenate && !m_width.fitsOnLine() && (m_nextObject || !renderText.containsOnlyHTMLWhitespace(m_current.offset(), renderText.text().length() - m_current.offset()) || isLineEmpty)) { 862 tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, m_lineBreak, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated); 934 m_lineBreakHistory.push([&](InlineIterator& modifyMe) { 935 tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated); 936 }); 863 937 if (m_lineBreaker.m_hyphenated) { 864 938 m_atEnd = true; … … 866 940 } 867 941 } 868 if (m_lineBreak .atTextParagraphSeparator()) {942 if (m_lineBreakHistory.atTextParagraphSeparator()) { 869 943 if (!stoppedIgnoringSpaces && m_current.offset() > 0) 870 944 ensureCharacterGetsLineBox(m_lineWhitespaceCollapsingState, m_current); 871 m_lineBreak .increment();945 m_lineBreakHistory.increment(); 872 946 m_lineInfo.setPreviousLineBrokeCleanly(true); 873 wordMeasurement.endOffset = m_lineBreak .offset();947 wordMeasurement.endOffset = m_lineBreakHistory.offset(); 874 948 } 875 949 // Check if the last breaking position is a soft-hyphen. … … 877 951 Optional<unsigned> lastBreakingPositon; 878 952 const RenderObject* rendererAtBreakingPosition = nullptr; 879 if (m_lineBreak .offset() || m_lineBreak.nextBreakablePosition()) {880 lastBreakingPositon = m_lineBreak .offset();881 rendererAtBreakingPosition = m_lineBreak .renderer();953 if (m_lineBreakHistory.offset() || m_lineBreakHistory.nextBreakablePosition()) { 954 lastBreakingPositon = m_lineBreakHistory.offset(); 955 rendererAtBreakingPosition = m_lineBreakHistory.renderer(); 882 956 } else if (m_current.nextBreakablePosition() && m_current.nextBreakablePosition().value() <= m_current.offset()) { 883 957 // We might just be right after the soft-hyphen … … 900 974 } 901 975 } 902 if (m_lineBreak .offset() && m_lineBreak.offset() != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) {976 if (m_lineBreakHistory.offset() && m_lineBreakHistory.offset() != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) { 903 977 if (charWidth) { 904 wordMeasurement.endOffset = m_lineBreak .offset();978 wordMeasurement.endOffset = m_lineBreakHistory.offset(); 905 979 wordMeasurement.width = charWidth; 906 980 } … … 926 1000 ensureCharacterGetsLineBox(m_lineWhitespaceCollapsingState, m_current); 927 1001 commitLineBreakAtCurrentWidth(renderObject, m_current.offset(), m_current.nextBreakablePosition()); 928 m_lineBreak .increment();1002 m_lineBreakHistory.increment(); 929 1003 m_lineInfo.setPreviousLineBrokeCleanly(true); 930 1004 return true; … … 943 1017 // Remember this as a breakable position in case 944 1018 // adding the end width forces a break. 945 m_lineBreak .moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());1019 m_lineBreakHistory.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition()); 946 1020 midWordBreak &= (breakWords || breakAll); 947 1021 } … … 1008 1082 if (!m_currentCharacterIsWS && previousCharacterIsWS) { 1009 1083 if (m_autoWrap && m_currentStyle->breakOnlyAfterWhiteSpace()) 1010 m_lineBreak .moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());1084 m_lineBreakHistory.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition()); 1011 1085 } 1012 1086 … … 1051 1125 // no more content, and a hyphenated single word would end up on a line by itself. This looks 1052 1126 // bad so just don't allow it. 1053 if (canHyphenate && (m_nextObject || isLineEmpty)) 1054 tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, m_lineBreak, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated); 1055 1056 if (!hyphenated && m_lineBreak.previousInSameNode() == softHyphen && style.hyphens() != Hyphens::None) { 1127 if (canHyphenate && (m_nextObject || isLineEmpty)) { 1128 m_lineBreakHistory.push([&](InlineIterator& modifyMe) { 1129 tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated); 1130 }); 1131 } 1132 1133 if (!hyphenated && m_lineBreakHistory.previousInSameNode() == softHyphen && style.hyphens() != Hyphens::None) { 1057 1134 hyphenated = true; 1058 1135 m_atEnd = true; … … 1178 1255 inline InlineIterator BreakingContext::handleEndOfLine() 1179 1256 { 1180 if (m_lineBreak == m_resolver.position()) {1181 if (!m_lineBreak .renderer() || !m_lineBreak.renderer()->isBR()) {1257 if (m_lineBreakHistory.current() == m_resolver.position()) { 1258 if (!m_lineBreakHistory.renderer() || !m_lineBreakHistory.renderer()->isBR()) { 1182 1259 // we just add as much as possible 1183 1260 if (m_blockStyle.whiteSpace() == WhiteSpace::Pre && !m_current.offset()) { … … 1186 1263 else 1187 1264 commitLineBreakClear(); 1188 } else if (m_lineBreak.renderer()) { 1265 } 1266 else if (m_lineBreakHistory.renderer()) { 1189 1267 // Don't ever break in the middle of a word if we can help it. 1190 1268 // There's no room at all. We just have to be on this line, … … 1194 1272 } 1195 1273 // make sure we consume at least one char/object. 1196 if (m_lineBreak == m_resolver.position())1197 m_lineBreak .increment();1274 if (m_lineBreakHistory.current() == m_resolver.position()) 1275 m_lineBreakHistory.increment(); 1198 1276 } else if (!m_current.offset() && !m_width.committedWidth() && m_width.uncommittedWidth() && !m_hadUncommittedWidthBeforeCurrent) { 1199 1277 // Do not push the current object to the next line, when this line has some content, but it is still considered empty. … … 1201 1279 // at the start of a line, if no width has been committed yet. 1202 1280 // Behave as if it was actually empty and consume at least one object. 1203 m_lineBreak .increment();1281 m_lineBreakHistory.increment(); 1204 1282 } 1205 1283 1206 1284 // Sanity check our whitespace collapsing transitions. 1207 TrailingObjects::CollapseFirstSpaceOrNot collapsed = checkWhitespaceCollapsingTransitions(m_lineWhitespaceCollapsingState, m_lineBreak );1208 1209 m_trailingObjects.updateWhitespaceCollapsingTransitionsForTrailingBoxes(m_lineWhitespaceCollapsingState, m_lineBreak , collapsed);1285 TrailingObjects::CollapseFirstSpaceOrNot collapsed = checkWhitespaceCollapsingTransitions(m_lineWhitespaceCollapsingState, m_lineBreakHistory.current()); 1286 1287 m_trailingObjects.updateWhitespaceCollapsingTransitionsForTrailingBoxes(m_lineWhitespaceCollapsingState, m_lineBreakHistory.current(), collapsed); 1210 1288 1211 1289 // We might have made lineBreak an iterator that points past the end … … 1213 1291 // of the next object instead to avoid confusing the rest of the 1214 1292 // code. 1215 if (m_lineBreak.offset()) { 1216 m_lineBreak.setOffset(m_lineBreak.offset() - 1); 1217 m_lineBreak.increment(); 1218 } 1219 1220 return m_lineBreak; 1221 } 1222 1223 } 1293 if (m_lineBreakHistory.offset()) { 1294 m_lineBreakHistory.update([](InlineIterator& modifyMe) { 1295 modifyMe.setOffset(modifyMe.offset() - 1); 1296 modifyMe.increment(); 1297 }); 1298 } 1299 1300 #if ENABLE(CSS_TRAILING_WORD) 1301 if (m_blockStyle.trailingWord() == TrailingWord::PartiallyBalanced) 1302 return optimalLineBreakLocationForTrailingWord(); 1303 #endif 1304 return m_lineBreakHistory.current(); 1305 } 1306 1307 #if ENABLE(CSS_TRAILING_WORD) 1308 inline InlineIterator BreakingContext::optimalLineBreakLocationForTrailingWord() 1309 { 1310 const unsigned longTrailingWordLength = 20; 1311 const float optimalTrailingLineRatio = 0.1; 1312 InlineIterator lineBreak = m_lineBreakHistory.current(); 1313 if (!lineBreak.renderer() || !m_lineInfo.isFirstLine() || bidiNextSkippingEmptyInlines(*lineBreak.root(), lineBreak.renderer()) || !is<RenderText>(lineBreak.renderer())) 1314 return lineBreak; 1315 RenderText& renderText = downcast<RenderText>(*lineBreak.renderer()); 1316 // Don't even bother measuring if our remaining line has many characters 1317 if (renderText.text().length() == lineBreak.offset() || renderText.text().length() - lineBreak.offset() > longTrailingWordLength) 1318 return lineBreak; 1319 bool canUseLineBreakShortcut = m_renderTextInfo.lineBreakIterator.mode() == LineBreakIteratorMode::Default; 1320 bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == NBSPMode::Space; 1321 Optional<unsigned> nextBreakablePosition = lineBreak.nextBreakablePosition(); 1322 isBreakable(m_renderTextInfo.lineBreakIterator, lineBreak.offset() + 1, nextBreakablePosition, breakNBSP, canUseLineBreakShortcut, m_currentStyle->wordBreak() == WordBreak::KeepAll); 1323 if (!nextBreakablePosition || nextBreakablePosition.value() != renderText.text().length()) 1324 return lineBreak; 1325 const RenderStyle& style = lineStyle(renderText, m_lineInfo); 1326 const FontCascade& font = style.fontCascade(); 1327 HashSet<const Font*> dummyFonts; 1328 InlineIterator best = lineBreak; 1329 for (size_t i = 1; i < m_lineBreakHistory.historyLength(); ++i) { 1330 const InlineIterator& candidate = m_lineBreakHistory.get(i); 1331 if (candidate.renderer() != lineBreak.renderer()) 1332 return best; 1333 float width = textWidth(renderText, candidate.offset(), renderText.text().length() - candidate.offset(), font, 0, font.isFixedPitch(), m_collapseWhiteSpace, dummyFonts); 1334 if (width > m_width.availableWidth()) 1335 return best; 1336 if (width / m_width.availableWidth() > optimalTrailingLineRatio) // Subsequent line is long enough 1337 return candidate; 1338 best = candidate; 1339 } 1340 return best; 1341 } 1342 #endif 1343 1344 } -
branches/safari-607-branch/Source/WebCore/rendering/style/RenderStyle.h
r244621 r244798 800 800 801 801 #if ENABLE(CSS_TRAILING_WORD) 802 TrailingWord trailingWord() const { return TrailingWord::Auto; }802 TrailingWord trailingWord() const { return static_cast<TrailingWord>(m_rareInheritedData->trailingWord); } 803 803 #endif 804 804 … … 1260 1260 1261 1261 #if ENABLE(CSS_TRAILING_WORD) 1262 void setTrailingWord(TrailingWord ) {}1262 void setTrailingWord(TrailingWord v) { SET_VAR(m_rareInheritedData, trailingWord, static_cast<unsigned>(v)); } 1263 1263 #endif 1264 1264 -
branches/safari-607-branch/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r244621 r244798 131 131 #if PLATFORM(IOS_FAMILY) 132 132 , touchCalloutEnabled(RenderStyle::initialTouchCalloutEnabled()) 133 #endif 134 #if ENABLE(CSS_TRAILING_WORD) 135 , trailingWord(static_cast<unsigned>(RenderStyle::initialTrailingWord())) 133 136 #endif 134 137 , hangingPunctuation(RenderStyle::initialHangingPunctuation().toRaw()) … … 227 230 , touchCalloutEnabled(o.touchCalloutEnabled) 228 231 #endif 232 #if ENABLE(CSS_TRAILING_WORD) 233 , trailingWord(o.trailingWord) 234 #endif 229 235 , hangingPunctuation(o.hangingPunctuation) 230 236 , paintOrder(o.paintOrder) … … 349 355 && lineSnap == o.lineSnap 350 356 && lineAlign == o.lineAlign 357 #if ENABLE(CSS_TRAILING_WORD) 358 && trailingWord == o.trailingWord 359 #endif 351 360 && hangingPunctuation == o.hangingPunctuation 352 361 && paintOrder == o.paintOrder -
branches/safari-607-branch/Source/WebCore/rendering/style/StyleRareInheritedData.h
r244621 r244798 146 146 #endif 147 147 148 #if ENABLE(CSS_TRAILING_WORD) 149 unsigned trailingWord : 1; 150 #endif 151 148 152 unsigned hangingPunctuation : 4; 149 153 -
branches/safari-607-branch/Source/WebInspectorUI/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 1 5 2019-04-10 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-607-branch/Source/WebInspectorUI/Configurations/Version.xcconfig
r244788 r244798 2 2 MINOR_VERSION = 2; 3 3 TINY_VERSION = 6; 4 MICRO_VERSION = 1;4 MICRO_VERSION = 0; 5 5 NANO_VERSION = 1; 6 6 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js
r244621 r244798 156 156 // Compatibility (iOS 12): `inherited` didn't exist on `CSSPropertyInfo` 157 157 "-apple-color-filter", 158 "-apple-trailing-word", 158 159 "-webkit-animation-trigger", 159 160 "-webkit-aspect-ratio", … … 787 788 "plain", "buy", "set-up", "donate", "check-out", "book", "subscribe", 788 789 ], 790 "-apple-trailing-word": [ 791 "auto", "-webkit-partially-balanced", 792 ], 789 793 "-webkit-alt": [ 790 794 "attr()", -
branches/safari-607-branch/Source/WebKit/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244174. rdar://problem/28160396 8 1 9 2019-04-19 Kocsen Chung <kocsen_chung@apple.com> 2 10 -
branches/safari-607-branch/Source/WebKit/Configurations/Version.xcconfig
r244788 r244798 25 25 MINOR_VERSION = 2; 26 26 TINY_VERSION = 6; 27 MICRO_VERSION = 1;27 MICRO_VERSION = 0; 28 28 NANO_VERSION = 1; 29 29 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/WebKitLegacy/mac/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244174. rdar://problem/28160396 8 1 9 2019-04-10 Alan Coon <alancoon@apple.com> 2 10 -
branches/safari-607-branch/Source/WebKitLegacy/mac/Configurations/Version.xcconfig
r244788 r244798 25 25 MINOR_VERSION = 2; 26 26 TINY_VERSION = 6; 27 MICRO_VERSION = 1;27 MICRO_VERSION = 0; 28 28 NANO_VERSION = 1; 29 29 FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); -
branches/safari-607-branch/Source/cmake/WebKitFeatures.cmake
r244621 r244798 109 109 WEBKIT_OPTION_DEFINE(ENABLE_CSS_SCROLL_SNAP "Toggle CSS snap scroll support" PRIVATE OFF) 110 110 WEBKIT_OPTION_DEFINE(ENABLE_CSS_SELECTORS_LEVEL4 "Toggle CSS Selectors Level 4 support" PRIVATE ON) 111 WEBKIT_OPTION_DEFINE(ENABLE_CSS_TRAILING_WORD "Toggle CSS trailing word support" PRIVATE OFF) 111 112 WEBKIT_OPTION_DEFINE(ENABLE_CURSOR_VISIBILITY "Toggle cursor visibility support" PRIVATE OFF) 112 113 WEBKIT_OPTION_DEFINE(ENABLE_CUSTOM_SCHEME_HANDLER "Toggle Custom Scheme Handler support" PRIVATE OFF) -
branches/safari-607-branch/Tools/ChangeLog
r244621 r244798 1 2019-04-24 Alan Coon <alancoon@apple.com> 2 3 Revert r244173. rdar://problem/28160396 4 5 2019-04-24 Alan Coon <alancoon@apple.com> 6 7 Revert r244174. rdar://problem/28160396 8 1 9 2019-04-17 Ryan Haddad <ryanhaddad@apple.com> 2 10 -
branches/safari-607-branch/Tools/Scripts/webkitperl/FeatureList.pm
r244621 r244798 263 263 define => "ENABLE_CSS_SELECTORS_LEVEL4", value => \$cssSelectorsLevel4Support }, 264 264 265 { option => "css-trailing-word", desc => "Toggle CSS trailing word support", 266 define => "ENABLE_CSS_TRAILING_WORD", value => \$cssTrailingWordSupport }, 267 265 268 { option => "cursor-visibility", desc => "Toggle cursor visibility support", 266 269 define => "ENABLE_CURSOR_VISIBILITY", value => \$cursorVisibilitySupport },
Note:
See TracChangeset
for help on using the changeset viewer.