Web Inspector: beautify the paused in debugger message, make it configurable from...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-18  Pavel Feldman  <pfeldman@chromium.org>
2
3         Web Inspector: beautify the paused in debugger message, make it configurable from the front-end.
4         https://bugs.webkit.org/show_bug.cgi?id=91628
5
6         Reviewed by Vsevolod Vlasov.
7
8         Made message smaller, using consistent font;
9         Made message configurable from the front-end.
10
11         * English.lproj/localizedStrings.js:
12         * inspector/DOMNodeHighlighter.cpp:
13         (WebCore::InspectorOverlay::InspectorOverlay):
14         (WebCore::InspectorOverlay::setPausedInDebuggerMessage):
15         (WebCore::InspectorOverlay::update):
16         (WebCore::InspectorOverlay::drawPausedInDebugger):
17         * inspector/DOMNodeHighlighter.h:
18         (InspectorOverlay):
19         * inspector/Inspector.json:
20         * inspector/InspectorDebuggerAgent.cpp:
21         (WebCore::InspectorDebuggerAgent::setOverlayMessage):
22         (WebCore):
23         (WebCore::InspectorDebuggerAgent::clear):
24         * inspector/InspectorDebuggerAgent.h:
25         (InspectorDebuggerAgent):
26         * inspector/PageDebuggerAgent.cpp:
27         (WebCore::PageDebuggerAgent::setOverlayMessage):
28         * inspector/PageDebuggerAgent.h:
29         (PageDebuggerAgent):
30         * inspector/front-end/DebuggerModel.js:
31         (WebInspector.DebuggerModel.prototype._setDebuggerPausedDetails):
32
33 2012-07-18  Douglas Stockwell  <dstockwell@chromium.org>
34
35         WebCore::StylePropertySet::addParsedProperties - crash
36         https://bugs.webkit.org/show_bug.cgi?id=91153
37
38         Reviewed by Andreas Kling.
39
40         WebKitCSSKeyframeRule::style exposed an immutable StylePropertySet.
41         Modified to create a mutable copy on demand.
42
43         Test: fast/css/css-keyframe-style-mutate-crash.html
44
45         * css/StyleResolver.cpp:
46         (WebCore::StyleResolver::collectMatchingRulesForList):
47         * css/WebKitCSSKeyframeRule.cpp:
48         (WebCore::StyleKeyframe::mutableProperties): Added, creates a mutable copy of properties as required.
49         (WebCore::WebKitCSSKeyframeRule::style):
50         * css/WebKitCSSKeyframeRule.h:
51         (WebCore::StyleKeyframe::properties): Made const, use mutableProperties to mutate.
52
53 2012-07-18  Huang Dongsung  <luxtella@company100.net>
54
55         [Texmap] Make TextureMapperLayer clip m_state.needsDisplayRect with the layerRect.
56         https://bugs.webkit.org/show_bug.cgi?id=91595
57
58         Reviewed by Noam Rosenthal.
59
60         Internal review by Kwang Yul Seo.
61
62         Currently, TextureMapperLayer creates an ImageBuffer as big as
63         m_state.needsDisplayRect if m_state.needsDispaly is false. The size of
64         m_state.needsDisplayRect can be bigger than the size of the layerRect, so we may
65         consume more memory than the size of the layerRect. It even can cause crash if
66         m_state.needsDisplayRect is too big.
67
68         No new tests, covered by existing tests.
69
70         * platform/graphics/texmap/TextureMapperLayer.cpp:
71         (WebCore::TextureMapperLayer::updateBackingStore):
72
73 2012-07-18  Jason Liu  <jason.liu@torchmobile.com.cn>
74
75         [BlackBerry] We should update the status in NetworkJob if there is a new one from libcurl.
76         https://bugs.webkit.org/show_bug.cgi?id=91475
77
78         Reviewed by Yong Li.
79
80         Libcurl sometimes sends multiple status messages, we need to keep the last 
81         one in NetworkJob.
82         We originally had the m_statusReceived check, then we found out that libcurl 
83         sometimes sent additional 401 codes and added the 401 exception to the check, 
84         and now we're removing the whole check(so we don't need the exception either).
85
86         RIM PR# 163172
87         Reviewed internally by Joe Mason.
88
89         No new tests. This is caused by libcurl's multiple status messages.
90         So we don't need to write a test case for webkit.
91
92         * platform/network/blackberry/NetworkJob.cpp:
93         (WebCore::NetworkJob::handleNotifyStatusReceived):
94
95 2012-07-18  Kevin Ellis  <kevers@chromium.org>
96
97         TOUCH_ADJUSTMENT is too aggressive when snapping to large elements.
98         https://bugs.webkit.org/show_bug.cgi?id=91262
99
100         Reviewed by Antonio Gomes.
101
102         Constrains the extent to which the touch point can be adjusted when
103         generating synthetic mouse events when TOUCH_ADJUSTEMNT is enabled.
104         Previously, the target position snapped to the center of the target
105         element, which can be far removed from the touch position when tapping
106         on or near a large element.  The refined strategy is to leave the
107         adjusted position unchanged if tapping within the element or to snap
108         to the center of the overlap region if the touch point lies outside the
109         bounds of the element, but the touch area and element bounds overlap.
110         For non-rectilineary bounds, a point lying outside the element boundary
111         is pulled towards the center of the element, by an amount limited by
112         the radius of the touch area.
113
114         Tests: touchadjustment/big-div.html
115                touchadjustment/rotated-node.html
116
117         * page/TouchAdjustment.cpp:
118         (WebCore::TouchAdjustment::contentsToWindow):
119         (TouchAdjustment):
120         (WebCore::TouchAdjustment::snapTo):
121         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
122
123 2012-07-18  Sergey Rogulenko  <rogulenko@google.com>
124
125         Web Inspector: adding pause icon for JavaScript debugging
126         https://bugs.webkit.org/show_bug.cgi?id=90880
127
128         Reviewed by Pavel Feldman.
129
130         Refactored DOMNodeHighlighter into InspectorOverlay class and added a feature to show a "pause" screen when
131         the Javascript debugger is paused.
132
133         * inspector/DOMNodeHighlighter.cpp:
134         (WebCore::InspectorOverlay::InspectorOverlay):
135         (WebCore::InspectorOverlay::paint):
136         (WebCore::InspectorOverlay::drawOutline):
137         (WebCore::InspectorOverlay::getHighlight):
138         (WebCore::InspectorOverlay::setPausedInDebugger):
139         (WebCore::InspectorOverlay::hideHighlight):
140         (WebCore):
141         (WebCore::InspectorOverlay::highlightNode):
142         (WebCore::InspectorOverlay::setHighlightData):
143         (WebCore::InspectorOverlay::clearHighlightData):
144         (WebCore::InspectorOverlay::highlightedNode):
145         (WebCore::InspectorOverlay::update):
146         (WebCore::InspectorOverlay::drawHighlight):
147         (WebCore::InspectorOverlay::drawPausedInDebugger):
148         * inspector/DOMNodeHighlighter.h:
149         (WebCore):
150         (InspectorOverlay):
151         (WebCore::InspectorOverlay::create):
152         * inspector/InspectorController.cpp:
153         (WebCore::InspectorController::InspectorController):
154         (WebCore::InspectorController::drawHighlight):
155         (WebCore::InspectorController::getHighlight):
156         (WebCore::InspectorController::highlightedNode):
157         * inspector/InspectorController.h:
158         (WebCore):
159         (InspectorController):
160         * inspector/InspectorDOMAgent.cpp:
161         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
162         (WebCore::InspectorDOMAgent::~InspectorDOMAgent):
163         (WebCore::InspectorDOMAgent::handleMousePress):
164         (WebCore::InspectorDOMAgent::mouseDidMoveOverElement):
165         (WebCore::InspectorDOMAgent::setSearchingForNode):
166         (WebCore::InspectorDOMAgent::setHighlightDataFromConfig):
167         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
168         (WebCore::InspectorDOMAgent::highlightRect):
169         (WebCore::InspectorDOMAgent::highlightNode):
170         (WebCore::InspectorDOMAgent::highlightFrame):
171         (WebCore::InspectorDOMAgent::hideHighlight):
172         * inspector/InspectorDOMAgent.h:
173         (WebCore):
174         (WebCore::InspectorDOMAgent::create):
175         (InspectorDOMAgent):
176         * inspector/InspectorDebuggerAgent.h:
177         (InspectorDebuggerAgent):
178         * inspector/InspectorPageAgent.cpp:
179         (WebCore::InspectorPageAgent::create):
180         (WebCore::InspectorPageAgent::InspectorPageAgent):
181         (WebCore::InspectorPageAgent::didPaint):
182         * inspector/InspectorPageAgent.h:
183         (WebCore):
184         * inspector/PageDebuggerAgent.cpp:
185         (WebCore::PageDebuggerAgent::create):
186         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
187         (WebCore::PageDebuggerAgent::disable):
188         (WebCore):
189         (WebCore::PageDebuggerAgent::didPause):
190         (WebCore::PageDebuggerAgent::didContinue):
191         * inspector/PageDebuggerAgent.h:
192         (WebCore):
193         (PageDebuggerAgent):
194
195 2012-07-17  Andrey Kosyakov  <caseq@chromium.org>
196
197         Web Inspector: intern strings when processing timeline records
198         https://bugs.webkit.org/show_bug.cgi?id=91531
199
200         Reviewed by Pavel Feldman.
201
202         - added StringPool that is capable of interning strings;
203         - used it in TimelineModel to process all incoming records;
204
205         * inspector/front-end/TimelineModel.js:
206         (WebInspector.TimelineModel):
207         (WebInspector.TimelineModel.prototype._addRecord):
208         (WebInspector.TimelineModel.prototype.reset):
209         * inspector/front-end/utilities.js:
210
211 2012-07-18  Scott Graham  <scottmg@chromium.org>
212
213         Use cl to preprocess IDL for Chromium Windows generate_supplemental_dependency
214         https://bugs.webkit.org/show_bug.cgi?id=91548
215
216         Reviewed by Kentaro Hara.
217
218         Use cl.exe as preprocessor for IDL files rather than cygwin gcc. Cuts
219         two minute execution time on Windows by a bit better than 50%.
220
221         No new tests.
222
223         * WebCore.gyp/WebCore.gyp:
224         * bindings/scripts/preprocessor.pm:
225         (applyPreprocessor):
226
227 2012-07-18  Pavel Feldman  <pfeldman@chromium.org>
228
229         Web Inspector: remove search replace from behind experiment, polish the behavior
230         https://bugs.webkit.org/show_bug.cgi?id=91519
231
232         Reviewed by Vsevolod Vlasov.
233
234         - This change makes replace loop with no boundary, removes the loop parameter
235           from jumpToNext/Previous;
236         - Lays out replace as a second row
237         - Fixes replace all with no search matches
238         - Splits Search and Search and Replace
239         - Introduces explicit Next / Previous buttons in the search mode
240         - Introduces editRange on the TextEditor so that it was preserving the undo stack
241           (we'll need to fix editor so that it does not require it).
242
243         * English.lproj/localizedStrings.js:
244         * inspector/front-end/ConsolePanel.js:
245         (WebInspector.ConsolePanel.prototype.performSearch):
246         (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult):
247         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
248         * inspector/front-end/ElementsPanel.js:
249         (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult):
250         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
251         * inspector/front-end/ExtensionPanel.js:
252         (WebInspector.ExtensionPanel.prototype.performSearch):
253         (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
254         (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
255         * inspector/front-end/JavaScriptSourceFrame.js:
256         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
257         * inspector/front-end/NetworkPanel.js:
258         (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult):
259         (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult):
260         (WebInspector.NetworkPanel.prototype.jumpToPreviousSearchResult):
261         (WebInspector.NetworkPanel.prototype.jumpToNextSearchResult):
262         * inspector/front-end/Panel.js:
263         (WebInspector.Panel.prototype.performSearch):
264         (WebInspector.Panel.prototype.jumpToNextSearchResult):
265         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
266         * inspector/front-end/ProfilesPanel.js:
267         (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult):
268         (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult):
269         * inspector/front-end/ResourcesPanel.js:
270         (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult):
271         (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult):
272         * inspector/front-end/ScriptsPanel.js:
273         (WebInspector.ScriptsPanel.prototype._editorClosed):
274         (WebInspector.ScriptsPanel.prototype._editorSelected):
275         (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
276         (WebInspector.ScriptsPanel.prototype.performSearch):
277         (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
278         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
279         (WebInspector.ScriptsPanel.prototype.replaceSelectionWith):
280         (WebInspector.ScriptsPanel.prototype.replaceAllWith):
281         * inspector/front-end/SearchController.js:
282         (WebInspector.SearchController):
283         (WebInspector.SearchController.prototype.cancelSearch):
284         (WebInspector.SearchController.prototype.resetSearch):
285         (WebInspector.SearchController.prototype.handleShortcut):
286         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
287         (WebInspector.SearchController.prototype._updateReplaceVisibility):
288         (WebInspector.SearchController.prototype._onKeyDown):
289         (WebInspector.SearchController.prototype._onNextButtonSearch):
290         (WebInspector.SearchController.prototype._onPrevButtonSearch):
291         (WebInspector.SearchController.prototype._performSearch):
292         (WebInspector.SearchController.prototype._updateReplaceDetailsVisibility):
293         (WebInspector.SearchController.prototype._replace):
294         (WebInspector.SearchController.prototype._replaceAll):
295         * inspector/front-end/Settings.js:
296         (WebInspector.ExperimentsSettings):
297         * inspector/front-end/SourceFrame.js:
298         (WebInspector.SourceFrame.prototype.beforeTextChanged):
299         (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches):
300         (WebInspector.SourceFrame.prototype.performSearch):
301         (WebInspector.SourceFrame.prototype.replaceSearchMatchWith):
302         (WebInspector.SourceFrame.prototype.replaceAllWith):
303         (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged):
304         * inspector/front-end/TextEditor.js:
305         (WebInspector.TextEditor.prototype.editRange):
306         * inspector/front-end/inspector.css:
307         (.toolbar-search-replace .search-replace):
308         (.toolbar-search):
309         (.toolbar-search-replace):
310         (.toolbar-search-close-button):
311         (.toolbar-search-close-button:hover):
312         (.toolbar-search-close-button:active):
313         (.toolbar-search input[type="checkbox"]):
314         (.toolbar-search-replace .toolbar-replace-control):
315
316 2012-07-18  YoungTaeck Song  <youngtaeck.song@samsung.com>
317
318         [WK2][EFL] Divide ENABLE(WEBGL) into ENABLE(WEBGL) and USE(3D_GRAPHICS) in CMakeLists.txt
319         https://bugs.webkit.org/show_bug.cgi?id=91584
320
321         Reviewed by Noam Rosenthal.
322
323         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
324         Modified CMakeLists.txt so that the basic 3D-graphics sources can be compiled even when WebGL is disabled.
325
326         * CMakeLists.txt:
327         * PlatformEfl.cmake:
328         * platform/graphics/GraphicsContext3D.h:
329         (GraphicsContext3D):
330         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
331         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
332
333 2012-07-18  Zoltan Horvath  <zoltan@webkit.org>
334
335         [Qt] Modify the using of the QImage::Format enum to the appropriate functions from NativeImageQt
336         https://bugs.webkit.org/show_bug.cgi?id=91600
337
338         Reviewed by Andreas Kling.
339
340         Use NativeImageQt::defaultFormatForAlphaEnabledImages() and NativeImageQt::defaultFormatForOpaqueImages()
341         instead of the direct imagetypes at the appropriate places.
342
343         Covered by existing tests.
344
345         * platform/graphics/qt/GraphicsContext3DQt.cpp:
346         (WebCore::GraphicsContext3D::paintToCanvas):
347         * platform/graphics/qt/PathQt.cpp:
348         (WebCore::scratchContext):
349         * platform/graphics/texmap/TextureMapperGL.cpp:
350         (WebCore::TextureMapperGL::drawRepaintCounter):
351         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
352         (WebCore::BitmapTextureImageBuffer::updateContents):
353
354 2012-07-18  Andrey Kosyakov  <caseq@chromium.org>
355
356         Web Inspector: create timeline detail records lazily
357         https://bugs.webkit.org/show_bug.cgi?id=91513
358
359         Reviewed by Pavel Feldman.
360
361         - only create timeline record details when these are used;
362
363         * inspector/front-end/TimelinePanel.js:
364         (WebInspector.TimelineRecordListRow.prototype.update):
365         * inspector/front-end/TimelinePresentationModel.js:
366         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
367         (WebInspector.TimelinePresentationModel.Record.prototype._refreshDetails):
368         (WebInspector.TimelinePresentationModel.Record.prototype.details):
369
370 2012-07-18  Simon Hausmann  <simon.hausmann@nokia.com>
371
372         [ANGLE] On QT, use Bison and Flex during ANGLE build
373         https://bugs.webkit.org/show_bug.cgi?id=91108
374
375         Reviewed by Kenneth Rohde Christiansen.
376
377         Add derived source generators for the two angle bison parsers and flex based lexers.
378
379         * DerivedSources.pri:
380         * Target.pri:
381
382 2012-07-18  Dominik Röttsches  <dominik.rottsches@intel.com>
383
384         [EFL][WK2] Too early assertion failure if default theme is not available
385         https://bugs.webkit.org/show_bug.cgi?id=91608
386
387         Reviewed by Kenneth Rohde Christiansen.
388
389         After bug 90107 we're setting a default theme path, which leads to a
390         themeChanged() call initializing edje in createEdje() - if that theme
391         path is not available we run into a premature assertion failure.
392         We need to give the embedder a chance to override the default theme path
393         before failing - so only the usages of m_edje should be guarded with assertions.
394
395         No new tests, no change in rendering behavior.
396
397         * platform/efl/RenderThemeEfl.cpp:
398         (WebCore::RenderThemeEfl::themePartCacheEntryReset): Adding an assertion to ensure m_edje is present - so that all usages of m_edje are now guarded.
399         (WebCore::RenderThemeEfl::createEdje): Not hitting assertion if theme path doesn't contain the theme object file, allowing the embedder to override with a new path.
400
401 2012-07-18  Vsevolod Vlasov  <vsevik@chromium.org>
402
403         IndexedDB: IDBLevelDBBackingStore compilation fails because of unused variable.
404         https://bugs.webkit.org/show_bug.cgi?id=91612
405
406         Reviewed by Pavel Feldman.
407
408         Replaced ASSERT with ASSERT_UNUSED.
409
410         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
411         (WebCore::IDBLevelDBBackingStore::getObjectStores):
412
413 2012-07-18  Yoshifumi Inoue  <yosin@chromium.org>
414
415         REGRESSION(r117738) [Forms] Default step base should be 0 (=1970-01) for input type month
416         https://bugs.webkit.org/show_bug.cgi?id=91603
417
418         Reviewed by Kent Tamura.
419
420         This patch restores default step base value to 0 (=1970-01) as before
421         r117738.
422
423         No new tests. Existing test(fast/forms/month/month-stepup-stepdown-from-renderer.html)
424         covers this case, although it is disabled.
425
426         * html/MonthInputType.cpp:
427         (WebCore::MonthInputType::createStepRange): Changed default value of
428         step base to defaultMonthStepBase instead of DateComponents::minimumMonth().
429
430 2012-07-18  Ryuan Choi  <ryuan.choi@samsung.com>
431
432         [EFL] Cursor is not drawn when opengl_x11 backend is choosen.
433         https://bugs.webkit.org/show_bug.cgi?id=89142
434
435         Reviewed by Simon Hausmann.
436
437         If theme based cursor is not given, WebKit/Efl only uses Ecore_X based
438         cursor as a fallback after checked whether current engine is using EcoreX.
439         This patch adds opengl_x11 which is one of Ecore_X based engine in check
440         lists to draw fallback cursor.
441
442         * platform/efl/EflScreenUtilities.cpp:
443         (WebCore::isUsingEcoreX):
444
445 2012-07-18  Ryosuke Niwa  <rniwa@webkit.org>
446
447         REGRESSION(r122345): HTMLCollection::length() sometimes returns a wrong value
448         https://bugs.webkit.org/show_bug.cgi?id=91587
449
450         Reviewed by Benjamin Poulain.
451
452         The bug was caused by my douchey code that set the length cache to be the *offset*
453         of the last item in a HTMLCollection. Clearly, the length of a collection that contains
454         the last item at offset n is n + 1. Fixed that.
455
456         Also removed the call to setLengthCache in HTMLCollection::length since it must have set
457         by previous calls to itemBeforeOrAfterCachedItem already. This will allow us to catch
458         regressions like this in ports that use JSC bindings as well.
459
460         Test: fast/dom/htmlcollection-length-after-item.html
461
462         * html/HTMLCollection.cpp:
463         (WebCore::HTMLCollection::length):
464         (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem):
465
466 2012-07-18  Yoshifumi Inoue  <yosin@chromium.org>
467
468         Decimal::toString should not round integer value.
469         https://bugs.webkit.org/show_bug.cgi?id=91481
470
471         Reviewed by Kent Tamura.
472
473         This patch makes Decimal::toString not to round an integer value
474         before converting string.
475
476         Tests: WebKit/chromium/tests/DecimalTest.cpp: DecimalTest.toString
477
478         * platform/Decimal.cpp:
479         (WebCore::Decimal::toString): When the value is an integer, we don't
480         round coefficient to be DBL_DIG(15) digits because double can
481         represent an integer without rounding error.
482
483 2012-07-18  Luke Macpherson   <macpherson@chromium.org>
484
485         Fix null pointer dereference introduced by Changeset 121874.
486         https://bugs.webkit.org/show_bug.cgi?id=91578
487
488         Reviewed by Pavel Feldman.
489
490         In http://trac.webkit.org/changeset/121874/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp I introduced code that
491         dereferences the return value of ownerDocument() without doing a null check. This was a bad idea.
492
493         No new tests. I don't have a repro case, but it is clear from reading the code for ownerDocument() that it can return null.
494
495         * inspector/InspectorStyleSheet.cpp:
496         (WebCore::InspectorStyleSheet::ensureSourceData):
497
498 2012-07-17  Yoshifumi Inoue  <yosin@chromium.org>
499
500         Decimal constructor with 99999999999999999 loses last digit
501         https://bugs.webkit.org/show_bug.cgi?id=91579
502
503         Reviewed by Kent Tamura.
504
505         This patch changes maximum coefficient value handling in Decimal::EncodedData
506         constructor not to lose the last digit. It was used ">=" operator for
507         comparison instead of ">" operator.
508
509         Tests: WebKit/chromium/tests/DecimalTest.cpp
510
511         * platform/Decimal.cpp:
512         (WebCore::Decimal::EncodedData::EncodedData): Replace ">=" to ">" for
513         not getting rid of the last digit for maximum coefficient value.
514
515 2012-07-17  Ilya Tikhonovsky  <loislo@chromium.org>
516
517         Unreviewed Web Inspector: followup fix for r122920.
518
519         Add collected Loaders size to InspectorMemoryBlock
520
521         * inspector/InspectorMemoryAgent.cpp:
522         (MemoryBlockName):
523         (WebCore):
524
525 2012-07-17  Ilya Tikhonovsky  <loislo@chromium.org>
526
527         Web Inspector: show loaders memory consumption on the memory chart.
528         https://bugs.webkit.org/show_bug.cgi?id=90686
529
530         Reviewed by Pavel Feldman.
531
532         Size of FrameLoader, DocumentLoader, ResourceLoader and their resources should be shown on the memory pie chart.
533
534         It is covered by existing WebInspector performance tests infrastructure.
535
536         * WebCore.exp.in:
537         * dom/MemoryInstrumentation.h:
538         (MemoryInstrumentation):
539         (WebCore::MemoryInstrumentation::addRawBuffer):
540         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
541         (WebCore):
542         (WebCore::MemoryClassInfo::addInstrumentedHashSet):
543         (WebCore::MemoryClassInfo::addRawBuffer):
544         (WebCore::MemoryInstrumentation::addInstrumentedHashSet):
545         (WebCore::MemoryInstrumentation::addVector):
546         * inspector/InspectorMemoryAgent.cpp:
547         (WebCore):
548         (WebCore::domTreeInfo):
549         * loader/DocumentLoader.cpp:
550         (WebCore::DocumentLoader::reportMemoryUsage):
551         (WebCore):
552         * loader/DocumentLoader.h:
553         (WebCore):
554         (DocumentLoader):
555         * loader/FrameLoader.cpp:
556         (WebCore::FrameLoader::reportMemoryUsage):
557         (WebCore):
558         * loader/FrameLoader.h:
559         (WebCore):
560         (FrameLoader):
561         * loader/ResourceLoader.cpp:
562         (WebCore::ResourceLoader::reportMemoryUsage):
563         (WebCore):
564         * loader/ResourceLoader.h:
565         (WebCore):
566         (ResourceLoader):
567         * page/Frame.cpp:
568         (WebCore::Frame::reportMemoryUsage):
569         (WebCore):
570         * page/Frame.h:
571         (WebCore):
572         (Frame):
573         * platform/SharedBuffer.cpp:
574         (WebCore::SharedBuffer::reportMemoryUsage):
575         (WebCore):
576         * platform/SharedBuffer.h:
577         (WebCore):
578         (SharedBuffer):
579
580 2012-07-17  Kent Tamura  <tkent@chromium.org>
581
582         Fix an assertion failure in CalendarPickerElement::hostInput().
583         https://bugs.webkit.org/show_bug.cgi?id=91568
584
585         Reviewed by Hajime Morita.
586
587         Test: fast/forms/date/calendar-picker-type-change-onclick.html
588
589         * html/shadow/CalendarPickerElement.cpp:
590         (WebCore::CalendarPickerElement::defaultEventHandler):
591         It's possible that this function is called when the element is detached
592         from the document tree.
593
594 2012-07-17  Kent Tamura  <tkent@chromium.org>
595
596         Form state: Make a new class handling HashMap<FormElementKey, Deque<>>
597         https://bugs.webkit.org/show_bug.cgi?id=91480
598
599         Reviewed by Hajime Morita.
600
601         This is a preparation of Bug 91209, "Form state restore: Need to
602         identify a from by its content."
603
604         Make a new class which is responsible to handle "HashMap<FormElementKey,
605         Deque<FormControlState>, FormElementKeyHash, FormElementKeyHashTraits>."
606         Also, move the FormElementKey class declaration and related structs from
607         FormController.h to FormController.cpp because FormElementKey is used
608         only in FormController.cpp.
609
610         No new tests. Just a refactoring.
611
612         * html/FormController.cpp:
613         (WebCore::FormElementKey): Moeved from FormController.h.
614         (WebCore::FormElementKey::FormElementKey):
615         Moved from the bottom of FormController.cpp
616         (WebCore::FormElementKey::~FormElementKey): ditto.
617         (WebCore::FormElementKey::operator=): ditto.
618         (WebCore::FormElementKey::ref): ditto.
619         (WebCore::FormElementKey::deref): ditto.
620         (WebCore::operator==): Moved from FormController.h
621         (FormElementKeyHash): ditto.
622         (WebCore::FormElementKeyHash::equal): ditto.
623         (WebCore::FormElementKeyHash::hash):
624         Moved from the bottom of FormController.cpp
625         (WebCore::FormElementKeyHashTraits::constructDeletedValue):
626         Moved from FormController.h
627         (WebCore::FormElementKeyHashTraits::isDeletedValue): ditto.
628
629         (WebCore::SavedFormState): Added.
630         (WebCore::SavedFormState::isEmpty):
631         (WebCore::SavedFormState::SavedFormState): Added. The constructor.
632         (WebCore::SavedFormState::create): Added. A factory function.
633         (WebCore::SavedFormState::appendControlState):
634         Moved some code from FormController::setStateForNewFormElements.
635         (WebCore::SavedFormState::takeControlState):
636         Moved some code from FormController::takeStateForFormElement.
637
638         (WebCore::FormController::setStateForNewFormElements):
639         - Creates SavedFormState if needed.
640         - Uses SavedFormState::appendControlState.
641         (WebCore::FormController::takeStateForFormElement):
642         Uses SavedFormState.
643         * html/FormController.h:
644         (FormController):
645
646 2012-07-17  MORITA Hajime <morrita@google.com>
647
648         [Shadow DOM] Some distribution invalidation can drop necessary reattachment.
649         https://bugs.webkit.org/show_bug.cgi?id=88843
650
651         Reviewed by Dimitri Glazkov.
652
653         Following scenario caused this problem:
654
655         - Inserting a Text node as a shadow child triggers invalidateDistribution(),
656           which doen't reattach the shadow's host element.
657         - Then inserting a <content> element after that triggers another invalidateDistribution(),
658           which should reattach its host because <content> can affect not only distribution of new nodes,
659           but also existing distribution.
660         - Since the first invalidateDistribution() has marked the distribution as invalidated,
661           the second invalidateDistribution() call returns early without any reattachment,
662           even though it needs one.
663
664         This change adds InvalidationType parameter to invalidateDistribution(), which asks ElementShadow to
665         reattach the host regardless of its validity state. InsertionPoint::insertedInto() uses
666         this flag to ensure that its insertion always results a reattachment.
667
668         Test: fast/dom/shadow/content-after-style.html
669
670         * dom/ElementShadow.cpp:
671         (WebCore::ElementShadow::addShadowRoot): Passes InvalidationType.
672         (WebCore::ElementShadow::removeAllShadowRoots): Passes InvalidationType.
673         (WebCore::ElementShadow::invalidateDistribution): Added a InvalidationType parameter.
674         * dom/ElementShadow.h:
675         * html/shadow/InsertionPoint.cpp:
676         (WebCore::InsertionPoint::insertedInto): Passes InvalidationType.
677
678 2012-07-17  Jon Lee  <jonlee@apple.com>
679
680         Teach CodeGenerator to support for static, readonly, attributes
681         https://bugs.webkit.org/show_bug.cgi?id=88920
682         <rdar://problem/11650330>
683
684         Reviewed by Oliver Hunt.
685
686         Update the parser to be able to accept the static keyword for attribute. We will treat static attributes
687         like custom static functions. They call the implementing class directly, and pass in the ExecState as a script context.
688
689         * bindings/scripts/CodeGeneratorJS.pm:
690         (GetAttributeGetterName): Factor out the construction of the attribute getter function name.
691         (GetAttributeSetterName): Factor out the construction of the attribute setter function name.
692         (GenerateHeader): Determine that a class has read-write properties only if there is a read-write attribute that
693         is not static.
694         (GenerateAttributesHashTable): Skip static attributes in the object hash table. They will be added to the constructor
695         hash table.
696         (GenerateImplementation): Look for static attributes to add to the constructor hash table. Make a call to the static
697         function in the class.
698         * bindings/scripts/IDLParser.pm:
699         (ParseInterface): Update the processing because of the regex change.
700         * bindings/scripts/IDLStructure.pm: Update the attribute regex.
701         * bindings/scripts/test/JS/JSTestObj.cpp: Update test results.
702         * bindings/scripts/test/JS/JSTestObj.h: Update test results.
703         * bindings/scripts/test/TestObj.idl: Add test cases.
704
705 2012-07-17  Kenichi Ishibashi  <bashi@chromium.org>
706
707         [Chromium] Rename HarfBuzzFace to HarfBuzzNGFace
708         https://bugs.webkit.org/show_bug.cgi?id=91458
709
710         Reviewed by Tony Chang.
711
712         There are HarfbuzzFace class (for old-harfbuzz) and HarfBuzzFace (for harfbuzz-ng) class. The difference is too subtle. Make them more distinct.
713
714         No new tests. No changes in behavior.
715
716         * WebCore.gyp/WebCore.gyp: Rename HarfBuzzFace to HarfBuzzNGFace.
717         * WebCore.gypi: Ditto.
718         * platform/graphics/FontPlatformData.h: Ditto.
719         (FontPlatformData):
720         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
721         (WebCore::FontPlatformData::harfbuzzFace):
722         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
723         (WebCore::FontPlatformData::harfbuzzFace):
724         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
725         (FontPlatformData):
726         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp.
727         (WebCore):
728         (WebCore::floatToHarfBuzzPosition):
729         (WebCore::getGlyph):
730         (WebCore::getGlyphHorizontalAdvance):
731         (WebCore::getGlyphHorizontalOrigin):
732         (WebCore::getGlyphExtents):
733         (WebCore::harfbuzzCoreTextGetFontFuncs):
734         (WebCore::releaseTableData):
735         (WebCore::harfbuzzCoreTextGetTable):
736         (WebCore::HarfBuzzNGFace::createFace):
737         (WebCore::HarfBuzzNGFace::createFont):
738         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
739         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp.
740         (WebCore):
741         (WebCore::SkiaScalarToHarfbuzzPosition):
742         (WebCore::SkiaGetGlyphWidthAndExtents):
743         (WebCore::harfbuzzGetGlyph):
744         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
745         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
746         (WebCore::harfbuzzGetGlyphExtents):
747         (WebCore::harfbuzzSkiaGetFontFuncs):
748         (WebCore::harfbuzzSkiaGetTable):
749         (WebCore::destroyPaint):
750         (WebCore::HarfBuzzNGFace::createFace):
751         (WebCore::HarfBuzzNGFace::createFont):
752         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
753         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp.
754         (WebCore):
755         (WebCore::harfbuzzFaceCache):
756         (WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
757         (WebCore::HarfBuzzNGFace::~HarfBuzzNGFace):
758         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzFace.h.
759         (WebCore):
760         (HarfBuzzNGFace):
761         (WebCore::HarfBuzzNGFace::create):
762         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
763         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
764
765 2012-07-17  Kinuko Yasuda  <kinuko@chromium.org>
766
767         Record metrics to measure the usage of Blob([ArrayBuffer]) to eventually deprecate it
768         https://bugs.webkit.org/show_bug.cgi?id=90534
769
770         Reviewed by Jian Li.
771
772         We are removing ArrayBuffer support in Blob constructor (in favor of
773         ArrayBufferView) but before doing that we should record its use relative to ArrayBufferView.
774         http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
775
776         No new tests as this has no functional changes.
777
778         * fileapi/WebKitBlobBuilder.cpp:
779         (WebCore::WebKitBlobBuilder::append):
780
781 2012-07-17  Joshua Bell  <jsbell@chromium.org>
782
783         IndexedDB: Key generator state not maintained across connections
784         https://bugs.webkit.org/show_bug.cgi?id=91456
785
786         Reviewed by Tony Chang.
787
788         Explicitly store key generator state for each object store in the backing store,
789         rather than deriving it from the maximum key in the data (which violates the spec
790         if data is deleted).
791
792         This change eliminates a (fragile) per-store cache of the value to simplify the
793         code. A cache could be re-introduced, requiring an "onbeforecommit" hook for
794         object stores, but it seems cleaner to save that for a follow-up patch.
795
796         Test: storage/indexeddb/key-generator.html
797
798         * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states.
799         (IDBBackingStore):
800         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
801         (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored).
802         (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state.
803         (WebCore):
804         (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
805         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally
806         checking to see if the new value is greater than the old. (If caller got the value via
807         getKeyGeneratorCurrentNumber it is safe to skip the check.)
808         * Modules/indexeddb/IDBLevelDBBackingStore.h:
809         (IDBLevelDBBackingStore):
810         * Modules/indexeddb/IDBLevelDBCoding.cpp:
811         * Modules/indexeddb/IDBLevelDBCoding.h:
812         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
813         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache.
814         (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task.
815         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
816         (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below.
817         (WebCore::IDBObjectStoreBackendImpl::generateKey):
818         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
819         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
820         (IDBObjectStoreBackendImpl):
821
822 2012-07-17  Joshua Bell  <jsbell@chromium.org>
823
824         IndexedDB: Key generator state not maintained across connections
825         https://bugs.webkit.org/show_bug.cgi?id=91456
826
827         Reviewed by Tony Chang.
828
829         Explicitly store key generator state for each object store in the backing store,
830         rather than deriving it from the maximum key in the data (which violates the spec
831         if data is deleted).
832
833         This change eliminates a (fragile) per-store cache of the value to simplify the
834         code. A cache could be re-introduced, requiring an "onbeforecommit" hook for
835         object stores, but it seems cleaner to save that for a follow-up patch.
836
837         Test: storage/indexeddb/key-generator.html
838
839         * Modules/indexeddb/IDBBackingStore.h: New APIs for getting/setting generator states.
840         (IDBBackingStore):
841         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
842         (WebCore::IDBLevelDBBackingStore::getObjectStores): Read generator state (but currently ignored).
843         (WebCore::IDBLevelDBBackingStore::createObjectStore): Write generator state.
844         (WebCore):
845         (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
846         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): Update, optionally
847         checking to see if the new value is greater than the old. (If caller got the value via
848         getKeyGeneratorCurrentNumber it is safe to skip the check.)
849         * Modules/indexeddb/IDBLevelDBBackingStore.h:
850         (IDBLevelDBBackingStore):
851         * Modules/indexeddb/IDBLevelDBCoding.cpp:
852         * Modules/indexeddb/IDBLevelDBCoding.h:
853         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
854         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): Ditch the cache.
855         (WebCore::IDBObjectStoreBackendImpl::put): No need for abort task.
856         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys): Ditto.
857         (WebCore::IDBObjectStoreBackendImpl::putInternal): Use the newfangled APIs below.
858         (WebCore::IDBObjectStoreBackendImpl::generateKey):
859         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
860         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
861         (IDBObjectStoreBackendImpl):
862
863 2012-07-17  Alec Flett  <alecflett@chromium.org>
864
865         IndexedDB: createIndex should throw INVALID_ACCESS_ERR instead of NOT_SUPPORTED_ERR
866         https://bugs.webkit.org/show_bug.cgi?id=91553
867
868         Reviewed by Tony Chang.
869
870         Update createIndex to throw an INVALID_ACCESS_ERR
871         as per the IndexedDB spec.
872
873         No new tests: existing tests have been updated
874
875         * Modules/indexeddb/IDBDatabaseException.cpp:
876         (WebCore):
877         * Modules/indexeddb/IDBDatabaseException.h:
878         * Modules/indexeddb/IDBObjectStore.cpp:
879         (WebCore::IDBObjectStore::createIndex):
880
881 2012-07-17  Adam Barth  <abarth@webkit.org>
882
883         DragImageChromiumMac.cpp is never compiled and can be removed
884         https://bugs.webkit.org/show_bug.cgi?id=91545
885
886         Reviewed by Tony Chang.
887
888         This file would only be compiled on chromium-mac, but it's excluded
889         from that build. This is likely left over from the CG configuration.
890
891         * WebCore.gyp/WebCore.gyp:
892         * WebCore.gypi:
893         * platform/chromium/DragImageChromiumMac.cpp: Removed.
894
895 2012-07-17  Roger Fong  <roger_fong@apple.com>
896
897         Assertion failure/crash on Windows when using a font in an SVG 
898         element with an unresaonbly large font size
899         https://bugs.webkit.org/show_bug.cgi?id=91273
900         Radar: <rdar://problem/8355401>
901
902         Reviewed by Tim Horton.
903
904         When using a font in an SVG element with an unreasonably large 
905         font size in Windows, WebKit crashes. The problem has to do with 
906         font sizes overflowing into negative values in the Windows specific code.
907         The fix is to cap the font sizes to something reasonable when the font style is getting processed. 
908         The fix will apply to both CSS and SVG so that behaviour is consistent.
909
910         Test: svg/text/font-size-too-large-crash.svg
911
912         * css/StyleBuilder.cpp:
913         (WebCore::ApplyPropertyFontSize::applyValue):
914         This is where the font size capping now occurs. Caps size to 1000000.
915         Both CSS and SVG reach the font size capping code here.
916         
917         * css/StyleResolver.cpp:
918         (WebCore::StyleResolver::collectMatchingRulesForList):
919         Capping here removed, moved to StyleBuilder.cpp.
920
921 2012-07-17  David Barr  <davidbarr@chromium.org>
922
923         Add parsing and style application for css3-images image-orientation
924         https://bugs.webkit.org/show_bug.cgi?id=89624
925
926         Reviewed by Tony Chang.
927
928         The css3-images module is at candidate recommendation.
929         http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
930
931         Test: fast/css/image-orientation/image-orientation.html
932
933         * css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation.
934         (WebCore): Add CSSPropertyImageOrientation to computedProperties.
935         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings.
936         * css/CSSParser.cpp: Add parsing rule for image-orientation.
937         (WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle.
938         * css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum.
939         (WebCore): Add conditional include for ImageOrientation.h.
940         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles.
941         (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations.
942         * css/CSSProperty.cpp: Add CSSPropertyImageOrientation.
943         (WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited.
944         * css/CSSPropertyNames.in: Add image-orientation.
945         * css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation.
946         (WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum.
947         * css/StyleResolver.cpp: Handle CSSPropertyImageOrientation.
948         (WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder.
949         * rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation.
950         * rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation.
951         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors.
952         (WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison.
953         * rendering/style/StyleRareInheritedData.h: Add m_imageOrientation.
954         (StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum.
955
956 2012-07-17  Adrienne Walker  <enne@google.com>
957
958         REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
959         https://bugs.webkit.org/show_bug.cgi?id=91525
960
961         Reviewed by Julien Chaffraix.
962
963         Fix by doing an early out check.  This is intended to fix the crash in
964         http://crbug.com/137161.
965
966         No new test, because unfortunately a layout test is ill-suited to
967         reproing this kind of Document creation/destruction bug.
968
969         * rendering/RenderObject.cpp:
970         (WebCore::RenderObject::willRenderImage):
971
972 2012-07-17  Emil A Eklund  <eae@chromium.org>
973
974         vertical-align: middle causes overflow with subpixel layout
975         https://bugs.webkit.org/show_bug.cgi?id=91464
976
977         Reviewed by Eric Seidel.
978
979         Using vertical-align: middle in combination with an overflow value other
980         than visible can cause the overflow height to be computed incorrectly.
981
982         Test: fast/sub-pixel/vertical-align-middle-overflow.html
983
984         * rendering/RootInlineBox.cpp:
985         (WebCore::RootInlineBox::verticalPositionForBox):
986         Round verticalPosition after calculation instead of flooring the result
987         of the xHeight calculation. By flooring it the resulting value is in
988         effect rounded up which can cause the height of the box to grow by one.
989         By rounding the resulting value thevertical position is more accurate and
990         the off by one error is avoided.
991
992 2012-07-17  Philip Rogers  <pdr@google.com>
993
994         Move zero-length-subpaths from RenderSVGShape to RenderSVGPath
995         https://bugs.webkit.org/show_bug.cgi?id=90716
996
997         Reviewed by Nikolas Zimmermann.
998
999         Previously zero-length-subpath code was present in RenderSVGShape but it is
1000         only needed in RenderSVGPath. This patch moves the zero-length-subpath code
1001         to RenderSVGPath.
1002
1003         In this change, we gain:
1004         1) Ellipses, Circles, and Rects will no longer carry an empty Vector nor
1005            checks for zero-length subpaths which (per the spec) they cannot have.
1006         2) RenderSVGShape, the superclass of all shape rendering, has been
1007            drastically simplified by removing 70 lines of code that only applies
1008            to Path rendering. This generally aids in code understandability.
1009
1010         The patch is primarily a straightforward code move but useStrokeStyleToFill
1011         needs further explanation:
1012         Zero-length-subpaths are drawn using rectangular and circular paths which
1013         are filled.
1014         Previously in RenderSVGShape::fillAndStrokePath, strokePath was called for
1015         the main path with ApplyToStrokeMode and then strokePath was called for
1016         each zero-length-subpath with ApplyToFillMode.
1017         ApplyToFillMode had the effect of setting the context's stroke style to
1018         the fill style so zero-length-subpaths were "filled" with the stroke style.
1019         After this patch, the context is only setup once (which is faster!) using
1020         ApplyToStrokeMode so we manually set the stroke style to the fill style
1021         using useStrokeStyleToFill.
1022
1023         No new tests, just a refactoring.
1024
1025         * rendering/svg/RenderSVGPath.cpp:
1026         (WebCore::RenderSVGPath::updateShapeFromElement):
1027         (WebCore):
1028         (WebCore::RenderSVGPath::calculateUpdatedStrokeBoundingBox):
1029         (WebCore::useStrokeStyleToFill):
1030         (WebCore::RenderSVGPath::strokeShape):
1031         (WebCore::RenderSVGPath::shapeDependentStrokeContains):
1032         (WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
1033         (WebCore::RenderSVGPath::zeroLengthLinecapPath):
1034         (WebCore::RenderSVGPath::zeroLengthSubpathRect):
1035         (WebCore::RenderSVGPath::updateZeroLengthSubpaths):
1036         * rendering/svg/RenderSVGPath.h:
1037         (RenderSVGPath):
1038         * rendering/svg/RenderSVGShape.cpp:
1039         (WebCore::RenderSVGShape::updateShapeFromElement):
1040         (WebCore::RenderSVGShape::strokeShape):
1041         (WebCore::RenderSVGShape::strokeContains):
1042         (WebCore):
1043         (WebCore::RenderSVGShape::fillShape):
1044         (WebCore::RenderSVGShape::fillAndStrokeShape):
1045         (WebCore::RenderSVGShape::paint):
1046         (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
1047         * rendering/svg/RenderSVGShape.h:
1048         (WebCore::RenderSVGShape::hasPath):
1049         (WebCore::RenderSVGShape::hasNonScalingStroke):
1050         (RenderSVGShape):
1051         (WebCore::RenderSVGShape::strokeBoundingBox):
1052
1053 2012-07-17  Ryosuke Niwa  <rniwa@webkit.org>
1054
1055         invalidateNodeListCachesInAncestors walks up ancestors even when an attribute that doesn't invalidate node lists changes
1056         https://bugs.webkit.org/show_bug.cgi?id=91530
1057
1058         Reviewed by Ojan Vafai.
1059
1060         The bug was caused by invalidateNodeListCachesInAncestors not calling Document::shouldInvalidateNodeListCaches with
1061         attrName. Done that.
1062         
1063         This chance revealed a bug in shouldInvalidateTypeOnAttributeChange that we weren't checking form attribute changes for
1064         RadioNodeList and HTMLCollection, so fixed the bug.
1065
1066         Also renamed Document::clearNodeListCaches to invalidateNodeListCaches to match the name convention used elsewhere,
1067         and added a new version of DynamicNodeListCacheBase::invalidateCache that takes attrName to reduce the code duplication.
1068
1069         Test: fast/forms/elements-invalidate-on-form-attribute-invalidation.html
1070
1071         * dom/Document.cpp:
1072         (WebCore::Document::invalidateNodeListCaches):
1073         * dom/Document.h:
1074         (Document):
1075         * dom/DynamicNodeList.h:
1076         (WebCore::DynamicNodeListCacheBase::invalidateCache):
1077         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):
1078         * dom/Node.cpp:
1079         (WebCore::Node::invalidateNodeListCachesInAncestors):
1080         (WebCore::NodeListsNodeData::invalidateCaches):
1081
1082 2012-07-17  Max Vujovic  <mvujovic@adobe.com>
1083
1084         Update ANGLE in WebKit
1085         https://bugs.webkit.org/show_bug.cgi?id=89039
1086
1087         Reviewed by Dean Jackson and Mark Rowe.
1088
1089         Update ANGLE to r1170, with the following modifications:
1090
1091         (1) Use Bison 2.3 instead of Bison 2.4.2 to generate ExpressionParser.cpp and
1092         glslang_tab.cpp. I had to modify ExpressionParser.y to make it compatible with Bison
1093         2.3. The changes have been contributed back to ANGLE in r1224.
1094
1095         (2) Continue to recognize QNX as POSIX in ANGLE. This has been contributed back to ANGLE
1096         in r1223.
1097
1098         (3) Rename ANGLE/src/compiler/preprocessor/new/Diagnostic.cpp to DiagnosticBase.cpp.
1099         Rename ANGLE/src/compiler/preprocessor/new/DirectiveHandler.cpp to DirectiveHandlerBase.cpp.
1100
1101         With the introduction of ANGLE's new preprocessor, there were two files named Diagnostic.cpp
1102         in ANGLE under different folders. This caused problems on the QT build when their object
1103         files, both named Diagnostic.o, tried to go in the same folder. Renaming one of them to
1104         DiagnosticBase.cpp avoids this conflict. The same situation occurred with
1105         DirectiveHandler.cpp. I will work on contributing this change back to ANGLE for future
1106         updates.
1107
1108         (4) Add the following lines to glslang.y and ExpressionParser.y:
1109         #define YYENABLE_NLS 0
1110         #define YYLTYPE_IS_TRIVIAL 1
1111
1112         Bison 2.3 doesn't first check that these macros are defined before reading their value,
1113         which causes the QT build to fail.
1114
1115         We work around this issue in the same way in CSSGrammar.y.
1116
1117         I will work on contributing this change back to ANGLE.
1118
1119         No new tests. No change in behavior.
1120
1121         * CMakeLists.txt:
1122         * GNUmakefile.list.am:
1123         * Target.pri:
1124
1125 2012-07-17  Stephen Chenney  <schenney@chromium.org>
1126
1127         Crash in SVGStopElement::stopColorIncludingOpacity
1128         https://bugs.webkit.org/show_bug.cgi?id=90814
1129
1130         Reviewed by Dirk Schulze.
1131
1132         No new tests as there should be no change in functionality.
1133
1134         * svg/SVGStopElement.cpp:
1135         (WebCore::SVGStopElement::stopColorIncludingOpacity): Added a check for null
1136         renderer and style. It is hard to see how this is happening because
1137         the code is only invoked if the parent gradient has a renderer, and it seems
1138         the stop element should always have a renderer when the parent has a renderer.
1139         Still, it obviously can happen and does so frequently enough to generate multiple
1140         Chromium crash reports per day. The fix is marked with a FIXME, as we expect to
1141         remove this code entirely soon.
1142
1143 2012-07-17  Emil A Eklund  <eae@chromium.org>
1144
1145         Incorrect offset used for scrollWidth/Height calculation
1146         https://bugs.webkit.org/show_bug.cgi?id=91461
1147
1148         Reviewed by Eric Seidel.
1149
1150         Due to a different offset being used to calculate the scrollWidth/Height
1151         and pixelSnappedClientWidth/Height the scroll value can be off by one in
1152         same cases. This can causes scrollbars to appear even when there is no
1153         overflow.
1154
1155         Test: fast/sub-pixel/block-with-margin-overflow.html
1156
1157         * rendering/RenderBox.cpp:
1158         (WebCore::RenderBox::scrollWidth):
1159         Change location offset passed to snapSizeToPixel to include x() to match
1160         offset used by pixelSnappedClientWidth.
1161         
1162         (WebCore::RenderBox::scrollHeight):
1163         Change location offset passed to snapSizeToPixel to include y() to match
1164         offset used by pixelSnappedClientHeight.
1165
1166         * rendering/RenderLayer.cpp:
1167         (WebCore::RenderLayer::clampScrollOffset):
1168         Change calculation to use pixelSnappedClientWidth/Height as it is
1169         subtracted from the pixel snapped scrollWidth/Height values.
1170         
1171         (WebCore::RenderLayer::scrollWidth):
1172         (WebCore::RenderLayer::scrollHeight):
1173         Change RenderLayer versions of scrollWidth/Height to include x()/y() as
1174         per the RenderBox versions.
1175
1176 2012-07-17  Hans Muller  <hmuller@adobe.com>
1177
1178         Rename CSS Exclusions CSSWrapShape class properties to match Exclusion shape function parameters
1179         https://bugs.webkit.org/show_bug.cgi?id=89669
1180
1181         Reviewed by Dirk Schulze.
1182
1183         Renamed left,top properties in the exclusion shape types to better match the specification
1184         http://dev.w3.org/csswg/css3-exclusions/#shapes-from-svg-syntax:
1185
1186         WrapShapeRectangle, CSSWrapShapeRectangle - left,top should be x, y
1187         WrapShapeCircle, CSSWrapShapeCircle - left,top should be centerX, centerY
1188         WrapShapeEllipse, CSSWrapShapeEllipse - left,top should be centerX, centerY
1189
1190         No new tests or tests revisions were needed, the existing tests cover these APIs.
1191
1192         * css/CSSParser.cpp:
1193         (WebCore::CSSParser::parseExclusionShapeRectangle):
1194         (WebCore::CSSParser::parseExclusionShapeCircle):
1195         (WebCore::CSSParser::parseExclusionShapeEllipse):
1196         * css/CSSWrapShapes.cpp:
1197         (WebCore::CSSWrapShapeRectangle::cssText):
1198         (WebCore::CSSWrapShapeCircle::cssText):
1199         (WebCore::CSSWrapShapeEllipse::cssText):
1200         * css/CSSWrapShapes.h:
1201         (WebCore::CSSWrapShapeRectangle::x):
1202         (WebCore::CSSWrapShapeRectangle::y):
1203         (WebCore::CSSWrapShapeRectangle::setX):
1204         (WebCore::CSSWrapShapeRectangle::setY):
1205         (CSSWrapShapeRectangle):
1206         (WebCore::CSSWrapShapeCircle::centerX):
1207         (WebCore::CSSWrapShapeCircle::centerY):
1208         (WebCore::CSSWrapShapeCircle::setCenterX):
1209         (WebCore::CSSWrapShapeCircle::setCenterY):
1210         (CSSWrapShapeCircle):
1211         (WebCore::CSSWrapShapeEllipse::centerX):
1212         (WebCore::CSSWrapShapeEllipse::centerY):
1213         (WebCore::CSSWrapShapeEllipse::setCenterX):
1214         (WebCore::CSSWrapShapeEllipse::setCenterY):
1215         (CSSWrapShapeEllipse):
1216         * css/WrapShapeFunctions.cpp:
1217         (WebCore::valueForWrapShape):
1218         (WebCore::wrapShapeForValue):
1219         * rendering/style/WrapShapes.h:
1220         (WebCore::WrapShapeRectangle::x):
1221         (WebCore::WrapShapeRectangle::y):
1222         (WebCore::WrapShapeRectangle::setX):
1223         (WebCore::WrapShapeRectangle::setY):
1224         (WrapShapeRectangle):
1225         (WebCore::WrapShapeCircle::centerX):
1226         (WebCore::WrapShapeCircle::centerY):
1227         (WebCore::WrapShapeCircle::setCenterX):
1228         (WebCore::WrapShapeCircle::setCenterY):
1229         (WrapShapeCircle):
1230         (WebCore::WrapShapeEllipse::centerX):
1231         (WebCore::WrapShapeEllipse::centerY):
1232         (WebCore::WrapShapeEllipse::setCenterX):
1233         (WebCore::WrapShapeEllipse::setCenterY):
1234         (WrapShapeEllipse):
1235
1236 2012-07-16  Pavel Feldman  <pfeldman@chromium.org>
1237
1238         Web Inspector: implement search / replace in source files (behind experiment flag)
1239         https://bugs.webkit.org/show_bug.cgi?id=91394
1240
1241         Reviewed by Vsevolod Vlasov.
1242
1243         This change adds "loop" parameter to the go to next / previous search + adds a UI component
1244         for search / replace of text in the sources panel. New UI component is behind the experiment.
1245
1246         * English.lproj/localizedStrings.js:
1247         * inspector/front-end/ConsolePanel.js:
1248         (WebInspector.ConsolePanel.prototype.performSearch):
1249         (WebInspector.ConsolePanel.prototype.jumpToNextSearchResult):
1250         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
1251         * inspector/front-end/ElementsPanel.js:
1252         (WebInspector.ElementsPanel.prototype.jumpToNextSearchResult):
1253         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
1254         * inspector/front-end/ExtensionPanel.js:
1255         (WebInspector.ExtensionPanel.prototype.performSearch):
1256         (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
1257         (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
1258         * inspector/front-end/JavaScriptSourceFrame.js:
1259         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
1260         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
1261         * inspector/front-end/NetworkPanel.js:
1262         (WebInspector.NetworkLogView.prototype._sortItems):
1263         (WebInspector.NetworkLogView.prototype._updateFilter):
1264         (WebInspector.NetworkLogView.prototype.performSearch):
1265         (WebInspector.NetworkLogView.prototype.jumpToPreviousSearchResult):
1266         (WebInspector.NetworkLogView.prototype.jumpToNextSearchResult):
1267         (WebInspector.NetworkPanel.prototype.performSearch):
1268         * inspector/front-end/Panel.js:
1269         (WebInspector.Panel.prototype.performSearch):
1270         (WebInspector.Panel.prototype.jumpToNextSearchResult):
1271         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
1272         (WebInspector.Panel.prototype.canSearchAndReplace):
1273         (WebInspector.Panel.prototype.replaceSelectionWith):
1274         (WebInspector.Panel.prototype.replaceAllWith):
1275         * inspector/front-end/ProfilesPanel.js:
1276         (WebInspector.ProfilesPanel.prototype.jumpToNextSearchResult):
1277         (WebInspector.ProfilesPanel.prototype.jumpToPreviousSearchResult):
1278         * inspector/front-end/ResourcesPanel.js:
1279         (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult):
1280         (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult):
1281         * inspector/front-end/ScriptsPanel.js:
1282         (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback):
1283         (WebInspector.ScriptsPanel.prototype.performSearch):
1284         (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult):
1285         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
1286         (WebInspector.ScriptsPanel.prototype.canSearchAndReplace):
1287         (WebInspector.ScriptsPanel.prototype.replaceSelectionWith):
1288         (WebInspector.ScriptsPanel.prototype.replaceAllWith):
1289         * inspector/front-end/SearchController.js:
1290         (WebInspector.SearchController):
1291         (WebInspector.SearchController.prototype.cancelSearch):
1292         (WebInspector.SearchController.prototype.disableSearchUntilExplicitAction):
1293         (WebInspector.SearchController.prototype.handleShortcut):
1294         (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
1295         (WebInspector.SearchController.prototype.activePanelChanged):
1296         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
1297         (WebInspector.SearchController.prototype.showSearchField):
1298         (WebInspector.SearchController.prototype._onKeyDown):
1299         (WebInspector.SearchController.prototype._onInput):
1300         (WebInspector.SearchController.prototype._onNextButtonSearch):
1301         (WebInspector.SearchController.prototype._onPrevButtonSearch):
1302         (WebInspector.SearchController.prototype._performSearch):
1303         (WebInspector.SearchController.prototype._toggleReplaceVisibility):
1304         (WebInspector.SearchController.prototype._replace):
1305         (WebInspector.SearchController.prototype._replaceAll):
1306         * inspector/front-end/Settings.js:
1307         (WebInspector.ExperimentsSettings):
1308         * inspector/front-end/SourceFrame.js:
1309         (WebInspector.SourceFrame.createSearchRegex):
1310         (WebInspector.SourceFrame.prototype.beforeTextChanged):
1311         (WebInspector.SourceFrame.prototype.replaceSearchMatchWith):
1312         (WebInspector.SourceFrame.prototype.replaceAllWith):
1313         (WebInspector.TextEditorDelegateForSourceFrame.prototype.beforeTextChanged):
1314         (WebInspector.TextEditorDelegateForSourceFrame.prototype.commitEditing):
1315         * inspector/front-end/StylesPanel.js:
1316         (WebInspector.StyleSourceFrame.prototype.afterTextChanged):
1317         * inspector/front-end/TextEditor.js:
1318         (WebInspector.TextEditor.prototype._commitEditing):
1319         * inspector/front-end/TextEditorModel.js:
1320         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1321         * inspector/front-end/inspector.css:
1322         (.search-replace):
1323         (.search-replace:focus):
1324         (.toolbar-search-navigation-controls):
1325         (.toolbar-search-navigation.enabled):
1326         (.toolbar-search):
1327         (.toolbar-search input[type="checkbox"]):
1328         (.toolbar-search button):
1329         (.toolbar-search button:active):
1330         (.toolbar-search-control):
1331         (.toolbar-replace-control):
1332         (.toolbar-search-navigation.enabled:active):
1333         (.toolbar-search-navigation.toolbar-search-navigation-prev):
1334         (.toolbar-search-navigation.toolbar-search-navigation-prev.enabled:active):
1335         (.toolbar-search-navigation.toolbar-search-navigation-next):
1336         (.toolbar-search-navigation.toolbar-search-navigation-next.enabled:active):
1337         (.drawer-header-close-button):
1338         (.inspector-footer):
1339
1340 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
1341
1342         [Qt][V8] Remove the V8 related codepaths and configuration
1343         https://bugs.webkit.org/show_bug.cgi?id=90863
1344
1345         Reviewed by Simon Hausmann.
1346
1347         No new tests because no new functionality.
1348
1349         * DerivedSources.pri:
1350         * Target.pri:
1351         * WebCore.gypi:
1352         * WebCore.pri:
1353         * bindings/v8/ScriptCachedFrameData.cpp:
1354         * bindings/v8/ScriptCachedFrameData.h:
1355         * bindings/v8/ScriptController.cpp:
1356         * bindings/v8/ScriptController.h:
1357         (ScriptController):
1358         * bindings/v8/ScriptControllerQt.cpp: Removed.
1359         * bindings/v8/V8GCController.cpp:
1360         (WebCore::V8GCController::checkMemoryUsage):
1361         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1362         (WebCore::histogramEnumeration):
1363         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1364         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1365         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1366         * config.h:
1367
1368 2012-07-17  Zoltan Horvath  <zoltan@webkit.org>
1369
1370         [QT] REGRESSION (r122720): svg/filters/feSpecularLight-premultiplied.svg
1371         https://bugs.webkit.org/show_bug.cgi?id=91390
1372
1373         Reviewed by Zoltan Herczeg.
1374
1375         Fix the regression by using the proper imagetype conversion in ImageBuffer::platformTransformColorSpace.
1376
1377         The test is unskipped.
1378
1379         * platform/graphics/qt/ImageBufferQt.cpp:
1380         (WebCore::ImageBuffer::platformTransformColorSpace):
1381
1382 2012-07-17  Vivek Galatage  <vivekgalatage@gmail.com>
1383
1384         Web Inspector: refactor InspectorController::connectFrontend() to accept InspectorFrontendChannel.
1385         https://bugs.webkit.org/show_bug.cgi?id=91196
1386
1387         Reviewed by Pavel Feldman.
1388
1389         Refactoring InspectorClients. InspectorClient::openInspectorFrontend
1390         now returning the InspectorFrontendChannel. Also refactored
1391         InspectorController::connectFrontend() to receive
1392         InspectorFrontendChannel.
1393
1394         No new test as code refactoring done.
1395
1396         * inspector/InspectorClient.h:
1397         (WebCore):
1398         (InspectorClient):
1399         * inspector/InspectorController.cpp:
1400         (WebCore::InspectorController::InspectorController):
1401         (WebCore::InspectorController::connectFrontend):
1402         (WebCore::InspectorController::show):
1403         (WebCore::InspectorController::reconnectFrontend):
1404         * inspector/InspectorController.h:
1405         (WebCore):
1406         (InspectorController):
1407         * loader/EmptyClients.h:
1408         (WebCore::EmptyInspectorClient::openInspectorFrontend):
1409         (WebCore::EmptyInspectorClient::hideHighlight):
1410
1411 2012-07-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1412
1413         Unreviewed, rolling out r122834.
1414         http://trac.webkit.org/changeset/122834
1415         https://bugs.webkit.org/show_bug.cgi?id=91492
1416
1417         it broke the chromium (Requested by kkristof on #webkit).
1418
1419         * DerivedSources.pri:
1420         * Target.pri:
1421         * WebCore.pri:
1422         * bindings/v8/ScriptCachedFrameData.cpp:
1423         (WebCore):
1424         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1425         (WebCore::ScriptCachedFrameData::domWindow):
1426         (WebCore::ScriptCachedFrameData::restore):
1427         (WebCore::ScriptCachedFrameData::clear):
1428         * bindings/v8/ScriptCachedFrameData.h:
1429         (WebCore):
1430         (ScriptCachedFrameData):
1431         (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
1432         * bindings/v8/ScriptController.cpp:
1433         * bindings/v8/ScriptController.h:
1434         (ScriptController):
1435         * bindings/v8/ScriptControllerQt.cpp: Copied from Source/WebCore/bindings/v8/ScriptCachedFrameData.cpp.
1436         (WebCore):
1437         (WebCore::ScriptController::qtScriptEngine):
1438         * bindings/v8/V8GCController.cpp:
1439         (WebCore::V8GCController::checkMemoryUsage):
1440         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1441         (WebCore):
1442         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1443         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1444         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1445         * config.h:
1446
1447 2012-07-17  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
1448
1449         [Qt][V8] Remove the V8 related codepaths and configuration
1450         https://bugs.webkit.org/show_bug.cgi?id=90863
1451
1452         Reviewed by Simon Hausmann.
1453
1454         No new tests, because there is no new functionality.
1455
1456         * DerivedSources.pri:
1457         * Target.pri:
1458         * WebCore.pri:
1459         * bindings/v8/ScriptCachedFrameData.cpp:
1460         * bindings/v8/ScriptCachedFrameData.h:
1461         * bindings/v8/ScriptController.cpp:
1462         * bindings/v8/ScriptController.h:
1463         (ScriptController):
1464         * bindings/v8/ScriptControllerQt.cpp: Removed.
1465         * bindings/v8/V8GCController.cpp:
1466         (WebCore::V8GCController::checkMemoryUsage):
1467         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1468         (WebCore::histogramEnumeration):
1469         (WebCore::V8InspectorFrontendHost::recordActionTakenCallback):
1470         (WebCore::V8InspectorFrontendHost::recordPanelShownCallback):
1471         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback):
1472         * config.h:
1473
1474 2012-07-17  Kwang Yul Seo  <skyul@company100.net>
1475
1476         "in body" insertion mode, "any other end tag" step 2.1 is updated
1477         https://bugs.webkit.org/show_bug.cgi?id=91473
1478
1479         Reviewed by Eric Seidel.
1480
1481         The HTML5 spec is updated to change the 'end tag' processing to not imply
1482         its own end tag, since that makes no sense. Step 2.1 now says
1483         "Generate implied end tags, except for elements with the same tag name as the token."
1484         Modified to follow the updated spec. Also removed the first FIXME because now
1485         ElementRecord can't be deleted by the preceeding call.
1486
1487         This patch does not actually change the behavior because of the previous
1488         check (aborts if generateImpliedEndTags has already popped the node for the token),
1489         so no new tests.
1490
1491         * html/parser/HTMLTreeBuilder.cpp:
1492         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1493
1494 2012-07-17  Shinya Kawanaka  <shinyak@chromium.org> 
1495
1496         [Regression] Infinite loop in document.elementFromPoint
1497         https://bugs.webkit.org/show_bug.cgi?id=90820
1498
1499         Reviewed by Nikolas Zimmermann.
1500
1501         Node::shadowAncestorNode returns the caller node itself for SVGElement. However,
1502         since we have already implemented event retargeting algorithm in Shadow DOM, we don't have to
1503         take a special care of SVGElement for Node.shadowAncestorNode() now.
1504
1505         This patch will removes the special care code and fixes infinite loop in document.elementFromPoint().
1506
1507         Test: svg/hittest/svg-use-element-from-point.html
1508
1509         * dom/Node.cpp:
1510         (WebCore::Node::shadowAncestorNode):
1511
1512 2012-07-17  Shinya Kawanaka  <shinyak@chromium.org>
1513
1514         Shadow DOM for img element
1515         https://bugs.webkit.org/show_bug.cgi?id=90532
1516
1517         Reviewed by Hajime Morita.
1518
1519         This patch adds Shadow DOM support for img element.
1520
1521         According to the Shadow DOM spec, img element should behave like having a user agent Shadow DOM.
1522         However, if we add Shadow DOM to img by default, it will cause performance regression and memory bloat.
1523
1524         So, we would like to postpone adding a Shadow DOM to img until when we really need it. In other words,
1525         we add our User Agent Shadow DOM to img just before a user adds Author Shadow DOM.
1526
1527         The User Agent Shadow DOM for img has only one element, which displays an image. If img has
1528         a Shadow DOM, img will behave like <span style="display: inline-block"> by default. The display style can
1529         be chagned using CSS though.
1530
1531         This patch also adds ImageLoaderClient. The element we render an image and the element we take an argument
1532         from were the same, however not they might be different. We would like to encapsulate the fact into
1533         ImageLoaderClient.
1534
1535         Tests: fast/dom/shadow/shadowdom-for-image-alt-update.html
1536                fast/dom/shadow/shadowdom-for-image-alt.html
1537                fast/dom/shadow/shadowdom-for-image-content.html
1538                fast/dom/shadow/shadowdom-for-image-dynamic.html
1539                fast/dom/shadow/shadowdom-for-image-event-click.html
1540                fast/dom/shadow/shadowdom-for-image-in-shadowdom.html
1541                fast/dom/shadow/shadowdom-for-image-map.html
1542                fast/dom/shadow/shadowdom-for-image-style.html
1543                fast/dom/shadow/shadowdom-for-image-with-multiple-shadow.html
1544                fast/dom/shadow/shadowdom-for-image-with-width-and-height.html
1545                fast/dom/shadow/shadowdom-for-image.html
1546
1547         * CMakeLists.txt:
1548         * GNUmakefile.list.am:
1549         * Target.pri:
1550         * WebCore.gypi:
1551         * WebCore.vcproj/WebCore.vcproj:
1552         * WebCore.xcodeproj/project.pbxproj:
1553         * css/html.css:
1554         (img):
1555         * html/HTMLImageElement.cpp:
1556         (WebCore::ImageElement::setImageIfNecessary):
1557         (WebCore):
1558         (WebCore::ImageElement::createRendererForImage):
1559         (WebCore::HTMLImageElement::willAddAuthorShadowRoot): When we don't have a user agent Shadow DOM yet
1560         we add it.
1561         (WebCore::HTMLImageElement::createShadowSubtree):
1562         (WebCore::HTMLImageElement::imageElement):
1563         (WebCore::HTMLImageElement::parseAttribute):
1564         (WebCore::HTMLImageElement::createRenderer): If a user agent Shadow DOM is attached, we create
1565         Renderer from style, instead of creating RenderImage.
1566         (WebCore::HTMLImageElement::attach):
1567         (WebCore::HTMLImageElement::innerElement):
1568         * html/HTMLImageElement.h:
1569         (WebCore):
1570         (ImageElement):
1571         (HTMLImageElement):
1572         (WebCore::HTMLImageElement::sourceElement):
1573         (WebCore::HTMLImageElement::refSourceElement):
1574         (WebCore::HTMLImageElement::derefSourceElement):
1575         (WebCore::HTMLImageElement::imageRenderer):
1576         (WebCore::HTMLImageElement::imageLoader):
1577         (WebCore::isHTMLImageElement):
1578         (WebCore::toHTMLImageElement):
1579         * html/HTMLImageLoader.cpp:
1580         (WebCore::HTMLImageLoader::HTMLImageLoader):
1581         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1582         (WebCore::HTMLImageLoader::sourceURI):
1583         (WebCore::HTMLImageLoader::notifyFinished):
1584         * html/HTMLImageLoader.h:
1585         (HTMLImageLoader):
1586         * html/HTMLInputElement.h:
1587         * html/HTMLObjectElement.h:
1588         * html/HTMLPlugInElement.h:
1589         * html/HTMLTagNames.in:
1590         * html/HTMLVideoElement.h:
1591         * html/shadow/ImageInnerElement.cpp: Added.
1592         (WebCore):
1593         (WebCore::ImageInnerElement::ImageInnerElement):
1594         (WebCore::ImageInnerElement::hostImage):
1595         (WebCore::ImageInnerElement::imageLoader):
1596         (WebCore::ImageInnerElement::attach):
1597         (WebCore::ImageInnerElement::createRenderer):
1598         * html/shadow/ImageInnerElement.h: Added.
1599         (WebCore):
1600         (ImageInnerElement):
1601         (WebCore::ImageInnerElement::imageRenderer):
1602         (WebCore::ImageInnerElement::create):
1603         (WebCore::isImageInnerElement):
1604         (WebCore::toImageInnerElement):
1605         * loader/ImageLoader.cpp:
1606         (WebCore::ImageLoader::ImageLoader):
1607         (WebCore::ImageLoader::~ImageLoader):
1608         (WebCore):
1609         (WebCore::ImageLoader::document):
1610         (WebCore::ImageLoader::updateFromElement):
1611         (WebCore::ImageLoader::notifyFinished):
1612         (WebCore::ImageLoader::renderImageResource):
1613         (WebCore::ImageLoader::updatedHasPendingLoadEvent):
1614         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1615         (WebCore::ImageLoader::dispatchPendingLoadEvent):
1616         (WebCore::ImageLoader::dispatchPendingErrorEvent):
1617         * loader/ImageLoader.h:
1618         (WebCore):
1619         (ImageLoader):
1620         (WebCore::ImageLoader::client):
1621         * loader/ImageLoaderClient.h: Added.
1622         (WebCore):
1623         (ImageLoaderClient): Provides the necessary interfaces to ImageLoader.
1624         (WebCore::ImageLoaderClient::~ImageLoaderClient):
1625         (ImageLoaderClientBase):
1626         (WebCore::ImageLoaderClientBase::sourceElement):
1627         (WebCore::ImageLoaderClientBase::imageElement):
1628         (WebCore::ImageLoaderClientBase::refSourceElement):
1629         (WebCore::ImageLoaderClientBase::derefSourceElement):
1630         * rendering/RenderImage.cpp:
1631         (WebCore::RenderImage::paintIntoRect):
1632         (WebCore::RenderImage::imageMap):
1633         (WebCore::RenderImage::updateAltText):
1634         (WebCore::RenderImage::hostImageElement):
1635         (WebCore):
1636         * rendering/RenderImage.h:
1637         (WebCore):
1638         (RenderImage):
1639         * rendering/RenderObject.cpp:
1640         (WebCore::RenderObject::shouldRespectImageOrientation):
1641         * svg/SVGImageElement.h:
1642         (SVGImageElement):
1643         * svg/SVGImageLoader.cpp:
1644         (WebCore::SVGImageLoader::SVGImageLoader):
1645         (WebCore::SVGImageLoader::dispatchLoadEvent):
1646         (WebCore::SVGImageLoader::sourceURI):
1647         * svg/SVGImageLoader.h:
1648         (SVGImageLoader):
1649
1650 2012-07-17  Kent Tamura  <tkent@chromium.org>
1651
1652         Internals: Remove injectPagePopupController()
1653         https://bugs.webkit.org/show_bug.cgi?id=91471
1654
1655         Reviewed by Hajime Morita.
1656
1657         r122558 introduced injectPagePopupController(), however we'd like to
1658         avoid adding such JavaScript binding code. We can avoid it by exposing a
1659         PagePopupController for a mock and injecting the following code to the
1660         popup document:
1661
1662         <script>window.pagePopupController = window.internals.pagePopupController</script>
1663
1664         No new tests. This is a kind of refactoring.
1665
1666         * testing/InternalSettings.cpp:
1667         (WebCore::InternalSettings::pagePopupController):
1668         Added. Accessor for PagePopupControler owned by the MockPagePopupDriver.
1669         * testing/InternalSettings.h:
1670         (InternalSettings): Declare pagePopupController() for Internals::pagePopupController().
1671         * testing/Internals.cpp:
1672         (WebCore::Internals::pagePopupController):
1673         Added. This uses InternalSettings::pagePopupController().
1674         * testing/Internals.h:
1675         (Internals): Declare pagePopupController() for Internals.idl.
1676         * testing/Internals.idl: Declare pagePopupController.
1677
1678         * testing/MockPagePopupDriver.cpp:
1679         Moved m_pagePopupController from MockPagePopup to MockPagePopupDriver.
1680         (WebCore::MockPagePopup::MockPagePopup):
1681         Added a script element to prepare window.pagePopupController.
1682         Removed a callsite of injectPagePopupController().
1683         (WebCore::MockPagePopupDriver::openPagePopup):
1684         (WebCore::MockPagePopupDriver::closePagePopup):
1685         * testing/MockPagePopupDriver.h:
1686         (WebCore::MockPagePopupDriver::pagePopupController):
1687         Accessor for a PagePopupController object.
1688         (MockPagePopupDriver): Add RefPtr<PagePopupController> data member.
1689
1690         * testing/v8/WebCoreTestSupport.cpp: Remove injectPagePopupController().
1691         * testing/v8/WebCoreTestSupport.h: ditto.
1692
1693 2012-07-17  Ryuan Choi  <ryuan.choi@samsung.com>
1694
1695         [EFL] Move codes related to theme setting from Widget to RenderTheme
1696         https://bugs.webkit.org/show_bug.cgi?id=89842
1697
1698         Reviewed by Kenneth Rohde Christiansen.
1699
1700         WebKit/Efl uses custom theme for Scrollbar, RenderTheme and Cursor.
1701         However, theme information itself is in WidgetEfl so it is accessed by
1702         calling recursive function.
1703         Because theme is managed by each page, this patch moves codes related to
1704         theme from WidgetEfl to RenderThemeEfl which is contained by page.
1705
1706         * platform/Widget.h: Removed functions related to theme.
1707         * platform/efl/RenderThemeEfl.cpp:
1708         (WebCore::RenderThemeEfl::setThemePath): Added to set theme path.
1709         (WebCore::RenderThemeEfl::createEdje): Updated method to use RenderThemeEfl's theme.
1710         (WebCore::RenderThemeEfl::RenderThemeEfl):
1711         * platform/efl/RenderThemeEfl.h:
1712         (WebCore::RenderThemeEfl::themePath): Added to get theme path
1713         * platform/efl/ScrollbarEfl.cpp: Updated method to use RenderThemeEfl's theme.
1714         (ScrollbarEfl::setParent):
1715         * platform/efl/WidgetEfl.cpp: Removed codes related theme.
1716         (WidgetPrivate):
1717
1718 2012-07-17  Shinya Kawanaka  <shinyak@chromium.org>
1719
1720         HTMLMediaElement should not use Element::ensureShadowRoot()
1721         https://bugs.webkit.org/show_bug.cgi?id=77936
1722
1723         Reviewed by Hajime Morita.
1724
1725         a video element and an audio element add UserAgentShadowRoot dynamically, and they assume that it's the oldest ShadowRoot.
1726         However an AuthorShadowRoot could be added by a user before a video element and an audio element add UserAgentShadowRoot.
1727         It breaks the assumption that the UserAgentShadowRoot is the oldest.
1728
1729         If the UserAgentShadowRoot is not the oldest, the AuthorShadowRoot a page author added might be ignored.
1730         Since the timing to add UserAgentShadowRoot is not known by a user, the fact that UserAgentShadorRoot is
1731         not the oldest will cause inconsistent behavior.
1732
1733         Adding AuthorShadowRoot to a video element and an audio element is allowed by this patch.
1734
1735         Test: fast/dom/shadow/shadowdom-for-media.html
1736
1737         * dom/ShadowRoot.cpp:
1738         (WebCore::allowsAuthorShadowRoot):
1739         * html/HTMLMediaElement.cpp:
1740         (WebCore::HTMLMediaElement::createShadowSubtree):
1741         (WebCore):
1742         (WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
1743         (WebCore::HTMLMediaElement::createMediaControls):
1744         * html/HTMLMediaElement.h:
1745         (HTMLMediaElement):
1746
1747 2012-07-16  Daniel Bates  <dbates@webkit.org>
1748
1749         Attempt to fix the Chromium Mac build after <http://trac.webkit.org/changeset/122802>
1750         (https://bugs.webkit.org/show_bug.cgi?id=91451)
1751  
1752         Remove unused private instance variable AbsoluteQuadsGeneratorContext::m_wasFixed.
1753         This instance variable has remained unused since it was added in
1754         <http://trac.webkit.org/changeset/116718> (https://bugs.webkit.org/show_bug.cgi?id=85725).
1755
1756         I'm unclear as to why the Chromium Mac build began to complain about this
1757         unused instance variable following <http://trac.webkit.org/changeset/122802>, since this
1758         code has been in the tree for a while and we previously instantiated AbsoluteQuadsGeneratorContext
1759         with wasFixed (even though it wasn't used). Regardless, we should remove the unused
1760         instance variable AbsoluteQuadsGeneratorContext::m_wasFixed.
1761
1762         * rendering/RenderInline.cpp:
1763         (WebCore): Remove AbsoluteQuadsGeneratorContext::m_wasFixed.
1764         (WebCore::RenderInline::absoluteQuads):
1765
1766 2012-07-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1767
1768         Add RegisterProtocolHandlerClient to the Modules/protocolhandler
1769         https://bugs.webkit.org/show_bug.cgi?id=90940
1770
1771         Reviewed by Hajime Morita.
1772
1773         As a step to let protocol handler be moved to the modules, RegisterProtocolHandlerClient needs
1774         to be added to the Modules/protocolhandler. Because ChromeClient has some virtual functions for
1775         protocol handlers, virtual functions should be moved to RegisterProtocolHandlerClient.
1776
1777         In addition, NavigatorRegisterProtocolHandler should be supplementable.
1778
1779         No new tests. Covered by existing tests.
1780
1781         * GNUmakefile.list.am:
1782         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp:
1783         (WebCore::NavigatorRegisterProtocolHandler::from):
1784         (WebCore::NavigatorRegisterProtocolHandler::create):
1785         (WebCore):
1786         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
1787         (WebCore::customHandlersStateString):
1788         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
1789         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
1790         (WebCore::NavigatorRegisterProtocolHandler::supplementName):
1791         (WebCore::provideRegisterProtocolHandlerTo):
1792         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h:
1793         (WebCore):
1794         (NavigatorRegisterProtocolHandler):
1795         (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
1796         (WebCore::NavigatorRegisterProtocolHandler::client):
1797         * Modules/protocolhandler/RegisterProtocolHandlerClient.h: Added.
1798         (WebCore):
1799         (RegisterProtocolHandlerClient):
1800         * WebCore.gypi:
1801         * loader/EmptyClients.h:
1802         * page/ChromeClient.h:
1803         (ChromeClient):
1804         * platform/network/soup/CookieJarSoup.cpp:
1805         (WebCore::setCookies):
1806         (WebCore::getRawCookies):
1807
1808 2012-07-16  Pete Williamson  <petewil@google.com>
1809
1810         Changed the behavior of iconURLs to always recalculate the list.
1811         https://bugs.webkit.org/show_bug.cgi?id=88665
1812
1813         Reviewed by Kent Tamura.
1814
1815         As it turns out, it can contain stale URLs in the case that some script
1816         manipulates the DOM, which breaks scripts trying to reset the favicon
1817         URL. Also added a method in Internals to allow tests to get the list of
1818         icon
1819
1820         Tests: fast/dom/icon-url-change.html
1821                fast/dom/icon-url-list.html
1822
1823         * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
1824         * dom/Document.cpp:
1825         (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
1826         (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
1827         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
1828         * dom/Document.h:
1829         (Document): removed the addIconURL method which is no longer used
1830         * html/HTMLLinkElement.cpp:
1831         (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
1832         (WebCore):
1833         (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
1834         * html/HTMLLinkElement.h:
1835         (HTMLLinkElement): declared the icon type and size accessors
1836         * testing/Internals.cpp:
1837         (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
1838         (WebCore):
1839         * testing/Internals.h:
1840         (Internals): declared the method for unit testing the icon URL list
1841         * testing/Internals.idl: exported the Document::iconURLs function
1842
1843 2012-07-16  Hajime Morrita  <morrita@chromium.org>
1844
1845         WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing.
1846         https://bugs.webkit.org/show_bug.cgi?id=90764
1847
1848         Reviewed by Adam Barth.
1849
1850         Defined WEBCORE_TESTING based on USE(EXPORT_MACROS_FOR_TESTING) and
1851         applied it to FrameDestructionObserver.
1852
1853         * bindings/js/JSDOMGlobalObject.h: Removed conflicting symbols
1854         * page/FrameDestructionObserver.h: Added WEBKIT_TESTING
1855         (FrameDestructionObserver):
1856         * platform/PlatformExportMacros.h:
1857
1858 2012-07-16  Kiran Muppala  <cmuppala@apple.com>
1859
1860         REGRESSION: RenderInline::absoluteQuads produces incorrect results for fixed position.
1861         https://bugs.webkit.org/show_bug.cgi?id=91451
1862
1863         Reviewed by Simon Fraser.
1864
1865         RenderInline::absoluteQuads relies on copies of RenderGeometryMap,
1866         created indirectly by passing AbsoluteQuadsGeneratorContext object by
1867         value.  These copies are unsafe because the individual transform steps
1868         within the geometry map include a owned poitner to their respective
1869         transform.
1870
1871         Modify the callee methods to take context by reference and disable
1872         copy constructor for RenderGeometryMap.
1873
1874         Test: fast/inline/inline-fixed-position-boundingbox.html
1875
1876         * rendering/RenderGeometryMap.h:
1877         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep): Add missing
1878         m_offset to copy constructor initialization list.
1879         (RenderGeometryMap): Disable copy constructor.
1880         * rendering/RenderInline.cpp: Pass context object by reference.
1881         (WebCore::RenderInline::generateLineBoxRects): 
1882         (WebCore::RenderInline::generateCulledLineBoxRects):
1883         (WebCore::RenderInline::absoluteRects):
1884         (WebCore::RenderInline::absoluteQuads):
1885         (WebCore::RenderInline::linesBoundingBox):
1886         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1887         (WebCore::RenderInline::addFocusRingRects):
1888         * rendering/RenderInline.h:
1889         (RenderInline::generateLineBoxRects): Update method declarations to
1890         show pass by reference context parameter.
1891         (RenderInline::generateCulledLineBoxRects): Ditto.
1892
1893 2012-07-16  Hayato Ito  <hayato@chromium.org>
1894
1895         Some events should be always stopped at shadow boundary.
1896         https://bugs.webkit.org/show_bug.cgi?id=90436
1897
1898         Reviewed by Ryosuke Niwa.
1899
1900         The spec is here:
1901         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped
1902
1903         Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html
1904
1905         * dom/EventDispatcher.cpp:
1906         (WebCore::EventDispatcher::determineDispatchBehavior):
1907
1908 2012-07-16  Yoshifumi Inoue  <yosin@chromium.org>
1909
1910         REGRESSION(r119948): [Form] HTMLInputElement.valueAsNumber for input type "month" should return number of month since January 1970
1911         https://bugs.webkit.org/show_bug.cgi?id=91211
1912
1913         Reviewed by Kent Tamura.
1914
1915         This patch changes BaseDateAndTimeInputType::valueAsDouble() to call
1916         virtual function parseToNumber() which "month" input type overrides
1917         instead of non-virtual function parseToDouble() which returns number
1918         of milliseconds.
1919
1920         No new tests. Existing test (fast/form/month/input-valueasnumber-month.html) coverts this, although it is disabled.
1921
1922         * html/BaseDateAndTimeInputType.cpp:
1923         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Changed to call parseToNumber().
1924         (WebCore::BaseDateAndTimeInputType::parseToNumber): Changed to what parseToDouble() did.
1925         * html/BaseDateAndTimeInputType.h:
1926         (BaseDateAndTimeInputType): Remove parseToDouble().
1927
1928 2012-07-16  Adrienne Walker  <enne@google.com>
1929
1930         [chromium] Turn off ScrollbarLayerChromium for Windows due to bad alpha values
1931         https://bugs.webkit.org/show_bug.cgi?id=91438
1932
1933         Reviewed by Kenneth Russell.
1934
1935         r120509 turned on blending for scrollbar thumbs. Unfortunately for
1936         Windows XP scrollbar thumbs, their alpha channel is bogus and so the
1937         thumb ends up being completely transparent. This should ultimately be
1938         fixed in Chromium theme code, but in the meantime this patch turns
1939         off the use of ScrollbarLayerChromium.
1940
1941         This change makes Windows scrollbars fall back to using normal
1942         ContentLayerChromiums and being painted all in one layer on the main
1943         thread rather than being painted separately and composited on the
1944         compositor thread.
1945
1946         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1947         (WebCore::createScrollbarLayer):
1948
1949 2012-07-16  Koji Ishii  <kojiishi@gmail.com>
1950
1951         Vertical alternate glyph (GSUB) support for OpenTypeVerticalData
1952         https://bugs.webkit.org/show_bug.cgi?id=81389
1953
1954         Reviewed by Tony Chang.
1955
1956         This patch adds support for reading 'GSUB' OpenType table to get
1957         vertical alternate glyphs.
1958         http://www.microsoft.com/typography/otspec/gsub.htm
1959
1960         Like bug 81326, this code isn't on any code path yet.
1961
1962         Tests: WebKit/chromium/tests/OpenTypeVerticalDataTest.cpp
1963
1964         * platform/graphics/opentype/OpenTypeTypes.h:
1965         (WebCore::OpenType::validateTable): Moved from OpenTypeVerticalData.cpp for unit tests.
1966         (OpenType):
1967         (TableBase): Ditto.
1968         (WebCore::OpenType::TableBase::isValidEnd):
1969         (WebCore::OpenType::TableBase::validatePtr):
1970         (WebCore::OpenType::TableBase::validateOffset):
1971         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1972         (OpenType): Added several OpenType tables used by 'GSUB' table.
1973         (CoverageTable):
1974         (Coverage1Table):
1975         (Coverage2Table):
1976         (RangeRecord):
1977         (SubstitutionSubTable):
1978         (WebCore::OpenType::SubstitutionSubTable::coverage):
1979         (SingleSubstitution2SubTable):
1980         (LookupTable):
1981         (WebCore::OpenType::LookupTable::getSubstitutions):
1982         (LookupList):
1983         (WebCore::OpenType::LookupList::lookup):
1984         (FeatureTable):
1985         (WebCore::OpenType::FeatureTable::getGlyphSubstitutions):
1986         (FeatureList):
1987         (FeatureRecord):
1988         (WebCore::OpenType::FeatureList::feature):
1989         (LangSysTable):
1990         (WebCore::OpenType::LangSysTable::feature):
1991         (ScriptTable):
1992         (LangSysRecord):
1993         (WebCore::OpenType::ScriptTable::defaultLangSys):
1994         (ScriptList):
1995         (ScriptRecord):
1996         (WebCore::OpenType::ScriptList::script):
1997         (WebCore::OpenType::ScriptList::defaultScript):
1998         (WebCore::OpenType::ScriptList::defaultLangSys):
1999         (GSUBTable):
2000         (WebCore::OpenType::GSUBTable::scriptList):
2001         (WebCore::OpenType::GSUBTable::featureList):
2002         (WebCore::OpenType::GSUBTable::lookupList):
2003         (WebCore::OpenType::GSUBTable::defaultLangSys):
2004         (WebCore::OpenType::GSUBTable::feature):
2005         (WebCore::OpenType::GSUBTable::getVerticalGlyphSubstitutions):
2006         (WebCore::OpenTypeVerticalData::OpenTypeVerticalData):
2007         (WebCore::OpenTypeVerticalData::loadMetrics): Split code to load metrics from ctor.
2008         (WebCore::OpenTypeVerticalData::loadVerticalGlyphSubstitutions): Load the vertical alternate Glyph substitution table.
2009         (WebCore):
2010         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs): Substitute Glyph IDs with vertical alternate Glyph IDs.
2011         * platform/graphics/opentype/OpenTypeVerticalData.h:
2012         (OpenTypeVerticalData): Added m_verticalGlyphMap.
2013
2014 2012-07-16  Vincent Scheib  <scheib@chromium.org>
2015
2016         Fix spelling of EnforceIFrameAllowFullScreenRequirement and ExemptIFrameAllowFullScreenRequirement.
2017         https://bugs.webkit.org/show_bug.cgi?id=91437
2018
2019         Reviewed by Adrienne Walker.
2020
2021         Document contained spelling errors of 'FulScreen' instead of 'FullScreen'
2022         for the FullScreenCheckType enumeration.
2023
2024         No test changes needed.
2025
2026         * dom/Document.cpp:
2027         (WebCore::Document::requestFullScreenForElement):
2028         * dom/Document.h:
2029         * dom/Element.cpp:
2030         (WebCore::Element::webkitRequestFullscreen):
2031         (WebCore::Element::webkitRequestFullScreen):
2032         * html/HTMLMediaElement.cpp:
2033         (WebCore::HTMLMediaElement::enterFullscreen):
2034         * html/shadow/MediaControlElements.cpp:
2035         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2036
2037 2012-07-16  MORITA Hajime  <morrita@google.com>
2038
2039         Comment on WebCore::HTMLMediaElement::childShouldCreateRenderer() should explain why
2040         https://bugs.webkit.org/show_bug.cgi?id=91174
2041
2042         Reviewed by Kent Tamura.
2043
2044         Clarified the explanation.
2045
2046         * html/HTMLMediaElement.cpp:
2047         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
2048
2049 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2050
2051         Unreviewed, rolling out r120033.
2052         http://trac.webkit.org/changeset/120033
2053         https://bugs.webkit.org/show_bug.cgi?id=91454
2054
2055         Broke background gradients (Requested by smfr on #webkit).
2056
2057         * platform/graphics/GeneratorGeneratedImage.cpp:
2058         (WebCore::GeneratorGeneratedImage::draw):
2059
2060 2012-07-16  Joshua Bell  <jsbell@chromium.org>
2061
2062         IndexedDB: Implement spec updates to IDBTransaction.error
2063         https://bugs.webkit.org/show_bug.cgi?id=91409
2064
2065         Reviewed by Tony Chang.
2066
2067         The Indexed DB spec was updated to resolve some edge cases around the
2068         IDBTransaction.error attribute. It was agreed that accessing error should
2069         never throw, error should be null if the transaction is not finished or
2070         abort() was explicitly called, an appropriate error should be returned if
2071         a commit failed, and a generic AbortError should be used if a request
2072         callback throws. These cases are now handled per spec, except that a reason
2073         is not provided for the commit failure (it's always UnknownError).
2074
2075         Test: storage/indexeddb/transaction-error.html
2076               storage/indexeddb/transaction-abort.html
2077
2078         * Modules/indexeddb/IDBRequest.cpp:
2079         (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
2080         re-abort the transaction if dispatching in response to an abort.
2081         (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
2082         only if not already aborting, and set it's error to AbortError.
2083         * Modules/indexeddb/IDBTransaction.cpp:
2084         (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
2085         * Modules/indexeddb/IDBTransaction.h:
2086         (WebCore::IDBTransaction::db): Move impl to header file.
2087         (WebCore::IDBTransaction::error): Move impl to header file, simplify.
2088         (IDBTransaction):
2089         * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.
2090
2091 2012-07-16  Joshua Bell  <jsbell@chromium.org>
2092
2093         IndexedDB: Implement spec updates to IDBTransaction.error
2094         https://bugs.webkit.org/show_bug.cgi?id=91409
2095
2096         Reviewed by Tony Chang.
2097
2098         The Indexed DB spec was updated to resolve some edge cases around the
2099         IDBTransaction.error attribute. It was agreed that accessing error should
2100         never throw, error should be null if the transaction is not finished or
2101         abort() was explicitly called, an appropriate error should be returned if
2102         a commit failed, and a generic AbortError should be used if a request
2103         callback throws. These cases are now handled per spec, except that a reason
2104         is not provided for the commit failure (it's always UnknownError).
2105
2106         Test: storage/indexeddb/transaction-error.html
2107               storage/indexeddb/transaction-abort.html
2108
2109         * Modules/indexeddb/IDBRequest.cpp:
2110         (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
2111         re-abort the transaction if dispatching in response to an abort.
2112         (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
2113         only if not already aborting, and set it's error to AbortError.
2114         * Modules/indexeddb/IDBTransaction.cpp:
2115         (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
2116         * Modules/indexeddb/IDBTransaction.h:
2117         (WebCore::IDBTransaction::db): Move impl to header file.
2118         (WebCore::IDBTransaction::error): Move impl to header file, simplify.
2119         (IDBTransaction):
2120         * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.
2121
2122 2012-07-16  Alec Flett  <alecflett@chromium.org>
2123
2124         IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
2125         https://bugs.webkit.org/show_bug.cgi?id=90923
2126
2127         Reviewed by Darin Fisher.
2128
2129         Refactor IndexWriter to depend only on IDBIndexMetadata and on
2130         (databaseId, objectStoreId, indexId) so that it can talk directly
2131         to the backing store, and also eventually be moved into the renderer.
2132
2133         This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys
2134         as a replacement for IDBObjectStoreBackendInterface::put, already
2135         stubbed out in the chromium port. It will fully replace put()
2136         after both chromium and webkit sides have reached alignment.
2137
2138         No new tests as this is just a refactor and existing tests cover
2139         correctness.
2140
2141         * Modules/indexeddb/IDBCursor.cpp:
2142         (WebCore::IDBCursor::setValueReady):
2143         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2144         * Modules/indexeddb/IDBIndexBackendImpl.h:
2145         * Modules/indexeddb/IDBObjectStore.h:
2146         (IDBObjectStore):
2147         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2148         (WebCore::IDBObjectStoreBackendImpl::put):
2149         (WebCore):
2150         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
2151         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2152         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
2153         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2154         (IDBObjectStoreBackendImpl):
2155         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
2156         * Modules/indexeddb/IDBRequest.cpp:
2157         (WebCore::IDBRequest::onSuccess):
2158
2159 2012-07-16  Adrienne Walker  <enne@google.com>
2160
2161         [chromium] Unify compositor quad transforms into content space
2162         https://bugs.webkit.org/show_bug.cgi?id=91350
2163
2164         Reviewed by Kenneth Russell.
2165
2166         For the purpose of simplification and as a first step towards removing
2167         any transform that takes a centered rect, remove the ability of layers
2168         to override the quad transform. All quads and quad transforms operate
2169         on content space with the origin in the top left.
2170
2171         The gutter quads used to use the root layer (that doesn't draw
2172         content) as the layer to create the shared quad state from. This is
2173         now created manually as a layer without bounds should never in general
2174         need a shared quad state created for it.
2175
2176         No change in functionality; tested by existing layout and unit tests.
2177
2178         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2179         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
2180         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2181         (WebCore::CCLayerImpl::createSharedQuadState):
2182         * platform/graphics/chromium/cc/CCLayerImpl.h:
2183         (CCLayerImpl):
2184         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2185         (WebCore::CCRenderPass::appendQuadsToFillScreen):
2186         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2187         (WebCore::CCSolidColorLayerImpl::appendQuads):
2188         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2189         (CCSolidColorLayerImpl):
2190         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2191         (WebCore::CCTextureLayerImpl::appendQuads):
2192         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2193         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2194         (CCTiledLayerImpl):
2195         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2196         (WebCore::CCVideoLayerImpl::appendQuads):
2197
2198 2012-07-16  Adrienne Walker  <enne@google.com>
2199
2200         [chromium] Unify compositor quad transforms into content space
2201         https://bugs.webkit.org/show_bug.cgi?id=91350
2202
2203         Reviewed by Kenneth Russell.
2204
2205         For the purpose of simplification and as a first step towards removing
2206         any transform that takes a centered rect, remove the ability of layers
2207         to override the quad transform. All quads and quad transforms operate
2208         on content space with the origin in the top left.
2209
2210         The gutter quads used to use the root layer (that doesn't draw
2211         content) as the layer to create the shared quad state from. This is
2212         now created manually as a layer without bounds should never in general
2213         need a shared quad state created for it.
2214
2215         No change in functionality; tested by existing layout and unit tests.
2216
2217         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2218         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
2219         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2220         (WebCore::CCLayerImpl::createSharedQuadState):
2221         * platform/graphics/chromium/cc/CCLayerImpl.h:
2222         (CCLayerImpl):
2223         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2224         (WebCore::CCRenderPass::appendQuadsToFillScreen):
2225         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2226         (WebCore::CCSolidColorLayerImpl::appendQuads):
2227         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2228         (CCSolidColorLayerImpl):
2229         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2230         (WebCore::CCTextureLayerImpl::appendQuads):
2231         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2232         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2233         (CCTiledLayerImpl):
2234         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2235         (WebCore::CCVideoLayerImpl::appendQuads):
2236
2237 2012-07-16  Joshua Bell  <jsbell@chromium.org>
2238
2239         IndexedDB: Resolve test and IDL FIXMEs for a handful of landed patches
2240         https://bugs.webkit.org/show_bug.cgi?id=91423
2241
2242         Reviewed by Tony Chang.
2243
2244         IDBObjectStore.createIndex() had a hack to handle a null keyPath argument for the
2245         DOMString[] overload and treat it as the string "null". Now that IDL arrays are not
2246         nullable by default following r121817 this hack can be removed and the binding layer
2247         will automagically coerce to DOMString.
2248
2249         Test: storage/indexeddb/keypath-basics.html
2250
2251         * Modules/indexeddb/IDBObjectStore.cpp:
2252         (WebCore::IDBObjectStore::createIndex): Remove special case for null in DOMString[] overload.
2253         * Modules/indexeddb/IDBObjectStore.idl: Remove Nullable suffix from DOMString[] overload
2254         so that the DOMString overload will match null.
2255
2256 2012-07-16  Bear Travis  <betravis@adobe.com>
2257
2258         Resolve CSS Exclusions shapeInside, shapeOutside properties to Length based WrapShape classes
2259         https://bugs.webkit.org/show_bug.cgi?id=89670
2260
2261         Reviewed by Dirk Schulze.
2262
2263         Layout of CSS Exclusions requires length based WrapShape classes,
2264         rather than the existing CSSValue based CSSWrapShape classes. This
2265         patch adds length based WrapShape analogs to the CSSWrapShapes, and
2266         modifies RenderStyle to use a WrapShape instead of a CSSWrapShape.
2267         The translation between WrapShape and CSSWrapShape classes
2268         is handled by helper functions in the new WrapShapeFunctions files.
2269         StyleBuilder resolves CSSWrapShapes to WrapShapes for layout use.
2270         CSSComputedStyleDeclaration translates WrapShapes to CSSWrapShapes
2271         for style use.
2272
2273         There are existing tests that cover the style serialization / resolution
2274         in fast/exclusions/parsing-wrap-shape-inside.html and
2275         fast/exclusions/parsing/wrap-shape-outside.html
2276
2277         Test: fast/exclusions/parsing-wrap-shape-lengths.html
2278
2279         * CMakeLists.txt: Build system changes for adding new files
2280         * GNUmakefile.list.am: Ditto
2281         * Target.pri: Ditto
2282         * WebCore.gypi: Ditto
2283         * WebCore.vcproj/WebCore.vcproj: Ditto
2284         * WebCore.xcodeproj/project.pbxproj: Ditto
2285         * css/CSSComputedStyleDeclaration.cpp: Translate WrapShapes back to CSSWrapShapes
2286         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2287         * css/CSSWrapShapes.h: Mostly changing functions to be const
2288         (WebCore::CSSWrapShapeRectangle::type):
2289         (WebCore::CSSWrapShapeCircle::type):
2290         (WebCore::CSSWrapShapeEllipse::type):
2291         (WebCore::CSSWrapShapePolygon::getXAt):
2292         (WebCore::CSSWrapShapePolygon::getYAt):
2293         (WebCore::CSSWrapShapePolygon::values):
2294         (WebCore::CSSWrapShapePolygon::type):
2295         * css/StyleBuilder.cpp: Resolve CSSWrapShapes to WrapShapes
2296         (WebCore):
2297         (WebCore::ApplyPropertyWrapShape::setValue):
2298         (WebCore::ApplyPropertyWrapShape::applyValue):
2299         (WebCore::ApplyPropertyWrapShape::createHandler):
2300         * css/WrapShapeFunctions.cpp: Added.
2301         (WebCore):
2302         (WebCore::valueForWrapShape):
2303         (WebCore::convertToLength):
2304         (WebCore::wrapShapeForValue):
2305         * css/WrapShapeFunctions.h: Added.
2306         (WebCore):
2307         * rendering/style/RenderStyle.h:
2308         * rendering/style/StyleRareNonInheritedData.h:
2309         (StyleRareNonInheritedData):
2310         * rendering/style/WrapShapes.h: Added.
2311         (WebCore):
2312         (WrapShape):
2313         (WebCore::WrapShape::~WrapShape):
2314         (WebCore::WrapShape::WrapShape):
2315         (WrapShapeRectangle):
2316         (WebCore::WrapShapeRectangle::create):
2317         (WebCore::WrapShapeRectangle::left):
2318         (WebCore::WrapShapeRectangle::top):
2319         (WebCore::WrapShapeRectangle::width):
2320         (WebCore::WrapShapeRectangle::height):
2321         (WebCore::WrapShapeRectangle::cornerRadiusX):
2322         (WebCore::WrapShapeRectangle::cornerRadiusY):
2323         (WebCore::WrapShapeRectangle::setLeft):
2324         (WebCore::WrapShapeRectangle::setTop):
2325         (WebCore::WrapShapeRectangle::setWidth):
2326         (WebCore::WrapShapeRectangle::setHeight):
2327         (WebCore::WrapShapeRectangle::setCornerRadiusX):
2328         (WebCore::WrapShapeRectangle::setCornerRadiusY):
2329         (WebCore::WrapShapeRectangle::type):
2330         (WebCore::WrapShapeRectangle::WrapShapeRectangle):
2331         (WrapShapeCircle):
2332         (WebCore::WrapShapeCircle::create):
2333         (WebCore::WrapShapeCircle::left):
2334         (WebCore::WrapShapeCircle::top):
2335         (WebCore::WrapShapeCircle::radius):
2336         (WebCore::WrapShapeCircle::setLeft):
2337         (WebCore::WrapShapeCircle::setTop):
2338         (WebCore::WrapShapeCircle::setRadius):
2339         (WebCore::WrapShapeCircle::type):
2340         (WebCore::WrapShapeCircle::WrapShapeCircle):
2341         (WrapShapeEllipse):
2342         (WebCore::WrapShapeEllipse::create):
2343         (WebCore::WrapShapeEllipse::top):
2344         (WebCore::WrapShapeEllipse::left):
2345         (WebCore::WrapShapeEllipse::radiusX):
2346         (WebCore::WrapShapeEllipse::radiusY):
2347         (WebCore::WrapShapeEllipse::setTop):
2348         (WebCore::WrapShapeEllipse::setLeft):
2349         (WebCore::WrapShapeEllipse::setRadiusX):
2350         (WebCore::WrapShapeEllipse::setRadiusY):
2351         (WebCore::WrapShapeEllipse::type):
2352         (WebCore::WrapShapeEllipse::WrapShapeEllipse):
2353         (WrapShapePolygon):
2354         (WebCore::WrapShapePolygon::create):
2355         (WebCore::WrapShapePolygon::windRule):
2356         (WebCore::WrapShapePolygon::values):
2357         (WebCore::WrapShapePolygon::getXAt):
2358         (WebCore::WrapShapePolygon::getYAt):
2359         (WebCore::WrapShapePolygon::setWindRule):
2360         (WebCore::WrapShapePolygon::appendPoint):
2361         (WebCore::WrapShapePolygon::type):
2362         (WebCore::WrapShapePolygon::WrapShapePolygon):
2363
2364 2012-07-16  Simon Fraser  <simon.fraser@apple.com>
2365
2366         Fix compositing layers in columns when in paginated mode
2367         https://bugs.webkit.org/show_bug.cgi?id=91425
2368
2369         Reviewed by Dave Hyatt.
2370
2371         Enhance a hack that was added to allow composited layers to
2372         display in columns to work for paginated mode, where the
2373         RenderView is renderer with columns.
2374
2375         Test: compositing/columns/composited-in-paginated.html
2376
2377         * rendering/RenderLayer.cpp:
2378         (WebCore::RenderLayer::updateLayerPosition):
2379
2380 2012-07-16  Emil A Eklund  <eae@chromium.org>
2381
2382         Inconsistent rounding in table layout causes background color to bleed through
2383         https://bugs.webkit.org/show_bug.cgi?id=91410
2384
2385         Reviewed by Eric Seidel.
2386
2387         At certain zoom levels a rounding error in the table layout code cases
2388         the table background color to bleed through between cells. Tables layout
2389         happens on pixel bounds however the paint offset wasn't correctly rounded.
2390
2391         Test: fast/sub-pixel/table-rows-no-gaps.html
2392
2393         * rendering/RenderTable.cpp:
2394         (WebCore::RenderTable::paintObject):
2395         Round paintOffset before passing it to the paint method of the children.
2396
2397 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2398
2399         Unreviewed, rolling out r122739.
2400         http://trac.webkit.org/changeset/122739
2401         https://bugs.webkit.org/show_bug.cgi?id=91424
2402
2403         Broke mac builds (Requested by rniwa on #webkit).
2404
2405         * inspector/CodeGeneratorInspector.py:
2406         (flatten_list):
2407
2408 2012-07-16  Dana Jansens  <danakj@chromium.org>
2409
2410         [chromium] Remove non-ephemeral data from RenderSurface as it duplicates data from the owning layer
2411         https://bugs.webkit.org/show_bug.cgi?id=91418
2412
2413         Reviewed by Adrienne Walker.
2414
2415         This removes the filters and masks from render surfaces, and makes them
2416         used directly from the owning layer. Also removes skipsDraw from
2417         surfaces as it was just not used at all.
2418
2419         Covered by existing tests.
2420
2421         * platform/graphics/chromium/LayerChromium.h:
2422         (WebCore::LayerChromium::filters):
2423         (WebCore::LayerChromium::backgroundFilters):
2424         (WebCore::LayerChromium::hasMask):
2425         (WebCore::LayerChromium::hasReplica):
2426         (WebCore::LayerChromium::replicaHasMask):
2427         (LayerChromium):
2428         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2429         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
2430         * platform/graphics/chromium/RenderSurfaceChromium.h:
2431         (RenderSurfaceChromium):
2432         * platform/graphics/chromium/cc/CCLayerImpl.h:
2433         (WebCore::CCLayerImpl::hasMask):
2434         (WebCore::CCLayerImpl::hasReplica):
2435         (WebCore::CCLayerImpl::replicaHasMask):
2436         (CCLayerImpl):
2437         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2438         (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
2439         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2440         (WebCore::calculateDrawTransformsInternal):
2441         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2442         (WebCore::::finishedRenderTarget):
2443         (WebCore::reduceOcclusionBelowSurface):
2444         (WebCore::::leaveToRenderTarget):
2445         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2446         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2447         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2448         (WebCore::CCRenderSurface::drawableContentRect):
2449         (WebCore::CCRenderSurface::appendQuads):
2450         * platform/graphics/chromium/cc/CCRenderSurface.h:
2451         (CCRenderSurface):
2452
2453 2012-07-16  Beth Dakin  <bdakin@apple.com>
2454
2455         https://bugs.webkit.org/show_bug.cgi?id=91299
2456         Paginated views should restrict available height to column height
2457         -and corresponding-
2458         <rdar://problem/11152108>
2459
2460         Reviewed by Dan Bernstein.
2461
2462         Now that RenderViews can have columns, availableLogicalHeight needs to consider 
2463         that column height, much like how availableLogicalWidth already considers column 
2464         width.
2465
2466         availableLogicalHeight is newly virtual, like the already-virtual 
2467         availableLogicalWidth.
2468         * rendering/RenderBox.h:
2469         (RenderBox):
2470
2471         Check with the columnHeight.
2472         * rendering/RenderView.cpp:
2473         (WebCore):
2474         (WebCore::RenderView::availableLogicalHeight):
2475         * rendering/RenderView.h:
2476
2477         setPagination now takes pageLength as an optional parameter. 
2478         * testing/InternalSettings.cpp:
2479         (WebCore::InternalSettings::setPagination):
2480         * testing/InternalSettings.h:
2481         (WebCore::InternalSettings::setPagination):
2482         (InternalSettings):
2483         * testing/InternalSettings.idl:
2484         * testing/Internals.cpp:
2485         (WebCore::Internals::setPagination):
2486         * testing/Internals.h:
2487         (WebCore::Internals::setPagination):
2488         (Internals):
2489         * testing/Internals.idl:
2490
2491 2012-07-16  Dana Jansens  <danakj@chromium.org>
2492
2493         [chromium] Remove targetRenderSurface concept, give layers a renderTarget which is the layer whose coordinate space they draw into
2494         https://bugs.webkit.org/show_bug.cgi?id=91288
2495
2496         Reviewed by Adrienne Walker.
2497
2498         Always use pointers to layers when discussing render targets instead of
2499         pointing directly to a RenderSurface.
2500
2501         Covered by existing tests.
2502
2503         * platform/graphics/chromium/LayerChromium.cpp:
2504         (WebCore::LayerChromium::LayerChromium):
2505         (WebCore::LayerChromium::createRenderSurface):
2506         * platform/graphics/chromium/LayerChromium.h:
2507         (WebCore::LayerChromium::renderTarget):
2508         (WebCore::LayerChromium::setRenderTarget):
2509         (LayerChromium):
2510         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2511         * platform/graphics/chromium/RenderSurfaceChromium.h:
2512         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2513         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
2514         * platform/graphics/chromium/TiledLayerChromium.cpp:
2515         (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
2516         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2517         (WebCore::CCLayerImpl::CCLayerImpl):
2518         (WebCore::CCLayerImpl::createRenderSurface):
2519         (WebCore::CCLayerImpl::dumpLayerProperties):
2520         * platform/graphics/chromium/cc/CCLayerImpl.h:
2521         (WebCore::CCLayerImpl::renderTarget):
2522         (WebCore::CCLayerImpl::setRenderTarget):
2523         (CCLayerImpl):
2524         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2525         (WebCore::calculateLayerScissorRect):
2526         (WebCore::calculateSurfaceScissorRect):
2527         (WebCore::calculateVisibleContentRect):
2528         (WebCore::computeScrollCompensationForThisLayer):
2529         (WebCore::calculateDrawTransformsInternal):
2530         (WebCore::pointIsClippedBySurfaceOrClipRect):
2531         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2532         (WebCore::::enterLayer):
2533         (WebCore::::leaveLayer):
2534         (WebCore::::enterRenderTarget):
2535         (WebCore::::finishedRenderTarget):
2536         (WebCore):
2537         (WebCore::reduceOcclusionBelowSurface):
2538         (WebCore::::leaveToRenderTarget):
2539         (WebCore::::markOccludedBehindLayer):
2540         (WebCore::::occluded):
2541         (WebCore::::unoccludedContentRect):
2542         (WebCore::::unoccludedContributingSurfaceContentRect):
2543         (WebCore::::layerScissorRectInTargetSurface):
2544         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
2545         (CCOcclusionTrackerBase):
2546         (WebCore::CCOcclusionTrackerBase::StackObject::StackObject):
2547         (StackObject):
2548         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2549         (WebCore::CCQuadCuller::appendSurface):
2550         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2551         * platform/graphics/chromium/cc/CCRenderSurface.h:
2552         (CCRenderSurface):
2553
2554 2012-07-16  Florin Malita  <fmalita@chromium.org>
2555
2556         SVGAnimationElement::currentValuesForValuesAnimation crash
2557         https://bugs.webkit.org/show_bug.cgi?id=91326
2558
2559         Reviewed by Simon Fraser.
2560
2561         SVGSMILElement::progress() assumes that seekToIntervalCorrespondingToTime() always
2562         lands inside a defined interval, but one can force arbitrary time offsets using
2563         setCurrentTime(). This patch adds logic for handling non-interval time offsets
2564         gracefully.
2565
2566         Test: svg/animations/smil-setcurrenttime-crash.svg
2567
2568         * svg/animation/SVGSMILElement.cpp:
2569         (WebCore::SVGSMILElement::progress):
2570
2571 2012-07-16  Joshua Netterfield  <jnetterfield@rim.com>
2572
2573         [BlackBerry] Upstream WebGL Code
2574         https://bugs.webkit.org/show_bug.cgi?id=91143
2575
2576         Reviewed by Rob Buis.
2577
2578         This patch includes BlackBerry-specific fixes for anti-aliasing, logging, and shader compilation.
2579
2580         No new tests, because there is no new functionality.
2581
2582         * platform/graphics/GraphicsContext3D.h: Add a value for TI Imagination chipsets on BlackBerry platforms
2583         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: Multiple downstream changes
2584         (WebCore::GraphicsContext3D::GraphicsContext3D):
2585         (WebCore::GraphicsContext3D::reshapeFBOs):
2586         (WebCore):
2587         (WebCore::GraphicsContext3D::logFrameBufferStatus):
2588         (WebCore::GraphicsContext3D::readPixelsIMG): BlackBerry-specific fix for Imagination hardware.
2589         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer):
2590         (WebCore::GraphicsContext3D::platformTexture):
2591         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2592         (WebCore::GraphicsContext3D::paintToCanvas):
2593         * platform/graphics/opengl/Extensions3DOpenGL.h: Remove unnecessary whitespace.
2594         (Extensions3DOpenGL):
2595         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2596         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Hack to fix ANGLE-generated code on BlackBerry platforms.
2597         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2598         (Extensions3DOpenGLCommon):
2599         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: I am not in a position to change system headers from correct to incorrect.
2600         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
2601         (WebCore::Extensions3DOpenGLES::supportsExtension):
2602         * platform/graphics/opengl/Extensions3DOpenGLES.h: I am not in a position to change system headers from correct to incorrect.
2603         (Extensions3DOpenGLES):
2604         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Add a BlackBerry-specific anti-aliasing fix.
2605         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2606         (WebCore::GraphicsContext3D::prepareTexture):
2607         (WebCore::GraphicsContext3D::bindFramebuffer):
2608         (WebCore::GraphicsContext3D::compileShader):
2609         (WebCore::GraphicsContext3D::copyTexImage2D):
2610         (WebCore::GraphicsContext3D::copyTexSubImage2D):
2611         (WebCore):
2612         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2613         (WebCore):
2614
2615 2012-07-16  Tony Chang  <tony@chromium.org>
2616
2617         Position grid items by row/column index
2618         https://bugs.webkit.org/show_bug.cgi?id=91293
2619
2620         Reviewed by Ojan Vafai.
2621
2622         Do some initial grid positioning. Only handle the simple case where tracks are
2623         fixed values and don't properly size the grid items. This gives us something to
2624         work with and starts implementing the "Grid Track Sizing Algorithm":
2625         http://dev.w3.org/csswg/css3-grid-layout/#grid-track-sizing-algorithm0
2626
2627         Test: fast/css-grid-layout/place-cell-by-index.html
2628
2629         * rendering/RenderGrid.cpp:
2630         (RenderGrid::GridTrack): Data structure for holding the track size. UsedBreadth matches the terminology
2631         used in the spec.
2632         (WebCore::RenderGrid::layoutBlock): Pull in some boiler plate code and put the
2633         grid specific code in layoutGridItems.
2634         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Implement part of the grid track sizing algorithm.
2635         (WebCore::RenderGrid::layoutGridItems): Compute the size of grid tracks, layout and position children.
2636         (WebCore::RenderGrid::findChildLogicalPosition): Map track sizes to the actual position of the child.
2637         * rendering/RenderGrid.h:
2638         * rendering/style/RenderStyle.h: Just return a copy of Length rather than a reference to Length. This seems
2639         more consistent with other getters that return a Length.
2640
2641 2012-07-16  Sami Kyostila  <skyostil@chromium.org>
2642
2643         [chromium] Only apply page scale delta to root scroll layer
2644         https://bugs.webkit.org/show_bug.cgi?id=91374
2645
2646         Reviewed by Adrienne Walker.
2647
2648         When the user pinch-zooms the web page though the Chromium compositor, the
2649         per-layer page scale delta is used to keep track of the difference between the
2650         page scale on the compositor thread versus the main thread. On the next
2651         commit to the main thread these values are reset to 1.
2652
2653         When calculating layer positions, the compositor applies a layer's page scale
2654         delta both to the layer itself as well as all of its children. Since we are
2655         currently updating the page scale delta on all scrollable layers, this results
2656         in scrollable child layers getting scaled multiple times.
2657
2658         This patch changes the compositor to only apply the page scale delta on the
2659         root scroll layer.
2660
2661         New unit test: CCLayerTreeHostImplTest.pageScaleDeltaAppliedToRootScrollLayerOnly
2662
2663         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2664         (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
2665         (WebCore::CCLayerTreeHostImpl::setPageScaleDelta):
2666
2667 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
2668
2669         Remove setController from BatteryClient
2670         https://bugs.webkit.org/show_bug.cgi?id=90944
2671
2672         Reviewed by Adam Barth.
2673
2674         BatteryClient doesn't need to keep m_controller,
2675         because BatteryController can be accessed using BatteryController::from().
2676         Remove BatteryClient::setController function.
2677
2678         No new tests. Covered by existing tests.
2679
2680         * Modules/battery/BatteryClient.h:
2681         * Modules/battery/BatteryController.cpp:
2682         (WebCore::BatteryController::BatteryController):
2683
2684 2012-07-16  Mike West  <mkwst@chromium.org>
2685
2686         Invalid `script-nonce` directives should block script execution.
2687         https://bugs.webkit.org/show_bug.cgi?id=91353
2688
2689         Reviewed by Adam Barth.
2690
2691         If the `script-nonce` Content Security Policy directive contains an
2692         invalid value, we should fail loudly, throwing a warning to the console
2693         and denying execution of script on the page. The is in line with the
2694         current state of the experimental CSP 1.1 Editors Draft[1].
2695
2696         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-nonce--experimental
2697
2698         Test: http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html
2699
2700         * page/ContentSecurityPolicy.cpp:
2701         (WebCore::CSPDirectiveList::checkNonceAndReportViolation):
2702             Check against null rather than empty for early exit, otherwise
2703             only compare nonces if the stored nonce isn't empty.
2704         (WebCore::CSPDirectiveList::parseScriptNonce):
2705             Assign the empty string if nonce is invalid.
2706
2707 2012-07-16  Min Qin  <qinmin@chromium.org>
2708
2709         [Android] remove RenderThemeChromiumAndroid::paintMediaFullscreenButton()
2710         https://bugs.webkit.org/show_bug.cgi?id=91291
2711
2712         Reviewed by Adam Barth.
2713
2714         The recent media control refactoring added paintMediaFullscreenButton() in RenderThemeChromiumSkia.
2715         Since RenderThemeChromiumAndroid inherits from that class, we don't need to redefine this function.
2716         No test needed as this change just removes an unnecessary override.
2717
2718         * rendering/RenderThemeChromiumAndroid.cpp:
2719         * rendering/RenderThemeChromiumAndroid.h:
2720
2721 2012-07-16  Peter Rybin  <peter.rybin@gmail.com>
2722
2723         Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build
2724         https://bugs.webkit.org/show_bug.cgi?id=90642
2725
2726         Reviewed by Yury Semikhatsky.
2727
2728         A small intermediate writer is added. It handles comparing old and new source before actual writing.
2729
2730         * inspector/CodeGeneratorInspector.py:
2731         (flatten_list):
2732         (SmartOutput):
2733         (SmartOutput.__init__):
2734         (SmartOutput.write):
2735         (SmartOutput.close):
2736
2737 2012-07-16  Dana Jansens  <danakj@chromium.org>
2738
2739         [chromium] Incorrect assertion: Replicas will cause a RenderPass to be removed twice
2740         https://bugs.webkit.org/show_bug.cgi?id=91328
2741
2742         Reviewed by Adrienne Walker.
2743
2744         We asserted that we would never attempt to remove a render pass that had
2745         already been removed. This was incorrect as a surface with a replica has
2746         two quads and both may cause us to attempt its removal. We must handle
2747         this case gracefully.
2748
2749         Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
2750
2751         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2752         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
2753
2754 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
2755
2756         Web Inspector: native memory: fix instrumentation for string members
2757         https://bugs.webkit.org/show_bug.cgi?id=91384
2758
2759         Reviewed by Pavel Feldman.
2760
2761         It was possible to report a string member via addMember instead of addString.
2762         This patch is fixing the problem and adding a link time guard.
2763
2764         Covered by existing inspector performance tests infrastructure.
2765
2766         * dom/ElementAttributeData.h:
2767         (WebCore::ElementAttributeData::reportMemoryUsage):
2768         * dom/MemoryInstrumentation.h:
2769         (WebCore):
2770         (WebCore::MemoryClassInfo::addString):
2771         * dom/QualifiedName.h:
2772         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2773
2774 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
2775
2776         Unreviewed. Remove unnecessary executable bits after r122720.
2777
2778         * platform/graphics/ImageSource.h:
2779         * platform/graphics/qt/ImageBufferQt.cpp:
2780         * platform/graphics/qt/ImageDecoderQt.cpp:
2781         * platform/graphics/qt/ImageQt.cpp:
2782         * platform/graphics/qt/StillImageQt.h:
2783         * platform/graphics/qt/TransparencyLayer.h:
2784
2785 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
2786
2787         [Qt] Change NativeImagePtr from QPixmap* to QImage*
2788         https://bugs.webkit.org/show_bug.cgi?id=88785
2789
2790         Reviewed by Simon Hausmann.
2791
2792         Since we use raster engine there is no difference between QPixmap and QImage, so we are going
2793         to use QImage everywhere where it is possible. This refactoring contains the change of the
2794         NativeImagePtr typedef from QPixmap* to QImage* and covers the related modifications.
2795
2796         Part of the change is similar to Viatcheslav Ostapenko's internal work.
2797
2798         Covered by existing tests.
2799
2800         * bridge/qt/qt_pixmapruntime.cpp:
2801         (JSC::Bindings::QtPixmapAssignToElementMethod::invoke):
2802         (JSC::Bindings::QtPixmapInstance::variantFromObject):
2803         * platform/DragImage.h:
2804         (WebCore):
2805         * platform/graphics/GraphicsContext.h:
2806         (GraphicsContext):
2807         * platform/graphics/Image.h:
2808         (Image):
2809         * platform/graphics/ImageSource.h:
2810         (WebCore):
2811         * platform/graphics/gstreamer/ImageGStreamer.h:
2812         * platform/graphics/gstreamer/ImageGStreamerQt.cpp:
2813         (ImageGStreamer::ImageGStreamer):
2814         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2815         (WebCore::GraphicsContext3D::getImageData):
2816         * platform/graphics/qt/GraphicsContextQt.cpp:
2817         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
2818         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
2819         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
2820         * platform/graphics/qt/ImageBufferDataQt.h:
2821         (ImageBufferData):
2822         * platform/graphics/qt/ImageBufferQt.cpp:
2823         (WebCore::ImageBufferData::ImageBufferData):
2824         (WebCore::ImageBuffer::copyImage):
2825         (WebCore::ImageBuffer::clip):
2826         (WebCore::ImageBuffer::platformTransformColorSpace):
2827         (WebCore::getImageData):
2828         (WebCore::ImageBuffer::putByteArray):
2829         (WebCore::encodeImage):
2830         (WebCore::ImageBuffer::toDataURL):
2831         * platform/graphics/qt/ImageDecoderQt.cpp:
2832         (WebCore::ImageFrame::asNewNativeImage):
2833         * platform/graphics/qt/ImageQt.cpp:
2834         (graphics):
2835         (loadResourceImage):
2836         (WebCore::Image::loadPlatformResource):
2837         (WebCore::Image::setPlatformResource):
2838         (WebCore::Image::drawPattern):
2839         (WebCore::BitmapImage::BitmapImage):
2840         (WebCore::BitmapImage::draw):
2841         (WebCore::BitmapImage::checkForSolidColor):
2842         (WebCore::BitmapImage::create):
2843         * platform/graphics/qt/NativeImageQt.h: Added.
2844         (WebCore):
2845         (NativeImageQt):
2846         (WebCore::NativeImageQt::defaultFormatForAlphaEnabledImages):
2847         (WebCore::NativeImageQt::defaultFormatForOpaqueImages):
2848          * platform/graphics/qt/PatternQt.cpp:
2849         (WebCore::Pattern::createPlatformPattern):
2850         * platform/graphics/qt/StillImageQt.cpp:
2851         (WebCore::StillImage::StillImage):
2852         (WebCore::StillImage::~StillImage):
2853         (WebCore::StillImage::currentFrameHasAlpha):
2854         (WebCore::StillImage::size):
2855         (WebCore::StillImage::nativeImageForCurrentFrame):
2856         (WebCore::StillImage::draw):
2857         * platform/graphics/qt/StillImageQt.h:
2858         (WebCore::StillImage::create):
2859         (WebCore::StillImage::createForRendering):
2860         (StillImage):
2861         * platform/graphics/qt/TransparencyLayer.h:
2862         (WebCore::TransparencyLayer::TransparencyLayer):
2863         (TransparencyLayer):
2864         * platform/graphics/texmap/TextureMapperGL.cpp:
2865         * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
2866         (WebCore::GraphicsSurface::createReadOnlyImage):
2867          * platform/qt/ClipboardQt.cpp:
2868         (WebCore::ClipboardQt::createDragImage):
2869         (WebCore::ClipboardQt::declareAndWriteDragImage):
2870         * platform/qt/CursorQt.cpp:
2871         (WebCore::createCustomCursor):
2872         * platform/qt/DragImageQt.cpp:
2873         (WebCore::createDragImageFromImage):
2874         * platform/qt/PasteboardQt.cpp:
2875         (WebCore::Pasteboard::writeImage):
2876
2877 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
2878
2879         Web Inspector: moving forward to the better memory instrumentation API
2880         https://bugs.webkit.org/show_bug.cgi?id=91259
2881
2882         Reviewed by Pavel Feldman.
2883
2884         I'm trying to remove unnecessary complexity of the API
2885         reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember
2886         The same will happen with reportPointer, reportObject pair.
2887         Also info.report* will be replaced with info.add*
2888
2889         * bindings/js/ScriptWrappable.h:
2890         (WebCore::ScriptWrappable::reportMemoryUsage):
2891         * bindings/v8/DOMDataStore.cpp:
2892         (WebCore::DOMDataStore::reportMemoryUsage):
2893         * bindings/v8/IntrusiveDOMWrapperMap.h:
2894         (WebCore::ChunkedTable::reportMemoryUsage):
2895         * bindings/v8/ScriptProfiler.cpp:
2896         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2897         * bindings/v8/ScriptWrappable.h:
2898         (WebCore::ScriptWrappable::reportMemoryUsage):
2899         * bindings/v8/V8Binding.cpp:
2900         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2901         (WebCore::StringCache::reportMemoryUsage):
2902         * bindings/v8/V8DOMMap.h:
2903         * css/StylePropertySet.h:
2904         (WebCore::StylePropertySet::reportMemoryUsage):
2905         * dom/CharacterData.cpp:
2906         (WebCore::CharacterData::reportMemoryUsage):
2907         * dom/ContainerNode.h:
2908         (WebCore::ContainerNode::reportMemoryUsage):
2909         * dom/Document.cpp:
2910         (WebCore::Document::reportMemoryUsage):
2911         * dom/Element.h:
2912         (WebCore::Element::reportMemoryUsage):
2913         * dom/ElementAttributeData.h:
2914         (WebCore::ElementAttributeData::reportMemoryUsage):
2915         * dom/MemoryInstrumentation.h:
2916         (WebCore::MemoryInstrumentation::addInstrumentedMember):
2917         (MemoryInstrumentation):
2918         (WebCore::MemoryInstrumentation::addMember):
2919         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember):
2920         (WebCore::MemoryInstrumentation::OwningTraits::addMember):
2921         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
2922         (WebCore::MemoryInstrumentation::addMemberImpl):
2923         (WebCore::MemoryClassInfo::addInstrumentedMember):
2924         (WebCore::MemoryClassInfo::addMember):
2925         (WebCore::MemoryClassInfo::addHashMap):
2926         (WebCore::MemoryClassInfo::addHashSet):
2927         (WebCore::MemoryClassInfo::addListHashSet):
2928         (WebCore::MemoryClassInfo::addVector):
2929         (WebCore::MemoryClassInfo::addString):
2930         (WebCore::MemoryInstrumentation::addHashMap):
2931         (WebCore::MemoryInstrumentation::addHashSet):
2932         (WebCore::MemoryInstrumentation::addListHashSet):
2933         (WebCore::MemoryInstrumentation::addVector):
2934         * dom/Node.cpp:
2935         (WebCore::Node::reportMemoryUsage):
2936         * dom/QualifiedName.h:
2937         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2938         (WebCore::QualifiedName::reportMemoryUsage):
2939         * inspector/InspectorMemoryAgent.cpp:
2940         (WebCore):
2941         * platform/TreeShared.h:
2942         (WebCore::TreeShared::reportMemoryUsage):
2943
2944 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2945
2946         Unreviewed, rolling out r122714.
2947         http://trac.webkit.org/changeset/122714
2948         https://bugs.webkit.org/show_bug.cgi?id=91380
2949
2950         It broke mac compilation (Requested by loislo on #webkit).
2951
2952         * bindings/js/ScriptWrappable.h:
2953         (WebCore::ScriptWrappable::reportMemoryUsage):
2954         * bindings/v8/DOMDataStore.cpp:
2955         (WebCore::DOMDataStore::reportMemoryUsage):
2956         * bindings/v8/IntrusiveDOMWrapperMap.h:
2957         (WebCore::ChunkedTable::reportMemoryUsage):
2958         * bindings/v8/ScriptProfiler.cpp:
2959         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2960         * bindings/v8/ScriptWrappable.h:
2961         (WebCore::ScriptWrappable::reportMemoryUsage):
2962         * bindings/v8/V8Binding.cpp:
2963         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2964         (WebCore::StringCache::reportMemoryUsage):
2965         * bindings/v8/V8DOMMap.h:
2966         * css/StylePropertySet.h:
2967         (WebCore::StylePropertySet::reportMemoryUsage):
2968         * dom/CharacterData.cpp:
2969         (WebCore::CharacterData::reportMemoryUsage):
2970         * dom/ContainerNode.h:
2971         (WebCore::ContainerNode::reportMemoryUsage):
2972         * dom/Document.cpp:
2973         (WebCore::Document::reportMemoryUsage):
2974         * dom/Element.h:
2975         (WebCore::Element::reportMemoryUsage):
2976         * dom/ElementAttributeData.h:
2977         (WebCore::ElementAttributeData::reportMemoryUsage):
2978         * dom/MemoryInstrumentation.h:
2979         (WebCore::MemoryInstrumentation::reportObject):
2980         (MemoryInstrumentation):
2981         (WebCore::MemoryInstrumentation::reportPointer):
2982         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
2983         (WebCore::MemoryClassInfo::reportInstrumentedObject):
2984         (WebCore::MemoryClassInfo::reportPointer):
2985         (WebCore::MemoryClassInfo::reportObject):
2986         (WebCore::MemoryClassInfo::reportHashMap):
2987         (WebCore::MemoryClassInfo::reportHashSet):
2988         (WebCore::MemoryClassInfo::reportListHashSet):
2989         (WebCore::MemoryClassInfo::reportVector):
2990         (MemoryClassInfo):
2991         (WebCore::MemoryClassInfo::reportString):
2992         (WebCore):
2993         (WebCore::MemoryInstrumentation::reportInstrumentedPointer):
2994         (WebCore::MemoryInstrumentation::reportInstrumentedObject):
2995         (WebCore::MemoryInstrumentation::reportHashMap):
2996         (WebCore::MemoryInstrumentation::reportHashSet):
2997         (WebCore::MemoryInstrumentation::reportListHashSet):
2998         (WebCore::MemoryInstrumentation::reportVector):
2999         * dom/Node.cpp:
3000         (WebCore::Node::reportMemoryUsage):
3001         * dom/QualifiedName.h:
3002         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
3003         (WebCore::QualifiedName::reportMemoryUsage):
3004         * inspector/InspectorMemoryAgent.cpp:
3005         (WebCore):
3006         * platform/TreeShared.h:
3007         (WebCore::TreeShared::reportMemoryUsage):
3008
3009 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
3010
3011         Web Inspector: moving forward to the better memory instrumentation API
3012         https://bugs.webkit.org/show_bug.cgi?id=91259
3013
3014         Reviewed by Pavel Feldman.
3015
3016         I'm trying to remove unnecessary complexity of the API
3017         reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember
3018         The same will happen with reportPointer, reportObject pair.
3019         Also info.report* will be replaced with info.add*
3020
3021         * bindings/js/ScriptWrappable.h:
3022         (WebCore::ScriptWrappable::reportMemoryUsage):
3023         * bindings/v8/DOMDataStore.cpp:
3024         (WebCore::DOMDataStore::reportMemoryUsage):
3025         * bindings/v8/IntrusiveDOMWrapperMap.h:
3026         (WebCore::ChunkedTable::reportMemoryUsage):
3027         * bindings/v8/ScriptProfiler.cpp:
3028         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
3029         * bindings/v8/ScriptWrappable.h:
3030         (WebCore::ScriptWrappable::reportMemoryUsage):
3031         * bindings/v8/V8Binding.cpp:
3032         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
3033         (WebCore::StringCache::reportMemoryUsage):
3034         * bindings/v8/V8DOMMap.h:
3035         * css/StylePropertySet.h:
3036         (WebCore::StylePropertySet::reportMemoryUsage):
3037         * dom/CharacterData.cpp:
3038         (WebCore::CharacterData::reportMemoryUsage):
3039         * dom/ContainerNode.h:
3040         (WebCore::ContainerNode::reportMemoryUsage):
3041         * dom/Document.cpp:
3042         (WebCore::Document::reportMemoryUsage):
3043         * dom/Element.h:
3044         (WebCore::Element::reportMemoryUsage):
3045         * dom/ElementAttributeData.h:
3046         (WebCore::ElementAttributeData::reportMemoryUsage):
3047         * dom/MemoryInstrumentation.h:
3048         (WebCore::MemoryInstrumentation::addInstrumentedMember):
3049         (MemoryInstrumentation):
3050         (WebCore::MemoryInstrumentation::addMember):
3051         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember):
3052         (WebCore::MemoryInstrumentation::OwningTraits::addMember):
3053         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
3054         (WebCore::MemoryInstrumentation::addMemberImpl):
3055         (WebCore::MemoryClassInfo::addInstrumentedMember):
3056         (WebCore::MemoryClassInfo::addMember):
3057         (WebCore::MemoryClassInfo::addHashMap):
3058         (WebCore::MemoryClassInfo::addHashSet):
3059         (WebCore::MemoryClassInfo::addListHashSet):
3060         (WebCore::MemoryClassInfo::addVector):
3061         (WebCore::MemoryClassInfo::addString):
3062         (WebCore::MemoryInstrumentation::addHashMap):
3063         (WebCore::MemoryInstrumentation::addHashSet):
3064         (WebCore::MemoryInstrumentation::addListHashSet):
3065         (WebCore::MemoryInstrumentation::addVector):
3066         * dom/Node.cpp:
3067         (WebCore::Node::reportMemoryUsage):
3068         * dom/QualifiedName.h:
3069         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
3070         (WebCore::QualifiedName::reportMemoryUsage):
3071         * inspector/InspectorMemoryAgent.cpp:
3072         (WebCore):
3073         * platform/TreeShared.h:
3074         (WebCore::TreeShared::reportMemoryUsage):
3075
3076 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
3077
3078         Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
3079         https://bugs.webkit.org/show_bug.cgi?id=91227
3080
3081         Reviewed by Pavel Feldman.
3082
3083         void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
3084         {
3085             MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
3086             info.visitBaseClass<ScriptWrappable>(this);
3087
3088             info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
3089             info.addInstrumentedMember(m_next);
3090             info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
3091             info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
3092             info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)
3093         }
3094
3095         The change is covered by existing tests for native memory snapshot.
3096
3097         * bindings/v8/DOMDataStore.cpp:
3098         (WebCore::DOMDataStore::reportMemoryUsage):
3099         * bindings/v8/IntrusiveDOMWrapperMap.h:
3100         (WebCore::ChunkedTable::reportMemoryUsage):
3101         * bindings/v8/ScriptWrappable.h:
3102         (WebCore::ScriptWrappable::reportMemoryUsage):
3103         * bindings/v8/V8Binding.cpp:
3104         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
3105         (WebCore::StringCache::reportMemoryUsage):
3106         * bindings/v8/V8DOMMap.h:
3107         * css/StylePropertySet.h:
3108         (WebCore::StylePropertySet::reportMemoryUsage):
3109         * dom/CharacterData.cpp:
3110         (WebCore::CharacterData::reportMemoryUsage):
3111         * dom/ContainerNode.h:
3112         (WebCore::ContainerNode::reportMemoryUsage):
3113         * dom/Document.cpp:
3114         (WebCore::Document::reportMemoryUsage):
3115         * dom/Element.h:
3116         (WebCore::Element::reportMemoryUsage):
3117         * dom/ElementAttributeData.h:
3118         (WebCore::ElementAttributeData::reportMemoryUsage):
3119         * dom/MemoryInstrumentation.h:
3120         (MemoryInstrumentation):
3121         (WebCore::MemoryObjectInfo::objectType):
3122         (WebCore::MemoryObjectInfo::objectSize):
3123         (WebCore::MemoryObjectInfo::memoryInstrumentation):
3124         (MemoryObjectInfo):
3125         (WebCore::MemoryObjectInfo::reportObjectInfo):
3126         (WebCore):
3127         (MemoryClassInfo):
3128         (WebCore::MemoryClassInfo::MemoryClassInfo):
3129         (WebCore::MemoryClassInfo::visitBaseClass):
3130         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
3131         (WebCore::MemoryClassInfo::reportInstrumentedObject):
3132         (WebCore::MemoryClassInfo::reportPointer):
3133         (WebCore::MemoryClassInfo::reportObject):
3134         (WebCore::MemoryClassInfo::reportHashMap):
3135         (WebCore::MemoryClassInfo::reportHashSet):
3136         (WebCore::MemoryClassInfo::reportListHashSet):
3137         (WebCore::MemoryClassInfo::reportVector):
3138         (WebCore::MemoryClassInfo::reportString):
3139         * dom/Node.cpp:
3140         (WebCore::Node::reportMemoryUsage):
3141         * dom/QualifiedName.h:
3142         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
3143         (WebCore::QualifiedName::reportMemoryUsage):
3144         * platform/TreeShared.h:
3145         (WebCore::TreeShared::reportMemoryUsage):
3146
3147 2012-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3148
3149         Unreviewed. Fix make distcheck.
3150
3151         * GNUmakefile.am: Add missing idl directory.
3152         * GNUmakefile.list.am: Add missing files to compilation.
3153
3154 2012-07-16  Eugene Klyuchnikov  <eustas.big@gmail.com>
3155
3156         Web Inspector: Implement message loop instrumentation for timeline
3157         https://bugs.webkit.org/show_bug.cgi?id=88325
3158
3159         Reviewed by Pavel Feldman.
3160
3161         Message loop instrumentation will show when the render thread is busy.
3162
3163         * inspector/front-end/Settings.js:
3164         (WebInspector.ExperimentsSettings):
3165         Added new experiment.
3166         * inspector/front-end/TimelineGrid.js:
3167         (WebInspector.TimelineGrid.prototype.get dividersLabelBarElement):
3168         Exposed label bar element.
3169         * inspector/front-end/TimelinePanel.js:
3170         (WebInspector.TimelinePanel):
3171         (WebInspector.TimelinePanel.prototype._resetPanel):
3172         Cleanups recorded tasks.
3173         (WebInspector.TimelinePanel.prototype._refresh):
3174         Updates CPU bar.
3175         (WebInspector.TimelinePanel.prototype._refreshRecords):
3176         Ditto.
3177         (WebInspector.TimelinePanel.prototype._refreshCpuBars.compareEndTime):
3178         Ditto.
3179         (WebInspector.TimelinePanel.prototype._refreshCpuBars):
3180         Ditto.
3181         (WebInspector.TimelinePanel.prototype._enableMainThreadMonitoringExperiment):
3182         Adds CPU bar to UI.
3183         (WebInspector.TimelinePanel.prototype._showPopover):
3184         Fix NPE.
3185         (WebInspector.TimelineCalculator.prototype.computeTime):
3186         Utility for position to time conversion.
3187         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
3188         Remenbers clientWidth.
3189         * inspector/front-end/TimelinePresentationModel.js:
3190         (WebInspector.TimelinePresentationModel.categories):
3191         Define CPU bar colors.
3192         * inspector/front-end/timelinePanel.css:
3193         (.timeline-cpu-bars):
3194         CPU bar styles.
3195         (.timeline-cpu-bars-label):
3196         Ditto.
3197
3198 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
3199
3200         Unreviewed, rolling out r122681.
3201         http://trac.webkit.org/changeset/122681
3202         https://bugs.webkit.org/show_bug.cgi?id=91363
3203
3204         Patch introduces crashes in debug builds for GTK and EFL ports
3205         (Requested by zdobersek on #webkit).
3206
3207         * platform/ScrollableArea.cpp:
3208         (WebCore::ScrollableArea::scrollPositionChanged):
3209
3210 2012-07-16  Luke Macpherson  <macpherson@chromium.org>
3211
3212         Compilation failure in StyleResolver.cpp (clang)
3213         https://bugs.webkit.org/show_bug.cgi?id=89892
3214
3215         Reviewed by Ryosuke Niwa.
3216
3217         Patch adds assertions that unreachable code is in fact not reached.
3218
3219         Covered by fast/css/variables tests.
3220
3221         * css/CSSParser.cpp:
3222         (WebCore::CSSParser::parseValue):
3223         * css/StyleResolver.cpp:
3224         (WebCore::StyleResolver::collectMatchingRulesForList):
3225
3226 2012-07-15  Mike Lawther  <mikelawther@chromium.org>
3227
3228         Fix calculation of rgba's alpha in CSS custom text
3229         https://bugs.webkit.org/show_bug.cgi?id=91355
3230
3231         Reviewed by Ryosuke Niwa.
3232
3233         Alpha values are stored as an 8 bit value. To convert this to a float in the
3234         range [0,1], we need to divide by 255, not 256. 
3235
3236         Test: fast/css/rgba-custom-text.html
3237
3238         * css/CSSPrimitiveValue.cpp:
3239         (WebCore::CSSPrimitiveValue::customCssText):
3240
3241 2012-07-15  Jason Liu  <jason.liu@torchmobile.com.cn>
3242
3243         [BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived.
3244         https://bugs.webkit.org/show_bug.cgi?id=90962
3245
3246         Reviewed by Rob Buis.
3247
3248         We start a new NetworkJob with credentials after receiving 401/407 status.
3249         We should not release resources in webcore when the old job is closed because
3250         they are needed by the new one.
3251         We should do as 3XX.
3252
3253         No new tests. No change in behaviour.
3254
3255         * platform/network/blackberry/NetworkJob.cpp:
3256         (WebCore::NetworkJob::NetworkJob):
3257         (WebCore::NetworkJob::notifyAuthReceived):
3258         (WebCore::NetworkJob::shouldReleaseClientResource):
3259         (WebCore::NetworkJob::handleRedirect):
3260         * platform/network/blackberry/NetworkJob.h:
3261         (NetworkJob):
3262
3263 2012-07-15  Ryosuke Niwa  <rniwa@webkit.org>
3264
3265         REGRESSION(r122660): Cannot iterate over HTMLCollection that contains non-child descendent nodes in some conditions
3266         https://bugs.webkit.org/show_bug.cgi?id=91334
3267
3268         Reviewed by Ojan Vafai.
3269
3270         The bug was caused by using lastChild() as the starting node for traversePreviousNode. Since it's the inverse of
3271         Node::traverseNextNode(), which visits nodes in pre order, we must start our search from the last descendent node,
3272         which is visited traverseNextNode immediately before reaching the root node.
3273
3274         Test: fast/dom/htmlcollection-backwards-subtree-iteration.html
3275
3276         * html/HTMLCollection.cpp:
3277         (WebCore::lastDescendent):
3278         (WebCore):
3279         (WebCore::itemBeforeOrAfter):
3280
3281 2012-07-15  Joseph Pecoraro  <pecoraro@apple.com>
3282
3283         Windowless WebView not firing JavaScript load event if there is a media element
3284         https://bugs.webkit.org/show_bug.cgi?id=91331
3285
3286         Reviewed by Eric Carlson.
3287
3288         In prepareForLoad we start deferring the load event. If we fall into this
3289         clause where the page can not start loading media we bail, potentially
3290         indefinitely waiting until we can start loading media. Since we can not
3291         be certain this will ever happen, we should stop deferring the page's
3292         load event.
3293
3294         Test: WebKit1.WindowlessWebViewWithMedia TestWebKitAPI test. The only
3295         way this path was reachable right now is on the mac port.
3296
3297         * html/HTMLMediaElement.cpp:
3298         (WebCore::HTMLMediaElement::loadInternal):
3299
3300 2012-07-15  Dan Bernstein  <mitz@apple.com>
3301
3302         <rdar://problem/11875795> REGRESSION (tiled drawing): Page’s scroll bars flash with each character you type in a textarea (affects Wikipedia and YouTube)
3303         https://bugs.webkit.org/show_bug.cgi?id=91348
3304
3305         Reviewed by Anders Carlsson.
3306
3307         * platform/ScrollableArea.cpp:
3308         (WebCore::ScrollableArea::scrollPositionChanged): Added an early return if the scroll position
3309         did not, in fact, change. This avoids the call to ScrollAnimator::notifyContentAreaScrolled,
3310         which is what causes the scroll bars to flash.
3311
3312 2012-07-14  Eric Carlson  <eric.carlson@apple.com>
3313
3314         Enable AVCF hardware video decoding
3315         https://bugs.webkit.org/show_bug.cgi?id=90015
3316         <rdar://problem/10770317>
3317
3318         Reviewed by Anders Carlsson.
3319
3320         * html/HTMLMediaElement.cpp:
3321         (WebCore):
3322         (WebCore::HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter): New, return the client's graphics 
3323             device adapter.
3324         * html/HTMLMediaElement.h:
3325
3326         * page/ChromeClient.h:
3327         (WebCore::ChromeClient::graphicsDeviceAdapter): New.
3328
3329         * platform/graphics/MediaPlayer.cpp:
3330         (WebCore::MediaPlayer::graphicsDeviceAdapter): New, ask the media element for the graphics
3331             device adapter.
3332         * platform/graphics/MediaPlayer.h:
3333
3334         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Soft-link AVCFPlayerSetDirect3DDevice
3335             and AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey.
3336
3337         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 
3338         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Pass the current d3d9
3339             device interface to the AVFWrapper.
3340         (WebCore::AVFWrapper::createAssetForURL): If the d3d9 device implements IDirect3DDevice9Ex,
3341             tell the AVAsset to enable hardware video decoding.
3342         (WebCore::AVFWrapper::createPlayer): Pass the d3d9 device to the player if it implements IDirect3DDevice9Ex.
3343
3344         * platform/graphics/ca/win/CACFLayerTreeHost.h:
3345         (WebCore::CACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
3346
3347         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
3348         (WebCore::LegacyCACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
3349         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
3350         (WebCore::WKCACFViewLayerTreeHost::graphicsDeviceAdapter): New.
3351         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
3352
3353         * platform/win/SoftLinking.h: Define SOFT_LINK_DLL_IMPORT_OPTIONAL, SOFT_LINK_LOADED_LIBRARY,
3354             and SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL.
3355
3356 2012-07-14  Ryosuke Niwa  <rniwa@webkit.org>
3357
3358         Fix Chromium Mac build failure after r122670.
3359
3360         * platform/graphics/mac/ComplexTextController.cpp:
3361
3362 2012-07-14  Mark Rowe  <mrowe@apple.com>
3363
3364         Fix the Snow Leopard build.
3365
3366         * platform/LocalizedStrings.cpp:
3367         (WebCore::contextMenuItemTagLookUpInDictionary): Fix a typo in the condition so that Snow Leopard
3368         continues to take the expected path.
3369
3370 2012-07-14  Ryosuke Niwa  <rniwa@webkit.org>
3371
3372         Accessing the last item in children should be a constant time operation
3373         https://bugs.webkit.org/show_bug.cgi?id=91320
3374
3375         Reviewed by Ojan Vafai.
3376
3377         Traverse nodes from the last item when the target offset we're looking for is closer to the last item
3378         than to the cached item. e.g. if the cached item was at offset 0 in the collection and length was 100,
3379         we should not be looking for the item at offset 95 from the cached item.
3380
3381         Note that this trick can be only used in HTML collection that supports itemBefore and when the length
3382         cache is available.
3383
3384         Also broke shouldSearchFromFirstItem into smaller logical pieces to clarify the intents.
3385
3386         Test: perf/htmlcollection-last-item.html
3387
3388         * html/HTMLCollection.cpp:
3389         (WebCore):
3390         (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
3391         (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
3392         (WebCore::HTMLCollection::item):
3393         * html/HTMLCollection.h:
3394         (HTMLCollection):
3395
3396 2012-07-14  Mark Rowe  <mrowe@apple.com>
3397
3398         Fix the Windows build.
3399
3400         * platform/network/cf/DNSCFNet.cpp: Fix the condition to take Windows in to account.
3401
3402 2012-07-14  Mark Rowe  <mrowe@apple.com>
3403
3404         Make it explicit which code paths iOS should use when doing checks based on OS X versions.
3405
3406         Rubber-stamped by David Kilzer.
3407
3408         * WebCore.exp.in:
3409         * accessibility/AccessibilityList.h:
3410         * accessibility/AccessibilityTable.h:
3411         * accessibility/mac/AXObjectCacheMac.mm:
3412         * editing/mac/EditorMac.mm:
3413         * loader/MainResourceLoader.cpp:
3414         * loader/MainResourceLoader.h:
3415         * page/AlternativeTextClient.h:
3416         * page/mac/SettingsMac.mm:
3417         * platform/LocalizedStrings.cpp:
3418         * platform/MemoryPressureHandler.cpp:
3419         * platform/audio/mac/AudioBusMac.mm:
3420         * platform/graphics/Gradient.h:
3421         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3422         * platform/graphics/ca/GraphicsLayerCA.cpp:
3423         * platform/graphics/ca/PlatformCALayer.h:
3424         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3425         * platform/graphics/ca/mac/TileCache.mm:
3426         * platform/graphics/cg/GraphicsContextCG.cpp:
3427         * platform/graphics/cg/ImageBufferCG.cpp:
3428         * platform/graphics/cg/ImageBufferDataCG.h:
3429         * platform/graphics/cg/ImageCG.cpp:
3430         * platform/graphics/cg/ImageSourceCG.cpp:
3431         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3432         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3433         * platform/graphics/mac/ComplexTextController.cpp:
3434         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3435         * platform/graphics/mac/FontCacheMac.mm:
3436         * platform/graphics/mac/FontCustomPlatformData.cpp:
3437         * platform/graphics/mac/FontMac.mm: