1 2016-01-27 Zhuo Li <zachli@apple.com>
3 Need ability to specify alternate image for AutoFill button in input fields.
4 https://bugs.webkit.org/show_bug.cgi?id=153116.
5 rdar://problem/23384854.
7 Reviewed by Darin Adler.
9 Add a new AutoFill button that can be shown in <input> elements.
11 Tests: fast/forms/auto-fill-button/input-contacts-auto-fill-button.html
12 fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html
15 (input::-webkit-contacts-auto-fill-button):
16 (input::-webkit-contacts-auto-fill-button:hover):
17 (input::-webkit-contacts-auto-fill-button:active):
18 Add default style rules for the Contacts AutoFill button based on the ones used for
19 Manual AutoFill button.
21 * html/HTMLInputElement.cpp:
22 (WebCore::HTMLInputElement::setShowAutoFillButton):
23 * html/HTMLInputElement.h:
24 (WebCore::HTMLInputElement::autoFillButtonType):
25 - Replace the boolean parameter with a new parameter to specify the type of the AutoFill button.
26 - Declare a private variable to keep a record of the type of the current AutoFill
28 (WebCore::HTMLInputElement::showAutoFillButton): Deleted.
30 * html/HTMLTextFormControlElement.h:
31 Declare enum for AutoFill button type.
33 * html/TextFieldInputType.cpp:
34 (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
35 (WebCore::isAutoFillButtonTypeChanged):
36 (WebCore::TextFieldInputType::shouldDrawAutoFillButton): None means the AutoFill button is not
38 (WebCore::TextFieldInputType::createAutoFillButton): Only create the AutoFill button
39 if the type is expected.
40 (WebCore::TextFieldInputType::updateAutoFillButton):
41 Handle the case where AutoFill button type changes in the text field.
42 * html/TextFieldInputType.h:
44 * testing/Internals.cpp:
45 (WebCore::stringToAutoFillButtonType): Convert the string to AutoFill button type.
46 (WebCore::Internals::setShowAutoFillButton): Add a new parameter to specify the type of the AutoFill button.
47 * testing/Internals.h: Ditto.
48 * testing/Internals.idl: Ditto.
50 2016-01-26 Ryosuke Niwa <rniwa@webkit.org>
53 https://bugs.webkit.org/show_bug.cgi?id=153537
55 Reviewed by Antti Koivisto.
57 Exposed highestAncestor as Node.prototype.treeRoot, which was added to shadow DOM spec in
58 https://github.com/w3c/webcomponents/commit/6864a40fe4efa8a737e78512e3c85319ddc5bf8b
61 http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-node-interface
63 Test: fast/shadow-dom/Node-interface-treeRoot.html
67 2016-01-26 Ryosuke Niwa <rniwa@webkit.org>
69 Rename HTMLSlotElement.getDistributedNodes to getAssignedNodes
70 https://bugs.webkit.org/show_bug.cgi?id=153534
72 Reviewed by Antti Koivisto.
76 * html/HTMLSlotElement.idl:
78 2016-01-27 Tim Horton <timothy_horton@apple.com>
80 Need to be able to specify MIME type for <attachment> without filename or handle
81 https://bugs.webkit.org/show_bug.cgi?id=153552
82 <rdar://problem/20145857>
84 Reviewed by Anders Carlsson.
86 Tests: fast/attachment/attachment-default-icon.html
87 fast/attachment/attachment-type-attribute.html
89 * html/HTMLAttachmentElement.cpp:
90 (WebCore::HTMLAttachmentElement::parseAttribute):
91 Invalidate attachment when 'type' attribute changes.
93 (WebCore::HTMLAttachmentElement::attachmentType):
94 * html/HTMLAttachmentElement.h:
95 * platform/graphics/Icon.h:
96 * platform/graphics/mac/IconMac.mm:
97 (WebCore::Icon::createIconForUTI):
98 (WebCore::Icon::createIconForMIMEType):
99 Add Icon class methods to retrieve an icon given a UTI or MIME type.
101 * rendering/RenderThemeMac.mm:
102 (WebCore::paintAttachmentIcon):
103 Use the 'type' attribute (a MIME type) if we have one. Otherwise,
104 use the filename. Lastly fall back to a plain file icon (using the root
105 file UTI, public.data).
107 2016-01-27 Alexey Proskuryakov <ap@apple.com>
109 Remove ENABLE_CURRENTSRC
110 https://bugs.webkit.org/show_bug.cgi?id=153545
112 Reviewed by Simon Fraser.
114 * Configurations/FeatureDefines.xcconfig:
116 2016-01-26 Anders Carlsson <andersca@apple.com>
118 Stop echoing echo commands to stdout
119 https://bugs.webkit.org/show_bug.cgi?id=153531
121 Reviewed by Csaba Osztrogonác.
123 * DerivedSources.make:
125 2016-01-26 Jer Noble <jer.noble@apple.com>
127 Calling video.controls=true during a scrub operation cancels scrub.
128 https://bugs.webkit.org/show_bug.cgi?id=153494
130 Reviewed by Eric Carlson.
132 Test: media/media-controls-drag-timeline-set-controls-property.html
134 Verify that the video.controls attribute actually changed before tearing down and
135 re-adding the media controls to the Shadow DOM.
137 * Modules/mediacontrols/mediaControlsApple.js:
138 (Controller.prototype.handleControlsChange):
139 (Controller.prototype.hasControls):
141 2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
143 [GTK][EFL] Rename ScrollAnimationNone as ScrollAnimationSmooth
144 https://bugs.webkit.org/show_bug.cgi?id=153481
146 Reviewed by Simon Fraser.
148 ScrollAnimationNone has always been used by EFL and GTK ports to
149 implement smooth scrolling. I think it should be possible for
150 other scroll animators to implement smooth scrolling or even
151 implement other kind of scroll animations. For example, in the
152 future I would like to have kinetic scrolling implemented for the
153 GTK+ port to match all other GTK+ application and decide at
154 runtime between different animations without having to use a
155 different scroll animator class. So, this patch also moves the
156 smooth scrolling animation implementation to its own class
157 ScrollAnimationSmooth that impements an interface ScrollAnimation
158 that could be used to implement other animations. This will allow
159 the GTK+ port to add its own scroll animator class and still
160 support smooth scrolling sharing the code with the
161 ScrollAnimationSmooth.
163 * PlatformEfl.cmake: Add new files to compilation and remove ScrollAnimationNone.
164 * PlatformGTK.cmake: Ditto.
165 * platform/ScrollAnimation.h: Added.
166 (WebCore::ScrollAnimation::serviceAnimation):
167 (WebCore::ScrollAnimation::ScrollAnimation):
168 * platform/ScrollAnimationSmooth.cpp: Added.
169 (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
170 (WebCore::ScrollAnimationSmooth::scroll):
171 (WebCore::ScrollAnimationSmooth::stop):
172 (WebCore::ScrollAnimationSmooth::updateVisibleLengths):
173 (WebCore::ScrollAnimationSmooth::setCurrentPosition):
174 (WebCore::ScrollAnimationSmooth::serviceAnimation):
175 (WebCore::ScrollAnimationSmooth::~ScrollAnimationSmooth):
177 (WebCore::attackCurve):
178 (WebCore::releaseCurve):
179 (WebCore::coastCurve):
180 (WebCore::curveIntegralAt):
181 (WebCore::attackArea):
182 (WebCore::releaseArea):
183 (WebCore::getAnimationParametersForGranularity):
184 (WebCore::ScrollAnimationSmooth::updatePerAxisData):
185 (WebCore::ScrollAnimationSmooth::animateScroll):
186 (WebCore::ScrollAnimationSmooth::animationTimerFired):
187 (WebCore::ScrollAnimationSmooth::startNextTimer):
188 (WebCore::ScrollAnimationSmooth::animationTimerActive):
189 * platform/ScrollAnimationSmooth.h: Added.
190 * platform/ScrollAnimator.cpp:
191 (WebCore::ScrollAnimator::scroll):
192 (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
193 (WebCore::ScrollAnimator::setCurrentPosition):
194 (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
195 (WebCore::ScrollAnimator::notifyPositionChanged):
196 (WebCore::ScrollAnimator::scrollOffsetOnAxis):
197 * platform/ScrollAnimator.h:
198 (WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
199 * platform/ScrollAnimatorNone.cpp: Removed.
200 * platform/ScrollAnimatorNone.h: Removed.
201 * platform/ScrollAnimatorSmooth.cpp: Added.
202 (WebCore::ScrollAnimator::create):
203 (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth):
204 (WebCore::ScrollAnimatorSmooth::~ScrollAnimatorSmooth):
205 (WebCore::ScrollAnimatorSmooth::scroll):
206 (WebCore::ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation):
207 (WebCore::ScrollAnimatorSmooth::cancelAnimations):
208 (WebCore::ScrollAnimatorSmooth::serviceScrollAnimations):
209 (WebCore::ScrollAnimatorSmooth::willEndLiveResize):
210 (WebCore::ScrollAnimatorSmooth::didAddVerticalScrollbar):
211 (WebCore::ScrollAnimatorSmooth::didAddHorizontalScrollbar):
212 * platform/ScrollAnimatorSmooth.h: Added.
213 * platform/mac/ScrollAnimatorMac.mm:
214 (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
215 (WebCore::ScrollAnimatorMac::immediateScrollBy):
217 2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
219 Overlay scrollbars should always use the whole contents
220 https://bugs.webkit.org/show_bug.cgi?id=153352
222 Reviewed by Michael Catanzaro.
224 In case of having both horizontal and vertical scrollbars, the
225 scrollbars respect the scroll corner. That looks good for legacy
226 scrollbars that show the track, but with the overlay indicators
227 it looks weird that the indicator stops so early before the end of
228 the contents, giving the impression that there's something else to
229 scroll. This happens because the scroll corner is transparent, so
230 it's not obvious that's the scroll corner. It also happens with
231 the text areas having a resizer. Legacy scrollbars take into
232 account the resizer, which is good, but I expect overlay
233 scrollbars to be rendered also over the resizer. The resizer takes
234 precedence so you can still click and drag to resize the text area.
235 In the case of main frame scrollbars we are indeed returning an
236 empty rectangle from ScrollView::scrollCornerRect() when using
237 overlay scrollbars, but when calculating the size of the
238 scrollbars we are using the actual width/height instead of the
239 occupied with/height. For other scrollbars
240 RenderLayer::scrollCornerRect() is not checking whether scrollbars
241 are overlay or not and we are always returning a scroll corner
242 rectangle when scrollbars are present.
244 * platform/ScrollView.cpp:
245 (WebCore::ScrollView::updateScrollbars): Use the occupied
246 width/height when calculating the space the one scrollbar
247 should leave for the other.
248 * rendering/RenderLayer.cpp:
249 (WebCore::RenderLayer::scrollCornerRect): Return an empty
250 rectangle when using overlay scrollbars.
252 2016-01-27 Carlos Garcia Campos <cgarcia@igalia.com>
254 ScrollAnimator is not notified when mouse entered, moved or exited a RenderListBox
255 https://bugs.webkit.org/show_bug.cgi?id=153398
257 Reviewed by Michael Catanzaro.
259 EvenHandler is checking whether the enclosing layer of a node is
260 registered as scrollable area of its frame view. That doesn't work
261 for list boxes, because they are the scrollable area
262 themselves. Also when entering a list box the node under mouse is
263 not usually the list box itself, but any of its children, a
264 HTMLOptionElement or a HTMLOptGroupElement. Instead of comparing
265 layers, we should find the enclosing scrollable area of the target
266 elements and compare them to decide whether the mouse has entered,
267 left or moved a scrollable area.
269 * page/EventHandler.cpp:
270 (WebCore::enclosingScrollableArea): Return the enclosing
271 scrollable area of the given node. If the node doesn't have a
272 renderer, it traverses its parents. If the renderer is a
273 RenderListBox it is returned, otherwhise the enclosing layer is
275 (WebCore::EventHandler::mouseMoved): Use enclosingScrollableArea.
276 (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
278 2016-01-26 Sam Weinig <sam@webkit.org>
280 Try touching DerivedSources.make to force rebuilding.
282 * DerivedSources.make:
283 * page/DOMWindow.idl:
285 2016-01-26 Sam Weinig <sam@webkit.org>
287 Try to force a rebuild.
289 * page/DOMWindow.idl:
291 2016-01-26 Chris Dumez <cdumez@apple.com>
293 fast/history/page-cache-webdatabase-no-transaction-db.html flakily crashes
294 https://bugs.webkit.org/show_bug.cgi?id=153525
296 Reviewed by Andreas Kling.
298 The test was crashing because DatabaseThread::hasPendingDatabaseActivity()
299 was accessing m_openDatabaseSet from the main thread without any locking
300 mechanism. This is an issue because m_openDatabaseSet is altered by the
303 No new tests, already covered by fast/history/page-cache-webdatabase-no-transaction-db.html.
305 * Modules/webdatabase/DatabaseThread.cpp:
306 (WebCore::DatabaseThread::databaseThread):
307 (WebCore::DatabaseThread::recordDatabaseOpen):
308 (WebCore::DatabaseThread::recordDatabaseClosed):
309 (WebCore::DatabaseThread::hasPendingDatabaseActivity):
310 * Modules/webdatabase/DatabaseThread.h:
312 2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
314 Unreviewed CMake build fix after r195644.
318 2016-01-26 Brady Eidson <beidson@apple.com>
320 Modern IDB: Key generator support for SQLite backend.
321 https://bugs.webkit.org/show_bug.cgi?id=153427
323 Reviewed by Alex Christensen.
325 No new tests (Existing failing tests now pass, others improved).
327 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
328 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
329 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
330 (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
331 (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
332 (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
333 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
335 2016-01-26 Simon Fraser <simon.fraser@apple.com>
337 Allow canvas to use display-list drawing for testing
338 https://bugs.webkit.org/show_bug.cgi?id=153475
340 Reviewed by Dean Jackson.
342 Optionally have 2D <canvas> use display-list drawing, which is only enabled
343 via Internals for now.
345 Support displayListAsText() and replayDisplayListAsText() on canvas, so we can
346 use it to test playback optimizations. [Note that displayListAsText() always
347 returns an empty string currently, because the display list is cleared when the
348 canvas is painted to the page.]
350 Display list rendering is implemented by giving CanvasRenderingContext2D an
351 optional DisplayListDrawingContext, which packages up a display list, recorder
352 and recording context. The existing paintRenderingResultsToCanvas() is overridden
353 to replay the recorded display list into the primary canvas context.
355 Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D.
357 Test: displaylists/canvas-display-list.html
359 * html/HTMLCanvasElement.cpp:
360 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
361 (WebCore::HTMLCanvasElement::getContext):
362 (WebCore::HTMLCanvasElement::paint):
363 (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing):
364 (WebCore::HTMLCanvasElement::setTracksDisplayListReplay):
365 (WebCore::HTMLCanvasElement::displayListAsText):
366 (WebCore::HTMLCanvasElement::replayDisplayListAsText):
367 * html/HTMLCanvasElement.h:
368 * html/canvas/CanvasRenderingContext.h:
369 * html/canvas/CanvasRenderingContext2D.cpp:
370 (WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
371 (WebCore::contextDisplayListMap):
372 (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
373 (WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay):
374 (WebCore::CanvasRenderingContext2D::displayListAsText):
375 (WebCore::CanvasRenderingContext2D::replayDisplayListAsText):
376 (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas):
377 (WebCore::CanvasRenderingContext2D::drawingContext):
378 (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted.
379 * html/canvas/CanvasRenderingContext2D.h:
380 * testing/Internals.cpp:
381 (WebCore::Internals::setElementUsesDisplayListDrawing):
382 (WebCore::Internals::setElementTracksDisplayListReplay):
383 (WebCore::Internals::displayListForElement):
384 (WebCore::Internals::replayDisplayListForElement):
386 2016-01-26 Joseph Pecoraro <pecoraro@apple.com>
388 Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
389 https://bugs.webkit.org/show_bug.cgi?id=153509
390 <rdar://problem/24354291>
392 Reviewed by Andreas Kling.
396 * WebCore.xcodeproj/project.pbxproj:
401 * page/ResourceUsageOverlay.cpp:
402 * page/ResourceUsageOverlay.h:
403 Add new files to the build and updated ENABLE flag name.
405 * page/ResourceUsageData.cpp: Added.
406 (WebCore::ResourceUsageData::ResourceUsageData):
407 * page/ResourceUsageData.h: Added.
408 (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
409 Platform agnostic resource data that may be used by multiple clients,
410 such as the ResourceUsageOverlay and later the Inspector.
412 * page/ResourceUsageThread.h: Added.
413 * page/ResourceUsageThread.cpp: Added.
414 (WebCore::ResourceUsageThread::ResourceUsageThread):
415 (WebCore::ResourceUsageThread::singleton):
416 (WebCore::ResourceUsageThread::addObserver):
417 (WebCore::ResourceUsageThread::removeObserver):
418 (WebCore::ResourceUsageThread::waitUntilObservers):
419 (WebCore::ResourceUsageThread::notifyObservers):
420 (WebCore::ResourceUsageThread::createThreadIfNeeded):
421 (WebCore::ResourceUsageThread::threadCallback):
422 (WebCore::ResourceUsageThread::threadBody):
423 Platform agnostic resource usage thread that can be used to gather data
424 into a ResourceUsageData struct on a background thread and notify observers
425 on the main thread. Platforms need only implement ResourceUsageThread::platformThreadBody
426 to populate the ResourceUsageData struct with data.
428 * page/cocoa/ResourceUsageOverlayCocoa.mm:
429 (WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo):
430 (WebCore::HistoricResourceUsageData::HistoricResourceUsageData):
431 (WebCore::historicUsageData):
432 (WebCore::appendDataToHistory):
433 (WebCore::ResourceUsageOverlay::platformInitialize):
434 (WebCore::ResourceUsageOverlay::platformDestroy):
435 (WebCore::drawMemHistory):
436 (WebCore::drawMemoryPie):
437 (WebCore::ResourceUsageOverlay::platformDraw):
438 Move CPU and memory resource usage calculations to ResourceUsageThread.
439 The overlay adds itself as an observer, and builds its RingBuffer list
440 of data from notifications from the ResourceUsageThread. Renamed
443 * page/cocoa/ResourceUsageThreadCocoa.mm: Added.
444 (WebCore::vmPageSize):
445 (WebCore::TagInfo::TagInfo):
446 (WebCore::pagesPerVMTag):
448 (WebCore::categoryForVMTag):
449 (WebCore::ResourceUsageThread::platformThreadBody):
450 Extracted from ResourceUsageOverlayCocoa.
452 * page/scrolling/ScrollingThread.cpp:
453 (WebCore::ScrollingThread::dispatch):
454 Drive-by, don't call singleton again, we already have the result.
456 2016-01-26 Simon Fraser <simon.fraser@apple.com>
458 Use initializers in HTMLCanvasElement
459 https://bugs.webkit.org/show_bug.cgi?id=153472
461 Reviewed by Michael Catanzaro.
463 Use initializers, and re-order member variables for better packing.
465 * html/HTMLCanvasElement.cpp:
466 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
467 * html/HTMLCanvasElement.h:
469 2016-01-26 Chris Dumez <cdumez@apple.com>
471 Setting HTMLInputElement.value to null to set its value to the empty string
472 https://bugs.webkit.org/show_bug.cgi?id=153519
474 Reviewed by Ryosuke Niwa.
476 Setting HTMLInputElement.value to null to set its value to the empty string:
477 - https://html.spec.whatwg.org/#htmlinputelement
478 - http://heycam.github.io/webidl/#TreatNullAs
480 WebKit would previously unset the value attribute instead, which caused
481 it to fallback to input.defaultValue if set.
483 Firefox and Chrome behave correctly.
485 Test: fast/dom/HTMLInputElement/input-value-set-null.html
487 * html/HTMLInputElement.cpp:
488 (WebCore::HTMLInputElement::setValue):
490 2016-01-26 Anders Carlsson <andersca@apple.com>
492 WebKitAdditions should be able to modify derived source rules
493 https://bugs.webkit.org/show_bug.cgi?id=153514
495 Reviewed by Tim Horton.
497 * DerivedSources.make:
498 Include WebCoreDerivedSourcesAdditions.make.
500 * WebCore.xcodeproj/project.pbxproj:
501 Pass our WebKitAdditions paths as include paths to make.
503 2016-01-26 Chris Dumez <cdumez@apple.com>
505 document.open() / write() should be prevented in beforeunload event handlers
506 https://bugs.webkit.org/show_bug.cgi?id=153432
508 Reviewed by Ryosuke Niwa.
510 document.open() / write() should be prevented in beforeunload event handlers:
511 - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
512 - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
513 - https://html.spec.whatwg.org/multipage/webappapis.html#ignore-opens-during-unload-counter
514 - https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document
516 Test: fast/frames/page-beforeunload-document-open.html
518 * loader/FrameLoader.cpp:
519 (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
521 2016-01-26 Chris Dumez <cdumez@apple.com>
523 Add support for HTMLDataElement
524 https://bugs.webkit.org/show_bug.cgi?id=153459
526 Reviewed by Ryosuke Niwa.
528 Add support for HTMLDataElement:
529 https://html.spec.whatwg.org/multipage/semantics.html#the-data-element
531 Firefox already supports it.
533 No new tests, already covered by existing tests.
536 * DerivedSources.cpp:
537 * DerivedSources.make:
538 * WebCore.vcxproj/WebCore.vcxproj:
539 * WebCore.vcxproj/WebCore.vcxproj.filters:
540 * WebCore.xcodeproj/project.pbxproj:
541 * html/HTMLDataElement.cpp: Added.
542 (WebCore::HTMLDataElement::create):
543 (WebCore::HTMLDataElement::HTMLDataElement):
544 * html/HTMLDataElement.h: Added.
545 * html/HTMLDataElement.idl: Added.
546 * html/HTMLElementsAllInOne.cpp:
547 * html/HTMLTagNames.in:
549 2016-01-26 Commit Queue <commit-queue@webkit.org>
551 Unreviewed, rolling out r195610.
552 https://bugs.webkit.org/show_bug.cgi?id=153513
554 The test added with this change is timing out on almost every
555 run (Requested by ryanhaddad on #webkit).
559 "Calling video.controls=true during a scrub operation cancels
561 https://bugs.webkit.org/show_bug.cgi?id=153494
562 http://trac.webkit.org/changeset/195610
564 2016-01-26 Brady Eidson <beidson@apple.com>
566 History.pushState causes intense memory pressure.
567 https://bugs.webkit.org/show_bug.cgi?id=153435
569 Reviewed by Sam Weinig, Oliver Hunt, and Geoff Garen.
571 Tests: fast/loader/stateobjects/pushstate-frequency-iframe.html
572 fast/loader/stateobjects/pushstate-frequency-with-user-gesture.html
573 fast/loader/stateobjects/pushstate-frequency.html
574 fast/loader/stateobjects/replacestate-frequency-iframe.html
575 fast/loader/stateobjects/replacestate-frequency-with-user-gesture.html
576 fast/loader/stateobjects/replacestate-frequency.html
577 loader/stateobjects/pushstate-size-iframe.html
578 loader/stateobjects/pushstate-size.html
579 loader/stateobjects/replacestate-size-iframe.html
580 loader/stateobjects/replacestate-size.html
582 Add restrictions on how frequently push/replaceState can be called,
583 as well as how much of a cumulative payload they can deliver.
585 * bindings/js/JSHistoryCustom.cpp:
586 (WebCore::JSHistory::pushState):
587 (WebCore::JSHistory::replaceState):
590 (WebCore::History::stateObjectAdded):
593 2016-01-26 Anders Carlsson <andersca@apple.com>
595 Add a Dictionary overload that returns an Optional result
596 https://bugs.webkit.org/show_bug.cgi?id=153507
598 Reviewed by Tim Horton.
600 * bindings/js/Dictionary.h:
601 (WebCore::Dictionary::get):
603 2016-01-26 Philip Rogers <pdr@chromium.org>
605 Let SVG images not taint canvases except when containing foreignObjects
606 https://bugs.webkit.org/show_bug.cgi?id=119639
608 Reviewed by Brent Fulgham.
610 r153876 caused SVG images to not taint canvases but the patch allowed
611 for subimage resources. This can be a problem if a subimage (e.g., data
612 uri image) contains a foreignObject which can violate security (e.g.,
615 This patch updates SVGImage::hasSingleSecurityOrigin to check if the
616 image contains any foreignObjects or images that themselves contain
617 foreignObjects. SVG images without foreignObjects are allowed to not
620 Canvas patterns are problematic because an animated SVG image can switch
621 between tainting and not tainting the canvas. A FIXME has been added to
622 solve this, and in the meantime we cause SVG images to taint patterns.
624 Tests: svg/as-image/svg-canvas-pattern-with-link-tainted.html
625 svg/as-image/svg-canvas-svg-with-feimage-with-link-tainted.html
626 svg/as-image/svg-canvas-svg-with-image-with-link-tainted.html
628 * html/canvas/CanvasPattern.cpp:
629 (WebCore::CanvasPattern::CanvasPattern):
630 (WebCore::CanvasPattern::~CanvasPattern):
631 * svg/SVGFEImageElement.cpp:
632 (WebCore::SVGFEImageElement::~SVGFEImageElement):
633 (WebCore::SVGFEImageElement::hasSingleSecurityOrigin):
634 (WebCore::SVGFEImageElement::clearResourceReferences):
635 * svg/SVGFEImageElement.h:
636 * svg/SVGImageElement.cpp:
637 (WebCore::SVGImageElement::create):
638 (WebCore::SVGImageElement::hasSingleSecurityOrigin):
639 (WebCore::SVGImageElement::isSupportedAttribute):
640 * svg/SVGImageElement.h:
641 * svg/graphics/SVGImage.cpp:
642 (WebCore::SVGImage::hasSingleSecurityOrigin):
644 2016-01-26 Michael Catanzaro <mcatanzaro@igalia.com>
646 CSSGrammar.y:1742.31-34: warning: unused value: $3
647 https://bugs.webkit.org/show_bug.cgi?id=153462
649 Reviewed by Alex Christensen.
651 This warning indicates that we have a memory leak. From the bison manual:
653 "Right-hand side symbols of a rule that explicitly triggers a syntax error via YYERROR are
654 not discarded automatically. As a rule of thumb, destructors are invoked only when user
655 actions cannot manage the memory."
657 Arguably a design error, but that's how it is.
659 * css/CSSGrammar.y.in:
661 2016-01-26 Jer Noble <jer.noble@apple.com>
663 Calling video.controls=true during a scrub operation cancels scrub.
664 https://bugs.webkit.org/show_bug.cgi?id=153494
666 Reviewed by Eric Carlson.
668 Test: media/media-controls-drag-timeline-set-controls-property.html
670 Verify that the video.controls attribute actually changed before tearing down and
671 re-adding the media controls to the Shadow DOM.
673 * Modules/mediacontrols/mediaControlsApple.js:
674 (Controller.prototype.handleControlsChange):
675 (Controller.prototype.hasControls):
677 2016-01-26 Jeremy Noble <jer.noble@apple.com>
679 [EME][Mac] Crash in [AVStreamSession addStreamDataParser:]; uncaught exception
680 https://bugs.webkit.org/show_bug.cgi?id=153495
682 Reviewed by Eric Carlson.
684 When AVContentKeySession is not available, fall back to pre-AVContentKeySession behavior;
685 namely, immediately create an AVStreamSession object in
686 willProvideContentKeyRequestInitializationData, rather than waiting for didProvide.
688 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
689 (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
691 2016-01-26 Dean Jackson <dino@apple.com>
693 [iOS] Documents without an explicit width should not get fast tapping
694 https://bugs.webkit.org/show_bug.cgi?id=153465
695 <rdar://problem/23962529>
697 Reviewed by Simon Fraser (and Wenson Hseih).
699 As the title says, documents that do not set a viewport should
700 not get the fast click behaviour. There were complaints that we broke
701 double-tap to scroll in ImageDocuments where the image was narrow and long.
703 The fix is to just keep a flag that tells the UI process if the
704 width was explicit. However, it turns out that those ImageDocuments
705 are given an explicit device-width, which is fine for scaling but
706 really should behave as auto for fast tapping. So we also need
707 to tell the UIProcess if the viewport arguments came from an
710 Test: fast/events/ios/viewport-no-width-value-allows-double-tap.html
712 * dom/ViewportArguments.cpp:
713 (WebCore::findSizeValue): Add a parameter that toggles a flag
714 if the size was explicitly set.
715 (WebCore::setViewportFeature): Remember if the width was
717 * dom/ViewportArguments.h: Add a widthWasExplicit flag.
718 (WebCore::ViewportArguments::operator==):
720 2016-01-25 Dave Hyatt <hyatt@apple.com>
722 Speculative fixes for crashing in viewportChangeAffectedPicture
723 https://bugs.webkit.org/show_bug.cgi?id=153450
725 Reviewed by Dean Jackson.
727 Don't attach any conditions to the removal of a picture element from
728 the document's HashSet. This ensures that if the condition is ever
729 wrong for any reason, we'll still remove the picture element on
732 Fix the media query evaluation to match the other evaluations (used by
733 the preload scanner and HTMLImageElement). This includes using the
734 document element's computed style instead of our own and also null
735 checking the document element first. This is the likely cause of the
738 * html/HTMLPictureElement.cpp:
739 (WebCore::HTMLPictureElement::~HTMLPictureElement):
740 (WebCore::HTMLPictureElement::didMoveToNewDocument):
741 (WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
743 2016-01-26 Chris Dumez <cdumez@apple.com>
745 Make sure a page is still PageCache-able after firing the 'pagehide' events
746 https://bugs.webkit.org/show_bug.cgi?id=153449
748 Reviewed by Andreas Kling.
750 Make sure a page is still PageCache-able after firing the 'pagehide'
751 events and abort if it isn't. This should improve robustness and it is
752 easy for pagehide event handlers to do things that would make a Page no
753 longer PageCache-able and this leads to bugs that are difficult to
756 To achieve this, the 'pagehide' event firing logic was moved out of the
757 CachedFrame constructor. It now happens earlier in
758 PageCache::addIfCacheable() after checking if the page is cacheable and
759 before constructing the CachedPage / CachedFrames. After firing the
760 'pagehide' event in PageCache::addIfCacheable(), we check again that
761 the page is still cacheable and we abort early if it is not.
763 * history/CachedFrame.cpp:
764 (WebCore::CachedFrame::CachedFrame):
765 * history/PageCache.cpp:
766 (WebCore::setInPageCache):
767 (WebCore::firePageHideEventRecursively):
768 (WebCore::PageCache::addIfCacheable):
769 * history/PageCache.h:
770 * loader/FrameLoader.cpp:
771 (WebCore::FrameLoader::commitProvisionalLoad):
773 2016-01-26 Beth Dakin <bdakin@apple.com>
775 Rubber-stamped by Tim Horton.
777 Add one more bit of SPI.
778 * platform/spi/mac/NSSpellCheckerSPI.h:
780 2016-01-26 Olivier Blin <olivier.blin@softathome.com>
782 Fix build with ENABLE_DEVICE_ORIENTATION on non-iOS platforms
783 https://bugs.webkit.org/show_bug.cgi?id=153490
785 Reviewed by Michael Catanzaro.
787 This has been broken since r178702, which changed the Page
788 argument from a pointer to a reference in logCanCachePageDecision().
790 No new tests since this is a build fix.
792 * history/PageCache.cpp:
793 (WebCore::canCachePage):
795 2016-01-25 Ada Chan <adachan@apple.com>
797 Move WebVideoFullscreenManager and related classes from iOS specific folders to cocoa folders
798 https://bugs.webkit.org/show_bug.cgi?id=153473
800 Reviewed by Eric Carlson.
802 No new tests, just moving files.
804 * WebCore.xcodeproj/project.pbxproj:
805 Update due to changes to the file locations.
806 * platform/cocoa/WebVideoFullscreenModel.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModel.h.
807 * platform/cocoa/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.h.
808 (WebCore::WebVideoFullscreenModelVideoElement::create):
809 Fix a style error by moving the opening curly brace down one line.
810 * platform/cocoa/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm.
812 2016-01-26 Konstantin Tokarev <annulen@yandex.ru>
814 Do not convert GlyphBufferAdvance to FloatSize
815 https://bugs.webkit.org/show_bug.cgi?id=153429
817 GlyphBufferAdvance is not necessaryly convertible to FloatSize.
818 Also, this code was doing extra work by transforming height value.
820 Reviewed by Antti Koivisto.
824 * rendering/svg/SVGTextRunRenderingContext.cpp:
825 (WebCore::SVGGlyphToPathTranslator::extents):
827 2016-01-22 Ada Chan <adachan@apple.com>
829 Enable API related to the video fullscreen layer in MediaPlayerPrivateAVFoundationObjC
830 also on Mac with video presentation mode support.
831 https://bugs.webkit.org/show_bug.cgi?id=153222
833 Reviewed by Eric Carlson.
835 No new tests. Covered by existing tests.
837 Introduce VideoFullscreenLayerManager to deal with the video layer when switching
838 between inline and fullscreen mode. We'll reuse it in other MediaPlayerPrivateInterface
841 Now that MediaPlayerPrivateAVFoundationObjC's platform layer can be a WebVideoContainerLayer,
842 this exposes a bug in PlatformCALayerCocoa::clone() where we assumed the platform layer
843 is always an AVPlayerLayer if the PlatformCALayer's layer type is LayerTypeAVPlayerLayer.
844 Add a helper method to get an AVPlayerLayer from a PlatformCALayerCocoa (which also handles
845 WebVideoContainerLayer case) and use it in PlatformCALayerCocoa::clone().
847 * WebCore.xcodeproj/project.pbxproj:
848 Add VideoFullscreenLayerManager to the project.
850 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
851 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
852 (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
853 Create m_videoFullscreenLayerManager. The video inline layer, video fullscreen layer,
854 and the video fullscreen frame are now managed by that class.
855 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
856 Just call VideoFullscreenLayerManager::setVideoLayer() to handle adding the video
857 layer in either the inline or fullscreen layer.
858 (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
859 Call VideoFullscreenLayerManager::didDestroyVideoLayer().
860 (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
861 Get the video inline layer from VideoFullscreenLayerManager.
862 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
863 Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
864 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
865 Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
866 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
867 Guard the iOS specific code properly.
868 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
869 Get the video fullscreen layer from VideoFullscreenLayerManager.
870 (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation):
872 (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
873 Get the video fullscreen layer and video fullscreen frame from VideoFullscreenLayerManager.
874 (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
875 Get the video fullscreen layer from VideoFullscreenLayerManager.
877 * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: Added.
878 (WebCore::VideoFullscreenLayerManager::videoInlineLayer):
879 (WebCore::VideoFullscreenLayerManager::videoFullscreenLayer):
880 (WebCore::VideoFullscreenLayerManager::videoFullscreenFrame):
881 * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: Added.
882 (-[WebVideoContainerLayer setBounds:]):
883 (-[WebVideoContainerLayer setPosition:]):
884 WebVideoContainerLayer was moved from MediaPlayerPrivateAVFoundationObjC.mm.
885 (WebCore::VideoFullscreenLayerManager::create):
886 (WebCore::VideoFullscreenLayerManager::VideoFullscreenLayerManager):
887 (WebCore::VideoFullscreenLayerManager::setVideoLayer):
888 Code moved from MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer().
889 (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
890 Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer().
891 (WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame):
892 Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame().
893 (WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer):
894 Code moved from MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer().
896 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
897 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
898 (PlatformCALayerCocoa::clone):
899 Use the new PlatformCALayerCocoa::avPlayerLayer() method to get the AVPlayerLayer from both the
900 destination and source PlatformCALayers.
901 (PlatformCALayerCocoa::avPlayerLayer):
902 Return nil if the layer type is not LayerTypeAVPlayerLayer. Otherwise, return the
903 platform layer if it is indeed an AVPlayerLayer. If not, it should be a WebVideoContainerLayer
904 and we should return its sublayer which should be an AVPlayerLayer.
906 2016-01-26 Chris Dumez <cdumez@apple.com>
908 First parameter to window.showModalDialog() should be mandatory
909 https://bugs.webkit.org/show_bug.cgi?id=153436
911 Reviewed by Youenn Fablet.
913 Make window.showModalDialog()'s first parameter mandatory to match the
914 last specification containing it:
915 http://dev.w3.org/html5/spec-preview/user-prompts.html#dialogs-implemented-using-separate-documents
917 The new behavior also matches Firefox, while Chrome no longer supports
920 With this change, the W3C HTML test suite no longer hangs in the middle
921 because it mistakenly pops up a modal dialog during testing.
923 Test: fast/dom/Window/showModalDialog-mandatory-parameter.html
925 * bindings/js/JSDOMWindowCustom.cpp:
926 (WebCore::JSDOMWindow::showModalDialog):
928 2016-01-26 Eric Carlson <eric.carlson@apple.com>
930 LayoutTest media/airplay-target-availability.html is flaky
931 https://bugs.webkit.org/show_bug.cgi?id=153100
932 <rdar://problem/24346796>
934 Reviewed by Daniel Bates.
936 No new tests, media/airplay-target-availability.html was updated
938 * Modules/mediasession/WebMediaSessionManager.cpp:
939 (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a configuration scan if
940 any of the config flags have changed.
941 (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Update logging.
943 2016-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
945 Main frame scrollbars not updated on hovering when using overlay scrollbars
946 https://bugs.webkit.org/show_bug.cgi?id=153304
948 Reviewed by Michael Catanzaro.
950 Legacy scrollbars were fixed in r194155, but overlay scrollbars
951 are not notified when they are hovered. This is because the layer
952 hit test in RenderView::hitTest always returns true when using
953 overlay scrollbars and we are returning early in such case,
954 ignoring the HitTestRequest::AllowFrameScrollbars flag. So, in
955 case of using overlay scrollbars we still need to check the
956 RenderView scrollbars even when the layer hit test succeeded.
958 * rendering/RenderView.cpp:
959 (WebCore::RenderView::hitTest):
961 2016-01-26 Daniel Bates <dabates@apple.com>
963 LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing
964 https://bugs.webkit.org/show_bug.cgi?id=153250
965 <rdar://problem/12172843>
967 <rdar://problem/24248040>
969 Reviewed by Alexey Proskuryakov.
971 Remove an incorrect assertion that the absolute URL associated with a protection space cannot
972 contain consecutive forward slash (/) characters. A URL can contain consecutive forward slashes.
973 This also makes the invariants for CredentialStorage::findDefaultProtectionSpaceForURL() symmetric
974 with the invariants for WebCore::protectionSpaceMapKeyFromURL().
976 Tests: http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
977 http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
979 * platform/network/CredentialStorage.cpp:
980 (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
982 2016-01-26 Daniel Bates <dabates@apple.com>
984 Remove XMLHttpRequestException
985 https://bugs.webkit.org/show_bug.cgi?id=102698
986 <rdar://problem/24338476>
988 Reviewed by Chris Dumez.
990 Inspired by a patch by Erik Arvidsson.
992 As per <https://xhr.spec.whatwg.org> (21 January 2016) and <https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts> (25 January 2016)
993 XMLHttpRequest and WorkerGlobalScope.importScripts() should throw a DOMException object instead
994 of a XMLHttpRequestException object when a NetworkError, AbortError, or TimeoutError occur. This
995 makes the behavior of WebKit more closely conform to these standards as well as the behavior of
998 * CMakeLists.txt: Remove entries for XMLHttpRequestException.idl and XMLHttpRequestException.cpp.
999 * DerivedSources.make: Remove entry for XMLHttpRequestException.idl.
1000 * WebCore.order: Remove exported symbols for XMLHttpRequestException.
1001 * WebCore.vcxproj/WebCore.vcxproj: Remove entries for JSXMLHttpRequestException.{cpp, h}, XMLHttpRequestException.{cpp, h}
1002 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1003 * WebCore.xcodeproj/project.pbxproj: Ditto.
1004 * bindings/js/JSExceptionBase.cpp:
1005 (WebCore::toExceptionBase): Remove logic for XMLHttpRequestException.
1006 * dom/DOMExceptions.in: Remove entry for XMLHttpRequestException.
1007 * workers/WorkerGlobalScope.cpp:
1008 (WebCore::WorkerGlobalScope::importScripts): Throw DOMException.NETWORK_ERR instead of XMLHttpRequestException.NETWORK_ERR.
1009 * xml/XMLHttpRequest.cpp:
1010 (WebCore::XMLHttpRequest::createRequest): Ditto.
1011 (WebCore::XMLHttpRequest::didFail): Throw DOMException.ABORT_ERR instead of XMLHttpRequestException.ABORT_ERR.
1012 (WebCore::XMLHttpRequest::didReachTimeout): Throw DOMException.TIMEOUT_ERR instead of XMLHttpRequestException.TIMEOUT_ERR.
1013 * xml/XMLHttpRequestException.cpp: Removed.
1014 * xml/XMLHttpRequestException.h: Removed.
1015 * xml/XMLHttpRequestException.idl: Removed.
1017 2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
1019 WebCoreJSBuiltins do not use to do conditional include
1020 https://bugs.webkit.org/show_bug.cgi?id=153306
1022 Reviewed by Alex Christensen.
1024 Removing compilation guards as builtin generator adds them in the files themselves.
1025 Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
1027 No change in behavior.
1029 * Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
1030 * Modules/mediastream/NavigatorUserMedia.js: Making it @conditional.
1031 * bindings/js/WebCoreJSBuiltins.cpp:
1032 * bindings/js/WebCoreJSBuiltins.h:
1034 2016-01-25 Alex Christensen <achristensen@webkit.org>
1036 Fix internal Windows build
1037 https://bugs.webkit.org/show_bug.cgi?id=153469
1039 Reviewed by Brent Fulgham.
1042 Pass the GPERF_EXECUTABLE that we found to perl scripts so they can use it instead of just calling gperf.
1043 This is needed for builds where gperf is not in the PATH.
1044 * DerivedSources.make:
1045 Pass "gperf" as the gperf command to retain existing functionality on mac.
1046 * bindings/scripts/preprocess-idls.pl:
1047 (CygwinPathIfNeeded):
1048 * bindings/scripts/preprocessor.pm:
1049 (applyPreprocessor):
1050 Add /cygdrive/c/cygwin/bin to the PATH before calling cygpath.
1051 This is needed for builds where we are using cygwin, but C:/cygwin/bin is not in the PATH.
1052 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
1053 * css/makeSelectorPseudoElementsMap.py:
1055 * platform/network/create-http-header-name-table:
1056 Use the gperf executable passed in as a command line parameter if it is given.
1058 2016-01-25 Simon Fraser <simon.fraser@apple.com>
1060 DisplayList items can log paths now
1061 https://bugs.webkit.org/show_bug.cgi?id=153417
1063 Reviewed by Zalan Bujtas.
1065 Now that Path supports TextStream logging, clean up its output a little and
1066 enable dumping of Paths in DisplayListItems.
1068 * platform/graphics/Path.cpp:
1069 (WebCore::operator<<):
1070 * platform/graphics/displaylists/DisplayListItems.cpp:
1071 (WebCore::DisplayList::operator<<):
1073 2016-01-25 Antti Koivisto <antti@apple.com>
1077 * rendering/style/RenderStyle.h:
1079 2016-01-25 Enrica Casucci <enrica@apple.com>
1081 Add support for DataDetectors in WK (iOS).
1082 https://bugs.webkit.org/show_bug.cgi?id=152989
1083 rdar://problem/22855960
1085 Reviewed by Tim Horton.
1087 Adding new helper functions for data detection related tasks.
1088 The patch also fixes a bug when creating DOM ranges from DDQueryRange
1089 spanning multiple fragments.
1091 * editing/cocoa/DataDetection.h:
1092 * editing/cocoa/DataDetection.mm:
1093 (WebCore::DataDetection::isDataDetectorLink):
1094 (WebCore::DataDetection::dataDetectorIdentifier):
1095 (WebCore::detectItemAtPositionWithRange):
1096 (WebCore::DataDetection::detectItemAroundHitTestResult):
1097 (WebCore::resultIsURL):
1098 (WebCore::removeResultLinksFromAnchor):
1099 (WebCore::searchForLinkRemovingExistingDDLinks):
1100 (WebCore::DataDetection::detectContentInRange):
1102 2016-01-25 Myles C. Maxfield <mmaxfield@apple.com>
1104 Remove broken cache from CSSFontFaceSource
1105 https://bugs.webkit.org/show_bug.cgi?id=153440
1107 Reviewed by Simon Fraser.
1109 This cache has been broken since 2013 (r158085). Given we didn't notice a perf
1110 hit when it broke, and the fact it's been broken for years, it clearly isn't
1113 https://bugs.webkit.org/show_bug.cgi?id=153414 consists of a fairly invasive
1114 change to CSSFontFaceSource; this patch includes a working version of this
1115 cache, along with an easy way to enable/disable it (to measure possible perf
1118 This patch is a short-term cleanup patch in the mean time until the above
1119 invasive change gets landed.
1121 No new tests because there is no behavior (or performance!) change.
1123 * css/CSSFontFaceSource.cpp:
1124 (WebCore::CSSFontFaceSource::font):
1125 (WebCore::CSSFontFaceSource::~CSSFontFaceSource): Deleted.
1126 (WebCore::CSSFontFaceSource::pruneTable): Deleted.
1127 (WebCore::CSSFontFaceSource::fontLoaded): Deleted.
1128 * css/CSSFontFaceSource.h:
1130 2016-01-25 Sam Weinig <sam@webkit.org>
1132 Try to fix the simulator build.
1134 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
1136 2016-01-25 Sam Weinig <sam@webkit.org>
1138 Roll back in r195559 with a build fix.
1140 * WebCore.xcodeproj/project.pbxproj:
1141 * editing/cocoa/DataDetection.mm:
1142 * platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
1143 * platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
1144 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
1146 2016-01-25 Commit Queue <commit-queue@webkit.org>
1148 Unreviewed, rolling out r195559.
1149 https://bugs.webkit.org/show_bug.cgi?id=153458
1151 This change broke the iOS build (Requested by ryanhaddad on
1156 "Fix the ASAN build."
1157 http://trac.webkit.org/changeset/195559
1159 2016-01-25 Antti Koivisto <antti@apple.com>
1161 Resolving direction and writing mode properties should not mutate document
1162 https://bugs.webkit.org/show_bug.cgi?id=153446
1164 Reviewed by Andreas Kling.
1166 Replace directionSetOnDocumentElement/writingModeSetOnDocumentElement document flags them with style flags.
1168 * css/StyleBuilderCustom.h:
1169 (WebCore::StyleBuilderCustom::applyValueDirection):
1170 (WebCore::StyleBuilderCustom::resetEffectiveZoom):
1171 (WebCore::StyleBuilderCustom::applyValueWebkitWritingMode):
1172 (WebCore::StyleBuilderCustom::applyValueWebkitTextOrientation):
1173 * css/StyleResolver.cpp:
1174 (WebCore::StyleResolver::styleForElement):
1176 (WebCore::Document::Document):
1178 (WebCore::Document::markers):
1179 (WebCore::Document::directionSetOnDocumentElement): Deleted.
1180 (WebCore::Document::writingModeSetOnDocumentElement): Deleted.
1181 (WebCore::Document::setDirectionSetOnDocumentElement): Deleted.
1182 (WebCore::Document::setWritingModeSetOnDocumentElement): Deleted.
1183 * rendering/RenderBox.cpp:
1184 (WebCore::RenderBox::styleDidChange):
1185 * rendering/style/RenderStyle.h:
1186 * style/StyleResolveForDocument.cpp:
1187 (WebCore::Style::resolveForDocument):
1189 2016-01-25 Sam Weinig <sam@webkit.org>
1193 * WebCore.xcodeproj/project.pbxproj:
1194 * editing/cocoa/DataDetection.mm:
1195 * platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
1196 * platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
1197 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
1199 2016-01-25 Alex Christensen <achristensen@webkit.org>
1201 [Win] Another build fix after r195545
1204 r195548 didn't change all the pre-builds back to post-builds.
1206 2016-01-25 Alex Christensen <achristensen@webkit.org>
1208 [Win] Fix clean build after r195545.
1211 * PlatformWin.cmake:
1212 I got a little carried away. WebCore already had a pre-build event. It was correct before r195545.
1214 2016-01-25 Beth Dakin <bdakin@apple.com>
1216 Handle soft spaces after accepted candidates
1217 https://bugs.webkit.org/show_bug.cgi?id=153331
1219 rdar://problem/23958418
1221 Reviewed by Darin Adler.
1223 Candidates now come with built-in spaces, so we should not insert a space for
1225 * editing/Editor.cpp:
1226 (WebCore::Editor::handleAcceptedCandidate):
1228 New SPI to properly handle these soft spaces.
1229 * platform/spi/mac/NSSpellCheckerSPI.h:
1231 2016-01-25 Alex Christensen <achristensen@webkit.org>
1233 [Win] Copy forwarding headers before building a project
1234 https://bugs.webkit.org/show_bug.cgi?id=153434
1236 Reviewed by Brent Fulgham.
1239 * PlatformWin.cmake:
1241 2016-01-25 Brady Eidson <beidson@apple.com>
1243 Modern IDB: Implement getIndexRecord in the SQLite backing store.
1244 https://bugs.webkit.org/show_bug.cgi?id=153425
1246 Reviewed by Darin Adler.
1248 No new tests (Some failures now pass, other failures progressed closer to passing).
1250 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1251 (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1253 2016-01-25 Eric Carlson <eric.carlson@apple.com>
1255 Media "ended" event incorrectly fires when currentTime is set
1256 https://bugs.webkit.org/show_bug.cgi?id=150348
1257 <rdar://problem/24247974>
1259 Reviewed by Jer Noble.
1261 Test: media/media-ended-fired-once.html
1263 * html/HTMLMediaElement.cpp:
1264 (WebCore::HTMLMediaElement::invalidateCachedTime): Always mark m_cachedTime as invalid.
1266 2016-01-25 Konstantin Tokarev <annulen@yandex.ru>
1268 Do not convert GlyphBufferAdvance to FloatSize
1269 https://bugs.webkit.org/show_bug.cgi?id=153421
1271 Reviewed by Simon Fraser.
1273 No new tests needed.
1275 * platform/graphics/displaylists/DisplayListItems.cpp:
1276 (WebCore::DisplayList::DrawGlyphs::computeBounds):
1278 2016-01-22 Ryosuke Niwa <rniwa@webkit.org>
1280 document.createElement should be able to create a custom element
1281 https://bugs.webkit.org/show_bug.cgi?id=153173
1283 Reviewed by Darin Adler.
1285 Added the support for constructing a custom element via document.createElement.
1287 Extracted HTMLElementFactory::createKnownElement, which returns nullptr when the specified name doesn't match
1288 any builtin element instead of out of HTMLUnknownElement, out of HTMLElementFactory::createElement.
1290 Test: fast/custom-elements/Document-createElement.html
1292 * bindings/js/JSCustomElementInterface.cpp:
1293 (WebCore::JSCustomElementInterface::constructHTMLElement): Added. Constructs a custom element by invoking its
1294 constructor. We allow exceptions to be thrown by the constructor so the caller is responsible for checking
1295 any exceptions in the ExecState before preceeding if the returned value is null.
1297 * bindings/js/JSCustomElementInterface.h:
1298 (WebCore::JSCustomElementInterface::constructSVGElement): Added.
1299 * bindings/js/JSElementCustom.cpp:
1300 (WebCore::toJSNewlyCreated): Exit early if the element is a custom element as the wrapper had already been
1301 created by super() call inside the custom element'c constructor.
1303 * bindings/js/JSMainThreadExecState.h:
1304 (WebCore::JSMainThreadExecState):
1305 * bindings/js/JSMainThreadExecStateInstrumentation.h:
1306 (WebCore::JSMainThreadExecState::instrumentFunctionInternal): Generalized from instrumentFunctionCall so that
1307 we can use it for both call and construct.
1308 (WebCore::JSMainThreadExecState::instrumentFunctionCall): Specialized the above function for call.
1309 (WebCore::JSMainThreadExecState::instrumentFunctionConstruct): Ditto for construct.
1311 * dom/CustomElementDefinitions.cpp:
1312 (WebCore::CustomElementDefinitions::findInterface): Added.
1313 * dom/CustomElementDefinitions.h:
1316 (WebCore::createHTMLElementWithNameValidation): Extracted from createElement.
1317 (WebCore::Document::createElementForBindings): Renamed from createElement. Specifies
1318 ShouldCreateCustomElement::Create to create a custom element before using fallback elements.
1323 (WebCore::Node::isCustomElement): Added. This flag is used to identify a custom element.
1324 (WebCore::Node::setIsCustomElement): Added.
1326 * dom/make_names.pl: Extracted createKnownElement from createElement for createHTMLElementWithNameValidation.
1328 * inspector/InspectorCSSAgent.cpp:
1329 (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Use qualified name object to instantiate
1330 a style element and set type content attribute.
1331 * inspector/InspectorDOMAgent.cpp:
1332 (WebCore::InspectorDOMAgent::setNodeName): Use createElementForBindings here since we might be creating an
1333 arbitrary element here. Also use RefPtr instead of raw pointers while mutating DOM for safety.
1335 2016-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
1337 REGRESSION(r192773): [GTK] maps.google.com unresponsive/stalls since r192773
1338 https://bugs.webkit.org/show_bug.cgi?id=153194
1340 Reviewed by Michael Catanzaro.
1342 In r192773 we implemented the JavaScriptCore garbage collector
1343 timers for the GTK+ port. Those timers schedule sources in the
1344 current thread default main context, but JS web worker threads
1345 implementation doesn't use WTF::RunLoop, but its own WorkerRunLoop
1346 class that doesn't create a GMainContext for the new thread. This
1347 means that for web sites using workers, we are now doing garbage
1348 collection of worker VMs in the main thread which ends up in a
1349 deadlock at some point. We need to ensure that worker threads
1350 create a GMainContext and push it as the default one for the
1351 thread before the WorkerGlobalScope is created. This way when the
1352 worker Heap is created, the GC timers use the right context to
1353 schedule their sources. And then we need to check if there are
1354 sources pending in the thread main context on every worker run
1357 * workers/WorkerRunLoop.cpp:
1358 (WebCore::WorkerRunLoop::runInMode):
1359 * workers/WorkerThread.cpp:
1360 (WebCore::WorkerThread::workerThread):
1362 2016-01-25 Commit Queue <commit-queue@webkit.org>
1364 Unreviewed, rolling out r195533.
1365 https://bugs.webkit.org/show_bug.cgi?id=153423
1367 It is again breaking builds of several ports (Requested by
1372 "WebCoreJSBuiltins do not use to do conditional include"
1373 https://bugs.webkit.org/show_bug.cgi?id=153306
1374 http://trac.webkit.org/changeset/195533
1376 2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
1378 WebCoreJSBuiltins do not use to do conditional include
1379 https://bugs.webkit.org/show_bug.cgi?id=153306
1381 Reviewed by Alex Christensen.
1383 Removing compilation guards as builtin generator adds them in the files themselves.
1384 Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
1386 No change in behavior.
1388 * Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
1389 * bindings/js/WebCoreJSBuiltins.cpp:
1390 * bindings/js/WebCoreJSBuiltins.h:
1392 2016-01-25 Commit Queue <commit-queue@webkit.org>
1394 Unreviewed, rolling out r195531.
1395 https://bugs.webkit.org/show_bug.cgi?id=153420
1397 It is breaking builds of several ports (Requested by youenn on
1402 "WebCoreJSBuiltins do not use to do conditional include"
1403 https://bugs.webkit.org/show_bug.cgi?id=153306
1404 http://trac.webkit.org/changeset/195531
1406 2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
1408 WebCoreJSBuiltins do not use to do conditional include
1409 https://bugs.webkit.org/show_bug.cgi?id=153306
1411 Reviewed by Alex Christensen.
1413 Removing compilation guards as builtin generator adds them in the files themselves.
1415 No change in behavior.
1417 * bindings/js/WebCoreJSBuiltins.cpp:
1418 * bindings/js/WebCoreJSBuiltins.h:
1420 2016-01-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
1422 [Fetch API] Implement Fetch API Headers
1423 https://bugs.webkit.org/show_bug.cgi?id=152384
1425 Reviewed by Darin Adler.
1427 Adding Fetch Headers API as a wapper around HTTPHeaderMap.
1429 Tests: imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html
1430 imported/w3c/web-platform-tests/fetch/api/headers/headers-casing.html
1431 imported/w3c/web-platform-tests/fetch/api/headers/headers-errors.html
1432 imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html
1433 imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake.html
1434 imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize.html
1435 imported/w3c/web-platform-tests/fetch/api/headers/headers-structure.html
1438 * DerivedSources.cpp:
1439 * DerivedSources.make:
1440 * Modules/fetch/FetchHeaders.cpp: Added.
1441 (WebCore::FetchHeaders::initializeWith):
1442 (WebCore::isForbiddenHeaderName):
1443 (WebCore::isForbiddenResponseHeaderName):
1444 (WebCore::isSimpleHeader):
1445 (WebCore::canWriteHeader):
1446 (WebCore::FetchHeaders::append):
1447 (WebCore::FetchHeaders::remove):
1448 (WebCore::FetchHeaders::get):
1449 (WebCore::FetchHeaders::has):
1450 (WebCore::FetchHeaders::set):
1451 * Modules/fetch/FetchHeaders.h: Added.
1452 (WebCore::FetchHeaders::create):
1453 (WebCore::FetchHeaders::~FetchHeaders):
1454 (WebCore::FetchHeaders::internalHeaders):
1455 (WebCore::FetchHeaders::FetchHeaders):
1456 * Modules/fetch/FetchHeaders.idl: Added.
1457 * Modules/fetch/FetchHeaders.js: Added.
1458 (initializeFetchHeaders):
1459 * WebCore.xcodeproj/project.pbxproj:
1460 * bindings/js/WebCoreBuiltinNames.h:
1461 * bindings/js/WebCoreJSBuiltins.cpp:
1462 * bindings/js/WebCoreJSBuiltins.h:
1463 (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
1464 (WebCore::JSBuiltinFunctions::fetchHeadersBuiltins):
1465 * platform/network/HTTPHeaderMap.cpp:
1466 (WebCore::HTTPHeaderMap::contains):
1467 (WebCore::HTTPHeaderMap::remove):
1468 * platform/network/HTTPHeaderMap.h:
1470 2016-01-22 Sergio Villar Senin <svillar@igalia.com>
1472 [css-grid] grid shorthand must reset gap properties to their initial values
1473 https://bugs.webkit.org/show_bug.cgi?id=153354
1475 Reviewed by Darin Adler.
1477 Both 'grid-row-gap' & 'grid-column-gap' are considered reset-only subproperties of the
1478 'grid' shorthand meaning that, even thought the shorthand does not offer a way to set
1479 their values, it must in any case reset them to the initial ones.
1481 * css/CSSParser.cpp:
1482 (WebCore::CSSParser::parseGridShorthand):
1483 * css/CSSPropertyNames.in:
1485 2016-01-24 Brady Eidson <beidson@apple.com>
1487 Modern IDB: Implement deleteIndex and getCount for the SQLite backing store.
1488 https://bugs.webkit.org/show_bug.cgi?id=153415
1490 Reviewed by Darin Adler.
1492 No new tests (Handful of tests now pass, improvements on a handful of others).
1494 * Modules/indexeddb/server/IDBBackingStore.h:
1496 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1497 (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
1498 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1500 * Modules/indexeddb/server/MemoryObjectStore.cpp:
1501 (WebCore::IDBServer::MemoryObjectStore::takeIndexByIdentifier):
1502 (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
1503 (WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
1504 (WebCore::IDBServer::MemoryObjectStore::takeIndexByName): Deleted.
1505 * Modules/indexeddb/server/MemoryObjectStore.h:
1507 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1508 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1509 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
1510 (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
1511 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1513 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1514 (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
1515 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
1516 * Modules/indexeddb/server/SQLiteIDBCursor.h:
1518 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
1519 (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
1520 * Modules/indexeddb/server/SQLiteIDBTransaction.h:
1522 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1523 (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
1524 (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
1525 (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
1526 * Modules/indexeddb/server/UniqueIDBDatabase.h:
1528 * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
1529 (WebCore::IDBObjectStoreInfo::deleteIndex):
1530 * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
1532 2016-01-24 Brady Eidson <beidson@apple.com>
1534 Unreviewed, speculative fix for:
1535 Modern IDB: Some IDB tests crash in ~SQLiteIDBBackingStore
1536 https://bugs.webkit.org/show_bug.cgi?id=153418
1540 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1541 (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore): Clear the global object
1542 before wiping out the VM.
1544 2016-01-24 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1546 Reduce PassRefPtr uses in dom - 4
1547 https://bugs.webkit.org/show_bug.cgi?id=153270
1549 Reviewed by Darin Adler.
1551 As a step to remove PassRefPtr uses, this patch reduces the uses in WebCore/dom.
1553 * bindings/js/JSDeviceMotionEventCustom.cpp:
1554 (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
1555 * dom/DeviceMotionData.cpp:
1556 (WebCore::DeviceMotionData::create):
1557 (WebCore::DeviceMotionData::DeviceMotionData):
1558 * dom/DeviceMotionData.h:
1560 (WebCore::Document::setBodyOrFrameset):
1561 (WebCore::Document::setFocusedElement):
1562 (WebCore::Document::setDecoder):
1563 (WebCore::Document::pushCurrentScript):
1566 (WebCore::Event::cloneFor):
1568 * dom/MouseEvent.cpp:
1569 (WebCore::MouseEvent::cloneFor):
1571 * dom/NodeIterator.cpp:
1572 (WebCore::NodeIterator::NodePointer::NodePointer):
1573 (WebCore::NodeIterator::NodeIterator):
1574 * dom/NodeIterator.h:
1575 (WebCore::NodeIterator::create):
1576 * html/RadioInputType.cpp:
1577 (WebCore::RadioInputType::handleKeydownEvent):
1578 * platform/ios/DeviceMotionClientIOS.mm:
1579 (WebCore::DeviceMotionClientIOS::motionChanged):
1580 * xml/XSLTProcessor.cpp:
1581 (WebCore::XSLTProcessor::createDocumentFromSource):
1583 2016-01-24 Myles C. Maxfield <mmaxfield@apple.com>
1585 [Font Loading] General cleanup
1586 https://bugs.webkit.org/show_bug.cgi?id=153403
1588 Reviewed by Darin Adler.
1590 It turns out that CSSFontFaceSource::m_hasExternalSVGFont exactly equals
1591 whether or not CSSFontFaceSource::m_font is a CachedSVGFont. Therefore,
1592 the variable is redundant.
1594 In addition, it was being passed to functions on CSSFontFaceSource::m_font,
1595 which means it was always true inside the CachedSVGFont subclass and
1596 always false for the CachedFont. Therefore, there is no reason pass this
1597 variable to these functions because its value can be determined at
1600 No new tests because there is no behavior change.
1602 * css/CSSFontFaceSource.cpp:
1603 (WebCore::CSSFontFaceSource::font):
1604 (WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
1605 * css/CSSFontFaceSource.h:
1606 * css/CSSFontSelector.cpp:
1607 (WebCore::createFontFace):
1608 * loader/cache/CachedFont.cpp:
1609 (WebCore::CachedFont::ensureCustomFontData):
1610 (WebCore::CachedFont::createFont):
1611 * loader/cache/CachedFont.h:
1612 * loader/cache/CachedSVGFont.cpp:
1613 (WebCore::CachedSVGFont::createFont):
1614 (WebCore::CachedSVGFont::ensureCustomFontData):
1615 * loader/cache/CachedSVGFont.h:
1616 * platform/network/HTTPParsers.cpp:
1617 (WebCore::isValidHTTPToken):
1618 * xml/XMLHttpRequest.cpp:
1619 (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
1621 2016-01-24 Chris Dumez <cdumez@apple.com>
1623 An XMLDocument interface should be exposed on the global Window object
1624 https://bugs.webkit.org/show_bug.cgi?id=153378
1625 <rdar://problem/24315465>
1627 Reviewed by Darin Adler.
1629 Expose an XMLDocument interface on the global Window object, as per:
1630 - https://dom.spec.whatwg.org/#xmldocument
1632 DOMImplementation.createDocument() now returns an XMLDocument instead
1633 of a Document, as per:
1634 - https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
1636 Previously, WebKit would alias XMLDocument to Document which caused
1637 some W3C tests to fail.
1639 Chrome and Firefox already match the specification here.
1641 No new tests, already covered by existing tests.
1644 * DerivedSources.cpp:
1645 * DerivedSources.make:
1646 * WebCore.vcxproj/WebCore.vcxproj:
1647 * WebCore.vcxproj/WebCore.vcxproj.filters:
1648 * WebCore.xcodeproj/project.pbxproj:
1649 * bindings/js/JSBindingsAllInOne.cpp:
1650 * bindings/js/JSDocumentCustom.cpp:
1651 (WebCore::createNewDocumentWrapper):
1652 * dom/DOMImplementation.cpp:
1653 (WebCore::DOMImplementation::createDocument):
1654 * dom/DOMImplementation.h:
1655 * dom/DOMImplementation.idl:
1657 (WebCore::Document::cloneDocumentWithoutChildren):
1659 (WebCore::Document::isXMLDocument):
1660 (WebCore::Document::create): Deleted.
1661 (WebCore::Document::createNonRenderedPlaceholder): Deleted.
1662 * dom/XMLDocument.h: Added.
1663 (WebCore::XMLDocument::create):
1664 (WebCore::XMLDocument::createXHTML):
1665 (WebCore::XMLDocument::XMLDocument):
1667 * dom/XMLDocument.idl: Added.
1668 * inspector/DOMPatchSupport.cpp:
1669 (WebCore::DOMPatchSupport::patchDocument):
1670 * inspector/InspectorDOMAgent.cpp:
1671 (WebCore::InspectorDOMAgent::setOuterHTML):
1672 * page/DOMWindow.idl:
1673 * page/PageSerializer.cpp:
1674 (WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
1675 * svg/SVGDocument.cpp:
1676 (WebCore::SVGDocument::SVGDocument):
1677 * svg/SVGDocument.h:
1678 * svg/SVGDocument.idl:
1679 * xml/XMLHttpRequest.cpp:
1680 (WebCore::XMLHttpRequest::responseXML):
1681 * xml/XSLTProcessor.cpp:
1682 (WebCore::XSLTProcessor::createDocumentFromSource):
1684 2016-01-24 Brady Eidson <beidson@apple.com>
1686 Modern IDB: Support IDBObjectStore.createIndex in the SQLite backing store.
1687 https://bugs.webkit.org/show_bug.cgi?id=153410
1689 Reviewed by Darin Adler.
1691 No new tests (Covered by unskipping many existing tests).
1693 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1694 (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
1695 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1696 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
1697 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
1698 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1700 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1701 (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
1702 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
1703 * Modules/indexeddb/server/SQLiteIDBCursor.h:
1705 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
1706 (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
1707 * Modules/indexeddb/server/SQLiteIDBTransaction.h:
1709 2016-01-24 Simon Fraser <simon.fraser@apple.com>
1711 Make the dumped display list representation a bit more compact
1712 https://bugs.webkit.org/show_bug.cgi?id=153409
1714 Reviewed by Zalan Bujtas.
1716 Don't make a group for every display list item.
1718 * platform/graphics/displaylists/DisplayList.cpp:
1719 (WebCore::DisplayList::DisplayList::asText):
1721 2016-01-24 Simon Fraser <simon.fraser@apple.com>
1723 Add testing for display list replay, and skip clipped-out items on replay
1724 https://bugs.webkit.org/show_bug.cgi?id=153408
1726 Reviewed by Zalan Bujtas.
1728 Make it possible to save and serialize a DisplayList of Items which were
1729 actually applied on replay, so that replay-time optimizations can be tested.
1731 This exposes internals.setElementTracksDisplayListReplay() and
1732 internals.replayDisplayListForElement().
1734 Do a trivial replay-time optimization, which is to skip items whose extents are
1735 outside the replay clip.
1737 Test: displaylists/replay-skip-clipped-rect.html
1739 * platform/graphics/GraphicsLayer.cpp:
1740 (WebCore::GraphicsLayer::GraphicsLayer):
1741 * platform/graphics/GraphicsLayer.h:
1742 (WebCore::GraphicsLayer::setIsTrackingDisplayListReplay):
1743 (WebCore::GraphicsLayer::isTrackingDisplayListReplay):
1744 (WebCore::GraphicsLayer::replayDisplayListAsText):
1745 * platform/graphics/ca/GraphicsLayerCA.cpp:
1746 (WebCore::layerDisplayListMap): Use a singleton map to store the replay display lists
1747 to avoid bloating GraphicsLayerCA for test-only code. The map stores a pair of the
1748 replay list and a clip rect, which are both dumped. Dumping the clip rect ensures that
1749 we're reporting the replay for the correct tile in a test (since there will be a replay
1751 (WebCore::GraphicsLayerCA::~GraphicsLayerCA):
1752 (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
1753 (WebCore::GraphicsLayerCA::setIsTrackingDisplayListReplay):
1754 (WebCore::GraphicsLayerCA::replayDisplayListAsText):
1755 * platform/graphics/ca/GraphicsLayerCA.h:
1756 * platform/graphics/displaylists/DisplayList.h:
1757 (WebCore::DisplayList::DisplayList::appendItem):
1758 * platform/graphics/displaylists/DisplayListReplayer.cpp:
1759 (WebCore::DisplayList::Replayer::replay): In the unlikely event of tracking replays,
1760 allocate a new DisplayList and append to it items which actually get applied.
1761 * platform/graphics/displaylists/DisplayListReplayer.h:
1762 * rendering/RenderLayerBacking.cpp:
1763 (WebCore::RenderLayerBacking::setIsTrackingDisplayListReplay):
1764 (WebCore::RenderLayerBacking::replayDisplayListAsText):
1765 * rendering/RenderLayerBacking.h:
1766 * testing/Internals.cpp:
1767 (WebCore::Internals::setElementTracksDisplayListReplay):
1768 (WebCore::Internals::replayDisplayListForElement):
1769 * testing/Internals.h:
1770 * testing/Internals.idl:
1772 2016-01-23 Wonchul Lee <wonchul.lee@collabora.co.uk>
1774 [GTK] Fix media controls displaying without controls attribute
1775 https://bugs.webkit.org/show_bug.cgi?id=152500
1777 Media controls is not displayed without controls attribute by default
1778 when the video element has text track. It'll be displayed on fullscreen
1779 regardless of controls attribute.
1781 Reviewed by Michael Catanzaro.
1783 * Modules/mediacontrols/mediaControlsGtk.js:
1784 (ControllerGtk.prototype.shouldHaveControls):
1785 (ControllerGtk.prototype.reconnectControls):
1786 (ControllerGtk.prototype.removeControls):
1787 (ControllerGtk.prototype.configureControls): Deleted.
1788 2016-01-23 Alex Christensen <achristensen@webkit.org>
1790 Use credentials from a URL with NetworkSession like we did with ResourceHandle
1791 https://bugs.webkit.org/show_bug.cgi?id=153328
1793 Reviewed by Alexey Proskuryakov.
1795 This patch fixes at least http/tests/xmlhttprequest/basic-auth-credentials-escaping.html when using NetworkSession.
1797 * platform/network/ProtectionSpaceBase.h:
1798 (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData):
1799 * platform/network/ResourceRequestBase.h:
1800 Add some WEBCORE_EXPORT macros for functions that are now used in WebKit2.
1802 2016-01-23 Brady Eidson <beidson@apple.com>
1804 Modern IDB: Implement clearing object stores and opening cursors in the SQLite backend.
1805 https://bugs.webkit.org/show_bug.cgi?id=153396
1807 Reviewed by Alex Christensen.
1809 No new tests (Some failing tests now pass, others improved).
1811 Copy more LegacyIDB SQLite backend code over to the new SQLite backend.
1813 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1814 (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
1815 (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
1816 (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
1818 2016-01-22 Commit Queue <commit-queue@webkit.org>
1820 Unreviewed, rolling out r195493.
1821 https://bugs.webkit.org/show_bug.cgi?id=153397
1823 Broke authenticaiton tests (leaks credentials) (Requested by
1828 "LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-
1829 unterminated.html crashing"
1830 https://bugs.webkit.org/show_bug.cgi?id=153250
1831 http://trac.webkit.org/changeset/195493
1833 2016-01-20 Ryosuke Niwa <rniwa@webkit.org>
1835 HTMLElement::nodeName should not upper case non-ASCII characters
1836 https://bugs.webkit.org/show_bug.cgi?id=153231
1838 Reviewed by Darin Adler.
1840 Use the newly added convertToASCIIUppercase to generate the string for tagName and nodeName.
1842 Test: fast/dom/Element/tagName-must-be-ASCII-uppercase-in-HTML-document.html
1844 * dom/QualifiedName.cpp:
1845 (WebCore::QualifiedName::localNameUpper): Use convertToASCIIUppercase.
1846 * html/HTMLElement.cpp:
1847 (WebCore::HTMLElement::nodeName): Use convertToASCIIUppercase.
1849 2016-01-22 Brady Eidson <beidson@apple.com>
1851 Modern IDB: Disable simultaneous transactions in the SQLite backend for now.
1852 https://bugs.webkit.org/show_bug.cgi?id=153381
1854 Reviewed by Alex Christensen.
1856 No new tests (This resolves many of the currently crashing/asserting tests).
1858 Right now we're porting the Legacy IDB SQLite backend to Modern IDB.
1860 The way the Legacy backend works is restricted to one transaction at a time.
1862 There's many tricks we can play to resolve this, but that task is better performed
1863 once all of the basic functionality is done.
1865 Fixing this limitation is covered by https://bugs.webkit.org/show_bug.cgi?id=153382
1867 * Modules/indexeddb/server/IDBBackingStore.h: Add a "supports simultaneous transactions" getter.
1868 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1869 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1871 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1872 (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
1873 (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
1874 (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
1875 (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction): If the backing store does
1876 not support simultaneous transactions but there is a transaction in progress, return.
1877 * Modules/indexeddb/server/UniqueIDBDatabase.h:
1879 2016-01-22 Chris Dumez <cdumez@apple.com>
1881 document.charset should be an alias for document.characterSet
1882 https://bugs.webkit.org/show_bug.cgi?id=153367
1884 Reviewed by Ryosuke Niwa.
1886 document.charset should be an alias for document.characterSet:
1887 - https://dom.spec.whatwg.org/#dom-document-charset
1889 It should also be read-only.
1891 Chrome matches the specification.
1893 No new tests, already covered by existing tests.
1898 2016-01-22 Chris Dumez <cdumez@apple.com>
1900 Document.open / Document.write should be prevented while the document is being unloaded
1901 https://bugs.webkit.org/show_bug.cgi?id=153255
1902 <rdar://problem/22741293>
1904 Reviewed by Ryosuke Niwa.
1906 Document.open / Document.write should be prevented while the document
1907 is being unloaded, as per the HTML specification:
1908 - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
1909 - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
1911 This patch is aligning our behavior with the specification and Firefox.
1912 Calling Document.open / Document.write during the document was being
1913 unloaded would cause us to crash as this was unexpected.
1915 Tests: fast/frames/page-hide-document-open.html
1916 fast/frames/page-unload-document-open.html
1918 * WebCore.xcodeproj/project.pbxproj:
1919 Add new IgnoreOpensDuringUnloadCountIncrementer.h header.
1922 (WebCore::Document::open):
1923 Abort if the document's ignore-opens-during-unload counter is greater
1925 https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
1927 (WebCore::Document::write):
1928 Abort if the insertion point is undefined and the document's
1929 ignore-opens-during-unload counter is greater than zero, as per:
1930 https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
1933 Add data member to maintain the document's ignore-opens-during-unload counter:
1934 https://html.spec.whatwg.org/multipage/webappapis.html#ignore-opens-during-unload-counter
1936 * dom/IgnoreOpensDuringUnloadCountIncrementer.h: Added.
1937 Add utility class to increment / decrement a document's
1938 ignore-opens-during-unload counter.
1940 * history/CachedFrame.cpp:
1941 (WebCore::CachedFrame::CachedFrame):
1942 When a page goes into PageCache, we don't end up calling
1943 FrameLoader::detachChildren() so we need to increment the document's
1944 ignore-opens-during-unload counter before calling stopLoading() on each
1947 * loader/FrameLoader.cpp:
1948 (WebCore::FrameLoader::detachChildren):
1949 detachChildren() will end up firing the pagehide / unload events in each
1950 child frame so we increment the parent frame's document's
1951 ignore-opens-during-unload counter. This behavior matches the text of:
1952 https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document
1954 As per the spec, the document's ignore-opens-during-unload counter should
1955 be incremented before firing the pagehide / unload events at the document's
1956 Window object. It should be decremented only after firing the pagehide /
1957 unload events in each subframe. This is needed in case a subframe tries to
1958 call document.open / document.write on a parent frame's document, from its
1959 pagehide or unload handler.
1961 (WebCore::FrameLoader::dispatchUnloadEvents):
1962 Increment the document's ignore-opens-during-unload counter before firing
1963 the pagehide / unload events and decrement it after. As per the spec, we
1964 are not supposed to decrement this early. We actually supposed to wait
1965 until the pagehide / unload events have been fired in all the subframes.
1966 For this reason, we take care of re-incrementing the document's
1967 ignore-opens-during-unload in detachChildren(), which will take care of
1968 firing the pagehide / unload in the subframes.
1970 2016-01-22 Brady Eidson <beidson@apple.com>
1972 Modern IDB: Implement put, get, and delete records for the SQLite backend.
1973 https://bugs.webkit.org/show_bug.cgi?id=153375
1975 Reviewed by Alex Christensen.
1977 No new tests (Covered by many existing tests now passing).
1979 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1980 (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
1981 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
1982 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1983 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1984 (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
1985 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1987 2016-01-22 Enrica Casucci <enrica@apple.com>
1989 Add support for DataDetectors in WK (iOS).
1990 https://bugs.webkit.org/show_bug.cgi?id=152989
1991 rdar://problem/22855960
1993 Reviewed by Tim Horton.
1995 This patch adds the logic to perform data detection and modify
1996 the DOM by adding data detector links as appropriate.
1997 The data detector results returned by detectContentInRange are
1998 stored in the Frame object.
2000 * editing/cocoa/DataDetection.h:
2001 * editing/cocoa/DataDetection.mm:
2002 (WebCore::resultIsURL):
2003 (WebCore::constructURLStringForResult):
2004 (WebCore::removeResultLinksFromAnchor):
2005 (WebCore::searchForLinkRemovingExistingDDLinks):
2006 (WebCore::dataDetectorTypeForCategory):
2007 (WebCore::buildQuery):
2008 (WebCore::DataDetection::detectContentInRange):
2009 * loader/FrameLoader.cpp:
2010 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2012 (WebCore::Frame::setDataDetectionResults):
2013 (WebCore::Frame::dataDetectionResults):
2014 * platform/spi/cocoa/DataDetectorsCoreSPI.h:
2015 (DDQueryOffsetCompare):
2017 2016-01-22 Daniel Bates <dabates@apple.com>
2019 LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing
2020 https://bugs.webkit.org/show_bug.cgi?id=153250
2021 <rdar://problem/12172843>
2023 <rdar://problem/24248040>
2025 Reviewed by Alexey Proskuryakov.
2027 Remove an incorrect assertion that the absolute URL associated with a protection space cannot
2028 contain consecutive forward slash (/) characters. A URL can contain consecutive forward slashes.
2029 This also makes the invariants for CredentialStorage::findDefaultProtectionSpaceForURL() symmetric
2030 with the invariants for WebCore::protectionSpaceMapKeyFromURL().
2032 Tests: http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
2033 http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
2035 * platform/network/CredentialStorage.cpp:
2036 (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
2038 2016-01-22 Chris Dumez <cdumez@apple.com>
2040 DOMImplementation.createHTMLDocument("") should append an empty Text Node to the title Element
2041 https://bugs.webkit.org/show_bug.cgi?id=153374
2043 Reviewed by Ryosuke Niwa.
2045 DOMImplementation.createHTMLDocument("") should append an empty Text
2046 Node to the title Element as per the steps at:
2047 - https://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument (step 6)
2049 Firefox and Chrome follow the specification here.
2051 Previously, WebKit would rely on HTMLTitleElement.text setter which
2052 does not create a Text Node if the title is the empty string, as per:
2053 - https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
2054 - https://dom.spec.whatwg.org/#dom-node-textcontent
2056 No new tests, already covered by existing test.
2058 * dom/DOMImplementation.cpp:
2059 (WebCore::DOMImplementation::createHTMLDocument):
2061 2016-01-17 Ada Chan <adachan@apple.com>
2063 Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
2064 https://bugs.webkit.org/show_bug.cgi?id=153220
2066 Reviewed by Eric Carlson.
2068 No new tests, just code refactoring.
2070 * Modules/mediacontrols/MediaControlsHost.cpp:
2071 (WebCore::MediaControlsHost::supportsFullscreen):
2072 Just pass in VideoFullscreenModeStandard as this is used for checking the standard fullscreen case.
2074 * html/HTMLMediaElement.cpp:
2075 (WebCore::HTMLMediaElement::enterFullscreen):
2076 Only use the FullScreen API if the mode is VideoFullscreenModeStandard. Call ChromeClient::supportsVideoFullscreen()
2078 (WebCore::HTMLMediaElement::exitFullscreen):
2079 Move the fullscreen element check up so we can use this method to exit picture-in-picture mode.
2080 * html/HTMLMediaElement.h:
2082 * html/HTMLVideoElement.cpp:
2083 (WebCore::HTMLVideoElement::supportsFullscreen):
2085 (WebCore::HTMLVideoElement::webkitEnterFullscreen):
2086 Pass in VideoFullscreenModeStandard to supportsFullscreen() as this is used for the standard fullscreen case.
2087 (WebCore::HTMLVideoElement::webkitSupportsFullscreen):
2089 (WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
2090 Pass in the correct VideoFullscreenMode to supportsFullscreen() corresponding to the mode string passed in.
2091 (WebCore::HTMLVideoElement::setFullscreenMode):
2092 Pass in the mode to supportsFullscreen().
2093 * html/HTMLVideoElement.h:
2095 * html/MediaController.h:
2096 * html/MediaControllerInterface.h:
2097 Make supportsFullscreen() take a VideoFullscreenMode.
2099 * html/shadow/MediaControls.cpp:
2100 (WebCore::MediaControls::reset):
2101 Pass in VideoFullscreenModeStandard to supportsFullscreen() here since this is used for the standard
2103 * html/shadow/MediaControlsApple.cpp:
2104 (WebCore::MediaControlsApple::reset):
2107 * page/ChromeClient.h:
2108 Make supportsVideoFullscreen() take a VideoFullscreenMode.
2110 * rendering/HitTestResult.cpp:
2111 (WebCore::HitTestResult::mediaSupportsFullscreen):
2112 (WebCore::HitTestResult::toggleMediaFullscreenState):
2113 (WebCore::HitTestResult::enterFullscreenForVideo):
2114 Pass in VideoFullscreenModeStandard in the code relating to the standard fullscreen.
2116 2016-01-22 Chris Dumez <cdumez@apple.com>
2118 Document.URL / Document.documentURI should return "about:blank" instead of empty string / null
2119 https://bugs.webkit.org/show_bug.cgi?id=153363
2120 <rdar://problem/22549736>
2122 Reviewed by Ryosuke Niwa.
2124 Document.URL / Document.documentURI should return "about:blank" instead
2125 of empty string / null, as per the specification:
2126 - https://dom.spec.whatwg.org/#dom-document-url
2127 - https://dom.spec.whatwg.org/#concept-document-url
2129 Also, Document.documentURI should be an alias for Document.URL as per:
2130 - https://dom.spec.whatwg.org/#dom-document-url
2132 Firefox matches the specification.
2134 No new tests, already covered by existing W3C tests.
2137 (WebCore::Document::urlForBindings):
2140 2016-01-22 Brent Fulgham <bfulgham@apple.com>
2142 Don't ignore the return value of CCRandomCopyBytes
2143 https://bugs.webkit.org/show_bug.cgi?id=153369
2144 <rdar://problem/22198376>
2145 <rdar://problem/22198378>
2147 Reviewed by Alexey Proskuryakov.
2149 Tested by existing Crypto tests.
2151 * crypto/mac/CryptoKeyMac.cpp:
2152 (WebCore::CryptoKey::randomData): RELEASE_ASSERT if CCRandomCopyBytes ever returns
2153 anything besides kCCSuccess.
2154 * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2155 (WebCore::createAndStoreMasterKey): Ditto.
2156 (WebCore::wrapSerializedCryptoKey): Ditto.
2158 2016-01-21 Sam Weinig <sam@webkit.org>
2160 Treat non-https actions on secure pages as mixed content
2161 <rdar://problem/23144492>
2162 https://bugs.webkit.org/show_bug.cgi?id=153322
2164 Reviewed by Alexey Proskuryakov.
2166 Tests: http/tests/security/mixedContent/insecure-form-in-iframe.html
2167 http/tests/security/mixedContent/insecure-form-in-main-frame.html
2168 http/tests/security/mixedContent/javascript-url-form-in-main-frame.html
2170 * html/HTMLFormElement.cpp:
2171 (WebCore::HTMLFormElement::parseAttribute):
2172 Check form actions for mixed content.
2174 * loader/MixedContentChecker.cpp:
2175 (WebCore::MixedContentChecker::checkFormForMixedContent):
2176 * loader/MixedContentChecker.h:
2177 Add new function to check and warn if a form's action is mixed content.
2179 2016-01-22 Nan Wang <n_wang@apple.com>
2181 AX: Crash in setTextMarkerDataWithCharacterOffset
2182 https://bugs.webkit.org/show_bug.cgi?id=153365
2183 <rdar://problem/24287924>
2185 Reviewed by Chris Fleizach.
2187 Sometimes when we try to create a text marker range from a stale text marker with a removed
2188 node, it will cause crash. Fixed it by adding a null check for the AccessibilityObject we
2189 create in setTextMarkerDataWithCharacterOffset.
2191 Test: accessibility/text-marker/text-marker-range-with-removed-node-crash.html
2193 * accessibility/AXObjectCache.cpp:
2194 (WebCore::AXObjectCache::setTextMarkerDataWithCharacterOffset):
2196 2016-01-22 Brady Eidson <beidson@apple.com>
2198 Modern IDB: Add transactions and create/delete object store to SQLite backend
2199 https://bugs.webkit.org/show_bug.cgi?id=153359
2201 Reviewed by Alex Christensen.
2203 No new tests (Covered by many tests now passing).
2205 * Modules/indexeddb/server/IDBBackingStore.h: Change deleteObjectStore to work on an ID instead of name.
2207 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2208 (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
2209 (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByIdentifier):
2210 (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName): Deleted.
2211 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2213 Clean up filename generation a bit to actually match the previous directory structure.
2214 Add begin/commit/abort transaction support.
2215 Add create/delete object store support:
2216 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2217 (WebCore::IDBServer::SQLiteIDBBackingStore::filenameForDatabaseName):
2218 (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectory):
2219 (WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabasePath):
2220 (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
2221 (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
2222 (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
2223 (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
2224 (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
2225 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
2226 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
2227 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2229 Clean up SQLiteIDBTransaction to fit with the new WebCore backing store model, which is slightly
2230 different from the old WebKit2 backing store model:
2231 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
2232 (WebCore::IDBServer::SQLiteIDBTransaction::SQLiteIDBTransaction):
2233 (WebCore::IDBServer::SQLiteIDBTransaction::begin):
2234 (WebCore::IDBServer::SQLiteIDBTransaction::commit):
2235 (WebCore::IDBServer::SQLiteIDBTransaction::abort):
2236 (WebCore::IDBServer::SQLiteIDBTransaction::reset):
2237 (WebCore::IDBServer::SQLiteIDBTransaction::rollback): Deleted.
2238 * Modules/indexeddb/server/SQLiteIDBTransaction.h:
2239 (WebCore::IDBServer::SQLiteIDBTransaction::transactionIdentifier):
2240 (WebCore::IDBServer::SQLiteIDBTransaction::mode):
2242 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2243 (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
2244 (WebCore::IDBServer::UniqueIDBDatabase::performDeleteObjectStore):
2245 (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteObjectStore):
2246 * Modules/indexeddb/server/UniqueIDBDatabase.h:
2248 * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
2249 (WebCore::IDBDatabaseInfo::deleteObjectStore):
2250 * Modules/indexeddb/shared/IDBDatabaseInfo.h:
2252 * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
2253 (WebCore::IDBObjectStoreInfo::maxIndexID):
2255 * Modules/indexeddb/shared/IDBTransactionInfo.h:
2256 (WebCore::IDBTransactionInfo::identifier):
2258 2016-01-22 Antti Koivisto <antti@apple.com>
2260 Style resolver initialization cleanups
2261 https://bugs.webkit.org/show_bug.cgi?id=153356
2263 Reviewed by Simon Fraser.
2265 Simplify StyleResolver::State initialization.
2266 Also use more references and other cleanups.
2268 * css/MediaQueryMatcher.cpp:
2269 (WebCore::MediaQueryMatcher::prepareEvaluator):
2270 * css/StyleMedia.cpp:
2271 (WebCore::StyleMedia::matchMedium):
2272 * css/StyleResolver.cpp:
2273 (WebCore::StyleResolver::State::clear):
2274 (WebCore::StyleResolver::StyleResolver):
2275 (WebCore::StyleResolver::classNamesAffectedByRules):
2276 (WebCore::StyleResolver::State::State):
2278 Initialize State using a constructor instead of bunch of construction functions.
2279 Remove m_styledElement field which is just a casted version of m_element.
2281 (WebCore::StyleResolver::State::updateConversionData):
2282 (WebCore::StyleResolver::State::setStyle):
2283 (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2284 (WebCore::StyleResolver::canShareStyleWithElement):
2285 (WebCore::StyleResolver::locateSharedStyle):
2286 (WebCore::isAtShadowBoundary):
2287 (WebCore::StyleResolver::styleForElement):
2288 (WebCore::StyleResolver::styleForKeyframe):
2289 (WebCore::StyleResolver::keyframeStylesForAnimation):
2290 (WebCore::StyleResolver::pseudoStyleForElement):
2291 (WebCore::StyleResolver::styleForPage):
2292 (WebCore::StyleResolver::pseudoStyleRulesForElement):
2293 (WebCore::StyleResolver::clearCachedPropertiesAffectedByViewportUnits):
2294 (WebCore::isCacheableInMatchedPropertiesCache):
2296 Disallow caching of document element style entirely because the writing-mode and direction properties have special handling.
2297 The existing check wasn't robust.
2299 (WebCore::extractDirectionAndWritingMode):
2300 (WebCore::StyleResolver::applyMatchedProperties):
2301 (WebCore::StyleResolver::applyPropertyToStyle):
2302 (WebCore::StyleResolver::State::initElement): Deleted.
2303 (WebCore::StyleResolver::initElement): Deleted.
2304 (WebCore::StyleResolver::State::initForStyleResolve): Deleted.
2305 * css/StyleResolver.h:
2306 (WebCore::StyleResolver::mediaQueryEvaluator):
2307 (WebCore::StyleResolver::State::State):
2308 (WebCore::StyleResolver::State::document):
2309 (WebCore::StyleResolver::State::element):
2310 (WebCore::StyleResolver::State::style):
2311 (WebCore::StyleResolver::State::takeStyle):
2312 (WebCore::StyleResolver::State::styledElement): Deleted.
2314 (WebCore::Element::resolveStyle):
2315 * page/animation/KeyframeAnimation.cpp:
2316 (WebCore::KeyframeAnimation::KeyframeAnimation):
2317 * rendering/RenderElement.cpp:
2318 (WebCore::RenderElement::getUncachedPseudoStyle):
2319 (WebCore::RenderElement::containingBlockForFixedPosition):
2320 * rendering/RenderNamedFlowFragment.cpp:
2321 (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
2322 * style/StyleTreeResolver.cpp:
2323 (WebCore::Style::TreeResolver::styleForElement):
2324 * svg/SVGElement.cpp:
2325 (WebCore::SVGElement::customStyleForRenderer):
2326 (WebCore::SVGElement::computedStyle):
2327 (WebCore::addQualifiedName):
2328 * svg/SVGElementRareData.h:
2329 (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
2330 (WebCore::SVGElementRareData::overrideComputedStyle):
2332 2016-01-22 Chris Fleizach <cfleizach@apple.com>
2334 AX: <code> group and friends should have a custom subrole
2335 https://bugs.webkit.org/show_bug.cgi?id=153282
2337 Reviewed by Mario Sanchez Prada.
2339 Add some custom subroles for the mac for code, ins, del, cite, var, samp, pre, kbd,
2340 so that assistive tech can recognize them.
2342 Test: accessibility/mac/subroles-for-formatted-groups.html
2344 * accessibility/AccessibilityObject.cpp:
2345 (WebCore::AccessibilityObject::isStyleFormatGroup):
2346 * accessibility/AccessibilityObject.h:
2347 * accessibility/AccessibilityRenderObject.cpp:
2348 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2349 (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2350 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2351 (-[WebAccessibilityObjectWrapper subrole]):
2353 2016-01-22 Enrica Casucci <enrica@apple.com>
2355 Remove dependency from DataDetectorsCore on iOS.
2356 https://bugs.webkit.org/show_bug.cgi?id=153358
2357 rdar://problem/24294651
2359 Reviewed by Anders Carlsson.
2361 Avoid build dependencies.
2363 * Configurations/WebCore.xcconfig:
2365 2016-01-22 Chris Fleizach <cfleizach@apple.com>
2367 AX: ARIA combo boxes are not returning the right value for selected text range
2368 https://bugs.webkit.org/show_bug.cgi?id=153260
2370 Reviewed by Darin Adler.
2372 Just because an element has an ARIA role doesn't mean we should always use the selected text range of the whole document.
2373 If the element is also a text based ARIA control, we can still use the element's inner text range to return the right value.
2375 Test: accessibility/selected-text-range-aria-elements.html
2377 * accessibility/AccessibilityRenderObject.cpp:
2378 (WebCore::AccessibilityRenderObject::selectedTextRange):
2380 2016-01-22 Chris Dumez <cdumez@apple.com>
2382 Unreviewed iOS build fix after r195452.
2384 * accessibility/AccessibilityNodeObject.cpp:
2385 (WebCore::AccessibilityNodeObject::colorValue):
2387 2016-01-21 Dave Hyatt <hyatt@apple.com>
2389 Elements with overflow and border-radius don't show in multicolumn properly.
2390 https://bugs.webkit.org/show_bug.cgi?id=152920
2392 Reviewed by Simon Fraser.
2394 Added new test in fast/multicol.
2396 * rendering/RenderLayer.cpp:
2397 (WebCore::RenderLayer::convertToLayerCoords):
2398 (WebCore::RenderLayer::offsetFromAncestor):
2399 (WebCore::RenderLayer::clipToRect):
2400 * rendering/RenderLayer.h:
2402 Make sure the crawl up the containing block chain to apply clips properly offsets
2403 to account for columns. convertToLayerCoords could already handle this, so
2404 offsetFromAncestor now takes the same extra argument (whether or not to adjust for
2405 columns) that convertToLayerCoords does.
2407 2016-01-22 Darin Adler <darin@apple.com>
2409 Reduce use of equalIgnoringCase to just ignore ASCII case
2410 https://bugs.webkit.org/show_bug.cgi?id=153266
2412 Reviewed by Ryosuke Niwa.
2414 Changed many call sites that were using equalIgnoringCase to instead use
2415 equalLettersIgnoringASCIICase. What these all have in common is that the
2416 thing they are comparing with is a string literal that has all lowercase
2417 letters, spaces, and a few simple examples of punctuation.
2419 Not 100% sure that the new function name is just right, but it's a long name
2420 so it's easy to change it with a global replace if we come up with a better one.
2422 Or if we decide ther eis no need for the "letters" optimization, we can change
2423 these all to just use equalIgnoringASCIICase, also with a global replace.
2425 Also made a few tweaks to some code nearby and some includes.
2427 * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
2428 (WebCore::CDMPrivateClearKey::supportsKeySystem): Use equalLettersIgnoringASCIICase.
2429 (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
2430 * Modules/encryptedmedia/CDMSessionClearKey.cpp:
2431 (WebCore::CDMSessionClearKey::update): Ditto.
2432 * Modules/plugins/YouTubePluginReplacement.cpp:
2433 (WebCore::YouTubePluginReplacement::supportsMimeType): Ditto.
2434 (WebCore::YouTubePluginReplacement::supportsFileExtension): Ditto.
2435 * Modules/webdatabase/DatabaseAuthorizer.cpp:
2436 (WebCore::DatabaseAuthorizer::createVTable): Ditto.
2437 (WebCore::DatabaseAuthorizer::dropVTable): Ditto.
2438 * Modules/websockets/WebSocketHandshake.cpp:
2439 (WebCore::WebSocketHandshake::readHTTPHeaders): Ditto.
2440 (WebCore::WebSocketHandshake::checkResponseHeaders): Ditto.
2441 * accessibility/AXObjectCache.cpp:
2442 (WebCore::AXObjectCache::findAriaModalNodes): Ditto.
2443 (WebCore::AXObjectCache::handleMenuItemSelected): Ditto.
2444 (WebCore::AXObjectCache::handleAriaModalChange): Ditto.
2445 (WebCore::isNodeAriaVisible): Ditto.
2446 * accessibility/AccessibilityListBoxOption.cpp:
2447 (WebCore::AccessibilityListBoxOption::isEnabled): Ditto.
2449 * accessibility/AccessibilityNodeObject.cpp:
2450 (WebCore::AccessibilityNodeObject::determineAccessibilityRole): Use isColorControl
2451 instead of checking the typeAttr of the HTMLInputElement directly.
2452 (WebCore::AccessibilityNodeObject::isEnabled): Use equalLettersIgnoringASCIICase.
2453 (WebCore::AccessibilityNodeObject::isPressed): Ditto.
2454 (WebCore::AccessibilityNodeObject::isChecked): Ditto.
2455 (WebCore::AccessibilityNodeObject::isMultiSelectable): Ditto.
2456 (WebCore::AccessibilityNodeObject::isRequired): Ditto.
2457 (WebCore::shouldUseAccessibilityObjectInnerText): Ditto.
2458 (WebCore::AccessibilityNodeObject::colorValue): Ditto.
2460 * accessibility/AccessibilityObject.cpp:
2461 (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
2462 Use equalLettersIgnoringASCIICase.
2463 (WebCore::AccessibilityObject::ariaIsMultiline): Ditto.
2464 (WebCore::AccessibilityObject::liveRegionStatusIsEnabled): Ditto.
2465 (WebCore::AccessibilityObject::sortDirection): Ditto.
2466 (WebCore::AccessibilityObject::supportsARIAPressed): Ditto.
2467 (WebCore::AccessibilityObject::supportsExpanded): Ditto.
2468 (WebCore::AccessibilityObject::isExpanded): Ditto.
2469 (WebCore::AccessibilityObject::checkboxOrRadioValue): Ditto.
2470 (WebCore::AccessibilityObject::isARIAHidden): Ditto.
2471 * accessibility/AccessibilityRenderObject.cpp:
2472 (WebCore::AccessibilityRenderObject::supportsARIADragging): Ditto.
2473 (WebCore::AccessibilityRenderObject::defaultObjectInclusion): Ditto.
2474 (WebCore::AccessibilityRenderObject::elementAttributeValue): Ditto.
2475 (WebCore::AccessibilityRenderObject::isSelected): Ditto.
2476 (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Ditto.
2477 (WebCore::AccessibilityRenderObject::orientation): Ditto.
2478 (WebCore::AccessibilityRenderObject::canSetExpandedAttribute): Ditto.
2479 (WebCore::AccessibilityRenderObject::canSetValueAttribute): Ditto.
2480 (WebCore::AccessibilityRenderObject::ariaLiveRegionAtomic): Ditto.
2482 * accessibility/AccessibilityTableCell.cpp:
2483 (WebCore::AccessibilityTableCell::ariaRowSpan): Use == to compare a string
2484 with "0" since there is no need to "ignore case" when there are no letters.
2486 * css/CSSCalculationValue.cpp:
2487 (WebCore::CSSCalcValue::create): Use equalLettersIgnoringASCIICase.
2489 * css/CSSCalculationValue.h: Removed unneeded include of CSSParserValues.h.
2490 * css/CSSCustomPropertyValue.h: Ditto.
2492 * css/CSSFontFaceSrcValue.cpp:
2493 (WebCore::CSSFontFaceSrcValue::isSVGFontFaceSrc): Use equalLettersIgnoringASCIICase.
2495 * css/CSSGrammar.y.in: Use equalLettersIgnoringASCIICase. Also restructured the code
2496 a bit to have more normal formatting and reordered it slightly.
2498 * css/CSSParser.cpp:
2499 (WebCore::equal): Deleted.
2500 (WebCore::equalIgnoringCase): Deleted.
2501 (WebCore::equalLettersIgnoringASCIICase): Added. Replaces function templates named
2502 equal and equalIgnoringCase that are no longer used.
2503 (WebCore::CSSParser::parseValue): Use equalLettersIgnoringASCIICase.
2504 (WebCore::CSSParser::parseNonElementSnapPoints): Ditto.
2505 (WebCore::CSSParser::parseAlt): Ditto.
2506 (WebCore::CSSParser::parseContent): Ditto.
2507 (WebCore::CSSParser::parseFillImage): Ditto.
2508 (WebCore::CSSParser::parseAnimationName): Ditto.
2509 (WebCore::CSSParser::parseAnimationTrigger): Ditto.
2510 (WebCore::CSSParser::parseAnimationProperty): Ditto.
2511 (WebCore::CSSParser::parseKeyframeSelector): Ditto.
2512 (WebCore::CSSParser::parseAnimationTimingFunction): Ditto.
2513 (WebCore::CSSParser::parseGridTrackList): Ditto.
2514 (WebCore::CSSParser::parseGridTrackSize): Ditto.
2515 (WebCore::CSSParser::parseDashboardRegions): Ditto.
2516 (WebCore::CSSParser::parseClipShape): Ditto.
2517 (WebCore::CSSParser::parseBasicShapeInset): Ditto.
2518 (WebCore::CSSParser::parseBasicShape): Ditto.
2519 (WebCore::CSSParser::parseFontFaceSrcURI): Ditto.
2520 (WebCore::CSSParser::parseFontFaceSrc): Ditto.
2521 (WebCore::CSSParser::isCalculation): Ditto.
2522 (WebCore::CSSParser::parseColorFromValue): Ditto.
2523 (WebCore::CSSParser::parseBorderImage): Ditto.
2524 (WebCore::parseDeprecatedGradientPoint): Ditto.
2525 (WebCore::parseDeprecatedGradientColorStop): Ditto.
2526 (WebCore::CSSParser::parseDeprecatedGradient): Ditto.
2527 (WebCore::CSSParser::parseLinearGradient): Ditto.
2528 (WebCore::CSSParser::parseRadialGradient): Ditto.
2529 (WebCore::CSSParser::isGeneratedImageValue): Ditto.
2530 (WebCore::CSSParser::parseGeneratedImage): Ditto.
2531 (WebCore::filterInfoForName): Ditto.
2532 (WebCore::validFlowName): Ditto.
2533 (WebCore::CSSParser::realLex): Ditto.
2534 (WebCore::isValidNthToken): Ditto.
2535 * css/CSSParserValues.cpp:
2536 (WebCore::CSSParserSelector::parsePagePseudoSelector): Ditto.
2538 * css/CSSParserValues.h:
2539 (WebCore::equalLettersIgnoringASCIICase): Added.
2541 * css/CSSVariableDependentValue.h: Removed unneeded include of CSSParserValues.h.
2543 * css/MediaList.cpp:
2544 (WebCore::reportMediaQueryWarningIfNeeded): Use equalLettersIgnoringASCIICase.
2545 * css/MediaQueryEvaluator.cpp:
2546 (WebCore::MediaQueryEvaluator::mediaTypeMatch): Ditto.
2547 (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Ditto.
2548 (WebCore::evalResolution): Ditto.
2550 * css/SelectorPseudoTypeMap.h: Removed unneeded include of CSSParserValues.h.
2552 * css/StyleBuilderConverter.h:
2553 (WebCore::StyleBuilderConverter::convertTouchCallout): Use equalLettersIgnoringASCIICase.
2555 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Added an include of
2556 CSSParserValues.h since it's no longer included by SelectorPseudoTypeMap.h.
2559 (WebCore::setParserFeature): Use equalLettersIgnoringASCIICase.
2560 (WebCore::Document::processReferrerPolicy): Ditto.
2561 (WebCore::Document::createEvent): Ditto.
2562 (WebCore::Document::parseDNSPrefetchControlHeader): Ditto.
2565 (WebCore::Element::spellcheckAttributeState): Use isNull instead of doing
2566 checking equality with nullAtom. Use isEmpty instead of equalIgnoringCase("").
2567 Use equalLettersIgnoringASCIICase.
2568 (WebCore::Element::canContainRangeEndPoint): Ditto.
2570 * dom/InlineStyleSheetOwner.cpp:
2571 (WebCore::isValidCSSContentType): Use equalLettersIgnoringASCIICase.
2572 Added comment about peculiar behavior where we do case-sensitive processing of
2573 the MIME type if the document is XML.
2575 * dom/ScriptElement.cpp:
2576 (WebCore::ScriptElement::requestScript): Use equalLettersIgnoringASCIICase.
2577 (WebCore::ScriptElement::isScriptForEventSupported): Ditto.
2578 * dom/SecurityContext.cpp:
2579 (WebCore::SecurityContext::parseSandboxPolicy): Ditto.
2580 * dom/ViewportArguments.cpp:
2581 (WebCore::findSizeValue): Ditto.
2582 (WebCore::findScaleValue): Ditto.
2583 (WebCore::findBooleanValue): Ditto.
2585 * editing/EditorCommand.cpp:
2586 (WebCore::executeDefaultParagraphSeparator): Use equalLettersIgnoringASCIICase.
2587 (WebCore::executeInsertBacktab): Use ASCIILiteral.
2588 (WebCore::executeInsertHTML): Use emptyString.
2589 (WebCore::executeInsertLineBreak): Use ASCIILiteral.
2590 (WebCore::executeInsertNewline): Ditto.
2591 (WebCore::executeInsertTab): Ditto.
2592 (WebCore::executeJustifyCenter): Ditto.
2593 (WebCore::executeJustifyFull): Ditto.
2594 (WebCore::executeJustifyLeft): Ditto.
2595 (WebCore::executeJustifyRight): Ditto.
2596 (WebCore::executeStrikethrough): Ditto.
2597 (WebCore::executeStyleWithCSS): Use equalLettersIgnoringASCIICase.
2598 (WebCore::executeUseCSS): Ditto.
2599 (WebCore::executeSubscript): Use ASCIILiteral.
2600 (WebCore::executeSuperscript): Ditto.
2601 (WebCore::executeToggleBold): Ditto.
2602 (WebCore::executeToggleItalic): Ditto.
2603 (WebCore::executeUnderline): Ditto.
2604 (WebCore::executeUnscript): Ditto.
2605 (WebCore::stateBold): Ditto.
2606 (WebCore::stateItalic): Ditto.
2607 (WebCore::stateStrikethrough): Ditto.
2608 (WebCore::stateSubscript): Ditto.
2609 (WebCore::stateSuperscript): Ditto.
2610 (WebCore::stateUnderline): Ditto.
2611 (WebCore::stateJustifyCenter): Ditto.
2612 (WebCore::stateJustifyFull): Ditto.
2613 (WebCore::stateJustifyLeft): Ditto.
2614 (WebCore::stateJustifyRight): Ditto.
2615 (WebCore::valueFormatBlock): Use emptyString.
2616 (WebCore::Editor::Command::value): Use ASCIILiteral.
2618 * editing/TextIterator.cpp:
2619 (WebCore::isRendererReplacedElement): Use equalLettersIgnoringASCIICase.
2622 (WebCore::Blob::isNormalizedContentType): Use isASCIIUpper.
2624 * history/HistoryItem.cpp:
2625 (WebCore::HistoryItem::setFormInfoFromRequest): Use equalLettersIgnoringASCIICase.
2627 * html/Autocapitalize.cpp:
2628 (WebCore::valueOn): Deleted.
2629 (WebCore::valueOff): Deleted.
2630 (WebCore::valueNone): Deleted.
2631 (WebCore::valueWords): Deleted.
2632 (WebCore::valueSentences): Deleted.
2633 (WebCore::valueAllCharacters): Deleted.
2634 (WebCore::autocapitalizeTypeForAttributeValue): Use equalLettersIgnoringASCIICase.
2635 (WebCore::stringForAutocapitalizeType): Put the AtomicString globals right in the
2636 switch statement instead of in separate functions.
2638 * html/HTMLAnchorElement.cpp:
2639 (WebCore::HTMLAnchorElement::draggable): Use equalLettersIgnoringASCIICase.
2640 * html/HTMLAreaElement.cpp:
2641 (WebCore::HTMLAreaElement::parseAttribute): Ditto.
2642 * html/HTMLBRElement.cpp:
2643 (WebCore::HTMLBRElement::collectStyleForPresentationAttribute): Ditto.
2644 * html/HTMLBodyElement.cpp:
2645 (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Ditto.
2646 * html/HTMLButtonElement.cpp:
2647 (WebCore::HTMLButtonElement::parseAttribute): Ditto.
2649 * html/HTMLCanvasElement.cpp:
2650 (WebCore::HTMLCanvasElement::toDataURL): Use ASCIILiteral.
2652 * html/HTMLDivElement.cpp:
2653 (WebCore::HTMLDivElement::collectStyleForPresentationAttribute):
2654 Use equalLettersIgnoringASCIICase.
2656 * html/HTMLDocument.cpp:
2657 (WebCore::HTMLDocument::designMode): Use ASCIILiteral.
2658 (WebCore::HTMLDocument::setDesignMode): Use equalLettersIgnoringASCIICase.
2660 * html/HTMLElement.cpp:
2661 (WebCore::HTMLElement::nodeName): Updated comment.
2662 (WebCore::isLTROrRTLIgnoringCase): Use equalLettersIgnoringASCIICase.
2663 (WebCore::contentEditableType): Ditto.
2664 (WebCore::HTMLElement::collectStyleForPresentationAttribute): Ditto.
2665 (WebCore::toValidDirValue): Ditto.
2666 (WebCore::HTMLElement::insertAdjacent): Ditto.
2667 (WebCore::contextElementForInsertion): Ditto.
2668 (WebCore::HTMLElement::applyAlignmentAttributeToStyle): Ditto.
2669 (WebCore::HTMLElement::setContentEditable): Ditto.
2670 (WebCore::HTMLElement::draggable): Ditto.
2671 (WebCore::HTMLElement::translateAttributeMode): Ditto.
2672 (WebCore::HTMLElement::hasDirectionAuto): Ditto.
2673 (WebCore::HTMLElement::directionality): Ditto.
2674 (WebCore::HTMLElement::dirAttributeChanged): Ditto.
2675 (WebCore::HTMLElement::addHTMLColorToStyle): Ditto.
2676 * html/HTMLEmbedElement.cpp:
2677 (WebCore::HTMLEmbedElement::collectStyleForPresentationAttribute): Ditto.
2678 * html/HTMLFormControlElement.cpp:
2679 (WebCore::HTMLFormControlElement::autocorrect): Ditto.
2680 * html/HTMLFormElement.cpp:
2681 (WebCore::HTMLFormElement::autocorrect): Ditto.
2682 (WebCore::HTMLFormElement::shouldAutocomplete): Ditto.
2683 * html/HTMLFrameElementBase.cpp:
2684 (WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
2686 * html/HTMLFrameSetElement.cpp:
2687 (WebCore::HTMLFrameSetElement::parseAttribute): Use equalLettersIgnoringASCIICase.
2688 Use == when comparing with "0" and "1" since there is no need for case folding.
2690 * html/HTMLHRElement.cpp:
2691 (WebCore::HTMLHRElement::collectStyleForPresentationAttribute):
2692 Use equalLettersIgnoringASCIICase.
2693 * html/HTMLImageElement.cpp:
2694 (WebCore::HTMLImageElement::draggable): Ditto.
2695 * html/HTMLInputElement.cpp:
2696 (WebCore::HTMLInputElement::parseAttribute): Ditto.
2697 * html/HTMLKeygenElement.cpp:
2698 (WebCore::HTMLKeygenElement::appendFormData): Ditto.
2699 * html/HTMLMarqueeElement.cpp:
2700 (WebCore::HTMLMarqueeElement::collectStyleForPresentationAttribute): Ditto.
2701 * html/HTMLMediaElement.cpp:
2702 (WebCore::HTMLMediaElement::parseAttribute): Ditto.
2703 * html/HTMLMetaElement.cpp:
2704 (WebCore::HTMLMetaElement::process): Ditto.
2706 * html/HTMLObjectElement.cpp:
2707 (WebCore::mapDataParamToSrc): Use references, modern for loops, simplify
2708 logic to not use array indices, use ASCIILiteral and equalLettersIgnoringASCIICase.
2709 (WebCore::HTMLObjectElement::parametersForPlugin): Update to call new function.
2710 (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use equalLettersIgnoringASCIICase.
2711 (WebCore::HTMLObjectElement::containsJavaApplet): Ditto.
2712 * html/HTMLParagraphElement.cpp:
2713 (WebCore::HTMLParagraphElement::collectStyleForPresentationAttribute): Ditto.
2714 * html/HTMLParamElement.cpp:
2715 (WebCore::HTMLParamElement::isURLParameter): Ditto.
2716 * html/HTMLTableElement.cpp:
2717 (WebCore::getBordersFromFrameAttributeValue): Ditto.
2718 (WebCore::HTMLTableElement::collectStyleForPresentationAttribute): Ditto.
2719 (WebCore::HTMLTableElement::parseAttribute): Ditto.
2720 * html/HTMLTablePartElement.cpp:
2721 (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute): Ditto.
2722 * html/HTMLTextAreaElement.cpp:
2723 (WebCore::HTMLTextAreaElement::parseAttribute): Ditto.
2724 * html/HTMLTextFormControlElement.cpp:
2725 (WebCore::HTMLTextFormControlElement::setRangeText): Ditto.
2726 (WebCore::HTMLTextFormControlElement::directionForFormData): Ditto.
2727 * html/HTMLVideoElement.cpp:
2728 (WebCore::HTMLVideoElement::parseAttribute): Ditto.
2729 * html/InputType.cpp:
2730 (WebCore::InputType::applyStep): Ditto.
2731 * html/LinkRelAttribute.cpp:
2732 (WebCore::LinkRelAttribute::LinkRelAttribute): Ditto.
2733 * html/MediaElementSession.cpp:
2734 (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled): Ditto.
2735 * html/NumberInputType.cpp:
2736 (WebCore::NumberInputType::sizeShouldIncludeDecoration): Ditto.
2737 * html/RangeInputType.cpp:
2738 (WebCore::RangeInputType::createStepRange): Ditto.
2739 (WebCore::RangeInputType::handleKeydownEvent): Ditto.
2740 * html/StepRange.cpp:
2741 (WebCore::StepRange::parseStep): Ditto.
2742 * html/canvas/CanvasStyle.cpp:
2743 (WebCore::parseColor): Ditto.
2744 * html/parser/HTMLConstructionSite.cpp:
2745 (WebCore::HTMLConstructionSite::setCompatibilityModeFromDoctype): Ditto.
2746 * html/parser/HTMLElementStack.cpp:
2747 (WebCore::HTMLElementStack::isHTMLIntegrationPoint): Ditto.
2748 * html/parser/HTMLMetaCharsetParser.cpp:
2749 (WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes): Ditto.
2750 * html/parser/HTMLPreloadScanner.cpp:
2751 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Ditto.
2752 (WebCore::TokenPreloadScanner::StartTagScanner::crossOriginModeAllowsCookies): Ditto.
2753 * html/parser/HTMLTreeBuilder.cpp:
2754 (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
2755 (WebCore::HTMLTreeBuilder::processStartTagForInTable): Ditto.
2756 * html/parser/XSSAuditor.cpp:
2757 (WebCore::isDangerousHTTPEquiv): Ditto.
2759 * html/track/WebVTTParser.cpp:
2760 (WebCore::WebVTTParser::hasRequiredFileIdentifier): Removed unneeded special case
2763 * inspector/InspectorPageAgent.cpp:
2764 (WebCore::createXHRTextDecoder): Use equalLettersIgnoringASCIICase.
2765 * inspector/NetworkResourcesData.cpp:
2766 (WebCore::createOtherResourceTextDecoder): Ditto.
2767 * loader/CrossOriginAccessControl.cpp:
2768 (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Ditto.
2769 * loader/DocumentLoader.cpp:
2770 (WebCore::DocumentLoader::continueAfterContentPolicy): Ditto.
2771 * loader/FormSubmission.cpp:
2772 (WebCore::appendMailtoPostFormDataToURL): Ditto.
2773 (WebCore::FormSubmission::Attributes::parseEncodingType): Ditto.
2774 (WebCore::FormSubmission::Attributes::parseMethodType): Ditto.
2775 * loader/FrameLoader.cpp:
2776 (WebCore::FrameLoader::shouldPerformFragmentNavigation): Ditto.
2777 (WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument): Ditto.
2778 * loader/ImageLoader.cpp:
2779 (WebCore::ImageLoader::updateFromElement): Ditto.
2780 * loader/MediaResourceLoader.cpp:
2781 (WebCore::MediaResourceLoader::start): Ditto.
2782 * loader/SubframeLoader.cpp:
2783 (WebCore::SubframeLoader::createJavaAppletWidget): Ditto.
2784 * loader/TextResourceDecoder.cpp:
2785 (WebCore::TextResourceDecoder::determineContentType): Ditto.
2786 * loader/TextTrackLoader.cpp:
2787 (WebCore::TextTrackLoader::load): Ditto.
2788 * loader/appcache/ApplicationCache.cpp:
2789 (WebCore::ApplicationCache::requestIsHTTPOrHTTPSGet): Ditto.
2790 * loader/cache/CachedCSSStyleSheet.cpp:
2791 (WebCore::CachedCSSStyleSheet::canUseSheet): Ditto.
2792 * loader/cache/CachedResource.cpp:
2793 (WebCore::shouldCacheSchemeIndefinitely): Ditto.
2794 * page/DOMSelection.cpp:
2795 (WebCore::DOMSelection::modify): Ditto.
2796 * page/EventSource.cpp:
2797 (WebCore::EventSource::didReceiveResponse): Ditto.
2798 * page/FrameView.cpp:
2799 (WebCore::FrameView::scrollToAnchor): Ditto.
2800 * page/Performance.cpp:
2801 (WebCore::Performance::webkitGetEntriesByType): Ditto.
2802 * page/PerformanceResourceTiming.cpp:
2803 (WebCore::passesTimingAllowCheck): Ditto.
2805 * page/SecurityOrigin.cpp:
2806 (WebCore::SecurityOrigin::SecurityOrigin): Use emptyString.
2807 (WebCore::SecurityOrigin::toString): Use ASCIILiteral.
2808 (WebCore::SecurityOrigin::databaseIdentifier): Ditto.
2810 * page/UserContentURLPattern.cpp:
2811 (WebCore::UserContentURLPattern::parse): Use equalLettersIgnoringASCIICase.
2812 (WebCore::UserContentURLPattern::matches): Ditto.
2814 (WebCore::URL::protocolIs): Ditto.
2816 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2817 (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType):
2818 Changed to use early exit and equalLettersIgnoringASCIICase. Added comment
2819 about inconsistency with next function.
2820 (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Added comment
2821 about inconsistency with previous function.
2823 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2824 (WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
2825 Use equalLettersIgnoringASCIICase.
2826 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2827 (WebCore::CDMSessionAVStreamSession::generateKeyRequest): Ditto.
2828 * platform/graphics/cg/ImageBufferCG.cpp:
2829 (WebCore::utiFromMIMEType): Ditto.
2831 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2832 (WebCore::FontCache::similarFont): Changed to not use so many global
2833 variables and use equalLettersIgnoringASCIICase.
2834 * platform/graphics/ios/FontCacheIOS.mm:
2835 (WebCore::platformFontWithFamilySpecialCase): Ditto.
2837 * platform/graphics/mac/FontCustomPlatformData.cpp:
2838 (WebCore::FontCustomPlatformData::supportsFormat): Use equalLettersIgnoringASCIICase.
2839 * platform/mac/PasteboardMac.mm:
2840 (WebCore::Pasteboard::readString): Ditto.
2841 * platform/network/BlobResourceHandle.cpp:
2842 (WebCore::BlobResourceHandle::createAsync): Ditto.
2843 (WebCore::BlobResourceHandle::loadResourceSynchronously): Ditto.
2844 * platform/network/CacheValidation.cpp:
2845 (WebCore::parseCacheControlDirectives): Ditto.
2846 * platform/network/FormData.h:
2847 (WebCore::FormData::parseEncodingType): Ditto.
2848 * platform/network/HTTPParsers.cpp:
2849 (WebCore::contentDispositionType): Ditto.
2850 (WebCore::parseXFrameOptionsHeader): Ditto.
2852 * platform/network/ResourceResponseBase.cpp:
2853 (WebCore::ResourceResponseBase::isHTTP): Use protocolIsInHTTPFamily, which is
2854 both clearer and more efficient.
2855 (WebCore::ResourceResponseBase::isAttachment): Rewrite to be a bit more terse
2856 and use equalLettersIgnoringASCIICase.
2858 * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
2859 (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
2860 Use equalLettersIgnoringASCIICase.
2861 * platform/network/mac/ResourceHandleMac.mm:
2862 (WebCore::ResourceHandle::willSendRequest): Ditto.
2863 * platform/sql/SQLiteDatabase.cpp:
2864 (WebCore::SQLiteDatabase::open): Ditto.
2865 * platform/sql/SQLiteStatement.cpp:
2866 (WebCore::SQLiteStatement::isColumnDeclaredAsBlob): Ditto.
2868 * platform/text/TextEncodingRegistry.cpp:
2869 (WebCore::defaultTextEncodingNameForSystemLanguage): Use ASCIILiteral
2870 and equalLettersIgnoringASCIICase.
2872 * rendering/mathml/RenderMathMLFraction.cpp:
2873 (WebCore::RenderMathMLFraction::updateFromElement): Use equalLettersIgnoringASCIICase.
2874 * svg/SVGToOTFFontConversion.cpp:
2875 (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically): Ditto.
2876 (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Ditto.
2877 * testing/InternalSettings.cpp:
2878 (WebCore::InternalSettings::setEditingBehavior): Ditto.
2879 (WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
2880 (WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
2881 * testing/Internals.cpp:
2882 (WebCore::markerTypeFrom): Ditto.
2883 (WebCore::markerTypesFrom): Ditto.
2884 (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
2885 (WebCore::Internals::setCaptionDisplayMode): Ditto.
2886 (WebCore::Internals::beginMediaSessionInterruption): Ditto.
2887 (WebCore::Internals::endMediaSessionInterruption): Ditto.
2888 (WebCore::Internals::setMediaSessionRestrictions): Ditto.
2889 (WebCore::Internals::setMediaElementRestrictions): Ditto.
2890 (WebCore::Internals::postRemoteControlCommand): Ditto.
2891 (WebCore::Internals::setAudioContextRestrictions): Ditto.
2892 (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
2893 * testing/MockCDM.cpp:
2894 (WebCore::MockCDM::supportsKeySystem): Ditto.
2895 (WebCore::MockCDM::supportsKeySystemAndMimeType): Ditto.
2896 (WebCore::MockCDM::supportsMIMEType): Ditto.
2897 * xml/XMLHttpRequest.cpp:
2898 (WebCore::isSetCookieHeader): Ditto.
2899 (WebCore::XMLHttpRequest::responseXML): Ditto.
2900 (WebCore::XMLHttpRequest::isAllowedHTTPMethod): Ditto.
2901 (WebCore::XMLHttpRequest::didReceiveData): Ditto.
2903 2016-01-22 Youenn Fablet <youenn.fablet@crf.canon.fr>
2905 Remove PassRefPtr from ResourceRequest and FormData
2906 https://bugs.webkit.org/show_bug.cgi?id=153229
2908 Reviewed by Chris Dumez.
2910 Covered by existing tests.
2912 Making ResourceRequest::setHTTPBody take a RefPtr<FormData>&&.
2913 Moving FormData from PassRefPtr to RefPtr.
2915 * html/parser/XSSAuditorDelegate.cpp:
2916 (WebCore::XSSAuditorDelegate::didBlockScript):
2917 * loader/FormSubmission.cpp:
2918 (WebCore::FormSubmission::populateFrameLoadRequest):
2919 * loader/FrameLoader.cpp:
2920 (WebCore::FrameLoader::loadPostRequest):
2921 (WebCore::FrameLoader::loadDifferentDocumentItem):
2922 * loader/PingLoader.cpp:
2923 (WebCore::PingLoader::sendViolationReport):
2924 * loader/PingLoader.h:
2925 * page/ContentSecurityPolicy.cpp:
2926 (WebCore::ContentSecurityPolicy::reportViolation):
2927 * platform/network/FormData.cpp:
2928 (WebCore::FormData::create):
2929 (WebCore::FormData::createMultiPart):
2930 (WebCore::FormData::copy):
2931 (WebCore::FormData::deepCopy):
2932 (WebCore::FormData::resolveBlobReferences):
2933 * platform/network/FormData.h:
2934 (WebCore::FormData::decode):
2935 * platform/network/ResourceRequestBase.cpp:
2936 (WebCore::ResourceRequestBase::adopt):
2937 (WebCore::ResourceRequestBase::setHTTPBody):
2938 * platform/network/ResourceRequestBase.h:
2939 (WebCore::ResourceRequestBase::setHTTPBody):
2940 * platform/network/cf/FormDataStreamCFNet.cpp:
2941 (WebCore::setHTTPBody):
2942 * platform/network/cf/FormDataStreamCFNet.h:
2943 * platform/network/cf/ResourceRequestCFNet.cpp:
2944 (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2945 (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
2946 * platform/network/cocoa/ResourceRequestCocoa.mm:
2947 (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
2948 * platform/network/curl/ResourceHandleManager.cpp:
2949 (WebCore::getFormElementsCount):
2950 * platform/network/mac/FormDataStreamMac.h:
2951 * platform/network/mac/FormDataStreamMac.mm:
2952 (WebCore::setHTTPBody):
2953 * platform/network/soup/ResourceHandleSoup.cpp:
2954 (WebCore::doRedirect):
2955 * xml/XMLHttpRequest.cpp:
2956 (WebCore::XMLHttpRequest::createRequest):
2958 2016-01-22 Csaba Osztrogonác <ossy@webkit.org>
2960 Fix the !ENABLE(INDEXED_DATABASE) build after r195443
2961 https://bugs.webkit.org/show_bug.cgi?id=153350
2963 Unreviewed buildfix.
2966 (WebCore::Page::setSessionID):
2968 2016-01-22 ChangSeok Oh <changseok.oh@collabora.com>
2970 [GTK] Remove a focus ring on anchor node when focused by mouse.
2971 https://bugs.webkit.org/show_bug.cgi?id=136121
2973 Reviewed by Michael Catanzaro.
2975 Safari, Chrome and FF don't show a focus ring, the dotted rectangle on anchor node
2976 for mouse clicking. I think the behavior is reasonable and looks better.
2977 No reason for gtk & efl ports to keep the focus on anchor node. Of course, this change should not
2978 affect the focus ring for tab navigation.
2980 No new tests since an existing test can cover this.
2981 Tests: fast/events/click-focus-anchor.html
2983 * html/HTMLAnchorElement.cpp:
2984 (WebCore::HTMLAnchorElement::isMouseFocusable):
2986 2016-01-21 Simon Fraser <simon.fraser@apple.com>
2988 REGRESSION (r168244): Content in horizontal-bt page is offset such that only the end is viewable and there is a white gap at the top
2989 https://bugs.webkit.org/show_bug.cgi?id=136019
2991 Reviewed by Dan Bernstein.
2993 In horizontal-bt documents (where the page starts scrolled to the bottom, and scrolling up goes into negative scroll positions),
2994 the position of the root content layer would be set incorrectly by the scrolling thread, resulting in misplaced
2997 Fix by having the renamed "yPositionForRootContentLayer" take scroll origin into
2998 account, and being more consistent about using scrollOrigin to position this layer.
3000 Test: fast/scrolling/programmatic-horizontal-bt-document-scroll.html
3002 * page/FrameView.cpp:
3003 (WebCore::FrameView::yPositionForFooterLayer): Moved
3004 (WebCore::FrameView::positionForRootContentLayer): Take scrollOrigin, and subtract it from the computed value.
3005 (WebCore::FrameView::yPositionForRootContentLayer): Renamed.
3007 * page/scrolling/AsyncScrollingCoordinator.cpp:
3008 (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): We've already pushed the new scrollPosition onto the FrameView,
3009 so we can just use the member function to compute the positionForContentsLayer.
3010 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3011 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition): This is the bug fix; FrameView::positionForRootContentLayer()
3012 now takes scrollOrigin into account.
3013 * rendering/RenderLayerCompositor.cpp:
3014 (WebCore::RenderLayerCompositor::updateRootLayerPosition): Rather than using the documentRect, position the root content layer
3015 in terms of the scroll origin (which is -documentRect.location()).
3017 2016-01-21 Brady Eidson <beidson@apple.com>
3019 Modern IDB: Support populating/extracting database metadata with SQLite backend.
3020 Nhttps://bugs.webkit.org/show_bug.cgi?id=153318
3022 Reviewed by Alex Christensen.
3024 No new tests (Covered by current tests).
3027 * WebCore.xcodeproj/project.pbxproj:
3029 * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3030 (WebCore::IDBClient::IDBDatabase::willAbortTransaction): Committing transactions can abort if the commit
3033 * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3034 (WebCore::IDBClient::IDBTransaction::didCommit): Before a committing transaction is aborted, notify the
3035 IDBDatabase that it aborted.
3037 Copied over from WK2:
3038 * Modules/indexeddb/server/IDBSerialization.cpp: Added.
3039 (WebCore::serializeIDBKeyPath):
3040 (WebCore::deserializeIDBKeyPath):
3041 (WebCore::serializeIDBKeyData):
3042 (WebCore::deserializeIDBKeyData):
3043 * Modules/indexeddb/server/IDBSerialization.h: Added.
3045 * Modules/indexeddb/server/IDBServer.cpp:
3046 (WebCore::IDBServer::IDBServer::createBackingStore): Optionally create a SQLite backing store.
3048 Mostly copied over verbatim from WebKit2's UniqueIDBDatabaseBackingStoreSQLite.cpp:
3049 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3050 (WebCore::IDBServer::idbKeyCollate):
3051 (WebCore::IDBServer::v1RecordsTableSchema):
3052 (WebCore::IDBServer::v1RecordsTableSchemaAlternate):
3053 (WebCore::IDBServer::v2RecordsTableSchema):
3054 (WebCore::IDBServer::v2RecordsTableSchemaAlternate):
3055 (WebCore::IDBServer::createOrMigrateRecordsTableIfNecessary):
3056 (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidRecordsTable):
3057 (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
3058 (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
3059 (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
3060 (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
3061 (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
3062 (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
3063 (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
3064 (WebCore::IDBServer::SQLiteIDBBackingStore::unregisterCursor):
3065 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
3067 Copied over from WK2:
3068 * Modules/indexeddb/server/SQLiteIDBCursor.cpp: Added.
3069 (WebCore::IDBServer::SQLiteIDBCursor::maybeCreate):
3070 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
3071 (WebCore::IDBServer::buildIndexStatement):
3072 (WebCore::IDBServer::buildObjectStoreStatement):
3073 (WebCore::IDBServer::SQLiteIDBCursor::establishStatement):
3074 (WebCore::IDBServer::SQLiteIDBCursor::createSQLiteStatement):
3075 (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
3076 (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
3077 (WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
3078 (WebCore::IDBServer::SQLiteIDBCursor::advance):
3079 (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
3080 (WebCore::IDBServer::SQLiteIDBCursor::advanceOnce):
3081 (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
3082 (WebCore::IDBServer::SQLiteIDBCursor::iterate):
3083 * Modules/indexeddb/server/SQLiteIDBCursor.h: Added.
3084 (WebCore::IDBServer::SQLiteIDBCursor::identifier):
3085 (WebCore::IDBServer::SQLiteIDBCursor::transaction):
3086 (WebCore::IDBServer::SQLiteIDBCursor::objectStoreID):
3087 (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
3088 (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
3089 (WebCore::IDBServer::SQLiteIDBCursor::currentValueBuffer):
3090 (WebCore::IDBServer::SQLiteIDBCursor::didError):
3092 Copied over from WK2:
3093 * Modules/indexeddb/server/SQLiteIDBTransaction.cpp: Added.
3094 (WebCore::IDBServer::SQLiteIDBTransaction::SQLiteIDBTransaction):
3095 (WebCore::IDBServer::SQLiteIDBTransaction::~SQLiteIDBTransaction):
3096 (WebCore::IDBServer::SQLiteIDBTransaction::begin):
3097 (WebCore::IDBServer::SQLiteIDBTransaction::commit):
3098 (WebCore::IDBServer::SQLiteIDBTransaction::reset):
3099 (WebCore::IDBServer::SQLiteIDBTransaction::rollback):
3100 (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenCursor):
3101 (WebCore::IDBServer::SQLiteIDBTransaction::closeCursor):
3102 (WebCore::IDBServer::SQLiteIDBTransaction::notifyCursorsOfChanges):
3103 (WebCore::IDBServer::SQLiteIDBTransaction::clearCursors):
3104 (WebCore::IDBServer::SQLiteIDBTransaction::inProgress):
3105 * Modules/indexeddb/server/SQLiteIDBTransaction.h: Added.
3106 (WebCore::IDBServer::SQLiteIDBTransaction::transactionIdentifier):
3107 (WebCore::IDBServer::SQLiteIDBTransaction::mode):
3108 (WebCore::IDBServer::SQLiteIDBTransaction::sqliteTransaction):
3111 (WebCore::Page::setSessionID): If the new SessionID is different from the last one,
3112 clear the IDBConnectionToServer.
3113 (WebCore::Page::idbConnection): Always ask the DatabaseProvider; It handles whether or not
3114 the session is ephemeral.
3116 2016-01-21 Alex Christensen <achristensen@webkit.org>
3118 CMake build fix after r195302.
3120 * PlatformMac.cmake:
3122 2016-01-21 Ryosuke Niwa <rniwa@webkit.org>
3124 createElementFromSavedToken shouldn't have the code to create a non-HTML element
3125 https://bugs.webkit.org/show_bug.cgi?id=153327
3127 Reviewed by Chris Dumez.
3129 Since HTMLConstructionSite::createElementFromSavedToken is only used to instantiate a formatting element,
3130 there is no need for it to support creating a non-HTML elements. Remove the branch and assert that this
3133 createElementFromSavedToken is called in HTMLTreeBuilder::callTheAdoptionAgency and HTMLConstructionSite's
3134 reconstructTheActiveFormattingElements. In both cases, the stack item passed to createElementFromSavedToken
3135 is guaranteed to be in the list of active formatting elements, which only contains formatting elements.
3137 No new tests since there is no behavioral change.
3139 * html/parser/HTMLConstructionSite.cpp:
3140 (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3141 (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3142 (WebCore::HTMLConstructionSite::insertFormattingElement):
3143 (WebCore::HTMLConstructionSite::createElement): Returns Ref<Element> instead of PassRefPtr<Element>.
3144 (WebCore::HTMLConstructionSite::createHTMLElement): Ditto.
3145 (WebCore::HTMLConstructionSite::createElementFromSavedToken): Ditto. Removed the code to instantiate
3146 a non-HTML element. Also assert that an element created by this function is a formatting tag.
3147 * html/parser/HTMLConstructionSite.h:
3148 * html/parser/HTMLTreeBuilder.cpp:
3149 (WebCore::HTMLConstructionSite::isFormattingTag): Put into HTMLConstructionSite to add an assertion.
3150 (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3152 2016-01-21 Andreas Kling <akling@apple.com>
3154 CGImageSource sometimes retains temporary SharedBuffer data indefinitely, doubling memory cost.
3155 <https://webkit.org/b/153325>
3157 Reviewed by Anders Carlsson.
3159 After a resource has finished downloading, and has been cached to disk cache,
3160 we mmap() the disk cached version so we can throw out the temporary download buffer.
3162 Due to the way CGImageSource works on Mac/iOS, it's not possible to replace the data
3163 being decoded once the image has been fully decoded once. When doing the replacement,
3164 we'd end up with the SharedBuffer wrapping the mmap() data, and the CGImageSource
3165 keeping the old SharedBuffer::DataBuffer alive, effectively doubling the memory cost.
3167 This patch adds a CachedResource::didReplaceSharedBufferContents() callback that
3168 CachedImage implements to throw out the decoded data. This is currently the only way
3169 to make CGImageSource drop the retain it holds on the SharedBuffer::DataBuffer.
3170 The downside of this approach is that we'll sometimes incur the cost of one additional
3171 image decode after an image downloads and is cached for the first time.
3173 I put a FIXME in there since we could do better with a little help from CGImageSource.
3175 * loader/cache/CachedImage.cpp:
3176 (WebCore::CachedImage::didReplaceSharedBufferContents):
3177 * loader/cache/CachedImage.h:
3178 * loader/cache/CachedResource.cpp:
3179 (WebCore::CachedResource::tryReplaceEncodedData):
3180 * loader/cache/CachedResource.h:
3181 (WebCore::CachedResource::didReplaceSharedBufferContents):
3183 2016-01-21 Beth Dakin <bdakin@apple.com>
3185 Add the ability to update WebKitAdditions to WK2
3186 https://bugs.webkit.org/show_bug.cgi?id=153320
3188 rdar://problem/23639629
3190 Reviewed by Anders Carlsson.
3192 This SPI is un-used now.
3193 * platform/spi/mac/NSSpellCheckerSPI.h:
3195 2016-01-21 Simon Fraser <simon.fraser@apple.com>
3197 GraphicsContext: low quality drawImage and drawImageBuffer should use InterpolationLow
3198 https://bugs.webkit.org/show_bug.cgi?id=49002
3200 Reviewed by Chris Dumez.
3202 When using low quality image scaling for images which are getting painted often,
3203 the code used InterpolationNone, which make the images look even worse than they should.
3205 Not easily testable.
3207 * platform/graphics/GraphicsContext.cpp:
3208 (WebCore::GraphicsContext::drawImage):
3209 (WebCore::GraphicsContext::drawImageBuffer):
3210 (WebCore::GraphicsContext::drawConsumingImageBuffer):
3212 2016-01-19 Ada Chan <adachan@apple.com>
3214 Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms.
3215 https://bugs.webkit.org/show_bug.cgi?id=153218
3217 Reviewed by Eric Carlson.
3219 No new tests. Code refactoring.
3221 * Configurations/FeatureDefines.xcconfig:
3222 * WebCore.xcodeproj/project.pbxproj:
3223 Move WebVideoFullscreenInterface.h from ios to cocoa.
3224 * html/HTMLVideoElement.cpp:
3225 (WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
3226 The declaration of supportsPictureInPicture() has been moved to WebVideoFullscreenInterface.h
3227 so include that header instead. Guard the supportsPictureInPicture() call with PLATFORM(COCOA)
3228 as that method is only defined in Cocoa.
3229 * platform/cocoa/WebVideoFullscreenInterface.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterface.h.
3230 Also move the declaration of supportsPictureInPicture() here.
3231 * platform/graphics/MediaPlayer.cpp:
3232 * platform/graphics/MediaPlayer.h:
3233 * platform/graphics/MediaPlayerPrivate.h:
3234 Implementations of methods related to the video fullscreen layer are now guarded by
3235 PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) instead.
3236 * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3237 Declaration of supportsPictureInPicture() has been moved to WebVideoFullscreenInterface.h
3238 * platform/mac/WebVideoFullscreenInterfaceMac.mm: Added.
3239 (WebCore::supportsPictureInPicture):
3240 Return false for now.
3242 2016-01-21 Said Abou-Hallawa <sabouhallawa@apple.com>
3244 A crash reproducible in Path::isEmpty() under RenderSVGShape::paint()
3245 https://bugs.webkit.org/show_bug.cgi?id=149613
3247 Reviewed by Darin Adler.
3249 When RenderSVGRoot::layout() realizes its layout size has changed and
3250 it has resources which have relative sizes, it marks all the clients of
3251 the resources for invalidates regardless whether they belong to the
3252 same RenderSVGRoot or not. But it reruns the layout only for its children.
3253 If one of these clients comes before the current RenderSVGRoot in the render
3254 tree, ee end up having renderer marked for invalidation at rendering time.
3255 This also prevents scheduling the layout if the same renderer is marked
3256 for another invalidation later. We prevent this because we do not want
3257 to schedule another layout for a renderer which is already marked for
3258 invalidation. This can cause crash if the renderer is an RenderSVGPath.
3260 The fix is to mark "only" the clients of a resource which belong to the
3261 same RenderSVGRoot of the resource. Also we need to run the layout for
3262 all the resources which belong to different RenderSVGRoots before running
3263 the layout for an SVG renderer.
3265 Tests: svg/custom/filter-update-different-root.html
3266 svg/custom/pattern-update-different-root.html
3268 * rendering/svg/RenderSVGResourceContainer.cpp:
3269 (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
3270 We should not mark any client outside the current root for invalidation
3272 * rendering/svg/RenderSVGResourceContainer.h: Remove unneeded private keyword.
3274 * rendering/svg/RenderSVGRoot.cpp:
3275 (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
3276 Code clean up; use findTreeRootObject() instead of repeating the same code.
3278 * rendering/svg/RenderSVGShape.cpp:
3279 (WebCore::RenderSVGShape::isEmpty): Avoid crashing if RenderSVGShape::isEmpty()
3280 is called before calling RenderSVGShape::layout().
3282 * rendering/svg/RenderSVGText.cpp:
3283 (WebCore::RenderSVGText::layout): findTreeRootObject() now returns a pointer.
3285 * rendering/svg/SVGRenderSupport.cpp:
3286 (WebCore::SVGRenderSupport::findTreeRootObject): I do think nothing
3287 guarantees that an SVG renderer has to have an RenderSVGRoot in its
3288 ancestors. So change this function to return a pointer. Also Provide
3289 the non-const version of this function.
3291 (WebCore::SVGRenderSupport::layoutDifferentRootIfNeeded): Runs the layout
3292 if needed for all the resources which belong to different RenderSVGRoots.
3294 (WebCore::SVGRenderSupport::layoutChildren): Make sure all the renderer's
3295 resources which belong to different RenderSVGRoots are laid out before
3296 running the layout for this renderer.
3298 * rendering/svg/SVGRenderSupport.h: Remove a mysterious comment.
3300 * rendering/svg/SVGResources.cpp:
3301 (WebCore::SVGResources::layoutDifferentRootIfNeeded): Run the layout for
3302 all the resources which belong to different RenderSVGRoots outside the
3303 context of their RenderSVGRoots.
3305 * rendering/svg/SVGResources.h:
3306 (WebCore::SVGResources::clipper):
3307 (WebCore::SVGResources::markerStart):
3308 (WebCore::SVGResources::markerMid):
3309 (WebCore::SVGResources::markerEnd):
3310 (WebCore::SVGResources::masker):
3311 (WebCore::SVGResources::filter):
3312 (WebCore::SVGResources::fill):
3313 (WebCore::SVGResources::stroke):
3314 Code clean up; use nullptr instead of 0.
3316 2016-01-21 Jer Noble <jer.noble@apple.com>
3318 [EME] Correctly report errors when generating key requests from AVContentKeySession.
3319 https://bugs.webkit.org/show_bug.cgi?id=151963
3321 Reviewed by Eric Carlson.
3323 WebIDL's "unsigned long" is a 32-bit unsigned integer, and C++'s "unsigned long" is (or, can
3324 be) a 64-bit integer on 64-bit platforms. Casting a negative integer to a 64-bit integer
3325 results in a number which cannot be accurately stored in a double-length floating point
3326 number. Previously, the mac CDM code would work around this issue by returning the absolute
3327 value of NSError code returned by media frameworks. Instead, fix the underlying problem by
3328 storing the MediaKeyError's systemCode as a uint32_t (which more accurately represents the
3329 size of a WebIDL "unsigned long" on all platforms.)
3331 Check the error code issued by -contentKeyRequestDataForApp:contentIdentifier:options:error:.
3333 * Modules/encryptedmedia/CDM.h:
3334 * Modules/encryptedmedia/CDMSessionClearKey.cpp:
3335 (WebCore::CDMSessionClearKey::generateKeyRequest):
3336 (WebCore::CDMSessionClearKey::update):
3337 * Modules/encryptedmedia/CDMSessionClearKey.h:
3338 * Modules/encryptedmedia/MediaKeySession.cpp:
3339 (WebCore::MediaKeySession::keyRequestTimerFired):
3340 (WebCore::MediaKeySession::addKeyTimerFired):
3341 (WebCore::MediaKeySession::sendError):
3342 * Modules/encryptedmedia/MediaKeySession.h:
3343 * Modules/mediacontrols/mediaControlsApple.js:
3344 (Controller.prototype.handleReadyStateChange):
3345 * WebCore.xcodeproj/project.pbxproj:
3346 * html/MediaKeyError.h:
3347 (WebCore::MediaKeyError::create):
3348 (WebCore::MediaKeyError::systemCode):
3349 * html/MediaKeyEvent.h:
3350 * platform/graphics/CDMSession.h:
3351 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
3352 (WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
3353 (WebCore::CDMSessionAVFoundationCF::update):
3354 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
3355 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
3356 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3357 (WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
3358 (WebCore::CDMSessionAVContentKeySession::update):
3359 (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
3360 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
3361 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
3362 (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
3363 (WebCore::CDMSessionAVFoundationObjC::update):
3364 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
3365 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3366 (WebCore::CDMSessionAVStreamSession::generateKeyRequest):
3367 (WebCore::CDMSessionAVStreamSession::update):
3368 (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
3369 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3370 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3371 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
3372 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
3373 (WebCore::CDMSessionMediaSourceAVFObjC::systemCodeForError): Deleted.
3374 * testing/MockCDM.cpp:
3375 (WebCore::MockCDMSession::generateKeyRequest):
3376 (WebCore::MockCDMSession::update):2016-01-15 Simon Fraser <simon.fraser@apple.com>
3378 2016-01-21 Carlos Garcia Campos <cgarcia@igalia.com>
3380 [SOUP] GResource resources should be cached indefinitely in memory cache
3381 https://bugs.webkit.org/show_bug.cgi?id=153275
3383 Reviewed by Žan Doberšek.
3385 GResources can't change so they will always return the same data,
3386 we never need to revalidate them.
3388 * loader/cache/CachedResource.cpp:
3389 (WebCore::shouldCacheSchemeIndefinitely):
3391 2016-01-21 Nan Wang <n_wang@apple.com>
3393 AX: [IOS] Implement next/previous text marker functions using TextIterator
3394 https://bugs.webkit.org/show_bug.cgi?id=153292
3395 <rdar://problem/24268243>
3397 Reviewed by Chris Fleizach.
3399 Added support for the refactored next/previous text marker functions on iOS. And
3400 made text marker tests working on iOS.
3401 Also, fixed an issue in AXObjectCache where creating a range with a replaced node
3402 at the start or end might exclude that node.
3404 Tests: accessibility/text-marker/text-marker-previous-next.html
3405 accessibility/text-marker/text-marker-with-user-select-none.html
3407 * accessibility/AXObjectCache.cpp:
3408 (WebCore::characterOffsetsInOrder):
3409 (WebCore::resetNodeAndOffsetForReplacedNode):
3410 (WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets):
3411 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3412 (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
3413 (+[WebAccessibilityTextMarker textMarkerWithCharacterOffset:cache:]):
3414 (+[WebAccessibilityTextMarker startOrEndTextMarkerForRange:isStart:cache:]):
3415 (-[WebAccessibilityTextMarker dataRepresentation]):
3416 (-[WebAccessibilityTextMarker visiblePosition]):
3417 (-[WebAccessibilityTextMarker characterOffset]):
3418 (-[WebAccessibilityTextMarker isIgnored]):
3419 (-[WebAccessibilityTextMarker accessibilityObject]):
3420 (-[WebAccessibilityTextMarker description]):
3421 (-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
3423 (-[WebAccessibilityObjectWrapper textMarkerRange]):
3424 (-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
3425 (-[WebAccessibilityObjectWrapper nextMarkerForMarker:]):
3426 (-[WebAccessibilityObjectWrapper previousMarkerForMarker:]):
3427 (-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
3428 (-[WebAccessibilityObjectWrapper nextMarkerForCharacterOffset:]):
3429 (-[WebAccessibilityObjectWrapper previousMarkerForCharacterOffset:]):
3430 (-[WebAccessibilityObjectWrapper rangeForTextMarkers:]):
3431 (-[WebAccessibilityObjectWrapper lengthForTextMarkers:]):
3432 (-[WebAccessibilityObjectWrapper startOrEndTextMarkerForTextMarkers:isStart:]):
3433 (-[WebAccessibilityObjectWrapper textMarkerRangeForMarkers:]):
3434 (-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
3436 2016-01-20 Zalan Bujtas <zalan@apple.com>
3438 http://victordarras.fr/cssgame/ doesn't work in Safari.
3439 https://bugs.webkit.org/show_bug.cgi?id=153285
3440 <rdar://problem/24212369>
3442 Reviewed by Tim Horton.
3444 This patch adds support for hittesting ClipPathOperation::Reference.
3446 Tests: svg/clip-path/hittest-clip-path-reference-miss.html
3448 * rendering/RenderBlock.cpp:
3449 (WebCore::RenderBlock::nodeAtPoint):
3450 * rendering/RenderObject.h:
3451 (WebCore::RenderObject::isSVGResourceClipper):
3452 * rendering/svg/RenderSVGResourceClipper.h:
3455 2016-01-20 David Kilzer <ddkilzer@apple.com>
3457 ResourceHandleCFURLConnectionDelegateWithOperationQueue delegate methods don't NULL-check m_handle->client()
3458 <https://webkit.org/b/152675>
3459 <rdar://problem/24034044>
3461 Reviewed by Brent Fulgham.
3463 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3464 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
3465 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
3466 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
3467 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
3468 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
3469 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
3470 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
3471 - Add NULL check for m_handle->client() as is done in the
3472 WebCoreResourceHandleAsOperationQueueDelegate class in
3473 WebCoreResourceHandleAsOperationQueueDelegate.mm. (The NULL
3474 check for -connection:didReceiveResponse: is currently
3475 missing, but there are crashes there, too, that are covered by
3478 2016-01-20 Said Abou-Hallawa <sabouhallawa@apple.com>
3480 Use TinyLRUCache in caching the CGColorRef in WebCore::cachedCGColor()
3481 https://bugs.webkit.org/show_bug.cgi?id=153279
3483 Reviewed by Dean Jackson.
3485 Reuse the new template TinyLRUCache in caching the CGColor instead of
3486 having the same code repeated twice.
3488 * platform/graphics/cg/ColorCG.cpp:
3489 (WebCore::leakCGColor):
3490 (WebCore::RetainPtr<CGColorRef>>::createValueForKey):
3491 (WebCore::cachedCGColor):
3493 2016-01-20 Timothy Hatcher <timothy@apple.com>
3495 Web Inspector: InspectorCSSAgent does not call disable in willDestroyFrontendAndBackend
3496 https://bugs.webkit.org/show_bug.cgi?id=153289
3497 <rdar://problem/24242600>
3499 Reviewed by Joseph Pecoraro.
3501 * inspector/InspectorCSSAgent.cpp:
3502 (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend): Call disable().
3504 2016-01-20 Said Abou-Hallawa <sabouhallawa@apple.com>
3506 Refactor AtomicStringKeyedMRUCache to be a generic LRU cache
3507 https://bugs.webkit.org/show_bug.cgi?id=153109
3509 Reviewed by Darin Adler.
3511 Replace the template specialization of AtomicStringKeyedMRUCache with
3512 template derived from TinyLRUCachePolicy. Override the functions which
3513 are needed for creating the values and the null value. Also replace the
3514 static function which was returning a NeverDestroyed AtomicStringKeyedMRUCache
3515 with a singleton function 'cache' inside the derived template.
3517 * WebCore.xcodeproj/project.pbxproj:
3518 * platform/text/AtomicStringKeyedMRUCache.h: Removed.
3519 * platform/text/cf/HyphenationCF.cpp:
3520 (WebCore::canHyphenate):
3521 (WebCore::lastHyphenLocation):
3522 (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForNullKey): Deleted.
3523 (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForKey): Deleted.
3524 (WebCore::cfLocaleCache): Deleted.
3525 * platform/text/hyphen/HyphenationLibHyphen.cpp:
3526 (WebCore::countLeadingSpaces):
3527 (WebCore::lastHyphenLocation):
3528 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): Deleted.
3529 (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Deleted.
3530 (WebCore::hyphenDictionaryCache): Deleted.
3532 2016-01-20 Chris Dumez <cdumez@apple.com>
3534 Drop support for obsolete Node.isSupported()
3535 https://bugs.webkit.org/show_bug.cgi?id=153164
3537 Reviewed by Darin Adler.
3539 Drop support for obsolete Node.isSupported(). Chrome and Firefox already
3542 No new tests, already covered by existing test.
3545 (WebCore::Node::isSupportedForBindings):
3549 2016-01-20 Carlos Garcia Campos <cgarcia@igalia.com>
3551 Unreviewed. Fix compile warning when building with GTK+ < 3.14.
3553 * rendering/RenderThemeGtk.cpp:
3554 (WebCore::loadThemedIcon):
3556 2016-01-20 Csaba Osztrogonác <ossy@webkit.org>
3558 [Mac] Speculative cmake buildfix after r195317.
3560 * PlatformMac.cmake:
3562 2016-01-19 Chris Dumez <cdumez@apple.com>
3564 DocumentType.publicId / systemId should never return null
3565 https://bugs.webkit.org/show_bug.cgi?id=153264
3567 Reviewed by Ryosuke Niwa.
3569 DocumentType.publicId / systemId should never return null as these
3570 attributes are not nullable in the IDL:
3571 https://dom.spec.whatwg.org/#interface-documenttype
3573 Instead we should return the empty string. Firefox and Chrome match the
3576 No new tests, already covered by existing tests.
3578 * dom/DocumentType.idl:
3580 2016-01-19 Commit Queue <commit-queue@webkit.org>
3582 Unreviewed, rolling out r195302.
3583 https://bugs.webkit.org/show_bug.cgi?id=153267
3585 This change broke the Windows build, rolling out so it isn't
3586 broken all night before investigation. (Requested by
3587 ryanhaddad on #webkit).
3591 "[EME] Correctly report errors when generating key requests
3592 from AVContentKeySession."
3593 https://bugs.webkit.org/show_bug.cgi?id=151963
3594 http://trac.webkit.org/changeset/195302
3596 2016-01-19 Chris Dumez <cdumez@apple.com>
3598 DOMImplementation.createDocument() should treat undefined namespace as null
3599 https://bugs.webkit.org/show_bug.cgi?id=153252
3601 Reviewed by Ryosuke Niwa.
3603 DOMImplementation.createDocument() should treat undefined namespace as null as
3604 the DOMString parameter is nullable:
3605 https://dom.spec.whatwg.org/#domimplementation
3607 Firefox behaves according to the specification, Chrome does not.
3609 No new tests, already covered by existing test.
3611 * dom/DOMImplementation.idl:
3613 2016-01-19 Enrica Casucci <enrica@apple.com>
3615 Add support for DataDetectors in WK (iOS).
3616 https://bugs.webkit.org/show_bug.cgi?id=152989
3617 rdar://problem/22855960
3619 Reviewed by Tim Horton.
3621 This is the first step toward implementing Data Detectors support
3622 in WK2. The patch adds a new memeber to the Settings object
3623 to retrieve the type of detection desired. The DataDetection files
3624 have been moved under cocoa, since they are no longer OS X specific.
3626 * Configurations/FeatureDefines.xcconfig:
3627 * Configurations/WebCore.xcconfig:
3628 * WebCore.xcodeproj/project.pbxproj:
3629 * editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h.
3630 * editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm.
3631 (WebCore::detectItemAtPositionWithRange):
3632 (WebCore::DataDetection::detectItemAroundHitTestResult):
3633 (WebCore::DataDetection::detectContentInRange):
3634 * editing/mac/DataDetection.h: Removed.
3635 * editing/mac/DataDetection.mm: Removed.
3636 * loader/FrameLoader.cpp:
3637 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3640 * platform/spi/mac/DataDetectorsSPI.h:
3642 2016-01-19 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
3644 SVG 2 requires a mechanism for restricting enum values exposed through the DOM
3645 https://bugs.webkit.org/show_bug.cgi?id=152814
3647 Reviewed by Darin Adler.
3649 No new tests (No change in functionality, blocked bugs add new tests).
3651 This patch adds a mechanism to restrict the values returned through the
3652 SVGAnimatedEnumeration interface.
3653 This is required for SVG 2, which does not expose new enumeration
3654 values through the IDL.
3655 See http://www.w3.org/TR/SVG2/types.html#InterfaceSVGAnimatedEnumeration
3657 SVG 2 does not add numeric type values for new options, new options
3658 should return UNKNOWN.
3659 E.g. See the table defining numeric type values for orient at
3660 http://www.w3.org/TR/SVG2/painting.html#InterfaceSVGMarkerElement
3662 On setting baseVal, the following steps are run:
3664 2. If value is 0 or is not the numeric type value for any value of the reflected attribute, then set the reflected attribute to the empty string.
3666 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
3667 Override baseVal() and animVal() to perform range checks against
3668 the highest exposed enum value.
3669 * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
3670 (WebCore::SVGAnimatedStaticPropertyTearOff::baseVal): Mark function as virtual as it's over-ridden for enumerations.
3671 (WebCore::SVGAnimatedStaticPropertyTearOff::animVal): Mark function as virtual as it's over-ridden for enumerations.
3672 * svg/properties/SVGPropertyTraits.h:
3673 Add SVGIDLEnumLimits struct that contains function for querying the
3674 highest exposed enum value.
3675 (WebCore::SVGIDLEnumLimits::highestExposedEnumValue): New function that returns the highest enum value that should
3676 be exposed through the DOM. This function should be specialized for enum types that need to restrict the exposed
3679 2016-01-19 Konstantin Tokarev <annulen@yandex.ru>
3681 Fixed compilation of AXObjectCache in case of !HAVE(ACCESSIBILITY).
3682 https://bugs.webkit.org/show_bug.cgi?id=153243
3684 Reviewed by Chris Fleizach.
3686 No new tests needed.
3688 * accessibility/AXObjectCache.h:
3689 (WebCore::AXObjectCache::AXObjectCache):
3690 (WebCore::nodeHasRole): Deleted.
3692 2016-01-19 Antti Koivisto <antti@apple.com>
3694 Use references in SelectorChecker
3695 https://bugs.webkit.org/show_bug.cgi?id=153240
3697 Reviewed by Andreas Kling.
3699 Element and selector can't be null in most places.
3701 * css/ElementRuleCollector.cpp:
3702 (WebCore::ElementRuleCollector::collectMatchingRules):
3703 * css/SelectorChecker.cpp:
3704 (WebCore::attributeValueMatches):
3705 (WebCore::anyAttributeMatches):
3706 (WebCore::SelectorChecker::checkOne):
3707 (WebCore::SelectorChecker::matchSelectorList):
3708 (WebCore::SelectorChecker::checkScrollbarPseudoClass):
3709 (WebCore::SelectorChecker::determineLinkMatchType):
3710 (WebCore::isFrameFocused):
3711 (WebCore::SelectorChecker::matchesFocusPseudoClass):
3712 * css/SelectorChecker.h:
3713 (WebCore::SelectorChecker::isCommonPseudoClassSelector):
3714 (WebCore::SelectorChecker::checkExactAttribute): Deleted.
3715 * css/SelectorCheckerTestFunctions.h:
3716 (WebCore::isAutofilled):
3717 (WebCore::isDefaultButtonForForm):
3718 (WebCore::isDisabled):
3719 (WebCore::isEnabled):
3720 (WebCore::isMediaDocument):
3721 (WebCore::isChecked):
3722 (WebCore::isInRange):
3723 (WebCore::isOutOfRange):
3724 (WebCore::isInvalid):
3725 (WebCore::isOptionalFormControl):
3726 (WebCore::isRequiredFormControl):
3728 (WebCore::isWindowInactive):
3729 (WebCore::containslanguageSubtagMatchingRange):
3730 (WebCore::matchesLangPseudoClass):
3731 (WebCore::matchesReadOnlyPseudoClass):
3732 (WebCore::matchesReadWritePseudoClass):
3733 (WebCore::shouldAppearIndeterminate):
3734 (WebCore::scrollbarMatchesEnabledPseudoClass):
3735 (WebCore::scrollbarMatchesCornerPresentPseudoClass):
3736 (WebCore::matchesFullScreenPseudoClass):
3737 (WebCore::matchesFullScreenAnimatingFullScreenTransitionPseudoClass):
3738 (WebCore::matchesFullScreenAncestorPseudoClass):
3739 (WebCore::matchesFullScreenDocumentPseudoClass):
3740 (WebCore::matchesFutureCuePseudoClass):
3741 (WebCore::matchesPastCuePseudoClass):
3743 2016-01-19 Chris Dumez <cdumez@apple.com>
3745 Unreviewed, rolling out r195179.
3747 It relies on r195141 which was rolled out
3751 "Allocate style sheet media queries in BumpArena."
3752 https://bugs.webkit.org/show_bug.cgi?id=153188
3753 http://trac.webkit.org/changeset/195179
3755 2016-01-19 Chris Dumez <cdumez@apple.com>
3757 Unreviewed, rolling out r195173.
3759 It relies on r195141 which was rolled out
3763 "Give RuleSet a BumpArena and start using it for
3765 https://bugs.webkit.org/show_bug.cgi?id=153169
3766 http://trac.webkit.org/changeset/195173
3768 2016-01-19 Commit Queue <commit-queue@webkit.org>
3770 Unreviewed, rolling out r195300.
3771 https://bugs.webkit.org/show_bug.cgi?id=153244
3773 enrica wants more time to fix Windows (Requested by thorton on
3778 "Add support for DataDetectors in WK (iOS)."
3779 https://bugs.webkit.org/show_bug.cgi?id=152989
3780 http://trac.webkit.org/changeset/195300
3782 2016-01-19 Zalan Bujtas <zalan@apple.com>
3784 outline-offset does not work for inlines.
3785 https://bugs.webkit.org/show_bug.cgi?id=153238
3787 Reviewed by Simon Fraser.
3789 Adjust outline box width/height with outline-offset.
3791 Test: fast/inline/inlines-with-outline-offset.html
3793 * rendering/RenderInline.cpp:
3794 (WebCore::RenderInline::paintOutline):
3795 (WebCore::RenderInline::paintOutlineForLine):
3797 2016-01-19 Chris Dumez <cdumez@apple.com>
3799 Unreviewed, rolling out r195141.
3801 Seems to cause crashes on iOS9 64bit
3805 "Fragmentation-free allocator for timeless and/or coupled
3807 https://bugs.webkit.org/show_bug.cgi?id=152696
3808 http://trac.webkit.org/changeset/195141
3810 2015-12-07 Jer Noble <jer.noble@apple.com>
3812 [EME] Correctly report errors when generating key requests from AVContentKeySession.
3813 https://bugs.webkit.org/show_bug.cgi?id=151963
3815 Reviewed by Eric Carlson.
3817 WebIDL's "unsigned long" is a 32-bit unsigned integer, and C++'s "unsigned long" is (or, can
3818 be) a 64-bit integer on 64-bit platforms. Casting a negative integer to a 64-bit integer
3819 results in a number which cannot be accurately stored in a double-length floating point
3820 number. Previously, the mac CDM code would work around this issue by returning the absolute
3821 value of NSError code returned by media frameworks. Instead, fix the underlying problem by
3822 storing the MediaKeyError's systemCode as a uint32_t (which more accurately represents the
3823 size of a WebIDL "unsigned long" on all platforms.)
3825 Check the error code issued by -contentKeyRequestDataForApp:contentIdentifier:options:error:.
3827 * Modules/encryptedmedia/CDM.h:
3828 * Modules/encryptedmedia/CDMSessionClearKey.cpp:
3829 (WebCore::CDMSessionClearKey::generateKeyRequest):
3830 (WebCore::CDMSessionClearKey::update):
3831 * Modules/encryptedmedia/CDMSessionClearKey.h:
3832 * Modules/encryptedmedia/MediaKeySession.cpp:
3833 (WebCore::MediaKeySession::keyRequestTimerFired):
3834 (WebCore::MediaKeySession::addKeyTimerFired):
3835 (WebCore::MediaKeySession::sendError):
3836 * Modules/encryptedmedia/MediaKeySession.h:
3837 * Modules/mediacontrols/mediaControlsApple.js:
3838 (Controller.prototype.handleReadyStateChange):
3839 * WebCore.xcodeproj/project.pbxproj:
3840 * html/MediaKeyError.h:
3841 (WebCore::MediaKeyError::create):
3842 (WebCore::MediaKeyError::systemCode):
3843 * html/MediaKeyEvent.h:
3844 * platform/graphics/CDMSession.h:
3845 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
3846 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3847 (WebCore::CDMSessionAVContentKeySession::generateKeyRequest):
3848 (WebCore::CDMSessionAVContentKeySession::update):
3849 (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
3850 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
3851 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
3852 (WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
3853 (WebCore::CDMSessionAVFoundationObjC::update):
3854 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
3855 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3856 (WebCore::CDMSessionAVStreamSession::generateKeyRequest):
3857 (WebCore::CDMSessionAVStreamSession::update):
3858 (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
3859 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3860 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3861 (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
3862 (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
3863 (WebCore::CDMSessionMediaSourceAVFObjC::systemCodeForError): Deleted.
3864 * testing/MockCDM.cpp:
3865 (WebCore::MockCDMSession::generateKeyRequest):
3866 (WebCore::MockCDMSession::update):2016-01-15 Simon Fraser <simon.fraser@apple.com>
3868 2016-01-19 Enrica Casucci <enrica@apple.com>
3870 Add support for DataDetectors in WK (iOS).
3871 https://bugs.webkit.org/show_bug.cgi?id=152989
3872 rdar://problem/22855960
3874 Reviewed by Tim Horton.
3876 This is the first step toward implementing Data Detectors support
3877 in WK2. The patch adds a new memeber to the Settings object
3878 to retrieve the type of detection desired. The DataDetection files
3879 have been moved under cocoa, since they are no longer OS X specific.
3881 * Configurations/FeatureDefines.xcconfig:
3882 * Configurations/WebCore.xcconfig:
3883 * WebCore.xcodeproj/project.pbxproj:
3884 * editing/cocoa/DataDetection.h: Copied from Source/WebCore/editing/mac/DataDetection.h.
3885 * editing/cocoa/DataDetection.mm: Copied from Source/WebCore/editing/mac/DataDetection.mm.
3886 (WebCore::detectItemAtPositionWithRange):
3887 (WebCore::DataDetection::detectItemAroundHitTestResult):
3888 (WebCore::DataDetection::detectContentInRange):
3889 * editing/mac/DataDetection.h: Removed.
3890 * editing/mac/DataDetection.mm: Removed.
3891 * loader/FrameLoader.cpp:
3892 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3895 * platform/spi/mac/DataDetectorsSPI.h:
3897 2016-01-19 Chris Dumez <cdumez@apple.com>
3899 Unreviewed, fix typo in comment added in r195157.
3901 * dom/DocumentType.h:
3903 2016-01-18 Antti Koivisto <antti@apple.com>
3905 Selector checker should not mutate document and style
3906 https://bugs.webkit.org/show_bug.cgi?id=153205
3908 Reviewed by Darin Adler.
3910 Selector checker currently writes affected-by bits and similar directly to the document and style during selector
3911 matching. This is confusing, complicated and wrong.
3913 This patch changes SelectorChecker and SelectorCompiler to collect style relatationship metadata to a separate
3914 data structure (currently part of SelectorChecker::CheckingContext) instead of changing the document and style
3915 directly. The mutations are performed later outside selector checker.
3917 * css/ElementRuleCollector.cpp:
3918 (WebCore::ElementRuleCollector::ruleMatches):
3919 (WebCore::ElementRuleCollector::commitStyleRelations):
3921 Apply the relationship bit to elements and style.
3923 (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3924 * css/ElementRuleCollector.h:
3925 * css/SelectorChecker.cpp:
3926 (WebCore::SelectorChecker::LocalContext::LocalContext):
3928 LocalContext is now a separate data structure.
3930 (WebCore::addStyleRelation):
3932 Helper for recording new style relations. This is used where code mutated elements or style directly before.
3934 (WebCore::isFirstChildElement):
3935 (WebCore::isLastChildElement):
3936 (WebCore::isFirstOfType):
3937 (WebCore::isLastOfType):
3938 (WebCore::countElementsBefore):
3939 (WebCore::countElementsOfTypeBefore):
3940 (WebCore::SelectorChecker::SelectorChecker):
3941 (WebCore::SelectorChecker::match):
3942 (WebCore::hasScrollbarPseudoElement):
3943 (WebCore::localContextForParent):
3944 (WebCore::SelectorChecker::matchRecursively):
3945 (WebCore::attributeValueMatches):
3946 (WebCore::anyAttributeMatches):
3947 (WebCore::canMatchHoverOrActiveInQuirksMode):
3948 (WebCore::tagMatches):
3949 (WebCore::SelectorChecker::checkOne):
3950 (WebCore::SelectorChecker::matchSelectorList):
3951 (WebCore::SelectorChecker::checkScrollbarPseudoClass):
3952 (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus): Deleted.
3953 (WebCore::checkingContextForParent): Deleted.
3954 * css/SelectorChecker.h:
3955 (WebCore::SelectorChecker::CheckingContext::CheckingContext):
3956 * css/SelectorCheckerTestFunctions.h:
3957 (WebCore::isEnabled):
3958 (WebCore::isMediaDocument):
3959 (WebCore::isChecked):
3960 (WebCore::isInRange):
3961 (WebCore::isOutOfRange):
3962 * css/StyleResolver.h:
3963 (WebCore::checkRegionSelector):
3964 * cssjit/SelectorCompiler.cpp:
3965 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
3966 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
3968 Helpers for generating code for recording new style relations. This is used where code mutated elements or style directly before.
3970 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
3971 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
3972 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
3973 (WebCore::SelectorCompiler::addStyleRelationElementFunction):
3974 (WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNoPreviousAdjacentElement):
3975 (WebCore::SelectorCompiler::SelectorCodeGenerator::moduloIsZero):
3976 (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
3977 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3978 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
3979 (WebCore::SelectorCompiler::elementIsActive):
3980 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
3981 (WebCore::SelectorCompiler::jumpIfElementIsNotEmpty):
3982 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsEmpty):
3983 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
3984 (WebCore::SelectorCompiler::elementIsHovered):
3985 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
3986 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
3987 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
3988 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
3989 (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
3990 (WebCore::SelectorCompiler::isPlaceholderShown):
3991 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
3992 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLink):
3993 (WebCore::SelectorCompiler::nthFilterIsAlwaysSatisified):
3994 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
3995 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
3996 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
3997 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
3998 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
3999 (WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext): Deleted.
4000 (WebCore::SelectorCompiler::setNodeFlag): Deleted.
4001 (WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle): Deleted.
4002 (WebCore::SelectorCompiler::setFirstChildState): Deleted.
4003 (WebCore::SelectorCompiler::elementIsActiveForStyleResolution): Deleted.
4004 (WebCore::SelectorCompiler::setElementStyleIsAffectedByEmpty): Deleted.
4005 (WebCore::SelectorCompiler::setElementStyleFromContextIsAffectedByEmptyAndUpdateRenderStyleIfNecessary): Deleted.
4006 (WebCore::SelectorCompiler::elementIsHoveredForStyleResolution): Deleted.
4007 (WebCore::SelectorCompiler::setLastChildState): Deleted.
4008 (WebCore::SelectorCompiler::setOnlyChildState): Deleted.
4009 (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown): Deleted.
4010 (WebCore::SelectorCompiler::setElementChildIndex): Deleted.
4011 (WebCore::SelectorCompiler::setChildrenAffectedByBackwardPositionalRules): Deleted.
4012 (WebCore::SelectorCompiler::setParentAffectedByLastChildOf): Deleted.
4013 * dom/SelectorQuery.cpp:
4014 (WebCore::SelectorDataList::selectorMatches):
4015 (WebCore::SelectorDataList::selectorClosest):
4016 (WebCore::SelectorDataList::matches):
4017 * inspector/InspectorCSSAgent.cpp:
4018 (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
4019 * inspector/InspectorStyleSheet.cpp:
4020 (WebCore::buildObjectForSelectorHelper):
4022 2016-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
4024 Unreviewed. Fix GTK+ build with GTK+ < 3.14.
4026 Flags GTK_ICON_LOOKUP_DIR_LTR and GTK_ICON_LOOKUP_DIR_RTL were