Let SVGElements have pending resources.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-29  Philip Rogers  <pdr@google.com>
2
3         Let SVGElements have pending resources.
4         https://bugs.webkit.org/show_bug.cgi?id=99694
5
6         Reviewed by Eric Seidel.
7
8         Our SVG pending resource tracking is used for handling dynamic id changes. For example,
9         if an SVG element references an id that is not yet in the document (or has been removed),
10         the SVG element will be 'pending' an id. When styled elements are inserted into
11         the document, buildPendingResourcesIfNeeded() is called to force any pending elements
12         to resolve their dependencies. Only SVGStyledElement targets can be referenced using
13         this infrastructure, and that is not changed with this patch.
14
15         Previously, only SVGStyledElements could have pending resources. Some examples of where
16         this is violated are SVGAnimateElement and SVGMPathElement which are not a styled elements
17         but which can have pending references (they can reference styled elements and
18         paths, respectively). This patch changes the pending resource handling to allow
19         any SVGElement to have pending resources.
20
21         This patch is only a refactoring of code in preparation for WK99694 and does not
22         affect existing functionality or tests.
23
24         * svg/SVGDocumentExtensions.cpp:
25         (WebCore::SVGDocumentExtensions::addPendingResource):
26         (WebCore::SVGDocumentExtensions::isElementPendingResources):
27         (WebCore::SVGDocumentExtensions::isElementPendingResource):
28         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
29         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
30         * svg/SVGDocumentExtensions.h:
31         (WebCore):
32         (SVGDocumentExtensions):
33         * svg/SVGElement.cpp:
34         (WebCore::SVGElement::~SVGElement):
35         (WebCore::SVGElement::removedFrom):
36         (WebCore::SVGElement::hasPendingResources):
37         (WebCore):
38         (WebCore::SVGElement::setHasPendingResources):
39         (WebCore::SVGElement::clearHasPendingResourcesIfPossible):
40         * svg/SVGElement.h:
41         (SVGElement):
42         (WebCore::SVGElement::buildPendingResource):
43         * svg/SVGStyledElement.cpp:
44         (WebCore):
45         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
46         (WebCore::SVGStyledElement::removedFrom):
47         * svg/SVGStyledElement.h:
48         (SVGStyledElement):
49         (WebCore::SVGStyledElement::selfHasRelativeLengths):
50
51 2012-10-29  Dan Carney  <dcarney@google.com>
52
53         Remove ensureAuxiliaryContext
54         https://bugs.webkit.org/show_bug.cgi?id=99975
55
56         Reviewed by Adam Barth.
57
58         Removed auxilliaryContext as use if it is problematic in IDB.
59
60         No new tests. No change in functionality.
61
62         * Modules/indexeddb/IDBCursor.cpp:
63         (WebCore::IDBCursor::update):
64         (WebCore::IDBCursor::setValueReady):
65         * Modules/indexeddb/IDBCursor.h:
66         (IDBCursor):
67         * Modules/indexeddb/IDBObjectStore.cpp:
68         (WebCore::generateIndexKeysForValue):
69         (WebCore::IDBObjectStore::put):
70         (WebCore):
71         * Modules/indexeddb/IDBRequest.cpp:
72         (WebCore::IDBRequest::onSuccess):
73         (WebCore::IDBRequest::dispatchEvent):
74         * bindings/v8/IDBBindingUtilities.cpp:
75         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
76         (WebCore::deserializeIDBValue):
77         (WebCore::injectIDBKeyIntoScriptValue):
78         * bindings/v8/IDBBindingUtilities.h:
79         (WebCore):
80         * bindings/v8/V8Binding.cpp:
81         (WebCore::toV8Context):
82         (WebCore):
83         * bindings/v8/V8Binding.h:
84         (WebCore):
85         * bindings/v8/V8PerIsolateData.cpp:
86         (WebCore):
87         * bindings/v8/V8PerIsolateData.h:
88
89 2012-10-29  Alpha Lam  <hclam@chromium.org>
90
91         [skia] Handle mask box image.
92         https://bugs.webkit.org/show_bug.cgi?id=100570
93
94         Reviewed by James Robinson.
95
96         When drawing an image with source rectangle it should intersect with image rectangle.
97         This should be the case for drawing single image and tiling an image.
98
99         Test: fast/images/mask-box-image-crash.html
100
101         * platform/graphics/skia/ImageSkia.cpp:
102         (WebCore::Image::drawPattern):
103         (WebCore::BitmapImage::draw):
104         (WebCore::BitmapImageSingleFrameSkia::draw):
105
106 2012-10-29  Eric Carlson  <eric.carlson@apple.com>
107
108         Support captions when PLUGIN_PROXY_FOR_VIDEO
109         https://bugs.webkit.org/show_bug.cgi?id=100690
110
111         Reviewed by Simon Fraser.
112
113         When built with PLUGIN_PROXY_FOR_VIDEO, WebCore uses a plug-in for the media element's
114         platform media engine. Update this code path so the shadow DOM elements used to display
115         text tracks are created and configured correctly.
116
117         * html/HTMLMediaElement.cpp:
118         (WebCore::HTMLMediaElement::configureMediaControls): Create media controls if necessary.
119
120         * rendering/RenderEmbeddedObject.cpp:
121         (WebCore::RenderEmbeddedObject::layout): Set the position and size of the shadow DOM when the
122             position of the embedded element changes.
123         * rendering/RenderEmbeddedObject.h:
124
125 2012-10-29  Justin Novosad  <junov@google.com>
126
127         [Chromium] flickering observed when copying 2D canvas to webGL texture
128         https://bugs.webkit.org/show_bug.cgi?id=100691
129
130         Reviewed by Stephen White.
131
132         Added a flush to the webgl context after texture upload from an image
133         buffer to ensure proper graphics context synchronization with respect
134         to subsequent changes to the source image.
135
136         Tests: fast/canvas/webgl/canvas-2d-webgl-texture.html
137
138         * platform/graphics/skia/ImageBufferSkia.cpp:
139         (WebCore::ImageBuffer::copyToPlatformTexture):
140
141 2012-10-29  Glenn Adams  <glenn@skynav.com>
142
143         [CSSOM] Extraneous whitespace in CSSImportRule.cssText
144         https://bugs.webkit.org/show_bug.cgi?id=100657
145
146         Reviewed by Simon Fraser.
147
148         Remove extraneous whitespace when serializing CSSImportRule.cssText when
149         media list is empty.
150
151         Test: cssom/cssimportrule-media.html
152
153         * css/CSSImportRule.cpp:
154         (WebCore::CSSImportRule::cssText):
155         Don't append extra whitespace if mediaText is empty.
156
157 2012-10-29  Arnaud Renevier  <a.renevier@sisa.samsung.com>
158
159         webview not redrawn as needed when accelerated compositing is enabled.
160         https://bugs.webkit.org/show_bug.cgi?id=99109
161
162         Reviewed by Martin Robinson.
163
164         GL shared display is not in the gtk loop and therefore, its events are
165         not captured by gtk. So, we use gdk default instead.
166
167         No new tests, covered by existing tests.
168
169         * platform/gtk/RedirectedXCompositeWindow.cpp:
170         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
171         (WebCore::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
172         (WebCore::RedirectedXCompositeWindow::resize):
173
174 2012-10-29  Pavel Feldman  <pfeldman@chromium.org>
175
176         Web Inspector: bind redo to Ctrl+Y on non-mac platforms
177         https://bugs.webkit.org/show_bug.cgi?id=100685
178
179         Reviewed by Vsevolod Vlasov.
180
181         * inspector/front-end/DefaultTextEditor.js:
182         (WebInspector.DefaultTextEditor.prototype._registerShortcuts):
183
184 2012-10-29  Enrica Casucci  <enrica@apple.com>
185
186         Add ENABLE_USERSELECT_ALL feature flag.
187         https://bugs.webkit.org/show_bug.cgi?id=100559
188
189         Reviewed by Eric Seidel.
190
191         * Configurations/FeatureDefines.xcconfig:
192
193 2012-10-29  Alexandru Chiculita  <achicu@adobe.com>
194
195         [CSS Shaders] Extract the CustomFilterParameterList to its own file
196         https://bugs.webkit.org/show_bug.cgi?id=100548
197
198         Reviewed by Dean Jackson.
199
200         Moved all the CustomFilterParameterList related methods to their own file.
201         Also made CustomFilterParameterList inherit from Vector instead of typedefing it,
202         so that we can add a different operator== and a blend method to it.
203
204         No new tests, just refactoring existing code.
205
206         * CMakeLists.txt:
207         * GNUmakefile.list.am:
208         * Target.pri:
209         * WebCore.gypi:
210         * WebCore.xcodeproj/project.pbxproj:
211         * css/StyleResolver.h:
212         * platform/graphics/filters/CustomFilterOperation.cpp:
213         (WebCore::CustomFilterOperation::CustomFilterOperation):
214         (WebCore::CustomFilterOperation::blend):
215         * platform/graphics/filters/CustomFilterOperation.h:
216         (WebCore):
217         (WebCore::CustomFilterOperation::operator==):
218         * platform/graphics/filters/CustomFilterParameterList.cpp: Added.
219         (WebCore):
220         (WebCore::CustomFilterParameterList::operator==):
221         (WebCore::CustomFilterParameterList::checkAlphabeticalOrder):
222         (WebCore::CustomFilterParameterList::blend):
223         * platform/graphics/filters/CustomFilterParameterList.h: Added.
224         (WebCore):
225         (CustomFilterParameterList):
226
227 2012-10-29  Brady Eidson  <beidson@apple.com>
228
229         Try to fix 32-bit builds after my incompletely tested m_identifier change.
230
231         Not reviewed.
232
233         * loader/ResourceLoader.h:
234         (WebCore::ResourceLoader::identifier): Revert my "unsigned long" -> "uint64_t" change in two places.
235
236 2012-10-29  Csaba Osztrogonác  <ossy@webkit.org>
237
238         [Qt] Text with zero font size renders as X px sometimes, causing fast/text/zero-font-size-2.html to fail
239         https://bugs.webkit.org/show_bug.cgi?id=100115
240
241         Reviewed by Noam Rosenthal.
242
243         * platform/graphics/qt/FontQt.cpp:
244         (WebCore::Font::drawGlyphs):
245
246 2012-10-29  Huang Dongsung  <luxtella@company100.net>
247
248         [TexMap] Make GraphicsLayerAnimation choose a proper timing function.
249         https://bugs.webkit.org/show_bug.cgi?id=100623
250
251         Reviewed by Noam Rosenthal.
252
253         Currently, GraphicsLayerAnimation chooses a timing function in the wrong
254         way. Other GraphicsLayers choose a timing function in the similar way to
255         GraphicsLayerCA::timingFunctionForAnimationValue(). The way consists of
256         the following steps.
257         1. Try to query the timing function of the current keyframe animation value.
258         2. If the timing function of #1 is null, try to query the timing function of Animation.
259         3. If the timing function of #2 is null, return CubicBezierTimingFunction::defaultTimingFunction().
260
261         This patch makes GraphicsLayerAnimation choose a timing function in the same way
262         to other implementations.
263
264         Covered by existing animations tests.
265
266         * platform/graphics/GraphicsLayerAnimation.cpp:
267         (WebCore::timingFunctionForAnimationValue):
268         (WebCore::GraphicsLayerAnimation::apply):
269
270 2012-10-29  Patrick Dubroy  <dubroy@chromium.org>
271
272         Web Inspector: Toolbar overflow appears outside window
273         https://bugs.webkit.org/show_bug.cgi?id=100663
274
275         Reviewed by Pavel Feldman.
276
277         Since the search bar was removed from the toolbar, the overflow menu appears too far
278         to the right, and is unreadable. Fixed this by aligning it relative to the right side
279         of the window, rather than the left.
280
281         * inspector/front-end/Toolbar.js:
282         (WebInspector.ToolbarDropdown.prototype.show):
283         * inspector/front-end/inspector.css:
284         (#toolbar-dropdown .toolbar-label):
285
286 2012-10-29  Michelangelo De Simone  <michelangelo@webkit.org>
287
288         [CSS Shaders] Implement CustomFilterArrayParameter::blend
289         https://bugs.webkit.org/show_bug.cgi?id=96437
290
291         Reviewed by Dean Jackson.
292
293         This patch adds the missing code to blend values within
294         an array() when using Custom Filters.
295
296         Test: css3/filters/custom/custom-filter-array-blending.html
297
298         * platform/graphics/filters/CustomFilterArrayParameter.h:
299         (WebCore::CustomFilterArrayParameter::blend):
300
301 2012-10-29  Alexander Pavlov  <apavlov@chromium.org>
302
303         Web Inspector: Drag and drop a URL in inspector is not working as expected
304         https://bugs.webkit.org/show_bug.cgi?id=100527
305
306         Reviewed by Yury Semikhatsky.
307
308         Inhibit custom dragstart handling when the active element is A.
309
310         * inspector/front-end/ElementsTreeOutline.js:
311         (WebInspector.ElementsTreeOutline.prototype._ondragstart):
312
313 2012-10-29  Mike West  <mkwst@chromium.org>
314
315         Web Inspector: Error/warning count is one pixel off.
316         https://bugs.webkit.org/show_bug.cgi?id=100660
317
318         Reviewed by Pavel Feldman.
319
320         The error/warning count div had a top padding of 6. That was one pixel
321         too many.
322
323         * inspector/front-end/inspector.css:
324         (#error-warning-count):
325
326 2012-10-29  Shinya Kawanaka  <shinyak@chromium.org> 
327
328         [Refactoring] Use isActiveInsertionPoint() instead of isInsertionPoint()
329         https://bugs.webkit.org/show_bug.cgi?id=100459
330
331         Reviewed by Hajime Morita.
332
333         Checking InsertionPoint and its activeness with two if-statement is error-prone. We would like to
334         use a utility function which checks both at once.
335
336         We rewrite some lines with such function.
337
338         No new tests, simple refactoring.
339
340         * dom/ComposedShadowTreeWalker.cpp:
341         (WebCore::ComposedShadowTreeWalker::traverseNode):
342         * html/shadow/ContentDistributor.cpp:
343         (WebCore::ContentDistributor::populate):
344         (WebCore::ContentDistributor::distribute):
345         (WebCore::ContentDistributor::distributeNodeChildrenTo):
346         * html/shadow/InsertionPoint.h:
347         (WebCore::isInsertionPoint): Since our convention is the argument of this kind of function should not be null,
348         we would like to make it similar to the other functions.
349         (WebCore::toInsertionPoint):
350         (WebCore::isLowerEncapsulationBoundary):
351
352 2012-10-29  Patrick Dubroy  <dubroy@chromium.org>
353
354         Web Inspector: Fix vertical alignment in toolbar backgrounds and overflow button.
355         https://bugs.webkit.org/show_bug.cgi?id=100373
356
357         Reviewed by Pavel Feldman.
358
359         Fix the background image for the selected toolbar item to be vertically centered.
360         Make close button and toolbar overflow button vertically centered for any toolbar
361         height.
362
363         * inspector/front-end/Toolbar.js: Remove unused variable.
364         * inspector/front-end/inspector.css:
365         (.toolbar-item.toggleable):
366         (body.compact .toolbar-item.toggleable):
367         (.toolbar-item.toggleable.toggled-on):
368         (body.compact .toolbar-label):
369         (#toolbar-dropdown-arrow):
370         (#close-button-left, #close-button-right):
371         (.toolbar-item.close-left):
372         * inspector/front-end/inspector.html:
373
374 2012-10-29  Eugene Klyuchnikov  <eustas.bug@gmail.com>
375
376         Web Inspector: Timeline: Overview bars do not correspond to timeline bars
377         https://bugs.webkit.org/show_bug.cgi?id=100500
378
379         Reviewed by Yury Semikhatsky.
380
381         Fix: do not shorten bars by nested records of the same category.
382
383         * inspector/front-end/TimelineOverviewPane.js: Check added.
384
385 2012-10-29  Eugene Klyuchnikov  <eustas.bug@gmail.com>
386
387         Web Inspector: Timeline: make cpu-monitoring feature available only on capable browsers
388         https://bugs.webkit.org/show_bug.cgi?id=100530
389
390         Reviewed by Yury Semikhatsky.
391
392         Motivation: cpu-monitoring feature looks like a glitch,
393         when it is not supported by browser.
394
395         * inspector/Inspector.json: Added capability getter to protocol.
396         * inspector/InspectorClient.h: Added capability getter.
397         * inspector/InspectorTimelineAgent.cpp: Proxy to request to client.
398         * inspector/InspectorTimelineAgent.h: Added capability getter.
399         * inspector/front-end/Settings.js: Added capability field.
400         * inspector/front-end/TimelinePanel.js: Check capability.
401         * inspector/front-end/inspector.js: Forward capability value.
402
403 2012-10-29  Antti Koivisto  <antti@apple.com>
404
405         Move seamless stylesheet collecting to DocumentStyleSheetCollection
406         https://bugs.webkit.org/show_bug.cgi?id=100655
407
408         Reviewed by Andreas Kling.
409
410         Move the code from StyleResolver to DocumentStyleSheetCollection. StyleResolver should focus on resolving style.
411
412         * css/StyleResolver.cpp:
413         (WebCore::StyleResolver::StyleResolver):
414         
415             Use standard create() pattern.
416
417         (WebCore):
418         * css/StyleResolver.h:
419         (StyleResolver):
420         * dom/Document.cpp:
421         (WebCore::Document::Document):
422         * dom/DocumentStyleSheetCollection.cpp:
423         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
424         
425             Since parent activeAuthorStyleSheets() contains all seamlessly inherited sheets too, this does not need to
426             iterate to ancestors anymore.
427
428         (WebCore):
429         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
430         * dom/DocumentStyleSheetCollection.h:
431         (WebCore::DocumentStyleSheetCollection::create):
432         (DocumentStyleSheetCollection):
433         (WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList):
434         (WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets):
435         
436             activeAuthorStyleSheets() now includes the stylesheets inherited from the seamless parent too.
437
438         (WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):
439
440 2012-10-29  Andreas Kling  <kling@webkit.org>
441
442         Don't expose implementation details of StylePropertySet storage.
443         <http://webkit.org/b/100644>
444
445         Reviewed by Antti Koivisto.
446
447         Add a StylePropertySet::PropertyReference class, now returned by propertyAt(index).
448         This will allow us to refactor the internal storage of StylePropertySet without
449         breaking its API.
450
451         A PropertyReference is a simple inlinable wrapper around a StylePropertySet&/index pair.
452
453         * css/CSSComputedStyleDeclaration.cpp:
454         * css/CSSParser.cpp:
455         * css/CSSParser.h:
456         * css/SVGCSSParser.cpp:
457         * css/StylePropertySet.cpp:
458         (WebCore::StylePropertySet::asText):
459         (WebCore::StylePropertySet::mergeAndOverrideOnConflict):
460         (WebCore::StylePropertySet::findPropertyWithId):
461         (WebCore::StylePropertySet::reportMemoryUsage):
462         * css/StylePropertySet.h:
463         (StylePropertySet):
464         (PropertyReference):
465         (WebCore::StylePropertySet::PropertyReference::PropertyReference):
466         (WebCore::StylePropertySet::PropertyReference::id):
467         (WebCore::StylePropertySet::PropertyReference::isImportant):
468         (WebCore::StylePropertySet::PropertyReference::isInherited):
469         (WebCore::StylePropertySet::PropertyReference::cssName):
470         (WebCore::StylePropertySet::PropertyReference::cssText):
471         (WebCore::StylePropertySet::PropertyReference::value):
472         (WebCore::StylePropertySet::PropertyReference::propertyInternal):
473         (WebCore::StylePropertySet::propertyAt):
474         (WebCore::StylePropertySet::propertyAtInternal):
475         (WebCore):
476         * css/StyleResolver.cpp:
477         (WebCore::attributeStylesEqual):
478         (WebCore::StyleResolver::applyProperties):
479         (WebCore::StyleResolver::resolveVariables):
480         * editing/ApplyStyleCommand.cpp:
481         * editing/EditingStyle.cpp:
482         (WebCore::EditingStyle::mergeStyle):
483         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
484         * editing/Editor.cpp:
485         * editing/markup.cpp:
486         * page/Frame.cpp:
487         * svg/SVGFontFaceElement.cpp:
488
489 2012-10-29  Kent Tamura  <tkent@chromium.org>
490
491         Move LocaleWin.{cpp,h} to platform/text/win/
492         https://bugs.webkit.org/show_bug.cgi?id=100641
493
494         Reviewed by Kentaro Hara.
495
496         We have platform/text/win/ directory. Windows-specific files should be
497         in it.
498         Note that these files are used only in Chromium-win for now.
499
500         No new tests. This doesn't change any behavior.
501
502         * WebCore.gyp/WebCore.gyp: Fix path names.
503         * WebCore.gypi: Ditto.
504         * platform/text/win/LocaleWin.cpp: Renamed from Source/WebCore/platform/text/LocaleWin.cpp.
505         * platform/text/win/LocaleWin.h: Renamed from Source/WebCore/platform/text/LocaleWin.h.
506
507 2012-10-29  Kent Tamura  <tkent@chromium.org>
508
509         Rename Localizer to Locale
510         https://bugs.webkit.org/show_bug.cgi?id=100634
511
512         Reviewed by Kentaro Hara.
513
514         - Rename Localizer class to Locale
515         - Rename localizer with locale in variable names
516         - Rename localizer with locale in function names
517
518         No new tests. This doesn't make any behavior changes.
519
520         * dom/Document.h:
521         (WebCore): Declare Locale instead of Localizer.
522         (Document):
523         - Rename getCachedLocalizer to getCachedLocale.
524         - Rename LocaleToLocalizerMap to LocaleIdentifierToLocaleMap.
525         - Rename m_localizerCache to m_localeCache.
526         * dom/Document.cpp:
527         (WebCore::Document::getCachedLocale): Follow renamings.
528         * dom/Element.h:
529         (WebCore): Declare Locale instead of Localizer.
530         (Element): Rename localizer() to locale().
531         * dom/Element.cpp:
532         (WebCore::Element::locale): Follow renamings.
533
534         * html/BaseDateAndTimeInputType.cpp:
535         (WebCore::BaseDateAndTimeInputType::localizeValue): Ditto.
536         (WebCore::BaseDateAndTimeInputType::convertFromVisibleValue): Ditto.
537         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
538         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Ditto.
539         * html/DateInputType.cpp:
540         (WebCore::DateInputType::fixedPlaceholder): Ditto.
541         (WebCore::DateInputType::setupLayoutParameters): Ditto.
542         * html/DateTimeInputType.cpp:
543         (WebCore::DateTimeInputType::setupLayoutParameters): Ditto.
544         * html/DateTimeLocalInputType.cpp:
545         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
546         * html/MonthInputType.cpp:
547         (WebCore::MonthInputType::setupLayoutParameters): Ditto.
548         * html/NumberInputType.cpp:
549         (WebCore::NumberInputType::localizeValue): Ditto.
550         (WebCore::NumberInputType::convertFromVisibleValue): Ditto.
551         * html/TimeInputType.cpp:
552         (WebCore::TimeInputType::localizeValue): Ditto.
553         (WebCore::TimeInputType::setupLayoutParameters): Ditto.
554
555         * html/shadow/DateTimeEditElement.h:
556         (WebCore): Declare Locale instead of Localizer.
557         (LayoutParameters): Rename localizer data member to locale.
558         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters): Follow renamings.
559         * html/shadow/DateTimeEditElement.cpp:
560         (WebCore::DateTimeEditBuilder::visitField): Ditto.
561         * html/shadow/DateTimeNumericFieldElement.h:
562         (DateTimeNumericFieldElement): Rename localizerForOwner to localeForOwner.
563         * html/shadow/DateTimeNumericFieldElement.cpp:
564         (WebCore::DateTimeNumericFieldElement::formatValue): Follow renamings.
565         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent): Ditto.
566         (WebCore::DateTimeNumericFieldElement::localeForOwner): Ditto.
567         * page/PagePopupClient.h:
568         (WebCore): Declare Locale instead of Localizer.
569         (PagePopupClient): Rename localizer member function to locale.
570         * page/PagePopupController.cpp:
571         (WebCore::PagePopupController::localizeNumberString): Follow renamings.
572
573         * platform/text/PlatformLocale.cpp: Rename the Localizer class to Locale.
574         (DateTimeStringBuilder):
575         (WebCore::DateTimeStringBuilder::DateTimeStringBuilder):
576         (WebCore::Locale::~Locale):
577         (WebCore::Locale::setLocaleData): Renamed from setLocalizerData.
578         (WebCore::Locale::convertToLocalizedNumber):
579         (WebCore::Locale::detectSignAndGetDigitRange):
580         (WebCore::Locale::matchedDecimalSymbolIndex):
581         (WebCore::Locale::convertFromLocalizedNumber):
582         (WebCore::Locale::localizedDecimalSeparator):
583         (WebCore::Locale::dateTimeFormatWithSeconds):
584         (WebCore::Locale::dateTimeFormatWithoutSeconds):
585         (WebCore::Locale::formatDateTime):
586         * platform/text/PlatformLocale.h: Update the ifndef macro.
587         (Locale): Renamed from Localizer. Also, renamed the followings:
588          - initializeLocalizerData -> initializeLocaleData
589          - setLocalizerData -> setLocaleData
590          - m_hasLocalizerData -> m_hasLocaleData
591         (WebCore::Locale::Locale):
592         (WebCore::Locale::createDefault):
593         * platform/text/LocaleICU.cpp: Follow renamings.
594         * platform/text/LocaleICU.h: Ditto.
595         * platform/text/LocaleNone.cpp: Ditto.
596         * platform/text/LocaleWin.cpp: Ditto.
597         * platform/text/LocaleWin.h: Ditto.
598         * platform/text/mac/LocaleMac.h: Ditto.
599         * platform/text/mac/LocaleMac.mm: Ditto.
600
601 2012-10-29  Mike West  <mkwst@chromium.org>
602
603         Web Inspector: Error messages lines in console are 1px taller than regular messages
604         https://bugs.webkit.org/show_bug.cgi?id=100521
605
606         Reviewed by Pavel Feldman.
607
608         The inspector is adding a 1px bottom border to list elements inside
609         a disclosure list. This is unnecessary in the current layout; it's
610         causing console messages with stack traces to be one pixel taller than
611         other console messages, which this patch fixes.
612
613         As a drive-by, this patch also adjusts the disclosure triangle's
614         position to match.
615
616         * inspector/front-end/inspector.css:
617         (.outline-disclosure li):
618         (.outline-disclosure li.parent::before):
619
620 2012-10-29  Mike West  <mkwst@chromium.org>
621
622         Web Inspector: The bubble for repeated errors is misplaced.
623         https://bugs.webkit.org/show_bug.cgi?id=100525
624
625         Reviewed by Pavel Feldman.
626
627         The repeated-message bubble is displayed as an inline-block element,
628         which works well as long as no stack trace is present. If present, the
629         message is wrapped in an 'ol' element displayed as a block, which pushes
630         itself down to the next line.
631
632         To avoid that issue, this patch switches the wrapper element to flexbox,
633         glorious flexbox.
634
635         * inspector/front-end/inspector.css:
636         (.console-message .bubble):
637         (.repeated-message .outline-disclosure):
638         (.filter-all .console-log-level.repeated-message, .filter-logs .console-log-level.repeated-message):
639
640 2012-10-29  Alexander Pavlov  <apavlov@chromium.org>
641
642         Web Inspector: [Styles] Handle non-parsedOk properties as inactive ones
643         https://bugs.webkit.org/show_bug.cgi?id=100119
644
645         Reviewed by Vsevolod Vlasov.
646
647         Test: inspector/styles/inactive-properties.html
648
649         * inspector/front-end/StylesSidebarPane.js:
650         (WebInspector.StylesSidebarPane.createExclamationMark):
651         (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
652         * inspector/front-end/elementsPanel.css:
653         (.styles-section.computed-style .properties li.not-parsed-ok):
654         (.styles-section.computed-style .properties li.not-parsed-ok img.exclamation-mark):
655         (.styles-section .properties .not-parsed-ok):
656
657 2012-10-29  Eric Seidel  <eric@webkit.org>
658
659         Make rendering tables with <colgroups> twice as fast by avoiding walking the DOM for colgroups 4 times for each cell
660         https://bugs.webkit.org/show_bug.cgi?id=100630
661
662         Reviewed by Ojan Vafai.
663
664         This is not a complete fix.  Our rendering of this large tables still takes 7.8 seconds
665         on my retina MBP (down from 14.3s before this change).
666         It's very expensive to walk the DOM each time we call RenderTable::colElement
667         so this caches the RenderTableCol* in a vector for easier walking.
668         We invalidate the cache any time a RenderTableCol is added or removed from the
669         rendering sub-tree to avoid holding a bad pointer.
670
671         * rendering/RenderTable.cpp:
672         (WebCore::RenderTable::RenderTable):
673         (WebCore::RenderTable::invalidateCachedColumns):
674         (WebCore):
675         (WebCore::RenderTable::addColumn):
676         (WebCore::RenderTable::removeColumn):
677         (WebCore::RenderTable::updateColumnCache):
678         (WebCore::RenderTable::slowColElement):
679         * rendering/RenderTable.h:
680         (RenderTable):
681         * rendering/RenderTableCol.cpp:
682         (WebCore::RenderTableCol::insertedIntoTree):
683         (WebCore):
684         (WebCore::RenderTableCol::willBeRemovedFromTree):
685         * rendering/RenderTableCol.h:
686
687 2012-10-28  Kent Tamura  <tkent@chromium.org>
688
689         Rename Localizer.{cpp,h} to PlatformLocale.{cpp,h}
690         https://bugs.webkit.org/show_bug.cgi?id=100627
691
692         Reviewed by Yuta Kitamura.
693
694         We'd like to rename Localizer class to Locale class. However we use
695         PlatformLocale.cpp and PlatformLocale.h as their file names because
696         <locale.h> exists in the C standard.  In this patch, we rename only file
697         names. We're going to rename the class name later.
698
699         No new tests. This doesn't make any behavior change.
700
701         * platform/text/PlatformLocale.h: Renamed from Source/WebCore/platform/text/Localizer.h.
702         * platform/text/PlatformLocale.cpp: Renamed from Source/WebCore/platform/text/Localizer.cpp.
703         Follow the Localizer.h -> PlatformLocale.cpp renaming.
704
705         * CMakeLists.txt: Follow the file name renaming.
706         * GNUmakefile.list.am: Ditto.
707         * Target.pri: Ditto.
708         * WebCore.gypi: Ditto.
709         * WebCore.vcproj/WebCore.vcproj: Ditto.
710         * WebCore.xcodeproj/project.pbxproj: Ditto.
711         * dom/Document.cpp: Ditto.
712         * html/BaseDateAndTimeInputType.cpp: Ditto.
713         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Ditto.
714         * html/DateInputType.cpp: Ditto.
715         * html/DateTimeInputType.cpp: Ditto.
716         * html/DateTimeLocalInputType.cpp: Ditto.
717         * html/MonthInputType.cpp: Ditto.
718         * html/NumberInputType.cpp: Ditto.
719         * html/TimeInputType.cpp: Ditto.
720         * html/shadow/DateTimeEditElement.cpp: Ditto.
721         * html/shadow/DateTimeNumericFieldElement.cpp: Ditto.
722         * page/PagePopupController.cpp: Ditto.
723         * platform/text/LocaleICU.h: Ditto.
724         * platform/text/LocaleNone.cpp: Ditto.
725         * platform/text/LocaleWin.h: Ditto.
726         * platform/text/mac/LocaleMac.h: Ditto.
727
728 2012-10-28  Shinya Kawanaka  <shinyak@chromium.org>
729
730         The shadow element is not reprojected to a nested ShadowRoot.
731         https://bugs.webkit.org/show_bug.cgi?id=99228
732
733         Reviewed by Dimitri Glazkov.
734
735         We support shadow reprojection; elements distributed to <shadow> element can be reprojected to <content> now.
736
737         First, we have a distribution vector for each InsertionPoint, even if InsertionPoint is a shadow insertion point.
738         And we update a node-distribution map. Basically We're creating a map from node to InsertionPoint in ElementShadow.
739         If a node can be distributed to several InsertionPoint (e.g. in case reprojection happens),
740         the InsertionPoint in older ShadowDOM is chosen.
741
742         We also fix ComposedShadowTreeWalker to consider shadow reprojection.
743
744         Tests: fast/dom/shadow/composed-shadow-tree-walker-shadow-reprojection.html
745                fast/dom/shadow/shadow-reprojection-click.html
746                fast/dom/shadow/shadow-reprojection-dynamic.html
747                fast/dom/shadow/shadow-reprojection-fallback.html
748                fast/dom/shadow/shadow-reprojection.html
749                fast/dom/shadow/shadow-reprojection2.html
750
751         * css/StyleResolver.cpp:
752         (WebCore::shouldResetStyleInheritance): Now context.insertionPoint() returns the final insertion point where
753         a node is distributed. So we don't have to trace shadow insertion point anymore here.
754         (WebCore::StyleResolver::styleForElement): Since a direct child of ShadowRoot can be distributed now. In that case,
755         we don't have any parentElement. The parent node is a ShadowRoot in that case.
756         * dom/ComposedShadowTreeWalker.cpp:
757         (WebCore::nodeCanBeDistributed): If a node can be distributed, returns true.
758         (WebCore):
759         (WebCore::resolveReprojection): Resolves content-reprojection and shadow-reprojection both.
760         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
761         (WebCore::ComposedShadowTreeWalker::traverseParent):
762         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost): A case ShadowRoot is assigned
763         to some InsertionPoint should be handled with in traverseSiblingOrBackToInsertionPoint. So we remove it.
764         (WebCore::AncestorChainWalker::parent): Now we have a case that a direct child of ShadowRoot can be distributed.
765         In that case, we should not update m_distributedNode.
766         * dom/ElementShadow.cpp:
767         (WebCore::ElementShadow::insertionPointFor): Since we have a distribution vector for each InsertionPoint,
768         we don't have a special case that a ShadowRoot is assigned to some InsertionPoint. Actually the existing code
769         is not correct now due to shadow reprojection.
770         * html/shadow/ContentDistributor.cpp:
771         (WebCore::ContentDistributor::populate): Populate a POOL. If a node is InsertionPoint, we fill it with the
772         distributed nodes.
773         (WebCore):
774         (WebCore::ContentDistributor::distribute): Since we want to make a distribution vector for each InsertionPoint,
775         we have to resolve a shadow InsertionPoint
776         (WebCore::ContentDistributor::distributeNodeChildrenTo):
777         * html/shadow/ContentDistributor.h:
778         (ContentDistributor):
779         * html/shadow/HTMLShadowElement.h:
780         (WebCore::toHTMLShadowElement):
781         (WebCore):
782         * html/shadow/InsertionPoint.h:
783         (WebCore::parentNodeForDistribution):
784         (WebCore::parentElementForDistribution):
785         (WebCore):
786
787 2012-10-28  Kunihiko Sakamoto  <ksakamoto@chromium.org>
788
789         Webkit adds a boundary to the Content-Type: text/plain POST header
790         https://bugs.webkit.org/show_bug.cgi?id=100445
791
792         Reviewed by Kent Tamura.
793
794         Fixed a bug where an empty boundary parameter was added to Content-Type
795         header when POSTing forms with enctype=text/plain.
796
797         Test: http/tests/misc/form-post-textplain.html
798
799         * loader/FormSubmission.cpp:
800         (WebCore::FormSubmission::populateFrameLoadRequest): Add boundary parameter to
801         Content-Type only when a boundary string is generated.
802
803 2012-10-28  Philip Rogers  <pdr@google.com>
804
805         Cache calcMode() value for SVG animations.
806         https://bugs.webkit.org/show_bug.cgi?id=99694
807
808         Reviewed by Eric Seidel.
809
810         This patch refactors SVGAnimationElement::calcMode() to return a cached value instead
811         of recalculating its value on every call. On a simple test of 100 rectangles with 100
812         animations each, calls to calcMode() account for 3% of the total animation. After this
813         patch, calcMode() no longer appears in animation profiles at all.
814
815         No new tests as this functionality is covered by existing tests.
816
817         * svg/SVGAnimateMotionElement.cpp:
818         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
819
820             The default calcMode for all animation types is linear except AnimateMotion,
821             which defaults to CalcModePaced.
822             See: http://www.w3.org/TR/SVG/single-page.html#animate-CalcModeAttribute
823
824         * svg/SVGAnimationElement.cpp:
825         (WebCore::SVGAnimationElement::SVGAnimationElement):
826         (WebCore::SVGAnimationElement::isSupportedAttribute):
827         (WebCore::SVGAnimationElement::parseAttribute):
828         (WebCore::SVGAnimationElement::setCalcMode):
829         * svg/SVGAnimationElement.h:
830         (WebCore::SVGAnimationElement::calcMode):
831         (WebCore::SVGAnimationElement::setCalcMode):
832         (SVGAnimationElement):
833
834 2012-10-28  Dimitri Glazkov  <dglazkov@chromium.org>
835
836         Get rid of StyleResolver state related to unknown pseudo-elements.
837         https://bugs.webkit.org/show_bug.cgi?id=100582
838
839         Reviewed by Eric Seidel.
840
841         All of the state, related to unknown pseudo-elements is already understood at the time of collecting rules.
842         We can just get rid of most of this code in StyleResolver.
843
844         At the time of matching rules, we know for certain that only rules that contain unknown pseudo-elements,
845         or are UA rules, or are explicitly invited by a TreeScope will match. So we can just return early in many cases.
846
847         No change in behavior, covered by existing tests.
848
849         * css/SelectorChecker.cpp:
850         (WebCore::SelectorChecker::checkSelector): Removed now-unnecessary param.
851         (WebCore::SelectorChecker::checkOneSelector): Ditto.
852         * css/SelectorChecker.h:
853         (SelectorChecker): Ditto.
854         * css/StyleResolver.cpp:
855         (WebCore::StyleResolver::StyleResolver): Ditto.
856         (MatchingUARulesScope): Moved class definition here, since we now use it in a different place.
857         (WebCore::StyleResolver::collectMatchingRules): Changed the logic to stop matching rules that definitely won't match in a different scope.
858         (WebCore::StyleResolver::collectMatchingRulesForList): Removed code that's now unnecesssary.
859         (WebCore::StyleResolver::checkSelector): Removed now-unnecessary param.
860         (WebCore::StyleResolver::checkRegionSelector): Removed weird dead code.
861         * css/StyleResolver.h:
862         (StyleResolver): Removed now-unnecessary member.
863
864 2012-10-28  Sheriff Bot  <webkit.review.bot@gmail.com>
865
866         Unreviewed, rolling out r132696.
867         http://trac.webkit.org/changeset/132696
868         https://bugs.webkit.org/show_bug.cgi?id=100609
869
870         Needs a bit more clean-up on Chrome Web UI side. (Requested by
871         dglazkov on #webkit).
872
873         * rendering/RenderBlock.cpp:
874         (WebCore::RenderBlock::updateFirstLetter):
875         * rendering/RenderListBox.h:
876         * rendering/RenderObjectChildList.cpp:
877         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
878
879 2012-10-27  Alexey Proskuryakov  <ap@apple.com>
880
881         All tests crash in WebKit1 mode
882         https://bugs.webkit.org/show_bug.cgi?id=100602
883
884         Reviewed by Sam Weinig.
885
886         * platform/PlatformStrategies.cpp: (WebCore::setPlatformStrategies): Fix an incorrect
887         assertion - if this function is called twice, it should be with the same strategy.
888
889 2012-10-27  Anders Carlsson  <andersca@apple.com>
890
891         Fix AVFoundation build.
892
893         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
894         (WebCore::MediaPlayerPrivateAVFoundationObjC::addKey):
895
896 2012-10-27  David Barton  <dbarton@mathscribe.com>
897
898         ASSERTION FAILED: m_next in LayoutState.cpp
899         https://bugs.webkit.org/show_bug.cgi?id=99796
900
901         Reviewed by Eric Seidel.
902
903         Before RenderMathMLBlock::computeChildrenPreferredLogicalHeights calls child->layoutIfNeeded(),
904         it must ensure a layoutState exists. We disable it in any case, since we are just calculating
905         metrics here, and the final layout may well happen again.
906
907         No new tests. I don't know how to create an automated test for this. The crashes users are
908         seeing are flaky.
909
910         * rendering/mathml/RenderMathMLBlock.cpp:
911         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
912
913 2012-10-27  David Barton  <dbarton@mathscribe.com>
914
915         [MathML] Improve some addChild methods
916         https://bugs.webkit.org/show_bug.cgi?id=98791
917
918         Reviewed by Eric Seidel.
919
920         MathML addChild methods need to handle any anonymous renderers correctly. Actually, most MathML elements have a fixed
921         number of children, so conformant javascript won't be doing arbitrary addChild and removeChild calls. However, we don't
922         want any assertions to fail, and we do want addChild to work correctly when beforeChild == 0, to build up the original
923         renderer, and then replaceChild at least should work correctly after that. We therefore clean up these routines before
924         giving them to the chromium fuzzers.
925         
926         It's best to build the anonymous wrappers just once initially if possible, so empty wrappers aren't left in the render
927         tree after later removeChild calls.
928
929         Test: mathml/presentation/dynamic.html added for mfrac and msqrt. There are already tests for dynamically changing
930         msub/sup elements, in mathml/presentation/m*-changed.xhtml.
931
932         * rendering/mathml/RenderMathMLFraction.cpp:
933         (WebCore::RenderMathMLFraction::addChild):
934             - The two wrappers are built initially. Also, the old RenderMathMLBlock::addChild(row, beforeChild); doesn't really
935               work because beforeChild is buried inside a wrapper. This new routine allows the numerator and denominator to be
936               added initially, and then later replaced with replaceChild. It's not clear whether e.g. a plain removeChild of a
937               numerator should move the remaining child from the denominator to the numerator or not, so we ignore that for now.
938         * rendering/mathml/RenderMathMLRoot.cpp:
939         (WebCore::RenderMathMLRoot::addChild):
940             - A bit of bullet-proofing for the fuzzers.
941         * rendering/mathml/RenderMathMLSubSup.cpp:
942         (WebCore::RenderMathMLSubSup::addChild):
943             - Like RenderMathMLFraction::addChild, we create the wrappers once initially, and then fill them dynamically.
944
945 2012-10-27  Levi Weintraub  <leviw@chromium.org>
946
947         Background images can incorrectly repeat with sub-pixel layout
948         https://bugs.webkit.org/show_bug.cgi?id=94622
949
950         Reviewed by Emil A Eklund.
951
952         Attempting to better match author expectations when painting tiled background images. When under
953         the effects of zoom with sub-pixel layout enabled, the drawn size of a rendered element can
954         differ depending on its location. This change looks at the size of the scaled tiled background
955         image size, and either ceils or floors that value depending on if tiling that value will
956         result in us being one pixel or less short of covering the background size. This is a heuristic,
957         as sub-pixel/zooming isn't specced.
958
959         Test: fast/sub-pixel/scaled-background-image.html
960
961         * rendering/RenderBoxModelObject.cpp:
962         (WebCore::applySubPixelHeuristicForTileSize):
963         (WebCore):
964         (WebCore::RenderBoxModelObject::calculateFillTileSize):
965
966 2012-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
967
968         Unreviewed, rolling out r132725.
969         http://trac.webkit.org/changeset/132725
970         https://bugs.webkit.org/show_bug.cgi?id=100596
971
972         it broke linking on chromium debug bots (Requested by loislo
973         on #webkit).
974
975         * inspector/InspectorMemoryAgent.cpp:
976         (WebCore::addPlatformComponentsInfo):
977         (WebCore):
978         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
979         * platform/MemoryUsageSupport.cpp:
980         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
981         * platform/MemoryUsageSupport.h:
982         (ComponentInfo):
983         (WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo):
984         (MemoryUsageSupport):
985         * platform/PlatformMemoryInstrumentation.cpp:
986         (WebCore):
987         * platform/PlatformMemoryInstrumentation.h:
988         (PlatformMemoryTypes):
989         * platform/chromium/MemoryUsageSupportChromium.cpp:
990         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
991         * platform/qt/MemoryUsageSupportQt.cpp:
992         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
993
994 2012-10-27  Dan Bernstein  <mitz@apple.com>
995
996         REAL_PLATFORM_NAME build setting is no longer needed
997         https://bugs.webkit.org/show_bug.cgi?id=100587
998
999         Reviewed by Mark Rowe.
1000
1001         Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
1002         to PLATFORM_NAME.
1003
1004         * Configurations/Base.xcconfig:
1005         * Configurations/CompilerVersion.xcconfig:
1006         * Configurations/DebugRelease.xcconfig:
1007         * Configurations/FeatureDefines.xcconfig:
1008         * Configurations/Version.xcconfig:
1009         * Configurations/WebCore.xcconfig:
1010
1011 2012-10-27  Tony Chang  <tony@chromium.org>
1012
1013         Remove internals shouldDisplayTrackKind methods; these are also on internals.settings
1014         https://bugs.webkit.org/show_bug.cgi?id=100564
1015
1016         Reviewed by Adam Barth.
1017
1018         Remove duplicate methods from internals that was just forwarding on the call to internals.settings.
1019         Also fix a bug where we didn't reset these settings properly.
1020
1021         No new tests, this is covered by existing media/track tests.
1022
1023         * testing/InternalSettings.cpp:
1024         (WebCore::InternalSettings::Backup::Backup): Properly save display track settings.
1025         (WebCore::InternalSettings::Backup::restoreTo): Restore display track settings.
1026         * testing/InternalSettings.h:
1027         * testing/InternalSettings.idl: Use [Conditional=VIDEO_TRACK].
1028         * testing/Internals.cpp: Remove code.
1029         * testing/Internals.h: Remove code.
1030         * testing/Internals.idl: Remove code.
1031
1032 2012-10-26  Ilya Tikhonovsky  <loislo@chromium.org>
1033
1034         Web Inspector: instrument chromium GlyphCache. It keeps ~2mb.
1035         https://bugs.webkit.org/show_bug.cgi?id=100515
1036
1037         Reviewed by Yury Semikhatsky.
1038
1039         I replaced old version with an abstract number with new one which precisely reports allocated SkGlyphCache objects and their sizes.
1040
1041         * inspector/InspectorMemoryAgent.cpp:
1042         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1043         * platform/MemoryUsageSupport.cpp:
1044         (WebCore::MemoryUsageSupport::reportMemoryUsage):
1045         * platform/MemoryUsageSupport.h:
1046         (MemoryUsageSupport):
1047         * platform/PlatformMemoryInstrumentation.cpp:
1048         (WebCore):
1049         * platform/PlatformMemoryInstrumentation.h:
1050         (PlatformMemoryTypes):
1051         * platform/chromium/MemoryUsageSupportChromium.cpp:
1052         (reportMemoryUsage):
1053         (WebCore::reportGlyphCache):
1054         (WebCore):
1055         (WebCore::MemoryUsageSupport::reportMemoryUsage):
1056         * platform/qt/MemoryUsageSupportQt.cpp:
1057         (WebCore::MemoryUsageSupport::reportMemoryUsage):
1058
1059 2012-10-26  Philip Rogers  <pdr@google.com>
1060
1061         Prevent NaN offset values in ElementTimeControl.
1062         https://bugs.webkit.org/show_bug.cgi?id=100322
1063
1064         Reviewed by Abhishek Arya.
1065
1066         NaN values can cause ElementTimeControl to go back in time!
1067         If a value of NaN is passed to ElementTimeControl::beginElementAt(offset),
1068         subsequent sorting will cause an assert in SVGSMILElement::findInstanceTime
1069         because NaN values are not properly sorted. NaN SMILTime values
1070         should not be allowed at all, so this patch adds a check for them in
1071         ElementTimeControl's setters.
1072  
1073         This patch also adds preventative asserts to catch if SMILTime is ever
1074         initialized with NaN, or if addEndTime/addBeginTime are ever called
1075         with NaN values.
1076
1077         Test: svg/custom/elementTimeControl-nan-crash.html
1078
1079         * svg/SVGAnimationElement.cpp:
1080         (WebCore::SVGAnimationElement::beginElementAt):
1081         (WebCore::SVGAnimationElement::endElementAt):
1082         * svg/animation/SMILTime.h:
1083         (WebCore::SMILTime::SMILTime):
1084         * svg/animation/SVGSMILElement.cpp:
1085         (WebCore::SVGSMILElement::addBeginTime):
1086         (WebCore::SVGSMILElement::addEndTime):
1087
1088 2012-10-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1089
1090         [BlackBerry] Browser prematurely sends wrong credentials
1091         https://bugs.webkit.org/show_bug.cgi?id=100585
1092
1093         Reviewed by Yong Li.
1094
1095         Manually revert the patch for bug 96362, which causes regressions and the right patch has been
1096         submitted with patch for bug 100448. Since the auto-revert fails, we use this patch to manually
1097         revert.
1098
1099         No new tests. The test is coverted by patch for 100448.
1100
1101         * platform/network/blackberry/CredentialBackingStore.cpp:
1102         * platform/network/blackberry/CredentialBackingStore.h:
1103         (CredentialBackingStore):
1104         * platform/network/blackberry/NetworkManager.cpp:
1105         (WebCore::NetworkManager::startJob):
1106
1107 2012-10-26  Brady Eidson  <beidson@apple.com>
1108
1109         Have NetworkProcess manage resource load scheduling.
1110         https://bugs.webkit.org/show_bug.cgi?id=100479
1111
1112         Reviewed by Alexey Proskuryakov.
1113
1114         Down in WebCore we need to virtualize a handful of ResourceLoadScheduler methods
1115         to be overridden by WebKit's implementation.
1116
1117         No new tests (No change in Core behavior).
1118
1119         * WebCore.exp.in:
1120         * WebCore.xcodeproj/project.pbxproj:
1121
1122         * loader/ResourceLoadScheduler.cpp:
1123         (WebCore::resourceLoadScheduler): Gracefully handle LoaderStrategies wanting to return the default scheduler.
1124         (WebCore::ResourceLoadScheduler::scheduleLoad): Call notifyDidScheduleResourceRequest.
1125         (WebCore::ResourceLoadScheduler::notifyDidScheduleResourceRequest): Moved InspectorInstrumentation call
1126           here so derived classes can do it indirectly.
1127         (WebCore::ResourceLoadScheduler::startResourceLoader): To allow derived classes the ability to call
1128           ResourceLoader::start() which only ResourceLoadScheduler can do.
1129
1130         * loader/ResourceLoadScheduler.h:
1131         (ResourceLoadScheduler): Virtualize some core public methods so they can be overridden.
1132         (WebCore::ResourceLoadScheduler::setSerialLoadingEnabled): Make virtual.
1133         (WebCore::ResourceLoadScheduler::isSuspendingPendingRequests): Make private as it's internal only.
1134
1135         * loader/ResourceLoader.cpp:
1136         (WebCore::ResourceLoader::setIdentifier): Add this setter so outside clients can manually change the identifier.
1137
1138         * loader/ResourceLoader.h:
1139         (WebCore::ResourceLoader::identifier): Change identifier to explicitly be uint64_t.
1140         (WebCore::ResourceLoader::request): Make public.
1141         (ResourceLoader):
1142
1143 2012-10-26  Chris Rogers  <crogers@google.com>
1144
1145         Implement AudioBufferSourceNode .loopStart and .loopEnd attributes
1146         https://bugs.webkit.org/show_bug.cgi?id=100170
1147
1148         Reviewed by Kenneth Russell.
1149
1150         AudioBufferSourceNode currently only supports looping of an entire AudioBuffer.
1151         Sample-based synthesis is a very common technique which requires "internal" loop-points.
1152         For example, the first part of the sample data might represent the attack portion of
1153         a synthesized instrument, which then enters a loop portion.
1154
1155         Tests: webaudio/audiobuffersource-loop-comprehensive.html
1156                webaudio/audiobuffersource-loop-points.html
1157
1158         * Modules/webaudio/AudioBufferSourceNode.cpp:
1159         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
1160         (WebCore::AudioBufferSourceNode::process):
1161         (WebCore::AudioBufferSourceNode::renderFromBuffer):
1162         * Modules/webaudio/AudioBufferSourceNode.h:
1163         (AudioBufferSourceNode):
1164         (WebCore::AudioBufferSourceNode::loopStart):
1165         (WebCore::AudioBufferSourceNode::loopEnd):
1166         (WebCore::AudioBufferSourceNode::setLoopStart):
1167         (WebCore::AudioBufferSourceNode::setLoopEnd):
1168         * Modules/webaudio/AudioBufferSourceNode.idl:
1169
1170 2012-10-26  Daniel Cheng  <dcheng@chromium.org>
1171
1172         dragover's default action should prevent drop for file drags
1173         https://bugs.webkit.org/show_bug.cgi?id=79173
1174
1175         Reviewed by Tony Chang.
1176
1177         During a file drag, we need to keep track of whether or not the document has cancelled the
1178         dragover action. We should only send a drop event if the dragover event was cancelled; this
1179         matches the behavior of the spec, as well as IE, Gecko, and Opera. The relevant sections
1180         from the spec are the sections pertaining to dragover and drop events at:
1181         http://www.whatwg.org/specs/web-apps/current-work/#drag-and-drop-processing-model
1182
1183         Test: fast/events/only-valid-drop-targets-receive-file-drop.html
1184
1185         * page/DragController.cpp:
1186         (WebCore::DragController::performDrag):
1187         (WebCore::DragController::dragEnteredOrUpdated):
1188         (WebCore::DragController::tryDocumentDrag):
1189         * page/DragController.h:
1190         (DragController): Cleanup to repurpose a variable that doesn't need to be a member anymore
1191                           and remove the corresponding getter/setter.
1192
1193 2012-10-26  Nico Weber  <thakis@chromium.org>
1194
1195         Fix a operator ordering bug in SVGSMILElement::calculateAnimationPercentAndRepeat
1196         https://bugs.webkit.org/show_bug.cgi?id=94756
1197
1198         Reviewed by Dirk Schulze.
1199
1200         The function has an early exit for !simpleDuration.value(), so
1201         !simpleDuration.value() always is 0 when passed as second parameter to
1202         fmod(), which means fmod() always returns NaN, which always evaluates
1203         to true. Simplify the code by removing that explicit check.
1204
1205         No observable behavior change.
1206
1207         Covered by existing svg tests.
1208
1209         * svg/animation/SVGSMILElement.cpp:
1210         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
1211
1212 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1213
1214         Unreviewed, rolling out r132695.
1215         http://trac.webkit.org/changeset/132695
1216         https://bugs.webkit.org/show_bug.cgi?id=100581
1217
1218         caused 20+ test crashes on bots (Requested by estes on
1219         #webkit).
1220
1221         * dom/ContainerNode.cpp:
1222         (WebCore::ContainerNode::suspendPostAttachCallbacks):
1223         (WebCore::ContainerNode::resumePostAttachCallbacks):
1224         * loader/MainResourceLoader.cpp:
1225         (WebCore::MainResourceLoader::loadNow):
1226         * loader/ResourceLoadScheduler.cpp:
1227         (WebCore::resourceLoadScheduler):
1228         * loader/ResourceLoadScheduler.h:
1229         * loader/ResourceLoader.cpp:
1230         (WebCore::ResourceLoader::releaseResources):
1231         (WebCore::ResourceLoader::willSendRequest):
1232         * loader/cache/CachedResource.cpp:
1233         (WebCore::CachedResource::load):
1234         * loader/cache/CachedResourceLoader.cpp:
1235         (WebCore::CachedResourceLoader::performPostLoadActions):
1236
1237 2012-10-26  Vincent Scheib  <scheib@chromium.org>
1238
1239         Unreviewed, rolling out r132702.
1240         http://trac.webkit.org/changeset/132702
1241         https://bugs.webkit.org/show_bug.cgi?id=100322
1242
1243         Compile error on Chromium Linux dbg builder (and others)
1244
1245         * svg/SVGAnimationElement.cpp:
1246         (WebCore::SVGAnimationElement::beginElementAt):
1247         (WebCore::SVGAnimationElement::endElementAt):
1248         * svg/animation/SMILTime.h:
1249         (WebCore::SMILTime::SMILTime):
1250         * svg/animation/SVGSMILElement.cpp:
1251         (WebCore::SVGSMILElement::addBeginTime):
1252         (WebCore::SVGSMILElement::addEndTime):
1253
1254 2012-10-26  Philip Rogers  <pdr@google.com>
1255
1256         Prevent NaN offset values in ElementTimeControl.
1257         https://bugs.webkit.org/show_bug.cgi?id=100322
1258
1259         Reviewed by Abhishek Arya.
1260
1261         NaN values can cause ElementTimeControl to go back in time!
1262         If a value of NaN is passed to ElementTimeControl::beginElementAt(offset),
1263         subsequent sorting will cause an assert in SVGSMILElement::findInstanceTime
1264         because NaN values are not properly sorted. NaN SMILTime values
1265         should not be allowed at all, so this patch adds a check for them in
1266         ElementTimeControl's setters.
1267
1268         This patch also adds preventative asserts to catch if SMILTime is ever
1269         initialized with NaN, or if addEndTime/addBeginTime are ever called
1270         with NaN values.
1271
1272         Test: svg/custom/elementTimeControl-nan-crash.html
1273
1274         * svg/SVGAnimationElement.cpp:
1275         (WebCore::SVGAnimationElement::beginElementAt):
1276         (WebCore::SVGAnimationElement::endElementAt):
1277         * svg/animation/SMILTime.h:
1278         (WebCore::SMILTime::SMILTime):
1279         * svg/animation/SVGSMILElement.cpp:
1280         (WebCore::SVGSMILElement::addBeginTime):
1281         (WebCore::SVGSMILElement::addEndTime):
1282
1283 2012-10-26  Tony Chang  <tony@chromium.org>
1284
1285         Move non-Settings Inspector methods from internals.settings to internals
1286         https://bugs.webkit.org/show_bug.cgi?id=100392
1287
1288         Reviewed by Adam Barth.
1289
1290         These methods don't have to do with the WebCore Settings object, so move them up to internals.
1291         I moved the reset code from InternalSettings to Internals.
1292
1293         No new tests, this is just a rename. Existing tests should pass.
1294
1295         * testing/InternalSettings.cpp:
1296         (WebCore::InternalSettings::Backup::Backup): Remove inspector methods.
1297         (WebCore::InternalSettings::Backup::restoreTo): Remove inspector methods.
1298         * testing/InternalSettings.h:
1299         * testing/InternalSettings.idl:
1300         * testing/Internals.cpp:
1301         (WebCore::Internals::resetToConsistentState): New method for resetting page state. Named after similar
1302         methods in WTR.
1303         (WebCore::Internals::setInspectorResourcesDataSizeLimits): Moved from InspectorSettings.
1304         (WebCore::Internals::setJavaScriptProfilingEnabled): Moved from InspectorSettings.
1305         * testing/Internals.h:
1306         * testing/Internals.idl:
1307         * testing/js/WebCoreTestSupport.cpp:
1308         (WebCoreTestSupport::resetInternalsObject): Reset state in Internals.
1309         * testing/v8/WebCoreTestSupport.cpp:
1310         (WebCoreTestSupport::resetInternalsObject): Reset state in Internals.
1311
1312 2012-10-26  Dominic Mazzoni  <dmazzoni@google.com>
1313
1314         AX: Notification should be sent when accessibilityIsIgnored changes
1315         https://bugs.webkit.org/show_bug.cgi?id=99547
1316
1317         Reviewed by Chris Fleizach.
1318
1319         Adds a new flag in AccessibilityObject that keeps track of the most recent
1320         value of accessibilityIsIgnored(). After certain events such as an ARIA
1321         attribute change or content change, checks the new value of
1322         accessibilityIsIgnored() and posts a "children changed" notification on the
1323         parent node if it changed, making sure the parent recomputes its vector of
1324         (unignored) children.
1325
1326         Also moves handling of attribute changes to AXObjectCache, and sends
1327         notifications for some attribute changes that were previously silent. On
1328         Chromium, all changes to an accessibility object's attributes should
1329         result in some notification.
1330
1331         Some tests would have broken because an AccessibilityScrollView was created
1332         and holding a reference to a ScrollView for an iframe after it was deleted,
1333         so this change switches AccessibilityScrollView to hold a weak reference
1334         to ScrollView instead.
1335
1336         Tests: platform/chromium/accessibility/is-ignored-change-sends-notification.html
1337                platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html
1338                platform/chromium/accessibility/text-change-notification.html
1339
1340         * accessibility/AXObjectCache.cpp:
1341         (WebCore::AXObjectCache::focusedUIElementForPage):
1342         (WebCore::AXObjectCache::getOrCreate):
1343         (WebCore::AXObjectCache::textChanged):
1344         (WebCore):
1345         (WebCore::AXObjectCache::childrenChanged):
1346         (WebCore::AXObjectCache::handleAriaRoleChanged):
1347         (WebCore::AXObjectCache::handleAttributeChanged):
1348         (WebCore::AXObjectCache::labelChanged):
1349         (WebCore::AXObjectCache::recomputeIsIgnored):
1350         * accessibility/AXObjectCache.h:
1351         (AXObjectCache):
1352         (WebCore::AXObjectCache::childrenChanged):
1353         (WebCore::AXObjectCache::textChanged):
1354         (WebCore::AXObjectCache::handleAttributeChanged):
1355         (WebCore::AXObjectCache::recomputeIsIgnored):
1356         * accessibility/AccessibilityNodeObject.cpp:
1357         (WebCore::AccessibilityNodeObject::insertChild):
1358         * accessibility/AccessibilityObject.cpp:
1359         (WebCore::AccessibilityObject::AccessibilityObject):
1360         (WebCore::AccessibilityObject::cachedIsIgnoredValue):
1361         (WebCore):
1362         (WebCore::AccessibilityObject::setCachedIsIgnoredValue):
1363         (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
1364         * accessibility/AccessibilityObject.h:
1365         (WebCore::AccessibilityObject::textChanged):
1366         (AccessibilityObject):
1367         * accessibility/AccessibilityRenderObject.cpp:
1368         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1369         (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
1370         (WebCore::AccessibilityRenderObject::textChanged):
1371         (WebCore::AccessibilityRenderObject::addHiddenChildren):
1372         (WebCore::AccessibilityRenderObject::addChildren):
1373         * accessibility/AccessibilityRenderObject.h:
1374         (AccessibilityRenderObject):
1375         * accessibility/AccessibilityScrollView.cpp:
1376         (WebCore::AccessibilityScrollView::~AccessibilityScrollView):
1377         (WebCore):
1378         (WebCore::AccessibilityScrollView::detach):
1379         (WebCore::AccessibilityScrollView::isAttachment):
1380         (WebCore::AccessibilityScrollView::widgetForAttachmentView):
1381         (WebCore::AccessibilityScrollView::updateScrollbars):
1382         (WebCore::AccessibilityScrollView::webAreaObject):
1383         (WebCore::AccessibilityScrollView::elementRect):
1384         (WebCore::AccessibilityScrollView::documentFrameView):
1385         (WebCore::AccessibilityScrollView::parentObject):
1386         (WebCore::AccessibilityScrollView::parentObjectIfExists):
1387         (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
1388         (WebCore::AccessibilityScrollView::scrollTo):
1389         * accessibility/AccessibilityScrollView.h:
1390         (WebCore::AccessibilityScrollView::scrollView):
1391         (AccessibilityScrollView):
1392         * accessibility/AccessibilityTable.cpp:
1393         (WebCore::AccessibilityTable::isDataTable):
1394         * accessibility/chromium/AXObjectCacheChromium.cpp:
1395         (WebCore::AXObjectCache::postPlatformNotification):
1396         * dom/Element.cpp:
1397         (WebCore::Element::attributeChanged):
1398         * rendering/RenderBlock.cpp:
1399         (WebCore::RenderBlock::deleteLineBoxTree):
1400         (WebCore::RenderBlock::createAndAppendRootInlineBox):
1401         * rendering/RenderObject.cpp:
1402         (WebCore::RenderObject::styleWillChange):
1403         * rendering/RenderText.cpp:
1404         (WebCore::RenderText::setText):
1405
1406 2012-10-26  Joshua Bell  <jsbell@chromium.org>
1407
1408         [WebKitIDL] Optional dictionary types should have default values of empty dictionary
1409         https://bugs.webkit.org/show_bug.cgi?id=100547
1410
1411         Reviewed by Adam Barth.
1412
1413         Per WebIDL, "Optional dictionary type arguments are always considered to have a default
1414         value of an empty dictionary." WebKitIDL already supported this via the extended attribute
1415         [Optional=DefaultIsUndefined] but make this the default for Dictionary.
1416
1417         Binding test expectations updated.
1418
1419         * Modules/filesystem/DirectoryEntry.h: Remove default parameters.
1420         (DirectoryEntry):
1421         * Modules/indexeddb/IDBDatabase.h: Remove overloads.
1422         (IDBDatabase):
1423         * Modules/indexeddb/IDBObjectStore.h: Remove overloads.
1424         (IDBObjectStore):
1425         * Modules/mediastream/RTCPeerConnection.idl: Remove DefaultIsUndefined annotations.
1426         * bindings/scripts/CodeGeneratorJS.pm: Special case for Optional Dictionary.
1427         (GenerateParametersCheck):
1428         * bindings/scripts/CodeGeneratorV8.pm: Ditto.
1429         (GenerateParametersCheck):
1430         * bindings/scripts/test/JS/JSTestObj.cpp:
1431         (WebCore::jsTestObjPrototypeFunctionOptionsObject): Updated expectation - no early call.
1432         * bindings/scripts/test/V8/V8TestObj.cpp:
1433         (WebCore::TestObjV8Internal::optionsObjectCallback): Ditto.
1434
1435 2012-10-26  Vincent Scheib  <scheib@chromium.org>
1436
1437         Generated should not be supported for things with a shadow
1438         https://bugs.webkit.org/show_bug.cgi?id=98836
1439
1440         Unreviewed rollout of rollout of http://trac.webkit.org/changeset/132269.
1441         Initial rollout was speculative and was shown not to be related to crashes.
1442         Change author: Elliott Sprehn  <esprehn@chromium.org>
1443
1444         As far as CSS is concerned inputs and things with shadow content inside 
1445         shouldn't support pseudo elements like :before, :after or :first-letter.
1446         Neither Gecko or Presto supports it, and we only accidentally supported 
1447         it. 
1448  
1449         Until the spec tells us what to do we should disable support. This is 
1450         also neccesary because the new generated content implementation doesn't 
1451         support shadows. 
1452
1453         Test: fast/forms/pseudo-elements.html
1454
1455         * rendering/RenderBlock.cpp:
1456         (WebCore::RenderBlock::updateFirstLetter):
1457         * rendering/RenderListBox.h:
1458         * rendering/RenderObjectChildList.cpp:
1459         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
1460
1461 2012-10-26  Brady Eidson  <beidson@apple.com>
1462
1463         Crash in WebProces at WebCore::ResourceLoadScheduler::crossOriginRedirectReceived + 78
1464         <rdar://problem/12575514> and https://bugs.webkit.org/show_bug.cgi?id=100554
1465
1466         Reviewed by Alexey Proskuryakov.
1467
1468         This was fallout from http://trac.webkit.org/changeset/132501 where I missed some of the 
1469         spots that call resourceLoadScheduler().
1470
1471         As a result we were creating more than one ResourceLoadScheduler, allowing the host records 
1472         to get out of sync.
1473
1474         The fix that also results in less #ifdefs scattered throughout the code is to use a single 
1475         choke point for all ResourceLoadScheduler access.
1476
1477         No new tests 
1478         (No change of behavior for the default config, not testable at this time in the repro config)
1479
1480         Add a single choke point for accessing the correct ResourceLoadScheduler:
1481         * loader/ResourceLoadScheduler.cpp:
1482         (WebCore::defaultResourceLoadScheduler): New private function that keeps the singleton default ResourceLoadScheduler.
1483         (WebCore::resourceLoadScheduler): Refactor this function to either ask the LoaderStrategy or call through to
1484
1485         Revert back to using that single choke point everywhere:
1486         * dom/ContainerNode.cpp:
1487         (WebCore::ContainerNode::suspendPostAttachCallbacks):
1488         (WebCore::ContainerNode::resumePostAttachCallbacks):
1489
1490         * loader/MainResourceLoader.cpp:
1491         (WebCore::MainResourceLoader::loadNow):
1492
1493         * loader/ResourceLoader.cpp:
1494         (WebCore::ResourceLoader::releaseResources):
1495         (WebCore::ResourceLoader::willSendRequest):
1496
1497         * loader/cache/CachedResource.cpp:
1498         (WebCore::CachedResource::load):
1499
1500         * loader/cache/CachedResourceLoader.cpp:
1501         (WebCore::CachedResourceLoader::performPostLoadActions):
1502
1503 2012-10-26  Elliott Sprehn  <esprehn@chromium.org>
1504
1505         Try to fix the windows build
1506         https://bugs.webkit.org/show_bug.cgi?id=100556
1507
1508         Reviewed by Eric Seidel.
1509
1510         Touch files by adding whitespace to try and make the windows
1511         build bot regenerate files.
1512
1513         No new tests, just kick the bot.
1514
1515         * dom/DOMAllInOne.cpp:
1516         * html/HTMLElementsAllInOne.cpp:
1517         * html/shadow/TextControlInnerElements.cpp:
1518
1519 2012-10-26  Rob Buis  <rbuis@rim.com>
1520
1521         [BlackBerry] Platform Abstraction for WebKit Resource/Image Loading
1522         https://bugs.webkit.org/show_bug.cgi?id=100518
1523
1524         PR 231732
1525
1526         Reviewed by Yong Li.
1527
1528         Use the new resource/image loading abstraction ResourceStore.
1529
1530         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1531         (WebCore::Image::loadPlatformResource):
1532
1533 2012-10-26  Bear Travis  <betravis@adobe.com>
1534
1535         [CSS Exclusions] Block children have incorrect offset when shape-inside element lays out below other elements
1536         https://bugs.webkit.org/show_bug.cgi?id=98189
1537
1538         Reviewed by Dirk Schulze.
1539
1540         The initial code assumed that each block created a new layout state, such that
1541         LayoutState::layoutOffset would be specific to each block child of a shape-inside.
1542         Typically, however, block children of a shape-inside do not create a new layout state,
1543         and therefore we use the current element's offset instead.
1544
1545         Test: fast/exclusions/shape-inside/shape-inside-subsequent-blocks.html
1546
1547         * rendering/RenderBlockLineLayout.cpp:
1548         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Modified to use only logicalTop
1549         rather than LayoutState::layoutOffset::width/height and logicalTop.
1550
1551 2012-10-26  Elliott Sprehn  <esprehn@chromium.org>
1552
1553         Remove setRenderStyle in favor of callbacks on HTMLOptionElement and HTMLOptGroupElement
1554         https://bugs.webkit.org/show_bug.cgi?id=100397
1555
1556         Reviewed by Ojan Vafai.
1557
1558         Use Node custom callbacks to support the non-renderer style caching for option
1559         and optgroup eliminating the need for setRenderStyle.
1560
1561         setRenderStyle only existed to support HTMLOptionElement and HTMLOptGroupElement
1562         so they could store their RenderStyle even though they have no renderer. This
1563         means all style setting went through the virtual call to setRenderStyle, and it
1564         also hid the if statement protecting against null renderers meaning we end up
1565         checking if the renderer is null repeatedly in recalcStyle. This refactor cleans
1566         up recalcStyle to be more clear about what's going on.
1567
1568         No new tests needed, this is just a refactor.
1569
1570         * dom/Element.cpp:
1571         (WebCore::Element::pseudoStyleCacheIsInvalid):
1572         (WebCore::Element::recalcStyle):
1573         * dom/Node.cpp:
1574         (WebCore::Node::createRenderer):
1575         (WebCore::Node::setRenderStyle):
1576             Removed this method because it was only here to support HTMLOptionElement
1577             and HTMLOptGroupElement. Instead we can use node custom callbacks.
1578         * dom/Node.h:
1579         (WebCore::Node::nonRendererStyle): Renamed from nonRendererRenderStyle to match other style methods.
1580         * dom/NodeRenderStyle.h:
1581         (WebCore::Node::renderStyle):
1582         * html/HTMLOptGroupElement.cpp:
1583         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
1584         (WebCore::HTMLOptGroupElement::attach): Reorder the logic to avoid calling styleForRenderer twice.
1585         (WebCore::HTMLOptGroupElement::updateNonRenderStyle): Updates the cached non-renderer style.
1586         (WebCore::HTMLOptGroupElement::nonRendererStyle):
1587         (WebCore::HTMLOptGroupElement::customStyleForRenderer):
1588         * html/HTMLOptGroupElement.h:
1589         * html/HTMLOptionElement.cpp:
1590         (WebCore::HTMLOptionElement::HTMLOptionElement):
1591         (WebCore::HTMLOptionElement::attach): Reorder the logic to avoid calling styleForRenderer twice.
1592         (WebCore::HTMLOptionElement::updateNonRenderStyle): Updates the cached non-renderer style.
1593         (WebCore::HTMLOptionElement::nonRendererStyle):
1594         (WebCore::HTMLOptionElement::customStyleForRenderer):
1595         (WebCore::HTMLOptionElement::didRecalcStyle): Requests the repaint of the select like setRenderStyle used to.
1596         * html/HTMLOptionElement.h:
1597
1598 2012-10-26  Dirk Schulze  <krit@webkit.org>
1599
1600         -webkit-clip-path property should just reference clipPath
1601         https://bugs.webkit.org/show_bug.cgi?id=100531
1602
1603         Reviewed by Eric Seidel.
1604
1605         The -webkit-clip-path property should just reference clipPath. Added a check for that.
1606
1607         Test: css3/masking/clip-path-reference-of-fake-clipPath.html
1608
1609         * rendering/RenderLayer.cpp:
1610         (WebCore::RenderLayer::paintLayerContents):
1611
1612 2012-10-26  Aaron Colwell  <acolwell@chromium.org>
1613
1614         Remove the circular reference between TextTrack and TextTrackCue
1615         https://bugs.webkit.org/show_bug.cgi?id=100300
1616
1617         Reviewed by Eric Carlson.
1618
1619         Changed TextTrackCue.m_track to a normal pointer to break the circular
1620         reference that was keeping both objects from ever getting deleted.
1621
1622         No new tests. This simply fixes a memory leak.
1623
1624         * html/track/TextTrack.cpp:
1625         (WebCore::TextTrack::~TextTrack):
1626         * html/track/TextTrackCue.cpp:
1627         (WebCore::TextTrackCue::TextTrackCue):
1628         (WebCore::TextTrackCue::~TextTrackCue):
1629         (WebCore::TextTrackCue::track):
1630         (WebCore::TextTrackCue::setTrack):
1631         * html/track/TextTrackCue.h:
1632         (TextTrackCue):
1633
1634 2012-10-26  Vsevolod Vlasov  <vsevik@chromium.org>
1635
1636         Web Inspector: Breakpoints are not managed correctly when editing uiSourceCode that was bound to ScriptFile after JavaScriptSourceFrame creation.
1637         https://bugs.webkit.org/show_bug.cgi?id=100535
1638
1639         Reviewed by Pavel Feldman.
1640
1641         Added SourceMappingChanged event to UISourceCode and made
1642         JavaScriptSourceFrame update ScriptFile events listeners on it.
1643
1644         * inspector/front-end/JavaScriptSourceFrame.js:
1645         (WebInspector.JavaScriptSourceFrame):
1646         (WebInspector.JavaScriptSourceFrame.prototype._onSourceMappingChanged):
1647         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
1648         * inspector/front-end/ResourceScriptMapping.js:
1649         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
1650         * inspector/front-end/UISourceCode.js:
1651         (WebInspector.UISourceCode.prototype.setSourceMapping):
1652
1653 2012-10-26  Vincent Scheib  <scheib@chromium.org>
1654
1655         Unreviewed, rolling out r132644.
1656         http://trac.webkit.org/changeset/132644
1657         https://bugs.webkit.org/show_bug.cgi?id=100497
1658
1659         Causes webkit_unit_tests
1660         MemoryInstrumentationTest.ImageObserver to fail.
1661
1662         * platform/network/ResourceRequestBase.cpp:
1663         (WebCore::ResourceRequestBase::reportMemoryUsage):
1664         * platform/network/ResourceRequestBase.h:
1665         (ResourceRequestBase):
1666         * platform/network/chromium/ResourceRequest.cpp:
1667         * platform/network/chromium/ResourceRequest.h:
1668
1669 2012-10-26  Zeno Albisser  <zeno@webkit.org>
1670
1671         [Qt] MiniBrowser segfaults on exit after using WebGL.
1672         https://bugs.webkit.org/show_bug.cgi?id=100523
1673
1674         The display connection must not be closed before
1675         destroying the offscreen window.
1676         Therefore opening the connection is moved to the
1677         getXWindow() function. And closing the connection
1678         is being moved to the destructor of the offscreen window.
1679
1680         Reviewed by Kenneth Rohde Christiansen.
1681
1682
1683         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
1684         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1685         (WebCore::OffScreenRootWindow::getXWindow):
1686         (OffScreenRootWindow):
1687         (WebCore::OffScreenRootWindow::display):
1688         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1689         (WebCore):
1690         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1691         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1692         (WebCore::GraphicsSurfacePrivate::createSurface):
1693
1694 2012-10-26  Parth Patel  <parpatel@rim.com>
1695
1696         [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
1697         Generic ThreadUnsafe Singleton
1698         https://bugs.webkit.org/show_bug.cgi?id=100529
1699
1700         Reviewed by Yong Li.
1701
1702         No new tests added as there was no behavioural change.
1703
1704         * platform/network/blackberry/NetworkManager.cpp:
1705         (WebCore):
1706         * platform/network/blackberry/NetworkManager.h:
1707         (NetworkManager):
1708
1709 2012-10-26  Mike West  <mkwst@chromium.org>
1710
1711         Web Inspector: Fix log-type icon alignment.
1712         https://bugs.webkit.org/show_bug.cgi?id=100520
1713
1714         Reviewed by Yury Semikhatsky.
1715
1716         The icons are just a pixel or two off, and it's driving me nuts.
1717
1718         * inspector/front-end/inspector.css:
1719         (.console-message::before, .console-user-command::before, #console-prompt::before, .console-group-title::before):
1720         (.console-warning-level::before):
1721
1722 2012-10-26  Erik Arvidsson  <arv@chromium.org>
1723
1724         Replaceable attributes should also have readonly
1725         https://bugs.webkit.org/show_bug.cgi?id=91768
1726
1727         Reviewed by Adam Barth.
1728
1729         This updates the code generators for JSC and V8 to handle this case correctly.
1730
1731         * Modules/intents/DOMWindowIntents.idl:
1732         * bindings/scripts/CodeGeneratorJS.pm:
1733         * bindings/scripts/CodeGeneratorV8.pm:
1734         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1735         * bindings/scripts/test/ObjC/DOMTestObj.h:
1736         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1737         * bindings/scripts/test/TestObj.idl:
1738         * bindings/scripts/test/V8/V8TestObj.cpp:
1739         * page/DOMWindow.idl:
1740         * workers/WorkerContext.idl:
1741
1742 2012-10-26  Nico Weber  <thakis@chromium.org>
1743
1744         Clear m_orientation in FrameData::clear() for skia
1745         https://bugs.webkit.org/show_bug.cgi?id=100456
1746
1747         Reviewed by Stephen White.
1748
1749         clear() is only called by the FrameData destructor and for multi-image
1750         images in BitmapImage::destroyDecodedData(). Multi-frame images don't
1751         have exif data, so this patch should have no effect in practice. It
1752         makes the skia code match the CG code in BitmapImageCG.cpp though.
1753
1754         * platform/graphics/skia/ImageSkia.cpp:
1755         (WebCore::FrameData::clear):
1756
1757 2012-10-26  Florin Malita  <fmalita@chromium.org>
1758
1759         Crash on loading SVG filter resource on HTML element
1760         https://bugs.webkit.org/show_bug.cgi?id=100491
1761
1762         Reviewed by Dirk Schulze.
1763
1764         Skip non-filter elements referenced via -webkit-filter.
1765
1766         Test: svg/filters/filter-reference-crash.html
1767
1768         * rendering/RenderLayerFilterInfo.cpp:
1769         (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):
1770
1771 2012-10-26  Antti Koivisto  <antti@apple.com>
1772
1773         Lots of time spent under DNSResolveQueue::platformProxyIsEnabledInSystemPreferences
1774         https://bugs.webkit.org/show_bug.cgi?id=100514
1775
1776         Reviewed by Anders Carlsson.
1777
1778         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences gets called for every link in
1779         the document. The function is relatively slow.
1780         
1781         This patch caches the result of the last check for 5 seconds. Based on code comments
1782         prefetching is disabled with proxies due to regressing performance with some configurations.
1783         Proxy status changes rarely and a slight reaction delay shoudn't cause practical problems.
1784
1785         * platform/network/DNSResolveQueue.cpp:
1786         (WebCore::DNSResolveQueue::DNSResolveQueue):
1787         
1788             Add constructor. Also fixes a bug, m_requestsInFlight was not initialized.
1789             
1790         (WebCore):
1791         (WebCore::DNSResolveQueue::isUsingProxy):
1792         (WebCore::DNSResolveQueue::add):
1793         (WebCore::DNSResolveQueue::fired):
1794         * platform/network/DNSResolveQueue.h:
1795         (DNSResolveQueue):
1796
1797 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1798
1799         Unreviewed, rolling out r132662.
1800         http://trac.webkit.org/changeset/132662
1801         https://bugs.webkit.org/show_bug.cgi?id=100528
1802
1803         It is not necessary any more. (Requested by loislo on
1804         #webkit).
1805
1806         * platform/qt/MemoryUsageSupportQt.cpp:
1807         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
1808         (WebCore):
1809
1810 2012-10-26  Ilya Tikhonovsky  <loislo@chromium.org>
1811
1812         Unreviewed build fix for Qt builders.
1813
1814         * platform/qt/MemoryUsageSupportQt.cpp:
1815
1816 2012-10-26  Csaba Osztrogonác  <ossy@webkit.org>
1817
1818         Unreviewed, rolling out r132658.
1819         http://trac.webkit.org/changeset/132658
1820         https://bugs.webkit.org/show_bug.cgi?id=100515
1821
1822         It broke the Qt build
1823
1824         * inspector/InspectorMemoryAgent.cpp:
1825         (WebCore::addPlatformComponentsInfo):
1826         (WebCore):
1827         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1828         * platform/MemoryUsageSupport.cpp:
1829         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
1830         * platform/MemoryUsageSupport.h:
1831         (ComponentInfo):
1832         (WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo):
1833         (MemoryUsageSupport):
1834         * platform/PlatformMemoryInstrumentation.cpp:
1835         (WebCore):
1836         * platform/PlatformMemoryInstrumentation.h:
1837         (PlatformMemoryTypes):
1838         * platform/chromium/MemoryUsageSupportChromium.cpp:
1839         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
1840
1841 2012-10-26  Vsevolod Vlasov  <vsevik@chromium.org>
1842
1843         Web Inspector: Some context menu items are duplicated on Resources and Sources panels.
1844         https://bugs.webkit.org/show_bug.cgi?id=100522
1845
1846         Reviewed by Pavel Feldman.
1847
1848         Method appendApplicableItems now receives event as a parameter.
1849         HandlerRegistry now makes sure that it is not called more than once for certain context menu event.
1850
1851         * inspector/front-end/BreakpointsSidebarPane.js:
1852         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._emptyElementContextMenu):
1853         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
1854         (WebInspector.XHRBreakpointsSidebarPane.prototype._emptyElementContextMenu):
1855         (WebInspector.XHRBreakpointsSidebarPane.prototype._contextMenu):
1856         * inspector/front-end/CallStackSidebarPane.js:
1857         (WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
1858         * inspector/front-end/ConsoleView.js:
1859         * inspector/front-end/ContextMenu.js:
1860         (WebInspector.ContextMenu):
1861         (WebInspector.ContextMenu.prototype.show):
1862         (WebInspector.ContextMenu.prototype.appendApplicableItems):
1863         (WebInspector.ContextMenu.Provider.prototype.appendApplicableItems):
1864         * inspector/front-end/CookieItemsView.js:
1865         (WebInspector.CookieItemsView.prototype._contextMenu):
1866         * inspector/front-end/DOMBreakpointsSidebarPane.js:
1867         (WebInspector.DOMBreakpointsSidebarPane.prototype._contextMenu):
1868         * inspector/front-end/DataGrid.js:
1869         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
1870         * inspector/front-end/DefaultTextEditor.js:
1871         (WebInspector.DefaultTextEditor.prototype._contextMenu):
1872         * inspector/front-end/ElementsPanel.js:
1873         (WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
1874         * inspector/front-end/ElementsPanelDescriptor.js:
1875         (WebInspector.ElementsPanelDescriptor.prototype.appendApplicableItems):
1876         * inspector/front-end/ElementsTreeOutline.js:
1877         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
1878         * inspector/front-end/HandlerRegistry.js:
1879         (WebInspector.HandlerRegistry.prototype.appendApplicableItems):
1880         * inspector/front-end/ImageView.js:
1881         (WebInspector.ImageView.prototype._contextMenu):
1882         * inspector/front-end/NavigatorView.js:
1883         (WebInspector.NavigatorView.prototype.handleContextMenu):
1884         * inspector/front-end/NetworkPanel.js:
1885         (WebInspector.NetworkLogView.prototype._contextMenu):
1886         * inspector/front-end/NetworkPanelDescriptor.js:
1887         (WebInspector.NetworkPanelDescriptor.prototype.appendApplicableItems):
1888         * inspector/front-end/ObjectPropertiesSection.js:
1889         (WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
1890         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuFired):
1891         * inspector/front-end/ProfilesPanel.js:
1892         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
1893         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
1894         * inspector/front-end/ResourcesPanel.js:
1895         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
1896         (WebInspector.IndexedDBTreeElement.prototype._handleContextMenuEvent):
1897         (WebInspector.FileSystemListTreeElement.prototype._handleContextMenuEvent):
1898         (WebInspector.IDBDatabaseTreeElement.prototype._handleContextMenuEvent):
1899         * inspector/front-end/ScriptsNavigator.js:
1900         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
1901         * inspector/front-end/ScriptsPanel.js:
1902         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
1903         * inspector/front-end/ScriptsPanelDescriptor.js:
1904         (WebInspector.ScriptsPanelDescriptor.prototype.appendApplicableItems):
1905         * inspector/front-end/StylesSidebarPane.js:
1906         (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
1907         * inspector/front-end/TabbedPane.js:
1908         (WebInspector.TabbedPaneTab.prototype._tabContextMenu):
1909         * inspector/front-end/TimelinePanel.js:
1910         (WebInspector.TimelinePanel.prototype._contextMenu):
1911         * inspector/front-end/WatchExpressionsSidebarPane.js:
1912         (WebInspector.WatchExpressionsSection.prototype._emptyElementContextMenu):
1913         (WebInspector.WatchExpressionTreeElement.prototype._contextMenu):
1914
1915 2012-10-26  Ilya Tikhonovsky  <loislo@chromium.org>
1916
1917         Web Inspector: instrument chromium GlyphCache. It keeps ~2mb data on gmail.
1918         https://bugs.webkit.org/show_bug.cgi?id=100515
1919
1920         Reviewed by Yury Semikhatsky.
1921
1922         I replaced old version with an abstract number with new one which precisely reports allocated SkGlyphCache objects and their sizes.
1923
1924         * inspector/InspectorMemoryAgent.cpp:
1925         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1926         * platform/MemoryUsageSupport.cpp:
1927         (WebCore::MemoryUsageSupport::reportMemoryUsage):
1928         * platform/MemoryUsageSupport.h:
1929         (MemoryUsageSupport):
1930         * platform/PlatformMemoryInstrumentation.cpp:
1931         (WebCore):
1932         * platform/PlatformMemoryInstrumentation.h:
1933         (PlatformMemoryTypes):
1934         * platform/chromium/MemoryUsageSupportChromium.cpp:
1935         (reportMemoryUsage):
1936         (WebCore::reportGlyphCache):
1937         (WebCore):
1938         (WebCore::MemoryUsageSupport::reportMemoryUsage):
1939
1940 2012-10-26  Kent Tamura  <tkent@chromium.org>
1941
1942         [Chromium] Build fix for r132650.
1943         https://bugs.webkit.org/show_bug.cgi?id=100482
1944
1945         * platform/text/LocaleWin.cpp:
1946         (WebCore::LocaleWin::timeFormat):
1947
1948 2012-10-26  Yury Semikhatsky  <yurys@chromium.org>
1949
1950         [v8] Memory instrumentation: don't count memory of WrapperTypeInfo
1951         https://bugs.webkit.org/show_bug.cgi?id=100517
1952
1953         Reviewed by Alexander Pavlov.
1954
1955         * bindings/v8/V8PerIsolateData.cpp: when estimating bindings memory size skip
1956         pointers to WrapperTypeInfo objects as they are static fields and belong to
1957         the data segment.
1958         (WTF):
1959
1960 2012-10-26  Kent Tamura  <tkent@chromium.org>
1961
1962         Refactor Localizer-related classes.
1963         https://bugs.webkit.org/show_bug.cgi?id=100482
1964
1965         Reviewed by Kentaro Hara.
1966
1967         - Localizer has unused code
1968          Localizer should have function implementations only if they are used in
1969          multiple subclasses.
1970         - Some Localizer subclasses hide Localizer data members
1971         - Should use String::isNull to check initialization-or-not
1972
1973         No new tests. This should not change any behavior.
1974
1975         * platform/text/Localizer.h:
1976         (Localizer):
1977         - timeFormat, shortTimeFormat, and timeAMPMLabels should be pure virtual.
1978         - Remove m_localizedDateFormatText, m_localizedShortTimeFormatText, and
1979           m_timeAMPMLabels
1980         * platform/text/Localizer.cpp:
1981         Remove implementations of timeFormat, shortTimeFormat, and timeAMPMLabels.
1982
1983         * platform/text/LocaleICU.h:
1984         (LocaleICU): Introduce m_timeFormatWithSeconds and m_timeFormatWithoutSeconds.
1985         * platform/text/LocaleICU.cpp:
1986         (WebCore::LocaleICU::initializeDateTimeFormat):
1987         Use new data members instead of Localizer data members.
1988         (WebCore::LocaleICU::dateFormat): Use isNull.
1989
1990         * platform/text/LocaleNone.cpp:
1991         (LocaleNone): Add timeFormat, shortTimeFormat, timeAMPMLabels
1992         implementations, and m_timeAMPMLabels.
1993         (WebCore::LocaleNone::timeFormat): Returns the HTML time format.
1994         (WebCore::LocaleNone::shortTimeFormat): Returns the HTML time format.
1995         (WebCore::LocaleNone::timeAMPMLabels): Returns "AM" and "PM".
1996
1997         * platform/text/LocaleWin.h:
1998         (LocaleWin): Add m_timeFormatWithSeconds.
1999         * platform/text/LocaleWin.cpp:
2000         (WebCore::LocaleWin::dateFormat): Use isNull.
2001         (WebCore::LocaleWin::timeFormat): Use m_timeFormatWithSeconds.
2002
2003         * platform/text/mac/LocaleMac.h:
2004         (LocaleMac): Rename m_localized*TimeFormatText to m_timeFormatWith*Seconds.
2005         * platform/text/mac/LocaleMac.mm:
2006         (WebCore::LocaleMac::timeFormat): Follow the renaming.
2007         (WebCore::LocaleMac::shortTimeFormat): Ditto.
2008
2009 2012-10-26  Kent Tamura  <tkent@chromium.org>
2010
2011         Crash in PagePopupController by events after WebPagePopupImpl::closePopup
2012         https://bugs.webkit.org/show_bug.cgi?id=100454
2013
2014         Reviewed by Hajime Morita.
2015
2016         No new tests. The bug is timing-dependent.
2017
2018         * page/DOMWindowPagePopup.cpp:
2019         (WebCore::DOMWindowPagePopup::~DOMWindowPagePopup):
2020         Calls clearPagePopupClient for the associalated PagePopupController object.
2021         * page/PagePopupController.cpp:
2022         (WebCore::PagePopupController::setValueAndClosePopup):
2023         Do nothing if m_popupClient is 0.
2024         (WebCore::PagePopupController::localizeNumberString): Ditto.
2025         (WebCore::PagePopupController::clearPagePopupClient): Added.
2026         * page/PagePopupController.h:
2027         (PagePopupController): Declare clearPagePopupClient.
2028
2029 2012-10-25  Alexander Pavlov  <apavlov@chromium.org>
2030
2031         Web Inspector: Bring device geolocation and orientation emulation from behind the experiment
2032         https://bugs.webkit.org/show_bug.cgi?id=100220
2033
2034         Reviewed by Yury Semikhatsky.
2035
2036         * inspector/front-end/Settings.js:
2037         (WebInspector.ExperimentsSettings):
2038         * inspector/front-end/SettingsScreen.js:
2039         (WebInspector.UserAgentSettingsTab):
2040
2041 2012-10-26  Yury Semikhatsky  <yurys@chromium.org>
2042
2043         Memory instrumentation: report memory occupied by ResourceRequest instead of its base ResourceRequestBase
2044         https://bugs.webkit.org/show_bug.cgi?id=100497
2045
2046         Reviewed by Alexander Pavlov.
2047
2048         Added memory reporting method to Chromium implementation of ResourceRequest.
2049
2050         * platform/network/ResourceRequestBase.cpp:
2051         (WebCore::ResourceRequestBase::reportMemoryUsageBase): Renamed reportMemoryUsage
2052         on ResourceRequestBase to reportMemoryUsageBase and made it protected. I'd
2053         rather make ResourceRequestBase::reportMemoryUsage virtual and override it
2054         in the descendant but ResourceRequestBase doesn't have any virtual methods
2055         and shouldn't be used directly (ResourceRequest should be used instead).
2056         * platform/network/ResourceRequestBase.h:
2057         (ResourceRequestBase):
2058         * platform/network/chromium/ResourceRequest.cpp:
2059         (WebCore::ResourceRequest::reportMemoryUsage):
2060         (WebCore):
2061         * platform/network/chromium/ResourceRequest.h:
2062         (ResourceRequest):
2063
2064 2012-10-26  Alexander Pavlov  <apavlov@chromium.org>
2065
2066         Web Inspector: Remove the on-hover highlighting of console messages
2067         https://bugs.webkit.org/show_bug.cgi?id=100511
2068
2069         Reviewed by Pavel Feldman.
2070
2071         This clashes with the hovered element highlight in console messages.
2072
2073         * inspector/front-end/inspector.css:
2074         (ol.watch-expressions > li.hovered):
2075
2076 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2077
2078         Unreviewed, rolling out r132612.
2079         http://trac.webkit.org/changeset/132612
2080         https://bugs.webkit.org/show_bug.cgi?id=100512
2081
2082         Crashes fast/events/tabindex-focus-blur-all.html in debug mode
2083         (Requested by pfeldman on #webkit).
2084
2085         * rendering/AutoTableLayout.cpp:
2086         (WebCore::AutoTableLayout::recalcColumn):
2087         * rendering/FixedTableLayout.cpp:
2088         (WebCore::FixedTableLayout::calcWidthArray):
2089         * rendering/RenderTable.cpp:
2090         (WebCore::RenderTable::layout):
2091         * rendering/RenderTableCol.cpp:
2092         (WebCore::RenderTableCol::styleDidChange):
2093         (WebCore::RenderTableCol::updateFromElement):
2094         (WebCore::RenderTableCol::computePreferredLogicalWidths):
2095         * rendering/RenderTableCol.h:
2096         (RenderTableCol):
2097
2098 2012-10-26  Pavel Feldman  <pfeldman@chromium.org>
2099
2100         Web Inspector: fast return upon setting the same dock side.
2101         https://bugs.webkit.org/show_bug.cgi?id=100510
2102
2103         Reviewed by Vsevolod Vlasov.
2104
2105         Added fast return.
2106
2107         * inspector/front-end/DockController.js:
2108
2109 2012-10-26  Simon Hausmann  <simon.hausmann@digia.com>
2110
2111         Unreviewed trivial build fix: It's glXGetCurrentContext not glxGetCurrentContext :)
2112
2113         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2114         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2115
2116 2012-10-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2117
2118         Printing should use use high resolution images when available
2119         https://bugs.webkit.org/show_bug.cgi?id=100488
2120
2121         Reviewed by Antti Koivisto.
2122
2123         The images loaded using -webkit-device-pixel-ratio depends on
2124         the display type (deviceScaleFactor) and thus affects which
2125         images are being used for printing. Printing should always
2126         use the higher resolution images (aka 'retina' images).
2127
2128         Test: fast/media/mq-pixel-ratio-print.html
2129
2130         * css/MediaQueryEvaluator.cpp:
2131         (WebCore::device_pixel_ratioMediaFeatureEval):
2132
2133 2012-10-26  Ilya Tikhonovsky  <loislo@chromium.org>
2134
2135         Web Inspector: NMI instrument InspectorResourceAgent. it caches resources for the front-end.
2136         https://bugs.webkit.org/show_bug.cgi?id=100496
2137
2138         Reviewed by Yury Semikhatsky.
2139
2140         It is plain instrumentation for InspectorResourceAgent and NetworkResourceData which is used by the agent.
2141
2142         * dom/WebCoreMemoryInstrumentation.cpp:
2143         (WebCore):
2144         * dom/WebCoreMemoryInstrumentation.h:
2145         (WebCoreMemoryTypes):
2146         * inspector/InspectorResourceAgent.cpp:
2147         (WebCore::InspectorResourceAgent::reportMemoryUsage):
2148         (WebCore):
2149         * inspector/InspectorResourceAgent.h:
2150         (InspectorResourceAgent):
2151         * inspector/NetworkResourcesData.cpp:
2152         (WebCore::XHRReplayData::reportMemoryUsage):
2153         (WebCore):
2154         (WebCore::NetworkResourcesData::ResourceData::reportMemoryUsage):
2155         (WebCore::NetworkResourcesData::reportMemoryUsage):
2156         * inspector/NetworkResourcesData.h:
2157         (XHRReplayData):
2158         (ResourceData):
2159         (NetworkResourcesData):
2160
2161 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2162
2163         Unreviewed, rolling out r132493.
2164         http://trac.webkit.org/changeset/132493
2165         https://bugs.webkit.org/show_bug.cgi?id=100509
2166
2167         It didn't fix the tests on the bot as we had hoped. (Requested
2168         by drott on #webkit).
2169
2170         * platform/network/cf/ResourceErrorCF.cpp:
2171         (WebCore::ResourceError::ResourceError):
2172
2173 2012-10-26  Zeno Albisser  <zeno@webkit.org>
2174
2175         [Qt] Temporarily disable use of QXcbNativeInterface in GraphicsSurfaceGLX.
2176         https://bugs.webkit.org/show_bug.cgi?id=100493
2177
2178         Once QXcbNativeInterface::nativeResourceForContext() can provide the
2179         GLXContext for an existing QOpenGLContext, this patch shall be reverted.
2180
2181         Reviewed by Simon Hausmann.
2182
2183         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2184         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2185
2186 2012-10-26  Zeno Albisser  <zeno@webkit.org>
2187
2188         [Qt] Remove QOpenGL specific code from GraphicsSurfaceGLX.
2189         https://bugs.webkit.org/show_bug.cgi?id=100492
2190
2191         This patch removes most of the QOpenGLContext related code
2192         from GraphicsSurfaceGLX. This allows sharing almost all
2193         GraphicsSurfaceGLX code with EFL, by relying on pure GLX.
2194
2195         Reviewed by Kenneth Rohde Christiansen.
2196
2197         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2198         (WebCore::OffScreenRootWindow::get):
2199         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2200         (OffScreenRootWindow):
2201         (WebCore):
2202         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2203         (WebCore::GraphicsSurfacePrivate::createSurface):
2204         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2205         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2206         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2207         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2208         (GraphicsSurfacePrivate):
2209         (WebCore::resolveGLMethods):
2210
2211 2012-10-26  Regina Chung  <heejin.r.chung@samsung.com>
2212
2213         [EFL][WK2] Enable WebGL
2214         https://bugs.webkit.org/show_bug.cgi?id=97652
2215
2216         Reviewed by Gyuyoung Kim.
2217
2218         Implemented GraphicsSurface for EFL to enable WebGL for WebKit2.
2219         Depends on GLX since Evas doesn't provide the necessary functionality.
2220
2221         No new tests. Covered by existing tests.
2222
2223         * PlatformEfl.cmake:
2224         * platform/graphics/GraphicsContext3D.h:
2225         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2226         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
2227         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2228         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2229         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2230         (WebCore):
2231         (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
2232         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
2233         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
2234         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2235         (GraphicsContext3DPrivate):
2236         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2237         (WebCore::GraphicsContext3D::reshape):
2238         * platform/graphics/surfaces/efl: Added.
2239         * platform/graphics/surfaces/efl/GraphicsSurfaceEfl.cpp: Added.
2240         (WebCore):
2241         (WebCore::OffScreenRootWindow::get):
2242         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2243         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2244         (WebCore::GraphicsSurfacePrivate::createSurface):
2245         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2246         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2247         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2248         (WebCore::GraphicsSurface::platformBeginPaint):
2249         (WebCore::GraphicsSurface::createReadOnlyImage):
2250         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2251         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.h: Added.
2252         (WebCore):
2253         (OffScreenRootWindow):
2254         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
2255         (GraphicsSurfacePrivate):
2256         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
2257         (WebCore::GraphicsSurfacePrivate::createPixmap):
2258         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2259         (WebCore::GraphicsSurfacePrivate::display):
2260         (WebCore::GraphicsSurfacePrivate::glxPixmap):
2261         (WebCore::GraphicsSurfacePrivate::size):
2262         (WebCore::GraphicsSurfacePrivate::glContext):
2263         (WebCore::resolveGLMethods):
2264         * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
2265         (WebCore):
2266         (WebCore::OffScreenRootWindow::OffScreenRootWindow::get):
2267         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2268         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2269         (WebCore::GraphicsSurfacePrivate::createSurface):
2270         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2271         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2272         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2273
2274 2012-10-26  Alexander Pavlov  <apavlov@chromium.org>
2275
2276         Web Inspector: [Overrides] Do not persist the User Agent "master switch"
2277         https://bugs.webkit.org/show_bug.cgi?id=100484
2278
2279         Reviewed by Yury Semikhatsky.
2280
2281         The User Agent override state is managed in the front-end, just like for other override-able parameters.
2282
2283         * inspector/InspectorResourceAgent.cpp:
2284         (WebCore::InspectorResourceAgent::disable):
2285         * inspector/front-end/NetworkManager.js:
2286         (WebInspector.NetworkManager.get NetworkAgent):
2287         (WebInspector.NetworkManager):
2288         * inspector/front-end/SettingsScreen.js:
2289         (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.set checkboxClicked):
2290         (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement):
2291         * inspector/front-end/UserAgentSupport.js:
2292         (WebInspector.UserAgentSupport):
2293         (WebInspector.UserAgentSupport.prototype.toggleUserAgentOverride):
2294         (WebInspector.UserAgentSupport.prototype._userAgentChanged):
2295
2296 2012-10-26  Takashi Sakamoto  <tasak@google.com>
2297
2298         [Shadow]: removing styles in shadow dom subtree causes crash.
2299         https://bugs.webkit.org/show_bug.cgi?id=100455
2300
2301         Reviewed by Hajime Morita.
2302
2303         To quickly check whether shadow roots or elements have any scoped
2304         styles or not, elements have hasStyleScoped flag. If elements have
2305         any scoped styles, the styles are direct children of the element.
2306         The original code just sees how many chilren are scoped style or not.
2307         However styles in shadow dom subtree are registered with the shadow
2308         root but are not always direct children of shadow roots. So to check
2309         whether shadow roots have any scoped styles, modified to count
2310         number of styles registered with the shadow root.
2311
2312         Test: fast/dom/shadow/remove-styles-in-shadow-crash.html
2313
2314         * dom/Node.cpp:
2315         (WebCore::Node::registerScopedHTMLStyleChild):
2316         (WebCore::Node::unregisterScopedHTMLStyleChild):
2317         Made the above two method virtual. class ShadowRoot overrides these
2318         methods.
2319         (WebCore::Node::numberOfScopedHTMLStyleChildren):
2320         Moved HTMLStyleElement.cpp to Node.cpp, because the above two methods
2321         are moved into Node.cpp.
2322         * dom/Node.h:
2323         (Node):
2324         * dom/ShadowRoot.cpp:
2325         (WebCore::ShadowRoot::ShadowRoot):
2326         (WebCore::ShadowRoot::registerScopedHTMLStyleChild):
2327         (WebCore::ShadowRoot::unregisterScopedHTMLStyleChild):
2328         Modify to count how many styles are registered with the shadow root.
2329         The "counting" is done when styles are registered and unregistered
2330         with the shadow root, i.e. style element is inserted into document or
2331         removed from document. When unregister some style, there are no more
2332         styles registered with the shadow root. Set style scoped flag false.
2333         * dom/ShadowRoot.h:
2334         (ShadowRoot):
2335         * html/HTMLStyleElement.cpp:
2336         * html/HTMLStyleElement.h:
2337         (WebCore::HTMLStyleElement::isRegisteredAsScoped):
2338         Now isRegisteredAsScoped is used in Node.cpp, so removed inline and
2339         moved .cpp to .h.
2340
2341 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2342
2343         Unreviewed, rolling out r132589.
2344         http://trac.webkit.org/changeset/132589
2345         https://bugs.webkit.org/show_bug.cgi?id=100498
2346
2347         Breaks font-face layout tests (Requested by pfeldman on
2348         #webkit).
2349
2350         * css/CSSFontFaceSource.cpp:
2351         (WebCore::CSSFontFaceSource::getFontData):
2352
2353 2012-10-26  Takashi Sakamoto  <tasak@google.com>
2354
2355         [Shadow DOM] Needs @host rule for ShadowDOM styling
2356         https://bugs.webkit.org/show_bug.cgi?id=88606
2357
2358         Reviewed by Hajime Morita.
2359
2360         Implemented @host-@rules according to the shadow dom spec:
2361         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#host-at-rule
2362         The design doc is:
2363         https://docs.google.com/document/d/1P2yorchF8lci2sccr-mVSRf2dtvjKeiuyQWzCB2bEA8/edit
2364
2365         Test: fast/dom/shadow/athost-atrules.html
2366
2367         * css/CSSGrammar.y.in:
2368         Added rules for parsing @host @-rules.
2369         * css/CSSParser.cpp:
2370         (WebCore::CSSParser::detectAtToken):
2371         Added a new token "@host".
2372         (WebCore::CSSParser::createHostRule):
2373         Added a new method to create an @host @-rule, which is invoked from
2374         (WebCore):
2375         * css/CSSParser.h:
2376         Added a declaration of the above new method: createHostRule.
2377         * css/CSSPropertySourceData.h:
2378         Added HOST_RULE to enum Type.
2379         * css/RuleSet.cpp:
2380         (WebCore::RuleData::RuleData):
2381         Modified multiple bool arguments into one argument. Now it
2382         uses combinations of values from enum AddRuleFlags.
2383         (WebCore::RuleSet::addRule):
2384         (WebCore::RuleSet::addRegionRule):
2385         (WebCore::RuleSet::addStyleRule):
2386         Updated according to the RuleData's change.
2387         Modified to Invoke increaseSpecificity if the given rule is @host
2388         @-rule.
2389         (WebCore::RuleSet::addRulesFromSheet):
2390         Invoked addHostRule if the given rule is @host @-rule.
2391         * css/RuleSet.h:
2392         (RuleData):
2393         (WebCore::RuleData::increaseSpecificity):
2394         Added a new method to increase selector's specificity. This method is
2395         used to make @host @-rules' specificity larger than normal author
2396         rules' specificity.
2397         (RuleSet):
2398         * css/StyleResolver.cpp:
2399         (WebCore::makeRuleSet):
2400         (WebCore::StyleResolver::addHostRule):
2401         A wrapper method to invoke StyleScopeResolver::addHostRule. The method
2402         is used to make only StyleResolver know an implementation detail about
2403         class StyleScopeResolver.
2404         (WebCore::StyleResolver::appendAuthorStylesheets):
2405         Updated according to the RuleData's change.
2406         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
2407         A new method to find matched host rules when an element is given.
2408         This method invokes
2409         StyleScopeResolver::styleSharingCandidateMatchesHostRules to find
2410         matched host rules.
2411         (WebCore):
2412         (WebCore::StyleResolver::matchHostRules):
2413         A new method to find matched host rules when an element is given.
2414         This method invokes StyleScopeResolver::matchHostRules to find
2415         matched host rules.
2416         (WebCore::StyleResolver::matchScopedAuthorRules):
2417         Modified to invoke matchHostRules.
2418         (WebCore::StyleResolver::locateSharedStyle):
2419         Disable sibling style cache if the given element is a shadow host and
2420         any @host @-rules are applied to the element.
2421         * css/StyleResolver.h:
2422         (WebCore::StyleResolver::ensureScopeResolver):
2423         If no scopeResolver is created, create and return the instance.
2424         If created, just return the instance.
2425         (StyleResolver):
2426         * css/StyleRule.cpp:
2427         (WebCore::StyleRuleBase::reportMemoryUsage):
2428         (WebCore::StyleRuleBase::destroy):
2429         (WebCore::StyleRuleBase::copy):
2430         (WebCore::StyleRuleBase::createCSSOMWrapper):
2431         (WebCore::StyleRuleHost::StyleRuleHost):
2432         Implemented class StyleRuleHost. The class is almost the same as
2433         StyleRuleBlock except type.
2434         (WebCore):
2435         * css/StyleRule.h:
2436         (WebCore::StyleRuleBase::isHostRule):
2437         (StyleRuleHost):
2438         (WebCore::StyleRuleHost::create):
2439         (WebCore::StyleRuleHost::copy):
2440         (WebCore):
2441         * css/StyleScopeResolver.cpp:
2442         (WebCore::StyleScopeResolver::ensureAtHostRuleSetFor):
2443         A new method to create a new RuleSet for the given shadow root.
2444         (WebCore):
2445         (WebCore::StyleScopeResolver::atHostRuleSetFor):
2446         A new private inline method to obtain @host @-rules declared in
2447         the given shadow root.
2448         (WebCore::StyleScopeResolver::addHostRule):
2449         Added a new method to register @host @-rules with shadow roots.
2450         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
2451         A new method to find whether any @host @-rules are applied to
2452         the given host element.
2453         (WebCore::StyleScopeResolver::matchHostRules):
2454         A new method to find matched rules for the given host element.
2455         (WebCore::StyleScopeResolver::reportMemoryUsage):
2456         * css/StyleScopeResolver.h:
2457         (WebCore):
2458         (StyleScopeResolver):
2459         * css/StyleSheetContents.cpp:
2460         (WebCore::childRulesHaveFailedOrCanceledSubresources):
2461
2462 2012-10-26  Jaehun Lim  <ljaehun.lim@samsung.com>
2463
2464         [CMAKE] Add TextAutosizer.cpp in WebCore/CMakeLists.txt
2465         https://bugs.webkit.org/show_bug.cgi?id=100476
2466
2467         Reviewed by Kentaro Hara.
2468
2469         ENABLE_TEXT_AUTOSIZING option is added in CMAKE,
2470         but the source file for that feature is omitted.
2471
2472         No new tests. Covered by existing tests.
2473
2474         * CMakeLists.txt:
2475
2476 2012-10-26  Julien Chaffraix  <jchaffraix@webkit.org>
2477
2478         RenderTableCol::computePreferredLogicalWidths and RenderTableCol::layout should never be called
2479         https://bugs.webkit.org/show_bug.cgi?id=99861
2480
2481         Reviewed by Ojan Vafai.
2482
2483         RenderTableCol's computePreferredLogicalWidths and layout's only purpose were to clear the preferred logical
2484         widths dirty / layout flag so that we would properly propagate the information to our containing table. This
2485         led to clunky code where the table layout code had to forcefully call RenderTableCol::computePreferredLogicalWidths
2486         or else we would ignore the next layout hint on the <col> or <colgroup>.
2487
2488         Tests: fast/table/col-span-change-relayout.html
2489                fast/table/simplified-layout-table.html
2490
2491         * rendering/AutoTableLayout.cpp:
2492         (WebCore::AutoTableLayout::recalcColumn):
2493         * rendering/RenderTable.cpp:
2494         (WebCore::RenderTable::layout):
2495         Simplified the code now that we only need to iterate over the sections.
2496
2497         * rendering/FixedTableLayout.cpp:
2498         (WebCore::FixedTableLayout::calcWidthArray):
2499         Removed call to computePreferredLogicalWidths.
2500
2501         * rendering/RenderTableCol.cpp:
2502         (WebCore::RenderTableCol::styleDidChange):
2503         (WebCore::RenderTableCol::updateFromElement):
2504         Forward a layout hint to the table so that we properly recompute the cell's logical withs.
2505
2506         (WebCore::RenderTableCol::computePreferredLogicalWidths):
2507         (WebCore::RenderTableCol::layout):
2508         Change our implementations of those 2 methods to be no-ops, while enforcing that they are
2509         never called when it was possible.
2510
2511         (WebCore::RenderTableCol::propagateLayoutCueToTable):
2512         New helper function that forward any layout cue to the containing table, this works around
2513         us not clearing the flags which confuses RenderObject markContainingBlocksForLayout and
2514         invalidateContainerPreferredLogicalWidths.
2515
2516         * rendering/RenderTableCol.h:
2517         Made the function that we are not expected to be called private.
2518
2519 2012-10-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2520
2521         Unreviewed, rolling out r132601.
2522         http://trac.webkit.org/changeset/132601
2523         https://bugs.webkit.org/show_bug.cgi?id=100494
2524
2525         It broke the Qt build (Requested by Ossy on #webkit).
2526
2527         * PlatformEfl.cmake:
2528         * platform/graphics/GraphicsContext3D.h:
2529         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2530         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
2531         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2532         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2533         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2534         (WebCore):
2535         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2536         (GraphicsContext3DPrivate):
2537         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2538         (WebCore::GraphicsContext3D::reshape):
2539         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2540         (WebCore::OffScreenRootWindow::get):
2541         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2542         (OffScreenRootWindow):
2543         (WebCore):
2544         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2545         (WebCore::GraphicsSurfacePrivate::createSurface):
2546         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2547         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2548         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2549         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2550         (GraphicsSurfacePrivate):
2551         (WebCore::resolveGLMethods):
2552
2553 2012-10-26  Yury Semikhatsky  <yurys@chromium.org>
2554
2555         Memory instrumentation: do not report memory occupied by v8::String
2556         https://bugs.webkit.org/show_bug.cgi?id=100487
2557
2558         Reviewed by Alexander Pavlov.
2559
2560         Pointers to v8::String are skipped when reporting memory usage of V8 bindings'
2561         string cache.
2562
2563         * bindings/v8/V8Binding.cpp:
2564         (WTF):
2565
2566 2012-10-26  Mihnea Ovidenie  <mihnea@adobe.com>
2567
2568         [CSSRegions] Add support for auto-height regions with region-breaks
2569         https://bugs.webkit.org/show_bug.cgi?id=99952
2570
2571         Reviewed by David Hyatt.
2572
2573         This patch takes region breaks into account when computing the height for auto logical height regions.
2574         When a region break is encountered before/after an element from within a flow thread and we are in the layout
2575         phase in which we lay out the flow threads in regions unconstrained, we use the region break to
2576         compute the region override logical content height if the region break fits inside an auto logical height region.
2577         A region break inside an auto logical height region determines the region override logical content height, taking
2578         min/max height into account.
2579
2580         Tests: fast/regions/autoheight-allregions-nobreaks.html
2581                fast/regions/autoheight-allregions.html
2582                fast/regions/autoheight-breakafteralways-maxheight.html
2583                fast/regions/autoheight-breakbeforealways.html
2584                fast/regions/autoheight-firstregion-breakalways.html
2585                fast/regions/autoheight-lastregion-overflowauto-breaksignored.html
2586                fast/regions/autoheight-lastregion-overflowauto.html
2587                fast/regions/autoheight-middleregion.html
2588                fast/regions/autoheight-secondregion-breakoutside.html
2589                fast/regions/autoheight-secondregion.html
2590                fast/regions/autoheight-singleregion-breakafteralways-maxheight.html
2591                fast/regions/autoheight-singleregion-breakafteralways.html
2592                fast/regions/autoheight-singleregion-breakaftermargin.html
2593                fast/regions/autoheight-singleregion-breakbeforealways-minheight.html
2594                fast/regions/autoheight-singleregion-breakbeforealways.html
2595                fast/regions/autoheight-singleregion-multiplebreaks.html
2596                fast/regions/autoheight-singleregion-overflowauto-breaksignored.html
2597                fast/regions/autoheight-singleregion-overflowauto.html
2598
2599         * rendering/RenderBlock.cpp: When encounter a region break before/after an element inside a flow thread,
2600         try to use it to determine the override logical content height for auto logical height regions.
2601         (WebCore::RenderBlock::applyBeforeBreak):
2602         (WebCore::RenderBlock::applyAfterBreak):
2603         * rendering/RenderFlowThread.cpp:
2604         (WebCore::RenderFlowThread::layout):
2605         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
2606         Simulate a region break at the end of the flow thread content.
2607         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
2608         (WebCore::RenderFlowThread::clearOverrideLogicalContentHeightInRegions):
2609         Helper method used to clear the overrideLogicalContentHeight for auto logical height regions.
2610         (WebCore::RenderFlowThread::addForcedRegionBreak):
2611         Extend the method to process region breaks. The method returns true if at least one auto logical height region
2612         has its override logical content height computed.        
2613         * rendering/RenderFlowThread.h:
2614         * rendering/RenderRegion.cpp: Make these methods work with auto logical height regions.
2615         (WebCore::RenderRegion::pageLogicalHeight):
2616         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
2617
2618 2012-10-26  Regina Chung  <heejin.r.chung@samsung.com>
2619
2620         [EFL][WK2] Enable WebGL
2621         https://bugs.webkit.org/show_bug.cgi?id=97652
2622
2623         Reviewed by Gyuyoung Kim.
2624
2625         Implemented GraphicsSurface for EFL to enable WebGL for WebKit2.
2626         Depends on GLX since Evas doesn't provide the necessary functionality.
2627
2628         No new tests. Covered by existing tests.
2629
2630         * PlatformEfl.cmake:
2631         * platform/graphics/GraphicsContext3D.h:
2632         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2633         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
2634         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2635         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2636         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2637         (WebCore):
2638         (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
2639         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
2640         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
2641         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2642         (GraphicsContext3DPrivate):
2643         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2644         (WebCore::GraphicsContext3D::reshape):
2645         * platform/graphics/surfaces/efl: Added.
2646         * platform/graphics/surfaces/efl/GraphicsSurfaceEfl.cpp: Added.
2647         (WebCore):
2648         (WebCore::OffScreenRootWindow::get):
2649         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2650         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2651         (WebCore::GraphicsSurfacePrivate::createSurface):
2652         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2653         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2654         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2655         (WebCore::GraphicsSurface::platformBeginPaint):
2656         (WebCore::GraphicsSurface::createReadOnlyImage):
2657         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2658         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.h: Added.
2659         (WebCore):
2660         (OffScreenRootWindow):
2661         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
2662         (GraphicsSurfacePrivate):
2663         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
2664         (WebCore::GraphicsSurfacePrivate::createPixmap):
2665         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2666         (WebCore::GraphicsSurfacePrivate::display):
2667         (WebCore::GraphicsSurfacePrivate::glxPixmap):
2668         (WebCore::GraphicsSurfacePrivate::size):
2669         (WebCore::GraphicsSurfacePrivate::glContext):
2670         (WebCore::resolveGLMethods):
2671         * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
2672         (WebCore):
2673         (WebCore::OffScreenRootWindow::OffScreenRootWindow::get):
2674         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2675         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2676         (WebCore::GraphicsSurfacePrivate::createSurface):
2677         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2678         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2679         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2680
2681 2012-10-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2682
2683         Add feature flags for CSS Device Adaptation
2684         https://bugs.webkit.org/show_bug.cgi?id=95960
2685
2686         Reviewed by Kenneth Rohde Christiansen.
2687
2688         * Configurations/FeatureDefines.xcconfig:
2689         * GNUmakefile.am:
2690         * GNUmakefile.features.am:
2691
2692 2012-10-26  Li Yin  <li.yin@intel.com>
2693
2694         fast/forms/file/input-file-write-files.html should cover correct setting value
2695         https://bugs.webkit.org/show_bug.cgi?id=100085
2696
2697         Reviewed by Kentaro Hara.
2698
2699         From Spec: http://dev.w3.org/html5/spec/single-page.html#dom-input-value-filename
2700         On setting, if the new value is the empty string, it must empty the list of selected
2701         files; otherwise, it must throw an InvalidStateError exception.
2702
2703         Test: fast/forms/file/input-file-value.html
2704
2705         * html/HTMLInputElement.cpp:
2706         (WebCore::HTMLInputElement::setValue):
2707         (WebCore):
2708         * html/HTMLInputElement.h:
2709         (HTMLInputElement):
2710         * html/HTMLInputElement.idl:
2711
2712 2012-10-26  Keishi Hattori  <keishi@webkit.org>
2713
2714         Refactor calendar picker to remove _x/_y from DaysTable
2715         https://bugs.webkit.org/show_bug.cgi?id=100460
2716
2717         Reviewed by Kent Tamura.
2718
2719         _x/_y properties keep the coordinates for the selection but when we add
2720         week and month picking capabilities, the selection can't be expressed as
2721         a set of coordinates. This change will remove it.
2722
2723         No new tests. Covered by calendar-picker-*.html tests.
2724
2725         * Resources/pagepopups/calendarPicker.js:
2726         (DaysTable): Removed _x/_y properties.
2727         (DaysTable.prototype._hasSelection): Changed to refer to the DOM to see if we have a selection.
2728         (DaysTable.prototype.navigateToMonthAndKeepSelectionPosition): Lookup the selection position.
2729         (DaysTable.prototype.selectDate): Deselect first so we don't have two selections.
2730         (DaysTable.prototype._selectRangeContainingNode): Selects date/week/month containing the given day node.
2731         (DaysTable.prototype._selectRangeAtPosition): Selects date/week/month at the given position.
2732         (DaysTable.prototype._firstNodeInSelectedRange): Returns first selected day node.
2733         (DaysTable.prototype._deselect): Deselects all selections.
2734         (DaysTable.prototype._handleMouseOver): Use _selectRangeContainingNode so we don't have many places handling the selection.
2735         (DaysTable.prototype._handleMouseOut): Use _deselect.
2736         (DaysTable.prototype._handleKey): Lookup the selection position.
2737         (DaysTable.prototype.updateSelection): Use _selectRangeAtPosition.
2738
2739 2012-10-26  Ningxin Hu  <ningxin.hu@intel.com>
2740
2741         FileReader abort case causes Chromium renderer crash
2742         https://bugs.webkit.org/show_bug.cgi?id=99142
2743
2744         Reviewed by Kentaro Hara.
2745
2746         Before dispatching load event, FileReader should check if it is
2747         in aborting.
2748
2749         Test: manually launch fast/files/file-reader-abort.html in Chromium
2750         browser and compare the result with
2751         fast/files/file-reader-abort-expected.txt.
2752
2753         * fileapi/FileReader.cpp:
2754         (WebCore::FileReader::didFinishLoading):
2755
2756 2012-10-26  Julien Chaffraix  <jchaffraix@webkit.org>
2757
2758         Generate less repaint calls during subtree detaching
2759         https://bugs.webkit.org/show_bug.cgi?id=99741
2760
2761         Reviewed by Eric Seidel.
2762
2763         Following bug 98336, detach is now a subtree top-down operation. Because we
2764         track visual overflow from our children during layout for most cases, we can
2765         generate a repaint only on the subtree root.
2766
2767         On http://dglazkov.github.com/performance-tests/redraw.html, this ups the FPS to
2768         26 fps from 22 fps on my MBP (+ 15%). On PerformanceTests/layout/subtree-detach.html,
2769         it decreases the time by 35%. This is due to being the best case and we now generate
2770         only one repaint per detach phase.
2771
2772         Covered by existing pixels tests (including but not limited to repaint ones).
2773
2774         * rendering/RenderObject.cpp:
2775         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2776         Changed the function not to be recursive anymore to generate one painting for
2777         our root only. Added a FIXME about using our RenderLayer for repainting to avoid
2778         the cost of computing our absolute repaint rectangle.
2779
2780         * rendering/RenderObjectChildList.cpp:
2781         (WebCore::RenderObjectChildList::removeChildNode):
2782         Removed the logic for repainting in the general case. However we still force a repaint
2783         if we have a RenderLayer as we don't track their overflow in some cases (e.g. positioned
2784         objects). This check is conservative and could be narrowed down (e.g overflow RenderLayers
2785         are properly accounted for in our clipppedOverflowRectForRepaint).
2786
2787 2012-10-26  Kenichi Ishibashi  <bashi@chromium.org>
2788
2789         local(Helvetica) in src descriptor prevent fallback
2790         https://bugs.webkit.org/show_bug.cgi?id=100446
2791
2792         Reviewed by Dan Bernstein.
2793
2794         FontCache::getCachedFontData() has a mechanism that aliases a few pairs
2795         of font family names, so that if the family name specified in the font-family
2796         property is not available on the system, but the its alias is available,
2797         it will be used instead. This is appropriate for the font-family property,
2798         but not for font family names specified in the local() function of the src
2799         descriptor in a @font-face rule.
2800
2801         This patch disables the mechanism while checking src descriptor of @font-face.
2802
2803         No new tests. It's difficult to test the change because 'Helvetica' can
2804         be mapped any other font. For example, chromium DRT uses FontConfig to
2805         map Helvetica to Times New Roman. Other ports may map Helvetica to other
2806         fonts. We can't define the expected result.
2807
2808         * css/CSSFontFaceSource.cpp:
2809         (WebCore::CSSFontFaceSource::getFontData):
2810         Call fontCache()->getCachedFontData() with checkingAlternateName = true.
2811         This disables aliasing font family names in FontCache.
2812
2813 2012-10-26  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2814
2815         Web Inspector: Doctype Audits panel code
2816         https://bugs.webkit.org/show_bug.cgi?id=100371
2817
2818         Reviewed by Alexander Pavlov.
2819
2820         This is a preparation step for ongoing refactoring.
2821         It is much easier to read doctyped code.
2822
2823         * inspector/front-end/AuditRules.js:
2824         (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun):
2825         Replaced "undefined" with "null"
2826         * inspector/front-end/AuditsPanel.js:
2827         (WebInspector.AuditCategory.prototype.callbackWrapper):
2828         Removed callback parameter indirection.        
2829         (WebInspector.AuditRuleResult.prototype.addFormatted):
2830         Converted private instance function to scoped function.
2831
2832 2012-10-26  János Badics  <jbadics@inf.u-szeged.hu>
2833
2834         [Qt]REGRESSION(r131428): cookies.db created on wrong place
2835         https://bugs.webkit.org/show_bug.cgi?id=99445
2836
2837         Reviewed by Simon Hausmann.
2838
2839         Added a slash to the path of cookies.db in CookieJarQt.cpp.
2840
2841         * platform/qt/CookieJarQt.cpp:
2842         (WebCore::SharedCookieJarQt::SharedCookieJarQt):
2843
2844 2012-10-26  Adam Barth  <abarth@webkit.org>
2845
2846         Unreviewed. This ASSERT is no longer correct (and fires on many tests.)
2847
2848         * bindings/v8/V8DOMWrapper.h:
2849         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
2850
2851 2012-10-26  Kent Tamura  <tkent@chromium.org>
2852
2853         [Chromium-Win] Support shortTimeFormat
2854         https://bugs.webkit.org/show_bug.cgi?id=100471
2855
2856         Reviewed by Kentaro Hara.
2857
2858         No new tests. Covered by fast/forms/time-multiple-fields/ and
2859         WebKit/chromium/tests/LocaleWinTest.
2860
2861         * platform/text/LocaleWin.cpp:
2862         (WebCore::LocaleWin::shortTimeFormat):
2863         Gets a format by LOCALE_SSHORTTIME. If it fails, remove "<delimiter>ss"
2864         from the format by LOCALE_STIMEFORMAT.
2865         * platform/text/LocaleWin.h:
2866         (LocaleWin): Declare m_timeFormatWithoutSeconds.
2867
2868 2012-10-26  Adam Barth  <abarth@webkit.org>
2869
2870         Unreviewed. Update run-bindings-tests results after recent active DOM
2871         object changes.
2872
2873         * bindings/scripts/test/V8/V8TestInterface.cpp:
2874         (WebCore::V8TestInterface::constructorCallback):
2875         (WebCore::V8TestInterface::wrapSlow):
2876         * bindings/scripts/test/V8/V8TestInterface.h:
2877         (WebCore::V8TestInterface::wrap):
2878         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2879         (WebCore::V8TestNamedConstructorConstructorCallback):
2880         (WebCore::V8TestNamedConstructor::wrapSlow):
2881         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2882         (WebCore::V8TestNamedConstructor::wrap):
2883
2884 2012-10-26  MORITA Hajime  <morrita@google.com>
2885
2886         [V8] REGRESSION(132540) Assertion failure on V8DOMWrapper::setJSWrapperForDOMNode()
2887         https://bugs.webkit.org/show_bug.cgi?id=100462
2888
2889         Reviewed by Adam Barth.
2890
2891         Removed the no longer correct assertion statement.
2892
2893         No new tests. Covered by breaking tests.
2894
2895         * bindings/v8/V8DOMWrapper.cpp:
2896         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
2897
2898 2012-10-25  Adam Barth  <abarth@webkit.org>
2899
2900         [V8] WorkerContextExecutionProxy should use ScopedPersistent
2901         https://bugs.webkit.org/show_bug.cgi?id=100443
2902
2903         Reviewed by Eric Seidel.
2904
2905         This class was manually re-implementing the ScopedPersistent pattern.
2906
2907         * bindings/v8/WorkerContextExecutionProxy.cpp:
2908         (WebCore::WorkerContextExecutionProxy::dispose):
2909         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
2910         (WebCore::WorkerContextExecutionProxy::evaluate):
2911         * bindings/v8/WorkerContextExecutionProxy.h:
2912         (WebCore::WorkerContextExecutionProxy::context):
2913         (WorkerContextExecutionProxy):
2914
2915 2012-10-25  Peter Wang  <peter.wang@torchmobile.com.cn>
2916
2917         A mistake in WebCore::JavaScriptCallFrame::evaluate which will cause assert failed
2918         https://bugs.webkit.org/show_bug.cgi?id=100347
2919
2920         Reviewed by Mark Lam and Filip Pizlo.
2921
2922         In worker context, calling "JSDOMWindowBase::commonJSGlobalData" will cause assert,
2923         since there is "ASSERT(isMainThread())" in "JSDOMWindowBase::commonJSGlobalData".
2924
2925         No new test case, since no behaviour changed.
2926
2927         * bindings/js/JavaScriptCallFrame.cpp:
2928         (WebCore::JavaScriptCallFrame::evaluate):
2929
2930 2012-10-25  Adam Barth  <abarth@webkit.org>
2931
2932         [V8] We can merge the wrapper maps for DOM objects and active DOM objects
2933         https://bugs.webkit.org/show_bug.cgi?id=100432
2934
2935         Reviewed by Eric Seidel.
2936
2937         Now that we use the same object to visit both DOM objects and active
2938         DOM objects, there's no reason to keep them in separate hash maps.
2939
2940         * bindings/scripts/CodeGeneratorV8.pm:
2941         (GetDomMapName):
2942         * bindings/v8/DOMDataStore.cpp:
2943         (WebCore::DOMDataStore::DOMDataStore):
2944         (WebCore::DOMDataStore::~DOMDataStore):
2945         (WebCore::DOMDataStore::reportMemoryUsage):
2946         * bindings/v8/DOMDataStore.h:
2947         (DOMDataStore):
2948         * bindings/v8/V8DOMMap.cpp:
2949         * bindings/v8/V8DOMMap.h:
2950         (NodeWrapperVisitor):
2951         (WebCore):
2952         * bindings/v8/V8DOMWrapper.h:
2953         (V8DOMWrapper):
2954         * bindings/v8/V8GCController.cpp:
2955         (WebCore::V8GCController::majorGCPrologue):
2956         * bindings/v8/custom/V8WebSocketCustom.cpp:
2957         (WebCore::V8WebSocket::constructorCallback):
2958         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2959         (WebCore::V8XMLHttpRequest::constructorCallback):
2960
2961 2012-10-25  Charles Wei  <charles.wei@torchmobile.com.cn>
2962
2963         [BlackBerry] User Challenged again after browser restart for HTTP/FTP sites already successfully authenticated.
2964         https://bugs.webkit.org/show_bug.cgi?id=100448
2965
2966         Reviewed by George Staikos.
2967
2968         Internally reviewed by Joe Mason.
2969
2970         We didn't check the persistent Credential Storage for Credentials when challenged by the server.
2971
2972         Manual Test: login to ftp://localhost on BlackBerry device, and restart the browser to login again.
2973
2974         * platform/network/blackberry/NetworkJob.cpp:
2975         (WebCore::NetworkJob::sendRequestWithCredentials):
2976
2977 2012-10-25  Joshua Bell  <jsbell@chromium.org>
2978
2979         IndexedDB: Add histogram statistics for backing store errors
2980         https://bugs.webkit.org/show_bug.cgi?id=98465
2981
2982         Reviewed by Adam Barth.
2983
2984         Define a macro for consistent asserting (during development), logging, and recording
2985         internal backing store errors via histograms. Define specific histogram values to
2986         track issues with opening backing stores to gather stats on corruption.
2987
2988         No new tests - just the stats, ma'am, just the stats.
2989
2990         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2991         (WebCore):
2992         (WebCore::setUpMetadata):
2993         (WebCore::IDBLevelDBBackingStore::open):
2994         (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
2995         (WebCore::IDBLevelDBBackingStore::createIDBDatabaseMetaData):
2996         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
2997         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData):
2998         (WebCore::deleteRange):
2999         (WebCore::IDBLevelDBBackingStore::getObjectStores):
3000         (WebCore::IDBLevelDBBackingStore::createObjectStore):
3001         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
3002         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
3003         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
3004         (WebCore::IDBLevelDBBackingStore::getIndexes):
3005         (WebCore::IDBLevelDBBackingStore::createIndex):
3006         (WebCore::IDBLevelDBBackingStore::deleteIndex):
3007         (WebCore::IDBLevelDBBackingStore::findKeyInIndex):
3008
3009 2012-10-25  Adam Barth  <abarth@webkit.org>
3010
3011         [V8] We can merge ActiveDOMObjectPrologueVisitor with ObjectVisitor
3012         https://bugs.webkit.org/show_bug.cgi?id=100430
3013
3014         Reviewed by Eric Seidel.
3015
3016         There's no reason for these visitors to be separate objects anymore.
3017
3018         * bindings/v8/V8GCController.cpp:
3019         (WebCore::ObjectVisitor::ObjectVisitor):
3020         (WebCore::ObjectVisitor::visitDOMWrapper):
3021         (WebCore::V8GCController::majorGCPrologue):
3022
3023 2012-10-25  Tony Chang  <tony@chromium.org>
3024
3025         Remove unused static methods from DOMTimer.h
3026         https://bugs.webkit.org/show_bug.cgi?id=100427
3027
3028         Reviewed by Kenneth Russell.
3029
3030         Since these values got moved into Settings, these methods are no longer called.
3031
3032         No new tests, removing dead code.
3033
3034         * page/DOMTimer.h:
3035         (DOMTimer): Remove unused getters.
3036
3037 2012-10-25  Leo Yang  <leoyang@rim.com>
3038
3039         [BlackBerry] Infinite redirect loop is not displayed to user
3040         https://bugs.webkit.org/show_bug.cgi?id=100420
3041
3042         Reviewed by George Staikos.
3043
3044         CNN.com is redirecting us infinitely with 302 http code and response body. We catch
3045         it my setting our extended error code as we defined. But we were not trying to notify
3046         error because we have received body. This was wrong. For extended http status code
3047         which is less than 0 we should display our own error page regardless there was data
3048         received from the server or not.
3049
3050         Tested by manually loading CNN.com.
3051
3052         * platform/network/blackberry/NetworkJob.cpp:
3053         (WebCore::NetworkJob::shouldNotifyClientFailed):
3054
3055 2012-10-25  Nico Weber  <thakis@chromium.org>
3056
3057         Flip ImageOrientation coordinate system from lefthanded to righthanded
3058         https://bugs.webkit.org/show_bug.cgi?id=100414
3059
3060         Reviewed by Eric Seidel.
3061
3062         platform/graphics, noteably GraphicsContext uses a right-handed
3063         coordinate system (origin in the top left corner, x growing to the
3064         right, y to the bottom).  ImageOrientation was an outlier from
3065         and used a left-handed coordinate system.  This patch makes
3066         ImageOrientation match the rest of platform/graphics.
3067
3068         This is a pure refactoring and has no observable effects.
3069
3070         * platform/chromium/DragImageChromiumSkia.cpp:
3071         (WebCore::createDragImageFromImage):
3072         * platform/graphics/ImageOrientation.cpp:
3073         (WebCore::ImageOrientation::transformFromDefault):
3074         * platform/graphics/cg/GraphicsContextCG.cpp:
3075         (WebCore::GraphicsContext::drawNativeImage):
3076         * platform/graphics/skia/ImageSkia.cpp:
3077         (WebCore::BitmapImage::draw):
3078         * platform/mac/DragImageMac.mm:
3079         (WebCore::createDragImageFromImage):
3080         * rendering/RenderObject.cpp:
3081         (WebCore::RenderObject::shouldRespectImageOrientation):
3082
3083 2012-10-25  Keishi Hattori  <keishi@webkit.org>
3084
3085         Hide popup while transitioning from the suggestion picker to the calendar picker
3086         https://bugs.webkit.org/show_bug.cgi?id=99537
3087
3088         Reviewed by Kent Tamura.
3089
3090         Right now you can see a squished calendar picker while transitioning
3091         from suggestion picker from calendar picker. This change will hide the
3092         popup before opening the calendar picker.
3093
3094         No new tests.
3095
3096         * Resources/pagepopups/pickerCommon.js: Hiding the window will also trigger a resize event so I created a separate event, didOpenPicker.
3097         (hideWindow): Resize the window to 1x1 because we can't resize to 0x0.
3098         * Resources/pagepopups/suggestionPicker.js:
3099         (SuggestionPicker.prototype.selectEntry): Hide the window first and then open the calendar picker.
3100
3101 2012-10-25  Anders Carlsson  <andersca@apple.com>
3102
3103         Fix build.
3104
3105         * page/mac/EventHandlerMac.mm:
3106         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
3107
3108 2012-10-25  Anders Carlsson  <andersca@apple.com>
3109
3110         Remove feed and feeds URL scheme workarounds
3111         https://bugs.webkit.org/show_bug.cgi?id=100442
3112
3113         Reviewed by Dan Bernstein.
3114
3115         * dom/DocumentEventQueue.cpp:
3116         (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent):
3117         * page/mac/EventHandlerMac.mm:
3118         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
3119
3120 2012-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3121
3122         Unreviewed, rolling out r132514.
3123         http://trac.webkit.org/changeset/132514
3124         https://bugs.webkit.org/show_bug.cgi?id=100440
3125
3126         "Broke chromium content_browsertests AccessibilityAriaMenu
3127         AccessibilityInputRange AccessibilityListMarkers" (Requested
3128         by scheib on #webkit).
3129
3130         * accessibility/AXObjectCache.cpp:
3131         (WebCore::AXObjectCache::getOrCreate):
3132         (WebCore::AXObjectCache::contentChanged):
3133         (WebCore::AXObjectCache::childrenChanged):
3134         (WebCore::AXObjectCache::handleAriaRoleChanged):
3135         * accessibility/AXObjectCache.h:
3136         (AXObjectCache):
3137         (WebCore::AXObjectCache::contentChanged):
3138         * accessibility/AccessibilityObject.cpp:
3139         (WebCore::AccessibilityObject::AccessibilityObject):
3140         * accessibility/AccessibilityObject.h:
3141         (WebCore::AccessibilityObject::contentChanged):
3142         (AccessibilityObject):
3143         * accessibility/AccessibilityRenderObject.cpp:
3144         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3145         (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
3146         (WebCore::AccessibilityRenderObject::contentChanged):
3147         * accessibility/AccessibilityRenderObject.h:
3148         (AccessibilityRenderObject):
3149         * accessibility/AccessibilityScrollView.cpp:
3150         (WebCore::AccessibilityScrollView::isAttachment):
3151         (WebCore::AccessibilityScrollView::widgetForAttachmentView):
3152         (WebCore::AccessibilityScrollView::updateScrollbars):
3153         (WebCore::AccessibilityScrollView::webAreaObject):
3154         (WebCore::AccessibilityScrollView::elementRect):
3155         (WebCore::AccessibilityScrollView::documentFrameView):
3156         (WebCore::AccessibilityScrollView::parentObject):
3157         (WebCore::AccessibilityScrollView::parentObjectIfExists):
3158         (WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
3159         (WebCore::AccessibilityScrollView::scrollTo):
3160         * accessibility/AccessibilityScrollView.h:
3161         (WebCore::AccessibilityScrollView::scrollView):
3162         (AccessibilityScrollView):
3163         * accessibility/AccessibilityTable.cpp:
3164         (WebCore::AccessibilityTable::isDataTable):
3165         * accessibility/chromium/AXObjectCacheChromium.cpp:
3166         (WebCore::AXObjectCache::postPlatformNotification):
3167         * dom/Element.cpp:
3168         (WebCore::Element::attributeChanged):
3169         * rendering/RenderBlock.cpp:
3170         (WebCore::RenderBlock::deleteLineBoxTree):
3171         (WebCore::RenderBlock::createAndAppendRootInlineBox):
3172         * rendering/RenderObject.cpp:
3173         (WebCore::RenderObject::styleWillChange):
3174         * rendering/RenderText.cpp:
3175         (WebCore::RenderText::setText):
3176
3177 2012-10-25  Dan Bernstein  <mitz@apple.com>
3178
3179         <rdar://problem/12544626> [cg] RenderBlock::selectionGaps() is extremely slow when there are many floats
3180         https://bugs.webkit.org/show_bug.cgi?id=100413
3181
3182         Reviewed by Anders Carlsson.
3183
3184         RenderBlock::selectionGaps() calls GraphicsContext::clipOut(const IntRect&) for each float.
3185         Sped up the Core Graphics implementation of this function considerably by removing an
3186         unnecessary call to CGContextGetClipBoundingBox.
3187
3188         * platform/graphics/cg/GraphicsContextCG.cpp:
3189         (WebCore::GraphicsContext::clipOut): Changed to use CGRectInfinite rather than the bounding
3190         box of the current clip.
3191
3192 2012-10-25  Tim Horton  <timothy_horton@apple.com>
3193
3194         REGRESSION (132422): Tiles don't move when the Find dialog causes programmatic scrolls
3195         https://bugs.webkit.org/show_bug.cgi?id=100433
3196         <rdar://problem/12575582>
3197
3198         Reviewed by Simon Fraser.
3199
3200         Actually update GraphicsLayer positions from updateMainFrameScrollPosition if
3201         we're doing a programmatic scroll; otherwise programmatic scrolls while scrolling
3202         on the main thread will short-circuit and end up only updating the GraphicsLayer's
3203         notion of its current position, but never synchronizing that to the layer itself.
3204
3205         No new tests, as this is currently untestable.
3206
3207         * page/scrolling/ScrollingCoordinator.cpp:
3208         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
3209
3210 2012-10-25  Simon Fraser  <simon.fraser@apple.com>
3211
3212         Tiled layers are missing content on zooming
3213         https://bugs.webkit.org/show_bug.cgi?id=100422
3214
3215         Reviewed by Beth Dakin.
3216
3217         Tiled layers using TileCaches were missing content after
3218         zooming. TileCache was confused in the presence of scaling;
3219         it unapplies the scale on the layer above the tiles (so the tiles
3220         live in screen space), and computed the tile coverage rect
3221         in these tile coordinates. This worked for the page tile cache,
3222         because its visibleRect was sent in pre-scaled. However, for
3223         tiled layer TileCaches this was wrong.
3224         
3225         Fix by scaling the tile coverage rect by m_scale before
3226         using it to compute which tiles to throw away and bring in.
3227         
3228         To fix the problem of the visibleRect being pre-scaled
3229         for the page tile cache, remove the setting of the visibleRect
3230         in RenderLayerCompositor::frameViewDidScroll(), and rely on 
3231         GraphicsLayerCA::updateVisibleRect() which computes the
3232         visible rect in the correct, layer coordinates.
3233
3234         Test: compositing/tiling/tile-cache-zoomed.html
3235
3236         * platform/graphics/ca/GraphicsLayerCA.cpp:
3237         (WebCore::GraphicsLayerCA::updateVisibleRect): Call setVisibleRect()
3238         for all tile cache layers, not just tiled layer ones, but only do
3239         the visible rect adjustment for those that are not the page tile cache.
3240         * platform/graphics/ca/mac/TileCache.mm:
3241         (WebCore::TileCache::revalidateTiles): Use a coverageRectInTileCoords rect,
3242         which is scaled to be in the same coordinate space as the tile grid.
3243         * rendering/RenderLayerCompositor.cpp:
3244         (WebCore::RenderLayerCompositor::frameViewDidScroll): Remove the code
3245         that sets the setVisibleRect() on the TiledBacking.
3246
3247 2012-10-25  Adam Barth  <abarth@webkit.org>
3248
3249         [V8] ActiveDOMNodes no longer require a separate wrapper map
3250         https://bugs.webkit.org/show_bug.cgi?id=100352
3251
3252         Reviewed by Eric Seidel.
3253
3254         There is no longer any reason to keep a separate DOM wrapper map for
3255         active DOM nodes. We can simply store them in the normal DOM node
3256         wrapper map (which is more efficient because it doesn't use a HashMap).
3257
3258         * bindings/scripts/CodeGeneratorV8.pm:
3259         (GetDomMapName):
3260         * bindings/v8/DOMDataStore.cpp:
3261         (WebCore::DOMDataStore::DOMDataStore):
3262         (WebCore::DOMDataStore::~DOMDataStore):
3263         (WebCore::DOMDataStore::reportMemoryUsage):
3264         * bindings/v8/DOMDataStore.h:
3265         (DOMDataStore):
3266         * bindings/v8/IntrusiveDOMWrapperMap.h:
3267         * bindings/v8/V8DOMMap.cpp:
3268         * bindings/v8/V8DOMMap.h:
3269         (WebCore):
3270         * bindings/v8/V8DOMWrapper.cpp:
3271         * bindings/v8/V8DOMWrapper.h:
3272         (V8DOMWrapper):
3273         (WebCore::V8DOMWrapper::getCachedWrapper):
3274
3275 2012-10-25  Tony Chang  <tony@chromium.org>
3276
3277         Unreviewed, fix the build on Mac.
3278
3279         Putting the getter in the Settings.h caused the global variable to be inlined and needing it to be exported.
3280         Instead, put the implementation in the cpp file.
3281
3282         * page/Settings.cpp:
3283         (WebCore::Settings::defaultMinDOMTimerInterval):
3284         (WebCore):
3285         (WebCore::Settings::defaultDOMTimerAlignmentInterval):
3286         * page/Settings.h:
3287         (Settings):
3288
3289 2012-10-25  Tony Chang  <tony@chromium.org>
3290
3291         Move default DOM Timer values into Settings
3292         https://bugs.webkit.org/show_bug.cgi?id=100405
3293
3294         Reviewed by Kenneth Russell.
3295
3296         Move the global values for defaultMinDOMTimerInterval and defaultDOMTimerAlignmentInterval into
3297         the Settings object. This is more consistent with other global settings and allows us to remove
3298         the setters on the DOMTimer object.
3299
3300         No new tests, this is a refactor.
3301
3302         * page/DOMTimer.cpp: Remove globals.
3303         * page/DOMTimer.h:
3304         (WebCore::DOMTimer::defaultMinTimerInterval): Call through to Settings
3305         (WebCore::DOMTimer::defaultTimerAlignmentInterval): Call through to Settings.
3306         (DOMTimer): Remove setters.
3307         * page/Settings.cpp:
3308         (WebCore::Settings::setDefaultMinDOMTimerInterval): Use a global in Settings.
3309         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Use a global in Settings.
3310         * page/Settings.h:
3311         (WebCore::Settings::defaultMinDOMTimerInterval): Inline the getter.
3312         (WebCore::Settings::defaultDOMTimerAlignmentInterval): Inline the getter.
3313         (Settings): Add globals.
3314
3315 2012-10-25  Simon Fraser  <simon.fraser@apple.com>
3316
3317         Report the tile coverage rect in layer coords, and add some tests for tiled backing and zooming
3318         https://bugs.webkit.org/show_bug.cgi?id=100416
3319
3320         Reviewed by Beth Dakin.
3321
3322         The tileCoverageRect is computed in "tile" coordinates, which don't match
3323         the visibleRect coordinates. It's more useful when testing to see the
3324         tile coverage relative to the view bounds, so unapply the scale whem
3325         reporting tile coverage in tests.
3326
3327         Tests: platform/mac/tiled-drawing/tiled-drawing-zoom-scrolled.html
3328                platform/mac/tiled-drawing/tiled-drawing-zoom.html
3329
3330         * platform/graphics/ca/mac/TileCache.h:
3331         * platform/graphics/ca/mac/TileCache.mm:
3332         (WebCore::TileCache::tileCoverageRect):
3333
3334 2012-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3335
3336         Unreviewed, rolling out r132269.
3337         http://trac.webkit.org/changeset/132269
3338         https://bugs.webkit.org/show_bug.cgi?id=100412
3339
3340         "Speculative rollout of r132269 in hopes of fixing a
3341         mysterious recalcStyle crasher" (Requested by eseidel on
3342         #webkit).
3343
3344         * rendering/RenderBlock.cpp:
3345         (WebCore::RenderBlock::updateFirstLetter):
3346         * rendering/RenderListBox.h:
3347         * rendering/RenderObjectChildList.cpp:
3348         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
3349
3350 2012-10-25  Stephen White  <senorblanco@chromium.org>
3351
3352         Change ReferenceFilterOperations to reference (own) the data passed to
3353         them.
3354         https://bugs.webkit.org/show_bug.cgi?id=97715
3355
3356         Reviewed by Nate Chapin.
3357
3358         Covered by css3/filters/reference-filter-update-after-remove.html
3359
3360         * css/CachedSVGDocumentReference.h: Added.
3361         (CachedSVGDocumentReference):
3362         New class which holds a CachedResourceHandle<CachedSVGDocument>, but
3363         can be placed in ReferenceFilterOperation's Data.  It also calls
3364         addClient() / removeClient(), in order to keep the CachedSVGDocument
3365         alive until the FilterEffectRenderer can get it.
3366         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
3367         (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
3368         (WebCore::CachedSVGDocumentReference::document):
3369         Accessor for the underlying document.
3370         * css/StyleResolver.cpp:
3371         (WebCore::StyleResolver::loadPendingSVGDocuments):
3372         Wrap the CachedSVGDocument handle in a CachedSVGDocumentReference, and
3373         transfer ownership to the ReferenceFilterOperation.
3374         (WebCore::StyleResolver::createFilterOperations):
3375         Same as above.
3376         * platform/graphics/filters/FilterOperation.h:
3377         (Data):
3378         New base class for generic data which can be deleted polymorphically.
3379         (WebCore::FilterOperation::ReferenceFilterOperation::data):
3380         (WebCore::FilterOperation::ReferenceFilterOperation::setData):
3381         Use the above-mentioned Data class, instead of a void *.
3382         (WebCore::FilterOperation::ReferenceFilterOperation::ReferenceFilterOperation):
3383         Don't initialize data to null; OwnPtr will do that for us.
3384         * rendering/FilterEffectRenderer.cpp:
3385         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3386         Extract the cached SVG document from the reference data.
3387         * rendering/RenderLayerFilterInfo.cpp:
3388         (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):
3389         Extract the cached SVG document from the reference data.
3390
3391 2012-10-25  Simon Fraser  <simon.fraser@apple.com>
3392
3393         Incorrect tile size in the slow scrolling case
3394         https://bugs.webkit.org/show_bug.cgi?id=100411
3395
3396         Reviewed by Beth Dakin.
3397
3398         If we're in slow scrolling mode, we don't want to inflate the
3399         coverage rect based on scrollability. This ensures that the few
3400         big tiles we create have the correct size.
3401
3402         * platform/graphics/ca/mac/TileCache.mm:
3403         (WebCore::TileCache::computeTileCoverageRect):
3404
3405 2012-10-25  Nico Weber  <thakis@chromium.org>
3406
3407         Move ImageOrientation transform back in CG space (lower-left origin), adapt the skia code to work with that, turn on feature for chromium
3408         https://bugs.webkit.org/show_bug.cgi?id=100401
3409
3410         Reviewed by Eric Seidel.
3411
3412         This is an alternative fix for the regression caused by r132384 / bug
3413         100179. The bug exists because different pieces of code didn't agree
3414         which space the transformation returned by ImageOrientation was in.
3415
3416         r132384 moved it from CG coordinates to skia coordinates, but didn't
3417         do it completetely. This CL reverts this part of r132384 so that the
3418         transformation is in CG coordinates again, and adapts the skia code to
3419         work in that space.
3420
3421         Alternatively, https://bugs.webkit.org/show_bug.cgi?id=100319 woudl
3422         make the cg code work with the transform in skia coordinates.
3423
3424         Covered by fast/images/exif-orientation.html
3425
3426         * platform/chromium/DragImageChromiumSkia.cpp:
3427         (WebCore::createDragImageFromImage):
3428         * platform/graphics/ImageOrientation.cpp:
3429         (WebCore::ImageOrientation::transformFromDefault):
3430         * platform/graphics/ImageOrientation.h:
3431         (WebCore):
3432         (WebCore::ImageOrientation::usesWidthAsHeight):
3433         (WebCore::ImageOrientation::fromEXIFValue):
3434         (ImageOrientation):
3435         * platform/graphics/cg/GraphicsContextCG.cpp:
3436         (WebCore::GraphicsContext::drawNativeImage):
3437         * platform/graphics/skia/ImageSkia.cpp:
3438         (WebCore::BitmapImage::draw):
3439         * platform/mac/DragImageMac.mm:
3440         (WebCore::createDragImageFromImage):
3441         * rendering/RenderObject.cpp:
3442         (WebCore::RenderObject::shouldRespectImageOrientation):
3443
3444 2012-10-25  Simon Fraser  <simon.fraser@apple.com>
3445
3446         Log the tile cache tile size in test output
3447         https://bugs.webkit.org/show_bug.cgi?id=100409
3448
3449         Reviewed by Beth Dakin.
3450
3451         When dumping tile cache information in tests, also dump the tile size.
3452
3453         * platform/graphics/TiledBacking.h:
3454         * platform/graphics/ca/GraphicsLayerCA.cpp:
3455         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
3456         * platform/graphics/ca/mac/TileCache.h:
3457
3458 2012-10-25  Arnaud Renevier  <a.renevier@sisa.samsung.com>