1 2013-11-08 Brady Eidson <beidson@apple.com>
3 Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
4 https://bugs.webkit.org/show_bug.cgi?id=124077
6 Reviewed by Alexey Proskuryakov.
8 The abstraction is no longer needed.
11 * GNUmakefile.list.am:
12 * WebCore.xcodeproj/project.pbxproj:
14 * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
16 * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
17 * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
19 * Modules/indexeddb/IDBBackingStoreInterface.h:
20 * Modules/indexeddb/IDBCursorBackend.cpp:
21 * Modules/indexeddb/IDBCursorBackend.h:
22 * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
23 * Modules/indexeddb/IDBDatabaseBackendImpl.h:
24 * Modules/indexeddb/IDBFactoryBackendInterface.h:
25 * Modules/indexeddb/IDBTransactionBackendOperations.h:
26 * Modules/indexeddb/IDBTransactionCoordinator.cpp:
27 * Modules/indexeddb/IDBTransactionCoordinator.h:
28 * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
29 * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
30 * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
31 * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
33 2013-11-08 Simon Fraser <simon.fraser@apple.com>
35 REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
36 https://bugs.webkit.org/show_bug.cgi?id=124075
38 Reviewed by Beth Dakin.
40 In r155660 I removed some scrollbar-related layouts when scrollbars
43 However, ScrollView::updateScrollbars() has a case where we still need
44 to do multiple pases, related to its "Never ever try to both gain/lose a
45 scrollbar in the same pass" comment. When we avoid making a new scrollbar
46 because the other was removed, we need to do another pass to bring the
47 correct scrollbar back.
49 Can't test overlay scrollbars in tests.
51 * platform/ScrollView.cpp:
52 (WebCore::ScrollView::updateScrollbars):
54 2013-11-08 Hans Muller <hmuller@adobe.com>
56 [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
57 https://bugs.webkit.org/show_bug.cgi?id=123769
59 Reviewed by Dirk Schulze.
61 Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
62 and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
63 method now generates intervals with Y coordinates that begin at the image shape's
64 bounds.y - shape-margin, which may be less than 0.
66 The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
67 by the shape-margin. A non-const overload of the method was added to centralize all
68 access to m_intervalLists.
70 Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
71 fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
73 * rendering/shapes/RasterShape.cpp:
74 (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
75 (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
76 (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
77 (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
78 * rendering/shapes/RasterShape.h:
79 (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
80 (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
82 2013-11-08 Piotr Grad <p.grad@samsung.com>
84 Ended event should work also when playback rate is negative
85 https://bugs.webkit.org/show_bug.cgi?id=123879
87 Reviewed by Eric Carlson.
89 According to W3C specification playback is ended also when playback rate is
90 negative and position is the earliest possible position.
92 Test: media/video-ended-event-negative-playback.html
94 * html/HTMLMediaElement.cpp:
95 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
97 2013-11-08 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
99 Checking for TypeError in RTCPeerConnection object creation
100 https://bugs.webkit.org/show_bug.cgi?id=124049
102 Reviewed by Eric Carlson.
104 If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
105 According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
107 Please notice that this patch does not make every tests run as expected,
108 RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
110 Existing tests were updated.
112 * GNUmakefile.list.am:
113 * Modules/mediastream/RTCPeerConnection.idl:
115 * WebCore.vcxproj/WebCore.vcxproj:
116 * WebCore.vcxproj/WebCore.vcxproj.filters:
117 * WebCore.xcodeproj/project.pbxproj:
118 * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
119 (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
121 2013-11-08 Bem Jones-Bey <bjonesbe@adobe.com>
123 Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
124 https://bugs.webkit.org/show_bug.cgi?id=124074
126 Reviewed by Sam Weinig.
128 Just a straightforward conversion from const pointers to const references.
130 Also, remove unneeded argument from FloatingObjects constructor.
132 No new tests, no behavior change.
134 * rendering/FloatingObjects.cpp:
135 (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
136 (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
137 (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
138 (WebCore::FloatingObjects::FloatingObjects):
139 (WebCore::FloatingObjects::clearLineBoxTreePointers):
140 (WebCore::FloatingObjects::computePlacedFloatsTree):
141 (WebCore::shapeInfoForFloat):
142 (WebCore::::updateOffsetIfNeeded):
143 (WebCore::::collectIfNeeded):
144 (WebCore::::heightRemaining):
145 * rendering/FloatingObjects.h:
146 * rendering/RenderBlockFlow.cpp:
147 (WebCore::RenderBlockFlow::createFloatingObjects):
149 2013-11-08 Sam Weinig <sam@webkit.org>
151 Teach SubframeLoader a bit about references
152 https://bugs.webkit.org/show_bug.cgi?id=124076
154 Reviewed by Anders Carlsson.
156 * html/HTMLAppletElement.cpp:
157 * html/HTMLFrameElementBase.cpp:
158 * html/HTMLMediaElement.cpp:
159 * loader/SubframeLoader.cpp:
160 * loader/SubframeLoader.h:
162 2013-11-08 Brady Eidson <beidson@apple.com>
164 Blind Windows build-fix attempt after r158959
166 * WebCore.vcxproj/WebCore.vcxproj:
168 2013-11-08 Brady Eidson <beidson@apple.com>
170 Merge IDBCursorBackendInterface and IDBCursorBackendImpl
171 https://bugs.webkit.org/show_bug.cgi?id=124068
173 Reviewed by Anders Carlsson.
176 * GNUmakefile.list.am:
177 * WebCore.xcodeproj/project.pbxproj:
179 * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
181 * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
182 * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
184 * Modules/indexeddb/IDBCallbacks.h:
185 * Modules/indexeddb/IDBCursor.cpp:
186 * Modules/indexeddb/IDBCursor.h:
187 * Modules/indexeddb/IDBCursorWithValue.cpp:
188 * Modules/indexeddb/IDBCursorWithValue.h:
189 * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
190 * Modules/indexeddb/IDBFactoryBackendInterface.h:
191 * Modules/indexeddb/IDBRequest.cpp:
192 * Modules/indexeddb/IDBRequest.h:
193 * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
194 * Modules/indexeddb/IDBTransactionBackendImpl.h:
195 * Modules/indexeddb/IDBTransactionBackendInterface.h:
196 * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
197 * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
198 * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
200 2013-11-08 Sam Weinig <sam@webkit.org>
202 Modernize FrameLoader a bit
203 https://bugs.webkit.org/show_bug.cgi?id=124073
205 Reviewed by Anders Carlsson.
207 * loader/FrameLoader.cpp:
208 * loader/FrameLoader.h:
209 Use std::unique_ptrs rather than OwnPtrs.
211 * loader/MixedContentChecker.cpp:
212 * loader/MixedContentChecker.h:
213 Switch to hold a Frame& rather than Frame*.
215 2013-11-08 Zan Dobersek <zdobersek@igalia.com>
217 Remove code guarded with ENABLE(STREAM)
218 https://bugs.webkit.org/show_bug.cgi?id=123667
220 Reviewed by Anders Carlsson.
222 Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
223 no port enables the feature and the work on this feature has wound down after the Chromium port forked,
224 leaving this code unmaintained.
226 * fileapi/FileReaderLoader.cpp:
227 * fileapi/FileReaderLoader.h:
229 2013-11-08 Bem Jones-Bey <bjonesbe@adobe.com>
231 RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
232 https://bugs.webkit.org/show_bug.cgi?id=123931
234 Reviewed by Sam Weinig.
236 Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
237 the search and to not need ShapeOutsideFloatOffsetMode anymore. This
238 moves almost all of the logic into FloatingObjects, making a small
239 reduction in the amount that RenderBlockFlow needs to know about the
240 implementation of FloatingObjects.
242 In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
243 and roundToInt itself so that all of it's callers can be simplified.
245 No new tests, no new behavior.
247 * rendering/FloatingObjects.cpp:
248 (WebCore::rangesIntersect):
249 (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
250 (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
251 (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
252 (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
253 (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
254 (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
255 (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
256 (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
257 (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
258 (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
259 (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
260 (WebCore::FloatingObjects::logicalLeftOffset):
261 (WebCore::FloatingObjects::logicalRightOffset):
262 * rendering/FloatingObjects.h:
263 * rendering/LineWidth.cpp:
264 (WebCore::LineWidth::fitBelowFloats):
265 * rendering/RenderBlockFlow.cpp:
266 (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
267 (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
268 (WebCore::RenderBlockFlow::getClearDelta):
269 * rendering/RenderBlockFlow.h:
271 2013-11-08 Alexey Proskuryakov <ap@apple.com>
273 https://bugs.webkit.org/show_bug.cgi?id=124064
274 Some WebCrypto files are not in correct directories
276 Rubber-stamped by Anders Carlsson.
278 * WebCore.xcodeproj/project.pbxproj:
279 * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
280 * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
281 * crypto/CryptoKeyAES.cpp: Removed.
282 * crypto/CryptoKeyAES.h: Removed.
283 * crypto/CryptoKeyMac.cpp: Removed.
284 * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
285 * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
286 * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
287 * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
288 * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
290 2013-11-08 Alexey Proskuryakov <ap@apple.com>
292 Implement JWK key import for HMAC and AES-CBC
293 https://bugs.webkit.org/show_bug.cgi?id=124059
295 Reviewed by Anders Carlsson.
297 Tests: crypto/subtle/aes-cbc-import-jwk.html
298 crypto/subtle/hmac-import-jwk.html
299 crypto/subtle/import-jwk.html
301 WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
302 we'll transform these into parsed KeyData subclasses before passing to algorithms.
304 CryptoKeySerialization is a base class for handling all these formats.
306 * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
308 * bindings/js/JSCryptoKeySerializationJWK.h: Added.
309 * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
310 (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
311 a nice freshly parsed JSON, no getters or anything.
312 (WebCore::getBooleanFromJSON): Ditto.
313 (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
314 (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
315 (WebCore::createHMACParameters): A simple helper.
316 (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
317 you can have algorithm parameters both inside a JWK key and passed as importKey()
318 arguments. They need to agree, whatever that means for specific serialization's
319 algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
320 (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
321 (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
322 both JWK and the caller agree.
323 (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
324 (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
327 * bindings/js/JSSubtleCryptoCustom.cpp:
328 (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
329 (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
330 (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
332 * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
333 * crypto/CryptoAlgorithm.h:
334 Updated signature for importKey to one that makes more sense. Decoding formats all
335 the way from a binary blob is not something that CryptoAlgorithm subclasses should
336 do, we now pass a KeyData subclass instead.
337 Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
340 * crypto/CryptoKeyData.h: Added.
341 (WebCore::CryptoKeyData::ENUM_CLASS):
342 (WebCore::CryptoKeyData::CryptoKeyData):
343 (WebCore::CryptoKeyData::~CryptoKeyData):
344 (WebCore::CryptoKeyData::format):
345 A base class for passing key material to algorithms. Currently, only one type is
346 supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
347 complicated, and secret/public ones are different too.
349 * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
350 confusingly floating around, and this was only needed in one file for parsing.
352 * crypto/CryptoKeySerialization.h: Added.
353 Base class for handling raw/pkcs8/spki/jwk keys.
355 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
356 (WebCore::CryptoAlgorithmAES_CBC::importKey):
357 * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
358 Updated to use CryptoKeyData.
360 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
361 (WebCore::CryptoAlgorithmHMAC::importKey):
362 * crypto/algorithms/CryptoAlgorithmHMAC.h:
363 Updated to use CryptoKeyData.
365 * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
366 (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
367 (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
368 * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
369 (WebCore::asCryptoKeyDataOctetSequence):
370 * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
371 (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
372 (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
373 (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
374 (WebCore::CryptoKeySerializationRaw::reconcileUsages):
375 (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
376 (WebCore::CryptoKeySerializationRaw::keyData):
377 * crypto/keys/CryptoKeySerializationRaw.h: Added.
378 Much code to pass around a Vector<char>.
380 2013-11-08 Mark Lam <mark.lam@apple.com>
382 Move breakpoint (and exception break) functionality into JSC::Debugger.
383 https://bugs.webkit.org/show_bug.cgi?id=121796.
385 Reviewed by Geoffrey Garen.
389 - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
392 - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
393 record. Previously, this info is tracked in the ScriptBreakpoint record
394 in ScriptDebugServer. The only element of ScriptBreakpoint that is not
395 being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
396 The ScriptBreakpointAction is still tracked by the ScriptDebugServer
397 in a list keyed on the corresponding BreakpointID.
398 The ScriptBreakpoint record is now only used as a means of passing
399 breakpoint paramaters to the ScriptDebugServer.
401 - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
402 It always goes through the DebuggerCallFrame.
404 * GNUmakefile.list.am:
405 * WebCore.vcxproj/WebCore.vcxproj:
406 * WebCore.vcxproj/WebCore.vcxproj.filters:
407 * WebCore.xcodeproj/project.pbxproj:
408 * bindings/js/BreakpointID.h: Added.
409 * bindings/js/ScriptDebugServer.cpp:
410 (WebCore::ScriptDebugServer::ScriptDebugServer):
411 (WebCore::ScriptDebugServer::setBreakpoint):
412 (WebCore::ScriptDebugServer::removeBreakpoint):
413 (WebCore::ScriptDebugServer::clearBreakpoints):
414 (WebCore::ScriptDebugServer::dispatchDidPause):
415 (WebCore::ScriptDebugServer::dispatchDidContinue):
416 (WebCore::ScriptDebugServer::dispatchDidParseSource):
417 (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
418 (WebCore::ScriptDebugServer::needPauseHandling):
419 (WebCore::ScriptDebugServer::handleBreakpointHit):
420 (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
421 (WebCore::ScriptDebugServer::handlePause):
422 * bindings/js/ScriptDebugServer.h:
423 * bindings/js/SourceID.h: Added.
424 * bindings/js/WorkerScriptDebugServer.cpp:
425 (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
426 * bindings/js/WorkerScriptDebugServer.h:
427 * inspector/InspectorDebuggerAgent.cpp:
428 (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
429 (WebCore::parseLocation):
430 (WebCore::InspectorDebuggerAgent::setBreakpoint):
431 (WebCore::InspectorDebuggerAgent::continueToLocation):
432 (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
433 (WebCore::InspectorDebuggerAgent::searchInContent):
434 (WebCore::InspectorDebuggerAgent::getScriptSource):
435 (WebCore::InspectorDebuggerAgent::didParseSource):
436 (WebCore::InspectorDebuggerAgent::didPause):
437 (WebCore::InspectorDebuggerAgent::clear):
438 * inspector/InspectorDebuggerAgent.h:
439 * inspector/ScriptDebugListener.h:
441 2013-11-08 László Langó <lango@inf.u-szeged.hu>
443 InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
444 https://bugs.webkit.org/show_bug.cgi?id=114316
446 Reviewed by Timothy Hatcher.
448 InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number,
449 but it should also include a column number. It looks like ultimately the line number comes from
450 JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
451 The column number would be needed by the Web Inspector to jump to the proper place in source code
452 to show where the XHR originated from.
454 * bindings/js/JSXMLHttpRequestCustom.cpp:
455 (WebCore::SendFunctor::SendFunctor):
456 (WebCore::SendFunctor::column):
457 (WebCore::SendFunctor::operator()):
458 (WebCore::JSXMLHttpRequest::send):
459 * inspector/InspectorConsoleAgent.cpp:
460 (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
461 * inspector/InspectorConsoleAgent.h:
462 * inspector/InspectorInstrumentation.cpp:
463 (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
464 * inspector/InspectorInstrumentation.h:
465 (WebCore::InspectorInstrumentation::didFinishXHRLoading):
466 * xml/XMLHttpRequest.cpp:
467 (WebCore::XMLHttpRequest::XMLHttpRequest):
468 (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
469 (WebCore::XMLHttpRequest::didFinishLoading):
470 * xml/XMLHttpRequest.h:
472 2013-11-08 Simon Fraser <simon.fraser@apple.com>
474 Left sidebar on cubic-bezier.com flickers
475 https://bugs.webkit.org/show_bug.cgi?id=123128
477 Reviewed by Dean Jackson.
479 The logic that determined whether position:fixed elements outside the viewport
480 should be composited was incorrect if the fixed element also had a transform.
482 layer.calculateLayerBounds() only takes into account painted transforms (since they
483 affect layer bounds). So we need to compute the bounds relative to the layer
484 itself, then use localToContainerQuad() to map them to document coordinates,
485 but only to the RenderView so that we don't hit the page scale transform.
487 Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
488 compositing/layer-creation/fixed-position-transformed-outside-view.html
490 * rendering/RenderLayerCompositor.cpp:
491 (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
493 2013-11-08 Martin Robinson <mrobinson@igalia.com>
495 [MathML] Center of stretched curly bracket not always vertically centered
496 https://bugs.webkit.org/show_bug.cgi?id=123715
498 Reviewed by Brent Fulgham.
500 * rendering/mathml/RenderMathMLOperator.cpp:
501 (WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Update an assertion and
502 handle the case where two glyph pieces abut.
503 (WebCore::RenderMathMLOperator::paint): Do not offset the center glyph by y().
505 2013-10-30 Jer Noble <jer.noble@apple.com>
507 [MSE] Bring SourceBuffer.append up to the most recent spec.
508 https://bugs.webkit.org/show_bug.cgi?id=123377
510 Reviewed by Eric Carlson.
512 Test: media/media-source/media-source-append-failed.html
514 Bring the MediaSource append() implementation up to the current spec.
516 * Modules/mediasource/SourceBuffer.cpp:
517 (WebCore::SourceBuffer::appendBufferInternal):
518 (WebCore::SourceBuffer::appendBufferTimerFired):
519 * platform/graphics/SourceBufferPrivate.h:
520 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
521 (WebCore::MockSourceBufferPrivate::append):
522 (WebCore::MockSourceBufferPrivate::evictCodedFrames):
523 (WebCore::MockSourceBufferPrivate::isFull):
524 * platform/mock/mediasource/MockSourceBufferPrivate.h:
526 2013-11-07 Jer Noble <jer.noble@apple.com>
528 [Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
529 https://bugs.webkit.org/show_bug.cgi?id=124031
531 Reviewed by Eric Carlson.
533 WTF::bind() causes errors when given a bare id pointer as a parameter,
534 when that parameter is casted to a specific NS type pointer (in this
535 case, a NSArray*) in order to pass it as a parameter to the bound
538 Instead of passing around bare id pointers, wrap them in RetainPtr<>
539 objects before passing them to WTF::bind().
541 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
542 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
543 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
544 (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
545 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
546 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
548 2013-11-08 Antti Koivisto <antti@apple.com>
550 Templated LChar/UChar paths for simple line layout
551 https://bugs.webkit.org/show_bug.cgi?id=124035
553 Reviewed by Andreas Kling.
555 * rendering/SimpleLineLayout.cpp:
556 (WebCore::SimpleLineLayout::canUseForText):
557 (WebCore::SimpleLineLayout::canUseFor):
559 Use a templated function to check for illegal characters.
561 (WebCore::SimpleLineLayout::skipWhitespaces):
563 Make a template function.
565 (WebCore::SimpleLineLayout::textWidth):
567 Make a template function plus some argument changes.
569 (WebCore::SimpleLineLayout::createTextRuns):
571 Template function for creating runs while operating with either LChars or UChar.
572 Also simplified line breaking and text width measuring logic.
574 (WebCore::SimpleLineLayout::create):
578 * rendering/break_lines.cpp:
579 * rendering/break_lines.h:
581 Move the implementation to the header (except for the table) so we can use the template
584 (WebCore::isBreakableSpace):
585 (WebCore::shouldBreakAfter):
586 (WebCore::needsLineBreakIterator):
587 (WebCore::nextBreakablePosition):
588 (WebCore::nextBreakablePositionIgnoringNBSP):
590 2013-11-08 Mario Sanchez Prada <mario.prada@samsung.com>
592 AX: [ATK] <span> elements exposed through ATK when not needed
593 https://bugs.webkit.org/show_bug.cgi?id=123885
595 Reviewed by Chris Fleizach.
597 As per SVN r158195, the way it's decided whether <span> elements
598 should be ignored or not has slightly changed, causing that the
599 GTK/EFL ports expose them in cases that they should be ignored,
600 such as for text elements that neither are focusable (e.g. by
601 explicitly setting tabindex) nor have a meaningful accessible name
602 suggesting they should be exposed.
604 As a result, the flattening that ATK based ports normally do for
605 this kind of elements (by folding them into their parents) do not
606 work correctly anymore, making two tests to fail:
608 platform/gtk/accessibility/spans-paragraphs-and-divs.html
609 platform/gtk/accessibility/spans.html
611 This patch encapsulates the part of the logic that affects this in
612 the computeAccessibilityIsIgnored() method, placing it in a
613 new method of AccessibilityObject that we can call from ATK's
614 accessibilityPlatformIncludesObject() to ensure we hide those
615 <span> elements when they don't fulfill those requirements.
617 * accessibility/AccessibilityObject.cpp:
618 (WebCore::AccessibilityObject::hasAttributesRequiredForInclusion):
619 New virtual method encapsulating part of the logic from the function
620 that computes whether accessibility should be ignored or not.
621 * accessibility/AccessibilityObject.h:
623 * accessibility/AccessibilityNodeObject.cpp:
624 (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion):
625 Override of the new method adding additional checks, as extracted from
626 the original bits in computeAccessibilityIsIgnored().
627 * accessibility/AccessibilityNodeObject.h:
629 * accessibility/AccessibilityRenderObject.cpp:
630 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
631 Use the newly added function where we had the original code before.
633 * accessibility/atk/AccessibilityObjectAtk.cpp:
634 (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
635 Make sure <span> elements are ignored if they are not focusable
636 and they don't have a meaningful accessible name.
638 2013-11-08 Carlos Garcia Campos <cgarcia@igalia.com>
640 [GTK] Add missing symbols to WebKitDOMEventTarget.symbols
641 https://bugs.webkit.org/show_bug.cgi?id=123990
643 Reviewed by Philippe Normand.
645 Add webkit_dom_event_target_add_event_listener_with_closure and
646 webkit_dom_event_target_remove_event_listener_with_closure to the
649 * bindings/gobject/WebKitDOMEventTarget.symbols:
650 * bindings/gobject/webkitdom.symbols:
652 2013-11-07 Carlos Garcia Campos <cgarcia@igalia.com>
654 [GTK] Use deprecation guards around deprecated API in GObject DOM bindings
655 https://bugs.webkit.org/show_bug.cgi?id=123899
657 Reviewed by Martin Robinson.
659 Do not include deprecated API when compiling with
660 WEBKIT_DISABLE_DEPRECATED option.
662 * bindings/scripts/CodeGeneratorGObject.pm:
664 * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
665 * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
667 2013-11-07 Brady Eidson <beidson@apple.com>
669 Enhance SQL journal_mode setting code to be less likely to log an error.
670 <rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018
672 Reviewed by Anders Carlsson.
674 Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned.
675 Change the code to handle that.
677 * platform/sql/SQLiteDatabase.cpp:
678 (WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition.
680 2013-11-07 Brady Eidson <beidson@apple.com>
682 Update an out-dated ASSERT in IconDatabase code.
683 <rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
685 Reviewed by Andreas Kling.
687 With the asynchronous interfaces that have been added and the support for WK2 that has been added,
688 this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
690 * loader/icon/IconDatabase.cpp:
691 (WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
693 2013-11-07 Andreas Kling <akling@apple.com>
695 RenderSVGResource helpers should take RenderStyle by const reference.
696 <https://webkit.org/b/124029>
698 Take const RenderStyle& instead of RenderStyle* in a few more places
699 so we can get rid of some ampersands and assertions.
701 Reviewed by Anders Carlsson.
703 2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
705 [AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
706 https://bugs.webkit.org/show_bug.cgi?id=123984
708 Reviewed by Mario Sanchez Prada.
710 As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
711 ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
712 static_cast<>. This change will help to detect bad type casts further.
714 No new tests, no behavior changes.
716 * accessibility/AccessibilityARIAGrid.cpp:
717 (WebCore::AccessibilityARIAGrid::addTableCellChild):
718 (WebCore::AccessibilityARIAGrid::addChildren):
719 * accessibility/AccessibilityARIAGridCell.cpp:
720 (WebCore::AccessibilityARIAGridCell::rowIndexRange):
721 * accessibility/AccessibilityTable.cpp:
722 (WebCore::AccessibilityTable::addChildren):
723 (WebCore::AccessibilityTable::rowHeaders):
724 (WebCore::AccessibilityTable::columnHeaders):
725 (WebCore::AccessibilityTable::cellForColumnAndRow):
726 * accessibility/AccessibilityTableCell.h:
727 * accessibility/AccessibilityTableColumn.h:
728 * accessibility/AccessibilityTableRow.cpp:
729 (WebCore::AccessibilityTableRow::headerObject):
730 * accessibility/AccessibilityTableRow.h:
731 * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
733 (webkitAccessibleTableGetColumnHeader):
734 (webkitAccessibleTableGetRowHeader):
735 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
736 (-[WebAccessibilityObjectWrapper tableCellParent]):
737 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
738 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
740 2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
742 REGRESSION (r154375): Image is oriented incorrectly
743 https://bugs.webkit.org/show_bug.cgi?id=123831
745 Reviewed by Antonio Gomes.
747 r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
748 It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
751 * rendering/RenderImage.cpp:
752 (WebCore::RenderImage::paintReplaced):
753 (WebCore::RenderImage::paintIntoRect):
755 2013-11-07 Hans Muller <hmuller@adobe.com>
757 [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
758 https://bugs.webkit.org/show_bug.cgi?id=123934
760 Reviewed by Andreas Kling.
762 RasterShapeIntervals::getExcludedIntervals() was returning an empty
763 list when the line overlapped any vertical gap in the image. This short-circuit
764 had been mistakenly copied from getIncludedIntervals(), where it makes sense.
766 Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
768 * rendering/shapes/RasterShape.cpp:
769 (WebCore::RasterShapeIntervals::getExcludedIntervals):
771 2013-11-07 Simon Fraser <simon.fraser@apple.com>
773 Make contents layer borders more visible
774 https://bugs.webkit.org/show_bug.cgi?id=124025
776 Reviewed by Tim Horton.
778 Layer borders for contents layers are impossible to see when the
779 contentsLayer has the same bounds as its parent; make the contents
780 layer border 4px thick to make it more visible.
782 * platform/graphics/ca/GraphicsLayerCA.cpp:
783 (WebCore::GraphicsLayerCA::setupContentsLayer):
785 2013-11-07 Andreas Kling <akling@apple.com>
787 InlineFlowBox always has a RenderBoxModelObject, take advantage.
788 <https://webkit.org/b/124024>
790 Since InlineFlowBox already has the branch-less renderer() returning
791 a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
792 wherever we have a tightly-typed box. One branch disappears from
795 Deleted boxModelObject() on InlineFlowBox to prevent new code from
796 calling the less efficient function.
798 Reviewed by Anders Carlsson.
800 2013-11-07 Andreas Kling <akling@apple.com>
802 CTTE: Scrolling tree nodes should always have a ScrollingTree&.
803 <https://webkit.org/b/124022>
805 Let ScrollingTreeNode and subclasses store the backpointer to the
806 tree as a ScrollingTree& reference.
808 Reviewed by Anders Carlsson.
810 2013-11-07 Simon Fraser <simon.fraser@apple.com>
812 Lots of layers get solid color but transparent contents layers now
813 https://bugs.webkit.org/show_bug.cgi?id=123537
815 Reviewed by Tim Horton.
817 We call rendererBackgroundColor() to determine the layer's background color,
818 but on most elements this returns the transparent color (a valid color).
819 This caused us to allocate a contentsLayer, and use the transparent color as its
820 backgroundColor, which was wasteful.
822 Fix by only making a background-color layer if the color is not transparent (zero alpha).
824 Also avoid making a new contents layer on every color change, and make sure that
825 we don't do implicit animations for backgroundColor, and some other properties
826 that were omitted by mistake.
828 Layer tree dumps don't dump content layers, so no way to test easily.
830 * platform/graphics/ca/GraphicsLayerCA.cpp:
831 (WebCore::GraphicsLayerCA::setContentsToSolidColor):
832 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
833 (nullActionsDictionary):
835 2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
837 DOMTokenList::add can add duplicated values if arguments had duplicated values
838 https://bugs.webkit.org/show_bug.cgi?id=123962
840 Reviewed by Benjamin Poulain.
842 Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
844 In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
845 See http://dom.spec.whatwg.org/#dom-domtokenlist-add
847 * html/DOMTokenList.cpp:
848 (WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
850 2013-11-07 Eric Carlson <eric.carlson@apple.com>
852 Remove npr.org specific hack in HTMLMediaElement
853 https://bugs.webkit.org/show_bug.cgi?id=123859
855 Reviewed by Jer Noble.
857 Remove the site specific hack added in r57820, it is no longer necessary.
859 * html/HTMLMediaElement.cpp:
860 (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
861 (HTMLMediaElement::play): Don't special case npr.org.
862 * html/HTMLMediaElement.h:
864 2013-11-07 Simon Fraser <simon.fraser@apple.com>
866 Attempt to fix the 32-bit build. Virtual thunks seem to have different
867 symbol names between 32- and 64-bit.
871 2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
873 Crash in HTMLMediaElement::contextDestroyed
874 https://bugs.webkit.org/show_bug.cgi?id=123963
876 Reviewed by Eric Carlson.
878 Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
880 * html/HTMLMediaElement.cpp:
881 (WebCore::HTMLMediaElement::~HTMLMediaElement):
883 2013-11-07 Jer Noble <jer.noble@apple.com>
885 [Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084
886 https://bugs.webkit.org/show_bug.cgi?id=124012
888 Reviewed by Eric Carlson.
890 The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
892 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
893 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
895 2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
897 Crash when submitting form in a document with null encoding
898 https://bugs.webkit.org/show_bug.cgi?id=123975
900 Reviewed by Alexey Proskuryakov.
902 Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
904 The CString object which is passed to normalizeLineEndingsToCRLF() can be
905 a null string. It is created in FormDataList::appendString(), and it
906 produces a null CString if FormDataList::m_encoding is a null encoding.
908 Test: fast/forms/form-submit-in-image-document.html
910 * platform/text/LineEnding.cpp:
911 (internalNormalizeLineEndingsToCRLF):
913 2013-11-07 Anders Carlsson <andersca@apple.com>
915 Use std::function for all policy continuation functions
916 https://bugs.webkit.org/show_bug.cgi?id=124011
918 Reviewed by Sam Weinig.
920 * loader/DocumentLoader.cpp:
921 (WebCore::DocumentLoader::willSendRequest):
922 (WebCore::DocumentLoader::responseReceived):
923 * loader/DocumentLoader.h:
924 * loader/FrameLoader.cpp:
925 (WebCore::FrameLoader::loadURL):
926 (WebCore::FrameLoader::load):
927 (WebCore::FrameLoader::loadWithDocumentLoader):
928 (WebCore::FrameLoader::loadPostRequest):
929 * loader/PolicyCallback.cpp:
930 (WebCore::PolicyCallback::clear):
931 (WebCore::PolicyCallback::set):
932 (WebCore::PolicyCallback::call):
933 (WebCore::PolicyCallback::clearRequest):
934 (WebCore::PolicyCallback::cancel):
935 * loader/PolicyCallback.h:
936 * loader/PolicyChecker.cpp:
937 (WebCore::PolicyChecker::checkNavigationPolicy):
938 (WebCore::PolicyChecker::checkNewWindowPolicy):
939 (WebCore::PolicyChecker::checkContentPolicy):
940 * loader/PolicyChecker.h:
942 2013-11-07 Brady Eidson <beidson@apple.com>
944 Use SQLite journal mode WAL (WriteAheadLogging)
945 https://bugs.webkit.org/show_bug.cgi?id=124009
947 Reviewed by Anders Carlsson.
949 WriteAheadLogging journalling is better than the traditional rollback model.
951 * platform/sql/SQLiteDatabase.cpp:
952 (WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
954 2013-11-07 Mark Lam <mark.lam@apple.com>
956 Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
957 https://bugs.webkit.org/show_bug.cgi?id=123945.
959 Reviewed by Geoffrey Garen.
963 * bindings/js/JSInjectedScriptHostCustom.cpp:
964 (WebCore::JSInjectedScriptHost::functionDetails):
965 * bindings/js/JavaScriptCallFrame.h:
966 (WebCore::JavaScriptCallFrame::sourceID):
967 * bindings/js/ScriptDebugServer.cpp:
968 (WebCore::ScriptDebugServer::ScriptDebugServer):
969 (WebCore::ScriptDebugServer::setBreakpoint):
970 (WebCore::ScriptDebugServer::removeBreakpoint):
971 (WebCore::ScriptDebugServer::hasBreakpoint):
972 (WebCore::ScriptDebugServer::clearBreakpoints):
973 (WebCore::ScriptDebugServer::updateCallFrame):
974 (WebCore::ScriptDebugServer::pauseIfNeeded):
975 * bindings/js/ScriptDebugServer.h:
976 * inspector/InspectorConsoleAgent.cpp:
977 (WebCore::InspectorConsoleAgent::addMessageToConsole):
978 * inspector/InspectorConsoleAgent.h:
979 * inspector/InspectorConsoleInstrumentation.h:
980 (WebCore::InspectorInstrumentation::addMessageToConsole):
981 * inspector/InspectorDOMAgent.cpp:
982 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
983 * inspector/InspectorDebuggerAgent.cpp:
984 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
985 (WebCore::parseLocation):
986 (WebCore::InspectorDebuggerAgent::setBreakpoint):
987 (WebCore::InspectorDebuggerAgent::removeBreakpoint):
988 (WebCore::InspectorDebuggerAgent::continueToLocation):
989 (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
990 (WebCore::InspectorDebuggerAgent::searchInContent):
991 (WebCore::InspectorDebuggerAgent::setScriptSource):
992 (WebCore::InspectorDebuggerAgent::getScriptSource):
993 (WebCore::InspectorDebuggerAgent::compileScript):
994 (WebCore::InspectorDebuggerAgent::runScript):
995 (WebCore::InspectorDebuggerAgent::didParseSource):
996 (WebCore::InspectorDebuggerAgent::didPause):
997 (WebCore::InspectorDebuggerAgent::clear):
998 (WebCore::InspectorDebuggerAgent::reset):
999 * inspector/InspectorDebuggerAgent.h:
1000 * inspector/InspectorInstrumentation.cpp:
1001 (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1002 * inspector/InspectorInstrumentation.h:
1003 * inspector/ScriptDebugListener.h:
1005 2013-11-07 Cidorvan Leite <cidorvan.leite@openbossa.org>
1007 Avoid invalid cairo matrix when drawing surfaces too small
1008 https://bugs.webkit.org/show_bug.cgi?id=123810
1010 Drawing surfaces too small makes inverse matrix with values too big,
1011 when this happen, cairo context is not valid anymore and it stops to draw anything.
1013 Reviewed by Martin Robinson.
1015 Test: fast/canvas/drawImage-with-small-values.html
1017 * platform/graphics/cairo/PlatformContextCairo.cpp:
1018 (WebCore::PlatformContextCairo::drawSurfaceToContext):
1020 2013-11-07 Antti Koivisto <antti@apple.com>
1022 Simple line layout crashes with SVG fonts
1023 https://bugs.webkit.org/show_bug.cgi?id=124002
1025 Reviewed by Simon Fraser.
1027 Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
1029 Test: fast/text/svg-font-simple-line-crash.html
1031 * platform/graphics/Font.h:
1032 (WebCore::Font::isSVGFont):
1034 Add isSVGFont() so callers don't need to go via primaryFont().
1036 * rendering/InlineTextBox.cpp:
1037 (WebCore::InlineTextBox::constructTextRun):
1038 * rendering/RenderBlock.cpp:
1039 (WebCore::constructTextRunInternal):
1040 * rendering/SimpleLineLayout.cpp:
1041 (WebCore::SimpleLineLayout::canUseFor):
1045 * rendering/svg/SVGInlineTextBox.cpp:
1046 (WebCore::SVGInlineTextBox::constructTextRun):
1047 * rendering/svg/SVGTextMetrics.cpp:
1048 (WebCore::SVGTextMetrics::constructTextRun):
1049 (WebCore::SVGTextMetrics::SVGTextMetrics):
1050 * rendering/svg/SVGTextRunRenderingContext.h:
1052 Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
1054 2013-11-07 Simon Fraser <simon.fraser@apple.com>
1056 Allow customization of the contentsScale of TileController tiles
1057 https://bugs.webkit.org/show_bug.cgi?id=124004
1059 Reviewed by Tim Horton.
1061 On some platorms, zooming out on pages with TiledBacking compositing
1062 layers can cause very high memory use, because the TiledBacking retains
1063 the original page scale while the zoom is in flight, but can be asked
1064 to cover a large area.
1066 Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
1067 to provide an additional scale factor for newly created tiles. Platforms can
1068 then customize this to create low-res tiles when necessary.
1071 * platform/graphics/GraphicsLayerClient.h:
1072 (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
1073 * platform/graphics/ca/GraphicsLayerCA.cpp:
1074 (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
1075 * platform/graphics/ca/GraphicsLayerCA.h:
1076 * platform/graphics/ca/PlatformCALayerClient.h:
1077 (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
1078 * platform/graphics/ca/mac/TileController.h:
1079 * platform/graphics/ca/mac/TileController.mm:
1080 (WebCore::TileController::TileController):
1081 (WebCore::TileController::setScale):
1082 (WebCore::TileController::createTileLayer):
1083 * rendering/RenderLayerBacking.cpp:
1084 (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
1085 * rendering/RenderLayerBacking.h:
1086 * rendering/RenderLayerCompositor.cpp:
1087 (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
1088 * rendering/RenderLayerCompositor.h:
1090 2013-11-07 Jer Noble <jer.noble@apple.com>
1092 Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
1094 * rendering/FloatingObjects.cpp:
1096 2013-11-07 Bem Jones-Bey <bjonesbe@adobe.com>
1098 Refactor logical left/right offset for line methods
1099 https://bugs.webkit.org/show_bug.cgi?id=123898
1101 Reviewed by David Hyatt.
1103 Simplify the logical left/right offset for line methods and their
1104 implementation, including the ComputeFloatOffsetAdapter. This also
1105 reduces the number of line offset methods in RenderBlock.
1107 No new tests, no behavior change.
1109 * rendering/FloatingObjects.cpp:
1110 (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1111 (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
1112 the offset instead of using a confusing out parameter.
1113 (WebCore::::shapeOffset): Method to return the offset modified by the
1114 shape delta. Moving the computation to this method allowed for
1115 simplification of the users of ComputeFloatOffsetAdapter.
1116 (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
1117 method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
1118 offset based on the float margin box.
1119 (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
1120 (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
1121 the offset based on the shape's contour.
1122 (WebCore::FloatingObjects::logicalRightOffset): Ditto.
1123 (WebCore::::heightRemaining): Rename to properly follow the getter
1125 * rendering/FloatingObjects.h:
1126 * rendering/RenderBlock.h:
1127 (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
1128 use of ShapeOutsideFloatOffsetMode and heightRemaining.
1129 (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
1130 (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
1131 (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
1132 * rendering/RenderBlockFlow.cpp:
1133 (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
1134 Positioning a float is the only case where the float margin box
1135 should be used, and also the only case where heightRemaining is
1136 needed. This handles that case.
1137 (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
1139 (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
1140 use logical(Left|Right)OffsetForPositioningFloatOnLine.
1141 (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
1142 remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
1143 (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
1144 * rendering/RenderBlockFlow.h:
1146 2013-11-07 Alexandru Chiculita <achicu@adobe.com>
1148 Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
1149 https://bugs.webkit.org/show_bug.cgi?id=123577
1151 Reviewed by Timothy Hatcher.
1153 Test: inspector-protocol/model/content-flow-content-removal.html
1155 Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
1156 anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
1158 * inspector/InspectorCSSAgent.cpp:
1159 (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
1161 2013-10-30 Jer Noble <jer.noble@apple.com>
1163 [MSE] Add mock MediaSource classes for testing.
1164 https://bugs.webkit.org/show_bug.cgi?id=123322
1166 Reviewed by Eric Carlson.
1168 Tests: media/media-source/media-source-addsourcebuffer.html
1169 media/media-source/media-source-append-buffer.html
1170 media/media-source/media-source-canplaythrough.html
1171 media/media-source/media-source-closed.html
1172 media/media-source/media-source-play.html
1173 media/media-source/media-source-track-enabled.html
1174 media/media-source/media-source-tracks.html
1177 Add mock implementation of platform MediaSource classes, allowing ports to test the
1178 MediaSource API without having a platform implementation.
1180 The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
1181 format with an initialization segment containing a number of tracks, followed by a list of
1184 Add a means to insert a new media engine factory at runtime, so the internals object can add
1185 a MockMediaSourceMediaPlayer:
1186 * platform/graphics/MediaPlayer.cpp:
1187 (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
1188 * platform/graphics/MediaPlayer.h:
1189 * testing/Internals.cpp:
1190 (WebCore::Internals::initializeMockMediaSource):
1191 * testing/Internals.h:
1192 * testing/Internals.idl:
1194 For non-media-source supporting media engines, fail immediately when asked to load a media
1195 source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
1196 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1197 (WebCore::MediaPlayerPrivateAVFoundation::load):
1198 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1199 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1200 (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1201 * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1202 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1203 (WebCore::MediaPlayerPrivateQTKit::load):
1204 (WebCore::MediaPlayerPrivateQTKit::supportsType):
1206 Add new files to the project:
1207 * WebCore.xcodeproj/project.pbxproj:
1208 * Source/WebCore/WebCore.exp.in:
1210 Update the MediaSource implementation:
1211 * Modules/mediasource/MediaSource.cpp:
1212 (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
1213 * Modules/mediasource/SourceBuffer.cpp:
1214 (WebCore::SourceBuffer::buffered): Ditto.
1215 (WebCore::SourceBuffer::setTimestampOffset): Ditto.
1216 (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
1217 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
1218 bring the implementation up to date with part of the spec.
1219 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
1220 SampleIsRandomAccessPredicate.
1222 Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
1223 * platform/mock/mediasource/MockBox.cpp: Added.
1224 (WebCore::MockBox::MockBox):
1225 (WebCore::MockBox::peekType):
1226 (WebCore::MockBox::peekLength):
1227 (WebCore::MockTrackBox::MockTrackBox):
1228 (WebCore::MockTrackBox::type):
1229 (WebCore::MockInitializationBox::MockInitializationBox):
1230 (WebCore::MockInitializationBox::type):
1231 (WebCore::MockSampleBox::MockSampleBox):
1232 (WebCore::MockSampleBox::type):
1233 * platform/mock/mediasource/MockBox.h: Added.
1234 (WebCore::MockBox::length):
1235 (WebCore::MockBox::type):
1236 (WebCore::MockTrackBox::trackID):
1237 (WebCore::MockTrackBox::codec):
1238 (WebCore::MockTrackBox::kind):
1239 (WebCore::MockInitializationBox::duration):
1240 (WebCore::MockInitializationBox::tracks):
1241 (WebCore::MockSampleBox::presentationTimestamp):
1242 (WebCore::MockSampleBox::decodeTimestamp):
1243 (WebCore::MockSampleBox::duration):
1244 (WebCore::MockSampleBox::trackID):
1245 (WebCore::MockSampleBox::flags):
1246 (WebCore::MockSampleBox::isSync):
1248 Add a MediaPlayerPrivate implementation which uses MockMediaSource:
1249 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
1250 (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
1251 (WebCore::MockMediaPlayerMediaSource::create):
1252 (WebCore::mimeTypeCache):
1253 (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
1254 (WebCore::MockMediaPlayerMediaSource::supportsType):
1255 (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
1256 (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
1257 (WebCore::MockMediaPlayerMediaSource::load):
1258 (WebCore::MockMediaPlayerMediaSource::cancelLoad):
1259 (WebCore::MockMediaPlayerMediaSource::play):
1260 (WebCore::MockMediaPlayerMediaSource::pause):
1261 (WebCore::MockMediaPlayerMediaSource::naturalSize):
1262 (WebCore::MockMediaPlayerMediaSource::hasVideo):
1263 (WebCore::MockMediaPlayerMediaSource::hasAudio):
1264 (WebCore::MockMediaPlayerMediaSource::setVisible):
1265 (WebCore::MockMediaPlayerMediaSource::seeking):
1266 (WebCore::MockMediaPlayerMediaSource::paused):
1267 (WebCore::MockMediaPlayerMediaSource::networkState):
1268 (WebCore::MockMediaPlayerMediaSource::readyState):
1269 (WebCore::MockMediaPlayerMediaSource::buffered):
1270 (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
1271 (WebCore::MockMediaPlayerMediaSource::setSize):
1272 (WebCore::MockMediaPlayerMediaSource::paint):
1273 (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
1274 (WebCore::MockMediaPlayerMediaSource::durationDouble):
1275 (WebCore::MockMediaPlayerMediaSource::seekDouble):
1276 (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
1277 (WebCore::MockMediaPlayerMediaSource::updateDuration):
1278 (WebCore::MockMediaPlayerMediaSource::setReadyState):
1279 * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
1281 Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
1282 * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
1283 (WebCore::MockMediaSourcePrivate::create):
1284 (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
1285 (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
1286 (WebCore::MockMediaSourcePrivate::addSourceBuffer):
1287 (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
1288 (WebCore::MockMediaSourcePrivate::duration):
1289 (WebCore::MockMediaSourcePrivate::setDuration):
1290 (WebCore::MockMediaSourcePrivate::markEndOfStream):
1291 (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
1292 (WebCore::MockMediaSourcePrivate::readyState):
1293 (WebCore::MockMediaSourcePrivate::setReadyState):
1294 (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
1295 (WebCore::MockSourceBufferPrivateHasAudio):
1296 (WebCore::MockMediaSourcePrivate::hasAudio):
1297 (WebCore::MockSourceBufferPrivateHasVideo):
1298 (WebCore::MockMediaSourcePrivate::hasVideo):
1299 * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
1300 (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
1301 (WebCore::MockMediaSourcePrivate::player):
1303 Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
1304 bytestream provided by SourceBuffer:
1305 * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
1306 (WebCore::MockMediaSample::create):
1307 (WebCore::MockMediaSample::~MockMediaSample):
1308 (WebCore::MockMediaSample::MockMediaSample):
1309 (WebCore::MockMediaSample::platformSample):
1310 (WebCore::MockMediaDescription::create):
1311 (WebCore::MockMediaDescription::~MockMediaDescription):
1312 (WebCore::MockMediaDescription::MockMediaDescription):
1313 (WebCore::MockSourceBufferPrivate::create):
1314 (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
1315 (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
1316 (WebCore::MockSourceBufferPrivate::setClient):
1317 (WebCore::MockSourceBufferPrivate::append):
1318 (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
1319 (WebCore::MockSourceBufferPrivate::didReceiveSample):
1320 (WebCore::MockSourceBufferPrivate::abort):
1321 (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
1322 (WebCore::MockSourceBufferPrivate::readyState):
1323 (WebCore::MockSourceBufferPrivate::setReadyState):
1324 (WebCore::MockSourceBufferPrivate::hasVideo):
1325 (WebCore::MockSourceBufferPrivate::hasAudio):
1326 * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
1328 Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
1329 which wrap the MockTrackBox class:
1330 * platform/mock/mediasource/MockTracks.cpp: Added.
1331 * platform/mock/mediasource/MockTracks.h: Added.
1332 (WebCore::MockAudioTrackPrivate::create):
1333 (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
1334 (WebCore::MockAudioTrackPrivate::id):
1335 (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
1336 (WebCore::MockTextTrackPrivate::create):
1337 (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
1338 (WebCore::MockTextTrackPrivate::id):
1339 (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
1340 (WebCore::MockVideoTrackPrivate::create):
1341 (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
1342 (WebCore::MockVideoTrackPrivate::id):
1343 (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
1345 2013-11-07 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
1347 Changing MediaStreamDescriptor to MediaStreamPrivate
1348 https://bugs.webkit.org/show_bug.cgi?id=123935
1350 Reviewed by Eric Carlson.
1352 No new tests needed.
1355 * GNUmakefile.list.am:
1356 * Modules/mediastream/MediaStream.cpp:
1357 (WebCore::MediaStream::create):
1358 (WebCore::MediaStream::MediaStream):
1359 (WebCore::MediaStream::~MediaStream):
1360 (WebCore::MediaStream::ended):
1361 (WebCore::MediaStream::setEnded):
1362 (WebCore::MediaStream::addTrack):
1363 (WebCore::MediaStream::removeTrack):
1364 (WebCore::MediaStream::removeRemoteSource):
1365 * Modules/mediastream/MediaStream.h:
1366 * Modules/mediastream/MediaStreamRegistry.cpp:
1367 (WebCore::MediaStreamRegistry::registerURL):
1368 (WebCore::MediaStreamRegistry::unregisterURL):
1369 (WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
1370 * Modules/mediastream/MediaStreamRegistry.h:
1371 * Modules/mediastream/MediaStreamTrack.cpp:
1372 * Modules/mediastream/MediaStreamTrack.h:
1373 * Modules/mediastream/RTCPeerConnection.cpp:
1374 (WebCore::RTCPeerConnection::addStream):
1375 (WebCore::RTCPeerConnection::removeStream):
1376 (WebCore::RTCPeerConnection::didAddRemoteStream):
1377 (WebCore::RTCPeerConnection::didRemoveRemoteStream):
1378 * Modules/mediastream/RTCPeerConnection.h:
1379 * Modules/mediastream/UserMediaRequest.cpp:
1380 (WebCore::UserMediaRequest::didCreateStream):
1381 (WebCore::UserMediaRequest::callSuccessHandler):
1382 * Modules/mediastream/UserMediaRequest.h:
1383 * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
1384 (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
1385 * WebCore.xcodeproj/project.pbxproj:
1386 * html/HTMLMediaElement.cpp:
1387 (HTMLMediaElement::loadResource):
1388 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1389 (WebCore::toWebMediaStreamPrivate):
1390 (WebCore::MediaPlayerPrivate::lookupMediaStream):
1391 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1392 * platform/mediastream/MediaStreamCenter.cpp:
1393 * platform/mediastream/MediaStreamCreationClient.h:
1394 * platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
1395 (WebCore::MediaStreamPrivate::create):
1396 (WebCore::MediaStreamPrivate::addSource):
1397 (WebCore::MediaStreamPrivate::removeSource):
1398 (WebCore::MediaStreamPrivate::addRemoteSource):
1399 (WebCore::MediaStreamPrivate::removeRemoteSource):
1400 (WebCore::MediaStreamPrivate::addRemoteTrack):
1401 (WebCore::MediaStreamPrivate::removeRemoteTrack):
1402 (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1403 (WebCore::MediaStreamPrivate::setEnded):
1404 (WebCore::MediaStreamPrivate::addTrack):
1405 (WebCore::MediaStreamPrivate::removeTrack):
1406 * platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
1407 (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
1408 (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
1409 (WebCore::MediaStreamPrivate::client):
1410 (WebCore::MediaStreamPrivate::setClient):
1411 (WebCore::MediaStreamPrivate::id):
1412 (WebCore::MediaStreamPrivate::numberOfAudioSources):
1413 (WebCore::MediaStreamPrivate::audioSources):
1414 (WebCore::MediaStreamPrivate::numberOfVideoSources):
1415 (WebCore::MediaStreamPrivate::videoSources):
1416 (WebCore::MediaStreamPrivate::numberOfAudioTracks):
1417 (WebCore::MediaStreamPrivate::audioTracks):
1418 (WebCore::MediaStreamPrivate::numberOfVideoTracks):
1419 (WebCore::MediaStreamPrivate::videoTracks):
1420 (WebCore::MediaStreamPrivate::ended):
1421 * platform/mediastream/MediaStreamSource.cpp:
1422 * platform/mediastream/MediaStreamSource.h:
1423 * platform/mediastream/RTCPeerConnectionHandler.h:
1424 * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1425 * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
1426 * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
1427 * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
1428 * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
1429 * platform/mediastream/mac/MediaStreamCenterMac.cpp:
1430 (WebCore::MediaStreamCenterMac::createMediaStream):
1431 * platform/mock/MockMediaStreamCenter.cpp:
1432 (WebCore::MockMediaStreamCenter::createMediaStream):
1433 * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1434 (WebCore::RTCPeerConnectionHandlerMock::addStream):
1435 (WebCore::RTCPeerConnectionHandlerMock::removeStream):
1436 * platform/mock/RTCPeerConnectionHandlerMock.h:
1438 2013-11-07 Denis Nomiyama <d.nomiyama@samsung.com>
1440 [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
1441 https://bugs.webkit.org/show_bug.cgi?id=50619
1443 Reviewed by Martin Robinson.
1445 Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
1446 the 90 degrees rotation problem of CJK characters when displaying
1449 New tests are not required as the existing tests for vertical text will
1452 * GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
1453 OpenTypeVerticalData.h to platformgtk_sources.
1454 * PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
1455 * PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
1456 * platform/graphics/FontCache.cpp: Originally the HashMap for
1457 OpenTypeVerticalData was designed with FontFileKey as integer in the
1458 Chromium port, which was an unique number provided by Skia. Since other
1459 ports use FontFileKey as string, new generic hash functions had to be
1460 implemented instead of using the specific ones for integers.
1461 (WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
1462 HashMap of OpenTypeVerticalData.
1463 (WebCore::FontVerticalDataCacheKeyHash::equal): New function for
1464 comparing hash indexes in the HashMap of OpenTypeVerticalData.
1465 (WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
1466 giving an empty FontFileKey.
1467 (WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
1468 function to create a FontFileKey for deleted values.
1469 (WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
1470 to check if a HashMap entry is available.
1471 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1472 (WebCore::FontCustomPlatformData::fontPlatformData): Added font
1473 orientation as a parameter to the FontPlatformData constructor.
1474 * platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
1475 store the font orientation and m_horizontalOrientationMatrix to store
1476 the Cairo matrix for horizontal orientation, which can be restored in
1478 (WebCore::FontPlatformData::FontPlatformData): Added font orientation as
1480 (WebCore::FontPlatformData::orientation): Implemented this function
1481 based on m_orientation.
1482 * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
1483 helper function rotateCairoMatrixForVerticalOrientation() to rotate the
1484 Cairo matrix in case of vertical orientation.
1485 (WebCore::FontPlatformData::FontPlatformData): Initialized
1487 (WebCore::FontPlatformData::operator=): Added m_orientation and
1488 m_horizontalOrientationMatrix to the assignment operator.
1489 (WebCore::FontPlatformData::operator==): Added m_orientation to the
1491 (WebCore::FontPlatformData::initializeWithFontFace): Rotated and
1492 translated fonts if orientation is vertical. Also stored the horizontal
1494 (WebCore::FontPlatformData::verticalData): Returned the vertical data
1495 from the font cache.
1496 (WebCore::FontPlatformData::openTypeTable): Loaded the font table into
1498 (WebCore::FontPlatformData::setOrientation): Replaced the scaled font
1499 data by rotating fonts according to the new orientation.
1500 * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1501 (WebCore::SimpleFontData::platformInit): Set the glyph's height and
1502 width according to the font orientation. It also sets EM.
1503 (WebCore::SimpleFontData::platformCreateScaledFontData): Added
1504 orientation to the FontPlatformData constructor.
1505 (WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
1506 width according the orientation.
1507 * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
1508 (WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
1509 and extents according to the font orientation.
1511 2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1513 [AX] Use toAccessibilityRenderObject() instead of using static_cast<>
1514 https://bugs.webkit.org/show_bug.cgi?id=123986
1516 Reviewed by Mario Sanchez Prada.
1518 Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
1519 To use toAccessibilityRenderObject() is more helpful to find bad type cast.
1521 No new tests, no behavior changes.
1523 * accessibility/AXObjectCache.cpp:
1524 (WebCore::AXObjectCache::notificationPostTimerFired):
1525 * accessibility/AccessibilityImageMapLink.cpp:
1526 (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
1527 * accessibility/AccessibilityRenderObject.cpp:
1528 (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1529 (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1530 * accessibility/ios/AccessibilityObjectIOS.mm:
1531 (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
1532 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1533 (AXAttributeStringSetElement):
1534 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1536 2013-11-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1538 [AX] Use toAccessibilityTable() instead of using manual static_cast<>
1539 https://bugs.webkit.org/show_bug.cgi?id=123982
1541 Reviewed by Mario Sanchez Prada.
1543 Though there is toAccessibilityTable(), static_cast<> are being used by many places.
1544 We need to use toAccessibilityTable().
1546 No new tests, no behavior changes.
1548 * accessibility/AccessibilityARIAGridRow.cpp:
1549 (WebCore::AccessibilityARIAGridRow::disclosedRows):
1550 (WebCore::AccessibilityARIAGridRow::disclosedByRow):
1551 * accessibility/AccessibilityTableHeaderContainer.cpp:
1552 (WebCore::AccessibilityTableHeaderContainer::addChildren):
1553 * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1556 (webkitAccessibleTableGetIndexAt):
1557 (webkitAccessibleTableGetNColumns):
1558 (webkitAccessibleTableGetNRows):
1559 (webkitAccessibleTableGetColumnHeader):
1560 (webkitAccessibleTableGetRowHeader):
1561 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1562 (-[WebAccessibilityObjectWrapper tableParent]):
1563 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1564 (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1565 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1566 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1568 2013-11-07 Andreas Kling <akling@apple.com>
1570 Use tighter InlineBox subtypes in some places.
1571 <https://webkit.org/b/123980>
1573 RenderLineBreak and RenderBox line box wrappers are always going to
1574 be InlineElementBox, so codify this with tighter types. Also made
1575 the various positionLine() functions take tighter reference types.
1577 All the casting to renderer-appropriate box types happens inside of
1578 RenderBlockFlow::computeBlockDirectionPositionsForLine() and
1579 propagates from there.
1581 Reviewed by Antti Koivisto.
1583 2013-11-07 Mario Sanchez Prada <mario.prada@samsung.com>
1585 AX: [ATK] Video and audio elements are not properly exposed
1586 https://bugs.webkit.org/show_bug.cgi?id=123894
1588 Reviewed by Chris Fleizach.
1590 Expose <audio> and <video> elements with ATK_ROLE_EMBEDDED, so we
1591 can identify them properly from ATK/AT-SPI based ATs.
1593 Tests: platform/gtk/accessibility/media-controls-panel-title.html
1594 platform/efl/accessibility/media-emits-object-replacement.html
1595 platform/gtk/accessibility/media-emits-object-replacement.html
1597 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1598 (atkRole): Add the new mapping.
1600 2013-11-07 Laszlo Vidacs <lac@inf.u-szeged.hu>
1602 Fix crash in BitmapImage::destroyDecodedData()
1603 https://bugs.webkit.org/show_bug.cgi?id=116494
1605 Reviewed by Csaba Osztrogonác.
1607 Merge from https://chromium.googlesource.com/chromium/blink/+/6b6887bf53068f8537908e501fdc7317ad2c6d86
1609 * platform/graphics/BitmapImage.cpp:
1610 (WebCore::BitmapImage::destroyDecodedData):
1612 2013-11-06 Sergio Villar Senin <svillar@igalia.com>
1614 [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size>
1615 https://bugs.webkit.org/show_bug.cgi?id=118025
1617 Reviewed by Andreas Kling.
1619 From Blink r152914 by <jchaffraix@chromium.org>
1621 Make sure that we parse at least 1 <track-size> inside each
1622 <track-list>. The old parser code allowed track-lists exclusively
1623 made of <track-name>. The way it was implemented eases the future
1624 addition of parsing for the repeat() function.
1626 * css/CSSParser.cpp:
1627 (WebCore::CSSParser::parseGridTrackList):
1628 * css/StyleResolver.cpp:
1629 (WebCore::createGridTrackList): ASSERT if we don't find any
1630 <track-size> now that we detect their absence in the parser.
1632 2013-11-06 Sergio Villar Senin <svillar@igalia.com>
1634 [CSS Grid Layout] Fix handling of 'inherit' and 'initial' for grid lines
1635 https://bugs.webkit.org/show_bug.cgi?id=115401
1637 Reviewed by Andreas Kling.
1639 From Blink r150585 by <jchaffraix@chromium.org>
1641 Added support for 'inherit' and 'initial' special values to
1642 grid-auto-{columns|rows} and grid-definition-{columns|rows}.
1644 * css/StyleResolver.cpp:
1645 (WebCore::StyleResolver::applyProperty): Resolve 'initial' and 'inherit'.
1646 * rendering/style/RenderStyle.h: Added initialNamedGrid{Column|Row}Lines().
1647 * rendering/style/StyleGridData.cpp:
1648 (WebCore::StyleGridData::StyleGridData): Initialize m_namedGrid{Column|Row}Lines.
1650 2013-11-07 Andreas Kling <akling@apple.com>
1652 Clean up BidiRun a little bit.
1653 <https://webkit.org/b/123964>
1655 Make BidiRun's member variables private and add accessors for them.
1656 In doing so, codify the following:
1658 - BidiRun always has a corresponding RenderObject.
1659 - The inline box is never cleared after being set.
1661 Reviewed by Antti Koivisto.
1663 2013-11-07 Andreas Kling <akling@apple.com>
1665 More CSSPrimitiveValue constructors should return PassRef.
1666 <https://webkit.org/b/123953>
1668 Make some more CSSPrimitiveValue constructor helpers (that are
1669 known to never return null) return PassRef instead of PassRefPtr.
1671 Reviewed by Antti Koivisto.
1673 2013-11-07 Andreas Kling <akling@apple.com>
1675 Generate type casting helpers for line boxes and use them.
1676 <https://webkit.org/b/123976>
1678 Semi-automatically generate the full set of toFooInlineBox()
1679 helpers with macros instead of having them (partially) hand-coded.
1680 Replaced static_casts with the new helpers across the codebase.
1682 Also made the isFooInlineBox() overrides private since they should
1683 never be called when the type is already known.
1685 Reviewed by Antti Koivisto.
1687 2013-11-07 Ryosuke Niwa <rniwa@webkit.org>
1689 Simplify Attr by removing m_specified member variable and setter
1690 https://bugs.webkit.org/show_bug.cgi?id=123965
1692 Reviewed by Andreas Kling.
1694 Merge https://chromium.googlesource.com/chromium/blink/+/597f44ec928e08820574728889adabc6d8ecd746
1696 m_specified is always true in WebKit so simply return true in Attr::specified().
1699 (WebCore::Attr::Attr):
1702 (WebCore::Document::adoptNode):
1704 2013-10-25 Jer Noble <jer.noble@apple.com>
1706 [MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack.
1707 https://bugs.webkit.org/show_bug.cgi?id=123374
1709 Reviewed by Eric Carlson.
1711 No tests added; tests will be added when Mock implementations are added in a future patch.
1713 Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
1714 * Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
1715 * Modules/mediasource/TextTrackMediaSource.idl: Ditto.
1716 * Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
1717 * Modules/mediasource/AudioTrackMediaSource.h:
1718 (WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
1719 * Modules/mediasource/TextTrackMediaSource.h:
1720 (WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
1721 * Modules/mediasource/VideoTrackMediaSource.h:
1722 (WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
1724 Add support for writable kind & language attributes through a custom setter:
1725 * bindings/js/JSAudioTrackCustom.cpp:
1726 (WebCore::JSAudioTrack::setKind):
1727 (WebCore::JSAudioTrack::setLanguage):
1728 * bindings/js/JSTextTrackCustom.cpp:
1729 (WebCore::JSTextTrack::setKind):
1730 (WebCore::JSTextTrack::setLanguage):
1731 * bindings/js/JSVideoTrackCustom.cpp:
1732 (WebCore::JSVideoTrack::setKind):
1733 (WebCore::JSVideoTrack::setLanguage):
1734 * html/track/AudioTrack.idl:
1735 * html/track/TextTrack.idl:
1736 * html/track/VideoTrack.idl:
1738 Add setter methods to the implementation classes:
1739 * html/track/TextTrack.cpp:
1740 (WebCore::TextTrack::TextTrack):
1741 (WebCore::TextTrack::setKind):
1742 (WebCore::TextTrack::setLanguage):
1743 * html/track/TextTrack.h:
1744 * html/track/TrackBase.cpp:
1745 (WebCore::TrackBase::TrackBase):
1746 (WebCore::TrackBase::setKind):
1747 (WebCore::TrackBase::setKindInternal):
1748 * html/track/TrackBase.h:
1749 (WebCore::TrackBase::setLanguage):
1750 (WebCore::TrackBase::sourceBuffer):
1751 (WebCore::TrackBase::setSourceBuffer):
1752 * html/track/VideoTrack.cpp:
1753 (WebCore::VideoTrack::VideoTrack):
1754 (WebCore::VideoTrack::setKind):
1755 (WebCore::VideoTrack::setLanguage):
1756 * html/track/VideoTrack.h:
1758 Implement the unimplemented portions of MediaSource and SourceBuffer:
1759 * Modules/mediasource/MediaSource.cpp:
1760 (WebCore::MediaSource::removeSourceBuffer):
1761 * Modules/mediasource/MediaSourceBase.cpp:
1762 (WebCore::MediaSourceBase::MediaSourceBase):
1763 (WebCore::MediaSourceBase::setPrivateAndOpen):
1764 (WebCore::MediaSourceBase::setReadyState):
1765 (WebCore::MediaSourceBase::attachToElement):
1766 * Modules/mediasource/MediaSourceBase.h:
1767 (WebCore::MediaSourceBase::mediaElement):
1768 * Modules/mediasource/SourceBuffer.cpp:
1769 (WebCore::SourceBuffer::videoTracks):
1770 (WebCore::SourceBuffer::audioTracks):
1771 (WebCore::SourceBuffer::textTracks):
1772 (WebCore::SourceBuffer::sourceBufferPrivateDidAddAudioTrack):
1773 (WebCore::SourceBuffer::sourceBufferPrivateDidAddVideoTrack):
1774 (WebCore::SourceBuffer::sourceBufferPrivateDidAddTextTrack):
1775 (WebCore::SourceBuffer::sourceBufferPrivateDidChangeActiveState):
1776 * Modules/mediasource/SourceBuffer.h:
1777 * Modules/mediasource/SourceBuffer.idl:
1779 Add new files to the project:
1780 * DerivedSources.make:
1781 * WebCore.xcodeproj/project.pbxproj:
1783 And a smorgasbord of other utility changes:
1784 * html/HTMLMediaElement.cpp:
1785 (WebCore::HTMLMediaElement::loadResource): Pass this when attaching.
1786 (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
1787 * html/HTMLMediaSource.h:
1788 * html/track/TextTrackList.cpp:
1789 (TextTrackList::item): Make const.
1790 * html/track/TextTrackList.h:
1791 (WebCore::TextTrackList::lastItem): Added.
1792 * platform/graphics/InbandTextTrackPrivate.h:
1793 (WebCore::InbandTextTrackPrivate::create): Added.
1794 (WebCore::MockSourceBufferPrivate::trackDidChangeEnabled):
1796 2013-11-06 Vani Hegde <vani.hegde@samsung.com>
1798 Applied background color is not retained after typing a characters
1799 https://bugs.webkit.org/show_bug.cgi?id=117337
1801 Reviewed by Ryosuke Niwa.
1803 While deleting a selection, only the inheritable style properties
1804 applied on the selection were saved.
1805 Since background color is considered as noninheritable style property,
1806 on deleting the selection, background color set on it was being lost.
1807 Hence on typing in new text, it would not have the applied
1808 background color set.
1809 Fixed by saving editing preoperties that are already in effect
1810 on a selection before deleting it.
1812 Test: editing/style/background-color-retained.html
1814 * editing/DeleteSelectionCommand.cpp:
1815 (WebCore::DeleteSelectionCommand::saveTypingStyleState):
1816 Modified as to save EditingPropertiesInEffect on a selection before
1819 2013-11-06 Andreas Kling <akling@apple.com>
1821 InlineBox: Make paint() and nodeAtPoint() pure virtuals.
1822 <https://webkit.org/b/123937>
1824 ...and move the current implementations to InlineElementBox.
1825 All subclasses were already overriding these functions so the move
1826 is completely natural.
1828 Reviewed by Anders Carlsson.
1830 2013-11-06 Andreas Kling <akling@apple.com>
1832 Nothing should return std::unique_ptr<InlineBox>.
1833 <https://webkit.org/b/123936>
1835 Made RenderBox, RenderLineBreak and RenderListMarker return tightly
1836 typed InlineElementBoxes instead.
1838 Reviewed by Anders Carlsson.
1840 2013-11-06 Daniel Bates <dabates@apple.com>
1842 [iOS] Upstream Letterpress effect
1843 https://bugs.webkit.org/show_bug.cgi?id=123932
1845 Reviewed by Sam Weinig.
1847 Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html
1849 * Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
1850 by default. We only enable letterpress on iOS.
1851 * css/CSSComputedStyleDeclaration.cpp:
1852 (WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
1853 * css/CSSParser.cpp:
1854 (WebCore::CSSParser::parseTextDecoration): Ditto.
1855 * css/CSSPrimitiveValueMappings.h:
1856 (WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
1857 * css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
1858 * platform/graphics/GraphicsContext.h:
1859 * platform/graphics/mac/FontMac.mm:
1860 (WebCore::fillVectorWithHorizontalGlyphPositions): Added.
1861 (WebCore::shouldUseLetterpressEffect): Added.
1862 (WebCore::showLetterpressedGlyphsWithAdvances): Added.
1863 (WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
1864 to show a letterpressed glyph. I also included additional iOS-specific changes.
1865 (WebCore::Font::drawGlyphs):
1866 * rendering/TextPaintStyle.cpp:
1867 (WebCore::TextPaintStyle::TextPaintStyle):
1868 (WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
1869 (WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
1870 * rendering/TextPaintStyle.h:
1871 * rendering/style/RenderStyleConstants.h:
1873 2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
1875 Crash in SliderThumbElement::dragFrom
1876 https://bugs.webkit.org/show_bug.cgi?id=123873
1878 Reviewed by Sam Weinig.
1882 * html/RangeInputType.cpp:
1883 (WebCore::RangeInputType::handleMouseDownEvent):
1884 * html/shadow/SliderThumbElement.cpp:
1885 (WebCore::SliderThumbElement::dragFrom):
1887 2013-11-06 Daniel Bates <dabates@apple.com>
1890 https://bugs.webkit.org/show_bug.cgi?id=123928
1892 Reviewed by Andy Estes.
1894 * platform/graphics/mac/FontMac.mm:
1895 (WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
1896 reference it exactly once and its value is sufficiently clear.
1897 (WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
1898 checks that all cases are covered. Move definition of platformData to the top of the
1899 function and use it whenever we want to access the platform font data
1901 2013-11-06 Brent Fulgham <bfulgham@apple.com>
1903 [WebGL] We should not allow generateMipMap on compressed textures
1904 https://bugs.webkit.org/show_bug.cgi?id=123915
1905 <rdar://problem/15201274>
1907 Reviewed by Dean Jackson.
1909 Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html
1911 * html/canvas/WebGLRenderingContext.cpp:
1912 (WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
1913 (WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
1914 (WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
1915 of compressed flag and generate appropriate WebGL error if necessary.
1916 * html/canvas/WebGLTexture.cpp:
1917 (WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
1918 (WebCore::WebGLTexture::isCompressed): Added
1919 (WebCore::WebGLTexture::setCompressed): Added
1920 * html/canvas/WebGLTexture.h:
1921 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1922 (WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
1923 glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.
1925 2013-11-06 Joseph Pecoraro <pecoraro@apple.com>
1927 Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
1928 https://bugs.webkit.org/show_bug.cgi?id=123925
1930 Reviewed by Timothy Hatcher.
1933 * DerivedSources.make:
1936 2013-11-06 Bem Jones-Bey <bjonesbe@adobe.com>
1938 Rename region line offset methods
1939 https://bugs.webkit.org/show_bug.cgi?id=123897
1941 Reviewed by Sam Weinig.
1943 Because of the large number of overloads on the line offset methods,
1944 it is very hard to read code using them, which also makes it harder to
1945 move them out of RenderBlock. This patch renames the methods that take
1946 a region as an argument to make it clearer when looking at the code
1947 how the differ from the ones that don't.
1949 No new tests, no behavior change.
1951 * rendering/RenderBlock.cpp:
1952 (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
1953 * rendering/RenderBlock.h:
1954 (WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
1955 (WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
1956 (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
1957 (WebCore::RenderBlock::startOffsetForLineInRegion):
1958 (WebCore::RenderBlock::endOffsetForLineInRegion):
1959 (WebCore::RenderBlock::availableLogicalWidthForLine):
1960 * rendering/RenderBox.cpp:
1961 (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1962 (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
1964 2013-11-06 Antti Koivisto <antti@apple.com>
1966 HTMLCollection should use CollectionIndexCache
1967 https://bugs.webkit.org/show_bug.cgi?id=123906
1969 Reviewed by Ryosuke Niwa.
1973 * bindings/js/JSDOMWindowCustom.cpp:
1974 (WebCore::namedItemGetter):
1975 * bindings/js/JSHTMLDocumentCustom.cpp:
1976 (WebCore::JSHTMLDocument::nameGetter):
1977 * dom/ChildNodeList.h:
1978 * dom/CollectionIndexCache.h:
1979 (WebCore::::nodeBeforeCached):
1980 (WebCore::::nodeAfterCached):
1981 (WebCore::::nodeAt):
1983 Add a mechanism for disabling use of backward traversal.
1985 * dom/LiveNodeList.h:
1986 (WebCore::LiveNodeList::collectionCanTraverseBackward):
1987 * html/HTMLCollection.cpp:
1988 (WebCore::HTMLCollection::HTMLCollection):
1989 (WebCore::isMatchingElement):
1990 (WebCore::HTMLCollection::iterateForPreviousElement):
1991 (WebCore::firstMatchingElement):
1992 (WebCore::nextMatchingElement):
1993 (WebCore::HTMLCollection::length):
1994 (WebCore::HTMLCollection::item):
1995 (WebCore::nameShouldBeVisibleInDocumentAll):
1996 (WebCore::firstMatchingChildElement):
1997 (WebCore::nextMatchingSiblingElement):
1998 (WebCore::HTMLCollection::firstElement):
1999 (WebCore::HTMLCollection::traverseForward):
2000 (WebCore::HTMLCollection::collectionFirst):
2001 (WebCore::HTMLCollection::collectionLast):
2002 (WebCore::HTMLCollection::collectionTraverseForward):
2003 (WebCore::HTMLCollection::collectionTraverseBackward):
2004 (WebCore::HTMLCollection::invalidateCache):
2005 (WebCore::HTMLCollection::namedItem):
2006 (WebCore::HTMLCollection::updateNameCache):
2007 * html/HTMLCollection.h:
2008 (WebCore::HTMLCollection::collectionCanTraverseBackward):
2010 Disable use of backward traversal for collections that use custom traversal.
2012 2013-11-06 Brendan Long <b.long@cablelabs.com>
2014 Add "id" attribute to TextTrack
2015 https://bugs.webkit.org/show_bug.cgi?id=123825
2017 Reviewed by Eric Carlson.
2019 Test: media/track/track-id.html
2021 * html/HTMLMediaElement.cpp:
2022 (HTMLMediaElement::addTextTrack): Add emptyString() for track id.
2023 * html/track/AudioTrack.cpp:
2024 (WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
2025 (WebCore::AudioTrack::idChanged): Added, set id.
2026 * html/track/AudioTrack.h: Move m_id to TrackBase.
2027 * html/track/InbandTextTrack.cpp:
2028 (WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
2029 (WebCore::InbandTextTrack::idChanged): Added, set id.
2030 * html/track/InbandTextTrack.h: Add idChanged().
2031 * html/track/LoadableTextTrack.cpp:
2032 (WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
2033 (WebCore::LoadableTextTrack::id): Override to return the track element's id.
2034 * html/track/TextTrack.cpp:
2035 (WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
2036 (WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
2037 (WebCore::TextTrack::TextTrack): Pass id to TrackBase.
2038 * html/track/TextTrack.h:
2039 (WebCore::TextTrack::create): Add id parameter.
2040 * html/track/TextTrack.idl: Add id attribute.
2041 * html/track/TrackBase.cpp:
2042 (WebCore::TrackBase::TrackBase): Add m_id.
2043 * html/track/TrackBase.h: Add id attribute / m_id.
2044 * html/track/VideoTrack.cpp:
2045 (WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
2046 (WebCore::VideoTrack::idChanged): Added, set id.
2047 * html/track/VideoTrack.h: Move m_id to TrackBase.
2048 * platform/graphics/TrackPrivateBase.h: Add idChanged() callback.
2050 2013-11-06 Antti Koivisto <antti@apple.com>
2052 Move array position caching out from HTMLCollection
2053 https://bugs.webkit.org/show_bug.cgi?id=123895
2055 Reviewed by Darin Adler.
2057 This caching complicates the logic but is used by a single subclass
2058 (HTMLFormControlsCollection) only. The subclass can do the caching itself.
2060 * html/HTMLAllCollection.cpp:
2061 (WebCore::HTMLAllCollection::HTMLAllCollection):
2062 * html/HTMLCollection.cpp:
2063 (WebCore::HTMLCollection::HTMLCollection):
2064 (WebCore::HTMLCollection::create):
2065 (WebCore::HTMLCollection::item):
2066 (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
2067 (WebCore::HTMLCollection::firstElement):
2069 Renamed from traverseFirstElement.
2071 (WebCore::HTMLCollection::traverseForwardToOffset):
2072 (WebCore::HTMLCollection::invalidateCache):
2074 Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.
2076 (WebCore::HTMLCollection::namedItem):
2077 (WebCore::HTMLCollection::updateNameCache):
2079 Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.
2081 * html/HTMLCollection.h:
2082 (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
2084 Renamed the enum and the accessor to be more informative.
2086 (WebCore::HTMLCollection::setCachedElement):
2087 (WebCore::HTMLCollection::customElementAfter):
2089 Renamed from virtualItemAfter.
2091 * html/HTMLFormControlsCollection.cpp:
2092 (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
2093 (WebCore::findFormAssociatedElement):
2094 (WebCore::HTMLFormControlsCollection::customElementAfter):
2096 Move the array position caching logic here.
2098 (WebCore::HTMLFormControlsCollection::invalidateCache):
2099 * html/HTMLFormControlsCollection.h:
2100 * html/HTMLNameCollection.cpp:
2101 (WebCore::HTMLNameCollection::HTMLNameCollection):
2102 * html/HTMLOptionsCollection.cpp:
2103 (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2104 * html/HTMLTableRowsCollection.cpp:
2105 (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2106 (WebCore::HTMLTableRowsCollection::customElementAfter):
2107 * html/HTMLTableRowsCollection.h:
2109 2013-11-06 Michał Pakuła vel Rutka <m.pakula@samsung.com>
2111 [ATK] accessibility/title-ui-element-correctness.html fails
2112 https://bugs.webkit.org/show_bug.cgi?id=99825
2114 Reviewed by Mario Sanchez Prada.
2116 When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
2117 is added, adding proper label element as a relation. When the document structure
2118 has been changed and a different label should be linked as a relation, current ATK
2119 implementation adds it as a next target on relation's target list, while
2120 WTR/DumpRenderTree implementation takes only first one into account.
2121 This patch adds a new function removing current relations before adding new ones.
2123 Covered by existing tests.
2125 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2126 (removeAtkRelationFromRelationSetByType):
2127 (setAtkRelationSetFromCoreObject):
2129 2013-11-06 Daniel Bates <dabates@apple.com>
2131 Add ENABLE(TEXT_SELECTION)
2132 https://bugs.webkit.org/show_bug.cgi?id=123827
2134 Reviewed by Ryosuke Niwa.
2136 Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
2137 disable selection painting in WebCore (enabled by default).
2139 On iOS we disable WebCore selection painting and have UIKit
2140 paint the selection.
2142 * rendering/InlineTextBox.cpp:
2143 (WebCore::InlineTextBox::paintSelection): Only paint selection when
2144 TEXT_SELECTION is enabled.
2145 * rendering/LogicalSelectionOffsetCaches.h:
2146 (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2147 For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
2148 a FIXME comment to investigate the callers and either move the assertion
2149 to the appropriate callers or structure the code such that we can remove
2151 * rendering/RenderBlock.cpp:
2152 (WebCore::RenderBlock::paintSelection): Only paint selection when
2153 TEXT_SELECTION is enabled.
2154 * rendering/TextPaintStyle.cpp:
2155 (WebCore::computeTextSelectionPaintStyle): Only compute the selection
2156 paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
2157 style identical to the text paint style. Also, substitute nullptr for 0.
2159 2013-11-06 Jer Noble <jer.noble@apple.com>
2161 Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.
2163 * rendering/RenderingAllInOne.cpp:
2165 2013-11-06 Sergio Villar Senin <svillar@igalia.com>
2167 Unreviewed build fix, style() return type is now a reference.
2169 * rendering/RenderGrid.cpp:
2170 (WebCore::RenderGrid::resolveGridPositionFromStyle):
2172 2013-11-06 Jer Noble <jer.noble@apple.com>
2174 Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.
2176 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2177 (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
2179 2013-11-04 Jer Noble <jer.noble@apple.com>
2181 Playing many sounds with HTML5 Audio makes WebKit unresponsive
2182 https://bugs.webkit.org/show_bug.cgi?id=116145
2184 Reviewed by Eric Carlson.
2186 Cache as much information as possible from AVPlayerItem to eliminate unneccesary
2187 calls into AVFoundation.
2189 Add WillChange/DidChange functions to handle the results of KVO notifications
2190 from AVPlayerItem and AVPlayer:
2191 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2192 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
2193 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
2194 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
2195 (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
2196 (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
2197 (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
2198 (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
2199 (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
2200 (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
2201 (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
2202 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
2203 (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
2204 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2205 (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
2206 (WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
2207 (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
2208 (WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
2209 (WebCore::itemKVOProperties):
2210 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2212 Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
2213 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2214 (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):
2216 Add and initialize member variables to hold these cached values:
2217 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2218 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2219 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2220 (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2222 Add a new Notification type which can take (and call) a Function object:
2223 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2224 (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2225 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2226 (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
2227 (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
2229 Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
2231 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2232 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2233 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2234 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2235 (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2236 (WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
2237 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
2238 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
2239 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
2240 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
2241 (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
2242 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2243 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
2244 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
2245 (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
2246 (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
2248 Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
2249 correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
2250 * html/HTMLMediaElement.cpp:
2251 (HTMLMediaElement::setReadyState):
2253 2013-10-24 Sergio Villar Senin <svillar@igalia.com>
2255 [CSS Grid Layout] Add support for named grid areas
2256 https://bugs.webkit.org/show_bug.cgi?id=120045
2258 Reviewed by Andreas Kling.
2260 From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>
2262 Added support for named grid areas. Basically a named grid area is
2263 now a valid grid position. The shorthand parsing of grid-area was
2264 split from the grid-{row|column} as the rules for expanding are
2267 Unknown grid area names are treated as 'auto' as per the
2268 specification. This means that for those cases we need to trigger
2269 the auto-placement algorithm.
2271 Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
2272 fast/css-grid-layout/grid-item-named-grid-area-resolution.html
2274 * css/CSSComputedStyleDeclaration.cpp:
2275 (WebCore::valueForGridPosition):
2276 * css/CSSParser.cpp:
2277 (WebCore::CSSParser::parseValue):
2278 (WebCore::CSSParser::parseGridPosition):
2279 (WebCore::gridMissingGridPositionValue):
2280 (WebCore::CSSParser::parseGridItemPositionShorthand):
2281 (WebCore::CSSParser::parseGridAreaShorthand):
2282 (WebCore::CSSParser::parseSingleGridAreaLonghand):
2284 * css/StyleResolver.cpp:
2285 (WebCore::StyleResolver::adjustRenderStyle):
2286 (WebCore::StyleResolver::adjustGridItemPosition):
2287 (WebCore::createGridPosition):
2288 * css/StyleResolver.h:
2289 * rendering/RenderGrid.cpp:
2290 (WebCore::RenderGrid::resolveGridPositionFromStyle):
2291 * rendering/style/GridPosition.h:
2292 (WebCore::GridPosition::isNamedGridArea):
2293 (WebCore::GridPosition::setNamedGridArea):
2294 (WebCore::GridPosition::namedGridLine):
2296 2013-11-06 Chris Fleizach <cfleizach@apple.com>
2298 AX: Audio and Video attachments are not output to VoiceOver
2299 https://bugs.webkit.org/show_bug.cgi?id=123479
2301 Reviewed by Mario Sanchez Prada.
2303 Video and audio elements don't appear as distinct objects in the AX hierarchy,
2304 nor are they treated as replaceable objects when emitting the text. We should
2305 treat these characters like attachments, for one. On the Mac platform, we should
2306 also identify them with special subroles.
2308 Tests: platform/mac/accessibility/media-emits-object-replacement.html
2309 platform/mac/accessibility/media-role-descriptions.html
2311 * accessibility/AccessibilityNodeObject.cpp:
2312 (WebCore::AccessibilityNodeObject::isGenericFocusableElement):
2313 * accessibility/AccessibilityObject.h:
2314 * accessibility/AccessibilityRenderObject.cpp:
2315 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2316 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2317 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2318 (createAccessibilityRoleMap):
2319 (-[WebAccessibilityObjectWrapper subrole]):
2320 (-[WebAccessibilityObjectWrapper roleDescription]):
2321 * editing/TextIterator.cpp:
2322 (WebCore::isRendererReplacedElement):
2325 2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
2327 Notify nodes removal to Range/Selection after dispatching blur and mutation event
2328 https://bugs.webkit.org/show_bug.cgi?id=123880
2330 Reviewed by Andreas Kling.
2332 Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac
2334 In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
2335 before dispatching mutation events because we need to update ranges created by those mutation event
2336 listeners. willRemoveChild was fixed in r115686.
2338 Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
2339 editing/selection/selection-change-in-mutation-event-by-remove-children.html
2340 fast/dom/Range/range-created-during-remove-children.html
2342 * dom/ContainerNode.cpp:
2343 (WebCore::willRemoveChildren):
2345 2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
2347 Fix out-of-date offset in selection range code in range.surroundContents
2348 https://bugs.webkit.org/show_bug.cgi?id=123871
2350 Reviewed by Andreas Kling.
2352 Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
2354 The code in Range::insertNode assumeed that the start offset of the selection range within its container
2355 doesn't change across a call to insertBefore on the container but this is wrong. This patch recomputes
2356 the start offset when it is used after the insertBefore call.
2358 Test: editing/selection/range-surroundContents-with-preceding-node.html
2361 (WebCore::Range::insertNode):
2363 2013-11-06 Andreas Kling <akling@apple.com>
2365 Add InlineElementBox and stop instantiating InlineBox directly.
2366 <https://webkit.org/b/123882>
2368 Make the InlineBox constructors protected and add a new class
2369 called InlineElementBox on top. This is somewhat analogous to the
2370 split between RenderText and RenderElement, and allows us to make
2371 renderer() return a far tighter RenderBoxModelObject& instead
2374 Moved over attachLine(), deleteLine() and extractLine() to start
2375 things off. More things will follow.
2377 Reviewed by Antti Koivisto.
2379 2013-11-06 Piotr Grad <p.grad@samsung.com>
2381 Seek for video doesn't work when playback rate is negative
2382 https://bugs.webkit.org/show_bug.cgi?id=123791
2384 In MediaPlayerPrivateGStreamer::seek negative playback rate was not taken to account.
2386 Reviewed by Philippe Normand.
2388 Test: media/video-seek-with-negative-playback.html
2390 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2391 (WebCore::MediaPlayerPrivateGStreamer::seek):
2393 2013-11-06 Andreas Kling <akling@apple.com>
2395 Reinstate an annoying assertion that I accidentally commented out.
2397 * loader/icon/IconDatabase.cpp:
2398 (WebCore::IconDatabase::synchronousIconForPageURL):
2400 2013-11-06 Brendan Long <b.long@cablelabs.com>
2402 [GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
2403 https://bugs.webkit.org/show_bug.cgi?id=123836
2405 The tests are currently flakey because we only get the label and language if we get
2406 tags after the track client is set.
2408 Reviewed by Philippe Normand.
2410 No new tests because the tests already exist (this fixes flakeyness).
2412 * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Override label() and language() to use m_label and m_language.
2413 * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same.
2414 * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Make m_label and m_language protected so they can be used in the functions above.
2416 2013-11-05 Andreas Kling <akling@apple.com>
2418 RenderBlockFlow should only expose its line boxes as RootInlineBox.
2419 <https://webkit.org/b/123878>
2421 The line boxes attached directly to a RenderBlockFlow are always
2422 RootInlineBox objects, so call sites should always use the tightly
2423 typed firstRootBox() and lastRootBox().
2425 This allows the compiler to devirtualize calls to member functions
2426 of RootInlineBox that are marked FINAL.
2428 Reviewed by Antti Koivisto.
2430 2013-11-06 Ryosuke Niwa <rniwa@webkit.org>
2432 Assertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
2433 https://bugs.webkit.org/show_bug.cgi?id=123863
2435 Reviewed by Andreas Kling.
2437 Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c
2439 Test: fast/text/bidi-reverse-runs-crash.html
2441 * platform/text/BidiResolver.h:
2442 (WebCore::BidiResolver<Iterator, Run>::createBidiRunsForLine): Don't reverse the runs if there's
2443 nothing to be reversed.
2445 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2447 Address the review comment after r158724.
2449 * html/RangeInputType.cpp:
2450 (WebCore::RangeInputType::handleMouseDownEvent):
2452 2013-11-05 Zalan Bujtas <zalan@apple.com>
2454 Widget's position change should not initiate layout, only when its size changes.
2455 https://bugs.webkit.org/show_bug.cgi?id=123860
2457 Reviewed by Andreas Kling.
2459 RenderWidgets initiate unnecessary layouts while scrolling when they are embedded to
2460 overflow:scroll containers. Scroll position change doesn't dirty the render tree
2461 so it should not trigger layout either.
2463 Manual test added. Unfortunately we can't test against the number of layouts yet.
2465 * rendering/RenderWidget.cpp:
2466 (WebCore::RenderWidget::setWidgetGeometry):
2467 (WebCore::RenderWidget::updateWidgetGeometry):
2468 (WebCore::RenderWidget::updateWidgetPosition):
2470 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2472 Use-after-free in SliderThumbElement::dragFrom
2473 https://bugs.webkit.org/show_bug.cgi?id=123873
2475 Reviewed by Andreas Kling.
2477 Ref the SliderThumbElement since it could go away inside dragFrom.
2479 Test: fast/forms/range/range-type-change-onchange-2.html
2481 * html/RangeInputType.cpp:
2482 (WebCore::RangeInputType::handleMouseDownEvent):
2484 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2486 Change the order of conditions to avoid computing rendererIsEditable()
2487 https://bugs.webkit.org/show_bug.cgi?id=123868
2489 Reviewed by Andreas Kling.
2491 Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
2493 When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform
2494 some operation, it is more effective to check for renderer() first, so that if this condition fails
2495 we can avoid unnecessary computation of rendererIsEditable().
2498 (WebCore::nextRenderedEditable):
2499 (WebCore::previousRenderedEditable):
2500 * page/EventHandler.cpp:
2501 (WebCore::EventHandler::handleMouseReleaseEvent):
2503 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2505 simpleUserAgentStyleSheet doesn't have focus ring on anchor element
2506 https://bugs.webkit.org/show_bug.cgi?id=123867
2508 Reviewed by Andreas Kling.
2510 Merge https://chromium.googlesource.com/chromium/blink/+/08ecc23c4d80be9969918c4baf0ac83dc6cb6cbd
2512 * css/CSSDefaultStyleSheets.cpp:
2514 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2516 valueForBorderRadiusShorthand returns wrong values in some case
2517 https://bugs.webkit.org/show_bug.cgi?id=123866
2519 Reviewed by Andreas Kling.
2521 Merge https://chromium.googlesource.com/chromium/blink/+/0933728126f2db06ab8e945efc98bffa2d42af1c
2523 Because valueForBorderRadiusShorthand misses the followings:
2524 - showHorizontalBottomRight depends on showHorizontalBottomLeft.
2525 - showHorizontalTopRight depends on showHorizontalBottomRight (including showHorizontalBottomLeft).
2527 See also http://dev.w3.org/csswg/css-backgrounds/#the-border-radius
2529 Test: fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html
2531 * css/CSSComputedStyleDeclaration.cpp:
2532 (WebCore::getBorderRadiusShorthandValue):
2534 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2536 Protect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
2537 https://bugs.webkit.org/show_bug.cgi?id=123861
2539 Reviewed by Benjamin Poulain.
2541 Merge https://chromium.googlesource.com/chromium/blink/+/297442eb539a2b764fdad323de79099a70179186 partially.
2543 * editing/IndentOutdentCommand.cpp:
2544 (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Make selectedListItem, previousList, and nextList
2545 RefPtr since they're are used after calling insertNodeBefore.
2547 2013-11-05 Andreas Kling <akling@apple.com>
2549 Apply more unique_ptr to line box management.
2550 <https://webkit.org/b/123857>
2552 Make all of the functions that return newly-created line boxes
2553 return them packed up in std::unique_ptrs.
2555 There is one exception in RenderBlockLineLayout where the function
2556 createInlineBoxForRenderer() is inconsistent about the ownership of
2557 the returned object. This will be addressed by a subsequent patch.
2559 We now "release" the line boxes into their various home structures,
2560 so the pointer smartness doesn't go end-to-end just yet.
2562 Reviewed by Anders Carlsson.
2564 2013-11-05 Ryosuke Niwa <rniwa@webkit.org>
2566 getComputedStyle(x).lineHeight is affected by zooming
2567 https://bugs.webkit.org/show_bug.cgi?id=123847
2569 Reviewed by Benjamin Poulain.
2571 Merge https://chromium.googlesource.com/chromium/blink/+/7957097afbab2899ababd0d9c8acbf6e3eddb870
2573 Test: fast/css/line-height-zoom-get-computed-style.html
2575 * css/CSSComputedStyleDeclaration.cpp:
2576 (WebCore::lineHeightFromStyle): Don't round line-height values.
2577 * css/DeprecatedStyleBuilder.cpp:
2578 (WebCore::ApplyPropertyLineHeight::applyValue): Use the computed value instead of the used value.
2580 2013-11-05 James Craig <jcraig@apple.com>
2582 AX: media controls accessibility needs more work
2583 https://bugs.webkit.org/show_bug.cgi?id=123749
2585 Reviewed by Jer Noble.
2587 Updated some of the control labels/roles to improve accessibility.
2588 - Volume slider is now keyboard/screenreader accessible.
2589 - muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
2590 - fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
2591 - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
2592 Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
2593 Render dump expectations changed because volume slider is now hidden via...
2594 ...opacity/size (to make accessible without hover) instead of display:none.
2596 Updated existing test coverage.
2598 * Modules/mediacontrols/mediaControlsApple.css:
2599 (audio::-webkit-media-controls-panel .volume-box):
2600 (audio::-webkit-media-controls-panel .volume-box:active):
2601 (audio::-webkit-media-controls-toggle-closed-captions-button):
2602 (audio::-webkit-media-controls-closed-captions-container .list):
2603 (audio::-webkit-media-controls-closed-captions-container li:focus):
2604 * Modules/mediacontrols/mediaControlsApple.js:
2605 (Controller.prototype.createControls):
2606 (Controller.prototype.handleFullscreenChange):
2607 (Controller.prototype.handleMuteButtonClicked):
2608 (Controller.prototype.handleMinButtonClicked):
2609 (Controller.prototype.handleMaxButtonClicked):
2610 (Controller.prototype.handleVolumeSliderChange):
2611 (Controller.prototype.buildCaptionMenu):
2612 (Controller.prototype.focusSiblingCaptionItem):
2613 (Controller.prototype.handleCaptionItemKeyUp):
2615 2013-11-05 Andreas Kling <akling@apple.com>
2617 Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
2618 <https://webkit.org/b/123845>
2620 All RenderWidgets representing plugins will be RenderEmbeddedObjects.
2621 Move some of the plugin-specific logic to RenderEmbeddedObject since it
2622 doesn't make sense for all RenderWidgets (frames, embedded documents)
2625 Reviewed by Anders Carlsson.
2627 2013-11-05 Tim Horton <timothy_horton@apple.com>
2629 Fix the 32-bit build.
2633 2013-11-05 Alexandru Chiculita <achicu@adobe.com>
2635 Web Inspector: Moving an element while in the DOMNodeRemoved handler will hide it in the inspector
2636 https://bugs.webkit.org/show_bug.cgi?id=123516
2638 Reviewed by Timothy Hatcher.
2640 InspectorInstrumentation::willRemoveDOMNode was actually calling both willRemoveDOMNodeImpl and
2641 didRemoveDOMNodeImpl, making the DOMAgent unbind the element even if it was still part of the DOM.
2643 Because of that the DOMAgent was sending two events:
2644 1. When the element was about to be removed, just before JS "DOMNodeRemoved" was triggered.
2645 2. When the element was actually removed.
2647 Note that inspector's event #2 will not know about the node, as it just removed it from the
2648 internal hashmap, so it will just use a nodeID == 0 for it.
2650 This patch adds a separate call to InspectorInstrumentation::didRemoveDOMNode, just before the
2651 element is about to be removed. The InspectorInstrumentation::willRemoveDOMNode call is now only used
2652 by the DOMDebugger to trigger the DOM breakpoints in the Web Inspector. That feature is not exposed
2653 in the new Inspector UI, but can be used/tested using the protocol directly.
2655 Tests: inspector-protocol/dom-debugger/node-removed.html
2656 inspector-protocol/dom/dom-remove-events.html
2657 inspector-protocol/dom/remove-multiple-nodes.html
2659 * dom/ContainerNode.cpp:
2660 (WebCore::ContainerNode::removeBetween):
2661 * inspector/InspectorInstrumentation.h:
2662 (WebCore::InspectorInstrumentation::willRemoveDOMNode):
2663 (WebCore::InspectorInstrumentation::didRemoveDOMNode):
2665 2013-11-05 Ryuan Choi <ryuan.choi@samsung.com>
2667 Unreviewed build fix on CMake based ports with GLES.
2670 Added OPENGLES2_LIBRARIES and OPENGLES2_INCLUDE_DIR into the includes and
2673 2013-11-05 Tim Horton <timothy_horton@apple.com>
2675 platformCALayerDeviceScaleFactor should be const
2676 https://bugs.webkit.org/show_bug.cgi?id=123842
2678 Reviewed by Simon Fraser.
2681 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2682 (WebCore::LayerClient::platformCALayerDeviceScaleFactor):
2683 * platform/graphics/ca/GraphicsLayerCA.cpp:
2684 (WebCore::GraphicsLayerCA::platformCALayerDeviceScaleFactor):
2685 * platform/graphics/ca/GraphicsLayerCA.h:
2686 * platform/graphics/ca/PlatformCALayerClient.h:
2687 * platform/graphics/ca/mac/TileController.h:
2688 * platform/graphics/ca/mac/TileController.mm:
2689 (WebCore::TileController::platformCALayerDeviceScaleFactor):
2690 * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2691 (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDeviceScaleFactor):
2692 Constify PlatformCALayerClient::platformCALayerDeviceScaleFactor.
2694 2013-11-05 Gavin Barraclough <barraclough@apple.com>
2696 Subresource loads should not prevent page throttling
2697 https://bugs.webkit.org/show_bug.cgi?id=123757
2699 Reviewed by Alexey Proskuryakov.
2701 The page-is-loading test for inhibiting process supression is currently
2702 too conservative, preventing supression of pages with infinitely loading
2703 resources (commonly XHRs). Instead, just rely on the FrameLoader being
2704 active (with hysteresis).
2706 * loader/SubresourceLoader.cpp:
2707 (WebCore::SubresourceLoader::init):
2708 (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
2709 (WebCore::SubresourceLoader::didFinishLoading):
2710 (WebCore::SubresourceLoader::didFail):
2711 (WebCore::SubresourceLoader::willCancel):
2712 * loader/SubresourceLoader.h:
2713 - remove m_activityAssertion from SubresourceLoader.
2715 2013-11-05 Tim Horton <timothy_horton@apple.com>
2717 [mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
2718 https://bugs.webkit.org/show_bug.cgi?id=123840
2719 <rdar://problem/15308765>
2721 Reviewed by Alexey Proskuryakov.
2723 Test: fast/images/pdf-as-image-crop-box.html
2725 * platform/graphics/cg/PDFDocumentImage.cpp:
2726 (WebCore::PDFDocumentImage::size):
2727 Use the crop box when determining the size of the image.
2729 (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2730 * platform/graphics/cg/PDFDocumentImage.h:
2731 * platform/graphics/mac/PDFDocumentImageMac.mm:
2732 (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2733 Get rid of m_mediaBox, since we don't need it anymore.
2735 (WebCore::PDFDocumentImage::drawPDFPage):
2736 PDFKit does the translation by the crop box origin for us;
2737 if we do it additionally, we'll be painting the wrong part of the image.
2738 So, don't do the translation here.
2740 2013-11-05 Antti Koivisto <antti@apple.com>
2742 Factor index cache for NodeLists and HTMLCollections to a class
2743 https://bugs.webkit.org/show_bug.cgi?id=123823
2745 Reviewed by Ryosuke Niwa.
2747 Implement index cache class that can used by NodeLists and HTMLCollections that currently
2748 each have implementations of their own.
2750 This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
2751 HTMLCollection is will be transitioned later.
2753 * GNUmakefile.list.am:
2754 * WebCore.vcxproj/WebCore.vcxproj:
2755 * WebCore.xcodeproj/project.pbxproj:
2756 * dom/ChildNodeList.cpp:
2757 (WebCore::ChildNodeList::ChildNodeList):
2758 (WebCore::ChildNodeList::length):
2759 (WebCore::ChildNodeList::item):
2761 The client calls to cache to for indexed and size access.
2763 (WebCore::ChildNodeList::collectionFirst):
2764 (WebCore::ChildNodeList::collectionLast):
2765 (WebCore::ChildNodeList::collectionTraverseForward):
2766 (WebCore::ChildNodeList::collectionTraverseBackward):
2768 Cache calls back to these as needed to do the actual traversal.
2770 (WebCore::ChildNodeList::invalidateCache):
2771 * dom/ChildNodeList.h:
2772 * dom/CollectionIndexCache.h: Added.
2774 Templated cache class itself.
2776 (WebCore::::CollectionIndexCache):
2777 (WebCore::::nodeCount):
2778 (WebCore::::nodeBeforeCached):
2779 (WebCore::::nodeAfterCached):
2780 (WebCore::::nodeAt):
2781 (WebCore::::invalidate):
2782 * dom/LiveNodeList.cpp:
2783 (WebCore::firstMatchingElement):
2784 (WebCore::nextMatchingElement):
2785 (WebCore::traverseMatchingElementsForward):
2786 (WebCore::LiveNodeList::collectionFirst):
2787 (WebCore::LiveNodeList::collectionLast):
2788 (WebCore::LiveNodeList::collectionTraverseForward):
2789 (WebCore::LiveNodeList::collectionTraverseBackward):
2790 (WebCore::LiveNodeList::length):
2791 (WebCore::LiveNodeList::item):
2792 (WebCore::LiveNodeList::invalidateCache):
2793 * dom/LiveNodeList.h:
2794 (WebCore::LiveNodeList::LiveNodeList):
2796 2013-11-05 Enrica Casucci <enrica@apple.com>
2798 Full width semicolon is wrong in vertical text.
2799 https://bugs.webkit.org/show_bug.cgi?id=123814
2800 <rdar://problem/15312541>
2802 Reviewed by Benjamin Poulain.
2804 The full width semicolon should always be upright.
2805 Adding it to the list of characters that should
2808 * platform/graphics/FontGlyphs.cpp:
2809 (WebCore::shouldIgnoreRotation):
2811 2013-11-05 Andreas Kling <akling@apple.com>
2813 Remove unused RenderWidget::notifyWidget().
2815 Rubber-stamped by Anders Carlsson.
2817 2013-11-05 Commit Queue <commit-queue@webkit.org>
2819 Unreviewed, rolling out r158678.
2820 http://trac.webkit.org/changeset/158678
2821 https://bugs.webkit.org/show_bug.cgi?id=123820
2823 Causes a new debug assertion failure on the Mavericks test
2824 system. (Requested by bfulgham on #webkit).
2826 * rendering/mathml/RenderMathMLOperator.cpp:
2828 2013-11-05 Renata Hodovan <reni@webkit.org>
2830 ASSERTION FAILED: isHTMLTitleElement(m_titleElement.get()) in WebCore::Document::setTitle
2831 https://bugs.webkit.org/show_bug.cgi?id=122092
2833 Reviewed by Darin Adler.
2835 Remove a bogus assert in Document::setTitle().
2836 m_titleElement can be either of HTMLTitleElement or SVGTitleElement. The assertion was wrong.
2838 Backported from Blink:
2839 https://src.chromium.org/viewvc/blink?revision=158620&view=revision
2841 Test: svg/custom/title-assertion.html
2844 (WebCore::Document::setTitle):
2845 * svg/SVGTitleElement.cpp:
2846 (WebCore::SVGTitleElement::insertedInto):
2848 2013-11-05 Martin Robinson <mrobinson@igalia.com>
2850 [MathML] Poor spacing around delimiters in MathML Torture Test 14
2851 https://bugs.webkit.org/show_bug.cgi?id=122837
2853 Reviewed by Brent Fulgham.
2855 Instead of stretching the vertical bar with the stretchable version, just repeat
2856 the normal vertical bar. This follows what Gecko does when rendering tall vertical
2857 bars and also works around an issue with STIX fonts leading to poor spacing in
2860 * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
2863 2013-11-05 Daniel Bates <dabates@apple.com>
2865 XSSAuditor should catch reflected srcdoc properties even without a <frame> tag injection
2867 From Blink r160615 by <tsepez@chromium.org>
2868 https://src.chromium.org/viewvc/blink?view=rev&revision=160615
2870 Test: http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html
2872 * html/parser/XSSAuditor.cpp:
2873 (WebCore::XSSAuditor::filterIframeToken):
2875 2013-11-05 Éva Balázsfalvi <balazsfalvi.eva@stud.u-szeged.hu>
2877 Delete maketokenizer.
2878 https://bugs.webkit.org/show_bug.cgi?id=115155
2880 Reviewed by Zoltan Herczeg.
2882 This script was used to generate the old flex based CSS tokenizer. It
2883 was replaced by a custom tokenizer in r106217 but the script wasn't
2884 removed. Since there is no mention of it in the original bug nor any
2885 reference to maketokenizer in our build files, it's probably an
2889 https://chromium.googlesource.com/chromium/blink/+/2a1c8aaf867f707ccdcd8893446e907e2aa2e1c2
2891 * css/maketokenizer: Removed.
2893 2013-11-05 Zan Dobersek <zdobersek@igalia.com>
2895 Unreviewed. Unbreaking GCC builds.
2897 * html/HTMLCollection.cpp:
2898 (WebCore::isMatchingElement): This inline function is not a template anymore.
2900 2013-11-05 Antti Koivisto <antti@apple.com>
2904 * dom/LiveNodeList.h:
2905 (WebCore::LiveNodeList::LiveNodeList):
2906 (WebCore::LiveNodeList::~LiveNodeList):
2907 * dom/NodeRareData.h:
2908 (WebCore::NodeListsNodeData::adoptDocument):
2909 * html/HTMLCollection.cpp:
2910 (WebCore::HTMLCollection::HTMLCollection):
2911 (WebCore::HTMLCollection::~HTMLCollection):
2913 2013-11-05 Antti Koivisto <antti@apple.com>
2915 HTMLCollection should not be NodeList
2916 https://bugs.webkit.org/show_bug.cgi?id=123794
2918 Reviewed by Andreas Kling.
2920 HTMLCollection and NodeList are unrelated types in DOM yet our HTMLCollection inherits NodeList
2921 for code sharing reasons. While some code does get shared the types are sufficiently different
2922 that this results in lots of unnecessary branches, complexity and general awkwardness. Code sharing
2923 can be better achieved by means other than inheritance.
2925 This patch splits HTMLCollection from NodeList by copy-pasting and eliminating resulting redundancies.
2926 Sharing comes later.
2929 (WebCore::Attr::setValue):
2930 (WebCore::Attr::childrenChanged):
2931 * dom/ClassNodeList.cpp:
2932 (WebCore::ClassNodeList::~ClassNodeList):
2933 * dom/ContainerNode.cpp:
2934 (WebCore::ContainerNode::childrenChanged):
2935 (WebCore::ContainerNode::getElementsByTagName):
2936 (WebCore::ContainerNode::getElementsByName):
2937 (WebCore::ContainerNode::getElementsByClassName):
2938 (WebCore::ContainerNode::radioNodeList):
2940 (WebCore::Document::Document):
2941 (WebCore::Document::~Document):
2942 (WebCore::Document::registerNodeList):
2943 (WebCore::Document::unregisterNodeList):
2944 (WebCore::Document::registerCollection):
2945 (WebCore::Document::unregisterCollection):
2946 (WebCore::Document::ensureCachedCollection):
2948 Add separate functions and map for registering HTMLCollections.
2950 (WebCore::Document::all):
2951 (WebCore::Document::windowNamedItems):
2952 (WebCore::Document::documentNamedItems):
2955 (WebCore::Element::attributeChanged):
2956 (WebCore::Element::ensureCachedHTMLCollection):
2957 (WebCore::Element::cachedHTMLCollection):
2958 * dom/LiveNodeList.cpp:
2959 (WebCore::LiveNodeList::rootNode):
2960 (WebCore::isMatchingElement):
2961 (WebCore::LiveNodeList::iterateForPreviousElement):
2962 (WebCore::LiveNodeList::itemBefore):
2963 (WebCore::firstMatchingElement):
2964 (WebCore::nextMatchingElement):
2965 (WebCore::traverseMatchingElementsForwardToOffset):
2966 (WebCore::LiveNodeList::traverseLiveNodeListFirstElement):
2967 (WebCore::LiveNodeList::traverseLiveNodeListForwardToOffset):
2968 (WebCore::LiveNodeList::isLastItemCloserThanLastOrCachedItem):
2969 (WebCore::LiveNodeList::isFirstItemCloserThanCachedItem):
2970 (WebCore::LiveNodeList::length):
2971 (WebCore::LiveNodeList::item):
2972 (WebCore::LiveNodeList::elementBeforeOrAfterCachedElement):
2974 This code used to live in HTMLCollection.cpp. Copy-paste here and remove all branches not needed for NodeLists.
2976 (WebCore::LiveNodeList::invalidateCache):
2978 NodeLists have no name caches.
2980 * dom/LiveNodeList.h:
2981 (WebCore::LiveNodeList::LiveNodeList):
2982 (WebCore::LiveNodeList::~LiveNodeList):
2983 (WebCore::LiveNodeList::isRootedAtDocument):
2984 (WebCore::LiveNodeList::type):
2985 (WebCore::LiveNodeList::invalidateCache):
2986 (WebCore::LiveNodeList::setCachedElement):
2988 Merge LiveNodeListBase and LiveNodeList.
2989 Remove fields and code supporting HTMLCollection.
2991 (WebCore::shouldInvalidateTypeOnAttributeChange):
2993 Move to global scope. This function is used both HTMLCollections and LiveNodeLists.
2995 * dom/NameNodeList.cpp:
2996 (WebCore::NameNodeList::~NameNodeList):
2997 * dom/NameNodeList.h:
2998 (WebCore::NameNodeList::create):
3000 (WebCore::shouldInvalidateNodeListCachesForAttr):
3001 (WebCore::Document::shouldInvalidateNodeListAndCollectionCaches):
3002 (WebCore::Document::invalidateNodeListAndCollectionCaches):
3003 (WebCore::Node::invalidateNodeListAndCollectionCachesInAncestors):
3004 (WebCore::NodeListsNodeData::invalidateCaches):
3006 * dom/NodeRareData.h:
3007 (WebCore::NodeListsNodeData::addCacheWithAtomicName):
3008 (WebCore::NodeListsNodeData::addCacheWithName):
3009 (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
3010 (WebCore::NodeListsNodeData::addCachedCollection):
3011 (WebCore::NodeListsNodeData::cachedCollection):
3012 (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
3013 (WebCore::NodeListsNodeData::removeCacheWithName):
3014 (WebCore::NodeListsNodeData::removeCachedCollection):
3015 (WebCore::NodeListsNodeData::isEmpty):
3016 (WebCore::NodeListsNodeData::adoptDocument):
3017 (WebCore::NodeListsNodeData::namedCollectionKey):
3018 (WebCore::NodeListsNodeData::namedNodeListKey):
3019 (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
3021 Add separate cache for HTMLCollections.
3023 * dom/TagNodeList.cpp:
3024 (WebCore::TagNodeList::TagNodeList):
3025 (WebCore::TagNodeList::~TagNodeList):
3026 * dom/TagNodeList.h:
3027 (WebCore::TagNodeList::create):
3028 (WebCore::HTMLTagNodeList::create):
3029 * html/CollectionType.h:
3031 Remove NodeList types.
3033 * html/HTMLCollection.cpp:
3034 (WebCore::shouldOnlyIncludeDirectChildren):
3035 (WebCore::rootTypeFromCollectionType):
3036 (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3037 (WebCore::HTMLCollection::HTMLCollection):
3038 (WebCore::HTMLCollection::~HTMLCollection):
3039 (WebCore::HTMLCollection::rootNode):
3040 (WebCore::isMatchingElement):
3041 (WebCore::HTMLCollection::iterateForPreviousElement):
3042 (WebCore::HTMLCollection::itemBefore):
3043 (WebCore::firstMatchingElement):
3044 (WebCore::nextMatchingElement):
3045 (WebCore::traverseMatchingElementsForwardToOffset):
3046 (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
3047 (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
3048 (WebCore::HTMLCollection::setCachedElement):
3049 (WebCore::HTMLCollection::length):
3050 (WebCore::HTMLCollection::item):
3051 (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
3052 (WebCore::HTMLCollection::traverseFirstElement):
3053 (WebCore::HTMLCollection::traverseNextElement):
3054 (WebCore::HTMLCollection::traverseForwardToOffset):
3055 (WebCore::HTMLCollection::invalidateCache):
3056 (WebCore::HTMLCollection::invalidateIdNameCacheMaps):
3057 (WebCore::HTMLCollection::namedItem):
3059 Remove NodeList specific branches and functions.
3060 LiveNodeListBase functions are now HTMLCollection functions.
3062 * html/HTMLCollection.h:
3063 (WebCore::HTMLCollection::isRootedAtDocument):
3064 (WebCore::HTMLCollection::invalidationType):
3065 (WebCore::HTMLCollection::type):
3066 (WebCore::HTMLCollection::ownerNode):
3067 (WebCore::HTMLCollection::invalidateCache):
3068 (WebCore::HTMLCollection::document):
3069 (WebCore::HTMLCollection::overridesItemAfter):
3070 (WebCore::HTMLCollection::isElementCacheValid):
3071 (WebCore::HTMLCollection::cachedElement):
3072 (WebCore::HTMLCollection::cachedElementOffset):
3073 (WebCore::HTMLCollection::isLengthCacheValid):
3074 (WebCore::HTMLCollection::cachedLength):
3075 (WebCore::HTMLCollection::setLengthCache):
3076 (WebCore::HTMLCollection::setCachedElement):
3077 (WebCore::HTMLCollection::isItemRefElementsCacheValid):
3078 (WebCore::HTMLCollection::setItemRefElementsCacheValid):
3079 (WebCore::HTMLCollection::rootType):
3080 (WebCore::HTMLCollection::hasNameCache):
3081 (WebCore::HTMLCollection::setHasNameCache):
3083 Copy-paste functions and fields from former LiveNodeListBase.
3085 * html/HTMLNameCollection.cpp:
3086 (WebCore::HTMLNameCollection::~HTMLNameCollection):
3087 * html/LabelableElement.cpp:
3088 (WebCore::LabelableElement::labels):
3089 * html/LabelsNodeList.cpp:
3090 (WebCore::LabelsNodeList::~LabelsNodeList):
3091 * html/LabelsNodeList.h:
3092 * html/RadioNodeList.cpp:
3093 (WebCore::RadioNodeList::~RadioNodeList):
3094 * html/RadioNodeList.h:
3095 (WebCore::RadioNodeList::create):
3097 2013-11-05 Emilio Pozuelo Monfort <pochu27@gmail.com>
3099 [GTK] Add stubs for missing symbols in dom bindings
3100 https://bugs.webkit.org/show_bug.cgi?id=123663
3102 Reviewed by Carlos Garcia Campos.
3104 * bindings/gobject/WebKitDOMCustom.cpp:
3105 (webkit_dom_html_head_element_get_profile):
3106 (webkit_dom_html_head_element_set_profile):
3107 (webkit_dom_processing_instruction_get_data):
3108 (webkit_dom_processing_instruction_set_data):
3109 * bindings/gobject/WebKitDOMCustom.h:
3110 * bindings/gobject/WebKitDOMCustom.symbols:
3112 2013-11-05 Zan Dobersek <zdobersek@igalia.com>
3114 Main thread tasks in ThreadableBlobRegistry should use std::unique_ptr
3115 https://bugs.webkit.org/show_bug.cgi?id=122946
3117 Reviewed by Darin Adler.
3119 The new BlobRegistryContext objects don't have to be adopted into OwnPtr and then have OwnPtr's leaked pointer
3120 passed into the WTF::callOnMainThread call - the pointer to the new heap-allocated object is passed in directly,
3121 with the object ending up being managed by std::unique_ptr in the designated main thread task.
3123 * fileapi/ThreadableBlobRegistry.cpp:
3124 (WebCore::registerBlobURLTask):
3125 (WebCore::ThreadableBlobRegistry::registerBlobURL):
3126 (WebCore::registerBlobURLFromTask):
3127 (WebCore::unregisterBlobURLTask):
3128 (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
3130 2013-11-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3132 [CSS] Enable css-image-orientation on EFL and GTK ports.
3133 https://bugs.webkit.org/show_bug.cgi?id=123698
3135 Reviewed by Beth Dakin.
3137 r157909 added wrong early return for css-image-orientation. It causes about 20 regressions in layout test
3138 when enabling css-image-orientation. This fixes those wrong implementation as well as enables it on EFL
3139 and GTK ports by default.
3141 Test: fast/css/image-orientation/image-orientation.html
3143 * loader/cache/CachedImage.cpp:
3144 (WebCore::CachedImage::imageSizeForRenderer):
3145 * platform/graphics/BitmapImage.cpp:
3146 (WebCore::BitmapImage::updateSize):
3148 2013-11-05 Andreas Kling <akling@apple.com>
3150 RenderEmbeddedObject shouldn't know about fallback content.
3151 <https://webkit.org/b/123781>
3153 Stop caching the presence of fallback (DOM) content in a flag on
3154 RenderEmbeddedObject and have SubframeLoader fetch it directly from
3155 HTMLObjectElement instead.
3157 Also made SubframeLoader::requestObject() take the owner element
3158 by reference since we don't support owner-less embedded objects.
3160 Reviewed by Antti Koivisto.
3162 2013-11-05 Xabier Rodriguez Calvar <calvaris@igalia.com>
3164 [GStreamer] Remove NATIVE_FULLSCREEN_VIDEO support
3165 https://bugs.webkit.org/show_bug.cgi?id=123437
3167 Reviewed by Philippe Normand.
3169 Removed some dead code as no GStreamer port is using the native
3170 fullscreen video support.
3172 * GNUmakefile.list.am:
3173 * PlatformEfl.cmake:
3174 * PlatformGTK.cmake: Removed compilation of deleted files.
3175 * platform/graphics/MediaPlayer.h: Removed structures related to
3176 GStreamer and NATIVE_FULLSCREEN_VIDEO.
3177 * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: Removed.
3178 * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h: Removed.
3179 * platform/graphics/gstreamer/GStreamerGWorld.cpp: Removed.
3180 * platform/graphics/gstreamer/GStreamerGWorld.h: Removed.
3181 * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Removed
3182 gst/video/video.h include.
3183 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3184 (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3185 (WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
3186 (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
3187 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3188 Removed code related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
3189 * platform/graphics/gstreamer/PlatformVideoWindow.h: Removed.
3190 * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Removed.
3191 * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Removed.
3192 * platform/graphics/gstreamer/PlatformVideoWindowMac.mm: Removed.
3193 * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Removed.
3194 * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: Removed.
3195 * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3196 (webkitVideoSinkRender):
3197 (webkitVideoSinkNew):
3198 * platform/graphics/gstreamer/VideoSinkGStreamer.h: Removed code
3199 related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
3200 * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp: Removed.
3201 * platform/graphics/gtk/FullscreenVideoControllerGtk.h: Removed.
3203 2013-11-05 Andreas Kling <akling@apple.com>
3205 Remove RenderWidget::viewCleared().
3206 <https://webkit.org/b/123777>
3208 This was some ancient hand-waving code from the KHTML era.
3210 It was obviously confused (e.g RenderEmbeddedObject trying to handle
3211 iframe owners, even though that setup is impossible.)
3213 Reviewed by Anders Carlsson.
3215 2013-11-04 Brady Eidson <beidson@apple.com>
3217 IDB: Split backend Cursors and Transactions into their own files
3218 https://bugs.webkit.org/show_bug.cgi?id=123789
3220 Reviewed by Alexey Proskuryakov.
3222 No new tests (Rename, no change in behavior).
3225 * GNUmakefile.list.am:
3226 * WebCore.xcodeproj/project.pbxproj:
3228 * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
3229 (WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
3231 * Modules/indexeddb/IDBBackingStoreInterface.h:
3233 * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
3234 (WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
3236 * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3237 (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
3238 * Modules/indexeddb/IDBCursorBackendImpl.h:
3239 (WebCore::IDBCursorBackendImpl::create):
3241 * Modules/indexeddb/IDBFactoryBackendInterface.h:
3243 * Modules/indexeddb/IDBIndexWriter.cpp:
3244 (WebCore::IDBIndexWriter::writeIndexKeys):
3245 (WebCore::IDBIndexWriter::verifyIndexKeys):
3246 (WebCore::IDBIndexWriter::addingKeyAllowed):
3247 * Modules/indexeddb/IDBIndexWriter.h:
3249 * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3250 (WebCore::IDBTransactionBackendImpl::createCursorBackend):
3251 * Modules/indexeddb/IDBTransactionBackendImpl.h:
3252 * Modules/indexeddb/IDBTransactionBackendInterface.h:
3254 * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3255 (WebCore::GetOperation::perform):
3256 (WebCore::OpenCursorOperation::perform):
3257 (WebCore::CountOperation::perform):
3258 (WebCore::DeleteRangeOperation::perform):
3260 * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
3261 (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
3262 (WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
3263 (WebCore::IDBBackingStoreCursorLevelDB::advance):
3264 (WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
3265 (WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
3266 (WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
3267 * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
3268 (WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
3269 (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
3271 * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3272 (WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
3273 (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
3274 (WebCore::IDBBackingStoreLevelDB::createObjectStore):
3275 (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
3276 (WebCore::IDBBackingStoreLevelDB::getRecord):
3277 (WebCore::IDBBackingStoreLevelDB::putRecord):
3278 (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
3279 (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3280 (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
3281 (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
3282 (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3283 (WebCore::IDBBackingStoreLevelDB::createIndex):
3284 (WebCore::IDBBackingStoreLevelDB::deleteIndex):
3285 (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3286 (WebCore::findGreatestKeyLessThanOrEqual):
3287 (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
3288 (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
3289 (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
3290 (WebCore::ObjectStoreKeyCursorImpl::create):
3291 (WebCore::ObjectStoreKeyCursorImpl::clone):
3292 (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
3293 (WebCore::ObjectStoreCursorImpl::create):
3294 (WebCore::ObjectStoreCursorImpl::clone):
3295 (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
3296 (WebCore::objectStoreCursorOptions):
3297 (WebCore::indexCursorOptions):
3298 (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3299 (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3300 (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3301 (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3302 (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
3303 * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3305 * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
3306 (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
3307 (WebCore::IDBBackingStoreTransactionLevelDB::begin):
3308 (WebCore::IDBBackingStoreTransactionLevelDB::commit):
3309 (WebCore::IDBBackingStoreTransactionLevelDB::rollback):
3310 * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
3312 * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3313 (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
3314 * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3316 2013-11-04 Zalan Bujtas <zalan@apple.com>
3318 Do not call setFrameRect on Widget unless its boundaries changed.
3319 https://bugs.webkit.org/show_bug.cgi?id=123781
3321 Reviewed by Andreas Kling.
3323 Call Widget:setFrameRect only when the frame's rect actually changes. It also
3324 cleans up the related weak reference code a bit.
3326 Covered by existing tests.
3328 * rendering/RenderWidget.cpp:
3329 (WebCore::RenderWidget::setWidgetGeometry):
3331 2013-11-04 Santosh Mahto <santosh.ma@samsung.com>
3333 [webcore/html] remove extra header includes from cpp files.
3334 https://bugs.webkit.org/show_bug.cgi?id=123740
3336 Reviewed by Darin Adler.
3338 Removing redundant headers.
3340 * html/BaseDateAndTimeInputType.cpp:
3341 * html/ColorInputType.cpp:
3342 * html/DOMFormData.cpp:
3344 * html/DateInputType.cpp:
3345 * html/DateTimeInputType.cpp:
3346 * html/DateTimeLocalInputType.cpp:
3347 * html/FTPDirectoryDocument.cpp:
3348 * html/FileInputType.cpp:
3349 * html/FormController.cpp:
3350 * html/HTMLAnchorElement.cpp:
3351 * html/HTMLAreaElement.cpp:
3352 * html/HTMLCanvasElement.cpp:
3353 * html/HTMLCollection.cpp:
3354 * html/HTMLDetailsElement.cpp:
3355 * html/HTMLDocument.cpp:
3356 * html/HTMLElement.cpp:
3357 * html/HTMLFormControlsCollection.cpp:
3358 * html/HTMLFormElement.cpp:
3359 * html/HTMLImageElement.cpp:
3360 * html/HTMLInputElement.cpp:
3361 * html/HTMLLegendElement.cpp:
3362 * html/HTMLMapElement.cpp:
3363 * html/HTMLMediaElement.cpp:
3364 * html/HTMLOptionElement.cpp:
3365 * html/HTMLOptionsCollection.cpp:
3366 * html/HTMLPlugInImageElement.cpp:
3367 * html/HTMLProgressElement.cpp:
3368 * html/HTMLSummaryElement.cpp:
3369 * html/HTMLTemplateElement.cpp:
3370 * html/HTMLVideoElement.cpp:
3371 * html/HTMLViewSourceDocument.cpp:
3372 * html/MediaController.cpp:
3373 * html/MediaKeyEvent.cpp:
3374 * html/MonthInputType.cpp:
3375 * html/RangeInputType.cpp:
3376 * html/StepRange.cpp:
3377 * html/TextFieldInputType.cpp:
3378 * html/TimeInputType.cpp:
3379 * html/WeekInputType.cpp:
3380 * html/canvas/CanvasRenderingContext.cpp:
3381 * html/canvas/CanvasRenderingContext2D.cpp:
3382 * html/canvas/CanvasStyle.cpp:
3383 * html/canvas/OESVertexArrayObject.cpp:
3384 * html/parser/BackgroundHTMLParser.cpp:
3385 * html/parser/CSSPreloadScanner.cpp:
3386 * html/parser/CompactHTMLToken.cpp:
3387 * html/parser/HTMLConstructionSite.cpp:
3388 * html/parser/HTMLDocumentParser.cpp:
3389 * html/parser/HTMLElementStack.cpp:
3390 * html/parser/HTMLFormattingElementList.cpp:
3391 * html/parser/HTMLMetaCharsetParser.cpp:
3392 * html/parser/HTMLParserIdioms.cpp:
3393 * html/parser/HTMLPreloadScanner.cpp:
3394 * html/parser/HTMLTokenizer.cpp:
3395 * html/parser/HTMLTreeBuilder.cpp:
3396 * html/parser/HTMLTreeBuilderSimulator.cpp:
3397 * html/parser/HTMLViewSourceParser.cpp:
3398 * html/parser/TextDocumentParser.cpp:
3399 * html/parser/XSSAuditor.cpp:
3400 * html/shadow/ContentDistributor.cpp:
3401 * html/shadow/InsertionPoint.cpp:
3402 * html/shadow/MediaControlElements.cpp:
3403 * html/shadow/MediaControlsApple.cpp:
3404 * html/shadow/MediaControlsBlackBerry.cpp:
3405 * html/shadow/MediaControlsGtk.cpp:
3406 * html/shadow/SliderThumbElement.cpp:
3407 * html/track/AudioTrack.cpp:
3408 * html/track/InbandGenericTextTrack.cpp:
3409 * html/track/InbandTextTrack.cpp:
3410 * html/track/InbandWebVTTTextTrack.cpp:
3411 * html/track/TextTrack.cpp:
3412 * html/track/TextTrackCueGeneric.cpp:
3413 * html/track/TextTrackList.cpp:
3414 * html/track/TextTrackRegion.cpp:
3415 * html/track/TrackListBase.cpp:
3416 * html/track/VideoTrack.cpp:
3417 * html/track/WebVTTParser.cpp:
3419 2013-11-04 Brady Eidson <beidson@apple.com>
3421 IDB: deleteDatabase() interface should be asynchronous
3422 https://bugs.webkit.org/show_bug.cgi?id=123787
3424 Reviewed by Tim Horton.
3426 No new tests (No behavior change for a tested port).
3428 deleteDatabase now has no return value, but calls back to a bool function:
3429 * Modules/indexeddb/IDBBackingStoreInterface.h:
3430 * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3431 (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
3432 * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3434 Refactor to account for the new async deleteDatabase:
3435 * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3436 (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3437 (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
3438 (WebCore::IDBDatabaseBackendImpl::deleteDatabaseAsync):
3439 * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3441 2013-11-04 Brady Eidson <beidson@apple.com>
3443 Add Modules/indexeddb/leveldb to the WebCore.xcodeproj
3445 Rubberstamped by Andreas Kling.
3447 This will make hacking on IDB much easier for Mac developers as they won’t have
3448 to constantly add and then subtract the leveldb subdirectory.
3450 The USE(LEVELDB) flag is still disabled so these files won’t actually build by default.
3452 * WebCore.xcodeproj/project.pbxproj:
3454 2013-11-04 Brady Eidson <beidson@apple.com>
3456 Address review feedback I forgot to commit in r158641
3458 * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3459 (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls):
3461 2013-11-04 Brady Eidson