aae04629f2d2114a32a07127a80b7bf49aa3f81f
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-05  Simon Hausmann  <simon.hausmann@digia.com>
2
3         Unreviewed, rolling out r130495.
4         http://trac.webkit.org/changeset/130495
5         https://bugs.webkit.org/show_bug.cgi?id=98268
6
7         Made WK2 tests crash.
8
9         * Target.pri:
10         * platform/qt/QStyleFacade.cpp: Removed.
11         * platform/qt/QStyleFacade.h: Removed.
12
13 2012-10-05  Simon Hausmann  <simon.hausmann@digia.com>
14
15         [Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
16         https://bugs.webkit.org/show_bug.cgi?id=98268
17
18         Reviewed by Tor Arne Vestbø.
19
20         Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
21
22         QStyleFacade is a pure interface that lives in WebCore/platform/qt
23         (next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
24         minimal interface of what we need to draw with QStyle as well as basic
25         hit testing and metric retrieval. It also provides a
26         QStyleFacadeOption class that aggregates common meta-data for
27         rendering primitives, such as direction, rectangle, state (sunken,
28         enabled, etc.) or palette. It also provides some more slider/scrollbar
29         specific fields in a slider sub-structure.
30
31         RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
32         them with state information from render objects, before calling straight to QStyle. Most of the common code
33         was encapsulated in StylePainterQStyle.
34
35         The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
36         StylePainterQStyle to populate state into QStyleFacadeOption before
37         calling into QStyleFacade.
38
39         The style facade is then implemented by QStyleFacadeImp, which extracts
40         meta-data from QStyleFacadeOption arguments, populates style
41         primitive specific QStyleOption objects and then calls on QStyle.
42
43         RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
44         from QStyleFacade. QStyleFacadeImp on the other hand will live in the
45         separate QtWebKitWidgets library in the future and therefore cannot use
46         any WebCore types.
47
48         * Target.pri:
49         * platform/qt/QStyleFacade.cpp: Added.
50         (WebCore):
51         (WebCore::QStyleFacade::styleForPage):
52         * platform/qt/QStyleFacade.h: Added.
53         (WebCore):
54         (QStyleFacade):
55         (WebCore::QStyleFacade::~QStyleFacade):
56         (WebCore::QStyleFacadeOption::QStyleFacadeOption):
57         (QStyleFacadeOption):
58         * platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
59         (WebCore):
60         (WebCore::RenderThemeQStyle::getStylePainter):
61         (WebCore::StylePainterQStyle::StylePainterQStyle):
62         (WebCore::StylePainterQStyle::init):
63         (WebCore::RenderThemeQStyle::create):
64         (WebCore::RenderThemeQStyle::setStyleFactoryFunction):
65         (WebCore::RenderThemeQStyle::styleFactory):
66         (WebCore::RenderThemeQStyle::RenderThemeQStyle):
67         (WebCore::RenderThemeQStyle::~RenderThemeQStyle):
68         (WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
69         (WebCore::RenderThemeQStyle::inflateButtonRect):
70         (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
71         (WebCore::RenderThemeQStyle::adjustButtonStyle):
72         (WebCore::RenderThemeQStyle::setButtonPadding):
73         (WebCore::RenderThemeQStyle::paintButton):
74         (WebCore::RenderThemeQStyle::paintTextField):
75         (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
76         (WebCore::RenderThemeQStyle::paintTextArea):
77         (WebCore::RenderThemeQStyle::setPopupPadding):
78         (WebCore::RenderThemeQStyle::colorPalette):
79         (WebCore::RenderThemeQStyle::paintMenuList):
80         (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
81         (WebCore::RenderThemeQStyle::paintMenuListButton):
82         (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
83         (WebCore::RenderThemeQStyle::paintProgressBar):
84         (WebCore::RenderThemeQStyle::paintSliderTrack):
85         (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
86         (WebCore::RenderThemeQStyle::paintSliderThumb):
87         (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
88         (WebCore::RenderThemeQStyle::paintSearchField):
89         (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
90         (WebCore::RenderThemeQStyle::paintSearchFieldDecoration):
91         (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
92         (WebCore::RenderThemeQStyle::paintSearchFieldResultsDecoration):
93         (WebCore::RenderThemeQStyle::paintInnerSpinButton):
94         (WebCore::RenderThemeQStyle::initializeCommonQStyleOptions):
95         (WebCore::RenderThemeQStyle::adjustSliderThumbSize):
96         * platform/qt/RenderThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h.
97         (WebCore):
98         (RenderThemeQStyle):
99         (WebCore::RenderThemeQStyle::qStyle):
100         (StylePainterQStyle):
101         (WebCore::StylePainterQStyle::isValid):
102         (WebCore::StylePainterQStyle::paintButton):
103         (WebCore::StylePainterQStyle::paintTextField):
104         (WebCore::StylePainterQStyle::paintComboBox):
105         (WebCore::StylePainterQStyle::paintComboBoxArrow):
106         (WebCore::StylePainterQStyle::paintSliderTrack):
107         (WebCore::StylePainterQStyle::paintSliderThumb):
108         (WebCore::StylePainterQStyle::paintInnerSpinButton):
109         (WebCore::StylePainterQStyle::paintProgressBar):
110         (WebCore::StylePainterQStyle::paintScrollCorner):
111         (WebCore::StylePainterQStyle::paintScrollBar):
112         * platform/qt/ScrollbarThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp.
113         (WebCore):
114         (WebCore::ScrollbarThemeQStyle::ScrollbarThemeQStyle):
115         (WebCore::ScrollbarThemeQStyle::~ScrollbarThemeQStyle):
116         (WebCore::scPart):
117         (WebCore::scrollbarPart):
118         (WebCore::initSliderStyleOption):
119         (WebCore::ScrollbarThemeQStyle::paint):
120         (WebCore::ScrollbarThemeQStyle::hitTest):
121         (WebCore::ScrollbarThemeQStyle::shouldCenterOnThumb):
122         (WebCore::ScrollbarThemeQStyle::invalidatePart):
123         (WebCore::ScrollbarThemeQStyle::scrollbarThickness):
124         (WebCore::ScrollbarThemeQStyle::thumbPosition):
125         (WebCore::ScrollbarThemeQStyle::thumbLength):
126         (WebCore::ScrollbarThemeQStyle::trackPosition):
127         (WebCore::ScrollbarThemeQStyle::trackLength):
128         (WebCore::ScrollbarThemeQStyle::paintScrollCorner):
129         * platform/qt/ScrollbarThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h.
130         (WebCore):
131         (ScrollbarThemeQStyle):
132         (WebCore::ScrollbarThemeQStyle::qStyle):
133
134 2012-10-05  Andrei Bucur  <abucur@adobe.com>
135
136         Incomplete repaint of boxes with inset box-shadow and padding when resized
137         https://bugs.webkit.org/show_bug.cgi?id=59863
138
139         Reviewed by Simon Fraser.
140
141         The patch extends the repaint rectangle to include the inset shadow extent for renderers that resize and need to be repainted. The rectangle computations are also better fragmented and easier to read.
142
143         New Test: fast/repaint/box-shadow-inset-repaint.html
144
145         * rendering/RenderObject.cpp:
146         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
147         * rendering/style/RenderStyle.cpp:
148         (WebCore::RenderStyle::getShadowInsetExtent):
149         (WebCore):
150         * rendering/style/RenderStyle.h:
151
152 2012-10-04  Kent Tamura  <tkent@chromium.org>
153
154         Fix sub-field width to the maximum width of a placeholder and the maximum value
155         https://bugs.webkit.org/show_bug.cgi?id=98481
156
157         Reviewed by Hajime Morita.
158
159         We can't assume a placeholder text is shorter than the width of
160         digits. The placeholder string for the year field of
161         input[type=week] is "----", but input[type=date] will have a
162         localized string for it.
163
164         We should set the 'width' CSS property to the maximum of the
165         placeholder width and the maximum value width in order to prevent
166         the field width from growing/narrowing.
167
168         Before this patch, we secured four digits space for a year field,
169         and allowed the field to grow its width when a larger year is
170         set. After this patch, we don't allow it to grow because the
171         'width' property is set to the maximum width.
172
173         Update week-multiple-fields-appearance-basic.html, and the
174         following tests are affected.
175         - fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes.html
176         - fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html
177         - fast/forms/week-multiple-fields/week-multiple-fields-appearance-style.html
178
179         * html/shadow/DateTimeNumericFieldElement.cpp:
180         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
181         Enable customStyleForRenderer.
182         (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
183         Added. The code is similar to DateTimeSymbolicFieldElement::customStyleForRenderer().
184         (WebCore::DateTimeNumericFieldElement::formatValue):
185         Made a function with the code in value(). This is used in
186         customStyleForRenderer() and value().
187         (WebCore::DateTimeNumericFieldElement::value): Use formatValue().
188         * html/shadow/DateTimeNumericFieldElement.h:
189         (DateTimeNumericFieldElement): Declare new functions.
190
191 2012-10-05  Kent Tamura  <tkent@chromium.org>
192
193         Improve spelling and performance of Localizer.cpp
194         https://bugs.webkit.org/show_bug.cgi?id=98485
195
196         Reviewed by Kentaro Hara.
197
198         Some improvements pointed in webkit.org/b/98229#c5.
199
200         No new tests because of no behavior change.
201
202         * platform/text/Localizer.h:
203         (Localizer):
204          - Rename dateTimeFormatWithSecond to dateTimeFormatWithSeconds
205          - Rename dateTimeFormatWithoutSecond to dateTimeFormatWithoutSeconds
206          - Add data members: m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
207         * platform/text/Localizer.cpp:
208         (WebCore::Localizer::timeFormat): Check isNull instead of isEmpty
209         (WebCore::Localizer::shortTimeFormat): Ditto.
210         (WebCore::Localizer::dateTimeFormatWithSeconds):
211         - Renamed.
212         - Cache the concatenation result to a data member.
213         (WebCore::Localizer::dateTimeFormatWithoutSeconds): Ditto.
214
215         * html/DateTimeInputType.cpp:
216         (WebCore::DateTimeInputType::setupLayoutParameters): Follow the renaming.
217         * html/DateTimeLocalInputType.cpp:
218         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
219
220 2012-10-04  Kenichi Ishibashi  <bashi@chromium.org>
221
222         [WebSocket] ExtensionParser should have its own file
223         https://bugs.webkit.org/show_bug.cgi?id=98475
224
225         Reviewed by Yuta Kitamura.
226
227         Factor out ExtensionParser from WebSocketExtensionDispatcher and rename it as WebSocketExtensionParser.
228         WebSocketExtensionParser has its own file.
229
230         No changes in behavior. Added a test case for parsing Sec-WebSocket-Extensions field as a chromium unit test.
231
232         * CMakeLists.txt: Added WebSocketExtensionParser.
233         * GNUmakefile.list.am: Ditto.
234         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
235         (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
236         Use WebSocketExtensionParser::parseExtension() to parser extension header value.
237         * Modules/websockets/WebSocketExtensionParser.cpp: Added.
238         (WebCore):
239         (WebCore::WebSocketExtensionParser::finished): Moved from ExtensionParser.
240         (WebCore::WebSocketExtensionParser::parsedSuccessfully): Ditto.
241         (WebCore::isSeparator): Ditto.
242         (WebCore::WebSocketExtensionParser::skipSpaces): Ditto.
243         (WebCore::WebSocketExtensionParser::consumeToken): Ditto.
244         (WebCore::WebSocketExtensionParser::consumeQuotedString): Ditto.
245         (WebCore::WebSocketExtensionParser::consumeQuotedStringOrToken): Ditto.
246         (WebCore::WebSocketExtensionParser::consumeCharacter): Ditto.
247         (WebCore::WebSocketExtensionParser::parseExtension): Moved from WebSocketExtensionDispatcher.
248         * Modules/websockets/WebSocketExtensionParser.h: Added.
249         (WebCore):
250         (WebSocketExtensionParser):
251         (WebCore::WebSocketExtensionParser::WebSocketExtensionParser):
252         (WebCore::WebSocketExtensionParser::currentToken):
253         * Target.pri: Added WebSocketExtensionParser.
254         * WebCore.gypi: Ditto.
255         * WebCore.vcproj/WebCore.vcproj: Ditto.
256         * WebCore.xcodeproj/project.pbxproj: Ditto.
257
258 2012-10-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
259
260         <input> size attribute should throw INDEX_SIZE_ERR when set to 0
261         https://bugs.webkit.org/show_bug.cgi?id=61675
262
263         Reviewed by Kent Tamura.
264
265         According to the spec, the size IDL attribute of input elements is limited
266         to only non-negative numbers greater than zero. It should throw INDEX_SIZE_ERR
267         exception when set to 0. New behavior matches both Firefox and IE.
268         Spec: http://www.w3.org/TR/html5/common-input-element-attributes.html#the-size-attribute
269
270         Test: fast/dom/HTMLInputElement/input-size-attribute.html
271
272         * html/HTMLInputElement.cpp:
273         (WebCore::HTMLInputElement::setSize):
274         * html/HTMLInputElement.h:
275         (HTMLInputElement):
276         * html/HTMLInputElement.idl:
277
278 2012-10-04  Kent Tamura  <tkent@chromium.org>
279
280         Fix font for date/time input types.
281         https://bugs.webkit.org/show_bug.cgi?id=98478
282
283         Reviewed by Kentaro Hara.
284
285         input[type=date] should use monospace font if
286         ENABLE_INPUT_MULTIPLE_FIELDS_UI && ENABLE_INPUT_TYPE_DATE.
287
288         For other date/time types, they should use monospace font only
289         if their types are enabled. input[type="foo"] matches input
290         element with type="foo" even if the foo type is not supported.
291
292         The input[type=date] change is covered by
293         fast/forms/date/calendar-picker-appearance.html,
294         platform/chromium/fast/forms/date/date-suggestion-picker-appearance*.html
295
296         * css/html.css:
297         (input[type="date"]):
298         (input[type="datetime"]):
299         (input[type="datetime-local"]):
300         (input[type="month"]):
301         (input[type="time"]):
302
303 2012-10-04  Hajime Morrita  <morrita@google.com>
304
305         [Refactoring] Some classes in StyleResolver.cpp/h could have its own file.
306         https://bugs.webkit.org/show_bug.cgi?id=98469
307
308         Reviewed by Dimitri Glazkov.
309
310         This change extracts RuleData, RuleSet, RuleFeature and Featurs class
311         to its own file: RuleSet.h/cpp and RuleFeature.h/cpp
312
313         RuleFeature class is moved fro StyleResolver inner class to plain WebCore class.
314         Feaures class is renamed to RuleFeatureSet to avoid possible name conflict.
315
316         No new tests. Just splitting file and doing simple rename.
317
318         * CMakeLists.txt:
319         * GNUmakefile.list.am:
320         * Target.pri:
321         * WebCore.gypi:
322         * WebCore.xcodeproj/project.pbxproj:
323         * css/CSSAllInOne.cpp:
324         * css/RuleFeature.cpp: Added.
325         (WebCore):
326         (WebCore::RuleFeatureSet::add):
327         (WebCore::RuleFeatureSet::clear):
328         (WebCore::RuleFeatureSet::reportMemoryUsage):
329         * css/RuleFeature.h: Added.
330         (WebCore):
331         (RuleFeature):
332         (WebCore::RuleFeature::RuleFeature):
333         (RuleFeatureSet):
334         (WebCore::RuleFeatureSet::RuleFeatureSet):
335         * css/RuleSet.cpp: Added.
336         (WebCore):
337         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
338         (WebCore::selectorListContainsUncommonAttributeSelector):
339         (WebCore::isCommonAttributeSelectorAttribute):
340         (WebCore::containsUncommonAttributeSelector):
341         (WebCore::RuleData::RuleData):
342         (WebCore::RuleData::reportMemoryUsage):
343         (WebCore::reportAtomRuleMap):
344         (WebCore::RuleSet::reportMemoryUsage):
345         (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
346         (WebCore::collectFeaturesFromSelector):
347         (WebCore::collectFeaturesFromRuleData):
348         (WebCore::RuleSet::addToRuleSet):
349         (WebCore::RuleSet::addRule):
350         (WebCore::RuleSet::addPageRule):
351         (WebCore::RuleSet::addRegionRule):
352         (WebCore::RuleSet::addRulesFromSheet):
353         (WebCore::RuleSet::addStyleRule):
354         (WebCore::shrinkMapVectorsToFit):
355         (WebCore::RuleSet::shrinkToFit):
356         * css/RuleSet.h: Added.
357         (WebCore):
358         (RuleData):
359         (WebCore::RuleData::position):
360         (WebCore::RuleData::rule):
361         (WebCore::RuleData::selector):
362         (WebCore::RuleData::selectorIndex):
363         (WebCore::RuleData::hasFastCheckableSelector):
364         (WebCore::RuleData::hasMultipartSelector):
365         (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash):
366         (WebCore::RuleData::containsUncommonAttributeSelector):
367         (WebCore::RuleData::specificity):
368         (WebCore::RuleData::linkMatchType):
369         (WebCore::RuleData::hasDocumentSecurityOrigin):
370         (WebCore::RuleData::isInRegionRule):
371         (WebCore::RuleData::descendantSelectorIdentifierHashes):
372         (SameSizeAsRuleData):
373         (RuleSet):
374         (WebCore::RuleSet::create):
375         (WebCore::RuleSet::disableAutoShrinkToFit):
376         (WebCore::RuleSet::features):
377         (WebCore::RuleSet::idRules):
378         (WebCore::RuleSet::classRules):
379         (WebCore::RuleSet::tagRules):
380         (WebCore::RuleSet::shadowPseudoElementRules):
381         (WebCore::RuleSet::linkPseudoClassRules):
382         (WebCore::RuleSet::focusPseudoClassRules):
383         (WebCore::RuleSet::universalRules):
384         (WebCore::RuleSet::pageRules):
385         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
386         (RuleSetSelectorPair):
387         (WebCore::RuleSet::RuleSet):
388         * css/StyleResolver.cpp:
389         (WebCore):
390         (WebCore::makeRuleSet):
391         (WebCore::StyleResolver::collectMatchingRulesForList):
392         * css/StyleResolver.h:
393         (StyleResolver):
394
395 2012-10-04  Adam Barth  <abarth@webkit.org>
396
397         FeatureObserver should distinguish between legacy HTML and text notifications
398         https://bugs.webkit.org/show_bug.cgi?id=98441
399
400         Reviewed by Tony Chang.
401
402         We might be able to drop support for legacy HTML notifications before
403         we can drop support for legacy text notifications. We should measure
404         and find out.
405
406         * Modules/notifications/NotificationCenter.idl:
407         * page/FeatureObserver.h:
408
409 2012-10-04  Pravin D  <pravind.2k4@gmail.com>
410
411         Removing the unused member variable m_wasMalformed from HTMLFormElement class and its related code frgment.
412         https://bugs.webkit.org/show_bug.cgi?id=98444
413
414         Reviewed by Eric Seidel.
415
416         The member variable m_wasMalformed of HTMLFormElement class was used to determine if the <form> tag was malformed or not.
417         This information was used elsewhere to decide if bottom margins have to be included for such a <form>.
418         However currently this member variable is not being set by any code following code refactoring in HTML parser class.
419
420         Code cleanup patch. No new tests required.
421
422         * html/HTMLFormElement.cpp:
423         (WebCore::HTMLFormElement::HTMLFormElement):
424           Removed m_wasMalformed initialization.
425
426         * html/HTMLFormElement.h:
427         (HTMLFormElement):
428          Removed m_wasMalformed variable.
429          Removed m_wasMalformed variable's setter and getter functions.
430
431         * rendering/RenderBlock.cpp:
432         (WebCore::RenderBlock::layoutBlock):
433          Removed code fragment using/dependent on m_wasMalformed.
434
435 2012-10-04  Rik Cabanier  <cabanier@adobe.com>
436
437         Turn Compositing on by default in WebKit build
438         https://bugs.webkit.org/show_bug.cgi?id=98315
439
440         Reviewed by Simon Fraser.
441
442         enable -webkit-blend-mode on trunk.
443
444         No new tests. Existing blending test were updated.
445
446         * Configurations/FeatureDefines.xcconfig:
447         * css/CSSPropertyNames.in:
448         * css/CSSValueKeywords.in:
449
450 2012-10-04  Hayato Ito  <hayato@chromium.org>
451
452         [Refactoring] Introduce a traversal strategy in SelectorChecker
453         https://bugs.webkit.org/show_bug.cgi?id=97298
454
455         Reviewed by Antti Koivisto.
456
457         We extract DOM traversal code from SelectorChecker so that we can use another traversal strategy.
458         Another traversal strategy will be introduced in Bug 96990.
459
460         Since this code path is very hot, we were very careful not to regress performance.
461         We will use template specialization to change the traversal implementation.
462
463         We confirmed that this patch does not regress SelectorCheckerPerformance. I have checked the performance of
464         the added test in my Linux Box using run-perf-tests.
465
466         The performance of the added test before using this patch was:
467
468           RESULT CSS: PseudoClassSelectors= 3399.68308031 runs/s
469           median= 3404.48685564 runs/s, stdev= 37.3480114449 runs/s, min= 3272.64871114 runs/s, max= 3438.72385184 runs/s
470
471         When we used this patch, the performance was:
472
473           RESULT CSS: PseudoClassSelectors= 3367.74473886 runs/s
474           median= 3367.12072755 runs/s, stdev= 14.1464547639 runs/s, min= 3348.55881171 runs/s, max= 3395.98212857 runs/s
475
476         Test: PerformanceTests/CSS/PseudoClass-Selectors.html
477
478         * css/SelectorChecker.cpp:
479         (WebCore):
480         (WebCore::SelectorChecker::checkSelector): Make this a template method to accept another Context type.
481         Another Context type will be introduced in coming patch.
482         (WebCore::SelectorChecker::checkOneSelector):
483         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstChild):
484         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastChild):
485         (WebCore::SelectorChecker::DOMTraversalStrategy::isFirstOfType):
486         (WebCore::SelectorChecker::DOMTraversalStrategy::isLastOfType):
487         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsBefore):
488         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeBefore):
489         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsAfter):
490         (WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeAfter):
491         * css/SelectorChecker.h:
492         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
493         (SelectorCheckingContext):
494         (SelectorChecker):
495         (DOMTraversalStrategy): Extracted the DOM traversal code from SelectorChecker. Another traversal code
496         will be introduced the coming patch.
497
498 2012-10-04  Eric Seidel  <eric@webkit.org>
499
500         SVGAttributeHashTranslator does not need to copy QualifiedName in the common case
501         https://bugs.webkit.org/show_bug.cgi?id=98473
502
503         Reviewed by Adam Barth.
504
505         I tested this using instruments on a test case which modified SVG attributes in a loop.
506         I believe pdr has some perf-tests in this area, but they weren't needed here.  A simple sample showed this as a huge win,
507         since we're no longer creating a QualifiedName (and thus adding it to the hash) on each QualifiedName-based lookup in SVG.
508
509         * svg/SVGElement.h:
510         (WebCore::SVGAttributeHashTranslator::hash):
511         (WebCore::SVGAttributeHashTranslator::equal):
512
513 2012-10-04  Julien Chaffraix  <jchaffraix@webkit.org>
514
515         Split the intrinsic padding update code out of RenderTableSection::layoutRows
516         https://bugs.webkit.org/show_bug.cgi?id=98454
517
518         Reviewed by Eric Seidel.
519
520         RenderTableSection::layoutRows is very long and it's difficult to see what's
521         going on. This change moves the intrinsic padding update code into RenderTableCell
522         for clarity. While at it, cleaned up a bit the code (renaming variables, functions).
523
524         Change covered by existing table tests.
525
526         * rendering/RenderTableCell.cpp:
527         (WebCore::RenderTableCell::computeIntrinsicPadding):
528         Added this new function that does the update. Removed the 'default' case, replaced by
529         the explicit label BASELINE_MIDDLE.
530
531         * rendering/RenderTableCell.h:
532         (WebCore::RenderTableCell::setIntrinsicPaddingBefore):
533         (WebCore::RenderTableCell::setIntrinsicPaddingAfter):
534         (WebCore::RenderTableCell::setIntrinsicPadding):
535         Moved those setters to the private section as we want other classes
536         to use computeIntrinsicPadding.
537
538         * rendering/RenderTableSection.cpp:
539         (WebCore::RenderTableSection::layoutRows):
540         Replaced the code with a call to RenderTableCell::computeIntrinsicPadding.
541         Also moved 2 variables in the loop per our coding style.
542
543         * rendering/RenderTableSection.h:
544         (WebCore::RenderTableSection::rowBaseline):
545         Renamed to match our coding style.
546
547 2012-10-04  Nate Chapin  <japhet@chromium.org>
548
549         Crash in EventHandler::mouseMoved().
550         https://bugs.webkit.org/show_bug.cgi?id=98460
551
552         Reviewed by Abhishek Arya.
553
554         No new tests, this fixes fast/events/mouse-moved-remove-frame-crash.html.
555
556         * page/EventHandler.cpp:
557         (WebCore::EventHandler::mouseMoved):
558
559 2012-10-04  Adam Barth  <abarth@webkit.org>
560
561         [V8] NotificationCenter leaks because it uses buggy custom bindings
562         https://bugs.webkit.org/show_bug.cgi?id=98445
563
564         Reviewed by Tony Chang.
565
566         There's no reason to use custom bindings here. All they do is cause leaks..
567
568         * Modules/notifications/NotificationCenter.idl:
569         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
570
571 2012-10-04  Tab Atkins  <jackalmage@gmail.com>
572
573         Selector specificity categories "overflow" into higher categories
574         https://bugs.webkit.org/show_bug.cgi?id=98295
575
576         Reviewed by Eric Seidel.
577
578         This patch adds per-component overflow guards for CSS selector specificity.
579         Previously, we didn't guard against overflow. 
580         Since we stored each component as a byte mapped into a single unsigned int for the whole specificity,
581         256 of a particular simple selector was equivalent to 1 of the next-higher-group selector.
582         This violated the Selectors specification,
583         which requires the components to be compared lexicographically.
584
585         Tests: /fast/selectors/specificity-overflow.html
586
587         * css/CSSSelector.cpp:
588         (WebCore::CSSSelector::specificity):
589
590 2012-10-04  Enrica Casucci  <enrica@apple.com>
591
592         Font::glyphDataAndPageForCharacter doesn't account for text orientation when using systemFallback on a cold cache.
593         https://bugs.webkit.org/show_bug.cgi?id=98452.
594
595         Reviewed by Dan Bernstein.
596
597         The text orientation was considered only when there is a cache hit.
598         This change moves the logic to handle text orientation to a separate
599         inline function that is called also when the glyph is added to the cache.
600
601         Test: fast/text/vertical-rl-rtl-linebreak.html
602
603         * platform/graphics/FontFastPath.cpp:
604         (WebCore::applyTextOrientationForCharacter): Added.
605         (WebCore::Font::glyphDataAndPageForCharacter): Modified to use the new function in
606         both cases of cold and warm cache.
607
608 2012-10-04  Adam Klein  <adamk@chromium.org>
609
610         MutationRecord attributeName should be null for non attribute changes
611         https://bugs.webkit.org/show_bug.cgi?id=98438
612
613         Reviewed by Ojan Vafai.
614
615         Test: fast/mutation/mutation-record-nullity.html
616
617         * dom/MutationRecord.idl:
618
619 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
620
621         Final part of "sync" to "flush" renaming
622         https://bugs.webkit.org/show_bug.cgi?id=98430
623
624         Reviewed by Tim Horton.
625
626         Change method names on GraphicsLayer and GraphicsLayerClient that
627         refer to "sync" to use the term "flush" instead, to be consistent
628         with the rest of the code.
629
630         * platform/graphics/GraphicsLayer.h:
631         (WebCore::GraphicsLayer::flushCompositingState):
632         (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
633         * platform/graphics/GraphicsLayerClient.h:
634         (GraphicsLayerClient):
635         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
636         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
637         * platform/graphics/blackberry/LayerWebKitThread.cpp:
638         (WebCore::LayerWebKitThread::setNeedsCommit):
639         * platform/graphics/ca/GraphicsLayerCA.cpp:
640         (WebCore::GraphicsLayerCA::flushCompositingState):
641         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
642         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
643         (WebCore::GraphicsLayerCA::positionForCloneRootLayer):
644         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
645         * platform/graphics/ca/GraphicsLayerCA.h:
646         (GraphicsLayerCA):
647         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
648         (WebCore::GraphicsLayerTextureMapper::notifyChange):
649         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
650         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
651         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
652         (GraphicsLayerTextureMapper):
653         * platform/graphics/texmap/TextureMapperLayer.cpp:
654         (WebCore::TextureMapperLayer::flushCompositingState):
655         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
656         * platform/graphics/texmap/TextureMapperLayer.h:
657         (TextureMapperLayer):
658         * rendering/RenderLayerBacking.cpp:
659         (WebCore::RenderLayerBacking::notifyFlushRequired):
660         * rendering/RenderLayerBacking.h:
661         (RenderLayerBacking):
662         * rendering/RenderLayerCompositor.cpp:
663         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
664         * rendering/RenderLayerCompositor.h:
665         (WebCore::RenderLayerCompositor::notifyFlushRequired):
666
667 2012-10-04  Tab Atkins  <tabatkins@google.com>
668
669         1ex should equal .5em when the font has no x-height metric
670         https://bugs.webkit.org/show_bug.cgi?id=80360
671
672         Reviewed by Eric Seidel.
673
674         Updated FontMetrics and CSSPrimitiveValue to have/use an explicit "hasXHeight" flag to determine how to size an 'ex' unit.
675
676         Updated a few of the platform font files to set the flag properly.
677
678         Patch cleanup by David Barr <davidbarr@chromium.org>.
679
680         Test: fast/css/ex-unit-with-no-x-height.html
681
682         * css/CSSPrimitiveValue.cpp:
683         (WebCore::CSSPrimitiveValue::computeLengthDouble):
684         * platform/graphics/FontMetrics.h:
685         (WebCore::FontMetrics::FontMetrics):
686         (WebCore::FontMetrics::setXHeight):
687         (FontMetrics):
688         (WebCore::FontMetrics::hasXHeight):
689         (WebCore::FontMetrics::setHasXHeight):
690         (WebCore::FontMetrics::reset):
691         * platform/graphics/skia/SimpleFontDataSkia.cpp:
692         (WebCore::SimpleFontData::platformInit):
693
694 2012-10-04  Ryosuke Niwa  <rniwa@webkit.org>
695
696         Build fix after r130411. Add the right offset.
697         Also use RefPtr instead of a raw pointer for next and previous pointers.
698
699         * editing/ReplaceSelectionCommand.cpp:
700         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
701
702 2012-10-04  Alec Flett  <alecflett@chromium.org>
703
704         IndexedDB: promote objectstore/index backend ids to the frontend
705         https://bugs.webkit.org/show_bug.cgi?id=97834
706
707         Reviewed by Tony Chang.
708
709         Expose int64-based database/objectStore/index ids to the renderer,
710         step 1 of 2. Support both styles of createObjectStore and
711         createIndex: those that take an explicit id, and those that take
712         -1, meaning to autogenerate an id on the backend. In part 2, after
713         the chromium side lands, support for the autogenerated ids will be
714         removed. (See https://bugs.webkit.org/show_bug.cgi?id=98085)
715
716         This is a part of larger refactoring work to ultimately make the interface
717         between the frontend and the backend simpler.
718
719         No new tests, extensive ASSERTs and existing tests cover correctness.
720
721         * Modules/indexeddb/IDBBackingStore.h:
722         (IDBBackingStore):
723         * Modules/indexeddb/IDBDatabase.cpp:
724         (WebCore::IDBDatabase::createObjectStore):
725         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
726         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
727         (WebCore::IDBDatabaseBackendImpl::openInternal):
728         (WebCore::IDBDatabaseBackendImpl::metadata):
729         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
730         (WebCore):
731         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
732         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
733         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
734         (IDBDatabaseBackendImpl):
735         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
736         (IDBDatabaseBackendInterface):
737         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
738         (WebCore::IDBIndexBackendImpl::metadata):
739         * Modules/indexeddb/IDBIndexBackendImpl.h:
740         (WebCore::IDBIndexBackendImpl::create):
741         (IDBIndexBackendImpl):
742         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
743         (WebCore):
744         (WebCore::getMaxObjectStoreId):
745         (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
746         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
747         (WebCore::IDBLevelDBBackingStore::getObjectStores):
748         (WebCore::setMaxObjectStoreId):
749         (WebCore::IDBLevelDBBackingStore::createObjectStore):
750         (WebCore::getMaxIndexId):
751         (WebCore::setMaxIndexId):
752         (WebCore::IDBLevelDBBackingStore::createIndex):
753         * Modules/indexeddb/IDBLevelDBBackingStore.h:
754         (IDBLevelDBBackingStore):
755         * Modules/indexeddb/IDBMetadata.h:
756         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
757         (IDBDatabaseMetadata):
758         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
759         (IDBObjectStoreMetadata):
760         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
761         (IDBIndexMetadata):
762         * Modules/indexeddb/IDBObjectStore.cpp:
763         (WebCore::IDBObjectStore::createIndex):
764         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
765         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
766         (WebCore::IDBObjectStoreBackendImpl::metadata):
767         (WebCore::IDBObjectStoreBackendImpl::createIndex):
768         (WebCore):
769         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
770         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
771         (WebCore::IDBObjectStoreBackendImpl::create):
772         (IDBObjectStoreBackendImpl):
773         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
774 2012-10-04  Pravin D  <pravind.2k4@gmail.com>
775
776         Layout broken after cloning and re-inserting a table with a misplaced <form>
777         https://bugs.webkit.org/show_bug.cgi?id=86746
778
779         Reviewed by Julien Chaffraix.
780
781         There is a concept of demotion for a <form> contained in a table. A <form> is demoted if its immediate parent
782         is either a <table>, table sections (tbody, etc) or a table row (tr). A renderer for such a <form> is created only
783         if its display is one of the table display types (TABLE, INLINE_TABLE, TABLE_FOOTER_GROUP, etc).
784         However when a <table> containing a demoted <form> is cloned, the <form> does not retain its demotion state and 
785         results in the table getting improperly rendered.
786
787         Test: fast/table/form-with-non-table-display-inside-table-elements.html
788
789         * html/HTMLFormElement.cpp:
790         (WebCore::HTMLFormElement::copyNonAttributePropertiesFromElement):
791           Extended the virtual function for HTMLFormElement class specific implementation.
792           The function is used to copy any necessary state information(member variables) associated with
793           the <form> element being cloned to the current node.
794           For HTMLFormElement node the member variable can be classified into five groups based on the 
795           information they hold:
796             1) Variables containing information regarding <form> subtree and elements associated with it.
797                These get updated as and when an element is added to the <form> subtree.
798             2) Variables containing <form> submit state information.
799             3) Flag to hold information if reset() has been called.
800             4) Flag(m_wasDemoted) that indicates whether the form is demoted or not, based on which it needs to
801                be handled differently during creation of its renderer.
802                This information is currently being updated only during the HTML tree construction phase.
803             5) Flag(m_wasMalformed) to hold information if the <form> is malformed or not.
804
805           Variables of group (1) will be updated as and when elements are added to the <form> subtree. Whereas,
806           (2) and (3) hold instance specific information, thus copying them is not required. Also (5) is currently not
807           being used(not set by any code).
808
809           On the other hand, (4) is required to be copied during cloning as this information cannot be accessed
810           during the cloning process.
811
812         (WebCore):
813         * html/HTMLFormElement.h:
814           Added copyNonAttributePropertiesFromElement() declaration.
815
816 2012-10-04  Dean Jackson  <dino@apple.com>
817
818         Attribute and Uniform variable names need translation in shader
819         https://bugs.webkit.org/show_bug.cgi?id=70989
820
821         Reviewed by Tim Horton (and Darin Adler).
822
823         WebGL specifies some maximum lengths for variable names (attributes
824         and uniforms). Also, some GL drivers have issues with long names. For
825         that reason, ANGLE has an option to rewrite the shader, translating
826         long names into short names. Turning this on helps shaders compile,
827         but we need to keep a mapping between the original names and the
828         translated names, so that we bind to the right location from user code
829         (which won't ever see the translated source).
830
831         This provided an opportunity to clean up some other bits of code:
832         CSS Filters examined the uniform names after a compilation; It can
833         now use the variable name map. I also added a typedef for the
834         HashMaps that keep the shader, the source code and the variable name
835         mappings.
836
837         I also opened a followup bug to make sure these tables are deleted
838         when the associated shaders (or linked programs) go away:
839         https://bugs.webkit.org/show_bug.cgi?id=98204
840
841         Covered by existing tests (with some enhancements):
842         - fast/canvas/webgl/attrib-location-length-limits.html:
843         - fast/canvas/webgl/uniform-location-length-limits.html:
844
845         * platform/graphics/ANGLEWebKitBridge.cpp:
846         (WebCore::getSymbolInfo): Extracts all the information on symbols (either attributes
847         or uniforms) from the newly compiled shader.
848         (WebCore):
849         (WebCore::ANGLEWebKitBridge::compileShaderSource): New method name.
850         * platform/graphics/ANGLEWebKitBridge.h:
851         (WebCore::getUniforms): Deleted this method.
852         (WebCore::ANGLEShaderSymbol::isSampler): Make sure the symbol is a uniform.
853         (ANGLEWebKitBridge):
854         * platform/graphics/GraphicsContext3D.h:
855         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): A new object that
856         holds the size, type and translated name of a symbol from a WebGL shader.
857         (ShaderSourceEntry):
858         (WebCore::GraphicsContext3D::ShaderSourceEntry::ShaderSourceEntry): Now keeps track
859         of the translated source code and symbol mappings.
860         (WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap): Helper function to
861         get the member variable corresponding to the type of symbol you're asking fo.
862         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
863         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): Calls new method
864         name which also produces a set of symbols to examine.
865         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
866         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): We now can pass
867         in some extra compile options to do translation of long symbol names. Also fill the
868         map of translated symbol names.
869         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
870         (WebCore::GraphicsContext3D::compileShader):
871         (WebCore::GraphicsContext3D::mappedSymbolName): Returns the mapped name for
872         a shader symbol if it was translated during compilation.
873         (WebCore):
874         (WebCore::GraphicsContext3D::getAttribLocation):
875         (WebCore::GraphicsContext3D::getShaderiv):
876         (WebCore::GraphicsContext3D::getShaderInfoLog):
877         (WebCore::GraphicsContext3D::getShaderSource):
878         (WebCore::GraphicsContext3D::getUniformLocation):
879
880 2012-10-04  Alpha Lam  <hclam@chromium.org>
881
882         [skia] Drawing a subrect of bitmap image is misaligned
883         https://bugs.webkit.org/show_bug.cgi?id=95121
884
885         Reviewed by Stephen White.
886
887         When drawing a subrect of BitmapImage and the subrect is not aligned
888         to integer boundaries, skia expands it to the closest enclosing integer
889         rectangle. This creates prominent rendering artifacts when an image
890         is used as background and its sub-regions are invalidated frequently.
891
892         This patch fixes the problem by doing alignment to integer boundaries
893         and clipping for both cases of RESAMPLE_AWESOME and RESAMPLE_LINEAR.
894
895         A clip rect is applied to the canvas using original destination
896         rectangle, while source and destination rectangles are enlarged
897         appropriately to ensure source rectangle is aligned.
898
899         This patch also fixes a closely related problem. In RESAMPLE_AWESOME
900         resampling mode the previous algorithm applies different approximated
901         scale factor for each scaled image fragment. This caused the stitched
902         image to look ugly.
903
904         Scale factor is approximated using entire image size, this gives a
905         more accurate approximation because of greater denominator and a
906         consistent scale factor across all fragments.
907
908         Changes in Skia enable caching of the scaled image and return the
909         scaled fragment because scale factor is now consistent for all
910         fragments.
911
912         Tests: fast/images/paint-subrect-grid.html
913                fast/images/paint-subrect.html
914                fast/images/repaint-subrect-grid.html
915
916         * platform/graphics/skia/ImageSkia.cpp:
917         (WebCore::computeResamplingMode): Use float for width and height.
918         (WebCore):
919         (WebCore::areBoundariesIntegerAligned):
920         (WebCore::computeBitmapDrawRects):
921         (WebCore::extractScaledImageFragment):
922         (WebCore::drawResampledBitmap): New algorithm for drawing scaled image fragment.
923         (WebCore::paintSkBitmap):
924         (WebCore::Image::drawPattern):
925         (WebCore::BitmapImage::draw): Use SkRect instead of SkIRect.
926         (WebCore::BitmapImageSingleFrameSkia::draw):
927         * platform/graphics/skia/NativeImageSkia.cpp:
928         Changing the algorithm for extracting a scaled image fragment.
929         A fragment is now identified by (scaledImageSize, scaledImageSubset).
930         (WebCore::NativeImageSkia::hasResizedBitmap):
931         (WebCore::NativeImageSkia::resizedBitmap):
932         (WebCore::NativeImageSkia::shouldCacheResampling):
933         (WebCore::NativeImageSkia::CachedImageInfo::CachedImageInfo):
934         (WebCore):
935         (WebCore::NativeImageSkia::CachedImageInfo::isEqual):
936         (WebCore::NativeImageSkia::CachedImageInfo::set):
937         (WebCore::NativeImageSkia::CachedImageInfo::rectInSubset):
938         * platform/graphics/skia/NativeImageSkia.h:
939         (NativeImageSkia):
940         (CachedImageInfo):
941
942 2012-10-03  Ryosuke Niwa  <rniwa@webkit.org>
943
944         ReplaceSelectionCommand should merge text nodes
945         https://bugs.webkit.org/show_bug.cgi?id=98188
946
947         Reviewed by Levi Weintraub.
948
949         Added mergeTextNodesAroundPosition to ReplaceSelectionCommand to merge text nodes after the replace in
950         completeHTMLReplacement. Also fixed a bunch of bugs in other classes and functions to make this work.
951
952         This behavior change is tested by existing tests.
953
954         * editing/InsertParagraphSeparatorCommand.cpp:
955         (WebCore::InsertParagraphSeparatorCommand::doApply): When splitting a text node, place the insertionPosition
956         at the end of the first half. Leaving it at the beginning of the second half confuses the rest of the code in
957         the function. However, the logic to handle the "insignificant" white spaces needs the position at the start of
958         the second half. So keep this position.
959         * editing/ReplaceSelectionCommand.cpp:
960         (WebCore::ReplaceSelectionCommand::doApply): Update visibleStart after inserting a paragraph separator so that
961         the logic to cleanup the nested div checks the right condition (right beneath it starting with a long comment).
962         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Insert a space for smart paste at the appropriate
963         offset instead of at the end of endNode. Also update the layout before obtaining startDownstream as we may have 
964         modified the DOM by inserting a space for endNode. Finally, a non-breaking space should be treated like a space
965         isCharacterSmartReplaceExempt for the purpose of smart replace. e.g. if we're inserting "world" after
966         "hello&nbsp;", we shouldn't be inserting another space between "hello" and "world".
967         (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
968         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): Added. Merge text nodes around position, and
969         adjust position and positionOnlyToBeUpdated accordingly. We need to call updatePositionForNodeRemoval when
970         positions were before or after the text node.
971         * editing/ReplaceSelectionCommand.h:
972         (ReplaceSelectionCommand):
973
974 2012-10-04  Tony Chang  <tony@chromium.org>
975
976         Fix <input type="month"> tests
977         https://bugs.webkit.org/show_bug.cgi?id=98426
978
979         Reviewed by Ojan Vafai.
980
981         The month picker uses flexbox and assumes that it will be aligned with
982         the last line box. This looks visually correct. I will follow up on
983         www-style to see what the expected behavior is.
984
985         Tests: fast/forms/month-multiple-fields tests cover this.
986
987         * rendering/RenderFlexibleBox.cpp:
988         * rendering/RenderFlexibleBox.h:
989
990 2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
991
992         Unreviewed, rolling out r130396.
993         http://trac.webkit.org/changeset/130396
994         https://bugs.webkit.org/show_bug.cgi?id=98421
995
996         This patch is causing crashes on 4 tests on Lion Debug and
997         Mountain Lion Debug (Requested by jernoble on #webkit).
998
999         * rendering/RenderLayerCompositor.cpp:
1000         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1001         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1002         * rendering/RenderLayerCompositor.h:
1003         * testing/InternalSettings.cpp:
1004         (WebCore::InternalSettings::Backup::Backup):
1005         (WebCore::InternalSettings::Backup::restoreTo):
1006         * testing/InternalSettings.h:
1007         (Backup):
1008
1009 2012-10-04  Tony Chang  <tony@chromium.org>
1010
1011         inline-flex baseline is sometimes wrong
1012         https://bugs.webkit.org/show_bug.cgi?id=96188
1013
1014         Reviewed by Ojan Vafai.
1015
1016         Implement the necessary methods to get the proper baseline alignment of flexbox.
1017         We were falling back to the inline-block behavior.
1018
1019         Test: css3/flexbox/flexbox-baseline.html
1020
1021         * rendering/RenderFlexibleBox.cpp:
1022         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
1023         (WebCore::RenderFlexibleBox::baselinePosition): Used to get the baseline of the box.
1024         Mostly just the first line box baseline.
1025         (WebCore):
1026         (WebCore::RenderFlexibleBox::lastLineBoxBaseline): This is used for getting the baseline when in an inline-block.
1027         We actually don't want the last line, but the flexbox's baseline.
1028         (WebCore::RenderFlexibleBox::firstLineBoxBaseline): Compute the baseline according to the rules in the spec.
1029         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Keep track of the number of children on the
1030         first line so we don't have to re-compute this when getting the baseline.
1031         (WebCore::RenderFlexibleBox::crossAxisExtentForChild): Make const.
1032         (WebCore::RenderFlexibleBox::mainAxisExtentForChild): Make const.
1033         (WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis): Make const.
1034         * rendering/RenderFlexibleBox.h: Add a size_t to keep track of how many children are in the first line.
1035
1036 2012-10-04  Xianzhu Wang  <wangxianzhu@chromium.org>
1037
1038         [Chromium] Should set unitsPerEm in SimpleFontDataSkia.cpp
1039         https://bugs.webkit.org/show_bug.cgi?id=98100
1040
1041         Reviewed by Stephen White.
1042
1043         At least on chromium-linux and chromium-android, unitsPerEm was not set
1044         according to the information in the font, causing at least problems in
1045         OpenTypeVerticalData when calculating vertical advance.
1046
1047         Test: fast/writing-mode/vertical-font-vmtx-units-per-em.html
1048
1049         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1050         (WebCore::SimpleFontData::platformInit):
1051
1052 2012-10-04  Simon Fraser  <simon.fraser@apple.com>
1053
1054         Standardize on "flush" terminology for compositing layer flushing/syncing
1055         https://bugs.webkit.org/show_bug.cgi?id=98321
1056
1057         Reviewed by Simon Fraser.
1058
1059         Rename compositing-related methods that refer to "syncing" to instead
1060         refer to "flushing".
1061
1062         * WebCore.exp.in:
1063         * loader/EmptyClients.h:
1064         (WebCore::EmptyChromeClient::scheduleCompositingLayerFlush):
1065         * page/ChromeClient.h:
1066         (ChromeClient):
1067         * page/FrameView.cpp:
1068         (WebCore::FrameView::flushCompositingStateForThisFrame):
1069         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
1070         (WebCore::FrameView::paintContents):
1071         * page/FrameView.h:
1072         (FrameView):
1073         * rendering/RenderLayerCompositor.cpp:
1074         (WebCore::RenderLayerCompositor::scheduleLayerFlush):
1075         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1076
1077 2012-10-04  Peter Rybin  <peter.rybin@gmail.com>
1078
1079         Web Inspector: expose object internal properties such as PrimitiveValue or BoundThis
1080         https://bugs.webkit.org/show_bug.cgi?id=94397
1081
1082         Reviewed by Yury Semikhatsky.
1083
1084         Internal property access is built from Injected Script to V8 debug API. JSC binding
1085         has a stub imlpementation. Protocol is updated to explicitly reflect internal properties.
1086
1087         Test: inspector-protocol/runtime-getProperties.html
1088
1089         * bindings/js/JSInjectedScriptHostCustom.cpp:
1090         (WebCore::JSInjectedScriptHost::getInternalProperties):
1091         (WebCore):
1092         * bindings/v8/DebuggerScript.js:
1093         * bindings/v8/ScriptDebugServer.cpp:
1094         (WebCore::ScriptDebugServer::getInternalProperties):
1095         (WebCore):
1096         * bindings/v8/ScriptDebugServer.h:
1097         (ScriptDebugServer):
1098         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1099         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallback):
1100         (WebCore):
1101         * inspector/InjectedScript.cpp:
1102         (WebCore::InjectedScript::getInternalProperties):
1103         (WebCore):
1104         * inspector/InjectedScript.h:
1105         (InjectedScript):
1106         * inspector/InjectedScriptHost.idl:
1107         * inspector/InjectedScriptSource.js:
1108         (.):
1109         * inspector/Inspector.json:
1110         * inspector/InspectorRuntimeAgent.cpp:
1111         (WebCore::InspectorRuntimeAgent::getProperties):
1112         * inspector/InspectorRuntimeAgent.h:
1113         (InspectorRuntimeAgent):
1114
1115 2012-10-04  Sami Kyostila  <skyostil@chromium.org>
1116
1117         Fixed position visibility check does not consider descendants
1118         https://bugs.webkit.org/show_bug.cgi?id=98144
1119
1120         Reviewed by Simon Fraser.
1121
1122         The check against creating composition layers for invisible fixed positioned
1123         elements is too aggressive in that it does not consider descendants of the
1124         fixed positioned element that may be visible even though the element itself is
1125         out of view.
1126
1127         Fix the problem by calculating the true composited bounds of the fixed
1128         element instead of just using the size of the fixed layer. Because calculating
1129         the true bounds may be expensive, it is only done if the fixed layer itself is
1130         invisible.
1131
1132         Test: compositing/layer-creation/fixed-position-absolute-descendant.html
1133
1134         * rendering/RenderLayerCompositor.cpp:
1135         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1136         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1137         * rendering/RenderLayerCompositor.h:
1138
1139 2012-10-04  Vsevolod Vlasov  <vsevik@chromium.org>
1140
1141         Web Inspector: When uiSourceCode content has diverged from VM script, call frames should be shown in temporary script based uiSourceCodes.
1142         https://bugs.webkit.org/show_bug.cgi?id=98385
1143
1144         Reviewed by Pavel Feldman.
1145
1146         When javaScriptSource diverges from VM, ResourceScriptMapping now switches debugging
1147         to temporary VM scripts based uiSourceCode with isDivergedReplacement property set.
1148         Added hasDivergedFromVM and isDivergingFromVM properties to JavaScriptSource.
1149         JavaScriptSourceFrame and ScriptSnippetsModel are updated to process breakpoint changes correctly.
1150
1151         * inspector/front-end/BreakpointManager.js:
1152         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
1153         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
1154         * inspector/front-end/JavaScriptSource.js:
1155         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
1156         (WebInspector.JavaScriptSource.prototype.workingCopyChanged):
1157         (WebInspector.JavaScriptSource.prototype.fireHasDivergedFromVMChanged):
1158         * inspector/front-end/JavaScriptSourceFrame.js:
1159         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
1160         (WebInspector.JavaScriptSourceFrame.prototype._hasDivergedFromVM):
1161         (WebInspector.JavaScriptSourceFrame.prototype.onTextChanged):
1162         (WebInspector.JavaScriptSourceFrame.prototype._getBreakpointDecorations):
1163         (WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
1164         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
1165         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
1166         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
1167         * inspector/front-end/ResourceScriptMapping.js:
1168         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
1169         (WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVMChanged):
1170         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
1171         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
1172         * inspector/front-end/ScriptSnippetModel.js:
1173         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
1174         (WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints):
1175         * inspector/front-end/ScriptsPanel.js:
1176         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
1177         * inspector/front-end/UISourceCode.js:
1178         (WebInspector.UISourceCode.prototype.formatted):
1179
1180 2012-10-04  Vsevolod Vlasov  <vsevik@chromium.org>
1181
1182         Web Inspector: Scripts panel should not automatically switch to snippet evaluation when previously evaluated snippet is edited.
1183         https://bugs.webkit.org/show_bug.cgi?id=98402
1184
1185         Reviewed by Pavel Feldman.
1186
1187         Scripts panel does not automatically switch to snippet evaluation when
1188         one edits previously evaluated snippet.
1189
1190         * inspector/front-end/ScriptSnippetModel.js:
1191         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
1192         * inspector/front-end/ScriptsPanel.js:
1193         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
1194
1195 2012-10-04  Balazs Kelemen  <kbalazs@webkit.org>
1196
1197         Don't allow to disable compositing in forced compositing mode
1198         https://bugs.webkit.org/show_bug.cgi?id=98048
1199
1200         Reviewed by Jocelyn Turcotte.
1201
1202         Make forced compositing mode imply accelerated compositing. This will
1203         avoid unexpected situations for platforms that don't want to support
1204         the non-accelerated rendering path.
1205
1206         Covered by existing tests.
1207
1208         * WebCore.exp.in: Export Settings::setAcceleratedCompositingEnabled
1209         because it has been deinlined.
1210         * page/Settings.cpp:
1211         (WebCore::Settings::setAcceleratedCompositingEnabled):
1212         (WebCore::Settings::setForceCompositingMode):
1213         (WebCore):
1214         * page/Settings.h:
1215         (Settings):
1216         (WebCore::Settings::forceCompositingMode): Make it const as a side fix.
1217
1218 2012-10-04  Harald Alvestrand  <hta@google.com>
1219
1220         Change RTCPeerConnection GetStats to use Date timestamp format
1221         https://bugs.webkit.org/show_bug.cgi?id=98263
1222
1223         Reviewed by Yury Semikhatsky.
1224
1225         Tested by extension to RTCPeerConnection-stats test.
1226
1227         * Modules/mediastream/RTCStatsElement.cpp:
1228         (WebCore::RTCStatsElement::create):
1229         (WebCore::RTCStatsElement::RTCStatsElement):
1230         * Modules/mediastream/RTCStatsElement.h: long -> double
1231         (RTCStatsElement):
1232         (WebCore::RTCStatsElement::timestamp):
1233         * Modules/mediastream/RTCStatsElement.idl: long -> Date
1234         * Modules/mediastream/RTCStatsReport.cpp:
1235         (WebCore::RTCStatsReport::addElement):
1236         * Modules/mediastream/RTCStatsReport.h:
1237         (RTCStatsReport):
1238         * Modules/mediastream/RTCStatsResponse.cpp:
1239         (WebCore::RTCStatsResponse::addElement):
1240         * Modules/mediastream/RTCStatsResponse.h:
1241         (RTCStatsResponse):
1242         * platform/chromium/support/WebRTCStatsResponse.cpp:
1243         (WebKit::WebRTCStatsResponse::addElement):
1244         * platform/mediastream/RTCStatsResponseBase.h:
1245         (RTCStatsResponseBase):
1246
1247 2012-10-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1248
1249         Unreviewed, rolling out r130377.
1250         http://trac.webkit.org/changeset/130377
1251         https://bugs.webkit.org/show_bug.cgi?id=98392
1252
1253         Chromium Win compilation is broken (Requested by yurys on
1254         #webkit).
1255
1256         * Modules/mediastream/RTCStatsElement.cpp:
1257         (WebCore::RTCStatsElement::create):
1258         (WebCore::RTCStatsElement::RTCStatsElement):
1259         * Modules/mediastream/RTCStatsElement.h:
1260         (RTCStatsElement):
1261         (WebCore::RTCStatsElement::timestamp):
1262         * Modules/mediastream/RTCStatsElement.idl:
1263         * Modules/mediastream/RTCStatsReport.cpp:
1264         (WebCore::RTCStatsReport::addElement):
1265         * Modules/mediastream/RTCStatsReport.h:
1266         (RTCStatsReport):
1267         * Modules/mediastream/RTCStatsResponse.cpp:
1268         (WebCore::RTCStatsResponse::addElement):
1269         * Modules/mediastream/RTCStatsResponse.h:
1270         (RTCStatsResponse):
1271         * platform/chromium/support/WebRTCStatsResponse.cpp:
1272         (WebKit::WebRTCStatsResponse::addElement):
1273         * platform/mediastream/RTCStatsResponseBase.h:
1274         (RTCStatsResponseBase):
1275
1276 2012-10-04  Harald Alvestrand  <hta@google.com>
1277
1278         Change RTCPeerConnection GetStats to use Date timestamp format
1279         https://bugs.webkit.org/show_bug.cgi?id=98263
1280
1281         Reviewed by Adam Barth.
1282
1283         Tested by extension to RTCPeerConnection-stats test.
1284
1285         * Modules/mediastream/RTCStatsElement.cpp:
1286         (WebCore::RTCStatsElement::create):
1287         (WebCore::RTCStatsElement::RTCStatsElement):
1288         * Modules/mediastream/RTCStatsElement.h: long -> double
1289         (RTCStatsElement):
1290         (WebCore::RTCStatsElement::timestamp):
1291         * Modules/mediastream/RTCStatsElement.idl: long -> Date
1292         * Modules/mediastream/RTCStatsReport.cpp:
1293         (WebCore::RTCStatsReport::addElement):
1294         * Modules/mediastream/RTCStatsReport.h:
1295         (RTCStatsReport):
1296         * Modules/mediastream/RTCStatsResponse.cpp:
1297         (WebCore::RTCStatsResponse::addElement):
1298         * Modules/mediastream/RTCStatsResponse.h:
1299         (RTCStatsResponse):
1300         * platform/chromium/support/WebRTCStatsResponse.cpp:
1301         (WebKit::WebRTCStatsResponse::addElement):
1302         * platform/mediastream/RTCStatsResponseBase.h:
1303         (RTCStatsResponseBase):
1304
1305 2012-10-05  Kent Tamura  <tkent@chromium.org>
1306
1307         [Chromium] Enable the multiple fields UI for input[type=date]
1308         https://bugs.webkit.org/show_bug.cgi?id=98351
1309
1310         Reviewed by Hajime Morita.
1311
1312         Touch files related to ENABLE_INPUT_TYPE_DATE_LEGACY_UI to avoid build
1313         issues.
1314
1315         No new tests. Many tests will be landed shortly.
1316
1317         * html/DateInputType.cpp:
1318         * html/DateInputType.h:
1319
1320 2012-10-04  Kent Tamura  <tkent@chromium.org>
1321
1322         Add code for input[type=date] with the multiple fields UI
1323         https://bugs.webkit.org/show_bug.cgi?id=98340
1324
1325         Reviewed by Hajime Morita.
1326
1327         The new code is available if !ENABLE(INPUT_TYPE_DATE_LEGACY_UI). At this
1328         moment, there are no platforms enabling the new code. We're going to
1329         enable it soon on desktop Chromium, and add tests. Then we're going to
1330         remove the code for ENABLE(INPUT_TYPE_DATE_LEGACY_UI).
1331
1332         ENABLE(INPUT_TYPE_DATE_LEGACY_UI) means the current UI; input[type=date]
1333         is represetnted as a kind of text field, and it has code to invoke a
1334         calendar picker.
1335         ENABLE(CALENDAR_PICKER) was used wrongly. It meant calendar picker
1336         support + text field UI of input[type=date]. Now it means only calendar
1337         picker support.
1338
1339         * html/DateInputType.h:
1340         (WebCore): If ENABLE(INPUT_MULTIPLE_FIELDS_UI) &&
1341         !ENABLE(INPUT_TYPE_DATE_LEGACY_UI), change the base class to the class
1342         for multiple fields UI.
1343         (DateInputType): Wrap the code for text fields behavior and calendar
1344         picker UI with ENABLE(INPUT_TYPE_DATE_LEGACY_UI). Add functions for
1345         ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1346         * html/DateInputType.cpp:
1347         (WebCore::DateInputType::DateInputType):
1348         Change the flag name; CALENDAR_PICKER -> INPUT_TYPE_DATE_LEGACY_UI
1349         (WebCore): ditto.
1350         (WebCore::DateInputType::formatDateTimeFieldsState):
1351         A callback for multiple fields UI. This constructs a string value from
1352         each of values of multiple fields.
1353         Note that we don't need to do +1 to month().
1354         (WebCore::DateInputType::setupLayoutParameters):
1355         A callback for multiple fields UI. Passes information to build UI.
1356
1357         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1358         (BaseMultipleFieldsDateAndTimeInputType):
1359         Add m_pickerIndicatorIsAlwaysVisible member, wrap some members with flags.
1360         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1361         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
1362         Initialize m_pickerIndicatorIsAlwaysVisible.
1363         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
1364         If a type supports calendar picker, we should always show the picker
1365         indicator. We introduce m_pickerIndicatorIsAlwaysVisible flag, and ask
1366         RenderTheme for support status of each of types.
1367         Add a local variable 'document' to avoid multiple element()->document().
1368         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
1369         - If m_pickerIndicatorIsAlwaysVisible, don't hide the picker indicator element.
1370         - Wrap the code with appropriate flags.
1371
1372         * rendering/RenderTheme.h:
1373         (WebCore::RenderTheme::supportsCalendarPicker): Added.
1374         * rendering/RenderThemeChromiumMac.h: Override supportsCalendarPicker.
1375         * rendering/RenderThemeChromiumMac.mm:
1376         (WebCore::RenderThemeChromiumMac::supportsCalendarPicker):
1377         Added. Delegate to RenderThemeChromiumCommon.
1378         * rendering/RenderThemeChromiumSkia.h: Override supportsCalendarPicker.
1379         * rendering/RenderThemeChromiumSkia.cpp:
1380         (WebCore::RenderThemeChromiumSkia::supportsCalendarPicker):
1381         Added. Delegate to RenderThemeChromiumCommon.
1382         * rendering/RenderThemeChromiumCommon.h:
1383         (RenderThemeChromiumCommon): Declare supportsCalendarPicker.
1384         * rendering/RenderThemeChromiumCommon.cpp:
1385         (WebCore::RenderThemeChromiumCommon::supportsCalendarPicker):
1386         Returns true if the type is "date."
1387
1388         * html/DateTimeFieldsState.h:
1389         (DateTimeFieldsState): Add a comment for the m_month field.
1390
1391 2012-10-04  Kent Tamura  <tkent@chromium.org>
1392
1393         DateTimeYearFieldElement should respect min/max values specified by page authors
1394         https://bugs.webkit.org/show_bug.cgi?id=98227
1395
1396         Reviewed by Hajime Morita.
1397
1398         Before this patch, we always set 1 to the minimum limit and 275760 to
1399         the maximum limit for a year field, and a user can specify any year
1400         regardless of min/max attributes. Such wide range is unnecessary for
1401         normal applications and we should provide a way to limit the range.
1402
1403         Test: fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html
1404
1405         * html/shadow/DateTimeFieldElements.h:
1406         To add four constructor arguments, introduce Parameters struct.
1407         Actually, we add the followings;
1408          - minimum year in UI
1409          - maximum year in UI
1410          - min attribute is specified
1411          - max attribute is specified
1412         (Parameters):
1413         (WebCore::DateTimeYearFieldElement::Parameters::Parameters):
1414         (DateTimeYearFieldElement):
1415         * html/shadow/DateTimeFieldElements.cpp:
1416         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): ditto.
1417         (WebCore::DateTimeYearFieldElement::create): ditto.
1418         (WebCore::DateTimeYearFieldElement::clampValueForHardLimits):
1419         Override DateTimeNumericFieldElement::clampValueForHardLimits.
1420         By this, we allow to set out-of-range year values.
1421         (WebCore::currentFullYear): A helper to get the current year.
1422         (WebCore::DateTimeYearFieldElement::defaultValueForStepDown):
1423         If the field has no value and step down operation occurs,
1424          - the field has the current year if the max attribute is not specified.
1425          - the field has the maximum value otherwise.
1426         (WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Similar change.
1427
1428         * html/shadow/DateTimeNumericFieldElement.h:
1429         (DateTimeNumericFieldElement): Declare clampValueForHardLimits.
1430         * html/shadow/DateTimeNumericFieldElement.cpp:
1431         (WebCore::DateTimeNumericFieldElement::clampValueForHardLimits):
1432         (WebCore::DateTimeNumericFieldElement::setValueAsInteger):
1433         Call clampValueForHardLimits instead of clampValue in order to
1434         distinguish limits for UI and limits for internal value update.
1435
1436         * html/shadow/DateTimeEditElement.h:
1437         (LayoutParameters): Add minimumYear and maximumYear members.
1438         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
1439         Initialize minimumYear and maximumYear.
1440         (WebCore::DateTimeEditElement::LayoutParameters::undefinedYear):
1441         Represents 'undefined' value for minimumYear and maximumYear.
1442         * html/shadow/DateTimeEditElement.cpp:
1443         (WebCore::DateTimeEditBuilder::visitField):
1444         Preparas DateTimeYearField::Parameters and pass it to the DateTimeYearField factory.
1445
1446         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1447         (WebCore::BaseMultipleFieldsDateAndTimeInputType::fullYear):
1448         A helper to get a year value from an attribute value string.
1449         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1450         (BaseMultipleFieldsDateAndTimeInputType): Add fullYear().
1451
1452         * html/DateTimeInputType.cpp:
1453         (WebCore::DateTimeInputType::setupLayoutParameters):
1454         Set LayoutParameters::minimumYear and maximumYear.
1455         * html/DateTimeLocalInputType.cpp:
1456         (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
1457         * html/MonthInputType.cpp:
1458         (WebCore::MonthInputType::setupLayoutParameters): ditto.
1459         * html/WeekInputType.cpp:
1460         (WebCore::WeekInputType::setupLayoutParameters): ditto.
1461
1462 2012-10-03  Adam Barth  <abarth@webkit.org>
1463
1464         Unreviewed. Fix parse error in vcproj file.
1465
1466         * WebCore.vcproj/WebCore.vcproj:
1467
1468 2012-10-03  Keishi Hattori  <keishi@webkit.org>
1469
1470         Implement localizeValue for TimeInputType
1471         https://bugs.webkit.org/show_bug.cgi?id=98237
1472
1473         Reviewed by Kent Tamura.
1474
1475         We want to localize time values for the suggestion picker.
1476         DateTimeStringBuilder parses a format and creates a formatted string.
1477
1478         Added chromium unit test LocaleMacTest.formatTime
1479
1480         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1481         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldHaveSecondField): Moved from LayoutParameters because we want to use it inside localizeValue.
1482         (WebCore):
1483         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1484         (BaseMultipleFieldsDateAndTimeInputType):
1485         * html/DateTimeInputType.cpp:
1486         (WebCore::DateTimeInputType::setupLayoutParameters):
1487         * html/DateTimeLocalInputType.cpp:
1488         (WebCore::DateTimeLocalInputType::setupLayoutParameters):
1489         * html/TimeInputType.cpp:
1490         (WebCore::TimeInputType::localizeValue):
1491         (WebCore):
1492         (WebCore::TimeInputType::setupLayoutParameters):
1493         * html/TimeInputType.h:
1494         (TimeInputType):
1495         * html/shadow/DateTimeEditElement.cpp:
1496         (WebCore):
1497         * html/shadow/DateTimeEditElement.h:
1498         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
1499         * platform/text/LocaleICU.cpp:
1500         (WebCore::LocaleICU::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
1501         * platform/text/LocaleICU.h:
1502         (LocaleICU):
1503         * platform/text/LocaleWin.cpp:
1504         (WebCore::LocaleWin::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
1505         * platform/text/LocaleWin.h:
1506         (LocaleWin):
1507         * platform/text/LocaleNone.cpp:
1508         (LocaleNone):
1509         (WebCore::LocaleNone::formatDateTime):
1510         * platform/text/Localizer.cpp:
1511         (DateTimeStringBuilder):
1512         (WebCore):
1513         (WebCore::DateTimeStringBuilder::DateTimeStringBuilder): Takes a
1514         Localizer pointer. This is used inside the Localizer so the Localizer
1515         will out live the DateTimeStringBuilder.
1516         (WebCore::DateTimeStringBuilder::build): Builds a localized string for the given format.
1517         (WebCore::DateTimeStringBuilder::zeroPadString):
1518         (WebCore::DateTimeStringBuilder::appendNumber): Appends a number with left zero padding to match width.
1519         (WebCore::DateTimeStringBuilder::visitField):
1520         (WebCore::DateTimeStringBuilder::visitLiteral):
1521         (WebCore::DateTimeStringBuilder::toString): Returns the localized string.
1522         (WebCore::Localizer::formatDateTime):
1523         * platform/text/Localizer.h:
1524         * platform/text/mac/LocaleMac.h:
1525         (LocaleMac):
1526         * platform/text/mac/LocaleMac.mm:
1527         (WebCore::LocaleMac::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
1528
1529 2012-10-03  Douglas Stockwell  <dstockwell@chromium.org>
1530
1531         Chromium needs support for border radius clipping
1532         https://bugs.webkit.org/show_bug.cgi?id=69866
1533
1534         Reviewed by Stephen White.
1535
1536         Changes to make this suitably efficient have already landed upstream in skia:
1537         http://code.google.com/p/skia/source/detail?r=2924
1538
1539         Covered by existing tests.
1540
1541         * rendering/RenderLayer.cpp:
1542
1543 2012-10-03  Benjamin Poulain  <bpoulain@apple.com>
1544
1545         Simplify attribute access in Element::computeInheritedLanguage
1546         https://bugs.webkit.org/show_bug.cgi?id=98327
1547
1548         Reviewed by Andreas Kling.
1549
1550         * dom/Element.cpp:
1551         (WebCore::Element::computeInheritedLanguage):
1552         By using Element::fastGetAttribute(), we check for the existence of attributeData twice
1553         and do a bunch of useless operation on AtomicString.
1554
1555         By using ElementAttributeData directly, we can cut it to the two important branch.
1556
1557 2012-10-03  Kangil Han  <kangil.han@samsung.com>
1558
1559         Fix unused parameter compile warnings.
1560         https://bugs.webkit.org/show_bug.cgi?id=98243
1561
1562         Reviewed by Alexey Proskuryakov.
1563
1564         Fixed unused parameter compile warning by removing parameter names and adding UNUSED_PARAM usage.
1565
1566         * plugins/PluginDebug.cpp:
1567         (WebCore::prettyNameForNPPVariable):
1568         * plugins/npapi.cpp:
1569         (NPN_MemFlush):
1570         (NPN_RequestRead):
1571         (NPN_GetJavaPeer):
1572
1573 2012-10-03  Adam Barth  <abarth@webkit.org>
1574
1575         Measure the usage of WebSQLDatabase
1576         https://bugs.webkit.org/show_bug.cgi?id=98330
1577
1578         Reviewed by Ojan Vafai.
1579
1580         WebKit is the only engine that implements WebSQLDatabase. This patch
1581         causes us to measure its usage so we can see how quickly web sites move
1582         to IndexedDB.
1583
1584         * Modules/webdatabase/DOMWindowWebDatabase.idl:
1585         * page/FeatureObserver.h:
1586
1587 2012-10-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1588
1589         [soup] WebKit crashes when doing a http request
1590         https://bugs.webkit.org/show_bug.cgi?id=98055
1591
1592         Reviewed by Martin Robinson.
1593
1594         On i386, (d->m_firstRequest.timeoutInterval() * 1000) results in 0 if
1595         timeoutInterval() is INT_MAX. So, set default timeout to 0 to avoid
1596         calling soup_add_timeout with a 0 value.
1597
1598         Also, if resource handle is deleted before "request-started" signal is
1599         emitted, soupMessage handle points to a deleted object, and a crash
1600         occurs. So, reset soupMessage handle data in
1601         cleanupSoupRequestOperation so it won't happen anymore.
1602
1603         Lastly, if timeout occurs before request is completed, handle is
1604         deleted, and crash occurs in sendRequestCallback due to an early
1605         destroyed handle. To avoid that, call handle->cancel in
1606         requestTimeoutCallback. There is no need to call
1607         cleanupSoupRequestOperation anymore since handle->cancel will trigger
1608         sendRequestCallback, and as handle is deleted,
1609         cleanupSoupRequestOperation will be called automatically.
1610
1611         No new tests yet, tests will be added with the patch in bug 74802.
1612
1613         * platform/network/ResourceRequestBase.cpp:
1614         (WebCore):
1615         * platform/network/soup/ResourceHandleSoup.cpp:
1616         (WebCore::cleanupSoupRequestOperation):
1617         (WebCore::ResourceHandle::platformSetDefersLoading):
1618         (WebCore::requestTimeoutCallback):
1619
1620 2012-10-03  Adam Barth  <abarth@webkit.org>
1621
1622         Remove support for ENABLE(LEGACY_WEBKIT_BLOB_BUILDER)
1623         https://bugs.webkit.org/show_bug.cgi?id=98301
1624
1625         Reviewed by Eric Seidel.
1626
1627         According to anonymous usage statistics, the APIs guarded by
1628         ENABLE(LEGACY_WEBKIT_BLOB_BUILDER) are used on approximately 0.006% of
1629         web pages. Given that this feature is only enabled in GTK and Chromium,
1630         it seems likely that we should remove it.
1631
1632         * CMakeLists.txt:
1633         * DerivedSources.make:
1634         * DerivedSources.pri:
1635         * GNUmakefile.features.am:
1636         * GNUmakefile.list.am:
1637         * WebCore.gypi:
1638         * WebCore.xcodeproj/project.pbxproj:
1639         * fileapi/WebKitBlobBuilder.idl: Removed.
1640         * page/DOMWindow.idl:
1641
1642 2012-10-03  Beth Dakin  <bdakin@apple.com>
1643
1644         https://bugs.webkit.org/show_bug.cgi?id=98313
1645         ScrollingStateNode should keep a Vector of children instead of child 
1646         pointers
1647
1648         Reviewed by Simon Fraser.
1649
1650         This patch re-names ScrollingStateNode::cloneNode() to 
1651         ScrollingStateNode::cloneAndResetNode(). The new function resets the 
1652         change properties of the current node after cloning it, and it also 
1653         takes care of cloning children, which the old function did not do.
1654
1655         m_firstChild and m_nextSibling are gone. Use the m_children Vector 
1656         instead.
1657         * page/scrolling/ScrollingStateNode.cpp:
1658         (WebCore::ScrollingStateNode::cloneAndResetChildNodes):
1659         (WebCore::ScrollingStateNode::appendChild):
1660         * page/scrolling/ScrollingStateNode.h:
1661         (ScrollingStateNode):
1662         (WebCore::ScrollingStateNode::parent):
1663         (WebCore::ScrollingStateNode::setParent):
1664
1665         Reset the change properties and clone children in cloneAndResetNode()
1666         * page/scrolling/ScrollingStateScrollingNode.cpp:
1667         (WebCore::ScrollingStateScrollingNode::cloneAndResetNode):
1668         * page/scrolling/ScrollingStateScrollingNode.h:
1669
1670         Yay, this function can be vastly simplified now that we don't have 
1671         those messy child and sibling pointers.
1672         * page/scrolling/ScrollingStateTree.cpp:
1673         (WebCore::ScrollingStateTree::commit):
1674
1675 2012-10-03  Ojan Vafai  <ojan@chromium.org>
1676
1677         Replace uses of -webkit-box-sizing with box-sizing
1678         https://bugs.webkit.org/show_bug.cgi?id=98312
1679
1680         Reviewed by Tony Chang.
1681
1682         No need to use the prefixed version when the unprefixed works the same.
1683         No new tests since there's no change in behavior..
1684
1685         * css/html.css:
1686
1687 2012-10-03  Joshua Bell  <jsbell@chromium.org>
1688
1689         IndexedDB: Don't do full commit for empty transactions
1690         https://bugs.webkit.org/show_bug.cgi?id=89239
1691
1692         Reviewed by Tony Chang.
1693
1694         Don't bother creating a leveldb write batch if there's nothing in the transaction
1695         to commit. Note that a read-only transaction may still have index cleanup so may
1696         not be an empty transaction.
1697
1698         This cuts the Lookup2 benchmark in http://reyesr.github.com/html5-storage-benchmark/
1699         from 70s to 2s.
1700
1701         Covered by existing tests, e.g. storage/indexeddb/transaction-basics.html
1702
1703         * platform/leveldb/LevelDBTransaction.cpp:
1704         (WebCore::LevelDBTransaction::commit):
1705
1706 2012-10-03  Adam Klein  <adamk@chromium.org>
1707
1708         Remove bogus FIXME from Document.idl
1709         https://bugs.webkit.org/show_bug.cgi?id=98302
1710
1711         Reviewed by Adam Barth.
1712
1713         The FIXME claimed that document.body throwing an exception was not
1714         specced, but in fact it is:
1715         http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-body
1716
1717         * dom/Document.idl:
1718
1719 2012-10-03  Joshua Bell  <jsbell@chromium.org>
1720
1721         IndexedDB: Memory leak when deleting object stores with indexes
1722         https://bugs.webkit.org/show_bug.cgi?id=98292
1723
1724         Reviewed by Tony Chang.
1725
1726         Reference cycles between IDBObjectStore and IDBIndex instances are explicitly
1727         broken when the transaction completes (and the spec allows traversal to fail).
1728         Deleted stores need to have the reference cycle broken too.
1729
1730         Caught by running valgrind over: storage/indexeddb/keypath-basics.html
1731
1732         * Modules/indexeddb/IDBTransaction.cpp:
1733         (WebCore::IDBTransaction::objectStoreDeleted): Add store to set.
1734         (WebCore::IDBTransaction::dispatchEvent): Notify stores in set.
1735         * Modules/indexeddb/IDBTransaction.h: Add set of deleted stores.
1736
1737 2012-10-03  Adam Barth  <abarth@webkit.org>
1738
1739         CSSNamespace.h is empty and should be deleted
1740         https://bugs.webkit.org/show_bug.cgi?id=98304
1741
1742         Reviewed by Eric Seidel.
1743
1744         There's no reason to have this file in the repository.
1745
1746         * GNUmakefile.list.am:
1747         * WebCore.gypi:
1748         * WebCore.vcproj/WebCore.vcproj:
1749         * WebCore.xcodeproj/project.pbxproj:
1750         * css/CSSNamespace.h: Removed.
1751
1752 2012-10-03  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1753
1754         Build failure with css filters enabled and accelerated compositing disabled
1755         https://bugs.webkit.org/show_bug.cgi?id=95908
1756
1757         Reviewed by Tony Chang.
1758
1759         Do not try to setBackingNeedsRepaint when building without accelerated
1760         compositing.
1761
1762         Also, allow painting with filter (paintsWithFilters returns true if
1763         renderer has filter) when accelerated compositing is not enabled.
1764
1765         No functional change, so no new tests.
1766
1767         * rendering/RenderLayer.cpp:
1768         (WebCore::RenderLayer::styleChanged):
1769
1770 2012-10-03  Emil A Eklund  <eae@chromium.org>
1771
1772         Round image sizes when zooming
1773         https://bugs.webkit.org/show_bug.cgi?id=98205
1774
1775         Reviewed by Eric Seidel.
1776
1777         We currently floor image sizes when zooming which can result in
1778         images being rendered at one pixel less than the actual size.
1779         This is especially likely to happen for very large images.
1780
1781         Test: fast/sub-pixel/zoomed-image-tiles.html
1782
1783         * loader/cache/CachedImage.cpp:
1784         (WebCore::CachedImage::imageSizeForRenderer):
1785
1786 2012-10-03  Hugo Parente Lima  <hugo.lima@openbossa.org>
1787
1788         [WK2] PageViewportController.cpp is supposed to be a generic WebKit2 file but only works with Qt port.
1789         https://bugs.webkit.org/show_bug.cgi?id=98186
1790
1791         Reviewed by Noam Rosenthal.
1792
1793         Remove the implicit conversion from WebCore::FloatSize to QSize.
1794
1795         * platform/graphics/FloatSize.h:
1796         (FloatSize):
1797
1798 2012-10-03  Levi Weintraub  <leviw@chromium.org>
1799
1800         [Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
1801         https://bugs.webkit.org/show_bug.cgi?id=97484
1802
1803         Reviewed by Eric Seidel.
1804
1805         When in compositing mode, layer painting can be triggered through the backing store. When this
1806         happens, a non-top-level RenderLayer is called to paint as its own root. Normally, we attempt to preserve
1807         the proper sub-pixel accumulation through layers to their children, but since we're not
1808         starting with the top-level layer, we haven't properly accumulated one, and convertToLayerCoords,
1809         another source of correctly getting the sub-pixel offset for a layer, also avoids crawling
1810         past the listed root layer.
1811
1812         When painting a root layer, we're aligned to the surface we're painting to, so we round our
1813         offset to avoid moving objects around.
1814
1815         * rendering/RenderLayer.cpp:
1816         (WebCore::RenderLayer::paintLayerContents):
1817
1818 2012-10-03  Jeff Timanus  <twiz@chromium.org>
1819
1820         [chromium] Expose settings value to conditionally enable pinch-zoom scaling in the Chromium compositor.  The
1821         flag defaults to disabled, so this change should be a no-op for scaling/scrolling behaviour.
1822         https://bugs.webkit.org/show_bug.cgi?id=93292
1823
1824         Reviewed by James Robinson.
1825
1826         Tests:  Existing page-scale layout tests.
1827
1828         * page/Frame.cpp:
1829         (WebCore::Frame::frameScaleFactor):
1830         * page/Settings.cpp:
1831         (WebCore::Settings::Settings):
1832         * page/Settings.h:
1833         (WebCore::Settings::setApplyPageScaleFactorInCompositor):
1834         (WebCore::Settings::applyPageScaleFactorInCompositor):
1835         (Settings):
1836
1837 2012-10-03  Stephen Chenney  <schenney@chromium.org>
1838
1839         Font data is purged while fonts are still using it
1840         https://bugs.webkit.org/show_bug.cgi?id=93640
1841
1842         Reviewed by Eric Seidel.
1843
1844         Move the handling of custom font pruning from Document to FontFallbackList.
1845         The previous inplementation allowed fonts to be removed before all their
1846         clients were done. This change moves handling of custom font purging to the
1847         FontFallbackList class, which is the shared object that is only removed
1848         when all clients of a font are done with it. This fixes a crash in Angry
1849         Birds due to a seamless iframe and some failing tests in fast/frames/seamless.
1850
1851         The specific element that causes problems is:
1852         <iframe id="ingame_frame0" name="ingame_frame0" frameborder="0" seamless="true"
1853           src="http://chrome.angrybirds.com/ingame_graphic.html"
1854           onload="this.style.opacity = 1; parent.adLoaded();" scrolling="no"
1855           style="opacity: 1; -webkit-transition: opacity 1s ease-in-out 0s;
1856           position: absolute; border: 0px; width: 312px; height: 320px; z-index:
1857           300; overflow: hidden; visibility: visible;"></iframe>
1858         The source document uses the same font as the embedding document.
1859
1860         Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html
1861                fast/frames/seamless/seamless-nested-crash.html
1862
1863         * css/CSSFontFaceSource.cpp:
1864         (WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document.
1865         * css/CSSSegmentedFontFace.cpp:
1866         (WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document.
1867         * dom/Document.cpp:
1868         (WebCore::Document::~Document): Remove code that records and purges custom fonts.
1869         (WebCore):
1870         (WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects.
1871         * dom/Document.h:
1872         (WebCore):
1873         (Document): Remove method declarations for custom font handling.
1874         * platform/graphics/FontFallbackList.h:
1875         (FontFallbackList): Moved some code around and made non-copyable.
1876         (WebCore::FontFallbackList::setGlyphPageZero): Moved.
1877         (WebCore::FontFallbackList::setGlyphPages): Moved.
1878         * platform/graphics/GlyphPageTreeNode.cpp:
1879         (WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check.
1880         * platform/graphics/SegmentedFontData.cpp:
1881         (WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted.
1882         * platform/graphics/SimpleFontData.cpp:
1883         (WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted.
1884
1885 2012-10-03  Adam Barth  <abarth@webkit.org>
1886
1887         Crash when calling document.open during unload
1888         https://bugs.webkit.org/show_bug.cgi?id=98287
1889
1890         Reviewed by Nate Chapin.
1891
1892         Calling document.open results in us nulling out m_documentLoader. This
1893         code doesn't properly handle that case and crashes.
1894
1895         Test: fast/parser/document-open-in-unload.html
1896
1897         * loader/FrameLoader.cpp:
1898         (WebCore::FrameLoader::commitProvisionalLoad):
1899
1900 2012-10-03  Benjamin Poulain  <bpoulain@apple.com>
1901
1902         Element::computeInheritedLanguage: evaluate the while() condition after fetching the string
1903         https://bugs.webkit.org/show_bug.cgi?id=98220
1904
1905         Reviewed by Andreas Kling.
1906
1907         * dom/Element.cpp:
1908         (WebCore::Element::computeInheritedLanguage):
1909         The condition is never false on the first execution. Move the condition to the
1910         end of the loop for fun and profit.
1911
1912 2012-10-03  Hans Wennborg  <hans@chromium.org>
1913
1914         Speech JavaScript API: Add SpeechRecognition.interimResults attribute
1915         https://bugs.webkit.org/show_bug.cgi?id=98279
1916
1917         Reviewed by Adam Barth.
1918
1919         Add the interimResults attribute and pass it to the embedder. It was
1920         added to the spec draft in
1921         http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c
1922
1923         Tested in fast/speech/scripted/basics.html
1924
1925         * Modules/speech/SpeechRecognition.cpp:
1926         (WebCore::SpeechRecognition::start):
1927         (WebCore::SpeechRecognition::SpeechRecognition):
1928         * Modules/speech/SpeechRecognition.h:
1929         (WebCore::SpeechRecognition::interimResults):
1930         (WebCore::SpeechRecognition::setInterimResults):
1931         * Modules/speech/SpeechRecognition.idl:
1932         * Modules/speech/SpeechRecognitionClient.h:
1933         (SpeechRecognitionClient):
1934         * Modules/speech/SpeechRecognitionController.h:
1935         (WebCore::SpeechRecognitionController::start):
1936
1937 2012-10-03  Hans Wennborg  <hans@chromium.org>
1938
1939         Speech JavaScript API: Remove resultdeleted event
1940         https://bugs.webkit.org/show_bug.cgi?id=98272
1941
1942         Reviewed by Adam Barth.
1943
1944         Remove the resultdeleted event. This was never used, and was removed
1945         from the spec draft in
1946         http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
1947
1948         The fast/speech/scripted/basics.html test is updated to reflect this.
1949
1950         * Modules/speech/SpeechRecognition.cpp:
1951         * Modules/speech/SpeechRecognition.h:
1952         (SpeechRecognition):
1953         * Modules/speech/SpeechRecognition.idl:
1954         * Modules/speech/SpeechRecognitionEvent.cpp:
1955         * Modules/speech/SpeechRecognitionEvent.h:
1956         (SpeechRecognitionEvent):
1957         * dom/EventNames.h:
1958         (WebCore):
1959
1960 2012-09-16  Mark Hahnenberg  <mhahnenberg@apple.com>
1961
1962         Delayed structure sweep can leak structures without bound
1963         https://bugs.webkit.org/show_bug.cgi?id=96546
1964
1965         Reviewed by Geoffrey Garen.
1966
1967         This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
1968         allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
1969         those objects with destructors and with immortal structures, and those objects with destructors that don't have 
1970         immortal structures. All of the objects of the third type (destructors without immortal structures) now 
1971         inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
1972         the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
1973
1974         No new tests.
1975
1976         * ForwardingHeaders/runtime/JSDestructableObject.h: Added.
1977         * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
1978         (JSDOMWrapper):
1979         (WebCore::JSDOMWrapper::JSDOMWrapper):
1980         * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
1981         e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
1982         (GenerateHeader):
1983         * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
1984         (ObjcFallbackObjectImp):
1985         * bridge/objc/objc_runtime.mm:
1986         (Bindings):
1987         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1988         * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
1989         (JSC):
1990         (JSC::RuntimeArray::destroy):
1991         * bridge/runtime_array.h:
1992         (JSC::RuntimeArray::create):
1993         (JSC):
1994         * bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
1995         (Bindings):
1996         (JSC::Bindings::RuntimeObject::RuntimeObject):
1997         * bridge/runtime_object.h:
1998         (RuntimeObject):
1999
2000 2012-10-02  Anders Carlsson  <andersca@apple.com>
2001
2002         Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
2003         https://bugs.webkit.org/show_bug.cgi?id=98217
2004
2005         Reviewed by Andreas Kling.
2006
2007         * WebCore.exp.in:
2008         * rendering/RenderLayerBacking.cpp:
2009         (WebCore::RenderLayerBacking::createGraphicsLayer):
2010         * rendering/RenderLayerCompositor.cpp:
2011         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2012         (WebCore::RenderLayerCompositor::ensureRootLayer):
2013
2014 2012-10-03  Joshua Bell  <jsbell@chromium.org>
2015
2016         IndexedDB: Optimize encodeString/decodeString
2017         https://bugs.webkit.org/show_bug.cgi?id=97794
2018
2019         Reviewed by Tony Chang.
2020
2021         Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling.
2022         The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy
2023         isn't sufficient, but the code used StringBuilder::append() character-by-character
2024         and custom byte-swapping which was slow.
2025
2026         Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string
2027         and putting it 20k times and getting it 20k times. On my test box, mean time before the
2028         patch was 8.2s, mean time after the patch was 4.6s.
2029
2030         Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*'
2031
2032         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2033         (WebCore::IDBLevelDBCoding::encodeString):
2034         (WebCore::IDBLevelDBCoding::decodeString):
2035
2036 2012-10-03  Keishi Hattori  <keishi@webkit.org>
2037
2038         Implement DataList UI for input type time on chromium
2039         https://bugs.webkit.org/show_bug.cgi?id=98240
2040
2041         Reviewed by Kent Tamura.
2042
2043         This adds datalist UI for input type time. We add the picker indicator to
2044         BaseMultipleFieldsDateAndTimeInputType. We enclose the dateTimeEdit element
2045         and picker indicator inside a new div element so we can position the picker
2046         indicator in the same place as input type=date.
2047
2048         Tests: platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html
2049                platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html
2050                platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html
2051                platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html
2052                platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html
2053
2054         * css/html.css:
2055         (input::-webkit-date-and-time-container):
2056         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2057         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
2058         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Creates a picker indicator.
2059         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open the picker on Alt+Down.
2060         (WebCore):
2061         (WebCore::BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged): Updates picker visibility.
2062         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility): In the future, DateInputType can override
2063         this so the picker indicator is always visible.
2064         (WebCore::BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator):
2065         (WebCore::BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator):
2066         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2067         (WebCore):
2068         (BaseMultipleFieldsDateAndTimeInputType):
2069         * html/shadow/DateTimeFieldElement.cpp:
2070         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Ignore Alt+down because it should trigger the picker to open.
2071         * rendering/RenderThemeChromiumCommon.cpp:
2072         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add time to the list.
2073
2074 2012-10-03  Andreas Kling  <kling@webkit.org>
2075
2076         Give CSSValueList backing vector an inline capacity.
2077         <http://webkit.org/b/98266>
2078         <rdar://problem/12421425>
2079
2080         Reviewed by Anders Carlsson.
2081
2082         Set an inline capacity of 4 on the CSSValue vector backing CSSValueList. This avoids an extra heap allocation
2083         in the common case, and reduces total memory use across the board, since the majority of CSSValueLists have
2084         at least 1 item, and the Vector will bump from 0 to 16 capacity on the first append.
2085
2086         394kB progression on Membuster3.
2087
2088         * css/CSSValueList.h:
2089         (CSSValueList):
2090
2091 2012-10-03  Ilya Tikhonovsky  <loislo@chromium.org>
2092
2093         Web Inspector: NMI: instrument NativeImageSkia.
2094         https://bugs.webkit.org/show_bug.cgi?id=96277
2095
2096         Reviewed by Yury Semikhatsky.
2097
2098         * platform/graphics/skia/NativeImageSkia.cpp:
2099         (WebCore::NativeImageSkia::reportMemoryUsage):
2100         (WebCore::reportMemoryUsage):
2101
2102 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
2103
2104         Web Inspector: remember the last dock option so that user could toggle between dock to bottom and right
2105         https://bugs.webkit.org/show_bug.cgi?id=98255
2106
2107         Reviewed by Vsevolod Vlasov.
2108
2109         - Introduced DockController.js that covers the dock mechanics
2110         - Removed dock orientation from the settings
2111         - Storing the last dock option to present it as default
2112         - Simplified the multi-option status bar button
2113
2114         * WebCore.gypi:
2115         * WebCore.vcproj/WebCore.vcproj:
2116         * inspector/compile-front-end.py:
2117         * inspector/front-end/DockController.js: Added.
2118         (WebInspector.DockController):
2119         (WebInspector.DockController.prototype.get element):
2120         (WebInspector.DockController.prototype.setDocked.set if):
2121         (WebInspector.DockController.prototype.setDocked):
2122         (WebInspector.DockController.prototype.setDockingUnavailable):
2123         (WebInspector.DockController.prototype._updateUI.get states):
2124         (WebInspector.DockController.prototype._updateUI):
2125         (WebInspector.DockController.prototype._decorateButtonForTargetState):
2126         (WebInspector.DockController.prototype._createDockOptions):
2127         (WebInspector.DockController.prototype._toggleDockState):
2128         (WebInspector.DockController.prototype.isCompactMode):
2129         (WebInspector.DockController.prototype.setCompactMode):
2130         * inspector/front-end/InspectorFrontendAPI.js:
2131         (InspectorFrontendAPI.setAttachedWindow):
2132         * inspector/front-end/InspectorFrontendHostStub.js:
2133         (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
2134         (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
2135         * inspector/front-end/Settings.js:
2136         * inspector/front-end/SettingsScreen.js:
2137         (WebInspector.GenericSettingsTab):
2138         * inspector/front-end/StatusBarButton.js:
2139         (WebInspector.StatusBarButton):
2140         * inspector/front-end/Toolbar.js:
2141         (WebInspector.Toolbar):
2142         (WebInspector.Toolbar.prototype.setCompactMode):
2143         (WebInspector.Toolbar.prototype._toolbarDragStart):
2144         (WebInspector.Toolbar.prototype._toolbarDrag):
2145         * inspector/front-end/WebKit.qrc:
2146         * inspector/front-end/externs.js:
2147         (WebInspector.toggleSearchingForNode):
2148         * inspector/front-end/inspector.css:
2149         (body.undocked.platform-mac-snowleopard #toolbar):
2150         (body.undocked.platform-mac-snowleopard #toolbar-dropdown):
2151         * inspector/front-end/inspector.html:
2152         * inspector/front-end/inspector.js:
2153         (WebInspector._createGlobalStatusBarItems):
2154         (windowLoaded):
2155         (WebInspector.setDockingUnavailable):
2156         * inspector/front-end/inspectorCommon.css:
2157         (body.dock-to-right:not(.undocked)):
2158         (body.dock-to-right.inactive:not(.undocked)):
2159
2160 2012-10-03  Vsevolod Vlasov  <vsevik@chromium.org>
2161
2162         Web Inspector: UISourceCode commitWorkingCopy should not fail when original script had syntax error.
2163         https://bugs.webkit.org/show_bug.cgi?id=97272
2164
2165         Reviewed by Pavel Feldman.
2166
2167         This patch is based on patch by John J. Barton.
2168
2169         * inspector/front-end/JavaScriptSource.js:
2170         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): added rawLocation null check.
2171
2172 2012-10-03  Alexander Pavlov  <apavlov@chromium.org>
2173
2174         Web Inspector: After "Edit as HTML", any click outside box should stop editing
2175         https://bugs.webkit.org/show_bug.cgi?id=98258
2176
2177         Reviewed by Vsevolod Vlasov.
2178
2179         Make the DOM tree OL span the entire height of its container in the Elements panel to catch mouse events.
2180
2181         * inspector/front-end/elementsPanel.css:
2182         (#elements-content > ol):
2183
2184 2012-10-03  Dongwoo Joshua Im  <dw.im@samsung.com>
2185
2186         [EFL] Skeleton code of File system API.
2187         https://bugs.webkit.org/show_bug.cgi?id=91187
2188
2189         Reviewed by Gyuyoung Kim.
2190
2191         Add skeleton code of File System API on EFL port.
2192         Implementation patches will be created later.
2193
2194         No new tests because this is just skeleton code.
2195
2196         * CMakeLists.txt: Add new files which created by other patches in Modules/filesystem/ directory.
2197         * PlatformEfl.cmake: Add AsyncFileSystemEfl.cpp.
2198         * platform/AsyncFileSystem.cpp:
2199         (WebCore):
2200         * platform/efl/AsyncFileSystemEfl.cpp: Added.
2201         * platform/efl/AsyncFileSystemEfl.h: Added.
2202
2203 2012-10-03  Andreas Kling  <kling@webkit.org>
2204
2205         Shrink ElementRareData by moving bool flags to NodeRareData.
2206         <http://webkit.org/b/98225>
2207
2208         Reviewed by Antti Koivisto.
2209
2210         Move all bool flags from ElementRareData to the bitfield in its base class NodeRareData.
2211         This shrinks ElementRareData by 8 bytes (on 64-bit) and saves a whopping 58kB on Membuster3.
2212         Also removed some double raredata hash lookups.
2213
2214         * dom/Element.cpp:
2215         (WebCore::Element::detach):
2216         (WebCore::Element::recalcStyle):
2217         (WebCore::Element::ensureShadow):
2218         (WebCore::Element::setStyleAffectedByEmpty):
2219         (WebCore::Element::styleAffectedByEmpty):
2220         (WebCore::Element::setIsInCanvasSubtree):
2221         (WebCore::Element::isInCanvasSubtree):
2222         (WebCore::Element::containsFullScreenElement):
2223         (WebCore::Element::setContainsFullScreenElement):
2224         * dom/ElementRareData.h:
2225         (ElementRareData):
2226         (WebCore::ElementRareData::ElementRareData):
2227         * dom/NodeRareData.h:
2228         (WebCore::NodeRareData::styleAffectedByEmpty):
2229         (WebCore::NodeRareData::setStyleAffectedByEmpty):
2230         (WebCore::NodeRareData::isInCanvasSubtree):
2231         (WebCore::NodeRareData::setIsInCanvasSubtree):
2232         (NodeRareData):
2233         (WebCore::NodeRareData::containsFullScreenElement):
2234         (WebCore::NodeRareData::setContainsFullScreenElement):
2235
2236 2012-10-03  Jussi Kukkonen  <jussi.kukkonen@intel.com>
2237
2238         getComputedStyle perspective-origin is based on the wrong bounding box
2239         https://bugs.webkit.org/show_bug.cgi?id=98027
2240
2241         Reviewed by Simon Fraser.
2242
2243         perspective-origin for ComputedStyleDeclaration is currently calculated using the
2244         wrong bounding box (sizingBox() which ends up as the contentbox).
2245
2246         Start using borderbox for ComputedStyleDeclaration perspective-origin, similar to
2247         what transform-origin already does.
2248
2249         Test: fast/css/getComputedStyle/getComputedStyle-origin-percentage.html
2250
2251         * css/CSSComputedStyleDeclaration.cpp:
2252         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2253
2254 2012-10-03  Patrick Gansterer  <paroga@webkit.org>
2255
2256         Build fix for WinCE after r130160.
2257
2258         * platform/graphics/FontFastPath.cpp:
2259         (WebCore::Font::glyphDataAndPageForCharacter):
2260
2261 2012-10-03  Tommy Widenflycht  <tommyw@google.com>
2262
2263         MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation.
2264         https://bugs.webkit.org/show_bug.cgi?id=98149
2265
2266         Reviewed by Adam Barth.
2267
2268         The chromium implementation needs to know which Frame created a PeerConnection so
2269         that the right housekeeping can take place correctly.
2270
2271         Not testable in DRT, but have verified the change manually and with our pyautotests.
2272
2273         * Modules/mediastream/RTCPeerConnection.cpp:
2274         (WebCore::RTCPeerConnection::RTCPeerConnection):
2275         * loader/FrameLoaderClient.h:
2276         (WebCore):
2277         (FrameLoaderClient):
2278         (WebCore::FrameLoaderClient::dispatchWillStartUsingPeerConnectionHandler):
2279         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2280         (WebCore::RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler):
2281         (WebCore):
2282         (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
2283         (WebCore::RTCPeerConnectionHandlerChromium::initialize):
2284         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2285         (RTCPeerConnectionHandlerChromium):
2286
2287 2012-10-03  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2288
2289         Web Inspector: Profiles: taking heap snapshot causes error message in console.
2290         https://bugs.webkit.org/show_bug.cgi?id=97890
2291
2292         Reviewed by Yury Semikhatsky.
2293
2294         Actual problem is that proxy loader is closed twice.
2295
2296         "_snapshotReceived" should never try to close receiver,
2297         because it is a callback fired by close.
2298
2299         Also minor glitches fixed:
2300          - taking snapshot shows "Loading..." status first,
2301         and then "Saving xxx%";
2302          - after all chunks are sent "Parsing" status is set and
2303         then is replaced with "Saving 100%";
2304          - removed dead code in proxy;
2305          - proxy was ignoring callback parameter;
2306          - "Loading %d\%" is not localized.
2307
2308         * English.lproj/localizedStrings.js: Added missing "Loading %d%" string.
2309         * inspector/front-end/HeapSnapshotProxy.js: Removed dead code.
2310         (WebInspector.HeapSnapshotLoaderProxy):
2311         (WebInspector.HeapSnapshotLoaderProxy.prototype.write): Make this method
2312         interface-conformant.
2313         * inspector/front-end/HeapSnapshotView.js:
2314         (WebInspector.HeapProfileHeader): Fixed update-status and
2315         finish-transfer logic.
2316
2317 2012-10-03  Jochen Eisinger  <jochen@chromium.org>
2318
2319         Make sure that user gestures can't be consumed twice
2320         https://bugs.webkit.org/show_bug.cgi?id=97483
2321
2322         Reviewed by Adam Barth.
2323
2324         Instead of a simple counter, use a ref counted token to track how many
2325         user gestures happened and where consumed. When creating a timer that
2326         is supposed to forward the user gesture, take a reference to this token
2327         and reinstantiate the UserGestureIndicator with that token when the
2328         timer is triggered.
2329
2330         Tests: platform/chromium/fast/events/popup-forwarded-gesture-blocked.html
2331                platform/chromium/fast/events/popup-forwarded-gesture.html
2332
2333         * dom/UserGestureIndicator.cpp:
2334         (WebCore):
2335         (WebCore::UserGestureIndicator::UserGestureIndicator):
2336         (WebCore::UserGestureIndicator::~UserGestureIndicator):
2337         (WebCore::UserGestureIndicator::processingUserGesture):
2338         (WebCore::UserGestureIndicator::consumeUserGesture):
2339         (WebCore::UserGestureIndicator::currentToken):
2340         * dom/UserGestureIndicator.h:
2341         (Token):
2342         (WebCore::UserGestureIndicator::Token::~Token):
2343         (UserGestureIndicator):
2344         * page/DOMTimer.cpp:
2345         (WebCore::DOMTimer::DOMTimer):
2346         (WebCore::DOMTimer::fired):
2347         * page/DOMTimer.h:
2348         (DOMTimer):
2349
2350 2012-10-03  Dominic Mazzoni  <dmazzoni@google.com>
2351
2352         AX: Heap-use-after-free when deleting a ContainerNode with an AX object
2353         https://bugs.webkit.org/show_bug.cgi?id=98073
2354
2355         Reviewed by Hajime Morita.
2356
2357         Calls axObjectCache()->remove(this) in ~ContainerNode so that the AX tree
2358         doesn't try to access the container node while walking up the parent chain
2359         from one of the container node's children.
2360
2361         Test: accessibility/container-node-delete-causes-crash.html
2362
2363         * dom/ContainerNode.cpp:
2364         (WebCore::ContainerNode::~ContainerNode):
2365         * dom/Node.cpp:
2366         (WebCore::Node::~Node):
2367         * dom/Node.h:
2368         (WebCore::Node::document):
2369         (WebCore::Node::documentInternal):
2370
2371 2012-10-03  Vsevolod Vlasov  <vsevik@chromium.org>
2372
2373         Web Inspector: SourceURL should be taken from debugger agent when possible.
2374         https://bugs.webkit.org/show_bug.cgi?id=98239
2375
2376         Reviewed by Yury Semikhatsky.
2377
2378         Removed a check that sourceURL coming from js engine is the same as the one parsed by debugger agent.
2379         Alwys use the one from debugger agent now.
2380
2381         * inspector/InspectorDebuggerAgent.cpp:
2382         (WebCore::InspectorDebuggerAgent::didParseSource):
2383
2384 2012-10-03  Ilya Tikhonovsky  <loislo@chromium.org>
2385
2386         Unreviewed. Touch FrameView.cpp file for fixing mac bot compilation.
2387
2388         * page/FrameView.cpp:
2389         (WebCore):
2390
2391 2012-10-02  Ilya Tikhonovsky  <loislo@chromium.org>
2392
2393         Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
2394         https://bugs.webkit.org/show_bug.cgi?id=98163
2395
2396         Reviewed by Yury Semikhatsky.
2397
2398         The text was changed to "Load Heap Snapshot..."
2399         Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
2400         The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
2401
2402         * English.lproj/localizedStrings.js:
2403         * inspector/front-end/ProfilesPanel.js:
2404         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
2405         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
2406
2407 2012-10-03  Harald Alvestrand  <hta@google.com>
2408
2409         Add data passing to the GetStats interface of RTCPeerConnection
2410         https://bugs.webkit.org/show_bug.cgi?id=98003
2411
2412         Reviewed by Adam Barth.
2413
2414         Added an RTCStatsResponseBase interface to platform, and let the
2415         RTCStatsRequestImpl class produce an implementation of it that's returned
2416         to WebCore.
2417
2418         Tested by extension of the RTCPeerConnection-stats.html test.
2419
2420         * Modules/mediastream/RTCStatsElement.cpp:
2421         (WebCore::RTCStatsElement::addStatistic):
2422         (WebCore):
2423         * Modules/mediastream/RTCStatsElement.h:
2424         (RTCStatsElement):
2425         * Modules/mediastream/RTCStatsReport.cpp:
2426         (WebCore):
2427         (WebCore::RTCStatsReport::addElement):
2428         (WebCore::RTCStatsReport::addStatistic):
2429         * Modules/mediastream/RTCStatsReport.h:
2430         (RTCStatsReport):
2431         * Modules/mediastream/RTCStatsRequestImpl.cpp:
2432         (WebCore::RTCStatsRequestImpl::createResponse):
2433         (WebCore):
2434         (WebCore::RTCStatsRequestImpl::requestSucceeded):
2435         * Modules/mediastream/RTCStatsRequestImpl.h:
2436         (RTCStatsRequestImpl):
2437         * Modules/mediastream/RTCStatsResponse.cpp:
2438         (WebCore::RTCStatsResponse::create):
2439         (WebCore::RTCStatsResponse::addReport):
2440         (WebCore):
2441         (WebCore::RTCStatsResponse::addElement):
2442         (WebCore::RTCStatsResponse::addStatistic):
2443         * Modules/mediastream/RTCStatsResponse.h:
2444         (RTCStatsResponse):
2445         * WebCore.gypi:
2446         * platform/chromium/support/WebRTCStatsRequest.cpp:
2447         (WebKit::WebRTCStatsRequest::response):
2448         (WebKit):
2449         (WebKit::WebRTCStatsRequest::requestSucceeded):
2450         * platform/chromium/support/WebRTCStatsResponse.cpp: Added.
2451         (WebKit):
2452         (WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
2453         (WebKit::WebRTCStatsResponse::assign):
2454         (WebKit::WebRTCStatsResponse::reset):
2455         (WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>):
2456         (WebKit::WebRTCStatsResponse::addReport):
2457         (WebKit::WebRTCStatsResponse::addElement):
2458         (WebKit::WebRTCStatsResponse::addStatistic):
2459         * platform/mediastream/RTCStatsRequest.h:
2460         (WebCore):
2461         (RTCStatsRequest):
2462         * platform/mediastream/RTCStatsResponseBase.h: Added.
2463         (WebCore):
2464         (RTCStatsResponseBase):
2465         (WebCore::RTCStatsResponseBase::~RTCStatsResponseBase):
2466
2467 2012-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2468
2469         [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
2470         https://bugs.webkit.org/show_bug.cgi?id=97895
2471
2472         Reviewed by Martin Robinson.
2473
2474         * platform/network/NetworkingContext.h:
2475         (NetworkingContext): Add initiatingPageID().
2476         * platform/network/ResourceHandle.h:
2477         (ResourceHandle): Add static method
2478         getSoupRequestInitiaingPageID().
2479         * platform/network/ResourceHandleInternal.h:
2480         (ResourceHandleInternal): Add initiatingPageID().
2481         * platform/network/soup/ResourceHandleSoup.cpp:
2482         (WebCore::ResourceHandleInternal::initiatingPageID): Get the
2483         initiating page ID of the resource handle networking context.
2484         (WebCore::setSoupRequestInitiaingPageID): Helper function to
2485         attach a page ID to a SoupRequest.
2486         (WebCore::startHTTPRequest): Call setSoupRequestInitiaingPageID()
2487         to attch the initiating page ID to the SoupRequest.
2488         (WebCore::startNonHTTPRequest): Ditto.
2489         (WebCore::ResourceHandle::getSoupRequestInitiaingPageID): Static
2490         method to get the page ID attached to a SoupRequest.
2491
2492 2012-10-03  Kent Tamura  <tkent@chromium.org>
2493
2494         Introduce DateComponents::minimumYear and maximumYear
2495         https://bugs.webkit.org/show_bug.cgi?id=98230
2496
2497         Reviewed by Kentaro Hara.
2498
2499         Share same difinitions in DateComponents.cpp and DateTimeFieldElements.cpp.
2500
2501         No new tests. This doesn't change any bahevior.
2502
2503         * platform/DateComponents.h:
2504         (WebCore::DateComponents::minimumYear): Moved from DateComponents.cpp.
2505         (WebCore::DateComponents::maximumYear): ditto.
2506         * platform/DateComponents.cpp:
2507         (WebCore): Move out static minimumYear and maximumYear.
2508         (WebCore::DateComponents::parseYear): Use DateCompnents::minimumYear and/or maximumYear.
2509         (WebCore::withinHTMLDateLimits): ditto.
2510         (WebCore::DateComponents::parseWeek): ditto.
2511         (WebCore::DateComponents::setMonthsSinceEpoch): ditto.
2512         (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): ditto.
2513
2514         * html/shadow/DateTimeFieldElements.cpp:
2515         (WebCore): Remove minimumYear and maximumYear.
2516         (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
2517         Use DateComponents::minimumYear and maximumYear.
2518
2519
2520 2012-10-02  Arko Saha  <arko@motorola.com>
2521
2522         Microdata: itemprop names must not override builtin properties.
2523         https://bugs.webkit.org/show_bug.cgi?id=98025
2524
2525         Reviewed by Kentaro Hara.
2526
2527         We should look in the prototype for functions before assuming it as
2528         an item's name. Return false if the prototype of the object has a
2529         property (function) with propertyName.
2530         Named properties Spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties
2531         Named property visibility algorithm:
2532         http://dev.w3.org/2006/webapi/WebIDL/#indexed-and-named-properties
2533         ...
2534         7. If the result of calling the [[HasProperty]] internal method on
2535         prototype with property name P is true, then return false.
2536         ...
2537         Also [OverrideBuiltins] is not declared for any of the properties,
2538         hence no overriding is allowed in this case.
2539
2540         Test: fast/dom/MicroData/itemprop-names-override-builtin-properties.html
2541
2542         * bindings/scripts/CodeGeneratorJS.pm:
2543         (GenerateGetOwnPropertySlotBody):
2544         (GenerateGetOwnPropertyDescriptorBody):
2545
2546 2012-10-02  Keishi Hattori  <keishi@webkit.org>
2547
2548         REGRESSION (r129738): Suggestion picker label is placed in the wrong location
2549         https://bugs.webkit.org/show_bug.cgi?id=98094
2550
2551         Reviewed by Kent Tamura.
2552
2553         We needed to reverse padding-left/right when rtl.
2554
2555         No new tests. Covered by date-suggestion-picker-appearance.html.
2556
2557         * Resources/pagepopups/suggestionPicker.css:
2558         (.suggestion-list-entry .label):
2559         (.rtl .suggestion-list-entry .label):
2560
2561 2012-10-02  Yury Semikhatsky  <yurys@chromium.org>
2562
2563         Provide memory instrumentation for HashCountedSet
2564         https://bugs.webkit.org/show_bug.cgi?id=98138
2565
2566         Reviewed by Pavel Feldman.
2567
2568         Replaced addHashCountedSet calls with addMember that now automatically
2569         detects HashCountedSet and calls appropriate routine.
2570
2571         * css/CSSImageGeneratorValue.cpp:
2572         (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
2573         * loader/cache/CachedResource.cpp:
2574
2575 2012-10-02  Nandor Huszka  <hnandor@inf.u-szeged.hu>
2576
2577         Buildfix after r130235.
2578
2579         Reviewed by Csaba Osztrogonác.
2580
2581         systemAllowsMultisamplingOnATICards was deleted from GraphicsContext3D,
2582         but function body remained in GraphicsContext3DOpenGLES. Delete method body.
2583
2584         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2585
2586 2012-10-02  Kent Tamura  <tkent@chromium.org>
2587
2588         Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types.
2589
2590         * html/shadow/DateTimeFieldElements.cpp:
2591         If a placeholder stirng is empty, use a sequence of "-".
2592         (WebCore::DateTimeDayFieldElement::create):
2593         (WebCore::DateTimeMonthFieldElement::create):
2594         (WebCore::DateTimeYearFieldElement::create):
2595
2596 2012-10-02  MORITA Hajime  <morrita@google.com>
2597
2598         https://bugs.webkit.org/show_bug.cgi?id=98134
2599         [Refactoring] StyleResolver::matchScopedAuthorRules() could be simpler.
2600
2601         Reviewed by Dimitri Glazkov.
2602
2603         matchScopedAuthorRules() did have some optimization which only
2604         makes sense for heavily nested shadow tree. However, we don't see
2605         such type of usage of Shadow DOM and this looks premature
2606         optimization. This change unified its triple for loop into one,
2607         which makes the code much simpler.
2608
2609         No new tests. Covered by existing tests.
2610
2611         * css/StyleResolver.cpp:
2612         (WebCore::StyleResolver::matchScopedAuthorRules):
2613
2614 2012-10-02  Kent Tamura  <tkent@chromium.org>
2615
2616         Introduce Localizer::dateTimeFormatWithSecond and dateTimeFormatWithoutSecond
2617         https://bugs.webkit.org/show_bug.cgi?id=98229
2618
2619         Reviewed by Kentaro Hara.
2620
2621         Unify identical code in DateTimeInputType and DateTimeLocalInputType as
2622         Localizer member functions.
2623         They still have some common code. We'll address it later.
2624
2625         No new tests. This doesn't change any behavior.
2626
2627         * platform/text/Localizer.h:
2628         (Localizer): Add dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
2629         * platform/text/Localizer.cpp:
2630         (WebCore::Localizer::dateTimeFormatWithSecond):
2631         Implemented. Just concatenating dateFormat, a space, and timeFormat.
2632         (WebCore::Localizer::dateTimeFormatWithoutSecond):
2633         Implemented. Just concatenating dateFormat, a space, and shortTimeFormat.
2634
2635         * html/DateTimeInputType.cpp:
2636         (WebCore::DateTimeInputType::setupLayoutParameters):
2637         Use dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
2638         * html/DateTimeLocalInputType.cpp:
2639         (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
2640
2641 2012-10-03  Kent Tamura  <tkent@chromium.org>
2642
2643         Refactoring: DateTimeEditBuilder had better hold LayoutParameters
2644         https://bugs.webkit.org/show_bug.cgi?id=98228
2645
2646         Reviewed by Kentaro Hara.
2647
2648         Stop copying multiple members of LayoutParameters in DateTimeEditBuilder
2649         constructor. This change improves code size and runtime cost.
2650
2651         No new tests. This doesn't change user-visible behavior.
2652
2653         * html/shadow/DateTimeEditElement.cpp:
2654         (DateTimeEditBuilder): Add a comment about lifetime of objects.
2655         (WebCore::DateTimeEditBuilder::stepRange):
2656         Added. A helper to access m_parameters.stepRange.
2657         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder):
2658         Remove m_stepRange, m_localizer, m_placeholderFor* members.
2659         Add m_parameters.
2660         (WebCore::DateTimeEditBuilder::needMillisecondField):
2661         Use stepRange() instead of m_stepRange.
2662         (WebCore::DateTimeEditBuilder::visitField):
2663         Use m_parameters.placeholderFor*.
2664         (WebCore::DateTimeEditBuilder::shouldMillisecondFieldReadOnly):
2665         Use stepRange() instead of m_stepRange.
2666         (WebCore::DateTimeEditBuilder::shouldMinuteFieldReadOnly): ditto.
2667         (WebCore::DateTimeEditBuilder::shouldSecondFieldReadOnly): ditto.
2668
2669 2012-10-02  Kent Tamura  <tkent@chromium.org>
2670
2671         Implement LocaleICU::dateFormat
2672         https://bugs.webkit.org/show_bug.cgi?id=98118
2673
2674         Reviewed by Hajime Morita.
2675
2676         http://trac.webkit.org/changeset/130127 introduced
2677         Localizer::dateFormat, and this is its implementation for LocaleICU
2678         classs. The code is going to be used when
2679         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
2680
2681         No new tests. The function is not used yet.
2682
2683         * platform/text/LocaleICU.cpp:
2684         (WebCore::LocaleICU::dateFormat):
2685         Implemented. Note that m_shortDateFormat is a UDateFormat object, which
2686         knows various format information.
2687         * platform/text/LocaleICU.h:
2688         (LocaleICU): Add m_dateFormat to cache the format string.
2689
2690 2012-10-02  Kent Tamura  <tkent@chromium.org>
2691
2692         [Mac][Chromium-Mac] Implement LocaleMac::dateFormat
2693         https://bugs.webkit.org/show_bug.cgi?id=98116
2694
2695         Reviewed by Hajime Morita.
2696
2697         http://trac.webkit.org/changeset/130127 introduced
2698         Localizer::dateFormat, and this is its implementation for LocaleICU
2699         classs. The code is going to be used when
2700         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
2701
2702         No new tests. The function is not used yet.
2703
2704         * platform/text/mac/LocaleMac.h:
2705         (LocaleMac): Declare m_dateFormat.
2706         * platform/text/mac/LocaleMac.mm:
2707         (WebCore::LocaleMac::dateFormat): Implemented.
2708
2709 2012-10-02  Kent Tamura  <tkent@chromium.org>
2710
2711         [Chromium-Win] Implement LocaleWin::dateFormat
2712         https://bugs.webkit.org/show_bug.cgi?id=98117
2713
2714         Reviewed by Kentaro Hara.
2715
2716         http://trac.webkit.org/changeset/130127 introduced
2717         Localizer::dateFormat, and this is its implementation for LocaleICU
2718         classs. The code is going to be used when
2719         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
2720
2721         Tests: Added a new test to WebKit/chromium/tests/LocaleWinTest.cpp.
2722
2723         * platform/text/LocaleWin.cpp:
2724         (WebCore::parseDateFormat):
2725         Fix a continuous apostrophes parsing bug; "abc''''def" produced "abc'''def"
2726         (WebCore::appendAsLDMLLiteral):
2727         A helper function to make a literal string for LDML.
2728         (WebCore::convertWindowsDateFormatToLDML):
2729         Creates an LDML format from a parsed date format tokens.
2730         (WebCore::LocaleWin::dateFormat):
2731         Implemented. This uses convertWindowsDateFormatToLDML.
2732         (WebCore::LocaleWin::dateFormat):
2733         Added for testing. The source windows format is specified as a function
2734         argument.
2735         * platform/text/LocaleWin.h:
2736         (LocaleWin): Declare m_dateFormat and dateFormat().
2737
2738 2012-10-02  Ian Vollick  <vollick@chromium.org>
2739
2740         [chromium] Fix spelling of isNVIDIA override in Extensions3DChromium
2741         https://bugs.webkit.org/show_bug.cgi?id=98219
2742
2743         Reviewed by Dean Jackson.
2744
2745         The override in Extensions3dChromium should have been spelled isNVIDIA, not isNVidia.
2746
2747         No new tests. No change in functionality.
2748
2749         * platform/graphics/chromium/Extensions3DChromium.h:
2750         (WebCore::Extensions3DChromium::isNVIDIA):
2751
2752 2012-10-02  Anders Carlsson  <andersca@apple.com>
2753
2754         Try to fix the Snow Leopard build.
2755
2756         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2757
2758 2012-10-02  Joshua Bell  <jsbell@chromium.org>
2759
2760         Add htons/htonl definitions and implementations
2761         https://bugs.webkit.org/show_bug.cgi?id=98054
2762
2763         Reviewed by Darin Adler.
2764
2765         Update users of htons and friends to use new wtf/ByteOrder.h header.
2766
2767         No new tests - just refactoring.
2768
2769         * platform/graphics/WOFFFileFormat.cpp:
2770         * platform/graphics/chromium/VDMXParser.cpp:
2771
2772 == Rolled over to ChangeLog-2012-10-02 ==