1 2013-08-28 Pratik Solanki <psolanki@apple.com>
3 Document::elementSheet() should return a reference
4 https://bugs.webkit.org/show_bug.cgi?id=120433
6 Reviewed by Andreas Kling.
8 Since elementSheet() always retruns a valid pointer, we can simply return a reference
9 instead. Also rename m_elemSheet to m_elementSheet.
12 (WebCore::CSSParser::parseInlineStyleDeclaration):
13 * css/PropertySetCSSStyleDeclaration.cpp:
14 (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
16 (WebCore::Document::~Document):
17 (WebCore::Document::recalcStyle):
18 (WebCore::Document::updateBaseURL):
19 (WebCore::Document::elementSheet):
21 * dom/StyledElement.cpp:
22 (WebCore::StyledElement::setInlineStyleFromString):
23 (WebCore::StyledElement::setInlineStyleProperty):
24 (WebCore::StyledElement::addSubresourceAttributeURLs):
25 (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
26 * inspector/InspectorStyleSheet.cpp:
27 (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
29 2013-08-28 Ryosuke Niwa <rniwa@webkit.org>
31 REGRESSION(r154586): Past names map should only be used when named item is empty
32 https://bugs.webkit.org/show_bug.cgi?id=120432
34 Reviewed by Anders Carlsson.
36 Don't add the element from the past names map if we've found elements of the given name.
38 Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html
40 * html/HTMLFormElement.cpp:
41 (WebCore::HTMLFormElement::getNamedElements):
43 2013-08-27 Ryosuke Niwa <rniwa@webkit.org>
45 Don't keep unassociated elements in the past names map
46 https://bugs.webkit.org/show_bug.cgi?id=120328
48 Reviewed by Darin Adler.
50 Remove elements from the past names map of a form element when they are disassociated with the form to match
51 the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
52 in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
54 Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
55 element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
58 Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
59 in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
60 not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
61 FormAssociatedElement and HTMLImageElement.
63 Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html
67 * WebCore.vcxproj/WebCore.vcxproj:
68 * WebCore.vcxproj/WebCore.vcxproj.filters:
69 * WebCore.xcodeproj/project.pbxproj:
70 * html/FormAssociatedElement.cpp:
71 * html/FormAssociatedElement.h:
72 (WebCore::toHTMLElement):
74 * html/FormNamedItem.h: Added.
75 (WebCore::FormNamedItem::~FormNamedItem):
78 (WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
79 HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.
81 * html/HTMLFormControlElement.h:
82 * html/HTMLFormElement.cpp:
83 (WebCore::HTMLFormElement::removeFormElement):
84 (WebCore::HTMLFormElement::removeImgElement):
85 (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
86 from the past names map is either a form associated element or an image element; the condition guarantees
87 that the item will be removed from the map before its element gets destructed.
89 (WebCore::HTMLFormElement::elementFromPastNamesMap):
90 (WebCore::HTMLFormElement::addToPastNamesMap):
91 (WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
92 Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
95 (WebCore::HTMLFormElement::getNamedElements):
97 * html/HTMLFormElement.h:
98 * html/HTMLImageElement.h:
99 * html/HTMLObjectElement.h:
101 2013-08-28 Brendan Long <b.long@cablelabs.com>
103 Duplicate in-band tracks when switching <source> elements
104 https://bugs.webkit.org/show_bug.cgi?id=120369
106 Reviewed by Eric Carlson.
108 Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html
110 * html/HTMLMediaElement.cpp:
111 (WebCore::HTMLMediaElement::createMediaPlayer):
112 Delete existing in-band tracks before creating a new media player.
114 2013-08-28 Bem Jones-Bey <bjonesbe@adobe.com>
116 Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
117 https://bugs.webkit.org/show_bug.cgi?id=120378
119 Reviewed by Darin Adler.
121 Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
122 naming of this adapter has caused much confusion in reading the code,
123 as it wasn't apparent that calls to it were actually doing anything
124 other than searching the interval tree. The new name is a much better
125 description of what it actually does.
127 Also, rename m_lowValue and m_highValue member variables to make it
128 easier to read the code that uses them.
130 Removed the inlines based on a change by eseidel in Blink.
132 No new tests, no behavior change.
134 * rendering/RenderBlock.cpp:
135 (WebCore::::updateOffsetIfNeeded): Update for renames.
136 (WebCore::::collectIfNeeded): Ditto.
137 (WebCore::::getHeightRemaining): Ditto.
138 (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
139 (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
140 * rendering/RenderBlock.h:
141 (WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
142 (WebCore::RenderBlock::FloatingObject::maxX): Ditto.
143 (WebCore::RenderBlock::FloatingObject::y): Ditto.
144 (WebCore::RenderBlock::FloatingObject::maxY): Ditto.
145 (WebCore::RenderBlock::FloatingObject::width): Ditto.
146 (WebCore::RenderBlock::FloatingObject::height): Ditto.
147 (WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
148 (WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
149 (WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.
151 2013-08-28 Tamas Czene <tczene@inf.u-szeged.hu>
153 Resolve unused parameter warning in ScriptedAnimationController.cpp.
154 https://bugs.webkit.org/show_bug.cgi?id=120408
156 Reviewed by Darin Adler.
158 * dom/ScriptedAnimationController.cpp:
159 (WebCore::ScriptedAnimationController::setThrottled):
161 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
163 [CSS Grid Layout] Handle 'span' positions during layout
164 https://bugs.webkit.org/show_bug.cgi?id=119756
166 Reviewed by Andreas Kling.
168 From Blink r149133 by <jchaffraix@chromium.org>
170 Properly handle the 'span' keyword during layout. We only had
171 parsing support so far but with this change we are able to
172 recognize these positions and act accordingly.
174 * rendering/RenderGrid.cpp:
175 (WebCore::RenderGrid::resolveGridPositionsFromStyle):
176 (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
177 * rendering/RenderGrid.h:
178 * rendering/style/GridPosition.h:
179 (WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition):
181 2013-08-28 Antti Koivisto <antti@apple.com>
183 Factor descendant iterator assertions into a class.
184 https://bugs.webkit.org/show_bug.cgi?id=120422
186 Reviewed by Darin Adler.
188 Share the assertions between ChildIterator and DescendantIterator. We can use it for future const iterators too.
190 * GNUmakefile.list.am:
192 * WebCore.vcxproj/WebCore.vcxproj:
193 * WebCore.xcodeproj/project.pbxproj:
194 * dom/ChildIterator.h:
195 (WebCore::::ChildIterator):
196 (WebCore::::operator):
198 * dom/DescendantIterator.h:
199 (WebCore::::DescendantIterator):
200 (WebCore::::operator):
202 * dom/DescendantIteratorAssertions.h: Added.
203 (WebCore::DescendantIteratorAssertions::DescendantIteratorAssertions):
204 (WebCore::DescendantIteratorAssertions::domTreeHasMutated):
205 (WebCore::DescendantIteratorAssertions::dropEventDispatchAssertion):
207 2013-08-28 Darin Adler <darin@apple.com>
209 Eliminate Pasteboard::generalPasteboard
210 https://bugs.webkit.org/show_bug.cgi?id=120392
212 Reviewed by Anders Carlsson.
214 * WebCore.exp.in: Removed the generalPasteboard function.
215 It didn't need to be exported, because no one was using it.
217 * editing/Editor.cpp:
218 (WebCore::Editor::paste): Added an overload that takes a Pasteboard.
219 (WebCore::Editor::copyURL): Ditto.
220 * editing/Editor.h: Added overloads.
222 * editing/EditorCommand.cpp:
223 (WebCore::executePasteGlobalSelection): Put this function inside the same
224 platform #if that the global selection code in the Pasteboard class was in.
225 Changed to use Pasteboard::createForGlobalSelection instead of using the
226 Pasteboard::setSelectionMode approach.
227 (WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.
229 * inspector/InjectedScriptHost.cpp:
230 (WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
231 instead of Pasteboard::generalPasteboard().
232 * inspector/InspectorFrontendHost.cpp:
233 (WebCore::InspectorFrontendHost::copyText): Ditto.
235 * platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
236 and setSelectionMode with createForGlobalSelection.
238 * platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
239 * platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.
241 * platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
242 generalPasteboard, isSelectionMode, and setSelectionMode.
243 (WebCore::Pasteboard::createForGlobalSelection): Added.
244 * platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
245 getCurrentClipboard, and getClipboard.
246 * platform/gtk/PasteboardHelper.h: Deleted the above, plus
247 setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.
249 * platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
250 * platform/mac/PasteboardMac.mm: Deleted generalPasteboard.
252 * platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
253 and setSelectionMode.
254 (WebCore::Pasteboard::createForGlobalSelection): Added.
256 * platform/win/PasteboardWin.cpp: Deleted generalPasteboard.
258 2013-08-28 Antti Koivisto <antti@apple.com>
260 Share attach loops between Elements and ShadowRoots
261 https://bugs.webkit.org/show_bug.cgi?id=120414
263 Reviewed Andreas Kling.
265 * style/StyleResolveTree.cpp:
266 (WebCore::Style::attachChildren):
267 (WebCore::Style::attachShadowRoot):
268 (WebCore::Style::detachChildren):
269 (WebCore::Style::detachShadowRoot):
271 2013-08-28 Anders Carlsson <andersca@apple.com>
273 Clean up XPathExpressionNode and XPath::Function
274 https://bugs.webkit.org/show_bug.cgi?id=120411
276 Reviewed by Antti Koivisto.
278 Rename the subexpression and function argument getters to be more descriptive,
279 remove the non-const overloads (they were never used) and change the getters to return
280 references since they can never be null.
282 * xml/XPathExpressionNode.cpp:
283 * xml/XPathExpressionNode.h:
284 (WebCore::XPath::ParseNode::~ParseNode):
285 (WebCore::XPath::Expression::addSubExpression):
286 (WebCore::XPath::Expression::isContextNodeSensitive):
287 (WebCore::XPath::Expression::setIsContextNodeSensitive):
288 (WebCore::XPath::Expression::isContextPositionSensitive):
289 (WebCore::XPath::Expression::setIsContextPositionSensitive):
290 (WebCore::XPath::Expression::isContextSizeSensitive):
291 (WebCore::XPath::Expression::setIsContextSizeSensitive):
292 (WebCore::XPath::Expression::subExpressionCount):
293 (WebCore::XPath::Expression::subExpression):
294 * xml/XPathFunctions.cpp:
295 (WebCore::XPath::Function::setArguments):
296 (WebCore::XPath::FunId::evaluate):
297 (WebCore::XPath::FunLocalName::evaluate):
298 (WebCore::XPath::FunNamespaceURI::evaluate):
299 (WebCore::XPath::FunName::evaluate):
300 (WebCore::XPath::FunCount::evaluate):
301 (WebCore::XPath::FunString::evaluate):
302 (WebCore::XPath::FunConcat::evaluate):
303 (WebCore::XPath::FunStartsWith::evaluate):
304 (WebCore::XPath::FunContains::evaluate):
305 (WebCore::XPath::FunSubstringBefore::evaluate):
306 (WebCore::XPath::FunSubstringAfter::evaluate):
307 (WebCore::XPath::FunSubstring::evaluate):
308 (WebCore::XPath::FunStringLength::evaluate):
309 (WebCore::XPath::FunNormalizeSpace::evaluate):
310 (WebCore::XPath::FunTranslate::evaluate):
311 (WebCore::XPath::FunBoolean::evaluate):
312 (WebCore::XPath::FunNot::evaluate):
313 (WebCore::XPath::FunLang::evaluate):
314 (WebCore::XPath::FunNumber::evaluate):
315 (WebCore::XPath::FunSum::evaluate):
316 (WebCore::XPath::FunFloor::evaluate):
317 (WebCore::XPath::FunCeiling::evaluate):
318 (WebCore::XPath::FunRound::evaluate):
319 * xml/XPathFunctions.h:
320 (WebCore::XPath::Function::setName):
321 (WebCore::XPath::Function::argumentCount):
322 (WebCore::XPath::Function::argument):
323 (WebCore::XPath::Function::name):
324 * xml/XPathPredicate.cpp:
325 (WebCore::XPath::Negative::evaluate):
326 (WebCore::XPath::NumericOp::evaluate):
327 (WebCore::XPath::EqTestOp::evaluate):
328 (WebCore::XPath::LogicalOp::evaluate):
329 (WebCore::XPath::Union::evaluate):
331 2013-08-28 Andreas Kling <akling@apple.com>
333 Page::pluginData() should return a reference.
334 <https://webkit.org/b/120386>
336 Reviewed by Darin Adler.
338 The PluginData is lazily constructed by pluginData(); it never returns null.
339 A small number of null checks were harmed in the making of this patch.
341 2013-08-28 Andrei Parvu <parvu@adobe.com>
343 <https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
345 Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
347 Reviewed by Dirk Schulze.
349 Test cases added in LayoutTests/fast/masking/parsing-mask.html
351 * css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
352 (WebCore::CSSParser::parseValue):
353 * css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
354 (WebCore::webkitMaskShorthand):
355 (WebCore::matchingShorthandsForLonghand):
357 2013-08-28 Zan Dobersek <zdobersek@igalia.com>
359 REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
360 https://bugs.webkit.org/show_bug.cgi?id=120398
362 Reviewed by Anders Carlsson.
364 * bridge/c/c_class.cpp:
365 (JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
366 to return it after it's adopted by the new HashMap entry.
367 (JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
368 should be returned in this branch, matching the behavior before r154708.
370 2013-08-28 Antti Koivisto <antti@apple.com>
372 Fix Qt no-libxml2 build.
376 * xml/parser/XMLDocumentParserQt.cpp:
377 (WebCore::XMLDocumentParser::parseCdata):
379 2013-08-28 Antti Koivisto <antti@apple.com>
381 Don't use NodeRenderingContext when attaching text renderers
382 https://bugs.webkit.org/show_bug.cgi?id=120402
384 Reviewed by Andreas Kling.
386 This patch moves various functions for creating text renderers from NodeRenderingContext and Text to StyleResolveTree.
387 It also tightens the logic and combines some functions.
389 * dom/CharacterData.cpp:
390 (WebCore::CharacterData::parserAppendData):
391 (WebCore::CharacterData::setDataAndUpdate):
392 * dom/ContainerNode.cpp:
393 (WebCore::attachChild):
394 (WebCore::detachChild):
395 * dom/NodeRenderingContext.cpp:
396 * dom/NodeRenderingContext.h:
398 (WebCore::Text::~Text):
400 * html/HTMLViewSourceDocument.cpp:
401 (WebCore::HTMLViewSourceDocument::addText):
402 * html/parser/HTMLConstructionSite.cpp:
403 (WebCore::executeTask):
404 * html/shadow/InsertionPoint.cpp:
405 (WebCore::InsertionPoint::willAttachRenderers):
406 (WebCore::InsertionPoint::willDetachRenderers):
407 * style/StyleResolveTree.cpp:
408 (WebCore::Style::isRendererReparented):
409 (WebCore::Style::previousSiblingRenderer):
410 (WebCore::Style::nextSiblingRenderer):
412 From NodeRenderingContext::next/previousRenderer
414 (WebCore::Style::createTextRenderersForSiblingsAfterAttachIfNeeded):
416 From Text::createTextRenderersForSiblingsAfterAttachIfNeeded()
418 (WebCore::Style::textRendererIsNeeded):
420 From Text::textRendererIsNeeded
422 (WebCore::Style::createTextRendererIfNeeded):
424 Combines code from Text::createTextRendererIfNeeded, NodeRenderingContext::createRendererForTextIfNeeded,
425 NodeRenderingContext constructor and text node relevant code NodeRenderingContext::shouldCreateRenderer.
427 (WebCore::Style::attachTextRenderer):
428 (WebCore::Style::detachTextRenderer):
430 New functions of attaching text renderers. From Text::attach/detachText()
432 (WebCore::Style::updateTextRendererAfterContentChange):
434 From Text::updateTextRenderer.
436 (WebCore::Style::attachShadowRoot):
437 (WebCore::Style::attachChildren):
438 (WebCore::Style::attachRenderTree):
439 (WebCore::Style::detachShadowRoot):
440 (WebCore::Style::detachChildren):
441 (WebCore::Style::updateTextStyle):
442 * style/StyleResolveTree.h:
443 * xml/parser/XMLDocumentParser.cpp:
444 (WebCore::XMLDocumentParser::exitText):
445 * xml/parser/XMLDocumentParserLibxml2.cpp:
446 (WebCore::XMLDocumentParser::cdataBlock):
448 2013-08-28 Antti Koivisto <antti@apple.com>
450 Make descendant iterators always require ContainerNode root
451 https://bugs.webkit.org/show_bug.cgi?id=120393
453 Reviewed by Andreas Kling.
455 Remove Node* root versions of the iterators.
456 Fix the few call sites that required them to have tighter typing.
458 * accessibility/AccessibilityNodeObject.cpp:
459 (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
460 (WebCore::siblingWithAriaRole):
461 * dom/ChildIterator.h:
462 (WebCore::::ChildIteratorAdapter):
465 (WebCore::elementChildren):
466 (WebCore::childrenOfType):
467 * dom/DescendantIterator.h:
468 (WebCore::::DescendantIterator):
469 (WebCore::::DescendantIteratorAdapter):
472 (WebCore::elementDescendants):
473 (WebCore::descendantsOfType):
474 * editing/ApplyStyleCommand.cpp:
475 (WebCore::dummySpanAncestorForNode):
476 (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
477 (WebCore::ApplyStyleCommand::applyInlineStyle):
478 * editing/ApplyStyleCommand.h:
480 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
482 WorkerGlobalScopeWebDatabase requires ENABLE(WORKERS)
483 https://bugs.webkit.org/show_bug.cgi?id=120395
485 Reviewed by Christophe Dumez.
487 WorkerGlobalScopeDatabase uses the WorkerGlobalScope object which is
488 defined only when WORKERS are enabled. We should guard that code.
490 * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp:
491 * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h:
492 * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl:
494 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
496 [CSS Grid Layout] Fix grid position resolution
497 https://bugs.webkit.org/show_bug.cgi?id=119801
499 Reviewed by Andreas Kling.
501 From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org>
503 Both grid-{column|row}-end and negative positions were not
504 properly handled in our grid position resolution code. We were
505 using the same code to resolve all the grid positions without
506 considering the edges of the grid.
508 Also refactored the grid size estimation in
509 resolveGridPositionsFromStyle() so we can use it for the grid size
510 estimation. The code no longer requires the grid to be filled at
511 that moment as the specs changed to use the "explicit grid" which
512 is independent of grid items (only depends on style).
514 Test: fast/css-grid-layout/grid-item-negative-position-resolution.html
516 * rendering/RenderGrid.cpp:
517 (WebCore::RenderGrid::maximumIndexInDirection):
518 (WebCore::RenderGrid::resolveGridPositionsFromStyle):
519 (WebCore::adjustGridPositionForSide):
520 (WebCore::RenderGrid::resolveGridPositionFromStyle):
521 * rendering/RenderGrid.h:
523 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
525 [CSS Grid Layout] infinity should be defined as a negative value
526 https://bugs.webkit.org/show_bug.cgi?id=107053
528 Reviewed by Andreas Kling.
530 From Blink r154805 by <jchaffraix@chromium.org>
532 Reject negative values for track-breadth at parse time as
533 mentioned in the latest versions of the spec.
535 Added some extra checks to the existing tests.
538 (WebCore::CSSParser::parseGridBreadth):
539 * rendering/RenderGrid.cpp:
540 (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
542 2013-08-28 Sergio Villar Senin <svillar@igalia.com>
544 [Soup] WebTiming information not shown in the inspector
545 https://bugs.webkit.org/show_bug.cgi?id=118395
547 Reviewed by Martin Robinson.
549 WebTiming information was not correctly provided to WebCore
550 because the gotHeadersCallback was incorrectly resetting the
551 original ResourceResponse (which had the ResourceLoadTiming
552 object) instead of simply updating their contents using the
555 No new test required as this feature is already covered by the
556 existing webtiming tests. In any case this change includes a fix
557 for the http/tests/misc/webtiming-ssl.php test which was not
558 failing even if it should because it was not correct.
560 * platform/network/soup/ResourceHandleSoup.cpp:
561 (WebCore::gotHeadersCallback):
562 (WebCore::restartedCallback): restartedCallback should be
563 available only if WEB_TIMING is defined.
564 (WebCore::createSoupMessageForHandleAndRequest): Ditto.
566 2013-08-26 Antonio Gomes <a1.gomes@sisa.samsung.com>
568 Scrolling allowed when overflow:hidden (seen on Acid2)
569 https://bugs.webkit.org/show_bug.cgi?id=22769
571 Reviewed by Darin Adler.
573 Autoscroll, as well as other user-driven scroll actions,
574 has to respect the scrollability styled into the web page.
575 More specifically, if a html or body tags are styled with
576 overflow:hidden, autoscroll should not scroll the containing document.
578 In order to fix this, patch hardens RenderBox::canAutoscroll as
579 following: previously, ::canAutoscroll was relying solemnly in
580 ::canBeScrolledAndHasScrollableArea to determine the scrollability
581 of #document node, which was unconditionally returned as 'true'.
582 Patch extends ::canAutoscroll to handle the #document case for
583 main and inner frames, and now it asks through ::isScrollable if
584 the corresponding document's FrameView is actually user-scrollable.
586 Note, that the patch change ::canAutoscroll to cover the non-mainFrame
587 #document case, so the comment specific to Apple's Mail app can be omited
590 Test: fast/events/autoscroll-in-overflow-hidden-html.html
592 * rendering/RenderBox.cpp:
593 (WebCore::RenderBox::canAutoscroll):
595 2013-08-27 Santosh Mahto <santosh.ma@samsung.com>
597 Adding "explicit" keyword in forms related classes constructor
598 https://bugs.webkit.org/show_bug.cgi?id=120366
600 Reviewed by Darin Adler.
602 Adding "explicit" keyword in constructors.
604 * html/BaseButtonInputType.h:
605 (WebCore::BaseButtonInputType::BaseButtonInputType):
606 * html/BaseCheckableInputType.h:
607 (WebCore::BaseCheckableInputType::BaseCheckableInputType):
608 * html/BaseChooserOnlyDateAndTimeInputType.h:
609 (WebCore::BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType):
610 * html/BaseClickableWithKeyInputType.h:
611 (WebCore::BaseClickableWithKeyInputType::BaseClickableWithKeyInputType):
612 * html/BaseTextInputType.h:
613 (WebCore::BaseTextInputType::BaseTextInputType):
614 * html/ColorInputType.h:
615 (WebCore::ColorInputType::ColorInputType):
616 * html/DateInputType.h:
617 * html/DateTimeInputType.h:
618 (WebCore::DateTimeInputType::DateTimeInputType):
619 * html/DateTimeLocalInputType.h:
620 (WebCore::DateTimeLocalInputType::DateTimeLocalInputType):
621 * html/EmailInputType.h:
622 (WebCore::EmailInputType::EmailInputType):
623 * html/FileInputType.h:
624 * html/HiddenInputType.h:
625 (WebCore::HiddenInputType::HiddenInputType):
627 * html/ImageInputType.h:
629 (WebCore::InputType::InputType):
630 * html/MediaController.h:
631 * html/MonthInputType.h:
632 (WebCore::MonthInputType::MonthInputType):
633 * html/RadioInputType.h:
634 (WebCore::RadioInputType::RadioInputType):
635 * html/RangeInputType.h:
636 * html/ResetInputType.h:
637 (WebCore::ResetInputType::ResetInputType):
638 * html/SearchInputType.h:
639 * html/SubmitInputType.h:
640 (WebCore::SubmitInputType::SubmitInputType):
641 * html/TelephoneInputType.h:
642 (WebCore::TelephoneInputType::TelephoneInputType):
643 * html/TextFieldInputType.h:
644 * html/TextInputType.h:
645 (WebCore::TextInputType::TextInputType):
646 * html/TimeInputType.h:
647 * html/URLInputType.h:
648 (WebCore::URLInputType::URLInputType):
649 * html/ValidationMessage.h:
650 * html/WeekInputType.h:
651 (WebCore::WeekInputType::WeekInputType):
653 2013-08-27 Benjamin Poulain <benjamin@webkit.org>
655 Fix the indentation of SpaceSplitString
656 https://bugs.webkit.org/show_bug.cgi?id=120390
658 Reviewed by Ryosuke Niwa.
660 * dom/SpaceSplitString.h:
661 (WebCore::SpaceSplitStringData::contains):
662 (WebCore::SpaceSplitStringData::isUnique):
663 (WebCore::SpaceSplitStringData::size):
664 (WebCore::SpaceSplitStringData::operator[]):
665 (WebCore::SpaceSplitString::SpaceSplitString):
666 (WebCore::SpaceSplitString::operator!=):
667 (WebCore::SpaceSplitString::clear):
668 (WebCore::SpaceSplitString::contains):
669 (WebCore::SpaceSplitString::containsAll):
670 (WebCore::SpaceSplitString::size):
671 (WebCore::SpaceSplitString::isNull):
672 (WebCore::SpaceSplitString::operator[]):
673 (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
674 (WebCore::SpaceSplitString::ensureUnique):
676 2013-08-27 Andreas Kling <akling@apple.com>
678 Make it less awkward to check if a Frame is the main Frame.
679 <https://webkit.org/b/120382>
681 Reviewed by Anders Carlsson.
683 Added Page::frameIsMainFrame(const Frame*) so code that wants to find out if a given
684 Frame is a Page's main frame doesn't have to do a manual pointer compare.
687 (WebCore::Page::frameIsMainFrame):
689 Added. Replaces (frame == &page->mainFrame()) idiom.
691 2013-08-27 Morten Stenshorne <mstensho@opera.com>
693 Improve multicol intrinsic width calculation
694 https://bugs.webkit.org/show_bug.cgi?id=116677
696 Reviewed by David Hyatt.
698 Test: fast/css-intrinsic-dimensions/multicol.html
700 * rendering/RenderBlock.cpp:
701 (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
702 (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
703 * rendering/RenderBlock.h:
705 2013-08-27 Rob Buis <rwlbuis@webkit.org>
707 feImage fails if referenced node contains radialGradient declaration
708 https://bugs.webkit.org/show_bug.cgi?id=118735
710 Reviewed by Darin Adler.
712 Only call parent's updateRelativeLengthsInformation for graphics elements.
714 Tests: svg/custom/feImage-pserver-with-percentage-expected.svg
715 svg/custom/feImage-pserver-with-percentage.svg
717 * svg/SVGElement.cpp:
718 (WebCore::SVGElement::updateRelativeLengthsInformation):
720 2013-08-27 Darin Adler <darin@apple.com>
722 No need for generalPasteboard (aside from "global selection mode")
723 https://bugs.webkit.org/show_bug.cgi?id=120367
725 Reviewed by Alexey Proskuryakov.
727 * editing/Editor.cpp:
728 (WebCore::Editor::pasteAsPlainTextBypassingDHTML):
729 (WebCore::Editor::dispatchCPPEvent):
730 (WebCore::Editor::cut):
731 (WebCore::Editor::copy):
732 (WebCore::Editor::paste):
733 (WebCore::Editor::pasteAsPlainText):
734 (WebCore::Editor::copyURL):
735 (WebCore::Editor::copyImage):
736 Use Pasteboard::createForCopyAndPaste rather than the single general pasteboard
737 for editing operations.
739 2013-08-27 Chris Fleizach <cfleizach@apple.com>
741 <https://webkit.org/b/120117> AX: <noscript> contents are exposed as static text
743 Reviewed by Tim Horton.
745 If <noscript> is not being used (because there is script) then we need to ignore its contents for AX.
747 Test: accessibility/noscript-ignored.html
749 * accessibility/AccessibilityRenderObject.cpp:
750 (WebCore::AccessibilityRenderObject::addCanvasChildren):
751 * accessibility/AccessibilityNodeObject.cpp:
752 (WebCore::AccessibilityNodeObject::canHaveChildren):
754 2013-08-27 Anders Carlsson <andersca@apple.com>
756 Stop using deleteAllValues in CClass
757 https://bugs.webkit.org/show_bug.cgi?id=120376
759 Reviewed by Andreas Kling.
761 * bridge/c/c_class.cpp:
762 (JSC::Bindings::CClass::CClass):
763 (JSC::Bindings::CClass::~CClass):
764 (JSC::Bindings::CClass::methodNamed):
765 (JSC::Bindings::CClass::fieldNamed):
766 * bridge/c/c_class.h:
767 * bridge/jsc/BridgeJSC.h:
769 2013-08-27 Benjamin Poulain <benjamin@webkit.org>
771 Clean ClassList and DOMSettableTokenList
772 https://bugs.webkit.org/show_bug.cgi?id=120344
774 Reviewed by Ryosuke Niwa.
776 This patch cleans ClassList and DOMSettableTokenList to make it simpler to update
778 - Move the implementation of virtual functions to the cpp file.
779 - Clean the #includes.
780 - Make the implemented pure virtual methods final.
781 - Make the element() accessor const.
783 * html/ClassList.cpp:
784 (WebCore::ClassList::create):
785 (WebCore::ClassList::element):
786 (WebCore::ClassList::value):
787 (WebCore::ClassList::setValue):
788 (WebCore::ClassList::classNames):
790 * html/DOMSettableTokenList.cpp:
791 (WebCore::DOMSettableTokenList::create):
792 (WebCore::DOMSettableTokenList::ref):
793 (WebCore::DOMSettableTokenList::deref):
794 (WebCore::DOMSettableTokenList::length):
795 (WebCore::DOMSettableTokenList::value):
796 * html/DOMSettableTokenList.h:
797 * html/DOMTokenList.h:
798 (WebCore::DOMTokenList::element):
800 2013-08-27 Arunprasad Rajkumar <arurajku@cisco.com>
802 Replace currentTime() with monotonicallyIncreasingTime() in WebCore
803 https://bugs.webkit.org/show_bug.cgi?id=119958
805 Reviewed by Alexey Proskuryakov.
807 WTF::currentTime() is prone to NTP and manual adjustments, so use
808 WTF::monotonicallyIncreasingTime() to measure elapsed time.
810 It is a continuation of r154201.
812 * history/CachedPage.cpp:
813 (WebCore::CachedPage::CachedPage):
814 (WebCore::CachedPage::hasExpired):
815 * html/parser/HTMLParserScheduler.h:
816 (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
817 * loader/CrossOriginPreflightResultCache.cpp:
818 (WebCore::CrossOriginPreflightResultCacheItem::parse):
819 (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
820 * loader/FrameLoader.cpp:
821 (WebCore::FrameLoader::setState):
822 * loader/ProgressTracker.cpp:
823 (WebCore::ProgressTracker::incrementProgress):
824 * loader/cache/CachedCSSStyleSheet.cpp:
825 (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
826 * loader/cache/CachedImage.cpp:
827 (WebCore::CachedImage::didDraw):
828 * loader/cache/MemoryCache.cpp:
829 (WebCore::MemoryCache::pruneLiveResourcesToSize):
830 * loader/icon/IconDatabase.cpp:
831 (WebCore::IconDatabase::iconDatabaseSyncThread):
832 (WebCore::IconDatabase::syncThreadMainLoop):
833 (WebCore::IconDatabase::readFromDatabase):
834 (WebCore::IconDatabase::writeToDatabase):
835 (WebCore::IconDatabase::cleanupSyncThread):
836 * page/animation/AnimationBase.cpp:
837 (WebCore::AnimationBase::freezeAtTime):
838 * page/animation/AnimationController.cpp:
839 (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
840 * platform/graphics/GraphicsLayerAnimation.cpp:
841 (WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
842 (WebCore::GraphicsLayerAnimation::resume):
843 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
844 (WebCore::AVFWrapper::createImageForTimeInRect):
845 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
846 (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
847 (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
848 * platform/graphics/ca/GraphicsLayerCA.cpp:
849 (WebCore::GraphicsLayerCA::suspendAnimations):
850 * platform/graphics/ca/PlatformCALayer.h:
851 (WebCore::PlatformCALayer::currentTimeToMediaTime):
852 * platform/graphics/ca/mac/LayerPool.mm:
853 (WebCore::LayerPool::addLayer):
854 (WebCore::LayerPool::decayedCapacity):
855 (WebCore::LayerPool::pruneTimerFired):
856 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
857 (mediaTimeToCurrentTime):
858 * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
859 (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
860 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
861 (PlatformCALayer::printTree):
862 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
863 (WebCore::GraphicsLayerTextureMapper::addAnimation):
864 * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
865 (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
866 (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
867 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
868 (WebCore::CoordinatedGraphicsLayer::addAnimation):
869 * platform/network/DNSResolveQueue.cpp:
870 (WebCore::DNSResolveQueue::isUsingProxy):
871 * plugins/win/PluginMessageThrottlerWin.cpp:
872 (WebCore::PluginMessageThrottlerWin::appendMessage):
873 * rendering/RenderLayerCompositor.cpp:
874 (WebCore::RenderLayerCompositor::didPaintBacking):
875 (WebCore::RenderLayerCompositor::updateCompositingLayers):
876 * rendering/RenderProgress.cpp:
877 (WebCore::RenderProgress::animationProgress):
878 (WebCore::RenderProgress::updateAnimationState):
879 * svg/animation/SMILTimeContainer.cpp:
880 (WebCore::SMILTimeContainer::elapsed):
881 (WebCore::SMILTimeContainer::begin):
882 (WebCore::SMILTimeContainer::pause):
883 (WebCore::SMILTimeContainer::resume):
884 (WebCore::SMILTimeContainer::setElapsed):
886 2013-08-27 Robert Hogan <robert@webkit.org>
888 cell width / offsetTop incorrect
889 https://bugs.webkit.org/show_bug.cgi?id=11582
891 Reviewed by David Hyatt.
893 The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
894 problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
895 and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
898 Test: fast/table/offset-top-includes-border.html
900 * rendering/RenderBoxModelObject.cpp:
901 (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
902 * rendering/RenderTableSection.cpp:
903 (WebCore::RenderTableSection::layoutRows):
905 2013-08-27 Jacky Jiang <zhajiang@blackberry.com>
907 [BlackBerry] Rotate device from landscape to portrait during youtube streaming will cause device screen flash with video list page
908 https://bugs.webkit.org/show_bug.cgi?id=120364
910 Reviewed by Rob Buis.
911 Internally reviewed by Arvid Nilsson.
914 When rotating device from landscape mode to portrait mode, we updated
915 texture contents based on landscape mode front visibility and back
916 visibility on WebKit thread at the very beginning and the landscape mode
917 tiles wouldn't be able to cover the portrait mode screen which resulted
919 It's hard to compute front visibility information on WebKit thread because
920 it doesn't know where the layers will be on the screen. Therefore, the
921 front visibility won't be updated until the first time we draw textures
922 on compositing thread.
923 The patch traverses through LayerWebKitThread and LayerCompositingThread
924 and discards back visibility and front visibility respectively if there
925 is a pending orientation. In this way, we can pick up layerTilerPrefillRect
926 as visibleRect instead of the visibleRect from the stale visibilities
927 and add more tiles for uncovered screen when updating texture contents
929 The patch also fixes a bug that we prune tiles based on the stale
930 m_requiredTextureSize in pruneTextures(). We should prune tiles based
931 on the updated pendingTextureSize instead.
933 * platform/graphics/blackberry/LayerCompositingThread.cpp:
934 (WebCore::LayerCompositingThread::discardFrontVisibility):
935 * platform/graphics/blackberry/LayerCompositingThread.h:
936 * platform/graphics/blackberry/LayerCompositingThreadClient.h:
937 (WebCore::LayerCompositingThreadClient::discardFrontVisibility):
938 * platform/graphics/blackberry/LayerRenderer.cpp:
939 (WebCore::LayerRenderer::discardFrontVisibility):
940 * platform/graphics/blackberry/LayerRenderer.h:
941 * platform/graphics/blackberry/LayerTiler.cpp:
942 (WebCore::LayerTiler::discardFrontVisibility):
943 (WebCore::LayerTiler::processTextureJob):
944 (WebCore::LayerTiler::pruneTextures):
945 (WebCore::LayerTiler::discardBackVisibility):
946 * platform/graphics/blackberry/LayerTiler.h:
947 * platform/graphics/blackberry/LayerWebKitThread.cpp:
948 (WebCore::LayerWebKitThread::discardBackVisibility):
949 * platform/graphics/blackberry/LayerWebKitThread.h:
951 2013-08-27 Antti Koivisto <antti@apple.com>
953 Better mutation and event assertions for descendant iterators
954 https://bugs.webkit.org/show_bug.cgi?id=120368
956 Reviewed by Andreas Kling.
958 Add mutation assertions to all functions.
959 Drop the no-event-dispatch assertion when the iterator reaches the end. This reduces need for iterator scoping
960 just to avoid assertions.
962 * dom/ChildIterator.h:
963 (WebCore::::domTreeHasMutated):
964 (WebCore::::operator):
966 * dom/DescendantIterator.h:
967 (WebCore::::domTreeHasMutated):
968 (WebCore::::operator):
971 (WebCore::Document::childrenChanged):
975 2013-08-27 Renata Hodovan <reni@webkit.org>
977 Missing null-check of parent renderer in WebCore::HTMLEmbedElement::rendererIsNeeded()
978 https://bugs.webkit.org/show_bug.cgi?id=120343
980 Reviewed by Darin Adler.
982 Null-check the parent renderer of HTMLEmbedElement in WebCore::HTMLEmbedElement::rendererIsNeeded()
985 Test: fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash.html
987 * html/HTMLEmbedElement.cpp:
988 (WebCore::HTMLEmbedElement::rendererIsNeeded):
990 2013-08-27 Brent Fulgham <bfulgham@apple.com>
992 [Windows] Correct method call for characteristic update.
994 Reviewed by Eric Carlson.
996 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
997 (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
998 [Windows] Correct method call (should have been "characteristicsChanged", not
999 "player()->characteristicChanged()"
1001 2013-08-26 Brent Fulgham <bfulgham@apple.com>
1003 [Windows] some track language tags are not recognized
1004 https://bugs.webkit.org/show_bug.cgi?id=120335
1006 Reviewed by Eric Carlson.
1008 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise implementation
1009 to match logic in platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjc.mm
1011 2013-08-27 Andreas Kling <akling@apple.com>
1013 Clumsily fix Gtk+ build. Not my proudest moment.
1015 * rendering/svg/RenderSVGResourceFilter.cpp:
1017 2013-08-27 Andreas Kling <akling@apple.com>
1021 * rendering/svg/RenderSVGResourceFilter.cpp:
1023 2013-08-27 Andreas Kling <akling@apple.com>
1025 RenderView::availableLogicalHeight() should be self-contained.
1026 <https://webkit.org/b/120356>
1028 Reviewed by Antti Koivisto.
1030 Instead of checking isRenderView() in RenderBox::availableLogicalHeightUsing()
1031 and doing an early return, do everything needed without leaving RenderView instead.
1032 Document style never has min-/max-height so there's no need to apply constraints.
1034 * rendering/RenderBox.cpp:
1035 (WebCore::RenderBox::availableLogicalHeightUsing):
1036 * rendering/RenderView.cpp:
1037 (WebCore::RenderView::availableLogicalHeight):
1039 2013-08-27 Andreas Kling <akling@apple.com>
1041 Simplify some more Settings access where we have a Frame in reach.
1042 <https://webkit.org/b/120256>
1044 Reviewed by Darin Adler.
1046 RenderObjects can always find Settings through the Frame.
1048 * rendering/InlineTextBox.cpp:
1049 (WebCore::InlineTextBox::paint):
1050 * rendering/RenderBoxModelObject.cpp:
1051 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1052 * rendering/svg/RenderSVGResourceFilter.cpp:
1053 (WebCore::RenderSVGResourceFilter::applyResource):
1055 2013-08-27 Andreas Kling <akling@apple.com>
1057 RenderView::flowThreadController() should return a reference.
1058 <https://webkit.org/b/120363>
1060 Reviewed by Antti Koivisto.
1062 This function does lazy construction and always returns an object.
1064 2013-08-27 Andreas Kling <akling@apple.com>
1066 HTMLAppletElement: Use child iterator to walk <param> children.
1067 <https://webkit.org/b/120361>
1069 Reviewed by Antti Koivisto.
1071 Take Antti's fancy new child iterator for a quick spin.
1073 * html/HTMLAppletElement.cpp:
1074 (WebCore::HTMLAppletElement::updateWidget):
1076 2013-08-27 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
1078 [gstreamer] Make sure gstreamer source element is thread-safe
1079 https://bugs.webkit.org/show_bug.cgi?id=115352
1081 Reviewed by Philippe Normand.
1083 GStreamer source element may be created by any gstreamer element on any thread by calling
1084 gst_element_make_from_uri with the URIs handled by the source element.
1085 This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
1086 being created outside the main thread.
1088 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1089 (webkit_web_src_init):
1090 (webKitWebSrcDispose):
1091 (webKitWebSrcFinalize):
1092 (webKitWebSrcSetProperty):
1093 (webKitWebSrcGetProperty):
1094 (removeTimeoutSources):
1096 (webKitWebSrcStart):
1097 (webKitWebSrcChangeState):
1098 (webKitWebSrcQueryWithParent):
1099 (webKitWebSrcGetUri):
1100 (webKitWebSrcSetUri):
1101 (webKitWebSrcNeedDataMainCb):
1102 (webKitWebSrcNeedDataCb):
1103 (webKitWebSrcEnoughDataMainCb):
1104 (webKitWebSrcEnoughDataCb):
1105 (webKitWebSrcSeekMainCb):
1106 (webKitWebSrcSeekDataCb):
1107 (webKitWebSrcSetMediaPlayer):
1108 (StreamingClient::StreamingClient):
1109 (StreamingClient::~StreamingClient):
1110 (StreamingClient::createReadBuffer):
1111 (StreamingClient::handleResponseReceived):
1112 (StreamingClient::handleDataReceived):
1113 (StreamingClient::handleNotifyFinished):
1114 (CachedResourceStreamingClient::CachedResourceStreamingClient):
1115 (CachedResourceStreamingClient::~CachedResourceStreamingClient):
1116 (CachedResourceStreamingClient::loadFailed):
1117 (CachedResourceStreamingClient::setDefersLoading):
1118 (CachedResourceStreamingClient::getOrCreateReadBuffer):
1119 (CachedResourceStreamingClient::responseReceived):
1120 (CachedResourceStreamingClient::dataReceived):
1121 (CachedResourceStreamingClient::notifyFinished):
1122 (ResourceHandleStreamingClient::ResourceHandleStreamingClient):
1123 (ResourceHandleStreamingClient::~ResourceHandleStreamingClient):
1124 (ResourceHandleStreamingClient::loadFailed):
1125 (ResourceHandleStreamingClient::setDefersLoading):
1126 (ResourceHandleStreamingClient::getOrCreateReadBuffer):
1127 (ResourceHandleStreamingClient::willSendRequest):
1128 (ResourceHandleStreamingClient::didReceiveResponse):
1129 (ResourceHandleStreamingClient::didReceiveData):
1130 (ResourceHandleStreamingClient::didFinishLoading):
1131 (ResourceHandleStreamingClient::didFail):
1132 (ResourceHandleStreamingClient::wasBlocked):
1133 (ResourceHandleStreamingClient::cannotShowURL):
1134 Make element thread-safe, add support to use the element without a player associated (e.g.
1135 the DASH plugin using the webkitsrc to download fragments), use GMutexLocker to simplify
1136 locks and other general improvements.
1138 2013-08-27 Antti Koivisto <antti@apple.com>
1140 Remove branch from DescendantIteratorAdapter::begin() when invoking for ContainerNode
1141 https://bugs.webkit.org/show_bug.cgi?id=120358
1143 Reviewed by Andreas Kling.
1145 * dom/ContainerNode.h:
1147 Delete isContainerNode() so it can't be called if there is static knowledge that the object is a ContainerNode.
1149 * dom/DescendantIterator.h:
1150 (WebCore::::DescendantIterator):
1152 Make DescendantIterator use Node* as root instead of ContainerNode*. It is only used for equality comparison.
1156 Remove branch. Rely on ElementTraversal specialization for ContainerNodes.
1158 2013-08-27 Joseph Pecoraro <pecoraro@apple.com>
1160 Web Inspector: Column Breakpoint not working, may be off by 1
1161 https://bugs.webkit.org/show_bug.cgi?id=120334
1163 Reviewed by David Kilzer.
1165 JavaScriptCore changed to 1-based column numbers at some point. We
1166 need to update the ScriptDebugger assumption that they were 0-based.
1168 Test: inspector-protocol/debugger/column-breakpoint.html
1170 * bindings/js/ScriptDebugServer.cpp:
1171 (WebCore::ScriptDebugServer::createCallFrame):
1172 (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
1174 2013-08-27 Antti Koivisto <antti@apple.com>
1176 Switch some more code to element child/descendant iterators
1177 https://bugs.webkit.org/show_bug.cgi?id=120355
1179 Reviewed by Andreas Kling.
1181 Move from Traversal<ElementType>::next() and Traversal<ElementType>::nextSibling() to iterators.
1183 * css/CSSFontFaceSource.cpp:
1184 (WebCore::CSSFontFaceSource::getFontData):
1186 (WebCore::Document::removeTitle):
1187 (WebCore::Document::updateBaseURL):
1188 (WebCore::Document::processBaseElement):
1189 * dom/TreeScope.cpp:
1190 (WebCore::TreeScope::labelElementForId):
1191 (WebCore::TreeScope::findAnchor):
1192 * html/HTMLFieldSetElement.cpp:
1193 (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
1194 (WebCore::HTMLFieldSetElement::childrenChanged):
1195 * html/HTMLLabelElement.cpp:
1196 (WebCore::HTMLLabelElement::control):
1197 * html/HTMLMediaElement.cpp:
1198 (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
1199 * html/HTMLObjectElement.cpp:
1200 (WebCore::HTMLObjectElement::parametersForPlugin):
1201 * rendering/FilterEffectRenderer.cpp:
1202 (WebCore::FilterEffectRenderer::buildReferenceFilter):
1203 * svg/SVGFilterPrimitiveStandardAttributes.h:
1204 (WebCore::isSVGFilterPrimitiveStandardAttributes):
1205 (WebCore::SVGFilterPrimitiveStandardAttributes):
1206 * svg/animation/SMILTimeContainer.cpp:
1207 (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
1208 * svg/graphics/SVGImage.cpp:
1209 (WebCore::SVGImage::hasSingleSecurityOrigin):
1211 2013-08-26 Andreas Kling <akling@apple.com>
1213 FocusController::focusedOrMainFrame() should return a reference.
1214 <https://webkit.org/b/120339>
1216 Reviewed by Antti Koivisto.
1218 Now that Page::mainFrame() returns a reference, we can make this return a reference
1219 too, since there's always either a focused or a main frame.
1221 One hectogram of null checks removed as a result.
1223 2013-08-26 Andreas Kling <akling@apple.com>
1225 Document's renderer is always a RenderView.
1226 <https://webkit.org/b/120304>
1228 Reviewed by Darin Adler.
1230 Let's enforce this better by storing a RenderView* instead of a plain RenderObject*.
1231 We should switch callers that grab at Document::renderer() to calling renderView()
1232 instead, but that's better done separately.
1235 (WebCore::Document::Document):
1236 (WebCore::Document::~Document):
1237 (WebCore::Document::setRenderView):
1238 (WebCore::Document::createRenderTree):
1239 (WebCore::Document::detach):
1240 (WebCore::Document::setInPageCache):
1242 (WebCore::Document::renderView):
1243 (WebCore::Document::renderer):
1244 * html/parser/HTMLResourcePreloader.cpp:
1245 * rendering/RenderObject.cpp:
1246 (WebCore::RenderObject::setStyle):
1247 * rendering/RenderView.h:
1248 * svg/SVGSVGElement.cpp:
1249 (WebCore::SVGSVGElement::updateCurrentTranslate):
1251 2013-08-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
1253 Font's fast code path doesn't handle partial runs correctly when kerning or ligatures are enabled
1254 https://bugs.webkit.org/show_bug.cgi?id=100050
1256 Reviewed by Darin Adler.
1258 Renamed m_characterIndex to m_characterIndexOfGlyph and gave it an inline size of 10,
1259 which covers around 66% of all cases. The rest of the cases are now preallocated to the
1260 upper limit which is length of the original TextRun.
1262 * platform/graphics/FontFastPath.cpp:
1263 (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1264 (WebCore::Font::selectionRectForSimpleText):
1265 (WebCore::Font::offsetForPositionForSimpleText):
1266 * platform/graphics/WidthIterator.cpp:
1267 (WebCore::WidthIterator::WidthIterator):
1268 (WebCore::WidthIterator::advanceInternal):
1269 * platform/graphics/WidthIterator.h:
1271 2013-08-27 Christophe Dumez <ch.dumez@sisa.samsung.com>
1273 Implement DOM3 wheel event
1274 https://bugs.webkit.org/show_bug.cgi?id=94081
1276 Reviewed by Darin Adler.
1278 Add support for DOM Level 3 WheelEvent:
1279 http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent
1281 Firefox, IE10 and since recently Blink already support it so
1282 it increases our cross-browser compatibility.
1284 The non-standard 'mousewheel' event is still supported for backward
1285 compatibility. Note that the deltas returned by the mousewheel and
1286 the wheel events are not identical:
1287 - They have opposite signs.
1288 - The wheel event reports the actual amount of pixels that should be
1289 scrolled while the legacy mousewheel event reports a factor of the
1290 number of mouse wheel ticks (using a constant multiplier).
1292 Tests: fast/events/wheelevent-basic.html
1293 fast/events/wheelevent-constructor.html
1294 fast/events/wheelevent-mousewheel-interaction.html
1301 * dom/EventTarget.cpp:
1302 (WebCore::legacyType):
1303 (WebCore::EventTarget::shouldObserveLegacyType):
1304 (WebCore::EventTarget::setupLegacyTypeObserverIfNeeded):
1305 (WebCore::EventTarget::fireEventListeners):
1306 * dom/EventTarget.h:
1308 (WebCore::Node::didMoveToNewDocument):
1309 (WebCore::tryAddEventListener):
1310 (WebCore::tryRemoveEventListener):
1311 (WebCore::Node::defaultEventHandler):
1312 * dom/WheelEvent.cpp:
1313 (WebCore::WheelEventInit::WheelEventInit):
1314 (WebCore::WheelEvent::WheelEvent):
1315 (WebCore::WheelEvent::initWheelEvent):
1317 (WebCore::WheelEvent::deltaX):
1318 (WebCore::WheelEvent::deltaY):
1319 (WebCore::WheelEvent::deltaZ):
1320 (WebCore::WheelEvent::wheelDelta):
1321 (WebCore::WheelEvent::wheelDeltaX):
1322 (WebCore::WheelEvent::wheelDeltaY):
1323 * dom/WheelEvent.idl:
1324 * html/HTMLAttributeNames.in:
1325 * html/HTMLElement.cpp:
1326 (WebCore::HTMLElement::eventNameForAttributeName):
1327 * page/DOMWindow.cpp:
1328 (WebCore::DOMWindow::addEventListener):
1329 (WebCore::DOMWindow::removeEventListener):
1331 * page/DOMWindow.idl:
1332 * page/EventHandler.cpp:
1333 (WebCore::EventHandler::defaultWheelEventHandler):
1334 * plugins/blackberry/PluginViewBlackBerry.cpp:
1335 (WebCore::PluginView::handleWheelEvent):
1336 * svg/SVGElementInstance.cpp:
1337 * svg/SVGElementInstance.h:
1338 * svg/SVGElementInstance.idl:
1340 2013-08-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
1342 Assertion while scrolling news.google.com
1343 https://bugs.webkit.org/show_bug.cgi?id=115303
1345 Reviewed by Anders Carlsson.
1347 Do not relayout when accessing script elements during painting.
1349 * html/HTMLEmbedElement.cpp:
1350 (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
1352 2013-08-27 Benjamin Poulain <benjamin@webkit.org>
1354 Remove DOMSettableTokenList's overload of add() and remove()
1355 https://bugs.webkit.org/show_bug.cgi?id=120341
1357 Reviewed by Ryosuke Niwa.
1359 Little refactoring to make other cleanups easier. Instead of modifying
1360 SpaceSplitString directly, rely on DOMTokenList ultimately changing
1361 the value, which in turn updates the tokens.
1363 * html/DOMSettableTokenList.cpp:
1364 * html/DOMSettableTokenList.h:
1365 * html/DOMTokenList.h:
1367 2013-08-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
1369 [GTK] Volume slider shows incorrect track when muted
1370 https://bugs.webkit.org/show_bug.cgi?id=120253
1372 Reviewed by Philippe Normand.
1374 When painting the volume bar, consider that it could be muted even
1375 then volume is different than zero.
1377 * platform/gtk/RenderThemeGtk.cpp:
1378 (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Asign
1379 painted volume as 0 when media is muted.
1381 2013-08-26 Sam Weinig <sam@webkit.org>
1383 EditorInternalCommand should use Frame& where possible
1384 https://bugs.webkit.org/show_bug.cgi?id=120340
1386 Reviewed by Andreas Kling.
1388 Only isSupportedFromDOM still takes a Frame*, as it still has callers that expect null to work.
1390 * dom/UserTypingGestureIndicator.cpp:
1391 * dom/UserTypingGestureIndicator.h:
1392 * editing/Editor.cpp:
1393 * editing/EditorCommand.cpp:
1394 * page/EventHandler.cpp:
1396 2013-08-26 Ryosuke Niwa <rniwa@webkit.org>
1398 Elements in a node list of the form element's name getter should not be added to the past names map
1399 https://bugs.webkit.org/show_bug.cgi?id=120279
1401 Reviewed by Darin Adler.
1403 Don't add the element in the named items to the past names map when there are multiple elements.
1404 This matches IE10's behavior and the specified behavior in HTML5:
1405 http://www.w3.org/TR/2013/WD-html51-20130528/forms.html#dom-form-nameditem
1407 Test: fast/forms/past-names-map-should-not-contain-nodelist-item.html
1409 * html/HTMLFormElement.cpp:
1410 (WebCore::HTMLFormElement::getNamedElements):
1412 2013-08-26 Ryosuke Niwa <rniwa@webkit.org>
1414 Windows build fix after r154658.
1416 * page/AutoscrollController.cpp:
1417 (WebCore::getMainFrame):
1419 2013-08-26 Andreas Kling <akling@apple.com>
1421 Page::mainFrame() should return a reference.
1422 <http://webkit.org/b/119677>
1424 Reviewed by Antti Koivisto.
1426 Page always creates the main Frame by itself now, so it will never be null during the Page's lifetime.
1428 Let Page::mainFrame() return Frame& and remove a sea of null checks.
1430 2013-08-26 Sam Weinig <sam@webkit.org>
1432 Remove two unnecessary .get()s.
1434 Reviewed by Anders Carlsson.
1437 (WebCore::Editor::killRing):
1438 (WebCore::Editor::spellChecker):
1440 2013-08-26 Joseph Pecoraro <pecoraro@apple.com>
1442 Web Inspector: We should regenerate InspectorBackendCommands.js for Legacy Inspector.json versions
1443 https://bugs.webkit.org/show_bug.cgi?id=120242
1445 Reviewed by Timothy Hatcher.
1447 - Update the Inspector.json CodeGenerator to include an output_js_dir.
1448 - Cleanup multiple trailing newlines in some of the generated files.
1449 - Provide a way to not verify runtime casts, needed for Legacy inputs.
1452 * DerivedSources.make:
1453 * DerivedSources.pri:
1455 * inspector/CodeGeneratorInspector.py:
1456 (resolve_all_types):
1457 (SmartOutput.close):
1459 2013-08-26 Sam Weinig <sam@webkit.org>
1461 AlternativeTextController should hold onto Frame as a reference
1462 https://bugs.webkit.org/show_bug.cgi?id=120327
1464 Reviewed by Andreas Kling.
1466 While in the area I also:
1467 - Reference-ified Editor::killRing().
1468 - Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
1470 * editing/AlternativeTextController.cpp:
1471 (WebCore::AlternativeTextController::AlternativeTextController):
1472 (WebCore::AlternativeTextController::stopPendingCorrection):
1473 (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
1474 (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1475 (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
1476 (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1477 (WebCore::AlternativeTextController::timerFired):
1478 (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
1479 (WebCore::AlternativeTextController::rootViewRectForRange):
1480 (WebCore::AlternativeTextController::respondToChangedSelection):
1481 (WebCore::AlternativeTextController::respondToAppliedEditing):
1482 (WebCore::AlternativeTextController::respondToUnappliedEditing):
1483 (WebCore::AlternativeTextController::alternativeTextClient):
1484 (WebCore::AlternativeTextController::editorClient):
1485 (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
1486 (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
1487 (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
1488 (WebCore::AlternativeTextController::insertDictatedText):
1489 (WebCore::AlternativeTextController::applyDictationAlternative):
1490 * editing/AlternativeTextController.h:
1491 (WebCore::AlternativeTextController::UNLESS_ENABLED):
1492 * editing/Editor.cpp:
1493 (WebCore::Editor::Editor):
1494 (WebCore::Editor::addToKillRing):
1496 (WebCore::Editor::killRing):
1497 * editing/EditorCommand.cpp:
1498 (WebCore::executeYank):
1499 (WebCore::executeYankAndSelect):
1501 2013-08-23 Andy Estes <aestes@apple.com>
1503 Fix issues found by the Clang Static Analyzer
1504 https://bugs.webkit.org/show_bug.cgi?id=120230
1506 Reviewed by Darin Adler.
1508 * WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
1509 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
1510 (AXTextMarkerRange): Used HardAutorelease() instead of
1511 CFAutoreleaseHelper().
1512 (AXTextMarkerRangeStart): Ditto.
1513 (AXTextMarkerRangeEnd): Ditto.
1514 (textMarkerForVisiblePosition): Ditto.
1515 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1516 (-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
1517 first so that we don't later use ivars from the wrong self.
1518 (-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
1519 * platform/mac/FoundationExtras.h: Removed.
1520 * platform/mac/KURLMac.mm:
1521 (WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
1522 * platform/mac/WebCoreNSURLExtras.mm:
1523 (WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
1524 WebCoreCFAutorelease().
1525 (WebCore::URLWithData): Ditto.
1526 (WebCore::userVisibleString): Ditto.
1527 (WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
1528 with an inline capacity rather than heap-allocating a buffer.
1529 * platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
1530 WebCoreCFAutorelease().
1531 * platform/text/mac/StringImplMac.mm:
1532 (WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
1534 2013-08-26 Pratik Solanki <psolanki@apple.com>
1536 Page::console() should return a reference
1537 https://bugs.webkit.org/show_bug.cgi?id=120320
1539 Reviewed by Darin Adler.
1541 Page::m_console is never NULL so console() can just return a reference.
1543 * css/CSSParser.cpp:
1544 (WebCore::CSSParser::logError):
1546 (WebCore::Document::addConsoleMessage):
1547 (WebCore::Document::addMessage):
1548 * page/DOMWindow.cpp:
1549 (WebCore::DOMWindow::pageConsole):
1551 (WebCore::Page::console):
1552 * xml/XSLStyleSheetLibxslt.cpp:
1553 (WebCore::XSLStyleSheet::parseString):
1554 * xml/XSLTProcessorLibxslt.cpp:
1555 (WebCore::docLoaderFunc):
1557 2013-08-26 Rob Buis <rwlbuis@webkit.org>
1560 https://bugs.webkit.org/show_bug.cgi?id=87964
1562 Reviewed by Darin Adler.
1564 Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
1566 Test: svg/custom/stop-crash-hittest.svg
1568 * rendering/svg/RenderSVGGradientStop.h:
1570 2013-08-26 Sam Weinig <sam@webkit.org>
1572 Editor::spellChecker() should return a reference
1573 https://bugs.webkit.org/show_bug.cgi?id=120325
1575 Reviewed by Anders Carlsson.
1577 * editing/Editor.cpp:
1578 (WebCore::Editor::Editor):
1580 (WebCore::Editor::spellChecker):
1581 * editing/SpellChecker.cpp:
1582 (WebCore::SpellChecker::SpellChecker):
1583 (WebCore::SpellChecker::client):
1584 (WebCore::SpellChecker::isAsynchronousEnabled):
1585 (WebCore::SpellChecker::didCheck):
1586 (WebCore::SpellChecker::didCheckSucceed):
1587 * editing/SpellChecker.h:
1588 * page/EditorClient.h:
1589 * testing/Internals.cpp:
1590 (WebCore::Internals::lastSpellCheckRequestSequence):
1591 (WebCore::Internals::lastSpellCheckProcessedSequence):
1593 2013-08-26 Bem Jones-Bey <bjonesbe@adobe.com>
1595 Optimize FloatIntervalSearchAdapter::collectIfNeeded
1596 https://bugs.webkit.org/show_bug.cgi?id=120237
1598 Reviewed by David Hyatt.
1600 This is a port of 3 Blink patches:
1601 https://codereview.chromium.org/22463002 (By shatch@chromium.org)
1602 https://chromiumcodereview.appspot.com/22909005 (By me)
1603 https://chromiumcodereview.appspot.com/23084002 (By me)
1605 shatch optimized FloatIntervalSearchAdapter by having it store the
1606 outermost float instead of making a bunch of calls to
1607 logical(Left/Right/Bottom)ForFloat, and then only making that call
1608 once when heightRemaining needs to be computed.
1610 I noticed that now we were storing both the last float encountered and
1611 the outermost float, and that the behavior for shape-outside wasn't
1612 significantly changed by using the outermost float instead of the last
1613 float encountered (and in most cases, using the outermost float gives
1614 more reasonable behavior). Since this isn't covered in the spec yet, I
1615 changed shape-outside to use the outermost float, making it so that we
1616 only need to store one float pointer when walking the placed floats
1617 tree, and keeping the performance win.
1619 Also while changing updateOffsetIfNeeded, removed const, since that is
1620 a lie. Nothing about that method is const.
1622 Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
1624 * rendering/RenderBlock.cpp:
1625 (WebCore::::updateOffsetIfNeeded):
1626 (WebCore::::collectIfNeeded):
1627 (WebCore::::getHeightRemaining):
1628 (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
1629 (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
1630 * rendering/RenderBlock.h:
1631 (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
1632 (WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
1634 2013-08-26 Alexey Proskuryakov <ap@apple.com>
1636 [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
1637 https://bugs.webkit.org/show_bug.cgi?id=113094
1639 Reviewed by Darin Adler.
1641 Mac platform implementation has checks for pasteboard change count, but it
1642 didn't use to update the count when writing to pasteboad from JavaScript.
1644 * platform/PasteboardStrategy.h: Changed changeCount function to return a long
1645 instead of an int, as the underlying Mac type is NSInteger. Changed all methods
1646 that modify the pasteboard to return a new change count.
1648 * platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
1649 to return a new change count.
1651 * platform/mac/PasteboardMac.mm:
1652 (WebCore::Pasteboard::clear): Update m_changeCount.
1653 (WebCore::Pasteboard::writeSelectionForTypes): Ditto.
1654 (WebCore::Pasteboard::writePlainText): Ditto.
1655 (WebCore::writeURLForTypes): Ditto.
1656 (WebCore::Pasteboard::writeURL): Ditto.
1657 (WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
1658 (WebCore::Pasteboard::writeImage): Ditto.
1659 (WebCore::Pasteboard::writePasteboard): Ditto.
1660 (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
1661 (WebCore::Pasteboard::writeString): Ditto.
1663 * platform/mac/PlatformPasteboardMac.mm:
1664 (WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
1666 (WebCore::PlatformPasteboard::copy): Return new change count.
1667 (WebCore::PlatformPasteboard::addTypes): Ditto.
1668 (WebCore::PlatformPasteboard::setTypes): Ditto.
1669 (WebCore::PlatformPasteboard::setBufferForType): Ditto.
1670 (WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
1671 (WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
1672 with an equivalent implemnentation that tells use whether writing was successful.
1673 There is difference with invalid URL string handling - we used to silently ignore
1674 such requets, but set pasteboard content to empty URL now.
1676 2013-08-24 Sam Weinig <sam@webkit.org>
1678 Add support for Promises
1679 https://bugs.webkit.org/show_bug.cgi?id=120260
1681 Reviewed by Darin Adler.
1683 Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
1684 - Despite Promises being defined in the DOM, the implementation is being put in JSC
1685 in preparation for the Promises eventually being defined in ECMAScript.
1687 Tests: fast/js/Promise-already-fulfilled.html
1688 fast/js/Promise-already-rejected.html
1689 fast/js/Promise-already-resolved.html
1690 fast/js/Promise-catch-in-workers.html
1691 fast/js/Promise-catch.html
1692 fast/js/Promise-chain.html
1693 fast/js/Promise-exception.html
1694 fast/js/Promise-fulfill-in-workers.html
1695 fast/js/Promise-fulfill.html
1696 fast/js/Promise-init-in-workers.html
1697 fast/js/Promise-init.html
1698 fast/js/Promise-reject-in-workers.html
1699 fast/js/Promise-reject.html
1700 fast/js/Promise-resolve-chain.html
1701 fast/js/Promise-resolve-in-workers.html
1702 fast/js/Promise-resolve-with-then-exception.html
1703 fast/js/Promise-resolve-with-then-fulfill.html
1704 fast/js/Promise-resolve-with-then-reject.html
1705 fast/js/Promise-resolve.html
1706 fast/js/Promise-simple-fulfill-inside-callback.html
1707 fast/js/Promise-simple-fulfill.html
1708 fast/js/Promise-simple-in-workers.html
1709 fast/js/Promise-simple.html
1710 fast/js/Promise-static-fulfill.html
1711 fast/js/Promise-static-reject.html
1712 fast/js/Promise-static-resolve.html
1713 fast/js/Promise-then-in-workers.html
1714 fast/js/Promise-then-without-callbacks-in-workers.html
1715 fast/js/Promise-then-without-callbacks.html
1716 fast/js/Promise-then.html
1717 fast/js/Promise-types.html
1718 fast/js/Promise.html
1720 * GNUmakefile.list.am:
1723 * WebCore.vcxproj/WebCore.vcxproj:
1724 * WebCore.vcxproj/WebCore.vcxproj.filters:
1725 * WebCore.xcodeproj/project.pbxproj:
1726 * bindings/js/JSBindingsAllInOne.cpp:
1729 * bindings/js/JSDOMGlobalObjectTask.cpp: Added.
1730 (WebCore::JSGlobalObjectCallback::create):
1731 (WebCore::JSGlobalObjectCallback::~JSGlobalObjectCallback):
1732 (WebCore::JSGlobalObjectCallback::call):
1733 (WebCore::JSGlobalObjectCallback::JSGlobalObjectCallback):
1734 (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1735 (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask):
1736 (WebCore::JSGlobalObjectTask::performTask):
1737 * bindings/js/JSDOMGlobalObjectTask.h: Added.
1738 (WebCore::JSGlobalObjectTask::create):
1739 Add a new task type to be used with the GlobalObjectMethodTable's new QueueTaskToEventLoop callback.
1741 * bindings/js/JSDOMWindowBase.cpp:
1742 (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1743 * bindings/js/JSDOMWindowBase.h:
1744 Implement the GlobalObjectMethodTable callback, QueueTaskToEventLoop.
1746 * bindings/js/JSMainThreadExecState.h:
1747 All using JSMainThreadExecState as a simple RAII object.
1749 * bindings/js/JSWorkerGlobalScopeBase.cpp:
1750 (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
1751 (WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
1752 (WebCore::JSWorkerGlobalScopeBase::supportsProfiling):
1753 (WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo):
1754 (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScript):
1755 (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled):
1756 (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1757 * bindings/js/JSWorkerGlobalScopeBase.h:
1758 Add a GlobalObjectMethodTable and implement QueueTaskToEventLoop. Forward the other callbacks
1759 to JSGlobalObject so they retain their existing behavior.
1761 2013-08-26 Rob Buis <rwlbuis@webkit.org>
1763 Computed style of fill/stroke properties incorrect on references
1764 https://bugs.webkit.org/show_bug.cgi?id=114761
1766 Reviewed by Darin Adler.
1768 The computed style of the fill and stroke properties did not include
1769 the url() function. Added the url() string to output.
1771 Updated existing tests to cover the issue.
1773 * css/CSSPrimitiveValue.cpp: Cleanup.
1774 (WebCore::CSSPrimitiveValue::customCssText):
1775 * svg/SVGPaint.cpp: Added "url("
1776 (WebCore::SVGPaint::customCssText):
1778 2013-08-26 Zan Dobersek <zdobersek@igalia.com>
1780 Prettify generated build guards in HTMLElementFactory.cpp
1781 https://bugs.webkit.org/show_bug.cgi?id=120310
1783 Reviewed by Darin Adler.
1785 Build guards should wrap the constructor definitions without empty lines between
1786 the guards and the constructor code. Similarly, build guards for addTag calls
1787 shouldn't put an empty line after the build guard closure.
1789 * dom/make_names.pl:
1790 (printConstructorInterior):
1791 (printConstructors):
1792 (printFunctionInits):
1794 2013-08-26 Robert Hogan <robert@webkit.org>
1796 Avoid painting every non-edge collapsed border twice over
1797 https://bugs.webkit.org/show_bug.cgi?id=119759
1799 Reviewed by David Hyatt.
1801 Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each
1802 adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
1803 borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be.
1805 Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
1806 painted once. It does this by only allowing cells at the top and left edge of the table to paint their top and left collapsed borders.
1807 All the others can only paint their right and bottom collapsed border. This works because the borders are painted from bottom right to top left.
1809 Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
1810 fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
1812 * rendering/RenderTableCell.cpp:
1813 (WebCore::RenderTableCell::paintCollapsedBorders):
1815 2013-08-26 Andreas Kling <akling@apple.com>
1817 Unreviewed build fix.
1820 (WebCore::Page::setNeedsRecalcStyleInAllFrames):
1822 2013-08-26 Brent Fulgham <bfulgham@apple.com>
1824 Unreviewed buid fix.
1827 (WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
1829 2013-08-26 Pratik Solanki <psolanki@apple.com>
1831 PageGroup::groupSettings() should return a reference
1832 https://bugs.webkit.org/show_bug.cgi?id=120319
1834 Reviewed by Andreas Kling.
1836 PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
1838 * Modules/indexeddb/IDBFactory.cpp:
1840 (WebCore::PageGroup::groupSettings):
1841 * storage/StorageNamespaceImpl.cpp:
1842 (WebCore::StorageNamespaceImpl::localStorageNamespace):
1843 * workers/DefaultSharedWorkerRepository.cpp:
1844 (WebCore::SharedWorkerProxy::groupSettings):
1845 * workers/WorkerMessagingProxy.cpp:
1846 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
1848 2013-08-26 Andreas Kling <akling@apple.com>
1850 WebCore: Let Page create the main Frame.
1851 <https://webkit.org/b/119964>
1853 Reviewed by Anders Carlsson.
1855 Previously, Frame::create() would call Page::setMainFrame() when constructing the
1856 main Frame for a Page. Up until that point, Page had a null mainFrame().
1858 To guarantee that Page::mainFrame() is never null, we re-order things so that
1859 Page is responsible for creating its own main Frame. We do this at the earliest
1860 possible point; in the Page constructor initializer list.
1862 Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
1863 the PageClients struct.
1865 When creating a WebKit-layer frame, we now wrap the already-instantiated
1866 Page::mainFrame() instead of creating a new Frame.
1868 * loader/EmptyClients.cpp:
1869 (WebCore::fillWithEmptyClients):
1871 Add an EmptyFrameLoaderClient to the PageClients constructed here.
1873 * inspector/InspectorOverlay.cpp:
1874 (WebCore::InspectorOverlay::overlayPage):
1875 * svg/graphics/SVGImage.cpp:
1876 (WebCore::SVGImage::dataChanged):
1878 Updated to wrap Page::mainFrame() in a FrameView instead of creating their
1882 (WebCore::Frame::create):
1885 Remove Page::setMainFrame() and the only call site.
1888 (WebCore::Page::Page):
1890 Construct Page::m_mainFrame in the initializer list.
1892 (WebCore::Page::PageClients::PageClients):
1894 Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
1896 (WebCore::Page::setNeedsRecalcStyleInAllFrames):
1898 Null-check the Frame::document() before calling through on it. This would
1899 otherwise crash when changing font-related Settings before calling init() on
1900 the Frame (like InspectorOverlay does.)
1902 2013-08-26 Brent Fulgham <bfulgham@apple.com>
1904 [Windows] Unreviewed build fix.
1906 * rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
1907 that are no longer part of WKSI.
1908 (wkHitTestMediaUIPart):
1909 (wkMeasureMediaUIPart):
1910 (wkDrawMediaUIPart):
1911 (wkDrawMediaSliderTrack):
1913 2013-08-26 Gurpreet Kaur <gur.trio@gmail.com>
1915 <https://webkit.org/b/106133> document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
1917 Reviewed by Darin Adler.
1919 Webkit always uses document.body.scrollTop whether quirks or
1920 standard mode. Similiar behaviour is for document.body.scrollLeft.
1921 As per the specification webkit should return document.body.scrollTop
1922 for quirks mode and document.documentElement.scrollTop for standard mode.
1923 Same for document.body.scrollLeft and document.documentElement.scrollLeft.
1925 Tests: fast/dom/Element/scrollLeft-Quirks.html
1926 fast/dom/Element/scrollLeft.html
1927 fast/dom/Element/scrollTop-Quirks.html
1928 fast/dom/Element/scrollTop.html
1931 (WebCore::Element::scrollLeft):
1932 (WebCore::Element::scrollTop):
1933 If the element does not have any associated CSS layout box or the element
1934 is the root element and the Document is in quirks mode return zero.
1935 Else If the element is the root element return the value of scrollY
1936 for scrollTop and scrollX for scrollLeft.
1937 * html/HTMLBodyElement.cpp:
1938 (WebCore::HTMLBodyElement::scrollLeft):
1939 (WebCore::HTMLBodyElement::scrollTop):
1940 If the element is the HTML body element, the Document is in quirks mode,
1941 return the value of scrollY for scrollTop and scrollX for scrollLeft.
1943 2013-08-26 Antti Koivisto <antti@apple.com>
1945 REGRESSION (r154581): Some plugin tests failing in debug bots
1946 https://bugs.webkit.org/show_bug.cgi?id=120315
1948 Reviewed by Darin Adler.
1950 We are hitting the new no-event-dispatch-while-iterating assertion.
1952 Detaching deletes a plugin which modifies DOM while it dies.
1955 (WebCore::Document::createRenderTree):
1956 (WebCore::Document::detach):
1958 Don't iterate at all. Document never has more than one Element child anyway.
1960 2013-08-26 David Kilzer <ddkilzer@apple.com>
1962 BUILD FIX (r154580): RenderObject::document() returns a reference
1964 See: <https://webkit.org/b/120272>
1966 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1967 (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
1968 (AXAttributeStringSetHeadingLevel):
1970 2013-08-26 Brent Fulgham <bfulgham@apple.com>
1972 [Windows] Build fix after r154578. Return Vector<String>() instead
1973 of ListHashSet<String>().
1975 * platform/win/PasteboardWin.cpp:
1976 (WebCore::Pasteboard::types):
1978 2013-08-26 Brent Fulgham <bfulgham@apple.com>
1980 [Windows] Build fix after r154580.
1982 * rendering/RenderThemeWin.cpp: Mirror changes made for other ports now that
1983 Frame is known to always be valid when in a render tree. This allows us to
1984 get rid of some unneeded null checks.
1985 (WebCore::RenderThemeWin::getThemeData):
1986 (WebCore::RenderThemeWin::paintMenuList):
1988 2013-08-26 Brent Fulgham <bfulgham@apple.com>
1990 [Windows] Build fix after r154554.
1992 * page/AutoscrollController.cpp: Correct various places where pointers are now
1994 (WebCore::AutoscrollController::stopAutoscrollTimer):
1995 (WebCore::AutoscrollController::startPanScrolling):
1996 (WebCore::AutoscrollController::autoscrollTimerFired):
1998 2013-08-26 Andreas Kling <akling@apple.com>
2000 Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
2001 <https://webkit.org/b/120281>
2003 Reviewed by Anders Carlsson.
2005 Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
2006 filling it in if we're not building like that.
2009 (WebCore::Document::setReadyState):
2010 (WebCore::Document::finishedParsing):
2012 * dom/DocumentTiming.h:
2014 2013-08-26 Carlos Garcia Campos <cgarcia@igalia.com>
2016 [GTK] Fix compile warning in WebKitDOMCustom
2017 https://bugs.webkit.org/show_bug.cgi?id=120286
2019 Reviewed by Philippe Normand.
2021 * bindings/gobject/WebKitDOMCustom.cpp:
2022 (webkit_dom_html_element_get_item_type): Add return 0.
2024 2013-08-25 Ryosuke Niwa <rniwa@webkit.org>
2026 JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
2027 https://bugs.webkit.org/show_bug.cgi?id=120277
2029 Reviewed by Sam Weinig.
2031 Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
2033 This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
2034 after replacing an element A with another element B of the same name caused it to erroneously append A
2035 to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
2036 wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
2037 when namedItem's size is 1.
2039 Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
2041 No new tests are added since there should be no Web exposed behavioral change.
2043 * bindings/js/JSHTMLFormElementCustom.cpp:
2044 (WebCore::JSHTMLFormElement::canGetItemsForName):
2045 * html/HTMLFormElement.cpp:
2046 (WebCore::HTMLFormElement::elementFromPastNamesMap):
2047 (WebCore::HTMLFormElement::addElementToPastNamesMap):
2048 (WebCore::HTMLFormElement::hasNamedElement):
2049 (WebCore::HTMLFormElement::getNamedElements):
2050 * html/HTMLFormElement.h:
2052 2013-08-25 Andreas Kling <akling@apple.com>
2054 RenderLayerBacking::renderer() should return a reference.
2055 <https://webkit.org/b/120280>
2057 Reviewed by Anders Carlsson.
2059 It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
2061 2013-08-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2063 Add toSVGMissingGlyphElement(), and use it.
2064 https://bugs.webkit.org/show_bug.cgi?id=120197
2066 Reviewed by Andreas Kling.
2068 As a step to clean-up static_cast<SVGXXX>, toSVGMissingGlyphElement() is added to clean-up
2069 static_cast<SVGMissingGlyphElement*>.
2071 * svg/SVGFontElement.cpp:
2072 (WebCore::SVGFontElement::firstMissingGlyphElement):
2073 (WebCore::SVGFontElement::ensureGlyphCache):
2074 * svg/SVGMissingGlyphElement.h:
2075 (WebCore::toSVGMissingGlyphElement):
2077 2013-08-25 Andreas Kling <akling@apple.com>
2079 RenderLayer::renderer() should return a reference.
2080 <https://webkit.org/b/120276>
2082 Reviewed by Anders Carlsson.
2084 RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
2085 Nuked an assortment of useless null checks.
2087 2013-08-25 Antti Koivisto <antti@apple.com>
2089 Element child and descendant iterators
2090 https://bugs.webkit.org/show_bug.cgi?id=120248
2092 Reviewed by Sam Weinig and Andreas Kling.
2094 Add iterators for Element children and descendants.
2096 To iterate over element children:
2098 #include "ChildIterator.h"
2100 for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
2101 Element& element = *it;
2104 for (auto it = childrenOfType<HTMLAreaElement>(this).begin(), end = childrenOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
2105 HTMLAreaElement& area = *it;
2108 To iteratate over element descendants in pre-order:
2110 #include "DescendantIterator.h"
2112 for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
2113 Element& element = *it;
2116 for (auto it = descendantsOfType<HTMLAreaElement>(this).begin(), end = descendantsOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
2117 HTMLAreaElement& area = *it;
2120 The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
2122 They are compatible with C++11 range-based for loops. In the future we can use
2124 for (auto& element : elementChildren(this))
2129 The patch all uses the new iterators in a few places.
2131 * WebCore.xcodeproj/project.pbxproj:
2132 * accessibility/AccessibilityNodeObject.cpp:
2133 (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
2134 (WebCore::siblingWithAriaRole):
2135 * accessibility/AccessibilityRenderObject.cpp:
2136 * accessibility/AccessibilityTable.cpp:
2137 (WebCore::AccessibilityTable::isDataTable):
2138 * dom/ChildIterator.h: Added.
2139 (WebCore::ChildIterator::operator*):
2140 (WebCore::ChildIterator::operator->):
2141 (WebCore::::ChildIterator):
2142 (WebCore::::operator):
2144 (WebCore::::ChildIteratorAdapter):
2147 (WebCore::elementChildren):
2148 (WebCore::childrenOfType):
2149 * dom/DescendantIterator.h: Added.
2150 (WebCore::DescendantIterator::operator*):
2151 (WebCore::DescendantIterator::operator->):
2152 (WebCore::::DescendantIterator):
2153 (WebCore::::operator):
2155 (WebCore::::DescendantIteratorAdapter):
2158 (WebCore::elementDescendants):
2159 (WebCore::descendantsOfType):
2161 (WebCore::Document::buildAccessKeyMap):
2162 (WebCore::Document::childrenChanged):
2163 (WebCore::Document::attach):
2164 (WebCore::Document::detach):
2165 * editing/ApplyStyleCommand.cpp:
2166 (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
2167 * editing/markup.cpp:
2168 (WebCore::completeURLs):
2169 * html/HTMLMapElement.cpp:
2170 (WebCore::HTMLMapElement::mapMouseEvent):
2171 * html/HTMLMediaElement.cpp:
2172 (WebCore::HTMLMediaElement::selectMediaResource):
2173 (WebCore::HTMLMediaElement::textTrackModeChanged):
2175 2013-08-25 Andreas Kling <akling@apple.com>
2177 RenderObject::document() should return a reference.
2178 <https://webkit.org/b/120272>
2180 Reviewed by Antti Koivisto.
2182 There's always a Document. We were allocated in someone's arena, after all.
2183 Various null checks and assertions neutralized.
2185 2013-08-25 David Kilzer <ddkilzer@apple.com>
2187 BUILD FIX (r154578): Return Vector<String>() from Pasteboard::types() for iOS
2189 * platform/ios/PasteboardIOS.mm:
2190 (WebCore::Pasteboard::types): Return Vector<String>() instead of
2191 ListHashSet<String>() after r154578.
2193 2013-08-25 Darin Adler <darin@apple.com>
2195 Make JavaScript binding for Clipboard::types more normal
2196 https://bugs.webkit.org/show_bug.cgi?id=120271
2198 Reviewed by Anders Carlsson.
2200 * bindings/js/JSClipboardCustom.cpp:
2201 (WebCore::JSClipboard::types): Make a simple custom binding. Only needed because
2202 there is a special value, null, this can return.
2204 * dom/Clipboard.cpp:
2205 (WebCore::Clipboard::types): Return Vector<String> instead of ListHashSet<String>.
2206 * dom/Clipboard.h: Ditto.
2207 * platform/Pasteboard.h: Ditto.
2208 * platform/blackberry/PasteboardBlackBerry.cpp:
2209 (WebCore::Pasteboard::types): Ditto.
2210 * platform/efl/PasteboardEfl.cpp:
2211 (WebCore::Pasteboard::types): Ditto.
2212 * platform/gtk/PasteboardGtk.cpp:
2213 (WebCore::Pasteboard::types): Ditto.
2214 * platform/ios/PasteboardIOS.mm:
2215 (WebCore::Pasteboard::types): Ditto.
2216 * platform/mac/PasteboardMac.mm:
2217 (WebCore::Pasteboard::types): Ditto.
2218 * platform/qt/PasteboardQt.cpp:
2219 (WebCore::Pasteboard::types): Ditto.
2220 * platform/win/PasteboardWin.cpp:
2221 (WebCore::Pasteboard::types): Ditto.
2223 2013-08-25 David Kilzer <ddkilzer@apple.com>
2225 Unreviewed rollout of r154571. Broke internal iOS build.
2227 Reopened: No need for clearTimers function in Frame
2228 https://bugs.webkit.org/show_bug.cgi?id=120265
2230 * history/CachedFrame.cpp:
2231 (WebCore::CachedFrame::CachedFrame):
2232 (WebCore::CachedFrame::destroy):
2234 (WebCore::Frame::clearTimers):
2237 2013-08-25 Darin Adler <darin@apple.com>
2239 No need for hasData in Clipboard
2240 https://bugs.webkit.org/show_bug.cgi?id=120269
2242 Reviewed by Andreas Kling.
2244 This simple forwarder does not belong in the Clipboard class.
2245 The drag code that uses it already works directly with Pasteboard.
2247 * dom/Clipboard.cpp: Removed hasData.
2248 * dom/Clipboard.h: Ditto.
2250 * page/DragController.cpp:
2251 (WebCore::DragController::startDrag): Call through the pasteboard.
2253 2013-08-25 Darin Adler <darin@apple.com>
2255 No need for documentTypeString function in Frame
2256 https://bugs.webkit.org/show_bug.cgi?id=120262
2258 Reviewed by Andreas Kling.
2260 * WebCore.exp.in: Removed export of Frame::documentTypeString.
2262 * editing/markup.cpp:
2263 (WebCore::documentTypeString): Added. Replaces the old Frame member function.
2264 Makes more sense to have this here since it is both called by and calls code
2265 in this file; somehow this function was left behind.
2266 (WebCore::createFullMarkup): Changed to call the new function.
2267 * editing/markup.h: Added documentTypeString function. Has to be exported
2268 because LegacyWebArchive uses it; might be worth fixing that later.
2269 * loader/archive/cf/LegacyWebArchive.cpp:
2270 (WebCore::LegacyWebArchive::create): Changed to call the new function.
2271 (WebCore::LegacyWebArchive::createFromSelection): Ditto.
2273 * page/Frame.cpp: Removed Frame::documentTypeString.
2274 * page/Frame.h: Ditto.
2276 2013-08-25 Darin Adler <darin@apple.com>
2278 Clipboard is in DOM directory, but ClipboardMac is in platform directory
2279 https://bugs.webkit.org/show_bug.cgi?id=120267
2281 Reviewed by Andreas Kling.
2283 This file is almost gone; has just one function in it. Move it for now, and later
2284 we can delete it entirely.
2286 * WebCore.xcodeproj/project.pbxproj: Updated for new file location.
2287 * dom/ClipboardMac.mm: Moved from Source/WebCore/platform/mac/ClipboardMac.mm.
2289 2013-08-25 Darin Adler <darin@apple.com>
2291 No need for notifyChromeClientWheelEventHandlerCountChanged in Frame
2292 https://bugs.webkit.org/show_bug.cgi?id=120264
2294 Reviewed by Andreas Kling.
2297 (WebCore::Document::createRenderTree): Renamed attach to this.
2298 This made it practical to remove a comment that says the same thing and
2299 also helps make the purpose of the function considerably more clear,
2300 although the relationship to the attached and detach functions is now
2301 less clear; should fix that soon.
2302 (WebCore::pageWheelEventHandlerCountChanged): Added. Contains the code
2303 from Frame::notifyChromeClientWheelEventHandlerCountChanged, minus some
2304 assertions that were only needed because the function was passed a frame
2306 (WebCore::Document::didBecomeCurrentDocumentInFrame): Added. Contains
2307 most of the code from Frame::setDocument. Looking at before and after,
2308 we can see that most of the work is within the document class and matches
2309 up with other code already in this class. Added FIXMEs about many problems
2310 spotted in the code.
2311 (WebCore::Document::topDocument): Added FIXME and tweaked formatting.
2312 (WebCore::wheelEventHandlerCountChanged): Moved the call to the
2313 pageWheelEventHandlerCountChanged in here from the two call sites.
2315 (WebCore::Document::didAddWheelEventHandler): Removed the call to
2316 notifyChromeClientWheelEventHandlerCountChanged, since that's now handled
2317 inside wheelEventHandlerCountChanged.
2318 (WebCore::Document::didRemoveWheelEventHandler): Ditto.
2320 * dom/Document.h: Renamed attach to createRenderTree, made it private,
2321 and added a new didBecomeCurrentDocumentInFrame function.
2323 * loader/PlaceholderDocument.cpp:
2324 (WebCore::PlaceholderDocument::createRenderTree): Renamed from attach.
2325 * loader/PlaceholderDocument.h: Did the rename and made the function a
2329 (WebCore::Frame::setDocument): Moved most of this function out of here
2330 into the new Document::didBecomeCurrentDocumentInFrame function.
2331 Also deleted notifyChromeClientWheelEventHandlerCountChanged.
2333 * page/Frame.h: Deleted notifyChromeClientWheelEventHandlerCountChanged.
2335 2013-08-25 Darin Adler <darin@apple.com>
2337 No need for dispatchVisibilityStateChangeEvent function
2338 https://bugs.webkit.org/show_bug.cgi?id=120261
2340 Reviewed by Andreas Kling.
2342 * dom/Document.cpp: Removed dispatchVisibilityStateChangeEvent.
2343 * dom/Document.h: Ditto.
2344 * page/Frame.cpp: Ditto.
2345 * page/Frame.h: Ditto.
2348 (WebCore::Page::setVisibilityState): Put all the logic for dispatching the
2349 visibility state change event. Nothing here requires any special information
2350 about the internals of Frame or Document.
2352 2013-08-25 Darin Adler <darin@apple.com>
2354 No need for clearTimers function in Frame
2355 https://bugs.webkit.org/show_bug.cgi?id=120265
2357 Reviewed by Andreas Kling.
2359 * history/CachedFrame.cpp:
2360 (WebCore::clearTimers): Added. Moved here from Frame.
2361 (WebCore::CachedFrame::CachedFrame): Call above function.
2362 (WebCore::CachedFrame::destroy): Ditto.
2364 * page/Frame.cpp: Removed the two clearTimers functions.
2365 * page/Frame.h: Ditto.
2367 2013-08-24 Ryuan Choi <ryuan.choi@samsung.com>
2369 Unreviewed build fix after r154560
2371 * page/FrameTree.cpp:
2372 (WebCore::FrameTree::scopedChild):
2373 Use tree(). instead of tree()->.
2375 2013-08-24 Benjamin Poulain <benjamin@webkit.org>
2377 <https://webkit.org/b/120102> Inline SelectorQuery's execution traits
2379 Reviewed by Sam Weinig.
2381 For some reason, clang does not always inline the trait. The operations are so simple
2382 that it shows up in profile.
2383 Force the inlining to match the original speed.
2385 * dom/SelectorQuery.cpp:
2386 (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
2387 (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
2389 2013-08-24 Benjamin Poulain <benjamin@webkit.org>
2391 Remove a useless #include from StyledElement
2392 https://bugs.webkit.org/show_bug.cgi?id=120245
2394 Reviewed by Andreas Kling.
2396 * dom/StyledElement.cpp:
2398 2013-08-24 Darin Adler <darin@apple.com>
2400 Move Frame::inScope into FrameTree
2401 https://bugs.webkit.org/show_bug.cgi?id=120257
2403 Reviewed by Sam Weinig.
2405 * page/Frame.cpp: Removed inScope.
2406 * page/Frame.h: Ditto.
2408 * page/FrameTree.cpp:
2409 (WebCore::inScope): Moved it here.
2410 (WebCore::FrameTree::scopedChild): Changed to call new function.
2411 (WebCore::FrameTree::scopedChildCount): Ditto.
2413 2013-08-24 David Kilzer <ddkilzer@apple.com>
2415 BUILD FIX: Include HTMLPlugInImageElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
2417 Fixes the following build failure for iOS:
2419 In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:28:
2420 In file included from Source/WebCore/accessibility/AXObjectCache.cpp:42:
2421 In file included from Source/WebCore/accessibility/AccessibilityMediaControls.h:36:
2422 In file included from Source/WebCore/html/shadow/MediaControlElements.h:34:
2423 In file included from Source/WebCore/html/shadow/MediaControlElementTypes.h:37:
2424 Source/WebCore/html/HTMLMediaElement.h:324:23: error: unknown type name 'PluginCreationOption'
2425 void updateWidget(PluginCreationOption);
2428 * html/HTMLMediaElement.h:
2430 2013-08-24 Darin Adler <darin@apple.com>
2432 Frame::tree should return a reference instead of a pointer
2433 https://bugs.webkit.org/show_bug.cgi?id=120259
2435 Reviewed by Andreas Kling.
2438 (WebCore::Frame::tree): Return a reference instead of a pointer.
2440 * bindings/js/JSDOMWindowCustom.cpp:
2441 (WebCore::childFrameGetter):
2442 (WebCore::indexGetter):
2443 (WebCore::JSDOMWindow::getOwnPropertySlot):
2444 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2445 (WebCore::JSDOMWindow::setLocation):
2446 * bindings/js/PageScriptDebugServer.cpp:
2447 (WebCore::PageScriptDebugServer::setJavaScriptPaused):
2449 (WebCore::canAccessAncestor):
2450 (WebCore::Document::adoptNode):
2451 (WebCore::Document::canNavigate):
2452 (WebCore::Document::findUnsafeParentScrollPropagationBoundary):
2453 (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
2454 (WebCore::Document::openSearchDescriptionURL):
2455 (WebCore::Document::setDesignMode):
2456 (WebCore::Document::parentDocument):
2457 (WebCore::Document::initSecurityContext):
2458 (WebCore::Document::initContentSecurityPolicy):
2459 (WebCore::Document::requestFullScreenForElement):
2460 (WebCore::Document::webkitExitFullscreen):
2461 (WebCore::Document::didRemoveTouchEventHandler):
2462 * dom/TreeScope.cpp:
2463 (WebCore::focusedFrameOwnerElement):
2464 * editing/FrameSelection.cpp:
2465 (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
2466 * history/CachedFrame.cpp:
2467 (WebCore::CachedFrameBase::CachedFrameBase):
2468 (WebCore::CachedFrameBase::restore):
2469 (WebCore::CachedFrame::CachedFrame):
2470 * history/CachedPage.cpp:
2471 (WebCore::CachedPage::restore):
2472 * history/PageCache.cpp:
2473 (WebCore::logCanCacheFrameDecision):
2474 (WebCore::PageCache::canCachePageContainingThisFrame):
2475 * html/HTMLDocument.cpp:
2476 (WebCore::HTMLDocument::hasFocus):
2477 * html/HTMLPlugInImageElement.cpp:
2478 (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
2479 * inspector/InspectorApplicationCacheAgent.cpp:
2480 (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2481 * inspector/InspectorCanvasAgent.cpp:
2482 (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
2483 (WebCore::InspectorCanvasAgent::frameNavigated):
2484 * inspector/InspectorDOMAgent.cpp:
2485 (WebCore::InspectorDOMAgent::documents):
2486 * inspector/InspectorFileSystemAgent.cpp:
2487 (WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
2488 * inspector/InspectorPageAgent.cpp:
2489 (WebCore::InspectorPageAgent::getCookies):
2490 (WebCore::InspectorPageAgent::deleteCookie):
2491 (WebCore::InspectorPageAgent::searchInResources):
2492 (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
2493 (WebCore::InspectorPageAgent::buildObjectForFrame):
2494 (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2495 * inspector/PageRuntimeAgent.cpp:
2496 (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
2497 * loader/DocumentLoader.cpp:
2498 (WebCore::DocumentLoader::willSendRequest):
2499 (WebCore::DocumentLoader::mainResource):
2500 * loader/DocumentWriter.cpp:
2501 (WebCore::DocumentWriter::createDecoderIfNeeded):
2502 * loader/FrameLoader.cpp:
2503 (WebCore::FrameLoader::submitForm):
2504 (WebCore::FrameLoader::allChildrenAreComplete):
2505 (WebCore::FrameLoader::allAncestorsAreComplete):
2506 (WebCore::FrameLoader::loadURLIntoChildFrame):
2507 (WebCore::FrameLoader::outgoingReferrer):
2508 (WebCore::FrameLoader::updateFirstPartyForCookies):
2509 (WebCore::FrameLoader::setFirstPartyForCookies):
2510 (WebCore::FrameLoader::completed):
2511 (WebCore::FrameLoader::started):
2512 (WebCore::FrameLoader::loadURL):
2513 (WebCore::FrameLoader::loadWithDocumentLoader):
2514 (WebCore::FrameLoader::stopAllLoaders):
2515 (WebCore::FrameLoader::commitProvisionalLoad):
2516 (WebCore::FrameLoader::closeOldDataSources):
2517 (WebCore::FrameLoader::prepareForCachedPageRestore):
2518 (WebCore::FrameLoader::subframeIsLoading):
2519 (WebCore::FrameLoader::subresourceCachePolicy):
2520 (WebCore::FrameLoader::detachChildren):
2521 (WebCore::FrameLoader::closeAndRemoveChild):
2522 (WebCore::FrameLoader::checkLoadComplete):
2523 (WebCore::FrameLoader::numPendingOrLoadingRequests):
2524 (WebCore::FrameLoader::detachFromParent):
2525 (WebCore::FrameLoader::shouldClose):
2526 (WebCore::FrameLoader::handleBeforeUnloadEvent):
2527 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2528 (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2529 (WebCore::FrameLoader::findFrameForNavigation):
2530 (WebCore::FrameLoader::effectiveSandboxFlags):
2531 (WebCore::createWindow):
2532 * loader/HistoryController.cpp:
2533 (WebCore::HistoryController::saveDocumentState):
2534 (WebCore::HistoryController::saveDocumentAndScrollState):
2535 (WebCore::HistoryController::restoreDocumentState):
2536 (WebCore::HistoryController::goToItem):
2537 (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2538 (WebCore::HistoryController::recursiveUpdateForCommit):
2539 (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
2540 (WebCore::HistoryController::initializeItem):
2541 (WebCore::HistoryController::createItemTree):
2542 (WebCore::HistoryController::recursiveSetProvisionalItem):
2543 (WebCore::HistoryController::recursiveGoToItem):
2544 (WebCore::HistoryController::currentFramesMatchItem):
2545 * loader/NavigationScheduler.cpp:
2546 (WebCore::NavigationScheduler::mustLockBackForwardList):
2547 (WebCore::NavigationScheduler::scheduleFormSubmission):
2548 * loader/ProgressTracker.cpp:
2549 (WebCore::ProgressTracker::progressStarted):
2550 (WebCore::ProgressTracker::progressCompleted):
2551 (WebCore::ProgressTracker::isMainLoadProgressing):
2552 * loader/appcache/ApplicationCacheGroup.cpp:
2553 (WebCore::ApplicationCacheGroup::selectCache):
2554 (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
2555 * loader/archive/cf/LegacyWebArchive.cpp:
2556 (WebCore::LegacyWebArchive::create):
2557 * loader/cache/CachedResourceLoader.cpp:
2558 (WebCore::CachedResourceLoader::checkInsecureContent):
2559 * loader/icon/IconController.cpp:
2560 (WebCore::IconController::urlsForTypes):
2561 (WebCore::IconController::startLoader):
2563 (WebCore::canRunModalIfDuringPageDismissal):
2564 (WebCore::Chrome::windowScreenDidChange):
2565 * page/DOMWindow.cpp:
2566 (WebCore::DOMWindow::length):
2567 (WebCore::DOMWindow::name):
2568 (WebCore::DOMWindow::setName):
2569 (WebCore::DOMWindow::parent):
2570 (WebCore::DOMWindow::top):
2571 (WebCore::DOMWindow::open):
2572 * page/EventHandler.cpp:
2573 (WebCore::EventHandler::scrollRecursively):
2574 (WebCore::EventHandler::logicalScrollRecursively):
2575 (WebCore::EventHandler::handleMouseMoveEvent):
2576 * page/FocusController.cpp:
2577 (WebCore::FocusController::setContainingWindowIsVisible):
2579 (WebCore::parentPageZoomFactor):
2580 (WebCore::parentTextZoomFactor):
2581 (WebCore::Frame::setPrinting):
2582 (WebCore::Frame::shouldUsePrintingLayout):
2583 (WebCore::Frame::dispatchVisibilityStateChangeEvent):
2584 (WebCore::Frame::willDetachPage):
2585 (WebCore::Frame::setPageAndTextZoomFactors):
2586 (WebCore::Frame::deviceOrPageScaleFactorChanged):
2587 (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
2588 (WebCore::Frame::isURLAllowed):
2589 * page/FrameTree.cpp:
2590 (WebCore::FrameTree::~FrameTree):
2591 (WebCore::FrameTree::setName):
2592 (WebCore::FrameTree::transferChild):
2593 (WebCore::FrameTree::appendChild):
2594 (WebCore::FrameTree::actuallyAppendChild):
2595 (WebCore::FrameTree::removeChild):
2596 (WebCore::FrameTree::uniqueChildName):
2597 (WebCore::FrameTree::scopedChild):
2598 (WebCore::FrameTree::scopedChildCount):
2599 (WebCore::FrameTree::childCount):
2600 (WebCore::FrameTree::child):
2601 (WebCore::FrameTree::find):
2602 (WebCore::FrameTree::isDescendantOf):
2603 (WebCore::FrameTree::traverseNext):
2604 (WebCore::FrameTree::traversePreviousWithWrap):
2605 (WebCore::FrameTree::deepLastChild):
2606 (WebCore::FrameTree::top):
2609 * page/FrameView.cpp:
2610 (WebCore::FrameView::setFrameRect):
2611 (WebCore::FrameView::hasCompositedContentIncludingDescendants):
2612 (WebCore::FrameView::hasCompositingAncestor):
2613 (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2614 (WebCore::FrameView::updateCanBlitOnScrollRecursively):
2615 (WebCore::FrameView::setIsOverlapped):
2616 (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
2617 (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
2618 (WebCore::FrameView::serviceScriptedAnimations):
2619 (WebCore::FrameView::updateBackgroundRecursively):
2620 (WebCore::FrameView::parentFrameView):
2621 (WebCore::FrameView::paintContentsForSnapshot):
2622 (WebCore::FrameView::setTracksRepaints):
2623 (WebCore::FrameView::notifyWidgetsInAllFrames):
2624 * page/Location.cpp:
2625 (WebCore::Location::ancestorOrigins):
2627 (WebCore::networkStateChanged):
2628 (WebCore::Page::~Page):
2629 (WebCore::Page::renderTreeSize):
2630 (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
2631 (WebCore::Page::setNeedsRecalcStyleInAllFrames):
2632 (WebCore::Page::refreshPlugins):
2633 (WebCore::Page::takeAnyMediaCanStartListener):
2634 (WebCore::incrementFrame):
2635 (WebCore::Page::setDefersLoading):
2636 (WebCore::Page::setMediaVolume):
2637 (WebCore::Page::setDeviceScaleFactor):
2638 (WebCore::Page::setShouldSuppressScrollbarAnimations):
2639 (WebCore::Page::didMoveOnscreen):
2640 (WebCore::Page::willMoveOffscreen):
2641 (WebCore::Page::setIsInWindow):
2642 (WebCore::Page::suspendScriptedAnimations):
2643 (WebCore::Page::resumeScriptedAnimations):
2644 (WebCore::Page::userStyleSheetLocationChanged):
2645 (WebCore::Page::allVisitedStateChanged):
2646 (WebCore::Page::visitedStateChanged):
2647 (WebCore::Page::setDebugger):
2648 (WebCore::Page::setMemoryCacheClientCallsEnabled):
2649 (WebCore::Page::setMinimumTimerInterval):
2650 (WebCore::Page::setTimerAlignmentInterval):
2651 (WebCore::Page::dnsPrefetchingStateChanged):
2652 (WebCore::Page::collectPluginViews):
2653 (WebCore::Page::storageBlockingStateChanged):
2654 (WebCore::Page::privateBrowsingStateChanged):
2655 (WebCore::Page::checkSubframeCountConsistency):
2656 (WebCore::Page::suspendActiveDOMObjectsAndAnimations):
2657 (WebCore::Page::resumeActiveDOMObjectsAndAnimations):
2658 (WebCore::Page::captionPreferencesChanged):
2659 * page/PageGroup.cpp:
2660 (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
2661 * page/PageGroupLoadDeferrer.cpp:
2662 (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2663 (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2664 * page/PageSerializer.cpp:
2665 (WebCore::PageSerializer::serializeFrame):
2666 * page/PageThrottler.cpp:
2667 (WebCore::PageThrottler::throttlePage):
2668 (WebCore::PageThrottler::unthrottlePage):
2669 * page/Settings.cpp:
2670 (WebCore::setImageLoadingSettings):
2671 (WebCore::Settings::setTextAutosizingFontScaleFactor):
2672 * page/SpatialNavigation.cpp:
2673 (WebCore::rectToAbsoluteCoordinates):
2674 * page/animation/AnimationController.cpp:
2675 (WebCore::AnimationControllerPrivate::suspendAnimations):
2676 (WebCore::AnimationControllerPrivate::resumeAnimations):
2677 * page/mac/PageMac.cpp:
2678 (WebCore::Page::addSchedulePair):
2679 (WebCore::Page::removeSchedulePair):
2680 * page/scrolling/ScrollingCoordinator.cpp:
2681 (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
2682 (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
2683 * plugins/PluginView.cpp:
2684 (WebCore::PluginView::performRequest):
2685 (WebCore::PluginView::load):
2686 * rendering/HitTestResult.cpp:
2687 (WebCore::HitTestResult::targetFrame):
2688 * rendering/RenderLayerCompositor.cpp:
2689 (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
2690 (WebCore::RenderLayerCompositor::updateCompositingLayers):
2691 (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
2692 * rendering/TextAutosizer.cpp:
2693 (WebCore::TextAutosizer::processSubtree):
2694 * storage/StorageEventDispatcher.cpp:
2695 (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
2696 (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
2697 * svg/SVGSVGElement.cpp:
2698 (WebCore::SVGSVGElement::currentScale):
2699 (WebCore::SVGSVGElement::setCurrentScale):
2700 * testing/Internals.cpp:
2701 (WebCore::Internals::formControlStateOfPreviousHistoryItem):
2702 (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
2703 (WebCore::Internals::numberOfScrollableAreas):
2704 * xml/parser/XMLDocumentParserLibxml2.cpp:
2705 (WebCore::hasNoStyleInformation):
2706 Use tree(). instead of tree()->.
2708 2013-08-24 Andreas Kling <akling@apple.com>
2710 Merge Document::viewportSize() logic into RenderView::viewportSize().
2711 <https://webkit.org/b/120254>
2713 Reviewed by Darin Adler.
2715 RenderView can just ask FrameView (the viewport) about its size directly, no need for
2716 a weirdly-placed method on Document.
2719 * rendering/RenderView.cpp:
2720 (WebCore::RenderView::viewportSize):
2721 * rendering/RenderView.h:
2723 2013-08-24 Andreas Kling <akling@apple.com>
2725 RenderObject::frame() should return a reference.
2726 <https://webkit.org/b/120251>
2728 Reviewed by Darin Adler.
2730 There is now always a Frame, and we can get to it by walking this path:
2732 RenderObject -> Document -> RenderView -> FrameView -> Frame
2734 Removed the customary horde of null checks.
2736 2013-08-24 Andreas Kling <akling@apple.com>
2738 RenderLayer::compositor() should return a reference.
2739 <https://webkit.org/b/120250>
2741 Reviewed by Anders Carlsson.
2743 It was already converting from a reference to a pointer.
2745 2013-08-24 Yoav Weiss <yoav@yoav.ws>
2747 Eliminate a useless comparison in srcset's candidate selection algorithm
2748 https://bugs.webkit.org/show_bug.cgi?id=120235
2750 There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
2751 iteration on the candidates vector now skips the last candidate.
2753 Reviewed by Andreas Kling.
2755 * html/parser/HTMLParserIdioms.cpp:
2756 (WebCore::bestFitSourceForImageAttributes):
2758 2013-08-24 Andreas Kling <akling@apple.com>
2760 RenderObject::view() should return a reference.
2761 <https://webkit.org/b/120247>
2763 Reviewed by Antti Koivisto.
2765 Now that the lifetime and accessibility characteristics of RenderView are well-defined,
2766 we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
2769 2013-08-24 Joseph Pecoraro <pecoraro@apple.com>
2771 Web Inspector: Cleanup Inspector Agents a bit
2772 https://bugs.webkit.org/show_bug.cgi?id=120218
2774 Reviewed by Andreas Kling.
2776 Merge https://chromium.googlesource.com/chromium/blink/+/8693dcb8ba42a5c225f516c664fb0f453c8ba6f0.
2778 * inspector/InspectorCSSAgent.cpp:
2779 (WebCore::InspectorCSSAgent::elementForId):
2780 * inspector/InspectorStyleSheet.cpp:
2781 (ParsedStyleSheet::ParsedStyleSheet):
2782 (WebCore::InspectorStyle::setPropertyText):
2783 (WebCore::InspectorStyle::populateAllProperties):
2784 (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2786 2013-08-24 Andreas Kling <akling@apple.com>
2788 Let Document keep its RenderView during render tree detach.
2789 <https://webkit.org/b/120233>
2791 Reviewed by Antti Koivisto.
2793 Instead of having "Document::renderer() == NULL" signify that the render tree is being
2794 torn down, give Document an explicit flag for this instead.
2796 This way, we can keep Document's RenderView in place during tree detach.
2799 (WebCore::Document::Document):
2800 (WebCore::Document::detach):
2802 (WebCore::Document::renderTreeBeingDestroyed):
2803 * rendering/RenderObject.h:
2804 (WebCore::RenderObject::documentBeingDestroyed):
2806 2013-08-24 Antti Koivisto <antti@apple.com>
2808 Tighten before/after pseudo element accessors
2809 https://bugs.webkit.org/show_bug.cgi?id=120204
2811 Reviewed by Andreas Kling.
2813 We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
2815 Switch to Element::before/afterPseudoElement(), similarly for setters.
2818 * css/CSSComputedStyleDeclaration.cpp:
2819 (WebCore::ComputedStyleExtractor::styledNode):
2821 (WebCore::Element::~Element):
2822 (WebCore::beforeOrAfterPseudeoElement):
2823 (WebCore::Element::computedStyle):
2824 (WebCore::Element::updatePseudoElement):
2825 (WebCore::Element::createPseudoElementIfNeeded):
2826 (WebCore::Element::updateBeforePseudoElement):
2827 (WebCore::Element::updateAfterPseudoElement):
2828 (WebCore::Element::beforePseudoElement):
2829 (WebCore::Element::afterPseudoElement):
2830 (WebCore::Element::setBeforePseudoElement):
2831 (WebCore::Element::setAfterPseudoElement):
2832 (WebCore::disconnectPseudoElement):
2833 (WebCore::Element::clearBeforePseudoElement):
2834 (WebCore::Element::clearAfterPseudoElement):
2835 (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
2837 * dom/ElementRareData.h:
2838 (WebCore::ElementRareData::beforePseudoElement):
2839 (WebCore::ElementRareData::afterPseudoElement):
2840 (WebCore::ElementRareData::hasPseudoElements):
2841 (WebCore::ElementRareData::~ElementRareData):
2842 (WebCore::ElementRareData::clearBeforePseudoElement):
2843 (WebCore::ElementRareData::clearAfterPseudoElement):
2844 (WebCore::ElementRareData::setBeforePseudoElement):
2845 (WebCore::ElementRareData::setAfterPseudoElement):
2847 Move detach logic to Element. ElementRareData should not implement semantics.
2850 (WebCore::Node::pseudoAwarePreviousSibling):
2851 (WebCore::Node::pseudoAwareNextSibling):
2852 (WebCore::Node::pseudoAwareFirstChild):
2853 (WebCore::Node::pseudoAwareLastChild):
2854 * dom/NodeRenderingTraversal.cpp:
2855 (WebCore::NodeRenderingTraversal::nextSiblingSlow):
2856 (WebCore::NodeRenderingTraversal::previousSiblingSlow):
2857 * rendering/RenderTreeAsText.cpp:
2858 (WebCore::writeCounterValuesFromChildren):
2859 (WebCore::counterValueForElement):
2860 * style/StyleResolveTree.cpp:
2861 (WebCore::Style::attachRenderTree):
2862 (WebCore::Style::resolveTree):
2863 * testing/Internals.cpp:
2864 (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
2865 (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
2867 2013-08-23 Simon Fraser <simon.fraser@apple.com>
2869 Improve scrolling behavior in iTunes
2870 https://bugs.webkit.org/show_bug.cgi?id=120241
2871 <rdar://problem/14825344>
2873 Reviewed by Sam Weinig.
2875 When vertically scrolling a page with horizontally scrollable overflow areas,
2876 vertical scroll gestures would be interrupted when wheel events with non-zero
2877 X deltas were intercepted by the overflow areas.
2879 Fix by storing a small history of wheel events deltas and using
2880 it to determine of the scroll gesture is primarily vertical or horizontal.
2881 When this is detected, avoid dispatching scroll events on the on the
2884 Currently this behavior is conditionalized to only apply in iTunes.
2886 * page/EventHandler.cpp:
2887 (WebCore::EventHandler::EventHandler):
2888 (WebCore::EventHandler::recordWheelEventDelta):
2889 (WebCore::deltaIsPredominantlyVertical):
2890 (WebCore::EventHandler::dominantScrollGestureDirection):
2891 (WebCore::EventHandler::handleWheelEvent):
2892 (WebCore::EventHandler::defaultWheelEventHandler):
2893 * page/EventHandler.h:
2894 * platform/RuntimeApplicationChecks.cpp:
2895 (WebCore::applicationIsITunes):
2896 * platform/RuntimeApplicationChecks.h:
2898 2013-08-23 Pratik Solanki <psolanki@apple.com>
2900 MediaQuery::expressions() should return a reference
2901 <https://webkit.org/b/120215>
2903 Reviewed by Anders Carlsson.
2905 m_expressions is never NULL so we can just return a reference.
2907 * css/MediaList.cpp:
2908 (WebCore::reportMediaQueryWarningIfNeeded):
2909 * css/MediaQuery.cpp:
2910 (WebCore::MediaQuery::MediaQuery):
2912 (WebCore::MediaQuery::expressions):
2913 * css/MediaQueryEvaluator.cpp:
2914 (WebCore::MediaQueryEvaluator::eval):
2916 2013-08-23 Ryosuke Niwa <rniwa@webkit.org>
2918 Build fix after r154515.
2920 * dom/ElementTraversal.h:
2921 (WebCore::Traversal<ElementType>::firstChild):
2922 (WebCore::Traversal<ElementType>::lastChild):
2924 2013-08-23 Andreas Kling <akling@apple.com>
2926 Simplify some Settings access where we have a Frame in reach.
2927 <http://webkit.org/b/120239>
2929 Reviewed by Anders Carlsson.
2931 In three cases where we can grab at a Frame, we can reach all the way to some Settings
2932 without having to use pointers.
2934 * loader/FrameLoader.cpp:
2935 (WebCore::FrameLoader::didBeginDocument):
2936 * rendering/RenderLayerCompositor.cpp:
2937 (WebCore::RenderLayerCompositor::addToOverlapMap):
2938 (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2940 2013-08-23 Jer Noble <jer.noble@apple.com>
2942 REGRESSION (r150516): Media controls are messed up on right-to-left webpages
2943 https://bugs.webkit.org/show_bug.cgi?id=120234
2945 Reviewed by Dan Bernstein.
2947 Test: media/video-rtl.html
2949 Make the media control panel explicitly direction:ltr. The captions menu and captions
2950 display are unaffected, so rtl content will continue to appear rtl there.
2952 * css/mediaControls.css:
2953 (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2955 2013-08-23 Beth Dakin <bdakin@apple.com>
2957 REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in
2959 https://bugs.webkit.org/show_bug.cgi?id=120240
2961 <rdar://problem/14634453>
2963 Reviewed by Anders Carlsson.
2965 This patch makes it so that we don’t use the infinite rect for the PDF context,
2966 and it adds WebCoreSystemInterface API to find out if the current content is the
2970 * platform/graphics/cg/GraphicsContextCG.cpp:
2971 (WebCore::GraphicsContext::clipOut):
2972 * platform/mac/WebCoreSystemInterface.h:
2973 * platform/mac/WebCoreSystemInterface.mm:
2975 2013-08-23 Eric Carlson <eric.carlson@apple.com>
2977 [Mac] some track language tags are not recognized
2978 https://bugs.webkit.org/show_bug.cgi?id=119643
2980 Reviewed by Jere Noble.
2982 No new tests, existing tests updated.
2984 * html/HTMLMediaElement.cpp:
2985 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings
2987 (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences
2988 say captions should be disabled. Don't disable an already visible track if we don't find
2989 a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage ->
2990 m_subtitleTrackLanguage.
2991 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary
2992 audio track changes, only kick off a text track recalc if caption preference are set to "automatic".
2993 * html/HTMLMediaElement.h:
2995 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2996 (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged
2997 and m_delayCharacteristicsChangedNotification.
2998 (WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged.
2999 (WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
3000 (WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
3001 (WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce
3002 calls to the media player when we know several characteristics may change.
3003 (WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or
3004 disable notification delay.
3005 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3007 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3008 (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
3009 a track may have changed so we may have a new language.
3010 (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
3011 if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
3012 QuickTime language code.
3014 2013-08-23 Andreas Kling <akling@apple.com>
3016 RenderView::compositor() should return a reference.
3017 <https://webkit.org/b/120217>
3019 Reviewed by Beth Dakin.
3021 The RenderLayerCompositor is lazily constructed by compositor() and never returns null.
3023 2013-08-23 Yoav Weiss <yoav@yoav.ws>
3025 Fix srcset's image candidate algorithm when DPR exceeds all candidates
3026 https://bugs.webkit.org/show_bug.cgi?id=120168
3028 When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
3030 From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
3031 user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
3032 entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
3034 Fixed by returning the last one in the list of candidates sorted by their qualifier, in case none of them is equal or greater than
3037 Reviewed by Andreas Kling.
3039 Test: fast/hidpi/image-srcset-fraction.html
3041 * html/parser/HTMLParserIdioms.cpp:
3042 (WebCore::bestFitSourceForImageAttributes):
3044 2013-08-23 Chris Fleizach <cfleizach@apple.com>
3046 <https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
3048 Reviewed by Darin Adler.
3050 Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
3052 Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
3054 * accessibility/AccessibilityObject.cpp:
3055 (WebCore::AccessibilityObject::supportsARIAExpanded):
3057 2013-08-17 Darin Adler <darin@apple.com>
3059 <https://webkit.org/b/119945> Some cleanup for PasteboardIOS
3061 Reviewed by Andreas Kling.
3063 * platform/ios/PasteboardIOS.mm:
3064 (WebCore::Pasteboard::setFrame): Moved this function up near the
3065 create functions and constructors.
3066 (WebCore::documentFragmentWithRTF): Tweaked formatting.
3067 (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
3069 (WebCore::utiTypeFromCocoaType): Changed to use early return and removed
3070 an unneeded local variable.
3071 (WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
3072 pbType local variables, and tweaked formatting.
3073 (WebCore::Pasteboard::clear): Tweaked comment.
3074 (WebCore::Pasteboard::readString): Tweaked formatting.
3075 (WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
3076 (WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
3077 (WebCore::Pasteboard::types): Renamed pbType to just type.
3079 2013-08-23 Bem Jones-Bey <bjonesbe@adobe.com>
3081 Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
3082 https://bugs.webkit.org/show_bug.cgi?id=119816
3084 Reviewed by David Hyatt.
3086 This is a port from Blink of
3087 https://src.chromium.org/viewvc/blink?revision=155885&view=revision
3088 Original Patch by Eric Seidel
3092 "It seemed to me that template specifications would be clearer than an
3093 if. They also allow for compile-time error checking were a 3rd type
3094 of float to come into existance in CSS4. :p
3096 For any unfamiliar with this method, this the object used for
3097 performing a search on a RedBlackTree in WTF.
3099 We create one of these adaptors, specifying that we want to search for
3100 values in a specific (logical) Y interval, and this adaptor is called
3101 back for any values in the RBTree cooresponding to that interval
3104 The job of this adaptor is to collect the various values we care
3105 about, including the left or right-most offset of the floats in that
3106 Y-range as well as what the last (document order) float seen in that
3109 It also collects the remaining available height for the block but I'm
3110 less clear on how that parameter is used."
3112 Note that in addition to the original change, I have made the
3113 updateOffsetIfNeeded and rangesIntersect methods inline, as this was
3114 shown to be a performance win in
3115 https://src.chromium.org/viewvc/blink?revision=156064&view=revision
3116 and it seemed a rather trivial change to be subject to a separate
3119 No new tests, no behavior change.
3121 * rendering/RenderBlock.cpp:
3122 (WebCore::::updateOffsetIfNeeded):
3123 (WebCore::::collectIfNeeded):
3124 * rendering/RenderBlock.h:
3126 2013-08-23 David Kilzer <ddkilzer@apple.com>
3128 WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
3129 <http://webkit.org/b/120183>
3130 <rdar://problem/14764114>
3132 Reviewed by Eric Carlson.
3134 The trunk version of clang made an ABI change for Objective-C++
3135 parameters that caused WebCore to fail to link. The short-term
3136 fix is to change the parameter type from id<protocol> to just id
3137 and add an ASSERT that the parameter still conforms to the
3140 * platform/DragData.h:
3141 (DragDataRef): Change typedef from id<NSDragInfo> to id.
3142 * platform/mac/DragDataMac.mm:
3143 (WebCore::DragData::DragData): Add ASSERT that checks that the
3144 DragDataRef object implements the NSDragInfo protocol.
3146 2013-08-23 Andreas Kling <akling@apple.com>
3148 RenderLayerCompositor::m_renderView should be a reference.
3149 <https://webkit.org/b/120210>
3151 Reviewed by Antti Koivisto.
3153 The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
3154 By making m_renderView a reference, we flush out some unnecessary null checks.
3155 We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
3156 so we don't have to make those blocks conditional anymore, reducing ambiguity.
3158 * rendering/RenderLayerCompositor.cpp:
3159 * rendering/RenderLayerCompositor.h:
3160 * rendering/RenderView.cpp:
3161 (WebCore::RenderView::compositor):
3163 2013-08-23 Andreas Kling <akling@apple.com>
3165 RenderView::frameView() should return a reference.
3166 <https://webkit.org/b/120208>
3168 Reviewed by Antti Koivisto.
3170 A RenderView should always have a corresponding FrameView, so make frameView()
3171 return a reference. Also remove a myriad of now-impossible null checks.
3173 2013-08-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
3175 REGRESSION(r153939) Fix typo in Qt build-files
3177 Reviewed by Antti Koivisto.
3179 Fix simple typo in Target.pri introduced in r153939.
3183 2013-08-23 Antti Koivisto <antti@apple.com>
3185 <https://webkit.org/b/120166> Add Traversal<ElementType> template
3187 Reviewed by Andreas Kling.
3189 It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
3191 This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
3192 The patch also uses the template in a bunch of applicable places.
3195 * accessibility/AccessibilityRenderObject.cpp:
3196 (WebCore::AccessibilityRenderObject::addImageMapChildren):
3198 (WebCore::Document::removeTitle):
3199 (WebCore::Document::updateBaseURL):
3200 (WebCore::Document::processBaseElement):
3202 * dom/ElementTraversal.h:
3203 (WebCore::::firstChildTemplate):
3204 (WebCore::::firstWithinTemplate):
3205 (WebCore::::lastChildTemplate):
3206 (WebCore::::lastWithinTemplate):
3207 (WebCore::::nextTemplate):
3208 (WebCore::::previousTemplate):
3209 (WebCore::::nextSiblingTemplate):
3210 (WebCore::::previousSiblingTemplate):
3211 (WebCore::::nextSkippingChildrenTemplate):
3212 (WebCore::::firstChild):
3213 (WebCore::::lastChild):
3214 (WebCore::::firstWithin):
3215 (WebCore::::lastWithin):
3217 (WebCore::::previous):
3218 (WebCore::::nextSibling):
3219 (WebCore::::previousSibling):
3220 (WebCore::::nextSkippingChildren):
3221 (WebCore::ElementTraversal::previousIncludingPseudo):
3222 (WebCore::ElementTraversal::nextIncludingPseudo):
3223 (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
3224 (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
3226 (WebCore::Node::numberOfScopedHTMLStyleChildren):
3227 * dom/NodeIterator.cpp:
3228 (WebCore::NodeIterator::NodeIterator):
3229 * dom/NodeIterator.h:
3230 * dom/Traversal.cpp:
3231 (WebCore::NodeIteratorBase::NodeIteratorBase):
3232 (WebCore::NodeIteratorBase::acceptNode):
3235 Renamed existing class called Traversal to less generic NodeIteratorBase.
3237 * dom/TreeScope.cpp:
3238 (WebCore::TreeScope::labelElementForId):
3239 (WebCore::TreeScope::findAnchor):
3240 * dom/TreeWalker.cpp:
3241 (WebCore::TreeWalker::TreeWalker):
3243 * editing/FrameSelection.cpp:
3244 (WebCore::scanForForm):
3245 * editing/markup.cpp:
3246 (WebCore::createContextualFragment):
3247 * html/HTMLAnchorElement.h:
3248 (WebCore::isHTMLAnchorElement):
3249 (WebCore::HTMLAnchorElement):
3250 * html/HTMLAreaElement.h:
3251 (WebCore::isHTMLAreaElement):
3252 (WebCore::HTMLAreaElement):
3253 * html/HTMLBaseElement.h:
3254 (WebCore::isHTMLBaseElement):
3255 (WebCore::HTMLBaseElement):
3256 * html/HTMLElement.h:
3257 (WebCore::HTMLElement):
3258 * html/HTMLFieldSetElement.cpp:
3259 (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
3260 (WebCore::HTMLFieldSetElement::childrenChanged):
3261 (WebCore::HTMLFieldSetElement::legend):
3262 * html/HTMLFormControlElement.h:
3263 (WebCore::toHTMLFormControlElement):
3264 (WebCore::HTMLFormControlElement):
3265 * html/HTMLLabelElement.cpp:
3266 (WebCore::nodeAsSupportedLabelableElement):
3267 (WebCore::HTMLLabelElement::control):
3268 * html/HTMLLabelElement.h:
3269 (WebCore::isHTMLLabelElement):
3270 (WebCore::HTMLLabelElement):
3271 * html/HTMLLegendElement.h:
3272 (WebCore::isHTMLLegendElement):
3273 (WebCore::HTMLLegendElement):
3274 * html/HTMLMapElement.cpp:
3275 (WebCore::HTMLMapElement::mapMouseEvent):
3276 * html/HTMLMediaElement.cpp:
3277 (WebCore::HTMLMediaElement::finishParsingChildren):
3278 * html/HTMLStyleElement.h:
3279 (WebCore::isHTMLStyleElement):
3280 (WebCore::HTMLStyleElement):
3281 * html/HTMLTitleElement.h:
3282 (WebCore::HTMLTitleElement):
3283 * html/HTMLTrackElement.h:
3284 (WebCore::isHTMLTrackElement):
3285 (WebCore::HTMLTrackElement):
3286 * html/LabelableElement.h:
3287 (WebCore::isLabelableElement):
3288 (WebCore::LabelableElement):
3289 * rendering/FilterEffectRenderer.cpp:
3290 (WebCore::FilterEffectRenderer::buildReferenceFilter):
3292 (WebCore::SVGElement):
3293 * svg/SVGForeignObjectElement.h:
3294 (WebCore::isSVGForeignObjectElement):
3295 (WebCore::SVGForeignObjectElement):
3296 * svg/SVGSVGElement.cpp:
3297 (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
3298 (WebCore::SVGSVGElement::getElementById):
3299 * svg/SVGStyledElement.cpp:
3300 (WebCore::SVGStyledElement::title):
3301 * svg/SVGTitleElement.h:
3302 (WebCore::SVGTitleElement):
3303 * svg/animation/SMILTimeContainer.cpp:
3304 (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
3305 * svg/animation/SVGSMILElement.cpp:
3306 (WebCore::SVGSMILElement::isSMILElement):
3307 * svg/animation/SVGSMILElement.h:
3308 (WebCore::SVGSMILElement):
3309 * svg/graphics/SVGImage.cpp:
3310 (WebCore::SVGImage::hasSingleSecurityOrigin):
3312 2013-08-23 Arpita Bahuguna <a.bah@samsung.com>
3314 <br> does not get deleted when inlined after some non-textual content.
3315 https://bugs.webkit.org/show_bug.cgi?id=120006
3317 Reviewed by Ryosuke Niwa.
3319 deleteSelectionCommand does not handle the case when a <br> element is
3320 inlined after some non-textual content (input controls, image etc.).
3322 When doing a back-delete at the start of a line following such a <br>
3323 the two contiguous lines should merge and the <br> should get deleted.
3324 Currently, even though the <br> is deleted, another placeholder <br>
3325 is incorrectly inserted at the same point, thus effectively there is no
3328 We are incorrectly computing the inline <br> to be at the start of an
3329 empty line even though the line is not empty.
3331 Test: editing/deleting/delete-inline-br.html
3333 * editing/DeleteSelectionCommand.cpp:
3334 (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
3335 Adding a check to verify that the inline <br> is not on an empty line
3336 if the end node is not a <br> element itself and it's previous sibling
3337 is the start <br> element.
3339 Basically we check whether there is another node (end node) following
3340 the <br>, that the node is not a <br> itself, and that the end node's
3341 previous node is the start <br>.
3343 2013-08-23 Renata Hodovan <reni@webkit.org>
3345 Missing null-check in HTMLFormElement::rendererIsNeeded()
3346 https://bugs.webkit.org/show_bug.cgi?id=120159
3348 Reviewed by Ryosuke Niwa.
3350 Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
3353 Test: fast/forms/missing-parentrenderer-crash.html
3355 * html/HTMLFormElement.cpp:
3356 (WebCore::HTMLFormElement::rendererIsNeeded):
3358 2013-08-23 Zalan Bujtas <zalan@apple.com>
3360 MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
3361 https://bugs.webkit.org/show_bug.cgi?id=120157
3363 Reviewed by Antti Koivisto.
3365 RenderListMarker needs to be inserted to the render tree before
3366 we start computing the preferred logical widths for the associated
3369 Test: mathml/mn-as-list-item-assert.html
3371 * rendering/RenderListItem.cpp:
3372 (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
3373 (WebCore::RenderListItem::layout):
3374 (WebCore::RenderListItem::computePreferredLogicalWidths):
3375 * rendering/RenderListItem.h:
3377 2013-08-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3379 Introduce toSVGLinearGradientElement(), and use it
3380 https://bugs.webkit.org/show_bug.cgi?id=120154
3382 Reviewed by Andreas Kling.
3384 As a step to clean-up static_cast<SVGXXX>, toSVGLinearGradientElement() is added to clean-up
3385 static_cast<SVGLinearGradientElement*>.
3387 * rendering/svg/RenderSVGResourceLinearGradient.cpp:
3388 (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
3389 * rendering/svg/SVGRenderTreeAsText.cpp:
3390 (WebCore::writeSVGResourceContainer):
3391 * svg/SVGLinearGradientElement.cpp:
3392 (WebCore::SVGLinearGradientElement::collectGradientAttributes):
3393 * svg/SVGLinearGradientElement.h:
3394 (WebCore::toSVGLinearGradientElement):
3396 2013-08-22 Simon Fraser <simon.fraser@apple.com>
3398 compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
3399 https://bugs.webkit.org/show_bug.cgi?id=119825
3401 Reviewed by Tim Horton.
3403 r137526 and some earlier commits attempted to avoid unconditionally
3404 repainting layers when their size changes, because this was causing
3405 TiledBacking layers to repaint when the document size changed.
3407 However, the approach required that we have good information about
3408 whether size changes require a repaint, which in some cases is hard
3409 to determine, especially when RenderLayer changes affect our
3410 decisions about which layers are composited.
3412 Fix by pushing the decision about whether to repaint on size change
3413 into GraphicsLayer. The default is to repaint on size change,
3414 but GraphicsLayer provides a function that can be overridden to
3415 modify this behavior; GraphicsLayerCA does so to avoid repaints
3416 when layers with TiledBackings get resized.
3418 Test: compositing/repaint/repaint-on-layer-grouping-change.html
3420 * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
3421 * platform/graphics/GraphicsLayer.cpp:
3422 (WebCore::GraphicsLayer::setOffsetFromRenderer):
3423 (WebCore::GraphicsLayer::setSize):
3424 * platform/graphics/GraphicsLayer.h:
3425 (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
3426 * platform/graphics/ca/GraphicsLayerCA.cpp:
3427 (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
3428 * platform/graphics/ca/GraphicsLayerCA.h:
3429 * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
3430 * rendering/RenderLayerBacking.cpp:
3431 (WebCore::RenderLayerBacking::RenderLayerBacking):
3432 (WebCore::RenderLayerBacking::updateCompositedBounds):
3433 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
3434 care of repainting for us now, so we can remove all the conditional code.
3436 2013-08-22 Simon Fraser <simon.fraser@apple.com>
3438 Repaint counters are sometimes not in the corner of the compositing layer
3439 https://bugs.webkit.org/show_bug.cgi?id=120176
3441 Reviewed by Beth Dakin.
3443 Sometimes the repaint counters are not in the corner of the compositing layer;
3444 they are either inset, or partially or entirely outside the layer.
3446 Fix by making sure that we restore the CGContext before drawing
3447 the counter, since the WebCore code may have translated the CTM.
3449 The counter-painting code saves and restores the context itself,
3452 * platform/graphics/mac/WebLayer.mm:
3453 (drawLayerContents):
3455 2013-08-22 Tim Horton <timothy_horton@apple.com>
3457 Unavailable plug-in indicator text is one pixel too low
3458 https://bugs.webkit.org/show_bug.cgi?id=120177
3459 <rdar://problem/14811951>
3461 Reviewed by Kevin Decker.
3463 Move the unavailable plug-in indicator text up one pixel.
3465 * rendering/RenderEmbeddedObject.cpp:
3466 (WebCore::RenderEmbeddedObject::paintReplaced):
3468 2013-08-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
3470 [SVG2] Merge SVGStyledElement and SVGElement
3471 https://bugs.webkit.org/show_bug.cgi?id=107386
3473 Reviewed by Andreas Kling.
3475 Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
3476 model and match the SVG2 specification:
3477 https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
3479 Test: svg/dom/svg2-inheritance.html
3482 * DerivedSources.cpp:
3483 * DerivedSources.make:
3484 * DerivedSources.pri:
3485 * GNUmakefile.list.am:
3488 * WebCore.vcxproj/WebCore.vcxproj:
3489 * WebCore.vcxproj/WebCore.vcxproj.filters:
3490 * WebCore.xcodeproj/project.pbxproj:
3491 * accessibility/AccessibilityNodeObject.cpp:
3492 (WebCore::AccessibilityNodeObject::alternativeText):
3493 (WebCore::AccessibilityNodeObject::accessibilityDescription):
3494 * css/SVGCSSStyleSelector.cpp:
3495 * rendering/style/SVGRenderStyle.cpp:
3496 * rendering/svg/RenderSVGContainer.cpp:
3497 (WebCore::RenderSVGContainer::RenderSVGContainer):
3498 * rendering/svg/RenderSVGContainer.h:
3499 * rendering/svg/RenderSVGHiddenContainer.cpp:
3500 (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
3501 * rendering/svg/RenderSVGHiddenContainer.h:
3502 * rendering/svg/RenderSVGModelObject.cpp:
3503 (WebCore::RenderSVGModelObject::RenderSVGModelObject):
3504 (WebCore::getElementCTM):
3505 * rendering/svg/RenderSVGModelObject.h:
3506 * rendering/svg/RenderSVGResourceClipper.cpp:
3507 (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
3508 (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
3509 (WebCore::RenderSVGResourceClipper::hitTestClipContent):
3510 * rendering/svg/RenderSVGResourceContainer.cpp:
3511 (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
3512 * rendering/svg/RenderSVGResourceContainer.h:
3513 * rendering/svg/RenderSVGResourceFilter.cpp:
3514 * rendering/svg/RenderSVGResourceFilterPrimitive.h:
3515 * rendering/svg/RenderSVGResourceMarker.cpp:
3516 * rendering/svg/RenderSVGResourceMarker.h:
3517 * rendering/svg/RenderSVGResourceMasker.cpp:
3518 (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
3519 (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
3520 * rendering/svg/RenderSVGResourcePattern.cpp:
3521 (WebCore::RenderSVGResourcePattern::createTileImage):
3522 * rendering/svg/RenderSVGRoot.cpp:
3523 (WebCore::RenderSVGRoot::RenderSVGRoot):
3524 * rendering/svg/RenderSVGRoot.h:
3525 * rendering/svg/RenderSVGViewportContainer.cpp:
3526 (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
3527 * rendering/svg/RenderSVGViewportContainer.h:
3528 * rendering/svg/SVGRenderSupport.cpp:
3529 (WebCore::SVGRenderSupport::layoutChildren):
3530 * rendering/svg/SVGRenderTreeAsText.cpp:
3531 * rendering/svg/SVGResources.cpp:
3532 (WebCore::registerPendingResource):
3533 * rendering/svg/SVGResourcesCache.cpp:
3534 * svg/SVGAElement.cpp:
3535 (WebCore::SVGAElement::title):
3536 * svg/SVGAllInOne.cpp:
3537 * svg/SVGAltGlyphDefElement.h:
3538 * svg/SVGAltGlyphItemElement.h:
3539 * svg/SVGAnimateElement.cpp:
3540 * svg/SVGAnimatedType.cpp:
3541 (WebCore::SVGAnimatedType::valueAsString):
3542 (WebCore::SVGAnimatedType::setValueAsString):
3543 * svg/SVGAnimationElement.cpp:
3544 (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
3545 (WebCore::SVGAnimationElement::computeCSSPropertyValue):
3546 (WebCore::SVGAnimationElement::adjustForInheritance):
3547 (WebCore::inheritsFromProperty):
3548 * svg/SVGComponentTransferFunctionElement.h:
3549 * svg/SVGCursorElement.h:
3550 * svg/SVGDescElement.cpp:
3551 (WebCore::SVGDescElement::SVGDescElement):
3552 * svg/SVGDescElement.h:
3553 * svg/SVGDescElement.idl:
3554 * svg/SVGElement.cpp:
3555 (WebCore::mapAttributeToCSSProperty):
3556 (WebCore::cssPropertyToTypeMap):
3557 (WebCore::SVGElement::SVGElement):
3558 (WebCore::SVGElement::~SVGElement):
3559 (WebCore::SVGElement::removedFrom):
3560 (WebCore::SVGElement::parseAttribute):
3561 (WebCore::SVGElement::animatedPropertyTypeForAttribute):
3562 (WebCore::collectInstancesForSVGElement):
3563 (WebCore::SVGElement::isAnimatableAttribute):
3564 (WebCore::SVGElement::title):
3565 (WebCore::SVGElement::rendererIsNeeded):
3566 (WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
3567 (WebCore::SVGElement::isAnimatableCSSProperty):
3568 (WebCore::SVGElement::isPresentationAttribute):
3569 (WebCore::SVGElement::collectStyleForPresentationAttribute):
3570 (WebCore::SVGElement::isKnownAttribute):
3571 (WebCore::SVGElement::svgAttributeChanged):
3572 (WebCore::SVGElement::insertedInto):
3573 (WebCore::SVGElement::buildPendingResourcesIfNeeded):
3574 (WebCore::SVGElement::childrenChanged):
3575 (WebCore::SVGElement::getPresentationAttribute):
3576 (WebCore::SVGElement::instanceUpdatesBlocked):
3577 (WebCore::SVGElement::setInstanceUpdatesBlocked):
3578 (WebCore::SVGElement::localCoordinateSpaceTransform):
3579 (WebCore::SVGElement::updateRelativeLengthsInformation):
3580 (WebCore::SVGElement::isMouseFocusable):
3581 (WebCore::SVGElement::isKeyboardFocusable):
3583 (WebCore::SVGElement::supportsMarkers):
3584 (WebCore::SVGElement::hasRelativeLengths):
3585 (WebCore::SVGElement::needsPendingResourceHandling):
3586 (WebCore::SVGElement::selfHasRelativeLengths):
3587 (WebCore::SVGElement::updateRelativeLengthsInformation):
3588 * svg/SVGElement.idl:
3589 * svg/SVGElementInstance.cpp:
3590 (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
3591 (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
3592 * svg/SVGElementInstance.h:
3593 * svg/SVGFEBlendElement.idl:
3594 * svg/SVGFEColorMatrixElement.idl:
3595 * svg/SVGFEComponentTransferElement.idl:
3596 * svg/SVGFECompositeElement.idl:
3597 * svg/SVGFEConvolveMatrixElement.idl:
3598 * svg/SVGFEDiffuseLightingElement.idl:
3599 * svg/SVGFEDisplacementMapElement.idl:
3600 * svg/SVGFEDropShadowElement.idl:
3601 * svg/SVGFEFloodElement.idl:
3602 * svg/SVGFEGaussianBlurElement.idl:
3603 * svg/SVGFEImageElement.idl:
3604 * svg/SVGFELightElement.h:
3605 * svg/SVGFEMergeElement.idl:
3606 * svg/SVGFEMergeNodeElement.h:
3607 * svg/SVGFEMorphologyElement.idl:
3608 * svg/SVGFEOffsetElement.idl:
3609 * svg/SVGFESpecularLightingElement.idl:
3610 * svg/SVGFETileElement.idl:
3611 * svg/SVGFETurbulenceElement.idl:
3612 * svg/SVGFilterElement.cpp:
3613 (WebCore::SVGFilterElement::SVGFilterElement):
3614 (WebCore::SVGFilterElement::parseAttribute):
3615 (WebCore::SVGFilterElement::svgAttributeChanged):
3616 (WebCore::SVGFilterElement::childrenChanged):
3617 * svg/SVGFilterElement.h:
3618 * svg/SVGFilterElement.idl:
3619 * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3620 (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
3621 (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
3622 (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
3623 (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
3624 (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
3625 * svg/SVGFilterPrimitiveStandardAttributes.h:
3626 * svg/SVGFontElement.cpp:
3627 (WebCore::SVGFontElement::SVGFontElement):
3628 * svg/SVGFontElement.h:
3629 * svg/SVGFontFaceElement.cpp:
3630 * svg/SVGFontFaceElement.h:
3631 * svg/SVGFontFaceFormatElement.h:
3632 * svg/SVGFontFaceNameElement.h:
3633 * svg/SVGFontFaceSrcElement.h:
3634 * svg/SVGFontFaceUriElement.h:
3635 * svg/SVGGElement.cpp:
3636 (WebCore::SVGGElement::rendererIsNeeded):
3637 * svg/SVGGlyphElement.cpp:
3638 (WebCore::SVGGlyphElement::SVGGlyphElement):
3639 (WebCore::SVGGlyphElement::parseAttribute):
3640 (WebCore::SVGGlyphElement::insertedInto):
3641 (WebCore::SVGGlyphElement::removedFrom):
3642 * svg/SVGGlyphElement.h:
3643 * svg/SVGGlyphRefElement.cpp:
3644 (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
3645 (WebCore::SVGGlyphRefElement::parseAttribute):
3646 * svg/SVGGlyphRefElement.h:
3647 * svg/SVGGlyphRefElement.idl:
3648 * svg/SVGGradientElement.cpp:
3649 (WebCore::SVGGradientElement::SVGGradientElement):
3650 (WebCore::SVGGradientElement::parseAttribute):
3651 (WebCore::SVGGradientElement::svgAttributeChanged):
3652 (WebCore::SVGGradientElement::childrenChanged):
3653 * svg/SVGGradientElement.h:
3654 * svg/SVGGradientElement.idl:
3655 * svg/SVGGraphicsElement.cpp:
3656 (WebCore::SVGGraphicsElement::SVGGraphicsElement):
3657 (WebCore::SVGGraphicsElement::parseAttribute):
3658 (WebCore::SVGGraphicsElement::svgAttributeChanged):
3659 * svg/SVGGraphicsElement.h:
3660 * svg/SVGGraphicsElement.idl:
3661 * svg/SVGLocatable.cpp:
3662 (WebCore::SVGLocatable::computeCTM):
3663 * svg/SVGMPathElement.h:
3664 * svg/SVGMarkerElement.cpp:
3665 (WebCore::SVGMarkerElement::SVGMarkerElement):
3666 (WebCore::SVGMarkerElement::parseAttribute):
3667 (WebCore::SVGMarkerElement::svgAttributeChanged):
3668 (WebCore::SVGMarkerElement::childrenChanged):
3669 * svg/SVGMarkerElement.h:
3670 * svg/SVGMarkerElement.idl:
3671 * svg/SVGMaskElement.cpp:
3672 (WebCore::SVGMaskElement::SVGMaskElement):
3673 (WebCore::SVGMaskElement::parseAttribute):
3674 (WebCore::SVGMaskElement::svgAttributeChanged):
3675 (WebCore::SVGMaskElement::childrenChanged):
3676 * svg/SVGMaskElement.h:
3677 * svg/SVGMaskElement.idl:
3678 * svg/SVGMetadataElement.h:
3679 * svg/SVGMissingGlyphElement.cpp:
3680 (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
3681 * svg/SVGMissingGlyphElement.h:
3682 * svg/SVGMissingGlyphElement.idl:
3683 * svg/SVGPatternElement.cpp:
3684 (WebCore::SVGPatternElement::SVGPatternElement):
3685 (WebCore::SVGPatternElement::parseAttribute):
3686 (WebCore::SVGPatternElement::svgAttributeChanged):
3687 (WebCore::SVGPatternElement::childrenChanged):
3688 * svg/SVGPatternElement.h:
3689 * svg/SVGPatternElement.idl:
3690 * svg/SVGScriptElement.h:
3691 * svg/SVGStopElement.cpp:
3692 (WebCore::SVGStopElement::SVGStopElement):
3693 (WebCore::SVGStopElement::parseAttribute):
3694 (WebCore::SVGStopElement::svgAttributeChanged):
3695 * svg/SVGStopElement.h:
3696 * svg/SVGStopElement.idl:
3697 * svg/SVGStyleElement.h:
3698 * svg/SVGStyledElement.cpp: Removed.
3699 * svg/SVGStyledElement.h: Removed.
3700 * svg/SVGStyledElement.idl: Removed.
3701 * svg/SVGSymbolElement.cpp:
3702 (WebCore::SVGSymbolElement::SVGSymbolElement):
3703 (WebCore::SVGSymbolElement::parseAttribute):
3704 (WebCore::SVGSymbolElement::svgAttributeChanged):
3705 * svg/SVGSymbolElement.h:
3706 * svg/SVGSymbolElement.idl:
3707 * svg/SVGTRefElement.cpp:
3708 (WebCore::SVGTRefElement::insertedInto):
3709 (WebCore::SVGTRefElement::removedFrom):
3710 * svg/SVGTitleElement.cpp:
3711 (WebCore::SVGTitleElement::SVGTitleElement):
3712 (WebCore::SVGTitleElement::insertedInto):
3713 * svg/SVGTitleElement.h:
3714 * svg/SVGTitleElement.idl:
3715 * svg/SVGTransformable.cpp:
3716 * svg/SVGUseElement.cpp:
3717 (WebCore::SVGUseElement::selfHasRelativeLengths):
3718 * svg/SVGViewElement.cpp:
3719 (WebCore::SVGViewElement::SVGViewElement):
3720 (WebCore::SVGViewElement::parseAttribute):
3721 * svg/SVGViewElement.h:
3722 * svg/animation/SVGSMILElement.h:
3723 * svg/graphics/filters/SVGFEImage.cpp:
3724 (WebCore::FEImage::platformApplySoftware):
3726 2013-08-22 Andreas Kling <akling@apple.com>
3728 FrameLoader::history() should return a reference.
3729 <https://webkit.org/b/120163>
3731 Reviewed by Anders Carlsson.
3733 Rehued by Anders Carlsson.
3735 FrameLoader::m_history is never null, so make history() return a reference.
3736 Also made HistoryController::m_frame a reference, since HistoryController's
3737 lifetime is tied to FrameLoader, which is tied to the Frame.
3739 2013-08-21 Simon Fraser <simon.fraser@apple.com>
3741 Reloading this video test shows garbage briefly
3742 https://bugs.webkit.org/show_bug.cgi?id=119377
3744 Reviewed by Anders Carlson.
3746 RenderVideo should not claim that it's foreground is opaque
3747 unless it has a video frame to display.
3749 * rendering/RenderVideo.cpp:
3750 (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
3752 2013-08-22 Andreas Kling <akling@apple.com>
3754 Remove accidental cruft from r154449.
3756 * rendering/RenderWidget.cpp:
3757 (WebCore::RenderWidget::destroy):
3759 2013-08-22 Andreas Kling <akling@apple.com>
3761 FrameLoader: frame() and client() should return references.
3762 <https://webkit.org/b/120158>
3764 Reviewed by Anders Carlsson.
3766 These two are never null so change them to return references.
3768 2013-08-22 Andrei Bucur <abucur@adobe.com>
3770 RenderNamedFlowThread should not create NodeRenderingContext objects
3771 https://bugs.webkit.org/show_bug.cgi?id=119923
3773 Reviewed by Antti Koivisto.
3775 Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
3776 Original patch by Elliott Sprehn.
3778 RenderNamedFlowThread should not create NodeRenderingContext objects
3780 RenderNamedFlowThread is using NodeRenderingContext to get the original
3781 parent renderer, but should just be using NodeRenderingTraversal::parent
3782 instead (which is what NodeRenderingContext does internally anyway).
3784 Tests: No change in functionality. No new tests.
3786 * rendering/RenderNamedFlowThread.cpp:
3787 (WebCore::RenderNamedFlowThread::isChildAllowed):
3789 2013-08-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
3791 Introduce a SVGUnknownElement class for unknown SVG elements
3792 https://bugs.webkit.org/show_bug.cgi?id=120155
3794 Reviewed by Andreas Kling.
3796 Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
3797 We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
3798 - Unknown Elements in SVG namespace
3799 - Registered custom tag elements in SVG namespace:
3800 http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
3802 As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
3803 it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
3804 SVGStyledElement into SVGElement.
3806 This is a pre-requirement to merging SVGStyledElement into SVGElement.
3808 No new tests, no behavior change.
3810 * GNUmakefile.list.am:
3812 * WebCore.vcxproj/WebCore.vcxproj:
3813 * WebCore.vcxproj/WebCore.vcxproj.filters:
3814 * dom/CustomElementConstructor.cpp:
3815 (WebCore::CustomElementConstructor::createElementInternal):
3816 * dom/make_names.pl:
3817 (defaultParametersHash):
3818 (printJSElementIncludes):
3819 (printWrapperFunctions):
3820 (printWrapperFactoryCppFile):
3821 * svg/SVGElement.cpp:
3823 * svg/SVGUnknownElement.h: Added.
3824 (WebCore::SVGUnknownElement::create):
3825 (WebCore::SVGUnknownElement::SVGUnknownElement):
3828 2013-08-22 Rob Buis <rwlbuis@webkit.org>
3830 REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter
3831 https://bugs.webkit.org/show_bug.cgi?id=118056
3833 Reviewed by Ryosuke Niwa.
3835 The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
3836 includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
3837 This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
3838 assertion, which the testcase verifies.
3839 To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
3841 Tests: svg/custom/document-all-includes-svg.html
3842 svg/custom/window-named-item-lookup.html
3844 * html/HTMLCollection.cpp:
3845 (WebCore::isMatchingElement):
3846 (WebCore::HTMLCollection::updateNameCache):
3848 2013-08-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
3850 Introduce toSVGRadialGradientElement(), and use it
3851 https://bugs.webkit.org/show_bug.cgi?id=120153
3853 Reviewed by Andreas Kling.
3855 As a step to clean-up static_cast<SVGXXX>, toSVGRadialGradientElement() is added to clean-up
3856 static_cast<SVGRadialGradientElement*>.
3858 * rendering/svg/RenderSVGResourceRadialGradient.cpp:
3859 (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
3860 * rendering/svg/SVGRenderTreeAsText.cpp:
3861 (WebCore::writeSVGResourceContainer):
3862 * svg/SVGRadialGradientElement.cpp:
3863 (WebCore::SVGRadialGradientElement::collectGradientAttributes):
3864 * svg/SVGRadialGradientElement.h:
3865 (WebCore::toSVGRadialGradientElement):
3867 2013-08-22 Renata Hodovan <reni@webkit.org>
3869 ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
3870 https://bugs.webkit.org/show_bug.cgi?id=119672
3872 Reviewed by Darin Adler.
3874 The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
3875 to default 0. This way we have to check its existence before the usage.
3877 Test: editing/execCommand/extracted_style_assert.html
3879 * editing/ApplyStyleCommand.cpp:
3880 (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
3882 2013-08-21 Commit Queue <commit-queue@webkit.org>
3884 Unreviewed, rolling out r154416.
3885 http://trac.webkit.org/changeset/154416
3886 https://bugs.webkit.org/show_bug.cgi?id=120147
3888 Broke Windows builds (Requested by rniwa on #webkit).
3890 * WebCore.vcxproj/WebCoreGenerated.make:
3891 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
3892 * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
3893 * WebCore.vcxproj/build-generated-files.sh:
3894 * WebCore.vcxproj/copyForwardingHeaders.cmd:
3895 * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
3897 2013-08-21 Ryuan Choi <ryuan.choi@samsung.com>
3899 [EFL] Unreviewed build fix after r154430.
3901 * rendering/style/StyleRareNonInheritedData.cpp:
3902 (WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
3904 2013-08-21 Simon Fraser <simon.fraser@apple.com>
3906 Setting -webkit-filter: in :active selector causes failure to redraw
3907 https://bugs.webkit.org/show_bug.cgi?id=120135
3909 Reviewed by Jer Noble.
3911 When removing a filter on an inline child of a compositing layer,
3912 the inline loses its RenderLayer and compositing layer, but we fail to
3913 repaint the compositing layer that the inline is now painting into.
3915 This worked correctly for opacity, because opacity toggles cause
3916 layouts (which then paint the correct layer), so do the same for filters.
3918 Test: css3/filters/remove-filter-repaint.html
3920 * rendering/style/RenderStyle.cpp:
3921 (WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
3922 between having filters and not. Drive-by cleanup, making use of new convenience
3923 function for hasOpacity().
3924 * rendering/style/StyleRareNonInheritedData.cpp:
3925 (WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
3927 * rendering/style/StyleRareNonInheritedData.h:
3928 (WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
3929 returns true if opacity is < 1.
3931 2013-08-21 Gavin Barraclough <barraclough@apple.com>
3933 https://bugs.webkit.org/show_bug.cgi?id=120139
3934 PropertyDescriptor argument to define methods should be const
3936 Rubber stamped by Sam Weinig.
3938 This should never be modified, and this way we can use rvalues.
3940 * bindings/js/JSDOMWindowCustom.cpp:
3941 (WebCore::JSDOMWindow::defineOwnProperty):
3942 * bindings/js/JSLocationCustom.cpp:
3943 (WebCore::JSLocation::defineOwnProperty):
3944 (WebCore::JSLocationPrototype::defineOwnProperty):
3945 * bindings/scripts/CodeGeneratorJS.pm:
3947 - make PropertyDescriptor const
3949 2013-08-21 Jacky Jiang <zhajiang@blackberry.com>
3951 <https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
3953 Reviewed by Yong Li.
3954 Internally reviewed by Arvid Nilsson.
3957 The origin of indexOfTile(origin) is incorrect in these two places. For
3958 example, if the maxXMaxYCorner of the rect is (768, 768), there can be
3959 three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
3960 unnecessary texture jobs and waste memory.
3961 The origin should be the top left of the bottom right pixel of a rect.
3963 * platform/graphics/blackberry/LayerTiler.cpp:
3964 (WebCore::LayerTiler::updateTextureContentsIfNeeded):
3965 (WebCore::LayerTiler::processTextureJob):
3967 2013-08-21 Simon Fraser <simon.fraser@apple.com>
3969 <https://webkit.org/b/116901> ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter
3971 Reviewed by Beth Dakin.
3973 In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
3974 needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
3975 over the RenderLayer tree.
3977 However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
3978 bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
3979 which requires that style changed on the layer itself.
3981 Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
3983 Wasn't able to easily get a reduced testcase.
3985 * rendering/RenderLayerCompositor.cpp:
3986 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3988 2013-08-21 Alex Christensen <achristensen@apple.com>
3990 <https://webkit.org/b/120137> Separating Win32 and Win64 builds.
3992 Reviewed by Brent Fulgham.
3994 * WebCore.vcxproj/WebCoreGenerated.make:
3995 * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
3996 Pass PlatformArchitecture as a command line parameter to bash scripts
3997 and use PlatformArchitecture to determine which directory to delete
3998 while cleaning (obj32 or obj64).
3999 * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
4000 Export PlatformArchitecture to be used by make and cmd scripts.
4001 * WebCore.vcxproj/build-generated-files.sh:
4002 Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
4003 * WebCore.vcxproj/copyForwardingHeaders.cmd:
4004 * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
4005 Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
4007 2013-08-21 Tim Horton <timothy_horton@apple.com>
4009 revalidateTiles and ensureTilesForRect can share a lot of code
4010 https://bugs.webkit.org/show_bug.cgi?id=119282
4012 Missed the review comments, whoops.
4014 * platform/graphics/ca/mac/TileController.h:
4015 * platform/graphics/ca/mac/TileController.mm:
4016 (WebCore::TileController::prepopulateRect):
4017 (WebCore::TileController::revalidateTiles):
4018 (WebCore::TileController::ensureTilesForRect):
4020 2013-08-21 Andreas Kling <akling@apple.com>
4022 <https://webkit.org/b/120115> SVG elements always have custom style resolve callbacks.
4024 Reviewed by Antti Koivisto.
4026 Simplify SVGElement construction by making them opt in to custom style resolve callbacks
4027 by default, and removing the ability to pass a custom ConstructionType to some subclass
4032 Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
4034 * svg/SVGElement.cpp:
4035 (WebCore::SVGElement::SVGElement):
4037 * svg/SVGGElement.cpp:
4038 (WebCore::SVGGElement::SVGGElement):
4039 * svg/SVGGElement.h:
4040 * svg/SVGGraphicsElement.cpp:
4041 (WebCore::SVGGraphicsElement::SVGGraphicsElement):
4042 * svg/SVGGraphicsElement.h:
4043 * svg/SVGImageElement.cpp:
4044 (WebCore::SVGImageElement::SVGImageElement):
4045 * svg/SVGStyledElement.cpp:
4046 (WebCore::SVGStyledElement::SVGStyledElement):
4047 * svg/SVGStyledElement.h:
4049 Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
4050 Also remove unnecessary ConstructionType argument from subclasses since nobody
4051 overrides it and everyone just uses CreateSVGElement.
4053 2013-08-21 Tim Horton <timothy_horton@apple.com>
4055 revalidateTiles and ensureTilesForRect can share a lot of code
4056 https://bugs.webkit.org/show_bug.cgi?id=119282
4058 Reviewed by Simon Fraser.
4060 No new tests, just a refactoring.
4062 The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
4064 * platform/graphics/ca/mac/TileController.h:
4065 Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
4066 be primary coverage tiles or secondary out-of-view tiles.
4068 * platform/graphics/ca/mac/TileController.mm:
4069 (WebCore::TileController::prepopulateRect):
4070 Move the code to see if we already have the requisite tiles in the
4071 primary coverage rect, as well as our call to updateTileCoverageMap,
4072 out into prepopulateRect, to generalize ensureTilesForRect.
4074 (WebCore::TileController::revalidateTiles):
4075 Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
4077 (WebCore::TileController::ensureTilesForRect):
4078 Make ensureTilesForRect return the rect that it created tiles for, and only put
4079 tiles in a cohort if we're creating secondary tiles.
4081 2013-08-21 Tim Horton <timothy_horton@apple.com>
4083 isReplacementObscured is wrong when the indicator is clipped by an iframe
4084 https://bugs.webkit.org/show_bug.cgi?id=120031
4085 <rdar://problem/14606819>
4087 Reviewed by Simon Fraser.
4089 Hit-test for plugin obscurity in the root document. To do this, we also need
4090 to convert the indicator rectangle into root view coordinates before
4091 hit testing its edges.
4093 This resolves the case where an iframe which clips its content was reporting
4094 the indicator as not obscured, despite the fact that it was obscured from the