Validate CSS Device Adaptation properties and resolve shorthands
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-05  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2
3         Validate CSS Device Adaptation properties and resolve shorthands
4         https://bugs.webkit.org/show_bug.cgi?id=95962
5
6         Reviewed by Alexis Menard.
7
8         Add the missing keywords and properties for the viewport at-rule.
9         Note that we have to mark that we are inside a viewport scope because
10         some properties are not validated as they would be inside a style
11         rule. As an example, the semantics of CSSPropertyWidth are completely
12         different: on a viewport rule, it stands for a shorthand for the
13         minimum and maximum width.
14
15         Test: css3/device-adapt/viewport-properties-validation.html
16
17         * css/CSSComputedStyleDeclaration.cpp:
18         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
19         * css/CSSParser.cpp:
20         (WebCore::CSSParser::parseValue):
21         (WebCore):
22         (WebCore::CSSParser::parseViewportProperty):
23         (WebCore::CSSParser::parseViewportShorthand):
24         * css/CSSParser.h:
25         * css/CSSProperty.cpp:
26         (WebCore::CSSProperty::isInheritedProperty):
27         * css/CSSPropertyNames.in:
28         * css/CSSValueKeywords.in:
29
30 2012-11-05  Sheriff Bot  <webkit.review.bot@gmail.com>
31
32         Unreviewed, rolling out r133286, r133385, and r133394.
33         http://trac.webkit.org/changeset/133286
34         http://trac.webkit.org/changeset/133385
35         http://trac.webkit.org/changeset/133394
36         https://bugs.webkit.org/show_bug.cgi?id=101198
37
38         Broke image placement on some web sites. (Requested by kling
39         on #webkit).
40
41         * css/StyleResolver.cpp:
42         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
43         (WebCore::StyleResolver::matchAllRules):
44         (WebCore::StyleResolver::canShareStyleWithElement):
45         * dom/Attr.cpp:
46         (WebCore::Attr::detachFromElementWithValue):
47         * dom/Element.cpp:
48         (WebCore::Element::~Element):
49         (WebCore::Element::detachAttribute):
50         (WebCore::Element::getAttribute):
51         (WebCore::Element::setAttributeNode):
52         (WebCore::Element::removeAttributeInternal):
53         (WebCore::Element::getAttributeNode):
54         (WebCore::Element::getAttributeNodeNS):
55         (WebCore::Element::normalizeAttributes):
56         (WebCore::Element::attrIfExists):
57         (WebCore::Element::ensureAttr):
58         (WebCore::Element::cloneAttributesFromElement):
59         * dom/Element.h:
60         (Element):
61         (WebCore::Element::updateInvalidAttributes):
62         * dom/ElementAttributeData.cpp:
63         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
64         (WebCore):
65         (WebCore::attrListMap):
66         (WebCore::attrListForElement):
67         (WebCore::ensureAttrListForElement):
68         (WebCore::removeAttrListForElement):
69         (WebCore::findAttrInList):
70         (WebCore::ElementAttributeData::attrIfExists):
71         (WebCore::ElementAttributeData::ensureAttr):
72         (WebCore::ElementAttributeData::setAttr):
73         (WebCore::ElementAttributeData::removeAttr):
74         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
75         (WebCore::ElementAttributeData::reportMemoryUsage):
76         (WebCore::ElementAttributeData::cloneDataFrom):
77         (WebCore::ElementAttributeData::clearAttributes):
78         (WebCore::ElementAttributeData::getAttributeNode):
79         * dom/ElementAttributeData.h:
80         (WebCore):
81         (WebCore::ElementAttributeData::attributeStyle):
82         (WebCore::ElementAttributeData::setAttributeStyle):
83         (ElementAttributeData):
84         (WebCore::ElementAttributeData::ElementAttributeData):
85         * dom/Node.h:
86         (WebCore):
87         (WebCore::Node::hasAttrList):
88         (WebCore::Node::attributeStyleDirty):
89         (WebCore::Node::setAttributeStyleDirty):
90         (WebCore::Node::clearAttributeStyleDirty):
91         (Node):
92         (WebCore::Node::setHasAttrList):
93         (WebCore::Node::clearHasAttrList):
94         (WebCore::Node::isStyleAttributeValid):
95         (WebCore::Node::setIsStyleAttributeValid):
96         (WebCore::Node::clearIsStyleAttributeValid):
97         * dom/StyledElement.cpp:
98         (WebCore::StyledElement::updateStyleAttribute):
99         (WebCore::StyledElement::attributeChanged):
100         (WebCore::StyledElement::styleAttributeChanged):
101         (WebCore::StyledElement::inlineStyleChanged):
102         (WebCore::StyledElement::updateAttributeStyle):
103         * dom/StyledElement.h:
104         (StyledElement):
105         (WebCore::StyledElement::invalidateStyleAttribute):
106         (WebCore::StyledElement::attributeStyle):
107         * inspector/InspectorCSSAgent.cpp:
108         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
109
110 2012-11-05  Simon Hausmann  <simon.hausmann@digia.com>
111
112         Unreviewed trivial Qt build fix.
113
114         Surround imports from QtGui by QT_{BEGIN,END}_NAMESPACE to fix namespaced
115         builds.
116
117         * platform/graphics/qt/GraphicsContextQt.cpp:
118         * platform/graphics/qt/ImageQt.cpp:
119
120 2012-11-05  Shinya Kawanaka  <shinyak@chromium.org>
121
122         [Shadow] ShadowRoot type is not set correctly.
123         https://bugs.webkit.org/show_bug.cgi?id=101188
124
125         Reviewed by Hajime Morita.
126
127         ShadowRoot type is not set correctly in Release build. We have had to remove #ifndef block.
128
129         Test: fast/dom/shadow/shadowroot-type.html
130
131         * dom/ShadowRoot.cpp:
132         (WebCore::ShadowRoot::create):
133         * testing/Internals.cpp:
134         (WebCore::Internals::shadowRootType):
135         (WebCore):
136         * testing/Internals.h:
137         (Internals):
138         * testing/Internals.idl:
139
140 2012-11-05  Kent Tamura  <tkent@chromium.org>
141
142         BaseChooserOnlyDateAndTimeInputType should implement DateTimeChooserClient
143         https://bugs.webkit.org/show_bug.cgi?id=101038
144
145         Reviewed by Hajime Morita.
146
147         Add DateTimeChooserClient behavior to BaseChooserOnlyDateAndTimeInputType.
148         It means that date/time input elements without
149         ENABLE_INPUT_MULTIPLE_FIELDS_UI can open date/time choosers by
150         DOMActivate event.
151
152         This patch doesn't change behavior yet because Chromimum-Android port
153         intercepts user events and doesn't deliver them to date/time input
154         elements. <http://crbug.com/159381>
155
156         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
157         Add DateTimeChooserClient behavior. The code is similar to
158         PickerIndicatorElement.
159         (WebCore::BaseChooserOnlyDateAndTimeInputType::~BaseChooserOnlyDateAndTimeInputType):
160         Closes DateTimeChooser.
161         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
162         Open DateTimeChooser if
163          - The element is not disabled,
164          - The element is not read-only,
165          - The element has a renderer,
166          - This event is created by a user gesture, and
167          - The element has no DateTimeChooser.
168         (WebCore::BaseChooserOnlyDateAndTimeInputType::detach):
169         Closes DateTimeChooser.
170         (WebCore::BaseChooserOnlyDateAndTimeInputType::didChooseValue):
171         Set a string value coming from a chooser to the input element.
172         (WebCore::BaseChooserOnlyDateAndTimeInputType::didEndChooser):
173         Clear m_dateTimeChooser when the chooser was closed.
174         (WebCore::BaseChooserOnlyDateAndTimeInputType::closeDateTimeChooser):
175         Requests to close the chooser.
176         * html/BaseChooserOnlyDateAndTimeInputType.h:
177         (BaseChooserOnlyDateAndTimeInputType):
178          - Implement DateTimeChooserClient
179          - Add closeDateTimeChooser helper function.
180          - Add detach override.
181          - Add m_dateTimeChooser.
182         * html/HTMLInputElement.cpp:
183         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
184         Added. The code is moved from PickerIndicatorElement.cpp in order to
185         share it with BaseChooserOnlyDateAndTimeInputType.
186         * html/HTMLInputElement.h:
187         (HTMLInputElement): Declare setupDateTimeChooserParameters.
188         * html/shadow/PickerIndicatorElement.cpp:
189         (WebCore::PickerIndicatorElement::openPopup):
190         Move some code to HTMLInputElement::setupDateTimeChooserParameters.
191
192 2012-11-04  Julien Chaffraix  <jchaffraix@webkit.org>
193
194         Fix the collapsing border code to handle mixed directionality at the row level
195         https://bugs.webkit.org/show_bug.cgi?id=101060
196
197         Reviewed by Ojan Vafai.
198
199         After bug 87900, we support mixed directionality at the row-group level. For coherency
200         - as the underlying code didn't support it - we were artificially ignoring 'direction'
201         below the row-group. This change relaxes the restriction and patches the collapsing
202         borders code to query the right style and border.
203
204         Tests: fast/table/border-collapsing/table-ltr-rows-mixed-direction.html
205                fast/table/border-collapsing/table-rtl-row-mixed-direction.html
206
207         * rendering/RenderTable.cpp:
208         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
209         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
210         Changed to query the row's direction.
211
212         * rendering/RenderTableCell.cpp:
213         (WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
214         (WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
215         Added 2 helper functions. They determine if a specific cell's border
216         adjoins the table. This code is required as the last cell's end border
217         can be resolved against the start border.
218
219         (WebCore::RenderTableCell::computeCollapsedStartBorder):
220         (WebCore::RenderTableCell::computeCollapsedEndBorder):
221         Updated these functions now that being the start / end column doesn't mean
222         that we have to resolve against the row / row-group / table's border.
223
224         * rendering/RenderTableCell.h:
225         (WebCore::RenderTableCell::styleForCellFlow):
226         Updated to return the row's style.
227
228         * rendering/RenderTableRow.cpp:
229         (WebCore::RenderTableRow::borderAdjoiningStartCell):
230         (WebCore::RenderTableRow::borderAdjoiningEndCell):
231         * rendering/RenderTableSection.cpp:
232         (WebCore::RenderTableSection::borderAdjoiningStartCell):
233         (WebCore::RenderTableSection::borderAdjoiningEndCell):
234         Updated these functions to work with mixed directionality.
235
236         * rendering/RenderTableSection.cpp:
237         (WebCore::RenderTableSection::setLogicalPositionForCell):
238         Changed this function to use the section's direction. This is wrong and should be changed
239         once we properly fix the collapsing border code.
240
241         (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
242         Added a FIXME.
243
244         * rendering/style/CollapsedBorderValue.h:
245         (WebCore::CollapsedBorderValue::width):
246         This is a bug in our implementation: we used to return a non-zero width for inexistant borders (per CSS 2.1,
247         'border-style: off | hidden' should have a 0 width). This is covered by our existing tests (among others by
248         fast/table/border-collapsing/last-cell-left-border-hidden-table-ltr-section-rtl.html).
249
250 2012-11-04  Andrey Adaikin  <aandrey@chromium.org>
251
252         Web Inspector: [Canvas] do not blow up the capturing log
253         https://bugs.webkit.org/show_bug.cgi?id=100752
254
255         Reviewed by Pavel Feldman.
256
257         Clear obsolete calls in the canvas 2D capturing log in runtime.
258         Now we store in the log only minimum number of calls that are necessary to replay a
259         canvas 2D context. To achieve that we find in runtime those calls in the log that no
260         longer contribute to the final context state and remove them.
261         These are the rules according which we find and remove such calls:
262         - all PATH methods between a clip() call and beginPath() call can be removed
263         - all MATRIX methods before a restore() or setTransform() call but after any PATH or corresponding save() method
264         - all consecutive save() + restore() calls
265
266         Tests: inspector/profiler/canvas2d/canvas2d-api-changes.html
267                inspector/profiler/canvas2d/canvas2d-profiler-capturing-basics.html
268
269         * inspector/InjectedScriptCanvasModuleSource.js:
270         (.):
271
272 2012-11-04  Shinya Kawanaka  <shinyak@chromium.org>
273
274         [Shadow] ShadowRoot should have a method to return ShadowRootType.
275         https://bugs.webkit.org/show_bug.cgi?id=101178
276
277         Reviewed by Hajime Morita.
278
279         When we style PseudoCustomElement, we have to know ShadowRootType.
280         We would like to expose a method to get ShadowRootType also in Release mode.
281
282         This is a preparation patch for Bug 101170.
283
284         * dom/ShadowRoot.h:
285         (ShadowRoot):
286
287 2012-11-04  Keishi Hattori  <keishi@webkit.org>
288
289         Introduce Month class to calendar picker
290         https://bugs.webkit.org/show_bug.cgi?id=101024
291
292         Reviewed by Kent Tamura.
293
294         Month class needs to be introduced to implement a month picker. This
295         patch just introduces the Month class into the calendar picker without
296         changing the current behavior.
297
298         No new tests. Covered by existing calendar-picker-*.html tests.
299
300         * Resources/pagepopups/calendarPicker.js:
301         (Month.prototype.toLocaleString): Returns a localized month string.
302         (Month): Takes a Month object, number representing the month, or year and month numbers.
303         (Month.parse): Returns a new Month from an ISO month string.
304         (Month.createFromDate): Returns a new Month containing the given datetime.
305         (Month.prototype.equals): Returns true if the given month is the same.
306         (Month.prototype.previous): Returns the previous month.
307         (Month.prototype.next): Returns the next month.
308         (Month.prototype.startDate): Returns a datetime that is the start of this month. The value is inclusive.
309         (Month.prototype.endDate): Returns a datetime that is the end of this month. The value is exclusive.
310         (Month.prototype.valueOf): Returns a number representing the month.
311         (Month.prototype.toString): Returns an ISO month string.
312         (YearMonthController): Use Month object.
313         (YearMonthController.prototype.attachTo): Year 275760 ends in September so use the year before to measure the label width.
314         (YearMonthController.prototype.setMonth): Take a month object.
315         (YearMonthController.prototype._redraw): Use ISO month string for element.dataset.value.
316         (YearMonthController.prototype._handleYearMonthChange):
317         (YearMonthController.prototype.moveRelatively):
318         (DaysTable): Use Month object.
319         (DaysTable.prototype._renderMonth): Take a month object. Testing for isNaN is moved up to fix a bug when showing September, 275760.
320         (DaysTable.prototype._navigateToMonth): Take a month object.
321         (DaysTable.prototype._navigateToMonthWithAnimation): Take a month object.
322         (DaysTable.prototype.navigateToMonthAndKeepSelectionPosition): Take a month object.
323         (DaysTable.prototype.selectDate):
324         (DaysTable.prototype._maybeSetPreviousMonth): Use Month object to calculate the previous month.
325         (DaysTable.prototype._maybeSetNextMonth): Use Month object to calculate the next month.
326
327 2012-11-04  Halton Huo  <halton.huo@intel.com>
328
329         [EFL] Use _LIBRARIES instead of _LIBRARY
330         https://bugs.webkit.org/show_bug.cgi?id=101042
331
332         Reviewed by Gyuyoung Kim.
333
334         In CMake Find files, _LIBRARY is intended for internal use, should
335         use _LIBRARIES instead.
336
337         * PlatformEfl.cmake: s/_LIBRARY}/_LIBRARIES}
338
339 2012-11-04  MORITA Hajime  <morrita@google.com>
340
341         Shadow DOM should be able to be disabled per context.
342         https://bugs.webkit.org/show_bug.cgi?id=101173
343
344         Reviewed by Dimitri Glazkov.
345
346         This change pulls back relevant bits from r131549. Note that if
347         the the port enables runtime Shadow DOM flag, this can cause slow
348         down on some Chromium page cycler test cases (which r131549
349         attempted to fix).
350
351         This change is temporal and the flags should be switched back from
352         ContextFeatures to RuntimeEnabledFeatures once it gains sufficent
353         stability.
354
355         * dom/ContextFeatures.cpp:
356         (WebCore::ContextFeatures::shadowDOMEnabled):
357         (WebCore):
358         * dom/ContextFeatures.h:
359         * dom/Position.cpp:
360         (WebCore::Position::Position):
361         (WebCore::Position::findParent):
362         * dom/TreeScope.cpp:
363         (WebCore::TreeScope::getSelection):
364         * html/HTMLTagNames.in:
365         * html/shadow/HTMLContentElement.cpp:
366         (WebCore::HTMLContentElement::contentTagName):
367         * page/DOMWindow.idl:
368
369 2012-11-04  Shinya Kawanaka  <shinyak@chromium.org>
370
371         [Shadow] Implement custom pseudo-elements styling
372         https://bugs.webkit.org/show_bug.cgi?id=100812
373
374         Reviewed by Hajime Morita.
375
376         Instead of using ElementRareData::m_shadowPseudoId, we use 'pseudo' attribute.
377
378         Later we would like to remove Element::shadowPseudoId and Element::setShadowPseudoId
379         and use pseudo()/setPseudo() instead (Bug 101171).
380
381         Test: fast/dom/shadow/styling-pseudo-attribute.html
382
383         * dom/Element.cpp:
384         (WebCore::Element::shadowPseudoId):
385         (WebCore::Element::setShadowPseudoId):
386         * dom/ElementRareData.cpp:
387         (WebCore::ElementRareData::reportMemoryUsage):
388         * dom/ElementRareData.h:
389         (ElementRareData):
390
391 2012-11-04  Kent Tamura  <tkent@chromium.org>
392
393         BaseChooserOnlyDateAndTimeInputType should have BaseClickableWithKeyInputType behavior
394         https://bugs.webkit.org/show_bug.cgi?id=101039
395
396         Reviewed by Hajime Morita.
397
398         Add BaseClickableWithKeyInputType behavior to
399         BaseChooserOnlyDateAndTimeInputType. It means date/time input types
400         without ENABLE_INPUT_MULTIPLE_FIELDS_UI receive DOMActivate events by
401         pressing space or enter key. They're going to open a date/time chooser
402         by DOMActive event.
403
404         Because BaseChooserOnlyDateAndTimeInputType inherits from
405         BaseDateAndTimeInputType, it can't inherit
406         BaseClickableWithKeyInputType. So, this patch adds static helper
407         functions to BaseClickableWithKeyInputType, and
408         BaseChooserOnlyDateAndTimeInputType uses them.
409
410         This patch doesn't change behavior yet because Chromimum-Android port
411         intercepts user events and doesn't deliver them to date/time input
412         elements.
413
414         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
415         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
416         Add an empty implementation with a FIXME comment.
417         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeydownEvent):
418         Add BaseClickableWithKeyInputType behavior by a helper function.
419         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeypressEvent): Ditto.
420         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeyupEvent): Ditto.
421         (WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction): Ditto.
422         * html/BaseChooserOnlyDateAndTimeInputType.h:
423         (BaseChooserOnlyDateAndTimeInputType): Add function declarations.
424         * html/BaseClickableWithKeyInputType.cpp:
425         Add static helper functions, and existing member functions use them.
426         * html/BaseClickableWithKeyInputType.h:
427         (BaseClickableWithKeyInputType): Add declarations of the helper functions.
428         * html/InputType.h:
429         (InputType): Make dispatchSimulatedClickIfActive public because it is
430         called from a helper function.
431
432 2012-11-04  Sheriff Bot  <webkit.review.bot@gmail.com>
433
434         Unreviewed, rolling out r133416.
435         http://trac.webkit.org/changeset/133416
436         https://bugs.webkit.org/show_bug.cgi?id=101169
437
438         Broke world selection by right click (Requested by rniwa on
439         #webkit).
440
441         * page/EventHandler.cpp:
442         (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
443         (WebCore::EventHandler::sendContextMenuEvent):
444
445 2012-11-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
446
447         Missing ASCIILiteral in a place of accessibility
448         https://bugs.webkit.org/show_bug.cgi?id=101160
449
450         Reviewed by Darin Adler.
451
452         ASCIILiteral usage is being missed in a spot of accessibliity.
453
454         * accessibility/AccessibilityMediaControls.cpp:
455         (WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):
456
457 2012-11-03  Balazs Kelemen  <kbalazs@webkit.org>
458
459         [Qt][WK2] setPlatformStrategies always asserts after r132744
460         https://bugs.webkit.org/show_bug.cgi?id=100838
461
462         Reviewed by Simon Hausmann.
463
464         Reland with build fixes.
465
466         The problem here is that we use QWebSettings::clearMemoryCaches, a WebKit1 API
467         from the injected bundle, which calls initializeWebCoreQt and it sets the platform
468         strategies to the one for WebKit1. We should stop using WebKit1 API's from WebKit2
469         code. In order to keep the behavior, this patch adds exported helpers to WebCore
470         that can be used from DumpRenderTree and WebKitTestRunner. This is the same idea
471         as WebCoreTestSupport but these helpers are specific to Qt. Technically we could
472         add it to the WebKit1 API for the time being, but my goal was to move in the direction
473         of removing the WebKit1 dependency from WebKitTestRunner. We only build the file
474         in non production mode.
475
476         Basically covered by all tests.
477
478         * Target.pri:
479         * WebCore.pri: We need to link against fontconfig (only in non-production mode) since
480         initializeTestFonts uses it.
481         * platform/qt/QtTestSupport.cpp: Added. I choose GPL license because code from qwebsettings.cpp
482         is also under that.
483         (WebKit):
484         (WebKit::QtTestSupport::clearMemoryCaches): This is basically a copy of QWebSettings::clearMemoryCaches
485         without calling initializeWebCoreQt.
486         (WebKit::QtTestSupport::initializeTestFonts): I moved this code here as well now that we have to expose
487         symbols from WebCore anyway. The advantage is that now we don't have to build it twice and we don't need
488         additional files to forward it from the directory of DumpRenderTree for WebKitTestRunner.
489         I added a call to FontCace::invalidate in the case when the font set has been changed so that it will do
490         the job even if we would stop clearing all caches between tests. Also moved the call to
491         QFontDatabase::removeAllApplicationFonts from callers to here.
492         * platform/qt/QtTestSupport.h:
493         (WebKit):
494         (QtTestSupport):
495
496 2012-11-04  Florin Malita  <fmalita@chromium.org>
497
498         Color-profile property triggers assert
499         https://bugs.webkit.org/show_bug.cgi?id=101080
500
501         Reviewed by Dirk Schulze.
502
503         CSSPropertyColorProfile is not handled in StyleResolver::applySVGProperty(), triggering the
504         unimplemented property assert. Adding a stub entry to avoid that.
505
506         Test: svg/css/color-profile-crash.html
507
508         * css/SVGCSSStyleSelector.cpp:
509         (WebCore::StyleResolver::applySVGProperty):
510
511 2012-11-04  Kaustubh Atrawalkar  <kaustubh@motorola.com>
512
513         Unable to copy text on disabled input fields on long press gesture
514         https://bugs.webkit.org/show_bug.cgi?id=99698
515
516         Reviewed by Ryosuke Niwa.
517
518         Text from disabled input/text should be allowed to select. Replaced isContentEditable()
519         with canStartSelection()
520
521         Test: fast/events/touch/gesture/disabled-input-text-selection.html
522
523         * page/EventHandler.cpp:
524         (WebCore::EventHandler::handleGestureLongPress):
525
526 2012-11-03  Sheriff Bot  <webkit.review.bot@gmail.com>
527
528         Unreviewed, rolling out r133403, r133404, and r133409.
529         http://trac.webkit.org/changeset/133403
530         http://trac.webkit.org/changeset/133404
531         http://trac.webkit.org/changeset/133409
532         https://bugs.webkit.org/show_bug.cgi?id=101158
533
534         "Broke tests" (Requested by kbalazs on #webkit).
535
536         * Target.pri:
537         * WebCore.pri:
538         * platform/qt/QtTestSupport.h: Removed.
539
540 2012-11-03  Alexey Proskuryakov  <ap@apple.com>
541
542         Get rid of USE(CFURLSTORAGESESSIONS)
543         https://bugs.webkit.org/show_bug.cgi?id=101131
544
545         Reviewed by Sam Weinig.
546
547         This is always enabled on CFNetwork based platforms.
548
549         * WebCore.exp.in:
550         * page/Settings.cpp:
551         (WebCore::Settings::setPrivateBrowsingEnabled):
552         * platform/mac/CookieJar.mm:
553         (WebCore::cookies):
554         (WebCore::cookieRequestHeaderFieldValue):
555         (WebCore::setCookies):
556         (WebCore::cookiesEnabled):
557         (WebCore::getRawCookies):
558         (WebCore::deleteCookie):
559         * platform/network/ResourceHandle.h:
560         (ResourceHandle):
561         * platform/network/cf/CookieStorageCFNet.cpp:
562         (WebCore):
563         (WebCore::currentCFHTTPCookieStorage):
564         * platform/network/cf/CookieStorageCFNet.h:
565         * platform/network/cf/ResourceHandleCFNet.cpp:
566         (WebCore::willSendRequest):
567         (WebCore::makeFinalRequest):
568         (WebCore::ResourceHandle::willSendRequest):
569         (WebCore):
570         * platform/network/cf/ResourceRequest.h:
571         (ResourceRequest):
572         * platform/network/cf/ResourceRequestCFNet.cpp:
573         (WebCore::ResourceRequest::doUpdatePlatformRequest):
574         (WebCore):
575         * platform/network/mac/CookieStorageMac.mm:
576         (WebCore::setCookieStoragePrivateBrowsingEnabled):
577         * platform/network/mac/ResourceHandleMac.mm:
578         (WebCore::shouldRelaxThirdPartyCookiePolicy):
579         (WebCore::ResourceHandle::createNSURLConnection):
580         (WebCore::ResourceHandle::willSendRequest):
581         (WebCore):
582         * platform/network/mac/ResourceRequestMac.mm:
583         (WebCore):
584         (WebCore::ResourceRequest::setStorageSession):
585
586 2012-11-03  Balazs Kelemen  <kbalazs@webkit.org>
587
588         [Qt][WK2] setPlatformStrategies always asserts after r132744
589         https://bugs.webkit.org/show_bug.cgi?id=100838
590
591         Reviewed by Simon Hausmann.
592
593         Reland with build fix.
594
595         The problem here is that we use QWebSettings::clearMemoryCaches, a WebKit1 API
596         from the injected bundle, which calls initializeWebCoreQt and it sets the platform
597         strategies to the one for WebKit1. We should stop using WebKit1 API's from WebKit2
598         code. In order to keep the behavior, this patch adds exported helpers to WebCore
599         that can be used from DumpRenderTree and WebKitTestRunner. This is the same idea
600         as WebCoreTestSupport but these helpers are specific to Qt. Technically we could
601         add it to the WebKit1 API for the time being, but my goal was to move in the direction
602         of removing the WebKit1 dependency from WebKitTestRunner. We only build the file
603         in non production mode.
604
605         Basically covered by all tests.
606
607         * Target.pri:
608         * WebCore.pri: We need to link against fontconfig (only in non-production mode) since
609         initializeTestFonts uses it.
610         * platform/qt/QtTestSupport.cpp: Added. I choose GPL license because code from qwebsettings.cpp
611         is also under that.
612         (WebKit):
613         (WebKit::QtTestSupport::clearMemoryCaches): This is basically a copy of QWebSettings::clearMemoryCaches
614         without calling initializeWebCoreQt.
615         (WebKit::QtTestSupport::initializeTestFonts): I moved this code here as well now that we have to expose
616         symbols from WebCore anyway. The advantage is that now we don't have to build it twice and we don't need
617         additional files to forward it from the directory of DumpRenderTree for WebKitTestRunner.
618         I added a call to FontCace::invalidate in the case when the font set has been changed so that it will do
619         the job even if we would stop clearing all caches between tests. Also moved the call to
620         QFontDatabase::removeAllApplicationFonts from callers to here.
621         * platform/qt/QtTestSupport.h:
622         (WebKit):
623         (QtTestSupport):
624
625 2012-11-03  Sheriff Bot  <webkit.review.bot@gmail.com>
626
627         Unreviewed, rolling out r133397.
628         http://trac.webkit.org/changeset/133397
629         https://bugs.webkit.org/show_bug.cgi?id=101155
630
631         "Broke Qt. No way to force the damn bots to do a clean build.
632         I'm giving up." (Requested by kbalazs on #webkit).
633
634         * Target.pri:
635         * WebCore.pri:
636         * platform/qt/QtTestSupport.h: Removed.
637
638 2012-11-03  Stephen White  <senorblanco@chromium.org>
639
640         Speculative fix to eliminate flakiness in
641         css3/filters/blur-filter-page-scroll-self.html
642         https://bugs.webkit.org/show_bug.cgi?id=91620.
643         Suspicion is that a prior test is setting
644         window.internals.settings.setEnableCompositingForFixedPosition(true),
645         causing this test to be intermittely run on the GPU, giving different
646         pixel results depending on test order.
647
648         Reviewed by Jochen Eisinger.
649
650         Covered by css3/filters/blur-filter-page-scroll-self.html
651
652         * testing/InternalSettings.cpp:
653         (WebCore::InternalSettings::Backup::Backup):
654         (WebCore::InternalSettings::Backup::restoreTo):
655         * testing/InternalSettings.h:
656         (Backup):
657
658 2012-11-03  Mark Rowe  <mrowe@apple.com>
659
660         REGRESSION (r132858): Crash below -[DOMElement setClassName:] when called with a nil string
661
662         Reviewed by Anders Carlsson.
663
664         The changes in r132858 introduced an overload of AtomicString::add for CFStrings. However, the overload
665         that was introduced is not null safe.
666
667         * platform/text/cf/AtomicStringCF.cpp:
668         (WTF::AtomicString::add): Handle a null string by returning a null StringImpl.
669
670 2012-11-03  Balazs Kelemen  <kbalazs@webkit.org>
671
672         [Qt][WK2] setPlatformStrategies always asserts after r132744
673         https://bugs.webkit.org/show_bug.cgi?id=100838
674
675         Reviewed by Simon Hausmann.
676
677         The problem here is that we use QWebSettings::clearMemoryCaches, a WebKit1 API
678         from the injected bundle, which calls initializeWebCoreQt and it sets the platform
679         strategies to the one for WebKit1. We should stop using WebKit1 API's from WebKit2
680         code. In order to keep the behavior, this patch adds exported helpers to WebCore
681         that can be used from DumpRenderTree and WebKitTestRunner. This is the same idea
682         as WebCoreTestSupport but these helpers are specific to Qt. Technically we could
683         add it to the WebKit1 API for the time being, but my goal was to move in the direction
684         of removing the WebKit1 dependency from WebKitTestRunner. We only build the file
685         in non production mode.
686
687         Basically covered by all tests.
688
689         * Target.pri:
690         * WebCore.pri: We need to link against fontconfig (only in non-production mode) since
691         initializeTestFonts uses it.
692         * platform/qt/QtTestSupport.cpp: Added. I choose GPL license because code from qwebsettings.cpp
693         is also under that.
694         (WebKit):
695         (WebKit::QtTestSupport::clearMemoryCaches): This is basically a copy of QWebSettings::clearMemoryCaches
696         without calling initializeWebCoreQt.
697         (WebKit::QtTestSupport::initializeTestFonts): I moved this code here as well now that we have to expose
698         symbols from WebCore anyway. The advantage is that now we don't have to build it twice and we don't need
699         additional files to forward it from the directory of DumpRenderTree for WebKitTestRunner.
700         I added a call to FontCace::invalidate in the case when the font set has been changed so that it will do
701         the job even if we would stop clearing all caches between tests. Also moved the call to
702         QFontDatabase::removeAllApplicationFonts from callers to here.
703         * platform/qt/QtTestSupport.h:
704         (WebKit):
705         (QtTestSupport):
706
707 2012-11-03  Dan Beam  <dbeam@chromium.org>
708
709         Implement HTMLFormElement#requestAutocomplete and associated events
710         https://bugs.webkit.org/show_bug.cgi?id=100557
711
712         Reviewed by Adam Barth.
713
714         Implements an initial version of the proposal for interactive autocomplete outlined in this email:
715         http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037711.html
716
717         The goal of this patch is to allow web authors to call formElement.requestAutocomplete(); after subscribing for
718         autocomplete/autocompleteerror events on formElement. If the form's [autocomplete] attribute is "off" an
719         error will be dispatched. Otherwise, a request will be issued to the FrameLoaderClient.  At the moment, the
720         implementation in Chrome (https://codereview.chromium.org/11270018/) will simply dispatch an error until the
721         UI on Chrome's side is built. Both autocomplete and autocompleteerror events will be dispatched asynchronously
722         after a small delay to behave consistently in all situations and implementations.
723
724         Currently this is behind the feature flag REQUEST_AUTOCOMPLETE, which is disabled.
725
726         Test: fast/forms/form-request-autocomplete.html
727
728         * dom/EventNames.h:
729         (WebCore):
730
731         Added autocomplete and autocompleteerror events. The autocomplete event is dispatched after a user adds more
732         information to a form using the future UI. This is not currently dispatched in any implementation (including Chrome)
733         but will be in the future. The autocompleteerror event is dispatched when the form has [autocomplete="off"] on the
734         node being asked for an interactive autocomplete. The user agent may also dispatch this event if it doesn't implement
735         this API but has turned on the feature flag, can't currently show an autocomplete UI (e.g. running headlessly or in
736         an HTML notification, security concerns, or any other reason it desires).
737
738         * html/HTMLAttributeNames.in:
739
740         Added onautocomplete and onautocompleteerror attributes so they can be parsed when creating form elements and used
741         as event listeners. For example:
742
743           <form onautocomplete="/* when autocomplete succeeds */" autocompleteerror="/* when autocomplete fails */">
744
745         * html/HTMLFormElement.cpp:
746         (WebCore::HTMLFormElement::HTMLFormElement):
747         (WebCore):
748
749         Added m_requestAutocompleteTimer (a timer that's used to dispatch events asynchronously) to the initializer list that
750         triggers requestAutocompleteTimerFired when it times out.
751
752         (WebCore::HTMLFormElement::requestAutocomplete):
753
754         Called when HTMLFormElement#requestAutocomplete is called from JS (also see HTMLFormElement.idl) and decides whether
755         to dispatch an error and exit early (in the case where autocomplete="off") or pass the request on to the
756         FrameLoaderClient.
757
758         (WebCore::HTMLFormElement::finishRequestAutocomplete):
759
760         Called when the request for an interactive autocomplete is finished with either a success or error result. This
761         causes an event to queue and fired after a 0 second delay. Events are owned by HTMLFormElement and reference the
762         target element (this) until fired.
763
764         (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
765
766         Called when the event timer runs out to pump the queue of current events. Events are released on dispatch.
767
768         (WebCore::HTMLFormElement::parseAttribute):
769
770         Encountering onautocomplete or onautocompleteerror attributes while parsing HTMLFormElements now adds event listeners
771         for autocomplete an autocompleteerror events (respectively) to dispatch the value of the attribute as a script.
772
773         * html/HTMLFormElement.h:
774         (HTMLFormElement):
775
776         Added various methods and data members as required by the implementation.
777
778         * html/HTMLFormElement.idl:
779
780         Added the method requestAutocomplete and associated DOM event handler attributes (onautocomplete/onautocompleteerror)
781         to HTMLFormElement's public DOM API (unprefixed, as per Ian Hickson's advice). All are require the Conditional
782         REQUEST_AUTOCOMPLETE to be enabled to be activated.
783
784         * loader/EmptyClients.cpp:
785         (WebCore):
786         (WebCore::EmptyFrameLoaderClient::didRequestAutocomplete):
787
788         Added noop implementation for FrameLoader::didRequestAutocomplete.
789
790         * loader/EmptyClients.h:
791         (EmptyFrameLoaderClient):
792
793         Added FrameLoader::didRequestAutocomplete to EmptyFrameLoaderClient interface.
794
795         * loader/FrameLoaderClient.h:
796         (FrameLoaderClient):
797
798         Added noop implementation to FrameLoaderClient interface (which is implemented chromium's FrameLoaderLoaderImpl.cpp).
799
800 2012-11-03  Pavel Feldman  <pfeldman@chromium.org>
801
802         Web Inspector: %d, %i, and %f log formatters have same result
803         https://bugs.webkit.org/show_bug.cgi?id=101148
804
805         Reviewed by Alexander Pavlov.
806
807         Added separate formatters for %f, %i, %d and %s.
808
809         Test: inspector/console/console-message-format.html
810
811         * inspector/front-end/ConsoleMessage.js:
812         (WebInspector.ConsoleMessageImpl.prototype.stringFormatter):
813         (WebInspector.ConsoleMessageImpl.prototype.floatFormatter):
814         (WebInspector.ConsoleMessageImpl.prototype.integerFormatter):
815
816 2012-11-03  Andreas Kling  <kling@webkit.org>
817
818         Decouple Attr logic from ElementAttributeData.
819         <http://webkit.org/b/101126>
820
821         Reviewed by Antti Koivisto.
822
823         Move all logic dealing with Attr DOM nodes from ElementAttributeData to Element.
824         This makes more sense since an Attr is tied to a single Element, but an ElementAttributeData
825         can be shared by any number of Elements at a given time.
826
827         Also updated naming convention from just "Attr" to "Attr node" in the code I was touching.
828         "Attr" is way too generic, and has been historically confused with WebCore::Attribute a lot.
829
830         * dom/Element.h:
831         * dom/ElementAttributeData.h:
832         * dom/Element.cpp:
833         (WebCore::attrNodeListMap):
834         (WebCore::attrNodeListForElement):
835         (WebCore::ensureAttrNodeListForElement):
836         (WebCore::removeAttrNodeListForElement):
837         (WebCore::findAttrNodeInList):
838         (WebCore::Element::~Element):
839         (WebCore::Element::detachAttribute):
840         (WebCore::Element::setAttributeNode):
841         (WebCore::Element::removeAttributeInternal):
842         (WebCore::Element::getAttributeNode):
843         (WebCore::Element::getAttributeNodeNS):
844         (WebCore::Element::normalizeAttributes):
845         (WebCore::Element::attrIfExists):
846         (WebCore::Element::ensureAttr):
847         (WebCore::Element::detachAttrNodeFromElementWithValue):
848         (WebCore::Element::detachAllAttrNodesFromElement):
849         (WebCore::Element::cloneAttributesFromElement):
850
851             Move everything Attr-related into Element.cpp while simplifying some loops and remove
852             conditions that are no longer needed as they used to depend on having an attributeData().
853
854         * dom/Node.h:
855         (WebCore::Node::hasSyntheticAttrChildNodes):
856         (WebCore::Node::setHasSyntheticAttrChildNodes):
857
858             Renamed the hasAttrList() node flag to hasSyntheticAttrChildNodes().
859
860         * dom/Attr.cpp:
861         (WebCore::Attr::detachFromElementWithValue):
862
863             Remove awkward indirection and let the call site deal with removing the Attr node from
864             the Element's list of Attr nodes.
865
866         * dom/ElementAttributeData.cpp:
867         (WebCore::ElementAttributeData::clearAttributes):
868
869             Remove now-unused Element* argument.
870
871 2012-11-03  Pavel Feldman  <pfeldman@chromium.org>
872
873         REGRESSION (r132014-r132047): Webkit Inspector Window docking broken
874         https://bugs.webkit.org/show_bug.cgi?id=101125
875
876         Reviewed by Vsevolod Vlasov.
877
878         Added "bottom" as default docked state.
879
880         * inspector/front-end/DockController.js:
881         (WebInspector.DockController):
882
883 2012-11-02  Shinya Kawanaka  <shinyak@chromium.org>
884
885         [Shadow] ShadowRoot should be able to know the existence of <content>
886         https://bugs.webkit.org/show_bug.cgi?id=100921
887
888         Reviewed by Dimitri Glazkov.
889
890         When <content> is inserted into or removed from a shadow subtree, ShadowRoot counts the number of <content>.
891         It provides O(1) method to check the existence of <content>.
892
893         This is necessary when we implement a fast checking path for distribution invalidation when an element attribute
894         is changed. Larger context is explained in Bug 100451.
895
896         Test: fast/dom/shadow/has-content-elements.html
897
898         * dom/ShadowRoot.cpp:
899         (WebCore::ShadowRoot::ShadowRoot):
900         (WebCore::ShadowRoot::hasInsertionPoint): Since we track both <content> and <shadow>, we don't need to traverse
901         all the descendants of ShadowRoot anymore.
902         * dom/ShadowRoot.h:
903         (WebCore::ShadowRoot::registerContentElement):
904         (WebCore::ShadowRoot::unregisterContentElement):
905         (WebCore::ShadowRoot::hasContentElement):
906         (ShadowRoot):
907         * html/shadow/HTMLContentElement.cpp:
908         (WebCore::HTMLContentElement::HTMLContentElement):
909         (WebCore::HTMLContentElement::insertedInto): When <content> is inserted into ShadowDOM subtree,
910         we notify it to the ShadowRoot. Note that only active <content> element is counted.
911         (WebCore):
912         (WebCore::HTMLContentElement::removedFrom):
913         * html/shadow/HTMLContentElement.h:
914         (HTMLContentElement):
915         * testing/Internals.cpp:
916         (WebCore::Internals::hasContentElement):
917         (WebCore):
918         * testing/Internals.h:
919         (Internals):
920         * testing/Internals.idl:
921
922 2012-11-02  KyungTae Kim  <ktf.kim@samsung.com>
923
924         sCurrentPaintTimeStamp is not initialized when FrameView::paintContents returns in the middle
925         https://bugs.webkit.org/show_bug.cgi?id=99990
926
927         Reviewed by Darin Adler.
928
929         Move initialization code for sCurrentPaintTimeStamp to the below of early returns,
930         because it was not reset after early return.
931
932         * page/FrameView.cpp:
933         (WebCore::FrameView::paintContents):
934
935 2012-11-02  KyungTae Kim  <ktf.kim@samsung.com>
936
937         Fix build warning in PluginView.cpp on release build
938         https://bugs.webkit.org/show_bug.cgi?id=101049
939
940         Reviewed by Kentaro Hara.
941
942         The protocol, host, port parameters are not used when LOG_DISABLED
943         Use UNUSED_PARAM macro for removing -Wunused-parameter warning
944
945         * plugins/PluginView.cpp:
946         (WebCore::PluginView::getAuthenticationInfo):
947
948 2012-10-25  Martin Robinson  <mrobinson@igalia.com>
949
950         [GTK] Move soup authentication from GtkAuthenticationDialog to WebCore
951         https://bugs.webkit.org/show_bug.cgi?id=99914
952
953         Reviewed by Carlos Garcia Campos.
954
955         Move the actual soup authentication code from the GtkAuthenticationDialog to ResourceHandleSoup.
956         This allows a more generic implementation of authentication, for example, one where a WebKit2
957         client can completely handle authentication.
958
959         No new tests. This does not change behavior.
960
961         * platform/gtk/GtkAuthenticationDialog.cpp: Remove references to the SoupPasswordManager, which
962         is going away in the next release of Gnome. Instead we always assume that the authentication backend has
963         support for remembering passwords and pass that information along with the answer to the authentication
964         request.
965
966         The rest of the changes to this class can be summarized as:
967         1. Getting the information from the AuthenticationChallenge instead of directly from the libsoup
968            objects.
969         2. Using the AuthenticationClient to accomplish the authentication instead of talking to libsoup
970            directly.
971         * platform/gtk/GtkAuthenticationDialog.h:
972         (GtkAuthenticationDialog): Remove members which are no longer used.
973         * platform/network/ResourceHandle.h:
974         (ResourceHandle): ResourceHandleSoup now implements the entire AuthenticationClient interface.
975         * platform/network/soup/ResourceHandleSoup.cpp:
976         (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge): Don't handle authentication
977         for synchronous handles.
978         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Now set the current challenge on
979         the internal data structure.
980         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): Added.
981         (WebCore::ResourceHandle::receivedCredential): Added.
982         (WebCore::ResourceHandle::receivedCancellation): Added.
983         (WebCore::authenicateCallback): Pass the handle as the authentication client.
984
985 2012-11-02  Benjamin Poulain  <bpoulain@apple.com>
986
987         Improve CSSParser::setupParser() since the prefix/suffix are literals
988         https://bugs.webkit.org/show_bug.cgi?id=101107
989
990         Reviewed by Andreas Kling.
991
992         * css/CSSParser.cpp:
993         (WebCore::CSSParser::setupParser):
994         * css/CSSParser.h:
995         (CSSParser):
996         (WebCore::CSSParser::setupParser):
997         CSSParser::setupParser() is only used with literals prefix and suffix. We do not have
998         to compute the length at runtime, we can direclty encode it in the binary.
999
1000 2012-11-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1001
1002         Unreviewed, rolling out r133375.
1003         http://trac.webkit.org/changeset/133375
1004         https://bugs.webkit.org/show_bug.cgi?id=101138
1005
1006         Caused 3 tests to fail on Mac (Requested by aboxhall-laptop on
1007         #webkit).
1008
1009         * platform/text/LineBreakIteratorPoolICU.h:
1010         (WebCore::LineBreakIteratorPool::take):
1011         (WebCore::LineBreakIteratorPool::put):
1012         (LineBreakIteratorPool):
1013         * platform/text/TextBreakIterator.h:
1014         (WebCore):
1015         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
1016         (WebCore::LazyLineBreakIterator::get):
1017         (WebCore::LazyLineBreakIterator::reset):
1018         (LazyLineBreakIterator):
1019         * platform/text/TextBreakIteratorICU.cpp:
1020         (WebCore::acquireLineBreakIterator):
1021         (WebCore::releaseLineBreakIterator):
1022         * rendering/RenderBlockLineLayout.cpp:
1023         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
1024         * rendering/RenderText.cpp:
1025         (WebCore::RenderText::computePreferredLogicalWidths):
1026         * rendering/RenderText.h:
1027         (WebCore):
1028         * rendering/break_lines.cpp:
1029         (WebCore):
1030         (WebCore::isBreakableSpace):
1031         (WebCore::needsLineBreakIterator):
1032         (WebCore::nextBreakablePosition):
1033         (WebCore::nextBreakablePositionIgnoringNBSP):
1034         * rendering/break_lines.h:
1035         (WebCore):
1036         (WebCore::isBreakable):
1037
1038 2012-11-02  Andreas Kling  <kling@webkit.org>
1039
1040         Cut overgrown ElementAttributeData bitfield.
1041         <http://webkit.org/b/101129>
1042
1043         Reviewed by Anders Carlsson.
1044
1045         Make sure the ElementAttributeData bitfield fits into 32 bits. Added a compile-time assertion
1046         to guard against future bloatage.
1047
1048         * dom/ElementAttributeData.cpp:
1049         (SameSizeAsElementAttributeData):
1050         * dom/ElementAttributeData.h:
1051         (ElementAttributeData):
1052
1053 2012-11-02  Michael Saboff  <msaboff@apple.com>
1054
1055         Crash calling is8Bit() in visitedLinkHash()
1056         https://bugs.webkit.org/show_bug.cgi?id=101119
1057
1058         Reviewed by Filip Pizlo.
1059
1060         Added an isEmpty() check to AttributeURL and KURL.
1061
1062         * platform/LinkHash.cpp:
1063         (WebCore::visitedLinkHash):
1064
1065 2012-11-02  Glenn Adams  <glenn@skynav.com>
1066
1067         Add support to -webkit-line-break property for CSS3 Text line-break property values and semantics.
1068         https://bugs.webkit.org/show_bug.cgi?id=89235
1069
1070         Reviewed by Eric Seidel.
1071
1072         See also wiki documentation at:
1073         [1] http://trac.webkit.org/wiki/LineBreaking
1074         [2] http://trac.webkit.org/wiki/LineBreakingCSS3Mapping
1075
1076         Web exposed changes include:
1077         (1) The default (initial) value for -webkit-line-break becomes 'auto', instead of 'normal';
1078         (2) The values 'auto', 'loose', 'normal', and 'strict' are added to -webkit-line-break;
1079         (3) See [2] above for details regarding interpretation.
1080
1081         Tests: css3/line-break/line-break-auto-centered.html
1082                css3/line-break/line-break-auto-half-kana.html
1083                css3/line-break/line-break-auto-hyphens.html
1084                css3/line-break/line-break-auto-inseparables.html
1085                css3/line-break/line-break-auto-iteration-marks.html
1086                css3/line-break/line-break-auto-postfixes.html
1087                css3/line-break/line-break-auto-prefixes.html
1088                css3/line-break/line-break-auto-sound-marks.html
1089                css3/line-break/line-break-loose-centered.html
1090                css3/line-break/line-break-loose-half-kana.html
1091                css3/line-break/line-break-loose-hyphens.html
1092                css3/line-break/line-break-loose-inseparables.html
1093                css3/line-break/line-break-loose-iteration-marks.html
1094                css3/line-break/line-break-loose-postfixes.html
1095                css3/line-break/line-break-loose-prefixes.html
1096                css3/line-break/line-break-loose-sound-marks.html
1097                css3/line-break/line-break-normal-centered.html
1098                css3/line-break/line-break-normal-half-kana.html
1099                css3/line-break/line-break-normal-hyphens.html
1100                css3/line-break/line-break-normal-inseparables.html
1101                css3/line-break/line-break-normal-iteration-marks.html
1102                css3/line-break/line-break-normal-postfixes.html
1103                css3/line-break/line-break-normal-prefixes.html
1104                css3/line-break/line-break-normal-sound-marks.html
1105                css3/line-break/line-break-strict-centered.html
1106                css3/line-break/line-break-strict-half-kana.html
1107                css3/line-break/line-break-strict-hyphens.html
1108                css3/line-break/line-break-strict-inseparables.html
1109                css3/line-break/line-break-strict-iteration-marks.html
1110                css3/line-break/line-break-strict-postfixes.html
1111                css3/line-break/line-break-strict-prefixes.html
1112                css3/line-break/line-break-strict-sound-marks.html
1113
1114         * platform/text/LineBreakIteratorPoolICU.h:
1115         (WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
1116         Add static function to construct ICU locale argument (also used as pool key) with additional
1117         break keyword.
1118         (WebCore::LineBreakIteratorPool::take):
1119         (WebCore::LineBreakIteratorPool::put):
1120         (LineBreakIteratorPool):
1121         Remove direct dependency from ICU library (and types), moving that dependency into
1122         new {open,close}LineBreakIterator() functions (defined in TextBreakIteratorICU.cpp).
1123         Update to take line break mode into account.
1124         Create (and cache) different break iterators depending on line break mode (in addition to locale),
1125         which entails expanding pool entry key format to optionally append "@break=" +
1126         "loose"|"normal"|"strict" keyword to locale string.
1127
1128         * platform/text/TextBreakIterator.h:
1129         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
1130         (WebCore::LazyLineBreakIterator::isLooseCJKMode):
1131         (WebCore::LazyLineBreakIterator::get):
1132         (WebCore::LazyLineBreakIterator::reset):
1133         (LazyLineBreakIterator):
1134         Define LineBreakIteratorMode enumeration for use in TextBreakIterator et al.
1135         Add state member to indicate line break mode.
1136
1137         * platform/text/TextBreakIteratorICU.cpp:
1138         (WebCore::acquireLineBreakIterator):
1139         Use new line break mode when making iterator from pool.
1140         Handle change of return type of LineBreakIteratorPool::take() to non-ICU type,
1141         i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
1142         (WebCore::releaseLineBreakIterator):
1143         Handle change of parameter type of LineBreakIteratorPool::put() to non-ICU type,
1144         i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
1145         (WebCore::isCJKLocale):
1146         New functions for determining if CJK rules apply.
1147         (WebCore::openLineBreakIterator):
1148         New function for abstracting opening of ICU style line break iterator. This is now
1149         used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
1150         This function also takes into account the line break mode.
1151         (WebCore::closeLineBreakIterator):
1152         (WebCore::mapLineIteratorModeToRules):
1153         New function for abstracting closing of ICU style line break iterator. This is now
1154         used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
1155
1156         * rendering/RenderBlockLineLayout.cpp:
1157         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
1158         Pass line break iterator mode flag when reseting LazyLineBreakIterator.
1159         Add looseMode local variable to prevent need for computing under isBreakable().
1160
1161         * rendering/RenderText.cpp:
1162         (WebCore::mapLineBreakToIteratorMode):
1163         Add implementation for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
1164         and RenderBlock::LineBreaker::nextLineBreak.
1165         (WebCore::RenderText::computePreferredLogicalWidths):
1166         Ensure (lazy line) breakIterator is initialized for line break mode.
1167         Ensure isBreakable() is passed loose mode flag to match behavior in RenderBlock::LineBreaker::nextLineBreak.
1168
1169         * rendering/RenderText.h:
1170         (WebCore):
1171         Add declaration for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
1172         and RenderBlock::LineBreaker::nextLineBreak.
1173
1174         * rendering/break_lines.cpp:
1175         (WebCore):
1176         Introduce two (local) enums NBSPBehavior and LooseBehavior for expanding template on nextBreakablePosition
1177         to include loose mode parameter.
1178         (WebCore::isBreakableSpace):
1179         Add externally specified loose mode parameter to prevent need to invoke line break iterator
1180         accessor method on each invocation. Use new loose mode flavors off NBP functions.
1181         (WebCore::needsLineBreakIterator):
1182         Introduce loose mode behavior template parameter to optimize loose mode behavior code path in order
1183         to prevent regression to non loose mode path.
1184         (WebCore::nextBreakablePosition):
1185         (WebCore::nextBreakablePositionIgnoringNBSP):
1186         Use new template parameter enums described above.
1187         (WebCore::nextBreakablePositionIgnoringNBSPLoose):
1188         (WebCore::nextBreakablePositionLoose):
1189         Introduce two additional 'loose' mode flavors of NBP template expansions.
1190
1191         * rendering/break_lines.h:
1192         (WebCore):
1193         (WebCore::isBreakable):
1194         Add externally specified loose mode parameter to prevent need to invoke line break iterator
1195         accessor method on each invocation.
1196
1197 2012-11-02  Elliott Sprehn  <esprehn@chromium.org>
1198
1199         Replace NodeRareData hash map with a union on m_renderer
1200         https://bugs.webkit.org/show_bug.cgi?id=100057
1201
1202         Reviewed by Eric Seidel.
1203
1204         Use a union on Node::m_renderer between NodeRareData* and RenderObject*. This removes
1205         the overhead of accessing rare data and the memory from the map.
1206
1207         This is an 8% improvement on Bindings/get-elements-by-tag-name.html which tested
1208         document.getElementsByTagName and was previously optimized in Bug 90059 for a 5% 
1209         improvement. As this is better than even the special casing for document that was
1210         done in that bug, general node list access should see an even greater win.
1211
1212         This reduces the memory usage on nytimes.com by 250k per Bug 101052 by
1213         removing the rare data map overhead.
1214
1215         This is also a 15% improvement on Parser/textarea-parsing.html
1216
1217         By removing the performance overhead of rareData() this patch addresses the performance
1218         issues raised in Bugs 73853, 87034 and 89635.
1219
1220         I ran Parser/html5-full-render.html and there was no performance regression after
1221         tuning Text::recalcTextStyle and the refactor that was done in r132684.
1222
1223         No new tests, this is just a refactor.
1224
1225         * dom/Document.cpp:
1226         (WebCore::Document::Document):
1227         * dom/Document.h:
1228         (WebCore::Node::Node):
1229         * dom/Element.cpp:
1230         (WebCore::Element::elementRareData):
1231         * dom/Node.cpp:
1232         (WebCore::Node::rareData):
1233         (WebCore::Node::ensureRareData):
1234         (WebCore::Node::clearRareData):
1235         (WebCore::Node::renderBox):
1236         (WebCore::Node::renderBoxModelObject):
1237         (WebCore::Node::reportMemoryUsage):
1238         * dom/Node.h:
1239         (NodeRareDataBase):
1240           Base class for NodeRareData that knows about the renderer so we can
1241           inline the accesses in Node.h
1242         (WebCore::NodeRareDataBase::renderer):
1243         (WebCore::NodeRareDataBase::setRenderer):
1244         (WebCore::NodeRareDataBase::~NodeRareDataBase):
1245         (WebCore::NodeRareDataBase::NodeRareDataBase):
1246         (WebCore):
1247         (WebCore::Node::renderer):
1248         (WebCore::Node::setRenderer):
1249         (Node):
1250         * dom/NodeRareData.h:
1251         * dom/NodeRenderStyle.h:
1252         (WebCore::Node::renderStyle):
1253         * dom/Text.cpp:
1254         (WebCore::Text::recalcTextStyle):
1255           This method appears very hot in html5-full-render.html and accessing the
1256           renderer 4 times caused a 2% performance regression with this patch. I
1257           reduced it to 1 access and there's no longer any performance regression.
1258         * dom/WebCoreMemoryInstrumentation.cpp:
1259           Removed tracking of the rare data map memory usage as there is no longer
1260           a map to track.
1261         * dom/WebCoreMemoryInstrumentation.h:
1262         * inspector/InspectorMemoryAgent.cpp:
1263         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1264
1265 2012-11-02  Alexey Proskuryakov  <ap@apple.com>
1266
1267         [Mac] ResourceHandle changes for network process
1268         https://bugs.webkit.org/show_bug.cgi?id=101111
1269
1270         Reviewed by Jessie Berlin.
1271
1272         With NSOperationQueue, we'll be getting NetworkProcess delegate method calls
1273         on secondary threads, and so we won't block other requests while consulting with WebProcess.
1274
1275         * platform/network/NetworkingContext.h:
1276         (WebCore::NetworkingContext::scheduledRunLoopPairs):
1277         (WebCore::NetworkingContext::scheduledOperationQueue):
1278         Add an ability to schedule on an NSOperationQueue. Now that scheduling on run loop
1279         is not a must, give scheduledRunLoopPairs() a default implementation.
1280
1281         * platform/network/mac/ResourceHandleMac.mm: Removed isInitializingConnection
1282         static. It was only used to catch a long obsolete bug with debug logging, and
1283         cannot work with multiple threads.
1284         (WebCore::ResourceHandle::start): Scedule on a operation queue if applicable.
1285         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Removed a
1286         check that used isInitializingConnection.
1287
1288 2012-11-02  Chris Rogers  <crogers@google.com>
1289
1290         Automating gain AudioParam with linearRampToValueAtTime introduces buzzing distortion
1291         https://bugs.webkit.org/show_bug.cgi?id=100885
1292
1293         Reviewed by Kenneth Russell.
1294
1295         AudioParamTimeline needs to use double-precision for time-values to avoid drift and precision issues.
1296
1297         Covered by existing tests.
1298
1299         * Modules/webaudio/AudioParam.cpp:
1300         (WebCore::AudioParam::calculateTimelineValues):
1301         * Modules/webaudio/AudioParamTimeline.cpp:
1302         (WebCore::AudioParamTimeline::valueForContextTime):
1303         (WebCore::AudioParamTimeline::valuesForTimeRange):
1304         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
1305         * Modules/webaudio/AudioParamTimeline.h:
1306         (AudioParamTimeline):
1307
1308 2012-11-02  Stephen Chenney  <schenney@chromium.org>
1309
1310         Reduce redundant code in SimpleFontData[platform]
1311         https://bugs.webkit.org/show_bug.cgi?id=97245
1312
1313         Reviewed by Eric Seidel.
1314
1315         Move duplicated code out of platform specific files and into the common file.
1316         This represents all of the methods in SimpleFontData that do not have genuine
1317         platform specific code.
1318
1319         No new tests because there is no change at all in the functionality.
1320
1321         * platform/graphics/SimpleFontData.cpp:
1322         (WebCore):
1323         (WebCore::SimpleFontData::smallCapsFontData): Implementation from platform files.
1324         (WebCore::SimpleFontData::emphasisMarkFontData): Implementation from platform files.
1325         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
1326         (WebCore): Removed common code.
1327         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1328         (WebCore): Removed common code.
1329         * platform/graphics/mac/SimpleFontDataMac.mm:
1330         (WebCore): Removed common code.
1331         * platform/graphics/pango/SimpleFontDataPango.cpp:
1332         (WebCore): Removed common code.
1333         * platform/graphics/qt/SimpleFontDataQt.cpp:
1334         (WebCore): Removed common code.
1335         * platform/graphics/skia/SimpleFontDataSkia.cpp:
1336         (WebCore): Removed common code.
1337         * platform/graphics/win/SimpleFontDataWin.cpp:
1338         (WebCore): Removed common code.
1339         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1340         (WebCore): Removed common code.
1341         * platform/graphics/wx/SimpleFontDataWx.cpp:
1342         (WebCore): Removed common code.
1343
1344 2012-11-02  Adam Barth  <abarth@webkit.org>
1345
1346         memory-instrumentation-cached-images.html is crashing
1347         https://bugs.webkit.org/show_bug.cgi?id=101103
1348
1349         Unreviewed.
1350
1351         Restore code deleted in http://trac.webkit.org/changeset/133331.
1352
1353         * bindings/v8/IntrusiveDOMWrapperMap.h:
1354
1355 2012-11-02  Simon Fraser  <simon.fraser@apple.com>
1356
1357         Enable SUBPIXEL_LAYOUT on Mac
1358         https://bugs.webkit.org/show_bug.cgi?id=101076
1359
1360         Reviewed by Dave Hyatt.
1361
1362         Define ENABLE_SUBPIXEL_LAYOUT and include it in FEATURE_DEFINES.
1363
1364         * Configurations/FeatureDefines.xcconfig:
1365
1366 2012-11-02  Lianghui Chen  <liachen@rim.com>
1367
1368         [BlackBerry] ResourceHandle::cancel() in ResourceHandleBlackBerry should setClient to null.
1369         https://bugs.webkit.org/show_bug.cgi?id=101082
1370
1371         Internal PR: 235410.
1372         Patch suggested by George Staikos, prepared by Lyon Chen.
1373         Reviewed by Yong Li.
1374
1375         ResourceHandle::cancel() should call setClient(0) to close the window
1376         during which it has been cancelled but its client is still there and can
1377         be called.
1378
1379         No new tests as it's a code improvement without obvious bug.
1380
1381         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
1382         (WebCore::ResourceHandle::cancel):
1383
1384 2012-11-02  Anders Carlsson  <andersca@apple.com>
1385
1386         Add a PluginInactive plug-in unavailability reason
1387         https://bugs.webkit.org/show_bug.cgi?id=101089
1388
1389         Reviewed by Sam Weinig.
1390
1391         This is to be used by Mac WebKit and WebKit2 shortly.
1392
1393         * English.lproj/Localizable.strings:
1394         * platform/LocalizedStrings.cpp:
1395         (WebCore::inactivePluginText):
1396         (WebCore):
1397         * platform/LocalizedStrings.h:
1398         (WebCore):
1399         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1400         (WebCore::inactivePluginText):
1401         (WebCore):
1402         * platform/efl/LocalizedStringsEfl.cpp:
1403         (WebCore::inactivePluginText):
1404         (WebCore):
1405         * platform/gtk/LocalizedStringsGtk.cpp:
1406         (WebCore::inactivePluginText):
1407         (WebCore):
1408         * platform/qt/LocalizedStringsQt.cpp:
1409         (WebCore::inactivePluginText):
1410         (WebCore):
1411         * rendering/RenderEmbeddedObject.cpp:
1412         (WebCore::unavailablePluginReplacementText):
1413         * rendering/RenderEmbeddedObject.h:
1414
1415 2012-11-02  Rob Buis  <rbuis@rim.com>
1416
1417         [CMAKE] Remove QNX specific section
1418         https://bugs.webkit.org/show_bug.cgi?id=101063
1419
1420         Reviewed by Daniel Bates.
1421
1422         We do not need the QNX section anymore, so also remove the FEATURE_DEFINES_CSS variable as it
1423         equals FEATURE_DEFINES_WITH_SPACE_SEPARATOR.
1424
1425         * CMakeLists.txt:
1426
1427 2012-11-02  Michael Saboff  <msaboff@apple.com>
1428
1429         visitedHashLink() converts 8 bit URLs and attributes to 16 bits.
1430         https://bugs.webkit.org/show_bug.cgi?id=101014
1431
1432         Reviewed by Geoffrey Garen.
1433
1434         Converted most of the static methods to templated based on character type.  Changed visitedHashLink to 
1435         check bitness of both the base URL and attribute.  If both are 8 bit, then we process using the LChar
1436         version of the templated methods.  Otherwise we use the 16 bit flavor.
1437
1438         Changes covered by existing tests.
1439
1440         * platform/LinkHash.cpp:
1441         (WebCore::findSlashDotDotSlash):
1442         (WebCore::findSlashSlash):
1443         (WebCore::findSlashDotSlash):
1444         (WebCore::containsColonSlashSlash):
1445         (WebCore::squeezeOutNullCharacters):
1446         (WebCore::cleanSlashDotDotSlashes):
1447         (WebCore::mergeDoubleSlashes):
1448         (WebCore::cleanSlashDotSlashes):
1449         (WebCore::cleanPath):
1450         (WebCore::matchLetter):
1451         (WebCore::needsTrailingSlash):
1452         (WebCore::visitedURLInline):
1453         (WebCore::visitedURL):
1454         (WebCore::visitedLinkHash):
1455
1456 2012-11-02  Ian Vollick  <vollick@chromium.org>
1457
1458         Support invalidation tracking for composited layers
1459         https://bugs.webkit.org/show_bug.cgi?id=97801
1460
1461         Reviewed by Simon Fraser.
1462
1463         GraphicsLayers now store invalidated rects and can include them in
1464         the layer tree dump.
1465
1466         Test: compositing/repaint/invalidations-on-composited-layers.html
1467
1468         * WebCore.exp.in:
1469           Exports FrameView::resetTrackedRepaints()
1470         * page/FrameView.cpp:
1471         (WebCore::FrameView::setTracksRepaints):
1472           Notifies each compositor that we are starting/stopping repaints.
1473         (WebCore::FrameView::resetTrackedRepaints):
1474           Moved implementation to the cpp file.
1475         * platform/graphics/GraphicsLayer.cpp:
1476         (WebCore::GraphicsLayer::~GraphicsLayer):
1477           Clears the repaint rects associated with this layer.
1478         (WebCore::GraphicsLayer::resetTrackedRepaints):
1479           Clears the repaint rects associated with this layer.
1480           Note that the repaint rects are stored in a statically allocated
1481           HashMap to avoid using space on the graphics layers.
1482         (WebCore::GraphicsLayer::addRepaintRect):
1483           Adds a repaint rect to list associated with this layer in the
1484           hash map mentioned above.
1485         (WebCore::GraphicsLayer::dumpProperties):
1486           This has been modified to include the repaint rects in the dump
1487           if they've been requested.
1488         * platform/graphics/GraphicsLayerClient.h:
1489         (WebCore::GraphicsLayerClient::isTrackingRepaints):
1490           This is how graphics layers check if repaint tracking is happening.
1491           Returns false by default.
1492         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
1493         (WebCore::GraphicsLayerBlackBerry::setContentsNeedsDisplay):
1494         (WebCore::GraphicsLayerBlackBerry::setNeedsDisplay):
1495         (WebCore::GraphicsLayerBlackBerry::setNeedsDisplayInRect):
1496           These now call GraphicsLayer::addRepaintRect as necessary.
1497         * platform/graphics/ca/GraphicsLayerCA.cpp:
1498         (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
1499           Now calls GraphicsLayer::addRepaintRect as necessary.
1500         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1501         (WebCore::GraphicsLayerChromium::setContentsNeedsDisplay):
1502         (WebCore::GraphicsLayerChromium::setNeedsDisplay):
1503         (WebCore::GraphicsLayerChromium::setNeedsDisplayInRect):
1504           These now call GraphicsLayer::addRepaintRect as necessary.
1505         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1506         (WebCore::GraphicsLayerClutter::setNeedsDisplay):
1507         (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect):
1508           These now call GraphicsLayer::addRepaintRect as necessary.
1509         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1510         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
1511         (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
1512         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
1513           These now call GraphicsLayer::addRepaintRect as necessary.
1514         * rendering/RenderLayerBacking.cpp:
1515         (WebCore::RenderLayerBacking::isTrackingRepaints):
1516           Required since this is a GraphicsLayerClient.
1517         * rendering/RenderLayerCompositor.cpp:
1518         (WebCore::RenderLayerCompositor::layerTreeAsText):
1519           Now accepts a flag to include the repaint rects in the layer tree
1520           dump.
1521         (WebCore::resetTrackedRepaintRectsRecursive):
1522           Clears the repaint rects on all graphics layers.
1523         (WebCore::RenderLayerCompositor::resetTrackedRepaintRects):
1524           Clears the repaint rects on all graphics layers.
1525         (WebCore::RenderLayerCompositor::isTrackingRepaints):
1526           Required since this is a GraphicsLayerClient.
1527         * testing/Internals.cpp:
1528         (WebCore::Internals::layerTreeAsText):
1529         * testing/Internals.h:
1530         * testing/Internals.idl:
1531           The internals changes plumb the new flag for including the repaint
1532           rects in the layer tree dump.
1533
1534 2012-11-02  Adam Barth  <abarth@webkit.org>
1535
1536         [V8] Generalize NodeWrapperMap to be able to handle other sorts of keys
1537         https://bugs.webkit.org/show_bug.cgi?id=100973
1538
1539         Reviewed by Stephen White.
1540
1541         This is the first step towards using intrusive DOM wrapper maps more
1542         widely in WebCore (see
1543         http://lists.webkit.org/pipermail/webkit-dev/2012-November/022686.html
1544         for more context).
1545
1546         * bindings/v8/DOMDataStore.cpp:
1547         (WebCore::DOMDataStore::DOMDataStore):
1548         * bindings/v8/IntrusiveDOMWrapperMap.h:
1549         (WebCore):
1550         (WebCore::IntrusiveDOMWrapperMap::weakCallback):
1551
1552 2012-11-02  Adam Barth  <abarth@webkit.org>
1553
1554         ASSERT in RenderLayer::hitTestContents can fire
1555         https://bugs.webkit.org/show_bug.cgi?id=99656
1556
1557         Reviewed by Eric Seidel.
1558
1559         The issue is that updateHitTestResult and addNodeToRectBasedTestResult
1560         are using two different nodes. Since they aren't consistent, we violate
1561         assertions about only setting the inner node if we're doing a
1562         rect-based hit test. This patch makes the two consistent.
1563
1564         Test: fast/dom/nodesFromRect/nodesFromRect-continuation-crash.html
1565
1566         * rendering/RenderBlock.cpp:
1567         (WebCore::RenderBlock::nodeForHitTest):
1568         (WebCore):
1569         (WebCore::RenderBlock::nodeAtPoint):
1570         (WebCore::RenderBlock::updateHitTestResult):
1571         * rendering/RenderBlock.h:
1572         (RenderBlock):
1573
1574 2012-11-02  Mike West  <mkwst@chromium.org>
1575
1576         Prefer 'Content-Security-Policy' to 'X-WebKit-CSP'.
1577         https://bugs.webkit.org/show_bug.cgi?id=101043
1578
1579         Reviewed by Adam Barth.
1580
1581         The canonical 'Content-Security-Policy' header landed in 133095, but we
1582         missed a few tests while updating to the new hotness. We also should
1583         start using the canonical header for the inspector.
1584
1585         This patch should have no visible change; tests should continue to pass
1586         with the new header, just as they did with the old header.
1587
1588         * inspector/front-end/inspector.html:
1589
1590 2012-11-02  Adam Barth  <abarth@webkit.org>
1591
1592         ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development
1593         https://bugs.webkit.org/show_bug.cgi?id=100711
1594
1595         Reviewed by Eric Seidel.
1596
1597         No one is actively working on ENABLE(UNDO_MANAGER). There are some
1598         tricky lifetime issues in the UndoManager API that are complicating
1599         ongoing work to improve the interaction between WebCore and the garbage
1600         collector. Rather than leave this code in a broken state, we should
1601         remove it for the time being. We can always restore it from the svn
1602         history when there is an active owner for this code.
1603
1604         * CMakeLists.txt:
1605         * Configurations/FeatureDefines.xcconfig:
1606         * DerivedSources.cpp:
1607         * DerivedSources.make:
1608         * DerivedSources.pri:
1609         * GNUmakefile.features.am:
1610         * GNUmakefile.list.am:
1611         * Target.pri:
1612         * UseJSC.cmake:
1613         * UseV8.cmake:
1614         * WebCore.gypi:
1615         * WebCore.vcproj/WebCore.vcproj:
1616         * WebCore.xcodeproj/project.pbxproj:
1617         * bindings/js/DOMTransaction.cpp: Removed.
1618         * bindings/js/DOMTransaction.h: Removed.
1619         * bindings/js/JSBindingsAllInOne.cpp:
1620         * bindings/js/JSUndoManagerCustom.cpp: Removed.
1621         * bindings/v8/DOMTransaction.cpp: Removed.
1622         * bindings/v8/DOMTransaction.h: Removed.
1623         * bindings/v8/V8HiddenPropertyName.h:
1624         (WebCore):
1625         * bindings/v8/custom/V8DOMTransactionCustom.cpp: Removed.
1626         * bindings/v8/custom/V8UndoManagerCustom.cpp: Removed.
1627         * css/PropertySetCSSStyleDeclaration.cpp:
1628         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
1629         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
1630         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
1631         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
1632         * dom/CharacterData.cpp:
1633         (WebCore::CharacterData::setDataAndUpdate):
1634         * dom/ContainerNode.cpp:
1635         (WebCore::willRemoveChild):
1636         (WebCore::willRemoveChildren):
1637         (WebCore::updateTreeAfterInsertion):
1638         * dom/Document.cpp:
1639         (WebCore::Document::Document):
1640         * dom/Document.h:
1641         (WebCore):
1642         (Document):
1643         * dom/Document.idl:
1644         * dom/Element.cpp:
1645         (WebCore::Element::willModifyAttribute):
1646         * editing/CompositeEditCommand.h:
1647         * editing/DOMTransaction.idl: Removed.
1648         * editing/DOMTransactionStep.cpp: Removed.
1649         * editing/DOMTransactionStep.h: Removed.
1650         * editing/Editor.cpp:
1651         (WebCore::Editor::appliedEditing):
1652         (WebCore::Editor::unappliedEditing):
1653         (WebCore::Editor::reappliedEditing):
1654         (WebCore::Editor::canUndo):
1655         (WebCore::Editor::undo):
1656         (WebCore::Editor::canRedo):
1657         (WebCore::Editor::redo):
1658         * editing/UndoManager.cpp: Removed.
1659         * editing/UndoManager.h: Removed.
1660         * editing/UndoManager.idl: Removed.
1661         * editing/UndoStep.h:
1662         (UndoStep):
1663
1664 2012-11-02  Mike West  <mkwst@chromium.org>
1665
1666         Measure the usage of the various CSP headers.
1667         https://bugs.webkit.org/show_bug.cgi?id=100974
1668
1669         Reviewed by Adam Barth.
1670
1671         Currently, we're collecting metrics regarding usage of the
1672         'X-WebKit-CSP' and 'X-WebKit-CSP-Report-Only' HTTP headers. We've
1673         recently added support for the canonical 'Content-Security-Policy'
1674         and 'Content-Security-Policy-Report-Only' headers. This patch adds
1675         those headers explicitly into the metrics, giving insight into uptake
1676         of the unprefixed header, and into usage of pure reporting vs.
1677         enforcement.
1678
1679         No visible functionality should change; all Content Security Policy
1680         tests should continue to pass.
1681
1682         * page/ContentSecurityPolicy.cpp:
1683         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1684             Convert the CSP header type into a FeatureObserver::Feature, and
1685             observe it.
1686         * page/FeatureObserver.h:
1687             Add three new values to the enum to cover the new header types.
1688
1689 2012-11-02  Ojan Vafai  <ojan@chromium.org>
1690
1691         Fix silly mistake from http://trac.webkit.org/changeset/133315.
1692         Forgot to remove the "!".
1693
1694         * css/StyleResolver.cpp:
1695         (WebCore::StyleResolver::canShareStyleWithElement):
1696
1697 2012-11-02  Tom Sepez  <tsepez@chromium.org>
1698
1699         Support X-XSS-Protection: report=URL header syntax in XSSAuditor.
1700         https://bugs.webkit.org/show_bug.cgi?id=100892
1701
1702         Reviewed by Adam Barth.
1703
1704         This patch adds a security feature which allows a violation report to be sent back
1705         to a site when the XSSAuditor detects a reflected XSS against it.  It uses the same
1706         reporting mechanism as for CSP violation reports.
1707
1708         Tests: http/tests/security/xssAuditor/malformed-xss-protection-header-5.html
1709                http/tests/security/xssAuditor/malformed-xss-protection-header-6.html
1710                http/tests/security/xssAuditor/malformed-xss-protection-header-7.html
1711                http/tests/security/xssAuditor/malformed-xss-protection-header-8.html
1712                http/tests/security/xssAuditor/malformed-xss-protection-header-9.html
1713                http/tests/security/xssAuditor/report-script-tag.html
1714                http/tests/security/xssAuditor/xss-protection-parsing-03.html
1715                http/tests/security/xssAuditor/xss-protection-parsing-04.html
1716
1717         * html/parser/XSSAuditor.cpp:
1718         (WebCore::XSSAuditor::XSSAuditor):
1719         (WebCore::XSSAuditor::init):
1720         (WebCore::XSSAuditor::filterToken):
1721         Invoke Ping loader's violation reporting, if requested, when a reflected
1722         XSS is detected.
1723         
1724         * html/parser/XSSAuditor.h:
1725         XSSAuditor class need to store the report URL as well as the undigested versions
1726         of the request URL and request body for reporting.
1727
1728         * loader/MixedContentChecker.cpp:
1729         (WebCore):
1730         * loader/MixedContentChecker.h:
1731         (MixedContentChecker):
1732         Make isMixedContent() method public.
1733
1734         * loader/PingLoader.cpp:
1735         (WebCore::PingLoader::sendViolationReport):
1736         * loader/PingLoader.h:
1737         (PingLoader):
1738         * page/ContentSecurityPolicy.cpp:
1739         (WebCore::ContentSecurityPolicy::reportViolation):
1740         Renamed reportContentSecurityPolicyViolation() method to sendViolationReport(),
1741         since this is now used to send more than just CSP violations.
1742         
1743         * platform/network/HTTPParsers.cpp:
1744         (WebCore):
1745         (WebCore::skipEquals):
1746         (WebCore::skipValue):
1747         (WebCore::parseXSSProtectionHeader):
1748         * platform/network/HTTPParsers.h:
1749         Parse and return report= directive in X-XSS-Protection header.
1750         
1751 2012-11-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1752
1753         Unreviewed, rolling out r133313.
1754         http://trac.webkit.org/changeset/133313
1755         https://bugs.webkit.org/show_bug.cgi?id=101078
1756
1757         "A lot of tests hit the ASSERTs introduced by this patch"
1758         (Requested by haraken on #webkit).
1759
1760         * bindings/v8/V8DOMWrapper.h:
1761         (WebCore::V8DOMWrapper::setDOMWrapper):
1762
1763 2012-11-02  Ojan Vafai  <ojan@chromium.org>
1764
1765         Unreviewed, rolling out r132913.
1766         http://trac.webkit.org/changeset/132913
1767         https://bugs.webkit.org/show_bug.cgi?id=91850
1768
1769         Caused performance regressions.
1770         See https://bugs.webkit.org/show_bug.cgi?id=100872 for details.
1771
1772         * bindings/v8/V8PerIsolateData.cpp:
1773         (WebCore::V8PerIsolateData::visitExternalStrings):
1774         * bindings/v8/V8StringResource.cpp:
1775         (StringTraits):
1776         (WebCore::v8StringToWebCoreString):
1777         * bindings/v8/V8ValueCache.cpp:
1778         (WebCore::makeExternalString):
1779         (WebCore::WebCoreStringResource::visitStrings):
1780         * bindings/v8/V8ValueCache.h:
1781         (WebCore::WebCoreStringResource::WebCoreStringResource):
1782         (WebCore::WebCoreStringResource::~WebCoreStringResource):
1783         (WebCore::WebCoreStringResource::data):
1784         (WebCoreStringResource):
1785         (WebCore::WebCoreStringResource::length):
1786         (WebCore::WebCoreStringResource::atomicString):
1787         (WebCore::WebCoreStringResource::toStringResource):
1788
1789 2012-11-02  Martin Robinson  <mrobinson@igalia.com>
1790
1791         [GTK] Remove dependency on SoupPasswordManager
1792         https://bugs.webkit.org/show_bug.cgi?id=100775
1793
1794         Reviewed by Carlos Garcia Campos.
1795
1796         Remember passwords using libsecret instead of SoupPasswordManager. We accomplish this using
1797         a new class, CredentialBackingStore. CredentialBackingStore will soon be the thing that backs
1798         CredentialStoreGtk. The name is based on the name of a similar class from the BlackBerry port.
1799
1800         No new tests. This does not change behavior.
1801
1802         * GNUmakefile.am: Add libsecret flags to the build and the new directory to the include list.
1803         * GNUmakefile.list.am: Add new files to the source list.
1804         * platform/gtk/GRefPtrGtk.cpp: Add support for SecretValue to GRefPtrGtk.
1805         * platform/gtk/GtkAuthenticationDialog.cpp: Replace interaction with SoupPasswordManger with
1806         interaction with the CredentialBackingStore. Remove all conditional SoupPasswordManager guards.
1807         * platform/gtk/GtkAuthenticationDialog.h: Ditto.
1808         * platform/network/gtk/CredentialBackingStore.cpp: Added.
1809         * platform/network/gtk/CredentialBackingStore.h: Added.
1810
1811 2012-11-02  Jinwoo Song  <jinwoo7.song@samsung.com>
1812
1813         Fix build warning [-Wswitch]
1814         https://bugs.webkit.org/show_bug.cgi?id=101029
1815
1816         Reviewed by Alexey Proskuryakov.
1817
1818         Fix build warning message: enumeration value ‘Viewport’ not handled in switch [-Wswitch]
1819         in Source/WebCore/css/StyleSheetContents.cpp.
1820         Add case statement for 'Viewport' with the CSS_DEVICE_ADAPTATION macro.
1821
1822         * css/StyleSheetContents.cpp:
1823         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1824
1825 2012-11-02  Ojan Vafai  <ojan@chromium.org>
1826
1827         Move m_element checks out of canShareStyle into locateSharedStyle
1828         https://bugs.webkit.org/show_bug.cgi?id=101070
1829
1830         Reviewed by Darin Adler.
1831
1832         Can shareStyleWithElement is called for each sibling as we look for a
1833         shareElement. locateSharedStyle is called once for the element we're
1834         trying to find a style for. Checks that only depend on the latter
1835         element should, thus be in locateSharedStyle.
1836
1837         No new tests. There should be no change in behavior, except possibly
1838         a performance improvement in some cases.
1839
1840         * css/StyleResolver.cpp:
1841         (WebCore::StyleResolver::canShareStyleWithElement):
1842         (WebCore::StyleResolver::locateSharedStyle):
1843
1844 2012-11-02  Kentaro Hara  <haraken@chromium.org>
1845
1846         [V8] Add ASSERT() to guarantee that we don't store NULL pointers to V8 internal fields
1847         https://bugs.webkit.org/show_bug.cgi?id=101054
1848
1849         Reviewed by Adam Barth.
1850
1851         I'm investigating a Chromium crash bug:
1852         http://code.google.com/p/chromium/issues/detail?id=155942
1853
1854         I've not yet identified the root cause (because I can't reproduce
1855         the crash), but it looks like we are storing NULL pointers to
1856         V8 internal fields. Just in case, we can add an ASSERT() to
1857         guarantee that NULL pointers are never stored. (Also I'm hoping
1858         that this ASSERT() will give me more debug information.)
1859
1860         No tests. No change in behavior.
1861
1862         * bindings/v8/V8DOMWrapper.h:
1863         (WebCore::V8DOMWrapper::setDOMWrapper):
1864
1865 2012-11-02  Kevin Ellis  <kevers@chromium.org>
1866
1867         Imrpove scoring in touch adjustment to address bias towards smaller targets.
1868         https://bugs.webkit.org/show_bug.cgi?id=101046
1869
1870         Reviewed by Antonio Gomes.
1871
1872         Update the touch overlap score for touch adjustmetn to normalize
1873         with respect to the maximum possible overlap rather than the size
1874         of the target element.  This change enables good overlap scores for
1875         small and large targets alike.  Prior to the patch it was not possible
1876         to get a good overlap score for a sufficiently larget target.
1877
1878         Covered by existing tests, which have been updated to reflect the
1879         intended behavior.
1880
1881         * page/TouchAdjustment.cpp:
1882         (WebCore::TouchAdjustment::hybridDistanceFunction):
1883
1884 2012-11-02  Mike West  <mkwst@chromium.org>
1885
1886         Web Inspector: Repeated errors are rendered incorrectly: link is not floating to the right.
1887         https://bugs.webkit.org/show_bug.cgi?id=101032
1888
1889         Reviewed by Yury Semikhatsky.
1890
1891         https://bugs.webkit.org/show_bug.cgi?id=100525 incorrectly added
1892         '-webkit-flex: 1' only to the list generated for errors in the console.
1893         It should have been added to normal warning text as well. This patch
1894         fixes the problem.
1895
1896         * inspector/front-end/inspector.css:
1897         (.repeated-message .outline-disclosure, .repeated-message > .console-message-text):
1898
1899 2012-11-02  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1900
1901         Web Inspector: Timeline: show popup for CPU bars.
1902         https://bugs.webkit.org/show_bug.cgi?id=100951
1903
1904         Reviewed by Pavel Feldman.
1905
1906         Each CPU bar can represent a combination of several shorter messages.
1907         We should show information about combined messages - start time,
1908         total duration, CPU time, message count.
1909
1910         * English.lproj/localizedStrings.js: Added "Message Count" string.
1911         * inspector/front-end/TimelinePanel.js:
1912         (WebInspector.TimelinePanel.prototype._refreshMainThreadBars):
1913         Supply elements with underlying info.
1914         * inspector/front-end/TimelinePresentationModel.js:
1915         (WebInspector.TimelinePresentationModel.prototype.generateMainThreadBarPopupContent):
1916         Added.
1917
1918 2012-11-02  Alexei Filippov  <alph@chromium.org>
1919
1920         Web Inspector: Network panel grid UI is misaligned after r132888
1921         https://bugs.webkit.org/show_bug.cgi?id=101050
1922
1923         Rollback the change to basic data grid css and move it to the native memory
1924         snapshot datagrid css.
1925
1926         Reviewed by Alexander Pavlov.
1927
1928         * inspector/front-end/dataGrid.css:
1929         (.data-grid td):
1930         * inspector/front-end/nativeMemoryProfiler.css:
1931         (.native-snapshot-view .data-grid td):
1932
1933 2012-11-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1934
1935         Unreviewed, rolling out r133303.
1936         http://trac.webkit.org/changeset/133303
1937         https://bugs.webkit.org/show_bug.cgi?id=101068
1938
1939         "Broke qt wk2 build (seems like bots fails to rerun qmake if
1940         needed)" (Requested by kbalazs on #webkit).
1941
1942         * Target.pri:
1943         * WebCore.pri:
1944         * platform/PlatformStrategies.cpp:
1945         (WebCore):
1946         * platform/qt/QtTestSupport.h: Removed.
1947
1948 2012-11-02  Balazs Kelemen  <kbalazs@webkit.org>
1949
1950         [Qt][WK2] setPlatformStrategies always asserts after r132744
1951         https://bugs.webkit.org/show_bug.cgi?id=100838
1952
1953         Reviewed by Simon Hausmann.
1954
1955         The problem here is that we use QWebSettings::clearMemoryCaches, a WebKit1 API
1956         from the injected bundle, which calls initializeWebCoreQt and it sets the platform
1957         strategies to the one for WebKit1. We should stop using WebKit1 API's from WebKit2
1958         code. In order to keep the behavior, this patch adds exported helpers to WebCore
1959         that can be used from DumpRenderTree and WebKitTestRunner. This is the same idea
1960         as WebCoreTestSupport but these helpers are specific to Qt. Technically we could
1961         add it to the WebKit1 API for the time being, but my goal was to move in the direction
1962         of removing the WebKit1 dependency from WebKitTestRunner. We only build the file
1963         in non production mode.
1964
1965         Basically covered by all tests.
1966
1967         * Target.pri:
1968         * WebCore.pri: We need to link against fontconfig (only in non-production mode) since
1969         initializeTestFonts uses it.
1970         * platform/PlatformStrategies.cpp:
1971         (WebCore): Zero initialize the global static variable as it is expected by the functions
1972         below. It is a side fix. It seems like it has not been shown on debug WebKit2 bots because
1973         common runtime environments tend to zero initialize statics by default - but I don't think
1974         we should rely on that.
1975         * platform/qt/QtTestSupport.cpp: Added. I choose GPL license because code from qwebsettings.cpp
1976         is also under that.
1977         (WebKit):
1978         (WebKit::QtTestSupport::clearMemoryCaches): This is basically a copy of QWebSettings::clearMemoryCaches
1979         without calling initializeWebCoreQt.
1980         (WebKit::QtTestSupport::initializeTestFonts): I moved this code here as well now that we have to expose
1981         symbols from WebCore anyway. The advantage is that now we don't have to build it twice and we don't need
1982         additional files to forward it from the directory of DumpRenderTree for WebKitTestRunner.
1983         I added a call to FontCace::invalidate in the case when the font set has been changed so that it will do
1984         the job even if we would stop clearing all caches between tests. Also moved the call to
1985         QFontDatabase::removeAllApplicationFonts from callers to here.
1986         * platform/qt/QtTestSupport.h:
1987         (WebKit):
1988         (QtTestSupport):
1989
1990 2012-11-02  Kent Tamura  <tkent@chromium.org>
1991
1992         Optimize DateTimeFormat::quoteAndAppendLiteral output
1993         https://bugs.webkit.org/show_bug.cgi?id=101040
1994
1995         Reviewed by Kentaro Hara.
1996
1997         In LDML date format pattern, only ASCII alphabet and quote have special
1998         roles. So we don't need to quote the input string if it doesn't contain
1999         them.
2000
2001         No new tests. Updated WebKit/chromium/tests/LocaleWinTest.cpp
2002
2003         * platform/text/DateTimeFormat.cpp:
2004         (WebCore::isASCIIAlphabetOrQuote): A helper to check special characters.
2005         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
2006         Append the input string as is if it has no special character.
2007
2008 2012-11-02  Ilya Tikhonovsky  <loislo@chromium.org>
2009
2010         Web Inspector: NMI instrument NodeRareData::Map. It uses ~250k on nytimes.com
2011         https://bugs.webkit.org/show_bug.cgi?id=101052
2012
2013         Reviewed by Yury Semikhatsky.
2014
2015         I noticed that in many cases cache structures are plain static HashMap, HashSet etc.
2016         MemoryAgent can visit it but instrumentation for these containers report no objectType.
2017         It means that addRootObject method needs to accept objectType property as an argument.
2018         Otherwise I would have had to create a proxy class with proper objectType.
2019
2020         * dom/WebCoreMemoryInstrumentation.cpp:
2021         (WebCore::WebCoreMemoryInstrumentation::reportMemoryUsage):
2022         (WebCore):
2023         * dom/WebCoreMemoryInstrumentation.h:
2024         (WebCoreMemoryInstrumentation):
2025         (WebCore):
2026         * inspector/InspectorMemoryAgent.cpp:
2027         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2028
2029 2012-11-02  Michael Brüning  <michael.bruning@digia.com>
2030
2031         [Qt][WK2] ASSERT hit for every mouse click
2032         https://bugs.webkit.org/show_bug.cgi?id=100607
2033
2034         Reviewed by Jocelyn Turcotte.
2035
2036         Changed the logic of absolutePathForRenderer to use the first highlight box as the mid box 
2037         by uniting the two in case the mid box is empty. This allows the first box to be merged with
2038         the last box should they intersect, and thereby prevents an ASSERT in addHighlightRect that is
2039         triggered by two intersecting boxes being passed to addHighlightRect as separate ones.
2040
2041         Also, this patch removes some superfluous checks for LayoutRect::isEmpty, which is being checked
2042         in LayoutRect::intersects already.
2043
2044         No new tests, but added manual test: ManualTests/tap-gesture-on-em-link-tap-highlight-assert.html
2045
2046         * page/GestureTapHighlighter.cpp:
2047
2048 2012-11-02  Arpita Bahuguna  <arpitabahuguna@gmail.com>
2049
2050         Regression r130057: Improper preferred width calculation when an inline replaced object, wrapped in an inline flow, follows some text.
2051         https://bugs.webkit.org/show_bug.cgi?id=99442
2052
2053         Reviewed by Levi Weintraub.
2054
2055         Extra width is displayed after an inline replaced object that follows some
2056         text (not ending in a whitespace) within an inline-block. This is due to
2057         the end width (endMin) of the text object being carried forward (via inlineMin)
2058         and added onto the next line containing the inline replaced object.
2059
2060         This was caused as a regression to, or rather became apparent post the fix
2061         http://trac.webkit.org/changeset/130057 which fixed the block's preferred
2062         width when a renderInline with width contained an inline replaced object.
2063
2064         Test: fast/block/block-with-inline-replaced-child-following-text.html
2065
2066         * rendering/RenderBlock.cpp:
2067         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2068         Introduced another flag (shouldBreakLineAfterText) which is set when
2069         our current Text line (object) does not end in a whitespace, thereby
2070         implying that there could be more text following, for which the end width
2071         needs to be carried forward onto the next line.
2072
2073         In case the following object instead turns out to be an Inline Replaced
2074         object, we should terminate our previous line and reset this extra width.
2075         This is now being handled by checking for the shouldBreakLineAfterText
2076         flag while processing Inline Replaced objects.
2077
2078         Once set, shouldBreakLineAfterText shall be reset only if we get another
2079         Text object that ends in a whitespace, signifying the termination of
2080         that text line. For all other cases, we persist with this flag through
2081         the block's inline contents.
2082
2083 2012-11-02  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2084
2085         Web Inspector: Console: remove obsolete ctrl-shift-m shortcut
2086         https://bugs.webkit.org/show_bug.cgi?id=101036
2087
2088         Reviewed by Pavel Feldman.
2089
2090         Ctrl-shift-m on console dumps MemoryAgent.getDOMNodeCount
2091         This functionality seems to be obsolete.
2092
2093         * inspector/front-end/ConsoleView.js: Removed shortcut and function.
2094
2095 2012-11-02  Stephen Chenney  <schenney@chromium.org>
2096
2097         SVG classes cause layering violations in platform Font code
2098         https://bugs.webkit.org/show_bug.cgi?id=98513
2099
2100         Reviewed by Eric Seidel.
2101
2102         Add a contained class to save and restore GlpyhPage state in FontFallbackList.
2103         This allows us to remove the layering violation, and several methods, that
2104         previously existed to support SVGTextRunRenderingContext.
2105
2106         No new tests because no change at all in functionality.
2107
2108         * platform/graphics/FontFallbackList.h:
2109         (FontFallbackList):
2110         (GlyphPagesStateSaver): New state save and restore class
2111         (WebCore::FontFallbackList::GlyphPagesStateSaver::GlyphPagesStateSaver): Save GlyphPage state
2112         (WebCore::FontFallbackList::GlyphPagesStateSaver::~GlyphPagesStateSaver): Restore GlyphPage state
2113         * rendering/svg/SVGTextRunRenderingContext.cpp:
2114         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Shift to usage of the new class.
2115
2116 2012-11-02  Vsevolod Vlasov  <vsevik@chromium.org>
2117
2118         Web Inspector: Fix compilation errors
2119         https://bugs.webkit.org/show_bug.cgi?id=101027
2120
2121         Reviewed by Yury Semikhatsky.
2122
2123         * inspector/InjectedScriptSource.js:
2124         (.):
2125         * inspector/front-end/NativeMemorySnapshotView.js:
2126         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
2127
2128 2012-11-02  Andreas Kling  <kling@webkit.org>
2129
2130         Only resolve attribute-derived style once per shared ElementAttributeData.
2131         <http://webkit.org/b/100990>
2132
2133         Reviewed by Antti Koivisto.
2134
2135         Track the serialization of the "style" attribute, and the dirtiness of the presentation attribute style
2136         on ElementAttributeData instead of in Node flags.
2137
2138         This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements,
2139         since the state is no longer per-Element.
2140
2141         I've left the presentation attribute cache in there for now, since it covers two additional cases:
2142
2143             - Elements with the same attributes in different order.
2144             - Elements with the same presentation attributes, but with differing non-presentation attributes.
2145
2146         It's likely that we're not gaining much from it anymore, but that's a topic for another patch.
2147
2148         * dom/Node.h:
2149         * dom/ElementAttributeData.h:
2150         (WebCore::ElementAttributeData::presentationAttributeStyle):
2151         (WebCore::ElementAttributeData::setPresentationAttributeStyle):
2152         (WebCore::ElementAttributeData::styleAttributeIsDirty):
2153         (WebCore::ElementAttributeData::setStyleAttributeIsDirty):
2154         (WebCore::ElementAttributeData::presentationAttributeStyleIsDirty):
2155         (WebCore::ElementAttributeData::setPresentationAttributeStyleIsDirty):
2156         (ElementAttributeData):
2157         (WebCore::ElementAttributeData::ElementAttributeData):
2158         * dom/Element.cpp:
2159         (WebCore::Element::getAttribute):
2160         * dom/Element.h:
2161         (WebCore::Element::styleAttributeIsDirty):
2162         (WebCore::Element::updateInvalidAttributes):
2163         * dom/StyledElement.cpp:
2164         (WebCore::StyledElement::updateStyleAttribute):
2165         (WebCore::StyledElement::attributeChanged):
2166         (WebCore::StyledElement::styleAttributeChanged):
2167         (WebCore::StyledElement::inlineStyleChanged):
2168         * dom/StyledElement.h:
2169         (WebCore::StyledElement::invalidateStyleAttribute):
2170
2171             Move the "attribute style dirty" and "style attribute valid" node flags to ElementAttributeData
2172             and change them to both use dirty semantics.
2173
2174         * dom/ElementAttributeData.cpp:
2175         (WebCore::ElementAttributeData::cloneDataFrom):
2176
2177             Share the presentation attribute style between cloned elements initially.
2178
2179         * dom/StyledElement.h:
2180         (WebCore::StyledElement::presentationAttributeStyle):
2181         * css/StyleResolver.cpp:
2182         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
2183         (WebCore::StyleResolver::matchAllRules):
2184         (WebCore::StyleResolver::canShareStyleWithElement):
2185         * dom/ElementAttributeData.cpp:
2186         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
2187         (WebCore::ElementAttributeData::reportMemoryUsage):
2188         * inspector/InspectorCSSAgent.cpp:
2189         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2190
2191             Renamed StyledElement::attributeStyle() to presentationAttributeStyle(). The old name was too
2192             easily confused with "style attribute".
2193
2194         * dom/StyledElement.cpp:
2195         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2196
2197             Renamed from updateAttributeStyle().
2198
2199 2012-11-01  Kent Tamura  <tkent@chromium.org>
2200
2201         Introduce ENABLE_DATE_AND_TIME_INPUT_TYPES, and clarify usage of other related flags
2202         https://bugs.webkit.org/show_bug.cgi?id=101007
2203
2204         Reviewed by Kentaro Hara.
2205
2206         ChromeClient::openDateTimeChooser and Locale::formatDateTime are
2207         necessary if one of date/time input types is enabled and even if
2208         ENABLE_INPUT_MULTIPLE_FIELDS_UI is disabled. So they should be wrapped
2209         with ENABLE(DATE_AND_TIME_INPUT_TYPES).
2210
2211         The following clases are used only for ChromeClient::openDateTimeChooser.
2212         They should be wrapped with the same flag.
2213           - class DateTimeChooser
2214           - class DateTiemChooserClient
2215
2216         The following classes/functions are used for
2217         Locale::formatDateTime. They should be wrapped with the same flag.
2218           - Locale::dateFormat
2219           - Locale::monthFormat
2220           - Locale::timeFormat
2221           - Locale::shortTimeFormat
2222           - Locale::monthLabels
2223           - Locale::shortMonthLabels
2224           - Locale::standAloneMonthLabels
2225           - Locale::shortStandAloneMonthLabels
2226           - class DateTimeFormat
2227
2228         Also, we change the meaning of ENABLE_CALENDAR_PICKER. It meant
2229          1) <input> supports calendar picker UI, and
2230          2) WebCore/Resources/pagepopups/ is used for the calendar UI implementation.
2231         Now ENABLE_CALENDAR_PICKER means only 2.
2232
2233         No new tests because of no behavior changes.
2234
2235         * html/BaseDateAndTimeInputType.h: This is necessary only if date/time
2236         input types are enabled because this is a common super class of
2237         date/time InputType classes.
2238         * html/BaseDateAndTimeInputType.cpp: Ditto.
2239         * html/BaseChooserOnlyDateAndTimeInputType.cpp: Ditto.
2240         * html/BaseChooserOnlyDateAndTimeInputType.h: Ditto.
2241
2242         * page/ChromeClient.h: Change the flag for openDateTimeChooser, and add a comment.
2243         * loader/EmptyClients.cpp: Follow the openDateTimeChooser flag change.
2244         * loader/EmptyClients.h: Ditto.
2245         * platform/DateTimeChooser.h:
2246         This is needed only if ChromeClient::openDateTimeChooser is available.
2247         * platform/DateTimeChooserClient.h: Ditto.
2248
2249         * platform/LocalizedStrings.h:
2250         weekFormatInLDML is necessary if ENABLE(INPUT_TYPE_WEEK) regardless of
2251         ENABLE(INPUT_MULTIPLE_FIELDS_UI).
2252
2253         * platform/text/PlatformLocale.h:
2254         Change the condition for Locale::formatDateTime and the code used by
2255         Locale::formatDateTime.
2256         * platform/text/PlatformLocale.cpp:
2257         (WebCore::Locale::formatDateTime):
2258         This is necessary even if !ENABLE(INPUT_MULTIPLE_FIELDS_UI), to produce
2259         localized representations of date/time values.
2260         * platform/text/LocaleICU.cpp:
2261         Change the condition for the code used by Locale::formatDateTime.
2262         * platform/text/LocaleICU.h: Ditto.
2263         * platform/text/LocaleNone.cpp: Ditto.
2264         * platform/text/mac/LocaleMac.h: Ditto.
2265         * platform/text/mac/LocaleMac.mm: Ditto.
2266         * platform/text/win/LocaleWin.cpp: Ditto.
2267         * platform/text/win/LocaleWin.h: Ditto.
2268         * platform/text/DateTimeFormat.cpp: Ditto.
2269         * platform/text/DateTimeFormat.h: Ditto.
2270
2271         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2272         Remove some #if-#endif for a picker indicator element because
2273         ENABLE_CALENDAR_PICKER meaning is changed.
2274         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Ditto.
2275
2276         * html/shadow/PickerIndicatorElement.cpp: CALENDAR_PICKER ->
2277         INPUT_MULTIPLE_FIELDS_UI because ENABLE_CALENDAR_PICKER meaning is changed.
2278         * html/shadow/PickerIndicatorElement.h: Ditto.
2279         * rendering/RenderDetailsMarker.cpp: Ditto.
2280         * rendering/RenderDetailsMarker.h: Ditto.
2281         * rendering/RenderTheme.h: Ditto.
2282         * rendering/RenderThemeChromiumCommon.cpp: Ditto.
2283         * rendering/RenderThemeChromiumCommon.h: Ditto.
2284         * rendering/RenderThemeChromiumMac.h: Ditto.
2285         * rendering/RenderThemeChromiumSkia.h: Ditto.
2286
2287 2012-11-02  Zeno Albisser  <zeno@webkit.org>
2288
2289         [Qt] Revert QCocoaNativeInterface workaround from r131720.
2290         https://bugs.webkit.org/show_bug.cgi?id=100842
2291
2292         Reviewed by Simon Hausmann.
2293
2294         After updating Qt5 on the buildbots, the workaround
2295         introduced in r131720 is not needed anymore.
2296
2297         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2298         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2299
2300 2012-11-02  Kent Tamura  <tkent@chromium.org>
2301
2302         Add a common base class for date/time input types without inline editing behavior
2303         https://bugs.webkit.org/show_bug.cgi?id=101031
2304
2305         Reviewed by Hajime Morita.
2306
2307         Add BaseChooserOnlyDateAndTimeInputType class, which will support
2308         DateTimeChooserClient, and date/time input types inherit it if
2309         !ENABLE(INPUT_MULTIPLE_FIELDS_UI).
2310
2311         No new tests. This doesn't change any behavior.
2312
2313         * CMakeLists.txt: Add BaseChooserOnlyDateAndTimeInputType.{cpp,h}.
2314         * GNUmakefile.list.am: Ditto.
2315         * Target.pri: Ditto.
2316         * WebCore.gypi: Ditto.
2317         * WebCore.xcodeproj/project.pbxproj: Ditto.
2318         * html/BaseChooserOnlyDateAndTimeInputType.cpp: Added.
2319         * html/BaseChooserOnlyDateAndTimeInputType.h: Added.
2320
2321         * html/DateInputType.h: Inherit BaseChooserOnlyDateAndTimeInputType if
2322         !ENABLE(INPUT_MULTIPLE_FIELDS_UI).
2323         * html/DateTimeInputType.h: Ditto.
2324         * html/DateTimeLocalInputType.h: Ditto.
2325         * html/MonthInputType.h: Ditto.
2326         * html/TimeInputType.h: Ditto.
2327         * html/WeekInputType.h: Ditto.
2328
2329 2012-11-02  Peter Wang  <peter.wang@torchmobile.com.cn>
2330
2331         Web Inspector: [JSC] implement WorkerScriptDebugServer
2332         https://bugs.webkit.org/show_bug.cgi?id=99801
2333
2334         Reviewed by Yury Semikhatsky.
2335
2336         To implement Worker Inspector for JSC.
2337         The virtual function "runEventLoopWhilePaused" is defined, since there are different ways to block
2338         the JS running in worker-context and normal page-context.
2339         The function "isContentScript" now is virtual because the original invoked functions are useless
2340         and cause problem in worker-context.
2341         In function "WebCore::WorkerScriptController::attachDebugger", we invoke "initScriptIfNeeded" to
2342         ensure the JSGloblalObject exist in the case of attaching Debugger before executing the worker
2343         JS code (Pause on start).
2344
2345         No new test case.
2346
2347         * bindings/js/PageScriptDebugServer.cpp:
2348         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
2349         (WebCore):
2350         * bindings/js/PageScriptDebugServer.h:
2351         (PageScriptDebugServer):
2352         * bindings/js/ScriptDebugServer.cpp:
2353         (WebCore::ScriptDebugServer::isContentScript):
2354         (WebCore::ScriptDebugServer::pauseIfNeeded):
2355         * bindings/js/ScriptDebugServer.h:
2356         (JSC):
2357         (ScriptDebugServer):
2358         * bindings/js/WorkerScriptController.cpp:
2359         (WebCore::WorkerScriptController::attachDebugger):
2360         (WebCore):
2361         (WebCore::WorkerScriptController::detachDebugger):
2362         * bindings/js/WorkerScriptController.h:
2363         (WorkerScriptController):
2364         * bindings/js/WorkerScriptDebugServer.cpp:
2365         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2366         (WebCore):
2367         (WebCore::WorkerScriptDebugServer::addListener):
2368         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2369         (WebCore::WorkerScriptDebugServer::removeListener):
2370         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
2371         * bindings/js/WorkerScriptDebugServer.h:
2372         (WorkerScriptDebugServer):
2373         (WebCore::WorkerScriptDebugServer::getListenersForGlobalObject):
2374         (WebCore::WorkerScriptDebugServer::isContentScript):
2375
2376 2012-11-02  KyungTae Kim  <ktf.kim@samsung.com>
2377
2378         Compilation warning in Node.cpp when USERSELECT_ALL is disabled
2379         https://bugs.webkit.org/show_bug.cgi?id=101025
2380
2381         Reviewed by Ryosuke Niwa.
2382
2383         The parameter 'treatment' is not used when USERSELECT_ALL is disabled. 
2384
2385         * dom/Node.cpp:
2386         (WebCore::Node::rendererIsEditable):
2387
2388 2012-11-01  Vsevolod Vlasov  <vsevik@chromium.org>
2389
2390         Web Inspector: Middle click closes an editor and pastes selection into current editor on Linux
2391         https://bugs.webkit.org/show_bug.cgi?id=100743
2392
2393         Reviewed by Alexander Pavlov.
2394
2395         Editor now consumes all middle mouse button mouse ups except for the ones in the main panel.
2396         TabbedPane now consumes all middle mouse button mouse ups as well.
2397         Navigator view does not pass focus anymore if element was selected with middle mouse button.
2398
2399         * inspector/front-end/DefaultTextEditor.js:
2400         (.preventDefaultOnMouseUp):
2401         (.consumeMouseUp):
2402         * inspector/front-end/NavigatorView.js:
2403         (WebInspector.NavigatorSourceTreeElement.prototype.ondblclick):
2404         * inspector/front-end/TabbedPane.js:
2405         (WebInspector.TabbedPane):
2406         (WebInspector.TabbedPane.prototype.onMouseUp):
2407         (WebInspector.TabbedPane.prototype.onMouseClick):
2408
2409 2012-11-01  Ilya Tikhonovsky  <loislo@chromium.org>
2410
2411         Web Inspector: NMI instrument ShadowRoot. It gives us ~400k on plus.google.com
2412         https://bugs.webkit.org/show_bug.cgi?id=100866
2413
2414         Reviewed by Yury Semikhatsky.
2415
2416         Plain vanilla memory instrumentation code for HTMLInputElement which has a ElementShadow.
2417
2418         * CMakeLists.txt:
2419         * GNUmakefile.list.am:
2420         * Target.pri:
2421         * WebCore.gypi:
2422         * WebCore.vcproj/WebCore.vcproj:
2423         * dom/DocumentOrderedMap.cpp:
2424         (WebCore::DocumentOrderedMap::reportMemoryUsage):
2425         (WebCore):
2426         * dom/DocumentOrderedMap.h:
2427         (DocumentOrderedMap):
2428         * dom/Element.cpp:
2429         (WebCore::Element::reportMemoryUsage):
2430         (WebCore):
2431         * dom/Element.h:
2432         * dom/ElementRareData.cpp: Added.
2433         (WebCore):
2434         (WebCore::ElementRareData::reportMemoryUsage):
2435         * dom/ElementRareData.h:
2436         (ElementRareData):
2437         * dom/ElementShadow.cpp:
2438         (WebCore::ElementShadow::reportMemoryUsage):
2439         (WebCore):
2440         * dom/ElementShadow.h:
2441         (ElementShadow):
2442         * dom/Node.cpp:
2443         (WebCore::Node::reportMemoryUsage):
2444         * dom/NodeRareData.cpp: Added.
2445         (WebCore):
2446         (WebCore::NodeListsNodeData::reportMemoryUsage):
2447         (WebCore::NodeRareData::reportMemoryUsage):
2448         * dom/NodeRareData.h:
2449         (NodeListsNodeData):
2450         (NodeRareData):
2451         * dom/ShadowRoot.cpp:
2452         (WebCore):
2453         (WebCore::ShadowRoot::reportMemoryUsage):
2454         * dom/ShadowRoot.h:
2455         (ShadowRoot):
2456         * dom/TreeScope.cpp:
2457         (WebCore::TreeScope::reportMemoryUsage):
2458         (WebCore):
2459         * dom/TreeScope.h:
2460         (TreeScope):
2461         * html/HTMLFormControlElement.cpp:
2462         (WebCore::HTMLFormControlElement::reportMemoryUsage):
2463         (WebCore):
2464         * html/HTMLFormControlElement.h:
2465         (HTMLFormControlElement):
2466         * html/HTMLInputElement.cpp:
2467         (WebCore::HTMLInputElement::reportMemoryUsage):
2468         (WebCore):
2469         * html/HTMLInputElement.h:
2470         (HTMLInputElement):
2471         * html/HTMLTextFormControlElement.cpp:
2472         (WebCore::HTMLTextFormControlElement::reportMemoryUsage):
2473         (WebCore):
2474         * html/HTMLTextFormControlElement.h:
2475         (HTMLTextFormControlElement):
2476
2477 2012-11-02  Vsevolod Vlasov  <vsevik@chromium.org>
2478
2479         Web Inspector: Cookie info in Network Resources Cookies tab shows "Invalid Date"
2480         https://bugs.webkit.org/show_bug.cgi?id=97471
2481
2482         Reviewed by Pavel Feldman.
2483
2484         This patch is partly based on patch by Otto Derek Cheung <otcheung@rim.com>.
2485         Refactored CookieParser so that all cookies in front-end were WebInspector.Cookie object.
2486         Cookie table can now show Max-Age as well as Expires attribute of a cookie.
2487         Fixed expiresDate calculation.
2488         Removed getters from CookieParser for better compilation.
2489
2490         * English.lproj/localizedStrings.js:
2491         * inspector/front-end/AuditRules.js:
2492         (WebInspector.AuditRules.CookieRuleBase.prototype.mapResourceCookies):
2493         (WebInspector.AuditRules.CookieSizeRule.prototype._average):
2494         (WebInspector.AuditRules.CookieSizeRule.prototype._max):
2495         (WebInspector.AuditRules.StaticCookielessRule.prototype._collectorCallback):
2496         * inspector/front-end/CookieItemsView.js:
2497         (WebInspector.CookieItemsView.prototype._filterCookiesForDomain):
2498         * inspector/front-end/CookieParser.js:
2499         (WebInspector.CookieParser.prototype.cookies):
2500         (WebInspector.CookieParser.prototype._flushCookie):
2501         (WebInspector.CookieParser.prototype._addCookie):
2502         (WebInspector.Cookie.prototype.httpOnly):
2503         (WebInspector.Cookie.prototype.secure):
2504         (WebInspector.Cookie.prototype.session):
2505         (WebInspector.Cookie.prototype.path):
2506         (WebInspector.Cookie.prototype.domain):
2507         (WebInspector.Cookie.prototype.expires):
2508         (WebInspector.Cookie.prototype.maxAge):
2509         (WebInspector.Cookie.prototype.size):
2510         (WebInspector.Cookie.prototype.setSize):
2511         (WebInspector.Cookie.prototype.expiresDate):
2512         (WebInspector.Cookie.prototype.attributes):
2513         (WebInspector.Cookies.getCookiesAsync):
2514         (WebInspector.Cookies.buildCookiesFromString):
2515         (WebInspector.Cookies.buildCookieProtocolObject):
2516         (WebInspector.Cookies.cookieMatchesResourceURL):
2517         (WebInspector.Cookies.cookieDomainMatchesResourceDomain):
2518         * inspector/front-end/CookiesTable.js:
2519         (WebInspector.CookiesTable):
2520         (WebInspector.CookiesTable.prototype._totalSize):
2521         (WebInspector.CookiesTable.prototype._sortCookies.expiresCompare):
2522         (WebInspector.CookiesTable.prototype._sortCookies):
2523         (WebInspector.CookiesTable.prototype._createGridNode):
2524         * inspector/front-end/HAREntry.js:
2525         (WebInspector.HAREntry.prototype._buildCookie):
2526
2527 2012-11-01  Yury Semikhatsky  <yurys@chromium.org>
2528
2529         Memory instrumentation: do not call checkCountedObject with wrong pointers
2530         https://bugs.webkit.org/show_bug.cgi?id=100958
2531
2532         Reviewed by Alexander Pavlov.
2533
2534         Removed redundant call to checkCountedObject.
2535
2536         * inspector/MemoryInstrumentationImpl.cpp:
2537         (WebCore::MemoryInstrumentationClientImpl::countObjectSize):
2538
2539 2012-11-02  Peter Wang  <peter.wang@torchmobile.com.cn>
2540
2541         Web Inspector: a small defect in "WorkersSidebarPanel.js"
2542         https://bugs.webkit.org/show_bug.cgi?id=101022
2543
2544         Reviewed by Yury Semikhatsky.
2545
2546         In "autoattachToWorkersClicked", the "event.target.checked" doesn't alwyas valid, since the
2547         "event.target" might be a label.
2548
2549         The problem just causes an error report, doesn't effect function, so no new test case.
2550
2551         * inspector/front-end/WorkersSidebarPane.js:
2552         (WebInspector.WorkersSidebarPane.prototype._autoattachToWorkersClicked):
2553
2554 2012-11-01  Shinya Kawanaka  <shinyak@chromium.org>
2555
2556         [Shadow] Element should have getter and setter of attribute 'pseudo'
2557         https://bugs.webkit.org/show_bug.cgi?id=100831
2558
2559         Reviewed by Hajime Morita.
2560
2561         We expose 'pseudo' attribute in Element. When nothing is assigned to 'pseudo', it should return null.
2562
2563         Test: fast/dom/shadow/pseudo-attribute.html
2564
2565         * dom/Element.cpp:
2566         (WebCore::Element::pseudo):
2567         (WebCore):
2568         (WebCore::Element::setPseudo):
2569         * dom/Element.h:
2570         (Element):
2571         * dom/Element.idl:
2572         * html/HTMLAttributeNames.in:
2573
2574 2012-11-01  Roger Fong  <roger_fong@apple.com>
2575
2576         Build fix. http://trac.webkit.org/changeset/133252 broke the Windows build.
2577         https://bugs.webkit.org/show_bug.cgi?id=101008
2578
2579         Reviewed by fischman@chromium.org.
2580
2581         * html/HTMLMediaElement.cpp:
2582         (WebCore::HTMLMediaElement::clearMediaPlayer):
2583         * html/HTMLMediaElement.h:
2584         (HTMLMediaElement):
2585
2586 2012-11-01  Stephen White  <senorblanco@chromium.org>
2587
2588         Unreviewed, rolling out r133244.
2589         http://trac.webkit.org/changeset/133244
2590         https://bugs.webkit.org/show_bug.cgi?id=100973
2591
2592         Broke Chromium Mac (clang) builds.
2593
2594         * bindings/v8/DOMDataStore.cpp:
2595         (WebCore::DOMDataStore::DOMDataStore):
2596         * bindings/v8/IntrusiveDOMWrapperMap.h:
2597         (WebCore::DOMNodeWrapperMap::weakCallback):
2598
2599 2012-11-01  Ami Fischman  <fischman@chromium.org>
2600
2601         HTMLMediaPlayer should free m_player when src is set/changed
2602         https://bugs.webkit.org/show_bug.cgi?id=99647
2603
2604         Reviewed by Eric Carlson.
2605
2606         New ManualTest added; manual since leaking media players doesn't have layoutTestController-visible effects.
2607
2608         * html/HTMLMediaElement.cpp:
2609         (WebCore::HTMLMediaElement::parseAttribute): clearMediaPlayer() when src is set/changed
2610         (WebCore::HTMLMediaElement::userCancelledLoad): use new clearMediaPlayer() helper
2611         (WebCore::HTMLMediaElement::clearMediaPlayer): clear m_player and associated timers/flags
2612         (WebCore):
2613         (WebCore::HTMLMediaElement::createMediaPlayer): whitespace-only change
2614         * html/HTMLMediaElement.h: new method: createMediaPlayer().
2615         (HTMLMediaElement):
2616
2617 2012-11-01  Tom Sepez  <tsepez@chromium.org>
2618
2619         XSS blocker false positive when page contains <iframe src="">
2620         https://bugs.webkit.org/show_bug.cgi?id=93416
2621
2622         Reviewed by Adam Barth.
2623
2624         Treat src="" and src="about:blank" as safe resources even if they appear
2625         in the query parameters.
2626
2627         Tests: http/tests/security/xssAuditor/iframe-injection-allowed-2.html
2628                http/tests/security/xssAuditor/iframe-injection-allowed-3.html
2629                http/tests/security/xssAuditor/iframe-injection-allowed.html
2630
2631         * html/parser/XSSAuditor.cpp:
2632         (WebCore::XSSAuditor::isLikelySafeResource):
2633
2634 2012-11-01  Tien-Ren Chen  <trchen@chromium.org>
2635
2636         Fix assertion failure in RenderGeometryMap::absoluteRect when frame scale != 1.0
2637         https://bugs.webkit.org/show_bug.cgi?id=100912
2638
2639         Reviewed by Simon Fraser.
2640
2641         Frame scale will add transformation to RenderView, so fixed position doesn't
2642         get propagated up to the viewport by RenderGeometryMap. This is handled
2643         correctly in RenderView::mapLocalToContainer, causing the assertion to fail.
2644         This patch corrects RenderGeometryMap::mapToAbsolute to handle the RenderView
2645         transformation case.
2646
2647         A layout test is added to catch this issue. The test will crash debug build
2648         without this patch.
2649
2650         Test: compositing/geometry/fixed-position-composited-page-scale-scroll.html
2651
2652         * rendering/RenderGeometryMap.cpp:
2653         (WebCore::RenderGeometryMap::mapToAbsolute):
2654
2655 2012-11-01  Adam Barth  <abarth@webkit.org>
2656
2657         [V8] Generalize NodeWrapperMap to be able to handle other sorts of keys
2658         https://bugs.webkit.org/show_bug.cgi?id=100973
2659
2660         Reviewed by Kentaro Hara.
2661
2662         This is the first step towards using intrusive DOM wrapper maps more
2663         widely in WebCore (see
2664         http://lists.webkit.org/pipermail/webkit-dev/2012-November/022686.html
2665         for more context).
2666
2667         * bindings/v8/DOMDataStore.cpp:
2668         (WebCore::DOMDataStore::DOMDataStore):
2669         * bindings/v8/IntrusiveDOMWrapperMap.h:
2670         (WebCore):
2671         (WebCore::IntrusiveDOMWrapperMap::weakCallback):
2672
2673 2012-11-01  Alexandru Chiculita  <achicu@adobe.com>
2674
2675         [CSS Shaders] CustomFilterOperation should be converted to ValidatedCustomFilterOperation before using it
2676         https://bugs.webkit.org/show_bug.cgi?id=100533
2677
2678         Reviewed by Dean Jackson.
2679
2680         Added the code that converts a CustomFilterOperation to a ValidatedCustomFilterOperation.
2681         Both the software path and the composited one will use this operation instead. There will be
2682         no need to check the shader in platform code anymore.
2683
2684         No new tests, already covered by existing custom filter tests.
2685
2686         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
2687         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
2688         * platform/graphics/filters/ValidatedCustomFilterOperation.h:
2689         (WebCore):
2690         (WebCore::ValidatedCustomFilterOperation::create):
2691         (ValidatedCustomFilterOperation):
2692         (WebCore::ValidatedCustomFilterOperation::validatedProgram):
2693         (WebCore::ValidatedCustomFilterOperation::parameters):
2694         (WebCore::ValidatedCustomFilterOperation::meshRows):
2695         (WebCore::ValidatedCustomFilterOperation::meshColumns):
2696         (WebCore::ValidatedCustomFilterOperation::meshType):
2697         (WebCore::ValidatedCustomFilterOperation::operator==):
2698         * rendering/FilterEffectRenderer.cpp:
2699         (WebCore::createCustomFilterEffect):
2700         (WebCore::FilterEffectRenderer::build):
2701         * rendering/RenderLayer.cpp:
2702         (WebCore::RenderLayer::ensureBacking):
2703         (WebCore::RenderLayer::clearBacking):
2704         (WebCore::RenderLayer::styleChanged): updateOrRemoveFilterClients needs to be called before the composited
2705         layer is updated. Otherwise the composited layer will never see a loaded filter in the first call.
2706         (WebCore):
2707         (WebCore::RenderLayer::isCSSCustomFilterEnabled):
2708         (WebCore::RenderLayer::computeFilterOperations):
2709         (WebCore::RenderLayer::updateOrRemoveFilterClients): Split updateOrRemoveFilterEffect into 2 functions.
2710         This one is supposed to add the clients needed to load network resources.
2711         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Figures out if a software fallback is needed 
2712         and creates a FilterEffectRenderer.
2713         * rendering/RenderLayer.h:
2714         (RenderLayer):
2715
2716 2012-11-01  Max Vujovic  <mvujovic@adobe.com>
2717
2718         [CSS Shaders] Get rid of internal tex coord attribute
2719         https://bugs.webkit.org/show_bug.cgi?id=94358
2720
2721         Reviewed by Dean Jackson.
2722
2723         Remove the internal css_a_texCoord attribute that WebKit added to shaders in order to
2724         sample the element texture by texture coordinate.
2725
2726         Now, the WebKit-added sampling code can leverage a_texCoord if the author defined it, or
2727         WebKit can add its own a_texCoord definition to the author's shader.
2728
2729         Note that vertex attributes are read-only in GLSL. Also, note that we already reject the
2730         shader if the author did not define a_texCoord with the correct type. Essentially, if
2731         a_texCoord exists in the author's validated shader, we are guaranteed that it's the correct
2732         type and that its value is unmodified.
2733
2734         Test: css3/filters/custom/custom-filter-a-tex-coord-optional.html
2735
2736         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
2737         (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
2738             Remove the references to m_internalTexCoordAttribLocation.
2739         (WebCore::CustomFilterCompiledProgram::initializeParameterLocations): Ditto.
2740         * platform/graphics/filters/CustomFilterCompiledProgram.h: Ditto.
2741         * platform/graphics/filters/CustomFilterRenderer.cpp:
2742         (WebCore::CustomFilterRenderer::bindProgramAndBuffers): Ditto.
2743         (WebCore::CustomFilterRenderer::unbindVertexAttributes): Ditto.
2744         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2745         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
2746             Pass the set of symbols found in the author's shaders to the rewriteMixVertexShader
2747             method.
2748         (WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader):
2749             If the author didn't define a_texCoord, add it to the end of the author's vertex 
2750             shader, but before the shader's new main function. As before, the new main function
2751             will pass the texture coordinate to the fragment shader via the css_v_texCoord varying.
2752         * platform/graphics/filters/CustomFilterValidatedProgram.h:
2753         (WebCore):
2754             Add a forward declaration for ANGLEShaderSymbol.
2755         (CustomFilterValidatedProgram):
2756             Update the method prototype for rewriteMixVertexShader.
2757
2758 2012-11-01  Chris Rogers  <crogers@google.com>
2759
2760         Ensure that AudioNode deletion is synchronized with a stable state of the rendering graph
2761         https://bugs.webkit.org/show_bug.cgi?id=100994
2762
2763         Reviewed by Kenneth Russell.
2764
2765         In some rare cases it has been observed that nodes are getting deleted in the main thread
2766         during an audio rendering quantum where the dirty inputs and outputs have not yet been cleaned
2767         via calls to handleDirtyAudioSummingJunctions() and handleDirtyAudioNodeOutputs().
2768         This was possible because nodes marked for deletion with markForDeletion() could be picked
2769         up in a subsequent call to deleteMarkedNodes() before the render quantum has finished and
2770         handlePostRenderTasks() has had a chance to reconcile these marked nodes and clean the dirty state.
2771         The solution is to manage the marked nodes in a separate vector which only gets copied to another
2772         vector truly eligible for deletion which is synchronized in handlePostRenderTasks().
2773
2774         * Modules/webaudio/AudioContext.cpp:
2775         (WebCore::AudioContext::markForDeletion):
2776         (WebCore::AudioContext::scheduleNodeDeletion):
2777         (WebCore::AudioContext::deleteMarkedNodes):
2778         * Modules/webaudio/AudioContext.h:
2779         (AudioContext):
2780
2781 2012-11-01  Ryosuke Niwa  <rniwa@webkit.org>
2782
2783         Build fix after r133224 as suggested by Enrica.
2784         Confirmed the test failures go away on Chromium Mac locally.
2785
2786         * page/EventHandler.cpp:
2787         (WebCore::EventHandler::updateSelectionForMouseDrag):
2788
2789 2012-11-01  Alexey Proskuryakov  <ap@apple.com>
2790
2791         Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
2792
2793         Rubber-stamped by Joe Pecoraro.
2794
2795         All CFNetwork based platforms have this now, but not all use it at the moment.
2796
2797         * loader/ResourceLoader.h:
2798         * loader/SubresourceLoader.h:
2799         * loader/cf/SubresourceLoaderCF.cpp:
2800         * loader/mac/ResourceLoaderMac.mm:
2801         * platform/SharedBuffer.cpp:
2802         (WebCore::SharedBuffer::clear):
2803         (WebCore::SharedBuffer::buffer):
2804         (WebCore::SharedBuffer::getSomeData):
2805         * platform/SharedBuffer.h:
2806         * platform/cf/SharedBufferCF.cpp:
2807         * platform/network/ResourceHandle.h:
2808         * platform/network/ResourceHandleClient.h:
2809         (ResourceHandleClient):
2810         * platform/network/cf/ResourceHandleCFNet.cpp:
2811         (WebCore::willCacheResponse):
2812         (WebCore::ResourceHandle::createCFURLConnection):
2813         * platform/network/mac/ResourceHandleMac.mm:
2814
2815 2012-11-01  Alexey Proskuryakov  <ap@apple.com>
2816
2817         Fix HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) build
2818         https://bugs.webkit.org/show_bug.cgi?id=100979
2819
2820         Reviewed by Joseph Pecoraro.
2821
2822         * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::append):
2823         * loader/ResourceBuffer.h:
2824         Added a version of append() that takes CFDataRef, passing it directly to SharedBuffer.
2825
2826         * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray):
2827         InspectorInstrumentation now takes a length. Unfortunately, we don't have encodedLength
2828         here, meaning that the results will likely be incorrect.
2829
2830         * platform/network/cf/ResourceHandleCFNet.cpp:
2831         (WebCore::willCacheResponse): Removed a version that needlessly used deprecated API.
2832         (WebCore::ResourceHandle::createCFURLConnection): This code assumed that
2833         HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) and USE(PROTECTION_SPACE_AUTH_CALLBACK) always
2834         come together. Changed to check for these separately.
2835
2836 2012-11-01  Rob Buis  <rbuis@rim.com>
2837
2838         [BlackBerry] Add more form validation strings
2839         https://bugs.webkit.org/show_bug.cgi?id=100978
2840
2841         Reviewed by Yong Li.
2842
2843         PR 210072
2844
2845         Implement these two methods properly.
2846
2847         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2848         (WebCore::validationMessageRangeUnderflowText):
2849         (WebCore::validationMessageRangeOverflowText):
2850
2851 2012-11-01  Alexandru Chiculita  <achicu@adobe.com>
2852
2853         [CSS Shaders] Move MeshBoxType out of CustomFilterOperation
2854         https://bugs.webkit.org/show_bug.cgi?id=100782
2855
2856         Reviewed by Dean Jackson.
2857
2858         Moved CustomFilter::MeshBoxType enum to the CustomFilterConstants.h file and renamed it to CustomFilterMeshBoxType. 
2859         This way we can reuse it without including the CustomFilterOperation file.
2860
2861         No new tests, just refactoring code.
2862
2863         * css/CSSPrimitiveValueMappings.h:
2864         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2865         (WebCore::CSSPrimitiveValue::operator CustomFilterMeshBoxType):
2866         * css/StyleResolver.cpp:
2867         (WebCore::StyleResolver::createCustomFilterOperation):
2868         * platform/graphics/filters/CustomFilterArrayParameter.h: Adding AnimationUtilities.h for WebCore::blend, looks like
2869         CustomFilterOperation already included AnimationsUtilities.h indirectly.
2870         * platform/graphics/filters/CustomFilterConstants.h: Added CustomFilterMeshBoxType.
2871         * platform/graphics/filters/CustomFilterNumberParameter.h:
2872         * platform/graphics/filters/CustomFilterOperation.cpp:
2873         (WebCore::CustomFilterOperation::CustomFilterOperation):
2874         * platform/graphics/filters/CustomFilterOperation.h:
2875         (WebCore::CustomFilterOperation::create):
2876         (WebCore::CustomFilterOperation::meshBoxType):
2877         (CustomFilterOperation):
2878         * platform/graphics/filters/CustomFilterRenderer.cpp:
2879         (WebCore::CustomFilterRenderer::create):
2880         (WebCore::CustomFilterRenderer::CustomFilterRenderer):
2881         * platform/graphics/filters/CustomFilterRenderer.h: Also removed the need to include CustomFilterOperation.h. Some other
2882         headers were needed to replace the files that were automatically incldued because of that file.
2883         (WebCore):
2884         (CustomFilterRenderer):
2885         * platform/graphics/filters/FECustomFilter.cpp:
2886         (WebCore::FECustomFilter::FECustomFilter):
2887         (WebCore::FECustomFilter::create):
2888         * platform/graphics/filters/FECustomFilter.h:
2889         (FECustomFilter):
2890
2891 2012-11-01  Enrica Casucci  <enrica@apple.com>
2892
2893         Part2 of: Extend -webkit-user-select with new value "all"
2894         <rdar://problem/10161404>
2895         https://bugs.webkit.org/show_bug.cgi?id=91912
2896
2897         Reviewed by Ryosuke Niwa.
2898
2899         The new value "all" for -webkit-user-select property gives content none-or-all selection option.
2900         The patch was originally prepared by Alice Cheng but the approach has been changed.
2901         The idea is to treat these elements like non editable, meaning that we should skip over them entirely
2902         when moving the cursor and a deletion should delete the element and all its descentants at once.
2903         The key change is in Node::rendererIsEditable where we now return false if the element style is
2904         userSelect: all. The other change is in the way we create the selection on mouse click and dragging
2905         over the element. In both cases we force the selection to extend over the entire element with
2906         the user-select: all attribute.
2907         This is currently enabled only for the Mac port.
2908
2909         Test: editing/selection/user-select-all-selection.html
2910
2911         * dom/Node.cpp: Added a parameter to isContentEditable to behave differently
2912         when called from JavaScript. Internally isContentEditable returns false on
2913         nodes with user-select: all style.
2914         (WebCore::Node::isContentEditable):
2915         (WebCore::Node::isContentRichlyEditable):
2916         (WebCore::Node::rendererIsEditable):
2917         (WebCore::Node::shouldUseInputMethod):
2918         (WebCore::Node::willRespondToMouseClickEvents):
2919         * dom/Node.h:
2920         (WebCore::Node::rendererIsEditable):
2921         (WebCore::Node::rendererIsRichlyEditable):
2922         * dom/Position.cpp:
2923         (WebCore::Position::nodeIsUserSelectAll): Added.
2924         (WebCore::Position::rootUserSelectAllForNode): Added.
2925         * dom/Position.h: Added static functions described above.
2926         * editing/ApplyStyleCommand.cpp:
2927         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Added parameter to
2928         isContentEditable() call.
2929         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Added parameter to
2930         isContentEditable() call.
2931         * editing/DeleteFromTextNodeCommand.cpp:
2932         (WebCore::DeleteFromTextNodeCommand::doApply): Added parameter to
2933         isContentEditable() call.
2934         * editing/FrameSelection.cpp:
2935         (WebCore::adjustForwardPositionForUserSelectAll): New helper function.
2936         (WebCore::adjustBackwardPositionForUserSelectAll): New helper function.
2937         (WebCore::FrameSelection::modifyExtendingRight):
2938         (WebCore::FrameSelection::modifyExtendingForward):
2939         (WebCore::FrameSelection::modifyExtendingLeft):
2940         (WebCore::FrameSelection::modifyExtendingBackward):
2941         (WebCore::FrameSelection::modify):
2942         (WebCore::CaretBase::invalidateCaretRect): Added parameter to
2943         isContentEditable() call.
2944         * editing/InsertNodeBeforeCommand.cpp:
2945         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
2946         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
2947         * editing/RemoveNodeCommand.cpp:
2948         (WebCore::RemoveNodeCommand::doApply): Ditto.
2949         * editing/visible_units.cpp:
2950         (WebCore::startOfParagraph): We should not consider a paragraph break and element
2951         with user-select: all style, like we do at the border of editability.
2952         (WebCore::endOfParagraph): Ditto.
2953         * page/EventHandler.cpp:
2954         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): Create a selection
2955         around the element whose style is user-select: all.
2956         (WebCore::EventHandler::updateSelectionForMouseDrag): Ditto.
2957         * rendering/RootInlineBox.cpp:
2958         (WebCore::RootInlineBox::selectionState): Fixed a bug uncovered during this work.
2959         If the selection starts in one of the leaf boxes and after we encounter one with SelectionNone,
2960         we should return the selection state as SelectionBoth, assuming we went past the end selection.
2961         This avoids doing an incorrect gap filling for the selection highlighting.
2962
2963 2012-11-01  Alec Flett  <alecflett@chromium.org>
2964
2965         IndexedDB: Fix Windows build by re-adding a #include
2966         https://bugs.webkit.org/show_bug.cgi?id=100986
2967
2968         Reviewed by Stephen White.
2969
2970         Fix #include that broke windows.
2971
2972         * Modules/indexeddb/IDBCallbacks.h:
2973
2974 2012-11-01  David Barton  <dbarton@mathscribe.com>
2975
2976         REGRESSION (r128837): mathml/presentation/subsup.xhtml became flaky
2977         https://bugs.webkit.org/show_bug.cgi?id=97390
2978
2979         Reviewed by Ojan Vafai.
2980
2981         In a RenderMathMLSubSup, we need to set the base's wrapper's style so that baseHeight
2982         in layout() will be the base's true height, without any flexbox stretching.
2983
2984         Tested by existing tests.
2985
2986         * rendering/mathml/RenderMathMLSubSup.cpp:
2987         (WebCore::RenderMathMLSubSup::fixAnonymousStyles):
2988         (WebCore::RenderMathMLSubSup::addChild):
2989         (WebCore::RenderMathMLSubSup::styleDidChange):
2990         * rendering/mathml/RenderMathMLSubSup.h:
2991         (RenderMathMLSubSup):
2992
2993 2012-11-01  Antti Koivisto  <antti@apple.com>
2994
2995         REGRESSION (r132941): attribute modification 10% performance regression
2996         https://bugs.webkit.org/show_bug.cgi?id=100873
2997
2998         Reviewed by Ojan Vafai.
2999
3000         Don't do the class change finding by mutating SpaceSplitString. It is slow. Instead use a bit vector
3001         to mark the unchanged classes
3002
3003         * css/StyleResolver.cpp:
3004         (WebCore):
3005         * css/StyleResolver.h:
3006         (WebCore::StyleResolver::hasSelectorForAttribute):
3007         (WebCore):
3008         (WebCore::StyleResolver::hasSelectorForClass):
3009         (WebCore::StyleResolver::hasSelectorForId):
3010         
3011             Inlined these and moved value validity testing to clients.
3012
3013         * dom/Element.cpp:
3014         (WebCore::checkNeedsStyleInvalidationForIdChange):
3015         (WebCore):
3016         (WebCore::Element::attributeChanged):
3017     
3018             Clean up id testing too.
3019
3020         (WebCore::checkNeedsStyleInvalidationForClassChange):
3021         
3022             Use bit vector for marking seen values. Avoids allocations and reffing.
3023
3024         (WebCore::Element::classAttributeChanged):
3025         
3026             Don't test if style is already invalid.
3027
3028 2012-11-01  Ryosuke Niwa  <rniwa@webkit.org>
3029
3030         [Mac] Crash in Range::editingStartPosition
3031         https://bugs.webkit.org/show_bug.cgi?id=100972
3032
3033         Reviewed by Enrica Casucci.
3034
3035         Add a missing null pointer check. toNormalizedRange() can return null here, in which case the call to
3036         pastLastNode() will crash.
3037
3038         No new tests since determining the exact condition under which we go through the said code path and
3039         toNormalRange returns null is hard.
3040
3041         * editing/mac/EditorMac.mm:
3042         (WebCore::Editor::fontForSelection):
3043
3044 2012-11-01  Beth Dakin  <bdakin@apple.com>
3045
3046         https://bugs.webkit.org/show_bug.cgi?id=100917
3047         There should be a way to dump the scrolling tree from the layout tests
3048
3049         Reviewed by Simon Fraser.
3050
3051         New Internals call to dump the scrolling state tree as text. Calls through to the 
3052         ScrollingCoordinator.
3053         * testing/Internals.cpp:
3054         (WebCore::Internals::scrollingStateTreeAsText):
3055         (WebCore):
3056         * testing/Internals.h:
3057         * testing/Internals.idl:
3058         * WebCore.exp.in:
3059         * page/Page.cpp:
3060         (WebCore::Page::scrollingStateTreeAsText):
3061         (WebCore):
3062         * page/Page.h:
3063         (Page):
3064
3065         ScrollingCoordinator tells the rootStateNode to dump the tree as text.
3066         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3067         (ScrollingCoordinatorMac):
3068         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3069         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText):
3070         (WebCore):
3071         * page/scrolling/ScrollingCoordinator.cpp:
3072         (WebCore::ScrollingCoordinator::scrollingStateTreeAsText):
3073         (WebCore):
3074         * page/scrolling/ScrollingCoordinator.h:
3075         (ScrollingCoordinator):
3076
3077         dumpNode() dumps generic stuff for each node, and dumpProperties will dump the 
3078         properties that are specific to different types of nodes.
3079         * page/scrolling/ScrollingStateNode.cpp:
3080         (WebCore::ScrollingStateNode::writeIndent):
3081         (WebCore):
3082         (WebCore::ScrollingStateNode::dumpNode):
3083         (WebCore::ScrollingStateNode::scrollingStateTreeAsText):
3084         * page/scrolling/ScrollingStateNode.h:
3085         (WebCore):
3086         (ScrollingStateNode):
3087         * page/scrolling/ScrollingStateScrollingNode.cpp:
3088         (WebCore::ScrollingStateScrollingNode::dumpProperties):
3089         (WebCore):
3090         * page/scrolling/ScrollingStateScrollingNode.h:
3091         (ScrollingStateScrollingNode):
3092
3093 2012-11-01  Kenneth Russell  <kbr@google.com>
3094
3095         Add RGB to supported destination formats of ImageBuffer::copyToPlatformTexture
3096         https://bugs.webkit.org/show_bug.cgi?id=100971
3097
3098         Reviewed by Stephen White.
3099
3100         The ImageBuffer::copyToPlatformTexture restriction added in
3101         r132965 was too restrictive. Allow RGB textures to prevent
3102         performance regressions.
3103
3104         * html/canvas/WebGLRenderingContext.cpp:
3105         (WebCore):
3106         (WebCore::WebGLRenderingContext::texImage2D):
3107         * platform/graphics/ImageBuffer.h:
3108         (ImageBuffer):
3109
3110 2012-11-01  Michael Matovsky  <mmatovsky@rim.com>
3111
3112         [BlackBerry] Web page view state should be preserved for pages loaded from page cache
3113         https://bugs.webkit.org/show_bug.cgi?id=100694
3114         Internal PR: 220488
3115
3116         Internally reviewed by Lianghui Chen, Joe Mason
3117         Reviewed by Rob Buis.
3118
3119         The web page view specific metadata should be preserved for web pages loaded from page cache (by using back/forward).
3120         This requires web page view state to be saved in and restored from the corresponding page cache history item.
3121
3122         No new tests for platform specific internal change.
3123
3124         * history/blackberry/HistoryItemViewState.h:
3125         (HistoryItemViewState):
3126
3127 2012-11-01  Alec Flett  <alecflett@chromium.org>
3128
3129         IndexedDB: add methods to support id-based backend APIs
3130         https://bugs.webkit.org/show_bug.cgi?id=100425
3131
3132         Reviewed by Tony Chang.
3133
3134         First half of refactor involves adding a number of methods that
3135         are int64_t-based rather than String-based. As a part of this, the
3136         IDB*Metadata structs and the backend objectStore/index maps all
3137         use int64_t as keys, rather than String.
3138
3139         In addition, there were a number of cleanups that came out of the
3140         refactor:
3141
3142         - The list of object stores active in a transaction is now
3143           maintained by the frontend IDBTransaction rather than the backend
3144           IDBTransactionBackendImpl. This also had a simplifying rippling
3145           effect through other call signatures.
3146
3147         - I was able to remove an apparently old FIXME from
3148           IDBTransactionBackendImpl::objectStore and replace it with an ASSERT.
3149
3150         - IDBObjectStoreBackendImpl's IndexWriter class got a little
3151           simpler since the id is now easily available in the
3152           IDBIndexMetadata.
3153
3154         - A number of methods got simpler in their int64_t versions,
3155           specifically dropping a number of ExceptionCodes.
3156
3157         There is also some glue code
3158         (getIndexId/getIndexIds/getObjectStoreId) that will go away with
3159         the 2nd half of this: https://bugs.webkit.org/show_bug.cgi?id=100425
3160
3161         No new tests, no new functionality as this is just a refactor.
3162
3163         * Modules/indexeddb/IDBDatabase.cpp:
3164         (WebCore::IDBDatabase::objectStoreNames):
3165         (WebCore::IDBDatabase::createObjectStore):
3166         (WebCore::IDBDatabase::deleteObjectStore):
3167         (WebCore::IDBDatabase::transaction):
3168         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3169         (WebCore::IDBDatabaseBackendImpl::metadata):
3170         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
3171         (WebCore::IDBDatabaseBackendImpl::objectStore):
3172         (WebCore::IDBDatabaseBackendImpl::getObjectStoreId):
3173         (WebCore):
3174         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
3175         (WebCore::IDBDatabaseBackendImpl::transaction):
3176         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
3177         (WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap):
3178         (WebCore::IDBDatabaseBackendImpl::addObjectStoreToMap):
3179         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3180         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
3181         (IDBDatabaseBackendImpl):
3182         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3183         (IDBDatabaseBackendInterface):
3184         * Modules/indexeddb/IDBIndex.h:
3185         (WebCore::IDBIndex::id):
3186         (WebCore::IDBIndex::openKeyCursor):
3187         * Modules/indexeddb/IDBIndexBackendInterface.h:
3188         * Modules/indexeddb/IDBMetadata.h:
3189         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
3190         (IDBIndexMetadata):
3191         (IDBObjectStoreMetadata):
3192         (WebCore::IDBObjectStoreMetadata::containsIndex):
3193         (IDBDatabaseMetadata):
3194         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
3195         (WebCore::IDBDatabaseMetadata::containsObjectStore):
3196         * Modules/indexeddb/IDBObjectStore.cpp:
3197         (WebCore::IDBObjectStore::indexNames):
3198         (WebCore::IDBObjectStore::put):
3199         (WebCore::IDBObjectStore::createIndex):
3200         (WebCore::IDBObjectStore::index):
3201         (WebCore::IDBObjectStore::deleteIndex):
3202         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3203         (WebCore::IDBObjectStoreBackendImpl::put):
3204         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
3205         (WebCore):
3206         (WebCore::makeIndexWriters):
3207         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
3208         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
3209         (WebCore::IDBObjectStoreBackendImpl::setIndexesReadyInternal):
3210         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3211         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
3212         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3213         (WebCore::IDBObjectStoreBackendImpl::index):
3214         (WebCore::IDBObjectStoreBackendImpl::getIndexId):
3215         (WebCore::IDBObjectStoreBackendImpl::getIndexIds):
3216         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
3217         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
3218         (WebCore::IDBObjectStoreBackendImpl::removeIndexFromMap):
3219         (WebCore::IDBObjectStoreBackendImpl::addIndexToMap):
3220         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
3221         (IDBObjectStoreBackendImpl):
3222         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
3223         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3224         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
3225         * Modules/indexeddb/IDBRequest.cpp:
3226         (WebCore::IDBRequest::onSuccess):
3227         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
3228         * Modules/indexeddb/IDBTransaction.cpp:
3229         (WebCore::IDBTransaction::create):
3230         (WebCore::IDBTransaction::IDBTransaction):
3231         (WebCore::IDBTransaction::objectStore):
3232         * Modules/indexeddb/IDBTransaction.h:
3233         (IDBTransaction):
3234         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3235         (WebCore::IDBTransactionBackendImpl::create):
3236         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
3237         (WebCore::IDBTransactionBackendImpl::objectStore):
3238         (WebCore):
3239         (WebCore::IDBTransactionBackendImpl::scheduleTask):
3240         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3241         (IDBTransactionBackendImpl):
3242         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3243
3244 2012-11-01  Adam Barth  <abarth@webkit.org>
3245
3246         [V8] The DOMWrapperVisitor abstraction is no longer needed
3247         https://bugs.webkit.org/show_bug.cgi?id=100965
3248
3249         Reviewed by Kentaro Hara.
3250
3251         This patch removes the DOMWrapperVisitor interface because it is no
3252         longer needed. As a consequence, DOMWrapperMaps no longer need to
3253         support enumeration, and we can move more DOM objects to use the faster
3254         intrusive wrappers.
3255
3256         There was one remaining user of DOMWrapperVisitor in the
3257         ScriptProfiler, which I've moved over to enumerating objects directly
3258         from V8, similar to a function above it in the same file.
3259
3260         * bindings/v8/DOMWrapperMap.h:
3261         (WebCore):
3262         (DOMWrapperMap):
3263         * bindings/v8/IntrusiveDOMWrapperMap.h:
3264         * bindings/v8/ScriptProfiler.cpp:
3265         (WebCore::ScriptProfiler::visitNodeWrappers):
3266         (WebCore::ScriptProfiler::visitExternalArrays):
3267
3268 2012-11-01  Mike West  <mkwst@chromium.org>
3269
3270         CSP 1.0: Warn when old-style directives encountered.
3271         https://bugs.webkit.org/show_bug.cgi?id=100883
3272
3273         Reviewed by Adam Barth.
3274
3275         In Mozilla's pre-W3C-spec implementation, a few directives are
3276         implemented that were either renamed, reworked, or removed from CSP 1.0.
3277         This patch adds special warning messages for three of those directives
3278         to set developer expectations correctly.
3279
3280         Test: http/tests/security/contentSecurityPolicy/source-list-parsing-deprecated.html
3281
3282         * page/ContentSecurityPolicy.cpp:
3283         (WebCore::CSPDirectiveList::parseDirective):
3284         (WebCore::CSPDirectiveList::addDirective):
3285         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
3286         * page/ContentSecurityPolicy.h:
3287             Rename 'reportUnrecognizedDirectives' to
3288             'reportUnsupportedDirectives', and teach it to give more descriptive
3289             error messages when encountering 'allow', 'options', and
3290             'policy-uri'.
3291
3292 2012-11-01  Pavel Feldman  <pfeldman@chromium.org>
3293
3294         Web Inspector: Update CodeMirror to v3
3295         https://bugs.webkit.org/show_bug.cgi?id=99319
3296
3297         Reviewed by Vsevolod Vlasov.
3298
3299         Updated to ToT v3.
3300
3301         * inspector/front-end/CodeMirrorTextEditor.js:
3302         (WebInspector.CodeMirrorTextEditor):
3303         (WebInspector.CodeMirrorTextEditor.prototype._gutterClick):
3304         (WebInspector.CodeMirrorTextEditor.prototype.addBreakpoint):
3305         (WebInspector.CodeMirrorTextEditor.prototype.removeBreakpoint):
3306         (WebInspector.CodeMirrorTextEditor.prototype.setExecutionLine):
3307         (WebInspector.CodeMirrorTextEditor.prototype.clearExecutionLine):
3308         (WebInspector.CodeMirrorTextEditor.prototype.highlightLine):
3309         (WebInspector.CodeMirrorTextEditor.prototype.clearLineHighlight):
3310         (WebInspector.CodeMirrorTextEditor.prototype._change):
3311         * inspector/front-end/cm/cmdevtools.css:
3312         (.CodeMirror):
3313         (.CodeMirror-linenumber):
3314         (.cm-breakpoint):
3315         * inspector/front-end/cm/codemirror.css:
3316         (.CodeMirror):
3317         (.CodeMirror-scroll):
3318         (.CodeMirror-lines):
3319         (.CodeMirror pre):
3320         (.CodeMirror-scrollbar-filler):
3321         (.CodeMirror-gutters):
3322         (.CodeMirror-linenumbers):
3323         (.CodeMirror-linenumber):
3324         (.CodeMirror pre.CodeMirror-cursor):
3325         (.CodeMirror pre.CodeMirror-secondarycursor):
3326         (.cm-keymap-fat-cursor pre.CodeMirror-cursor):
3327         (.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id)):
3328         (.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite):
3329         (.cm-s-default .cm-keyword):
3330         (.cm-s-default .cm-atom):
3331         (.cm-s-default .cm-number):
3332         (.cm-s-default .cm-def):
3333         (.cm-s-default .cm-variable):
3334         (.cm-s-default .cm-variable-2):
3335         (.cm-s-default .cm-variable-3):
3336         (.cm-s-default .cm-property):
3337         (.cm-s-default .cm-operator):
3338         (.cm-s-default .cm-comment):
3339         (.cm-s-default .cm-string):
3340         (.cm-s-default .cm-string-2):
3341         (.cm-s-default .cm-meta):
3342         (.cm-s-default .cm-error):
3343         (.cm-s-default .cm-qualifier):
3344         (.cm-s-default .cm-builtin):
3345         (.cm-s-default .cm-bracket):
3346         (.cm-s-default .cm-tag):
3347         (.cm-s-default .cm-attribute):
3348         (.cm-s-default .cm-header):
3349         (.cm-s-default .cm-quote):
3350         (.cm-s-default .cm-hr):
3351         (.cm-s-default .cm-link):
3352         (.cm-header, .cm-strong):
3353         (.cm-em):
3354         (.cm-emstrong):
3355         (.cm-link):
3356         (.cm-invalidchar):
3357         (div.CodeMirror span.CodeMirror-matchingbracket):
3358         (div.CodeMirror span.CodeMirror-nonmatchingbracket):
3359         (.CodeMirror-sizer):
3360         (.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler):
3361         (.CodeMirror-vscrollbar):
3362         (.CodeMirror-hscrollbar):
3363         (.CodeMirror-gutter):
3364         (.CodeMirror-gutter-elt):
3365         (.CodeMirror-linebackground):
3366         (.CodeMirror-linewidget):
3367         (.CodeMirror-measure):
3368         (.CodeMirror-measure pre):
3369         (.CodeMirror-selected):
3370         (.CodeMirror-focused .CodeMirror-selected):
3371         (.CodeMirror span):
3372         * inspector/front-end/cm/codemirror.js:
3373         (window.CodeMirror.):
3374         (window.CodeMirror):
3375         * inspector/front-end/utilities.js:
3376
3377 2012-11-01  Tiancheng Jiang  <tijiang@rim.com>
3378
3379         [BlackBerry] Update BB10 form theme.
3380         https://bugs.webkit.org/show_bug.cgi?id=100760
3381
3382         Reviewed by Rob Buis.
3383
3384         RIM PR 235194.
3385
3386         Check img pointer is null, if so, do early return.
3387
3388         * platform/blackberry/RenderThemeBlackBerry.cpp:
3389         (WebCore::drawControl):
3390         (WebCore::drawThreeSlice):
3391         (WebCore::drawNineSlice):
3392
3393 2012-11-01  Adam Barth  <abarth@webkit.org>
3394
3395         [V8] The V8DOMMap visitors are no longer needed
3396         https://bugs.webkit.org/show_bug.cgi?id=100963
3397
3398         Reviewed by Kentaro Hara.
3399
3400         This patch inlines visitAllDOMNodes into its one caller (and removes
3401         one layer of visitor adaptor abstraction).
3402
3403         * bindings/v8/ScriptProfiler.cpp:
3404         (WebCore::ScriptProfiler::visitNodeWrappers):
3405         * bindings/v8/V8DOMMap.cpp:
3406         * bindings/v8/V8DOMMap.h:
3407         (WebCore):
3408
3409 2012-11-01  Tiancheng Jiang  <tijiang@rim.com>
3410
3411         [BlackBerry] Update BB10 form theme.
3412         https://bugs.webkit.org/show_bug.cgi?id=100760
3413
3414         Reviewed by Rob Buis.
3415
3416         RIM PR 235194.
3417
3418         Check img pointer is null, if so, do early return.
3419
3420         * platform/blackberry/RenderThemeBlackBerry.cpp:
3421         (WebCore::drawControl):
3422         (WebCore::drawThreeSlice):
3423         (WebCore::drawNineSlice):
3424
3425 2012-11-01  Adam Barth  <abarth@webkit.org>
3426
3427         Unreviewed. Build fix.
3428
3429         * bindings/v8/V8GCController.cpp:
3430
3431 2012-11-01  Christophe Dumez  <christophe.dumez@intel.com>