1 2013-08-21 Róbert Sipka <sipka@inf.u-szeged.hu>
3 <https://webkit.org/b/120109> [curl] only include WebCoreBundleWin on Windows
5 Reviewed by Brent Fulgham.
7 The WebCoreBundleWin is a windows specific file, it is only needed on Windows.
9 * platform/network/curl/ResourceHandleManager.cpp:
11 2013-08-21 Jae Hyun Park <jae.park@company100.net>
13 [Qt] Remove unused code path in PluginView
14 https://bugs.webkit.org/show_bug.cgi?id=113173
16 Reviewed by Anders Carlsson.
18 m_platformLayer in PluginView has been removed in r121710, but there are
19 still some leftover code path related to m_platformLayer. This patch
20 removes unused code path.
22 No new tests, removing unused code paths.
24 * plugins/PluginView.h:
26 * plugins/qt/PluginViewQt.cpp:
27 (WebCore::PluginView::updatePluginWidget):
28 (WebCore::PluginView::paint):
30 2013-08-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
32 Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled
33 https://bugs.webkit.org/show_bug.cgi?id=100050
35 Reviewed by Antti Koivisto.
37 Always let WidthIterator iterate over an entire TextRun to avoid problems
38 with pixel rounding or shaping on partial runs.
40 This fix is necessary for Qt because the complex font-path can not disable
41 shaping, leading to the complex path painting slighly different from the
42 fast path, which messes up selection painting.
44 No change in functionality, no new tests.
46 * platform/graphics/Font.cpp:
47 (WebCore::Font::drawText):
48 (WebCore::Font::drawEmphasisMarks):
49 (WebCore::Font::selectionRectForText):
50 (WebCore::Font::offsetForPosition):
51 * platform/graphics/FontFastPath.cpp:
52 (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
53 (WebCore::Font::selectionRectForSimpleText):
54 (WebCore::Font::offsetForPositionForSimpleText):
55 * platform/graphics/GlyphBuffer.h:
56 (WebCore::GlyphBuffer::add):
58 * platform/graphics/WidthIterator.cpp:
59 (WebCore::WidthIterator::advanceInternal):
60 * platform/graphics/WidthIterator.h:
61 (WidthIterator): Removed now unused advanceOneCharacter method.
63 2013-08-20 Antonio Gomes <a1.gomes@sisa.samsung.com>
65 Harden RenderBox::canBeScrolledAndHasScrollableArea logic
66 https://bugs.webkit.org/show_bug.cgi?id=104373
68 Reviewed by Simon Fraser.
70 Previously if a say div has a overflown content on 'y' but is
71 styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
72 would still return true. It interfers, among other things, with the way
75 Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
76 scrollability in a given axis (x or y); They are used when checking if a given box is in
77 fact programatically scrollable.
79 Test: fast/events/autoscroll-overflow-hidden-longhands.html
81 WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
84 * rendering/RenderBox.cpp:
85 (WebCore::RenderBox::canBeProgramaticallyScrolled):
86 * rendering/RenderBox.h:
87 (WebCore::RenderBox::hasScrollableOverflowX):
88 (WebCore::RenderBox::hasScrollableOverflowY):
90 2013-08-19 Antonio Gomes <a1.gomes@sisa.samsung.com>
92 Text dragging can scroll overflow:hidden boxes
93 https://bugs.webkit.org/show_bug.cgi?id=119760
95 Reviewed by Darin Adler.
97 Consider the case of the following HTML:
98 <div style="overflow:hidden; width: 100px; height: 100px" >
99 <input id="input" type="text" size=10 value="any text here!"/>
100 <button style="position:relative; top: 100px; left: 100px"/>
103 If ones starts a text selection by dragging the mouse from within the input
104 field, and continues to drag beyong the outer div boundary, the latter will
105 be scrolled no matter its overflow:hidden style.
106 That happens because when the autoscroll has started, it gets propagated up
107 to the current layer's parent layer, instead of the to current layer's enclosing
110 Patch fixes the issue by hardening the way scrolling is
111 propagated upwards when autoscroll is being performed.
113 RenderLayer::enclosingScrollableLayer method also got rewritten
114 in terms of RenderLayer tree traversing, instead of RenderObject tree.
115 The rewrite adds support for cross frame upwards traversal.
117 Test: fast/events/autoscroll-upwards-propagation.html
119 * rendering/RenderLayer.cpp:
120 (WebCore::parentLayerCrossFrame):
121 (WebCore::RenderLayer::enclosingScrollableLayer):
122 (WebCore::RenderLayer::scrollRectToVisible):
124 2013-08-20 Jer Noble <jer.noble@apple.com>
126 <https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
128 Reviewed by Eric Carlson.
130 Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
131 rateChanged() notifications.
133 * html/HTMLMediaElement.cpp:
134 (WebCore::HTMLMediaElement::clearMediaPlayer):
135 (WebCore::HTMLMediaElement::stop):
137 2013-08-20 David Barr <davidbarr@chromium.org>, Gyuyoung Kim <gyuyoung.kim@samsung.com>
139 <https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
141 Reviewed by Beth Dakin.
143 In support of ongoing css3-images image-orientation implementation. This patch passes
144 an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
145 can know information of image orientation by the argument.
147 Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
149 * html/HTMLCanvasElement.cpp:
150 (WebCore::HTMLCanvasElement::paint):
151 * html/canvas/CanvasRenderingContext2D.cpp:
152 (WebCore::CanvasRenderingContext2D::drawImage):
153 (WebCore::drawImageToContext):
154 * platform/graphics/ImageOrientation.h: Add setter functions.
155 (WebCore::ImageOrientationDescription::setRespectImageOrientation):
156 (WebCore::ImageOrientationDescription::setImageOrientationEnum):
157 * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
158 (WebCore::BitmapTextureImageBuffer::updateContents):
159 * rendering/RenderBoxModelObject.cpp:
160 (WebCore::RenderBoxModelObject::paintNinePieceImage):
161 * rendering/RenderImage.cpp:
162 (WebCore::RenderImage::paintReplaced):
163 (WebCore::RenderImage::paintIntoRect):
164 * rendering/RenderSnapshottedPlugIn.cpp:
165 (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
167 2013-08-20 Gavin Barraclough <barraclough@apple.com>
169 https://bugs.webkit.org/show_bug.cgi?id=120093
170 Remove getOwnPropertyDescriptor trap
172 Reviewed by Geoff Garen.
174 All implementations of this method are now called via the method table, and equivalent in behaviour.
175 Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
178 * bindings/js/JSDOMWindowCustom.cpp:
179 * bindings/scripts/CodeGeneratorJS.pm:
181 (GenerateImplementation):
182 (GenerateConstructorDeclaration):
183 (GenerateConstructorHelperMethods):
184 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
185 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
186 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
187 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
188 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
189 * bindings/scripts/test/JS/JSTestEventConstructor.h:
190 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
191 * bindings/scripts/test/JS/JSTestEventTarget.h:
192 * bindings/scripts/test/JS/JSTestException.cpp:
193 * bindings/scripts/test/JS/JSTestException.h:
194 * bindings/scripts/test/JS/JSTestInterface.cpp:
195 * bindings/scripts/test/JS/JSTestInterface.h:
196 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
197 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
198 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
199 * bindings/scripts/test/JS/JSTestNamedConstructor.h:
200 * bindings/scripts/test/JS/JSTestNode.cpp:
201 * bindings/scripts/test/JS/JSTestNode.h:
202 * bindings/scripts/test/JS/JSTestObj.cpp:
203 * bindings/scripts/test/JS/JSTestObj.h:
204 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
205 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
206 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
207 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
208 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
209 * bindings/scripts/test/JS/JSTestTypedefs.h:
210 * bridge/jsc/BridgeJSC.h:
211 (JSC::Bindings::Instance::getOwnPropertySlot):
212 * bridge/objc/objc_runtime.h:
213 * bridge/objc/objc_runtime.mm:
214 * bridge/runtime_array.cpp:
215 * bridge/runtime_array.h:
216 * bridge/runtime_method.cpp:
217 * bridge/runtime_method.h:
218 * bridge/runtime_object.cpp:
219 * bridge/runtime_object.h:
220 - remove getOwnPropertyDescriptor
222 2013-08-20 Antti Koivisto <antti@apple.com>
224 <https://webkit.org/b/120071> Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
226 Reviewed by Darin Adler.
228 This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
230 * dom/ContainerNode.h:
231 (WebCore::ContainerNode::childShouldCreateRenderer):
233 (WebCore::Element::childShouldCreateRenderer):
235 * dom/NodeRenderingContext.cpp:
236 (WebCore::NodeRenderingContext::shouldCreateRenderer):
237 * dom/NodeRenderingContext.h:
239 Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
240 Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
243 (WebCore::hasShadowRootParent):
244 * html/HTMLDetailsElement.cpp:
245 (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
246 * html/HTMLDetailsElement.h:
247 * html/HTMLFormControlElement.cpp:
248 (WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
249 * html/HTMLFormControlElement.h:
250 * html/HTMLMediaElement.cpp:
251 (WebCore::HTMLMediaElement::childShouldCreateRenderer):
252 * html/HTMLMediaElement.h:
253 * html/HTMLMeterElement.cpp:
254 (WebCore::HTMLMeterElement::childShouldCreateRenderer):
255 * html/HTMLMeterElement.h:
256 * html/HTMLOptGroupElement.h:
257 (WebCore::isHTMLOptGroupElement):
258 * html/HTMLOptionElement.h:
259 (WebCore::isHTMLOptionElement):
260 * html/HTMLProgressElement.cpp:
261 (WebCore::HTMLProgressElement::childShouldCreateRenderer):
262 * html/HTMLProgressElement.h:
263 * html/HTMLSelectElement.cpp:
264 (WebCore::HTMLSelectElement::childShouldCreateRenderer):
265 * html/HTMLSelectElement.h:
266 * html/HTMLSummaryElement.cpp:
267 (WebCore::HTMLSummaryElement::childShouldCreateRenderer):
268 * html/HTMLSummaryElement.h:
269 * html/HTMLTextFormControlElement.cpp:
270 (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
271 (WebCore::enclosingTextFormControl):
272 * html/HTMLTextFormControlElement.h:
273 * html/ValidationMessage.cpp:
274 (WebCore::ValidationMessage::shadowTreeContains):
275 * html/ValidationMessage.h:
276 * html/shadow/InsertionPoint.cpp:
277 (WebCore::InsertionPoint::rendererIsNeeded):
278 * html/shadow/InsertionPoint.h:
279 (WebCore::isActiveInsertionPoint):
281 Remove isShadowBoundary() as it was equivalent to isActive().
282 Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
284 (WebCore::hasShadowRootOrActiveInsertionPointParent):
286 Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
288 * svg/SVGAElement.cpp:
289 (WebCore::SVGAElement::childShouldCreateRenderer):
291 * svg/SVGAltGlyphElement.cpp:
292 (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
293 * svg/SVGAltGlyphElement.h:
294 * svg/SVGDocument.cpp:
295 (WebCore::SVGDocument::childShouldCreateRenderer):
297 * svg/SVGElement.cpp:
298 (WebCore::SVGElement::childShouldCreateRenderer):
300 * svg/SVGFilterElement.cpp:
301 (WebCore::SVGFilterElement::childShouldCreateRenderer):
302 * svg/SVGFilterElement.h:
303 * svg/SVGFilterPrimitiveStandardAttributes.h:
304 * svg/SVGForeignObjectElement.cpp:
305 (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
306 * svg/SVGForeignObjectElement.h:
307 * svg/SVGSVGElement.h:
308 (WebCore::toSVGSVGElement):
309 * svg/SVGSwitchElement.cpp:
310 (WebCore::SVGSwitchElement::childShouldCreateRenderer):
311 * svg/SVGSwitchElement.h:
312 * svg/SVGTRefElement.cpp:
313 (WebCore::SVGTRefElement::childShouldCreateRenderer):
314 * svg/SVGTRefElement.h:
315 * svg/SVGTSpanElement.cpp:
316 (WebCore::SVGTSpanElement::childShouldCreateRenderer):
317 * svg/SVGTSpanElement.h:
318 * svg/SVGTextElement.cpp:
319 (WebCore::SVGTextElement::childShouldCreateRenderer):
320 * svg/SVGTextElement.h:
321 * svg/SVGTextPathElement.cpp:
322 (WebCore::SVGTextPathElement::childShouldCreateRenderer):
323 * svg/SVGTextPathElement.h:
325 2013-08-20 Benjamin Poulain <benjamin@webkit.org>
327 <https://webkit.org/b/120050> Don't bother using a Vector for the ouput of querySelector, just return the first element found
329 Reviewed by Ryosuke Niwa.
331 Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
332 simply use a trait to define what to do in the loop.
334 * dom/SelectorQuery.cpp:
335 (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
336 (WebCore::SelectorDataList::queryAll):
337 (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
338 (WebCore::SelectorDataList::queryFirst):
339 (WebCore::SelectorDataList::executeFastPathForIdSelector):
340 (WebCore::elementsForLocalName):
341 (WebCore::anyElement):
342 (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
343 (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
344 (WebCore::SelectorDataList::executeSingleSelectorData):
345 (WebCore::SelectorDataList::executeSingleMultiSelectorData):
346 (WebCore::SelectorDataList::execute):
347 * dom/SelectorQuery.h:
349 2013-08-20 Antti Koivisto <antti@apple.com>
351 Rollout the previous patch for landing with the correct ChangeLog.
353 013-08-20 Jacky Jiang <zhajiang@blackberry.com>
355 <https://webkit.org/b/120082> [BlackBerry] Remove unused previousTextureRect in LayerTiler
357 Reviewed by Rob Buis.
358 Internally reviewed by Mike Lattanzio and Jakob Petsovits.
360 * platform/graphics/blackberry/LayerTiler.cpp:
361 (WebCore::LayerTiler::updateTextureContentsIfNeeded):
363 2013-08-20 Antti Koivisto <antti@apple.com>
365 <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
367 Reviewed by Darin Adler.
369 This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
372 (WebCore::Element::rendererIsNeeded):
374 * dom/NodeRenderingContext.cpp:
375 (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
376 (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
377 * dom/PseudoElement.cpp:
378 (WebCore::PseudoElement::rendererIsNeeded):
379 * dom/PseudoElement.h:
380 * html/HTMLAppletElement.cpp:
381 (WebCore::HTMLAppletElement::rendererIsNeeded):
382 * html/HTMLAppletElement.h:
383 * html/HTMLElement.cpp:
384 (WebCore::HTMLElement::rendererIsNeeded):
385 * html/HTMLElement.h:
386 * html/HTMLEmbedElement.cpp:
387 (WebCore::HTMLEmbedElement::rendererIsNeeded):
388 * html/HTMLEmbedElement.h:
389 * html/HTMLFormElement.cpp:
390 (WebCore::HTMLFormElement::rendererIsNeeded):
391 * html/HTMLFormElement.h:
392 * html/HTMLFrameElement.cpp:
393 (WebCore::HTMLFrameElement::rendererIsNeeded):
394 * html/HTMLFrameElement.h:
395 * html/HTMLFrameSetElement.cpp:
396 (WebCore::HTMLFrameSetElement::rendererIsNeeded):
397 * html/HTMLFrameSetElement.h:
398 * html/HTMLIFrameElement.cpp:
399 (WebCore::HTMLIFrameElement::rendererIsNeeded):
400 * html/HTMLIFrameElement.h:
401 * html/HTMLInputElement.cpp:
402 (WebCore::HTMLInputElement::rendererIsNeeded):
403 * html/HTMLInputElement.h:
404 * html/HTMLMediaElement.cpp:
405 (WebCore::HTMLMediaElement::rendererIsNeeded):
406 * html/HTMLMediaElement.h:
407 * html/HTMLObjectElement.cpp:
408 (WebCore::HTMLObjectElement::rendererIsNeeded):
409 * html/HTMLObjectElement.h:
410 * html/HTMLOptGroupElement.h:
411 * html/HTMLOptionElement.h:
412 * html/HTMLVideoElement.cpp:
413 (WebCore::HTMLVideoElement::rendererIsNeeded):
414 * html/HTMLVideoElement.h:
415 * html/shadow/DetailsMarkerControl.cpp:
416 (WebCore::DetailsMarkerControl::rendererIsNeeded):
417 * html/shadow/DetailsMarkerControl.h:
418 * html/shadow/InsertionPoint.cpp:
419 (WebCore::InsertionPoint::rendererIsNeeded):
420 * html/shadow/InsertionPoint.h:
421 * html/shadow/MeterShadowElement.cpp:
422 (WebCore::MeterShadowElement::rendererIsNeeded):
423 (WebCore::MeterInnerElement::rendererIsNeeded):
424 * html/shadow/MeterShadowElement.h:
425 * html/shadow/ProgressShadowElement.cpp:
426 (WebCore::ProgressShadowElement::rendererIsNeeded):
427 (WebCore::ProgressInnerElement::rendererIsNeeded):
428 * html/shadow/ProgressShadowElement.h:
429 * svg/SVGDescElement.h:
431 (WebCore::SVGElement::rendererIsNeeded):
432 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
433 (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
434 * svg/SVGFilterPrimitiveStandardAttributes.h:
435 * svg/SVGFontElement.h:
436 * svg/SVGForeignObjectElement.cpp:
437 (WebCore::SVGForeignObjectElement::rendererIsNeeded):
438 * svg/SVGForeignObjectElement.h:
439 * svg/SVGGElement.cpp:
440 (WebCore::SVGGElement::rendererIsNeeded):
442 * svg/SVGGlyphElement.h:
443 * svg/SVGGlyphRefElement.h:
444 * svg/SVGHKernElement.h:
445 * svg/SVGMarkerElement.h:
446 * svg/SVGMissingGlyphElement.h:
447 * svg/SVGSVGElement.cpp:
448 (WebCore::SVGSVGElement::rendererIsNeeded):
449 * svg/SVGSVGElement.h:
450 * svg/SVGStopElement.cpp:
451 (WebCore::SVGStopElement::rendererIsNeeded):
452 * svg/SVGStopElement.h:
453 * svg/SVGStyledElement.cpp:
454 (WebCore::SVGStyledElement::rendererIsNeeded):
455 * svg/SVGStyledElement.h:
456 * svg/SVGTRefElement.cpp:
457 (WebCore::SVGTRefElement::rendererIsNeeded):
458 * svg/SVGTRefElement.h:
459 * svg/SVGTSpanElement.cpp:
460 (WebCore::SVGTSpanElement::rendererIsNeeded):
461 * svg/SVGTSpanElement.h:
462 * svg/SVGTextPathElement.cpp:
463 (WebCore::SVGTextPathElement::rendererIsNeeded):
464 * svg/SVGTextPathElement.h:
465 * svg/SVGTitleElement.h:
466 * svg/SVGVKernElement.h:
467 * svg/SVGViewElement.h:
469 2013-08-20 Daniel Bates <dabates@apple.com>
471 <https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
473 Reviewed by Darin Adler.
475 Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
476 such support is enabled.
478 * dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
479 * dom/Clipboard.h: Ditto.
481 2013-08-20 Antti Koivisto <antti@apple.com>
483 <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
485 Reviewed by Darin Adler.
487 This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
490 (WebCore::Element::rendererIsNeeded):
492 * dom/NodeRenderingContext.cpp:
493 (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
494 (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
495 * dom/PseudoElement.cpp:
496 (WebCore::PseudoElement::rendererIsNeeded):
497 * dom/PseudoElement.h:
498 * html/HTMLAppletElement.cpp:
499 (WebCore::HTMLAppletElement::rendererIsNeeded):
500 * html/HTMLAppletElement.h:
501 * html/HTMLElement.cpp:
502 (WebCore::HTMLElement::rendererIsNeeded):
503 * html/HTMLElement.h:
504 * html/HTMLEmbedElement.cpp:
505 (WebCore::HTMLEmbedElement::rendererIsNeeded):
506 * html/HTMLEmbedElement.h:
507 * html/HTMLFormElement.cpp:
508 (WebCore::HTMLFormElement::rendererIsNeeded):
509 * html/HTMLFormElement.h:
510 * html/HTMLFrameElement.cpp:
511 (WebCore::HTMLFrameElement::rendererIsNeeded):
512 * html/HTMLFrameElement.h:
513 * html/HTMLFrameSetElement.cpp:
514 (WebCore::HTMLFrameSetElement::rendererIsNeeded):
515 * html/HTMLFrameSetElement.h:
516 * html/HTMLIFrameElement.cpp:
517 (WebCore::HTMLIFrameElement::rendererIsNeeded):
518 * html/HTMLIFrameElement.h:
519 * html/HTMLInputElement.cpp:
520 (WebCore::HTMLInputElement::rendererIsNeeded):
521 * html/HTMLInputElement.h:
522 * html/HTMLMediaElement.cpp:
523 (WebCore::HTMLMediaElement::rendererIsNeeded):
524 * html/HTMLMediaElement.h:
525 * html/HTMLObjectElement.cpp:
526 (WebCore::HTMLObjectElement::rendererIsNeeded):
527 * html/HTMLObjectElement.h:
528 * html/HTMLOptGroupElement.h:
529 * html/HTMLOptionElement.h:
530 * html/HTMLVideoElement.cpp:
531 (WebCore::HTMLVideoElement::rendererIsNeeded):
532 * html/HTMLVideoElement.h:
533 * html/shadow/DetailsMarkerControl.cpp:
534 (WebCore::DetailsMarkerControl::rendererIsNeeded):
535 * html/shadow/DetailsMarkerControl.h:
536 * html/shadow/InsertionPoint.cpp:
537 (WebCore::InsertionPoint::rendererIsNeeded):
538 * html/shadow/InsertionPoint.h:
539 * html/shadow/MeterShadowElement.cpp:
540 (WebCore::MeterShadowElement::rendererIsNeeded):
541 (WebCore::MeterInnerElement::rendererIsNeeded):
542 * html/shadow/MeterShadowElement.h:
543 * html/shadow/ProgressShadowElement.cpp:
544 (WebCore::ProgressShadowElement::rendererIsNeeded):
545 (WebCore::ProgressInnerElement::rendererIsNeeded):
546 * html/shadow/ProgressShadowElement.h:
547 * svg/SVGDescElement.h:
549 (WebCore::SVGElement::rendererIsNeeded):
550 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
551 (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
552 * svg/SVGFilterPrimitiveStandardAttributes.h:
553 * svg/SVGFontElement.h:
554 * svg/SVGForeignObjectElement.cpp:
555 (WebCore::SVGForeignObjectElement::rendererIsNeeded):
556 * svg/SVGForeignObjectElement.h:
557 * svg/SVGGElement.cpp:
558 (WebCore::SVGGElement::rendererIsNeeded):
560 * svg/SVGGlyphElement.h:
561 * svg/SVGGlyphRefElement.h:
562 * svg/SVGHKernElement.h:
563 * svg/SVGMarkerElement.h:
564 * svg/SVGMissingGlyphElement.h:
565 * svg/SVGSVGElement.cpp:
566 (WebCore::SVGSVGElement::rendererIsNeeded):
567 * svg/SVGSVGElement.h:
568 * svg/SVGStopElement.cpp:
569 (WebCore::SVGStopElement::rendererIsNeeded):
570 * svg/SVGStopElement.h:
571 * svg/SVGStyledElement.cpp:
572 (WebCore::SVGStyledElement::rendererIsNeeded):
573 * svg/SVGStyledElement.h:
574 * svg/SVGTRefElement.cpp:
575 (WebCore::SVGTRefElement::rendererIsNeeded):
576 * svg/SVGTRefElement.h:
577 * svg/SVGTSpanElement.cpp:
578 (WebCore::SVGTSpanElement::rendererIsNeeded):
579 * svg/SVGTSpanElement.h:
580 * svg/SVGTextPathElement.cpp:
581 (WebCore::SVGTextPathElement::rendererIsNeeded):
582 * svg/SVGTextPathElement.h:
583 * svg/SVGTitleElement.h:
584 * svg/SVGVKernElement.h:
585 * svg/SVGViewElement.h:
587 2013-08-20 Tim Horton <timothy_horton@apple.com>
589 <https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
590 <rdar://problem/12958038>
592 Reviewed by Joseph Pecoraro.
594 Update the inspector overlay's layout before painting, if it is stale.
596 No new tests; fixes an intermittent assertion failure in some existing tests.
598 * inspector/InspectorOverlay.cpp:
599 (WebCore::InspectorOverlay::paint):
601 2013-08-20 Daniel Bates <dabates@apple.com>
603 Build fix after <http://trac.webkit.org/changeset/154260> (https://webkit.org/b/119949);
604 declare Clipboard::hasData() when building with and without drag support
608 2013-08-20 Hans Muller <hmuller@adobe.com>
610 <https://webkit.org/b/119849> [CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
612 Reviewed by Alexandru Chiculita.
614 Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
615 method now computes first logical top location where a line segment can be laid
616 out within a RasterShape, i.e. a shape derived from an image valued URL resource.
618 A detailed description of the algorithm can be found in
619 http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
621 The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
622 with a vertical gap that spans the entire line now causes the method to short circuit
623 and return an empty interval list.
625 Tests: fast/shapes/shape-inside/shape-inside-image-003.html
626 fast/shapes/shape-inside/shape-inside-image-004.html
627 fast/shapes/shape-inside/shape-inside-image-005.html
629 * rendering/shapes/RasterShape.cpp:
630 (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
631 (WebCore::RasterShapeIntervals::getIncludedIntervals):
632 (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
633 * rendering/shapes/RasterShape.h:
635 2013-08-20 Pratik Solanki <psolanki@apple.com>
637 <https://webkit.org/b/120029> Document::markers() should return a reference
639 Reviewed by Andreas Kling.
641 Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
642 m_markers as const and initialize it in member initialization.
645 (WebCore::Document::Document):
647 (WebCore::Document::markers):
648 * editing/AlternativeTextController.cpp:
649 (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
650 (WebCore::AlternativeTextController::applyAlternativeTextToRange):
651 (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
652 (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
653 (WebCore::AlternativeTextController::respondToChangedSelection):
654 (WebCore::AlternativeTextController::respondToAppliedEditing):
655 (WebCore::AlternativeTextController::respondToUnappliedEditing):
656 (WebCore::AlternativeTextController::markReversed):
657 (WebCore::AlternativeTextController::markCorrection):
658 (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
659 (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
660 (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
661 (WebCore::AlternativeTextController::applyDictationAlternative):
662 * editing/CompositeEditCommand.cpp:
663 (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
664 * editing/DeleteSelectionCommand.cpp:
665 (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
666 * editing/DictationCommand.cpp:
667 (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
668 * editing/Editor.cpp:
669 (WebCore::Editor::ignoreSpelling):
670 (WebCore::Editor::learnSpelling):
671 (WebCore::Editor::advanceToNextMisspelling):
672 (WebCore::Editor::clearMisspellingsAndBadGrammar):
673 (WebCore::Editor::markAndReplaceFor):
674 (WebCore::Editor::changeBackToReplacedString):
675 (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
676 (WebCore::Editor::countMatchesForText):
677 (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
678 (WebCore::Editor::respondToChangedSelection):
679 (WebCore::Editor::selectionStartHasMarkerFor):
680 * editing/SpellChecker.cpp:
681 (WebCore::SpellChecker::didCheckSucceed):
682 * editing/SplitTextNodeCommand.cpp:
683 (WebCore::SplitTextNodeCommand::doApply):
684 (WebCore::SplitTextNodeCommand::doUnapply):
685 * editing/TextCheckingHelper.cpp:
686 (WebCore::TextCheckingHelper::findFirstMisspelling):
687 (WebCore::TextCheckingHelper::findFirstGrammarDetail):
688 * page/FrameView.cpp:
689 (WebCore::FrameView::getTickmarks):
690 (WebCore::FrameView::paintContents):
692 (WebCore::Page::unmarkAllTextMatches):
693 * rendering/HitTestResult.cpp:
694 (WebCore::HitTestResult::spellingToolTip):
695 (WebCore::HitTestResult::replacedString):
696 (WebCore::HitTestResult::dictationAlternatives):
697 * rendering/InlineTextBox.cpp:
698 (WebCore::InlineTextBox::paintDocumentMarkers):
699 * rendering/svg/SVGInlineFlowBox.cpp:
700 (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
701 * testing/Internals.cpp:
702 (WebCore::Internals::markerCountForNode):
703 (WebCore::Internals::markerAt):
704 (WebCore::Internals::addTextMatchMarker):
706 2013-08-20 Pratik Solanki <psolanki@apple.com>
708 <https://webkit.org/b/119875> localeToScriptCodeForFontSelection should use hash tables with larger default capacity
710 Reviewed by Darin Adler.
712 The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
713 these hash tables so we don't have to expand them during initialization.
715 No new tests because no functional changes.
717 * platform/text/LocaleToScriptMappingDefault.cpp:
718 (WebCore::scriptNameToCode):
719 (WebCore::localeToScriptCodeForFontSelection):
721 2013-08-20 Eric Carlson <eric.carlson@apple.com>
723 <https://webkit.org/b/120068> Media controls can be attached lazily
725 Reviewed by Jer Noble.
727 Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
729 * html/HTMLMediaElement.cpp:
730 (WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
732 2013-08-20 Daniel Bates <dabates@apple.com>
734 <https://webkit.org/b/120072> Use nullAtom instead of defining static local in
735 Accessibility{Object, RenderObject}::actionVerb()
737 Reviewed by Chris Fleizach.
739 * accessibility/AccessibilityObject.cpp:
740 (WebCore::AccessibilityObject::actionVerb):
741 * accessibility/AccessibilityRenderObject.cpp:
742 (WebCore::AccessibilityRenderObject::actionVerb):
744 2013-08-20 Daniel Bates <dabates@apple.com>
746 <https://webkit.org/b/119914> [iOS] Upstream changes to WebCore/accessibility
748 Reviewed by Darin Adler and Chris Fleizach.
750 * accessibility/AccessibilityMenuList.cpp:
751 (WebCore::AccessibilityMenuList::press):
752 (WebCore::AccessibilityMenuList::isCollapsed):
753 * accessibility/AccessibilityObject.cpp:
754 (WebCore::AccessibilityObject::headingElementForNode):
755 (WebCore::AccessibilityObject::actionVerb):
756 * accessibility/AccessibilityObject.h:
757 * accessibility/AccessibilityRenderObject.cpp:
758 (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
759 (WebCore::AccessibilityRenderObject::actionVerb):
760 * accessibility/AccessibilityTableColumn.cpp:
761 (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
762 * accessibility/AccessibilityTableHeaderContainer.cpp:
763 (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
764 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
766 2013-08-20 Bruno de Oliveira Abinader <bruno.d@partner.samsung.com>
768 [css3-text] Implement CSS3 text-decoration shorthand
769 https://bugs.webkit.org/show_bug.cgi?id=92000
771 Reviewed by Darin Adler.
773 Implements the text-decoration shorthand (with -webkit- prefix), as specified by the CSS3 Text Decoration specification:
774 http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-property
776 Backported from Blink:
777 https://src.chromium.org/viewvc/blink?revision=156266&view=revision
779 Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html
780 fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
782 * css/CSSComputedStyleDeclaration.cpp:
783 (WebCore::ComputedStyleExtractor::propertyValue):
785 (WebCore::CSSParser::parseValue):
786 (WebCore::CSSParser::addTextDecorationProperty):
787 (WebCore::CSSParser::parseTextDecoration):
788 * css/CSSProperty.cpp:
789 (WebCore::CSSProperty::isInheritedProperty):
790 * css/CSSPropertyNames.in:
791 * css/StylePropertyShorthand.cpp:
792 (WebCore::webkitTextDecorationShorthand):
793 (WebCore::shorthandForProperty):
794 (WebCore::matchingShorthandsForLonghand):
795 * css/StylePropertyShorthand.h:
797 2013-08-20 Gavin Barraclough <barraclough@apple.com>
799 https://bugs.webkit.org/show_bug.cgi?id=120054
800 Remove some dead code following getOwnPropertyDescriptor cleanup
802 Reviewed by Oliver Hunt.
804 * bindings/js/JSPluginElementFunctions.cpp:
805 * bindings/js/JSPluginElementFunctions.h:
806 - remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
808 2013-08-20 Alex Christensen <achristensen@apple.com>
810 Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
811 https://bugs.webkit.org/show_bug.cgi?id=119512
813 Reviewed by Brent Fulgham.
815 * WebCore.vcxproj/WebCore.vcxproj:
816 * WebCore.vcxproj/WebCore.vcxproj.filters:
817 * WebCore.vcxproj/WebCoreCommon.props:
818 * WebCore.vcxproj/WebCoreGeneratedCommon.props:
819 * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
820 * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
821 Replaced obj32, bin32, and lib32 with macros for 64-bit build.
823 2013-08-20 Jessie Berlin <jberlin@apple.com>
825 Remove a string no longer used after r154251.
827 Rubber-stamped by Brady Eidson.
829 * English.lproj/Localizable.strings:
831 2013-08-20 Jakob Petsovits <jpetsovits@blackberry.com>
833 [BlackBerry] Avoid an assertion from calling releaseBufferDrawable(nullptr)
834 https://bugs.webkit.org/show_bug.cgi?id=119862
837 Reviewed by Antonio Gomes.
839 destroyBuffer() finds a null pointer valid but
840 releaseBufferDrawable() does not. Fix by adding a
843 No new tests, caught by existing layout test runs.
845 * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
846 (WebCore::ImageBuffer::~ImageBuffer):
848 2013-08-19 Gustavo Noronha Silva <gns@gnome.org>
850 <https://webkit.org/b/120048> [GTK] Add stubs for APIs that went missing in the DOM bindings
852 Reviewed by Martin Robinson.
854 No new tests, these are just stubs for the DOM bindings API.
856 * bindings/gobject/WebKitDOMCustom.cpp:
857 (webkit_dom_bar_info_get_property):
858 (webkit_dom_bar_info_class_init):
859 (webkit_dom_bar_info_init):
860 (webkit_dom_bar_info_get_visible):
861 (webkit_dom_console_get_memory):
862 (webkit_dom_css_style_declaration_get_property_css_value):
863 (webkit_dom_document_get_webkit_hidden):
864 (webkit_dom_document_get_webkit_visibility_state):
865 (webkit_dom_html_document_open):
866 (webkit_dom_html_element_set_item_id):
867 (webkit_dom_html_element_get_item_id):
868 (webkit_dom_html_element_get_item_ref):
869 (webkit_dom_html_element_get_item_prop):
870 (webkit_dom_html_element_set_item_scope):
871 (webkit_dom_html_element_get_item_scope):
872 (webkit_dom_html_element_get_item_type):
873 (webkit_dom_html_properties_collection_get_property):
874 (webkit_dom_html_properties_collection_class_init):
875 (webkit_dom_html_properties_collection_init):
876 (webkit_dom_html_properties_collection_item):
877 (webkit_dom_html_properties_collection_named_item):
878 (webkit_dom_html_properties_collection_get_length):
879 (webkit_dom_html_properties_collection_get_names):
880 (webkit_dom_node_get_attributes):
881 (webkit_dom_node_has_attributes):
882 (webkit_dom_memory_info_get_property):
883 (webkit_dom_memory_info_class_init):
884 (webkit_dom_memory_info_init):
885 (webkit_dom_memory_info_get_total_js_heap_size):
886 (webkit_dom_memory_info_get_used_js_heap_size):
887 (webkit_dom_memory_info_get_js_heap_size_limit):
888 (webkit_dom_micro_data_item_value_class_init):
889 (webkit_dom_micro_data_item_value_init):
890 (webkit_dom_performance_get_memory):
891 (webkit_dom_property_node_list_get_property):
892 (webkit_dom_property_node_list_class_init):
893 (webkit_dom_property_node_list_init):
894 (webkit_dom_property_node_list_item):
895 (webkit_dom_property_node_list_get_length):
896 * bindings/gobject/WebKitDOMCustom.h:
898 2013-08-20 Antti Koivisto <antti@apple.com>
900 <https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
902 Reviewed by Andreas Kling.
904 Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
906 Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
908 * css/StyleResolver.cpp:
909 (WebCore::StyleResolver::State::initForStyleResolve):
910 (WebCore::StyleResolver::styleForElement):
911 * css/StyleResolver.h:
912 (WebCore::StyleResolver::State::State):
913 (WebCore::StyleResolver::State::elementLinkState):
915 Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
917 * dom/ComposedShadowTreeWalker.cpp:
918 (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
919 (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
920 (WebCore::ComposedShadowTreeWalker::traverseParent):
922 Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
924 (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
925 (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
926 * dom/ComposedShadowTreeWalker.h:
928 (WebCore::Node::insertionParentForBinding):
929 * dom/NodeRenderingContext.cpp:
930 (WebCore::NodeRenderingContext::NodeRenderingContext):
931 (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
933 Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
934 a few non-performance critical places.
936 (WebCore::NodeRenderingContext::resetStyleInheritance):
938 Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
940 * dom/NodeRenderingContext.h:
941 * dom/NodeRenderingTraversal.cpp:
942 (WebCore::NodeRenderingTraversal::parentSlow):
943 * dom/NodeRenderingTraversal.h:
944 (WebCore::NodeRenderingTraversal::parent):
946 Remove ParentDetails.
948 * html/HTMLAttributeNames.in:
949 * html/shadow/InsertionPoint.cpp:
951 Remove unused resetStyleInheritance attribute.
953 (WebCore::InsertionPoint::removedFrom):
954 (WebCore::findInsertionPointOf):
958 * html/shadow/InsertionPoint.h:
959 * testing/Internals.cpp:
960 (WebCore::Internals::includerFor):
962 2013-08-20 Antti Koivisto <antti@apple.com>
964 <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
966 Reviewed by Anders Carlsson.
968 * html/HTMLDocument.cpp:
969 (WebCore::HTMLDocument::isFrameSet):
970 * html/HTMLFrameElement.cpp:
971 (WebCore::HTMLFrameElement::didAttachRenderers):
973 Make helper public in HTMLFrameSetElement.
975 * html/HTMLFrameSetElement.cpp:
976 (WebCore::HTMLFrameSetElement::findContaining):
978 Static function for finding containing frameset, if any.
980 (WebCore::HTMLFrameSetElement::willAttachRenderers):
982 This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more.
984 * html/HTMLFrameSetElement.h:
985 (WebCore::isHTMLFrameSetElement):
986 (WebCore::toHTMLFrameSetElement):
988 Add casting functions.
990 * rendering/RenderFrameSet.cpp:
991 (WebCore::RenderFrameSet::frameSet):
993 2013-08-20 Antti Koivisto <antti@apple.com>
995 <https://webkit.org/b/120023> REGRESSION(r154257): svg/custom/bug78807.svg and svg/custom/use-invalid-style.svg failing
997 Reviewed by Andreas Kling.
1000 (WebCore::XMLErrors::insertErrorMessageBlock): "reattach" had accidentally turned into "detach" in refactoring.
1002 2013-08-20 Antti Koivisto <antti@apple.com>
1004 <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp
1006 Reviewed by Andreas Kling.
1008 PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it.
1010 Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached
1011 along with rendering. However in this case the page inserts a <style> that uses ::before along with an element
1012 that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly
1013 insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash.
1015 Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html
1018 (WebCore::Element::insertedInto):
1019 (WebCore::Element::removedFrom):
1021 Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document.
1022 When they are added normally during render tree attach these calls don't happen either.
1024 2013-08-20 Ryosuke Niwa <rniwa@webkit.org>
1026 Windows build fix after r154314.
1028 * platform/graphics/cg/PathCG.cpp:
1029 (WebCore::Path::platformAddPathForRoundedRect):
1031 2013-08-19 Hurnjoo Lee <hurnjoo.lee@samsung.com>
1033 [Cairo] Canvas putImageData is not working as expected
1034 https://bugs.webkit.org/show_bug.cgi?id=119992
1036 Reviewed by Darin Adler.
1038 ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
1039 If the alpha value is not 255, image data should always be pre-multiplied.
1041 Test: fast/canvas/canvas-putImageData-zero-alpha.html
1043 * platform/graphics/cairo/ImageBufferCairo.cpp:
1044 (WebCore::ImageBuffer::putByteArray):
1046 2013-08-19 Santosh Mahto <santosh.ma@samsung.com>
1048 <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset to calculateLocalTimeOffset
1050 Reviewed by Darin Adler.
1052 Resolving code error.
1054 * html/BaseDateAndTimeInputType.cpp:
1055 (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
1056 * html/MonthInputType.cpp:
1057 (WebCore::MonthInputType::defaultValueForStepUp):
1058 * html/TimeInputType.cpp:
1059 (WebCore::TimeInputType::defaultValueForStepUp):
1061 2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
1063 <https://webkit.org/b/120049> Delete code for Snow Leopard
1065 Reviewed by Benjamin Poulain.
1067 Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
1070 * WebCore.xcodeproj/project.pbxproj:
1071 * editing/mac/EditorMac.mm:
1072 (WebCore::Editor::pasteWithPasteboard):
1073 * page/ContextMenuController.cpp:
1074 (WebCore::ContextMenuController::populate):
1075 * platform/LocalizedStrings.cpp:
1076 (WebCore::truncatedStringForLookupMenuItem):
1077 (WebCore::contextMenuItemTagSearchWeb):
1078 (WebCore::contextMenuItemTagLookUpInDictionary):
1079 * platform/MemoryPressureHandler.cpp:
1080 * platform/audio/mac/AudioBusMac.mm:
1081 (WebCore::AudioBus::loadPlatformResource):
1082 * platform/graphics/ca/GraphicsLayerCA.cpp:
1083 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1084 * platform/graphics/ca/PlatformCALayer.h:
1085 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1086 (PlatformCALayer::acceleratesDrawing):
1087 (PlatformCALayer::setAcceleratesDrawing):
1088 (PlatformCALayer::contentsScale):
1089 (PlatformCALayer::setContentsScale):
1090 (PlatformCALayer::synchronouslyDisplayTilesInRect):
1091 * platform/graphics/ca/mac/TileController.mm:
1092 (WebCore::TileController::setScale):
1093 (WebCore::TileController::setAcceleratesDrawing):
1094 (WebCore::TileController::createTileLayer):
1095 * platform/graphics/cg/ImageBufferDataCG.cpp:
1096 (WebCore::ImageBufferData::getData):
1097 (WebCore::ImageBufferData::putData):
1098 * platform/graphics/cg/ImageBufferDataCG.h:
1099 * platform/graphics/cg/PathCG.cpp:
1100 (WebCore::Path::platformAddPathForRoundedRect):
1101 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1102 (WebCore::FontPlatformData::FontPlatformData):
1103 (WebCore::FontPlatformData::setFont):
1104 * platform/graphics/mac/FontMac.mm:
1105 (WebCore::showGlyphsWithAdvances):
1106 * platform/graphics/mac/GraphicsContextMac.mm:
1107 (WebCore::GraphicsContext::drawLineForDocumentMarker):
1108 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1109 (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
1110 (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
1111 * platform/graphics/mac/WebLayer.mm:
1112 (drawLayerContents):
1113 * platform/mac/CursorMac.mm:
1114 (WebCore::Cursor::ensurePlatformCursor):
1115 * platform/mac/EmptyProtocolDefinitions.h: Removed.
1116 * platform/mac/MemoryPressureHandlerMac.mm:
1117 (WebCore::MemoryPressureHandler::releaseMemory):
1118 * platform/mac/NSScrollerImpDetails.h:
1119 * platform/mac/PlatformEventFactoryMac.mm:
1120 (WebCore::momentumPhaseForEvent):
1121 (WebCore::phaseForEvent):
1122 * platform/mac/ScrollAnimatorMac.mm:
1123 * platform/mac/SharedTimerMac.mm:
1124 * platform/mac/WebCoreSystemInterface.h:
1125 * platform/mac/WebCoreSystemInterface.mm:
1126 * platform/network/mac/ResourceHandleMac.mm:
1127 * platform/network/mac/ResourceRequestMac.mm:
1128 (WebCore::ResourceRequest::doUpdateResourceRequest):
1129 (WebCore::ResourceRequest::doUpdatePlatformRequest):
1130 * platform/text/cf/HyphenationCF.cpp:
1131 * platform/text/mac/HyphenationMac.mm: Removed.
1132 * rendering/RenderLayerBacking.cpp:
1133 (WebCore::RenderLayerBacking::containsPaintedContent):
1134 * rendering/RenderThemeMac.mm:
1135 (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
1137 2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
1139 <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
1141 Reviewed by Simon Fraser.
1143 Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
1145 They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
1147 * rendering/RenderBlock.cpp:
1148 (WebCore::RenderBlock::computeOverflow):
1150 2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
1152 <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
1154 Reviewed by Kent Tamura.
1156 Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
1158 In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
1159 which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
1161 Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
1163 Test: fast/forms/range/range-type-change-oninput.html
1165 * html/shadow/SliderThumbElement.cpp:
1166 (WebCore::SliderThumbElement::isDisabledFormControl):
1167 (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
1168 (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
1169 (WebCore::SliderThumbElement::setPositionFromPoint):
1170 (WebCore::SliderThumbElement::hostInput):
1172 2013-08-19 Alexey Proskuryakov <ap@apple.com>
1174 https://bugs.webkit.org/show_bug.cgi?id=120028
1175 ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
1176 when navigating to an uncached subframe
1178 Reviewed by Brady Eidson.
1180 Test: http/tests/navigation/post-frames-goback1-uncached.html
1182 * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
1183 Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
1185 * loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
1186 Now that we always set m_requestedHistoryItem, there is no need to traverse frame
1187 tree to see if this document is being loaded as part of b/f navigation (which was
1190 2013-08-19 Gavin Barraclough <barraclough@apple.com>
1192 https://bugs.webkit.org/show_bug.cgi?id=120034
1193 Remove custom getOwnPropertyDescriptor for global objects
1195 Reviewed by Geoff Garen.
1197 Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
1199 * bindings/js/JSDOMWindowCustom.cpp:
1200 (WebCore::JSDOMWindow::getOwnPropertySlot):
1201 - Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
1202 all properties are marked as read-only, non-configurable to prevent defineProperty.
1204 2013-08-19 Gavin Barraclough <barraclough@apple.com>
1206 https://bugs.webkit.org/show_bug.cgi?id=119995
1207 Start removing custom implementations of getOwnPropertyDescriptor
1209 Reviewed by Sam Weinig.
1211 This can now typically implemented in terms of getOwnPropertySlot.
1212 Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
1213 Switch over most classes in JSC & the WebCore bindings generator to use this.
1215 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1216 * bindings/js/JSHTMLAppletElementCustom.cpp:
1217 * bindings/js/JSHTMLEmbedElementCustom.cpp:
1218 * bindings/js/JSHTMLObjectElementCustom.cpp:
1219 * bindings/js/JSHistoryCustom.cpp:
1220 (WebCore::JSHistory::getOwnPropertySlotDelegate):
1221 * bindings/js/JSLocationCustom.cpp:
1222 (WebCore::JSLocation::getOwnPropertySlotDelegate):
1223 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1224 - Remove getOwnPropertyDescriptorDelegate methods,
1225 Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
1226 * bindings/scripts/CodeGeneratorJS.pm:
1228 (GenerateImplementation):
1229 (GenerateConstructorHelperMethods):
1230 - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
1231 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1232 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1233 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1234 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1235 * bindings/scripts/test/JS/JSTestException.cpp:
1236 * bindings/scripts/test/JS/JSTestInterface.cpp:
1237 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1238 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1239 * bindings/scripts/test/JS/JSTestNode.cpp:
1240 * bindings/scripts/test/JS/JSTestObj.cpp:
1241 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1242 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1243 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1244 - Update test expectations.
1246 2013-08-19 Benjamin Poulain <benjamin@webkit.org>
1248 <https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
1250 Reviewed by Darin Adler.
1252 None of the attributes of RuleSet should be modified directly.
1254 * css/DocumentRuleSets.cpp:
1255 (WebCore::DocumentRuleSets::initUserStyle):
1256 * css/ElementRuleCollector.cpp:
1257 (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
1259 (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
1260 (WebCore::RuleSet::regionSelectorsAndRuleSets):
1261 (WebCore::RuleSet::ruleCount):
1262 * css/StyleResolver.cpp:
1263 (WebCore::StyleResolver::checkRegionStyle):
1265 2013-08-19 Benjamin Poulain <benjamin@webkit.org>
1267 <https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
1269 Reviewed by Darin Adler.
1271 The value DoesNotCrossBoundary is the default behavior boundary of SelectorChecker,
1272 and it is never changed by ElementRuleCollector.
1274 * css/ElementRuleCollector.cpp:
1275 (WebCore::ElementRuleCollector::collectMatchingRules):
1276 (WebCore::ElementRuleCollector::ruleMatches):
1277 * css/ElementRuleCollector.h:
1278 (WebCore::ElementRuleCollector::ElementRuleCollector):
1280 2013-08-19 Benjamin Poulain <benjamin@webkit.org>
1282 <https://webkit.org/b/119934> Remove a repeated "private:" from ElementRuleCollector
1284 Reviewed by Darin Adler.
1286 * css/ElementRuleCollector.h:
1288 2013-08-19 Pratik Solanki <psolanki@apple.com>
1290 <https://webkit.org/b/120019> Document::visitedLinkState() should return a reference
1292 Reviewed by Andreas Kling.
1294 Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
1296 * css/StyleResolver.cpp:
1297 (WebCore::StyleResolver::State::initElement):
1299 (WebCore::Document::visitedLinkState):
1300 * history/CachedPage.cpp:
1301 (WebCore::CachedPage::restore):
1303 (WebCore::Page::allVisitedStateChanged):
1304 (WebCore::Page::visitedStateChanged):
1306 2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
1308 ASSERTION FAILED: !node || node->isShadowRoot() in WebCore::EventRetargeter::eventTargetRespectingTargetRules
1309 https://bugs.webkit.org/show_bug.cgi?id=119720
1311 Reviewed by Andy Estes.
1313 Merge https://chromium.googlesource.com/chromium/blink/+/4ce9bfbf54410179cd0f18b3d1a912045fc0ec3d
1315 * dom/EventRetargeter.h:
1316 (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
1318 2013-08-19 Darin Adler <darin@apple.com>
1320 <https://webkit.org/b/120013> Tighten up logic in HTMLTableRowsCollection
1322 Reviewed by Andy Estes.
1324 I was looking for incorrect uses of hasLocalName in places where hasTagName should be used.
1325 The use in HTMLTableRowsCollection looked like that kind of mistake, but when I tried to
1326 make a test case to show the mistake, I found I could not. So I wrote assertions to restate
1327 what I learned, and removed an unneeded null check and tightened up the code a bit. This
1328 should make code size slightly smaller.
1330 * html/HTMLTableRowsCollection.cpp:
1331 (WebCore::assertRowIsInTable): Added. Asserts that the row's position in the table is consistent
1332 with the invariants of how the collection class works. A row that is processed here would have
1333 to be an immediate child of the table, or an immediate child of a table section that in turn is
1334 an immediate child of the table.
1335 (WebCore::isInSection): Added. Replaces the three more-specific helper functions. Unlike those,
1336 this does not do a null check.
1337 (WebCore::HTMLTableRowsCollection::rowAfter): Changed to use the two new functions.
1339 2013-08-19 Pratik Solanki <psolanki@apple.com>
1341 <https://webkit.org/b/119918> Frame::selection() should return a reference
1343 Reviewed by Darin Adler.
1345 m_selection is never NULL so return a reference from Frame::selection(). Also removed some
1346 unnecessary null checks and assert diff ts exposed as a result.
1348 * accessibility/AccessibilityRenderObject.cpp:
1349 (WebCore::AccessibilityRenderObject::selection):
1350 (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1351 (WebCore::AccessibilityRenderObject::isFocused):
1352 (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
1353 (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1354 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1355 (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
1356 (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
1357 (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1358 (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
1359 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1360 (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1361 * css/SelectorChecker.cpp:
1362 (WebCore::SelectorChecker::isFrameFocused):
1363 * dom/CharacterData.cpp:
1364 (WebCore::CharacterData::setDataAndUpdate):
1366 (WebCore::Document::nodeChildrenWillBeRemoved):
1367 (WebCore::Document::nodeWillBeRemoved):
1369 (WebCore::Element::updateFocusAppearance):
1370 * editing/AlternativeTextController.cpp:
1371 (WebCore::AlternativeTextController::stopPendingCorrection):
1372 (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1373 (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
1374 (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1375 (WebCore::AlternativeTextController::timerFired):
1376 (WebCore::AlternativeTextController::respondToChangedSelection):
1377 * editing/DeleteButtonController.cpp:
1378 (WebCore::DeleteButtonController::respondToChangedSelection):
1379 (WebCore::DeleteButtonController::enable):
1380 (WebCore::DeleteButtonController::deleteTarget):
1381 * editing/DeleteSelectionCommand.cpp:
1382 (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1383 * editing/DictationCommand.cpp:
1384 (WebCore::DictationCommand::insertText):
1385 * editing/EditCommand.cpp:
1386 (WebCore::EditCommand::EditCommand):
1387 * editing/EditingStyle.cpp:
1388 (WebCore::EditingStyle::mergeTypingStyle):
1389 * editing/Editor.cpp:
1390 (WebCore::Editor::selectionForCommand):
1391 (WebCore::Editor::canEdit):
1392 (WebCore::Editor::canEditRichly):
1393 (WebCore::Editor::canDHTMLCut):
1394 (WebCore::Editor::canDHTMLCopy):
1395 (WebCore::Editor::canCopy):
1396 (WebCore::Editor::canDelete):
1397 (WebCore::Editor::canSmartCopyOrDelete):
1398 (WebCore::Editor::deleteWithDirection):
1399 (WebCore::Editor::deleteSelectionWithSmartDelete):
1400 (WebCore::Editor::replaceSelectionWithFragment):
1401 (WebCore::Editor::selectedRange):
1402 (WebCore::Editor::tryDHTMLCopy):
1403 (WebCore::Editor::tryDHTMLCut):
1404 (WebCore::Editor::hasBidiSelection):
1405 (WebCore::Editor::selectionUnorderedListState):
1406 (WebCore::Editor::selectionOrderedListState):
1407 (WebCore::Editor::increaseSelectionListLevel):
1408 (WebCore::Editor::increaseSelectionListLevelOrdered):
1409 (WebCore::Editor::increaseSelectionListLevelUnordered):
1410 (WebCore::Editor::decreaseSelectionListLevel):
1411 (WebCore::Editor::findEventTargetFromSelection):
1412 (WebCore::Editor::applyStyle):
1413 (WebCore::Editor::applyParagraphStyle):
1414 (WebCore::Editor::applyStyleToSelection):
1415 (WebCore::Editor::applyParagraphStyleToSelection):
1416 (WebCore::Editor::selectionStartHasStyle):
1417 (WebCore::Editor::selectionHasStyle):
1418 (WebCore::Editor::selectionStartCSSPropertyValue):
1419 (WebCore::Editor::appliedEditing):
1420 (WebCore::Editor::insertTextWithoutSendingTextEvent):
1421 (WebCore::Editor::insertLineBreak):
1422 (WebCore::Editor::insertParagraphSeparator):
1423 (WebCore::Editor::cut):
1424 (WebCore::Editor::copy):
1425 (WebCore::Editor::paste):
1426 (WebCore::Editor::baseWritingDirectionForSelectionStart):
1427 (WebCore::Editor::selectComposition):
1428 (WebCore::Editor::setComposition):
1429 (WebCore::Editor::ignoreSpelling):
1430 (WebCore::Editor::learnSpelling):
1431 (WebCore::Editor::advanceToNextMisspelling):
1432 (WebCore::Editor::misspelledWordAtCaretOrRange):
1433 (WebCore::Editor::isSelectionUngrammatical):
1434 (WebCore::Editor::guessesForMisspelledOrUngrammatical):
1435 (WebCore::Editor::markMisspellingsAfterTypingToWord):
1436 (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
1437 (WebCore::Editor::markAndReplaceFor):
1438 (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1439 (WebCore::Editor::revealSelectionAfterEditingOperation):
1440 (WebCore::Editor::getCompositionSelection):
1441 (WebCore::Editor::transpose):
1442 (WebCore::Editor::changeSelectionAfterCommand):
1443 (WebCore::Editor::selectedText):
1444 (WebCore::Editor::computeAndSetTypingStyle):
1445 (WebCore::Editor::findString):
1446 (WebCore::Editor::respondToChangedSelection):
1447 (WebCore::Editor::selectionStartHasMarkerFor):
1448 (WebCore::Editor::toggleOverwriteModeEnabled):
1449 * editing/EditorCommand.cpp:
1450 (WebCore::executeToggleStyleInList):
1451 (WebCore::expandSelectionToGranularity):
1452 (WebCore::stateTextWritingDirection):
1453 (WebCore::executeDelete):
1454 (WebCore::executeDeleteToMark):
1455 (WebCore::executeMoveBackward):
1456 (WebCore::executeMoveBackwardAndModifySelection):
1457 (WebCore::executeMoveDown):
1458 (WebCore::executeMoveDownAndModifySelection):
1459 (WebCore::executeMoveForward):
1460 (WebCore::executeMoveForwardAndModifySelection):
1461 (WebCore::executeMoveLeft):
1462 (WebCore::executeMoveLeftAndModifySelection):
1463 (WebCore::executeMovePageDown):
1464 (WebCore::executeMovePageDownAndModifySelection):
1465 (WebCore::executeMovePageUp):
1466 (WebCore::executeMovePageUpAndModifySelection):
1467 (WebCore::executeMoveRight):
1468 (WebCore::executeMoveRightAndModifySelection):
1469 (WebCore::executeMoveToBeginningOfDocument):
1470 (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
1471 (WebCore::executeMoveToBeginningOfLine):
1472 (WebCore::executeMoveToBeginningOfLineAndModifySelection):
1473 (WebCore::executeMoveToBeginningOfParagraph):
1474 (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
1475 (WebCore::executeMoveToBeginningOfSentence):
1476 (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
1477 (WebCore::executeMoveToEndOfDocument):
1478 (WebCore::executeMoveToEndOfDocumentAndModifySelection):
1479 (WebCore::executeMoveToEndOfSentence):
1480 (WebCore::executeMoveToEndOfSentenceAndModifySelection):
1481 (WebCore::executeMoveToEndOfLine):
1482 (WebCore::executeMoveToEndOfLineAndModifySelection):
1483 (WebCore::executeMoveToEndOfParagraph):
1484 (WebCore::executeMoveToEndOfParagraphAndModifySelection):
1485 (WebCore::executeMoveParagraphBackwardAndModifySelection):
1486 (WebCore::executeMoveParagraphForwardAndModifySelection):
1487 (WebCore::executeMoveUp):
1488 (WebCore::executeMoveUpAndModifySelection):
1489 (WebCore::executeMoveWordBackward):
1490 (WebCore::executeMoveWordBackwardAndModifySelection):
1491 (WebCore::executeMoveWordForward):
1492 (WebCore::executeMoveWordForwardAndModifySelection):
1493 (WebCore::executeMoveWordLeft):
1494 (WebCore::executeMoveWordLeftAndModifySelection):
1495 (WebCore::executeMoveWordRight):
1496 (WebCore::executeMoveWordRightAndModifySelection):
1497 (WebCore::executeMoveToLeftEndOfLine):
1498 (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
1499 (WebCore::executeMoveToRightEndOfLine):
1500 (WebCore::executeMoveToRightEndOfLineAndModifySelection):
1501 (WebCore::executeSelectAll):
1502 (WebCore::executeSelectToMark):
1503 (WebCore::executeSetMark):
1504 (WebCore::executeSwapWithMark):
1505 (WebCore::executeUnselect):
1506 (WebCore::enabledInRichlyEditableText):
1507 (WebCore::enabledRangeInEditableText):
1508 (WebCore::enabledRangeInRichlyEditableText):
1509 (WebCore::valueFormatBlock):
1510 * editing/FrameSelection.cpp:
1511 (WebCore::FrameSelection::setSelection):
1512 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
1513 * editing/InsertLineBreakCommand.cpp:
1514 (WebCore::InsertLineBreakCommand::doApply):
1515 * editing/InsertTextCommand.cpp:
1516 (WebCore::InsertTextCommand::doApply):
1517 * editing/ModifySelectionListLevel.cpp:
1518 (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
1519 (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
1520 * editing/RemoveFormatCommand.cpp:
1521 (WebCore::RemoveFormatCommand::doApply):
1522 * editing/ReplaceSelectionCommand.cpp:
1523 (WebCore::ReplaceSelectionCommand::doApply):
1524 * editing/SetSelectionCommand.cpp:
1525 (WebCore::SetSelectionCommand::doApply):
1526 (WebCore::SetSelectionCommand::doUnapply):
1527 * editing/SpellingCorrectionCommand.cpp:
1528 (WebCore::SpellingCorrectionCommand::doApply):
1529 * editing/TextInsertionBaseCommand.cpp:
1530 (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
1531 * editing/TypingCommand.cpp:
1532 (WebCore::TypingCommand::deleteSelection):
1533 (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
1534 (WebCore::TypingCommand::insertText):
1535 (WebCore::TypingCommand::deleteKeyPressed):
1536 (WebCore::TypingCommand::forwardDeleteKeyPressed):
1537 * editing/ios/EditorIOS.mm:
1538 (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1539 (WebCore::styleForSelectionStart):
1540 (WebCore::Editor::fontForSelection):
1541 * editing/mac/EditorMac.mm:
1542 (WebCore::styleForSelectionStart):
1543 (WebCore::Editor::fontForSelection):
1544 (WebCore::Editor::canCopyExcludingStandaloneImages):
1545 (WebCore::Editor::readSelectionFromPasteboard):
1546 * html/HTMLAnchorElement.cpp:
1547 (WebCore::HTMLAnchorElement::defaultEventHandler):
1548 (WebCore::HTMLAnchorElement::setActive):
1549 * html/HTMLInputElement.cpp:
1550 (WebCore::HTMLInputElement::updateFocusAppearance):
1551 * html/HTMLTextAreaElement.cpp:
1552 (WebCore::HTMLTextAreaElement::updateFocusAppearance):
1553 (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
1554 * html/HTMLTextFormControlElement.cpp:
1555 (WebCore::HTMLTextFormControlElement::setSelectionRange):
1556 (WebCore::HTMLTextFormControlElement::computeSelectionStart):
1557 (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
1558 (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
1559 (WebCore::HTMLTextFormControlElement::selectionChanged):
1560 * html/TextFieldInputType.cpp:
1561 (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
1562 * loader/FrameLoader.cpp:
1563 (WebCore::FrameLoader::clear):
1564 * loader/archive/cf/LegacyWebArchive.cpp:
1565 (WebCore::LegacyWebArchive::createFromSelection):
1566 * page/ContextMenuController.cpp:
1567 (WebCore::insertUnicodeCharacter):
1568 (WebCore::ContextMenuController::contextMenuItemSelected):
1569 (WebCore::selectionContainsPossibleWord):
1570 (WebCore::ContextMenuController::populate):
1571 (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1572 * page/DOMSelection.cpp:
1573 (WebCore::selectionShadowAncestor):
1574 (WebCore::DOMSelection::visibleSelection):
1575 (WebCore::DOMSelection::isCollapsed):
1576 (WebCore::DOMSelection::type):
1577 (WebCore::DOMSelection::rangeCount):
1578 (WebCore::DOMSelection::collapse):
1579 (WebCore::DOMSelection::collapseToEnd):
1580 (WebCore::DOMSelection::collapseToStart):
1581 (WebCore::DOMSelection::empty):
1582 (WebCore::DOMSelection::setBaseAndExtent):
1583 (WebCore::DOMSelection::setPosition):
1584 (WebCore::DOMSelection::modify):
1585 (WebCore::DOMSelection::extend):
1586 (WebCore::DOMSelection::getRangeAt):
1587 (WebCore::DOMSelection::removeAllRanges):
1588 (WebCore::DOMSelection::addRange):
1589 (WebCore::DOMSelection::deleteFromDocument):
1590 (WebCore::DOMSelection::containsNode):
1591 (WebCore::DOMSelection::toString):
1592 * page/DragController.cpp:
1593 (WebCore::DragController::dragIsMove):
1594 (WebCore::setSelectionToDragCaret):
1595 (WebCore::DragController::concludeEditDrag):
1596 (WebCore::DragController::draggableElement):
1597 (WebCore::selectElement):
1598 (WebCore::dragLocForSelectionDrag):
1599 (WebCore::DragController::startDrag):
1600 * page/DragController.h:
1601 * page/EventHandler.cpp:
1602 (WebCore::setSelectionIfNeeded):
1603 (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
1604 (WebCore::EventHandler::handleMousePressEventDoubleClick):
1605 (WebCore::EventHandler::handleMousePressEventSingleClick):
1606 (WebCore::EventHandler::updateSelectionForMouseDrag):
1607 (WebCore::EventHandler::lostMouseCapture):
1608 (WebCore::EventHandler::handleMouseReleaseEvent):
1609 (WebCore::nodeIsNotBeingEdited):
1610 (WebCore::EventHandler::selectCursor):
1611 (WebCore::EventHandler::handleMousePressEvent):
1612 (WebCore::EventHandler::handleMouseDoubleClickEvent):
1613 (WebCore::EventHandler::dispatchMouseEvent):
1614 (WebCore::EventHandler::sendContextMenuEvent):
1615 (WebCore::EventHandler::sendContextMenuEventForKey):
1616 (WebCore::handleKeyboardSelectionMovement):
1617 (WebCore::EventHandler::handleDrag):
1618 * page/FocusController.cpp:
1619 (WebCore::FocusController::setFocusedFrame):
1620 (WebCore::FocusController::setFocused):
1621 (WebCore::FocusController::advanceFocusInDocumentOrder):
1622 (WebCore::clearSelectionIfNeeded):
1623 (WebCore::FocusController::setActive):
1625 (WebCore::Frame::dragImageForSelection):
1627 (WebCore::Frame::selection):
1628 * page/FrameView.cpp:
1629 (WebCore::FrameView::performPostLayoutTasks):
1630 (WebCore::FrameView::paintContentsForSnapshot):
1632 (WebCore::Page::findString):
1633 (WebCore::Page::findStringMatchingRanges):
1634 (WebCore::Page::selection):
1635 * page/mac/FrameMac.mm:
1636 (WebCore::Frame::dragImageForSelection):
1637 * page/mac/FrameSnapshottingMac.mm:
1638 (WebCore::selectionImage):
1639 * page/win/FrameWin.cpp:
1640 (WebCore::imageFromSelection):
1641 (WebCore::Frame::dragImageForSelection):
1642 * platform/ios/PasteboardIOS.mm:
1643 (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
1644 * rendering/HitTestResult.cpp:
1645 (WebCore::HitTestResult::isSelected):
1646 * rendering/RenderBlock.cpp:
1647 (WebCore::RenderBlock::paintCaret):
1648 * rendering/RenderImage.cpp:
1649 (WebCore::RenderImage::paintAreaElementFocusRing):
1650 * rendering/RenderLayer.cpp:
1651 (WebCore::RenderLayer::scrollTo):
1652 * rendering/RenderListBox.cpp:
1653 (WebCore::RenderListBox::paintItemForeground):
1654 (WebCore::RenderListBox::paintItemBackground):
1655 * rendering/RenderObject.cpp:
1656 (WebCore::RenderObject::selectionBackgroundColor):
1657 (WebCore::RenderObject::selectionColor):
1658 * rendering/RenderTextControlSingleLine.cpp:
1659 (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
1660 * rendering/RenderTheme.cpp:
1661 (WebCore::RenderTheme::isFocused):
1662 * rendering/RenderThemeWin.cpp:
1663 (WebCore::RenderThemeWin::adjustSearchFieldStyle):
1664 * rendering/RenderTreeAsText.cpp:
1665 (WebCore::writeSelection):
1666 * rendering/RenderView.cpp:
1667 (WebCore::RenderView::setSelection):
1668 * svg/SVGSVGElement.cpp:
1669 (WebCore::SVGSVGElement::deselectAll):
1670 * svg/SVGTextContentElement.cpp:
1671 (WebCore::SVGTextContentElement::selectSubString):
1672 * testing/Internals.cpp:
1673 (WebCore::Internals::absoluteCaretBounds):
1674 (WebCore::Internals::selectionBounds):
1676 2013-08-19 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
1678 <https://webkit.org/b/119679> Remove the cast-align warnings for ARM
1680 Reviewed by Darin Adler.
1682 While compiling WebKitGTK+ for ARM a lot of warnings of this form
1683 where shown (gcc 4.7.3):
1685 ../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
1686 ../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
1688 This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
1689 which is part of WTF for this purpose, silencing the compiler.
1691 * css/StylePropertySet.h:
1692 (WebCore::ImmutableStylePropertySet::metadataArray):
1694 2013-08-19 Antti Koivisto <antti@apple.com>
1696 <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
1698 Reviewed by Dan Bernstein.
1700 * html/HTMLStyleElement.cpp:
1701 (WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
1703 2013-08-19 Chris Fleizach <cfleizach@apple.com>
1705 <https://webkit.org/b/119916> AX: WebKit is not exposing AXLanguage correctly
1707 Reviewed by Darin Adler.
1709 Expose the AXLanguage attribute for all objects.
1711 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1712 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1714 2013-08-19 Brent Fulgham <bfulgham@apple.com>
1716 [Windows] Unreviewed gardening.
1718 * WebCore.vcxproj/WebCore.vcxproj: Add missing header for easy access/editing.
1719 * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1721 2013-08-19 Mario Sanchez Prada <mario.prada@samsung.com>
1723 <https://webkit.org/b/119882> Speed up moving cursor/selection up or down past non-rendered elements.
1725 Reviewed by Darin Adler.
1727 This is a port from Blink originally written by Dominic Mazzoni:
1728 https://src.chromium.org/viewvc/blink?revision=154977&view=revision
1730 From the original commit:
1732 Skips calling firstPositionInOrBeforeNode when a node doesn't have a
1733 renderer, since there couldn't possibly be a visible position there.
1734 This was particularly wasteful when trying to move the cursor up when at
1735 the beginning of a document, as it did a O(n^2) scan through the document head.
1737 Test: editing/execCommand/move-up-down-should-skip-hidden-elements.html
1739 * editing/VisibleUnits.cpp:
1740 (WebCore::previousRootInlineBoxCandidatePosition): Updated.
1741 (WebCore::nextRootInlineBoxCandidatePosition): Updates.
1743 2013-08-19 Andreas Kling <akling@apple.com>
1745 <https://webkit.org/b/120000> Chrome::client() should return a reference.
1747 Reviewed by Antti Koivisto.
1749 Chrome::m_client should never be null.
1751 2013-08-19 Antti Koivisto <antti@apple.com>
1753 <https://webkit.org/b/120004> Rename StyleElement to InlineStyleSheetOwner and stop inheriting from it
1755 Reviewed by Andreas Kling.
1757 Saner names and class relations.
1760 * GNUmakefile.list.am:
1762 * WebCore.vcxproj/WebCore.vcxproj:
1763 * WebCore.xcodeproj/project.pbxproj:
1764 * dom/DOMAllInOne.cpp:
1765 * dom/InlineStyleSheetOwner.cpp: Copied from Source/WebCore/dom/StyleElement.cpp.
1766 (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
1767 (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
1768 (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
1769 (WebCore::InlineStyleSheetOwner::removedFromDocument):
1770 (WebCore::InlineStyleSheetOwner::clearDocumentData):
1771 (WebCore::InlineStyleSheetOwner::childrenChanged):
1772 (WebCore::InlineStyleSheetOwner::finishParsingChildren):
1773 (WebCore::InlineStyleSheetOwner::createSheetFromTextContents):
1774 (WebCore::InlineStyleSheetOwner::clearSheet):
1775 (WebCore::InlineStyleSheetOwner::createSheet):
1776 (WebCore::InlineStyleSheetOwner::isLoading):
1777 (WebCore::InlineStyleSheetOwner::sheetLoaded):
1778 (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
1779 * dom/InlineStyleSheetOwner.h: Copied from Source/WebCore/dom/StyleElement.h.
1780 * dom/StyleElement.cpp: Removed.
1781 * dom/StyleElement.h: Removed.
1782 * html/HTMLStyleElement.cpp:
1783 (WebCore::HTMLStyleElement::HTMLStyleElement):
1784 (WebCore::HTMLStyleElement::~HTMLStyleElement):
1785 (WebCore::HTMLStyleElement::parseAttribute):
1786 (WebCore::HTMLStyleElement::finishParsingChildren):
1787 (WebCore::HTMLStyleElement::insertedInto):
1788 (WebCore::HTMLStyleElement::removedFrom):
1789 (WebCore::HTMLStyleElement::childrenChanged):
1790 * html/HTMLStyleElement.h:
1791 * svg/SVGStyleElement.cpp:
1792 (WebCore::SVGStyleElement::SVGStyleElement):
1793 (WebCore::SVGStyleElement::~SVGStyleElement):
1794 (WebCore::SVGStyleElement::parseAttribute):
1795 (WebCore::SVGStyleElement::finishParsingChildren):
1796 (WebCore::SVGStyleElement::insertedInto):
1797 (WebCore::SVGStyleElement::removedFrom):
1798 (WebCore::SVGStyleElement::childrenChanged):
1799 * svg/SVGStyleElement.h:
1801 2013-08-19 Allan Sandfeld Jensen <allan.jensen@digia.com>
1803 [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
1804 https://bugs.webkit.org/show_bug.cgi?id=28113
1806 Reviewed by Jocelyn Turcotte.
1808 StylePainter::init() was called twice making it clobber the previous antialiasing setting.
1810 This patch cleans up the construction so we only have one constructor with init inlined.
1812 * platform/qt/RenderThemeQStyle.cpp:
1813 (WebCore::StylePainterQStyle::StylePainterQStyle):
1814 (WebCore::StylePainterQStyle::setupStyleOption):
1815 * platform/qt/RenderThemeQStyle.h:
1816 * platform/qt/RenderThemeQt.cpp:
1817 (WebCore::StylePainter::StylePainter):
1818 * platform/qt/RenderThemeQt.h:
1819 * platform/qt/RenderThemeQtMobile.cpp:
1820 (WebCore::StylePainterMobile::StylePainterMobile):
1822 2013-08-19 Julien Brianceau <jbrianceau@nds.com>
1824 <https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
1826 Reviewed by Andreas Kling.
1828 Element::attach() doesn't exist anymore since r154257.
1830 * xml/parser/XMLDocumentParserQt.cpp:
1831 (WebCore::XMLDocumentParser::parseStartElement):
1833 2013-08-19 Antti Koivisto <antti@apple.com>
1835 <https://webkit.org/b/120001> Clean up StyleElement
1837 Reviewed by Andreas Kling.
1839 - Make it non-virtual so we don't use virtual multiple inheritance
1841 - Improve code clarity
1843 * dom/StyleElement.cpp:
1844 (WebCore::StyleElement::StyleElement):
1845 (WebCore::StyleElement::insertedIntoDocument):
1846 (WebCore::StyleElement::clearDocumentData):
1847 (WebCore::StyleElement::childrenChanged):
1848 (WebCore::StyleElement::finishParsingChildren):
1849 (WebCore::StyleElement::createSheetFromTextContents):
1850 (WebCore::isValidCSSContentType):
1851 (WebCore::StyleElement::createSheet):
1852 (WebCore::StyleElement::isLoading):
1853 * dom/StyleElement.h:
1854 (WebCore::StyleElement::setStyleSheetContentType):
1855 (WebCore::StyleElement::setStyleSheetMedia):
1856 * html/HTMLStyleElement.cpp:
1857 (WebCore::HTMLStyleElement::parseAttribute):
1858 * html/HTMLStyleElement.h:
1859 * svg/SVGStyleElement.cpp:
1860 (WebCore::SVGStyleElement::isSupportedAttribute):
1861 (WebCore::SVGStyleElement::parseAttribute):
1862 * svg/SVGStyleElement.h:
1864 2013-08-19 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1866 <https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>
1868 Reviewed by Darin Adler.
1870 Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).
1872 * rendering/svg/SVGRenderTreeAsText.cpp:
1873 (WebCore::writeSVGGradientStop):
1875 2013-08-19 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1877 <https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
1879 Reviewed by Andreas Kling.
1881 As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
1882 with toSVGAnimateElement().
1884 * svg/SVGAnimateElement.cpp:
1885 (WebCore::SVGAnimateElement::calculateAnimatedValue):
1886 * svg/SVGAnimateElement.h:
1887 (WebCore::toSVGAnimateElement):
1888 * svg/SVGAnimationElement.cpp:
1889 (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1891 2013-08-19 Andreas Kling <akling@apple.com>
1893 <https://webkit.org/b/119997> Page::progress() should return a reference.
1895 Reviewed by Antti Koivisto.
1897 Page::m_progress is never null.
1899 2013-08-18 Darin Adler <darin@apple.com>
1901 <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
1903 Reviewed by Sam Weinig.
1905 * dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
1906 deleted functions, it is instead overrides the base class function with one that is
1907 private and not defined, which accomplishes almost the same thing: An error, either
1908 at compile time or link time.
1910 * bindings/js/JSHTMLElementCustom.cpp:
1911 (WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
1913 (WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
1914 * inspector/InspectorInstrumentation.h:
1915 (WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
1916 (WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
1917 * inspector/InspectorStyleSheet.cpp:
1918 (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
1919 * plugins/PluginView.cpp:
1920 (WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
1921 returns 0. It will never return anything other than 0 in that case.
1922 * rendering/RenderVideo.cpp:
1923 (WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
1924 Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
1925 fix that when/if we change the return type of Element::document to a reference.
1926 * svg/SVGFEImageElement.cpp:
1927 (WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.
1929 2013-08-18 Darin Adler <darin@apple.com>
1931 <https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class
1933 Reviewed by Sam Weinig.
1935 * GNUmakefile.list.am: Removed ClipboardGtk.cpp.
1936 * PlatformEfl.cmake: Removed ClipboardEfl.cpp.
1937 * PlatformGTK.cmake: Removed ClipboardGtk.cpp.
1938 * PlatformWinCE.cmake: Removed ClipboardWin.cpp.
1939 * Target.pri: Removed ClipboardQt.cpp.
1940 * WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
1941 * WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.
1943 * dom/Clipboard.cpp:
1944 (WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
1945 other than Mac, identical to the old one used in GTK and Qt, and close to the one used
1948 * platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.
1950 * platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
1951 to a now-nonexistent class.
1953 * platform/efl/ClipboardEfl.cpp: Removed.
1954 * platform/gtk/ClipboardGtk.cpp: Removed.
1955 * platform/qt/ClipboardQt.cpp: Removed.
1956 * platform/win/ClipboardWin.cpp: Removed.
1958 2013-08-17 Darin Adler <darin@apple.com>
1960 <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
1962 Reviewed by Sam Weinig.
1964 * dom/Clipboard.cpp:
1965 (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
1966 Initialize strings more efficiently. Put drag-specific data members inside an if statement.
1967 Replace m_clipboardType with m_forDrag.
1968 (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
1969 Removed explicit clipboard type since constructor now defaults to copy and paste style.
1970 (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
1971 (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
1972 (WebCore::Clipboard::setData): Ditto.
1973 (WebCore::Clipboard::files): Ditto.
1974 (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
1975 be used when !ENABLE(DRAG_SUPPORT).
1976 (WebCore::Clipboard::setDropEffect): Ditto.
1977 (WebCore::Clipboard::effectAllowed): Ditto.
1978 (WebCore::Clipboard::setEffectAllowed): Ditto.
1979 (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
1980 to this, and kep the overload that does not as well. Made the DragData argument a const&.
1981 (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
1982 (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
1983 calling a dragStarted function.
1984 (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
1985 (WebCore::IEOpFromDragOp): Ditto.
1986 (WebCore::Clipboard::sourceOperation): Ditto.
1987 (WebCore::Clipboard::destinationOperation): Ditto.
1988 (WebCore::Clipboard::setSourceOperation): Ditto.
1989 (WebCore::Clipboard::setDestinationOperation): Ditto.
1991 * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
1992 class declarations as required. Removed non-helpful comment. Made ClipboardType a private
1993 implementation detail. Moved functions that are not part of the DOM API down to a separate
1994 section lower down in the class, and sorted the functions to match the order they appear
1995 in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
1996 effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
1997 implementation since it's an implementation detail. Since this class is no longer polymorphic,
1998 use only private, not protected. Make m_dragImageElement an Element, not a Node.
2000 * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
2001 these string properties can never return null strings anyway.
2003 * page/DragController.cpp:
2004 (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
2005 (WebCore::DragController::performDrag): Ditto.
2006 (WebCore::DragController::tryDHTMLDrag): Ditto.
2008 * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
2011 2013-08-18 David Kilzer <ddkilzer@apple.com>
2013 WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
2014 <http://webkit.org/b/119932>
2015 <rdar://problem/14764085>
2017 Reviewed by Darin Adler.
2019 Add pragma statements to ignore -Wdeprecated-register warnings
2020 in generated code. Also ignore -Wunknown-pragmas so this
2021 doesn't cause a build failure in older versions of clang.
2024 (WebCore::findProperty): Remove register hints from parameters.
2025 * css/makevalues.pl:
2026 (WebCore::findValue): Ditto.
2027 * platform/ColorData.gperf:
2028 (WebCore::findColor): Ditto.
2030 2013-08-18 Antti Koivisto <antti@apple.com>
2032 <https://webkit.org/b/119987> Make Element::attach standalone function
2034 Reviewed by Andreas Kling.
2036 This patch turns Element::attach() and the related functions into standalone functions.
2038 * dom/ContainerNode.cpp:
2039 (WebCore::attachChild):
2040 (WebCore::detachChild):
2041 * dom/ContainerNode.h:
2043 (WebCore::Document::attach):
2044 (WebCore::Document::detach):
2046 (WebCore::Element::~Element):
2047 (WebCore::Element::lazyReattach):
2048 (WebCore::Element::removeShadowRoot):
2050 Shadow root should be detached by now. Remove the detach call.
2052 (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
2053 (WebCore::Element::updatePseudoElement):
2054 (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
2055 (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
2057 Factor some parts of former Element::attach/detach() into member functions.
2060 * dom/ElementRareData.h:
2061 (WebCore::ElementRareData::releasePseudoElement):
2062 * dom/NodeRenderingContext.cpp:
2063 (WebCore::NodeRenderingContext::NodeRenderingContext):
2064 * dom/NodeRenderingContext.h:
2065 * dom/ShadowRoot.cpp:
2067 * html/HTMLDetailsElement.cpp:
2068 (WebCore::HTMLDetailsElement::parseAttribute):
2069 * html/HTMLInputElement.cpp:
2070 (WebCore::HTMLInputElement::updateType):
2071 (WebCore::HTMLInputElement::parseAttribute):
2072 * html/HTMLObjectElement.cpp:
2073 (WebCore::HTMLObjectElement::renderFallbackContent):
2074 * html/HTMLPlugInImageElement.cpp:
2075 (WebCore::HTMLPlugInImageElement::willRecalcStyle):
2076 (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
2077 * html/HTMLSelectElement.cpp:
2078 (WebCore::HTMLSelectElement::parseAttribute):
2079 (WebCore::HTMLSelectElement::parseMultipleAttribute):
2080 * html/HTMLViewSourceDocument.cpp:
2081 (WebCore::HTMLViewSourceDocument::createContainingTable):
2082 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
2083 (WebCore::HTMLViewSourceDocument::addLine):
2084 (WebCore::HTMLViewSourceDocument::finishLine):
2085 (WebCore::HTMLViewSourceDocument::addBase):
2086 (WebCore::HTMLViewSourceDocument::addLink):
2087 * html/parser/HTMLConstructionSite.cpp:
2088 (WebCore::executeTask):
2089 * html/parser/HTMLTreeBuilder.cpp:
2090 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2091 * html/shadow/InsertionPoint.cpp:
2092 (WebCore::InsertionPoint::willAttachRenderers):
2093 (WebCore::InsertionPoint::willDetachRenderers):
2094 * loader/PlaceholderDocument.cpp:
2095 (WebCore::PlaceholderDocument::attach):
2096 * style/StyleResolveTree.cpp:
2097 (WebCore::Style::createRendererIfNeeded):
2099 From Element::createRendererIfNeeded()
2101 (WebCore::Style::attachShadowRoot):
2103 From ShadowRoot::attach()
2105 (WebCore::Style::childAttachedAllowedWhenAttachingChildren):
2106 (WebCore::Style::attachChildren):
2108 From Element::attachChildren()
2110 (WebCore::Style::attachRenderTree):
2112 From Element::attach()
2114 (WebCore::Style::detachShadowRoot):
2116 From ShadowRoot::detach()
2118 (WebCore::Style::detachChildren):
2120 From Element::detachChildren()
2122 (WebCore::Style::detachRenderTree):
2124 From Element::deatach()
2126 (WebCore::Style::reattachRenderTree):
2128 From Element::reattach()
2130 (WebCore::Style::resolveLocal):
2131 * style/StyleResolveTree.h:
2132 (WebCore::Style::AttachContext::AttachContext):
2134 From Element::AttachContext
2137 (WebCore::SVGTests::handleAttributeChange):
2138 * xml/XMLErrors.cpp:
2139 (WebCore::XMLErrors::insertErrorMessageBlock):
2140 * xml/parser/XMLDocumentParserLibxml2.cpp:
2141 (WebCore::XMLDocumentParser::startElementNs):
2143 2013-08-18 Antti Koivisto <antti@apple.com>
2145 Fix crashing plugin tests caused by a logic error in the previous patch.
2149 * html/HTMLPlugInImageElement.cpp:
2150 (WebCore::HTMLPlugInImageElement::willDetachRenderers):
2152 2013-08-18 Antti Koivisto <antti@apple.com>
2154 <https://webkit.org/b/119982> Make Element::attach non-virtual
2156 Reviewed by Andreas Kling.
2158 This will give us more future refactoring options.
2161 (WebCore::Element::attach):
2162 (WebCore::Element::detach):
2164 Make non-virtual. Call element type specific custom functions as needed.
2166 (WebCore::Element::styleForRenderer):
2167 (WebCore::Element::willRecalcStyle):
2168 (WebCore::Element::didRecalcStyle):
2169 (WebCore::Element::willAttachRenderers):
2170 (WebCore::Element::didAttachRenderers):
2171 (WebCore::Element::willDetachRenderers):
2172 (WebCore::Element::didDetachRenderers):
2174 Add virtual custom callbacks.
2176 (WebCore::Element::customStyleForRenderer):
2179 (WebCore::Node::pseudoId):
2180 (WebCore::Node::hasCustomStyleResolveCallbacks):
2181 (WebCore::Node::setHasCustomStyleResolveCallbacks):
2183 Use the existing bit as it largely overlaps. Rename for clarity.
2185 (WebCore::Node::customPseudoId):
2186 * dom/PseudoElement.cpp:
2187 (WebCore::PseudoElement::PseudoElement):
2188 (WebCore::PseudoElement::didAttachRenderers):
2189 * dom/PseudoElement.h:
2190 * html/HTMLCanvasElement.cpp:
2191 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2192 (WebCore::HTMLCanvasElement::willAttachRenderers):
2193 * html/HTMLCanvasElement.h:
2194 * html/HTMLFormControlElement.cpp:
2195 (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2196 (WebCore::HTMLFormControlElement::didAttachRenderers):
2197 * html/HTMLFormControlElement.h:
2198 * html/HTMLFrameElement.cpp:
2199 (WebCore::HTMLFrameElement::HTMLFrameElement):
2200 (WebCore::HTMLFrameElement::didAttachRenderers):
2201 * html/HTMLFrameElement.h:
2202 * html/HTMLFrameElementBase.cpp:
2203 (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2204 (WebCore::HTMLFrameElementBase::didAttachRenderers):
2205 * html/HTMLFrameElementBase.h:
2206 * html/HTMLFrameSetElement.cpp:
2207 (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
2208 (WebCore::HTMLFrameSetElement::willAttachRenderers):
2209 * html/HTMLFrameSetElement.h:
2210 * html/HTMLIFrameElement.cpp:
2211 (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2212 * html/HTMLImageElement.cpp:
2213 (WebCore::HTMLImageElement::HTMLImageElement):
2214 (WebCore::HTMLImageElement::didAttachRenderers):
2215 * html/HTMLImageElement.h:
2216 * html/HTMLInputElement.cpp:
2217 (WebCore::HTMLInputElement::HTMLInputElement):
2218 (WebCore::HTMLInputElement::willAttachRenderers):
2219 (WebCore::HTMLInputElement::didAttachRenderers):
2220 (WebCore::HTMLInputElement::didDetachRenderers):
2221 * html/HTMLInputElement.h:
2222 * html/HTMLLIElement.cpp:
2223 (WebCore::HTMLLIElement::HTMLLIElement):
2224 (WebCore::HTMLLIElement::didAttachRenderers):
2225 * html/HTMLLIElement.h:
2226 * html/HTMLMediaElement.cpp:
2227 (WebCore::HTMLMediaElement::HTMLMediaElement):
2228 (WebCore::HTMLMediaElement::willAttachRenderers):
2229 (WebCore::HTMLMediaElement::didAttachRenderers):
2230 * html/HTMLMediaElement.h:
2231 * html/HTMLOptGroupElement.cpp:
2232 (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
2233 (WebCore::HTMLOptGroupElement::didAttachRenderers):
2234 (WebCore::HTMLOptGroupElement::willDetachRenderers):
2235 * html/HTMLOptGroupElement.h:
2236 * html/HTMLOptionElement.cpp:
2237 (WebCore::HTMLOptionElement::HTMLOptionElement):
2238 (WebCore::HTMLOptionElement::didAttachRenderers):
2239 (WebCore::HTMLOptionElement::willDetachRenderers):
2240 * html/HTMLOptionElement.h:
2241 * html/HTMLPlugInElement.cpp:
2242 (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2243 (WebCore::HTMLPlugInElement::willDetachRenderers):
2244 * html/HTMLPlugInElement.h:
2245 * html/HTMLPlugInImageElement.cpp:
2246 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2247 (WebCore::HTMLPlugInImageElement::didAttachRenderers):
2248 (WebCore::HTMLPlugInImageElement::willDetachRenderers):
2249 * html/HTMLPlugInImageElement.h:
2250 * html/HTMLProgressElement.cpp:
2251 (WebCore::HTMLProgressElement::HTMLProgressElement):
2252 (WebCore::HTMLProgressElement::didAttachRenderers):
2253 * html/HTMLProgressElement.h:
2254 * html/HTMLTextAreaElement.cpp:
2255 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2256 (WebCore::HTMLTextAreaElement::didAttachRenderers):
2257 * html/HTMLTextAreaElement.h:
2258 * html/HTMLVideoElement.cpp:
2259 (WebCore::HTMLVideoElement::HTMLVideoElement):
2260 (WebCore::HTMLVideoElement::didAttachRenderers):
2261 * html/HTMLVideoElement.h:
2262 * html/shadow/InsertionPoint.cpp:
2263 (WebCore::InsertionPoint::InsertionPoint):
2264 (WebCore::InsertionPoint::willAttachRenderers):
2265 (WebCore::InsertionPoint::willDetachRenderers):
2266 * html/shadow/InsertionPoint.h:
2267 * html/shadow/SliderThumbElement.cpp:
2268 (WebCore::SliderThumbElement::SliderThumbElement):
2269 (WebCore::SliderThumbElement::willDetachRenderers):
2270 * html/shadow/SliderThumbElement.h:
2271 * html/shadow/SpinButtonElement.cpp:
2272 (WebCore::SpinButtonElement::SpinButtonElement):
2273 (WebCore::SpinButtonElement::willDetachRenderers):
2274 * html/shadow/SpinButtonElement.h:
2275 * html/shadow/TextControlInnerElements.cpp:
2276 (WebCore::TextControlInnerElement::TextControlInnerElement):
2277 (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
2278 (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
2279 (WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
2280 (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
2281 (WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
2282 (WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
2283 * html/shadow/TextControlInnerElements.h:
2284 * style/StyleResolveTree.cpp:
2285 (WebCore::Style::resolveTree):
2286 * svg/SVGElement.cpp:
2287 (WebCore::SVGElement::SVGElement):
2288 * svg/SVGImageElement.cpp:
2289 (WebCore::SVGImageElement::SVGImageElement):
2290 (WebCore::SVGImageElement::didAttachRenderers):
2291 * svg/SVGImageElement.h:
2292 * svg/SVGUseElement.cpp:
2293 (WebCore::SVGUseElement::SVGUseElement):
2295 2013-08-18 Gavin Barraclough <barraclough@apple.com>
2297 https://bugs.webkit.org/show_bug.cgi?id=119972
2298 Add attributes field to PropertySlot
2300 Reviewed by Geoff Garen.
2302 For all JSC types, this makes getOwnPropertyDescriptor redundant.
2303 There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
2304 (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
2306 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2307 (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
2308 * bindings/js/JSDOMWindowCustom.cpp:
2309 (WebCore::JSDOMWindow::getOwnPropertySlot):
2310 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2311 (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
2312 * bindings/js/JSHistoryCustom.cpp:
2313 (WebCore::JSHistory::getOwnPropertySlotDelegate):
2314 (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
2315 * bindings/js/JSLocationCustom.cpp:
2316 (WebCore::JSLocation::getOwnPropertySlotDelegate):
2317 (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
2318 * bindings/js/JSPluginElementFunctions.cpp:
2319 (WebCore::runtimeObjectCustomGetOwnPropertySlot):
2320 (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
2321 * bindings/scripts/CodeGeneratorJS.pm:
2322 (GenerateGetOwnPropertySlotBody):
2323 (GenerateGetOwnPropertyDescriptorBody):
2324 (GenerateImplementation):
2325 * bridge/runtime_array.cpp:
2326 (JSC::RuntimeArray::getOwnPropertySlot):
2327 (JSC::RuntimeArray::getOwnPropertyDescriptor):
2328 (JSC::RuntimeArray::getOwnPropertySlotByIndex):
2329 * bridge/runtime_method.cpp:
2330 (JSC::RuntimeMethod::getOwnPropertySlot):
2331 (JSC::RuntimeMethod::getOwnPropertyDescriptor):
2332 * bridge/runtime_object.cpp:
2333 (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
2334 (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2335 - Pass attributes to PropertySlot::set* methods.
2337 2013-08-18 Ryosuke Niwa <rniwa@webkit.org>
2339 <https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines
2341 Reviewed by Darin Adler.
2343 Inspired by https://chromium.googlesource.com/chromium/blink/+/6152a12f7ace27beea4d284ff8416631e8aa5217.
2345 The bug was caused by createFragmentFromText's falsely assuming that the newline were not preserved
2346 if the first node's renderer didn't exist.
2348 Fixed the bug by obtaining the renderer of the container of the first visible position in the context.
2350 Test: editing/pasteboard/paste-into-textarea-with-new-line.html
2352 * editing/markup.cpp:
2353 (WebCore::contextPreservesNewline):
2354 (WebCore::createFragmentFromText):
2356 2013-08-18 Andreas Kling <akling@apple.com>
2358 <https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
2360 Reviewed by Antti Koivisto.
2362 * html/HTMLLinkElement.cpp:
2363 (WebCore::HTMLLinkElement::setCSSStyleSheet):
2365 2013-08-18 Andreas Kling <akling@apple.com>
2367 <https://webkit.org/b/119981> Move ElementData & co to their own files.
2369 Reviewed by Antti Koivisto.
2371 I like to move it move it.
2373 2013-08-18 David Kilzer <ddkilzer@apple.com>
2375 BUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled
2377 Fixes the following build failure:
2379 WebCore/rendering/RenderBlock.cpp:1529:53: error: unused parameter 'heightChanged' [-Werror,-Wunused-parameter]
2380 void RenderBlock::updateShapesAfterBlockLayout(bool heightChanged)
2384 * rendering/RenderBlock.cpp:
2385 (WebCore::RenderBlock::updateShapesAfterBlockLayout): Add
2386 UNUSED_PARAM(heightChanged) when CSS_SHAPES is disabled.
2388 2013-08-18 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
2390 [EFL] minor method name fix for the textTrackOffMenuItemText method
2391 https://bugs.webkit.org/show_bug.cgi?id=119978
2393 the method textTrackOffMenuItemText was renamed in
2394 https://bugs.webkit.org/show_bug.cgi?id=113822
2396 Reviewed by Christophe Dumez.
2398 * platform/efl/LocalizedStringsEfl.cpp:
2399 (WebCore::textTrackOffMenuItemText):
2401 2013-08-17 Antti Koivisto <antti@apple.com>
2403 <https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement
2405 Reviewed by Andreas Kling.
2407 * dom/StyleElement.cpp:
2408 (WebCore::StyleElement::process):
2410 Use TextNodeTraversal::contentsAsString for the sheet text. The overflow check is removed as StringBuilder
2411 (which is used by contentsAsString) does that itself. The behavior in case of overflow changes from empty
2412 sheet to CRASH(). Thats what we do elsewhere in similar situations too (scripts for example). Continuing
2413 with > 4GB of style sheet text nodes is probably not going to go well anyway.
2415 2013-08-17 Antti Koivisto <antti@apple.com>
2417 <https://webkit.org/b/119960> Remove some optimizations made obsolete by use of StringBuilder
2419 Reviewed by Andreas Kling.
2421 * dom/ScriptElement.cpp:
2422 (WebCore::ScriptElement::scriptContent):
2424 StringBuilder already optimizes for the single string case. If there is only one the original string is returned.
2427 (WebCore::Text::wholeText):
2429 No need to traverse twice to compute the capacity. StringBuilder handles this efficiently.
2430 Also in the common case there is only one string and the optimization here is actually hurting by disabling the StringBuilder one.
2432 2013-08-17 Antti Koivisto <antti@apple.com>
2434 <https://webkit.org/b/119959> Add TextNodeTraversal
2436 Reviewed by Andreas Kling.
2438 Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.
2440 Use it where appropriate.
2442 * WebCore.xcodeproj/project.pbxproj:
2444 (WebCore::Attr::childrenChanged):
2445 * dom/NodeTraversal.h:
2446 (WebCore::NodeTraversal::next):
2447 * dom/ScriptElement.cpp:
2448 (WebCore::ScriptElement::scriptContent):
2450 (WebCore::Text::wholeText):
2453 * dom/TextNodeTraversal.cpp: Added.
2454 (WebCore::TextNodeTraversal::appendContents):
2455 (WebCore::TextNodeTraversal::contentsAsString):
2457 Helpers for getting text content of a subtree.
2459 * dom/TextNodeTraversal.h: Added.
2460 (WebCore::TextNodeTraversal::firstTextChildTemplate):
2461 (WebCore::TextNodeTraversal::firstChild):
2462 (WebCore::TextNodeTraversal::firstTextWithinTemplate):
2463 (WebCore::TextNodeTraversal::firstWithin):
2464 (WebCore::TextNodeTraversal::traverseNextTextTemplate):
2465 (WebCore::TextNodeTraversal::next):
2466 (WebCore::TextNodeTraversal::nextSibling):
2467 * editing/ApplyStyleCommand.cpp:
2468 (WebCore::ApplyStyleCommand::joinChildTextNodes):
2469 * html/HTMLTextAreaElement.cpp:
2470 (WebCore::HTMLTextAreaElement::defaultValue):
2471 (WebCore::HTMLTextAreaElement::setDefaultValue):
2472 * html/HTMLTitleElement.cpp:
2473 (WebCore::HTMLTitleElement::text):
2474 * html/track/TextTrackCue.cpp:
2475 (WebCore::TextTrackCue::determineTextDirection):
2477 (WebCore::Frame::searchForLabelsAboveCell):
2478 * xml/XPathUtil.cpp:
2479 (WebCore::XPath::stringValue):
2481 2013-08-17 Andreas Kling <akling@apple.com>
2483 <https://webkit.org/b/119957> Page::contextMenuController() should return a reference.
2485 Reviewed by Antti Koivisto.
2487 Page::m_contextMenuController is never null.
2490 (WebCore::Page::contextMenuController):
2492 2013-08-17 Andreas Kling <akling@apple.com>
2494 <https://webkit.org/b/119954> Page::dragCaretController() should return a reference.
2496 Reviewed by Antti Koivisto.
2498 Page::m_dragCaretController is never null.
2501 (WebCore::Document::nodeChildrenWillBeRemoved):
2502 (WebCore::Document::nodeWillBeRemoved):
2503 * page/DragController.cpp:
2504 (WebCore::DragController::cancelDrag):
2505 (WebCore::DragController::dragEnded):
2506 (WebCore::DragController::tryDocumentDrag):
2507 (WebCore::DragController::dispatchTextInputEventFor):
2508 (WebCore::DragController::concludeEditDrag):
2509 (WebCore::DragController::placeDragCaret):
2511 (WebCore::Page::dragCaretController):
2512 * rendering/RenderBlock.cpp:
2513 (WebCore::RenderBlock::paintCaret):
2515 2013-08-17 Andreas Kling <akling@apple.com>
2517 <https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.
2519 Reviewed by Antti Koivisto.
2521 Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
2522 has no interest in observing frame destruction since its own destruction will soon follow.
2524 Editor::m_frame is now a reference instead of a pointer. Removed some null checking.
2526 2013-08-17 Andreas Kling <akling@apple.com>
2528 <https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.
2530 Reviewed by Antti Koivisto.
2532 This callback was only used by the Chromium port.
2535 * editing/Editor.cpp:
2537 Remove override of FrameDestructionObserver::willDetachPage().
2539 * page/EditorClient.h:
2541 Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.
2543 2013-08-16 Antti Koivisto <antti@apple.com>
2545 <https://webkit.org/b/119886> PseudoElement is abusing parent node pointer
2547 Reviewed by Darin Adler.
2549 PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
2550 the basic tree consistency (a node is a child node of its parent node).
2552 This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
2553 impact is negligible as there are not that many ::befores and ::afters.
2555 * dom/ComposedShadowTreeWalker.cpp:
2556 (WebCore::ComposedShadowTreeWalker::traverseParent):
2557 * dom/EventPathWalker.cpp:
2558 (WebCore::EventPathWalker::moveToParent):
2559 * dom/EventRetargeter.h:
2560 (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
2562 (WebCore::Node::~Node):
2564 Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.
2566 (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
2567 * dom/PseudoElement.cpp:
2568 (WebCore::PseudoElement::PseudoElement):
2569 (WebCore::PseudoElement::customStyleForRenderer):
2570 * dom/PseudoElement.h:
2571 (WebCore::toPseudoElement):
2573 Add casting functions.
2575 * inspector/InspectorLayerTreeAgent.cpp:
2576 (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2577 * rendering/HitTestResult.cpp:
2578 (WebCore::HitTestResult::setInnerNode):
2579 (WebCore::HitTestResult::setInnerNonSharedNode):
2581 2013-08-17 Darin Adler <darin@apple.com>
2583 <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
2585 Reviewed by Andreas Kling.
2587 * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
2588 All three are just unneeded forwarding to pasteboard.
2589 * dom/Clipboard.h: Ditto.
2591 * page/DragController.cpp:
2592 (WebCore::DragController::startDrag): Move the logic in here. Later we might
2593 want to straighten this out a bit, perhaps using functions in Editor, but it's
2594 not much code so fine to just have it here for now.
2596 2013-08-17 Darin Adler <darin@apple.com>
2598 <https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
2600 Reviewed by Andreas Kling.
2602 * dom/Clipboard.cpp:
2603 (WebCore::Clipboard::Clipboard):
2604 (WebCore::Clipboard::~Clipboard):
2606 Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS, LEGACY_VIRTUAL, and LEGACY_PURE.
2607 Keep only the !USE(LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS) side of all conditionals.
2609 2013-08-17 Darin Adler <darin@apple.com>
2611 <https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler
2613 Reviewed by Andreas Kling.
2615 Later it would be good to move this all to DragController, but there is no reason to have
2616 these functions as member functions of the DOM-exposed Clipboard class.
2618 * dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
2619 convertDragOperationToDropZoneOperation.
2620 * dom/Clipboard.h: Ditto.
2622 * page/EventHandler.cpp:
2623 (WebCore::convertDropZoneOperationToDragOperation): Moved here.
2624 (WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
2625 (WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
2626 canReadTypes check because Clipboard::files already takes care of that.
2627 (WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
2628 Added a check for the null string because HashSet::contains will not work on a null string.
2629 (WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
2630 (WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.
2632 2013-08-17 Darin Adler <darin@apple.com>
2634 <https://webkit.org/b/119943> Clean up the Document class a bit
2636 Reviewed by Antti Koivisto.
2639 (WebCore::Document::~Document): Fixed typo in comment.
2640 (WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
2641 Also name local variable just loader rather than documentLoader.
2642 (WebCore::Document::updateTitle): Call loader rather than going indirectly
2643 through frame to get to the loader.
2644 (WebCore::Document::setTitleElement): Fixed formatting (add braces).
2645 (WebCore::Document::removeTitle): Iterate elements instead of nodes.
2646 (WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
2647 styleForPage to avoid the need for a simple forwarding function. Also
2648 eliminated local variable to increase clarity.
2649 (WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
2650 to call styleForPage to avoid the need for a simple forwarding function.
2651 (WebCore::Document::setIsViewSource): Renamed a local variable.
2653 * dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
2654 styleForPage functions.
2656 * loader/FrameLoader.cpp: Removed unnneeded setTitle function.
2657 * loader/FrameLoader.h: Ditto.
2659 * page/PrintContext.cpp:
2660 (WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
2661 styleForPage to avoid the need for a simple forwarding function.
2663 2013-08-17 Darin Adler <darin@apple.com>
2665 <https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code
2667 Reviewed by Andreas Kling.
2669 * PlatformWinCE.cmake: Removed EditorWin.cpp.
2670 * WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
2671 * WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
2672 * WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
2673 ClipboardIOS.mm, and also let Xcode edit/reorder this file.
2675 * editing/Editor.cpp:
2676 (WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
2677 class code. Will remove the rest later.
2679 * editing/Editor.h: Removed declaration of newGeneralClipboard.
2681 * platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
2682 comment to make it clearer.
2684 * platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
2685 * platform/efl/PasteboardEfl.cpp: Ditto.
2686 * platform/ios/PasteboardIOS.mm: Ditto.
2687 * platform/win/PasteboardWin.cpp: Ditto.
2689 * platform/ios/ClipboardIOS.h: Removed. Was an empty file.
2690 * platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
2691 * platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
2692 a function that is never called.
2694 2013-08-17 Darin Adler <darin@apple.com>
2696 <https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation
2698 Reviewed by Andreas Kling.
2700 * dom/Clipboard.h: Removed unused dragLocation member function.
2701 Renamed m_dragLoc to m_dragLocation.
2703 * dom/Clipboard.cpp:
2704 (WebCore::Clipboard::setDragImage):
2705 * platform/gtk/ClipboardGtk.cpp:
2706 (WebCore::Clipboard::createDragImage):
2707 * platform/mac/ClipboardMac.mm:
2708 (WebCore::Clipboard::createDragImage):
2709 * platform/qt/ClipboardQt.cpp:
2710 (WebCore::Clipboard::createDragImage):
2711 * platform/win/ClipboardWin.cpp:
2712 (WebCore::Clipboard::createDragImage):
2713 Updated for new name.
2715 2013-08-17 Darin Adler <darin@apple.com>
2717 <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument
2719 Reviewed by Andreas Kling.
2721 The Element::document is a simpler faster alternative to Element::ownerDocument.
2722 The only behavior difference between the two is that ownerDocument returns 0 when
2723 called on a Document.
2725 * html/HTMLMediaElement.cpp:
2726 (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
2727 (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
2728 document and call to ownerDocument, since ownerDocument will never return non-null
2729 if document returns null.
2730 (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
2733 * inspector/DOMEditor.cpp:
2734 (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
2736 * inspector/InspectorCSSAgent.cpp:
2737 (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
2738 (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
2739 (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
2741 * inspector/InspectorDOMAgent.cpp:
2742 (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
2743 does the same thing in a roundabout way.
2744 (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
2745 (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
2746 does the same thing in a roundabout way.
2748 * page/DragController.cpp:
2749 (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
2751 * svg/SVGElementInstance.cpp:
2752 (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
2754 2013-08-17 Darin Adler <darin@apple.com>
2756 <https://webkit.org/b/119941> Make Page::dragController return a reference
2758 Reviewed by Andreas Kling.
2761 (WebCore::Page::dragController): Return a reference instead of a pointer.
2763 * page/DragController.cpp:
2764 (WebCore::DragController::concludeEditDrag):
2765 * page/EventHandler.cpp:
2766 (WebCore::EventHandler::eventMayStartDrag):
2767 (WebCore::EventHandler::updateDragSourceActionsAllowed):
2768 (WebCore::EventHandler::handleDrag):
2769 * page/mac/EventHandlerMac.mm:
2770 (WebCore::EventHandler::passSubframeEventToSubframe):
2773 2013-08-17 Morten Stenshorne <mstensho@opera.com>
2775 <https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
2777 Reviewed by Darin Adler.
2779 Since the flow thread is a direct child of RenderView, it doesn't inherit
2780 proper writing-mode automatically. It should be mentioned that if the thread's
2781 contents' writing-mode differs from that of the first region, things are
2782 typically going to look useless (although perhaps that's how it should be),
2783 but as long as writing-mode is only specified on a common parent of the
2784 thread's contents and the regions, things look fine, and also, we're now
2785 following what the spec has to say on the matter:
2787 http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-flow-into-property
2789 "The first region defines the principal writing mode for the entire flow.
2790 The writing mode on subsequent regions is ignored."
2792 This is a back-port of the fix for Blink bug 257965.
2793 Reviewed by esprehn and mihnea there.
2794 Blink review URL: https://chromiumcodereview.appspot.com/18374008
2796 Tests: fast/regions/changing-writing-mode-2.html
2797 fast/regions/changing-writing-mode-3.html
2798 fast/regions/changing-writing-mode-4.html
2799 fast/regions/changing-writing-mode-5.html
2800 fast/regions/changing-writing-mode.html
2801 fast/regions/invalid-first-region-with-writing-mode-2.html
2802 fast/regions/invalid-first-region-with-writing-mode.html
2803 fast/regions/subtree-with-horiz-bt.html
2804 fast/regions/subtree-with-horiz-tb.html
2805 fast/regions/subtree-with-vert-lr.html
2806 fast/regions/subtree-with-vert-rl.html
2808 * rendering/RenderFlowThread.cpp:
2809 (WebCore::RenderFlowThread::styleDidChange):
2810 * rendering/RenderFlowThread.h:
2811 * rendering/RenderNamedFlowThread.cpp:
2812 (WebCore::RenderNamedFlowThread::updateWritingMode):
2813 (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread):
2814 (WebCore::RenderNamedFlowThread::removeRegionFromThread):
2815 (WebCore::RenderNamedFlowThread::regionChangedWritingMode):
2816 * rendering/RenderNamedFlowThread.h:
2817 * rendering/RenderRegion.cpp:
2818 (WebCore::RenderRegion::styleDidChange):
2820 2013-08-16 Andreas Kling <akling@apple.com>
2822 <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
2824 Reviewed by Geoff Garen.
2826 Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
2827 It now also returns a reference, as it can never be null.
2829 Removed 8.8 million lines of null-checking as a result.
2831 2013-08-16 Ryosuke Niwa <rniwa@webkit.org>
2833 <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
2835 Reviewed by Benjamin Poulain.
2837 Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
2838 the first root editable element exactly once.
2841 (WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
2842 when we don't have to check RenderStyle's value.
2843 * editing/htmlediting.cpp:
2844 (WebCore::highestEditableRoot):
2846 2013-08-16 Benjamin Poulain <benjamin@webkit.org>
2848 Remove a useless #include of SelectorChecker.h
2850 Rubber-stamped by Ryosuke Niwa.
2852 * dom/DocumentStyleSheetCollection.cpp:
2854 2013-08-16 Brent Fulgham <bfulgham@apple.com>
2856 [Windows] Update RenderMediaControls for new API
2857 https://bugs.webkit.org/show_bug.cgi?id=119910
2859 Reviewed by Eric Carlson.
2861 * rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
2864 2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
2866 <https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
2868 Reviewed by Simon Fraser.
2870 No new tests required, just a build fix.
2872 Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
2873 keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.
2875 * css/CSSValueKeywords.in:
2876 * css/SVGCSSValueKeywords.in:
2878 2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
2880 <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
2882 Reviewed by Alexey Proskuryakov.
2884 WTF::currentTime() is prone to DST changes and NTP adjustments, so use
2885 WTF::monotonicallyIncreasingTime() to measure elapsed time.
2887 * Modules/filesystem/FileWriter.cpp:
2888 (WebCore::FileWriter::didWrite):
2890 (WebCore::Document::Document):
2891 (WebCore::Document::elapsedTime):
2892 (WebCore::Document::resetLastHandledUserGestureTimestamp):
2894 (WebCore::Element::setActive):
2895 * fileapi/FileReader.cpp:
2896 (WebCore::FileReader::didReceiveData):
2897 * html/HTMLMediaElement.cpp:
2898 (WebCore::HTMLMediaElement::HTMLMediaElement):
2899 (WebCore::HTMLMediaElement::startProgressEventTimer):
2900 (WebCore::HTMLMediaElement::progressEventTimerFired):
2901 (WebCore::HTMLMediaElement::refreshCachedTime):
2902 (WebCore::HTMLMediaElement::invalidateCachedTime):
2903 (WebCore::HTMLMediaElement::currentTime):
2904 (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
2905 (WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
2906 * html/HTMLMediaElement.h:
2907 * html/HTMLPlugInImageElement.cpp:
2908 (WebCore::documentHadRecentUserGesture):
2909 * html/MediaController.cpp:
2910 (MediaController::scheduleTimeupdateEvent):
2911 * html/parser/HTMLDocumentParser.cpp:
2912 (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2913 * html/parser/HTMLParserScheduler.h:
2914 (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
2915 * inspector/InspectorCSSAgent.cpp:
2916 (WebCore::SelectorProfile::SelectorProfile):
2917 (WebCore::SelectorProfile::totalMatchingTimeMs):
2918 (WebCore::SelectorProfile::startSelector):
2919 (WebCore::SelectorProfile::commitSelector):
2920 (WebCore::SelectorProfile::commitSelectorTime):
2921 * inspector/InspectorProfilerAgent.cpp:
2922 (WebCore::InspectorProfilerAgent::willProcessTask):
2923 (WebCore::InspectorProfilerAgent::didProcessTask):
2924 * inspector/InspectorTimelineAgent.cpp:
2925 (WebCore::InspectorTimelineAgent::timestamp):
2926 * inspector/TimelineTraceEventProcessor.cpp:
2927 (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
2928 * page/FrameView.cpp:
2929 (WebCore::FrameView::adjustedDeferredRepaintDelay):
2930 (WebCore::FrameView::paintContents):
2931 * platform/ClockGeneric.cpp:
2932 (ClockGeneric::now):
2933 * platform/ScrollAnimatorNone.cpp:
2934 (WebCore::ScrollAnimatorNone::scroll):
2935 (WebCore::ScrollAnimatorNone::animationTimerFired):
2936 * platform/graphics/cg/ImageBufferCG.cpp:
2937 (WebCore::ImageBuffer::ImageBuffer):
2938 (WebCore::ImageBuffer::flushContextIfNecessary):
2939 (WebCore::ImageBuffer::flushContext):
2940 (WebCore::ImageBuffer::copyNativeImage):
2942 2013-08-16 peavo@outlook.com <peavo@outlook.com>
2944 <https://webkit.org/b/119891> [WinCairo] Compile error.
2946 Reviewed by Brent Fulgham.
2948 * rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
2949 * rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.
2951 2013-08-16 Zan Dobersek <zdobersek@igalia.com>
2953 <https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have a proper SoupSession
2955 Reviewed by Martin Robinson.
2957 After r154144, a testing NetworkStorageSession is enforced when running the layout tests
2958 through WebKitTestRunner. Ports using the Soup networking backend don't assign any SoupSession
2959 objects to such NetworkStorageSession objects as it's usually the case. This is causing problems
2960 as the ResourceHandleInternal uses the SoupSession that's provided by the NetworkingContext's
2961 NetworkStorageSession, which ends up being null if the testing-specific NetworkStorageSession is used.
2962 As a result, all the layout tests are crashing under WKTR.
2964 * platform/network/NetworkStorageSession.h: Make the SoupSession member a GRefPtr.
2965 (WebCore::NetworkStorageSession::soupSession): Return the GRefPtr's pointer.
2966 * platform/network/ResourceHandle.h: Declare the new createTestingSession method.
2967 * platform/network/soup/CookieJarSoup.cpp:
2968 (WebCore::cookieJarForSession): Instead of returning the default SoupCookieJar when there's no SoupSession
2969 provided by the NetworkStorageSession, assert that there now always is one, and return the session's cookie
2970 jar. For testing NetworkStorageSession objects, their SoupSession objects will always use the default cookie jar.
2971 * platform/network/soup/NetworkStorageSessionSoup.cpp:
2972 (WebCore::NetworkStorageSession::NetworkStorageSession): Adopt the given SoupSession reference pointer.
2973 (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a newly-created, testing-specific SoupSession.
2974 * platform/network/soup/ResourceHandleSoup.cpp:
2975 (WebCore::ResourceHandle::createTestingSession): Define the new createTestingSession method. It creates a new
2976 SoupSession through createSoupSession, but uses the default SoupCookieJar, as provided by WebCore::soupCookieJar.
2978 2013-08-16 Pratik Solanki <psolanki@apple.com>
2980 <https://webkit.org/b/119852> Frame::scriptController() should return a reference
2982 Reviewed by Andreas Kling.
2984 m_script is never NULL so we can just return a reference. Also remove some pointless null
2985 checks as a result of doing this.
2987 * Modules/websockets/WebSocket.cpp:
2988 (WebCore::WebSocket::connect):
2989 * bindings/js/JSDOMWindowBase.cpp:
2991 (WebCore::toJSDOMWindow):
2992 * bindings/js/JSDOMWindowShell.cpp:
2994 (WebCore::toJSDOMWindowShell):
2995 * bindings/js/JSEventListener.cpp:
2996 (WebCore::JSEventListener::handleEvent):
2997 * bindings/js/JSLazyEventListener.cpp:
2998 (WebCore::JSLazyEventListener::initializeJSFunction):
2999 * bindings/js/PageScriptDebugServer.cpp:
3000 (WebCore::PageScriptDebugServer::setJavaScriptPaused):
3001 * bindings/js/ScheduledAction.cpp:
3002 (WebCore::ScheduledAction::execute):
3003 * bindings/js/ScriptCachedFrameData.cpp:
3004 (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
3005 (WebCore::ScriptCachedFrameData::restore):
3006 * bindings/js/ScriptEventListener.cpp:
3007 (WebCore::createAttributeEventListener):
3008 (WebCore::eventListenerHandlerScriptState):
3009 * bindings/js/ScriptState.cpp:
3010 (WebCore::mainWorldScriptState):
3011 (WebCore::scriptStateFromNode):
3012 (WebCore::scriptStateFromPage):
3013 * bindings/objc/DOM.mm:
3014 (-[DOMNode JSC::Bindings::]):
3015 * bindings/objc/DOMInternal.mm:
3016 (-[WebScriptObject _initializeScriptDOMNodeImp]):
3018 (WebCore::Document::disableEval):
3019 (WebCore::Document::ensurePlugInsInjectedScript):
3020 * dom/ScriptElement.cpp:
3021 (WebCore::ScriptElement::prepareScript):
3022 (WebCore::ScriptElement::executeScript):
3023 * history/CachedFrame.cpp:
3024 (WebCore::CachedFrameBase::restore):
3025 * html/HTMLCanvasElement.cpp:
3026 (WebCore::HTMLCanvasElement::createRenderer):
3027 * html/HTMLElement.cpp:
3028 (WebCore::HTMLElement::rendererIsNeeded):
3029 * html/HTMLMediaElement.cpp:
3030 (WebCore::HTMLMediaElement::controls):
3031 * html/HTMLPlugInElement.cpp:
3032 (WebCore::HTMLPlugInElement::getInstance):
3033 (WebCore::HTMLPlugInElement::getNPObject):
3034 * html/HTMLPlugInImageElement.cpp:
3035 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3036 * html/parser/HTMLParserOptions.cpp:
3037 (WebCore::HTMLParserOptions::HTMLParserOptions):
3038 * inspector/InspectorAgent.cpp:
3039 (WebCore::InspectorAgent::didClearWindowObjectInWorld):
3040 * inspector/InspectorClient.cpp:
3041 (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
3042 * inspector/InspectorFrontendClientLocal.cpp:
3043 (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
3044 (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
3045 * inspector/InspectorOverlay.cpp:
3046 (WebCore::InspectorOverlay::evaluateInOverlay):
3047 * inspector/InspectorPageAgent.cpp:
3048 (WebCore::InspectorPageAgent::getScriptExecutionStatus):
3049 (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
3050 * inspector/PageRuntimeAgent.cpp:
3051 (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
3052 * loader/DocumentWriter.cpp:
3053 (WebCore::DocumentWriter::begin):
3054 * loader/FrameLoader.cpp:
3055 (WebCore::FrameLoader::urlSelected):
3056 (WebCore::FrameLoader::submitForm):
3057 (WebCore::FrameLoader::cancelAndClear):
3058 (WebCore::FrameLoader::clear):
3059 (WebCore::FrameLoader::prepareForCachedPageRestore):
3060 (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
3061 (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
3062 * loader/SubframeLoader.cpp:
3063 (WebCore::SubframeLoader::requestFrame):
3064 * loader/cache/CachedResourceLoader.cpp:
3065 (WebCore::CachedResourceLoader::canRequest):
3066 * page/EventSource.cpp:
3067 (WebCore::EventSource::create):
3069 (WebCore::Frame::willDetachPage):
3071 (WebCore::Frame::script):
3072 * page/Navigator.cpp:
3073 (WebCore::shouldHideFourDot):
3075 (WebCore::Page::setDebugger):
3076 * platform/graphics/wince/MediaPlayerProxy.cpp:
3077 (WebCore::WebMediaPlayerProxy::pluginInstance):
3078 (WebCore::WebMediaPlayerProxy::invokeMethod):
3079 * plugins/PluginView.cpp:
3080 (WebCore::PluginView::~PluginView):
3081 (WebCore::PluginView::performRequest):
3082 (WebCore::PluginView::load):
3083 (WebCore::PluginView::bindingInstance):
3084 (WebCore::PluginView::getValue):
3085 * plugins/efl/PluginViewEfl.cpp:
3086 (WebCore::PluginView::platformGetValue):
3087 * xml/XMLHttpRequest.cpp:
3088 (WebCore::XMLHttpRequest::open):
3089 * xml/XMLTreeViewer.cpp:
3090 (WebCore::XMLTreeViewer::transformDocumentToTreeView):
3092 2013-08-16 Andreas Kling <akling@apple.com>
3094 Attempt to fix the Qt/MountainLion build after r154142.
3096 * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3097 (WebCore::MediaPlayerPrivateQt::commitLoad):
3099 2013-08-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
3101 [Qt] Kerning in fast font path breaks letter-spacing
3102 https://bugs.webkit.org/show_bug.cgi?id=119838
3104 Reviewed by Jocelyn Turcotte.
3106 Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.
3108 Test: fast/text/letter-spacing-kerned.html
3110 * platform/graphics/WidthIterator.h:
3111 (WebCore::WidthIterator::supportsTypesettingFeatures):
3113 2013-08-16 Andreas Kling <akling@apple.com>
3115 <https://webkit.org/b/119893> FrameView::frame() should return a reference.
3117 Reviewed by Antti Koivisto.
3119 FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
3120 Leave it alone instead, and update the assertion that depended on this behavior.
3121 This enables us to make FrameView::frame() return a Frame&, exposing a ton of
3122 unnecessary null checks.
3124 * history/CachedFrame.cpp:
3125 (WebCore::CachedFrame::destroy):
3127 Remove call to FrameView::clearFrame() that was the only way to get a null
3128 FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
3129 the FrameView would get destroyed anyway.
3131 (WebCore::CachedFrame::clear):
3133 Update an assertion to support the case where the Document's Frame pointer has
3134 been cleared out and CachedFrame is still clinging to the FrameView.
3136 * history/CachedPage.h:
3138 Made CachedPage::destroy() private as it was only called by ~CachedPage().
3142 Frame* FrameView::frame() => Frame& FrameView::frame()
3144 2013-08-16 Brady Eidson <beidson@apple.com>
3146 (NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
3147 https://bugs.webkit.org/show_bug.cgi?id=119493
3149 Reviewed by Alexey Proskuryakov.
3151 No new tests (Covered by plenty of existing tests).
3154 * WebCore.xcodeproj/project.pbxproj:
3156 * platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public
3158 * platform/network/mac/ResourceHandleMac.mm:
3159 (WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.
3161 2013-08-16 peavo@outlook.com <peavo@outlook.com>
3163 <https://webkit.org/b/119889> [WinCairo] Compile error.
3165 Reviewed by Brent Fulgham.
3167 * platform/network/curl/ResourceHandleManager.cpp:
3168 (WebCore::certificatePath): Use correct function name.
3170 2013-08-16 Brent Fulgham <bfulgham@apple.com>
3172 [Windows] Unreviewed build correction after r154165.
3174 * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
3175 to WebKit include location.
3177 2013-08-15 Brent Fulgham <bfulgham@apple.com>
3179 [Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
3180 https://bugs.webkit.org/show_bug.cgi?id=119818
3182 Reviewed by Darin Adler.
3184 Covered by existing: compositing/tiling/empty-to-tiled.html
3186 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3187 (PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
3190 2013-08-16 Andreas Kling <akling@apple.com>
3192 <https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
3194 Reviewed by Anders Carlsson.
3196 Frame::m_eventHandler is never null.
3198 2013-08-16 Commit Queue <commit-queue@webkit.org>
3200 Unreviewed, rolling out r153749.
3201 http://trac.webkit.org/changeset/153749
3202 https://bugs.webkit.org/show_bug.cgi?id=119892
3204 The bison generation of the glslang* files has now been fixed. (Requested by zdobersek on #webkit).
3208 2013-08-16 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
3210 [GTK] fixing localizedString method name
3211 https://bugs.webkit.org/show_bug.cgi?id=119884
3213 The method name defined in LocalizedStringsGtk.cpp doesn't not match
3214 the one used in LocalizedStrings.h
3216 Reviewed by Gustavo Noronha Silva.
3218 * platform/gtk/LocalizedStringsGtk.cpp:
3219 (WebCore::textTrackOffMenuItemText):
3221 2013-08-16 Andrei Parvu <parvu@adobe.com>
3223 [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
3224 https://bugs.webkit.org/show_bug.cgi?id=119614
3226 Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
3227 luminance. The default value is auto. This patch contains only the parsing of the property,
3228 not the actual implementation of the types of masks. The parsing of mask-source-type in the
3229 -webkit-mask property will be handled in a separate patch.
3231 Reviewed by Dirk Schulze.
3233 Test: fast/masking/parsing-mask-source-type.html
3235 * css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
3236 (WebCore::ComputedStyleExtractor::propertyValue):
3237 * css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
3238 (WebCore::CSSParser::parseValue):
3239 (WebCore::CSSParser::parseFillProperty):
3240 * css/CSSProperty.cpp:
3241 (WebCore::CSSProperty::isInheritedProperty):
3242 * css/CSSPropertyNames.in: Added -webkit-mask-type property.
3243 * css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
3244 (WebCore::CSSToStyleMap::mapFillMaskType):
3245 * css/CSSToStyleMap.h:
3246 * css/DeprecatedStyleBuilder.cpp:
3247 (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3248 * css/StyleResolver.cpp:
3249 (WebCore::StyleResolver::applyProperty):
3250 * rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
3251 (WebCore::FillLayer::FillLayer):
3252 (WebCore::FillLayer::operator=):
3253 (WebCore::FillLayer::operator==):
3254 * rendering/style/FillLayer.h: Added methods for working with m_maskType.
3255 (WebCore::FillLayer::maskType):
3256 (WebCore::FillLayer::isMaskTypeSet):
3257 (WebCore::FillLayer::setMaskType):
3258 (WebCore::FillLayer::clearMaskType):
3259 (WebCore::FillLayer::initialMaskType):
3260 * rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.
3262 2013-08-16 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
3264 <https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp
3266 Reviewed by Gyuyoung Kim.
3268 Now that r154109 has landed, all Bison versions (at least from 2.3 up
3269 to the latest 3.0) should be able to generate versions of glslang* that
3272 Since the idea is to remove the prebuilt files from future imports of
3273 ANGLE, always building our own versions is a good idea, and allows us
3274 to get rid of some very ugly CMake checks.
3276 * CMakeLists.txt: Always build glslang.cpp and glslang_tab.cpp from
3277 DERIVED_SOURCES_WEBCORE_DIR.
3279 2013-08-16 Julien Brianceau <jbrianceau@nds.com>
3281 <https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
3283 Reviewed by Gyuyoung Kim.
3285 Since r154142, Frame::loader() is a reference (and not a pointer anymore).
3287 * xml/parser/XMLDocumentParserQt.cpp:
3288 (WebCore::XMLDocumentParser::parseStartElement):
3290 2013-08-16 Przemyslaw Szymanski <p.szymanski3@samsung.com>
3292 [WebGL] Vertex attribute binding validation method
3293 https://bugs.webkit.org/show_bug.cgi?id=119515
3295 This patch refactors WebGLRenderingContext code by moving the vertex
3296 attribute binding validation to a separate method. It is now
3297 possible to use that validation in other parts of the code. The
3298 code is more clear now.
3300 Reviewed by Christophe Dumez.
3302 No new tests. Covered by existing tests. No behaviour changed.
3303 LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
3304 LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
3305 LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html
3307 * html/canvas/WebGLRenderingContext.cpp:
3308 (WebCore::WebGLRenderingContext::validateVertexAttributes):
3309 * html/canvas/WebGLVertexArrayObjectOES.h:
3310 (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
3311 (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):
3313 2013-08-15 Antti Koivisto <antti@apple.com>
3315 <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared
3317 Reviewed by Andreas Kling.
3319 Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
3320 pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that
3321 want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
3324 This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
3325 member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
3326 now always null in the root node.
3328 ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
3330 * css/StyleResolver.cpp:
3331 (WebCore::StyleResolver::pushParentShadowRoot):
3332 (WebCore::StyleResolver::popParentShadowRoot):
3334 (WebCore::Attr::createTextChild):
3335 * dom/ComposedShadowTreeWalker.cpp:
3336 (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
3337 * dom/ContainerNode.cpp:
3338 (WebCore::ContainerNode::insertBeforeCommon):
3339 (WebCore::ContainerNode::removeBetween):
3340 * dom/ContainerNodeAlgorithms.cpp:
3341 (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3342 (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
3343 * dom/ContainerNodeAlgorithms.h:
3344 (WebCore::appendChildToContainer):
3345 (WebCore::Private::addChildNodesToDeletionQueue):
3347 (WebCore::Node::Node):
3349 (WebCore::Element::addShadowRoot):
3350 (WebCore::Element::removeShadowRoot):
3351 * dom/ElementRareData.h:
3352 (WebCore::ElementRareData::releasePseudoElement):
3353 * dom/EventPathWalker.cpp:
3354 (WebCore::EventPathWalker::moveToParent):
3355 * dom/EventRetargeter.cpp:
3356 (WebCore::determineDispatchBehavior):
3357 * dom/EventRetargeter.h:
3358 (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
3360 (WebCore::Node::shadowHost):
3361 (WebCore::Node::deprecatedShadowAncestorNode):
3362 (WebCore::Node::parentOrShadowHostElement):
3364 (WebCore::Node::hasTreeSharedParent):
3366 Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
3368 (WebCore::Node::setParentNode):
3369 (WebCore::Node::parentNode):
3370 (WebCore::Node::parentNodeGuaranteedHostFree):
3371 * dom/PseudoElement.cpp:
3372 (WebCore::PseudoElement::PseudoElement):
3373 * dom/ShadowRoot.cpp:
3374 (WebCore::ShadowRoot::ShadowRoot):
3375 (WebCore::ShadowRoot::setInnerHTML):
3376 (WebCore::ShadowRoot::setApplyAuthorStyles):
3377 (WebCore::ShadowRoot::setResetStyleInheritance):
3380 Rename host() -> hostElement() for clarity.
3382 (WebCore::Node::parentOrShadowHostNode):
3384 (WebCore::isSVGShadowText):
3385 * dom/TreeScope.cpp:
3386 (WebCore::TreeScope::focusedElement):
3387 * html/shadow/ContentDistributor.cpp:
3388 (WebCore::ContentDistributor::ensureDistribution):
3389 * html/shadow/InsertionPoint.cpp:
3390 (WebCore::InsertionPoint::insertedInto):
3391 (WebCore::InsertionPoint::removedFrom):
3392 (WebCore::InsertionPoint::parseAttribute):
3393 * page/DragController.cpp:
3394 (WebCore::asFileInput):
3395 * page/EventHandler.cpp:
3396 (WebCore::EventHandler::handleMousePressEvent):
3397 (WebCore::instanceAssociatedWithShadowTreeElement):
3398 * page/FocusController.cpp:
3399 (WebCore::FocusNavigationScope::owner):
3400 * rendering/RenderBlock.cpp:
3401 (WebCore::RenderBlock::hasLineIfEmpty):
3402 * rendering/RenderLayer.cpp:
3403 (WebCore::rendererForScrollbar):
3404 * svg/SVGElementInstance.h:
3405 (WebCore::SVGElementInstance::setParentNode):
3407 Renamed so it works with appendChildToContainer template.
3409 * svg/SVGStyledElement.cpp:
3410 (WebCore::SVGStyledElement::title):
3412 2013-08-13 Darin Adler <darin@apple.com>
3414 [iOS] Get iOS port off legacy clipboard
3415 https://bugs.webkit.org/show_bug.cgi?id=116412
3417 Reviewed by Daniel Bates.
3419 * dom/Clipboard.h: Turn off legacy style clipboard for iOS.
3420 Next patch will be able to remove legacy style entirely!
3422 * editing/Editor.cpp:
3423 (WebCore::Editor::dispatchCPPEvent): Attach the frame to the
3424 pasteboard directly explicitly. This is a layering violation, but
3425 is needed until we change how iOS pasteboard communicates with the
3426 host to use platform strategies instead of the editor client.
3428 * editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
3429 the include of ClipboardIOS.h.
3431 * platform/Pasteboard.h: Added the setFrame function (iOS-only) and
3432 frame and change count data members.
3434 * platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
3435 * platform/ios/ClipboardIOS.mm: Ditto.
3437 * platform/ios/PasteboardIOS.mm:
3438 (WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
3439 (WebCore::Pasteboard::createForCopyAndPaste): Added.
3440 (WebCore::Pasteboard::createPrivate): Added.
3441 (WebCore::Pasteboard::writePasteboard): Added. Empty function, like
3442 writeClipboard. Eventually need to remove or implement this.
3443 (WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
3444 (WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
3445 (WebCore::utiTypeFromCocoaType): Ditto.
3446 (WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
3447 (WebCore::Pasteboard::clear): Ditto.
3448 (WebCore::Pasteboard::readString): Ditto.
3449 (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
3450 (WebCore::Pasteboard::writeString): Ditto.
3451 (WebCore::Pasteboard::types): Ditto.
3452 (WebCore::Pasteboard::readFilenames): Ditto.
3454 * WebCore.exp.in: Move Clipboard destructor from Mac-only section to
3455 common section shared by Mac and iOS.
3457 2013-08-15 Ryuan Choi <ryuan.choi@samsung.com>
3459 [EFL] Unreviewed build fix after r154142 and r154144.
3461 * platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
3462 (WebCore::printError):
3463 (WebCore::printerNotFoundError):
3464 (WebCore::invalidPageRangeToPrint):
3466 2013-08-15 Hans Muller <hmuller@adobe.com>