1 2015-03-17 Philippe Normand <pnormand@igalia.com>
3 [GTK] basic OpenWebRTC build support
4 https://bugs.webkit.org/show_bug.cgi?id=142393
6 Reviewed by Carlos Garcia Campos.
8 * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
10 2015-03-17 Joseph Pecoraro <pecoraro@apple.com>
12 Remove never used "useLayerOnTop" bindings generator argument
13 https://bugs.webkit.org/show_bug.cgi?id=142773
15 Reviewed by Darin Adler.
17 * bindings/scripts/CodeGenerator.pm:
18 * bindings/scripts/CodeGeneratorJS.pm:
19 * bindings/scripts/CodeGeneratorObjC.pm:
20 * bindings/scripts/generate-bindings.pl:
22 2015-03-16 Ryosuke Niwa <rniwa@webkit.org>
24 Enable ES6 classes by default
25 https://bugs.webkit.org/show_bug.cgi?id=142774
27 Reviewed by Gavin Barraclough.
29 * Configurations/FeatureDefines.xcconfig:
31 2015-03-16 Simon Fraser <simon.fraser@apple.com>
33 Update the debug overlays after layout
34 https://bugs.webkit.org/show_bug.cgi?id=142768
36 Reviewed by Zalan Bujtas.
38 The debug overlays need to be updated after layout, in case elements with wheel event handlers
41 DebugPageOverlays::didLayout() is cheap if there are no overlays.
43 Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
44 to the main frame's event handler region.
46 * page/DebugPageOverlays.cpp:
47 (WebCore::DebugPageOverlays::regionChanged):
48 * page/DebugPageOverlays.h:
49 (WebCore::DebugPageOverlays::didLayout):
50 (WebCore::DebugPageOverlays::didChangeEventHandlers):
52 (WebCore::FrameView::layout):
54 2015-03-16 Jon Lee <jonlee@apple.com>
56 Unreviewed fix for crash after r181608.
58 * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
60 2015-03-16 Simon Fraser <simon.fraser@apple.com>
62 Generalize the Document code that maintains a set of nodes with event handlers
63 https://bugs.webkit.org/show_bug.cgi?id=142762
65 Reviewed by Zalan Bujtas, Darin Adler.
67 Document.h defines a TouchEventTargetSet type, which will in future be used for
68 other event types too (wheel events), so rename it to EventTargetSet.
70 Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
74 (WebCore::Document::prepareForDestruction): References
75 (WebCore::Document::didAddTouchEventHandler): Ditto.
76 (WebCore::Document::didRemoveEventTargetNode): Ditto.
78 (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
80 * html/HTMLInputElement.cpp:
81 (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
82 (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
84 (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
86 2015-03-16 Joseph Pecoraro <pecoraro@apple.com>
88 Web Inspector: Object Previews in Indexed DB tables
89 https://bugs.webkit.org/show_bug.cgi?id=140813
91 Reviewed by Timothy Hatcher.
93 * inspector/InspectorIndexedDBAgent.cpp:
94 Include previews with object store objects.
96 2015-03-16 Jer Noble <jer.noble@apple.com>
98 [Mac] Update missing image UI
99 https://bugs.webkit.org/show_bug.cgi?id=142592
101 Reviewed by Darin Adler.
103 Update the broken image glyphs with new art (including a 3x image).
105 Test: fast/hidpi/broken-image-icon-very-hidpi.html
107 * Resources/missingImage.png:
108 * Resources/missingImage@2x.png:
109 * Resources/missingImage@3x.png: Added.
110 * WebCore.xcodeproj/project.pbxproj:
111 * loader/cache/CachedImage.cpp:
112 (WebCore::CachedImage::brokenImage):
114 2015-03-16 Dean Jackson <dino@apple.com>
116 Parsing and Style Resolution of Container-based Animation Triggers
117 https://bugs.webkit.org/show_bug.cgi?id=142687
118 <rdar://problem/20170007>
120 Reviewed by Simon Fraser.
122 Take 2 after the previous patch was rolled out.
124 This is the beginning of a prototype implementation of
125 CSS Animation Triggers, as described by
126 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
128 In this patch we parse and resolve the value of a new
129 CSS property "-webkit-animation-trigger". At the moment it
130 only accepts one function value "container-scroll", which
131 will trigger the animation at an absolute position within
132 an element's scrolling container. We expect the syntax to
133 change in the near future, as the spec is written.
135 Tests: animations/trigger-computed-style.html
136 animations/trigger-parsing.html
138 * WebCore.xcodeproj/project.pbxproj: Add the new files.
140 * css/CSSAnimationTriggerScrollValue.cpp: Added.
141 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
142 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
143 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
144 scroll trigger. This name may change in the future to better represent the
145 type of trigger, but it is good enough for now.
146 (WebCore::CSSAnimationTriggerScrollValue::create):
147 (WebCore::CSSAnimationTriggerScrollValue::startValue):
148 (WebCore::CSSAnimationTriggerScrollValue::endValue):
149 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
151 * css/CSSComputedStyleDeclaration.cpp:
152 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
153 (WebCore::getAnimationTriggerValue): Gets the current computed style.
154 (WebCore::ComputedStyleExtractor::propertyValue):
157 (WebCore::CSSParser::parseValue):
158 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
159 and record the value as a CSSAnimationTriggerScrollValue.
160 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
163 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
165 * css/CSSToStyleMap.cpp:
166 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
168 * css/CSSToStyleMap.h:
170 * css/CSSValue.cpp: Handle the new CSSValue type.
171 (WebCore::CSSValue::equals):
172 (WebCore::CSSValue::cssText):
173 (WebCore::CSSValue::destroy):
175 (WebCore::CSSValue::isAnimationTriggerScrollValue):
177 * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
178 and use them in the operator==.
179 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
180 (WebCore::Animation::isTriggerSet):
181 (WebCore::Animation::isEmpty):
183 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
184 "auto" and the scrolling trigger.
185 (WebCore::AnimationTrigger::~AnimationTrigger):
186 (WebCore::AnimationTrigger::type):
187 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
188 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
189 (WebCore::AnimationTrigger::AnimationTrigger):
190 (WebCore::AutoAnimationTrigger::create):
191 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
192 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
193 (WebCore::ScrollAnimationTrigger::create):
194 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
195 (WebCore::ScrollAnimationTrigger::startValue):
196 (WebCore::ScrollAnimationTrigger::setStartValue):
197 (WebCore::ScrollAnimationTrigger::endValue):
198 (WebCore::ScrollAnimationTrigger::setEndValue):
199 (WebCore::ScrollAnimationTrigger::hasEndValue):
200 (WebCore::ScrollAnimationTrigger::setHasEndValue):
201 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
203 2015-03-16 Alex Christensen <achristensen@webkit.org>
205 Progress towards CMake on Mac
206 https://bugs.webkit.org/show_bug.cgi?id=142747
208 Reviewed by Chris Dumez.
212 Added more directories, interfaces, and forwarding headers.
213 Temporarily disabled the generating of ObjC bindings in CMake builds.
214 * platform/mac/PasteboardMac.mm:
215 Removed unused include.
217 2015-03-16 Joanmarie Diggs <jdiggs@igalia.com>
219 AX: Crash viewing http://www.last.fm/
220 https://bugs.webkit.org/show_bug.cgi?id=142309
222 Reviewed by Chris Fleizach.
224 The crash occurs when a not-yet-rendered object emits a children-changed
225 signal. If an assistive technology is listening, AT-SPI2 will attempt to
226 create and cache the state set for the child being added and the creation
227 of the state set assumes a rendered object.
229 Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
231 * accessibility/atk/AXObjectCacheAtk.cpp:
232 (WebCore::AXObjectCache::attachWrapper):
234 2015-03-16 Commit Queue <commit-queue@webkit.org>
236 Unreviewed, rolling out r181492.
237 https://bugs.webkit.org/show_bug.cgi?id=142756
239 May have regressed PLT (Requested by anttik on #webkit).
243 "Cache glyph widths to GlyphPages"
244 https://bugs.webkit.org/show_bug.cgi?id=142028
245 http://trac.webkit.org/changeset/181492
247 2015-03-16 Roger Fong <roger_fong@apple.com>
249 [WebGL2] Instancing draw calls.
250 https://bugs.webkit.org/show_bug.cgi?id=126939.
251 <rdar://problem/15002379>
253 Reviewed by Dean Jackson.
255 Tested by a modified version of the 1.0.3 conformance tests:
256 conformance/extensions/angle-instanced-arrays.html
257 conformance/extensions/angle-instanced-arrays-out-of-bounds.html
259 These tests will be landed along with other modified extension conformance tests
260 once approval from Khronos is received.
262 * html/canvas/WebGL2RenderingContext.cpp:
263 (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
264 (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
265 (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
266 (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
267 (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
268 (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
269 * html/canvas/WebGL2RenderingContext.h:
270 * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
271 * html/canvas/WebGLRenderingContext.cpp:
272 (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
273 (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
274 * html/canvas/WebGLRenderingContext.h:
275 * html/canvas/WebGLRenderingContextBase.cpp:
276 (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
277 (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
278 (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
279 * html/canvas/WebGLRenderingContextBase.h:
281 2015-03-16 Commit Queue <commit-queue@webkit.org>
283 Unreviewed, rolling out r181572.
284 https://bugs.webkit.org/show_bug.cgi?id=142755
286 Caused weird test failures in transitions and animations
287 (Requested by dino on #webkit).
291 "Parsing and Style Resolution of Container-based Animation
293 https://bugs.webkit.org/show_bug.cgi?id=142687
294 http://trac.webkit.org/changeset/181572
296 2015-03-16 Yoav Weiss <yoav@yoav.ws>
298 Remove setCachedImage from HTMLImageElement since it is not used
299 https://bugs.webkit.org/show_bug.cgi?id=142740
301 Reviewed by Chris Dumez.
303 No new tests since this patch is just removing dead code.
305 HTMLImageElement::setCachedImage is not being called by anyone.
306 This patch removes it, since it's dead code.
308 * html/HTMLImageElement.h:
309 (WebCore::HTMLImageElement::setCachedImage): Deleted.
311 2015-03-16 Brent Fulgham <bfulgham@apple.com>
313 WebKit1 Clients Are Not Reliably Repainted
314 https://bugs.webkit.org/show_bug.cgi?id=142750
315 <rdar://problem/20042453>
317 Reviewed by Simon Fraser.
319 * page/FrameView.cpp:
320 (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
321 the early return so we can see when this happening in debug builds.
323 (WebCore::FrameView::inPaintableState): Added.
325 2015-03-16 Chris Dumez <cdumez@apple.com>
327 Make DatabaseContext suspendable if there is no pending database activity
328 https://bugs.webkit.org/show_bug.cgi?id=142716
329 <rdar://problem/19923085>
331 Reviewed by Andreas Kling.
333 Make DatabaseContext suspendable if there is no pending database
335 - No pending Database creation JS callback
336 - No pending transaction(s)
338 Suspending is safe in this case because we are not going to interrupt
339 any database activity, nor fire any JS event.
341 This greatly increases the likelihood of pages using websql to enter
344 Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
345 fast/history/page-cache-webdatabase-pending-transaction.html
347 * Modules/webdatabase/Database.cpp:
348 (WebCore::Database::hasPendingTransaction):
349 * Modules/webdatabase/Database.h:
350 * Modules/webdatabase/DatabaseContext.cpp:
351 (WebCore::DatabaseContext::canSuspend):
352 * Modules/webdatabase/DatabaseManager.cpp:
353 (WebCore::DatabaseManager::openDatabase):
354 * Modules/webdatabase/DatabaseThread.cpp:
355 (WebCore::DatabaseThread::hasPendingDatabaseActivity):
356 * Modules/webdatabase/DatabaseThread.h:
358 2015-03-16 Brady Eidson <beidson@apple.com>
360 Addressing additional review feedback after http://trac.webkit.org/changeset/181565
361 https://bugs.webkit.org/show_bug.cgi?id=142733
363 Reviewed by Darin Adler.
365 * loader/icon/IconController.cpp:
366 (WebCore::IconController::startLoader): Null check page()
368 2015-03-16 Roger Fong <roger_fong@apple.com>
370 [Win] Unreviewed build fix attempt after r181571.
372 * WebCore.vcxproj/WebCore.vcxproj:
374 2015-03-16 Roger Fong <roger_fong@apple.com>
376 [WebGL2] Multiple Render Targets.
377 https://bugs.webkit.org/show_bug.cgi?id=126994.
378 <rdar://problem/15815766>
380 Reviewed by Dean Jackson.
382 Tested by a modified version of the 1.0.3 conformance test:
383 conformance/extensions/webgl-draw-buffers.html
384 This test will be landed along with other modified extension conformance tests
385 once approval from Khronos is received.
387 * html/canvas/WebGL2RenderingContext.cpp:
388 (WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
389 Returns different error messages, uses non EXT enums.
390 (WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
391 (WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
392 (WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
393 (WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
394 (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
395 (WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
396 (WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
397 (WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
398 * html/canvas/WebGL2RenderingContext.h:
399 * html/canvas/WebGLFramebuffer.cpp:
400 (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
401 * html/canvas/WebGLRenderingContext.cpp:
402 (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
403 (WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
404 (WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
405 * html/canvas/WebGLRenderingContext.h:
406 * html/canvas/WebGLRenderingContextBase.cpp:
407 (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
408 * html/canvas/WebGLRenderingContextBase.h:
410 2015-03-16 Dean Jackson <dino@apple.com>
412 Parsing and Style Resolution of Container-based Animation Triggers
413 https://bugs.webkit.org/show_bug.cgi?id=142687
414 <rdar://problem/20170007>
416 Reviewed by Simon Fraser.
418 This is the beginning of a prototype implementation of
419 CSS Animation Triggers, as described by
420 https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
422 In this patch we parse and resolve the value of a new
423 CSS property "-webkit-animation-trigger". At the moment it
424 only accepts one function value "container-scroll", which
425 will trigger the animation at an absolute position within
426 an element's scrolling container. We expect the syntax to
427 change in the near future, as the spec is written.
429 Tests: animations/trigger-computed-style.html
430 animations/trigger-parsing.html
432 * WebCore.xcodeproj/project.pbxproj: Add the new files.
434 * css/CSSAnimationTriggerScrollValue.cpp: Added.
435 (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
436 (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
437 * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
438 scroll trigger. This name may change in the future to better represent the
439 type of trigger, but it is good enough for now.
440 (WebCore::CSSAnimationTriggerScrollValue::create):
441 (WebCore::CSSAnimationTriggerScrollValue::startValue):
442 (WebCore::CSSAnimationTriggerScrollValue::endValue):
443 (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
445 * css/CSSComputedStyleDeclaration.cpp:
446 (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
447 (WebCore::getAnimationTriggerValue): Gets the current computed style.
448 (WebCore::ComputedStyleExtractor::propertyValue):
451 (WebCore::CSSParser::parseValue):
452 (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
453 and record the value as a CSSAnimationTriggerScrollValue.
454 (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
457 * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
459 * css/CSSToStyleMap.cpp:
460 (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
462 * css/CSSToStyleMap.h:
464 * css/CSSValue.cpp: Handle the new CSSValue type.
465 (WebCore::CSSValue::equals):
466 (WebCore::CSSValue::cssText):
467 (WebCore::CSSValue::destroy):
469 (WebCore::CSSValue::isAnimationTriggerScrollValue):
471 * platform/animation/Animation.h: Add AnimationTrigger as a new field.
472 (WebCore::Animation::isTriggerSet):
473 (WebCore::Animation::isEmpty):
475 * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
476 "auto" and the scrolling trigger.
477 (WebCore::AnimationTrigger::~AnimationTrigger):
478 (WebCore::AnimationTrigger::type):
479 (WebCore::AnimationTrigger::isAutoAnimationTrigger):
480 (WebCore::AnimationTrigger::isScrollAnimationTrigger):
481 (WebCore::AnimationTrigger::AnimationTrigger):
482 (WebCore::AutoAnimationTrigger::create):
483 (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
484 (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
485 (WebCore::ScrollAnimationTrigger::create):
486 (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
487 (WebCore::ScrollAnimationTrigger::startValue):
488 (WebCore::ScrollAnimationTrigger::setStartValue):
489 (WebCore::ScrollAnimationTrigger::endValue):
490 (WebCore::ScrollAnimationTrigger::setEndValue):
491 (WebCore::ScrollAnimationTrigger::hasEndValue):
492 (WebCore::ScrollAnimationTrigger::setHasEndValue):
493 (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
495 2015-03-15 Roger Fong <roger_fong@apple.com>
497 [WebGL2] Vertex Array Objects.
498 https://bugs.webkit.org/show_bug.cgi?id=126944.
499 <rdar://problem/15002455>
501 Reviewed by Dean Jackson.
503 Tested by a modified version of the 1.0.3 conformance test:
504 conformance/extensions/oes-vertex-array-object.html
505 This test will be landed along with other modified extension conformance tests
506 once approval from Khronos is received.
508 * html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
509 (WebCore::OESVertexArrayObject::deleteVertexArrayOES):
510 (WebCore::OESVertexArrayObject::bindVertexArrayOES):
511 * html/canvas/WebGLRenderingContext.cpp:
512 (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
513 (WebCore::WebGLRenderingContext::getParameter):
514 * html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
515 (WebCore::WebGL2RenderingContext::createVertexArray):
516 (WebCore::WebGL2RenderingContext::deleteVertexArray):
517 (WebCore::WebGL2RenderingContext::isVertexArray):
518 (WebCore::WebGL2RenderingContext::bindVertexArray):
519 (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
520 (WebCore::WebGL2RenderingContext::getParameter):
522 Duplicate extension object vertex array object extension methods in GraphicsContext3D.
523 Implementation may change after we upgrade to newer GL headers and profile.
524 * platform/graphics/GraphicsContext3D.h:
525 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
526 (WebCore::GraphicsContext3D::createVertexArray):
527 (WebCore::GraphicsContext3D::deleteVertexArray):
528 (WebCore::GraphicsContext3D::isVertexArray):
529 (WebCore::GraphicsContext3D::bindVertexArray):
531 Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
533 * WebCore.xcodeproj/project.pbxproj:
534 * html/canvas/WebGLVertexArrayObject.cpp:
535 (WebCore::WebGLVertexArrayObject::create):
536 (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
537 (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
538 * html/canvas/WebGLVertexArrayObject.h:
539 * html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
540 (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
541 (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
542 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
543 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
544 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
545 * html/canvas/WebGLVertexArrayObjectBase.h: Added.
546 (WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
547 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
548 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
549 (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
550 (WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
551 (WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
552 (WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
553 (WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
554 (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
555 * html/canvas/WebGLVertexArrayObjectOES.cpp:
556 (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
557 (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
558 (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
559 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
560 (WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
561 (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
562 * html/canvas/WebGLVertexArrayObjectOES.h:
564 * html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
565 (WebCore::WebGLRenderingContextBase::initializeNewContext):
566 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
567 (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
568 (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
569 (WebCore::WebGLRenderingContextBase::getVertexAttrib):
570 (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
571 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
572 (WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
573 * html/canvas/WebGLRenderingContextBase.h:
574 (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
576 Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
577 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
579 * html/canvas/WebGLGetInfo.cpp:
580 (WebCore::WebGLGetInfo::WebGLGetInfo):
581 (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
582 (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
583 * html/canvas/WebGLGetInfo.h:
585 2015-03-16 Brent Fulgham <bfulgham@apple.com>
587 Potentially uninitialized Inspector values
588 https://bugs.webkit.org/show_bug.cgi?id=142730
590 Reviewed by Joseph Pecoraro.
592 * inspector/InspectorDOMAgent.cpp:
593 (WebCore::parseColor): Make sure color values are given an initial value.
595 2015-03-16 Brady Eidson <beidson@apple.com>
597 URLs visited during private browsing show up in WebpageIcons.db
598 rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733
600 Patch by Sam Weinig. Reviewed by Brady Eidson.
602 * loader/icon/IconController.cpp:
603 (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
604 (WebCore::IconController::continueLoadWithDecision): Instead of here.
606 2015-03-16 Conrad Shultz <conrad_shultz@apple.com>
608 Allow clients to selectively disable plug-ins
609 https://bugs.webkit.org/show_bug.cgi?id=142506
611 Reviewed by Anders Carlsson.
613 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
614 from the page). As part of this:
616 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
619 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
622 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
623 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
625 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
627 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
628 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
630 * dom/DOMImplementation.cpp:
631 (WebCore::DOMImplementation::createDocument):
632 Update to reflect function rename.
634 * loader/SubframeLoader.cpp:
635 (WebCore::findPluginMIMETypeFromURL):
636 Adopt getWebVisibleMimesAndPluginIndices().
637 (WebCore::logPluginRequest):
638 Update to reflect function rename.
639 (WebCore::SubframeLoader::shouldUsePlugin):
642 * platform/PlatformStrategies.h:
643 Export platformStrategies(), since it is now used in WebProcess.cpp.
645 * plugins/DOMMimeType.cpp:
646 (WebCore::DOMMimeType::type):
647 (WebCore::DOMMimeType::description):
648 (WebCore::DOMMimeType::mimeClassInfo):
649 Adopt getWebVisibleMimesAndPluginIndices().
650 (WebCore::DOMMimeType::enabledPlugin):
653 * plugins/DOMMimeType.h:
654 Don't return references in a few places where it is no longer safe to do so.
655 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
657 * plugins/DOMMimeTypeArray.cpp:
658 (WebCore::DOMMimeTypeArray::length):
659 Adopt getWebVisibleMimesAndPluginIndices().
660 (WebCore::DOMMimeTypeArray::item):
662 (WebCore::DOMMimeTypeArray::canGetItemsForName):
664 (WebCore::DOMMimeTypeArray::namedItem):
667 * plugins/DOMPlugin.cpp:
668 (WebCore::DOMPlugin::pluginInfo):
669 Adopt getWebVisiblePlugins().
670 (WebCore::DOMPlugin::item):
671 Adopt getWebVisibleMimesAndPluginIndices().
672 (WebCore::DOMPlugin::canGetItemsForName):
674 (WebCore::DOMPlugin::namedItem):
677 * plugins/DOMPlugin.h:
678 (WebCore::DOMPlugin::pluginInfo): Deleted.
680 * plugins/DOMPluginArray.cpp:
681 (WebCore::DOMPluginArray::length):
682 Adopt getWebVisiblePlugins().
683 (WebCore::DOMPluginArray::item):
685 (WebCore::DOMPluginArray::canGetItemsForName):
687 (WebCore::DOMPluginArray::namedItem):
690 * plugins/PluginData.cpp:
691 (WebCore::PluginData::PluginData):
692 Stash the passed-in Page and call initPlugins().
693 (WebCore::PluginData::getWebVisiblePlugins):
694 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
695 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
696 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
697 limited to the web-visible plug-ins.
698 (WebCore::PluginData::supportsWebVisibleMimeType):
699 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
700 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
701 Renamed from pluginInfoForMimeType(); ditto.
702 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
703 Renamed from pluginNameForMimeType(); ditto.
704 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
705 Renamed from pluginFileForMimeType(); ditto.
706 (WebCore::PluginData::initPlugins):
707 (WebCore::PluginData::supportsMimeType): Deleted.
708 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
709 (WebCore::PluginData::pluginNameForMimeType): Deleted.
710 (WebCore::PluginData::pluginFileForMimeType): Deleted.
712 * plugins/PluginData.h:
713 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
714 new members to PluginInfo for the clientLoadPolicy and bundle information.
715 (WebCore::PluginData::PluginData):
716 Replace some member functions with new ones that will hide plug-ins upon request from the client;
717 (WebCore::PluginData::mimes): Deleted.
718 (WebCore::PluginData::mimePluginIndices): Deleted.
720 * plugins/PluginStrategy.h:
721 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
723 * replay/SerializationMethods.cpp:
724 (JSC::EncodingTraits<PluginData>::encodeValue):
725 Remove now-obsolete code for handling MIME types and add a FIXME.
726 (JSC::DeserializedPluginData::DeserializedPluginData):
727 (JSC::EncodingTraits<PluginData>::decodeValue):
729 (JSC::EncodingTraits<PluginInfo>::encodeValue):
730 Handle the new members in PluginInfo.
731 (JSC::EncodingTraits<PluginInfo>::decodeValue):
734 * replay/WebInputs.json:
735 Teach Replay about PluginLoadClientPolicy.
737 2015-03-16 Max Stepin <maxstepin@gmail.com>
740 https://bugs.webkit.org/show_bug.cgi?id=17022
742 Reviewed by Carlos Garcia Campos.
744 Test: fast/images/animated-png.html
746 * platform/image-decoders/ImageDecoder.h:
747 (WebCore::ImageFrame::divide255):
748 (WebCore::ImageFrame::overRGBA):
749 * platform/image-decoders/png/PNGImageDecoder.cpp:
750 (WebCore::frameHeader):
751 (WebCore::readChunks):
752 (WebCore::PNGImageReader::PNGImageReader):
753 (WebCore::PNGImageDecoder::PNGImageDecoder):
754 (WebCore::PNGImageDecoder::frameBufferAtIndex):
755 (WebCore::PNGImageDecoder::headerAvailable):
756 (WebCore::PNGImageDecoder::rowAvailable):
757 (WebCore::PNGImageDecoder::pngComplete):
758 (WebCore::PNGImageDecoder::readChunks):
759 (WebCore::PNGImageDecoder::frameHeader):
760 (WebCore::PNGImageDecoder::init):
761 (WebCore::PNGImageDecoder::clearFrameBufferCache):
762 (WebCore::PNGImageDecoder::initFrameBuffer):
763 (WebCore::PNGImageDecoder::frameComplete):
764 (WebCore::PNGImageDecoder::processingStart):
765 (WebCore::PNGImageDecoder::processingFinish):
766 (WebCore::PNGImageDecoder::fallbackNotAnimated):
767 * platform/image-decoders/png/PNGImageDecoder.h:
768 (WebCore::PNGImageDecoder::frameCount):
769 (WebCore::PNGImageDecoder::repetitionCount):
770 (WebCore::PNGImageDecoder::isComplete):
772 2015-03-15 Benjamin Poulain <benjamin@webkit.org>
774 CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
775 https://bugs.webkit.org/show_bug.cgi?id=142715
777 Reviewed by Brent Fulgham.
779 Fix attribute matching with:
784 Tests: fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html
785 fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html
786 fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html
788 * css/SelectorChecker.cpp:
789 (WebCore::attributeValueMatches):
790 I forgot to change CSSSelector::Exact in my last patch.
791 The tests could not catch that since we use the CSS JIT almost everywhere.
793 * cssjit/SelectorCompiler.cpp:
794 (WebCore::SelectorCompiler::attributeValueBeginsWith):
795 (WebCore::SelectorCompiler::attributeValueEndsWith):
796 (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
798 2015-03-15 Dan Bernstein <mitz@apple.com>
800 Fixed the iOS build after r181522.
802 * page/FrameView.cpp:
803 (WebCore::FrameView::performPostLayoutTasks):
805 2015-03-15 Andy Estes <aestes@apple.com>
807 [Content Filtering] Adopt new NEFilterSource SPI
808 https://bugs.webkit.org/show_bug.cgi?id=142710
809 rdar://problem/19023855
811 Reviewed by Dan Bernstein.
813 Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.
815 * platform/ContentFilter.cpp:
816 (WebCore::ContentFilter::types): Renamed HAVE(NE_FILTER_SOURCE) to HAVE(NETWORK_EXTENSION).
817 * platform/cocoa/NetworkExtensionContentFilter.h: Renamed member variables to remove redundancy, forward-declared NEFilterSourceStatus,
818 added a dispatch_semaphore member variable to avoid creating and destroying multiple semaphores, and made m_originalData a SharedBuffer.
819 * platform/cocoa/NetworkExtensionContentFilter.mm:
820 (decisionInfoReplacementData): Returned the replacement data from a decision handler info dictionary.
821 (WebCore::createNEFilterSource): Created either an old-style or new-style NEFilterSource object.
822 (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Called receivedResponse:decisionHandler: when using the new SPI.
823 (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Released the dispatch_semaphore.
824 (WebCore::NetworkExtensionContentFilter::addData): Appended the copied NSData to m_originalData, avoiding an additional copy previously
825 being made by NSMutableData. Used the new receivedData:decisionHandler: SPI when appropriate.
826 (WebCore::NetworkExtensionContentFilter::finishedAddingData): Used the new finishedLoadingWithDecisionHandler: SPI when appropriate.
827 (WebCore::NetworkExtensionContentFilter::needsMoreData): Changed m_neFilterSourceStatus to m_status.
828 (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
829 (WebCore::NetworkExtensionContentFilter::getReplacementData): Returned the replacement data from NEFilterSource if the load was blocked.
830 Otherwise, returned the original data.
831 (WebCore::NetworkExtensionContentFilter::handleDecision): Added a helper to set m_status and m_replacementData, and to signal m_semaphore.
832 * platform/spi/cocoa/NEFilterSourceSPI.h: Declared the new NEFilterSource SPI on platforms that support it.
834 2015-03-15 Brent Fulgham <bfulgham@apple.com>
836 Scroll snap points are not supported on iframe content
837 https://bugs.webkit.org/show_bug.cgi?id=142582
838 <rdar://problem/20121319>
840 Tested by css3/scroll-snap/scroll-snap-iframe.html
842 Reviewed by Simon Fraser.
844 The scroll snap points were not being applied to the iframe contents because the code
845 that sets up the scroll snap point content is not called for iframes.
847 To correct this, we need to make sure the snap offsets are set during post-frame layout
848 for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.
850 * page/FrameView.cpp:
851 (WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
852 MainFrame. Also notify scroll animators they need to update their snap point settings.
854 2015-03-15 Simon Fraser <simon.fraser@apple.com>
856 Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
857 that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
858 to the more canonical is<RenderBox>() form.
860 Fixes an assertion in animations/animation-on-inline-crash.html
862 * page/animation/ImplicitAnimation.cpp:
863 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
864 * page/animation/KeyframeAnimation.cpp:
865 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
867 2015-03-15 Simon Fraser <simon.fraser@apple.com>
869 And another fix. Thanks to Hunseop Jeong for the fix.
871 * html/HTMLInputElement.cpp:
872 (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
873 (WebCore::HTMLInputElement::didMoveToNewDocument):
875 2015-03-15 Simon Fraser <simon.fraser@apple.com>
877 Fix the touch-event build.
880 (WebCore::Document::didAddTouchEventHandler):
881 (WebCore::Document::didRemoveTouchEventHandler):
883 2015-03-15 Simon Fraser <simon.fraser@apple.com>
885 Reduce the side-effects of animations turning off overlap testing
886 https://bugs.webkit.org/show_bug.cgi?id=92791
888 Reviewed by Dean Jackson.
890 When a layer is running a transition or animation of the transform property,
891 we would simply disable overlap testing for later layers, which had the side-effect
892 of promoting lots of unrelated elements into layers temporarily.
894 Fix by maintaining overlap, but computing an overlap extent that takes the animation
897 Rotations are currently treated as full rotations. If an extent for the overlap is
898 hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
899 then we fall back to the current behavior.
901 Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
902 compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
903 compositing/layer-creation/mismatched-transform-transition-overlap.html
904 compositing/layer-creation/multiple-keyframes-animation-overlap.html
905 compositing/layer-creation/scale-rotation-animation-overlap.html
906 compositing/layer-creation/scale-rotation-transition-overlap.html
907 compositing/layer-creation/translate-animation-overlap.html
908 compositing/layer-creation/translate-scale-animation-overlap.html
909 compositing/layer-creation/translate-scale-transition-overlap.html
910 compositing/layer-creation/translate-transition-overlap.html
912 * page/animation/AnimationBase.cpp:
913 (WebCore::containsRotation):
914 (WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
915 transform lists, we can map a rectangle through the various operations. Transform-origin
916 is used to shift the origin of the box first, and then unshift after. If we encounter
917 a rotation, for now assume it's a full rotation (a future patch could tighten this up).
918 (WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
919 interpolation, we have to decompose the matrix to see if there's any rotation component,
920 and, if there is, fall back to current behavior.
921 * page/animation/AnimationBase.h:
922 * page/animation/AnimationController.cpp:
923 (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
924 (WebCore::AnimationController::computeExtentOfAnimation):
925 * page/animation/AnimationController.h:
926 * page/animation/AnimationControllerPrivate.h:
927 * page/animation/CompositeAnimation.cpp:
928 (WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
929 animations and transitions to compute the bounds extent.
930 * page/animation/CompositeAnimation.h:
931 * page/animation/ImplicitAnimation.cpp:
932 (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
933 of the start and end transforms, and union them.
934 * page/animation/ImplicitAnimation.h:
935 * page/animation/KeyframeAnimation.cpp:
936 (WebCore::KeyframeAnimation::animate):
937 (WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
938 (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
939 for each keyframe, and take their union.
940 * page/animation/KeyframeAnimation.h:
941 * platform/graphics/GeometryUtilities.cpp:
942 (WebCore::euclidianDistance): Use Pythagoras to compute a distance.
943 (WebCore::boundsOfRotatingRect): Given a rect whose location is relative
944 to the rotation origin, compute a bounds for the rotated rect by computing
945 the furthest corner from the origin, and sweeping out a circle.
946 * platform/graphics/GeometryUtilities.h:
947 * platform/graphics/transforms/Matrix3DTransformOperation.h:
948 * platform/graphics/transforms/MatrixTransformOperation.h:
949 * platform/graphics/transforms/PerspectiveTransformOperation.h:
950 * platform/graphics/transforms/RotateTransformOperation.h:
951 * platform/graphics/transforms/ScaleTransformOperation.h:
952 * platform/graphics/transforms/SkewTransformOperation.h:
953 * platform/graphics/transforms/TransformOperation.h:
954 (WebCore::TransformOperation::isAffectedByTransformOrigin):
955 * platform/graphics/transforms/TransformOperations.cpp:
956 (WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
957 they are affected by transform-origin.
958 (WebCore::TransformOperations::blendByMatchingOperations): nullptr.
959 * platform/graphics/transforms/TransformOperations.h:
960 * rendering/RenderBox.cpp:
961 (WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
962 if the geometry map says so (which is most of the time).
963 * rendering/RenderGeometryMap.cpp:
964 (WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
965 geometry map in a way that is incompatible with this assertion; it deliberately ignores
966 transforms sometimes, so we can't easily verify that the mapping matches mapping through
968 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
970 * rendering/RenderGeometryMap.h:
971 * rendering/RenderLayer.cpp:
972 (WebCore::RenderLayer::boundingBox): Whitespace.
973 (WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
974 function to get the bounds of a layer, including descendants, when a transform animation is running.
975 * rendering/RenderLayer.h:
976 * rendering/RenderLayerCompositor.cpp:
977 (WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
978 flag to detect nested animated transforms.
979 (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
980 the layer is animating transform, and the transition/animation is such that we can't easily compute the
981 bounds of the animation.
982 (WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
983 Compute the animated bounds if there's a transform animation running.
984 (WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
985 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
986 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
987 Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
988 if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
989 for overlap via the computed animated bounds).
990 If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
991 that descendants will know (nested transform animations fall back to current behavior).
992 The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
993 testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
994 (WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
995 was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
996 considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
997 animation was running.
998 Since transform animations are always accelerated, we can just test for a running transform animation.
999 (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
1000 * rendering/RenderLayerCompositor.h:
1001 * rendering/style/RenderStyle.cpp:
1002 (WebCore::requireTransformOrigin): Some FIXME comments.
1004 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1006 Clean up related to wheelEvent names
1007 https://bugs.webkit.org/show_bug.cgi?id=142713
1009 Reviewed by Anders Carlsson.
1011 Add EventNames::isWheelEventType() and use it in places that test for the
1012 two wheel event names.
1015 (WebCore::Document::didAddWheelEventHandler):
1016 (WebCore::Document::didRemoveWheelEventHandler):
1017 * dom/Document.h: No need for exports (I grepped). Pass the Node*, which
1018 will be used in a later patch.
1020 (WebCore::EventNames::isWheelEventType):
1022 (WebCore::Node::didMoveToNewDocument):
1023 (WebCore::tryAddEventListener):
1024 (WebCore::tryRemoveEventListener):
1025 (WebCore::Node::defaultEventHandler):
1026 * html/shadow/MediaControlsApple.cpp:
1027 (WebCore::MediaControlsAppleEventListener::handleEvent):
1028 * page/DOMWindow.cpp:
1029 (WebCore::DOMWindow::addEventListener):
1030 (WebCore::DOMWindow::removeEventListener):
1031 * page/ios/FrameIOS.mm:
1032 (WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.
1034 2015-03-15 Simon Fraser <simon.fraser@apple.com>
1036 Remove a redundant repaint when a layer becomes composited
1037 https://bugs.webkit.org/show_bug.cgi?id=142711
1039 Reviewed by Anders Carlsson.
1041 RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
1042 repaintOnCompositingChange() when a layer is going to become composited,
1043 because updateBacking() does exactly the same thing. I used an assertion
1044 and ran the tests to ensure this wasn't a behavior change.
1046 * rendering/RenderLayerCompositor.cpp:
1047 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1049 2015-03-15 Benjamin Poulain <bpoulain@apple.com>
1051 Change the exact attribute matching to be ASCII case-insensitive
1052 https://bugs.webkit.org/show_bug.cgi?id=142609
1054 Reviewed by Darin Adler.
1056 In CSS, testing attribute values should be ASCII case-insensitive,
1057 previously we were using full unicode case conversion.
1059 Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
1061 * css/CSSParser.cpp:
1062 (WebCore::CSSParser::parseKeyframeSelector):
1063 The CSS parser has its own fast version for ASCII case insensitive.
1064 This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
1065 change that to the normal CSS parser version.
1067 * css/SelectorCheckerTestFunctions.h:
1068 (WebCore::equalIgnoringASCIICase): Deleted.
1069 * cssjit/SelectorCompiler.cpp:
1070 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
1072 2015-03-15 Brent Fulgham <bfulgham@apple.com>
1074 scroll snap points do not properly account for zoomed pages
1075 https://bugs.webkit.org/show_bug.cgi?id=142706
1076 <rdar://problem/20165771>
1078 Reviewed by Anders Carlsson.
1080 When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
1081 scaling value when selecting our correct scroll snap point target, as well as when specifying the
1082 pixel location for our animation to target.
1084 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1085 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1086 (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
1087 * platform/cocoa/ScrollController.h:
1088 (WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
1089 * platform/cocoa/ScrollController.mm:
1090 (WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
1091 based on the page scale factor.
1093 2015-03-15 Csaba Osztrogonác <ossy@webkit.org>
1095 Fix run-bindings-tests on the WinCairo bot
1096 https://bugs.webkit.org/show_bug.cgi?id=142588
1098 Reviewed by Alex Christensen.
1100 * bindings/scripts/test/JS/JSFloat64Array.cpp: Added property svn:eol-style.
1101 * bindings/scripts/test/JS/JSFloat64Array.h: Added property svn:eol-style.
1102 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added property svn:eol-style.
1103 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Modified property svn:eol-style.
1104 * bindings/scripts/test/JS/JSTestCallback.cpp: Modified property svn:eol-style.
1105 * bindings/scripts/test/JS/JSTestCallback.h: Modified property svn:eol-style.
1106 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Added property svn:eol-style.
1107 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Modified property svn:eol-style.
1108 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Added property svn:eol-style.
1109 * bindings/scripts/test/JS/JSTestEventConstructor.h: Added property svn:eol-style.
1110 * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added property svn:eol-style.
1111 * bindings/scripts/test/JS/JSTestEventTarget.h: Modified property svn:eol-style.
1112 * bindings/scripts/test/JS/JSTestException.cpp: Added property svn:eol-style.
1113 * bindings/scripts/test/JS/JSTestException.h: Added property svn:eol-style.
1114 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added property svn:eol-style.
1115 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added property svn:eol-style.
1116 * bindings/scripts/test/JS/JSTestImplements.cpp: Added property svn:eol-style.
1117 * bindings/scripts/test/JS/JSTestImplements.h: Added property svn:eol-style.
1118 * bindings/scripts/test/JS/JSTestInterface.cpp: Modified property svn:eol-style.
1119 * bindings/scripts/test/JS/JSTestInterface.h: Modified property svn:eol-style.
1120 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Modified property svn:eol-style.
1121 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Modified property svn:eol-style.
1122 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Added property svn:eol-style.
1123 * bindings/scripts/test/JS/JSTestNamedConstructor.h: Added property svn:eol-style.
1124 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added property svn:eol-style.
1125 * bindings/scripts/test/JS/JSTestNondeterministic.h: Added property svn:eol-style.
1126 * bindings/scripts/test/JS/JSTestObj.cpp: Modified property svn:eol-style.
1127 * bindings/scripts/test/JS/JSTestObj.h: Modified property svn:eol-style.
1128 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added property svn:eol-style.
1129 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added property svn:eol-style.
1130 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Modified property svn:eol-style.
1131 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Modified property svn:eol-style.
1132 * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added property svn:eol-style.
1133 * bindings/scripts/test/JS/JSTestSupplemental.h: Added property svn:eol-style.
1134 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added property svn:eol-style.
1135 * bindings/scripts/test/JS/JSTestTypedefs.h: Added property svn:eol-style.
1136 * bindings/scripts/test/JS/JSattribute.cpp: Added property svn:eol-style.
1137 * bindings/scripts/test/JS/JSattribute.h: Added property svn:eol-style.
1138 * bindings/scripts/test/JS/JSreadonly.cpp: Added property svn:eol-style.
1139 * bindings/scripts/test/JS/JSreadonly.h: Added property svn:eol-style.
1141 2015-03-14 Darin Adler <darin@apple.com>
1143 More event handler improvements
1144 https://bugs.webkit.org/show_bug.cgi?id=142701
1146 Reviewed by Anders Carlsson.
1148 These are the improvements:
1150 - Use EventHandler rather than EventListener as the the type for event handler
1151 attributes. This matches the HTML specification, and also makes sense, since
1152 EventListener means something else (and we use it to mean that!). Also renamed
1153 JSWindowEventListener to WindowEventHandler. Even though this only affects the
1154 JavaScript code generated, it's not really a JavaScript-specific flag.
1156 - Tweak formatting on addEventListener/removeEventListener/dispatchEvent in
1157 all the IDL files where the appear. This includes changing the spelling from
1158 "evt" to "event". Some day we should fix this so these functions only need to
1159 appear in EventTarget.idl.
1161 - Tweak formatting a bit on the IDL files we had to modify anyway.
1163 - Use [Conditional] more often and #if less often in IDL files.
1165 - Added a new [DocumentEventHandler] attribute for the selectionchange event.
1166 This involved adding new event handler attribute functions to JSEventListener.h
1167 for use by the JavaScript bindings.
1169 - Removed a little unused code from the JavaScript code bindings generator.
1171 - Improved the mechanism used by HTMLElement and SVGElement to share the list of
1172 content attributes that are event handlers so there is only one map rather than
1173 two. Made a similar mechanism so that HTMLBodyElement and HTMLFrameSetElement
1174 can share the list of window event handlers.
1176 - Followed the HTML specification by putting all the event handler support in
1177 the HTMLElement class rather than having event handlers apply only a the
1178 particular element that uses those events. We already did this for most of
1179 our event handlers, but we are now doing it for all of them.
1181 * Modules/battery/BatteryManager.idl: Use EventHandler instead of EventListener
1182 as appropriate. Also reformatted addEventListener/removeEventListener/dispatchEvent.
1183 * Modules/encryptedmedia/MediaKeySession.idl: Ditto.
1184 * Modules/indexeddb/IDBDatabase.idl: Ditto.
1185 * Modules/indexeddb/IDBOpenDBRequest.idl: Ditto.
1186 * Modules/indexeddb/IDBRequest.idl: Ditto.
1187 * Modules/indexeddb/IDBTransaction.idl: Ditto.
1188 * Modules/mediastream/MediaStream.idl: Ditto.
1189 * Modules/mediastream/MediaStreamTrack.idl: Ditto.
1190 * Modules/mediastream/RTCDTMFSender.idl: Ditto.
1191 * Modules/mediastream/RTCDataChannel.idl: Ditto.
1192 * Modules/mediastream/RTCPeerConnection.idl: Ditto.
1193 * Modules/speech/SpeechSynthesisUtterance.idl: Ditto.
1194 * Modules/webaudio/AudioBufferSourceNode.idl: Ditto.
1195 * Modules/webaudio/AudioContext.idl: Ditto.
1196 * Modules/webaudio/OscillatorNode.idl: Ditto.
1197 * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
1198 * Modules/websockets/WebSocket.idl: Ditto.
1199 * css/FontLoader.idl: Ditto.
1200 * dom/EventListener.idl: Ditto.
1201 * dom/EventTarget.idl: Ditto.
1202 * dom/MessagePort.idl: Ditto.
1203 * dom/Node.idl: Ditto.
1204 * dom/WebKitNamedFlow.idl: Ditto.
1205 * fileapi/FileReader.idl: Ditto.
1206 * html/MediaController.idl: Ditto.
1207 * html/track/AudioTrackList.idl: Ditto.
1208 * html/track/TextTrackCue.idl: Ditto.
1209 * html/track/TextTrackList.idl: Ditto.
1210 * html/track/VideoTrackList.idl: Ditto.
1211 * loader/appcache/DOMApplicationCache.idl: Ditto.
1212 * page/EventSource.idl: Ditto.
1213 * page/Performance.idl: Ditto.
1214 * workers/AbstractWorker.idl: Ditto.
1215 * workers/DedicatedWorkerGlobalScope.idl: Ditto.
1216 * workers/Worker.idl: Ditto.
1217 * workers/WorkerGlobalScope.idl: Ditto.
1218 * xml/XMLHttpRequest.idl: Ditto.
1219 * xml/XMLHttpRequestUpload.idl: Ditto.
1221 * Modules/notifications/Notification.idl: Did the above, but also used
1222 [Conditional] instead of #if throughout.
1223 * html/track/TextTrack.idl: Ditto.
1225 * Modules/webaudio/AudioNode.idl: Tweaked paragraphing of this file.
1227 * bindings/js/JSEventListener.cpp:
1228 (WebCore::windowEventHandlerAttribute): Renamed to take the word "forwarded"
1229 out of this. More closely matches the terminology used in IDL files and the
1231 (WebCore::setWindowEventHandlerAttribute): Ditto.
1232 (WebCore::documentEventHandlerAttribute): Added.
1233 (WebCore::setDocumentEventHandlerAttribute): Added.
1234 * bindings/js/JSEventListener.h: Updated for above changes.
1236 * bindings/objc/PublicDOMInterfaces.h: Renamed argument from "evt" to "event".
1238 * bindings/scripts/CodeGeneratorGObject.pm:
1239 (SkipAttribute): Skip attributes of type "EventHandler" rather than attributes
1240 of type "EventListener".
1241 * bindings/scripts/CodeGeneratorObjC.pm:
1242 (SkipAttribute): Ditto.
1244 * bindings/scripts/CodeGeneratorJS.pm:
1245 (GenerateImplementation): Look for the type EventHandler instead of the type
1246 EventListener for event handler attributes. Also added code to handle the new
1247 DocumentEventHandler, and use the name WindowEventHandler instead of the name
1248 JSWindowEventListener. Removed unneeded preflight check to see if we have
1249 writable attributes; it was not doing us any good. (That caused a lot of code
1250 to be un-indented and makes the diff hard to read.)
1252 * bindings/scripts/IDLAttributes.txt: Removed JSWindowEventListener, and added
1253 WindowEventHandler and DocumentEventHandler.
1255 * bindings/scripts/test/TestObj.idl: Use the type EventHandler instead of the
1256 type EventListener. The test output is unchanged, though.
1258 * dom/Document.idl: Got rid of the conditionals and merged all the event handler
1259 attributes into a single sorted, unconditional list. Added some that were missing,
1260 as detected by the event-handler-attributes.html test.
1262 * dom/Element.idl: Ditto. This includes moving attributes here that were formerly
1263 only in certain element classes. Note that the script event handler attribute
1264 support is still here, even though it should be in HTMLElement and SVGElement
1265 instead. There's a FIXME about that, but no real urgency in fixing it.
1267 * html/HTMLAttributeNames.in: Added onmessage. Previously, the support for this
1268 was from the script attribute only, not the content attribute.
1270 * html/HTMLBodyElement.cpp:
1271 (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Added. This
1272 contains the list of all the window event handlers that can be set on a body
1273 or frameset element and which are triggered by events on the window.
1274 (WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Added.
1275 This is the function to call to use the map above. Given an attribute, it
1276 returns either null if it is not a window event handler attribute, or the
1277 event type if it is one.
1278 (WebCore::HTMLBodyElement::parseAttribute): Updated to use the new
1279 functions above. Handling of these attributes is now unconditional, but
1280 also we don't have to keep the nested if statements here up to date, just
1281 the list of event handler attributes names in the map create function above.
1283 * html/HTMLBodyElement.h: Added public eventNameForWindowEventHandlerAttribute
1284 and private createWindowEventHandlerNameMap functions.
1286 * html/HTMLBodyElement.idl: Updated to use WindowEventHandler, DocumentEventHandler,
1287 and EventHandler. Also made everything unconditional. Also filled out the list here
1288 to match the list handled as content attributes. All covered by the test.
1290 * html/HTMLElement.cpp:
1291 (WebCore::HTMLElement::createEventHandlerNameMap): Added. Replaces the old
1292 populate function. Changed the list of event handler attributes to be a bit more
1293 complete, and to be entirely unconditional. Also refactored this function to use
1294 a new populateEventHandlerNameMap helper, shared with HTMLBodyElement.
1295 (WebCore::HTMLElement::populateEventHandlerNameMap): Added. Factors out the code
1296 that both this class and HTMLBodyElement use to build event handler name maps.
1297 (WebCore::HTMLElement::eventNameForEventHandlerAttribute): Added. This is the
1298 function that call to use the map above. Given an attribute it returns either
1299 null if it is not an event handler attribute, or the event type if it is one.
1300 This is actually two functions. One is a protected function for use by both this
1301 class and HTMLBodyElement so they can share things like the optimization to look
1302 for the "on" prefix. The other is the public function that we actually use in
1303 HTMLElement and SVGElement.
1304 (WebCore::HTMLElement::editabilityFromContentEditableAttr): Tweaked and refactored
1305 to use lineageOfType. Would have been even simpler if this took an element instead
1306 of a node. Unrelated to the event handler changes.
1307 (WebCore::HTMLElement::parseAttribute): Removed long-obsolete code that decided
1308 whether to call through to the base class. The base class function is empty and
1309 never needs to be called, and in any case there is no value in doing work to
1310 decide whether to call through to an empty function. Changed the style of the
1311 function to use early return instead of else. Worth considering whether we want
1312 to return early or call through to base class in this family of functions. It's
1313 more efficient to return early, but doesn't work well if both the derived class
1314 and base class want to respond to changes to the same attribute. The new logic
1315 for event handler attributes is more straightforward than the old, since the
1316 eventNameForEventHandlerAttribute has the logic.
1317 (WebCore::HTMLElement::textToFragment): Tweaked and refactored a bit, and also
1318 changed to return a Ref since this never fails and needs to return null.
1320 * html/HTMLElement.h: Updated for above changes. This includes a template version
1321 of populateEventHandlerNameMap that extracts the array size at compile time and
1322 passes it to the non-template function that does the work.
1324 * html/HTMLFrameElementBase.cpp:
1325 (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code to handle
1326 event handler attributes handled by HTMLElement.
1327 * html/HTMLImageElement.cpp:
1328 (WebCore::HTMLImageElement::parseAttribute): Ditto.
1329 * html/HTMLLinkElement.cpp:
1330 (WebCore::HTMLLinkElement::parseAttribute): Ditto.
1331 * html/HTMLObjectElement.cpp:
1332 (WebCore::HTMLObjectElement::parseAttribute): Ditto.
1333 * html/HTMLScriptElement.cpp:
1334 (WebCore::HTMLScriptElement::parseAttribute): Ditto.
1336 * html/HTMLFrameSetElement.cpp:
1337 (WebCore::HTMLFrameSetElement::parseAttribute): Changed function to early return
1338 style, and added FIXMEs about the many problems in the attribute handling code.
1339 Replaced all the code to handle window event handlers with a new bit of code that
1340 calls HTMLBodyElement::eventNameForWindowEventHandlerAttribute.
1342 * html/HTMLFrameSetElement.idl: Changed to match the list of window event handlers
1343 in HTMLBodyElement.idl, although I did not add the document event handler here.
1344 As in the various other cases, having some extra event handlers does not seem to
1345 do harm and this is covered by the event-handler-attributes.html test.
1347 * html/HTMLMarqueeElement.idl: Renamed EventListener to EventHandler in comment.
1349 * page/DOMWindow.idl: As with Element and Document, removed conditionals, and
1350 filled out the list of event handlers so all the tests in
1351 event-handler-attributes.html will pass.
1353 * svg/SVGElement.cpp:
1354 (WebCore::SVGElement::parseAttribute): Changed code to the early return style,
1355 and replaced the event handler attribute code with new much simpler code that
1356 uses the new HTMLElement::eventNameForEventHandlerAttribute. Also changed the
1357 way we call through to base classes. Just call through to the
1358 SVGLangSpace::parseAttribute function unconditionally, and don't try to use
1359 early return style to arbitrate among base classes. We should make this
1360 simplification throughout the SVG code; there's no need for the complexity
1361 that was there before just to cut down slightly on calls through to base
1362 class parseAttribute functions.
1364 * svg/SVGSVGElement.cpp:
1365 (WebCore::SVGSVGElement::parseAttribute): Changed some of this code to the
1366 early return style and corrected some comments about the window event handler
1367 attributes here. These could use some further testing and might later need to be
1368 properly supported when the attributes are set in script, not just in content.
1370 * svg/SVGScriptElement.cpp:
1371 (WebCore::SVGScriptElement::isSupportedAttribute): Deleted.
1372 (WebCore::SVGScriptElement::parseAttribute): Changed this function to use the
1373 early return style and also to call through to all three base classes. This is
1374 a pattern we should follow elsewhere in SVG to simplify the code. There is no
1375 need for the supportedAttributes sets like the one in this calass, and the code
1376 is unnecessarily complex, perhaps in an attempt to optimize performance. I'm
1377 pretty sure the old code was slower than this new code will be. No need for the
1378 extra hash table lookup every time. Also removed handling of event handler
1379 attribute which is taken care of by SVGElement now.
1380 (WebCore::SVGScriptElement::svgAttributeChanged): Made similar changes for
1381 the same reason as in parseAttribute. This function really needs a new name:
1382 It's the same as parseAttribute, except it's also used when implementing
1383 changes due to SVG animation.
1385 * svg/SVGScriptElement.h: Removed isSupportedAttribute.
1387 2015-03-14 Simon Fraser <simon.fraser@apple.com>
1389 Clean up use of flags in localToContainer-type functions
1390 https://bugs.webkit.org/show_bug.cgi?id=142704
1392 Reviewed by Alexey Proskuryakov.
1394 RenderObject::localToContainerQuad() had the questionable behavior of always
1395 enforcing UseTransforms in the flags. However, a future patch will need to call
1396 localToContainerQuad() without this flag.
1398 Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
1399 and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
1401 The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
1402 a lower-level function, is removed.
1404 Sprinkle a few more nullptrs around.
1408 * rendering/RenderBlock.cpp:
1409 (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
1410 instead of mapLocalToContainer().
1411 (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
1412 * rendering/RenderBox.cpp:
1413 (WebCore::RenderBox::absoluteQuads): Ditto.
1414 * rendering/RenderBox.h:
1415 * rendering/RenderFlowThread.h:
1416 * rendering/RenderGeometryMap.h:
1417 (WebCore::RenderGeometryMap::absolutePoint):
1418 (WebCore::RenderGeometryMap::absoluteRect):
1419 * rendering/RenderImage.cpp:
1420 (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
1421 'false' as flags. Pass UseTransforms instead (but no behavior change since
1422 UseTransforms was forced on lower down).
1423 * rendering/RenderInline.h:
1424 * rendering/RenderLayer.cpp:
1425 (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
1426 * rendering/RenderLineBreak.cpp:
1427 (WebCore::RenderLineBreak::absoluteQuads):
1428 (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
1429 * rendering/RenderNamedFlowFragment.cpp:
1430 (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
1431 * rendering/RenderObject.cpp:
1432 (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
1433 the UseTransforms bit.
1434 (WebCore::RenderObject::localToContainerPoint): Also here.
1435 * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
1436 (WebCore::RenderObject::localToAbsoluteQuad):
1437 * rendering/RenderText.cpp:
1438 (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
1439 * rendering/RenderTextLineBoxes.cpp:
1440 (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
1441 (WebCore::RenderTextLineBoxes::absoluteQuads):
1442 (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
1443 * rendering/RenderView.h:
1444 * rendering/SimpleLineLayoutFunctions.cpp:
1445 (WebCore::SimpleLineLayout::collectAbsoluteQuads):
1446 * rendering/svg/RenderSVGForeignObject.h:
1447 * rendering/svg/RenderSVGInline.cpp:
1448 (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
1449 * rendering/svg/RenderSVGInline.h:
1450 * rendering/svg/RenderSVGModelObject.cpp:
1451 (WebCore::RenderSVGModelObject::absoluteQuads):
1452 * rendering/svg/RenderSVGModelObject.h:
1453 * rendering/svg/RenderSVGRoot.h:
1454 * rendering/svg/RenderSVGText.cpp:
1455 (WebCore::RenderSVGText::absoluteQuads):
1456 * rendering/svg/RenderSVGText.h:
1457 * rendering/svg/SVGRenderSupport.h:
1459 2015-03-14 Brent Fulgham <bfulgham@apple.com>
1461 [iOS] scroll snap points are animating to the wrong positions...
1462 https://bugs.webkit.org/show_bug.cgi?id=142705
1463 <rdar://problem/20136946>
1465 Reviewed by Simon Fraser.
1467 Avoid adding an extra '0' snap point to our set. We always start with one zero; this
1468 extra append just forces us to do more steps in our search for nearest snap point.
1470 * page/scrolling/AxisScrollSnapOffsets.cpp:
1471 (WebCore::updateFromStyle): Remove extra '0' appended to offsets.
1473 2015-03-14 Dean Jackson <dino@apple.com>
1475 Feature flag for Animations Level 2
1476 https://bugs.webkit.org/show_bug.cgi?id=142699
1477 <rdar://problem/20165097>
1479 Reviewed by Brent Fulgham.
1481 Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
1483 * Configurations/FeatureDefines.xcconfig:
1484 * bindings/generic/RuntimeEnabledFeatures.cpp:
1485 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1486 * bindings/generic/RuntimeEnabledFeatures.h:
1487 (WebCore::RuntimeEnabledFeatures::setAnimationTriggersEnabled):
1488 (WebCore::RuntimeEnabledFeatures::animationTriggersEnabled):
1490 2015-03-14 Adenilson Cavalcanti <cavalcantii@gmail.com>
1492 RenderBlock::imageChange() calling const methods on exit
1493 https://bugs.webkit.org/show_bug.cgi?id=142648
1495 Reviewed by Brent Fulgham.
1497 No new tests, no change on behavior.
1499 * rendering/RenderBlock.cpp:
1500 (WebCore::RenderBlock::imageChanged): Deleted.
1501 * rendering/RenderBlock.h:
1503 2015-03-14 VÃctor Manuel Jáquez Leal <vjaquez@igalia.com>
1505 [GStreamer] share GL context in pipeline
1506 https://bugs.webkit.org/show_bug.cgi?id=142693
1508 Reviewed by Philippe Normand.
1510 GstGL elements in a pipeline need to be aware of the application's
1511 display and its GL context. This information is shared through context
1512 messages between the pipeline and the browser.
1514 This patch shares this context through a GStreamer's synchronous
1515 message, using the GL information held in the web process.
1517 This patch is based on the work of Philippe Normand for Bug 138562.
1519 No new tests because this is platform specific and it depends in the
1520 run-time availability and configurations of GstGL elements.
1522 * PlatformGTK.cmake: appends the GstGL header files in the include
1523 directories. Also its library directory is appended.
1524 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1525 (WebCore::mediaPlayerPrivateSyncMessageCallback): New callback function.
1526 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1527 Initialize the new class attributes.
1528 (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): New method
1529 for handling synchronous messages from the pipeline. This method
1530 currently only handles the GL context sharing.
1531 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Configures
1532 the pipeline's bus to handle the synchronous messages.
1533 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add new
1534 class methods and attributes.
1536 2015-03-13 Alex Christensen <achristensen@webkit.org>
1538 Progress towards CMake on Mac.
1539 https://bugs.webkit.org/show_bug.cgi?id=142680
1541 Reviewed by Gyuyoung Kim.
1543 * PlatformMac.cmake:
1544 Added new include directories and removed old source files.
1546 2015-03-13 Commit Queue <commit-queue@webkit.org>
1548 Unreviewed, rolling out r181483.
1549 https://bugs.webkit.org/show_bug.cgi?id=142688
1551 Caused use-after-free on many tests (Requested by ap on
1556 "Allow clients to selectively disable plug-ins"
1557 https://bugs.webkit.org/show_bug.cgi?id=142506
1558 http://trac.webkit.org/changeset/181483
1560 2015-03-13 Antti Koivisto <antti@apple.com>
1562 Cache glyph widths to GlyphPages
1563 https://bugs.webkit.org/show_bug.cgi?id=142028
1565 Reviewed by Andreas Kling.
1567 Currently we have a separate cache in Font for glyph widths. In practice we always need
1568 the widths so we can just cache them in GlyphPages. This simplifies the code and removes
1569 a per-character hash lookup from WidthIterator.
1571 * platform/graphics/Font.cpp:
1572 (WebCore::Font::Font):
1573 (WebCore::Font::initCharWidths):
1574 (WebCore::Font::platformGlyphInit):
1575 (WebCore::createAndFillGlyphPage):
1576 (WebCore::Font::computeWidthForGlyph):
1578 Rename to make it clear this doesn't cache.
1580 (WebCore::GlyphPage::setGlyphDataForIndex):
1582 Initialize the width.
1583 This could go to GlyphPage.cpp if we had one.
1585 * platform/graphics/Font.h:
1586 (WebCore::Font::glyphZeroWidth):
1587 (WebCore::Font::isZeroWidthSpaceGlyph):
1588 (WebCore::Font::zeroGlyph): Deleted.
1589 (WebCore::Font::setZeroGlyph): Deleted.
1590 (WebCore::Font::widthForGlyph): Deleted.
1591 * platform/graphics/FontCascade.cpp:
1592 (WebCore::offsetToMiddleOfGlyph):
1593 * platform/graphics/FontCascadeFonts.cpp:
1594 (WebCore::FontCascadeFonts::glyphDataForCharacter):
1595 * platform/graphics/GlyphPage.h:
1596 (WebCore::GlyphData::GlyphData):
1598 Return width too as part of GlyphData.
1600 (WebCore::GlyphPage::glyphDataForIndex):
1601 (WebCore::GlyphPage::setGlyphDataForCharacter):
1602 (WebCore::GlyphPage::setGlyphDataForIndex):
1603 (WebCore::GlyphPage::GlyphPage):
1604 * platform/graphics/WidthIterator.cpp:
1605 (WebCore::WidthIterator::advanceInternal):
1607 No need to lookup width separately now.
1609 * platform/graphics/mac/ComplexTextController.cpp:
1610 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1611 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1612 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1613 * rendering/mathml/RenderMathMLOperator.cpp:
1614 (WebCore::RenderMathMLOperator::advanceForGlyph):
1615 * rendering/svg/SVGTextRunRenderingContext.cpp:
1616 (WebCore::missingGlyphForFont):
1617 * svg/SVGFontData.cpp:
1618 (WebCore::SVGFontData::initializeFont):
1620 2015-03-13 Eric Carlson <eric.carlson@apple.com>
1622 [Mac] Enable WIRELESS_PLAYBACK_TARGET
1623 https://bugs.webkit.org/show_bug.cgi?id=142635
1625 Reviewed by Darin Adler.
1627 * Configurations/FeatureDefines.xcconfig:
1629 2015-03-13 Jeremy Jones <jeremyj@apple.com>
1631 Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
1632 https://bugs.webkit.org/show_bug.cgi?id=142678
1634 Reviewed by Eric Carlson.
1636 Add the missing 'n' in "fullscreen".
1638 * platform/spi/ios/AVKitSPI.h:
1640 2015-03-13 Timothy Horton <timothy_horton@apple.com>
1642 Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
1643 https://bugs.webkit.org/show_bug.cgi?id=142664
1644 <rdar://problem/18859470>
1646 Reviewed by Benjamin Poulain.
1648 * page/ViewportConfiguration.cpp:
1649 (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
1650 (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
1651 (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
1652 Split shouldIgnoreScalingConstraints into one for each dimension.
1654 (WebCore::ViewportConfiguration::initialScale):
1655 (WebCore::ViewportConfiguration::minimumScale):
1656 Don't force the initial and minimum scales to cover the whole view if the
1657 page claims to want to lay out to device width but then lays out too big.
1658 This will allow pages that misbehave in this way to scale down further
1659 than they previously could, but will result in a region of empty background
1660 color being exposed at the initial/minimum scale.
1662 (WebCore::ViewportConfiguration::description):
1663 Update the logging to show each dimension separately.
1665 * page/ViewportConfiguration.h:
1667 2015-03-13 Mark Lam <mark.lam@apple.com>
1669 Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
1670 <https://webkit.org/b/142674>
1672 Reviewed by Filip Pizlo.
1674 No new tests because there is no new functionality. This is a refactoring effort.
1676 * bindings/objc/WebScriptObject.mm:
1677 * platform/ios/wak/WAKWindow.mm:
1678 (-[WAKWindow initWithLayer:]):
1679 (-[WAKWindow initWithFrame:]):
1681 2015-03-13 Doug Russell <d_russell@apple.com>
1683 AX: Provide API for assistive tech to ignore DOM key event handlers
1684 https://bugs.webkit.org/show_bug.cgi?id=142059
1686 Reviewed by Beth Dakin.
1688 Assistive technology applications on the desktop are heavily dependent on keyboard navigation being reliable. This is greatly hindered by sites that handle key events without updating keyboard selection and then consume the event. It is important for assistive technology apps to allow users to decide to ignore these handlers that are incorrect for their purposes.
1690 This can be fixed by exposing, via a new accessibility attribute, a way to decide, for a given WebCore::Frame, to pre-empt DOM dispatch and instead let accessibility caret browsing take place.
1692 Test: platform/mac/accessibility/prevent-keyboard-event-dispatch.html
1694 * accessibility/AccessibilityObject.cpp:
1695 (WebCore::AccessibilityObject::preventKeyboardDOMEventDispatch):
1696 (WebCore::AccessibilityObject::setPreventKeyboardDOMEventDispatch):
1697 * accessibility/AccessibilityObject.h:
1698 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1699 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1700 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1701 (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1702 (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1704 (WebCore::Element::dispatchKeyEvent):
1705 * page/EventHandler.cpp:
1706 (WebCore::EventHandler::keyEvent):
1707 (WebCore::handleKeyboardSelectionMovement):
1708 (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
1709 * page/EventHandler.h:
1712 2015-03-09 Conrad Shultz <conrad_shultz@apple.com>
1714 Allow clients to selectively disable plug-ins
1715 https://bugs.webkit.org/show_bug.cgi?id=142506
1717 Reviewed by Anders Carlsson.
1719 Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
1720 from the page). As part of this:
1722 1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
1725 2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
1728 3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
1729 a concrete implementation thereof in WebPlatformStrategies in WebKit2.
1731 4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
1733 While currently only used in a very limited manner, the new declarative plug-in policies are written generically
1734 so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
1736 * dom/DOMImplementation.cpp:
1737 (WebCore::DOMImplementation::createDocument):
1738 Update to reflect function rename.
1740 * loader/SubframeLoader.cpp:
1741 (WebCore::findPluginMIMETypeFromURL):
1742 Adopt getWebVisibleMimesAndPluginIndices().
1743 (WebCore::logPluginRequest):
1744 Update to reflect function rename.
1745 (WebCore::SubframeLoader::shouldUsePlugin):
1748 * platform/PlatformStrategies.h:
1749 Export platformStrategies(), since it is now used in WebProcess.cpp.
1751 * plugins/DOMMimeType.cpp:
1752 (WebCore::DOMMimeType::type):
1753 (WebCore::DOMMimeType::description):
1754 (WebCore::DOMMimeType::mimeClassInfo):
1755 Adopt getWebVisibleMimesAndPluginIndices().
1756 (WebCore::DOMMimeType::enabledPlugin):
1759 * plugins/DOMMimeType.h:
1760 Don't return references in a few places where it is no longer safe to do so.
1761 (WebCore::DOMMimeType::mimeClassInfo): Deleted.
1763 * plugins/DOMMimeTypeArray.cpp:
1764 (WebCore::DOMMimeTypeArray::length):
1765 Adopt getWebVisibleMimesAndPluginIndices().
1766 (WebCore::DOMMimeTypeArray::item):
1768 (WebCore::DOMMimeTypeArray::canGetItemsForName):
1770 (WebCore::DOMMimeTypeArray::namedItem):
1773 * plugins/DOMPlugin.cpp:
1774 (WebCore::DOMPlugin::pluginInfo):
1775 Adopt getWebVisiblePlugins().
1776 (WebCore::DOMPlugin::item):
1777 Adopt getWebVisibleMimesAndPluginIndices().
1778 (WebCore::DOMPlugin::canGetItemsForName):
1780 (WebCore::DOMPlugin::namedItem):
1783 * plugins/DOMPlugin.h:
1784 (WebCore::DOMPlugin::pluginInfo): Deleted.
1786 * plugins/DOMPluginArray.cpp:
1787 (WebCore::DOMPluginArray::length):
1788 Adopt getWebVisiblePlugins().
1789 (WebCore::DOMPluginArray::item):
1791 (WebCore::DOMPluginArray::canGetItemsForName):
1793 (WebCore::DOMPluginArray::namedItem):
1796 * plugins/PluginData.cpp:
1797 (WebCore::PluginData::PluginData):
1798 Stash the passed-in Page and call initPlugins().
1799 (WebCore::PluginData::getWebVisiblePlugins):
1800 New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
1801 (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
1802 New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
1803 limited to the web-visible plug-ins.
1804 (WebCore::PluginData::supportsWebVisibleMimeType):
1805 Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
1806 (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
1807 Renamed from pluginInfoForMimeType(); ditto.
1808 (WebCore::PluginData::pluginNameForWebVisibleMimeType):
1809 Renamed from pluginNameForMimeType(); ditto.
1810 (WebCore::PluginData::pluginFileForWebVisibleMimeType):
1811 Renamed from pluginFileForMimeType(); ditto.
1812 (WebCore::PluginData::initPlugins):
1813 (WebCore::PluginData::supportsMimeType): Deleted.
1814 (WebCore::PluginData::pluginInfoForMimeType): Deleted.
1815 (WebCore::PluginData::pluginNameForMimeType): Deleted.
1816 (WebCore::PluginData::pluginFileForMimeType): Deleted.
1818 * plugins/PluginData.h:
1819 Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
1820 new members to PluginInfo for the clientLoadPolicy and bundle information.
1821 (WebCore::PluginData::PluginData):
1822 Replace some member functions with new ones that will hide plug-ins upon request from the client;
1823 (WebCore::PluginData::mimes): Deleted.
1824 (WebCore::PluginData::mimePluginIndices): Deleted.
1826 * plugins/PluginStrategy.h:
1827 Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
1829 * replay/SerializationMethods.cpp:
1830 (JSC::EncodingTraits<PluginData>::encodeValue):
1831 Remove now-obsolete code for handling MIME types and add a FIXME.
1832 (JSC::DeserializedPluginData::DeserializedPluginData):
1833 (JSC::EncodingTraits<PluginData>::decodeValue):
1835 (JSC::EncodingTraits<PluginInfo>::encodeValue):
1836 Handle the new members in PluginInfo.
1837 (JSC::EncodingTraits<PluginInfo>::decodeValue):
1840 * replay/WebInputs.json:
1841 Teach Replay about PluginLoadClientPolicy.
1843 2015-03-13 Chris Dumez <cdumez@apple.com>
1845 XMLHttpRequests should not prevent a page from entering PageCache
1846 https://bugs.webkit.org/show_bug.cgi?id=142612
1847 <rdar://problem/19923085>
1849 Reviewed by Alexey Proskuryakov.
1851 Make XMLHttpRequest ActiveDOMObjects suspendable in most cases to
1852 drastically improve the likelihood of pages using them to enter
1853 PageCache. XMLHttpRequest used to be only suspendable when not
1854 loading. After this patch, if the XMLHttpRequest is loading when
1855 navigating away from the page, it will be aborted and the page
1856 will enter the PageCache. Upon restoring the page from PageCache,
1857 the XMLHttpRequests' error handlers will be executed to give them
1858 a chance to reload if they want to.
1860 Test: http/tests/navigation/page-cache-xhr.html
1862 * history/PageCache.cpp:
1863 (WebCore::logCanCacheFrameDecision):
1864 (WebCore::PageCache::canCachePageContainingThisFrame):
1865 Do not prevent a page to enter the page cache ff the main document has
1866 an error that is a cancellation and all remaining subresource loaders
1867 are for XHR. We extend the pre-existing mechanism used on iOS, which
1868 allowed PageCaching if the remaining resource loads are for images.
1870 * loader/DocumentLoader.cpp:
1871 (WebCore::areAllLoadersPageCacheAcceptable):
1872 Mark XHR loaders as PageCache acceptable.
1874 * loader/DocumentThreadableLoader.cpp:
1875 (WebCore::DocumentThreadableLoader::isXMLHttpRequest):
1876 * loader/DocumentThreadableLoader.h:
1877 * loader/ThreadableLoader.h:
1878 * loader/cache/CachedResource.cpp:
1879 (WebCore::CachedResource::areAllClientsXMLHttpRequests):
1880 * loader/cache/CachedResource.h:
1881 * loader/cache/CachedResourceClient.h:
1882 (WebCore::CachedResourceClient::isXMLHttpRequest):
1883 * xml/XMLHttpRequest.cpp:
1884 (WebCore::XMLHttpRequest::XMLHttpRequest):
1885 (WebCore::XMLHttpRequest::createRequest):
1886 (WebCore::XMLHttpRequest::canSuspend):
1887 Report that we can suspend XMLHttpRequests as long as the window load
1888 event has already fired. If the window load event has not fired yet,
1889 it would be unsafe to cancel the load in suspend() as it would
1890 potentially cause arbitrary JS execution while suspending.
1892 (WebCore::XMLHttpRequest::suspend):
1893 If suspending for PageCache and the request is currently loading, abort
1894 the load and mark that we should fire the error event upon restoring
1897 (WebCore::XMLHttpRequest::resume):
1898 (WebCore::XMLHttpRequest::resumeTimerFired):
1899 Upon resuming, fire the error event in a timer if the load was aborted
1900 for suspending. We need to do this in a timer because we are not allowed
1901 to execute arbitrary JS inside resume().
1903 (WebCore::XMLHttpRequest::stop):
1904 Add a assertion to make sure we are not firing event inside stop() as
1905 this would potentially cause arbitrary JS execution and it would be
1906 unsafe. It seems to me that our code is currently unsafe but the
1907 assertion does not seem to be hit by our current layout tests. I am
1908 adding the assertion as it would make it clear we have a bug and we
1911 * xml/XMLHttpRequest.h:
1913 2015-03-13 Joonghun Park <jh718.park@samsung.com>
1915 Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
1916 https://bugs.webkit.org/show_bug.cgi?id=142652
1918 Reviewed by Csaba Osztrogonác.
1920 No new tests, no behavior changes.
1922 Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
1924 * css/CSSPrimitiveValue.cpp:
1925 (WebCore::propertyName):
1928 2015-03-12 Zan Dobersek <zdobersek@igalia.com>
1930 Remove DrawingBuffer
1931 https://bugs.webkit.org/show_bug.cgi?id=142641
1933 Reviewed by Darin Adler.
1935 Remove the DrawingBuffer class. Objects of this type were only held in the
1936 WebGLRenderingContext (later renamed to WebGLRenderingContextBase) on the
1937 Chromium port, with the relevant code removed in r147888. Since then, the
1938 m_drawingBuffer member variable has always been null.
1941 * PlatformEfl.cmake:
1942 * PlatformGTK.cmake:
1943 * WebCore.vcxproj/WebCore.vcxproj:
1944 * WebCore.vcxproj/WebCore.vcxproj.filters:
1945 * WebCore.xcodeproj/project.pbxproj:
1946 * html/canvas/WebGL2RenderingContext.cpp:
1947 (WebCore::WebGL2RenderingContext::copyTexImage2D):
1948 * html/canvas/WebGLRenderingContext.cpp:
1949 (WebCore::WebGLRenderingContext::copyTexImage2D):
1950 * html/canvas/WebGLRenderingContextBase.cpp:
1951 (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1952 (WebCore::WebGLRenderingContextBase::initializeNewContext):
1953 (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
1954 (WebCore::WebGLRenderingContextBase::markContextChanged):
1955 (WebCore::WebGLRenderingContextBase::clearIfComposited):
1956 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
1957 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData):
1958 (WebCore::WebGLRenderingContextBase::reshape):
1959 (WebCore::WebGLRenderingContextBase::drawingBufferWidth):
1960 (WebCore::WebGLRenderingContextBase::drawingBufferHeight):
1961 (WebCore::WebGLRenderingContextBase::activeTexture):
1962 (WebCore::WebGLRenderingContextBase::bindFramebuffer):
1963 (WebCore::WebGLRenderingContextBase::bindTexture):
1964 (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
1965 (WebCore::WebGLRenderingContextBase::deleteFramebuffer):
1966 (WebCore::WebGLRenderingContextBase::disable):
1967 (WebCore::WebGLRenderingContextBase::enable):
1968 (WebCore::WebGLRenderingContextBase::getContextAttributes):
1969 (WebCore::WebGLRenderingContextBase::readPixels):
1970 (WebCore::WebGLRenderingContextBase::loseContextImpl):
1971 (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth):
1972 (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight):
1973 (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
1974 * html/canvas/WebGLRenderingContextBase.h:
1975 (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Deleted.
1976 (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Deleted.
1977 * platform/graphics/GraphicsContext.h:
1978 * platform/graphics/GraphicsContext3D.h:
1979 * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed.
1980 * platform/graphics/gpu/DrawingBuffer.cpp: Removed.
1981 * platform/graphics/gpu/DrawingBuffer.h: Removed.
1982 * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
1983 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1984 (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1985 (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
1987 2015-03-12 Ryosuke Niwa <rniwa@webkit.org>
1989 REGRESSION(r180726): Removing an empty line at the end of textarea clears the entire texture
1990 https://bugs.webkit.org/show_bug.cgi?id=142646
1992 Reviewed by Darin Adler.
1994 The bug was caused by TypingCommand::deleteKeyPressed erroneously determining the editable root to be empty because
1995 Position::atStartOfTree returns true when it's anchored at a BR that is immediately below the root editable element.
1997 Fixed the bug by replacing the use of the deprecated atFirstEditingPositionForNode by a code that understands modern
1998 position types such as PositionIsBeforeAnchor in atStartOfTree and atEndOfTree. These two functions will no longer
1999 return true when anchored before or after BR after this patch.
2001 Test: editing/deleting/delete-empty-line-breaks-at-end-of-textarea.html
2004 (WebCore::Position::atStartOfTree):
2005 (WebCore::Position::atEndOfTree):
2007 2015-03-12 Yusuke Suzuki <utatane.tea@gmail.com>
2009 Integrate MapData into JSMap and JSSet
2010 https://bugs.webkit.org/show_bug.cgi?id=142556
2012 Reviewed by Filip Pizlo.
2014 Now Set has SetData and it's different from MapData.
2015 And MapData/SetData are completely integrated into JSSet and JSMap.
2016 Structured-cloning algorithm need to be aware of these changes.
2017 And in the case of JSSet, since JSSet doesn't need dummy value for construction,
2018 Structured-cloning only serialize the keys in JSSet.
2020 * ForwardingHeaders/runtime/MapDataInlines.h: Added.
2021 * bindings/js/SerializedScriptValue.cpp:
2022 (WebCore::CloneSerializer::serialize):
2023 (WebCore::CloneDeserializer::consumeCollectionDataTerminationIfPossible):
2024 (WebCore::CloneDeserializer::deserialize):
2025 (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible): Deleted.
2027 2015-03-12 Dan Bernstein <mitz@apple.com>
2029 Finish up <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
2031 Added back OS X bits that I couldn’t land initially in r181317 or had to remove in r181327.
2033 * platform/network/mac/CertificateInfoMac.mm:
2034 (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
2035 * platform/spi/cocoa/SecuritySPI.h:
2037 2015-03-12 Geoffrey Garen <ggaren@apple.com>
2039 REGRESSION: Crash under Heap::reportExtraMemoryAllocatedSlowCase for media element
2040 https://bugs.webkit.org/show_bug.cgi?id=142636
2042 Reviewed by Mark Hahnenberg.
2044 This was a pre-existing bug that I made a lot worse in
2045 <https://trac.webkit.org/changeset/181411>.
2047 * html/HTMLMediaElement.cpp:
2048 (WebCore::HTMLMediaElement::parseAttribute): Compare size before
2049 subtracting rather than subtracting and then comparing to zero. The
2050 latter technique is not valid for unsigned integers, which will happily
2051 underflow into giant numbers.
2053 * Modules/mediasource/SourceBuffer.cpp:
2054 (WebCore::SourceBuffer::reportExtraMemoryAllocated): This code was
2055 technically correct, but I took the opportunity to clean it up a bit.
2056 There's no need to do two checks here, and it smells bad to check for
2057 a negative unsigned integer.
2059 2015-03-12 Sebastian Dröge <sebastian@centricular.com>
2061 Stop using single-include headers that are only available since GStreamer >= 1.2.
2063 https://bugs.webkit.org/show_bug.cgi?id=142537
2065 Reviewed by Philippe Normand.
2067 * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2068 * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2069 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
2070 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2071 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2072 * platform/graphics/gstreamer/GStreamerUtilities.h:
2073 * platform/graphics/gstreamer/ImageGStreamer.h:
2074 Instead of using single-include headers for the GStreamer libraries,
2075 directly include the headers we need. The single-include headers were
2076 only added in 1.2, and this would be the only reason why we would
2079 2015-03-12 Eric Carlson <eric.carlson@apple.com>
2081 [Mac] Update AirPlay handling
2082 https://bugs.webkit.org/show_bug.cgi?id=142541
2084 Unreviewed, respond to post-review comments.
2087 (WebCore::Document::didChoosePlaybackTarget):
2088 * page/ChromeClient.h:
2090 (WebCore::Page::showPlaybackTargetPicker):
2091 (WebCore::Page::didChoosePlaybackTarget):
2092 (WebCore::Page::configurePlaybackTargetMonitoring):
2094 2015-03-12 Csaba Osztrogonác <ossy@webkit.org>
2096 Fix the !ENABLE(PICTURE_SIZES) build
2097 https://bugs.webkit.org/show_bug.cgi?id=142617
2099 Reviewed by Darin Adler.
2101 * html/parser/HTMLPreloadScanner.cpp:
2102 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2104 2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
2106 Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.
2108 Address ASSERT in LayoutTests/printing/page-format-data.html.
2110 * dom/InlineStyleSheetOwner.cpp:
2111 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2112 In case the TextPosition gets used because it wasn't created by a parser,
2113 zeros are more realistic values then beforeFirst.
2115 2015-03-11 Roger Fong <roger_fong@apple.com>
2117 Media element time no longer updates while scrubbing following r181279.
2118 https://bugs.webkit.org/show_bug.cgi?id=142606.
2119 <rdar://problem/20131014>
2121 Reviewed by Eric Carlson.
2123 * Modules/mediacontrols/mediaControlsApple.js:
2124 (Controller.prototype.handleWrapperMouseMove):
2125 Update time as a result of a mouse move if we are scrubbing.
2127 2015-03-11 Joseph Pecoraro <pecoraro@apple.com>
2129 Web Inspector: CSS parser errors in the console should include column numbers
2130 https://bugs.webkit.org/show_bug.cgi?id=114313
2132 Reviewed by Darin Adler.
2134 Test: inspector-protocol/console/warnings-errors.html
2137 (WebCore::CSSParser::currentCharacterOffset):
2138 Get the current character offset depending on the source type.
2139 Add instance variables to track column position and start
2140 line / column for inline stylesheets.
2142 * css/CSSParser.cpp:
2143 (WebCore::CSSParser::CSSParser):
2144 (WebCore::CSSParser::parseSheet):
2145 Initialize new instance variables.
2147 (WebCore::CSSParser::currentLocation):
2148 Update to include column information for the token. Also, if we are on the
2149 first line we may need to take into account a start column offset as well.
2151 (WebCore::CSSParser::realLex):
2152 Set the token's start column.
2153 When bumping the line number, reset the column offset for the next
2154 line with the next character.
2156 (WebCore::CSSParser::syntaxError):
2157 (WebCore::CSSParser::logError):
2158 Include column information.
2160 * css/StyleSheetContents.cpp:
2161 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2162 (WebCore::StyleSheetContents::parseString):
2163 (WebCore::StyleSheetContents::parseStringAtPosition):
2164 Include column information.
2166 * css/StyleSheetContents.h:
2167 * dom/InlineStyleSheetOwner.cpp:
2168 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2169 (WebCore::InlineStyleSheetOwner::createSheet):
2170 Save and use column information later on.
2172 * dom/InlineStyleSheetOwner.h:
2173 * inspector/InspectorStyleSheet.cpp:
2174 (WebCore::InspectorStyleSheet::ensureSourceData):
2175 Updated parser signature needs starting column and no longer has optional parameters.
2177 2015-03-11 Eric Carlson <eric.carlson@apple.com>
2179 [Mac] Update AirPlay handling
2180 https://bugs.webkit.org/show_bug.cgi?id=142541
2182 Reviewed by Sam Weinig.
2184 * WebCore.xcodeproj/project.pbxproj:
2186 (WebCore::Document::showPlaybackTargetPicker):
2187 (WebCore::Document::addPlaybackTargetPickerClient):
2188 (WebCore::Document::removePlaybackTargetPickerClient):
2189 (WebCore::Document::configurePlaybackTargetMonitoring):
2190 (WebCore::Document::requiresPlaybackTargetRouteMonitoring):
2191 (WebCore::Document::playbackTargetAvailabilityDidChange):
2192 (WebCore::Document::didChoosePlaybackTarget):
2194 * html/HTMLMediaElement.cpp:
2195 (WebCore::HTMLMediaElement::registerWithDocument):
2196 (WebCore::HTMLMediaElement::unregisterWithDocument):
2197 (WebCore::HTMLMediaElement::parseAttribute):
2198 * html/HTMLMediaElement.h:
2199 * html/HTMLMediaSession.cpp:
2200 (WebCore::HTMLMediaSession::HTMLMediaSession):
2201 (WebCore::HTMLMediaSession::registerWithDocument):
2202 (WebCore::HTMLMediaSession::unregisterWithDocument):
2203 (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
2204 (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
2205 (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
2206 (WebCore::HTMLMediaSession::didChoosePlaybackTarget):
2207 (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
2208 (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
2209 * html/HTMLMediaSession.h:
2210 * page/ChromeClient.h:
2212 (WebCore::Page::didChoosePlaybackTarget):
2213 (WebCore::Page::playbackTargetAvailabilityDidChange):
2214 (WebCore::Page::configurePlaybackTargetMonitoring):
2216 (WebCore::Page::hasWirelessPlaybackTarget):
2217 (WebCore::Page::playbackTarget):
2218 * platform/audio/MediaSession.cpp:
2219 (WebCore::MediaSession::clientDataBufferingTimerFired):
2220 (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
2221 * platform/audio/MediaSession.h:
2222 (WebCore::MediaSession::didChoosePlaybackTarget):
2223 (WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
2224 (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
2225 (WebCore::MediaSessionClient::setWirelessPlaybackTarget):
2226 * platform/audio/MediaSessionManager.cpp:
2227 (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
2228 * platform/audio/MediaSessionManager.h:
2229 (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
2230 * platform/audio/ios/MediaSessionManagerIOS.h:
2231 * platform/audio/ios/MediaSessionManagerIOS.mm:
2232 (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
2233 (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
2234 * platform/graphics/AVPlaybackTarget.h: Added.
2235 (WebCore::AVPlaybackTarget::~AVPlaybackTarget):
2236 (WebCore::AVPlaybackTarget::AVPlaybackTarget):
2237 (WebCore::AVPlaybackTarget::setDevicePickerContext):
2238 (WebCore::AVPlaybackTarget::devicePickerContext):
2239 * platform/graphics/AVPlaybackTargetPickerClient.h: Added.
2240 (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
2241 * platform/graphics/MediaPlayer.cpp:
2242 (WebCore::MediaPlayer::setWirelessPlaybackTarget):
2243 * platform/graphics/MediaPlayer.h:
2244 * platform/graphics/MediaPlayerPrivate.h:
2245 (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
2246 * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
2247 (WebCore::AVPlaybackTarget::encode):
2248 (WebCore::AVPlaybackTarget::decode):
2249 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2250 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2251 (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2252 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2253 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2254 (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
2255 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
2256 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
2257 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
2258 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
2259 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
2260 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2262 2015-03-11 Alex Christensen <achristensen@webkit.org>
2264 [Content Extensions] Add resource type and load type triggers.
2265 https://bugs.webkit.org/show_bug.cgi?id=142422
2267 Reviewed by Benjamin Poulain.
2271 * WebCore.xcodeproj/project.pbxproj:
2272 * contentextensions/ContentExtensionCompiler.cpp:
2273 (WebCore::ContentExtensions::compileRuleList):
2274 * contentextensions/ContentExtensionParser.cpp:
2275 (WebCore::ContentExtensions::getTypeFlags):
2276 (WebCore::ContentExtensions::loadTrigger):
2277 * contentextensions/ContentExtensionRule.h:
2278 * contentextensions/ContentExtensionsBackend.cpp:
2279 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2280 (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
2281 * contentextensions/ContentExtensionsBackend.h:
2282 * contentextensions/DFABytecode.h:
2283 (WebCore::ContentExtensions::instructionSizeWithArguments):
2284 * contentextensions/DFABytecodeCompiler.cpp:
2285 (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
2286 (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2287 * contentextensions/DFABytecodeCompiler.h:
2288 * contentextensions/DFABytecodeInterpreter.cpp:
2289 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2290 * contentextensions/DFABytecodeInterpreter.h:
2291 * loader/ResourceLoadInfo.cpp: Added.
2292 (WebCore::toResourceType):
2293 (WebCore::readResourceType):
2294 (WebCore::readLoadType):
2295 (WebCore::ResourceLoadInfo::isThirdParty):
2296 (WebCore::ResourceLoadInfo::getResourceFlags):
2297 * loader/ResourceLoadInfo.h: Added.
2298 * loader/cache/CachedResourceLoader.cpp:
2299 (WebCore::CachedResourceLoader::requestResource):
2300 * page/UserContentController.cpp:
2301 (WebCore::UserContentController::actionsForResourceLoad):
2302 (WebCore::UserContentController::actionsForURL): Deleted.
2303 * page/UserContentController.h:
2305 2015-03-11 Tim Horton <timothy_horton@apple.com>
2309 * page/EventHandler.cpp:
2310 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2311 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2312 (WebCore::EventHandler::handleMousePressEventTripleClick):
2313 (WebCore::EventHandler::handleMousePressEventSingleClick):
2315 2015-03-11 Timothy Horton <timothy_horton@apple.com>
2317 <attachment> shouldn't use "user-select: all"
2318 https://bugs.webkit.org/show_bug.cgi?id=142453
2320 Reviewed by Darin Adler.
2322 It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
2323 all (at least for now), let's not use "user-select: all" in the default stylesheet
2324 for <attachment>. It's really overkill anyway, since <attachment> can't have children.
2325 The only "user-select: all" behavior we actually want is select-on-click.
2326 So, we'll implement that in a slightly different way.
2328 Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
2329 fast/attachment/attachment-select-on-click.html
2333 No more "user-select: all".
2335 (attachment:focus): Deleted.
2336 We stopped using attachment focus a while back and forgot to remove this.
2339 (WebCore::Node::shouldSelectOnMouseDown):
2340 Add a virtual function that Node subclasses can override to indicate they
2341 should be selected on mouse down.
2343 * html/HTMLAttachmentElement.h:
2344 Override the aforementioned virtual function; <attachment> should always
2345 be selected on mouse down.
2347 * page/EventHandler.cpp:
2348 (WebCore::nodeToSelectOnMouseDownForNode):
2349 Determine which node should be selected when a mousedown hits the given node.
2350 If there's any "user-select: all", we go with the outermost "user-select: all".
2351 Otherwise, we give the node a chance to say that it wants to be selected itself.
2353 (WebCore::expandSelectionToRespectSelectOnMouseDown):
2354 Rename this function, it's not just about "user-select: all" anymore.
2355 Make use of nodeToSelectOnMouseDownForNode.
2357 (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2358 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2359 (WebCore::EventHandler::handleMousePressEventTripleClick):
2360 (WebCore::EventHandler::handleMousePressEventSingleClick):
2361 (WebCore::expandSelectionToRespectUserSelectAll): Deleted.
2362 Adjust to the new names.
2364 2015-03-11 Geoffrey Garen <ggaren@apple.com>
2366 Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
2367 https://bugs.webkit.org/show_bug.cgi?id=142595
2369 Reviewed by Andreas Kling.
2371 Fixed this bug for canvas.
2373 * html/HTMLCanvasElement.cpp:
2374 (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
2375 required by our IDL generator.
2377 (WebCore::HTMLCanvasElement::createImageBuffer): Use
2378 reportExtraMemoryAllocated.
2380 * html/HTMLCanvasElement.h:
2382 * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
2383 right way during GC. This will match our reportExtraMemoryAllocated
2384 with a reportExtraMemoryVisited during GC.
2386 2015-03-11 Roger Fong <roger_fong@apple.com>
2388 A number of minor edits to the media controls on OSX.
2389 https://bugs.webkit.org/show_bug.cgi?id=142551.
2390 <rdar://problem/20114707>
2392 Reviewed by Darin Adler.
2394 This covers a slew of minor edits to the new media controls. They are as follows.
2395 Small vertical placements adjustments to inline control elements.
2396 Make sure buttons have no focus outlines.
2397 Expand height of mute box that triggers the volume panel appearing.
2398 Turn all button colors into an slightly transparent white.
2399 Center status display text in fullscreen mode.
2400 Lower position of captions container in fullscreen mode.
2401 Show the controls on when done loading of the video an status display is hidden.
2403 * Modules/mediacontrols/mediaControlsApple.css:
2404 (audio::-webkit-media-controls-panel):
2405 (audio::-webkit-media-controls-panel button:focus):
2406 (audio::-webkit-media-controls-rewind-button):
2407 (audio::-webkit-media-controls-play-button):
2408 (audio::-webkit-media-controls-play-button.paused):
2409 (audio::-webkit-media-controls-panel .mute-box):
2410 (video::-webkit-media-controls-volume-max-button):
2411 (audio::-webkit-media-controls-panel .volume-box):
2412 (video::-webkit-media-controls-volume-min-button):
2413 (audio::-webkit-media-controls-wireless-playback-picker-button):
2414 (audio::-webkit-media-controls-toggle-closed-captions-button):
2415 (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
2416 (audio::-webkit-media-controls-fullscreen-button):
2417 (audio::-webkit-media-controls-fullscreen-button.exit):
2418 (audio::-webkit-media-controls-status-display):
2419 (audio::-webkit-media-controls-time-remaining-display):
2420 (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
2421 (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
2422 (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
2423 (video:-webkit-full-screen::-webkit-media-controls-play-button):
2424 (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
2425 (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
2426 (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
2427 (video:-webkit-full-screen::-webkit-media-controls-status-display):
2428 (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
2429 (audio::-webkit-media-controls-panel button:active): Deleted.
2430 * Modules/mediacontrols/mediaControlsApple.js:
2431 (Controller.prototype.setStatusHidden):
2433 2015-03-11 Commit Queue <commit-queue@webkit.org>
2435 Unreviewed, rolling out r179340 and r179344.
2436 https://bugs.webkit.org/show_bug.cgi?id=142598
2438 Caused images to stay alive forever when navigating away from
2439 the page before they finish loading. (Requested by kling on
2442 Reverted changesets:
2444 "CachedImage: ensure clients overrides imageChanged instead of
2446 https://bugs.webkit.org/show_bug.cgi?id=140722
2447 http://trac.webkit.org/changeset/179340
2449 "HTMLImageLoader: fix build failure on assert condition after
2451 https://bugs.webkit.org/show_bug.cgi?id=140722
2452 http://trac.webkit.org/changeset/179344
2454 2015-03-11 Geoffrey Garen <ggaren@apple.com>
2456 Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
2457 https://bugs.webkit.org/show_bug.cgi?id=142593
2459 Reviewed by Andreas Kling.
2461 Adopt deprecatedReportExtraMemory as a short-term fix for runaway
2462 memory growth in these cases where we have not adopted
2463 reportExtraMemoryVisited.
2465 Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
2466 That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
2468 Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
2469 which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
2471 * Modules/mediasource/SourceBuffer.cpp:
2472 (WebCore::SourceBuffer::reportExtraMemoryAllocated):
2473 * bindings/js/JSDocumentCustom.cpp:
2475 * bindings/js/JSImageDataCustom.cpp:
2477 * bindings/js/JSNodeListCustom.cpp:
2478 (WebCore::createWrapper):
2479 * dom/CollectionIndexCache.cpp:
2480 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
2481 * html/HTMLCanvasElement.cpp:
2482 (WebCore::HTMLCanvasElement::createImageBuffer):
2483 * html/HTMLImageLoader.cpp:
2484 (WebCore::HTMLImageLoader::imageChanged):
2485 * html/HTMLMediaElement.cpp:
2486 (WebCore::HTMLMediaElement::parseAttribute):
2487 * xml/XMLHttpRequest.cpp:
2488 (WebCore::XMLHttpRequest::dropProtection):
2490 2015-03-10 Andy Estes <aestes@apple.com>
2492 REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
2493 https://bugs.webkit.org/show_bug.cgi?id=142526
2495 Reviewed by Darin Adler.
2497 * loader/DocumentLoader.cpp:
2498 (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
2500 2015-03-10 Sam Weinig <sam@webkit.org>
2502 Allow adding a button in input elements for auto fill related functionality
2503 <rdar://problem/19782066>
2504 https://bugs.webkit.org/show_bug.cgi?id=142564
2506 Reviewed by Anders Carlsson.
2508 Test: fast/forms/input-auto-fill-button.html
2510 - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
2511 - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
2512 where not feasible due to exported API/SPI).
2515 * WebCore.vcxproj/WebCore.vcxproj:
2516 * WebCore.vcxproj/WebCore.vcxproj.filters:
2517 * WebCore.xcodeproj/project.pbxproj:
2521 (input::-webkit-auto-fill-button):
2522 (input::-webkit-auto-fill-button:hover):
2523 (input::-webkit-auto-fill-button:active):
2524 Add default style rules for the AutoFill button based on the ones
2525 used for caps lock indicator.
2527 * html/HTMLInputElement.cpp:
2528 (WebCore::HTMLInputElement::HTMLInputElement):
2529 (WebCore::HTMLInputElement::autoFillButtonElement):
2530 (WebCore::HTMLInputElement::reset):
2531 (WebCore::HTMLInputElement::setValueFromRenderer):
2532 (WebCore::HTMLInputElement::setAutoFilled):
2533 (WebCore::HTMLInputElement::setShowAutoFillButton):
2534 (WebCore::HTMLInputElement::setAutofilled): Deleted.
2535 * html/HTMLInputElement.h:
2536 (WebCore::HTMLInputElement::isAutoFilled):
2537 (WebCore::HTMLInputElement::showAutoFillButton):
2538 (WebCore::HTMLInputElement::isAutofilled): Deleted.
2539 Add new bit to represent whether the AutoFill button should be shown
2540 or not. By default it is not shown, and the client must enable it.
2542 * html/InputType.cpp:
2543 (WebCore::InputType::updateAutoFillButton):
2545 (WebCore::InputType::autoFillButtonElement):
2546 Add new virtual methods for updating and accessing the AutoFill button.
2548 * html/TextFieldInputType.cpp:
2549 (WebCore::TextFieldInputType::createShadowSubtree):
2550 (WebCore::TextFieldInputType::autoFillButtonElement):
2551 (WebCore::TextFieldInputType::destroyShadowSubtree):
2552 (WebCore::TextFieldInputType::updatePlaceholderText):
2553 (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
2554 (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
2555 (WebCore::TextFieldInputType::createContainer):
2556 (WebCore::TextFieldInputType::createAutoFillButton):
2557 (WebCore::TextFieldInputType::updateAutoFillButton):
2558 * html/TextFieldInputType.h:
2559 Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
2560 is slightly different than for the caps lock indicator, because I didn't want to force
2561 the creation of a container for all <input> elements just in case an AutoFill button was
2562 added. Instead, if an AutoFill button is added, the container is created on the fly and
2563 the existing DOM is updated to move into it. Once a container is created, it is never
2566 * html/shadow/AutoFillButtonElement.cpp: Added.
2567 (WebCore::AutoFillButtonElement::create):
2568 (WebCore::AutoFillButtonElement::AutoFillButtonElement):
2569 (WebCore::AutoFillButtonElement::defaultEventHandler):
2570 * html/shadow/AutoFillButtonElement.h: Added.
2571 Add div subclass that swallows the click event and forwards it to the ChromeClient.
2573 * page/ChromeClient.h:
2574 Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
2577 * testing/Internals.cpp:
2578 (WebCore::Internals::setAutofilled):
2579 (WebCore::Internals::setShowAutoFillButton):
2580 * testing/Internals.h:
2581 * testing/Internals.idl:
2582 Expose a new internals.setShowAutoFillButton() function to allow testing
2583 of the AutoFill button from layout tests.
2585 * accessibility/AccessibilityObject.cpp:
2586 (WebCore::AccessibilityObject::isValueAutofilled):
2587 * css/SelectorCheckerTestFunctions.h:
2588 (WebCore::isAutofilled):
2589 * css/StyleResolver.cpp:
2590 (WebCore::StyleResolver::canShareStyleWithControl):
2591 Update for new spelling of AutoFill.
2593 2015-03-11 Geoffrey Garen <ggaren@apple.com>
2595 Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
2596 https://bugs.webkit.org/show_bug.cgi?id=142589
2598 Reviewed by Andreas Kling.
2600 Updated for renames to JSC extra cost APIs.
2602 Added FIXMEs to our 10 use cases that are currently wrong, including
2603 canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
2605 * Modules/mediasource/SourceBuffer.cpp:
2606 (WebCore::SourceBuffer::appendBufferInternal):
2607 (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2608 (WebCore::SourceBuffer::reportExtraMemoryAllocated):
2609 (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
2610 * Modules/mediasource/SourceBuffer.h:
2611 * bindings/js/JSDocumentCustom.cpp:
2613 * bindings/js/JSImageDataCustom.cpp:
2615 * bindings/js/JSNodeListCustom.cpp:
2616 (WebCore::createWrapper):
2617 * bindings/scripts/CodeGeneratorJS.pm:
2618 (GenerateImplementation):
2619 * dom/CollectionIndexCache.cpp:
2620 (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
2621 (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
2622 * dom/CollectionIndexCache.h:
2623 (WebCore::Iterator>::computeNodeCountUpdatingListCache):
2624 * html/HTMLCanvasElement.cpp:
2625 (WebCore::HTMLCanvasElement::createImageBuffer):
2626 * html/HTMLCollection.h:
2627 (WebCore::CollectionNamedElementCache::didPopulate):
2628 * html/HTMLImageLoader.cpp:
2629 (WebCore::HTMLImageLoader::imageChanged):
2630 * html/HTMLMediaElement.cpp:
2631 (WebCore::HTMLMediaElement::parseAttribute):
2632 * xml/XMLHttpRequest.cpp:
2633 (WebCore::XMLHttpRequest::dropProtection):
2635 2015-03-11 Benjamin Poulain <bpoulain@apple.com>
2637 Add basic support for BOL and EOL assertions to the URL Filter parser
2638 https://bugs.webkit.org/show_bug.cgi?id=142568
2640 Reviewed by Alex Christensen.
2642 This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
2644 Both assertions must be the first/last term of their pattern. Any advanced combination
2645 results in a parsing error.
2647 The BOL assertion is easy to represent: currently, any pattern starts at the beginning
2648 of a line and the NFA are generated accordingly.
2650 I had two options to represent the EOL assertion:
2651 1) Add a new special transition on EOL.
2652 2) Add a new vector of actions to the states, conditional to the EOL input.
2654 I picked the first option to avoid growing every state by a vector
2655 that would be empty in the vast majority of cases.
2658 On the matching side, the interpreter was modified to support transitions on '\0'.
2659 DFABytecodeInstruction::CheckValue now stops when running on a character after
2660 the end of the string.
2662 DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
2663 to avoid going past the end of the input. Second, stop on '\0' too... the reason
2664 is that the unconditional jump is only used for fallback edges of the DFA, fallback
2665 edge are not supposed to accept '\0'.
2667 * contentextensions/DFA.cpp:
2668 (WebCore::ContentExtensions::printTransitions):
2669 * contentextensions/DFABytecodeInterpreter.cpp:
2670 (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2671 * contentextensions/DFANode.h:
2672 * contentextensions/NFA.cpp:
2673 (WebCore::ContentExtensions::NFA::addTransition):
2674 (WebCore::ContentExtensions::NFA::addEpsilonTransition):
2675 (WebCore::ContentExtensions::printTransitions):
2676 * contentextensions/NFANode.h:
2677 * contentextensions/NFAToDFA.cpp:
2678 (WebCore::ContentExtensions::populateTransitions):
2679 (WebCore::ContentExtensions::NFAToDFA::convert):
2680 * contentextensions/URLFilterParser.cpp:
2681 (WebCore::ContentExtensions::Term::Term):
2682 (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
2683 (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2684 (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
2685 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
2687 2015-03-11 Jer Noble <jer.noble@apple.com>
2689 [Mac] Update fullscreen placeholder UI to use Vibrancy.
2690 https://bugs.webkit.org/show_bug.cgi?id=142586
2692 Reviewed by Eric Carlson.
2694 Update the fullscreen placeholder with a translucent vibrant appearance
2695 using NSVisualEffectView. Since NSVisuaEffectView is only available for
2696 OS X 10.10 and above, wrap the new implementation in a version check and
2697 retain the old implementation.
2699 Drive-by: Update the strings for the placeholder view with new HI guidance
2702 * English.lproj/Localizable.strings:
2703 * platform/LocalizedStrings.cpp:
2704 (WebCore::clickToExitFullScreenText):
2705 * platform/mac/WebCoreFullScreenPlaceholderView.h:
2706 * platform/mac/WebCoreFullScreenPlaceholderView.mm:
2707 (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
2709 2015-03-11 Timothy Horton <timothy_horton@apple.com>
2711 Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
2712 https://bugs.webkit.org/show_bug.cgi?id=142549
2714 Reviewed by Simon Fraser.
2716 * page/ViewportConfiguration.cpp:
2717 (WebCore::ViewportConfiguration::ViewportConfiguration):
2718 Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
2719 because it being true does not guarantee that we will ignore scaling constraints,
2720 but it being false does guarantee that we won't.
2722 (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
2723 Ignore scaling constraints if the page:
2724 a) claimed to want to lay out to device-width and then laid out too wide
2725 b) claimed to want to lay out to device-height and then laid out too tall
2726 c) claimed to want to lay out with initialScale=1 and then laid out too wide
2728 (WebCore::ViewportConfiguration::initialScale):
2729 (WebCore::ViewportConfiguration::minimumScale):
2730 (WebCore::ViewportConfiguration::allowsUserScaling):
2731 Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
2732 have some more logic here (as above).
2734 (WebCore::ViewportConfiguration::description):
2735 Dump whether we're ignoring scaling constraints.
2737 (WebCore::ViewportConfiguration::dump):
2738 Use WTFLogAlways so that the output goes to various other logging mechanisms
2739 instead of just stderr.
2741 * page/ViewportConfiguration.h:
2742 (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
2743 (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
2745 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
2747 Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
2748 https://bugs.webkit.org/show_bug.cgi?id=142569
2750 Reviewed by David Hyatt.
2752 Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
2753 that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
2754 return type from int to Optional<int>.
2756 No new tests because there is no behavior change.
2758 * rendering/RenderBlock.cpp:
2759 (WebCore::RenderBlock::baselinePosition):
2760 (WebCore::RenderBlock::firstLineBaseline):
2761 (WebCore::RenderBlock::inlineBlockBaseline):
2762 * rendering/RenderBlock.h:
2763 * rendering/RenderBlockFlow.cpp:
2764 (WebCore::RenderBlockFlow::firstLineBaseline):
2765 (WebCore::RenderBlockFlow::inlineBlockBaseline):
2766 * rendering/RenderBlockFlow.h:
2767 * rendering/RenderBox.h:
2768 (WebCore::RenderBox::firstLineBaseline):
2769 (WebCore::RenderBox::inlineBlockBaseline):
2770 * rendering/RenderDeprecatedFlexibleBox.cpp:
2771 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2772 * rendering/RenderFlexibleBox.cpp:
2773 (WebCore::RenderFlexibleBox::baselinePosition):
2774 (WebCore::RenderFlexibleBox::firstLineBaseline):
2775 (WebCore::RenderFlexibleBox::inlineBlockBaseline):
2776 (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
2777 * rendering/RenderFlexibleBox.h:
2778 * rendering/RenderMenuList.h:
2779 * rendering/RenderTable.cpp:
2780 (WebCore::RenderTable::cellAbove):
2781 (WebCore::RenderTable::cellBelow):
2782 (WebCore::RenderTable::cellBefore):
2783 (WebCore::RenderTable::cellAfter):
2784 (WebCore::RenderTable::firstLineBlock):
2785 (WebCore::RenderTable::baselinePosition):
2786 (WebCore::RenderTable::inlineBlockBaseline):
2787 (WebCore::RenderTable::firstLineBaseline):
2788 * rendering/RenderTable.h:
2789 * rendering/RenderTableCell.cpp:
2790 (WebCore::RenderTableCell::cellBaselinePosition):
2791 * rendering/RenderTableSection.cpp:
2792 (WebCore::RenderTableSection::firstLineBaseline):
2793 * rendering/RenderTableSection.h:
2794 * rendering/RenderTextControl.h:
2795 * rendering/mathml/RenderMathMLBlock.cpp:
2796 (WebCore::RenderMathMLBlock::baselinePosition):
2797 (WebCore::RenderMathMLTable::firstLineBaseline):
2798 * rendering/mathml/RenderMathMLBlock.h:
2799 * rendering/mathml/RenderMathMLFraction.cpp:
2800 (WebCore::RenderMathMLFraction::firstLineBaseline):
2801 * rendering/mathml/RenderMathMLFraction.h:
2802 * rendering/mathml/RenderMathMLOperator.cpp:
2803 (WebCore::RenderMathMLOperator::firstLineBaseline):
2804 * rendering/mathml/RenderMathMLOperator.h:
2805 * rendering/mathml/RenderMathMLRoot.cpp:
2806 (WebCore::RenderMathMLRoot::firstLineBaseline):
2807 (WebCore::RenderMathMLRoot::layout):
2808 * rendering/mathml/RenderMathMLRoot.h:
2809 * rendering/mathml/RenderMathMLRow.cpp:
2810 (WebCore::RenderMathMLRow::layout):
2811 * rendering/mathml/RenderMathMLScripts.cpp:
2812 (WebCore::RenderMathMLScripts::layout):
2813 (WebCore::RenderMathMLScripts::firstLineBaseline):
2814 * rendering/mathml/RenderMathMLScripts.h:
2815 * rendering/mathml/RenderMathMLSpace.cpp:
2816 (WebCore::RenderMathMLSpace::firstLineBaseline):
2817 * rendering/mathml/RenderMathMLSpace.h:
2818 * rendering/mathml/RenderMathMLUnderOver.cpp:
2819 (WebCore::RenderMathMLUnderOver::firstLineBaseline):
2820 * rendering/mathml/RenderMathMLUnderOver.h:
2822 2015-03-11 Timothy Horton <timothy_horton@apple.com>
2824 <attachment>s should be created when dropping files onto contentEditable areas
2825 https://bugs.webkit.org/show_bug.cgi?id=142494
2826 <rdar://problem/19982553>
2828 Reviewed by Anders Carlsson.
2830 Covered by existing tests.
2832 * editing/mac/EditorMac.mm:
2833 (WebCore::Editor::WebContentReader::readFilenames):
2834 Instead of inserting the dropped URLs as strings, make an <attachment>
2837 2015-03-11 David Hyatt <hyatt@apple.com>
2839 Optimize offsetWidth and offsetHeight to avoid doing layouts.
2840 https://bugs.webkit.org/show_bug.cgi?id=142544
2842 Reviewed by Beth Dakin.
2845 (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2847 Added a new method that only updates layout if it determines that the desired dimensions are out
2851 (WebCore::Element::offsetWidth):
2852 (WebCore::Element::offsetHeight):
2853 Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.
2855 2015-03-11 Commit Queue <commit-queue@webkit.org>
2857 Unreviewed, rolling out r181367.
2858 https://bugs.webkit.org/show_bug.cgi?id=142581
2860 Caused crashes on the debug bots (Requested by cdumez on
2865 "Web Inspector: CSS parser errors in the console should
2866 include column numbers"
2867 https://bugs.webkit.org/show_bug.cgi?id=114313
2868 http://trac.webkit.org/changeset/181367
2870 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com>
2872 Inline block children do not have correct baselines if their children are also block elements
2873 https://bugs.webkit.org/show_bug.cgi?id=142559
2875 Reviewed by Darin Adler.
2877 Perform the same computation on child block elements as child inline elements.
2879 Test: fast/text/baseline-inline-block-block-children.html
2881 * rendering/RenderBlockFlow.cpp:
2882 (WebCore::RenderBlockFlow::inlineBlockBaseline):
2884 2015-03-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
2886 [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
2887 https://bugs.webkit.org/show_bug.cgi?id=142577
2889 Reviewed by Carlos Garcia Campos.
2891 No new tests, this is a build fix.
2893 * PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
2894 * PlatformGTK.cmake: Idem.
2896 2015-03-10 Philippe Normand <pnormand@igalia.com>
2898 Rename MediaStreamCenter to RealtimeMediaSourceCenter
2899 https://bugs.webkit.org/show_bug.cgi?id=142535
2901 Reviewed by Eric Carlson.
2903 As per bug title, rename MediaStreamCenter to
2904 RealtimeMediaSourceCenter, this class manages
2905 RealtimeMediaSources, not MediaStreams. Some un-needed includes of
2906 the header were also removed.
2908 2015-03-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2910 Remove unnecessary create() factory functions
2911 https://bugs.webkit.org/show_bug.cgi?id=142558
2913 Reviewed by Darin Adler.
2915 create() function which just returns new instance can be replaced with std::make_unique<>.
2917 No new tests, no behavior changes.
2919 * bindings/js/JSCryptoKeySerializationJWK.cpp:
2920 (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
2921 * crypto/keys/CryptoKeyAES.cpp:
2922 (WebCore::CryptoKeyAES::exportData):
2923 * crypto/keys/CryptoKeyDataOctetSequence.h:
2924 * crypto/keys/CryptoKeyHMAC.cpp:
2925 (WebCore::CryptoKeyHMAC::exportData):
2926 * crypto/keys/CryptoKeySerializationRaw.cpp:
2927 (WebCore::CryptoKeySerializationRaw::keyData):
2928 * platform/audio/mac/CARingBuffer.cpp:
2929 (WebCore::CARingBuffer::create): Deleted.
2930 * platform/audio/mac/CARingBuffer.h:
2931 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2932 (WebCore::AudioSourceProviderAVFObjC::prepare):
2933 * testing/Internals.cpp:
2934 (WebCore::Internals::queueMicroTask):
2935 * testing/MicroTaskTest.cpp:
2936 (WebCore::MicroTaskTest::create): Deleted.
2937 * testing/MicroTaskTest.h:
2938 (WebCore::MicroTaskTest::MicroTaskTest):
2940 2015-03-10 Joseph Pecoraro <pecoraro@apple.com>
2942 Web Inspector: CSS parser errors in the console should include column numbers
2943 https://bugs.webkit.org/show_bug.cgi?id=114313
2945 Reviewed by Benjamin Poulain.
2947 Test: inspector-protocol/console/warnings-errors.html
2950 (WebCore::CSSParser::currentCharacterOffset):
2951 Get the current character offset depending on the source type.
2952 Add instance variables to track column position and start
2953 line / column for inline stylesheets.
2955 * css/CSSParser.cpp:
2956 (WebCore::CSSParser::CSSParser):
2957 (WebCore::CSSParser::parseSheet):
2958 Initialize new instance variables.
2960 (WebCore::CSSParser::currentLocation):
2961 Update to include column information. Also, if we are on the first line
2962 we may need to take into account a start column offset as well.
2964 (WebCore::CSSParser::realLex):
2965 When bumping the line number, reset the column offset for the next
2966 line with the next character.
2968 (WebCore::CSSParser::syntaxError):
2969 (WebCore::CSSParser::logError):
2970 Include column information.
2972 * css/StyleSheetContents.cpp:
2973 (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2974 (WebCore::StyleSheetContents::parseString):
2975 (WebCore::StyleSheetContents::parseStringAtLineAndColumn):
2976 Include column information.
2978 * css/StyleSheetContents.h:
2979 * dom/InlineStyleSheetOwner.cpp:
2980 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2981 (WebCore::InlineStyleSheetOwner::createSheet):
2982 Save and use column information later on.
2984 * dom/InlineStyleSheetOwner.h:
2985 * inspector/InspectorStyleSheet.cpp:
2986 (WebCore::InspectorStyleSheet::ensureSourceData):
2987 Updated parser signature needs starting column and no longer has optional parameters.
2989 2015-03-10 Darin Adler <darin@apple.com>
2991 Try to fix the GTK build.
2993 * html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
2994 by putting in a LANGUAGE_GOBJECT conditional.
2996 2015-03-10 Darin Adler <darin@apple.com>
2998 Some event handler fixes
2999 https://bugs.webkit.org/show_bug.cgi?id=142474
3001 Reviewed by Anders Carlsson.
3003 * bindings/scripts/CodeGenerator.pm:
3004 (GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
3005 handle combinations of & and | in conditional expressions; that's coming up when
3006 combining conditionals for includes in NavigatorContentUtils.idl.
3008 * bindings/scripts/CodeGeneratorJS.pm:
3009 (AddToImplIncludes): Removed the rudimentary attempt to split and merge
3010 conditionals involving | here; instead we rely on the rules in the
3011 GenerateConditionalStringFromAttributeValue to handle this.
3012 (GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
3013 (GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
3015 (JSValueToNative): Changed to take "conditional" as an argument, since getting
3016 it from the signature won't work for a method parameter.
3017 (WriteData): Merge duplicates based on the result of the
3018 GenerateConditionalStringFromAttributeValue function rather than on the values
3019 passed into that function, since that function converts conditionals into a
3020 canonical form and can make two strings equal that don't start out that way.
3022 * bindings/scripts/CodeGeneratorObjC.pm:
3023 (SkipAttribute): Added code to guarantee we won't make Objective-C bindings
3024 for event handlers. We will rename EventListener to EventHandler in a
3027 * bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
3028 by the better logic for conditional includes.
3030 * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
3031 * bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.
3033 * dom/Document.idl: Removed unneeded language #if around event handler
3034 attributes. Removed all the commented out event handler attributes.
3035 Sorted event handler attributes into a single section rather than separating
3036 "standard" from "extensions". Sorted the conditional event handler attributes
3037 into paragraphs at the bottom. We will probably make them all unconditional
3038 in a subsequent patch.
3040 * dom/Element.idl: Removed unneeded language #if around event handler
3041 attributes. Removed all the commented out event handler attributes.
3042 Moved event handler attributes here from all derived element classes to
3043 match the approach from the HTML standard. Also resorted the attributes
3044 as in Document above.
3046 * html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
3047 attributes. Removed all the commented out event handler attributes.
3048 Sorted event handler attributes into a single section rather than separating
3049 "standard" from "overrides".
3051 * html/HTMLElement.cpp:
3052 (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
3053 Added a few missing attribute names, and re-sorted a bit. Moved any from
3054 element subclasses here.
3056 * html/HTMLFormElement.cpp:
3057 (WebCore::HTMLFormElement::parseAttribute): Moved code to handle
3058 oncomplete and oncompleteerror to Element and HTMLElement.
3059 * html/HTMLFormElement.idl: Ditto.
3061 * html/HTMLFrameSetElement.idl: Removed #if and resorted as above.
3063 * html/HTMLInputElement.cpp:
3064 (WebCore::HTMLInputElement::parseAttribute): Moved code to handle
3065 onsearch to HTMLElement.
3067 * html/HTMLMediaElement.cpp:
3068 (WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
3069 all the event handler attributes to HTMLElement.
3070 (WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
3071 if statement I noticed while auditing all calls to JSC::call.
3072 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
3073 I noticed this was missing because a flawed earlier version of my patch was
3074 causing the script to fail, leaving an exception behind that caused an
3075 assertion later. So I audited all calls to JSC::call looking for this mistake.
3077 * html/HTMLMediaElement.idl: Moved all the event handlers from here to
3078 Element. Also changed everything possible to use Conditional instead of #if.
3080 * html/HTMLPlugInImageElement.cpp:
3081 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
3082 clearException. Noticed it was missing while auditing all calls to JSC::call.
3084 * html/HTMLVideoElement.cpp:
3085 (WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
3088 * html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
3089 Conditional instead of #if.
3091 * page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
3094 * svg/svgattrs.in: Remove six unused attribute names. Presumably used in
3095 some older scheme to implement event handlers but no longer used at all.
3097 2015-03-10 Brent Fulgham <bfulgham@apple.com>
3099 CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
3100 https://bugs.webkit.org/show_bug.cgi?id=142411
3102 Reviewed by Simon Fraser.
3104 Tested by css3/scroll-snap/scroll-snap-position-values.html.
3106 Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
3107 may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
3108 and 'left', 'right', and 'center' for the X axis.
3110 Correct implementation to support calculated values for Scroll Snap Point markup. This required the
3111 Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
3112 to a regular CSSValue.
3114 Add tests that these position labels, as well as combinations with percentages and pixel offsets
3115 are parsed properly.
3117 * css/CSSComputedStyleDeclaration.cpp:
3118 (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
3119 when working with Length values. This is necessary to allow calculated results to be based on the proper default
3121 (WebCore::scrollSnapPoints): Ditto.
3122 (WebCore::scrollSnapCoordinates): Ditto.
3123 * css/CSSParser.cpp:
3124 (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
3126 (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
3127 (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
3128 (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
3129 (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
3130 (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
3131 (WebCore::CSSParser::parseTransformOrigin): Ditto.
3132 (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
3134 * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
3135 repeat values as calculations.
3137 2015-03-10 Enrica Casucci <enrica@apple.com>
3139 Add support for more emoji with variation.
3140 https://bugs.webkit.org/show_bug.cgi?id=142548
3141 rdar://problem/20105008
3143 Reviewed by Tim Horton.
3145 Update ICU rules to support new emoji with variation.
3147 Test: editing/selection/extend-by-character-007.html
3149 * platform/text/TextBreakIterator.cpp:
3150 (WebCore::cursorMovementIterator):
3152 2015-03-10 Alex Christensen <achristensen@webkit.org>
3154 Use unsigned for HashSet size.
3155 https://bugs.webkit.org/show_bug.cgi?id=142518
3157 Reviewed by Benjamin Poulain.
3159 * Modules/websockets/WebSocketDeflateFramer.cpp:
3160 (WebCore::WebSocketExtensionDeflateFrame::processResponse):
3161 * bindings/js/SerializedScriptValue.cpp:
3162 (WebCore::CloneSerializer::checkForDuplicate):
3163 (WebCore::CloneSerializer::writeConstantPoolIndex):
3164 * dom/ScriptRunner.cpp:
3165 (WebCore::ScriptRunner::~ScriptRunner):
3166 * loader/ResourceLoadScheduler.h:
3167 * platform/graphics/Font.cpp:
3168 (WebCore::Font::systemFallbackFontForCharacter):
3169 * platform/graphics/FontCache.cpp:
3170 (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
3171 (WebCore::FontCache::purgeInactiveFontData):
3172 * platform/graphics/FontCache.h:
3173 * platform/graphics/freetype/FontCacheFreeType.cpp:
3174 (WebCore::FontCache::systemFallbackForCharacters):
3175 * platform/graphics/ios/FontCacheIOS.mm:
3176 (WebCore::FontCache::getSystemFontFallbackForCharacters):
3177 (WebCore::FontCache::systemFallbackForCharacters):
3178 (WebCore::FontCache::similarFont):
3179 * platform/graphics/mac/FontCacheMac.mm:
3180 (WebCore::shouldAutoActivateFontIfNeeded):
3181 (WebCore::FontCache::systemFallbackForCharacters):
3182 (WebCore::FontCache::similarFont):
3183 * platform/graphics/win/FontCacheWin.cpp:
3184 (WebCore::FontCache::systemFallbackForCharacters):
3185 * rendering/RenderDeprecatedFlexibleBox.cpp:
3186 (WebCore::FlexBoxIterator::next):
3187 * rendering/RenderTableSection.cpp:
3188 (WebCore::RenderTableSection::computeOverflowFromCells):
3190 2015-03-10 Eric Carlson <eric.carlson@apple.com>
3192 [Mac] Refactor media controls code
3193 https://bugs.webkit.org/show_bug.cgi?id=142455
3195 Reviewed by Dean Jackson.
3197 No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.
3199 * Modules/mediacontrols/mediaControlsApple.js:
3201 (Controller.prototype.addVideoListeners):
3202 (Controller.prototype.removeVideoListeners):
3203 (Controller.prototype.createControls):
3204 (Controller.prototype.setControlsType):
3205 (Controller.prototype.configureInlineControls):
3206 (Controller.prototype.updateStatusDisplay):
3207 (Controller.prototype.handlePanelMouseDown):
3208 (Controller.prototype.showControls):
3209 (Controller.prototype.hideControls):
3210 (Controller.prototype.handleOptimizedFullscreenButtonClicked):
3211 (Controller.prototype.currentPlaybackTargetIsWireless):
3212 (Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
3213 (Controller.prototype.updateWirelessPlaybackStatus):
3214 (Controller.prototype.updateWirelessTargetAvailable):
3215 (Controller.prototype.handleWirelessPickerButtonClicked):
3216 (Controller.prototype.handleWirelessPlaybackChange):
3217 (Controller.prototype.handleWirelessTargetAvailableChange):
3218 (Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
3219 * Modules/mediacontrols/mediaControlsiOS.js:
3221 (ControllerIOS.prototype.addVideoListeners):
3222 (ControllerIOS.prototype.removeVideoListeners):
3223 (ControllerIOS.prototype.createControls):
3224 (ControllerIOS.prototype.setControlsType):
3225 (ControllerIOS.prototype.configureInlineControls):
3226 (ControllerIOS.prototype.showControls):
3227 (ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd):
3228 (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
3229 (ControllerIOS.prototype.updateStatusDisplay):
3230 (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
3231 (ControllerIOS.prototype.currentPlaybackTargetIsWireless): Deleted.
3232 (ControllerIOS.prototype.updateWirelessPlaybackStatus): Deleted.
3233 (ControllerIOS.prototype.updateWirelessTargetAvailable): Deleted.
3234 (ControllerIOS.prototype.hideControls): Deleted.
3235 (ControllerIOS.prototype.handleWirelessPlaybackChange): Deleted.
3236 (ControllerIOS.prototype.handleWirelessTargetAvailableChange): Deleted.
3238 2015-03-10 Said Abou-Hallawa <sabouhallawa@apple.com>
3240 Remove PassRefPtr from svg/properties classes.
3241 https://bugs.webkit.org/show_bug.cgi?id=142063.
3243 Reviewed by Darin Adler.
3245 Remove PassRefPtr from svg/properties classes. All the return types and
3246 the local variables should be RefPtr. If we are sure the pointer can't
3247 be null, we use Ref instead.
3249 * svg/SVGMarkerElement.cpp:
3250 (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
3251 (WebCore::SVGMarkerElement::orientTypeAnimated):
3252 * svg/SVGMarkerElement.h:
3253 * svg/SVGPathElement.cpp:
3254 (WebCore::SVGPathElement::lookupOrCreateDWrapper):
3255 (WebCore::SVGPathElement::pathSegList):
3256 (WebCore::SVGPathElement::animatedPathSegList):
3257 * svg/SVGPathElement.h:
3258 * svg/SVGPolyElement.cpp:
3259 (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
3260 (WebCore::SVGPolyElement::points):
3261 (WebCore::SVGPolyElement::animatedPoints):
3262 * svg/SVGPolyElement.h:
3263 * svg/SVGTextContentElement.cpp:
3264 (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
3265 (WebCore::SVGTextContentElement::textLengthAnimated):
3266 * svg/SVGTextContentElement.h:
3267 * svg/SVGViewSpec.cpp:
3268 (WebCore::SVGViewSpec::transform):
3269 (WebCore::SVGViewSpec::viewBoxAnimated):
3270 (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
3271 (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
3272 (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
3273 (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
3274 * svg/SVGViewSpec.h:
3275 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
3276 (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
3277 * svg/properties/SVGAnimatedListPropertyTearOff.h:
3278 (WebCore::SVGAnimatedListPropertyTearOff::create):
3279 * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
3280 (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
3281 * svg/properties/SVGAnimatedProperty.h:
3282 (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
3283 * svg/properties/SVGAnimatedPropertyMacros.h:
3284 * svg/properties/SVGAnimatedPropertyTearOff.h:
3285 (WebCore::SVGAnimatedPropertyTearOff::create):
3286 * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
3287 (WebCore::SVGAnimatedStaticPropertyTearOff::create):
3288 * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
3289 (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
3290 * svg/properties/SVGListProperty.h:
3291 (WebCore::SVGListProperty::initializeValuesAndWrappers):
3292 (WebCore::SVGListProperty::getItemValuesAndWrappers):
3293 (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
3294 (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
3295 (WebCore::SVGListProperty::removeItemValuesAndWrappers):
3296 (WebCore::SVGListProperty::appendItemValuesAndWrappers):
3297 * svg/properties/SVGListPropertyTearOff.h:
3298 (WebCore::SVGListPropertyTearOff::create):
3299 (WebCore::SVGListPropertyTearOff::initialize):
3300 (WebCore::SVGListPropertyTearOff::getItem):
3301 (WebCore::SVGListPropertyTearOff::insertItemBefore):
3302 (WebCore::SVGListPropertyTearOff::replaceItem):
3303 (WebCore::SVGListPropertyTearOff::removeItem):
3304 (WebCore::SVGListPropertyTearOff::appendItem):
3305 * svg/properties/SVGPathSegListPropertyTearOff.cpp:
3306 (WebCore::SVGPathSegListPropertyTearOff::getItem):
3307 (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
3308 (WebCore::SVGPathSegListPropertyTearOff::removeItem):
3309 * svg/properties/SVGPathSegListPropertyTearOff.h:
3310 (WebCore::SVGPathSegListPropertyTearOff::create):
3311 (WebCore::SVGPathSegListPropertyTearOff::initialize):
3312 (WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
3313 (WebCore::SVGPathSegListPropertyTearOff::appendItem):
3314 * svg/properties/SVGPropertyInfo.h:
3315 * svg/properties/SVGStaticListPropertyTearOff.h:
3316 (WebCore::SVGStaticListPropertyTearOff::create):
3317 * svg/properties/SVGStaticPropertyTearOff.h:
3318 (WebCore::SVGStaticPropertyTearOff::create):
3319 * svg/properties/SVGTransformListPropertyTearOff.h:
3320 (WebCore::SVGTransformListPropertyTearOff::create):
3321 (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
3322 (WebCore::SVGTransformListPropertyTearOff::consolidate):
3324 2015-03-10 Timothy Horton <timothy_horton@apple.com>
3328 * platform/network/cf/ResourceHandleCFNet.cpp:
3329 (WebCore::ResourceHandle::createCFURLConnection):
3331 2015-03-10 Benjamin Poulain <bpoulain@apple.com>
3333 Extend URL filter's Term definition to support groups/subpatterns
3334 https://bugs.webkit.org/show_bug.cgi?id=142519
3336 Reviewed by Alex Christensen.
3338 Pretty simple extension: Term is extended to support holding
3339 a Vector of Term. The quantifier of the Term applies to its
3340 Vector of term as a whole.
3342 To avoid exposing too much internal in the API of Term, I moved
3343 graph generation from GraphBuilder to Term.
3345 Sinking a CharacterSet works as usual. Sinking a Group is done
3346 by sinking each of its Terms one by one and then apply the quantifier
3347 on the whole subgraph. This is done by recursively calling into
3348 Term::generateGraph().
3350 Since groups could be nested, the groups make a stack with the latest
3352 When sinking a floating Term, it is sunk to the latest open group. If there is no open
3353 group, we use the prefix tree and sink the whole subpattern to the graph.
3355 * contentextensions/URLFilterParser.cpp:
3356 (WebCore::ContentExtensions::Term::Term):
3357 (WebCore::ContentExtensions::Term::extendGroupSubpattern):
3358 (WebCore::ContentExtensions::Term::generateGraph):
3359 (WebCore::ContentExtensions::Term::operator==):
3360 (WebCore::ContentExtensions::Term::hash):
3361 (WebCore::ContentExtensions::Term::isUniversalTransition):
3362 (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
3363 (WebCore::ContentExtensions::Term::destroy):
3364 (WebCore::ContentExtensions::Term::Group::operator==):
3365 (WebCore::ContentExtensions::Term::Group::hash):
3366 (WebCore::ContentExtensions::GraphBuilder::finalize):
3367 (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
3368 (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
3369 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
3370 (WebCore::ContentExtensions::Term::quantifier): Deleted.
3371 (WebCore::ContentExtensions::Term::visitSimpleTransitions): Deleted.
3372 (WebCore::ContentExtensions::GraphBuilder::addTransitions): Deleted.
3373 (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm): Deleted.
3375 2015-03-10 Roger Fong <roger_fong@apple.com>
3377 Adjustments to media control fonts.
3378 https://bugs.webkit.org/show_bug.cgi?id=142509.
3379 <rdar://problem/20085228>
3381 Reviewed by Darin Adler.
3383 Use system font for controls. Adjust surrounding divs accordingly.
3384 Apply subpixel antialiasing to all media control text.
3385 * Modules/mediacontrols/mediaControlsApple.css:
3386 (::-webkit-media-controls)