2133d68d3629b165eedb75f866ea4d5b018123b9
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-26  Andreas Kling  <akling@apple.com>
2
3         Page::mainFrame() should return a reference.
4         <http://webkit.org/b/119677>
5
6         Reviewed by Antti Koivisto.
7
8         Page always creates the main Frame by itself now, so it will never be null during the Page's lifetime.
9
10         Let Page::mainFrame() return Frame& and remove a sea of null checks.
11
12 2013-08-26  Sam Weinig  <sam@webkit.org>
13
14         Remove two unnecessary .get()s.
15
16         Reviewed by Anders Carlsson.
17
18         * editing/Editor.h:
19         (WebCore::Editor::killRing):
20         (WebCore::Editor::spellChecker):
21
22 2013-08-26  Joseph Pecoraro  <pecoraro@apple.com>
23
24         Web Inspector: We should regenerate InspectorBackendCommands.js for Legacy Inspector.json versions
25         https://bugs.webkit.org/show_bug.cgi?id=120242
26
27         Reviewed by Timothy Hatcher.
28
29         - Update the Inspector.json CodeGenerator to include an output_js_dir.
30         - Cleanup multiple trailing newlines in some of the generated files.
31         - Provide a way to not verify runtime casts, needed for Legacy inputs.
32
33         * CMakeLists.txt:
34         * DerivedSources.make:
35         * DerivedSources.pri:
36         * GNUmakefile.am:
37         * inspector/CodeGeneratorInspector.py:
38         (resolve_all_types):
39         (SmartOutput.close):
40
41 2013-08-26  Sam Weinig  <sam@webkit.org>
42
43         AlternativeTextController should hold onto Frame as a reference
44         https://bugs.webkit.org/show_bug.cgi?id=120327
45
46         Reviewed by Andreas Kling.
47
48         While in the area I also:
49           - Reference-ified Editor::killRing().
50           - Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
51
52         * editing/AlternativeTextController.cpp:
53         (WebCore::AlternativeTextController::AlternativeTextController):
54         (WebCore::AlternativeTextController::stopPendingCorrection):
55         (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
56         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
57         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
58         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
59         (WebCore::AlternativeTextController::timerFired):
60         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
61         (WebCore::AlternativeTextController::rootViewRectForRange):
62         (WebCore::AlternativeTextController::respondToChangedSelection):
63         (WebCore::AlternativeTextController::respondToAppliedEditing):
64         (WebCore::AlternativeTextController::respondToUnappliedEditing):
65         (WebCore::AlternativeTextController::alternativeTextClient):
66         (WebCore::AlternativeTextController::editorClient):
67         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
68         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
69         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
70         (WebCore::AlternativeTextController::insertDictatedText):
71         (WebCore::AlternativeTextController::applyDictationAlternative):
72         * editing/AlternativeTextController.h:
73         (WebCore::AlternativeTextController::UNLESS_ENABLED):
74         * editing/Editor.cpp:
75         (WebCore::Editor::Editor):
76         (WebCore::Editor::addToKillRing):
77         * editing/Editor.h:
78         (WebCore::Editor::killRing):
79         * editing/EditorCommand.cpp:
80         (WebCore::executeYank):
81         (WebCore::executeYankAndSelect):
82
83 2013-08-23  Andy Estes  <aestes@apple.com>
84
85         Fix issues found by the Clang Static Analyzer
86         https://bugs.webkit.org/show_bug.cgi?id=120230
87
88         Reviewed by Darin Adler.
89
90         * WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
91         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
92         (AXTextMarkerRange): Used HardAutorelease() instead of
93         CFAutoreleaseHelper().
94         (AXTextMarkerRangeStart): Ditto.
95         (AXTextMarkerRangeEnd): Ditto.
96         (textMarkerForVisiblePosition): Ditto.
97         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
98         (-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
99         first so that we don't later use ivars from the wrong self.
100         (-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
101         * platform/mac/FoundationExtras.h: Removed.
102         * platform/mac/KURLMac.mm:
103         (WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
104         * platform/mac/WebCoreNSURLExtras.mm:
105         (WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
106         WebCoreCFAutorelease().
107         (WebCore::URLWithData): Ditto.
108         (WebCore::userVisibleString): Ditto.
109         (WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
110         with an inline capacity rather than heap-allocating a buffer.
111         * platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
112         WebCoreCFAutorelease().
113         * platform/text/mac/StringImplMac.mm:
114         (WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
115
116 2013-08-26  Pratik Solanki  <psolanki@apple.com>
117
118         Page::console() should return a reference
119         https://bugs.webkit.org/show_bug.cgi?id=120320
120
121         Reviewed by Darin Adler.
122
123         Page::m_console is never NULL so console() can just return a reference.
124
125         * css/CSSParser.cpp:
126         (WebCore::CSSParser::logError):
127         * dom/Document.cpp:
128         (WebCore::Document::addConsoleMessage):
129         (WebCore::Document::addMessage):
130         * page/DOMWindow.cpp:
131         (WebCore::DOMWindow::pageConsole):
132         * page/Page.h:
133         (WebCore::Page::console):
134         * xml/XSLStyleSheetLibxslt.cpp:
135         (WebCore::XSLStyleSheet::parseString):
136         * xml/XSLTProcessorLibxslt.cpp:
137         (WebCore::docLoaderFunc):
138
139 2013-08-26  Rob Buis  <rwlbuis@webkit.org>
140
141         Lonely stop crashes
142         https://bugs.webkit.org/show_bug.cgi?id=87964
143
144         Reviewed by Darin Adler.
145
146         Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
147
148         Test: svg/custom/stop-crash-hittest.svg
149
150         * rendering/svg/RenderSVGGradientStop.h:
151
152 2013-08-26  Sam Weinig  <sam@webkit.org>
153
154         Editor::spellChecker() should return a reference
155         https://bugs.webkit.org/show_bug.cgi?id=120325
156
157         Reviewed by Anders Carlsson.
158
159         * editing/Editor.cpp:
160         (WebCore::Editor::Editor):
161         * editing/Editor.h:
162         (WebCore::Editor::spellChecker):
163         * editing/SpellChecker.cpp:
164         (WebCore::SpellChecker::SpellChecker):
165         (WebCore::SpellChecker::client):
166         (WebCore::SpellChecker::isAsynchronousEnabled):
167         (WebCore::SpellChecker::didCheck):
168         (WebCore::SpellChecker::didCheckSucceed):
169         * editing/SpellChecker.h:
170         * page/EditorClient.h:
171         * testing/Internals.cpp:
172         (WebCore::Internals::lastSpellCheckRequestSequence):
173         (WebCore::Internals::lastSpellCheckProcessedSequence):
174
175 2013-08-26  Bem Jones-Bey  <bjonesbe@adobe.com>
176
177         Optimize FloatIntervalSearchAdapter::collectIfNeeded
178         https://bugs.webkit.org/show_bug.cgi?id=120237
179
180         Reviewed by David Hyatt.
181
182         This is a port of 3 Blink patches:
183         https://codereview.chromium.org/22463002 (By shatch@chromium.org)
184         https://chromiumcodereview.appspot.com/22909005 (By me)
185         https://chromiumcodereview.appspot.com/23084002 (By me)
186
187         shatch optimized FloatIntervalSearchAdapter by having it store the
188         outermost float instead of making a bunch of calls to
189         logical(Left/Right/Bottom)ForFloat, and then only making that call
190         once when heightRemaining needs to be computed.
191
192         I noticed that now we were storing both the last float encountered and
193         the outermost float, and that the behavior for shape-outside wasn't
194         significantly changed by using the outermost float instead of the last
195         float encountered (and in most cases, using the outermost float gives
196         more reasonable behavior). Since this isn't covered in the spec yet, I
197         changed shape-outside to use the outermost float, making it so that we
198         only need to store one float pointer when walking the placed floats
199         tree, and keeping the performance win.
200
201         Also while changing updateOffsetIfNeeded, removed const, since that is
202         a lie. Nothing about that method is const.
203
204         Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
205
206         * rendering/RenderBlock.cpp:
207         (WebCore::::updateOffsetIfNeeded):
208         (WebCore::::collectIfNeeded):
209         (WebCore::::getHeightRemaining):
210         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
211         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
212         * rendering/RenderBlock.h:
213         (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
214         (WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
215
216 2013-08-26  Alexey Proskuryakov  <ap@apple.com>
217
218         [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
219         https://bugs.webkit.org/show_bug.cgi?id=113094
220
221         Reviewed by Darin Adler.
222
223         Mac platform implementation has checks for pasteboard change count, but it
224         didn't use to update the count when writing to pasteboad from JavaScript.
225
226         * platform/PasteboardStrategy.h: Changed changeCount function to return a long
227         instead of an int, as the underlying Mac type is NSInteger. Changed all methods
228         that modify the pasteboard to return a new change count.
229
230         * platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
231         to return a new change count.
232
233         * platform/mac/PasteboardMac.mm:
234         (WebCore::Pasteboard::clear): Update m_changeCount.
235         (WebCore::Pasteboard::writeSelectionForTypes): Ditto.
236         (WebCore::Pasteboard::writePlainText): Ditto.
237         (WebCore::writeURLForTypes): Ditto.
238         (WebCore::Pasteboard::writeURL): Ditto.
239         (WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
240         (WebCore::Pasteboard::writeImage): Ditto.
241         (WebCore::Pasteboard::writePasteboard): Ditto.
242         (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
243         (WebCore::Pasteboard::writeString): Ditto.
244
245         * platform/mac/PlatformPasteboardMac.mm:
246         (WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
247         data loss.
248         (WebCore::PlatformPasteboard::copy): Return new change count.
249         (WebCore::PlatformPasteboard::addTypes): Ditto.
250         (WebCore::PlatformPasteboard::setTypes): Ditto.
251         (WebCore::PlatformPasteboard::setBufferForType): Ditto.
252         (WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
253         (WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
254         with an equivalent implemnentation that tells use whether writing was successful.
255         There is difference with invalid URL string handling - we used to silently ignore
256         such requets, but set pasteboard content to empty URL now.
257
258 2013-08-24  Sam Weinig  <sam@webkit.org>
259
260         Add support for Promises
261         https://bugs.webkit.org/show_bug.cgi?id=120260
262
263         Reviewed by Darin Adler.
264
265         Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
266         - Despite Promises being defined in the DOM, the implementation is being put in JSC
267           in preparation for the Promises eventually being defined in ECMAScript.
268
269         Tests: fast/js/Promise-already-fulfilled.html
270                fast/js/Promise-already-rejected.html
271                fast/js/Promise-already-resolved.html
272                fast/js/Promise-catch-in-workers.html
273                fast/js/Promise-catch.html
274                fast/js/Promise-chain.html
275                fast/js/Promise-exception.html
276                fast/js/Promise-fulfill-in-workers.html
277                fast/js/Promise-fulfill.html
278                fast/js/Promise-init-in-workers.html
279                fast/js/Promise-init.html
280                fast/js/Promise-reject-in-workers.html
281                fast/js/Promise-reject.html
282                fast/js/Promise-resolve-chain.html
283                fast/js/Promise-resolve-in-workers.html
284                fast/js/Promise-resolve-with-then-exception.html
285                fast/js/Promise-resolve-with-then-fulfill.html
286                fast/js/Promise-resolve-with-then-reject.html
287                fast/js/Promise-resolve.html
288                fast/js/Promise-simple-fulfill-inside-callback.html
289                fast/js/Promise-simple-fulfill.html
290                fast/js/Promise-simple-in-workers.html
291                fast/js/Promise-simple.html
292                fast/js/Promise-static-fulfill.html
293                fast/js/Promise-static-reject.html
294                fast/js/Promise-static-resolve.html
295                fast/js/Promise-then-in-workers.html
296                fast/js/Promise-then-without-callbacks-in-workers.html
297                fast/js/Promise-then-without-callbacks.html
298                fast/js/Promise-then.html
299                fast/js/Promise-types.html
300                fast/js/Promise.html
301
302         * GNUmakefile.list.am:
303         * Target.pri:
304         * UseJSC.cmake:
305         * WebCore.vcxproj/WebCore.vcxproj:
306         * WebCore.vcxproj/WebCore.vcxproj.filters:
307         * WebCore.xcodeproj/project.pbxproj:
308         * bindings/js/JSBindingsAllInOne.cpp:
309         Add new files.
310
311         * bindings/js/JSDOMGlobalObjectTask.cpp: Added.
312         (WebCore::JSGlobalObjectCallback::create):
313         (WebCore::JSGlobalObjectCallback::~JSGlobalObjectCallback):
314         (WebCore::JSGlobalObjectCallback::call):
315         (WebCore::JSGlobalObjectCallback::JSGlobalObjectCallback):
316         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
317         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask):
318         (WebCore::JSGlobalObjectTask::performTask):
319         * bindings/js/JSDOMGlobalObjectTask.h: Added.
320         (WebCore::JSGlobalObjectTask::create):
321         Add a new task type to be used with the GlobalObjectMethodTable's new QueueTaskToEventLoop callback.
322
323         * bindings/js/JSDOMWindowBase.cpp:
324         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
325         * bindings/js/JSDOMWindowBase.h:
326         Implement the GlobalObjectMethodTable callback, QueueTaskToEventLoop. 
327
328         * bindings/js/JSMainThreadExecState.h:
329         All using JSMainThreadExecState as a simple RAII object.
330
331         * bindings/js/JSWorkerGlobalScopeBase.cpp:
332         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
333         (WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
334         (WebCore::JSWorkerGlobalScopeBase::supportsProfiling):
335         (WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo):
336         (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScript):
337         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled):
338         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
339         * bindings/js/JSWorkerGlobalScopeBase.h:
340         Add a GlobalObjectMethodTable and implement QueueTaskToEventLoop. Forward the other callbacks
341         to JSGlobalObject so they retain their existing behavior.
342
343 2013-08-26  Rob Buis  <rwlbuis@webkit.org>
344
345         Computed style of fill/stroke properties incorrect on references
346         https://bugs.webkit.org/show_bug.cgi?id=114761
347
348         Reviewed by Darin Adler.
349
350         The computed style of the fill and stroke properties did not include
351         the url() function. Added the url() string to output.
352
353         Updated existing tests to cover the issue.
354
355         * css/CSSPrimitiveValue.cpp: Cleanup.
356         (WebCore::CSSPrimitiveValue::customCssText):
357         * svg/SVGPaint.cpp: Added "url("
358         (WebCore::SVGPaint::customCssText):
359
360 2013-08-26  Zan Dobersek  <zdobersek@igalia.com>
361
362         Prettify generated build guards in HTMLElementFactory.cpp
363         https://bugs.webkit.org/show_bug.cgi?id=120310
364
365         Reviewed by Darin Adler.
366
367         Build guards should wrap the constructor definitions without empty lines between
368         the guards and the constructor code. Similarly, build guards for addTag calls
369         shouldn't put an empty line after the build guard closure.
370
371         * dom/make_names.pl:
372         (printConstructorInterior):
373         (printConstructors):
374         (printFunctionInits):
375
376 2013-08-26  Robert Hogan  <robert@webkit.org>
377
378         Avoid painting every non-edge collapsed border twice over
379         https://bugs.webkit.org/show_bug.cgi?id=119759
380
381         Reviewed by David Hyatt.
382
383         Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each 
384         adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
385         borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be. 
386
387         Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
388         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.
389         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.
390
391         Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
392                fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
393
394         * rendering/RenderTableCell.cpp:
395         (WebCore::RenderTableCell::paintCollapsedBorders):
396
397 2013-08-26  Andreas Kling  <akling@apple.com>
398
399         Unreviewed build fix.
400
401         * page/Page.cpp:
402         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
403
404 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
405
406         Unreviewed buid fix.
407
408         * page/Page.cpp: 
409         (WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
410
411 2013-08-26  Pratik Solanki  <psolanki@apple.com>
412
413         PageGroup::groupSettings() should return a reference
414         https://bugs.webkit.org/show_bug.cgi?id=120319
415
416         Reviewed by Andreas Kling.
417
418         PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
419
420         * Modules/indexeddb/IDBFactory.cpp:
421         * page/PageGroup.h:
422         (WebCore::PageGroup::groupSettings):
423         * storage/StorageNamespaceImpl.cpp:
424         (WebCore::StorageNamespaceImpl::localStorageNamespace):
425         * workers/DefaultSharedWorkerRepository.cpp:
426         (WebCore::SharedWorkerProxy::groupSettings):
427         * workers/WorkerMessagingProxy.cpp:
428         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
429
430 2013-08-26  Andreas Kling  <akling@apple.com>
431
432         WebCore: Let Page create the main Frame.
433         <https://webkit.org/b/119964>
434
435         Reviewed by Anders Carlsson.
436
437         Previously, Frame::create() would call Page::setMainFrame() when constructing the
438         main Frame for a Page. Up until that point, Page had a null mainFrame().
439
440         To guarantee that Page::mainFrame() is never null, we re-order things so that
441         Page is responsible for creating its own main Frame. We do this at the earliest
442         possible point; in the Page constructor initializer list.
443
444         Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
445         the PageClients struct.
446
447         When creating a WebKit-layer frame, we now wrap the already-instantiated
448         Page::mainFrame() instead of creating a new Frame.
449
450         * loader/EmptyClients.cpp:
451         (WebCore::fillWithEmptyClients):
452
453             Add an EmptyFrameLoaderClient to the PageClients constructed here.
454
455         * inspector/InspectorOverlay.cpp:
456         (WebCore::InspectorOverlay::overlayPage):
457         * svg/graphics/SVGImage.cpp:
458         (WebCore::SVGImage::dataChanged):
459
460             Updated to wrap Page::mainFrame() in a FrameView instead of creating their
461             own Frame manually.
462
463         * page/Frame.cpp:
464         (WebCore::Frame::create):
465         * page/Page.h:
466
467             Remove Page::setMainFrame() and the only call site.
468
469         * page/Page.cpp:
470         (WebCore::Page::Page):
471
472             Construct Page::m_mainFrame in the initializer list.
473
474         (WebCore::Page::PageClients::PageClients):
475
476             Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
477
478         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
479
480             Null-check the Frame::document() before calling through on it. This would
481             otherwise crash when changing font-related Settings before calling init() on
482             the Frame (like InspectorOverlay does.)
483
484 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
485
486         [Windows] Unreviewed build fix.
487
488         * rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
489         that are no longer part of WKSI.
490         (wkHitTestMediaUIPart): 
491         (wkMeasureMediaUIPart):
492         (wkDrawMediaUIPart):
493         (wkDrawMediaSliderTrack):
494
495 2013-08-26  Gurpreet Kaur  <gur.trio@gmail.com>
496
497         <https://webkit.org/b/106133> document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
498
499         Reviewed by Darin Adler.
500
501         Webkit always uses document.body.scrollTop whether quirks or
502         standard mode. Similiar behaviour is for document.body.scrollLeft.
503         As per the specification webkit should return document.body.scrollTop
504         for quirks mode and document.documentElement.scrollTop for standard mode.
505         Same for document.body.scrollLeft and document.documentElement.scrollLeft.
506
507         Tests: fast/dom/Element/scrollLeft-Quirks.html
508                fast/dom/Element/scrollLeft.html
509                fast/dom/Element/scrollTop-Quirks.html
510                fast/dom/Element/scrollTop.html
511
512         * dom/Element.cpp:
513         (WebCore::Element::scrollLeft):
514         (WebCore::Element::scrollTop): 
515         If the element does not have any associated CSS layout box or the element
516         is the root element and the Document is in quirks mode return zero.
517         Else If the element is the root element return the value of scrollY
518         for scrollTop and scrollX for scrollLeft.
519         * html/HTMLBodyElement.cpp:
520         (WebCore::HTMLBodyElement::scrollLeft):
521         (WebCore::HTMLBodyElement::scrollTop):
522         If the element is the HTML body element, the Document is in quirks mode,
523         return the value of scrollY for scrollTop and scrollX for scrollLeft.
524
525 2013-08-26  Antti Koivisto  <antti@apple.com>
526
527         REGRESSION (r154581): Some plugin tests failing in debug bots
528         https://bugs.webkit.org/show_bug.cgi?id=120315
529
530         Reviewed by Darin Adler.
531         
532         We are hitting the new no-event-dispatch-while-iterating assertion.
533
534         Detaching deletes a plugin which modifies DOM while it dies.
535
536         * dom/Document.cpp:
537         (WebCore::Document::createRenderTree):
538         (WebCore::Document::detach):
539         
540             Don't iterate at all. Document never has more than one Element child anyway.
541
542 2013-08-26  David Kilzer  <ddkilzer@apple.com>
543
544         BUILD FIX (r154580): RenderObject::document() returns a reference
545
546         See: <https://webkit.org/b/120272>
547
548         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
549         (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
550         (AXAttributeStringSetHeadingLevel):
551
552 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
553
554         [Windows] Build fix after r154578.  Return Vector<String>() instead
555         of ListHashSet<String>().
556
557         * platform/win/PasteboardWin.cpp:
558         (WebCore::Pasteboard::types):
559
560 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
561
562         [Windows] Build fix after r154580.
563
564         * rendering/RenderThemeWin.cpp: Mirror changes made for other ports now that
565         Frame is known to always be valid when in a render tree. This allows us to
566         get rid of some unneeded null checks.
567         (WebCore::RenderThemeWin::getThemeData):
568         (WebCore::RenderThemeWin::paintMenuList):
569
570 2013-08-26  Brent Fulgham  <bfulgham@apple.com>
571
572         [Windows] Build fix after r154554.
573
574         * page/AutoscrollController.cpp: Correct various places where pointers are now
575         references.
576         (WebCore::AutoscrollController::stopAutoscrollTimer):
577         (WebCore::AutoscrollController::startPanScrolling):
578         (WebCore::AutoscrollController::autoscrollTimerFired):
579
580 2013-08-26  Andreas Kling  <akling@apple.com>
581
582         Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
583         <https://webkit.org/b/120281>
584
585         Reviewed by Anders Carlsson.
586
587         Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
588         filling it in if we're not building like that.
589
590         * dom/Document.cpp:
591         (WebCore::Document::setReadyState):
592         (WebCore::Document::finishedParsing):
593         * dom/Document.h:
594         * dom/DocumentTiming.h:
595
596 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
597
598         [GTK] Fix compile warning in WebKitDOMCustom
599         https://bugs.webkit.org/show_bug.cgi?id=120286
600
601         Reviewed by Philippe Normand.
602
603         * bindings/gobject/WebKitDOMCustom.cpp:
604         (webkit_dom_html_element_get_item_type): Add return 0.
605
606 2013-08-25  Ryosuke Niwa  <rniwa@webkit.org>
607
608         JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
609         https://bugs.webkit.org/show_bug.cgi?id=120277
610
611         Reviewed by Sam Weinig.
612
613         Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
614
615         This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
616         after replacing an element A with another element B of the same name caused it to erroneously append A
617         to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
618         wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
619         when namedItem's size is 1.
620
621         Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
622
623         No new tests are added since there should be no Web exposed behavioral change.
624
625         * bindings/js/JSHTMLFormElementCustom.cpp:
626         (WebCore::JSHTMLFormElement::canGetItemsForName):
627         * html/HTMLFormElement.cpp:
628         (WebCore::HTMLFormElement::elementFromPastNamesMap):
629         (WebCore::HTMLFormElement::addElementToPastNamesMap):
630         (WebCore::HTMLFormElement::hasNamedElement):
631         (WebCore::HTMLFormElement::getNamedElements):
632         * html/HTMLFormElement.h:
633
634 2013-08-25  Andreas Kling  <akling@apple.com>
635
636         RenderLayerBacking::renderer() should return a reference.
637         <https://webkit.org/b/120280>
638
639         Reviewed by Anders Carlsson.
640
641         It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
642
643 2013-08-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
644
645         Add toSVGMissingGlyphElement(), and use it.
646         https://bugs.webkit.org/show_bug.cgi?id=120197
647
648         Reviewed by Andreas Kling.
649
650         As a step to clean-up static_cast<SVGXXX>, toSVGMissingGlyphElement() is added to clean-up
651         static_cast<SVGMissingGlyphElement*>.
652
653         * svg/SVGFontElement.cpp:
654         (WebCore::SVGFontElement::firstMissingGlyphElement):
655         (WebCore::SVGFontElement::ensureGlyphCache):
656         * svg/SVGMissingGlyphElement.h:
657         (WebCore::toSVGMissingGlyphElement):
658
659 2013-08-25  Andreas Kling  <akling@apple.com>
660
661         RenderLayer::renderer() should return a reference.
662         <https://webkit.org/b/120276>
663
664         Reviewed by Anders Carlsson.
665
666         RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
667         Nuked an assortment of useless null checks.
668
669 2013-08-25  Antti Koivisto  <antti@apple.com>
670
671         Element child and descendant iterators
672         https://bugs.webkit.org/show_bug.cgi?id=120248
673
674         Reviewed by Sam Weinig and Andreas Kling.
675
676         Add iterators for Element children and descendants.
677         
678         To iterate over element children:
679         
680         #include "ChildIterator.h"
681         
682         for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
683             Element& element = *it;
684             ...
685
686         for (auto it = childrenOfType<HTMLAreaElement>(this).begin(), end = childrenOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
687             HTMLAreaElement& area = *it;
688             ...
689
690         To iteratate over element descendants in pre-order:
691         
692         #include "DescendantIterator.h"
693         
694         for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
695             Element& element = *it;
696             ...
697
698         for (auto it = descendantsOfType<HTMLAreaElement>(this).begin(), end = descendantsOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
699             HTMLAreaElement& area = *it;
700             ...
701             
702         The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
703             
704         They are compatible with C++11 range-based for loops. In the future we can use
705         
706         for (auto& element : elementChildren(this))
707             ...
708
709         etc.
710         
711         The patch all uses the new iterators in a few places.
712
713         * WebCore.xcodeproj/project.pbxproj:
714         * accessibility/AccessibilityNodeObject.cpp:
715         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
716         (WebCore::siblingWithAriaRole):
717         * accessibility/AccessibilityRenderObject.cpp:
718         * accessibility/AccessibilityTable.cpp:
719         (WebCore::AccessibilityTable::isDataTable):
720         * dom/ChildIterator.h: Added.
721         (WebCore::ChildIterator::operator*):
722         (WebCore::ChildIterator::operator->):
723         (WebCore::::ChildIterator):
724         (WebCore::::operator):
725         (WebCore::=):
726         (WebCore::::ChildIteratorAdapter):
727         (WebCore::::begin):
728         (WebCore::::end):
729         (WebCore::elementChildren):
730         (WebCore::childrenOfType):
731         * dom/DescendantIterator.h: Added.
732         (WebCore::DescendantIterator::operator*):
733         (WebCore::DescendantIterator::operator->):
734         (WebCore::::DescendantIterator):
735         (WebCore::::operator):
736         (WebCore::=):
737         (WebCore::::DescendantIteratorAdapter):
738         (WebCore::::begin):
739         (WebCore::::end):
740         (WebCore::elementDescendants):
741         (WebCore::descendantsOfType):
742         * dom/Document.cpp:
743         (WebCore::Document::buildAccessKeyMap):
744         (WebCore::Document::childrenChanged):
745         (WebCore::Document::attach):
746         (WebCore::Document::detach):
747         * editing/ApplyStyleCommand.cpp:
748         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
749         * editing/markup.cpp:
750         (WebCore::completeURLs):
751         * html/HTMLMapElement.cpp:
752         (WebCore::HTMLMapElement::mapMouseEvent):
753         * html/HTMLMediaElement.cpp:
754         (WebCore::HTMLMediaElement::selectMediaResource):
755         (WebCore::HTMLMediaElement::textTrackModeChanged):
756
757 2013-08-25  Andreas Kling  <akling@apple.com>
758
759         RenderObject::document() should return a reference.
760         <https://webkit.org/b/120272>
761
762         Reviewed by Antti Koivisto.
763
764         There's always a Document. We were allocated in someone's arena, after all.
765         Various null checks and assertions neutralized.
766
767 2013-08-25  David Kilzer  <ddkilzer@apple.com>
768
769         BUILD FIX (r154578): Return Vector<String>() from Pasteboard::types() for iOS
770
771         * platform/ios/PasteboardIOS.mm:
772         (WebCore::Pasteboard::types): Return Vector<String>() instead of
773         ListHashSet<String>() after r154578.
774
775 2013-08-25  Darin Adler  <darin@apple.com>
776
777         Make JavaScript binding for Clipboard::types more normal
778         https://bugs.webkit.org/show_bug.cgi?id=120271
779
780         Reviewed by Anders Carlsson.
781
782         * bindings/js/JSClipboardCustom.cpp:
783         (WebCore::JSClipboard::types): Make a simple custom binding. Only needed because
784         there is a special value, null, this can return.
785
786         * dom/Clipboard.cpp:
787         (WebCore::Clipboard::types): Return Vector<String> instead of ListHashSet<String>.
788         * dom/Clipboard.h: Ditto.
789         * platform/Pasteboard.h: Ditto.
790         * platform/blackberry/PasteboardBlackBerry.cpp:
791         (WebCore::Pasteboard::types): Ditto.
792         * platform/efl/PasteboardEfl.cpp:
793         (WebCore::Pasteboard::types): Ditto.
794         * platform/gtk/PasteboardGtk.cpp:
795         (WebCore::Pasteboard::types): Ditto.
796         * platform/ios/PasteboardIOS.mm:
797         (WebCore::Pasteboard::types): Ditto.
798         * platform/mac/PasteboardMac.mm:
799         (WebCore::Pasteboard::types): Ditto.
800         * platform/qt/PasteboardQt.cpp:
801         (WebCore::Pasteboard::types): Ditto.
802         * platform/win/PasteboardWin.cpp:
803         (WebCore::Pasteboard::types): Ditto.
804
805 2013-08-25  David Kilzer  <ddkilzer@apple.com>
806
807         Unreviewed rollout of r154571. Broke internal iOS build.
808
809         Reopened: No need for clearTimers function in Frame
810         https://bugs.webkit.org/show_bug.cgi?id=120265
811
812         * history/CachedFrame.cpp:
813         (WebCore::CachedFrame::CachedFrame):
814         (WebCore::CachedFrame::destroy):
815         * page/Frame.cpp:
816         (WebCore::Frame::clearTimers):
817         * page/Frame.h:
818
819 2013-08-25  Darin Adler  <darin@apple.com>
820
821         No need for hasData in Clipboard
822         https://bugs.webkit.org/show_bug.cgi?id=120269
823
824         Reviewed by Andreas Kling.
825
826         This simple forwarder does not belong in the Clipboard class.
827         The drag code that uses it already works directly with Pasteboard.
828
829         * dom/Clipboard.cpp: Removed hasData.
830         * dom/Clipboard.h: Ditto.
831
832         * page/DragController.cpp:
833         (WebCore::DragController::startDrag): Call through the pasteboard.
834
835 2013-08-25  Darin Adler  <darin@apple.com>
836
837         No need for documentTypeString function in Frame
838         https://bugs.webkit.org/show_bug.cgi?id=120262
839
840         Reviewed by Andreas Kling.
841
842         * WebCore.exp.in: Removed export of Frame::documentTypeString.
843
844         * editing/markup.cpp:
845         (WebCore::documentTypeString): Added. Replaces the old Frame member function.
846         Makes more sense to have this here since it is both called by and calls code
847         in this file; somehow this function was left behind.
848         (WebCore::createFullMarkup): Changed to call the new function.
849         * editing/markup.h: Added documentTypeString function. Has to be exported
850         because LegacyWebArchive uses it; might be worth fixing that later.
851         * loader/archive/cf/LegacyWebArchive.cpp:
852         (WebCore::LegacyWebArchive::create): Changed to call the new function.
853         (WebCore::LegacyWebArchive::createFromSelection): Ditto.
854
855         * page/Frame.cpp: Removed Frame::documentTypeString.
856         * page/Frame.h: Ditto.
857
858 2013-08-25  Darin Adler  <darin@apple.com>
859
860         Clipboard is in DOM directory, but ClipboardMac is in platform directory
861         https://bugs.webkit.org/show_bug.cgi?id=120267
862
863         Reviewed by Andreas Kling.
864
865         This file is almost gone; has just one function in it. Move it for now, and later
866         we can delete it entirely.
867
868         * WebCore.xcodeproj/project.pbxproj: Updated for new file location.
869         * dom/ClipboardMac.mm: Moved from Source/WebCore/platform/mac/ClipboardMac.mm.
870
871 2013-08-25  Darin Adler  <darin@apple.com>
872
873         No need for notifyChromeClientWheelEventHandlerCountChanged in Frame
874         https://bugs.webkit.org/show_bug.cgi?id=120264
875
876         Reviewed by Andreas Kling.
877
878         * dom/Document.cpp:
879         (WebCore::Document::createRenderTree): Renamed attach to this.
880         This made it practical to remove a comment that says the same thing and
881         also helps make the purpose of the function considerably more clear,
882         although the relationship to the attached and detach functions is now
883         less clear; should fix that soon.
884         (WebCore::pageWheelEventHandlerCountChanged): Added. Contains the code
885         from Frame::notifyChromeClientWheelEventHandlerCountChanged, minus some
886         assertions that were only needed because the function was passed a frame
887         rather than a page.
888         (WebCore::Document::didBecomeCurrentDocumentInFrame): Added. Contains
889         most of the code from Frame::setDocument. Looking at before and after,
890         we can see that most of the work is within the document class and matches
891         up with other code already in this class. Added FIXMEs about many problems
892         spotted in the code.
893         (WebCore::Document::topDocument): Added FIXME and tweaked formatting.
894         (WebCore::wheelEventHandlerCountChanged): Moved the call to the
895         pageWheelEventHandlerCountChanged in here from the two call sites.
896         Also added a FIXME.
897         (WebCore::Document::didAddWheelEventHandler): Removed the call to
898         notifyChromeClientWheelEventHandlerCountChanged, since that's now handled
899         inside wheelEventHandlerCountChanged.
900         (WebCore::Document::didRemoveWheelEventHandler): Ditto.
901
902         * dom/Document.h: Renamed attach to createRenderTree, made it private,
903         and added a new didBecomeCurrentDocumentInFrame function.
904
905         * loader/PlaceholderDocument.cpp:
906         (WebCore::PlaceholderDocument::createRenderTree): Renamed from attach.
907         * loader/PlaceholderDocument.h: Did the rename and made the function a
908         private override.
909
910         * page/Frame.cpp:
911         (WebCore::Frame::setDocument): Moved most of this function out of here
912         into the new Document::didBecomeCurrentDocumentInFrame function.
913         Also deleted notifyChromeClientWheelEventHandlerCountChanged.
914
915         * page/Frame.h: Deleted notifyChromeClientWheelEventHandlerCountChanged.
916
917 2013-08-25  Darin Adler  <darin@apple.com>
918
919         No need for dispatchVisibilityStateChangeEvent function
920         https://bugs.webkit.org/show_bug.cgi?id=120261
921
922         Reviewed by Andreas Kling.
923
924         * dom/Document.cpp: Removed dispatchVisibilityStateChangeEvent.
925         * dom/Document.h: Ditto.
926         * page/Frame.cpp: Ditto.
927         * page/Frame.h: Ditto.
928
929         * page/Page.cpp:
930         (WebCore::Page::setVisibilityState): Put all the logic for dispatching the
931         visibility state change event. Nothing here requires any special information
932         about the internals of Frame or Document.
933
934 2013-08-25  Darin Adler  <darin@apple.com>
935
936         No need for clearTimers function in Frame
937         https://bugs.webkit.org/show_bug.cgi?id=120265
938
939         Reviewed by Andreas Kling.
940
941         * history/CachedFrame.cpp:
942         (WebCore::clearTimers): Added. Moved here from Frame.
943         (WebCore::CachedFrame::CachedFrame): Call above function.
944         (WebCore::CachedFrame::destroy): Ditto.
945
946         * page/Frame.cpp: Removed the two clearTimers functions.
947         * page/Frame.h: Ditto.
948
949 2013-08-24  Ryuan Choi  <ryuan.choi@samsung.com>
950
951         Unreviewed build fix after r154560
952
953         * page/FrameTree.cpp:
954         (WebCore::FrameTree::scopedChild): 
955         Use tree(). instead of tree()->.
956
957 2013-08-24  Benjamin Poulain  <benjamin@webkit.org>
958
959         <https://webkit.org/b/120102> Inline SelectorQuery's execution traits
960
961         Reviewed by Sam Weinig.
962
963         For some reason, clang does not always inline the trait. The operations are so simple
964         that it shows up in profile.
965         Force the inlining to match the original speed.
966
967         * dom/SelectorQuery.cpp:
968         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
969         (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
970
971 2013-08-24  Benjamin Poulain  <benjamin@webkit.org>
972
973         Remove a useless #include from StyledElement
974         https://bugs.webkit.org/show_bug.cgi?id=120245
975
976         Reviewed by Andreas Kling.
977
978         * dom/StyledElement.cpp:
979
980 2013-08-24  Darin Adler  <darin@apple.com>
981
982         Move Frame::inScope into FrameTree
983         https://bugs.webkit.org/show_bug.cgi?id=120257
984
985         Reviewed by Sam Weinig.
986
987         * page/Frame.cpp: Removed inScope.
988         * page/Frame.h: Ditto.
989
990         * page/FrameTree.cpp:
991         (WebCore::inScope): Moved it here.
992         (WebCore::FrameTree::scopedChild): Changed to call new function.
993         (WebCore::FrameTree::scopedChildCount): Ditto.
994
995 2013-08-24  David Kilzer  <ddkilzer@apple.com>
996
997         BUILD FIX: Include HTMLPlugInImageElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
998
999         Fixes the following build failure for iOS:
1000
1001             In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:28:
1002             In file included from Source/WebCore/accessibility/AXObjectCache.cpp:42:
1003             In file included from Source/WebCore/accessibility/AccessibilityMediaControls.h:36:
1004             In file included from Source/WebCore/html/shadow/MediaControlElements.h:34:
1005             In file included from Source/WebCore/html/shadow/MediaControlElementTypes.h:37:
1006             Source/WebCore/html/HTMLMediaElement.h:324:23: error: unknown type name 'PluginCreationOption'
1007                 void updateWidget(PluginCreationOption);
1008                                   ^
1009
1010         * html/HTMLMediaElement.h:
1011
1012 2013-08-24  Darin Adler  <darin@apple.com>
1013
1014         Frame::tree should return a reference instead of a pointer
1015         https://bugs.webkit.org/show_bug.cgi?id=120259
1016
1017         Reviewed by Andreas Kling.
1018
1019         * page/Frame.h:
1020         (WebCore::Frame::tree): Return a reference instead of a pointer.
1021
1022         * bindings/js/JSDOMWindowCustom.cpp:
1023         (WebCore::childFrameGetter):
1024         (WebCore::indexGetter):
1025         (WebCore::JSDOMWindow::getOwnPropertySlot):
1026         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1027         (WebCore::JSDOMWindow::setLocation):
1028         * bindings/js/PageScriptDebugServer.cpp:
1029         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
1030         * dom/Document.cpp:
1031         (WebCore::canAccessAncestor):
1032         (WebCore::Document::adoptNode):
1033         (WebCore::Document::canNavigate):
1034         (WebCore::Document::findUnsafeParentScrollPropagationBoundary):
1035         (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
1036         (WebCore::Document::openSearchDescriptionURL):
1037         (WebCore::Document::setDesignMode):
1038         (WebCore::Document::parentDocument):
1039         (WebCore::Document::initSecurityContext):
1040         (WebCore::Document::initContentSecurityPolicy):
1041         (WebCore::Document::requestFullScreenForElement):
1042         (WebCore::Document::webkitExitFullscreen):
1043         (WebCore::Document::didRemoveTouchEventHandler):
1044         * dom/TreeScope.cpp:
1045         (WebCore::focusedFrameOwnerElement):
1046         * editing/FrameSelection.cpp:
1047         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
1048         * history/CachedFrame.cpp:
1049         (WebCore::CachedFrameBase::CachedFrameBase):
1050         (WebCore::CachedFrameBase::restore):
1051         (WebCore::CachedFrame::CachedFrame):
1052         * history/CachedPage.cpp:
1053         (WebCore::CachedPage::restore):
1054         * history/PageCache.cpp:
1055         (WebCore::logCanCacheFrameDecision):
1056         (WebCore::PageCache::canCachePageContainingThisFrame):
1057         * html/HTMLDocument.cpp:
1058         (WebCore::HTMLDocument::hasFocus):
1059         * html/HTMLPlugInImageElement.cpp:
1060         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
1061         * inspector/InspectorApplicationCacheAgent.cpp:
1062         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1063         * inspector/InspectorCanvasAgent.cpp:
1064         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
1065         (WebCore::InspectorCanvasAgent::frameNavigated):
1066         * inspector/InspectorDOMAgent.cpp:
1067         (WebCore::InspectorDOMAgent::documents):
1068         * inspector/InspectorFileSystemAgent.cpp:
1069         (WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
1070         * inspector/InspectorPageAgent.cpp:
1071         (WebCore::InspectorPageAgent::getCookies):
1072         (WebCore::InspectorPageAgent::deleteCookie):
1073         (WebCore::InspectorPageAgent::searchInResources):
1074         (WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
1075         (WebCore::InspectorPageAgent::buildObjectForFrame):
1076         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
1077         * inspector/PageRuntimeAgent.cpp:
1078         (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
1079         * loader/DocumentLoader.cpp:
1080         (WebCore::DocumentLoader::willSendRequest):
1081         (WebCore::DocumentLoader::mainResource):
1082         * loader/DocumentWriter.cpp:
1083         (WebCore::DocumentWriter::createDecoderIfNeeded):
1084         * loader/FrameLoader.cpp:
1085         (WebCore::FrameLoader::submitForm):
1086         (WebCore::FrameLoader::allChildrenAreComplete):
1087         (WebCore::FrameLoader::allAncestorsAreComplete):
1088         (WebCore::FrameLoader::loadURLIntoChildFrame):
1089         (WebCore::FrameLoader::outgoingReferrer):
1090         (WebCore::FrameLoader::updateFirstPartyForCookies):
1091         (WebCore::FrameLoader::setFirstPartyForCookies):
1092         (WebCore::FrameLoader::completed):
1093         (WebCore::FrameLoader::started):
1094         (WebCore::FrameLoader::loadURL):
1095         (WebCore::FrameLoader::loadWithDocumentLoader):
1096         (WebCore::FrameLoader::stopAllLoaders):
1097         (WebCore::FrameLoader::commitProvisionalLoad):
1098         (WebCore::FrameLoader::closeOldDataSources):
1099         (WebCore::FrameLoader::prepareForCachedPageRestore):
1100         (WebCore::FrameLoader::subframeIsLoading):
1101         (WebCore::FrameLoader::subresourceCachePolicy):
1102         (WebCore::FrameLoader::detachChildren):
1103         (WebCore::FrameLoader::closeAndRemoveChild):
1104         (WebCore::FrameLoader::checkLoadComplete):
1105         (WebCore::FrameLoader::numPendingOrLoadingRequests):
1106         (WebCore::FrameLoader::detachFromParent):
1107         (WebCore::FrameLoader::shouldClose):
1108         (WebCore::FrameLoader::handleBeforeUnloadEvent):
1109         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1110         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1111         (WebCore::FrameLoader::findFrameForNavigation):
1112         (WebCore::FrameLoader::effectiveSandboxFlags):
1113         (WebCore::createWindow):
1114         * loader/HistoryController.cpp:
1115         (WebCore::HistoryController::saveDocumentState):
1116         (WebCore::HistoryController::saveDocumentAndScrollState):
1117         (WebCore::HistoryController::restoreDocumentState):
1118         (WebCore::HistoryController::goToItem):
1119         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
1120         (WebCore::HistoryController::recursiveUpdateForCommit):
1121         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
1122         (WebCore::HistoryController::initializeItem):
1123         (WebCore::HistoryController::createItemTree):
1124         (WebCore::HistoryController::recursiveSetProvisionalItem):
1125         (WebCore::HistoryController::recursiveGoToItem):
1126         (WebCore::HistoryController::currentFramesMatchItem):
1127         * loader/NavigationScheduler.cpp:
1128         (WebCore::NavigationScheduler::mustLockBackForwardList):
1129         (WebCore::NavigationScheduler::scheduleFormSubmission):
1130         * loader/ProgressTracker.cpp:
1131         (WebCore::ProgressTracker::progressStarted):
1132         (WebCore::ProgressTracker::progressCompleted):
1133         (WebCore::ProgressTracker::isMainLoadProgressing):
1134         * loader/appcache/ApplicationCacheGroup.cpp:
1135         (WebCore::ApplicationCacheGroup::selectCache):
1136         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
1137         * loader/archive/cf/LegacyWebArchive.cpp:
1138         (WebCore::LegacyWebArchive::create):
1139         * loader/cache/CachedResourceLoader.cpp:
1140         (WebCore::CachedResourceLoader::checkInsecureContent):
1141         * loader/icon/IconController.cpp:
1142         (WebCore::IconController::urlsForTypes):
1143         (WebCore::IconController::startLoader):
1144         * page/Chrome.cpp:
1145         (WebCore::canRunModalIfDuringPageDismissal):
1146         (WebCore::Chrome::windowScreenDidChange):
1147         * page/DOMWindow.cpp:
1148         (WebCore::DOMWindow::length):
1149         (WebCore::DOMWindow::name):
1150         (WebCore::DOMWindow::setName):
1151         (WebCore::DOMWindow::parent):
1152         (WebCore::DOMWindow::top):
1153         (WebCore::DOMWindow::open):
1154         * page/EventHandler.cpp:
1155         (WebCore::EventHandler::scrollRecursively):
1156         (WebCore::EventHandler::logicalScrollRecursively):
1157         (WebCore::EventHandler::handleMouseMoveEvent):
1158         * page/FocusController.cpp:
1159         (WebCore::FocusController::setContainingWindowIsVisible):
1160         * page/Frame.cpp:
1161         (WebCore::parentPageZoomFactor):
1162         (WebCore::parentTextZoomFactor):
1163         (WebCore::Frame::setPrinting):
1164         (WebCore::Frame::shouldUsePrintingLayout):
1165         (WebCore::Frame::dispatchVisibilityStateChangeEvent):
1166         (WebCore::Frame::willDetachPage):
1167         (WebCore::Frame::setPageAndTextZoomFactors):
1168         (WebCore::Frame::deviceOrPageScaleFactorChanged):
1169         (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
1170         (WebCore::Frame::isURLAllowed):
1171         * page/FrameTree.cpp:
1172         (WebCore::FrameTree::~FrameTree):
1173         (WebCore::FrameTree::setName):
1174         (WebCore::FrameTree::transferChild):
1175         (WebCore::FrameTree::appendChild):
1176         (WebCore::FrameTree::actuallyAppendChild):
1177         (WebCore::FrameTree::removeChild):
1178         (WebCore::FrameTree::uniqueChildName):
1179         (WebCore::FrameTree::scopedChild):
1180         (WebCore::FrameTree::scopedChildCount):
1181         (WebCore::FrameTree::childCount):
1182         (WebCore::FrameTree::child):
1183         (WebCore::FrameTree::find):
1184         (WebCore::FrameTree::isDescendantOf):
1185         (WebCore::FrameTree::traverseNext):
1186         (WebCore::FrameTree::traversePreviousWithWrap):
1187         (WebCore::FrameTree::deepLastChild):
1188         (WebCore::FrameTree::top):
1189         (printFrames):
1190         (showFrameTree):
1191         * page/FrameView.cpp:
1192         (WebCore::FrameView::setFrameRect):
1193         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
1194         (WebCore::FrameView::hasCompositingAncestor):
1195         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
1196         (WebCore::FrameView::updateCanBlitOnScrollRecursively):
1197         (WebCore::FrameView::setIsOverlapped):
1198         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
1199         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
1200         (WebCore::FrameView::serviceScriptedAnimations):
1201         (WebCore::FrameView::updateBackgroundRecursively):
1202         (WebCore::FrameView::parentFrameView):
1203         (WebCore::FrameView::paintContentsForSnapshot):
1204         (WebCore::FrameView::setTracksRepaints):
1205         (WebCore::FrameView::notifyWidgetsInAllFrames):
1206         * page/Location.cpp:
1207         (WebCore::Location::ancestorOrigins):
1208         * page/Page.cpp:
1209         (WebCore::networkStateChanged):
1210         (WebCore::Page::~Page):
1211         (WebCore::Page::renderTreeSize):
1212         (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
1213         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
1214         (WebCore::Page::refreshPlugins):
1215         (WebCore::Page::takeAnyMediaCanStartListener):
1216         (WebCore::incrementFrame):
1217         (WebCore::Page::setDefersLoading):
1218         (WebCore::Page::setMediaVolume):
1219         (WebCore::Page::setDeviceScaleFactor):
1220         (WebCore::Page::setShouldSuppressScrollbarAnimations):
1221         (WebCore::Page::didMoveOnscreen):
1222         (WebCore::Page::willMoveOffscreen):
1223         (WebCore::Page::setIsInWindow):
1224         (WebCore::Page::suspendScriptedAnimations):
1225         (WebCore::Page::resumeScriptedAnimations):
1226         (WebCore::Page::userStyleSheetLocationChanged):
1227         (WebCore::Page::allVisitedStateChanged):
1228         (WebCore::Page::visitedStateChanged):
1229         (WebCore::Page::setDebugger):
1230         (WebCore::Page::setMemoryCacheClientCallsEnabled):
1231         (WebCore::Page::setMinimumTimerInterval):
1232         (WebCore::Page::setTimerAlignmentInterval):
1233         (WebCore::Page::dnsPrefetchingStateChanged):
1234         (WebCore::Page::collectPluginViews):
1235         (WebCore::Page::storageBlockingStateChanged):
1236         (WebCore::Page::privateBrowsingStateChanged):
1237         (WebCore::Page::checkSubframeCountConsistency):
1238         (WebCore::Page::suspendActiveDOMObjectsAndAnimations):
1239         (WebCore::Page::resumeActiveDOMObjectsAndAnimations):
1240         (WebCore::Page::captionPreferencesChanged):
1241         * page/PageGroup.cpp:
1242         (WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
1243         * page/PageGroupLoadDeferrer.cpp:
1244         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
1245         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
1246         * page/PageSerializer.cpp:
1247         (WebCore::PageSerializer::serializeFrame):
1248         * page/PageThrottler.cpp:
1249         (WebCore::PageThrottler::throttlePage):
1250         (WebCore::PageThrottler::unthrottlePage):
1251         * page/Settings.cpp:
1252         (WebCore::setImageLoadingSettings):
1253         (WebCore::Settings::setTextAutosizingFontScaleFactor):
1254         * page/SpatialNavigation.cpp:
1255         (WebCore::rectToAbsoluteCoordinates):
1256         * page/animation/AnimationController.cpp:
1257         (WebCore::AnimationControllerPrivate::suspendAnimations):
1258         (WebCore::AnimationControllerPrivate::resumeAnimations):
1259         * page/mac/PageMac.cpp:
1260         (WebCore::Page::addSchedulePair):
1261         (WebCore::Page::removeSchedulePair):
1262         * page/scrolling/ScrollingCoordinator.cpp:
1263         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
1264         (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
1265         * plugins/PluginView.cpp:
1266         (WebCore::PluginView::performRequest):
1267         (WebCore::PluginView::load):
1268         * rendering/HitTestResult.cpp:
1269         (WebCore::HitTestResult::targetFrame):
1270         * rendering/RenderLayerCompositor.cpp:
1271         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
1272         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1273         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
1274         * rendering/TextAutosizer.cpp:
1275         (WebCore::TextAutosizer::processSubtree):
1276         * storage/StorageEventDispatcher.cpp:
1277         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
1278         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
1279         * svg/SVGSVGElement.cpp:
1280         (WebCore::SVGSVGElement::currentScale):
1281         (WebCore::SVGSVGElement::setCurrentScale):
1282         * testing/Internals.cpp:
1283         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
1284         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
1285         (WebCore::Internals::numberOfScrollableAreas):
1286         * xml/parser/XMLDocumentParserLibxml2.cpp:
1287         (WebCore::hasNoStyleInformation):
1288         Use tree(). instead of tree()->.
1289
1290 2013-08-24  Andreas Kling  <akling@apple.com>
1291
1292         Merge Document::viewportSize() logic into RenderView::viewportSize().
1293         <https://webkit.org/b/120254>
1294
1295         Reviewed by Darin Adler.
1296
1297         RenderView can just ask FrameView (the viewport) about its size directly, no need for
1298         a weirdly-placed method on Document.
1299
1300         * dom/Document.cpp:
1301         * rendering/RenderView.cpp:
1302         (WebCore::RenderView::viewportSize):
1303         * rendering/RenderView.h:
1304
1305 2013-08-24  Andreas Kling  <akling@apple.com>
1306
1307         RenderObject::frame() should return a reference.
1308         <https://webkit.org/b/120251>
1309
1310         Reviewed by Darin Adler.
1311
1312         There is now always a Frame, and we can get to it by walking this path:
1313
1314             RenderObject -> Document -> RenderView -> FrameView -> Frame
1315
1316         Removed the customary horde of null checks.
1317
1318 2013-08-24  Andreas Kling  <akling@apple.com>
1319
1320         RenderLayer::compositor() should return a reference.
1321         <https://webkit.org/b/120250>
1322
1323         Reviewed by Anders Carlsson.
1324
1325         It was already converting from a reference to a pointer.
1326
1327 2013-08-24  Yoav Weiss  <yoav@yoav.ws>
1328
1329         Eliminate a useless comparison in srcset's candidate selection algorithm
1330         https://bugs.webkit.org/show_bug.cgi?id=120235
1331
1332         There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
1333         iteration on the candidates vector now skips the last candidate.
1334
1335         Reviewed by Andreas Kling.
1336
1337         * html/parser/HTMLParserIdioms.cpp:
1338         (WebCore::bestFitSourceForImageAttributes):
1339
1340 2013-08-24  Andreas Kling  <akling@apple.com>
1341
1342         RenderObject::view() should return a reference.
1343         <https://webkit.org/b/120247>
1344
1345         Reviewed by Antti Koivisto.
1346
1347         Now that the lifetime and accessibility characteristics of RenderView are well-defined,
1348         we can make RenderObject::view() return a reference, exposing a plethora of unnecessary
1349         null checks.
1350
1351 2013-08-24  Joseph Pecoraro  <pecoraro@apple.com>
1352
1353         Web Inspector: Cleanup Inspector Agents a bit
1354         https://bugs.webkit.org/show_bug.cgi?id=120218
1355
1356         Reviewed by Andreas Kling.
1357
1358         Merge https://chromium.googlesource.com/chromium/blink/+/8693dcb8ba42a5c225f516c664fb0f453c8ba6f0.
1359
1360         * inspector/InspectorCSSAgent.cpp:
1361         (WebCore::InspectorCSSAgent::elementForId):
1362         * inspector/InspectorStyleSheet.cpp:
1363         (ParsedStyleSheet::ParsedStyleSheet):
1364         (WebCore::InspectorStyle::setPropertyText):
1365         (WebCore::InspectorStyle::populateAllProperties):
1366         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
1367
1368 2013-08-24  Andreas Kling  <akling@apple.com>
1369
1370         Let Document keep its RenderView during render tree detach.
1371         <https://webkit.org/b/120233>
1372
1373         Reviewed by Antti Koivisto.
1374
1375         Instead of having "Document::renderer() == NULL" signify that the render tree is being
1376         torn down, give Document an explicit flag for this instead.
1377
1378         This way, we can keep Document's RenderView in place during tree detach.
1379
1380         * dom/Document.cpp:
1381         (WebCore::Document::Document):
1382         (WebCore::Document::detach):
1383         * dom/Document.h:
1384         (WebCore::Document::renderTreeBeingDestroyed):
1385         * rendering/RenderObject.h:
1386         (WebCore::RenderObject::documentBeingDestroyed):
1387
1388 2013-08-24  Antti Koivisto  <antti@apple.com>
1389
1390         Tighten before/after pseudo element accessors
1391         https://bugs.webkit.org/show_bug.cgi?id=120204
1392
1393         Reviewed by Andreas Kling.
1394
1395         We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
1396         
1397         Switch to Element::before/afterPseudoElement(), similarly for setters.
1398
1399         * WebCore.exp.in:
1400         * css/CSSComputedStyleDeclaration.cpp:
1401         (WebCore::ComputedStyleExtractor::styledNode):
1402         * dom/Element.cpp:
1403         (WebCore::Element::~Element):
1404         (WebCore::beforeOrAfterPseudeoElement):
1405         (WebCore::Element::computedStyle):
1406         (WebCore::Element::updatePseudoElement):
1407         (WebCore::Element::createPseudoElementIfNeeded):
1408         (WebCore::Element::updateBeforePseudoElement):
1409         (WebCore::Element::updateAfterPseudoElement):
1410         (WebCore::Element::beforePseudoElement):
1411         (WebCore::Element::afterPseudoElement):
1412         (WebCore::Element::setBeforePseudoElement):
1413         (WebCore::Element::setAfterPseudoElement):
1414         (WebCore::disconnectPseudoElement):
1415         (WebCore::Element::clearBeforePseudoElement):
1416         (WebCore::Element::clearAfterPseudoElement):
1417         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
1418         * dom/Element.h:
1419         * dom/ElementRareData.h:
1420         (WebCore::ElementRareData::beforePseudoElement):
1421         (WebCore::ElementRareData::afterPseudoElement):
1422         (WebCore::ElementRareData::hasPseudoElements):
1423         (WebCore::ElementRareData::~ElementRareData):
1424         (WebCore::ElementRareData::clearBeforePseudoElement):
1425         (WebCore::ElementRareData::clearAfterPseudoElement):
1426         (WebCore::ElementRareData::setBeforePseudoElement):
1427         (WebCore::ElementRareData::setAfterPseudoElement):
1428         
1429             Move detach logic to Element. ElementRareData should not implement semantics.
1430
1431         * dom/Node.cpp:
1432         (WebCore::Node::pseudoAwarePreviousSibling):
1433         (WebCore::Node::pseudoAwareNextSibling):
1434         (WebCore::Node::pseudoAwareFirstChild):
1435         (WebCore::Node::pseudoAwareLastChild):
1436         * dom/NodeRenderingTraversal.cpp:
1437         (WebCore::NodeRenderingTraversal::nextSiblingSlow):
1438         (WebCore::NodeRenderingTraversal::previousSiblingSlow):
1439         * rendering/RenderTreeAsText.cpp:
1440         (WebCore::writeCounterValuesFromChildren):
1441         (WebCore::counterValueForElement):
1442         * style/StyleResolveTree.cpp:
1443         (WebCore::Style::attachRenderTree):
1444         (WebCore::Style::resolveTree):
1445         * testing/Internals.cpp:
1446         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
1447         (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
1448
1449 2013-08-23  Simon Fraser  <simon.fraser@apple.com>
1450
1451         Improve scrolling behavior in iTunes
1452         https://bugs.webkit.org/show_bug.cgi?id=120241
1453         <rdar://problem/14825344>
1454
1455         Reviewed by Sam Weinig.
1456
1457         When vertically scrolling a page with horizontally scrollable overflow areas,
1458         vertical scroll gestures would be interrupted when wheel events with non-zero
1459         X deltas were intercepted by the overflow areas.
1460         
1461         Fix by storing a small history of wheel events deltas and using
1462         it to determine of the scroll gesture is primarily vertical or horizontal.
1463         When this is detected, avoid dispatching scroll events on the on the
1464         non-dominant axis.
1465         
1466         Currently this behavior is conditionalized to only apply in iTunes.
1467
1468         * page/EventHandler.cpp:
1469         (WebCore::EventHandler::EventHandler):
1470         (WebCore::EventHandler::recordWheelEventDelta):
1471         (WebCore::deltaIsPredominantlyVertical):
1472         (WebCore::EventHandler::dominantScrollGestureDirection):
1473         (WebCore::EventHandler::handleWheelEvent):
1474         (WebCore::EventHandler::defaultWheelEventHandler):
1475         * page/EventHandler.h:
1476         * platform/RuntimeApplicationChecks.cpp:
1477         (WebCore::applicationIsITunes):
1478         * platform/RuntimeApplicationChecks.h:
1479
1480 2013-08-23  Pratik Solanki  <psolanki@apple.com>
1481
1482         MediaQuery::expressions() should return a reference
1483         <https://webkit.org/b/120215>
1484
1485         Reviewed by Anders Carlsson.
1486
1487         m_expressions is never NULL so we can just return a reference.
1488
1489         * css/MediaList.cpp:
1490         (WebCore::reportMediaQueryWarningIfNeeded):
1491         * css/MediaQuery.cpp:
1492         (WebCore::MediaQuery::MediaQuery):
1493         * css/MediaQuery.h:
1494         (WebCore::MediaQuery::expressions):
1495         * css/MediaQueryEvaluator.cpp:
1496         (WebCore::MediaQueryEvaluator::eval):
1497
1498 2013-08-23  Ryosuke Niwa  <rniwa@webkit.org>
1499
1500         Build fix after r154515.
1501
1502         * dom/ElementTraversal.h:
1503         (WebCore::Traversal<ElementType>::firstChild):
1504         (WebCore::Traversal<ElementType>::lastChild):
1505
1506 2013-08-23  Andreas Kling  <akling@apple.com>
1507
1508         Simplify some Settings access where we have a Frame in reach.
1509         <http://webkit.org/b/120239>
1510
1511         Reviewed by Anders Carlsson.
1512
1513         In three cases where we can grab at a Frame, we can reach all the way to some Settings
1514         without having to use pointers.
1515
1516         * loader/FrameLoader.cpp:
1517         (WebCore::FrameLoader::didBeginDocument):
1518         * rendering/RenderLayerCompositor.cpp:
1519         (WebCore::RenderLayerCompositor::addToOverlapMap):
1520         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1521
1522 2013-08-23  Jer Noble  <jer.noble@apple.com>
1523
1524         REGRESSION (r150516): Media controls are messed up on right-to-left webpages
1525         https://bugs.webkit.org/show_bug.cgi?id=120234
1526
1527         Reviewed by Dan Bernstein.
1528
1529         Test: media/video-rtl.html
1530
1531         Make the media control panel explicitly direction:ltr. The captions menu and captions
1532         display are unaffected, so rtl content will continue to appear rtl there.
1533
1534         * css/mediaControls.css:
1535         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1536
1537 2013-08-23  Beth Dakin  <bdakin@apple.com>
1538
1539         REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
1540         Adobe Reader
1541         https://bugs.webkit.org/show_bug.cgi?id=120240
1542         -and corresponding-
1543         <rdar://problem/14634453>
1544
1545         Reviewed by Anders Carlsson.
1546
1547         This patch makes it so that we don’t use the infinite rect for the PDF context, 
1548         and it adds WebCoreSystemInterface API to find out if the current content is the 
1549         PDF context. 
1550
1551         * WebCore.exp.in:
1552         * platform/graphics/cg/GraphicsContextCG.cpp:
1553         (WebCore::GraphicsContext::clipOut):
1554         * platform/mac/WebCoreSystemInterface.h:
1555         * platform/mac/WebCoreSystemInterface.mm:
1556
1557 2013-08-23  Eric Carlson  <eric.carlson@apple.com>
1558
1559         [Mac] some track language tags are not recognized
1560         https://bugs.webkit.org/show_bug.cgi?id=119643
1561
1562         Reviewed by Jere Noble.
1563
1564         No new tests, existing tests updated.
1565
1566         * html/HTMLMediaElement.cpp:
1567         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_captionDisplayMode from settings
1568             if possible.
1569         (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't enable a default track when preferences
1570             say captions should be disabled. Don't disable an already visible track if we don't find
1571             a match unless preferences say captions should be disabled. m_forcedOrAutomaticSubtitleTrackLanguage ->
1572             m_subtitleTrackLanguage.
1573         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): If the language of the primary
1574             audio track changes, only kick off a text track recalc if caption preference are set to "automatic".
1575         * html/HTMLMediaElement.h:
1576
1577         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1578         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Initialize m_characteristicsChanged
1579             and m_delayCharacteristicsChangedNotification.
1580         (WebCore::MediaPlayerPrivateAVFoundation::setHasVideo): Call characteristicsChanged.
1581         (WebCore::MediaPlayerPrivateAVFoundation::setHasAudio): Ditto.
1582         (WebCore::MediaPlayerPrivateAVFoundation::setHasClosedCaptions): Ditto.
1583         (WebCore::MediaPlayerPrivateAVFoundation::characteristicsChanged): New, allows us to coalesce 
1584             calls to the media player when we know several characteristics may change.
1585         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCharacteristicsChangedNotification): Enable or
1586             disable notification delay.
1587         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1588
1589         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1590         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
1591             a track may have changed so we may have a new language.
1592         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
1593             if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
1594             QuickTime language code.
1595
1596 2013-08-23  Andreas Kling  <akling@apple.com>
1597
1598         RenderView::compositor() should return a reference.
1599         <https://webkit.org/b/120217>
1600
1601         Reviewed by Beth Dakin.
1602
1603         The RenderLayerCompositor is lazily constructed by compositor() and never returns null.
1604
1605 2013-08-23  Yoav Weiss  <yoav@yoav.ws>
1606
1607         Fix srcset's image candidate algorithm when DPR exceeds all candidates
1608         https://bugs.webkit.org/show_bug.cgi?id=120168
1609
1610         When the DPR exceeded the 'x' qualifier of all image candidates, none was chosen.
1611
1612         From the srcset spec: "If there are any entries in candidates that have an associated pixel density that is less than a
1613         user-agent-defined value giving the nominal pixel density of the display, then remove them, unless that would remove all the
1614         entries, in which case remove only the entries whose associated pixel density is less than the greatest such pixel density."
1615
1616         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
1617         DPR.
1618         
1619         Reviewed by Andreas Kling.
1620
1621         Test: fast/hidpi/image-srcset-fraction.html
1622
1623         * html/parser/HTMLParserIdioms.cpp:
1624         (WebCore::bestFitSourceForImageAttributes):
1625
1626 2013-08-23  Chris Fleizach  <cfleizach@apple.com>
1627
1628         <https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
1629
1630         Reviewed by Darin Adler.
1631
1632         Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
1633
1634         Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
1635
1636         * accessibility/AccessibilityObject.cpp:
1637         (WebCore::AccessibilityObject::supportsARIAExpanded):
1638
1639 2013-08-17  Darin Adler  <darin@apple.com>
1640
1641         <https://webkit.org/b/119945> Some cleanup for PasteboardIOS
1642
1643         Reviewed by Andreas Kling.
1644
1645         * platform/ios/PasteboardIOS.mm:
1646         (WebCore::Pasteboard::setFrame): Moved this function up near the
1647         create functions and constructors.
1648         (WebCore::documentFragmentWithRTF): Tweaked formatting.
1649         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
1650         Ditto.
1651         (WebCore::utiTypeFromCocoaType): Changed to use early return and removed
1652         an unneeded local variable.
1653         (WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
1654         pbType local variables, and tweaked formatting.
1655         (WebCore::Pasteboard::clear): Tweaked comment.
1656         (WebCore::Pasteboard::readString): Tweaked formatting.
1657         (WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
1658         (WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
1659         (WebCore::Pasteboard::types): Renamed pbType to just type.
1660
1661 2013-08-23  Bem Jones-Bey  <bjonesbe@adobe.com>
1662
1663         Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
1664         https://bugs.webkit.org/show_bug.cgi?id=119816
1665
1666         Reviewed by David Hyatt.
1667
1668         This is a port from Blink of
1669         https://src.chromium.org/viewvc/blink?revision=155885&view=revision
1670         Original Patch by Eric Seidel
1671
1672         Original comments:
1673
1674         "It seemed to me that template specifications would be clearer than an
1675         if.  They also allow for compile-time error checking were a 3rd type
1676         of float to come into existance in CSS4. :p
1677
1678         For any unfamiliar with this method, this the object used for
1679         performing a search on a RedBlackTree in WTF.
1680
1681         We create one of these adaptors, specifying that we want to search for
1682         values in a specific (logical) Y interval, and this adaptor is called
1683         back for any values in the RBTree cooresponding to that interval
1684         range.
1685
1686         The job of this adaptor is to collect the various values we care
1687         about, including the left or right-most offset of the floats in that
1688         Y-range as well as what the last (document order) float seen in that
1689         range.
1690
1691         It also collects the remaining available height for the block but I'm
1692         less clear on how that parameter is used."
1693
1694         Note that in addition to the original change, I have made the
1695         updateOffsetIfNeeded and rangesIntersect methods inline, as this was
1696         shown to be a performance win in
1697         https://src.chromium.org/viewvc/blink?revision=156064&view=revision
1698         and it seemed a rather trivial change to be subject to a separate
1699         patch when porting.
1700
1701         No new tests, no behavior change.
1702
1703         * rendering/RenderBlock.cpp:
1704         (WebCore::::updateOffsetIfNeeded):
1705         (WebCore::::collectIfNeeded):
1706         * rendering/RenderBlock.h:
1707
1708 2013-08-23  David Kilzer  <ddkilzer@apple.com>
1709
1710         WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
1711         <http://webkit.org/b/120183>
1712         <rdar://problem/14764114>
1713
1714         Reviewed by Eric Carlson.
1715
1716         The trunk version of clang made an ABI change for Objective-C++
1717         parameters that caused WebCore to fail to link.  The short-term
1718         fix is to change the parameter type from id<protocol> to just id
1719         and add an ASSERT that the parameter still conforms to the
1720         protocol.
1721
1722         * platform/DragData.h:
1723         (DragDataRef): Change typedef from id<NSDragInfo> to id.
1724         * platform/mac/DragDataMac.mm:
1725         (WebCore::DragData::DragData): Add ASSERT that checks that the
1726         DragDataRef object implements the NSDragInfo protocol.
1727
1728 2013-08-23  Andreas Kling  <akling@apple.com>
1729
1730         RenderLayerCompositor::m_renderView should be a reference.
1731         <https://webkit.org/b/120210>
1732
1733         Reviewed by Antti Koivisto.
1734
1735         The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
1736         By making m_renderView a reference, we flush out some unnecessary null checks.
1737         We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
1738         so we don't have to make those blocks conditional anymore, reducing ambiguity.
1739
1740         * rendering/RenderLayerCompositor.cpp:
1741         * rendering/RenderLayerCompositor.h:
1742         * rendering/RenderView.cpp:
1743         (WebCore::RenderView::compositor):
1744
1745 2013-08-23  Andreas Kling  <akling@apple.com>
1746
1747         RenderView::frameView() should return a reference.
1748         <https://webkit.org/b/120208>
1749
1750         Reviewed by Antti Koivisto.
1751
1752         A RenderView should always have a corresponding FrameView, so make frameView()
1753         return a reference. Also remove a myriad of now-impossible null checks.
1754
1755 2013-08-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1756
1757         REGRESSION(r153939) Fix typo in Qt build-files
1758
1759         Reviewed by Antti Koivisto.
1760
1761         Fix simple typo in Target.pri introduced in r153939.
1762
1763         * Target.pri:
1764
1765 2013-08-23  Antti Koivisto  <antti@apple.com>
1766
1767         <https://webkit.org/b/120166> Add Traversal<ElementType> template
1768
1769         Reviewed by Andreas Kling.
1770
1771         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.
1772         
1773         This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
1774         The patch also uses the template in a bunch of applicable places.
1775
1776         * WebCore.exp.in:
1777         * accessibility/AccessibilityRenderObject.cpp:
1778         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1779         * dom/Document.cpp:
1780         (WebCore::Document::removeTitle):
1781         (WebCore::Document::updateBaseURL):
1782         (WebCore::Document::processBaseElement):
1783         * dom/Element.h:
1784         * dom/ElementTraversal.h:
1785         (WebCore::::firstChildTemplate):
1786         (WebCore::::firstWithinTemplate):
1787         (WebCore::::lastChildTemplate):
1788         (WebCore::::lastWithinTemplate):
1789         (WebCore::::nextTemplate):
1790         (WebCore::::previousTemplate):
1791         (WebCore::::nextSiblingTemplate):
1792         (WebCore::::previousSiblingTemplate):
1793         (WebCore::::nextSkippingChildrenTemplate):
1794         (WebCore::::firstChild):
1795         (WebCore::::lastChild):
1796         (WebCore::::firstWithin):
1797         (WebCore::::lastWithin):
1798         (WebCore::::next):
1799         (WebCore::::previous):
1800         (WebCore::::nextSibling):
1801         (WebCore::::previousSibling):
1802         (WebCore::::nextSkippingChildren):
1803         (WebCore::ElementTraversal::previousIncludingPseudo):
1804         (WebCore::ElementTraversal::nextIncludingPseudo):
1805         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
1806         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
1807         * dom/Node.cpp:
1808         (WebCore::Node::numberOfScopedHTMLStyleChildren):
1809         * dom/NodeIterator.cpp:
1810         (WebCore::NodeIterator::NodeIterator):
1811         * dom/NodeIterator.h:
1812         * dom/Traversal.cpp:
1813         (WebCore::NodeIteratorBase::NodeIteratorBase):
1814         (WebCore::NodeIteratorBase::acceptNode):
1815         * dom/Traversal.h:
1816         
1817             Renamed existing class called Traversal to less generic NodeIteratorBase.
1818
1819         * dom/TreeScope.cpp:
1820         (WebCore::TreeScope::labelElementForId):
1821         (WebCore::TreeScope::findAnchor):
1822         * dom/TreeWalker.cpp:
1823         (WebCore::TreeWalker::TreeWalker):
1824         * dom/TreeWalker.h:
1825         * editing/FrameSelection.cpp:
1826         (WebCore::scanForForm):
1827         * editing/markup.cpp:
1828         (WebCore::createContextualFragment):
1829         * html/HTMLAnchorElement.h:
1830         (WebCore::isHTMLAnchorElement):
1831         (WebCore::HTMLAnchorElement):
1832         * html/HTMLAreaElement.h:
1833         (WebCore::isHTMLAreaElement):
1834         (WebCore::HTMLAreaElement):
1835         * html/HTMLBaseElement.h:
1836         (WebCore::isHTMLBaseElement):
1837         (WebCore::HTMLBaseElement):
1838         * html/HTMLElement.h:
1839         (WebCore::HTMLElement):
1840         * html/HTMLFieldSetElement.cpp:
1841         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
1842         (WebCore::HTMLFieldSetElement::childrenChanged):
1843         (WebCore::HTMLFieldSetElement::legend):
1844         * html/HTMLFormControlElement.h:
1845         (WebCore::toHTMLFormControlElement):
1846         (WebCore::HTMLFormControlElement):
1847         * html/HTMLLabelElement.cpp:
1848         (WebCore::nodeAsSupportedLabelableElement):
1849         (WebCore::HTMLLabelElement::control):
1850         * html/HTMLLabelElement.h:
1851         (WebCore::isHTMLLabelElement):
1852         (WebCore::HTMLLabelElement):
1853         * html/HTMLLegendElement.h:
1854         (WebCore::isHTMLLegendElement):
1855         (WebCore::HTMLLegendElement):
1856         * html/HTMLMapElement.cpp:
1857         (WebCore::HTMLMapElement::mapMouseEvent):
1858         * html/HTMLMediaElement.cpp:
1859         (WebCore::HTMLMediaElement::finishParsingChildren):
1860         * html/HTMLStyleElement.h:
1861         (WebCore::isHTMLStyleElement):
1862         (WebCore::HTMLStyleElement):
1863         * html/HTMLTitleElement.h:
1864         (WebCore::HTMLTitleElement):
1865         * html/HTMLTrackElement.h:
1866         (WebCore::isHTMLTrackElement):
1867         (WebCore::HTMLTrackElement):
1868         * html/LabelableElement.h:
1869         (WebCore::isLabelableElement):
1870         (WebCore::LabelableElement):
1871         * rendering/FilterEffectRenderer.cpp:
1872         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1873         * svg/SVGElement.h:
1874         (WebCore::SVGElement):
1875         * svg/SVGForeignObjectElement.h:
1876         (WebCore::isSVGForeignObjectElement):
1877         (WebCore::SVGForeignObjectElement):
1878         * svg/SVGSVGElement.cpp:
1879         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
1880         (WebCore::SVGSVGElement::getElementById):
1881         * svg/SVGStyledElement.cpp:
1882         (WebCore::SVGStyledElement::title):
1883         * svg/SVGTitleElement.h:
1884         (WebCore::SVGTitleElement):
1885         * svg/animation/SMILTimeContainer.cpp:
1886         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
1887         * svg/animation/SVGSMILElement.cpp:
1888         (WebCore::SVGSMILElement::isSMILElement):
1889         * svg/animation/SVGSMILElement.h:
1890         (WebCore::SVGSMILElement):
1891         * svg/graphics/SVGImage.cpp:
1892         (WebCore::SVGImage::hasSingleSecurityOrigin):
1893
1894 2013-08-23  Arpita Bahuguna  <a.bah@samsung.com>
1895
1896         <br> does not get deleted when inlined after some non-textual content.
1897         https://bugs.webkit.org/show_bug.cgi?id=120006
1898
1899         Reviewed by Ryosuke Niwa.
1900
1901         deleteSelectionCommand does not handle the case when a <br> element is
1902         inlined after some non-textual content (input controls, image etc.).
1903
1904         When doing a back-delete at the start of a line following such a <br>
1905         the two contiguous lines should merge and the <br> should get deleted.
1906         Currently, even though the <br> is deleted, another placeholder <br>
1907         is incorrectly inserted at the same point, thus effectively there is no
1908         change.
1909
1910         We are incorrectly computing the inline <br> to be at the start of an
1911         empty line even though the line is not empty.
1912
1913         Test: editing/deleting/delete-inline-br.html
1914
1915         * editing/DeleteSelectionCommand.cpp:
1916         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
1917         Adding a check to verify that the inline <br> is not on an empty line
1918         if the end node is not a <br> element itself and it's previous sibling
1919         is the start <br> element.
1920
1921         Basically we check whether there is another node (end node) following
1922         the <br>, that the node is not a <br> itself, and that the end node's
1923         previous node is the start <br>.
1924
1925 2013-08-23  Renata Hodovan  <reni@webkit.org>
1926
1927         Missing null-check in HTMLFormElement::rendererIsNeeded()
1928         https://bugs.webkit.org/show_bug.cgi?id=120159
1929
1930         Reviewed by Ryosuke Niwa.
1931
1932         Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
1933         and early return.
1934
1935         Test: fast/forms/missing-parentrenderer-crash.html
1936
1937         * html/HTMLFormElement.cpp:
1938         (WebCore::HTMLFormElement::rendererIsNeeded):
1939
1940 2013-08-23  Zalan Bujtas  <zalan@apple.com>
1941
1942         MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
1943         https://bugs.webkit.org/show_bug.cgi?id=120157
1944
1945         Reviewed by Antti Koivisto.
1946
1947         RenderListMarker needs to be inserted to the render tree before
1948         we start computing the preferred logical widths for the associated
1949         RenderListItem.
1950
1951         Test: mathml/mn-as-list-item-assert.html
1952
1953         * rendering/RenderListItem.cpp:
1954         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
1955         (WebCore::RenderListItem::layout):
1956         (WebCore::RenderListItem::computePreferredLogicalWidths):
1957         * rendering/RenderListItem.h:
1958
1959 2013-08-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1960
1961         Introduce toSVGLinearGradientElement(), and use it
1962         https://bugs.webkit.org/show_bug.cgi?id=120154
1963
1964         Reviewed by Andreas Kling.
1965
1966         As a step to clean-up static_cast<SVGXXX>, toSVGLinearGradientElement() is added to clean-up
1967         static_cast<SVGLinearGradientElement*>.
1968
1969         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
1970         (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
1971         * rendering/svg/SVGRenderTreeAsText.cpp:
1972         (WebCore::writeSVGResourceContainer):
1973         * svg/SVGLinearGradientElement.cpp:
1974         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1975         * svg/SVGLinearGradientElement.h:
1976         (WebCore::toSVGLinearGradientElement):
1977
1978 2013-08-22  Simon Fraser  <simon.fraser@apple.com>
1979
1980         compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
1981         https://bugs.webkit.org/show_bug.cgi?id=119825
1982
1983         Reviewed by Tim Horton.
1984         
1985         r137526 and some earlier commits attempted to avoid unconditionally
1986         repainting layers when their size changes, because this was causing
1987         TiledBacking layers to repaint when the document size changed.
1988         
1989         However, the approach required that we have good information about
1990         whether size changes require a repaint, which in some cases is hard
1991         to determine, especially when RenderLayer changes affect our
1992         decisions about which layers are composited.
1993         
1994         Fix by pushing the decision about whether to repaint on size change
1995         into GraphicsLayer. The default is to repaint on size change,
1996         but GraphicsLayer provides a function that can be overridden to
1997         modify this behavior; GraphicsLayerCA does so to avoid repaints
1998         when layers with TiledBackings get resized.
1999
2000         Test: compositing/repaint/repaint-on-layer-grouping-change.html
2001
2002         * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
2003         * platform/graphics/GraphicsLayer.cpp:
2004         (WebCore::GraphicsLayer::setOffsetFromRenderer):
2005         (WebCore::GraphicsLayer::setSize):
2006         * platform/graphics/GraphicsLayer.h:
2007         (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
2008         * platform/graphics/ca/GraphicsLayerCA.cpp:
2009         (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
2010         * platform/graphics/ca/GraphicsLayerCA.h:
2011         * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
2012         * rendering/RenderLayerBacking.cpp:
2013         (WebCore::RenderLayerBacking::RenderLayerBacking):
2014         (WebCore::RenderLayerBacking::updateCompositedBounds):
2015         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
2016         care of repainting for us now, so we can remove all the conditional code.
2017
2018 2013-08-22  Simon Fraser  <simon.fraser@apple.com>
2019
2020         Repaint counters are sometimes not in the corner of the compositing layer
2021         https://bugs.webkit.org/show_bug.cgi?id=120176
2022
2023         Reviewed by Beth Dakin.
2024
2025         Sometimes the repaint counters are not in the corner of the compositing layer;
2026         they are either inset, or partially or entirely outside the layer.
2027         
2028         Fix by making sure that we restore the CGContext before drawing
2029         the counter, since the WebCore code may have translated the CTM.
2030         
2031         The counter-painting code saves and restores the context itself,
2032         so this is safe.
2033
2034         * platform/graphics/mac/WebLayer.mm:
2035         (drawLayerContents):
2036
2037 2013-08-22  Tim Horton  <timothy_horton@apple.com>
2038
2039         Unavailable plug-in indicator text is one pixel too low
2040         https://bugs.webkit.org/show_bug.cgi?id=120177
2041         <rdar://problem/14811951>
2042
2043         Reviewed by Kevin Decker.
2044
2045         Move the unavailable plug-in indicator text up one pixel.
2046
2047         * rendering/RenderEmbeddedObject.cpp:
2048         (WebCore::RenderEmbeddedObject::paintReplaced):
2049
2050 2013-08-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2051
2052         [SVG2] Merge SVGStyledElement and SVGElement
2053         https://bugs.webkit.org/show_bug.cgi?id=107386
2054
2055         Reviewed by Andreas Kling.
2056
2057         Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
2058         model and match the SVG2 specification:
2059         https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
2060
2061         Test: svg/dom/svg2-inheritance.html
2062
2063         * CMakeLists.txt:
2064         * DerivedSources.cpp:
2065         * DerivedSources.make:
2066         * DerivedSources.pri:
2067         * GNUmakefile.list.am:
2068         * Target.pri:
2069         * WebCore.order:
2070         * WebCore.vcxproj/WebCore.vcxproj:
2071         * WebCore.vcxproj/WebCore.vcxproj.filters:
2072         * WebCore.xcodeproj/project.pbxproj:
2073         * accessibility/AccessibilityNodeObject.cpp:
2074         (WebCore::AccessibilityNodeObject::alternativeText):
2075         (WebCore::AccessibilityNodeObject::accessibilityDescription):
2076         * css/SVGCSSStyleSelector.cpp:
2077         * rendering/style/SVGRenderStyle.cpp:
2078         * rendering/svg/RenderSVGContainer.cpp:
2079         (WebCore::RenderSVGContainer::RenderSVGContainer):
2080         * rendering/svg/RenderSVGContainer.h:
2081         * rendering/svg/RenderSVGHiddenContainer.cpp:
2082         (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
2083         * rendering/svg/RenderSVGHiddenContainer.h:
2084         * rendering/svg/RenderSVGModelObject.cpp:
2085         (WebCore::RenderSVGModelObject::RenderSVGModelObject):
2086         (WebCore::getElementCTM):
2087         * rendering/svg/RenderSVGModelObject.h:
2088         * rendering/svg/RenderSVGResourceClipper.cpp:
2089         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2090         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
2091         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2092         * rendering/svg/RenderSVGResourceContainer.cpp:
2093         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
2094         * rendering/svg/RenderSVGResourceContainer.h:
2095         * rendering/svg/RenderSVGResourceFilter.cpp:
2096         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
2097         * rendering/svg/RenderSVGResourceMarker.cpp:
2098         * rendering/svg/RenderSVGResourceMarker.h:
2099         * rendering/svg/RenderSVGResourceMasker.cpp:
2100         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2101         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
2102         * rendering/svg/RenderSVGResourcePattern.cpp:
2103         (WebCore::RenderSVGResourcePattern::createTileImage):
2104         * rendering/svg/RenderSVGRoot.cpp:
2105         (WebCore::RenderSVGRoot::RenderSVGRoot):
2106         * rendering/svg/RenderSVGRoot.h:
2107         * rendering/svg/RenderSVGViewportContainer.cpp:
2108         (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
2109         * rendering/svg/RenderSVGViewportContainer.h:
2110         * rendering/svg/SVGRenderSupport.cpp:
2111         (WebCore::SVGRenderSupport::layoutChildren):
2112         * rendering/svg/SVGRenderTreeAsText.cpp:
2113         * rendering/svg/SVGResources.cpp:
2114         (WebCore::registerPendingResource):
2115         * rendering/svg/SVGResourcesCache.cpp:
2116         * svg/SVGAElement.cpp:
2117         (WebCore::SVGAElement::title):
2118         * svg/SVGAllInOne.cpp:
2119         * svg/SVGAltGlyphDefElement.h:
2120         * svg/SVGAltGlyphItemElement.h:
2121         * svg/SVGAnimateElement.cpp:
2122         * svg/SVGAnimatedType.cpp:
2123         (WebCore::SVGAnimatedType::valueAsString):
2124         (WebCore::SVGAnimatedType::setValueAsString):
2125         * svg/SVGAnimationElement.cpp:
2126         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
2127         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
2128         (WebCore::SVGAnimationElement::adjustForInheritance):
2129         (WebCore::inheritsFromProperty):
2130         * svg/SVGComponentTransferFunctionElement.h:
2131         * svg/SVGCursorElement.h:
2132         * svg/SVGDescElement.cpp:
2133         (WebCore::SVGDescElement::SVGDescElement):
2134         * svg/SVGDescElement.h:
2135         * svg/SVGDescElement.idl:
2136         * svg/SVGElement.cpp:
2137         (WebCore::mapAttributeToCSSProperty):
2138         (WebCore::cssPropertyToTypeMap):
2139         (WebCore::SVGElement::SVGElement):
2140         (WebCore::SVGElement::~SVGElement):
2141         (WebCore::SVGElement::removedFrom):
2142         (WebCore::SVGElement::parseAttribute):
2143         (WebCore::SVGElement::animatedPropertyTypeForAttribute):
2144         (WebCore::collectInstancesForSVGElement):
2145         (WebCore::SVGElement::isAnimatableAttribute):
2146         (WebCore::SVGElement::title):
2147         (WebCore::SVGElement::rendererIsNeeded):
2148         (WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
2149         (WebCore::SVGElement::isAnimatableCSSProperty):
2150         (WebCore::SVGElement::isPresentationAttribute):
2151         (WebCore::SVGElement::collectStyleForPresentationAttribute):
2152         (WebCore::SVGElement::isKnownAttribute):
2153         (WebCore::SVGElement::svgAttributeChanged):
2154         (WebCore::SVGElement::insertedInto):
2155         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
2156         (WebCore::SVGElement::childrenChanged):
2157         (WebCore::SVGElement::getPresentationAttribute):
2158         (WebCore::SVGElement::instanceUpdatesBlocked):
2159         (WebCore::SVGElement::setInstanceUpdatesBlocked):
2160         (WebCore::SVGElement::localCoordinateSpaceTransform):
2161         (WebCore::SVGElement::updateRelativeLengthsInformation):
2162         (WebCore::SVGElement::isMouseFocusable):
2163         (WebCore::SVGElement::isKeyboardFocusable):
2164         * svg/SVGElement.h:
2165         (WebCore::SVGElement::supportsMarkers):
2166         (WebCore::SVGElement::hasRelativeLengths):
2167         (WebCore::SVGElement::needsPendingResourceHandling):
2168         (WebCore::SVGElement::selfHasRelativeLengths):
2169         (WebCore::SVGElement::updateRelativeLengthsInformation):
2170         * svg/SVGElement.idl:
2171         * svg/SVGElementInstance.cpp:
2172         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
2173         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
2174         * svg/SVGElementInstance.h:
2175         * svg/SVGFEBlendElement.idl:
2176         * svg/SVGFEColorMatrixElement.idl:
2177         * svg/SVGFEComponentTransferElement.idl:
2178         * svg/SVGFECompositeElement.idl:
2179         * svg/SVGFEConvolveMatrixElement.idl:
2180         * svg/SVGFEDiffuseLightingElement.idl:
2181         * svg/SVGFEDisplacementMapElement.idl:
2182         * svg/SVGFEDropShadowElement.idl:
2183         * svg/SVGFEFloodElement.idl:
2184         * svg/SVGFEGaussianBlurElement.idl:
2185         * svg/SVGFEImageElement.idl:
2186         * svg/SVGFELightElement.h:
2187         * svg/SVGFEMergeElement.idl:
2188         * svg/SVGFEMergeNodeElement.h:
2189         * svg/SVGFEMorphologyElement.idl:
2190         * svg/SVGFEOffsetElement.idl:
2191         * svg/SVGFESpecularLightingElement.idl:
2192         * svg/SVGFETileElement.idl:
2193         * svg/SVGFETurbulenceElement.idl:
2194         * svg/SVGFilterElement.cpp:
2195         (WebCore::SVGFilterElement::SVGFilterElement):
2196         (WebCore::SVGFilterElement::parseAttribute):
2197         (WebCore::SVGFilterElement::svgAttributeChanged):
2198         (WebCore::SVGFilterElement::childrenChanged):
2199         * svg/SVGFilterElement.h:
2200         * svg/SVGFilterElement.idl:
2201         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2202         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
2203         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
2204         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
2205         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
2206         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
2207         * svg/SVGFilterPrimitiveStandardAttributes.h:
2208         * svg/SVGFontElement.cpp:
2209         (WebCore::SVGFontElement::SVGFontElement):
2210         * svg/SVGFontElement.h:
2211         * svg/SVGFontFaceElement.cpp:
2212         * svg/SVGFontFaceElement.h:
2213         * svg/SVGFontFaceFormatElement.h:
2214         * svg/SVGFontFaceNameElement.h:
2215         * svg/SVGFontFaceSrcElement.h:
2216         * svg/SVGFontFaceUriElement.h:
2217         * svg/SVGGElement.cpp:
2218         (WebCore::SVGGElement::rendererIsNeeded):
2219         * svg/SVGGlyphElement.cpp:
2220         (WebCore::SVGGlyphElement::SVGGlyphElement):
2221         (WebCore::SVGGlyphElement::parseAttribute):
2222         (WebCore::SVGGlyphElement::insertedInto):
2223         (WebCore::SVGGlyphElement::removedFrom):
2224         * svg/SVGGlyphElement.h:
2225         * svg/SVGGlyphRefElement.cpp:
2226         (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
2227         (WebCore::SVGGlyphRefElement::parseAttribute):
2228         * svg/SVGGlyphRefElement.h:
2229         * svg/SVGGlyphRefElement.idl:
2230         * svg/SVGGradientElement.cpp:
2231         (WebCore::SVGGradientElement::SVGGradientElement):
2232         (WebCore::SVGGradientElement::parseAttribute):
2233         (WebCore::SVGGradientElement::svgAttributeChanged):
2234         (WebCore::SVGGradientElement::childrenChanged):
2235         * svg/SVGGradientElement.h:
2236         * svg/SVGGradientElement.idl:
2237         * svg/SVGGraphicsElement.cpp:
2238         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
2239         (WebCore::SVGGraphicsElement::parseAttribute):
2240         (WebCore::SVGGraphicsElement::svgAttributeChanged):
2241         * svg/SVGGraphicsElement.h:
2242         * svg/SVGGraphicsElement.idl:
2243         * svg/SVGLocatable.cpp:
2244         (WebCore::SVGLocatable::computeCTM):
2245         * svg/SVGMPathElement.h:
2246         * svg/SVGMarkerElement.cpp:
2247         (WebCore::SVGMarkerElement::SVGMarkerElement):
2248         (WebCore::SVGMarkerElement::parseAttribute):
2249         (WebCore::SVGMarkerElement::svgAttributeChanged):
2250         (WebCore::SVGMarkerElement::childrenChanged):
2251         * svg/SVGMarkerElement.h:
2252         * svg/SVGMarkerElement.idl:
2253         * svg/SVGMaskElement.cpp:
2254         (WebCore::SVGMaskElement::SVGMaskElement):
2255         (WebCore::SVGMaskElement::parseAttribute):
2256         (WebCore::SVGMaskElement::svgAttributeChanged):
2257         (WebCore::SVGMaskElement::childrenChanged):
2258         * svg/SVGMaskElement.h:
2259         * svg/SVGMaskElement.idl:
2260         * svg/SVGMetadataElement.h:
2261         * svg/SVGMissingGlyphElement.cpp:
2262         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
2263         * svg/SVGMissingGlyphElement.h:
2264         * svg/SVGMissingGlyphElement.idl:
2265         * svg/SVGPatternElement.cpp:
2266         (WebCore::SVGPatternElement::SVGPatternElement):
2267         (WebCore::SVGPatternElement::parseAttribute):
2268         (WebCore::SVGPatternElement::svgAttributeChanged):
2269         (WebCore::SVGPatternElement::childrenChanged):
2270         * svg/SVGPatternElement.h:
2271         * svg/SVGPatternElement.idl:
2272         * svg/SVGScriptElement.h:
2273         * svg/SVGStopElement.cpp:
2274         (WebCore::SVGStopElement::SVGStopElement):
2275         (WebCore::SVGStopElement::parseAttribute):
2276         (WebCore::SVGStopElement::svgAttributeChanged):
2277         * svg/SVGStopElement.h:
2278         * svg/SVGStopElement.idl:
2279         * svg/SVGStyleElement.h:
2280         * svg/SVGStyledElement.cpp: Removed.
2281         * svg/SVGStyledElement.h: Removed.
2282         * svg/SVGStyledElement.idl: Removed.
2283         * svg/SVGSymbolElement.cpp:
2284         (WebCore::SVGSymbolElement::SVGSymbolElement):
2285         (WebCore::SVGSymbolElement::parseAttribute):
2286         (WebCore::SVGSymbolElement::svgAttributeChanged):
2287         * svg/SVGSymbolElement.h:
2288         * svg/SVGSymbolElement.idl:
2289         * svg/SVGTRefElement.cpp:
2290         (WebCore::SVGTRefElement::insertedInto):
2291         (WebCore::SVGTRefElement::removedFrom):
2292         * svg/SVGTitleElement.cpp:
2293         (WebCore::SVGTitleElement::SVGTitleElement):
2294         (WebCore::SVGTitleElement::insertedInto):
2295         * svg/SVGTitleElement.h:
2296         * svg/SVGTitleElement.idl:
2297         * svg/SVGTransformable.cpp:
2298         * svg/SVGUseElement.cpp:
2299         (WebCore::SVGUseElement::selfHasRelativeLengths):
2300         * svg/SVGViewElement.cpp:
2301         (WebCore::SVGViewElement::SVGViewElement):
2302         (WebCore::SVGViewElement::parseAttribute):
2303         * svg/SVGViewElement.h:
2304         * svg/animation/SVGSMILElement.h:
2305         * svg/graphics/filters/SVGFEImage.cpp:
2306         (WebCore::FEImage::platformApplySoftware):
2307
2308 2013-08-22  Andreas Kling  <akling@apple.com>
2309
2310         FrameLoader::history() should return a reference.
2311         <https://webkit.org/b/120163>
2312
2313         Reviewed by Anders Carlsson.
2314
2315         Rehued by Anders Carlsson.
2316
2317         FrameLoader::m_history is never null, so make history() return a reference.
2318         Also made HistoryController::m_frame a reference, since HistoryController's
2319         lifetime is tied to FrameLoader, which is tied to the Frame.
2320
2321 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
2322
2323         Reloading this video test shows garbage briefly
2324         https://bugs.webkit.org/show_bug.cgi?id=119377
2325
2326         Reviewed by Anders Carlson.
2327
2328         RenderVideo should not claim that it's foreground is opaque
2329         unless it has a video frame to display.
2330
2331         * rendering/RenderVideo.cpp:
2332         (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
2333
2334 2013-08-22  Andreas Kling  <akling@apple.com>
2335
2336         Remove accidental cruft from r154449.
2337
2338         * rendering/RenderWidget.cpp:
2339         (WebCore::RenderWidget::destroy):
2340
2341 2013-08-22  Andreas Kling  <akling@apple.com>
2342
2343         FrameLoader: frame() and client() should return references.
2344         <https://webkit.org/b/120158>
2345
2346         Reviewed by Anders Carlsson.
2347
2348         These two are never null so change them to return references.
2349
2350 2013-08-22  Andrei Bucur  <abucur@adobe.com>
2351
2352         RenderNamedFlowThread should not create NodeRenderingContext objects
2353         https://bugs.webkit.org/show_bug.cgi?id=119923
2354
2355         Reviewed by Antti Koivisto.
2356
2357         Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
2358         Original patch by Elliott Sprehn.
2359
2360         RenderNamedFlowThread should not create NodeRenderingContext objects
2361
2362         RenderNamedFlowThread is using NodeRenderingContext to get the original
2363         parent renderer, but should just be using NodeRenderingTraversal::parent
2364         instead (which is what NodeRenderingContext does internally anyway).
2365
2366         Tests: No change in functionality. No new tests.
2367
2368         * rendering/RenderNamedFlowThread.cpp:
2369         (WebCore::RenderNamedFlowThread::isChildAllowed):
2370
2371 2013-08-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2372
2373         Introduce a SVGUnknownElement class for unknown SVG elements
2374         https://bugs.webkit.org/show_bug.cgi?id=120155
2375
2376         Reviewed by Andreas Kling.
2377
2378         Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
2379         We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
2380         - Unknown Elements in SVG namespace
2381         - Registered custom tag elements in SVG namespace:
2382           http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
2383
2384         As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
2385         it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
2386         SVGStyledElement into SVGElement.
2387
2388         This is a pre-requirement to merging SVGStyledElement into SVGElement.
2389
2390         No new tests, no behavior change.
2391
2392         * GNUmakefile.list.am:
2393         * Target.pri:
2394         * WebCore.vcxproj/WebCore.vcxproj:
2395         * WebCore.vcxproj/WebCore.vcxproj.filters:
2396         * dom/CustomElementConstructor.cpp:
2397         (WebCore::CustomElementConstructor::createElementInternal):
2398         * dom/make_names.pl:
2399         (defaultParametersHash):
2400         (printJSElementIncludes):
2401         (printWrapperFunctions):
2402         (printWrapperFactoryCppFile):
2403         * svg/SVGElement.cpp:
2404         * svg/SVGElement.h:
2405         * svg/SVGUnknownElement.h: Added.
2406         (WebCore::SVGUnknownElement::create):
2407         (WebCore::SVGUnknownElement::SVGUnknownElement):
2408         * svg/svgtags.in:
2409
2410 2013-08-22  Rob Buis  <rwlbuis@webkit.org>
2411
2412         REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter
2413         https://bugs.webkit.org/show_bug.cgi?id=118056
2414
2415         Reviewed by Ryosuke Niwa.
2416
2417         The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
2418         includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
2419         This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
2420         assertion, which the testcase verifies.
2421         To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
2422
2423         Tests: svg/custom/document-all-includes-svg.html
2424                svg/custom/window-named-item-lookup.html
2425
2426         * html/HTMLCollection.cpp:
2427         (WebCore::isMatchingElement):
2428         (WebCore::HTMLCollection::updateNameCache):
2429
2430 2013-08-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2431
2432         Introduce toSVGRadialGradientElement(), and use it
2433         https://bugs.webkit.org/show_bug.cgi?id=120153
2434
2435         Reviewed by Andreas Kling.
2436
2437         As a step to clean-up static_cast<SVGXXX>, toSVGRadialGradientElement() is added to clean-up
2438         static_cast<SVGRadialGradientElement*>.
2439
2440         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
2441         (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
2442         * rendering/svg/SVGRenderTreeAsText.cpp:
2443         (WebCore::writeSVGResourceContainer):
2444         * svg/SVGRadialGradientElement.cpp:
2445         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2446         * svg/SVGRadialGradientElement.h:
2447         (WebCore::toSVGRadialGradientElement):
2448
2449 2013-08-22  Renata Hodovan  <reni@webkit.org>
2450
2451         ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
2452         https://bugs.webkit.org/show_bug.cgi?id=119672
2453
2454         Reviewed by Darin Adler.
2455
2456         The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
2457         to default 0. This way we have to check its existence before the usage.
2458
2459         Test: editing/execCommand/extracted_style_assert.html
2460
2461         * editing/ApplyStyleCommand.cpp:
2462         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
2463
2464 2013-08-21  Commit Queue  <commit-queue@webkit.org>
2465
2466         Unreviewed, rolling out r154416.
2467         http://trac.webkit.org/changeset/154416
2468         https://bugs.webkit.org/show_bug.cgi?id=120147
2469
2470         Broke Windows builds (Requested by rniwa on #webkit).
2471
2472         * WebCore.vcxproj/WebCoreGenerated.make:
2473         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
2474         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
2475         * WebCore.vcxproj/build-generated-files.sh:
2476         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2477         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2478
2479 2013-08-21  Ryuan Choi  <ryuan.choi@samsung.com>
2480
2481         [EFL] Unreviewed build fix after r154430.
2482
2483         * rendering/style/StyleRareNonInheritedData.cpp:
2484         (WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
2485
2486 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
2487
2488         Setting -webkit-filter: in :active selector causes failure to redraw
2489         https://bugs.webkit.org/show_bug.cgi?id=120135
2490
2491         Reviewed by Jer Noble.
2492         
2493         When removing a filter on an inline child of a compositing layer,
2494         the inline loses its RenderLayer and compositing layer, but we fail to
2495         repaint the compositing layer that the inline is now painting into.
2496         
2497         This worked correctly for opacity, because opacity toggles cause
2498         layouts (which then paint the correct layer), so do the same for filters.
2499
2500         Test: css3/filters/remove-filter-repaint.html
2501
2502         * rendering/style/RenderStyle.cpp:
2503         (WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
2504         between having filters and not. Drive-by cleanup, making use of new convenience
2505         function for hasOpacity().
2506         * rendering/style/StyleRareNonInheritedData.cpp:
2507         (WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
2508         filters.
2509         * rendering/style/StyleRareNonInheritedData.h:
2510         (WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
2511         returns true if opacity is < 1.
2512
2513 2013-08-21  Gavin Barraclough  <barraclough@apple.com>
2514
2515         https://bugs.webkit.org/show_bug.cgi?id=120139
2516         PropertyDescriptor argument to define methods should be const
2517
2518         Rubber stamped by Sam Weinig.
2519
2520         This should never be modified, and this way we can use rvalues.
2521
2522         * bindings/js/JSDOMWindowCustom.cpp:
2523         (WebCore::JSDOMWindow::defineOwnProperty):
2524         * bindings/js/JSLocationCustom.cpp:
2525         (WebCore::JSLocation::defineOwnProperty):
2526         (WebCore::JSLocationPrototype::defineOwnProperty):
2527         * bindings/scripts/CodeGeneratorJS.pm:
2528         (GenerateHeader):
2529             - make PropertyDescriptor const
2530
2531 2013-08-21  Jacky Jiang  <zhajiang@blackberry.com>
2532
2533         <https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
2534
2535         Reviewed by Yong Li.
2536         Internally reviewed by Arvid Nilsson.
2537
2538         JIRA 481356
2539         The origin of indexOfTile(origin) is incorrect in these two places. For
2540         example, if the maxXMaxYCorner of the rect is (768, 768), there can be
2541         three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
2542         unnecessary texture jobs and waste memory.
2543         The origin should be the top left of the bottom right pixel of a rect.
2544
2545         * platform/graphics/blackberry/LayerTiler.cpp:
2546         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2547         (WebCore::LayerTiler::processTextureJob):
2548
2549 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
2550
2551         <https://webkit.org/b/116901> ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter
2552
2553         Reviewed by Beth Dakin.
2554         
2555         In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
2556         needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
2557         over the RenderLayer tree.
2558         
2559         However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
2560         bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
2561         which requires that style changed on the layer itself.
2562         
2563         Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
2564
2565         Wasn't able to easily get a reduced testcase.
2566
2567         * rendering/RenderLayerCompositor.cpp:
2568         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2569
2570 2013-08-21  Alex Christensen  <achristensen@apple.com>
2571
2572         <https://webkit.org/b/120137> Separating Win32 and Win64 builds.
2573
2574         Reviewed by Brent Fulgham.
2575
2576         * WebCore.vcxproj/WebCoreGenerated.make:
2577         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
2578         Pass PlatformArchitecture as a command line parameter to bash scripts
2579         and use PlatformArchitecture to determine which directory to delete
2580         while cleaning (obj32 or obj64).
2581         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
2582         Export PlatformArchitecture to be used by make and cmd scripts.
2583         * WebCore.vcxproj/build-generated-files.sh:
2584         Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
2585         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2586         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2587         Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
2588
2589 2013-08-21  Tim Horton  <timothy_horton@apple.com>
2590
2591         revalidateTiles and ensureTilesForRect can share a lot of code
2592         https://bugs.webkit.org/show_bug.cgi?id=119282
2593
2594         Missed the review comments, whoops.
2595
2596         * platform/graphics/ca/mac/TileController.h:
2597         * platform/graphics/ca/mac/TileController.mm:
2598         (WebCore::TileController::prepopulateRect):
2599         (WebCore::TileController::revalidateTiles):
2600         (WebCore::TileController::ensureTilesForRect):
2601
2602 2013-08-21  Andreas Kling  <akling@apple.com>
2603
2604         <https://webkit.org/b/120115> SVG elements always have custom style resolve callbacks.
2605
2606         Reviewed by Antti Koivisto.
2607
2608         Simplify SVGElement construction by making them opt in to custom style resolve callbacks
2609         by default, and removing the ability to pass a custom ConstructionType to some subclass
2610         constructors.
2611
2612         * dom/Node.h:
2613
2614             Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
2615
2616         * svg/SVGElement.cpp:
2617         (WebCore::SVGElement::SVGElement):
2618         * svg/SVGElement.h:
2619         * svg/SVGGElement.cpp:
2620         (WebCore::SVGGElement::SVGGElement):
2621         * svg/SVGGElement.h:
2622         * svg/SVGGraphicsElement.cpp:
2623         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
2624         * svg/SVGGraphicsElement.h:
2625         * svg/SVGImageElement.cpp:
2626         (WebCore::SVGImageElement::SVGImageElement):
2627         * svg/SVGStyledElement.cpp:
2628         (WebCore::SVGStyledElement::SVGStyledElement):
2629         * svg/SVGStyledElement.h:
2630
2631             Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
2632             Also remove unnecessary ConstructionType argument from subclasses since nobody
2633             overrides it and everyone just uses CreateSVGElement.
2634
2635 2013-08-21  Tim Horton  <timothy_horton@apple.com>
2636
2637         revalidateTiles and ensureTilesForRect can share a lot of code
2638         https://bugs.webkit.org/show_bug.cgi?id=119282
2639
2640         Reviewed by Simon Fraser.
2641
2642         No new tests, just a refactoring.
2643
2644         The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
2645
2646         * platform/graphics/ca/mac/TileController.h:
2647         Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
2648         be primary coverage tiles or secondary out-of-view tiles.
2649
2650         * platform/graphics/ca/mac/TileController.mm:
2651         (WebCore::TileController::prepopulateRect):
2652         Move the code to see if we already have the requisite tiles in the
2653         primary coverage rect, as well as our call to updateTileCoverageMap,
2654         out into prepopulateRect, to generalize ensureTilesForRect.
2655
2656         (WebCore::TileController::revalidateTiles):
2657         Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
2658
2659         (WebCore::TileController::ensureTilesForRect):
2660         Make ensureTilesForRect return the rect that it created tiles for, and only put
2661         tiles in a cohort if we're creating secondary tiles.
2662
2663 2013-08-21  Tim Horton  <timothy_horton@apple.com>
2664
2665         isReplacementObscured is wrong when the indicator is clipped by an iframe
2666         https://bugs.webkit.org/show_bug.cgi?id=120031
2667         <rdar://problem/14606819>
2668
2669         Reviewed by Simon Fraser.
2670
2671         Hit-test for plugin obscurity in the root document. To do this, we also need
2672         to convert the indicator rectangle into root view coordinates before
2673         hit testing its edges.
2674
2675         This resolves the case where an iframe which clips its content was reporting
2676         the indicator as not obscured, despite the fact that it was obscured from the
2677         point of view of the user.
2678
2679         Updated test plugins/unavailable-plugin-indicator-obscurity.html
2680
2681         * rendering/RenderEmbeddedObject.cpp:
2682         (WebCore::RenderEmbeddedObject::isReplacementObscured):
2683
2684 2013-08-21  Andreas Kling  <akling@apple.com>
2685
2686         <https://webkit.org/b/120132> Frame::navigationScheduler() should return a reference.
2687
2688         Reviewed by Anders Carlzon.
2689
2690         Frame::m_navigationScheduler is an inline member, not a pointer.
2691
2692 2013-08-21  Tim Horton  <timothy_horton@apple.com>
2693
2694         REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit).
2695         https://bugs.webkit.org/show_bug.cgi?id=120129
2696
2697         Rolling out http://trac.webkit.org/changeset/154399.
2698
2699         * rendering/RenderBlock.cpp:
2700         * rendering/RenderBlock.h:
2701         * rendering/RenderBlockLineLayout.cpp:
2702         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2703         * rendering/RenderBox.h:
2704
2705 2013-08-21  Andreas Kling  <akling@apple.com>
2706
2707         <https://webkit.org/b/120118> Frame::animation() should return a reference.
2708
2709         Reviewed by Anders Carlsson.
2710
2711         Frame::m_animationController is never null.
2712         Also changed RenderObject::animation() to return a reference since it's just a wrapper
2713         around RenderObject::frame()->animation() with no null checking of frame().
2714
2715 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
2716
2717         Allow opacity to apply to custom scrollbars
2718         https://bugs.webkit.org/show_bug.cgi?id=120104
2719
2720         Reviewed by David Hyatt.
2721         
2722         Opacity was ignored custom scrollbar pseudoelements because custom scrollbar
2723         renderers never create layers, and opacity is normally handled by the RenderLayer code.
2724         
2725         Fix by having RenderScrollbarTheme and RenderScrollbarPart do the transparency
2726         layers necessary for opacity. RenderScrollbarPart handles opacity for individual
2727         parts.
2728         
2729         Because ScrollbarThemeComposite::paint() renders the parts on after another (with
2730         no nesting), opacity handling for the entire scrollbar needs special-casing.
2731         This is done by willPaintScrollbar()/didPaintScrollbar() on the theme.
2732         RenderScrollbarTheme consults the opacity the scrollbar (which we get from
2733         the ScrollbarBGPart renderer) to decide whether to set up a transparency layer.
2734
2735         Test: scrollbars/scrollbar-parts-opacity.html
2736
2737         * platform/ScrollbarThemeComposite.cpp:
2738         (WebCore::ScrollbarThemeComposite::paint):
2739         * platform/ScrollbarThemeComposite.h:
2740         (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
2741         (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
2742         * rendering/RenderScrollbar.cpp:
2743         (WebCore::RenderScrollbar::opacity):
2744         * rendering/RenderScrollbar.h:
2745         * rendering/RenderScrollbarPart.cpp:
2746         (WebCore::RenderScrollbarPart::paintIntoRect):
2747         * rendering/RenderScrollbarTheme.cpp:
2748         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
2749         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
2750         * rendering/RenderScrollbarTheme.h:
2751
2752 2013-08-21  Robert Hogan  <robert@webkit.org>
2753
2754         REGRESSION(r127163): Respect clearance set on ancestors when placing floats
2755         https://bugs.webkit.org/show_bug.cgi?id=119979
2756
2757         Reviewed by David Hyatt.
2758
2759         If a float has a self-collapsing ancestor with clearance then it needs to respect
2760         that clearance when placing itself on the line.
2761
2762         Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendant.html
2763
2764         * rendering/RenderBlock.cpp:
2765         (WebCore::RenderBlock::marginOffsetForSelfCollapsingBlock):
2766         * rendering/RenderBlock.h:
2767         * rendering/RenderBlockLineLayout.cpp:
2768         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2769         * rendering/RenderBox.h:
2770         (WebCore::RenderBox::previousInFlowSiblingBox):
2771
2772 2013-08-21  Brent Fulgham  <bfulgham@apple.com>
2773
2774         <https://webkit.org/b/120113> [Windows] Enable CSS_IMAGE_SET
2775
2776         Reviewed by Anders Carlsson.
2777
2778         We can now activate:
2779         fast/css/image-set-parsing.html
2780         fast/css/image-set-parsing-invalid.html
2781
2782         * WebCore.vcxproj/WebCore.vcxproj: Add missing image set implementation files.
2783         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2784         * css/CSSAllInOne.cpp: Add missing CSSImageSetValue.cpp
2785         * rendering/style/StyleAllInOne.cpp: Add missing StyeCachedImageSet.cpp
2786
2787 2013-08-21  Robert Hogan  <robert@webkit.org>
2788
2789         In RenderTableCell::paintCollapsedBorders() check surrounding cells using physical rather than logical direction
2790         https://bugs.webkit.org/show_bug.cgi?id=120074
2791
2792         Reviewed by David Hyatt.
2793
2794         No new tests, covered by existing tests.
2795
2796         The functions cellAbove(), cellBelow() etc. check the logical rather than the physical direction but they're being
2797         used to decide the painting of the physical borders of the cell. As we paint all four sides of every cell, and
2798         the borders of adjoining cells twice over, this has no impact on painting currently but making the check consistent
2799         in its treatment of physical and logical direction will help with webkit.org/b/119759 and make the code less confusing
2800         to the next guy.
2801
2802         * rendering/RenderTableCell.cpp:
2803         (WebCore::RenderTableCell::cellAtLeft):
2804         (WebCore::RenderTableCell::cellAtRight):
2805         (WebCore::RenderTableCell::cellAtTop):
2806         (WebCore::RenderTableCell::cellAtBottom):
2807         (WebCore::RenderTableCell::paintCollapsedBorders):
2808         * rendering/RenderTableCell.h:
2809
2810 2013-08-21  Róbert Sipka  <sipka@inf.u-szeged.hu>
2811
2812         <https://webkit.org/b/120109> [curl] only include WebCoreBundleWin on Windows
2813
2814         Reviewed by Brent Fulgham.
2815
2816         The WebCoreBundleWin is a windows specific file, it is only needed on Windows.
2817
2818         * platform/network/curl/ResourceHandleManager.cpp:
2819
2820 2013-08-21  Jae Hyun Park  <jae.park@company100.net>
2821
2822         [Qt] Remove unused code path in PluginView
2823         https://bugs.webkit.org/show_bug.cgi?id=113173
2824
2825         Reviewed by Anders Carlsson.
2826
2827         m_platformLayer in PluginView has been removed in r121710, but there are
2828         still some leftover code path related to m_platformLayer. This patch
2829         removes unused code path.
2830
2831         No new tests, removing unused code paths.
2832
2833         * plugins/PluginView.h:
2834         (PluginView):
2835         * plugins/qt/PluginViewQt.cpp:
2836         (WebCore::PluginView::updatePluginWidget):
2837         (WebCore::PluginView::paint):
2838
2839 2013-08-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2840
2841         Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled 
2842         https://bugs.webkit.org/show_bug.cgi?id=100050
2843
2844         Reviewed by Antti Koivisto.
2845
2846         Always let WidthIterator iterate over an entire TextRun to avoid problems
2847         with pixel rounding or shaping on partial runs.
2848
2849         This fix is necessary for Qt because the complex font-path can not disable
2850         shaping, leading to the complex path painting slighly different from the
2851         fast path, which messes up selection painting.
2852
2853         No change in functionality, no new tests.
2854
2855         * platform/graphics/Font.cpp:
2856         (WebCore::Font::drawText):
2857         (WebCore::Font::drawEmphasisMarks):
2858         (WebCore::Font::selectionRectForText):
2859         (WebCore::Font::offsetForPosition):
2860         * platform/graphics/FontFastPath.cpp:
2861         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
2862         (WebCore::Font::selectionRectForSimpleText):
2863         (WebCore::Font::offsetForPositionForSimpleText):
2864         * platform/graphics/GlyphBuffer.h:
2865         (WebCore::GlyphBuffer::add):
2866         (GlyphBuffer):
2867         * platform/graphics/WidthIterator.cpp:
2868         (WebCore::WidthIterator::advanceInternal):
2869         * platform/graphics/WidthIterator.h:
2870         (WidthIterator): Removed now unused advanceOneCharacter method.
2871
2872 2013-08-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2873
2874         Harden RenderBox::canBeScrolledAndHasScrollableArea logic
2875         https://bugs.webkit.org/show_bug.cgi?id=104373
2876
2877         Reviewed by Simon Fraser.
2878
2879         Previously if a say div has a overflown content on 'y' but is
2880         styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
2881         would still return true. It interfers, among other things, with the way
2882         autoscroll works.
2883
2884         Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
2885         scrollability in a given axis (x or y); They are used when checking if a given box is in
2886         fact programatically scrollable.
2887
2888         Test: fast/events/autoscroll-overflow-hidden-longhands.html
2889
2890         WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
2891         in that sense.
2892
2893         * rendering/RenderBox.cpp:
2894         (WebCore::RenderBox::canBeProgramaticallyScrolled):
2895         * rendering/RenderBox.h:
2896         (WebCore::RenderBox::hasScrollableOverflowX):
2897         (WebCore::RenderBox::hasScrollableOverflowY):
2898
2899 2013-08-19  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2900
2901         Text dragging can scroll overflow:hidden boxes
2902         https://bugs.webkit.org/show_bug.cgi?id=119760
2903
2904         Reviewed by Darin Adler.
2905
2906         Consider the case of the following HTML:
2907         <div style="overflow:hidden; width: 100px; height: 100px" >
2908           <input id="input" type="text" size=10 value="any text here!"/>
2909           <button style="position:relative; top: 100px; left: 100px"/>
2910         </div>
2911
2912         If ones starts a text selection by dragging the mouse from within the input
2913         field, and continues to drag beyong the outer div boundary, the latter will
2914         be scrolled no matter its overflow:hidden style.
2915         That happens because when the autoscroll has started, it gets propagated up
2916         to the current layer's parent layer, instead of the to current layer's enclosing
2917         scrollable layer.
2918
2919         Patch fixes the issue by hardening the way scrolling is
2920         propagated upwards when autoscroll is being performed.
2921
2922         RenderLayer::enclosingScrollableLayer method also got rewritten
2923         in terms of RenderLayer tree traversing, instead of RenderObject tree.
2924         The rewrite adds support for cross frame upwards traversal.
2925
2926         Test: fast/events/autoscroll-upwards-propagation.html
2927
2928         * rendering/RenderLayer.cpp:
2929         (WebCore::parentLayerCrossFrame):
2930         (WebCore::RenderLayer::enclosingScrollableLayer):
2931         (WebCore::RenderLayer::scrollRectToVisible):
2932
2933 2013-08-20  Jer Noble  <jer.noble@apple.com>
2934
2935         <https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
2936
2937         Reviewed by Eric Carlson.
2938
2939         Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
2940         rateChanged() notifications.
2941
2942         * html/HTMLMediaElement.cpp:
2943         (WebCore::HTMLMediaElement::clearMediaPlayer):
2944         (WebCore::HTMLMediaElement::stop):
2945
2946 2013-08-20  David Barr <davidbarr@chromium.org>, Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2947
2948         <https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
2949
2950         Reviewed by Beth Dakin.
2951
2952         In support of ongoing css3-images image-orientation implementation. This patch passes
2953         an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
2954         can know information of image orientation by the argument.
2955
2956         Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
2957
2958         * html/HTMLCanvasElement.cpp:
2959         (WebCore::HTMLCanvasElement::paint):
2960         * html/canvas/CanvasRenderingContext2D.cpp:
2961         (WebCore::CanvasRenderingContext2D::drawImage):
2962         (WebCore::drawImageToContext):
2963         * platform/graphics/ImageOrientation.h: Add setter functions.
2964         (WebCore::ImageOrientationDescription::setRespectImageOrientation):
2965         (WebCore::ImageOrientationDescription::setImageOrientationEnum):
2966         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2967         (WebCore::BitmapTextureImageBuffer::updateContents):
2968         * rendering/RenderBoxModelObject.cpp:
2969         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2970         * rendering/RenderImage.cpp:
2971         (WebCore::RenderImage::paintReplaced):
2972         (WebCore::RenderImage::paintIntoRect):
2973         * rendering/RenderSnapshottedPlugIn.cpp:
2974         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2975
2976 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
2977
2978         https://bugs.webkit.org/show_bug.cgi?id=120093
2979         Remove getOwnPropertyDescriptor trap
2980
2981         Reviewed by Geoff Garen.
2982
2983         All implementations of this method are now called via the method table, and equivalent in behaviour.
2984         Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
2985
2986         * WebCore.exp.in:
2987         * bindings/js/JSDOMWindowCustom.cpp:
2988         * bindings/scripts/CodeGeneratorJS.pm:
2989         (GenerateHeader):
2990         (GenerateImplementation):
2991         (GenerateConstructorDeclaration):
2992         (GenerateConstructorHelperMethods):
2993         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2994         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2995         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2996         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2997         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2998         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2999         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3000         * bindings/scripts/test/JS/JSTestEventTarget.h:
3001         * bindings/scripts/test/JS/JSTestException.cpp:
3002         * bindings/scripts/test/JS/JSTestException.h:
3003         * bindings/scripts/test/JS/JSTestInterface.cpp:
3004         * bindings/scripts/test/JS/JSTestInterface.h:
3005         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3006         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3007         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3008         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3009         * bindings/scripts/test/JS/JSTestNode.cpp:
3010         * bindings/scripts/test/JS/JSTestNode.h:
3011         * bindings/scripts/test/JS/JSTestObj.cpp:
3012         * bindings/scripts/test/JS/JSTestObj.h:
3013         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3014         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3015         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3016         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3017         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3018         * bindings/scripts/test/JS/JSTestTypedefs.h:
3019         * bridge/jsc/BridgeJSC.h:
3020         (JSC::Bindings::Instance::getOwnPropertySlot):
3021         * bridge/objc/objc_runtime.h:
3022         * bridge/objc/objc_runtime.mm:
3023         * bridge/runtime_array.cpp:
3024         * bridge/runtime_array.h:
3025         * bridge/runtime_method.cpp:
3026         * bridge/runtime_method.h:
3027         * bridge/runtime_object.cpp:
3028         * bridge/runtime_object.h:
3029             - remove getOwnPropertyDescriptor
3030
3031 2013-08-20  Antti Koivisto  <antti@apple.com>
3032
3033         <https://webkit.org/b/120071> Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
3034
3035         Reviewed by Darin Adler.
3036
3037         This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
3038
3039         * dom/ContainerNode.h:
3040         (WebCore::ContainerNode::childShouldCreateRenderer):
3041         * dom/Element.cpp:
3042         (WebCore::Element::childShouldCreateRenderer):
3043         * dom/Element.h:
3044         * dom/NodeRenderingContext.cpp:
3045         (WebCore::NodeRenderingContext::shouldCreateRenderer):
3046         * dom/NodeRenderingContext.h:
3047         
3048             Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
3049             Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
3050
3051         * dom/ShadowRoot.h:
3052         (WebCore::hasShadowRootParent):
3053         * html/HTMLDetailsElement.cpp:
3054         (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
3055         * html/HTMLDetailsElement.h:
3056         * html/HTMLFormControlElement.cpp:
3057         (WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
3058         * html/HTMLFormControlElement.h:
3059         * html/HTMLMediaElement.cpp:
3060         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
3061         * html/HTMLMediaElement.h:
3062         * html/HTMLMeterElement.cpp:
3063         (WebCore::HTMLMeterElement::childShouldCreateRenderer):
3064         * html/HTMLMeterElement.h:
3065         * html/HTMLOptGroupElement.h:
3066         (WebCore::isHTMLOptGroupElement):
3067         * html/HTMLOptionElement.h:
3068         (WebCore::isHTMLOptionElement):
3069         * html/HTMLProgressElement.cpp:
3070         (WebCore::HTMLProgressElement::childShouldCreateRenderer):
3071         * html/HTMLProgressElement.h:
3072         * html/HTMLSelectElement.cpp:
3073         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
3074         * html/HTMLSelectElement.h:
3075         * html/HTMLSummaryElement.cpp:
3076         (WebCore::HTMLSummaryElement::childShouldCreateRenderer):
3077         * html/HTMLSummaryElement.h:
3078         * html/HTMLTextFormControlElement.cpp:
3079         (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
3080         (WebCore::enclosingTextFormControl):
3081         * html/HTMLTextFormControlElement.h:
3082         * html/ValidationMessage.cpp:
3083         (WebCore::ValidationMessage::shadowTreeContains):
3084         * html/ValidationMessage.h:
3085         * html/shadow/InsertionPoint.cpp:
3086         (WebCore::InsertionPoint::rendererIsNeeded):
3087         * html/shadow/InsertionPoint.h:
3088         (WebCore::isActiveInsertionPoint):
3089         
3090             Remove isShadowBoundary() as it was equivalent to isActive(). 
3091             Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
3092
3093         (WebCore::hasShadowRootOrActiveInsertionPointParent):
3094         
3095             Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
3096
3097         * svg/SVGAElement.cpp:
3098         (WebCore::SVGAElement::childShouldCreateRenderer):
3099         * svg/SVGAElement.h:
3100         * svg/SVGAltGlyphElement.cpp:
3101         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
3102         * svg/SVGAltGlyphElement.h:
3103         * svg/SVGDocument.cpp:
3104         (WebCore::SVGDocument::childShouldCreateRenderer):
3105         * svg/SVGDocument.h:
3106         * svg/SVGElement.cpp:
3107         (WebCore::SVGElement::childShouldCreateRenderer):
3108         * svg/SVGElement.h:
3109         * svg/SVGFilterElement.cpp:
3110         (WebCore::SVGFilterElement::childShouldCreateRenderer):
3111         * svg/SVGFilterElement.h:
3112         * svg/SVGFilterPrimitiveStandardAttributes.h:
3113         * svg/SVGForeignObjectElement.cpp:
3114         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
3115         * svg/SVGForeignObjectElement.h:
3116         * svg/SVGSVGElement.h:
3117         (WebCore::toSVGSVGElement):
3118         * svg/SVGSwitchElement.cpp:
3119         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
3120         * svg/SVGSwitchElement.h:
3121         * svg/SVGTRefElement.cpp:
3122         (WebCore::SVGTRefElement::childShouldCreateRenderer):
3123         * svg/SVGTRefElement.h:
3124         * svg/SVGTSpanElement.cpp:
3125         (WebCore::SVGTSpanElement::childShouldCreateRenderer):
3126         * svg/SVGTSpanElement.h:
3127         * svg/SVGTextElement.cpp:
3128         (WebCore::SVGTextElement::childShouldCreateRenderer):
3129         * svg/SVGTextElement.h:
3130         * svg/SVGTextPathElement.cpp:
3131         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
3132         * svg/SVGTextPathElement.h:
3133
3134 2013-08-20  Benjamin Poulain  <benjamin@webkit.org>
3135
3136         <https://webkit.org/b/120050> Don't bother using a Vector for the ouput of querySelector, just return the first element found
3137
3138         Reviewed by Ryosuke Niwa.
3139
3140         Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
3141         simply use a trait to define what to do in the loop.
3142
3143         * dom/SelectorQuery.cpp:
3144         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
3145         (WebCore::SelectorDataList::queryAll):
3146         (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
3147         (WebCore::SelectorDataList::queryFirst):
3148         (WebCore::SelectorDataList::executeFastPathForIdSelector):
3149         (WebCore::elementsForLocalName):
3150         (WebCore::anyElement):
3151         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
3152         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
3153         (WebCore::SelectorDataList::executeSingleSelectorData):
3154         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
3155         (WebCore::SelectorDataList::execute):
3156         * dom/SelectorQuery.h:
3157
3158 2013-08-20  Antti Koivisto  <antti@apple.com>
3159
3160         Rollout the previous patch for landing with the correct ChangeLog.
3161
3162 013-08-20  Jacky Jiang  <zhajiang@blackberry.com>
3163
3164         <https://webkit.org/b/120082> [BlackBerry] Remove unused previousTextureRect in LayerTiler
3165
3166         Reviewed by Rob Buis.
3167         Internally reviewed by Mike Lattanzio and Jakob Petsovits.
3168
3169         * platform/graphics/blackberry/LayerTiler.cpp:
3170         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
3171
3172 2013-08-20  Antti Koivisto  <antti@apple.com>
3173
3174         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
3175
3176         Reviewed by Darin Adler.
3177
3178         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
3179
3180         * dom/Element.cpp:
3181         (WebCore::Element::rendererIsNeeded):
3182         * dom/Element.h:
3183         * dom/NodeRenderingContext.cpp:
3184         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
3185         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
3186         * dom/PseudoElement.cpp:
3187         (WebCore::PseudoElement::rendererIsNeeded):
3188         * dom/PseudoElement.h:
3189         * html/HTMLAppletElement.cpp:
3190         (WebCore::HTMLAppletElement::rendererIsNeeded):
3191         * html/HTMLAppletElement.h:
3192         * html/HTMLElement.cpp:
3193         (WebCore::HTMLElement::rendererIsNeeded):
3194         * html/HTMLElement.h:
3195         * html/HTMLEmbedElement.cpp:
3196         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3197         * html/HTMLEmbedElement.h:
3198         * html/HTMLFormElement.cpp:
3199         (WebCore::HTMLFormElement::rendererIsNeeded):
3200         * html/HTMLFormElement.h:
3201         * html/HTMLFrameElement.cpp:
3202         (WebCore::HTMLFrameElement::rendererIsNeeded):
3203         * html/HTMLFrameElement.h:
3204         * html/HTMLFrameSetElement.cpp:
3205         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
3206         * html/HTMLFrameSetElement.h:
3207         * html/HTMLIFrameElement.cpp:
3208         (WebCore::HTMLIFrameElement::rendererIsNeeded):
3209         * html/HTMLIFrameElement.h:
3210         * html/HTMLInputElement.cpp:
3211         (WebCore::HTMLInputElement::rendererIsNeeded):
3212         * html/HTMLInputElement.h:
3213         * html/HTMLMediaElement.cpp:
3214         (WebCore::HTMLMediaElement::rendererIsNeeded):
3215         * html/HTMLMediaElement.h:
3216         * html/HTMLObjectElement.cpp:
3217         (WebCore::HTMLObjectElement::rendererIsNeeded):
3218         * html/HTMLObjectElement.h:
3219         * html/HTMLOptGroupElement.h:
3220         * html/HTMLOptionElement.h:
3221         * html/HTMLVideoElement.cpp:
3222         (WebCore::HTMLVideoElement::rendererIsNeeded):
3223         * html/HTMLVideoElement.h:
3224         * html/shadow/DetailsMarkerControl.cpp:
3225         (WebCore::DetailsMarkerControl::rendererIsNeeded):
3226         * html/shadow/DetailsMarkerControl.h:
3227         * html/shadow/InsertionPoint.cpp:
3228         (WebCore::InsertionPoint::rendererIsNeeded):
3229         * html/shadow/InsertionPoint.h:
3230         * html/shadow/MeterShadowElement.cpp:
3231         (WebCore::MeterShadowElement::rendererIsNeeded):
3232         (WebCore::MeterInnerElement::rendererIsNeeded):
3233         * html/shadow/MeterShadowElement.h:
3234         * html/shadow/ProgressShadowElement.cpp:
3235         (WebCore::ProgressShadowElement::rendererIsNeeded):
3236         (WebCore::ProgressInnerElement::rendererIsNeeded):
3237         * html/shadow/ProgressShadowElement.h:
3238         * svg/SVGDescElement.h:
3239         * svg/SVGElement.h:
3240         (WebCore::SVGElement::rendererIsNeeded):
3241         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3242         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
3243         * svg/SVGFilterPrimitiveStandardAttributes.h:
3244         * svg/SVGFontElement.h:
3245         * svg/SVGForeignObjectElement.cpp:
3246         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
3247         * svg/SVGForeignObjectElement.h:
3248         * svg/SVGGElement.cpp:
3249         (WebCore::SVGGElement::rendererIsNeeded):
3250         * svg/SVGGElement.h:
3251         * svg/SVGGlyphElement.h:
3252         * svg/SVGGlyphRefElement.h:
3253         * svg/SVGHKernElement.h:
3254         * svg/SVGMarkerElement.h:
3255         * svg/SVGMissingGlyphElement.h:
3256         * svg/SVGSVGElement.cpp:
3257         (WebCore::SVGSVGElement::rendererIsNeeded):
3258         * svg/SVGSVGElement.h:
3259         * svg/SVGStopElement.cpp:
3260         (WebCore::SVGStopElement::rendererIsNeeded):
3261         * svg/SVGStopElement.h:
3262         * svg/SVGStyledElement.cpp:
3263         (WebCore::SVGStyledElement::rendererIsNeeded):
3264         * svg/SVGStyledElement.h:
3265         * svg/SVGTRefElement.cpp:
3266         (WebCore::SVGTRefElement::rendererIsNeeded):
3267         * svg/SVGTRefElement.h:
3268         * svg/SVGTSpanElement.cpp:
3269         (WebCore::SVGTSpanElement::rendererIsNeeded):
3270         * svg/SVGTSpanElement.h:
3271         * svg/SVGTextPathElement.cpp:
3272         (WebCore::SVGTextPathElement::rendererIsNeeded):
3273         * svg/SVGTextPathElement.h:
3274         * svg/SVGTitleElement.h:
3275         * svg/SVGVKernElement.h:
3276         * svg/SVGViewElement.h:
3277
3278 2013-08-20  Daniel Bates  <dabates@apple.com>
3279
3280         <https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
3281
3282         Reviewed by Darin Adler.
3283
3284         Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
3285         such support is enabled.
3286
3287         * dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
3288         * dom/Clipboard.h: Ditto.
3289
3290 2013-08-20  Antti Koivisto  <antti@apple.com>
3291
3292         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
3293
3294         Reviewed by Darin Adler.
3295
3296         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
3297
3298         * dom/Element.cpp:
3299         (WebCore::Element::rendererIsNeeded):
3300         * dom/Element.h:
3301         * dom/NodeRenderingContext.cpp:
3302         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
3303         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
3304         * dom/PseudoElement.cpp:
3305         (WebCore::PseudoElement::rendererIsNeeded):
3306         * dom/PseudoElement.h:
3307         * html/HTMLAppletElement.cpp:
3308         (WebCore::HTMLAppletElement::rendererIsNeeded):
3309         * html/HTMLAppletElement.h:
3310         * html/HTMLElement.cpp:
3311         (WebCore::HTMLElement::rendererIsNeeded):
3312         * html/HTMLElement.h:
3313         * html/HTMLEmbedElement.cpp:
3314         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3315         * html/HTMLEmbedElement.h:
3316         * html/HTMLFormElement.cpp:
3317         (WebCore::HTMLFormElement::rendererIsNeeded):
3318         * html/HTMLFormElement.h:
3319         * html/HTMLFrameElement.cpp:
3320         (WebCore::HTMLFrameElement::rendererIsNeeded):
3321         * html/HTMLFrameElement.h:
3322         * html/HTMLFrameSetElement.cpp:
3323         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
3324         * html/HTMLFrameSetElement.h:
3325         * html/HTMLIFrameElement.cpp:
3326         (WebCore::HTMLIFrameElement::rendererIsNeeded):
3327         * html/HTMLIFrameElement.h:
3328         * html/HTMLInputElement.cpp:
3329         (WebCore::HTMLInputElement::rendererIsNeeded):
3330         * html/HTMLInputElement.h:
3331         * html/HTMLMediaElement.cpp:
3332         (WebCore::HTMLMediaElement::rendererIsNeeded):
3333         * html/HTMLMediaElement.h:
3334         * html/HTMLObjectElement.cpp:
3335         (WebCore::HTMLObjectElement::rendererIsNeeded):
3336         * html/HTMLObjectElement.h:
3337         * html/HTMLOptGroupElement.h:
3338         * html/HTMLOptionElement.h:
3339         * html/HTMLVideoElement.cpp:
3340         (WebCore::HTMLVideoElement::rendererIsNeeded):
3341         * html/HTMLVideoElement.h:
3342         * html/shadow/DetailsMarkerControl.cpp:
3343         (WebCore::DetailsMarkerControl::rendererIsNeeded):
3344         * html/shadow/DetailsMarkerControl.h:
3345         * html/shadow/InsertionPoint.cpp:
3346         (WebCore::InsertionPoint::rendererIsNeeded):
3347         * html/shadow/InsertionPoint.h:
3348         * html/shadow/MeterShadowElement.cpp:
3349         (WebCore::MeterShadowElement::rendererIsNeeded):
3350         (WebCore::MeterInnerElement::rendererIsNeeded):
3351         * html/shadow/MeterShadowElement.h:
3352         * html/shadow/ProgressShadowElement.cpp:
3353         (WebCore::ProgressShadowElement::rendererIsNeeded):
3354         (WebCore::ProgressInnerElement::rendererIsNeeded):
3355         * html/shadow/ProgressShadowElement.h:
3356         * svg/SVGDescElement.h:
3357         * svg/SVGElement.h:
3358         (WebCore::SVGElement::rendererIsNeeded):
3359         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3360         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
3361         * svg/SVGFilterPrimitiveStandardAttributes.h:
3362         * svg/SVGFontElement.h:
3363         * svg/SVGForeignObjectElement.cpp:
3364         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
3365         * svg/SVGForeignObjectElement.h:
3366         * svg/SVGGElement.cpp:
3367         (WebCore::SVGGElement::rendererIsNeeded):
3368         * svg/SVGGElement.h:
3369         * svg/SVGGlyphElement.h:
3370         * svg/SVGGlyphRefElement.h:
3371         * svg/SVGHKernElement.h:
3372         * svg/SVGMarkerElement.h:
3373         * svg/SVGMissingGlyphElement.h:
3374         * svg/SVGSVGElement.cpp:
3375         (WebCore::SVGSVGElement::rendererIsNeeded):
3376         * svg/SVGSVGElement.h:
3377         * svg/SVGStopElement.cpp:
3378         (WebCore::SVGStopElement::rendererIsNeeded):
3379         * svg/SVGStopElement.h:
3380         * svg/SVGStyledElement.cpp:
3381         (WebCore::SVGStyledElement::rendererIsNeeded):
3382         * svg/SVGStyledElement.h:
3383         * svg/SVGTRefElement.cpp:
3384         (WebCore::SVGTRefElement::rendererIsNeeded):
3385         * svg/SVGTRefElement.h:
3386         * svg/SVGTSpanElement.cpp:
3387         (WebCore::SVGTSpanElement::rendererIsNeeded):
3388         * svg/SVGTSpanElement.h:
3389         * svg/SVGTextPathElement.cpp:
3390         (WebCore::SVGTextPathElement::rendererIsNeeded):
3391         * svg/SVGTextPathElement.h:
3392         * svg/SVGTitleElement.h:
3393         * svg/SVGVKernElement.h:
3394         * svg/SVGViewElement.h:
3395
3396 2013-08-20  Tim Horton  <timothy_horton@apple.com>
3397
3398         <https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
3399         <rdar://problem/12958038>
3400
3401         Reviewed by Joseph Pecoraro.
3402
3403         Update the inspector overlay's layout before painting, if it is stale.
3404
3405         No new tests; fixes an intermittent assertion failure in some existing tests.
3406
3407         * inspector/InspectorOverlay.cpp:
3408         (WebCore::InspectorOverlay::paint):
3409
3410 2013-08-20  Daniel Bates  <dabates@apple.com>
3411
3412         Build fix after <http://trac.webkit.org/changeset/154260> (https://webkit.org/b/119949);
3413         declare Clipboard::hasData() when building with and without drag support
3414
3415         * dom/Clipboard.h:
3416
3417 2013-08-20  Hans Muller  <hmuller@adobe.com>
3418
3419         <https://webkit.org/b/119849> [CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
3420
3421         Reviewed by Alexandru Chiculita.
3422
3423         Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
3424         method now computes first logical top location where a line segment can be laid
3425         out within a RasterShape, i.e. a shape derived from an image valued URL resource.
3426
3427         A detailed description of the algorithm can be found in
3428         http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
3429
3430         The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
3431         with a vertical gap that spans the entire line now causes the method to short circuit
3432         and return an empty interval list.
3433
3434         Tests: fast/shapes/shape-inside/shape-inside-image-003.html
3435                fast/shapes/shape-inside/shape-inside-image-004.html
3436                fast/shapes/shape-inside/shape-inside-image-005.html
3437
3438         * rendering/shapes/RasterShape.cpp:
3439         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
3440         (WebCore::RasterShapeIntervals::getIncludedIntervals):
3441         (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
3442         * rendering/shapes/RasterShape.h:
3443
3444 2013-08-20  Pratik Solanki  <psolanki@apple.com>
3445
3446         <https://webkit.org/b/120029> Document::markers() should return a reference
3447
3448         Reviewed by Andreas Kling.
3449
3450         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
3451         m_markers as const and initialize it in member initialization.
3452
3453         * dom/Document.cpp:
3454         (WebCore::Document::Document):
3455         * dom/Document.h:
3456         (WebCore::Document::markers):
3457         * editing/AlternativeTextController.cpp:
3458         (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
3459         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
3460         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
3461         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
3462         (WebCore::AlternativeTextController::respondToChangedSelection):
3463         (WebCore::AlternativeTextController::respondToAppliedEditing):
3464         (WebCore::AlternativeTextController::respondToUnappliedEditing):
3465         (WebCore::AlternativeTextController::markReversed):
3466         (WebCore::AlternativeTextController::markCorrection):
3467         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
3468         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
3469         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
3470         (WebCore::AlternativeTextController::applyDictationAlternative):
3471         * editing/CompositeEditCommand.cpp:
3472         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
3473         * editing/DeleteSelectionCommand.cpp:
3474         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
3475         * editing/DictationCommand.cpp:
3476         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
3477         * editing/Editor.cpp:
3478         (WebCore::Editor::ignoreSpelling):
3479         (WebCore::Editor::learnSpelling):
3480         (WebCore::Editor::advanceToNextMisspelling):
3481         (WebCore::Editor::clearMisspellingsAndBadGrammar):
3482         (WebCore::Editor::markAndReplaceFor):
3483         (WebCore::Editor::changeBackToReplacedString):
3484         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
3485         (WebCore::Editor::countMatchesForText):
3486         (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
3487         (WebCore::Editor::respondToChangedSelection):
3488         (WebCore::Editor::selectionStartHasMarkerFor):
3489         * editing/SpellChecker.cpp:
3490         (WebCore::SpellChecker::didCheckSucceed):
3491         * editing/SplitTextNodeCommand.cpp:
3492         (WebCore::SplitTextNodeCommand::doApply):
3493         (WebCore::SplitTextNodeCommand::doUnapply):
3494         * editing/TextCheckingHelper.cpp:
3495         (WebCore::TextCheckingHelper::findFirstMisspelling):
3496         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
3497         * page/FrameView.cpp:
3498         (WebCore::FrameView::getTickmarks):
3499         (WebCore::FrameView::paintContents):
3500         * page/Page.cpp:
3501         (WebCore::Page::unmarkAllTextMatches):
3502         * rendering/HitTestResult.cpp:
3503         (WebCore::HitTestResult::spellingToolTip):
3504         (WebCore::HitTestResult::replacedString):
3505         (WebCore::HitTestResult::dictationAlternatives):
3506         * rendering/InlineTextBox.cpp:
3507         (WebCore::InlineTextBox::paintDocumentMarkers):
3508         * rendering/svg/SVGInlineFlowBox.cpp:
3509         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
3510         * testing/Internals.cpp:
3511         (WebCore::Internals::markerCountForNode):
3512         (WebCore::Internals::markerAt):
3513         (WebCore::Internals::addTextMatchMarker):
3514
3515 2013-08-20  Pratik Solanki  <psolanki@apple.com>
3516
3517         <https://webkit.org/b/119875> localeToScriptCodeForFontSelection should use hash tables with larger default capacity
3518
3519         Reviewed by Darin Adler.
3520
3521         The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
3522         these hash tables so we don't have to expand them during initialization.
3523
3524         No new tests because no functional changes.
3525
3526         * platform/text/LocaleToScriptMappingDefault.cpp:
3527         (WebCore::scriptNameToCode):
3528         (WebCore::localeToScriptCodeForFontSelection):
3529
3530 2013-08-20  Eric Carlson  <eric.carlson@apple.com>
3531
3532         <https://webkit.org/b/120068> Media controls can be attached lazily
3533
3534         Reviewed by Jer Noble.
3535
3536         Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
3537
3538         * html/HTMLMediaElement.cpp:
3539         (WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
3540
3541 2013-08-20  Daniel Bates  <dabates@apple.com>
3542
3543         <https://webkit.org/b/120072> Use nullAtom instead of defining static local in
3544         Accessibility{Object, RenderObject}::actionVerb()
3545
3546         Reviewed by Chris Fleizach.
3547
3548         * accessibility/AccessibilityObject.cpp:
3549         (WebCore::AccessibilityObject::actionVerb):
3550         * accessibility/AccessibilityRenderObject.cpp:
3551         (WebCore::AccessibilityRenderObject::actionVerb):
3552
3553 2013-08-20  Daniel Bates  <dabates@apple.com>
3554
3555         <https://webkit.org/b/119914> [iOS] Upstream changes to WebCore/accessibility
3556
3557         Reviewed by Darin Adler and Chris Fleizach.
3558
3559         * accessibility/AccessibilityMenuList.cpp:
3560         (WebCore::AccessibilityMenuList::press):
3561         (WebCore::AccessibilityMenuList::isCollapsed):
3562         * accessibility/AccessibilityObject.cpp:
3563         (WebCore::AccessibilityObject::headingElementForNode):
3564         (WebCore::AccessibilityObject::actionVerb):
3565         * accessibility/AccessibilityObject.h:
3566         * accessibility/AccessibilityRenderObject.cpp:
3567         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
3568         (WebCore::AccessibilityRenderObject::actionVerb):
3569         * accessibility/AccessibilityTableColumn.cpp:
3570         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
3571         * accessibility/AccessibilityTableHeaderContainer.cpp:
3572         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
3573         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3574
3575 2013-08-20  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
3576
3577         [css3-text] Implement CSS3 text-decoration shorthand
3578         https://bugs.webkit.org/show_bug.cgi?id=92000
3579
3580         Reviewed by Darin Adler.
3581
3582         Implements the text-decoration shorthand (with -webkit- prefix), as specified by the CSS3 Text Decoration specification:
3583         http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-property
3584
3585         Backported from Blink:
3586         https://src.chromium.org/viewvc/blink?revision=156266&view=revision
3587
3588         Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html
3589                fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
3590
3591         * css/CSSComputedStyleDeclaration.cpp:
3592         (WebCore::ComputedStyleExtractor::propertyValue):
3593         * css/CSSParser.cpp:
3594         (WebCore::CSSParser::parseValue):
3595         (WebCore::CSSParser::addTextDecorationProperty):
3596         (WebCore::CSSParser::parseTextDecoration):
3597         * css/CSSProperty.cpp:
3598         (WebCore::CSSProperty::isInheritedProperty):
3599         * css/CSSPropertyNames.in:
3600         * css/StylePropertyShorthand.cpp:
3601         (WebCore::webkitTextDecorationShorthand):
3602         (WebCore::shorthandForProperty):
3603         (WebCore::matchingShorthandsForLonghand):
3604         * css/StylePropertyShorthand.h:
3605
3606 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
3607
3608         https://bugs.webkit.org/show_bug.cgi?id=120054
3609         Remove some dead code following getOwnPropertyDescriptor cleanup
3610
3611         Reviewed by Oliver Hunt.
3612
3613         * bindings/js/JSPluginElementFunctions.cpp:
3614         * bindings/js/JSPluginElementFunctions.h:
3615             - remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
3616
3617 2013-08-20  Alex Christensen  <achristensen@apple.com>
3618
3619         Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
3620         https://bugs.webkit.org/show_bug.cgi?id=119512
3621
3622         Reviewed by Brent Fulgham.
3623
3624         * WebCore.vcxproj/WebCore.vcxproj:
3625         * WebCore.vcxproj/WebCore.vcxproj.filters:
3626         * WebCore.vcxproj/WebCoreCommon.props:
3627         * WebCore.vcxproj/WebCoreGeneratedCommon.props:
3628         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
3629         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
3630         Replaced obj32, bin32, and lib32 with macros for 64-bit build.
3631
3632 2013-08-20  Jessie Berlin  <jberlin@apple.com>
3633
3634         Remove a string no longer used after r154251.
3635
3636         Rubber-stamped by Brady Eidson.
3637
3638         * English.lproj/Localizable.strings:
3639
3640 2013-08-20  Jakob Petsovits  <jpetsovits@blackberry.com>
3641
3642         [BlackBerry] Avoid an assertion from calling releaseBufferDrawable(nullptr)
3643         https://bugs.webkit.org/show_bug.cgi?id=119862
3644         JIRA 470760
3645
3646         Reviewed by Antonio Gomes.
3647
3648         destroyBuffer() finds a null pointer valid but
3649         releaseBufferDrawable() does not. Fix by adding a
3650         null pointer check.
3651
3652         No new tests, caught by existing layout test runs.
3653
3654         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
3655         (WebCore::ImageBuffer::~ImageBuffer):
3656
3657 2013-08-19  Gustavo Noronha Silva  <gns@gnome.org>
3658
3659         <https://webkit.org/b/120048> [GTK] Add stubs for APIs that went missing in the DOM bindings
3660
3661         Reviewed by Martin Robinson.
3662
3663         No new tests, these are just stubs for the DOM bindings API.
3664
3665         * bindings/gobject/WebKitDOMCustom.cpp:
3666         (webkit_dom_bar_info_get_property):
3667         (webkit_dom_bar_info_class_init):
3668         (webkit_dom_bar_info_init):
3669         (webkit_dom_bar_info_get_visible):
3670         (webkit_dom_console_get_memory):
3671         (webkit_dom_css_style_declaration_get_property_css_value):
3672         (webkit_dom_document_get_webkit_hidden):
3673         (webkit_dom_document_get_webkit_visibility_state):
3674         (webkit_dom_html_document_open):
3675         (webkit_dom_html_element_set_item_id):
3676         (webkit_dom_html_element_get_item_id):
3677         (webkit_dom_html_element_get_item_ref):
3678         (webkit_dom_html_element_get_item_prop):
3679         (webkit_dom_html_element_set_item_scope):
3680         (webkit_dom_html_element_get_item_scope):
3681         (webkit_dom_html_element_get_item_type):
3682         (webkit_dom_html_properties_collection_get_property):
3683         (webkit_dom_html_properties_collection_class_init):
3684         (webkit_dom_html_properties_collection_init):
3685         (webkit_dom_html_properties_collection_item):
3686         (webkit_dom_html_properties_collection_named_item):
3687         (webkit_dom_html_properties_collection_get_length):
3688         (webkit_dom_html_properties_collection_get_names):
3689         (webkit_dom_node_get_attributes):
3690         (webkit_dom_node_has_attributes):
3691         (webkit_dom_memory_info_get_property):
3692         (webkit_dom_memory_info_class_init):
3693         (webkit_dom_memory_info_init):
3694         (webkit_dom_memory_info_get_total_js_heap_size):
3695         (webkit_dom_memory_info_get_used_js_heap_size):
3696         (webkit_dom_memory_info_get_js_heap_size_limit):
3697         (webkit_dom_micro_data_item_value_class_init):
3698         (webkit_dom_micro_data_item_value_init):
3699         (webkit_dom_performance_get_memory):
3700         (webkit_dom_property_node_list_get_property):
3701         (webkit_dom_property_node_list_class_init):
3702         (webkit_dom_property_node_list_init):
3703         (webkit_dom_property_node_list_item):
3704         (webkit_dom_property_node_list_get_length):
3705         * bindings/gobject/WebKitDOMCustom.h:
3706
3707 2013-08-20  Antti Koivisto  <antti@apple.com>
3708
3709         <https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
3710
3711         Reviewed by Andreas Kling.
3712
3713         Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
3714         
3715         Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
3716
3717         * css/StyleResolver.cpp:
3718         (WebCore::StyleResolver::State::initForStyleResolve):
3719         (WebCore::StyleResolver::styleForElement):
3720         * css/StyleResolver.h:
3721         (WebCore::StyleResolver::State::State):
3722         (WebCore::StyleResolver::State::elementLinkState):
3723         
3724             Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
3725
3726         * dom/ComposedShadowTreeWalker.cpp:
3727         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
3728         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
3729         (WebCore::ComposedShadowTreeWalker::traverseParent):
3730         
3731             Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
3732
3733         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
3734         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
3735         * dom/ComposedShadowTreeWalker.h:
3736         * dom/Node.cpp:
3737         (WebCore::Node::insertionParentForBinding):
3738         * dom/NodeRenderingContext.cpp:
3739         (WebCore::NodeRenderingContext::NodeRenderingContext):
3740         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
3741         
3742             Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
3743             a few non-performance critical places.
3744
3745         (WebCore::NodeRenderingContext::resetStyleInheritance):
3746         
3747             Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
3748
3749         * dom/NodeRenderingContext.h:
3750         * dom/NodeRenderingTraversal.cpp:
3751         (WebCore::NodeRenderingTraversal::parentSlow):
3752         * dom/NodeRenderingTraversal.h:
3753         (WebCore::NodeRenderingTraversal::parent):
3754         
3755             Remove ParentDetails.
3756
3757         * html/HTMLAttributeNames.in:
3758         * html/shadow/InsertionPoint.cpp:
3759         
3760             Remove unused resetStyleInheritance attribute.
3761
3762         (WebCore::InsertionPoint::removedFrom):
3763         (WebCore::findInsertionPointOf):
3764         
3765             Renamed for clarity.
3766
3767         * html/shadow/InsertionPoint.h:
3768         * testing/Internals.cpp:
3769         (WebCore::Internals::includerFor):
3770
3771 2013-08-20  Antti Koivisto  <antti@apple.com>
3772
3773         <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
3774
3775         Reviewed by Anders Carlsson.
3776
3777         * html/HTMLDocument.cpp:
3778         (WebCore::HTMLDocument::isFrameSet):
3779         * html/HTMLFrameElement.cpp:
3780         (WebCore::HTMLFrameElement::didAttachRenderers):
3781         
3782             Make helper public in HTMLFrameSetElement.
3783
3784         * html/HTMLFrameSetElement.cpp:
3785         (WebCore::HTMLFrameSetElement::findContaining):
3786         
3787             Static function for finding containing frameset, if any.
3788
3789         (WebCore::HTMLFrameSetElement::willAttachRenderers):
3790         
3791             This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more.
3792
3793         * html/HTMLFrameSetElement.h:
3794         (WebCore::isHTMLFrameSetElement):
3795         (WebCore::toHTMLFrameSetElement):
3796         
3797             Add casting functions.
3798
3799         * rendering/RenderFrameSet.cpp:
3800         (WebCore::RenderFrameSet::frameSet):
3801
3802 2013-08-20  Antti Koivisto  <antti@apple.com>
3803
3804         <https://webkit.org/b/120023> REGRESSION(r154257): svg/custom/bug78807.svg and svg/custom/use-invalid-style.svg failing
3805
3806         Reviewed by Andreas Kling.
3807
3808         * xml/XMLErrors.cpp:
3809         (WebCore::XMLErrors::insertErrorMessageBlock): "reattach" had accidentally turned into "detach" in refactoring.
3810
3811 2013-08-20  Antti Koivisto  <antti@apple.com>
3812
3813         <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp
3814
3815         Reviewed by Andreas Kling.
3816         
3817         PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it.
3818
3819         Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached
3820         along with rendering. However in this case the page inserts a <style> that uses ::before along with an element
3821         that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly
3822         insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash.
3823
3824         Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html
3825
3826         * dom/Element.cpp:
3827         (WebCore::Element::insertedInto):
3828         (WebCore::Element::removedFrom):
3829         
3830             Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document.
3831             When they are added normally during render tree attach these calls don't happen either.
3832
3833 2013-08-20  Ryosuke Niwa  <rniwa@webkit.org>
3834
3835         Windows build fix after r154314.
3836
3837         * platform/graphics/cg/PathCG.cpp:
3838         (WebCore::Path::platformAddPathForRoundedRect):
3839
3840 2013-08-19  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
3841
3842         [Cairo] Canvas putImageData is not working as expected
3843         https://bugs.webkit.org/show_bug.cgi?id=119992
3844
3845         Reviewed by Darin Adler.
3846
3847         ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
3848         If the alpha value is not 255, image data should always be pre-multiplied.
3849
3850         Test: fast/canvas/canvas-putImageData-zero-alpha.html
3851
3852         * platform/graphics/cairo/ImageBufferCairo.cpp:
3853         (WebCore::ImageBuffer::putByteArray):
3854
3855 2013-08-19  Santosh Mahto  <santosh.ma@samsung.com>
3856
3857         <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset  to calculateLocalTimeOffset
3858
3859         Reviewed by Darin Adler.
3860
3861         Resolving code error.
3862
3863         * html/BaseDateAndTimeInputType.cpp:
3864         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
3865         * html/MonthInputType.cpp:
3866         (WebCore::MonthInputType::defaultValueForStepUp):
3867         * html/TimeInputType.cpp:
3868         (WebCore::TimeInputType::defaultValueForStepUp):
3869
3870 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
3871
3872         <https://webkit.org/b/120049> Delete code for Snow Leopard
3873
3874         Reviewed by Benjamin Poulain.
3875
3876         Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
3877
3878         * WebCore.exp.in:
3879         * WebCore.xcodeproj/project.pbxproj:
3880         * editing/mac/EditorMac.mm:
3881         (WebCore::Editor::pasteWithPasteboard):
3882         * page/ContextMenuController.cpp:
3883         (WebCore::ContextMenuController::populate):
3884         * platform/LocalizedStrings.cpp:
3885         (WebCore::truncatedStringForLookupMenuItem):
3886         (WebCore::contextMenuItemTagSearchWeb):
3887         (WebCore::contextMenuItemTagLookUpInDictionary):
3888         * platform/MemoryPressureHandler.cpp:
3889         * platform/audio/mac/AudioBusMac.mm:
3890         (WebCore::AudioBus::loadPlatformResource):
3891         * platform/graphics/ca/GraphicsLayerCA.cpp:
3892         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3893         * platform/graphics/ca/PlatformCALayer.h:
3894         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3895         (PlatformCALayer::acceleratesDrawing):
3896         (PlatformCALayer::setAcceleratesDrawing):
3897         (PlatformCALayer::contentsScale):
3898         (PlatformCALayer::setContentsScale):
3899         (PlatformCALayer::synchronouslyDisplayTilesInRect):
3900         * platform/graphics/ca/mac/TileController.mm:
3901         (WebCore::TileController::setScale):
3902         (WebCore::TileController::setAcceleratesDrawing):
3903         (WebCore::TileController::createTileLayer):
3904         * platform/graphics/cg/ImageBufferDataCG.cpp:
3905         (WebCore::ImageBufferData::getData):
3906         (WebCore::ImageBufferData::putData):
3907         * platform/graphics/cg/ImageBufferDataCG.h:
3908         * platform/graphics/cg/PathCG.cpp:
3909         (WebCore::Path::platformAddPathForRoundedRect):
3910         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3911         (WebCore::FontPlatformData::FontPlatformData):
3912         (WebCore::FontPlatformData::setFont):
3913         * platform/graphics/mac/FontMac.mm:
3914         (WebCore::showGlyphsWithAdvances):
3915         * platform/graphics/mac/GraphicsContextMac.mm:
3916         (WebCore::GraphicsContext::drawLineForDocumentMarker):
3917         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3918         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
3919         (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
3920         * platform/graphics/mac/WebLayer.mm:
3921         (drawLayerContents):
3922         * platform/mac/CursorMac.mm:
3923         (WebCore::Cursor::ensurePlatformCursor):
3924         * platform/mac/EmptyProtocolDefinitions.h: Removed.
3925         * platform/mac/MemoryPressureHandlerMac.mm:
3926         (WebCore::MemoryPressureHandler::releaseMemory):
3927         * platform/mac/NSScrollerImpDetails.h:
3928         * platform/mac/PlatformEventFactoryMac.mm:
3929         (WebCore::momentumPhaseForEvent):
3930         (WebCore::phaseForEvent):
3931         * platform/mac/ScrollAnimatorMac.mm:
3932         * platform/mac/SharedTimerMac.mm:
3933         * platform/mac/WebCoreSystemInterface.h:
3934         * platform/mac/WebCoreSystemInterface.mm:
3935         * platform/network/mac/ResourceHandleMac.mm:
3936         * platform/network/mac/ResourceRequestMac.mm:
3937         (WebCore::ResourceRequest::doUpdateResourceRequest):
3938         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3939         * platform/text/cf/HyphenationCF.cpp:
3940         * platform/text/mac/HyphenationMac.mm: Removed.
3941         * rendering/RenderLayerBacking.cpp:
3942         (WebCore::RenderLayerBacking::containsPaintedContent):
3943         * rendering/RenderThemeMac.mm:
3944         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
3945
3946 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
3947
3948         <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
3949
3950         Reviewed by Simon Fraser.
3951
3952         Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
3953
3954         They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
3955
3956         * rendering/RenderBlock.cpp:
3957         (WebCore::RenderBlock::computeOverflow):
3958
3959 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
3960
3961         <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
3962
3963         Reviewed by Kent Tamura.
3964
3965         Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
3966
3967         In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
3968         which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
3969
3970         Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
3971
3972         Test: fast/forms/range/range-type-change-oninput.html
3973
3974         * html/shadow/SliderThumbElement.cpp:
3975         (WebCore::SliderThumbElement::isDisabledFormControl):
3976         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
3977         (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
3978         (WebCore::SliderThumbElement::setPositionFromPoint):
3979         (WebCore::SliderThumbElement::hostInput):
3980
3981 2013-08-19  Alexey Proskuryakov  <ap@apple.com>
3982
3983         https://bugs.webkit.org/show_bug.cgi?id=120028
3984         ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
3985         when navigating to an uncached subframe
3986
3987         Reviewed by Brady Eidson.
3988
3989         Test: http/tests/navigation/post-frames-goback1-uncached.html
3990
3991         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
3992         Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
3993
3994         * loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
3995         Now that we always set m_requestedHistoryItem, there is no need to traverse frame
3996         tree to see if this document is being loaded as part of b/f navigation (which was
3997         add in bug 90870).
3998
3999 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
4000
4001         https://bugs.webkit.org/show_bug.cgi?id=120034
4002         Remove custom getOwnPropertyDescriptor for global objects
4003
4004         Reviewed by Geoff Garen.
4005
4006         Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
4007
4008         * bindings/js/JSDOMWindowCustom.cpp:
4009         (WebCore::JSDOMWindow::getOwnPropertySlot):
4010             - Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
4011               all properties are marked as read-only, non-configurable to prevent defineProperty.
4012
4013 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
4014
4015         https://bugs.webkit.org/show_bug.cgi?id=119995
4016         Start removing custom implementations of getOwnPropertyDescriptor
4017
4018         Reviewed by Sam Weinig.
4019
4020         This can now typically implemented in terms of getOwnPropertySlot.
4021         Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
4022         Switch over most classes in JSC & the WebCore bindings generator to use this.
4023
4024         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
4025         * bindings/js/JSHTMLAppletElementCustom.cpp:
4026         * bindings/js/JSHTMLEmbedElementCustom.cpp:
4027         * bindings/js/JSHTMLObjectElementCustom.cpp:
4028         * bindings/js/JSHistoryCustom.cpp:
4029         (WebCore::JSHistory::getOwnPropertySlotDelegate):
4030         * bindings/js/JSLocationCustom.cpp:
4031         (WebCore::JSLocation::getOwnPropertySlotDelegate):
4032         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
4033             - Remove getOwnPropertyDescriptorDelegate methods,
4034               Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
4035         * bindings/scripts/CodeGeneratorJS.pm:
4036         (GenerateHeader):
4037         (GenerateImplementation):
4038         (GenerateConstructorHelperMethods):
4039             - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
4040         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
4041         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
4042         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
4043         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
4044         * bindings/scripts/test/JS/JSTestException.cpp:
4045         * bindings/scripts/test/JS/JSTestInterface.cpp:
4046         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
4047         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
4048         * bindings/scripts/test/JS/JSTestNode.cpp:
4049         * bindings/scripts/test/JS/JSTestObj.cpp:
4050         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
4051         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
4052         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
4053             - Update test expectations.
4054
4055 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
4056
4057         <https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
4058
4059         Reviewed by Darin Adler.
4060
4061         None of the attributes of RuleSet should be modified directly.
4062
4063         * css/DocumentRuleSets.cpp:
4064         (WebCore::DocumentRuleSets::initUserStyle):
4065         * css/ElementRuleCollector.cpp:
4066         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
4067         * css/RuleSet.h:
4068         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
4069         (WebCore::RuleSet::regionSelectorsAndRuleSets):
4070         (WebCore::RuleSet::ruleCount):
4071         * css/StyleResolver.cpp:
4072         (WebCore::StyleResolver::checkRegionStyle):
4073
4074 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
4075
4076         <https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
4077
4078         Reviewed by Darin Adler.